Contao\CoreBundle\Test\TestCase::mockRouter PHP Method

mockRouter() protected method

Mocks a router returning the given URL.
protected mockRouter ( string $url ) : Symfony\Component\Routing\RouterInterface | PHPUnit_Framework_MockObject_MockObject
$url string
return Symfony\Component\Routing\RouterInterface | PHPUnit_Framework_MockObject_MockObject
    protected function mockRouter($url)
    {
        $router = $this->getMock('Symfony\\Component\\Routing\\RouterInterface');
        $router->expects($this->any())->method('generate')->willReturn($url);
        return $router;
    }