public function testMatchRequestResourceWithRedirect()
{
$pathInfo = '/hello_content/hello_search';
$destination = '/content/search';
$urlAlias = new URLAlias(array('destination' => $destination, 'path' => $pathInfo, 'type' => UrlAlias::RESOURCE, 'forward' => true));
$request = $this->getRequestByPathInfo($pathInfo);
$this->urlAliasService->expects($this->once())->method('lookup')->with($pathInfo)->will($this->returnValue($urlAlias));
$expected = array('_route' => UrlAliasRouter::URL_ALIAS_ROUTE_NAME);
$this->assertEquals($expected, $this->router->matchRequest($request));
$this->assertTrue($request->attributes->get('needsRedirect'));
$this->assertSame($destination, $request->attributes->get('semanticPathinfo'));
}