Add fields for upsert person

This commit is contained in:
Boris Waaub
2026-04-10 10:06:24 +00:00
committed by Julien Fastré
parent ac1ae2a3c6
commit aa54e82c6c
34 changed files with 720 additions and 568 deletions

View File

@@ -45,8 +45,12 @@ final class CalendarControllerTest extends WebTestCase
/**
* @dataProvider provideAccompanyingPeriod
*/
public function testList(int $accompanyingPeriodId)
public function testList(?int $accompanyingPeriodId)
{
if (null === $accompanyingPeriodId) {
$this->markTestSkipped('No AccompanyingPeriod matching criteria found in database.');
}
$this->client->request(
Request::METHOD_GET,
sprintf('/fr/calendar/calendar/by-period/%d', $accompanyingPeriodId)
@@ -58,8 +62,12 @@ final class CalendarControllerTest extends WebTestCase
/**
* @dataProvider provideAccompanyingPeriod
*/
public function testNew(int $accompanyingPeriodId)
public function testNew(?int $accompanyingPeriodId)
{
if (null === $accompanyingPeriodId) {
$this->markTestSkipped('No AccompanyingPeriod matching criteria found in database.');
}
$this->client->request(
Request::METHOD_GET,
sprintf('/fr/calendar/calendar/new?accompanying_period_id=%d', $accompanyingPeriodId)
@@ -88,6 +96,17 @@ final class CalendarControllerTest extends WebTestCase
->getQuery()
->getSingleScalarResult();
self::ensureKernelShutdown();
if (0 === $nb) {
yield [null];
return;
}
self::bootKernel();
$em = self::getContainer()->get(EntityManagerInterface::class);
yield [$em->createQueryBuilder()
->from(AccompanyingPeriod::class, 'ac')
->select('ac.id')