migrate test cases to use pestphp syntax
All checks were successful
/ ls (pull_request) Successful in 1m27s
/ ls (push) Successful in 1m24s
/ ls (release) Successful in 49s

This commit is contained in:
lubiana 2025-02-01 22:37:07 +01:00
parent af9354ff22
commit 9c98735db7
Signed by: lubiana
SSH key fingerprint: SHA256:vW1EA0fRR3Fw+dD/sM0K+x3Il2gSry6YRYHqOeQwrfk
14 changed files with 365 additions and 415 deletions

View file

@ -17,11 +17,11 @@ use function str_contains;
abstract class DbWebTest extends WebTestCase
{
abstract public function getEntityClass(): string;
protected KernelBrowser $client;
protected EntityManagerInterface $manager;
protected EntityRepository $repository;
protected string $entityClass = '';
protected string $path = '';
#[Override]
protected function setUp(): void
@ -33,10 +33,6 @@ abstract class DbWebTest extends WebTestCase
->getAllMetadata();
$schemaTool->dropDatabase();
$schemaTool->updateSchema($metadata);
if ($this->getEntityClass() !== '') {
$this->repository = $this->manager->getRepository($this->getEntityClass());
}
}
protected function generateOldUlid(int $daysToSubtract = 10): Ulid
@ -56,4 +52,15 @@ abstract class DbWebTest extends WebTestCase
)
);
}
protected function setEntityClass(string $entityClass): void
{
$this->entityClass = $entityClass;
$this->repository = $this->manager->getRepository($this->entityClass);
}
protected function setPath(string $path): void
{
$this->path = $path;
}
}