From a198484ab6a548fb03340d36672f9cf30acb61df Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Fri, 21 Jan 2022 19:21:30 +0100 Subject: [PATCH] Updated test utils lib --- composer.json | 2 +- module/Core/src/Repository/TagRepository.php | 2 +- module/Core/test-db/Domain/Repository/DomainRepositoryTest.php | 2 +- module/Core/test-db/Repository/ShortUrlRepositoryTest.php | 2 +- module/Core/test-db/Repository/TagRepositoryTest.php | 2 +- module/Core/test-db/Repository/VisitRepositoryTest.php | 2 +- .../test-db/Tag/Paginator/Adapter/TagsPaginatorAdapterTest.php | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/composer.json b/composer.json index 41389109..89d9e14d 100644 --- a/composer.json +++ b/composer.json @@ -74,7 +74,7 @@ "phpunit/phpunit": "^9.5", "roave/security-advisories": "dev-master", "shlinkio/php-coding-standard": "~2.2.0", - "shlinkio/shlink-test-utils": "^2.5", + "shlinkio/shlink-test-utils": "^3.0", "symfony/var-dumper": "^6.0", "veewee/composer-run-parallel": "^1.1" }, diff --git a/module/Core/src/Repository/TagRepository.php b/module/Core/src/Repository/TagRepository.php index 8e6e2080..cc952796 100644 --- a/module/Core/src/Repository/TagRepository.php +++ b/module/Core/src/Repository/TagRepository.php @@ -53,7 +53,7 @@ class TagRepository extends EntitySpecificationRepository implements TagReposito } $apiKey = $filtering?->apiKey(); - $this->applySpecification($subQb, new WithInlinedApiKeySpecsEnsuringJoin($apiKey, 'shortUrls'), 't'); + $this->applySpecification($subQb, new WithInlinedApiKeySpecsEnsuringJoin($apiKey), 't'); $subQuery = $subQb->getQuery(); $subQuerySql = $subQuery->getSQL(); diff --git a/module/Core/test-db/Domain/Repository/DomainRepositoryTest.php b/module/Core/test-db/Domain/Repository/DomainRepositoryTest.php index b5ca98ea..3f69e7d9 100644 --- a/module/Core/test-db/Domain/Repository/DomainRepositoryTest.php +++ b/module/Core/test-db/Domain/Repository/DomainRepositoryTest.php @@ -21,7 +21,7 @@ class DomainRepositoryTest extends DatabaseTestCase { private DomainRepository $repo; - protected function beforeEach(): void + protected function setUp(): 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 30b95774..4ad89629 100644 --- a/module/Core/test-db/Repository/ShortUrlRepositoryTest.php +++ b/module/Core/test-db/Repository/ShortUrlRepositoryTest.php @@ -33,7 +33,7 @@ class ShortUrlRepositoryTest extends DatabaseTestCase private ShortUrlRepository $repo; private PersistenceShortUrlRelationResolver $relationResolver; - public function beforeEach(): void + protected function setUp(): void { $this->repo = $this->getEntityManager()->getRepository(ShortUrl::class); $this->relationResolver = new PersistenceShortUrlRelationResolver($this->getEntityManager()); diff --git a/module/Core/test-db/Repository/TagRepositoryTest.php b/module/Core/test-db/Repository/TagRepositoryTest.php index d030bd03..9bcfaf2b 100644 --- a/module/Core/test-db/Repository/TagRepositoryTest.php +++ b/module/Core/test-db/Repository/TagRepositoryTest.php @@ -27,7 +27,7 @@ class TagRepositoryTest extends DatabaseTestCase private TagRepository $repo; private PersistenceShortUrlRelationResolver $relationResolver; - protected function beforeEach(): void + protected function setUp(): void { $this->repo = $this->getEntityManager()->getRepository(Tag::class); $this->relationResolver = new PersistenceShortUrlRelationResolver($this->getEntityManager()); diff --git a/module/Core/test-db/Repository/VisitRepositoryTest.php b/module/Core/test-db/Repository/VisitRepositoryTest.php index 950bfc8a..c23bd8aa 100644 --- a/module/Core/test-db/Repository/VisitRepositoryTest.php +++ b/module/Core/test-db/Repository/VisitRepositoryTest.php @@ -38,7 +38,7 @@ class VisitRepositoryTest extends DatabaseTestCase private VisitRepository $repo; private PersistenceShortUrlRelationResolver $relationResolver; - protected function beforeEach(): void + protected function setUp(): void { $this->repo = $this->getEntityManager()->getRepository(Visit::class); $this->relationResolver = new PersistenceShortUrlRelationResolver($this->getEntityManager()); diff --git a/module/Core/test-db/Tag/Paginator/Adapter/TagsPaginatorAdapterTest.php b/module/Core/test-db/Tag/Paginator/Adapter/TagsPaginatorAdapterTest.php index d906f80c..7e75aa22 100644 --- a/module/Core/test-db/Tag/Paginator/Adapter/TagsPaginatorAdapterTest.php +++ b/module/Core/test-db/Tag/Paginator/Adapter/TagsPaginatorAdapterTest.php @@ -16,7 +16,7 @@ class TagsPaginatorAdapterTest extends DatabaseTestCase { private TagRepository $repo; - protected function beforeEach(): void + protected function setUp(): void { $this->repo = $this->getEntityManager()->getRepository(Tag::class); }