Remove deprecation linked to kernel shutdown

This commit is contained in:
2023-08-31 18:36:37 +02:00
parent 7c58880139
commit 6f11dffcbd
23 changed files with 166 additions and 85 deletions

View File

@@ -19,6 +19,7 @@ use Chill\PersonBundle\Entity\Person;
use DateTime;
use Doctrine\ORM\EntityManagerInterface;
use Iterator;
use Symfony\Bundle\FrameworkBundle\KernelBrowser;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
use function array_pop;
use function count;
@@ -32,13 +33,18 @@ final class AccompanyingCourseControllerTest extends WebTestCase
{
use PrepareClientTrait;
private KernelBrowser $client;
protected function setUp(): void
{
parent::setUp();
self::bootKernel();
$this->client = $this->getClientAuthenticated();
}
protected function tearDown(): void
{
self::ensureKernelShutdown();
}
public function dataGenerateRandomUsers(): Iterator
{
self::bootKernel();
@@ -61,6 +67,8 @@ final class AccompanyingCourseControllerTest extends WebTestCase
->getScalarResult();
yield [array_pop($personIds), array_pop($personIds)];
self::ensureKernelShutdown();
}
public function testNewWithoutUsers()