mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-06 06:44:59 +00:00
fix container operations within tests
This commit is contained in:
@@ -42,7 +42,7 @@ class NewsItemControllerTest extends WebTestCase
|
||||
public static function tearDownAfterClass(): void
|
||||
{
|
||||
self::bootKernel();
|
||||
$em = self::$container->get(EntityManagerInterface::class);
|
||||
$em = self::getContainer()->get(EntityManagerInterface::class);
|
||||
|
||||
foreach (self::$entitiesToDelete as [$class, $id]) {
|
||||
$entity = $em->find($class, $id);
|
||||
@@ -58,7 +58,7 @@ class NewsItemControllerTest extends WebTestCase
|
||||
public static function generateNewsItemIds(): iterable
|
||||
{
|
||||
self::bootKernel();
|
||||
$em = self::$container->get(EntityManagerInterface::class);
|
||||
$em = self::getContainer()->get(EntityManagerInterface::class);
|
||||
|
||||
$newsItem = new NewsItem();
|
||||
$newsItem->setTitle('Lorem Ipsum');
|
||||
|
Reference in New Issue
Block a user