From 6a54316f46f9389d5d68d71ba7493a5ad0e717b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Thu, 17 Jun 2021 14:20:47 +0200 Subject: [PATCH] fix data provider which randomly generate invalid data in test --- .../Tests/Controller/AccompanyingCourseApiControllerTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/AccompanyingCourseApiControllerTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/AccompanyingCourseApiControllerTest.php index a41e570a5..78e47de6d 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Controller/AccompanyingCourseApiControllerTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Controller/AccompanyingCourseApiControllerTest.php @@ -555,7 +555,8 @@ class AccompanyingCourseApiControllerTest extends WebTestCase $personIds = $em->createQuery("SELECT p.id FROM ". Person::class." p ". - " WHERE p.center = :center") + " WHERE p.center = :center ". + " AND SIZE(p.accompanyingPeriodParticipations) > 0 ") ->setParameter('center', $center) ->setMaxResults($maxResults) ->getScalarResult();