mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
avoid creating client on already booted kernel
This commit is contained in:
parent
d2323e91ca
commit
2ce29f36ff
@ -29,12 +29,7 @@ final class AsideActivityControllerTest extends WebTestCase
|
||||
|
||||
private KernelBrowser $client;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
$this->client = $this->getClientAuthenticated();
|
||||
}
|
||||
|
||||
public function generateAsideActivityId()
|
||||
public function generateAsideActivityId(): iterable
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
@ -67,22 +62,25 @@ final class AsideActivityControllerTest extends WebTestCase
|
||||
*/
|
||||
public function testEditWithoutUsers(int $asideActivityId)
|
||||
{
|
||||
$this->client->request('GET', "/fr/asideactivity/{$asideActivityId}/edit");
|
||||
$client = $this->getClientAuthenticated();
|
||||
$client->request('GET', "/fr/asideactivity/{$asideActivityId}/edit");
|
||||
|
||||
$this->assertEquals(200, $this->client->getResponse()->getStatusCode());
|
||||
$this->assertEquals(200, $client->getResponse()->getStatusCode());
|
||||
}
|
||||
|
||||
public function testIndexWithoutUsers()
|
||||
{
|
||||
$this->client->request('GET', '/fr/asideactivity');
|
||||
$client = $this->getClientAuthenticated();
|
||||
$client->request('GET', '/fr/asideactivity');
|
||||
|
||||
$this->assertEquals(200, $this->client->getResponse()->getStatusCode());
|
||||
$this->assertEquals(200, $client->getResponse()->getStatusCode());
|
||||
}
|
||||
|
||||
public function testNewWithoutUsers()
|
||||
{
|
||||
$this->client->request('GET', '/fr/asideactivity/new');
|
||||
$client = $this->getClientAuthenticated();
|
||||
$client->request('GET', '/fr/asideactivity/new');
|
||||
|
||||
$this->assertEquals(200, $this->client->getResponse()->getStatusCode());
|
||||
$this->assertEquals(200, $client->getResponse()->getStatusCode());
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user