mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
DX: Fix HouseholdApiControllerTest.php
This commit is contained in:
parent
304bf4258b
commit
93b189b091
@ -137,20 +137,17 @@ final class HouseholdApiControllerTest extends WebTestCase
|
|||||||
$qb = self::$container->get(EntityManagerInterface::class)
|
$qb = self::$container->get(EntityManagerInterface::class)
|
||||||
->createQueryBuilder();
|
->createQueryBuilder();
|
||||||
|
|
||||||
$period = $qb
|
$personIds = $qb
|
||||||
->select('ap')
|
->select("p.id AS pid")
|
||||||
->from(AccompanyingPeriod::class, 'ap')
|
->from(Person::class, 'p')
|
||||||
->where(
|
->where(
|
||||||
$qb->expr()->gte('SIZE(ap.participations)', 2)
|
$qb->expr()->gte('SIZE(p.accompanyingPeriodParticipations)', 2)
|
||||||
)
|
)
|
||||||
->getQuery()
|
->getQuery()
|
||||||
->setMaxResults(1)
|
->setMaxResults(1)
|
||||||
->getSingleResult();
|
->getSingleResult();
|
||||||
|
|
||||||
$person = $period->getParticipations()
|
yield [$personIds['pid']];
|
||||||
->first()->getPerson();
|
|
||||||
|
|
||||||
yield [$person->getId()];
|
|
||||||
|
|
||||||
self::ensureKernelShutdown();
|
self::ensureKernelShutdown();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user