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

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

Test for the publishUrlAliasForLocation() method.
    public function testPublishUrlAliasForLocationReusingNopElementChangesCustomPathAndCreatesHistory()
    {
        $handler = $this->getHandler();
        $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_reusing.php');
        $handler->publishUrlAliasForLocation(315, 2, 'nop-element', 'eng-GB', false);
        $handler->publishUrlAliasForLocation(315, 2, 'nop-element-renamed', 'eng-GB', false);
        $customUrlAliasChanged = $handler->lookup('nop-element-renamed/search');
        $customUrlAliasHistory = $handler->lookup('nop-element/search');
        self::assertTrue($customUrlAliasHistory->isHistory);
        $customUrlAliasHistory->isHistory = false;
        self::assertEquals($customUrlAliasChanged, $customUrlAliasHistory);
    }
UrlAliasHandlerTest