eZ\Publish\Core\Repository\Tests\Service\Mock\UrlAliasTest::testListGlobalAliasesEmpty PHP Méthode

testListGlobalAliasesEmpty() public méthode

Test for the listGlobalAliases() method.
    public function testListGlobalAliasesEmpty()
    {
        $urlAliasService = $this->getRepository()->getURLAliasService();
        $configuration = array('prioritizedLanguageList' => array('eng-GB'), 'showAllTranslations' => false);
        $this->setConfiguration($urlAliasService, $configuration);
        $urlAliasHandler = $this->getPersistenceMockHandler('Content\\UrlAlias\\Handler');
        $urlAliasHandler->expects($this->once())->method('listGlobalURLAliases')->with($this->equalTo(null), $this->equalTo(0), $this->equalTo(-1))->will($this->returnValue(array(new SPIUrlAlias(array('pathData' => array(array('always-available' => false, 'translations' => array('ger-DE' => 'squirrel'))), 'languageCodes' => array('ger-DE'), 'alwaysAvailable' => false)))));
        $urlAliases = $urlAliasService->listGlobalAliases();
        self::assertCount(0, $urlAliases);
    }
UrlAliasTest