eZ\Publish\Core\MVC\Symfony\Routing\Tests\UrlAliasRouterTest::testGenerateWithContentIdWithMissingMainLocation PHP Method

testGenerateWithContentIdWithMissingMainLocation() public method

    public function testGenerateWithContentIdWithMissingMainLocation()
    {
        $contentId = 456;
        $contentInfo = new ContentInfo(array('id' => $contentId, 'mainLocationId' => null));
        $parameters = array('some' => 'thing');
        $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH;
        $this->contentService->expects($this->once())->method('loadContentInfo')->with($contentId)->will($this->returnValue($contentInfo));
        $this->router->generate(UrlAliasRouter::URL_ALIAS_ROUTE_NAME, $parameters + array('contentId' => $contentId), $referenceType);
    }