public function testListLocationAliasesWithShowAllTranslations()
{
$pathElement1 = array('always-available' => true, 'translations' => array('cro-HR' => 'jedan'));
$pathElement2 = array('always-available' => false, 'translations' => array('cro-HR' => 'dva', 'eng-GB' => 'two'));
$pathElement3 = array('always-available' => false, 'translations' => array('cro-HR' => 'tri', 'eng-GB' => 'three', 'ger-DE' => 'drei'));
$spiUrlAlias = new SPIUrlAlias(array('id' => '3', 'pathData' => array($pathElement1, $pathElement2, $pathElement3), 'languageCodes' => array('ger-DE'), 'alwaysAvailable' => false));
$urlAliasService = $this->getRepository()->getURLAliasService();
$configuration = array('prioritizedLanguageList' => array('fre-FR'), 'showAllTranslations' => true);
$this->setConfiguration($urlAliasService, $configuration);
$urlAliasHandlerMock = $this->getPersistenceMockHandler('Content\\UrlAlias\\Handler');
$urlAliasHandlerMock->expects($this->once())->method('listURLAliasesForLocation')->with($this->equalTo(42), $this->equalTo(false))->will($this->returnValue(array($spiUrlAlias)));
$location = $this->getLocationStub();
$urlAliases = $urlAliasService->listLocationAliases($location, false, null);
self::assertCount(1, $urlAliases);
self::assertInstanceOf('eZ\\Publish\\API\\Repository\\Values\\Content\\URLAlias', $urlAliases[0]);
self::assertEquals('/jedan/dva/tri', $urlAliases[0]->path);
}