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