eZ\Publish\Core\Repository\Tests\Service\Mock\UrlAliasTest::testReverseLookupWithShowAllTranslations PHP Method

testReverseLookupWithShowAllTranslations() public method

Test for the reverseLookup() method.
    public function testReverseLookupWithShowAllTranslations()
    {
        $spiUrlAlias = $this->getSpiUrlAlias();
        $urlAliasService = $this->getRepository()->getURLAliasService();
        $configuration = array('prioritizedLanguageList' => array('fre-FR'), 'showAllTranslations' => true);
        $this->setConfiguration($urlAliasService, $configuration);
        $urlAliasHandler = $this->getPersistenceMockHandler('Content\\UrlAlias\\Handler');
        $urlAliasHandler->expects($this->once())->method('listURLAliasesForLocation')->with($this->equalTo(42), $this->equalTo(false))->will($this->returnValue(array($spiUrlAlias)));
        $location = $this->getLocationStub();
        $urlAlias = $urlAliasService->reverseLookup($location);
        self::assertEquals('/jedan/dva/tri', $urlAlias->path);
    }
UrlAliasTest