mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2026-04-11 07:23:44 +00:00
Add fields for upsert person
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user