This commit is contained in:
lubiana 2025-06-29 19:26:29 +02:00
parent bbc56a9af7
commit 1f9562d36b
Signed by: lubiana
SSH key fingerprint: SHA256:vW1EA0fRR3Fw+dD/sM0K+x3Il2gSry6YRYHqOeQwrfk
13 changed files with 525 additions and 507 deletions

View file

@ -18,10 +18,10 @@ use function str_contains;
abstract class DbWebTest extends WebTestCase
{
protected KernelBrowser $client;
protected EntityManagerInterface $manager;
protected EntityRepository $repository;
protected string $entityClass = '';
protected EntityManagerInterface $manager;
protected string $path = '';
protected EntityRepository $repository;
#[Override]
protected function setUp(): void
@ -35,13 +35,6 @@ abstract class DbWebTest extends WebTestCase
$schemaTool->updateSchema($metadata);
}
protected function generateOldUlid(int $daysToSubtract = 10): Ulid
{
$date = (new DateTimeImmutable)->sub(new DateInterval('P' . $daysToSubtract . 'D'));
$ulidString = Ulid::generate($date);
return Ulid::fromString($ulidString);
}
protected function assertElementContainsCount(Crawler $crawler, string $element, int $count, string $text): void
{
$this->assertCount(
@ -53,6 +46,13 @@ abstract class DbWebTest extends WebTestCase
);
}
protected function generateOldUlid(int $daysToSubtract = 10): Ulid
{
$date = (new DateTimeImmutable)->sub(new DateInterval('P' . $daysToSubtract . 'D'));
$ulidString = Ulid::generate($date);
return Ulid::fromString($ulidString);
}
protected function setEntityClass(string $entityClass): void
{
$this->entityClass = $entityClass;