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

testDoGenerateNoUrlAlias() public method

    public function testDoGenerateNoUrlAlias()
    {
        $location = new Location(array('id' => 123, 'contentInfo' => new ContentInfo(array('id' => 456))));
        $uri = "/content/location/{$location->id}";
        $this->urlAliasService->expects($this->once())->method('listLocationAliases')->with($location, false)->will($this->returnValue(array()));
        $this->router->expects($this->once())->method('generate')->with(UrlAliasGenerator::INTERNAL_CONTENT_VIEW_ROUTE, array('contentId' => $location->contentId, 'locationId' => $location->id))->will($this->returnValue($uri));
        $this->assertSame($uri, $this->urlAliasGenerator->doGenerate($location, array()));
    }