From 88ac888a3b3e8a5632d8af00ee76644b5fe9b147 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 16 Jan 2022 20:25:46 +0000 Subject: [PATCH] Fix some tests --- tests/src/Factory/Api/Twitter/ActivitiesTest.php | 4 ++-- tests/src/Factory/Api/Twitter/StatusTest.php | 2 +- tests/src/Module/Api/Twitter/Lists/StatusesTest.php | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/src/Factory/Api/Twitter/ActivitiesTest.php b/tests/src/Factory/Api/Twitter/ActivitiesTest.php index 349537468e..7acdc09556 100644 --- a/tests/src/Factory/Api/Twitter/ActivitiesTest.php +++ b/tests/src/Factory/Api/Twitter/ActivitiesTest.php @@ -36,7 +36,7 @@ class ActivitiesTest extends FixtureTest { $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']); self::assertArrayHasKey('like', $result); @@ -55,7 +55,7 @@ class ActivitiesTest extends FixtureTest { $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'); self::assertArrayHasKey('friendica:like', $result); diff --git a/tests/src/Factory/Api/Twitter/StatusTest.php b/tests/src/Factory/Api/Twitter/StatusTest.php index 337fab086f..f608b66bb1 100644 --- a/tests/src/Factory/Api/Twitter/StatusTest.php +++ b/tests/src/Factory/Api/Twitter/StatusTest.php @@ -48,7 +48,7 @@ class StatusTest extends FixtureTest new Media(DI::logger(), DI::baseUrl()), new Url(DI::logger()), new Mention(DI::logger(), DI::baseUrl()), - new Activities(DI::logger(), DI::baseUrl(), DI::twitterUser()), + new Activities(DI::logger(), DI::twitterUser()), new Attachment(DI::logger())); } diff --git a/tests/src/Module/Api/Twitter/Lists/StatusesTest.php b/tests/src/Module/Api/Twitter/Lists/StatusesTest.php index 1f9226b84a..8bc8257c0c 100644 --- a/tests/src/Module/Api/Twitter/Lists/StatusesTest.php +++ b/tests/src/Module/Api/Twitter/Lists/StatusesTest.php @@ -38,7 +38,7 @@ class StatusesTest extends ApiTest { $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(); } @@ -47,7 +47,7 @@ class StatusesTest extends ApiTest */ 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([ 'list_id' => 1, 'page' => -1, @@ -67,7 +67,7 @@ class StatusesTest extends ApiTest */ 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([ 'list_id' => 1 ]);