From 5c3b987b50f1ef5e979482603445ee44427396df Mon Sep 17 00:00:00 2001 From: Tom H Anderson Date: Sun, 27 Oct 2024 19:12:03 -0600 Subject: [PATCH] Put all test cases under a common TestCase class --- .../Feature/Auth/DoctrineUserProviderTest.php | 2 +- .../Passwords/DoctrineTokenRepositoryTest.php | 2 +- .../Cache/AbstractCacheProviderTest.php | 2 +- .../Configuration/Cache/CacheManagerTest.php | 2 +- .../Cache/IlluminateCacheProviderTest.php | 2 +- .../Connections/ConnectionManagerTest.php | 2 +- .../Connections/MysqlConnectionTest.php | 2 +- .../Connections/OracleConnectionTest.php | 2 +- .../Connections/PgsqlConnectionTest.php | 2 +- .../PrimaryReadReplicaConnectionTest.php | 2 +- .../Connections/SqliteConnectionTest.php | 2 +- .../Connections/SqlsrvConnectionTest.php | 2 +- .../Configuration/CustomTypeManagerTest.php | 2 +- .../LaravelNamingStrategyTest.php | 2 +- .../Configuration/MetaData/AttributesTest.php | 2 +- .../MetaData/MetaDataManagerTest.php | 2 +- .../Configuration/MetaData/PhpTest.php | 2 +- .../MetaData/SimplifiedXmlTest.php | 2 +- .../Configuration/MetaData/StaticPhpTest.php | 2 +- .../Configuration/MetaData/XmlTest.php | 2 +- tests/Feature/DoctrineManagerTest.php | 2 +- tests/Feature/EntityManagerFactoryTest.php | 2 +- .../Extensions/ExtensionManagerTest.php | 2 +- .../Extensions/MappingDriverChainTest.php | 2 +- tests/Feature/IlluminateRegistryTest.php | 2 +- .../Middleware/SubstituteBindingsTest.php | 2 +- .../Notifications/DoctrineChannelTest.php | 2 +- .../Notifications/NotificationTest.php | 2 +- .../Pagination/PaginatorAdapterTest.php | 2 +- .../Resolvers/EntityListenerResolverTest.php | 2 +- .../Serializers/ArraySerializerTest.php | 2 +- .../Serializers/JsonSerializerTest.php | 2 +- .../Concerns/InteractsWithEntitiesTest.php | 2 +- tests/Feature/Testing/FactoryBuilderTest.php | 2 +- tests/Feature/Testing/FactoryTest.php | 2 +- tests/Feature/Testing/SimpleHydratorTest.php | 2 +- .../DoctrinePresenceVerifierTest.php | 2 +- tests/MockeryTestCase.php | 20 +++++++++++++++++++ tests/TestCase.php | 9 +++++++++ 39 files changed, 66 insertions(+), 37 deletions(-) create mode 100644 tests/MockeryTestCase.php create mode 100644 tests/TestCase.php diff --git a/tests/Feature/Auth/DoctrineUserProviderTest.php b/tests/Feature/Auth/DoctrineUserProviderTest.php index ffda1daa..fc6a791b 100644 --- a/tests/Feature/Auth/DoctrineUserProviderTest.php +++ b/tests/Feature/Auth/DoctrineUserProviderTest.php @@ -8,9 +8,9 @@ use LaravelDoctrine\ORM\Auth\DoctrineUserProvider; use LaravelDoctrineTest\ORM\Assets\Auth\AuthenticableMock; use LaravelDoctrineTest\ORM\Assets\Auth\AuthenticableWithNonEmptyConstructorMock; +use LaravelDoctrineTest\ORM\TestCase; use Mockery as m; use Mockery\Mock; -use PHPUnit\Framework\TestCase; class DoctrineUserProviderTest extends TestCase { diff --git a/tests/Feature/Auth/Passwords/DoctrineTokenRepositoryTest.php b/tests/Feature/Auth/Passwords/DoctrineTokenRepositoryTest.php index b59bd44b..9ab04df0 100644 --- a/tests/Feature/Auth/Passwords/DoctrineTokenRepositoryTest.php +++ b/tests/Feature/Auth/Passwords/DoctrineTokenRepositoryTest.php @@ -9,9 +9,9 @@ use Illuminate\Contracts\Hashing\Hasher; use LaravelDoctrine\ORM\Auth\Passwords\DoctrineTokenRepository; use LaravelDoctrineTest\ORM\Assets\Auth\Passwords\UserMock; +use LaravelDoctrineTest\ORM\TestCase; use Mockery as m; use Mockery\Mock; -use PHPUnit\Framework\TestCase; class DoctrineTokenRepositoryTest extends TestCase { diff --git a/tests/Feature/Configuration/Cache/AbstractCacheProviderTest.php b/tests/Feature/Configuration/Cache/AbstractCacheProviderTest.php index 3b608496..b074c428 100644 --- a/tests/Feature/Configuration/Cache/AbstractCacheProviderTest.php +++ b/tests/Feature/Configuration/Cache/AbstractCacheProviderTest.php @@ -2,8 +2,8 @@ namespace LaravelDoctrineTest\ORM\Feature\Configuration\Cache; +use LaravelDoctrineTest\ORM\TestCase; use Mockery; -use PHPUnit\Framework\TestCase; abstract class AbstractCacheProviderTest extends TestCase { diff --git a/tests/Feature/Configuration/Cache/CacheManagerTest.php b/tests/Feature/Configuration/Cache/CacheManagerTest.php index e8fcb24a..4a33447d 100644 --- a/tests/Feature/Configuration/Cache/CacheManagerTest.php +++ b/tests/Feature/Configuration/Cache/CacheManagerTest.php @@ -9,8 +9,8 @@ use LaravelDoctrine\ORM\Configuration\Cache\CacheManager; use LaravelDoctrine\ORM\Configuration\Cache\FileCacheProvider; use LaravelDoctrine\ORM\Exceptions\DriverNotFound; +use LaravelDoctrineTest\ORM\TestCase; use Mockery as m; -use PHPUnit\Framework\TestCase; use Symfony\Component\Cache\Adapter\ArrayAdapter; class CacheManagerTest extends TestCase diff --git a/tests/Feature/Configuration/Cache/IlluminateCacheProviderTest.php b/tests/Feature/Configuration/Cache/IlluminateCacheProviderTest.php index 979fdce2..c8a10c08 100644 --- a/tests/Feature/Configuration/Cache/IlluminateCacheProviderTest.php +++ b/tests/Feature/Configuration/Cache/IlluminateCacheProviderTest.php @@ -6,8 +6,8 @@ use Illuminate\Contracts\Cache\Factory; use Illuminate\Contracts\Cache\Repository; use LaravelDoctrine\ORM\Configuration\Cache\IlluminateCacheProvider; +use LaravelDoctrineTest\ORM\TestCase; use Mockery as m; -use PHPUnit\Framework\TestCase; class IlluminateCacheProviderTest extends TestCase { diff --git a/tests/Feature/Configuration/Connections/ConnectionManagerTest.php b/tests/Feature/Configuration/Connections/ConnectionManagerTest.php index 57e243c5..3de3c3cd 100644 --- a/tests/Feature/Configuration/Connections/ConnectionManagerTest.php +++ b/tests/Feature/Configuration/Connections/ConnectionManagerTest.php @@ -8,8 +8,8 @@ use LaravelDoctrine\ORM\Configuration\Connections\MysqlConnection; use LaravelDoctrine\ORM\Configuration\Connections\SqliteConnection; use LaravelDoctrine\ORM\Exceptions\DriverNotFound; +use LaravelDoctrineTest\ORM\TestCase; use Mockery as m; -use PHPUnit\Framework\TestCase; class ConnectionManagerTest extends TestCase { diff --git a/tests/Feature/Configuration/Connections/MysqlConnectionTest.php b/tests/Feature/Configuration/Connections/MysqlConnectionTest.php index 1d652e22..1854b0bf 100644 --- a/tests/Feature/Configuration/Connections/MysqlConnectionTest.php +++ b/tests/Feature/Configuration/Connections/MysqlConnectionTest.php @@ -4,9 +4,9 @@ use Illuminate\Contracts\Config\Repository; use LaravelDoctrine\ORM\Configuration\Connections\MysqlConnection; +use LaravelDoctrineTest\ORM\TestCase; use Mockery as m; use Mockery\Mock; -use PHPUnit\Framework\TestCase; class MysqlConnectionTest extends TestCase { diff --git a/tests/Feature/Configuration/Connections/OracleConnectionTest.php b/tests/Feature/Configuration/Connections/OracleConnectionTest.php index 2bf9d124..d71e4ef8 100644 --- a/tests/Feature/Configuration/Connections/OracleConnectionTest.php +++ b/tests/Feature/Configuration/Connections/OracleConnectionTest.php @@ -4,9 +4,9 @@ use Illuminate\Contracts\Config\Repository; use LaravelDoctrine\ORM\Configuration\Connections\OracleConnection; +use LaravelDoctrineTest\ORM\TestCase; use Mockery as m; use Mockery\Mock; -use PHPUnit\Framework\TestCase; class OracleConnectionTest extends TestCase { diff --git a/tests/Feature/Configuration/Connections/PgsqlConnectionTest.php b/tests/Feature/Configuration/Connections/PgsqlConnectionTest.php index 3634c7fd..d1d268a3 100644 --- a/tests/Feature/Configuration/Connections/PgsqlConnectionTest.php +++ b/tests/Feature/Configuration/Connections/PgsqlConnectionTest.php @@ -4,9 +4,9 @@ use Illuminate\Contracts\Config\Repository; use LaravelDoctrine\ORM\Configuration\Connections\PgsqlConnection; +use LaravelDoctrineTest\ORM\TestCase; use Mockery as m; use Mockery\Mock; -use PHPUnit\Framework\TestCase; class PgsqlConnectionTest extends TestCase { diff --git a/tests/Feature/Configuration/Connections/PrimaryReadReplicaConnectionTest.php b/tests/Feature/Configuration/Connections/PrimaryReadReplicaConnectionTest.php index f8f6cf5c..95b16c98 100644 --- a/tests/Feature/Configuration/Connections/PrimaryReadReplicaConnectionTest.php +++ b/tests/Feature/Configuration/Connections/PrimaryReadReplicaConnectionTest.php @@ -5,8 +5,8 @@ use Doctrine\DBAL\Connections\PrimaryReadReplicaConnection as PrimaryReadReplicaDoctrineWrapper; use Illuminate\Contracts\Config\Repository; use LaravelDoctrine\ORM\Configuration\Connections\PrimaryReadReplicaConnection; +use LaravelDoctrineTest\ORM\TestCase; use Mockery as m; -use PHPUnit\Framework\TestCase; /** * Basic unit tests for primary read-replica connection diff --git a/tests/Feature/Configuration/Connections/SqliteConnectionTest.php b/tests/Feature/Configuration/Connections/SqliteConnectionTest.php index 9ac18210..c6f09e55 100644 --- a/tests/Feature/Configuration/Connections/SqliteConnectionTest.php +++ b/tests/Feature/Configuration/Connections/SqliteConnectionTest.php @@ -4,9 +4,9 @@ use Illuminate\Contracts\Config\Repository; use LaravelDoctrine\ORM\Configuration\Connections\SqliteConnection; +use LaravelDoctrineTest\ORM\TestCase; use Mockery as m; use Mockery\Mock; -use PHPUnit\Framework\TestCase; class SqliteConnectionTest extends TestCase { diff --git a/tests/Feature/Configuration/Connections/SqlsrvConnectionTest.php b/tests/Feature/Configuration/Connections/SqlsrvConnectionTest.php index a0948ab3..0df1d61f 100644 --- a/tests/Feature/Configuration/Connections/SqlsrvConnectionTest.php +++ b/tests/Feature/Configuration/Connections/SqlsrvConnectionTest.php @@ -4,9 +4,9 @@ use Illuminate\Contracts\Config\Repository; use LaravelDoctrine\ORM\Configuration\Connections\SqlsrvConnection; +use LaravelDoctrineTest\ORM\TestCase; use Mockery as m; use Mockery\Mock; -use PHPUnit\Framework\TestCase; class SqlsrvConnectionTest extends TestCase { diff --git a/tests/Feature/Configuration/CustomTypeManagerTest.php b/tests/Feature/Configuration/CustomTypeManagerTest.php index e8832e61..b9493c04 100644 --- a/tests/Feature/Configuration/CustomTypeManagerTest.php +++ b/tests/Feature/Configuration/CustomTypeManagerTest.php @@ -6,7 +6,7 @@ use LaravelDoctrine\ORM\Configuration\CustomTypeManager; use LaravelDoctrineTest\ORM\Assets\Configuration\TypeMock; use LaravelDoctrineTest\ORM\Assets\Configuration\TypeMock2; -use PHPUnit\Framework\TestCase; +use LaravelDoctrineTest\ORM\TestCase; class CustomTypeManagerTest extends TestCase { diff --git a/tests/Feature/Configuration/LaravelNamingStrategyTest.php b/tests/Feature/Configuration/LaravelNamingStrategyTest.php index e9f63a8d..4e3f3277 100644 --- a/tests/Feature/Configuration/LaravelNamingStrategyTest.php +++ b/tests/Feature/Configuration/LaravelNamingStrategyTest.php @@ -4,7 +4,7 @@ use Illuminate\Support\Str; use LaravelDoctrine\ORM\Configuration\LaravelNamingStrategy; -use PHPUnit\Framework\TestCase; +use LaravelDoctrineTest\ORM\TestCase; class LaravelNamingStrategyTest extends TestCase { diff --git a/tests/Feature/Configuration/MetaData/AttributesTest.php b/tests/Feature/Configuration/MetaData/AttributesTest.php index af0e6765..dfdc1a8e 100644 --- a/tests/Feature/Configuration/MetaData/AttributesTest.php +++ b/tests/Feature/Configuration/MetaData/AttributesTest.php @@ -4,8 +4,8 @@ use LaravelDoctrine\ORM\Configuration\MetaData\Attributes; use Doctrine\Persistence\Mapping\Driver\MappingDriver; +use LaravelDoctrineTest\ORM\TestCase; use Mockery as m; -use PHPUnit\Framework\TestCase; class AttributesTest extends TestCase { diff --git a/tests/Feature/Configuration/MetaData/MetaDataManagerTest.php b/tests/Feature/Configuration/MetaData/MetaDataManagerTest.php index d3f7d396..fae7809a 100644 --- a/tests/Feature/Configuration/MetaData/MetaDataManagerTest.php +++ b/tests/Feature/Configuration/MetaData/MetaDataManagerTest.php @@ -6,8 +6,8 @@ use Illuminate\Contracts\Container\Container; use LaravelDoctrine\ORM\Configuration\MetaData\MetaDataManager; use LaravelDoctrine\ORM\Exceptions\DriverNotFound; +use LaravelDoctrineTest\ORM\TestCase; use Mockery as m; -use PHPUnit\Framework\TestCase; class MetaDataManagerTest extends TestCase { diff --git a/tests/Feature/Configuration/MetaData/PhpTest.php b/tests/Feature/Configuration/MetaData/PhpTest.php index f11f6222..0c19e053 100644 --- a/tests/Feature/Configuration/MetaData/PhpTest.php +++ b/tests/Feature/Configuration/MetaData/PhpTest.php @@ -5,8 +5,8 @@ use Doctrine\Persistence\Mapping\Driver\MappingDriver; use Doctrine\Persistence\Mapping\Driver\PHPDriver; use LaravelDoctrine\ORM\Configuration\MetaData\Php; +use LaravelDoctrineTest\ORM\TestCase; use Mockery as m; -use PHPUnit\Framework\TestCase; class PhpTest extends TestCase { diff --git a/tests/Feature/Configuration/MetaData/SimplifiedXmlTest.php b/tests/Feature/Configuration/MetaData/SimplifiedXmlTest.php index e9571aa5..d2cb33ca 100644 --- a/tests/Feature/Configuration/MetaData/SimplifiedXmlTest.php +++ b/tests/Feature/Configuration/MetaData/SimplifiedXmlTest.php @@ -5,8 +5,8 @@ use Doctrine\ORM\Mapping\Driver\SimplifiedXmlDriver; use Doctrine\Persistence\Mapping\Driver\MappingDriver; use LaravelDoctrine\ORM\Configuration\MetaData\SimplifiedXml; +use LaravelDoctrineTest\ORM\TestCase; use Mockery as m; -use PHPUnit\Framework\TestCase; class SimplifiedXmlTest extends TestCase { diff --git a/tests/Feature/Configuration/MetaData/StaticPhpTest.php b/tests/Feature/Configuration/MetaData/StaticPhpTest.php index 6ff7ce71..97aaaf22 100644 --- a/tests/Feature/Configuration/MetaData/StaticPhpTest.php +++ b/tests/Feature/Configuration/MetaData/StaticPhpTest.php @@ -5,8 +5,8 @@ use Doctrine\Persistence\Mapping\Driver\MappingDriver; use Doctrine\Persistence\Mapping\Driver\StaticPHPDriver; use LaravelDoctrine\ORM\Configuration\MetaData\StaticPhp; +use LaravelDoctrineTest\ORM\TestCase; use Mockery as m; -use PHPUnit\Framework\TestCase; class StaticPhpTest extends TestCase { diff --git a/tests/Feature/Configuration/MetaData/XmlTest.php b/tests/Feature/Configuration/MetaData/XmlTest.php index 2991ba5e..4747fde7 100644 --- a/tests/Feature/Configuration/MetaData/XmlTest.php +++ b/tests/Feature/Configuration/MetaData/XmlTest.php @@ -5,8 +5,8 @@ use Doctrine\ORM\Mapping\Driver\XmlDriver; use Doctrine\Persistence\Mapping\Driver\MappingDriver; use LaravelDoctrine\ORM\Configuration\MetaData\Xml; +use LaravelDoctrineTest\ORM\TestCase; use Mockery as m; -use PHPUnit\Framework\TestCase; class XmlTest extends TestCase { diff --git a/tests/Feature/DoctrineManagerTest.php b/tests/Feature/DoctrineManagerTest.php index fef62bc6..51444e27 100644 --- a/tests/Feature/DoctrineManagerTest.php +++ b/tests/Feature/DoctrineManagerTest.php @@ -14,8 +14,8 @@ use LaravelDoctrine\ORM\DoctrineManager; use LaravelDoctrine\ORM\EntityManagerFactory; use LaravelDoctrine\ORM\Extensions\MappingDriverChain; +use LaravelDoctrineTest\ORM\TestCase; use Mockery as m; -use PHPUnit\Framework\TestCase; class DoctrineManagerTest extends TestCase { diff --git a/tests/Feature/EntityManagerFactoryTest.php b/tests/Feature/EntityManagerFactoryTest.php index 3f11cdc9..48d4c26d 100644 --- a/tests/Feature/EntityManagerFactoryTest.php +++ b/tests/Feature/EntityManagerFactoryTest.php @@ -32,9 +32,9 @@ use LaravelDoctrineTest\ORM\Assets\FilterStub; use LaravelDoctrineTest\ORM\Assets\ListenerStub; use LaravelDoctrineTest\ORM\Assets\SubscriberStub; +use LaravelDoctrineTest\ORM\TestCase; use Mockery as m; use Mockery\Mock; -use PHPUnit\Framework\TestCase; use Psr\Cache\CacheItemPoolInterface; use ReflectionException; use ReflectionObject; diff --git a/tests/Feature/Extensions/ExtensionManagerTest.php b/tests/Feature/Extensions/ExtensionManagerTest.php index 5b2cfeeb..380ff719 100644 --- a/tests/Feature/Extensions/ExtensionManagerTest.php +++ b/tests/Feature/Extensions/ExtensionManagerTest.php @@ -13,9 +13,9 @@ use LaravelDoctrineTest\ORM\Assets\Extensions\ExtensionMock; use LaravelDoctrineTest\ORM\Assets\Extensions\ExtensionMock2; use LaravelDoctrineTest\ORM\Assets\Extensions\ExtensionWithFiltersMock; +use LaravelDoctrineTest\ORM\TestCase; use Mockery as m; use Mockery\Mock; -use PHPUnit\Framework\TestCase; class ExtensionManagerTest extends TestCase { diff --git a/tests/Feature/Extensions/MappingDriverChainTest.php b/tests/Feature/Extensions/MappingDriverChainTest.php index 0da97cbe..c5c3de4e 100644 --- a/tests/Feature/Extensions/MappingDriverChainTest.php +++ b/tests/Feature/Extensions/MappingDriverChainTest.php @@ -7,9 +7,9 @@ use Doctrine\Persistence\Mapping\Driver\DefaultFileLocator; use Doctrine\Persistence\Mapping\Driver\SymfonyFileLocator; use LaravelDoctrine\ORM\Extensions\MappingDriverChain; +use LaravelDoctrineTest\ORM\TestCase; use Mockery as m; use Mockery\Mock; -use PHPUnit\Framework\TestCase; /** * NOTE: This test was degraded while refactoring for ORM 3. diff --git a/tests/Feature/IlluminateRegistryTest.php b/tests/Feature/IlluminateRegistryTest.php index 37d4829d..45b03ffd 100644 --- a/tests/Feature/IlluminateRegistryTest.php +++ b/tests/Feature/IlluminateRegistryTest.php @@ -9,9 +9,9 @@ use InvalidArgumentException; use LaravelDoctrine\ORM\EntityManagerFactory; use LaravelDoctrine\ORM\IlluminateRegistry; +use LaravelDoctrineTest\ORM\TestCase; use Mockery as m; use Mockery\Mock; -use PHPUnit\Framework\TestCase; use RuntimeException; use stdClass; diff --git a/tests/Feature/Middleware/SubstituteBindingsTest.php b/tests/Feature/Middleware/SubstituteBindingsTest.php index 4c0a542a..0806bcf7 100644 --- a/tests/Feature/Middleware/SubstituteBindingsTest.php +++ b/tests/Feature/Middleware/SubstituteBindingsTest.php @@ -15,9 +15,9 @@ use LaravelDoctrine\ORM\Middleware\SubstituteBindings; use LaravelDoctrineTest\ORM\Assets\Middleware\BindableEntity; use LaravelDoctrineTest\ORM\Assets\Middleware\BindableEntityWithInterface; +use LaravelDoctrineTest\ORM\TestCase; use Mockery as m; use Mockery\Mock; -use PHPUnit\Framework\TestCase; class SubstituteBindingsTest extends TestCase { diff --git a/tests/Feature/Notifications/DoctrineChannelTest.php b/tests/Feature/Notifications/DoctrineChannelTest.php index 514afd01..9bbbf699 100644 --- a/tests/Feature/Notifications/DoctrineChannelTest.php +++ b/tests/Feature/Notifications/DoctrineChannelTest.php @@ -11,9 +11,9 @@ use LaravelDoctrineTest\ORM\Assets\Notifications\NotificationDatabaseStub; use LaravelDoctrineTest\ORM\Assets\Notifications\NotificationInvalidStub; use LaravelDoctrineTest\ORM\Assets\Notifications\NotificationStub; +use LaravelDoctrineTest\ORM\TestCase; use Mockery; use Mockery\Mock; -use PHPUnit\Framework\TestCase; use RuntimeException; class DoctrineChannelTest extends TestCase diff --git a/tests/Feature/Notifications/NotificationTest.php b/tests/Feature/Notifications/NotificationTest.php index 79faca83..7e9217e4 100644 --- a/tests/Feature/Notifications/NotificationTest.php +++ b/tests/Feature/Notifications/NotificationTest.php @@ -4,9 +4,9 @@ use Doctrine\ORM\EntityManagerInterface; use LaravelDoctrine\ORM\Notifications\Notification; +use LaravelDoctrineTest\ORM\TestCase; use Mockery; use Mockery\Mock; -use PHPUnit\Framework\TestCase; use ReflectionClass; use stdClass; diff --git a/tests/Feature/Pagination/PaginatorAdapterTest.php b/tests/Feature/Pagination/PaginatorAdapterTest.php index 112f728b..178faa74 100644 --- a/tests/Feature/Pagination/PaginatorAdapterTest.php +++ b/tests/Feature/Pagination/PaginatorAdapterTest.php @@ -14,8 +14,8 @@ use Illuminate\Contracts\Pagination\LengthAwarePaginator; use Illuminate\Pagination\AbstractPaginator; use LaravelDoctrine\ORM\Pagination\PaginatorAdapter; +use LaravelDoctrineTest\ORM\TestCase; use Mockery; -use PHPUnit\Framework\TestCase; use stdClass; class PaginatorAdapterTest extends TestCase diff --git a/tests/Feature/Resolvers/EntityListenerResolverTest.php b/tests/Feature/Resolvers/EntityListenerResolverTest.php index 40f183db..d63fab97 100644 --- a/tests/Feature/Resolvers/EntityListenerResolverTest.php +++ b/tests/Feature/Resolvers/EntityListenerResolverTest.php @@ -5,8 +5,8 @@ use Doctrine\ORM\Mapping\EntityListenerResolver as ResolverContract; use Illuminate\Contracts\Container\Container; use LaravelDoctrine\ORM\Resolvers\EntityListenerResolver; +use LaravelDoctrineTest\ORM\TestCase; use Mockery as m; -use PHPUnit\Framework\TestCase; use stdClass; use TypeError; diff --git a/tests/Feature/Serializers/ArraySerializerTest.php b/tests/Feature/Serializers/ArraySerializerTest.php index 9c5e6537..a121a7bd 100644 --- a/tests/Feature/Serializers/ArraySerializerTest.php +++ b/tests/Feature/Serializers/ArraySerializerTest.php @@ -4,7 +4,7 @@ use LaravelDoctrine\ORM\Serializers\Arrayable; use LaravelDoctrine\ORM\Serializers\ArraySerializer; -use PHPUnit\Framework\TestCase; +use LaravelDoctrineTest\ORM\TestCase; class ArraySerializerTest extends TestCase { diff --git a/tests/Feature/Serializers/JsonSerializerTest.php b/tests/Feature/Serializers/JsonSerializerTest.php index fa11f92d..d806d317 100644 --- a/tests/Feature/Serializers/JsonSerializerTest.php +++ b/tests/Feature/Serializers/JsonSerializerTest.php @@ -4,7 +4,7 @@ use LaravelDoctrine\ORM\Serializers\Jsonable; use LaravelDoctrine\ORM\Serializers\JsonSerializer; -use PHPUnit\Framework\TestCase; +use LaravelDoctrineTest\ORM\TestCase; class JsonSerializerTest extends TestCase { diff --git a/tests/Feature/Testing/Concerns/InteractsWithEntitiesTest.php b/tests/Feature/Testing/Concerns/InteractsWithEntitiesTest.php index e1c0c6fd..8f2caffa 100644 --- a/tests/Feature/Testing/Concerns/InteractsWithEntitiesTest.php +++ b/tests/Feature/Testing/Concerns/InteractsWithEntitiesTest.php @@ -6,8 +6,8 @@ use Doctrine\ORM\EntityRepository; use Illuminate\Contracts\Container\Container; use LaravelDoctrine\ORM\Testing\Concerns\InteractsWithEntities; +use LaravelDoctrineTest\ORM\MockeryTestCase; use Mockery; -use Mockery\Adapter\Phpunit\MockeryTestCase; use PHPUnit\Framework\ExpectationFailedException; class InteractsWithEntitiesTest extends MockeryTestCase diff --git a/tests/Feature/Testing/FactoryBuilderTest.php b/tests/Feature/Testing/FactoryBuilderTest.php index 77b0c5d3..dd3ad4e5 100644 --- a/tests/Feature/Testing/FactoryBuilderTest.php +++ b/tests/Feature/Testing/FactoryBuilderTest.php @@ -10,7 +10,7 @@ use Doctrine\Persistence\ManagerRegistry; use Faker; use LaravelDoctrine\ORM\Testing\FactoryBuilder; -use Mockery\Adapter\Phpunit\MockeryTestCase; +use LaravelDoctrineTest\ORM\MockeryTestCase; class FactoryBuilderTest extends MockeryTestCase { diff --git a/tests/Feature/Testing/FactoryTest.php b/tests/Feature/Testing/FactoryTest.php index a3241fc4..86db8b22 100644 --- a/tests/Feature/Testing/FactoryTest.php +++ b/tests/Feature/Testing/FactoryTest.php @@ -5,8 +5,8 @@ use Doctrine\Persistence\ManagerRegistry; use Faker; use LaravelDoctrine\ORM\Testing\Factory; +use LaravelDoctrineTest\ORM\MockeryTestCase; use Mockery; -use Mockery\Adapter\Phpunit\MockeryTestCase; class FactoryTest extends MockeryTestCase { diff --git a/tests/Feature/Testing/SimpleHydratorTest.php b/tests/Feature/Testing/SimpleHydratorTest.php index fb90d1eb..875dad27 100644 --- a/tests/Feature/Testing/SimpleHydratorTest.php +++ b/tests/Feature/Testing/SimpleHydratorTest.php @@ -5,7 +5,7 @@ use LaravelDoctrine\ORM\Testing\SimpleHydrator; use LaravelDoctrineTest\ORM\Assets\Testing\AncestorHydrateableClass; use LaravelDoctrineTest\ORM\Assets\Testing\ChildHydrateableClass; -use PHPUnit\Framework\TestCase; +use LaravelDoctrineTest\ORM\TestCase; class SimpleHydratorTest extends TestCase { diff --git a/tests/Feature/Validation/DoctrinePresenceVerifierTest.php b/tests/Feature/Validation/DoctrinePresenceVerifierTest.php index 36130394..11a92eea 100644 --- a/tests/Feature/Validation/DoctrinePresenceVerifierTest.php +++ b/tests/Feature/Validation/DoctrinePresenceVerifierTest.php @@ -10,9 +10,9 @@ use InvalidArgumentException; use LaravelDoctrine\ORM\Validation\DoctrinePresenceVerifier; use LaravelDoctrineTest\ORM\Assets\Mock\CountableEntityMock; +use LaravelDoctrineTest\ORM\TestCase; use Mockery as m; use Mockery\Mock; -use PHPUnit\Framework\TestCase; class DoctrinePresenceVerifierTest extends TestCase { diff --git a/tests/MockeryTestCase.php b/tests/MockeryTestCase.php new file mode 100644 index 00000000..428d1d1f --- /dev/null +++ b/tests/MockeryTestCase.php @@ -0,0 +1,20 @@ +