mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 15:13:50 +00:00
tests: Get rid of PHPUnit deprecations.
This commit is contained in:
@@ -50,8 +50,6 @@ final class AccompanyingPeriodConfidentialTest extends WebTestCase
|
||||
|
||||
self::bootKernel();
|
||||
$em = self::$kernel->getContainer()->get('doctrine.orm.entity_manager');
|
||||
$center = $em->getRepository(Center::class)
|
||||
->findOneBy(['name' => 'Center A']);
|
||||
|
||||
$qb = $em->createQueryBuilder();
|
||||
$personIds = $qb
|
||||
@@ -80,8 +78,7 @@ final class AccompanyingPeriodConfidentialTest extends WebTestCase
|
||||
while ($nbGenerated < $maxGenerated) {
|
||||
$id = array_pop($personIds)['id'];
|
||||
|
||||
$person = $em->getRepository(Person::class)
|
||||
->find($id);
|
||||
$person = $em->getRepository(Person::class)->find($id);
|
||||
$periods = $person->getAccompanyingPeriods();
|
||||
|
||||
yield [array_pop($personIds)['id'], $periods[array_rand($periods)]->getId()];
|
||||
|
Reference in New Issue
Block a user