Simplified database tests by updating to shlinkio/shlink-test-utils 2

This commit is contained in:
Alejandro Celaya
2021-01-13 20:21:24 +01:00
parent da9e9df4ba
commit c5fc8fbf00
5 changed files with 5 additions and 32 deletions

View File

@@ -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);
}

View File

@@ -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);
}

View File

@@ -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);
}