fix container operations within tests

This commit is contained in:
2024-04-04 22:26:42 +02:00
parent 92800f5dd0
commit 553fb271e4
6 changed files with 12 additions and 12 deletions

View File

@@ -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');