2018-09-05 16:00:12 +02:00
|
|
|
<?php
|
2018-09-05 19:12:57 +02:00
|
|
|
namespace App\Tests\Unit\Controller;
|
2018-09-05 16:00:12 +02:00
|
|
|
|
|
|
|
use App\Controller\UserController;
|
|
|
|
use App\Controller\UserControllerInterface;
|
2018-09-06 08:46:49 +02:00
|
|
|
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
2018-09-05 16:00:12 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
* @author kevinfrantz
|
|
|
|
*
|
|
|
|
*/
|
2018-09-06 08:46:49 +02:00
|
|
|
class UserControllerTest extends WebTestCase
|
2018-09-05 16:00:12 +02:00
|
|
|
{
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
* @var UserControllerInterface
|
|
|
|
*/
|
|
|
|
protected $userController;
|
|
|
|
|
|
|
|
public function setUp():void{
|
|
|
|
$this->userController = new UserController();
|
|
|
|
}
|
|
|
|
|
|
|
|
public function testLogout(): void
|
|
|
|
{
|
2018-09-05 19:23:39 +02:00
|
|
|
$client = static::createClient();
|
|
|
|
$client->request('GET', '/user/logout');
|
|
|
|
$this->assertEquals(200, $client->getResponse()->getStatusCode());
|
2018-09-05 16:00:12 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public function testLogin(): void
|
|
|
|
{
|
2018-09-05 19:23:39 +02:00
|
|
|
$client = static::createClient();
|
|
|
|
$client->request('GET', '/user/login');
|
|
|
|
$this->assertEquals(200, $client->getResponse()->getStatusCode());
|
2018-09-05 16:00:12 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public function testRegister():void
|
|
|
|
{
|
2018-09-05 19:23:39 +02:00
|
|
|
$client = static::createClient();
|
|
|
|
$client->request('GET', '/user/register');
|
|
|
|
$this->assertEquals(200, $client->getResponse()->getStatusCode());
|
2018-09-05 16:00:12 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|