Rename MockedTest to MockedTestCase

This commit is contained in:
Art4 2024-12-11 22:45:17 +00:00
parent 9a28eee477
commit ee579280c7
51 changed files with 99 additions and 117 deletions

View file

@ -10,7 +10,7 @@ namespace Friendica\Test;
/** /**
* Abstract class used by tests that need a database. * Abstract class used by tests that need a database.
*/ */
abstract class DatabaseTest extends MockedTest abstract class DatabaseTest extends MockedTestCase
{ {
use DatabaseTestTrait; use DatabaseTestTrait;

View file

@ -7,24 +7,10 @@
namespace Friendica\Test; namespace Friendica\Test;
use Dice\Dice;
use Friendica\App\Arguments;
use Friendica\App\Router;
use Friendica\Core\Config\Capability\IManageConfigValues;
use Friendica\Core\Config\Factory\Config;
use Friendica\Core\Config\Util\ConfigFileManager;
use Friendica\Core\Session\Capability\IHandleSessions;
use Friendica\Core\Session\Type\Memory;
use Friendica\Database\Database;
use Friendica\Database\DBStructure;
use Friendica\DI;
use Friendica\Test\Util\Database\StaticDatabase;
use Friendica\Test\Util\VFSTrait;
/** /**
* Parent class for test cases requiring fixtures * Parent class for test cases requiring fixtures
*/ */
abstract class FixtureTest extends MockedTest abstract class FixtureTest extends MockedTestCase
{ {
use FixtureTestTrait; use FixtureTestTrait;

View file

@ -12,7 +12,7 @@ use PHPUnit\Framework\TestCase;
/** /**
* This class verifies each mock after each call * This class verifies each mock after each call
*/ */
abstract class MockedTest extends TestCase abstract class MockedTestCase extends TestCase
{ {
protected function tearDown() : void protected function tearDown() : void
{ {

View file

@ -11,10 +11,10 @@ use Friendica\App\BaseURL;
use Friendica\Core\Config\Model\ReadOnlyFileConfig; use Friendica\Core\Config\Model\ReadOnlyFileConfig;
use Friendica\Core\Config\ValueObject\Cache; use Friendica\Core\Config\ValueObject\Cache;
use Friendica\Network\HTTPException\InternalServerErrorException; use Friendica\Network\HTTPException\InternalServerErrorException;
use Friendica\Test\MockedTest; use Friendica\Test\MockedTestCase;
use Psr\Log\NullLogger; use Psr\Log\NullLogger;
class BaseURLTest extends MockedTest class BaseURLTest extends MockedTestCase
{ {
public function dataSystemUrl(): array public function dataSystemUrl(): array
{ {

View file

@ -12,13 +12,13 @@ use Friendica\App\Arguments;
use Friendica\App\Mode; use Friendica\App\Mode;
use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\Core\Config\Capability\IManageConfigValues;
use Friendica\Database\Database; use Friendica\Database\Database;
use Friendica\Test\MockedTest; use Friendica\Test\MockedTestCase;
use Friendica\Test\Util\VFSTrait; use Friendica\Test\Util\VFSTrait;
use Friendica\Util\BasePath; use Friendica\Util\BasePath;
use Mockery; use Mockery;
use Mockery\MockInterface; use Mockery\MockInterface;
class ModeTest extends MockedTest class ModeTest extends MockedTestCase
{ {
use VFSTrait; use VFSTrait;

View file

@ -9,9 +9,9 @@ namespace Friendica\Test\src\App;
use Friendica\App\Request; use Friendica\App\Request;
use Friendica\Core\Config\Capability\IManageConfigValues; 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 public function dataServerArray(): array
{ {

View file

@ -7,11 +7,11 @@
namespace Friendica\Test\src; namespace Friendica\Test\src;
use Friendica\Test\MockedTest; use Friendica\Test\MockedTestCase;
use Friendica\Test\Util\CollectionDouble; use Friendica\Test\Util\CollectionDouble;
use Friendica\Test\Util\EntityDouble; use Friendica\Test\Util\EntityDouble;
class CollectionTest extends MockedTest class CollectionTest extends MockedTestCase
{ {
/** /**
* Test if the BaseCollection::column() works as expected * Test if the BaseCollection::column() works as expected

View file

@ -8,10 +8,10 @@
namespace Friendica\Test\src\Console; namespace Friendica\Test\src\Console;
use Asika\SimpleConsole\Console; use Asika\SimpleConsole\Console;
use Friendica\Test\MockedTest; use Friendica\Test\MockedTestCase;
use Friendica\Test\Util\Intercept; use Friendica\Test\Util\Intercept;
abstract class ConsoleTest extends MockedTest abstract class ConsoleTest extends MockedTestCase
{ {
/** /**
* @var array The default argv for a Console Instance * @var array The default argv for a Console Instance

View file

@ -9,10 +9,10 @@ namespace Friendica\Test\src\Contact\FriendSuggest\Factory;
use Friendica\Contact\FriendSuggest\Factory\FriendSuggest; use Friendica\Contact\FriendSuggest\Factory\FriendSuggest;
use Friendica\Contact\FriendSuggest\Entity; use Friendica\Contact\FriendSuggest\Entity;
use Friendica\Test\MockedTest; use Friendica\Test\MockedTestCase;
use Psr\Log\NullLogger; use Psr\Log\NullLogger;
class FriendSuggestTest extends MockedTest class FriendSuggestTest extends MockedTestCase
{ {
public function dataCreate() public function dataCreate()
{ {

View file

@ -7,9 +7,9 @@
namespace Friendica\Test\src\Content; namespace Friendica\Test\src\Content;
use Friendica\Test\MockedTest; use Friendica\Test\MockedTestCase;
class ItemTest extends MockedTest class ItemTest extends MockedTestCase
{ {
/** /**
* @doesNotPerformAssertions * @doesNotPerformAssertions

View file

@ -8,9 +8,9 @@
namespace Friendica\Test\src\Content\Text\BBCode; namespace Friendica\Test\src\Content\Text\BBCode;
use Friendica\Content\Text\BBCode\Video; 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() public function dataVideo()
{ {

View file

@ -10,11 +10,11 @@ namespace Friendica\Test\src\Core\Addon\Model;
use Friendica\Core\Addon\Exception\AddonInvalidConfigFileException; use Friendica\Core\Addon\Exception\AddonInvalidConfigFileException;
use Friendica\Core\Addon\Model\AddonLoader; use Friendica\Core\Addon\Model\AddonLoader;
use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\Core\Config\Capability\IManageConfigValues;
use Friendica\Test\MockedTest; use Friendica\Test\MockedTestCase;
use Friendica\Test\Util\VFSTrait; use Friendica\Test\Util\VFSTrait;
use org\bovigo\vfs\vfsStream; use org\bovigo\vfs\vfsStream;
class AddonLoaderTest extends MockedTest class AddonLoaderTest extends MockedTestCase
{ {
use VFSTrait; use VFSTrait;

View file

@ -8,12 +8,10 @@
namespace Friendica\Test\src\Core\Cache; namespace Friendica\Test\src\Core\Cache;
use Friendica\Core\Cache\Capability\ICanCache; use Friendica\Core\Cache\Capability\ICanCache;
use Friendica\Core\Cache\Capability\ICanCacheInMemory; use Friendica\Test\MockedTestCase;
use Friendica\Core\Cache\Type\AbstractCache;
use Friendica\Test\MockedTest;
use Friendica\Util\PidFile; use Friendica\Util\PidFile;
abstract class CacheTest extends MockedTest abstract class CacheTest extends MockedTestCase
{ {
/** /**
* @var int Start time of the mock (used for time operations) * @var int Start time of the mock (used for time operations)

View file

@ -8,11 +8,11 @@
namespace Friendica\Test\src\Core\Config\Cache; namespace Friendica\Test\src\Core\Config\Cache;
use Friendica\Core\Config\ValueObject\Cache; use Friendica\Core\Config\ValueObject\Cache;
use Friendica\Test\MockedTest; use Friendica\Test\MockedTestCase;
use ParagonIE\HiddenString\HiddenString; use ParagonIE\HiddenString\HiddenString;
use stdClass; use stdClass;
class CacheTest extends MockedTest class CacheTest extends MockedTestCase
{ {
public function dataTests() public function dataTests()
{ {

View file

@ -9,12 +9,12 @@ namespace Friendica\Test\src\Core\Config\Cache;
use Friendica\Core\Config\Factory\Config; use Friendica\Core\Config\Factory\Config;
use Friendica\Core\Config\ValueObject\Cache; use Friendica\Core\Config\ValueObject\Cache;
use Friendica\Test\MockedTest; use Friendica\Test\MockedTestCase;
use Friendica\Test\Util\VFSTrait; use Friendica\Test\Util\VFSTrait;
use Friendica\Core\Config\Util\ConfigFileManager; use Friendica\Core\Config\Util\ConfigFileManager;
use org\bovigo\vfs\vfsStream; use org\bovigo\vfs\vfsStream;
class ConfigFileManagerTest extends MockedTest class ConfigFileManagerTest extends MockedTestCase
{ {
use VFSTrait; use VFSTrait;

View file

@ -12,13 +12,13 @@ use Friendica\Core\Hooks\Exceptions\HookInstanceException;
use Friendica\Core\Hooks\Exceptions\HookRegisterArgumentException; use Friendica\Core\Hooks\Exceptions\HookRegisterArgumentException;
use Friendica\Core\Hooks\Model\DiceInstanceManager; use Friendica\Core\Hooks\Model\DiceInstanceManager;
use Friendica\Core\Hooks\Util\StrategiesFileManager; 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\FakeInstance;
use Friendica\Test\Util\Hooks\InstanceMocks\FakeInstanceDecorator; use Friendica\Test\Util\Hooks\InstanceMocks\FakeInstanceDecorator;
use Friendica\Test\Util\Hooks\InstanceMocks\IAmADecoratedInterface; use Friendica\Test\Util\Hooks\InstanceMocks\IAmADecoratedInterface;
use Mockery\MockInterface; use Mockery\MockInterface;
class InstanceManagerTest extends MockedTest class InstanceManagerTest extends MockedTestCase
{ {
/** @var StrategiesFileManager|MockInterface */ /** @var StrategiesFileManager|MockInterface */
protected $hookFileManager; protected $hookFileManager;

View file

@ -11,13 +11,13 @@ use Friendica\Core\Addon\Capability\ICanLoadAddons;
use Friendica\Core\Hooks\Capability\ICanRegisterStrategies; use Friendica\Core\Hooks\Capability\ICanRegisterStrategies;
use Friendica\Core\Hooks\Exceptions\HookConfigException; use Friendica\Core\Hooks\Exceptions\HookConfigException;
use Friendica\Core\Hooks\Util\StrategiesFileManager; use Friendica\Core\Hooks\Util\StrategiesFileManager;
use Friendica\Test\MockedTest; use Friendica\Test\MockedTestCase;
use Friendica\Test\Util\VFSTrait; use Friendica\Test\Util\VFSTrait;
use org\bovigo\vfs\vfsStream; use org\bovigo\vfs\vfsStream;
use Psr\Log\LoggerInterface; use Psr\Log\LoggerInterface;
use Psr\Log\NullLogger; use Psr\Log\NullLogger;
class StrategiesFileManagerTest extends MockedTest class StrategiesFileManagerTest extends MockedTestCase
{ {
use VFSTrait; use VFSTrait;

View file

@ -15,13 +15,13 @@ use Friendica\Core\L10n;
use Friendica\DI; use Friendica\DI;
use Friendica\Network\HTTPClient\Capability\ICanHandleHttpResponses; use Friendica\Network\HTTPClient\Capability\ICanHandleHttpResponses;
use Friendica\Network\HTTPClient\Capability\ICanSendHttpRequests; use Friendica\Network\HTTPClient\Capability\ICanSendHttpRequests;
use Friendica\Test\MockedTest; use Friendica\Test\MockedTestCase;
use Friendica\Test\Util\VFSTrait; use Friendica\Test\Util\VFSTrait;
use Mockery; use Mockery;
use Mockery\MockInterface; use Mockery\MockInterface;
use phpmock\phpunit\PHPMock; use phpmock\phpunit\PHPMock;
class InstallerTest extends MockedTest class InstallerTest extends MockedTestCase
{ {
use VFSTrait; use VFSTrait;
use ArraySubsetAsserts; use ArraySubsetAsserts;

View file

@ -8,9 +8,9 @@
namespace Friendica\Test\src\Core\KeyValueStorage; namespace Friendica\Test\src\Core\KeyValueStorage;
use Friendica\Core\KeyValueStorage\Capability\IManageKeyValuePairs; use Friendica\Core\KeyValueStorage\Capability\IManageKeyValuePairs;
use Friendica\Test\MockedTest; use Friendica\Test\MockedTestCase;
abstract class KeyValueStorageTest extends MockedTest abstract class KeyValueStorageTest extends MockedTestCase
{ {
abstract public function getInstance(): IManageKeyValuePairs; abstract public function getInstance(): IManageKeyValuePairs;

View file

@ -8,9 +8,9 @@
namespace Friendica\Test\src\Core; namespace Friendica\Test\src\Core;
use Friendica\Core\L10n; use Friendica\Core\L10n;
use Friendica\Test\MockedTest; use Friendica\Test\MockedTestCase;
class L10nTest extends MockedTest class L10nTest extends MockedTestCase
{ {
public function dataDetectLanguage() public function dataDetectLanguage()
{ {

View file

@ -8,9 +8,9 @@
namespace Friendica\Test\src\Core\Lock; namespace Friendica\Test\src\Core\Lock;
use Friendica\Core\Lock\Capability\ICanLock; use Friendica\Core\Lock\Capability\ICanLock;
use Friendica\Test\MockedTest; use Friendica\Test\MockedTestCase;
abstract class LockTest extends MockedTest abstract class LockTest extends MockedTestCase
{ {
/** /**
* @var int Start time of the mock (used for time operations) * @var int Start time of the mock (used for time operations)

View file

@ -8,13 +8,13 @@
namespace Friendica\Test\src\Core\Logger; namespace Friendica\Test\src\Core\Logger;
use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\Core\Config\Capability\IManageConfigValues;
use Friendica\Test\MockedTest;
use Friendica\Core\Logger\Util\Introspection; use Friendica\Core\Logger\Util\Introspection;
use Friendica\Test\MockedTestCase;
use Mockery\MockInterface; use Mockery\MockInterface;
use Psr\Log\LoggerInterface; use Psr\Log\LoggerInterface;
use Psr\Log\LogLevel; use Psr\Log\LogLevel;
abstract class AbstractLoggerTest extends MockedTest abstract class AbstractLoggerTest extends MockedTestCase
{ {
use LoggerDataTrait; use LoggerDataTrait;

View file

@ -7,14 +7,14 @@
namespace Friendica\Test\src\Core\Logger; namespace Friendica\Test\src\Core\Logger;
use Friendica\Test\MockedTest;
use Friendica\Core\Logger\Type\ProfilerLogger; use Friendica\Core\Logger\Type\ProfilerLogger;
use Friendica\Test\MockedTestCase;
use Friendica\Util\Profiler; use Friendica\Util\Profiler;
use Mockery\MockInterface; use Mockery\MockInterface;
use Psr\Log\LoggerInterface; use Psr\Log\LoggerInterface;
use Psr\Log\LogLevel; use Psr\Log\LogLevel;
class ProfilerLoggerTest extends MockedTest class ProfilerLoggerTest extends MockedTestCase
{ {
use LoggerDataTrait; use LoggerDataTrait;

View file

@ -8,10 +8,10 @@
namespace Friendica\Test\src\Core\Logger; namespace Friendica\Test\src\Core\Logger;
use Friendica\Core\Logger\Type\WorkerLogger; use Friendica\Core\Logger\Type\WorkerLogger;
use Friendica\Test\MockedTest; use Friendica\Test\MockedTestCase;
use Psr\Log\LoggerInterface; use Psr\Log\LoggerInterface;
class WorkerLoggerTest extends MockedTest class WorkerLoggerTest extends MockedTestCase
{ {
private function assertUid($uid) private function assertUid($uid)
{ {

View file

@ -7,10 +7,9 @@
namespace Friendica\Test\src\Core\PConfig\Cache; namespace Friendica\Test\src\Core\PConfig\Cache;
use Friendica\Core\PConfig\Cache; use Friendica\Test\MockedTestCase;
use Friendica\Test\MockedTest;
class CacheTest extends MockedTest class CacheTest extends MockedTestCase
{ {
public function dataTests() public function dataTests()
{ {

View file

@ -11,11 +11,11 @@ use DMS\PHPUnitExtensions\ArraySubset\ArraySubsetAsserts;
use Friendica\Core\PConfig\Type\AbstractPConfigValues; use Friendica\Core\PConfig\Type\AbstractPConfigValues;
use Friendica\Core\PConfig\Repository\PConfig as PConfigModel; use Friendica\Core\PConfig\Repository\PConfig as PConfigModel;
use Friendica\Core\PConfig\ValueObject\Cache; use Friendica\Core\PConfig\ValueObject\Cache;
use Friendica\Test\MockedTest; use Friendica\Test\MockedTestCase;
use Mockery; use Mockery;
use Mockery\MockInterface; use Mockery\MockInterface;
abstract class PConfigTest extends MockedTest abstract class PConfigTest extends MockedTestCase
{ {
use ArraySubsetAsserts; use ArraySubsetAsserts;

View file

@ -9,9 +9,9 @@ namespace Friendica\Test\src\Core\Session;
use Friendica\Core\Session\Model\UserSession; use Friendica\Core\Session\Model\UserSession;
use Friendica\Core\Session\Type\ArraySession; 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() public function dataLocalUserId()
{ {

View file

@ -8,9 +8,9 @@
namespace Friendica\Test\src\Core\Storage; namespace Friendica\Test\src\Core\Storage;
use Friendica\Core\Storage\Capability\ICanConfigureStorage; use Friendica\Core\Storage\Capability\ICanConfigureStorage;
use Friendica\Test\MockedTest; use Friendica\Test\MockedTestCase;
abstract class StorageConfigTest extends MockedTest abstract class StorageConfigTest extends MockedTestCase
{ {
/** @return ICanConfigureStorage */ /** @return ICanConfigureStorage */
abstract protected function getInstance(); abstract protected function getInstance();

View file

@ -10,9 +10,9 @@ namespace Friendica\Test\src\Core\Storage;
use Friendica\Core\Storage\Capability\ICanReadFromStorage; use Friendica\Core\Storage\Capability\ICanReadFromStorage;
use Friendica\Core\Storage\Capability\ICanWriteToStorage; use Friendica\Core\Storage\Capability\ICanWriteToStorage;
use Friendica\Core\Storage\Exception\ReferenceStorageException; use Friendica\Core\Storage\Exception\ReferenceStorageException;
use Friendica\Test\MockedTest; use Friendica\Test\MockedTestCase;
abstract class StorageTest extends MockedTest abstract class StorageTest extends MockedTestCase
{ {
/** @return ICanWriteToStorage */ /** @return ICanWriteToStorage */
abstract protected function getInstance(); abstract protected function getInstance();

View file

@ -7,9 +7,9 @@
namespace Friendica\Test\src\Model\Post; 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. * Test the api_get_attachments() function.

View file

@ -11,11 +11,11 @@ use Friendica\App\BaseURL;
use Friendica\App\Request; use Friendica\App\Request;
use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\Core\Config\Capability\IManageConfigValues;
use Friendica\Model\User\Cookie; use Friendica\Model\User\Cookie;
use Friendica\Test\MockedTest; use Friendica\Test\MockedTestCase;
use Friendica\Test\Util\StaticCookie; use Friendica\Test\Util\StaticCookie;
use Mockery\MockInterface; use Mockery\MockInterface;
class CookieTest extends MockedTest class CookieTest extends MockedTestCase
{ {
/** @var MockInterface|IManageConfigValues */ /** @var MockInterface|IManageConfigValues */
private $config; private $config;

View file

@ -11,10 +11,10 @@ use Dice\Dice;
use Friendica\Database\Database; use Friendica\Database\Database;
use Friendica\DI; use Friendica\DI;
use Friendica\Model\User; use Friendica\Model\User;
use Friendica\Test\MockedTest; use Friendica\Test\MockedTestCase;
use Mockery\MockInterface; use Mockery\MockInterface;
class UserTest extends MockedTest class UserTest extends MockedTestCase
{ {
private $parent; private $parent;
private $child; private $child;

View file

@ -10,13 +10,13 @@ namespace Friendica\Test\src\Moderation\Factory;
use Friendica\Moderation\Collection; use Friendica\Moderation\Collection;
use Friendica\Moderation\Factory; use Friendica\Moderation\Factory;
use Friendica\Moderation\Entity; use Friendica\Moderation\Entity;
use Friendica\Test\MockedTest; use Friendica\Test\MockedTestCase;
use Friendica\Util\Clock\FrozenClock; use Friendica\Util\Clock\FrozenClock;
use Friendica\Util\DateTimeFormat; use Friendica\Util\DateTimeFormat;
use Psr\Clock\ClockInterface; use Psr\Clock\ClockInterface;
use Psr\Log\NullLogger; use Psr\Log\NullLogger;
class ReportTest extends MockedTest class ReportTest extends MockedTestCase
{ {
public function dataCreateFromTableRow(): array public function dataCreateFromTableRow(): array
{ {

View file

@ -12,10 +12,10 @@ use Friendica\App\BaseURL;
use Friendica\Core\L10n; use Friendica\Core\L10n;
use Friendica\Factory\Api\Twitter\User; use Friendica\Factory\Api\Twitter\User;
use Friendica\Module\Api\ApiResponse; use Friendica\Module\Api\ApiResponse;
use Friendica\Test\MockedTest; use Friendica\Test\MockedTestCase;
use Psr\Log\NullLogger; use Psr\Log\NullLogger;
class ApiResponseTest extends MockedTest class ApiResponseTest extends MockedTestCase
{ {
public function testErrorWithJson() public function testErrorWithJson()
{ {

View file

@ -9,11 +9,11 @@ namespace Friendica\Test\src\Network\HTTPClient\Client;
use Friendica\DI; use Friendica\DI;
use Friendica\Test\DiceHttpMockHandlerTrait; use Friendica\Test\DiceHttpMockHandlerTrait;
use Friendica\Test\MockedTest; use Friendica\Test\MockedTestCase;
use GuzzleHttp\Handler\MockHandler; use GuzzleHttp\Handler\MockHandler;
use GuzzleHttp\Psr7\Response; use GuzzleHttp\Psr7\Response;
class HTTPClientTest extends MockedTest class HTTPClientTest extends MockedTestCase
{ {
use DiceHttpMockHandlerTrait; use DiceHttpMockHandlerTrait;

View file

@ -9,10 +9,10 @@ namespace Friendica\Test\src\Network;
use Friendica\Network\Probe; use Friendica\Network\Probe;
use Friendica\Test\DiceHttpMockHandlerTrait; use Friendica\Test\DiceHttpMockHandlerTrait;
use Friendica\Test\MockedTest; use Friendica\Test\MockedTestCase;
use GuzzleHttp\Middleware; use GuzzleHttp\Middleware;
class ProbeTest extends MockedTest class ProbeTest extends MockedTestCase
{ {
use DiceHttpMockHandlerTrait; use DiceHttpMockHandlerTrait;

View file

@ -13,13 +13,13 @@ use Friendica\Profile\ProfileField\Exception\UnexpectedPermissionSetException;
use Friendica\Profile\ProfileField\Factory\ProfileField as ProfileFieldFactory; use Friendica\Profile\ProfileField\Factory\ProfileField as ProfileFieldFactory;
use Friendica\Security\PermissionSet\Repository\PermissionSet as PermissionSetRepository; use Friendica\Security\PermissionSet\Repository\PermissionSet as PermissionSetRepository;
use Friendica\Security\PermissionSet\Factory\PermissionSet as PermissionSetFactory; use Friendica\Security\PermissionSet\Factory\PermissionSet as PermissionSetFactory;
use Friendica\Test\MockedTest; use Friendica\Test\MockedTestCase;
use Friendica\Util\ACLFormatter; use Friendica\Util\ACLFormatter;
use Friendica\Util\DateTimeFormat; use Friendica\Util\DateTimeFormat;
use Mockery\MockInterface; use Mockery\MockInterface;
use Psr\Log\NullLogger; use Psr\Log\NullLogger;
class ProfileFieldTest extends MockedTest class ProfileFieldTest extends MockedTestCase
{ {
/** @var MockInterface|PermissionSetRepository */ /** @var MockInterface|PermissionSetRepository */
protected $permissionSetRepository; protected $permissionSetRepository;

View file

@ -9,9 +9,9 @@ namespace Friendica\Test\src\Protocol;
use Friendica\Protocol\Activity; use Friendica\Protocol\Activity;
use Friendica\Protocol\ActivityNamespace; use Friendica\Protocol\ActivityNamespace;
use Friendica\Test\MockedTest; use Friendica\Test\MockedTestCase;
class ActivityTest extends MockedTest class ActivityTest extends MockedTestCase
{ {
public function dataMatch() public function dataMatch()
{ {

View file

@ -8,9 +8,9 @@
namespace Friendica\Test\src\Security\PermissionSet\Entity; namespace Friendica\Test\src\Security\PermissionSet\Entity;
use Friendica\Security\PermissionSet\Entity\PermissionSet; 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() public function dateAllowedContacts()
{ {

View file

@ -8,11 +8,11 @@
namespace Friendica\Test\src\Security\PermissionSet\Factory; namespace Friendica\Test\src\Security\PermissionSet\Factory;
use Friendica\Security\PermissionSet\Factory\PermissionSet; use Friendica\Security\PermissionSet\Factory\PermissionSet;
use Friendica\Test\MockedTest; use Friendica\Test\MockedTestCase;
use Friendica\Util\ACLFormatter; use Friendica\Util\ACLFormatter;
use Psr\Log\NullLogger; use Psr\Log\NullLogger;
class PermissionSetTest extends MockedTest class PermissionSetTest extends MockedTestCase
{ {
/** @var PermissionSet */ /** @var PermissionSet */
protected $permissionSet; protected $permissionSet;

View file

@ -8,12 +8,12 @@
namespace Friendica\Test\src\Security\TwoFactor\Factory; namespace Friendica\Test\src\Security\TwoFactor\Factory;
use Friendica\Security\TwoFactor\Factory\TrustedBrowser; use Friendica\Security\TwoFactor\Factory\TrustedBrowser;
use Friendica\Test\MockedTest; use Friendica\Test\MockedTestCase;
use Friendica\Util\DateTimeFormat; use Friendica\Util\DateTimeFormat;
use Friendica\Util\Strings; use Friendica\Util\Strings;
use Psr\Log\NullLogger; use Psr\Log\NullLogger;
class TrustedBrowserTest extends MockedTest class TrustedBrowserTest extends MockedTestCase
{ {
public function testCreateFromTableRowSuccess() public function testCreateFromTableRowSuccess()
{ {

View file

@ -8,11 +8,11 @@
namespace Friendica\Test\src\Security\TwoFactor\Model; namespace Friendica\Test\src\Security\TwoFactor\Model;
use Friendica\Security\TwoFactor\Model\TrustedBrowser; use Friendica\Security\TwoFactor\Model\TrustedBrowser;
use Friendica\Test\MockedTest; use Friendica\Test\MockedTestCase;
use Friendica\Util\DateTimeFormat; use Friendica\Util\DateTimeFormat;
use Friendica\Util\Strings; use Friendica\Util\Strings;
class TrustedBrowserTest extends MockedTest class TrustedBrowserTest extends MockedTestCase
{ {
public function test__construct() public function test__construct()
{ {

View file

@ -7,10 +7,10 @@
namespace Friendica\Test\src\Util; namespace Friendica\Test\src\Util;
use Friendica\Test\MockedTest; use Friendica\Test\MockedTestCase;
use Friendica\Util\BasePath; use Friendica\Util\BasePath;
class BasePathTest extends MockedTest class BasePathTest extends MockedTestCase
{ {
public function dataPaths() public function dataPaths()
{ {

View file

@ -7,10 +7,10 @@
namespace Friendica\Test\src\Util; namespace Friendica\Test\src\Util;
use Friendica\Test\MockedTest; use Friendica\Test\MockedTestCase;
use Friendica\Util\DateTimeFormat; use Friendica\Util\DateTimeFormat;
class DateTimeFormatTest extends MockedTest class DateTimeFormatTest extends MockedTestCase
{ {
public function dataYearMonth() public function dataYearMonth()
{ {

View file

@ -12,7 +12,7 @@ use Friendica\Core\Config\Capability\IManageConfigValues;
use Friendica\Core\L10n; use Friendica\Core\L10n;
use Friendica\Core\PConfig\Capability\IManagePersonalConfigValues; use Friendica\Core\PConfig\Capability\IManagePersonalConfigValues;
use Friendica\Object\EMail\IEmail; use Friendica\Object\EMail\IEmail;
use Friendica\Test\MockedTest; use Friendica\Test\MockedTestCase;
use Friendica\Test\Util\EmailerSpy; use Friendica\Test\Util\EmailerSpy;
use Friendica\Test\Util\HookMockTrait; use Friendica\Test\Util\HookMockTrait;
use Friendica\Test\Util\SampleMailBuilder; use Friendica\Test\Util\SampleMailBuilder;
@ -26,7 +26,7 @@ use Psr\Log\NullLogger;
* @runTestsInSeparateProcesses * @runTestsInSeparateProcesses
* @preserveGlobalState disabled * @preserveGlobalState disabled
*/ */
class EMailerTest extends MockedTest class EMailerTest extends MockedTestCase
{ {
use VFSTrait; use VFSTrait;
use HookMockTrait; use HookMockTrait;

View file

@ -12,7 +12,7 @@ use Friendica\Core\Config\Capability\IManageConfigValues;
use Friendica\Core\L10n; use Friendica\Core\L10n;
use Friendica\Network\HTTPException\UnprocessableEntityException; use Friendica\Network\HTTPException\UnprocessableEntityException;
use Friendica\Object\EMail\IEmail; use Friendica\Object\EMail\IEmail;
use Friendica\Test\MockedTest; use Friendica\Test\MockedTestCase;
use Friendica\Test\Util\SampleMailBuilder; use Friendica\Test\Util\SampleMailBuilder;
use Friendica\Test\Util\VFSTrait; use Friendica\Test\Util\VFSTrait;
use Friendica\Util\EMailer\MailBuilder; use Friendica\Util\EMailer\MailBuilder;
@ -23,7 +23,7 @@ use Psr\Log\NullLogger;
* This class tests the "MailBuilder" (@see MailBuilder ) * 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 * 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; use VFSTrait;

View file

@ -10,13 +10,13 @@ namespace Friendica\Test\src\Util\Emailer;
use Friendica\App\BaseURL; use Friendica\App\BaseURL;
use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\Core\Config\Capability\IManageConfigValues;
use Friendica\Core\L10n; use Friendica\Core\L10n;
use Friendica\Test\MockedTest; use Friendica\Test\MockedTestCase;
use Friendica\Test\Util\VFSTrait; use Friendica\Test\Util\VFSTrait;
use Friendica\Util\EMailer\MailBuilder; use Friendica\Util\EMailer\MailBuilder;
use Friendica\Util\EMailer\SystemMailBuilder; use Friendica\Util\EMailer\SystemMailBuilder;
use Psr\Log\NullLogger; use Psr\Log\NullLogger;
class SystemMailBuilderTest extends MockedTest class SystemMailBuilderTest extends MockedTestCase
{ {
use VFSTrait; use VFSTrait;

View file

@ -7,16 +7,15 @@
namespace Friendica\Test\src\Util; namespace Friendica\Test\src\Util;
use Friendica\Test\MockedTest; use Friendica\Test\MockedTestCase;
use Friendica\Test\Util\HTTPInputDataDouble; use Friendica\Test\Util\HTTPInputDataDouble;
use Friendica\Util\HTTPInputData;
/** /**
* Testing HTTPInputData * Testing HTTPInputData
* *
* @see HTTPInputData * @see HTTPInputData
*/ */
class HTTPInputDataTest extends MockedTest class HTTPInputDataTest extends MockedTestCase
{ {
/** /**
* Returns the data stream for the unit test * Returns the data stream for the unit test

View file

@ -9,12 +9,12 @@ namespace Friendica\Test\src\Util;
use DMS\PHPUnitExtensions\ArraySubset\ArraySubsetAsserts; use DMS\PHPUnitExtensions\ArraySubset\ArraySubsetAsserts;
use Friendica\Test\DiceHttpMockHandlerTrait; use Friendica\Test\DiceHttpMockHandlerTrait;
use Friendica\Test\MockedTest; use Friendica\Test\MockedTestCase;
use Friendica\Util\Images; use Friendica\Util\Images;
use GuzzleHttp\Handler\MockHandler; use GuzzleHttp\Handler\MockHandler;
use GuzzleHttp\Psr7\Response; use GuzzleHttp\Psr7\Response;
class ImagesTest extends MockedTest class ImagesTest extends MockedTestCase
{ {
use DiceHttpMockHandlerTrait; use DiceHttpMockHandlerTrait;
use ArraySubsetAsserts; use ArraySubsetAsserts;

View file

@ -8,12 +8,12 @@
namespace Friendica\Test\src\Util; namespace Friendica\Test\src\Util;
use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\Core\Config\Capability\IManageConfigValues;
use Friendica\Test\MockedTest; use Friendica\Test\MockedTestCase;
use Friendica\Util\Profiler; use Friendica\Util\Profiler;
use Mockery\MockInterface; use Mockery\MockInterface;
use Psr\Log\LoggerInterface; use Psr\Log\LoggerInterface;
class ProfilerTest extends MockedTest class ProfilerTest extends MockedTestCase
{ {
/** /**
* @var LoggerInterface|MockInterface * @var LoggerInterface|MockInterface

View file

@ -11,10 +11,10 @@ use FastRoute\DataGenerator\GroupCountBased;
use FastRoute\RouteCollector; use FastRoute\RouteCollector;
use FastRoute\RouteParser\Std; use FastRoute\RouteParser\Std;
use Friendica\Module\Special\Options; use Friendica\Module\Special\Options;
use Friendica\Test\MockedTest; use Friendica\Test\MockedTestCase;
use Friendica\Util\Router\FriendicaGroupCountBased; use Friendica\Util\Router\FriendicaGroupCountBased;
class FriendicaGroupCountBasedTest extends MockedTest class FriendicaGroupCountBasedTest extends MockedTestCase
{ {
public function testOptions() public function testOptions()
{ {