Compare commits

...

1 Commits

Author SHA1 Message Date
Marc Ducobu
8c635c24af Fix test error when no periods 2021-07-23 12:11:58 +02:00

View File

@@ -529,8 +529,9 @@ class AccompanyingCourseApiControllerTest extends WebTestCase
->find($id);
$periods = $person->getAccompanyingPeriods();
yield [$periods[\array_rand($periods)], $socialIssues[\array_rand($socialIssues)] ];
if(sizeof($periods) > 0) {
yield [$periods[\array_rand($periods)], $socialIssues[\array_rand($socialIssues)] ];
}
$nbGenerated++;
}
}