You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
785 B
36 lines
785 B
<?php
|
|
|
|
namespace TestController;
|
|
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
use Controller\FrontController;
|
|
|
|
class FrontControllerTest extends TestCase
|
|
{
|
|
private FrontController $frontController;
|
|
|
|
public function setUp(): void
|
|
{
|
|
$this->frontController = new FrontController();
|
|
}
|
|
|
|
public function testRouterInstance(): void
|
|
{
|
|
$this->assertInstanceOf('\Config\AltoRouter', $this->frontController->getRouter());
|
|
}
|
|
|
|
public function testRightsInstance(): void
|
|
{
|
|
$this->assertIsArray($this->frontController->getRights());
|
|
}
|
|
|
|
public function testRunMethod(): void
|
|
{
|
|
$this->expectOutputString('');
|
|
$_SERVER['BASE_URI'] = '/';
|
|
$_SESSION['role'] = 'Candidate';
|
|
$this->frontController->run();
|
|
}
|
|
}
|