diff --git a/tests/src/Module/Api/ApiTest.php b/tests/ApiTestCase.php similarity index 95% rename from tests/src/Module/Api/ApiTest.php rename to tests/ApiTestCase.php index 16763f1d52..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\FixtureTest; 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 FixtureTest +abstract class ApiTestCase extends FixtureTestCase { // User data that the test database is populated with const SELF_USER = [ @@ -190,7 +187,7 @@ abstract class ApiTest extends FixtureTest public function installAuthTest() { $addon = 'authtest'; - $addon_file_path = __DIR__ . '/../../../Util/authtest/authtest.php'; + $addon_file_path = __DIR__ . '/Util/authtest/authtest.php'; $t = @filemtime($addon_file_path); @include_once($addon_file_path); diff --git a/tests/src/Core/Cache/CacheTest.php b/tests/CacheTestCase.php similarity index 96% rename from tests/src/Core/Cache/CacheTest.php rename to tests/CacheTestCase.php index 10cade17d9..c3db14b274 100644 --- a/tests/src/Core/Cache/CacheTest.php +++ b/tests/CacheTestCase.php @@ -5,15 +5,13 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -namespace Friendica\Test\src\Core\Cache; +namespace Friendica\Test; use Friendica\Core\Cache\Capability\ICanCache; -use Friendica\Core\Cache\Capability\ICanCacheInMemory; -use Friendica\Core\Cache\Type\AbstractCache; -use Friendica\Test\MockedTest; +use Friendica\Test\MockedTestCase; use Friendica\Util\PidFile; -abstract class CacheTest extends MockedTest +abstract class CacheTestCase extends MockedTestCase { /** * @var int Start time of the mock (used for time operations) diff --git a/tests/src/Console/ConsoleTest.php b/tests/ConsoleTestCase.php similarity index 87% rename from tests/src/Console/ConsoleTest.php rename to tests/ConsoleTestCase.php index 88c80d7bc6..05febcd735 100644 --- a/tests/src/Console/ConsoleTest.php +++ b/tests/ConsoleTestCase.php @@ -5,13 +5,13 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -namespace Friendica\Test\src\Console; +namespace Friendica\Test; use Asika\SimpleConsole\Console; -use Friendica\Test\MockedTest; +use Friendica\Test\MockedTestCase; use Friendica\Test\Util\Intercept; -abstract class ConsoleTest extends MockedTest +abstract class ConsoleTestCase extends MockedTestCase { /** * @var array The default argv for a Console Instance diff --git a/tests/DatabaseTest.php b/tests/DatabaseTestCase.php similarity index 89% rename from tests/DatabaseTest.php rename to tests/DatabaseTestCase.php index 4510a48034..b061a7f21a 100644 --- a/tests/DatabaseTest.php +++ b/tests/DatabaseTestCase.php @@ -10,7 +10,7 @@ namespace Friendica\Test; /** * Abstract class used by tests that need a database. */ -abstract class DatabaseTest extends MockedTest +abstract class DatabaseTestCase extends MockedTestCase { use DatabaseTestTrait; diff --git a/tests/FixtureTest.php b/tests/FixtureTest.php deleted file mode 100644 index 2b4bcc1329..0000000000 --- a/tests/FixtureTest.php +++ /dev/null @@ -1,44 +0,0 @@ -setUpFixtures(); - } - - protected function tearDown(): void - { - $this->tearDownFixtures(); - - parent::tearDown(); - } -} diff --git a/tests/FixtureTestCase.php b/tests/FixtureTestCase.php new file mode 100644 index 0000000000..5fa751c871 --- /dev/null +++ b/tests/FixtureTestCase.php @@ -0,0 +1,30 @@ +setUpFixtures(); + } + + protected function tearDown(): void + { + $this->tearDownFixtures(); + + parent::tearDown(); + } +} diff --git a/tests/src/Core/Lock/LockTest.php b/tests/LockTestCase.php similarity index 97% rename from tests/src/Core/Lock/LockTest.php rename to tests/LockTestCase.php index 4c8583523a..9ce86497b7 100644 --- a/tests/src/Core/Lock/LockTest.php +++ b/tests/LockTestCase.php @@ -5,12 +5,12 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -namespace Friendica\Test\src\Core\Lock; +namespace Friendica\Test; use Friendica\Core\Lock\Capability\ICanLock; -use Friendica\Test\MockedTest; +use Friendica\Test\MockedTestCase; -abstract class LockTest extends MockedTest +abstract class LockTestCase extends MockedTestCase { /** * @var int Start time of the mock (used for time operations) diff --git a/tests/src/Core/Logger/LoggerDataTrait.php b/tests/LoggerDataTrait.php similarity index 96% rename from tests/src/Core/Logger/LoggerDataTrait.php rename to tests/LoggerDataTrait.php index dd41bf890d..229a1997ea 100644 --- a/tests/src/Core/Logger/LoggerDataTrait.php +++ b/tests/LoggerDataTrait.php @@ -5,7 +5,7 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -namespace Friendica\Test\src\Core\Logger; +namespace Friendica\Test; trait LoggerDataTrait { diff --git a/tests/src/Core/Logger/AbstractLoggerTest.php b/tests/LoggerTestCase.php similarity index 97% rename from tests/src/Core/Logger/AbstractLoggerTest.php rename to tests/LoggerTestCase.php index a155239a8d..a31ba5d6a9 100644 --- a/tests/src/Core/Logger/AbstractLoggerTest.php +++ b/tests/LoggerTestCase.php @@ -5,16 +5,16 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -namespace Friendica\Test\src\Core\Logger; +namespace Friendica\Test; use Friendica\Core\Config\Capability\IManageConfigValues; -use Friendica\Test\MockedTest; use Friendica\Core\Logger\Util\Introspection; +use Friendica\Test\MockedTestCase; use Mockery\MockInterface; use Psr\Log\LoggerInterface; use Psr\Log\LogLevel; -abstract class AbstractLoggerTest extends MockedTest +abstract class LoggerTestCase extends MockedTestCase { use LoggerDataTrait; diff --git a/tests/src/Core/Cache/MemoryCacheTest.php b/tests/MemoryCacheTestCase.php similarity index 97% rename from tests/src/Core/Cache/MemoryCacheTest.php rename to tests/MemoryCacheTestCase.php index 2e24e29c06..7563ff701b 100644 --- a/tests/src/Core/Cache/MemoryCacheTest.php +++ b/tests/MemoryCacheTestCase.php @@ -5,12 +5,12 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -namespace Friendica\Test\src\Core\Cache; +namespace Friendica\Test; use Exception; use Friendica\Core\Cache\Capability\ICanCacheInMemory; -abstract class MemoryCacheTest extends CacheTest +abstract class MemoryCacheTestCase extends CacheTestCase { /** * @var \Friendica\Core\Cache\Capability\ICanCacheInMemory diff --git a/tests/MockedTest.php b/tests/MockedTestCase.php similarity index 88% rename from tests/MockedTest.php rename to tests/MockedTestCase.php index 14328f830e..3fbb1b906a 100644 --- a/tests/MockedTest.php +++ b/tests/MockedTestCase.php @@ -12,7 +12,7 @@ use PHPUnit\Framework\TestCase; /** * This class verifies each mock after each call */ -abstract class MockedTest extends TestCase +abstract class MockedTestCase extends TestCase { protected function tearDown() : void { diff --git a/tests/src/Core/PConfig/PConfigTest.php b/tests/PConfigTestCase.php similarity index 99% rename from tests/src/Core/PConfig/PConfigTest.php rename to tests/PConfigTestCase.php index 6c2beb0068..1e1bba4fb7 100644 --- a/tests/src/Core/PConfig/PConfigTest.php +++ b/tests/PConfigTestCase.php @@ -5,17 +5,16 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -namespace Friendica\Test\src\Core\PConfig; +namespace Friendica\Test; use DMS\PHPUnitExtensions\ArraySubset\ArraySubsetAsserts; use Friendica\Core\PConfig\Type\AbstractPConfigValues; use Friendica\Core\PConfig\Repository\PConfig as PConfigModel; use Friendica\Core\PConfig\ValueObject\Cache; -use Friendica\Test\MockedTest; use Mockery; use Mockery\MockInterface; -abstract class PConfigTest extends MockedTest +abstract class PConfigTestCase extends MockedTestCase { use ArraySubsetAsserts; diff --git a/tests/src/Core/Storage/StorageConfigTest.php b/tests/StorageConfigTestCase.php similarity index 81% rename from tests/src/Core/Storage/StorageConfigTest.php rename to tests/StorageConfigTestCase.php index 23cc54df90..4b06a8ec59 100644 --- a/tests/src/Core/Storage/StorageConfigTest.php +++ b/tests/StorageConfigTestCase.php @@ -5,12 +5,12 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -namespace Friendica\Test\src\Core\Storage; +namespace Friendica\Test; use Friendica\Core\Storage\Capability\ICanConfigureStorage; -use Friendica\Test\MockedTest; +use Friendica\Test\MockedTestCase; -abstract class StorageConfigTest extends MockedTest +abstract class StorageConfigTestCase extends MockedTestCase { /** @return ICanConfigureStorage */ abstract protected function getInstance(); diff --git a/tests/src/Core/Storage/StorageTest.php b/tests/StorageTestCase.php similarity index 94% rename from tests/src/Core/Storage/StorageTest.php rename to tests/StorageTestCase.php index 10114c2dd9..8a2ffda446 100644 --- a/tests/src/Core/Storage/StorageTest.php +++ b/tests/StorageTestCase.php @@ -5,14 +5,14 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -namespace Friendica\Test\src\Core\Storage; +namespace Friendica\Test; use Friendica\Core\Storage\Capability\ICanReadFromStorage; use Friendica\Core\Storage\Capability\ICanWriteToStorage; use Friendica\Core\Storage\Exception\ReferenceStorageException; -use Friendica\Test\MockedTest; +use Friendica\Test\MockedTestCase; -abstract class StorageTest extends MockedTest +abstract class StorageTestCase extends MockedTestCase { /** @return ICanWriteToStorage */ abstract protected function getInstance(); diff --git a/tests/functional/DependencyCheckTest.php b/tests/functional/DependencyCheckTest.php index 55412045ae..866380fbdf 100644 --- a/tests/functional/DependencyCheckTest.php +++ b/tests/functional/DependencyCheckTest.php @@ -14,12 +14,12 @@ use Friendica\Core\Config\ValueObject\Cache; use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\Core\Lock\Capability\ICanLock; use Friendica\Database\Database; -use Friendica\Test\FixtureTest; +use Friendica\Test\FixtureTestCase; use Friendica\Util\BasePath; use Friendica\Core\Config\Util\ConfigFileManager; use Psr\Log\LoggerInterface; -class DependencyCheckTest extends FixtureTest +class DependencyCheckTest extends FixtureTestCase { protected function setUp() : void { diff --git a/tests/phpunit.xml b/tests/phpunit.xml index 0e323813f8..f163ae5bea 100644 --- a/tests/phpunit.xml +++ b/tests/phpunit.xml @@ -9,12 +9,12 @@ xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"> - functional/ - src/ - Unit/ + functional/ + src/ + Unit/ - Unit/ + Unit/ diff --git a/tests/src/App/BaseURLTest.php b/tests/src/App/BaseURLTest.php index 1e6c799f32..9c3333feff 100644 --- a/tests/src/App/BaseURLTest.php +++ b/tests/src/App/BaseURLTest.php @@ -11,10 +11,10 @@ use Friendica\App\BaseURL; use Friendica\Core\Config\Model\ReadOnlyFileConfig; use Friendica\Core\Config\ValueObject\Cache; use Friendica\Network\HTTPException\InternalServerErrorException; -use Friendica\Test\MockedTest; +use Friendica\Test\MockedTestCase; use Psr\Log\NullLogger; -class BaseURLTest extends MockedTest +class BaseURLTest extends MockedTestCase { public function dataSystemUrl(): array { diff --git a/tests/src/App/ModeTest.php b/tests/src/App/ModeTest.php index 6b83775883..b1ddca1d33 100644 --- a/tests/src/App/ModeTest.php +++ b/tests/src/App/ModeTest.php @@ -12,13 +12,13 @@ use Friendica\App\Arguments; use Friendica\App\Mode; use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\Database\Database; -use Friendica\Test\MockedTest; +use Friendica\Test\MockedTestCase; use Friendica\Test\Util\VFSTrait; use Friendica\Util\BasePath; use Mockery; use Mockery\MockInterface; -class ModeTest extends MockedTest +class ModeTest extends MockedTestCase { use VFSTrait; diff --git a/tests/src/App/RequestTest.php b/tests/src/App/RequestTest.php index 77d77c3ba9..648d2b6386 100644 --- a/tests/src/App/RequestTest.php +++ b/tests/src/App/RequestTest.php @@ -9,9 +9,9 @@ namespace Friendica\Test\src\App; use Friendica\App\Request; use Friendica\Core\Config\Capability\IManageConfigValues; -use Friendica\Test\MockedTest; +use Friendica\Test\MockedTestCase; -class RequestTest extends MockedTest +class RequestTest extends MockedTestCase { public function dataServerArray(): array { diff --git a/tests/src/CollectionTest.php b/tests/src/CollectionTest.php index 257ec0e107..f82bb5dfea 100644 --- a/tests/src/CollectionTest.php +++ b/tests/src/CollectionTest.php @@ -7,11 +7,11 @@ namespace Friendica\Test\src; -use Friendica\Test\MockedTest; +use Friendica\Test\MockedTestCase; use Friendica\Test\Util\CollectionDouble; use Friendica\Test\Util\EntityDouble; -class CollectionTest extends MockedTest +class CollectionTest extends MockedTestCase { /** * Test if the BaseCollection::column() works as expected diff --git a/tests/src/Console/AutomaticInstallationConsoleTest.php b/tests/src/Console/AutomaticInstallationConsoleTest.php index c5d466eb11..0c2ffe1072 100644 --- a/tests/src/Console/AutomaticInstallationConsoleTest.php +++ b/tests/src/Console/AutomaticInstallationConsoleTest.php @@ -16,6 +16,7 @@ use Friendica\Core\L10n; use Friendica\Core\Logger; use Friendica\Database\Database; use Friendica\DI; +use Friendica\Test\ConsoleTestCase; use Friendica\Test\Util\RendererMockTrait; use Friendica\Test\Util\VFSTrait; use Mockery; @@ -24,7 +25,7 @@ use org\bovigo\vfs\vfsStream; use org\bovigo\vfs\vfsStreamFile; use Psr\Log\NullLogger; -class AutomaticInstallationConsoleTest extends ConsoleTest +class AutomaticInstallationConsoleTest extends ConsoleTestCase { use VFSTrait; use RendererMockTrait; @@ -273,7 +274,7 @@ Creating config file... Checking database... [Error] -------- -Could not connect to database.: +Could not connect to database.: FIN; @@ -633,12 +634,12 @@ Options -d|--dbdata The name of the mysql/mariadb database (env MYSQL_DATABASE) -U|--dbuser The username of the mysql/mariadb database login (env MYSQL_USER or MYSQL_USERNAME) -P|--dbpass The password of the mysql/mariadb database login (env MYSQL_PASSWORD) - -U|--url The full base URL of Friendica - f.e. 'https://friendica.local/sub' (env FRIENDICA_URL) + -U|--url The full base URL of Friendica - f.e. 'https://friendica.local/sub' (env FRIENDICA_URL) -B|--phppath The path of the PHP binary (env FRIENDICA_PHP_PATH) -b|--basepath The basepath of Friendica (env FRIENDICA_BASE_PATH) -t|--tz The timezone of Friendica (env FRIENDICA_TZ) -L|--lang The language of Friendica (env FRIENDICA_LANG) - + Environment variables MYSQL_HOST The host of the mysql/mariadb database (mandatory if mysql and environment is used) MYSQL_PORT The port of the mysql/mariadb database @@ -651,7 +652,7 @@ Environment variables FRIENDICA_ADMIN_MAIL The admin email address of Friendica (this email will be used for admin access) FRIENDICA_TZ The timezone of Friendica FRIENDICA_LANG The langauge of Friendica - + Examples bin/console autoinstall -f 'input.config.php Installs Friendica with the prepared 'input.config.php' file diff --git a/tests/src/Console/ConfigConsoleTest.php b/tests/src/Console/ConfigConsoleTest.php index efcfd1fb1f..3c983e04af 100644 --- a/tests/src/Console/ConfigConsoleTest.php +++ b/tests/src/Console/ConfigConsoleTest.php @@ -11,11 +11,12 @@ use Friendica\App; use Friendica\App\Mode; use Friendica\Console\Config; use Friendica\Core\Config\Capability\IManageConfigValues; +use Friendica\Test\ConsoleTestCase; use Mockery; use Mockery\LegacyMockInterface; use Mockery\MockInterface; -class ConfigConsoleTest extends ConsoleTest +class ConfigConsoleTest extends ConsoleTestCase { /** * @var App\Mode|MockInterface $appMode diff --git a/tests/src/Console/LockConsoleTest.php b/tests/src/Console/LockConsoleTest.php index 17fda1150b..d059de696f 100644 --- a/tests/src/Console/LockConsoleTest.php +++ b/tests/src/Console/LockConsoleTest.php @@ -11,10 +11,11 @@ use Friendica\App; use Friendica\App\Mode; use Friendica\Console\Lock; use Friendica\Core\Lock\Capability\ICanLock; +use Friendica\Test\ConsoleTestCase; use Mockery; use Mockery\MockInterface; -class LockConsoleTest extends ConsoleTest +class LockConsoleTest extends ConsoleTestCase { /** * @var App\Mode|MockInterface $appMode diff --git a/tests/src/Console/ServerBlockConsoleTest.php b/tests/src/Console/ServerBlockConsoleTest.php index 121e071e2a..cbbb8bdb39 100644 --- a/tests/src/Console/ServerBlockConsoleTest.php +++ b/tests/src/Console/ServerBlockConsoleTest.php @@ -9,10 +9,11 @@ namespace Friendica\Test\src\Console; use Friendica\Console\ServerBlock; use Friendica\Moderation\DomainPatternBlocklist; +use Friendica\Test\ConsoleTestCase; use Friendica\Test\FixtureTestTrait; use Mockery; -class ServerBlockConsoleTest extends ConsoleTest +class ServerBlockConsoleTest extends ConsoleTestCase { use FixtureTestTrait; diff --git a/tests/src/Contact/FriendSuggest/Factory/FriendSuggestTest.php b/tests/src/Contact/FriendSuggest/Factory/FriendSuggestTest.php index 67275abe35..dd4102d0ab 100644 --- a/tests/src/Contact/FriendSuggest/Factory/FriendSuggestTest.php +++ b/tests/src/Contact/FriendSuggest/Factory/FriendSuggestTest.php @@ -9,10 +9,10 @@ namespace Friendica\Test\src\Contact\FriendSuggest\Factory; use Friendica\Contact\FriendSuggest\Factory\FriendSuggest; use Friendica\Contact\FriendSuggest\Entity; -use Friendica\Test\MockedTest; +use Friendica\Test\MockedTestCase; use Psr\Log\NullLogger; -class FriendSuggestTest extends MockedTest +class FriendSuggestTest extends MockedTestCase { public function dataCreate() { diff --git a/tests/src/Content/ItemTest.php b/tests/src/Content/ItemTest.php index a2e14ce061..c2adbccb15 100644 --- a/tests/src/Content/ItemTest.php +++ b/tests/src/Content/ItemTest.php @@ -7,9 +7,9 @@ namespace Friendica\Test\src\Content; -use Friendica\Test\MockedTest; +use Friendica\Test\MockedTestCase; -class ItemTest extends MockedTest +class ItemTest extends MockedTestCase { /** * @doesNotPerformAssertions diff --git a/tests/src/Content/PageInfoTest.php b/tests/src/Content/PageInfoTest.php index a88c1fe4a6..324381a4dd 100644 --- a/tests/src/Content/PageInfoTest.php +++ b/tests/src/Content/PageInfoTest.php @@ -7,9 +7,9 @@ namespace Friendica\Test\src\Content; -use Friendica\Test\DatabaseTest; +use Friendica\Test\DatabaseTestCase; -class PageInfoTest extends DatabaseTest +class PageInfoTest extends DatabaseTestCase { public function dataGetRelevantUrlFromBody() { diff --git a/tests/src/Content/SmiliesTest.php b/tests/src/Content/SmiliesTest.php index 077875def2..441176fd73 100644 --- a/tests/src/Content/SmiliesTest.php +++ b/tests/src/Content/SmiliesTest.php @@ -11,9 +11,9 @@ use Friendica\Content\Smilies; use Friendica\Core\Hook; use Friendica\DI; use Friendica\Network\HTTPException\InternalServerErrorException; -use Friendica\Test\FixtureTest; +use Friendica\Test\FixtureTestCase; -class SmiliesTest extends FixtureTest +class SmiliesTest extends FixtureTestCase { protected function setUp(): void { diff --git a/tests/src/Content/Text/BBCode/VideoTest.php b/tests/src/Content/Text/BBCode/VideoTest.php index 21b4d5068d..a2b4188d38 100644 --- a/tests/src/Content/Text/BBCode/VideoTest.php +++ b/tests/src/Content/Text/BBCode/VideoTest.php @@ -8,9 +8,9 @@ namespace Friendica\Test\src\Content\Text\BBCode; use Friendica\Content\Text\BBCode\Video; -use Friendica\Test\MockedTest; +use Friendica\Test\MockedTestCase; -class VideoTest extends MockedTest +class VideoTest extends MockedTestCase { public function dataVideo() { diff --git a/tests/src/Content/Text/BBCodeTest.php b/tests/src/Content/Text/BBCodeTest.php index 0c55c97c77..6d6c610762 100644 --- a/tests/src/Content/Text/BBCodeTest.php +++ b/tests/src/Content/Text/BBCodeTest.php @@ -10,10 +10,10 @@ namespace Friendica\Test\src\Content\Text; use Friendica\Content\Text\BBCode; use Friendica\DI; use Friendica\Network\HTTPException\InternalServerErrorException; -use Friendica\Test\FixtureTest; +use Friendica\Test\FixtureTestCase; use Friendica\Util\Strings; -class BBCodeTest extends FixtureTest +class BBCodeTest extends FixtureTestCase { /** @var \HTMLPurifier */ public $HTMLPurifier; diff --git a/tests/src/Content/Text/HTMLTest.php b/tests/src/Content/Text/HTMLTest.php index 125f012e50..374f74111f 100644 --- a/tests/src/Content/Text/HTMLTest.php +++ b/tests/src/Content/Text/HTMLTest.php @@ -10,11 +10,11 @@ namespace Friendica\Test\src\Content\Text; use Exception; use Friendica\Content\Text\HTML; use Friendica\Network\HTTPException\InternalServerErrorException; -use Friendica\Test\FixtureTest; +use Friendica\Test\FixtureTestCase; use GuzzleHttp\Psr7\Uri; use Psr\Http\Message\UriInterface; -class HTMLTest extends FixtureTest +class HTMLTest extends FixtureTestCase { public function dataHTML() { diff --git a/tests/src/Content/Text/MarkdownTest.php b/tests/src/Content/Text/MarkdownTest.php index c6a774ba4f..6882bec7f1 100644 --- a/tests/src/Content/Text/MarkdownTest.php +++ b/tests/src/Content/Text/MarkdownTest.php @@ -9,9 +9,9 @@ namespace Friendica\Test\src\Content\Text; use Exception; use Friendica\Content\Text\Markdown; -use Friendica\Test\FixtureTest; +use Friendica\Test\FixtureTestCase; -class MarkdownTest extends FixtureTest +class MarkdownTest extends FixtureTestCase { public function dataMarkdown() { diff --git a/tests/src/Content/Text/PlaintextTest.php b/tests/src/Content/Text/PlaintextTest.php index 5c5877ac75..814e842c72 100644 --- a/tests/src/Content/Text/PlaintextTest.php +++ b/tests/src/Content/Text/PlaintextTest.php @@ -10,9 +10,9 @@ namespace Friendica\Test\src\Content\Text; use Friendica\Content\Text\BBCode; use Friendica\Content\Text\Plaintext; use Friendica\Network\HTTPException\InternalServerErrorException; -use Friendica\Test\FixtureTest; +use Friendica\Test\FixtureTestCase; -class PlaintextTest extends FixtureTest +class PlaintextTest extends FixtureTestCase { protected function setUp(): void { diff --git a/tests/src/Core/ACLTest.php b/tests/src/Core/ACLTest.php index 11e2c9df74..49d791ac77 100644 --- a/tests/src/Core/ACLTest.php +++ b/tests/src/Core/ACLTest.php @@ -8,9 +8,9 @@ namespace Friendica\Test\src\Core; use Friendica\Core\ACL; -use Friendica\Test\FixtureTest; +use Friendica\Test\FixtureTestCase; -class ACLTest extends FixtureTest +class ACLTest extends FixtureTestCase { /** * Test the ACL::isValidContact() function. diff --git a/tests/src/Core/Addon/Model/AddonLoaderTest.php b/tests/src/Core/Addon/Model/AddonLoaderTest.php index 6c052230a6..1c119fb680 100644 --- a/tests/src/Core/Addon/Model/AddonLoaderTest.php +++ b/tests/src/Core/Addon/Model/AddonLoaderTest.php @@ -10,11 +10,11 @@ namespace Friendica\Test\src\Core\Addon\Model; use Friendica\Core\Addon\Exception\AddonInvalidConfigFileException; use Friendica\Core\Addon\Model\AddonLoader; use Friendica\Core\Config\Capability\IManageConfigValues; -use Friendica\Test\MockedTest; +use Friendica\Test\MockedTestCase; use Friendica\Test\Util\VFSTrait; use org\bovigo\vfs\vfsStream; -class AddonLoaderTest extends MockedTest +class AddonLoaderTest extends MockedTestCase { use VFSTrait; diff --git a/tests/src/Core/Cache/APCuCacheTest.php b/tests/src/Core/Cache/APCuCacheTest.php index f66930a9f6..117c211b04 100644 --- a/tests/src/Core/Cache/APCuCacheTest.php +++ b/tests/src/Core/Cache/APCuCacheTest.php @@ -8,11 +8,12 @@ namespace Friendica\Test\src\Core\Cache; use Friendica\Core\Cache\Type\APCuCache; +use Friendica\Test\MemoryCacheTestCase; /** * @group APCU */ -class APCuCacheTest extends MemoryCacheTest +class APCuCacheTest extends MemoryCacheTestCase { protected function setUp(): void { diff --git a/tests/src/Core/Cache/ArrayCacheTest.php b/tests/src/Core/Cache/ArrayCacheTest.php index ee82f6ef57..967cb07bce 100644 --- a/tests/src/Core/Cache/ArrayCacheTest.php +++ b/tests/src/Core/Cache/ArrayCacheTest.php @@ -8,8 +8,9 @@ namespace Friendica\Test\src\Core\Cache; use Friendica\Core\Cache\Type\ArrayCache; +use Friendica\Test\MemoryCacheTestCase; -class ArrayCacheTest extends MemoryCacheTest +class ArrayCacheTest extends MemoryCacheTestCase { protected function getInstance() { diff --git a/tests/src/Core/Cache/DatabaseCacheTest.php b/tests/src/Core/Cache/DatabaseCacheTest.php index 5b4c61bc88..7b9f404ae1 100644 --- a/tests/src/Core/Cache/DatabaseCacheTest.php +++ b/tests/src/Core/Cache/DatabaseCacheTest.php @@ -7,13 +7,13 @@ namespace Friendica\Test\src\Core\Cache; -use Friendica\App\BaseURL; -use Friendica\Core\Cache; +use Friendica\Core\Cache\Type\DatabaseCache; +use Friendica\Test\CacheTestCase; use Friendica\Test\DatabaseTestTrait; use Friendica\Test\Util\CreateDatabaseTrait; use Friendica\Test\Util\VFSTrait; -class DatabaseCacheTest extends CacheTest +class DatabaseCacheTest extends CacheTestCase { use DatabaseTestTrait; use CreateDatabaseTrait; @@ -30,7 +30,7 @@ class DatabaseCacheTest extends CacheTest protected function getInstance() { - $this->cache = new Cache\Type\DatabaseCache('database', $this->getDbInstance()); + $this->cache = new DatabaseCache('database', $this->getDbInstance()); return $this->cache; } diff --git a/tests/src/Core/Cache/MemcacheCacheTest.php b/tests/src/Core/Cache/MemcacheCacheTest.php index f5ac4dafb6..abd073f483 100644 --- a/tests/src/Core/Cache/MemcacheCacheTest.php +++ b/tests/src/Core/Cache/MemcacheCacheTest.php @@ -10,13 +10,14 @@ namespace Friendica\Test\src\Core\Cache; use Exception; use Friendica\Core\Cache\Type\MemcacheCache; use Friendica\Core\Config\Capability\IManageConfigValues; +use Friendica\Test\MemoryCacheTestCase; use Mockery; /** * @requires extension memcache * @group MEMCACHE */ -class MemcacheCacheTest extends MemoryCacheTest +class MemcacheCacheTest extends MemoryCacheTestCase { protected function getInstance() { diff --git a/tests/src/Core/Cache/MemcachedCacheTest.php b/tests/src/Core/Cache/MemcachedCacheTest.php index e191347cf7..f3b6107b5b 100644 --- a/tests/src/Core/Cache/MemcachedCacheTest.php +++ b/tests/src/Core/Cache/MemcachedCacheTest.php @@ -10,6 +10,7 @@ namespace Friendica\Test\src\Core\Cache; use Exception; use Friendica\Core\Cache\Type\MemcachedCache; use Friendica\Core\Config\Capability\IManageConfigValues; +use Friendica\Test\MemoryCacheTestCase; use Mockery; use Psr\Log\NullLogger; @@ -17,7 +18,7 @@ use Psr\Log\NullLogger; * @requires extension memcached * @group MEMCACHED */ -class MemcachedCacheTest extends MemoryCacheTest +class MemcachedCacheTest extends MemoryCacheTestCase { protected function getInstance() { diff --git a/tests/src/Core/Cache/RedisCacheTest.php b/tests/src/Core/Cache/RedisCacheTest.php index db1bf3f70b..6169171f40 100644 --- a/tests/src/Core/Cache/RedisCacheTest.php +++ b/tests/src/Core/Cache/RedisCacheTest.php @@ -10,13 +10,14 @@ namespace Friendica\Test\src\Core\Cache; use Exception; use Friendica\Core\Cache\Type\RedisCache; use Friendica\Core\Config\Capability\IManageConfigValues; +use Friendica\Test\MemoryCacheTestCase; use Mockery; /** * @requires extension redis * @group REDIS */ -class RedisCacheTest extends MemoryCacheTest +class RedisCacheTest extends MemoryCacheTestCase { protected function getInstance() { @@ -44,7 +45,7 @@ class RedisCacheTest extends MemoryCacheTest ->andReturn(null); try { - $this->cache = new \Friendica\Core\Cache\Type\RedisCache($host, $configMock); + $this->cache = new RedisCache($host, $configMock); } catch (Exception $e) { static::markTestSkipped('Redis is not available. Failure: ' . $e->getMessage()); } diff --git a/tests/src/Core/Config/Cache/CacheTest.php b/tests/src/Core/Config/Cache/CacheTest.php index f539dc045c..fddf621bd0 100644 --- a/tests/src/Core/Config/Cache/CacheTest.php +++ b/tests/src/Core/Config/Cache/CacheTest.php @@ -8,11 +8,11 @@ namespace Friendica\Test\src\Core\Config\Cache; use Friendica\Core\Config\ValueObject\Cache; -use Friendica\Test\MockedTest; +use Friendica\Test\MockedTestCase; use ParagonIE\HiddenString\HiddenString; use stdClass; -class CacheTest extends MockedTest +class CacheTest extends MockedTestCase { public function dataTests() { diff --git a/tests/src/Core/Config/Cache/ConfigFileManagerTest.php b/tests/src/Core/Config/Cache/ConfigFileManagerTest.php index 3f49e8c8eb..e5b1fc623d 100644 --- a/tests/src/Core/Config/Cache/ConfigFileManagerTest.php +++ b/tests/src/Core/Config/Cache/ConfigFileManagerTest.php @@ -9,12 +9,12 @@ namespace Friendica\Test\src\Core\Config\Cache; use Friendica\Core\Config\Factory\Config; use Friendica\Core\Config\ValueObject\Cache; -use Friendica\Test\MockedTest; +use Friendica\Test\MockedTestCase; use Friendica\Test\Util\VFSTrait; use Friendica\Core\Config\Util\ConfigFileManager; use org\bovigo\vfs\vfsStream; -class ConfigFileManagerTest extends MockedTest +class ConfigFileManagerTest extends MockedTestCase { use VFSTrait; diff --git a/tests/src/Core/Config/ConfigTest.php b/tests/src/Core/Config/ConfigTest.php index ed5e329aea..83dbaa0af0 100644 --- a/tests/src/Core/Config/ConfigTest.php +++ b/tests/src/Core/Config/ConfigTest.php @@ -13,12 +13,12 @@ use Friendica\Core\Config\Model\DatabaseConfig; use Friendica\Core\Config\Model\ReadOnlyFileConfig; use Friendica\Core\Config\Util\ConfigFileManager; use Friendica\Core\Config\ValueObject\Cache; -use Friendica\Test\DatabaseTest; +use Friendica\Test\DatabaseTestCase; use Friendica\Test\Util\CreateDatabaseTrait; use Friendica\Test\Util\VFSTrait; use org\bovigo\vfs\vfsStream; -class ConfigTest extends DatabaseTest +class ConfigTest extends DatabaseTestCase { use ArraySubsetAsserts; use VFSTrait; diff --git a/tests/src/Core/Config/ConfigTransactionTest.php b/tests/src/Core/Config/ConfigTransactionTest.php index 46942393dd..5c704b7600 100644 --- a/tests/src/Core/Config/ConfigTransactionTest.php +++ b/tests/src/Core/Config/ConfigTransactionTest.php @@ -14,14 +14,14 @@ use Friendica\Core\Config\Model\ConfigTransaction; use Friendica\Core\Config\Util\ConfigFileManager; use Friendica\Core\Config\ValueObject\Cache; use Friendica\Database\Database; -use Friendica\Test\DatabaseTest; -use Friendica\Test\FixtureTest; +use Friendica\Test\DatabaseTestCase; +use Friendica\Test\FixtureTestCase; use Friendica\Test\MockedTest; use Friendica\Test\Util\Database\StaticDatabase; use Friendica\Test\Util\VFSTrait; use Mockery\Exception\InvalidCountException; -class ConfigTransactionTest extends FixtureTest +class ConfigTransactionTest extends FixtureTestCase { /** @var ConfigFileManager */ protected $configFileManager; diff --git a/tests/src/Core/Hooks/Model/InstanceManagerTest.php b/tests/src/Core/Hooks/Model/InstanceManagerTest.php index 4d38265ebf..ef22218945 100644 --- a/tests/src/Core/Hooks/Model/InstanceManagerTest.php +++ b/tests/src/Core/Hooks/Model/InstanceManagerTest.php @@ -12,13 +12,13 @@ use Friendica\Core\Hooks\Exceptions\HookInstanceException; use Friendica\Core\Hooks\Exceptions\HookRegisterArgumentException; use Friendica\Core\Hooks\Model\DiceInstanceManager; use Friendica\Core\Hooks\Util\StrategiesFileManager; -use Friendica\Test\MockedTest; +use Friendica\Test\MockedTestCase; use Friendica\Test\Util\Hooks\InstanceMocks\FakeInstance; use Friendica\Test\Util\Hooks\InstanceMocks\FakeInstanceDecorator; use Friendica\Test\Util\Hooks\InstanceMocks\IAmADecoratedInterface; use Mockery\MockInterface; -class InstanceManagerTest extends MockedTest +class InstanceManagerTest extends MockedTestCase { /** @var StrategiesFileManager|MockInterface */ protected $hookFileManager; diff --git a/tests/src/Core/Hooks/Util/StrategiesFileManagerTest.php b/tests/src/Core/Hooks/Util/StrategiesFileManagerTest.php index 5fb0927d68..633b636701 100644 --- a/tests/src/Core/Hooks/Util/StrategiesFileManagerTest.php +++ b/tests/src/Core/Hooks/Util/StrategiesFileManagerTest.php @@ -11,13 +11,13 @@ use Friendica\Core\Addon\Capability\ICanLoadAddons; use Friendica\Core\Hooks\Capability\ICanRegisterStrategies; use Friendica\Core\Hooks\Exceptions\HookConfigException; use Friendica\Core\Hooks\Util\StrategiesFileManager; -use Friendica\Test\MockedTest; +use Friendica\Test\MockedTestCase; use Friendica\Test\Util\VFSTrait; use org\bovigo\vfs\vfsStream; use Psr\Log\LoggerInterface; use Psr\Log\NullLogger; -class StrategiesFileManagerTest extends MockedTest +class StrategiesFileManagerTest extends MockedTestCase { use VFSTrait; diff --git a/tests/src/Core/InstallerTest.php b/tests/src/Core/InstallerTest.php index a97c7d36c9..2f5873dfe6 100644 --- a/tests/src/Core/InstallerTest.php +++ b/tests/src/Core/InstallerTest.php @@ -15,13 +15,13 @@ use Friendica\Core\L10n; use Friendica\DI; use Friendica\Network\HTTPClient\Capability\ICanHandleHttpResponses; use Friendica\Network\HTTPClient\Capability\ICanSendHttpRequests; -use Friendica\Test\MockedTest; +use Friendica\Test\MockedTestCase; use Friendica\Test\Util\VFSTrait; use Mockery; use Mockery\MockInterface; use phpmock\phpunit\PHPMock; -class InstallerTest extends MockedTest +class InstallerTest extends MockedTestCase { use VFSTrait; use ArraySubsetAsserts; diff --git a/tests/src/Core/KeyValueStorage/DBKeyValueStorageTest.php b/tests/src/Core/KeyValueStorage/DBKeyValueStorageTest.php index 5575ea5e27..73699cd84e 100644 --- a/tests/src/Core/KeyValueStorage/DBKeyValueStorageTest.php +++ b/tests/src/Core/KeyValueStorage/DBKeyValueStorageTest.php @@ -10,9 +10,10 @@ namespace Friendica\Test\src\Core\KeyValueStorage; use Friendica\Core\KeyValueStorage\Capability\IManageKeyValuePairs; use Friendica\Core\KeyValueStorage\Type\DBKeyValueStorage; use Friendica\Database\Database; +use Friendica\Test\MockedTestCase; use Friendica\Test\Util\CreateDatabaseTrait; -class DBKeyValueStorageTest extends KeyValueStorageTest +class DBKeyValueStorageTest extends MockedTestCase { use CreateDatabaseTrait; @@ -68,4 +69,79 @@ class DBKeyValueStorageTest extends KeyValueStorageTest self::assertGreaterThanOrEqual($updateAt, $updateAtAfter); } + + public function testInstance() + { + $instance = $this->getInstance(); + + self::assertInstanceOf(IManageKeyValuePairs::class, $instance); + } + + public function dataTests(): array + { + return [ + 'string' => ['k' => 'data', 'v' => 'it'], + 'boolTrue' => ['k' => 'data', 'v' => true], + 'boolFalse' => ['k' => 'data', 'v' => false], + 'integer' => ['k' => 'data', 'v' => 235], + 'decimal' => ['k' => 'data', 'v' => 2.456], + 'array' => ['k' => 'data', 'v' => ['1', 2, '3', true, false]], + 'boolIntTrue' => ['k' => 'data', 'v' => 1], + 'boolIntFalse' => ['k' => 'data', 'v' => 0], + ]; + } + + /** + * @dataProvider dataTests + */ + public function testGetSetDelete($k, $v) + { + $instance = $this->getInstance(); + + $instance->set($k, $v); + + self::assertEquals($v, $instance->get($k)); + self::assertEquals($v, $instance[$k]); + + $instance->delete($k); + + self::assertNull($instance->get($k)); + self::assertNull($instance[$k]); + } + + /** + * @dataProvider dataTests + */ + public function testSetOverride($k, $v) + { + $instance = $this->getInstance(); + + $instance->set($k, $v); + + self::assertEquals($v, $instance->get($k)); + self::assertEquals($v, $instance[$k]); + + $instance->set($k, 'another_value'); + + self::assertEquals('another_value', $instance->get($k)); + self::assertEquals('another_value', $instance[$k]); + } + + /** + * @dataProvider dataTests + */ + public function testOffsetSetDelete($k, $v) + { + $instance = $this->getInstance(); + + $instance[$k] = $v; + + self::assertEquals($v, $instance->get($k)); + self::assertEquals($v, $instance[$k]); + + unset($instance[$k]); + + self::assertNull($instance->get($k)); + self::assertNull($instance[$k]); + } } diff --git a/tests/src/Core/KeyValueStorage/KeyValueStorageTest.php b/tests/src/Core/KeyValueStorage/KeyValueStorageTest.php deleted file mode 100644 index 6d1f6ad328..0000000000 --- a/tests/src/Core/KeyValueStorage/KeyValueStorageTest.php +++ /dev/null @@ -1,91 +0,0 @@ -getInstance(); - - self::assertInstanceOf(IManageKeyValuePairs::class, $instance); - } - - public function dataTests(): array - { - return [ - 'string' => ['k' => 'data', 'v' => 'it'], - 'boolTrue' => ['k' => 'data', 'v' => true], - 'boolFalse' => ['k' => 'data', 'v' => false], - 'integer' => ['k' => 'data', 'v' => 235], - 'decimal' => ['k' => 'data', 'v' => 2.456], - 'array' => ['k' => 'data', 'v' => ['1', 2, '3', true, false]], - 'boolIntTrue' => ['k' => 'data', 'v' => 1], - 'boolIntFalse' => ['k' => 'data', 'v' => 0], - ]; - } - - /** - * @dataProvider dataTests - */ - public function testGetSetDelete($k, $v) - { - $instance = $this->getInstance(); - - $instance->set($k, $v); - - self::assertEquals($v, $instance->get($k)); - self::assertEquals($v, $instance[$k]); - - $instance->delete($k); - - self::assertNull($instance->get($k)); - self::assertNull($instance[$k]); - } - - /** - * @dataProvider dataTests - */ - public function testSetOverride($k, $v) - { - $instance = $this->getInstance(); - - $instance->set($k, $v); - - self::assertEquals($v, $instance->get($k)); - self::assertEquals($v, $instance[$k]); - - $instance->set($k, 'another_value'); - - self::assertEquals('another_value', $instance->get($k)); - self::assertEquals('another_value', $instance[$k]); - } - - /** - * @dataProvider dataTests - */ - public function testOffsetSetDelete($k, $v) - { - $instance = $this->getInstance(); - - $instance[$k] = $v; - - self::assertEquals($v, $instance->get($k)); - self::assertEquals($v, $instance[$k]); - - unset($instance[$k]); - - self::assertNull($instance->get($k)); - self::assertNull($instance[$k]); - } -} diff --git a/tests/src/Core/L10nTest.php b/tests/src/Core/L10nTest.php index cf61b2dd48..01dc301d78 100644 --- a/tests/src/Core/L10nTest.php +++ b/tests/src/Core/L10nTest.php @@ -8,9 +8,9 @@ namespace Friendica\Test\src\Core; use Friendica\Core\L10n; -use Friendica\Test\MockedTest; +use Friendica\Test\MockedTestCase; -class L10nTest extends MockedTest +class L10nTest extends MockedTestCase { public function dataDetectLanguage() { diff --git a/tests/src/Core/Lock/APCuCacheLockTest.php b/tests/src/Core/Lock/APCuCacheLockTest.php index f0ac1a0ec6..3ee0d09661 100644 --- a/tests/src/Core/Lock/APCuCacheLockTest.php +++ b/tests/src/Core/Lock/APCuCacheLockTest.php @@ -9,11 +9,12 @@ namespace Friendica\Test\src\Core\Lock; use Friendica\Core\Cache\Type\APCuCache; use Friendica\Core\Lock\Type\CacheLock; +use Friendica\Test\LockTestCase; /** * @group APCU */ -class APCuCacheLockTest extends LockTest +class APCuCacheLockTest extends LockTestCase { protected function setUp(): void { @@ -26,6 +27,6 @@ class APCuCacheLockTest extends LockTest protected function getInstance() { - return new \Friendica\Core\Lock\Type\CacheLock(new APCuCache('localhost')); + return new CacheLock(new APCuCache('localhost')); } } diff --git a/tests/src/Core/Lock/ArrayCacheLockTest.php b/tests/src/Core/Lock/ArrayCacheLockTest.php index 0c09b004f8..19ac7925c6 100644 --- a/tests/src/Core/Lock/ArrayCacheLockTest.php +++ b/tests/src/Core/Lock/ArrayCacheLockTest.php @@ -9,12 +9,13 @@ namespace Friendica\Test\src\Core\Lock; use Friendica\Core\Cache\Type\ArrayCache; use Friendica\Core\Lock\Type\CacheLock; +use Friendica\Test\LockTestCase; -class ArrayCacheLockTest extends LockTest +class ArrayCacheLockTest extends LockTestCase { protected function getInstance() { - return new \Friendica\Core\Lock\Type\CacheLock(new ArrayCache('localhost')); + return new CacheLock(new ArrayCache('localhost')); } /** diff --git a/tests/src/Core/Lock/DatabaseLockDriverTest.php b/tests/src/Core/Lock/DatabaseLockDriverTest.php index b4dc526b89..ebc2b0090f 100644 --- a/tests/src/Core/Lock/DatabaseLockDriverTest.php +++ b/tests/src/Core/Lock/DatabaseLockDriverTest.php @@ -8,9 +8,10 @@ namespace Friendica\Test\src\Core\Lock; use Friendica\Core\Lock\Type\DatabaseLock; +use Friendica\Test\LockTestCase; use Friendica\Test\Util\CreateDatabaseTrait; -class DatabaseLockDriverTest extends LockTest +class DatabaseLockDriverTest extends LockTestCase { use CreateDatabaseTrait; diff --git a/tests/src/Core/Lock/MemcacheCacheLockTest.php b/tests/src/Core/Lock/MemcacheCacheLockTest.php index f23870779a..2bb0595cff 100644 --- a/tests/src/Core/Lock/MemcacheCacheLockTest.php +++ b/tests/src/Core/Lock/MemcacheCacheLockTest.php @@ -11,13 +11,14 @@ use Exception; use Friendica\Core\Cache\Type\MemcacheCache; use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\Core\Lock\Type\CacheLock; +use Friendica\Test\LockTestCase; use Mockery; /** * @requires extension Memcache * @group MEMCACHE */ -class MemcacheCacheLockTest extends LockTest +class MemcacheCacheLockTest extends LockTestCase { protected function getInstance() { @@ -39,7 +40,7 @@ class MemcacheCacheLockTest extends LockTest try { $cache = new MemcacheCache($host, $configMock); - $lock = new \Friendica\Core\Lock\Type\CacheLock($cache); + $lock = new CacheLock($cache); } catch (Exception $e) { static::markTestSkipped('Memcache is not available'); } diff --git a/tests/src/Core/Lock/MemcachedCacheLockTest.php b/tests/src/Core/Lock/MemcachedCacheLockTest.php index 2936bfec9a..fb38ec3312 100644 --- a/tests/src/Core/Lock/MemcachedCacheLockTest.php +++ b/tests/src/Core/Lock/MemcachedCacheLockTest.php @@ -11,6 +11,7 @@ use Exception; use Friendica\Core\Cache\Type\MemcachedCache; use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\Core\Lock\Type\CacheLock; +use Friendica\Test\LockTestCase; use Mockery; use Psr\Log\NullLogger; @@ -18,7 +19,7 @@ use Psr\Log\NullLogger; * @requires extension memcached * @group MEMCACHED */ -class MemcachedCacheLockTest extends LockTest +class MemcachedCacheLockTest extends LockTestCase { protected function getInstance() { diff --git a/tests/src/Core/Lock/RedisCacheLockTest.php b/tests/src/Core/Lock/RedisCacheLockTest.php index 834d2bb8c4..d0237682c3 100644 --- a/tests/src/Core/Lock/RedisCacheLockTest.php +++ b/tests/src/Core/Lock/RedisCacheLockTest.php @@ -11,13 +11,14 @@ use Exception; use Friendica\Core\Cache\Type\RedisCache; use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\Core\Lock\Type\CacheLock; +use Friendica\Test\LockTestCase; use Mockery; /** * @requires extension redis * @group REDIS */ -class RedisCacheLockTest extends LockTest +class RedisCacheLockTest extends LockTestCase { protected function getInstance() { @@ -48,7 +49,7 @@ class RedisCacheLockTest extends LockTest try { $cache = new RedisCache($host, $configMock); - $lock = new \Friendica\Core\Lock\Type\CacheLock($cache); + $lock = new CacheLock($cache); } catch (Exception $e) { static::markTestSkipped('Redis is not available. Error: ' . $e->getMessage()); } diff --git a/tests/src/Core/Lock/SemaphoreLockTest.php b/tests/src/Core/Lock/SemaphoreLockTest.php index 407e68afaf..06b4e02f46 100644 --- a/tests/src/Core/Lock/SemaphoreLockTest.php +++ b/tests/src/Core/Lock/SemaphoreLockTest.php @@ -12,12 +12,14 @@ use Friendica\App; use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\Core\Config\Model\ReadOnlyFileConfig; use Friendica\Core\Config\ValueObject\Cache; +use Friendica\Core\Lock\Type\SemaphoreLock; use Friendica\Core\System; use Friendica\DI; +use Friendica\Test\LockTestCase; use Mockery; use Mockery\MockInterface; -class SemaphoreLockTest extends LockTest +class SemaphoreLockTest extends LockTestCase { protected function setUp(): void { @@ -40,7 +42,7 @@ class SemaphoreLockTest extends LockTest protected function getInstance() { - return new \Friendica\Core\Lock\Type\SemaphoreLock(); + return new SemaphoreLock(); } /** diff --git a/tests/src/Core/Logger/ProfilerLoggerTest.php b/tests/src/Core/Logger/ProfilerLoggerTest.php index b6dd4c4132..f137e8c7fa 100644 --- a/tests/src/Core/Logger/ProfilerLoggerTest.php +++ b/tests/src/Core/Logger/ProfilerLoggerTest.php @@ -7,14 +7,15 @@ namespace Friendica\Test\src\Core\Logger; -use Friendica\Test\MockedTest; use Friendica\Core\Logger\Type\ProfilerLogger; +use Friendica\Test\LoggerDataTrait; +use Friendica\Test\MockedTestCase; use Friendica\Util\Profiler; use Mockery\MockInterface; use Psr\Log\LoggerInterface; use Psr\Log\LogLevel; -class ProfilerLoggerTest extends MockedTest +class ProfilerLoggerTest extends MockedTestCase { use LoggerDataTrait; diff --git a/tests/src/Core/Logger/StreamLoggerTest.php b/tests/src/Core/Logger/StreamLoggerTest.php index 9fbb6b631e..5d6dc84c44 100644 --- a/tests/src/Core/Logger/StreamLoggerTest.php +++ b/tests/src/Core/Logger/StreamLoggerTest.php @@ -9,13 +9,14 @@ namespace Friendica\Test\src\Core\Logger; use Friendica\Core\Logger\Exception\LoggerArgumentException; use Friendica\Core\Logger\Exception\LogLevelException; +use Friendica\Test\LoggerTestCase; use Friendica\Test\Util\VFSTrait; use Friendica\Core\Logger\Type\StreamLogger; use org\bovigo\vfs\vfsStream; use org\bovigo\vfs\vfsStreamFile; use Psr\Log\LogLevel; -class StreamLoggerTest extends AbstractLoggerTest +class StreamLoggerTest extends LoggerTestCase { use VFSTrait; diff --git a/tests/src/Core/Logger/SyslogLoggerTest.php b/tests/src/Core/Logger/SyslogLoggerTest.php index ca3267e165..ecdaf19e27 100644 --- a/tests/src/Core/Logger/SyslogLoggerTest.php +++ b/tests/src/Core/Logger/SyslogLoggerTest.php @@ -9,9 +9,10 @@ namespace Friendica\Test\src\Core\Logger; use Friendica\Core\Logger\Exception\LogLevelException; use Friendica\Core\Logger\Type\SyslogLogger; +use Friendica\Test\LoggerTestCase; use Psr\Log\LogLevel; -class SyslogLoggerTest extends AbstractLoggerTest +class SyslogLoggerTest extends LoggerTestCase { /** * @var SyslogLoggerWrapper diff --git a/tests/src/Core/Logger/WorkerLoggerTest.php b/tests/src/Core/Logger/WorkerLoggerTest.php index d40cf82f09..ab3e41d9d1 100644 --- a/tests/src/Core/Logger/WorkerLoggerTest.php +++ b/tests/src/Core/Logger/WorkerLoggerTest.php @@ -8,10 +8,10 @@ namespace Friendica\Test\src\Core\Logger; use Friendica\Core\Logger\Type\WorkerLogger; -use Friendica\Test\MockedTest; +use Friendica\Test\MockedTestCase; use Psr\Log\LoggerInterface; -class WorkerLoggerTest extends MockedTest +class WorkerLoggerTest extends MockedTestCase { private function assertUid($uid) { diff --git a/tests/src/Core/PConfig/Cache/CacheTest.php b/tests/src/Core/PConfig/Cache/CacheTest.php index 50b2b3f205..a4d968730b 100644 --- a/tests/src/Core/PConfig/Cache/CacheTest.php +++ b/tests/src/Core/PConfig/Cache/CacheTest.php @@ -7,10 +7,9 @@ namespace Friendica\Test\src\Core\PConfig\Cache; -use Friendica\Core\PConfig\Cache; -use Friendica\Test\MockedTest; +use Friendica\Test\MockedTestCase; -class CacheTest extends MockedTest +class CacheTest extends MockedTestCase { public function dataTests() { diff --git a/tests/src/Core/PConfig/JitPConfigTest.php b/tests/src/Core/PConfig/JitPConfigTest.php index 0e906101ec..e452ffe92c 100644 --- a/tests/src/Core/PConfig/JitPConfigTest.php +++ b/tests/src/Core/PConfig/JitPConfigTest.php @@ -8,8 +8,9 @@ namespace Friendica\Test\src\Core\PConfig; use Friendica\Core\PConfig\Type\JitPConfig; +use Friendica\Test\PConfigTestCase; -class JitPConfigTest extends PConfigTest +class JitPConfigTest extends PConfigTestCase { public function getInstance() { diff --git a/tests/src/Core/PConfig/PreloadPConfigTest.php b/tests/src/Core/PConfig/PreloadPConfigTest.php index 7d10f294ac..a7cba04045 100644 --- a/tests/src/Core/PConfig/PreloadPConfigTest.php +++ b/tests/src/Core/PConfig/PreloadPConfigTest.php @@ -8,12 +8,13 @@ namespace Friendica\Test\src\Core\PConfig; use Friendica\Core\PConfig\Type\PreloadPConfig; +use Friendica\Test\PConfigTestCase; -class PreloadPConfigTest extends PConfigTest +class PreloadPConfigTest extends PConfigTestCase { public function getInstance() { - return new \Friendica\Core\PConfig\Type\PreloadPConfig($this->configCache, $this->configModel); + return new PreloadPConfig($this->configCache, $this->configModel); } /** diff --git a/tests/src/Core/Session/UserSessionTest.php b/tests/src/Core/Session/UserSessionTest.php index d7db99fa81..64c7d8b950 100644 --- a/tests/src/Core/Session/UserSessionTest.php +++ b/tests/src/Core/Session/UserSessionTest.php @@ -9,9 +9,9 @@ namespace Friendica\Test\src\Core\Session; use Friendica\Core\Session\Model\UserSession; use Friendica\Core\Session\Type\ArraySession; -use Friendica\Test\MockedTest; +use Friendica\Test\MockedTestCase; -class UserSessionTest extends MockedTest +class UserSessionTest extends MockedTestCase { public function dataLocalUserId() { diff --git a/tests/src/Core/Storage/DatabaseStorageTest.php b/tests/src/Core/Storage/DatabaseStorageTest.php index 17660ceed2..ab3c514b1d 100644 --- a/tests/src/Core/Storage/DatabaseStorageTest.php +++ b/tests/src/Core/Storage/DatabaseStorageTest.php @@ -8,9 +8,10 @@ namespace Friendica\Test\src\Core\Storage; use Friendica\Core\Storage\Type\Database; +use Friendica\Test\StorageTestCase; use Friendica\Test\Util\CreateDatabaseTrait; -class DatabaseStorageTest extends StorageTest +class DatabaseStorageTest extends StorageTestCase { use CreateDatabaseTrait; diff --git a/tests/src/Core/Storage/FilesystemStorageConfigTest.php b/tests/src/Core/Storage/FilesystemStorageConfigTest.php index 8cbf3e97c8..390266f565 100644 --- a/tests/src/Core/Storage/FilesystemStorageConfigTest.php +++ b/tests/src/Core/Storage/FilesystemStorageConfigTest.php @@ -11,11 +11,12 @@ use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\Core\L10n; use Friendica\Core\Storage\Capability\ICanConfigureStorage; use Friendica\Core\Storage\Type\FilesystemConfig; +use Friendica\Test\StorageConfigTestCase; use Friendica\Test\Util\VFSTrait; use Mockery\MockInterface; use org\bovigo\vfs\vfsStream; -class FilesystemStorageConfigTest extends StorageConfigTest +class FilesystemStorageConfigTest extends StorageConfigTestCase { use VFSTrait; diff --git a/tests/src/Core/Storage/FilesystemStorageTest.php b/tests/src/Core/Storage/FilesystemStorageTest.php index 64bcb68a4a..2d2cfa8d3a 100644 --- a/tests/src/Core/Storage/FilesystemStorageTest.php +++ b/tests/src/Core/Storage/FilesystemStorageTest.php @@ -10,10 +10,11 @@ namespace Friendica\Test\src\Core\Storage; use Friendica\Core\Storage\Exception\StorageException; use Friendica\Core\Storage\Type\Filesystem; use Friendica\Core\Storage\Type\FilesystemConfig; +use Friendica\Test\StorageTestCase; use Friendica\Test\Util\VFSTrait; use org\bovigo\vfs\vfsStream; -class FilesystemStorageTest extends StorageTest +class FilesystemStorageTest extends StorageTestCase { use VFSTrait; diff --git a/tests/src/Core/Storage/Repository/StorageManagerTest.php b/tests/src/Core/Storage/Repository/StorageManagerTest.php index 0123f512c7..ac74274c03 100644 --- a/tests/src/Core/Storage/Repository/StorageManagerTest.php +++ b/tests/src/Core/Storage/Repository/StorageManagerTest.php @@ -26,7 +26,7 @@ use Friendica\Database\Definition\ViewDefinition; use Friendica\DI; use Friendica\Core\Config\Factory\Config; use Friendica\Core\Storage\Type; -use Friendica\Test\DatabaseTest; +use Friendica\Test\DatabaseTestCase; use Friendica\Test\Util\CreateDatabaseTrait; use Friendica\Test\Util\Database\StaticDatabase; use Friendica\Test\Util\VFSTrait; @@ -36,7 +36,7 @@ use Psr\Log\LoggerInterface; use Psr\Log\NullLogger; use Friendica\Test\Util\SampleStorageBackend; -class StorageManagerTest extends DatabaseTest +class StorageManagerTest extends DatabaseTestCase { use CreateDatabaseTrait; diff --git a/tests/src/Core/Worker/Repository/ProcessTest.php b/tests/src/Core/Worker/Repository/ProcessTest.php index 98659b3ce0..eb31556e74 100644 --- a/tests/src/Core/Worker/Repository/ProcessTest.php +++ b/tests/src/Core/Worker/Repository/ProcessTest.php @@ -10,10 +10,10 @@ namespace Friendica\Test\src\Core\Worker\Repository; use Friendica\Core\Worker\Factory; use Friendica\Core\Worker\Repository; use Friendica\DI; -use Friendica\Test\FixtureTest; +use Friendica\Test\FixtureTestCase; use Psr\Log\NullLogger; -class ProcessTest extends FixtureTest +class ProcessTest extends FixtureTestCase { public function testStandardProcess() { diff --git a/tests/src/Database/DBATest.php b/tests/src/Database/DBATest.php index 242af45470..49d3a6a5e6 100644 --- a/tests/src/Database/DBATest.php +++ b/tests/src/Database/DBATest.php @@ -11,10 +11,10 @@ use Dice\Dice; use Friendica\Database\Database; use Friendica\Database\DBA; use Friendica\DI; -use Friendica\Test\DatabaseTest; +use Friendica\Test\DatabaseTestCase; use Friendica\Test\Util\Database\StaticDatabase; -class DBATest extends DatabaseTest +class DBATest extends DatabaseTestCase { protected function setUp(): void { diff --git a/tests/src/Database/DBStructureTest.php b/tests/src/Database/DBStructureTest.php index 377c753a47..9ce3475ee7 100644 --- a/tests/src/Database/DBStructureTest.php +++ b/tests/src/Database/DBStructureTest.php @@ -11,10 +11,10 @@ use Dice\Dice; use Friendica\Database\Database; use Friendica\Database\DBStructure; use Friendica\DI; -use Friendica\Test\DatabaseTest; +use Friendica\Test\DatabaseTestCase; use Friendica\Test\Util\Database\StaticDatabase; -class DBStructureTest extends DatabaseTest +class DBStructureTest extends DatabaseTestCase { protected function setUp(): void { diff --git a/tests/src/Database/DatabaseTest.php b/tests/src/Database/DatabaseTest.php index ef83e46394..c889d6d7d1 100644 --- a/tests/src/Database/DatabaseTest.php +++ b/tests/src/Database/DatabaseTest.php @@ -9,10 +9,10 @@ namespace Friendica\Test\src\Database; use Friendica\Core\Config\Util\ConfigFileManager; use Friendica\Core\Config\ValueObject\Cache; -use Friendica\Test\FixtureTest; +use Friendica\Test\FixtureTestCase; use Friendica\Test\Util\CreateDatabaseTrait; -class DatabaseTest extends FixtureTest +class DatabaseTest extends FixtureTestCase { use CreateDatabaseTrait; diff --git a/tests/src/Factory/Api/Mastodon/EmojiTest.php b/tests/src/Factory/Api/Mastodon/EmojiTest.php index 0221ba9de1..24dba047e6 100644 --- a/tests/src/Factory/Api/Mastodon/EmojiTest.php +++ b/tests/src/Factory/Api/Mastodon/EmojiTest.php @@ -9,9 +9,9 @@ namespace Friendica\Test\src\Factory\Api\Mastodon; use Friendica\Content\Smilies; use Friendica\DI; -use Friendica\Test\FixtureTest; +use Friendica\Test\FixtureTestCase; -class EmojiTest extends FixtureTest +class EmojiTest extends FixtureTestCase { protected function setUp(): void { diff --git a/tests/src/Factory/Api/Mastodon/StatusTest.php b/tests/src/Factory/Api/Mastodon/StatusTest.php index c793bef7d1..314195bb5a 100644 --- a/tests/src/Factory/Api/Mastodon/StatusTest.php +++ b/tests/src/Factory/Api/Mastodon/StatusTest.php @@ -10,9 +10,9 @@ namespace Friendica\Test\src\Factory\Api\Mastodon; use Friendica\Core\Hook; use Friendica\DI; use Friendica\Model\Post; -use Friendica\Test\FixtureTest; +use Friendica\Test\FixtureTestCase; -class StatusTest extends FixtureTest +class StatusTest extends FixtureTestCase { protected $status; diff --git a/tests/src/Factory/Api/Twitter/ActivitiesTest.php b/tests/src/Factory/Api/Twitter/ActivitiesTest.php index 825afe840c..a00f1d7e94 100644 --- a/tests/src/Factory/Api/Twitter/ActivitiesTest.php +++ b/tests/src/Factory/Api/Twitter/ActivitiesTest.php @@ -9,9 +9,9 @@ namespace Friendica\Test\src\Factory\Api\Twitter; use Friendica\DI; use Friendica\Factory\Api\Friendica\Activities; -use Friendica\Test\FixtureTest; +use Friendica\Test\FixtureTestCase; -class ActivitiesTest extends FixtureTest +class ActivitiesTest extends FixtureTestCase { /** * Test the api_format_items_activities() function. diff --git a/tests/src/Factory/Api/Twitter/DirectMessageTest.php b/tests/src/Factory/Api/Twitter/DirectMessageTest.php index 9399bf6106..2f73faf353 100644 --- a/tests/src/Factory/Api/Twitter/DirectMessageTest.php +++ b/tests/src/Factory/Api/Twitter/DirectMessageTest.php @@ -9,10 +9,10 @@ namespace Friendica\Test\src\Factory\Api\Twitter; use Friendica\DI; use Friendica\Factory\Api\Twitter\DirectMessage; -use Friendica\Test\FixtureTest; -use Friendica\Test\src\Module\Api\ApiTest; +use Friendica\Test\ApiTestCase; +use Friendica\Test\FixtureTestCase; -class DirectMessageTest extends FixtureTest +class DirectMessageTest extends FixtureTestCase { /** * Test the api_format_messages() function. @@ -26,7 +26,7 @@ class DirectMessageTest extends FixtureTest $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 FixtureTest $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 FixtureTest $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 FixtureTest $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 c92b08f243..c18d6838ce 100644 --- a/tests/src/Factory/Api/Twitter/StatusTest.php +++ b/tests/src/Factory/Api/Twitter/StatusTest.php @@ -16,10 +16,10 @@ use Friendica\Factory\Api\Twitter\Media; use Friendica\Factory\Api\Twitter\Mention; use Friendica\Factory\Api\Twitter\Status; use Friendica\Factory\Api\Twitter\Url; -use Friendica\Test\FixtureTest; -use Friendica\Test\src\Module\Api\ApiTest; +use Friendica\Test\ApiTestCase; +use Friendica\Test\FixtureTestCase; -class StatusTest extends FixtureTest +class StatusTest extends FixtureTestCase { protected $statusFactory; @@ -47,7 +47,7 @@ class StatusTest extends FixtureTest 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 FixtureTest 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 FixtureTest $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 4203839834..7e44a20a0f 100644 --- a/tests/src/Factory/Api/Twitter/UserTest.php +++ b/tests/src/Factory/Api/Twitter/UserTest.php @@ -10,10 +10,10 @@ namespace Friendica\Test\src\Factory\Api\Twitter; use Friendica\DI; use Friendica\Factory\Api\Twitter\User; use Friendica\Network\HTTPException\NotFoundException; -use Friendica\Test\FixtureTest; -use Friendica\Test\src\Module\Api\ApiTest; +use Friendica\Test\ApiTestCase; +use Friendica\Test\FixtureTestCase; -class UserTest extends FixtureTest +class UserTest extends FixtureTestCase { /** * Assert that an user array contains expected keys. @@ -22,11 +22,11 @@ class UserTest extends FixtureTest */ 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 FixtureTest 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 FixtureTest $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 FixtureTest $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 FixtureTest $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/Model/Post/MediaTest.php b/tests/src/Model/Post/MediaTest.php index e6b09e6a74..d063399b13 100644 --- a/tests/src/Model/Post/MediaTest.php +++ b/tests/src/Model/Post/MediaTest.php @@ -7,9 +7,9 @@ namespace Friendica\Test\src\Model\Post; -use Friendica\Test\MockedTest; +use Friendica\Test\MockedTestCase; -class MediaTest extends MockedTest +class MediaTest extends MockedTestCase { /** * Test the api_get_attachments() function. diff --git a/tests/src/Model/User/CookieTest.php b/tests/src/Model/User/CookieTest.php index 3d93e1fa37..3c56a89668 100644 --- a/tests/src/Model/User/CookieTest.php +++ b/tests/src/Model/User/CookieTest.php @@ -11,11 +11,11 @@ use Friendica\App\BaseURL; use Friendica\App\Request; use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\Model\User\Cookie; -use Friendica\Test\MockedTest; +use Friendica\Test\MockedTestCase; use Friendica\Test\Util\StaticCookie; use Mockery\MockInterface; -class CookieTest extends MockedTest +class CookieTest extends MockedTestCase { /** @var MockInterface|IManageConfigValues */ private $config; diff --git a/tests/src/Model/UserTest.php b/tests/src/Model/UserTest.php index 3bdd6c403e..f58f34995f 100644 --- a/tests/src/Model/UserTest.php +++ b/tests/src/Model/UserTest.php @@ -11,10 +11,10 @@ use Dice\Dice; use Friendica\Database\Database; use Friendica\DI; use Friendica\Model\User; -use Friendica\Test\MockedTest; +use Friendica\Test\MockedTestCase; use Mockery\MockInterface; -class UserTest extends MockedTest +class UserTest extends MockedTestCase { private $parent; private $child; diff --git a/tests/src/Moderation/Factory/ReportTest.php b/tests/src/Moderation/Factory/ReportTest.php index 46b9275d83..d488648e92 100644 --- a/tests/src/Moderation/Factory/ReportTest.php +++ b/tests/src/Moderation/Factory/ReportTest.php @@ -10,13 +10,13 @@ namespace Friendica\Test\src\Moderation\Factory; use Friendica\Moderation\Collection; use Friendica\Moderation\Factory; use Friendica\Moderation\Entity; -use Friendica\Test\MockedTest; +use Friendica\Test\MockedTestCase; use Friendica\Util\Clock\FrozenClock; use Friendica\Util\DateTimeFormat; use Psr\Clock\ClockInterface; use Psr\Log\NullLogger; -class ReportTest extends MockedTest +class ReportTest extends MockedTestCase { public function dataCreateFromTableRow(): array { diff --git a/tests/src/Module/Api/ApiResponseTest.php b/tests/src/Module/Api/ApiResponseTest.php index 2133ab487c..23cc4bf702 100644 --- a/tests/src/Module/Api/ApiResponseTest.php +++ b/tests/src/Module/Api/ApiResponseTest.php @@ -12,10 +12,10 @@ use Friendica\App\BaseURL; use Friendica\Core\L10n; use Friendica\Factory\Api\Twitter\User; use Friendica\Module\Api\ApiResponse; -use Friendica\Test\MockedTest; +use Friendica\Test\MockedTestCase; use Psr\Log\NullLogger; -class ApiResponseTest extends MockedTest +class ApiResponseTest extends MockedTestCase { public function testErrorWithJson() { diff --git a/tests/src/Module/Api/Friendica/DirectMessages/SearchTest.php b/tests/src/Module/Api/Friendica/DirectMessages/SearchTest.php index c312eccd7d..6b26b50ec3 100644 --- a/tests/src/Module/Api/Friendica/DirectMessages/SearchTest.php +++ b/tests/src/Module/Api/Friendica/DirectMessages/SearchTest.php @@ -7,14 +7,13 @@ namespace Friendica\Test\src\Module\Api\Friendica\DirectMessages; -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..ab4cdbc7dd 100644 --- a/tests/src/Module/Api/Mastodon/Accounts/VerifyCredentialsTest.php +++ b/tests/src/Module/Api/Mastodon/Accounts/VerifyCredentialsTest.php @@ -7,12 +7,11 @@ 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..89cd7da640 100644 --- a/tests/src/Module/Api/Twitter/Account/RateLimitStatusTest.php +++ b/tests/src/Module/Api/Twitter/Account/RateLimitStatusTest.php @@ -7,13 +7,12 @@ namespace Friendica\Test\src\Module\Api\Twitter\Account; -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..0b5577ccd6 100644 --- a/tests/src/Module/Api/Twitter/Blocks/ListsTest.php +++ b/tests/src/Module/Api/Twitter/Blocks/ListsTest.php @@ -7,12 +7,11 @@ 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/ContactEndpointTest.php b/tests/src/Module/Api/Twitter/ContactEndpointTest.php index 3f4c463c5b..bdb5b96d3c 100644 --- a/tests/src/Module/Api/Twitter/ContactEndpointTest.php +++ b/tests/src/Module/Api/Twitter/ContactEndpointTest.php @@ -12,9 +12,9 @@ use Friendica\Module\Api\Twitter\ContactEndpoint; use Friendica\Network\HTTPException\InternalServerErrorException; use Friendica\Network\HTTPException\NotFoundException; use Friendica\Object\Api\Twitter\User; -use Friendica\Test\FixtureTest; +use Friendica\Test\FixtureTestCase; -class ContactEndpointTest extends FixtureTest +class ContactEndpointTest extends FixtureTestCase { public function testIds() { 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..cec35927fa 100644 --- a/tests/src/Module/Api/Twitter/DirectMessages/ConversationTest.php +++ b/tests/src/Module/Api/Twitter/DirectMessages/ConversationTest.php @@ -7,13 +7,12 @@ namespace Friendica\Test\src\Module\Api\Twitter\DirectMessages; -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..a7e1861fc1 100644 --- a/tests/src/Module/Api/Twitter/DirectMessages/InboxTest.php +++ b/tests/src/Module/Api/Twitter/DirectMessages/InboxTest.php @@ -7,13 +7,12 @@ namespace Friendica\Test\src\Module\Api\Twitter\DirectMessages; -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..4e9de634b9 100644 --- a/tests/src/Module/Api/Twitter/DirectMessages/SentTest.php +++ b/tests/src/Module/Api/Twitter/DirectMessages/SentTest.php @@ -7,13 +7,12 @@ namespace Friendica\Test\src\Module\Api\Twitter\DirectMessages; -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..1999ffe93e 100644 --- a/tests/src/Module/Api/Twitter/FavoritesTest.php +++ b/tests/src/Module/Api/Twitter/FavoritesTest.php @@ -7,13 +7,12 @@ namespace Friendica\Test\src\Module\Api\Twitter; -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..63375393ad 100644 --- a/tests/src/Module/Api/Twitter/Followers/ListsTest.php +++ b/tests/src/Module/Api/Twitter/Followers/ListsTest.php @@ -7,12 +7,11 @@ 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..f80fb5cd3c 100644 --- a/tests/src/Module/Api/Twitter/Friends/ListsTest.php +++ b/tests/src/Module/Api/Twitter/Friends/ListsTest.php @@ -7,12 +7,11 @@ 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..305046edd1 100644 --- a/tests/src/Module/Api/Twitter/Friendships/IncomingTest.php +++ b/tests/src/Module/Api/Twitter/Friendships/IncomingTest.php @@ -7,12 +7,11 @@ 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..b934b6ef15 100644 --- a/tests/src/Module/Api/Twitter/Lists/StatusesTest.php +++ b/tests/src/Module/Api/Twitter/Lists/StatusesTest.php @@ -7,13 +7,12 @@ namespace Friendica\Test\src\Module\Api\Twitter\Lists; -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..c27ce9ac09 100644 --- a/tests/src/Module/Api/Twitter/Statuses/MentionsTest.php +++ b/tests/src/Module/Api/Twitter/Statuses/MentionsTest.php @@ -7,13 +7,12 @@ namespace Friendica\Test\src\Module\Api\Twitter\Statuses; -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..9047f94683 100644 --- a/tests/src/Module/Api/Twitter/Statuses/NetworkPublicTimelineTest.php +++ b/tests/src/Module/Api/Twitter/Statuses/NetworkPublicTimelineTest.php @@ -7,13 +7,12 @@ namespace Friendica\Test\src\Module\Api\Twitter\Statuses; -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..b4b83d0db0 100644 --- a/tests/src/Module/Api/Twitter/Statuses/ShowTest.php +++ b/tests/src/Module/Api/Twitter/Statuses/ShowTest.php @@ -7,13 +7,12 @@ namespace Friendica\Test\src\Module\Api\Twitter\Statuses; -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..a9532572ee 100644 --- a/tests/src/Module/Api/Twitter/Statuses/UserTimelineTest.php +++ b/tests/src/Module/Api/Twitter/Statuses/UserTimelineTest.php @@ -7,13 +7,12 @@ namespace Friendica\Test\src\Module\Api\Twitter\Statuses; -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..3ffe248b17 100644 --- a/tests/src/Module/Api/Twitter/Users/LookupTest.php +++ b/tests/src/Module/Api/Twitter/Users/LookupTest.php @@ -7,13 +7,12 @@ namespace Friendica\Test\src\Module\Api\Twitter\Users; -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..9ee4c06380 100644 --- a/tests/src/Module/Api/Twitter/Users/SearchTest.php +++ b/tests/src/Module/Api/Twitter/Users/SearchTest.php @@ -7,14 +7,13 @@ namespace Friendica\Test\src\Module\Api\Twitter\Users; -use Friendica\App\Router; 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..267954de76 100644 --- a/tests/src/Module/Api/Twitter/Users/ShowTest.php +++ b/tests/src/Module/Api/Twitter/Users/ShowTest.php @@ -7,13 +7,12 @@ namespace Friendica\Test\src\Module\Api\Twitter\Users; -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/Module/NodeInfoTest.php b/tests/src/Module/NodeInfoTest.php index c0f23a6f15..21af637508 100644 --- a/tests/src/Module/NodeInfoTest.php +++ b/tests/src/Module/NodeInfoTest.php @@ -14,10 +14,10 @@ use Friendica\Module\NodeInfo110; use Friendica\Module\NodeInfo120; use Friendica\Module\NodeInfo210; use Friendica\Module\Special\HTTPException; -use Friendica\Test\FixtureTest; +use Friendica\Test\FixtureTestCase; use Mockery\MockInterface; -class NodeInfoTest extends FixtureTest +class NodeInfoTest extends FixtureTestCase { /** @var MockInterface|HTTPException */ protected $httpExceptionMock; diff --git a/tests/src/Module/Special/OptionsTest.php b/tests/src/Module/Special/OptionsTest.php index 4a8ced5458..eb6e40e08a 100644 --- a/tests/src/Module/Special/OptionsTest.php +++ b/tests/src/Module/Special/OptionsTest.php @@ -12,10 +12,10 @@ use Friendica\Capabilities\ICanCreateResponses; use Friendica\DI; use Friendica\Module\Special\HTTPException; use Friendica\Module\Special\Options; -use Friendica\Test\FixtureTest; +use Friendica\Test\FixtureTestCase; use Mockery\MockInterface; -class OptionsTest extends FixtureTest +class OptionsTest extends FixtureTestCase { /** @var MockInterface|HTTPException */ protected $httpExceptionMock; diff --git a/tests/src/Navigation/Notifications/Entity/NotifyTest.php b/tests/src/Navigation/Notifications/Entity/NotifyTest.php index a1017fd5ad..ff88e36b90 100644 --- a/tests/src/Navigation/Notifications/Entity/NotifyTest.php +++ b/tests/src/Navigation/Notifications/Entity/NotifyTest.php @@ -8,9 +8,9 @@ namespace Friendica\Test\src\Navigation\Notifications\Entity; use Friendica\Navigation\Notifications\Entity\Notify; -use Friendica\Test\FixtureTest; +use Friendica\Test\FixtureTestCase; -class NotifyTest extends FixtureTest +class NotifyTest extends FixtureTestCase { public function dataFormatNotify(): array { diff --git a/tests/src/Network/HTTPClient/Client/HTTPClientTest.php b/tests/src/Network/HTTPClient/Client/HTTPClientTest.php index 9a488f0d1e..bd15a7120d 100644 --- a/tests/src/Network/HTTPClient/Client/HTTPClientTest.php +++ b/tests/src/Network/HTTPClient/Client/HTTPClientTest.php @@ -9,11 +9,11 @@ namespace Friendica\Test\src\Network\HTTPClient\Client; use Friendica\DI; use Friendica\Test\DiceHttpMockHandlerTrait; -use Friendica\Test\MockedTest; +use Friendica\Test\MockedTestCase; use GuzzleHttp\Handler\MockHandler; use GuzzleHttp\Psr7\Response; -class HTTPClientTest extends MockedTest +class HTTPClientTest extends MockedTestCase { use DiceHttpMockHandlerTrait; diff --git a/tests/src/Network/ProbeTest.php b/tests/src/Network/ProbeTest.php index d5698e33bf..653cc0ca62 100644 --- a/tests/src/Network/ProbeTest.php +++ b/tests/src/Network/ProbeTest.php @@ -9,10 +9,10 @@ namespace Friendica\Test\src\Network; use Friendica\Network\Probe; use Friendica\Test\DiceHttpMockHandlerTrait; -use Friendica\Test\MockedTest; +use Friendica\Test\MockedTestCase; use GuzzleHttp\Middleware; -class ProbeTest extends MockedTest +class ProbeTest extends MockedTestCase { use DiceHttpMockHandlerTrait; diff --git a/tests/src/Profile/ProfileField/Entity/ProfileFieldTest.php b/tests/src/Profile/ProfileField/Entity/ProfileFieldTest.php index b8e5309421..e718eebf07 100644 --- a/tests/src/Profile/ProfileField/Entity/ProfileFieldTest.php +++ b/tests/src/Profile/ProfileField/Entity/ProfileFieldTest.php @@ -13,13 +13,13 @@ use Friendica\Profile\ProfileField\Exception\UnexpectedPermissionSetException; use Friendica\Profile\ProfileField\Factory\ProfileField as ProfileFieldFactory; use Friendica\Security\PermissionSet\Repository\PermissionSet as PermissionSetRepository; use Friendica\Security\PermissionSet\Factory\PermissionSet as PermissionSetFactory; -use Friendica\Test\MockedTest; +use Friendica\Test\MockedTestCase; use Friendica\Util\ACLFormatter; use Friendica\Util\DateTimeFormat; use Mockery\MockInterface; use Psr\Log\NullLogger; -class ProfileFieldTest extends MockedTest +class ProfileFieldTest extends MockedTestCase { /** @var MockInterface|PermissionSetRepository */ protected $permissionSetRepository; diff --git a/tests/src/Profile/ProfileField/Repository/ProfileFieldTest.php b/tests/src/Profile/ProfileField/Repository/ProfileFieldTest.php index b9eb50063e..2f5ab7bce8 100644 --- a/tests/src/Profile/ProfileField/Repository/ProfileFieldTest.php +++ b/tests/src/Profile/ProfileField/Repository/ProfileFieldTest.php @@ -14,10 +14,10 @@ use Friendica\Profile\ProfileField\Factory\ProfileField as ProfileFieldFactory; use Friendica\Security\PermissionSet\Repository\PermissionSet; use Friendica\Security\PermissionSet\Factory\PermissionSet as PermissionSetFactory; use Friendica\Security\PermissionSet\Repository\PermissionSet as PermissionSetRepository; -use Friendica\Test\FixtureTest; +use Friendica\Test\FixtureTestCase; use Friendica\DI; -class ProfileFieldTest extends FixtureTest +class ProfileFieldTest extends FixtureTestCase { /** @var ProfileFieldRepository */ private $depository; diff --git a/tests/src/Protocol/ActivityPub/TransmitterTest.php b/tests/src/Protocol/ActivityPub/TransmitterTest.php index 40146fe926..8b71aa130b 100644 --- a/tests/src/Protocol/ActivityPub/TransmitterTest.php +++ b/tests/src/Protocol/ActivityPub/TransmitterTest.php @@ -11,9 +11,9 @@ use Friendica\Core\Hook; use Friendica\DI; use Friendica\Model\Post; use Friendica\Protocol\ActivityPub\Transmitter; -use Friendica\Test\FixtureTest; +use Friendica\Test\FixtureTestCase; -class TransmitterTest extends FixtureTest +class TransmitterTest extends FixtureTestCase { protected function setUp(): void { diff --git a/tests/src/Protocol/ActivityTest.php b/tests/src/Protocol/ActivityTest.php index 59a650ea16..30359321cf 100644 --- a/tests/src/Protocol/ActivityTest.php +++ b/tests/src/Protocol/ActivityTest.php @@ -9,9 +9,9 @@ namespace Friendica\Test\src\Protocol; use Friendica\Protocol\Activity; use Friendica\Protocol\ActivityNamespace; -use Friendica\Test\MockedTest; +use Friendica\Test\MockedTestCase; -class ActivityTest extends MockedTest +class ActivityTest extends MockedTestCase { public function dataMatch() { 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. diff --git a/tests/src/Security/PermissionSet/Entity/PermissionSetTest.php b/tests/src/Security/PermissionSet/Entity/PermissionSetTest.php index 4ed62f2fc4..bb456d0445 100644 --- a/tests/src/Security/PermissionSet/Entity/PermissionSetTest.php +++ b/tests/src/Security/PermissionSet/Entity/PermissionSetTest.php @@ -8,9 +8,9 @@ namespace Friendica\Test\src\Security\PermissionSet\Entity; use Friendica\Security\PermissionSet\Entity\PermissionSet; -use Friendica\Test\MockedTest; +use Friendica\Test\MockedTestCase; -class PermissionSetTest extends MockedTest +class PermissionSetTest extends MockedTestCase { public function dateAllowedContacts() { diff --git a/tests/src/Security/PermissionSet/Factory/PermissionSetTest.php b/tests/src/Security/PermissionSet/Factory/PermissionSetTest.php index 8b4410217e..25ff93cbbd 100644 --- a/tests/src/Security/PermissionSet/Factory/PermissionSetTest.php +++ b/tests/src/Security/PermissionSet/Factory/PermissionSetTest.php @@ -8,11 +8,11 @@ namespace Friendica\Test\src\Security\PermissionSet\Factory; use Friendica\Security\PermissionSet\Factory\PermissionSet; -use Friendica\Test\MockedTest; +use Friendica\Test\MockedTestCase; use Friendica\Util\ACLFormatter; use Psr\Log\NullLogger; -class PermissionSetTest extends MockedTest +class PermissionSetTest extends MockedTestCase { /** @var PermissionSet */ protected $permissionSet; diff --git a/tests/src/Security/PermissionSet/Repository/PermissionSetTest.php b/tests/src/Security/PermissionSet/Repository/PermissionSetTest.php index 522f106a9f..d92789668d 100644 --- a/tests/src/Security/PermissionSet/Repository/PermissionSetTest.php +++ b/tests/src/Security/PermissionSet/Repository/PermissionSetTest.php @@ -13,10 +13,10 @@ use Friendica\Security\PermissionSet\Exception\PermissionSetNotFoundException; use Friendica\Security\PermissionSet\Repository\PermissionSet as PermissionSetRepository; use Friendica\Security\PermissionSet\Entity\PermissionSet; use Friendica\Security\PermissionSet\Factory\PermissionSet as PermissionSetFactory; -use Friendica\Test\FixtureTest; +use Friendica\Test\FixtureTestCase; use Friendica\DI; -class PermissionSetTest extends FixtureTest +class PermissionSetTest extends FixtureTestCase { /** @var PermissionSetRepository */ private $repository; diff --git a/tests/src/Security/TwoFactor/Factory/TrustedBrowserTest.php b/tests/src/Security/TwoFactor/Factory/TrustedBrowserTest.php index b03d14ca81..fdf2722367 100644 --- a/tests/src/Security/TwoFactor/Factory/TrustedBrowserTest.php +++ b/tests/src/Security/TwoFactor/Factory/TrustedBrowserTest.php @@ -8,12 +8,12 @@ namespace Friendica\Test\src\Security\TwoFactor\Factory; use Friendica\Security\TwoFactor\Factory\TrustedBrowser; -use Friendica\Test\MockedTest; +use Friendica\Test\MockedTestCase; use Friendica\Util\DateTimeFormat; use Friendica\Util\Strings; use Psr\Log\NullLogger; -class TrustedBrowserTest extends MockedTest +class TrustedBrowserTest extends MockedTestCase { public function testCreateFromTableRowSuccess() { diff --git a/tests/src/Security/TwoFactor/Model/TrustedBrowserTest.php b/tests/src/Security/TwoFactor/Model/TrustedBrowserTest.php index 486fca2c0f..08f12f562a 100644 --- a/tests/src/Security/TwoFactor/Model/TrustedBrowserTest.php +++ b/tests/src/Security/TwoFactor/Model/TrustedBrowserTest.php @@ -8,11 +8,11 @@ namespace Friendica\Test\src\Security\TwoFactor\Model; use Friendica\Security\TwoFactor\Model\TrustedBrowser; -use Friendica\Test\MockedTest; +use Friendica\Test\MockedTestCase; use Friendica\Util\DateTimeFormat; use Friendica\Util\Strings; -class TrustedBrowserTest extends MockedTest +class TrustedBrowserTest extends MockedTestCase { public function test__construct() { diff --git a/tests/src/Util/BasePathTest.php b/tests/src/Util/BasePathTest.php index 6e6eb58906..bbcaeb359b 100644 --- a/tests/src/Util/BasePathTest.php +++ b/tests/src/Util/BasePathTest.php @@ -7,10 +7,10 @@ namespace Friendica\Test\src\Util; -use Friendica\Test\MockedTest; +use Friendica\Test\MockedTestCase; use Friendica\Util\BasePath; -class BasePathTest extends MockedTest +class BasePathTest extends MockedTestCase { public function dataPaths() { diff --git a/tests/src/Util/DateTimeFormatTest.php b/tests/src/Util/DateTimeFormatTest.php index 5f5e1485fc..9137659ba8 100644 --- a/tests/src/Util/DateTimeFormatTest.php +++ b/tests/src/Util/DateTimeFormatTest.php @@ -7,10 +7,10 @@ namespace Friendica\Test\src\Util; -use Friendica\Test\MockedTest; +use Friendica\Test\MockedTestCase; use Friendica\Util\DateTimeFormat; -class DateTimeFormatTest extends MockedTest +class DateTimeFormatTest extends MockedTestCase { public function dataYearMonth() { diff --git a/tests/src/Util/EMailerTest.php b/tests/src/Util/EMailerTest.php index 5a892597f4..21c7fbabc2 100644 --- a/tests/src/Util/EMailerTest.php +++ b/tests/src/Util/EMailerTest.php @@ -12,7 +12,7 @@ use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\Core\L10n; use Friendica\Core\PConfig\Capability\IManagePersonalConfigValues; use Friendica\Object\EMail\IEmail; -use Friendica\Test\MockedTest; +use Friendica\Test\MockedTestCase; use Friendica\Test\Util\EmailerSpy; use Friendica\Test\Util\HookMockTrait; use Friendica\Test\Util\SampleMailBuilder; @@ -26,7 +26,7 @@ use Psr\Log\NullLogger; * @runTestsInSeparateProcesses * @preserveGlobalState disabled */ -class EMailerTest extends MockedTest +class EMailerTest extends MockedTestCase { use VFSTrait; use HookMockTrait; diff --git a/tests/src/Util/Emailer/MailBuilderTest.php b/tests/src/Util/Emailer/MailBuilderTest.php index 0c432e8930..36095a5d60 100644 --- a/tests/src/Util/Emailer/MailBuilderTest.php +++ b/tests/src/Util/Emailer/MailBuilderTest.php @@ -12,7 +12,7 @@ use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\Core\L10n; use Friendica\Network\HTTPException\UnprocessableEntityException; use Friendica\Object\EMail\IEmail; -use Friendica\Test\MockedTest; +use Friendica\Test\MockedTestCase; use Friendica\Test\Util\SampleMailBuilder; use Friendica\Test\Util\VFSTrait; use Friendica\Util\EMailer\MailBuilder; @@ -23,7 +23,7 @@ use Psr\Log\NullLogger; * This class tests the "MailBuilder" (@see MailBuilder ) * Since it's an abstract class and every extended class of it has dependencies, we use a "SampleMailBuilder" (@see SampleMailBuilder ) to make this class work */ -class MailBuilderTest extends MockedTest +class MailBuilderTest extends MockedTestCase { use VFSTrait; diff --git a/tests/src/Util/Emailer/SystemMailBuilderTest.php b/tests/src/Util/Emailer/SystemMailBuilderTest.php index 380c8f523a..400f6b66c2 100644 --- a/tests/src/Util/Emailer/SystemMailBuilderTest.php +++ b/tests/src/Util/Emailer/SystemMailBuilderTest.php @@ -10,13 +10,13 @@ namespace Friendica\Test\src\Util\Emailer; use Friendica\App\BaseURL; use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\Core\L10n; -use Friendica\Test\MockedTest; +use Friendica\Test\MockedTestCase; use Friendica\Test\Util\VFSTrait; use Friendica\Util\EMailer\MailBuilder; use Friendica\Util\EMailer\SystemMailBuilder; use Psr\Log\NullLogger; -class SystemMailBuilderTest extends MockedTest +class SystemMailBuilderTest extends MockedTestCase { use VFSTrait; diff --git a/tests/src/Util/HTTPInputDataTest.php b/tests/src/Util/HTTPInputDataTest.php index cff535e99d..680f24ae2e 100644 --- a/tests/src/Util/HTTPInputDataTest.php +++ b/tests/src/Util/HTTPInputDataTest.php @@ -7,16 +7,15 @@ namespace Friendica\Test\src\Util; -use Friendica\Test\MockedTest; +use Friendica\Test\MockedTestCase; use Friendica\Test\Util\HTTPInputDataDouble; -use Friendica\Util\HTTPInputData; /** * Testing HTTPInputData * * @see HTTPInputData */ -class HTTPInputDataTest extends MockedTest +class HTTPInputDataTest extends MockedTestCase { /** * Returns the data stream for the unit test diff --git a/tests/src/Util/ImagesTest.php b/tests/src/Util/ImagesTest.php index de8d317da6..b8449d3495 100644 --- a/tests/src/Util/ImagesTest.php +++ b/tests/src/Util/ImagesTest.php @@ -9,12 +9,12 @@ namespace Friendica\Test\src\Util; use DMS\PHPUnitExtensions\ArraySubset\ArraySubsetAsserts; use Friendica\Test\DiceHttpMockHandlerTrait; -use Friendica\Test\MockedTest; +use Friendica\Test\MockedTestCase; use Friendica\Util\Images; use GuzzleHttp\Handler\MockHandler; use GuzzleHttp\Psr7\Response; -class ImagesTest extends MockedTest +class ImagesTest extends MockedTestCase { use DiceHttpMockHandlerTrait; use ArraySubsetAsserts; diff --git a/tests/src/Util/ProfilerTest.php b/tests/src/Util/ProfilerTest.php index 26870e1ea7..6e190175cb 100644 --- a/tests/src/Util/ProfilerTest.php +++ b/tests/src/Util/ProfilerTest.php @@ -8,12 +8,12 @@ namespace Friendica\Test\src\Util; use Friendica\Core\Config\Capability\IManageConfigValues; -use Friendica\Test\MockedTest; +use Friendica\Test\MockedTestCase; use Friendica\Util\Profiler; use Mockery\MockInterface; use Psr\Log\LoggerInterface; -class ProfilerTest extends MockedTest +class ProfilerTest extends MockedTestCase { /** * @var LoggerInterface|MockInterface diff --git a/tests/src/Util/Router/FriendicaGroupCountBasedTest.php b/tests/src/Util/Router/FriendicaGroupCountBasedTest.php index 27494d1191..d2440268d5 100644 --- a/tests/src/Util/Router/FriendicaGroupCountBasedTest.php +++ b/tests/src/Util/Router/FriendicaGroupCountBasedTest.php @@ -11,10 +11,10 @@ use FastRoute\DataGenerator\GroupCountBased; use FastRoute\RouteCollector; use FastRoute\RouteParser\Std; use Friendica\Module\Special\Options; -use Friendica\Test\MockedTest; +use Friendica\Test\MockedTestCase; use Friendica\Util\Router\FriendicaGroupCountBased; -class FriendicaGroupCountBasedTest extends MockedTest +class FriendicaGroupCountBasedTest extends MockedTestCase { public function testOptions() {