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

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

Test for the locationSwapped() method.
    public function testLocationSwappedSiblingsSimple()
    {
        $handler = $this->getHandler();
        $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_swap_siblings_simple.php');
        $countBeforeReusing = $this->countRows();
        $handler->locationSwapped(314, 2, 315, 2);
        $this->assertEquals($countBeforeReusing, $this->countRows());
        $urlAlias = $handler->lookup('jedan');
        $this->assertEquals(new UrlAlias(array('id' => '0-' . md5('jedan'), 'type' => UrlAlias::LOCATION, 'destination' => 315, 'languageCodes' => array('cro-HR'), 'pathData' => array(array('always-available' => false, 'translations' => array('cro-HR' => 'jedan'))), 'alwaysAvailable' => false, 'isHistory' => false, 'isCustom' => false, 'forward' => false)), $urlAlias);
        $urlAlias = $handler->lookup('dva');
        $this->assertEquals(new UrlAlias(array('id' => '0-' . md5('dva'), 'type' => UrlAlias::LOCATION, 'destination' => 314, 'languageCodes' => array('cro-HR'), 'pathData' => array(array('always-available' => false, 'translations' => array('cro-HR' => 'dva'))), 'alwaysAvailable' => false, 'isHistory' => false, 'isCustom' => false, 'forward' => false)), $urlAlias);
    }
UrlAliasHandlerTest