From 9f8023b91f94aaf3ef2969b39ae9031457d02ac7 Mon Sep 17 00:00:00 2001 From: Art4 Date: Fri, 13 Dec 2024 22:42:27 +0000 Subject: [PATCH] rename and move ApiTest to ApiTestCase --- .../Api/ApiTest.php => ApiTestCase.php} | 7 ++---- .../Factory/Api/Twitter/DirectMessageTest.php | 10 ++++---- tests/src/Factory/Api/Twitter/StatusTest.php | 8 +++---- tests/src/Factory/Api/Twitter/UserTest.php | 24 +++++++++---------- .../Friendica/DirectMessages/SearchTest.php | 4 ++-- .../Module/Api/Friendica/NotificationTest.php | 4 ++-- .../Module/Api/Friendica/Photo/DeleteTest.php | 4 ++-- .../Api/Friendica/Photoalbum/DeleteTest.php | 4 ++-- .../Api/Friendica/Photoalbum/UpdateTest.php | 4 ++-- .../Api/GnuSocial/GnuSocial/ConfigTest.php | 4 ++-- .../Api/GnuSocial/GnuSocial/VersionTest.php | 4 ++-- .../Module/Api/GnuSocial/Help/TestTest.php | 4 ++-- .../Api/Mastodon/Accounts/StatusesTest.php | 4 ++-- .../Accounts/VerifyCredentialsTest.php | 4 ++-- .../Module/Api/Mastodon/ConversationsTest.php | 4 ++-- .../Api/Mastodon/PushSubscriptionTest.php | 4 ++-- tests/src/Module/Api/Mastodon/SearchTest.php | 4 ++-- .../Api/Mastodon/Timelines/HomeTest.php | 4 ++-- .../Mastodon/Timelines/PublicTimelineTest.php | 4 ++-- .../Twitter/Account/RateLimitStatusTest.php | 4 ++-- .../Api/Twitter/Account/UpdateProfileTest.php | 4 ++-- .../Module/Api/Twitter/Blocks/ListsTest.php | 4 ++-- .../Api/Twitter/DirectMessages/AllTest.php | 4 ++-- .../DirectMessages/ConversationTest.php | 4 ++-- .../Twitter/DirectMessages/DestroyTest.php | 4 ++-- .../Api/Twitter/DirectMessages/InboxTest.php | 4 ++-- .../Api/Twitter/DirectMessages/NewDMTest.php | 4 ++-- .../Api/Twitter/DirectMessages/SentTest.php | 4 ++-- .../Api/Twitter/Favorites/CreateTest.php | 4 ++-- .../Api/Twitter/Favorites/DestroyTest.php | 4 ++-- .../src/Module/Api/Twitter/FavoritesTest.php | 4 ++-- .../Api/Twitter/Followers/ListsTest.php | 4 ++-- .../Module/Api/Twitter/Friends/ListsTest.php | 4 ++-- .../Api/Twitter/Friendships/IncomingTest.php | 4 ++-- .../Module/Api/Twitter/Lists/StatusesTest.php | 4 ++-- .../Module/Api/Twitter/Media/UploadTest.php | 4 ++-- .../Module/Api/Twitter/SavedSearchesTest.php | 4 ++-- .../Api/Twitter/Statuses/DestroyTest.php | 4 ++-- .../Api/Twitter/Statuses/MentionsTest.php | 4 ++-- .../Statuses/NetworkPublicTimelineTest.php | 4 ++-- .../Api/Twitter/Statuses/RetweetTest.php | 4 ++-- .../Module/Api/Twitter/Statuses/ShowTest.php | 4 ++-- .../Api/Twitter/Statuses/UpdateTest.php | 4 ++-- .../Api/Twitter/Statuses/UserTimelineTest.php | 4 ++-- .../Module/Api/Twitter/Users/LookupTest.php | 4 ++-- .../Module/Api/Twitter/Users/SearchTest.php | 4 ++-- .../src/Module/Api/Twitter/Users/ShowTest.php | 4 ++-- tests/src/Module/BaseApiTest.php | 4 ++-- tests/src/Security/BasicAuthTest.php | 4 ++-- 49 files changed, 113 insertions(+), 116 deletions(-) rename tests/{src/Module/Api/ApiTest.php => ApiTestCase.php} (96%) diff --git a/tests/src/Module/Api/ApiTest.php b/tests/ApiTestCase.php similarity index 96% rename from tests/src/Module/Api/ApiTest.php rename to tests/ApiTestCase.php index 2044e3c8d5..26a6bb08ca 100644 --- a/tests/src/Module/Api/ApiTest.php +++ b/tests/ApiTestCase.php @@ -5,26 +5,23 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -namespace Friendica\Test\src\Module\Api; +namespace Friendica\Test; use Friendica\App; use Friendica\Capabilities\ICanCreateResponses; use Friendica\Core\Addon; use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\Core\Hook; -use Friendica\Database\Database; use Friendica\DI; use Friendica\Module\Special\HTTPException; use Friendica\Security\Authentication; use Friendica\Security\BasicAuth; -use Friendica\Test\FixtureTestCase; use Friendica\Test\Util\AppDouble; use Friendica\Test\Util\AuthenticationDouble; use Friendica\Test\Util\AuthTestConfig; -use Mockery\MockInterface; use Psr\Http\Message\ResponseInterface; -abstract class ApiTest extends FixtureTestCase +abstract class ApiTestCase extends FixtureTestCase { // User data that the test database is populated with const SELF_USER = [ diff --git a/tests/src/Factory/Api/Twitter/DirectMessageTest.php b/tests/src/Factory/Api/Twitter/DirectMessageTest.php index 8cb54657f3..1c8b12fa7e 100644 --- a/tests/src/Factory/Api/Twitter/DirectMessageTest.php +++ b/tests/src/Factory/Api/Twitter/DirectMessageTest.php @@ -10,7 +10,7 @@ namespace Friendica\Test\src\Factory\Api\Twitter; use Friendica\DI; use Friendica\Factory\Api\Twitter\DirectMessage; use Friendica\Test\FixtureTestCase; -use Friendica\Test\src\Module\Api\ApiTest; +use Friendica\Test\ApiTestCase; class DirectMessageTest extends FixtureTestCase { @@ -26,7 +26,7 @@ class DirectMessageTest extends FixtureTestCase $id = $ids[0]['id']; $directMessage = (new DirectMessage(DI::logger(), DI::dba(), DI::twitterUser())) - ->createFromMailId($id, ApiTest::SELF_USER['id']) + ->createFromMailId($id, ApiTestCase::SELF_USER['id']) ->toArray(); self::assertEquals('item_title' . "\n" . 'item_body', $directMessage['text']); @@ -49,7 +49,7 @@ class DirectMessageTest extends FixtureTestCase $id = $ids[0]['id']; $directMessage = (new DirectMessage(DI::logger(), DI::dba(), DI::twitterUser())) - ->createFromMailId($id, ApiTest::SELF_USER['id'], 'html') + ->createFromMailId($id, ApiTestCase::SELF_USER['id'], 'html') ->toArray(); self::assertEquals('item_title', $directMessage['title']); @@ -68,7 +68,7 @@ class DirectMessageTest extends FixtureTestCase $id = $ids[0]['id']; $directMessage = (new DirectMessage(DI::logger(), DI::dba(), DI::twitterUser())) - ->createFromMailId($id, ApiTest::SELF_USER['id'], 'plain') + ->createFromMailId($id, ApiTestCase::SELF_USER['id'], 'plain') ->toArray(); self::assertEquals('item_title', $directMessage['title']); @@ -90,7 +90,7 @@ class DirectMessageTest extends FixtureTestCase $id = $ids[0]['id']; $directMessage = (new DirectMessage(DI::logger(), DI::dba(), DI::twitterUser())) - ->createFromMailId($id, ApiTest::SELF_USER['id'], 'plain', $$GETUSEROBJECTS$$) + ->createFromMailId($id, ApiTestCase::SELF_USER['id'], 'plain', $$GETUSEROBJECTS$$) ->toArray(); self::assertTrue(!isset($directMessage['sender'])); diff --git a/tests/src/Factory/Api/Twitter/StatusTest.php b/tests/src/Factory/Api/Twitter/StatusTest.php index 847fbc2d22..0fc36e9995 100644 --- a/tests/src/Factory/Api/Twitter/StatusTest.php +++ b/tests/src/Factory/Api/Twitter/StatusTest.php @@ -17,7 +17,7 @@ use Friendica\Factory\Api\Twitter\Mention; use Friendica\Factory\Api\Twitter\Status; use Friendica\Factory\Api\Twitter\Url; use Friendica\Test\FixtureTestCase; -use Friendica\Test\src\Module\Api\ApiTest; +use Friendica\Test\ApiTestCase; class StatusTest extends FixtureTestCase { @@ -47,7 +47,7 @@ class StatusTest extends FixtureTestCase public function testApiConvertItem() { $status = $this->statusFactory - ->createFromItemId(13, ApiTest::SELF_USER['id']) + ->createFromItemId(13, ApiTestCase::SELF_USER['id']) ->toArray(); self::assertStringStartsWith('item_title', $status['text']); @@ -108,7 +108,7 @@ class StatusTest extends FixtureTestCase public function testApiGetEntitiesWithIncludeEntities() { $status = $this->statusFactory - ->createFromItemId(13, ApiTest::SELF_USER['id'], true) + ->createFromItemId(13, ApiTestCase::SELF_USER['id'], true) ->toArray(); self::assertIsArray($status['entities']); @@ -130,7 +130,7 @@ class StatusTest extends FixtureTestCase $posts = DI::dba()->selectToArray('post-view', ['uri-id']); foreach ($posts as $item) { $status = $this->statusFactory - ->createFromUriId($item['uri-id'], ApiTest::SELF_USER['id']) + ->createFromUriId($item['uri-id'], ApiTestCase::SELF_USER['id']) ->toArray(); self::assertIsInt($status['id']); diff --git a/tests/src/Factory/Api/Twitter/UserTest.php b/tests/src/Factory/Api/Twitter/UserTest.php index a4532afc36..e671c44111 100644 --- a/tests/src/Factory/Api/Twitter/UserTest.php +++ b/tests/src/Factory/Api/Twitter/UserTest.php @@ -11,7 +11,7 @@ use Friendica\DI; use Friendica\Factory\Api\Twitter\User; use Friendica\Network\HTTPException\NotFoundException; use Friendica\Test\FixtureTestCase; -use Friendica\Test\src\Module\Api\ApiTest; +use Friendica\Test\ApiTestCase; class UserTest extends FixtureTestCase { @@ -22,11 +22,11 @@ class UserTest extends FixtureTestCase */ protected function assertSelfUser(array $user) { - self::assertEquals(ApiTest::SELF_USER['id'], $user['uid']); - self::assertEquals(ApiTest::SELF_USER['id'], $user['cid']); + self::assertEquals(ApiTestCase::SELF_USER['id'], $user['uid']); + self::assertEquals(ApiTestCase::SELF_USER['id'], $user['cid']); self::assertEquals('DFRN', $user['location']); - self::assertEquals(ApiTest::SELF_USER['name'], $user['name']); - self::assertEquals(ApiTest::SELF_USER['nick'], $user['screen_name']); + self::assertEquals(ApiTestCase::SELF_USER['name'], $user['name']); + self::assertEquals(ApiTestCase::SELF_USER['nick'], $user['screen_name']); self::assertTrue($user['verified']); } @@ -38,7 +38,7 @@ class UserTest extends FixtureTestCase public function testApiGetUser() { $user = (new User(DI::logger(), DI::twitterStatus())) - ->createFromUserId(ApiTest::SELF_USER['id']) + ->createFromUserId(ApiTestCase::SELF_USER['id']) ->toArray(); $this->assertSelfUser($user); @@ -54,7 +54,7 @@ class UserTest extends FixtureTestCase $this->markTestIncomplete('Needs missing fields for profile colors at API User object first.'); /* - DI::pConfig()->set(ApiTest::SELF_USER['id'], 'frio', 'schema', 'red'); + DI::pConfig()->set(ApiTestCase::SELF_USER['id'], 'frio', 'schema', 'red'); $userFactory = new User(DI::logger(), DI::twitterStatus()); $user = $userFactory->createFromUserId(42); @@ -76,7 +76,7 @@ class UserTest extends FixtureTestCase $this->markTestIncomplete('Needs missing fields for profile colors at API User object first.'); /* - DI::pConfig()->set(ApiTest::SELF_USER['id'], 'frio', 'schema', '---'); + DI::pConfig()->set(ApiTestCase::SELF_USER['id'], 'frio', 'schema', '---'); $userFactory = new User(DI::logger(), DI::twitterStatus()); $user = $userFactory->createFromUserId(42); @@ -98,10 +98,10 @@ class UserTest extends FixtureTestCase $this->markTestIncomplete('Needs missing fields for profile colors at API User object first.'); /* - DI::pConfig()->set(ApiTest::SELF_USER['id'], 'frio', 'schema', '---'); - DI::pConfig()->set(ApiTest::SELF_USER['id'], 'frio', 'nav_bg', '#123456'); - DI::pConfig()->set(ApiTest::SELF_USER['id'], 'frio', 'link_color', '#123456'); - DI::pConfig()->set(ApiTest::SELF_USER['id'], 'frio', 'background_color', '#123456'); + DI::pConfig()->set(ApiTestCase::SELF_USER['id'], 'frio', 'schema', '---'); + DI::pConfig()->set(ApiTestCase::SELF_USER['id'], 'frio', 'nav_bg', '#123456'); + DI::pConfig()->set(ApiTestCase::SELF_USER['id'], 'frio', 'link_color', '#123456'); + DI::pConfig()->set(ApiTestCase::SELF_USER['id'], 'frio', 'background_color', '#123456'); $userFactory = new User(DI::logger(), DI::twitterStatus()); $user = $userFactory->createFromUserId(42); diff --git a/tests/src/Module/Api/Friendica/DirectMessages/SearchTest.php b/tests/src/Module/Api/Friendica/DirectMessages/SearchTest.php index c312eccd7d..998bad5264 100644 --- a/tests/src/Module/Api/Friendica/DirectMessages/SearchTest.php +++ b/tests/src/Module/Api/Friendica/DirectMessages/SearchTest.php @@ -11,10 +11,10 @@ use Friendica\App\Router; use Friendica\DI; use Friendica\Factory\Api\Twitter\DirectMessage; use Friendica\Module\Api\Friendica\DirectMessages\Search; -use Friendica\Test\src\Module\Api\ApiTest; +use Friendica\Test\ApiTestCase; use Psr\Log\NullLogger; -class SearchTest extends ApiTest +class SearchTest extends ApiTestCase { public function testEmpty() { diff --git a/tests/src/Module/Api/Friendica/NotificationTest.php b/tests/src/Module/Api/Friendica/NotificationTest.php index c7db6798e3..e05041acb6 100644 --- a/tests/src/Module/Api/Friendica/NotificationTest.php +++ b/tests/src/Module/Api/Friendica/NotificationTest.php @@ -10,11 +10,11 @@ namespace Friendica\Test\src\Module\Api\Friendica; use Friendica\Capabilities\ICanCreateResponses; use Friendica\DI; use Friendica\Module\Api\Friendica\Notification; -use Friendica\Test\src\Module\Api\ApiTest; +use Friendica\Test\ApiTestCase; use Friendica\Util\DateTimeFormat; use Friendica\Util\Temporal; -class NotificationTest extends ApiTest +class NotificationTest extends ApiTestCase { public function testEmpty() { diff --git a/tests/src/Module/Api/Friendica/Photo/DeleteTest.php b/tests/src/Module/Api/Friendica/Photo/DeleteTest.php index a355f13fe0..1ba144011c 100644 --- a/tests/src/Module/Api/Friendica/Photo/DeleteTest.php +++ b/tests/src/Module/Api/Friendica/Photo/DeleteTest.php @@ -11,9 +11,9 @@ use Friendica\App\Router; use Friendica\DI; use Friendica\Module\Api\Friendica\Photo\Delete; use Friendica\Network\HTTPException\BadRequestException; -use Friendica\Test\src\Module\Api\ApiTest; +use Friendica\Test\ApiTestCase; -class DeleteTest extends ApiTest +class DeleteTest extends ApiTestCase { protected function setUp(): void { diff --git a/tests/src/Module/Api/Friendica/Photoalbum/DeleteTest.php b/tests/src/Module/Api/Friendica/Photoalbum/DeleteTest.php index 4e4939ee5b..fae9c2cf4d 100644 --- a/tests/src/Module/Api/Friendica/Photoalbum/DeleteTest.php +++ b/tests/src/Module/Api/Friendica/Photoalbum/DeleteTest.php @@ -11,9 +11,9 @@ use Friendica\App\Router; use Friendica\DI; use Friendica\Module\Api\Friendica\Photoalbum\Delete; use Friendica\Network\HTTPException\BadRequestException; -use Friendica\Test\src\Module\Api\ApiTest; +use Friendica\Test\ApiTestCase; -class DeleteTest extends ApiTest +class DeleteTest extends ApiTestCase { protected function setUp(): void { diff --git a/tests/src/Module/Api/Friendica/Photoalbum/UpdateTest.php b/tests/src/Module/Api/Friendica/Photoalbum/UpdateTest.php index c785ffe761..0b5f71f2b1 100644 --- a/tests/src/Module/Api/Friendica/Photoalbum/UpdateTest.php +++ b/tests/src/Module/Api/Friendica/Photoalbum/UpdateTest.php @@ -11,9 +11,9 @@ use Friendica\App\Router; use Friendica\DI; use Friendica\Module\Api\Friendica\Photoalbum\Update; use Friendica\Network\HTTPException\BadRequestException; -use Friendica\Test\src\Module\Api\ApiTest; +use Friendica\Test\ApiTestCase; -class UpdateTest extends ApiTest +class UpdateTest extends ApiTestCase { protected function setUp(): void { diff --git a/tests/src/Module/Api/GnuSocial/GnuSocial/ConfigTest.php b/tests/src/Module/Api/GnuSocial/GnuSocial/ConfigTest.php index 4bdd4fb461..6c51c4d1e6 100644 --- a/tests/src/Module/Api/GnuSocial/GnuSocial/ConfigTest.php +++ b/tests/src/Module/Api/GnuSocial/GnuSocial/ConfigTest.php @@ -9,9 +9,9 @@ namespace Friendica\Test\src\Module\Api\GnuSocial\GnuSocial; use Friendica\DI; use Friendica\Module\Api\GNUSocial\GNUSocial\Config; -use Friendica\Test\src\Module\Api\ApiTest; +use Friendica\Test\ApiTestCase; -class ConfigTest extends ApiTest +class ConfigTest extends ApiTestCase { /** * Test the api_statusnet_config() function. diff --git a/tests/src/Module/Api/GnuSocial/GnuSocial/VersionTest.php b/tests/src/Module/Api/GnuSocial/GnuSocial/VersionTest.php index 5177a1e08b..099e052813 100644 --- a/tests/src/Module/Api/GnuSocial/GnuSocial/VersionTest.php +++ b/tests/src/Module/Api/GnuSocial/GnuSocial/VersionTest.php @@ -10,9 +10,9 @@ namespace Friendica\Test\src\Module\Api\GnuSocial\GnuSocial; use Friendica\Capabilities\ICanCreateResponses; use Friendica\DI; use Friendica\Module\Api\GNUSocial\GNUSocial\Version; -use Friendica\Test\src\Module\Api\ApiTest; +use Friendica\Test\ApiTestCase; -class VersionTest extends ApiTest +class VersionTest extends ApiTestCase { public function test() { diff --git a/tests/src/Module/Api/GnuSocial/Help/TestTest.php b/tests/src/Module/Api/GnuSocial/Help/TestTest.php index c46c6a8357..6ca274765c 100644 --- a/tests/src/Module/Api/GnuSocial/Help/TestTest.php +++ b/tests/src/Module/Api/GnuSocial/Help/TestTest.php @@ -10,9 +10,9 @@ namespace Friendica\Test\src\Module\Api\GnuSocial\Help; use Friendica\Capabilities\ICanCreateResponses; use Friendica\DI; use Friendica\Module\Api\GNUSocial\Help\Test; -use Friendica\Test\src\Module\Api\ApiTest; +use Friendica\Test\ApiTestCase; -class TestTest extends ApiTest +class TestTest extends ApiTestCase { public function testJson() { diff --git a/tests/src/Module/Api/Mastodon/Accounts/StatusesTest.php b/tests/src/Module/Api/Mastodon/Accounts/StatusesTest.php index 4f0d610d22..401c1a4b8f 100644 --- a/tests/src/Module/Api/Mastodon/Accounts/StatusesTest.php +++ b/tests/src/Module/Api/Mastodon/Accounts/StatusesTest.php @@ -7,9 +7,9 @@ namespace Friendica\Test\src\Module\Api\Mastodon\Accounts; -use Friendica\Test\src\Module\Api\ApiTest; +use Friendica\Test\ApiTestCase; -class StatusesTest extends ApiTest +class StatusesTest extends ApiTestCase { /** * Test the api_status_show() function. diff --git a/tests/src/Module/Api/Mastodon/Accounts/VerifyCredentialsTest.php b/tests/src/Module/Api/Mastodon/Accounts/VerifyCredentialsTest.php index c478e206be..e0fb146aaa 100644 --- a/tests/src/Module/Api/Mastodon/Accounts/VerifyCredentialsTest.php +++ b/tests/src/Module/Api/Mastodon/Accounts/VerifyCredentialsTest.php @@ -10,9 +10,9 @@ namespace Friendica\Test\src\Module\Api\Mastodon\Accounts; use Friendica\App\Router; use Friendica\DI; use Friendica\Module\Api\Mastodon\Accounts\VerifyCredentials; -use Friendica\Test\src\Module\Api\ApiTest; +use Friendica\Test\ApiTestCase; -class VerifyCredentialsTest extends ApiTest +class VerifyCredentialsTest extends ApiTestCase { /** * Test the api_account_verify_credentials() function. diff --git a/tests/src/Module/Api/Mastodon/ConversationsTest.php b/tests/src/Module/Api/Mastodon/ConversationsTest.php index c9859e44ed..38736b64f8 100644 --- a/tests/src/Module/Api/Mastodon/ConversationsTest.php +++ b/tests/src/Module/Api/Mastodon/ConversationsTest.php @@ -7,9 +7,9 @@ namespace Friendica\Test\src\Module\Api\Mastodon; -use Friendica\Test\src\Module\Api\ApiTest; +use Friendica\Test\ApiTestCase; -class ConversationsTest extends ApiTest +class ConversationsTest extends ApiTestCase { /** * Test the api_conversation_show() function. diff --git a/tests/src/Module/Api/Mastodon/PushSubscriptionTest.php b/tests/src/Module/Api/Mastodon/PushSubscriptionTest.php index bfc11bd81c..33e352d924 100644 --- a/tests/src/Module/Api/Mastodon/PushSubscriptionTest.php +++ b/tests/src/Module/Api/Mastodon/PushSubscriptionTest.php @@ -7,9 +7,9 @@ namespace Friendica\Test\src\Module\Api\Mastodon; -use Friendica\Test\src\Module\Api\ApiTest; +use Friendica\Test\ApiTestCase; -class PushSubscriptionTest extends ApiTest +class PushSubscriptionTest extends ApiTestCase { /** * Test the api_account_verify_credentials() function. diff --git a/tests/src/Module/Api/Mastodon/SearchTest.php b/tests/src/Module/Api/Mastodon/SearchTest.php index 3f89fd13f3..5b04cf01af 100644 --- a/tests/src/Module/Api/Mastodon/SearchTest.php +++ b/tests/src/Module/Api/Mastodon/SearchTest.php @@ -7,9 +7,9 @@ namespace Friendica\Test\src\Module\Api\Mastodon; -use Friendica\Test\src\Module\Api\ApiTest; +use Friendica\Test\ApiTestCase; -class SearchTest extends ApiTest +class SearchTest extends ApiTestCase { /** * Test the api_search() function. diff --git a/tests/src/Module/Api/Mastodon/Timelines/HomeTest.php b/tests/src/Module/Api/Mastodon/Timelines/HomeTest.php index 1dfbe24b1f..b5bbd7bccc 100644 --- a/tests/src/Module/Api/Mastodon/Timelines/HomeTest.php +++ b/tests/src/Module/Api/Mastodon/Timelines/HomeTest.php @@ -7,9 +7,9 @@ namespace Friendica\Test\src\Module\Api\Mastodon\Timelines; -use Friendica\Test\src\Module\Api\ApiTest; +use Friendica\Test\ApiTestCase; -class HomeTest extends ApiTest +class HomeTest extends ApiTestCase { /** * Test the api_statuses_home_timeline() function. diff --git a/tests/src/Module/Api/Mastodon/Timelines/PublicTimelineTest.php b/tests/src/Module/Api/Mastodon/Timelines/PublicTimelineTest.php index f1cb965df3..017d1fb62a 100644 --- a/tests/src/Module/Api/Mastodon/Timelines/PublicTimelineTest.php +++ b/tests/src/Module/Api/Mastodon/Timelines/PublicTimelineTest.php @@ -7,9 +7,9 @@ namespace Friendica\Test\src\Module\Api\Mastodon\Timelines; -use Friendica\Test\src\Module\Api\ApiTest; +use Friendica\Test\ApiTestCase; -class PublicTimelineTest extends ApiTest +class PublicTimelineTest extends ApiTestCase { /** * Test the api_statuses_public_timeline() function. diff --git a/tests/src/Module/Api/Twitter/Account/RateLimitStatusTest.php b/tests/src/Module/Api/Twitter/Account/RateLimitStatusTest.php index f01c040d36..c0d1e89028 100644 --- a/tests/src/Module/Api/Twitter/Account/RateLimitStatusTest.php +++ b/tests/src/Module/Api/Twitter/Account/RateLimitStatusTest.php @@ -11,9 +11,9 @@ use Friendica\App\Router; use Friendica\Capabilities\ICanCreateResponses; use Friendica\DI; use Friendica\Module\Api\Twitter\Account\RateLimitStatus; -use Friendica\Test\src\Module\Api\ApiTest; +use Friendica\Test\ApiTestCase; -class RateLimitStatusTest extends ApiTest +class RateLimitStatusTest extends ApiTestCase { public function testWithJson() { diff --git a/tests/src/Module/Api/Twitter/Account/UpdateProfileTest.php b/tests/src/Module/Api/Twitter/Account/UpdateProfileTest.php index 3893a1b35d..3ba7a3d996 100644 --- a/tests/src/Module/Api/Twitter/Account/UpdateProfileTest.php +++ b/tests/src/Module/Api/Twitter/Account/UpdateProfileTest.php @@ -10,9 +10,9 @@ namespace Friendica\Test\src\Module\Api\Twitter\Account; use Friendica\App\Router; use Friendica\DI; use Friendica\Module\Api\Twitter\Account\UpdateProfile; -use Friendica\Test\src\Module\Api\ApiTest; +use Friendica\Test\ApiTestCase; -class UpdateProfileTest extends ApiTest +class UpdateProfileTest extends ApiTestCase { /** * Test the api_account_update_profile() function. diff --git a/tests/src/Module/Api/Twitter/Blocks/ListsTest.php b/tests/src/Module/Api/Twitter/Blocks/ListsTest.php index 1b55750845..d41446bf2e 100644 --- a/tests/src/Module/Api/Twitter/Blocks/ListsTest.php +++ b/tests/src/Module/Api/Twitter/Blocks/ListsTest.php @@ -10,9 +10,9 @@ namespace Friendica\Test\src\Module\Api\Twitter\Blocks; use Friendica\App\Router; use Friendica\DI; use Friendica\Module\Api\Twitter\Blocks\Lists; -use Friendica\Test\src\Module\Api\ApiTest; +use Friendica\Test\ApiTestCase; -class ListsTest extends ApiTest +class ListsTest extends ApiTestCase { /** * Test the api_statuses_f() function. diff --git a/tests/src/Module/Api/Twitter/DirectMessages/AllTest.php b/tests/src/Module/Api/Twitter/DirectMessages/AllTest.php index 67c2606cd3..c4c1b7d7b9 100644 --- a/tests/src/Module/Api/Twitter/DirectMessages/AllTest.php +++ b/tests/src/Module/Api/Twitter/DirectMessages/AllTest.php @@ -10,9 +10,9 @@ namespace Friendica\Test\src\Module\Api\Twitter\DirectMessages; use Friendica\DI; use Friendica\Module\Api\Twitter\DirectMessages\All; use Friendica\Factory\Api\Twitter\DirectMessage; -use Friendica\Test\src\Module\Api\ApiTest; +use Friendica\Test\ApiTestCase; -class AllTest extends ApiTest +class AllTest extends ApiTestCase { /** * Test the api_direct_messages_box() function. diff --git a/tests/src/Module/Api/Twitter/DirectMessages/ConversationTest.php b/tests/src/Module/Api/Twitter/DirectMessages/ConversationTest.php index 5899ada8ad..f1a4aed615 100644 --- a/tests/src/Module/Api/Twitter/DirectMessages/ConversationTest.php +++ b/tests/src/Module/Api/Twitter/DirectMessages/ConversationTest.php @@ -11,9 +11,9 @@ use Friendica\App\Router; use Friendica\DI; use Friendica\Factory\Api\Twitter\DirectMessage; use Friendica\Module\Api\Twitter\DirectMessages\Conversation; -use Friendica\Test\src\Module\Api\ApiTest; +use Friendica\Test\ApiTestCase; -class ConversationTest extends ApiTest +class ConversationTest extends ApiTestCase { /** * Test the api_direct_messages_box() function. diff --git a/tests/src/Module/Api/Twitter/DirectMessages/DestroyTest.php b/tests/src/Module/Api/Twitter/DirectMessages/DestroyTest.php index c81b18e83c..198eade10d 100644 --- a/tests/src/Module/Api/Twitter/DirectMessages/DestroyTest.php +++ b/tests/src/Module/Api/Twitter/DirectMessages/DestroyTest.php @@ -11,9 +11,9 @@ use Friendica\App\Router; use Friendica\Database\DBA; use Friendica\DI; use Friendica\Module\Api\Twitter\DirectMessages\Destroy; -use Friendica\Test\src\Module\Api\ApiTest; +use Friendica\Test\ApiTestCase; -class DestroyTest extends ApiTest +class DestroyTest extends ApiTestCase { protected function setUp(): void { diff --git a/tests/src/Module/Api/Twitter/DirectMessages/InboxTest.php b/tests/src/Module/Api/Twitter/DirectMessages/InboxTest.php index 4b86e057b9..7f2ce706b2 100644 --- a/tests/src/Module/Api/Twitter/DirectMessages/InboxTest.php +++ b/tests/src/Module/Api/Twitter/DirectMessages/InboxTest.php @@ -11,9 +11,9 @@ use Friendica\App\Router; use Friendica\DI; use Friendica\Factory\Api\Twitter\DirectMessage; use Friendica\Module\Api\Twitter\DirectMessages\Inbox; -use Friendica\Test\src\Module\Api\ApiTest; +use Friendica\Test\ApiTestCase; -class InboxTest extends ApiTest +class InboxTest extends ApiTestCase { /** * Test the api_direct_messages_box() function. diff --git a/tests/src/Module/Api/Twitter/DirectMessages/NewDMTest.php b/tests/src/Module/Api/Twitter/DirectMessages/NewDMTest.php index 7bdaafaeff..33bf885751 100644 --- a/tests/src/Module/Api/Twitter/DirectMessages/NewDMTest.php +++ b/tests/src/Module/Api/Twitter/DirectMessages/NewDMTest.php @@ -11,9 +11,9 @@ use Friendica\App\Router; use Friendica\DI; use Friendica\Factory\Api\Twitter\DirectMessage; use Friendica\Module\Api\Twitter\DirectMessages\NewDM; -use Friendica\Test\src\Module\Api\ApiTest; +use Friendica\Test\ApiTestCase; -class NewDMTest extends ApiTest +class NewDMTest extends ApiTestCase { protected function setUp(): void { diff --git a/tests/src/Module/Api/Twitter/DirectMessages/SentTest.php b/tests/src/Module/Api/Twitter/DirectMessages/SentTest.php index 2190022f8f..07d074fbb1 100644 --- a/tests/src/Module/Api/Twitter/DirectMessages/SentTest.php +++ b/tests/src/Module/Api/Twitter/DirectMessages/SentTest.php @@ -11,9 +11,9 @@ use Friendica\App\Router; use Friendica\DI; use Friendica\Factory\Api\Twitter\DirectMessage; use Friendica\Module\Api\Twitter\DirectMessages\Sent; -use Friendica\Test\src\Module\Api\ApiTest; +use Friendica\Test\ApiTestCase; -class SentTest extends ApiTest +class SentTest extends ApiTestCase { /** * Test the api_direct_messages_box() function. diff --git a/tests/src/Module/Api/Twitter/Favorites/CreateTest.php b/tests/src/Module/Api/Twitter/Favorites/CreateTest.php index d5d4f1c6a1..3e2a4e34c3 100644 --- a/tests/src/Module/Api/Twitter/Favorites/CreateTest.php +++ b/tests/src/Module/Api/Twitter/Favorites/CreateTest.php @@ -12,9 +12,9 @@ use Friendica\Capabilities\ICanCreateResponses; use Friendica\DI; use Friendica\Module\Api\Twitter\Favorites\Create; use Friendica\Network\HTTPException\BadRequestException; -use Friendica\Test\src\Module\Api\ApiTest; +use Friendica\Test\ApiTestCase; -class CreateTest extends ApiTest +class CreateTest extends ApiTestCase { protected function setUp(): void { diff --git a/tests/src/Module/Api/Twitter/Favorites/DestroyTest.php b/tests/src/Module/Api/Twitter/Favorites/DestroyTest.php index 1909ff9c0b..24567a6056 100644 --- a/tests/src/Module/Api/Twitter/Favorites/DestroyTest.php +++ b/tests/src/Module/Api/Twitter/Favorites/DestroyTest.php @@ -11,9 +11,9 @@ use Friendica\App\Router; use Friendica\DI; use Friendica\Module\Api\Twitter\Favorites\Destroy; use Friendica\Network\HTTPException\BadRequestException; -use Friendica\Test\src\Module\Api\ApiTest; +use Friendica\Test\ApiTestCase; -class DestroyTest extends ApiTest +class DestroyTest extends ApiTestCase { protected function setUp(): void { diff --git a/tests/src/Module/Api/Twitter/FavoritesTest.php b/tests/src/Module/Api/Twitter/FavoritesTest.php index bc75fcf979..506258dc32 100644 --- a/tests/src/Module/Api/Twitter/FavoritesTest.php +++ b/tests/src/Module/Api/Twitter/FavoritesTest.php @@ -11,9 +11,9 @@ use Friendica\App\Router; use Friendica\Capabilities\ICanCreateResponses; use Friendica\DI; use Friendica\Module\Api\Twitter\Favorites; -use Friendica\Test\src\Module\Api\ApiTest; +use Friendica\Test\ApiTestCase; -class FavoritesTest extends ApiTest +class FavoritesTest extends ApiTestCase { /** * Test the api_favorites() function. diff --git a/tests/src/Module/Api/Twitter/Followers/ListsTest.php b/tests/src/Module/Api/Twitter/Followers/ListsTest.php index 249d744371..5a4f66fd45 100644 --- a/tests/src/Module/Api/Twitter/Followers/ListsTest.php +++ b/tests/src/Module/Api/Twitter/Followers/ListsTest.php @@ -10,9 +10,9 @@ namespace Friendica\Test\src\Module\Api\Twitter\Followers; use Friendica\App\Router; use Friendica\DI; use Friendica\Module\Api\Twitter\Followers\Lists; -use Friendica\Test\src\Module\Api\ApiTest; +use Friendica\Test\ApiTestCase; -class ListsTest extends ApiTest +class ListsTest extends ApiTestCase { /** * Test the api_statuses_f() function. diff --git a/tests/src/Module/Api/Twitter/Friends/ListsTest.php b/tests/src/Module/Api/Twitter/Friends/ListsTest.php index 79ac2f147e..9665dceb0e 100644 --- a/tests/src/Module/Api/Twitter/Friends/ListsTest.php +++ b/tests/src/Module/Api/Twitter/Friends/ListsTest.php @@ -10,9 +10,9 @@ namespace Friendica\Test\src\Module\Api\Twitter\Friends; use Friendica\App\Router; use Friendica\DI; use Friendica\Module\Api\Twitter\Friends\Lists; -use Friendica\Test\src\Module\Api\ApiTest; +use Friendica\Test\ApiTestCase; -class ListsTest extends ApiTest +class ListsTest extends ApiTestCase { /** * Test the api_statuses_f() function. diff --git a/tests/src/Module/Api/Twitter/Friendships/IncomingTest.php b/tests/src/Module/Api/Twitter/Friendships/IncomingTest.php index ccb49b6163..a808e00b68 100644 --- a/tests/src/Module/Api/Twitter/Friendships/IncomingTest.php +++ b/tests/src/Module/Api/Twitter/Friendships/IncomingTest.php @@ -10,9 +10,9 @@ namespace Friendica\Test\src\Module\Api\Twitter\Friendships; use Friendica\App\Router; use Friendica\DI; use Friendica\Module\Api\Twitter\Friendships\Incoming; -use Friendica\Test\src\Module\Api\ApiTest; +use Friendica\Test\ApiTestCase; -class IncomingTest extends ApiTest +class IncomingTest extends ApiTestCase { /** * Test the api_friendships_incoming() function. diff --git a/tests/src/Module/Api/Twitter/Lists/StatusesTest.php b/tests/src/Module/Api/Twitter/Lists/StatusesTest.php index 658d6f776f..336233e057 100644 --- a/tests/src/Module/Api/Twitter/Lists/StatusesTest.php +++ b/tests/src/Module/Api/Twitter/Lists/StatusesTest.php @@ -11,9 +11,9 @@ use Friendica\App\Router; use Friendica\DI; use Friendica\Module\Api\Twitter\Lists\Statuses; use Friendica\Network\HTTPException\BadRequestException; -use Friendica\Test\src\Module\Api\ApiTest; +use Friendica\Test\ApiTestCase; -class StatusesTest extends ApiTest +class StatusesTest extends ApiTestCase { /** * Test the api_lists_statuses() function. diff --git a/tests/src/Module/Api/Twitter/Media/UploadTest.php b/tests/src/Module/Api/Twitter/Media/UploadTest.php index c1ed91a670..ae64eab9ed 100644 --- a/tests/src/Module/Api/Twitter/Media/UploadTest.php +++ b/tests/src/Module/Api/Twitter/Media/UploadTest.php @@ -13,10 +13,10 @@ use Friendica\Module\Api\Twitter\Media\Upload; use Friendica\Network\HTTPException\BadRequestException; use Friendica\Network\HTTPException\InternalServerErrorException; use Friendica\Network\HTTPException\UnauthorizedException; -use Friendica\Test\src\Module\Api\ApiTest; +use Friendica\Test\ApiTestCase; use Friendica\Test\Util\AuthTestConfig; -class UploadTest extends ApiTest +class UploadTest extends ApiTestCase { protected function setUp(): void { diff --git a/tests/src/Module/Api/Twitter/SavedSearchesTest.php b/tests/src/Module/Api/Twitter/SavedSearchesTest.php index 80342a823c..44ed89cd9a 100644 --- a/tests/src/Module/Api/Twitter/SavedSearchesTest.php +++ b/tests/src/Module/Api/Twitter/SavedSearchesTest.php @@ -10,9 +10,9 @@ namespace Friendica\Test\src\Module\Api\Twitter; use Friendica\Capabilities\ICanCreateResponses; use Friendica\DI; use Friendica\Module\Api\Twitter\SavedSearches; -use Friendica\Test\src\Module\Api\ApiTest; +use Friendica\Test\ApiTestCase; -class SavedSearchesTest extends ApiTest +class SavedSearchesTest extends ApiTestCase { public function test() { diff --git a/tests/src/Module/Api/Twitter/Statuses/DestroyTest.php b/tests/src/Module/Api/Twitter/Statuses/DestroyTest.php index 6f837199c1..ef3580df6e 100644 --- a/tests/src/Module/Api/Twitter/Statuses/DestroyTest.php +++ b/tests/src/Module/Api/Twitter/Statuses/DestroyTest.php @@ -11,9 +11,9 @@ use Friendica\App\Router; use Friendica\DI; use Friendica\Module\Api\Twitter\Statuses\Destroy; use Friendica\Network\HTTPException\BadRequestException; -use Friendica\Test\src\Module\Api\ApiTest; +use Friendica\Test\ApiTestCase; -class DestroyTest extends ApiTest +class DestroyTest extends ApiTestCase { protected function setUp(): void { diff --git a/tests/src/Module/Api/Twitter/Statuses/MentionsTest.php b/tests/src/Module/Api/Twitter/Statuses/MentionsTest.php index 5459ea9b57..512505227c 100644 --- a/tests/src/Module/Api/Twitter/Statuses/MentionsTest.php +++ b/tests/src/Module/Api/Twitter/Statuses/MentionsTest.php @@ -11,9 +11,9 @@ use Friendica\App\Router; use Friendica\Capabilities\ICanCreateResponses; use Friendica\DI; use Friendica\Module\Api\Twitter\Statuses\Mentions; -use Friendica\Test\src\Module\Api\ApiTest; +use Friendica\Test\ApiTestCase; -class MentionsTest extends ApiTest +class MentionsTest extends ApiTestCase { /** * Test the api_statuses_mentions() function. diff --git a/tests/src/Module/Api/Twitter/Statuses/NetworkPublicTimelineTest.php b/tests/src/Module/Api/Twitter/Statuses/NetworkPublicTimelineTest.php index 41c0fc2388..9a68304b21 100644 --- a/tests/src/Module/Api/Twitter/Statuses/NetworkPublicTimelineTest.php +++ b/tests/src/Module/Api/Twitter/Statuses/NetworkPublicTimelineTest.php @@ -11,9 +11,9 @@ use Friendica\App\Router; use Friendica\Capabilities\ICanCreateResponses; use Friendica\DI; use Friendica\Module\Api\Twitter\Statuses\NetworkPublicTimeline; -use Friendica\Test\src\Module\Api\ApiTest; +use Friendica\Test\ApiTestCase; -class NetworkPublicTimelineTest extends ApiTest +class NetworkPublicTimelineTest extends ApiTestCase { /** * Test the api_statuses_networkpublic_timeline() function. diff --git a/tests/src/Module/Api/Twitter/Statuses/RetweetTest.php b/tests/src/Module/Api/Twitter/Statuses/RetweetTest.php index aaf549fd62..7c5a8f7ad1 100644 --- a/tests/src/Module/Api/Twitter/Statuses/RetweetTest.php +++ b/tests/src/Module/Api/Twitter/Statuses/RetweetTest.php @@ -11,9 +11,9 @@ use Friendica\App\Router; use Friendica\DI; use Friendica\Module\Api\Twitter\Statuses\Retweet; use Friendica\Network\HTTPException\BadRequestException; -use Friendica\Test\src\Module\Api\ApiTest; +use Friendica\Test\ApiTestCase; -class RetweetTest extends ApiTest +class RetweetTest extends ApiTestCase { protected function setUp(): void { diff --git a/tests/src/Module/Api/Twitter/Statuses/ShowTest.php b/tests/src/Module/Api/Twitter/Statuses/ShowTest.php index bbce067e9c..37844ac37a 100644 --- a/tests/src/Module/Api/Twitter/Statuses/ShowTest.php +++ b/tests/src/Module/Api/Twitter/Statuses/ShowTest.php @@ -11,9 +11,9 @@ use Friendica\App\Router; use Friendica\DI; use Friendica\Module\Api\Twitter\Statuses\Show; use Friendica\Network\HTTPException\BadRequestException; -use Friendica\Test\src\Module\Api\ApiTest; +use Friendica\Test\ApiTestCase; -class ShowTest extends ApiTest +class ShowTest extends ApiTestCase { /** * Test the api_statuses_show() function. diff --git a/tests/src/Module/Api/Twitter/Statuses/UpdateTest.php b/tests/src/Module/Api/Twitter/Statuses/UpdateTest.php index c7052bf63c..74663091ee 100644 --- a/tests/src/Module/Api/Twitter/Statuses/UpdateTest.php +++ b/tests/src/Module/Api/Twitter/Statuses/UpdateTest.php @@ -10,9 +10,9 @@ namespace Friendica\Test\src\Module\Api\Twitter\Statuses; use Friendica\App\Router; use Friendica\DI; use Friendica\Module\Api\Twitter\Statuses\Update; -use Friendica\Test\src\Module\Api\ApiTest; +use Friendica\Test\ApiTestCase; -class UpdateTest extends ApiTest +class UpdateTest extends ApiTestCase { protected function setUp(): void { diff --git a/tests/src/Module/Api/Twitter/Statuses/UserTimelineTest.php b/tests/src/Module/Api/Twitter/Statuses/UserTimelineTest.php index b39e9794bb..2e8e2f11c6 100644 --- a/tests/src/Module/Api/Twitter/Statuses/UserTimelineTest.php +++ b/tests/src/Module/Api/Twitter/Statuses/UserTimelineTest.php @@ -11,9 +11,9 @@ use Friendica\App\Router; use Friendica\Capabilities\ICanCreateResponses; use Friendica\DI; use Friendica\Module\Api\Twitter\Statuses\UserTimeline; -use Friendica\Test\src\Module\Api\ApiTest; +use Friendica\Test\ApiTestCase; -class UserTimelineTest extends ApiTest +class UserTimelineTest extends ApiTestCase { /** * Test the api_statuses_user_timeline() function. diff --git a/tests/src/Module/Api/Twitter/Users/LookupTest.php b/tests/src/Module/Api/Twitter/Users/LookupTest.php index 2bc701c018..fd8e077dca 100644 --- a/tests/src/Module/Api/Twitter/Users/LookupTest.php +++ b/tests/src/Module/Api/Twitter/Users/LookupTest.php @@ -11,9 +11,9 @@ use Friendica\App\Router; use Friendica\DI; use Friendica\Module\Api\Twitter\Users\Lookup; use Friendica\Network\HTTPException\NotFoundException; -use Friendica\Test\src\Module\Api\ApiTest; +use Friendica\Test\ApiTestCase; -class LookupTest extends ApiTest +class LookupTest extends ApiTestCase { /** * Test the api_users_lookup() function. diff --git a/tests/src/Module/Api/Twitter/Users/SearchTest.php b/tests/src/Module/Api/Twitter/Users/SearchTest.php index 426e30eb0a..9a0b75be3c 100644 --- a/tests/src/Module/Api/Twitter/Users/SearchTest.php +++ b/tests/src/Module/Api/Twitter/Users/SearchTest.php @@ -12,9 +12,9 @@ use Friendica\Capabilities\ICanCreateResponses; use Friendica\DI; use Friendica\Module\Api\Twitter\Users\Search; use Friendica\Network\HTTPException\BadRequestException; -use Friendica\Test\src\Module\Api\ApiTest; +use Friendica\Test\ApiTestCase; -class SearchTest extends ApiTest +class SearchTest extends ApiTestCase { /** * Test the api_users_search() function. diff --git a/tests/src/Module/Api/Twitter/Users/ShowTest.php b/tests/src/Module/Api/Twitter/Users/ShowTest.php index 65c02fd780..80ebb59281 100644 --- a/tests/src/Module/Api/Twitter/Users/ShowTest.php +++ b/tests/src/Module/Api/Twitter/Users/ShowTest.php @@ -11,9 +11,9 @@ use Friendica\App\Router; use Friendica\Capabilities\ICanCreateResponses; use Friendica\DI; use Friendica\Module\Api\Twitter\Users\Show; -use Friendica\Test\src\Module\Api\ApiTest; +use Friendica\Test\ApiTestCase; -class ShowTest extends ApiTest +class ShowTest extends ApiTestCase { /** * Test the api_users_show() function. diff --git a/tests/src/Module/BaseApiTest.php b/tests/src/Module/BaseApiTest.php index 0a3d3f5cbb..4397913780 100644 --- a/tests/src/Module/BaseApiTest.php +++ b/tests/src/Module/BaseApiTest.php @@ -8,9 +8,9 @@ namespace Friendica\Test\src\Module; use Friendica\Module\BaseApi; -use Friendica\Test\src\Module\Api\ApiTest; +use Friendica\Test\ApiTestCase; -class BaseApiTest extends ApiTest +class BaseApiTest extends ApiTestCase { public function testWithWrongAuth() { diff --git a/tests/src/Security/BasicAuthTest.php b/tests/src/Security/BasicAuthTest.php index 4636bb9ed9..72cf9df59e 100644 --- a/tests/src/Security/BasicAuthTest.php +++ b/tests/src/Security/BasicAuthTest.php @@ -8,9 +8,9 @@ namespace Friendica\Test\src\Security; use Friendica\Security\BasicAuth; -use Friendica\Test\src\Module\Api\ApiTest; +use Friendica\Test\ApiTestCase; -class BasicAuthTest extends ApiTest +class BasicAuthTest extends ApiTestCase { /** * Test the api_source() function.