mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Fix test error when no periods
This commit is contained in:
parent
9d478c0f01
commit
8c635c24af
@ -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++;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user