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