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

@@ -26,13 +26,12 @@ final class AddressControllerTest extends \Symfony\Bundle\FrameworkBundle\Test\W
private KernelBrowser $client;
protected function setUp(): void
protected function tearDown(): void
{
self::bootKernel();
$this->client = $this->getClientAuthenticated();
self::ensureKernelShutdown();
}
public function generateAddressIds()
public function generateAddressIds(): iterable
{
self::bootKernel();
$em = self::$container->get(EntityManagerInterface::class);
@@ -46,6 +45,8 @@ final class AddressControllerTest extends \Symfony\Bundle\FrameworkBundle\Test\W
foreach ($addresses as $a) {
yield [$a->getId()];
}
self::ensureKernelShutdown();
}
/**
@@ -53,6 +54,7 @@ final class AddressControllerTest extends \Symfony\Bundle\FrameworkBundle\Test\W
*/
public function testDuplicate(int $addressId)
{
$this->client = $this->getClientAuthenticated();
$this->client->request('POST', "/api/1.0/main/address/{$addressId}/duplicate.json");
$this->assertResponseIsSuccessful('test that duplicate is successful');