eZ\Publish\Core\MVC\Symfony\Routing\Tests\UrlAliasGeneratorTest::testDoGenerate PHP Method

testDoGenerate() public method

public testDoGenerate ( eZ\Publish\API\Repository\Values\Content\URLAlias $urlAlias, array $parameters, $expected )
$urlAlias eZ\Publish\API\Repository\Values\Content\URLAlias
$parameters array
    public function testDoGenerate(URLAlias $urlAlias, array $parameters, $expected)
    {
        $location = new Location(array('id' => 123));
        $this->urlAliasService->expects($this->once())->method('listLocationAliases')->with($location, false)->will($this->returnValue(array($urlAlias)));
        $this->urlAliasGenerator->setSiteAccess(new SiteAccess('test', 'fake', $this->getMock('eZ\\Publish\\Core\\MVC\\Symfony\\SiteAccess\\URILexer')));
        $this->assertSame($expected, $this->urlAliasGenerator->doGenerate($location, $parameters));
    }