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

@@ -11,9 +11,11 @@ declare(strict_types=1);
namespace Chill\CalendarBundle\Tests\Controller;
use Chill\MainBundle\Test\PrepareClientTrait;
use Chill\PersonBundle\Entity\AccompanyingPeriod;
use Chill\PersonBundle\Entity\AccompanyingPeriodParticipation;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Bundle\FrameworkBundle\KernelBrowser;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
use Symfony\Component\HttpFoundation\Request;
use function random_int;
@@ -24,16 +26,21 @@ use function random_int;
*/
final class CalendarControllerTest extends WebTestCase
{
use PrepareClientTrait;
private KernelBrowser $client;
/**
* Setup before each test method (see phpunit doc).
*/
protected function setUp(): void
{
self::bootKernel();
$this->client = self::createClient([], [
'PHP_AUTH_USER' => 'center a_social',
'PHP_AUTH_PW' => 'password',
]);
$this->client = $this->getClientAuthenticated();
}
protected function tearDown(): void
{
self::ensureKernelShutdown();
}
public function provideAccompanyingPeriod(): iterable
@@ -73,6 +80,8 @@ final class CalendarControllerTest extends WebTestCase
->getQuery()
->getSingleScalarResult(),
];
self::ensureKernelShutdown();
}
/**

View File

@@ -48,9 +48,9 @@ final class RemoteCalendarMSGraphSyncControllerTest extends WebTestCase
}
JSON;
protected function setUp(): void
protected function tearDown(): void
{
self::bootKernel();
self::ensureKernelShutdown();
}
public function testSendNotification(): void