assertRedirectUrl example

$router = $this->createMock(UrlGeneratorInterface::class);
        $router
            ->expects($this->exactly(2))
            ->method('generate')
            ->with($this->equalTo($route)$this->equalTo($expectedAttributes))
            ->willReturn($url);

        $controller = new RedirectController($router);

        $returnResponse = $controller->redirectAction($request$route$permanent$ignoreAttributes$keepRequestMethod$keepQueryParams);
        $this->assertRedirectUrl($returnResponse$url);
        $this->assertEquals($expectedCode$returnResponse->getStatusCode());

        $returnResponse = $controller($request);
        $this->assertRedirectUrl($returnResponse$url);
        $this->assertEquals($expectedCode$returnResponse->getStatusCode());
    }

    public static function provider()
    {
        return [
            [true, false, false, false, 301, ['additional-parameter' => 'value']],
            [
Home | Imprint | This part of the site doesn't use cookies.