Code Duplication    Length = 10-11 lines in 2 locations

tests/Middleware/RefreshSessionMiddlewareTest.php 2 locations

@@ 47-56 (lines=10) @@
44
    /**
45
     * @test
46
     */
47
    public function itWontGetExecutedWhenResponseIsNot401()
48
    {
49
        $response = new Response(200, [], '{"ok"}');
50
51
        $this->tokenStorage->load(Argument::any())->shouldNotBeCalled();
52
53
        $resultResponse = $this->middleware->__invoke($response);
54
55
        $this->assertSame($response, $resultResponse);
56
    }
57
58
    /**
59
     * @test
@@ 61-71 (lines=11) @@
58
    /**
59
     * @test
60
     */
61
    public function itWontGetExecutedWhenResponseIsNotInsufficientAuthorisation()
62
    {
63
        $body = '{"Error":[{"error_description": "An other error"}]}';
64
        $response = new Response(401, [], $body);
65
66
        $this->tokenStorage->load(Argument::any())->shouldNotBeCalled();
67
68
        $resultResponse = $this->middleware->__invoke($response);
69
70
        $this->assertEquals($response, $resultResponse);
71
    }
72
73
    /**
74
     * @test