eZ\Publish\Core\Repository\Tests\Service\Mock\UrlAliasTest::testReverseLookupPath PHP Метод

testReverseLookupPath() публичный Метод

Test for the reverseLookup() method.
public testReverseLookupPath ( $spiUrlAliases, $prioritizedLanguageCodes, $paths, $reverseLookupLanguageCode )
    public function testReverseLookupPath($spiUrlAliases, $prioritizedLanguageCodes, $paths, $reverseLookupLanguageCode)
    {
        $urlAliasService = $this->getRepository()->getURLAliasService();
        $configuration = array('prioritizedLanguageList' => $prioritizedLanguageCodes, 'showAllTranslations' => false);
        $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($spiUrlAliases));
        $location = $this->getLocationStub();
        $urlAlias = $urlAliasService->reverseLookup($location);
        self::assertEquals(array($reverseLookupLanguageCode), $urlAlias->languageCodes);
        self::assertEquals($paths[$reverseLookupLanguageCode], $urlAlias->path);
    }
UrlAliasTest