Contao\CoreBundle\Test\TestCase::mockRouter PHP 메소드

mockRouter() 보호된 메소드

Mocks a router returning the given URL.
protected mockRouter ( string $url ) : Symfony\Component\Routing\RouterInterface | PHPUnit_Framework_MockObject_MockObject
$url string
리턴 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;
    }