mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Fix kernel booting problem on Aggregator and Filter tests
This commit is contained in:
parent
d8062be131
commit
355ed03500
@ -50,8 +50,9 @@ final class AgentFilterTest extends AbstractFilterTest
|
|||||||
return $this->filter;
|
return $this->filter;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getFormData(): array
|
public function getFormData(): iterable
|
||||||
{
|
{
|
||||||
|
self::bootKernel();
|
||||||
$em = self::$container->get(EntityManagerInterface::class);
|
$em = self::$container->get(EntityManagerInterface::class);
|
||||||
|
|
||||||
$array = $em->createQueryBuilder()
|
$array = $em->createQueryBuilder()
|
||||||
@ -63,26 +64,26 @@ final class AgentFilterTest extends AbstractFilterTest
|
|||||||
$data = [];
|
$data = [];
|
||||||
|
|
||||||
foreach ($array as $a) {
|
foreach ($array as $a) {
|
||||||
$data[] = [
|
yield [
|
||||||
'accepted_agents' => $a,
|
'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);
|
$em = self::$container->get(EntityManagerInterface::class);
|
||||||
|
|
||||||
return [
|
yield
|
||||||
$em->createQueryBuilder()
|
$em->createQueryBuilder()
|
||||||
->select('cal.id')
|
->select('cal.id')
|
||||||
->from(Calendar::class, 'cal'),
|
->from(Calendar::class, 'cal')
|
||||||
];
|
;
|
||||||
|
|
||||||
|
self::ensureKernelShutdown();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -40,6 +40,11 @@ abstract class AbstractFilterTest extends KernelTestCase
|
|||||||
$this->prophet = $this->getProphet();
|
$this->prophet = $this->getProphet();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function tearDown(): void
|
||||||
|
{
|
||||||
|
self::ensureKernelShutdown();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* provide data for `testAliasDidNotDisappears`.
|
* provide data for `testAliasDidNotDisappears`.
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user