eZ\Publish\Core\Persistence\Legacy\Tests\Content\UrlAliasHandlerTest::testCreateCustomUrlAliasWithNopElement PHP Метод

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

Test for the createUrlAlias() method.
    public function testCreateCustomUrlAliasWithNopElement()
    {
        $handler = $this->getHandler();
        $this->insertDatabaseFixture(__DIR__ . '/_fixtures/publish_base.php');
        $path = 'ribar/palunko';
        $customUrlAlias = $handler->createCustomUrlAlias(314, $path, false, 'cro-HR', true);
        self::assertEquals(5, $this->countRows());
        self::assertEquals(new UrlAlias(array('id' => '4-' . md5('palunko'), 'type' => UrlAlias::LOCATION, 'destination' => 314, 'pathData' => array(array('always-available' => true, 'translations' => array('always-available' => 'ribar')), array('always-available' => true, 'translations' => array('cro-HR' => 'palunko'))), 'languageCodes' => array('cro-HR'), 'alwaysAvailable' => true, 'isHistory' => false, 'isCustom' => true, 'forward' => false)), $customUrlAlias);
        return $handler;
    }
UrlAliasHandlerTest