Updated test utils lib

This commit is contained in:
Alejandro Celaya 2022-01-21 19:21:30 +01:00
parent dd5bce9694
commit a198484ab6
7 changed files with 7 additions and 7 deletions

View File

@ -74,7 +74,7 @@
"phpunit/phpunit": "^9.5", "phpunit/phpunit": "^9.5",
"roave/security-advisories": "dev-master", "roave/security-advisories": "dev-master",
"shlinkio/php-coding-standard": "~2.2.0", "shlinkio/php-coding-standard": "~2.2.0",
"shlinkio/shlink-test-utils": "^2.5", "shlinkio/shlink-test-utils": "^3.0",
"symfony/var-dumper": "^6.0", "symfony/var-dumper": "^6.0",
"veewee/composer-run-parallel": "^1.1" "veewee/composer-run-parallel": "^1.1"
}, },

View File

@ -53,7 +53,7 @@ class TagRepository extends EntitySpecificationRepository implements TagReposito
} }
$apiKey = $filtering?->apiKey(); $apiKey = $filtering?->apiKey();
$this->applySpecification($subQb, new WithInlinedApiKeySpecsEnsuringJoin($apiKey, 'shortUrls'), 't'); $this->applySpecification($subQb, new WithInlinedApiKeySpecsEnsuringJoin($apiKey), 't');
$subQuery = $subQb->getQuery(); $subQuery = $subQb->getQuery();
$subQuerySql = $subQuery->getSQL(); $subQuerySql = $subQuery->getSQL();

View File

@ -21,7 +21,7 @@ class DomainRepositoryTest extends DatabaseTestCase
{ {
private DomainRepository $repo; private DomainRepository $repo;
protected function beforeEach(): void protected function setUp(): void
{ {
$this->repo = $this->getEntityManager()->getRepository(Domain::class); $this->repo = $this->getEntityManager()->getRepository(Domain::class);
} }

View File

@ -33,7 +33,7 @@ class ShortUrlRepositoryTest extends DatabaseTestCase
private ShortUrlRepository $repo; private ShortUrlRepository $repo;
private PersistenceShortUrlRelationResolver $relationResolver; private PersistenceShortUrlRelationResolver $relationResolver;
public function beforeEach(): void protected function setUp(): void
{ {
$this->repo = $this->getEntityManager()->getRepository(ShortUrl::class); $this->repo = $this->getEntityManager()->getRepository(ShortUrl::class);
$this->relationResolver = new PersistenceShortUrlRelationResolver($this->getEntityManager()); $this->relationResolver = new PersistenceShortUrlRelationResolver($this->getEntityManager());

View File

@ -27,7 +27,7 @@ class TagRepositoryTest extends DatabaseTestCase
private TagRepository $repo; private TagRepository $repo;
private PersistenceShortUrlRelationResolver $relationResolver; private PersistenceShortUrlRelationResolver $relationResolver;
protected function beforeEach(): void protected function setUp(): void
{ {
$this->repo = $this->getEntityManager()->getRepository(Tag::class); $this->repo = $this->getEntityManager()->getRepository(Tag::class);
$this->relationResolver = new PersistenceShortUrlRelationResolver($this->getEntityManager()); $this->relationResolver = new PersistenceShortUrlRelationResolver($this->getEntityManager());

View File

@ -38,7 +38,7 @@ class VisitRepositoryTest extends DatabaseTestCase
private VisitRepository $repo; private VisitRepository $repo;
private PersistenceShortUrlRelationResolver $relationResolver; private PersistenceShortUrlRelationResolver $relationResolver;
protected function beforeEach(): void protected function setUp(): void
{ {
$this->repo = $this->getEntityManager()->getRepository(Visit::class); $this->repo = $this->getEntityManager()->getRepository(Visit::class);
$this->relationResolver = new PersistenceShortUrlRelationResolver($this->getEntityManager()); $this->relationResolver = new PersistenceShortUrlRelationResolver($this->getEntityManager());

View File

@ -16,7 +16,7 @@ class TagsPaginatorAdapterTest extends DatabaseTestCase
{ {
private TagRepository $repo; private TagRepository $repo;
protected function beforeEach(): void protected function setUp(): void
{ {
$this->repo = $this->getEntityManager()->getRepository(Tag::class); $this->repo = $this->getEntityManager()->getRepository(Tag::class);
} }