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

testLookupWithSharedTranslation() public method

Test for the lookup() method.
public testLookupWithSharedTranslation ( $prioritizedLanguageList, $showAllTranslations, $alwaysAvailable, $languageCode )
    public function testLookupWithSharedTranslation($prioritizedLanguageList, $showAllTranslations, $alwaysAvailable, $languageCode)
    {
        $urlAliasService = $this->getRepository()->getURLAliasService();
        $configuration = array('prioritizedLanguageList' => $prioritizedLanguageList, 'showAllTranslations' => $showAllTranslations);
        $this->setConfiguration($urlAliasService, $configuration);
        $urlAliasHandler = $this->getPersistenceMockHandler('Content\\UrlAlias\\Handler');
        $urlAliasHandler->expects($this->once())->method('lookup')->with($this->equalTo('jedan/two'))->will($this->returnValue(new SPIUrlAlias(array('pathData' => array(array('always-available' => $alwaysAvailable, 'translations' => array('cro-HR' => 'jedan', 'eng-GB' => 'jedan')), array('always-available' => $alwaysAvailable, 'translations' => array('cro-HR' => 'two', 'eng-GB' => 'two'))), 'languageCodes' => array('eng-GB', 'cro-HR'), 'alwaysAvailable' => $alwaysAvailable))));
        $urlAlias = $urlAliasService->lookup('jedan/two', $languageCode);
        self::assertInstanceOf('eZ\\Publish\\API\\Repository\\Values\\Content\\URLAlias', $urlAlias);
    }
UrlAliasTest