@@ 141-154 (lines=14) @@ | ||
138 | /** |
|
139 | * @test |
|
140 | */ |
|
141 | public function routeCollectionWillContainOneRouteForEveryPathAndMethod() |
|
142 | { |
|
143 | $this->decriptionMock |
|
144 | ->expects($this->any()) |
|
145 | ->method('getPaths') |
|
146 | ->willReturn( |
|
147 | [ |
|
148 | new Path('/a', [new Operation(uniqid(), '/a', 'get'), new Operation(uniqid(), '/a', 'post')]), |
|
149 | new Path('/b', [new Operation(uniqid(), '/b', 'get')]), |
|
150 | ] |
|
151 | ); |
|
152 | ||
153 | $routes = $this->loader->load(self::DOCUMENT_PATH); |
|
154 | ||
155 | $this->assertCount(3, $routes); |
|
156 | } |
|
157 | ||
@@ 190-205 (lines=16) @@ | ||
187 | /** |
|
188 | * @test |
|
189 | */ |
|
190 | public function routeCollectionWillIncludeSeparateRoutesForSubPaths() |
|
191 | { |
|
192 | $this->decriptionMock |
|
193 | ->expects($this->any()) |
|
194 | ->method('getPaths') |
|
195 | ->willReturn( |
|
196 | [ |
|
197 | new Path('/a', [new Operation(uniqid(), '/a', 'get')]), |
|
198 | new Path('/a/b', [new Operation(uniqid(), '/a/b', 'get')]), |
|
199 | new Path('/a/b/c', [new Operation(uniqid(), '/a/b/c', 'get')]), |
|
200 | ] |
|
201 | ); |
|
202 | ||
203 | ||
204 | $routes = $this->loader->load(self::DOCUMENT_PATH); |
|
205 | ||
206 | $this->assertCount(3, $routes); |
|
207 | } |
|
208 |