Code Duplication    Length = 8-8 lines in 2 locations

module/Rest/test/Middleware/PathVersionMiddlewareTest.php 2 locations

@@ 26-33 (lines=8) @@
23
    /**
24
     * @test
25
     */
26
    public function whenVersionIsProvidedRequestRemainsUnchanged()
27
    {
28
        $request = ServerRequestFactory::fromGlobals()->withUri(new Uri('/rest/v2/foo'));
29
        $test = $this;
30
        $this->middleware->__invoke($request, new Response(), function ($req) use ($request, $test) {
31
            $test->assertSame($request, $req);
32
        });
33
    }
34
35
    /**
36
     * @test
@@ 51-58 (lines=8) @@
48
    /**
49
     * @test
50
     */
51
    public function nonRestPathsAreNotProcessed()
52
    {
53
        $request = ServerRequestFactory::fromGlobals()->withUri(new Uri('/non-rest'));
54
        $test = $this;
55
        $this->middleware->__invoke($request, new Response(), function ($req) use ($request, $test) {
56
            $test->assertSame($request, $req);
57
        });
58
    }
59
}
60