Code Duplication    Length = 15-15 lines in 2 locations

tests/unit/Controllers/DefaultControllerHelperTest.php 2 locations

@@ 155-169 (lines=15) @@
152
    /**
153
     * @test
154
     */
155
    public function shouldUseDefaultCodeWhenRedirectingToRoute()
156
    {
157
        $this->urlGenerator->expects($this->once())->method('generate')->with(
158
            $this->equalTo('some_route'),
159
            $this->equalTo(['foo' => 'bar']),
160
            $this->equalTo(UrlGeneratorInterface::ABSOLUTE_URL)
161
        )->willReturn("*this-is-some-url*");
162
163
        $expectedResponse = new RedirectResponse("*this-is-some-url*", 301);
164
165
        /** @var RedirectResponse $actualResponse */
166
        $actualResponse = $this->controllerHelper->redirectToRoute("some_route", ['foo' => 'bar']);
167
168
        $this->assertEquals($expectedResponse, $actualResponse);
169
    }
170
171
    /**
172
     * @test
@@ 174-188 (lines=15) @@
171
    /**
172
     * @test
173
     */
174
    public function shouldRedirectToRoute()
175
    {
176
        $this->urlGenerator->expects($this->once())->method('generate')->with(
177
            $this->equalTo('some_route'),
178
            $this->equalTo(['foo' => 'bar']),
179
            $this->equalTo(UrlGeneratorInterface::ABSOLUTE_URL)
180
        )->willReturn("*this-is-some-url*");
181
182
        $expectedResponse = new RedirectResponse("*this-is-some-url*", 302);
183
184
        /** @var RedirectResponse $actualResponse */
185
        $actualResponse = $this->controllerHelper->redirectToRoute("some_route", ['foo' => 'bar'], 302);
186
187
        $this->assertEquals($expectedResponse, $actualResponse);
188
    }
189
190
    /**
191
     * @test