Code Duplication    Length = 19-20 lines in 2 locations

tests/unit/Controllers/GenericExceptionResponseControllerTest.php 2 locations

@@ 79-98 (lines=20) @@
76
    /**
77
     * @test
78
     */
79
    public function shouldOverrideSuccessResponse()
80
    {
81
        $controller = new GenericExceptionResponseController($this->controllerHelper, $this->argumentBuilder, [
82
            'inner-controller' => $this->innerController,
83
            'inner-controller-method' => "serialize",
84
            'success-response' => "Some success!",
85
            'success-response-code' => 234,
86
        ]);
87
88
        $this->innerController->method("serialize")->willReturn(new Response("foo", 205));
89
90
        /** @var Request $request */
91
        $request = $this->createMock(Request::class);
92
93
        /** @var Response $response */
94
        $response = $controller->executeInnerControllerSafely($request);
95
96
        $this->assertEquals("Some success!", $response->getContent());
97
        $this->assertEquals(234, $response->getStatusCode());
98
    }
99
100
    /**
101
     * @test
@@ 103-121 (lines=19) @@
100
    /**
101
     * @test
102
     */
103
    public function shouldOverrideSuccessResponseWithDefaultResponseCode()
104
    {
105
        $controller = new GenericExceptionResponseController($this->controllerHelper, $this->argumentBuilder, [
106
            'inner-controller' => $this->innerController,
107
            'inner-controller-method' => "serialize",
108
            'success-response' => "Some success!",
109
        ]);
110
111
        $this->innerController->method("serialize")->willReturn(new Response("foo", 205));
112
113
        /** @var Request $request */
114
        $request = $this->createMock(Request::class);
115
116
        /** @var Response $response */
117
        $response = $controller->executeInnerControllerSafely($request);
118
119
        $this->assertEquals("Some success!", $response->getContent());
120
        $this->assertEquals(200, $response->getStatusCode());
121
    }
122
123
    /**
124
     * @test