Total Complexity | 6 |
Total Lines | 46 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
8 | class RouteCollectionTest extends TestCase |
||
9 | { |
||
10 | use CanMockHandler; |
||
11 | |||
12 | /** @var RouteCollection */ |
||
13 | private $collection; |
||
14 | |||
15 | public function setUp() |
||
16 | { |
||
17 | $this->collection = new RouteCollection(); |
||
18 | } |
||
19 | |||
20 | public function testCanSetAndGetRoutes(): void |
||
21 | { |
||
22 | $route = new Route('GET', '/test', $this->mockHandler()); |
||
23 | |||
24 | $this->collection->set('test', $route); |
||
25 | |||
26 | $this->assertEquals($route, $this->collection->get('test')); |
||
27 | } |
||
28 | |||
29 | public function testCanBeCounted(): void |
||
36 | } |
||
37 | |||
38 | public function testCanBeIterated(): void |
||
46 | } |
||
47 | } |
||
48 | |||
49 | public function testCanDetectNotSetRoute(): void |
||
56 |