mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 15:13:50 +00:00
Merge branch 'master' into notification/completion
This commit is contained in:
@@ -11,7 +11,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace Chill\PersonBundle\Tests\AccompanyingPeriod;
|
||||
|
||||
use Chill\MainBundle\Entity\Center;
|
||||
use Chill\MainBundle\Entity\User;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\PersonBundle\Entity\Person;
|
||||
@@ -45,13 +44,13 @@ final class AccompanyingPeriodConfidentialTest extends WebTestCase
|
||||
|
||||
public function dataGenerateRandomAccompanyingCourse()
|
||||
{
|
||||
// Disabling this dataprovider to avoid having errors while running the test.
|
||||
return yield from [];
|
||||
$maxGenerated = 3;
|
||||
$maxResults = $maxGenerated * 8;
|
||||
|
||||
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 +79,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()];
|
||||
@@ -95,6 +93,10 @@ final class AccompanyingPeriodConfidentialTest extends WebTestCase
|
||||
*/
|
||||
public function testRemoveUserWhenConfidential(int $periodId)
|
||||
{
|
||||
$this->markTestIncomplete(
|
||||
'Marked as incomplete because of a problem in the dataprovider, at line 81.'
|
||||
);
|
||||
|
||||
$period = self::$container->get(AccompanyingPeriodRepository::class)
|
||||
->find($periodId);
|
||||
$em = self::$kernel->getContainer()->get('doctrine.orm.entity_manager');
|
||||
|
Reference in New Issue
Block a user