public function testRedirectName()
{
$root = $this->getDm()->find(null, self::ROUTE_ROOT);
$redirect = new RedirectRoute();
$redirect->setPosition($root, 'redirectName');
$redirect->setRouteName('symfony_route');
$redirect->setParameters(array('param' => 7));
// parameters should be ignored in this case
$this->getDm()->persist($redirect);
$this->getDm()->flush();
$this->getDm()->clear();
$redirect = $this->getDm()->find(null, self::ROUTE_ROOT . '/redirectName');
$response = $this->controller->redirectAction($redirect);
$this->assertInstanceOf('Symfony\\Component\\HttpFoundation\\RedirectResponse', $response);
$this->assertSame(302, $response->getStatusCode());
$this->assertSame('http://localhost/symfony_route_test?param=7', $response->getTargetUrl());
}