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->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
@@ 202-218 (lines=17) @@
199
    /**
200
     * @test
201
     */
202
    public function routeCollectionWillIncludeSeparateRoutesForSubPathMethodCombinations()
203
    {
204
        $pathDefinitions = (object)[
205
            '/a'     => (object)['get' => (object)[]],
206
            '/a/b'   => (object)['get' => (object)[], 'post' => (object)[]],
207
            '/a/b/c' => (object)['put' => (object)[]],
208
        ];
209
210
        $this->documentMock
211
            ->expects($this->once())
212
            ->method('getPathDefinitions')
213
            ->willReturn($pathDefinitions);
214
215
        $routes = $this->loader->load(self::DOCUMENT_PATH);
216
217
        $this->assertCount(4, $routes);
218
    }
219
220
    /**
221
     * @test