eZ\Bundle\EzPublishCoreBundle\Tests\Routing\DefaultRouterTest::testMatchRequestWithSemanticPathinfo PHP Method

testMatchRequestWithSemanticPathinfo() public method

    public function testMatchRequestWithSemanticPathinfo()
    {
        $pathinfo = '/siteaccess/foo/bar';
        $semanticPathinfo = '/foo/bar';
        $request = Request::create($pathinfo);
        $request->attributes->set('semanticPathinfo', $semanticPathinfo);
        /** @var \PHPUnit_Framework_MockObject_MockObject|DefaultRouter $router */
        $router = $this->generateRouter(array('match'));
        $matchedParameters = array('_controller' => 'AcmeBundle:myAction');
        $router->expects($this->once())->method('match')->with($semanticPathinfo)->will($this->returnValue($matchedParameters));
        $this->assertSame($matchedParameters, $router->matchRequest($request));
    }