Code Duplication    Length = 15-15 lines in 2 locations

tests/unit/Controllers/DefaultControllerHelperTest.php 2 locations

@@ 265-279 (lines=15) @@
262
    /**
263
     * @test
264
     */
265
    public function shouldUseDefaultCodeWhenRedirectingToRoute()
266
    {
267
        $this->urlGenerator->expects($this->once())->method('generate')->with(
268
            $this->equalTo('some_route'),
269
            $this->equalTo(['foo' => 'bar']),
270
            $this->equalTo(UrlGeneratorInterface::ABSOLUTE_URL)
271
        )->willReturn("*this-is-some-url*");
272
273
        $expectedResponse = new RedirectResponse("*this-is-some-url*", 301);
274
275
        /** @var RedirectResponse $actualResponse */
276
        $actualResponse = $this->controllerHelper->redirectToRoute("some_route", ['foo' => 'bar']);
277
278
        $this->assertEquals($expectedResponse, $actualResponse);
279
    }
280
281
    /**
282
     * @test
@@ 284-298 (lines=15) @@
281
    /**
282
     * @test
283
     */
284
    public function shouldRedirectToRoute()
285
    {
286
        $this->urlGenerator->expects($this->once())->method('generate')->with(
287
            $this->equalTo('some_route'),
288
            $this->equalTo(['foo' => 'bar']),
289
            $this->equalTo(UrlGeneratorInterface::ABSOLUTE_URL)
290
        )->willReturn("*this-is-some-url*");
291
292
        $expectedResponse = new RedirectResponse("*this-is-some-url*", 302);
293
294
        /** @var RedirectResponse $actualResponse */
295
        $actualResponse = $this->controllerHelper->redirectToRoute("some_route", ['foo' => 'bar'], 302);
296
297
        $this->assertEquals($expectedResponse, $actualResponse);
298
    }
299
300
    /**
301
     * @test