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 = (object)[
158
            '/a'     => (object)['get' => (object)[]],
159
            '/a/b'   => (object)['get' => (object)[]],
160
            '/a/b/c' => (object)['get' => (object)[]],
161
        ];
162
163
        $this->documentMock
164
            ->expects($this->any())
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
@@ 285-301 (lines=17) @@
282
    /**
283
     * @test
284
     */
285
    public function routeCollectionWillIncludeSeparateRoutesForSubPathMethodCombinations()
286
    {
287
        $pathDefinitions = (object)[
288
            '/a'     => (object)['get' => (object)[]],
289
            '/a/b'   => (object)['get' => (object)[], 'post' => (object)[]],
290
            '/a/b/c' => (object)['put' => (object)[]],
291
        ];
292
293
        $this->documentMock
294
            ->expects($this->any())
295
            ->method('getPathDefinitions')
296
            ->willReturn($pathDefinitions);
297
298
        $routes = $this->loader->load(self::DOCUMENT_PATH);
299
300
        $this->assertCount(4, $routes);
301
    }
302
303
    /**
304
     * @test