infinito/application/tests/unit/Controller/DefaultControllerTest.php

37 lines
831 B
PHP
Raw Normal View History

2018-09-05 09:11:08 +02:00
<?php
2018-09-05 19:12:57 +02:00
2018-09-12 22:25:22 +02:00
namespace App\Tests\Unit\Controller;
2018-09-05 09:11:08 +02:00
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
2018-09-05 19:12:57 +02:00
use App\Controller\DefaultController;
2018-09-05 09:11:08 +02:00
/**
* @author kevinfrantz
*/
class DefaultControllerTest extends WebTestCase
2018-09-05 09:11:08 +02:00
{
2018-09-05 16:00:12 +02:00
/**
2018-09-21 19:28:57 +02:00
* @var DefaultController
2018-09-05 16:00:12 +02:00
*/
2018-09-05 09:11:08 +02:00
protected $defaultController;
2018-09-12 22:25:22 +02:00
public function setUp(): void
{
$this->defaultController = new DefaultController();
2018-09-05 09:11:08 +02:00
}
2018-09-12 22:25:22 +02:00
public function testHomepage(): void
{
$client = static::createClient();
$client->request('GET', '/');
$this->assertEquals(200, $client->getResponse()->getStatusCode());
2018-09-05 09:11:08 +02:00
}
2018-09-12 22:25:22 +02:00
public function testImprint(): void
{
$client = static::createClient();
$client->request('GET', '/imprint');
$this->assertEquals(200, $client->getResponse()->getStatusCode());
2018-09-05 09:11:08 +02:00
}
}