mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-28 18:43:49 +00:00
Fix kernel booting problem on Aggregator and Filter tests
This commit is contained in:
@@ -50,8 +50,9 @@ final class AgentFilterTest extends AbstractFilterTest
|
||||
return $this->filter;
|
||||
}
|
||||
|
||||
public function getFormData(): array
|
||||
public function getFormData(): iterable
|
||||
{
|
||||
self::bootKernel();
|
||||
$em = self::$container->get(EntityManagerInterface::class);
|
||||
|
||||
$array = $em->createQueryBuilder()
|
||||
@@ -63,26 +64,26 @@ final class AgentFilterTest extends AbstractFilterTest
|
||||
$data = [];
|
||||
|
||||
foreach ($array as $a) {
|
||||
$data[] = [
|
||||
yield [
|
||||
'accepted_agents' => $a,
|
||||
];
|
||||
}
|
||||
|
||||
return $data;
|
||||
self::ensureKernelShutdown();
|
||||
}
|
||||
|
||||
public function getQueryBuilders(): array
|
||||
public function getQueryBuilders(): iterable
|
||||
{
|
||||
if (null === self::$kernel) {
|
||||
self::bootKernel();
|
||||
}
|
||||
self::bootKernel();
|
||||
|
||||
$em = self::$container->get(EntityManagerInterface::class);
|
||||
|
||||
return [
|
||||
yield
|
||||
$em->createQueryBuilder()
|
||||
->select('cal.id')
|
||||
->from(Calendar::class, 'cal'),
|
||||
];
|
||||
->from(Calendar::class, 'cal')
|
||||
;
|
||||
|
||||
self::ensureKernelShutdown();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user