mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2026-01-14 21:31:23 +00:00
Remove deprecation linked to kernel shutdown
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user