| @@ 99-107 (lines=9) @@ | ||
| 96 | /** |
|
| 97 | * |
|
| 98 | */ |
|
| 99 | public function testKey() |
|
| 100 | { |
|
| 101 | $handler = 'my-handler'; |
|
| 102 | $collection = new RouteCollection(); |
|
| 103 | $collection->addRoute(['GET'], '/foo', $handler, ['global']); |
|
| 104 | $collection->addRoute(['GET'], '/bar', $handler, ['global']); |
|
| 105 | $expected = 0; |
|
| 106 | $this->assertEquals($expected, $collection->key()); |
|
| 107 | } |
|
| 108 | ||
| 109 | /** |
|
| 110 | * |
|
| @@ 112-121 (lines=10) @@ | ||
| 109 | /** |
|
| 110 | * |
|
| 111 | */ |
|
| 112 | public function testNext() |
|
| 113 | { |
|
| 114 | $handler = 'my-handler'; |
|
| 115 | $collection = new RouteCollection(); |
|
| 116 | $collection->addRoute(['GET'], '/foo', $handler, ['global']); |
|
| 117 | $collection->addRoute(['GET'], '/bar', $handler, ['global']); |
|
| 118 | $expected = 1; |
|
| 119 | $collection->next(); |
|
| 120 | $this->assertEquals($expected, $collection->key()); |
|
| 121 | } |
|
| 122 | ||
| 123 | /** |
|
| 124 | * |
|
| @@ 126-134 (lines=9) @@ | ||
| 123 | /** |
|
| 124 | * |
|
| 125 | */ |
|
| 126 | public function testCurrent() |
|
| 127 | { |
|
| 128 | $handler = 'my-handler'; |
|
| 129 | $collection = new RouteCollection(); |
|
| 130 | $collection->addRoute(['GET'], '/foo', $handler, ['global']); |
|
| 131 | $collection->addRoute(['GET'], '/bar', $handler, ['global']); |
|
| 132 | $expected = new Route('GET', '/foo', $handler, ['global']); |
|
| 133 | $this->assertEquals($expected, $collection->current()); |
|
| 134 | } |
|
| 135 | ||
| 136 | /** |
|
| 137 | * |
|