Code Duplication    Length = 17-17 lines in 2 locations

src/Tests/Routing/SwaggerRouteLoaderTest.php 2 locations

@@ 155-171 (lines=17) @@
152
    /**
153
     * @test
154
     */
155
    public function routeCollectionWillIncludeSeparateRoutesForSubPaths()
156
    {
157
        $pathDefinitions = [
158
            '/a'     => ['get' => []],
159
            '/a/b'   => ['get' => []],
160
            '/a/b/c' => ['get' => []],
161
        ];
162
163
        $this->documentMock
164
            ->expects($this->once())
165
            ->method('getPathDefinitions')
166
            ->willReturn($pathDefinitions);
167
168
        $routes = $this->loader->load(self::DOCUMENT_PATH);
169
170
        $this->assertCount(3, $routes);
171
    }
172
173
    /**
174
     * @test
@@ 204-220 (lines=17) @@
201
    /**
202
     * @test
203
     */
204
    public function routeCollectionWillIncludeSeparateRoutesForSubPathMethodCombinations()
205
    {
206
        $pathDefinitions = [
207
            '/a'     => ['get' => []],
208
            '/a/b'   => ['get' => [], 'post' => []],
209
            '/a/b/c' => ['put' => []],
210
        ];
211
212
        $this->documentMock
213
            ->expects($this->once())
214
            ->method('getPathDefinitions')
215
            ->willReturn($pathDefinitions);
216
217
        $routes = $this->loader->load(self::DOCUMENT_PATH);
218
219
        $this->assertCount(4, $routes);
220
    }
221
222
    /**
223
     * @test