mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-04 13:54:59 +00:00
Use Person::centerHistory
to load fixtures with given center
This commit is contained in:
@@ -82,8 +82,8 @@ final class AccompanyingCourseApiControllerTest extends WebTestCase
|
||||
->findOneBy(['name' => 'Center A']);
|
||||
|
||||
$personIds = $em->createQuery('SELECT p.id FROM ' .
|
||||
Person::class . ' p ' .
|
||||
' WHERE p.center = :center')
|
||||
Person::class . ' p JOIN p.centerCurrent cc' .
|
||||
' WHERE cc.center = :center')
|
||||
->setParameter('center', $center)
|
||||
->setMaxResults(100)
|
||||
->getScalarResult();
|
||||
@@ -127,9 +127,10 @@ final class AccompanyingCourseApiControllerTest extends WebTestCase
|
||||
->from(Person::class, 'p')
|
||||
->join('p.accompanyingPeriodParticipations', 'participation')
|
||||
->join('participation.accompanyingPeriod', 'ap')
|
||||
->join('p.centerCurrent', 'cc')
|
||||
->where(
|
||||
$qb->expr()->eq(
|
||||
'p.center',
|
||||
'cc.center',
|
||||
':center'
|
||||
)
|
||||
)
|
||||
@@ -191,9 +192,10 @@ final class AccompanyingCourseApiControllerTest extends WebTestCase
|
||||
->from(Person::class, 'p')
|
||||
->join('p.accompanyingPeriodParticipations', 'participation')
|
||||
->join('participation.accompanyingPeriod', 'ap')
|
||||
->join('p.centerCurrent', 'cc')
|
||||
->where(
|
||||
$qb->expr()->eq(
|
||||
'p.center',
|
||||
'cc.center',
|
||||
':center'
|
||||
)
|
||||
)
|
||||
@@ -252,9 +254,10 @@ final class AccompanyingCourseApiControllerTest extends WebTestCase
|
||||
->from(Person::class, 'p')
|
||||
->join('p.accompanyingPeriodParticipations', 'participation')
|
||||
->join('participation.accompanyingPeriod', 'ap')
|
||||
->join('p.centerCurrent', 'cc')
|
||||
->where(
|
||||
$qb->expr()->eq(
|
||||
'p.center',
|
||||
'cc.center',
|
||||
':center'
|
||||
)
|
||||
)
|
||||
|
Reference in New Issue
Block a user