| Total Complexity | 3 |
| Total Lines | 35 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | class ApplicationTest extends TestCase |
||
| 12 | { |
||
| 13 | protected $app; |
||
| 14 | |||
| 15 | /* @var PHPUnit_Framework_MockObject_MockObject */ |
||
|
|
|||
| 16 | protected $router; |
||
| 17 | |||
| 18 | public function setUp() |
||
| 19 | { |
||
| 20 | $this->router = $this |
||
| 21 | ->getMockBuilder(Router::class) |
||
| 22 | ->disableOriginalConstructor() |
||
| 23 | ->disableOriginalClone() |
||
| 24 | ->disableArgumentCloning() |
||
| 25 | ->disallowMockingUnknownTypes() |
||
| 26 | ->setMethods(['route']) |
||
| 27 | ->getMock(); |
||
| 28 | |||
| 29 | $this->router |
||
| 30 | ->expects($this->once()) |
||
| 31 | ->method('route') |
||
| 32 | ->willReturn(['controller' => 'Default', 'action' => 'notFound', 'params' => []]); |
||
| 33 | |||
| 34 | $this->app = new Application($this->router); |
||
| 35 | } |
||
| 36 | |||
| 37 | public function testRouterIsCalled() |
||
| 40 | } |
||
| 41 | |||
| 42 | public function testHandleRequestReturnsResponse() |
||
| 48 |