mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-01-09 14:07:25 +01:00
Optimized Tests for user controller
This commit is contained in:
parent
7af1a16dde
commit
caa5f9aec4
@ -24,17 +24,23 @@ class UserControllerTest extends TestCase
|
|||||||
|
|
||||||
public function testLogout(): void
|
public function testLogout(): void
|
||||||
{
|
{
|
||||||
$this->assertEquals(true, $this->userController->logout()->isSuccessful());
|
$client = static::createClient();
|
||||||
|
$client->request('GET', '/user/logout');
|
||||||
|
$this->assertEquals(200, $client->getResponse()->getStatusCode());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testLogin(): void
|
public function testLogin(): void
|
||||||
{
|
{
|
||||||
$this->assertEquals(true, $this->userController->login()->isSuccessful());
|
$client = static::createClient();
|
||||||
|
$client->request('GET', '/user/login');
|
||||||
|
$this->assertEquals(200, $client->getResponse()->getStatusCode());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testRegister():void
|
public function testRegister():void
|
||||||
{
|
{
|
||||||
$this->assertEquals(true, $this->userController->register()->isSuccessful());
|
$client = static::createClient();
|
||||||
|
$client->request('GET', '/user/register');
|
||||||
|
$this->assertEquals(200, $client->getResponse()->getStatusCode());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user