diff --git a/composer.json b/composer.json index 5fd37265..70454cfa 100644 --- a/composer.json +++ b/composer.json @@ -71,7 +71,7 @@ "phpunit/phpunit": "^9.5", "roave/security-advisories": "dev-master", "shlinkio/php-coding-standard": "~2.1.1", - "shlinkio/shlink-test-utils": "^1.7", + "shlinkio/shlink-test-utils": "^2.0", "symfony/var-dumper": "^5.2", "veewee/composer-run-parallel": "^0.1.0" }, diff --git a/module/Core/test-db/Domain/Repository/DomainRepositoryTest.php b/module/Core/test-db/Domain/Repository/DomainRepositoryTest.php index b39f3a87..eae77154 100644 --- a/module/Core/test-db/Domain/Repository/DomainRepositoryTest.php +++ b/module/Core/test-db/Domain/Repository/DomainRepositoryTest.php @@ -15,11 +15,9 @@ use Shlinkio\Shlink\TestUtils\DbTest\DatabaseTestCase; class DomainRepositoryTest extends DatabaseTestCase { - protected const ENTITIES_TO_EMPTY = [ShortUrl::class, Domain::class, ApiKey::class]; - private DomainRepository $repo; - protected function setUp(): void + protected function beforeEach(): void { $this->repo = $this->getEntityManager()->getRepository(Domain::class); } diff --git a/module/Core/test-db/Repository/ShortUrlRepositoryTest.php b/module/Core/test-db/Repository/ShortUrlRepositoryTest.php index c806a243..c942f61d 100644 --- a/module/Core/test-db/Repository/ShortUrlRepositoryTest.php +++ b/module/Core/test-db/Repository/ShortUrlRepositoryTest.php @@ -29,17 +29,9 @@ class ShortUrlRepositoryTest extends DatabaseTestCase { use TagManagerTrait; - protected const ENTITIES_TO_EMPTY = [ - Tag::class, - Visit::class, - ShortUrl::class, - Domain::class, - ApiKey::class, - ]; - private ShortUrlRepository $repo; - public function setUp(): void + public function beforeEach(): void { $this->repo = $this->getEntityManager()->getRepository(ShortUrl::class); } diff --git a/module/Core/test-db/Repository/TagRepositoryTest.php b/module/Core/test-db/Repository/TagRepositoryTest.php index fce6e61d..59f53b6b 100644 --- a/module/Core/test-db/Repository/TagRepositoryTest.php +++ b/module/Core/test-db/Repository/TagRepositoryTest.php @@ -21,17 +21,9 @@ use function array_chunk; class TagRepositoryTest extends DatabaseTestCase { - protected const ENTITIES_TO_EMPTY = [ - Visit::class, - ShortUrl::class, - Tag::class, - ApiKey::class, - Domain::class, - ]; - private TagRepository $repo; - protected function setUp(): void + protected function beforeEach(): void { $this->repo = $this->getEntityManager()->getRepository(Tag::class); } diff --git a/module/Core/test-db/Repository/VisitRepositoryTest.php b/module/Core/test-db/Repository/VisitRepositoryTest.php index b1c6e4bb..1cc1c895 100644 --- a/module/Core/test-db/Repository/VisitRepositoryTest.php +++ b/module/Core/test-db/Repository/VisitRepositoryTest.php @@ -27,18 +27,9 @@ use function sprintf; class VisitRepositoryTest extends DatabaseTestCase { - protected const ENTITIES_TO_EMPTY = [ - VisitLocation::class, - Visit::class, - ShortUrl::class, - Domain::class, - Tag::class, - ApiKey::class, - ]; - private VisitRepository $repo; - protected function setUp(): void + protected function beforeEach(): void { $this->repo = $this->getEntityManager()->getRepository(Visit::class); }