Fix some tests

This commit is contained in:
Michael 2022-01-16 20:25:46 +00:00
parent dc48f9b8f0
commit 88ac888a3b
3 changed files with 6 additions and 6 deletions

View File

@ -36,7 +36,7 @@ class ActivitiesTest extends FixtureTest
{ {
$item = ['uid' => 0, 'uri-id' => 1]; $item = ['uid' => 0, 'uri-id' => 1];
$result = (new Activities(DI::logger(), DI::baseUrl(), DI::twitterUser())) $result = (new Activities(DI::logger(), DI::twitterUser()))
->createFromUriId($item['uri-id'], $item['uid']); ->createFromUriId($item['uri-id'], $item['uid']);
self::assertArrayHasKey('like', $result); self::assertArrayHasKey('like', $result);
@ -55,7 +55,7 @@ class ActivitiesTest extends FixtureTest
{ {
$item = ['uid' => 0, 'uri-id' => 1]; $item = ['uid' => 0, 'uri-id' => 1];
$result = (new Activities(DI::logger(), DI::baseUrl(), DI::twitterUser())) $result = (new Activities(DI::logger(), DI::twitterUser()))
->createFromUriId($item['uri-id'], $item['uid'], 'xml'); ->createFromUriId($item['uri-id'], $item['uid'], 'xml');
self::assertArrayHasKey('friendica:like', $result); self::assertArrayHasKey('friendica:like', $result);

View File

@ -48,7 +48,7 @@ class StatusTest extends FixtureTest
new Media(DI::logger(), DI::baseUrl()), new Media(DI::logger(), DI::baseUrl()),
new Url(DI::logger()), new Url(DI::logger()),
new Mention(DI::logger(), DI::baseUrl()), new Mention(DI::logger(), DI::baseUrl()),
new Activities(DI::logger(), DI::baseUrl(), DI::twitterUser()), new Activities(DI::logger(), DI::twitterUser()),
new Attachment(DI::logger())); new Attachment(DI::logger()));
} }

View File

@ -38,7 +38,7 @@ class StatusesTest extends ApiTest
{ {
$this->expectException(BadRequestException::class); $this->expectException(BadRequestException::class);
(new Statuses(DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [])) (new Statuses(DI::dba(), DI::twitterStatus(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
->run(); ->run();
} }
@ -47,7 +47,7 @@ class StatusesTest extends ApiTest
*/ */
public function testApiListsStatusesWithListId() public function testApiListsStatusesWithListId()
{ {
$response = (new Statuses(DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [])) $response = (new Statuses(DI::dba(), DI::twitterStatus(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
->run([ ->run([
'list_id' => 1, 'list_id' => 1,
'page' => -1, 'page' => -1,
@ -67,7 +67,7 @@ class StatusesTest extends ApiTest
*/ */
public function testApiListsStatusesWithListIdAndRss() public function testApiListsStatusesWithListIdAndRss()
{ {
$response = (new Statuses(DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'rss'])) $response = (new Statuses(DI::dba(), DI::twitterStatus(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'rss']))
->run([ ->run([
'list_id' => 1 'list_id' => 1
]); ]);