mirror of
				https://github.com/kevinveenbirkenbach/infinito.git
				synced 2025-10-31 01:09:41 +00:00 
			
		
		
		
	Implemented tests to check if standard routes are reachable
This commit is contained in:
		| @@ -2,13 +2,14 @@ | ||||
| namespace App\Controller; | ||||
|  | ||||
| use PHPUnit\Framework\TestCase; | ||||
| use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; | ||||
|  | ||||
| /** | ||||
|  * | ||||
|  * @author kevinfrantz | ||||
|  *         | ||||
|  */ | ||||
| class DefaultControllerTest extends TestCase | ||||
| class DefaultControllerTest extends WebTestCase | ||||
| { | ||||
|     /** | ||||
|      * @var DefaultControllerInterface | ||||
| @@ -20,11 +21,15 @@ class DefaultControllerTest extends TestCase | ||||
|     } | ||||
|      | ||||
|     public function testHomepage():void{ | ||||
|         $this->assertEquals(true, $this->defaultController->homepage()->isSuccessful()); | ||||
|         $client = static::createClient(); | ||||
|         $client->request('GET', '/'); | ||||
|         $this->assertEquals(200, $client->getResponse()->getStatusCode()); | ||||
|     } | ||||
|      | ||||
|     public function testImprint():void{ | ||||
|         $this->assertEquals(true, $this->defaultController->imprint()->isSuccessful()); | ||||
|         $client = static::createClient(); | ||||
|         $client->request('GET', '/imprint'); | ||||
|         $this->assertEquals(200, $client->getResponse()->getStatusCode()); | ||||
|     } | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user