mirror of
				https://github.com/kevinveenbirkenbach/infinito.git
				synced 2025-11-04 11:17:58 +00:00 
			
		
		
		
	Optimized test structure
This commit is contained in:
		
							
								
								
									
										37
									
								
								application/tests/unit/Controller/DefaultControllerTest.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										37
									
								
								application/tests/unit/Controller/DefaultControllerTest.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,37 @@
 | 
			
		||||
<?php
 | 
			
		||||
namespace App\Tests\Unit\Controller;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
 | 
			
		||||
use App\Controller\DefaultControllerInterface;
 | 
			
		||||
use App\Controller\DefaultController;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 *
 | 
			
		||||
 * @author kevinfrantz
 | 
			
		||||
 *        
 | 
			
		||||
 */
 | 
			
		||||
class DefaultControllerTest extends WebTestCase
 | 
			
		||||
{
 | 
			
		||||
    /**
 | 
			
		||||
     * @var DefaultControllerInterface
 | 
			
		||||
     */
 | 
			
		||||
    protected $defaultController;
 | 
			
		||||
    
 | 
			
		||||
    public function setUp():void{
 | 
			
		||||
        $this->defaultController = new DefaultController();    
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    public function testHomepage():void{
 | 
			
		||||
        $client = static::createClient();
 | 
			
		||||
        $client->request('GET', '/');
 | 
			
		||||
        $this->assertEquals(200, $client->getResponse()->getStatusCode());
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    public function testImprint():void{
 | 
			
		||||
        $client = static::createClient();
 | 
			
		||||
        $client->request('GET', '/imprint');
 | 
			
		||||
        $this->assertEquals(200, $client->getResponse()->getStatusCode());
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user