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

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

Test for the locationSwapped() method.
    public function testLocationSwappedMultipleLanguagesSimple()
    {
        $handler = $this->getHandler();
        $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_swap_multilang_simple.php');
        $urlAlias1HRExpected = $handler->lookup('jedan/swap-hr');
        $urlAlias1ENExpected = $handler->lookup('jedan/swap-en');
        $urlAlias2HRExpected = $handler->lookup('dva/swap-hr');
        $urlAlias2ENExpected = $handler->lookup('dva/swap-en');
        $countBeforeReusing = $this->countRows();
        $handler->locationSwapped(316, 314, 317, 315);
        $this->assertEquals($countBeforeReusing, $this->countRows());
        $urlAlias1HR = $handler->lookup('jedan/swap-hr');
        $urlAlias1EN = $handler->lookup('jedan/swap-en');
        $urlAlias2HR = $handler->lookup('dva/swap-hr');
        $urlAlias2EN = $handler->lookup('dva/swap-en');
        $this->assertEquals($urlAlias1HRExpected, $urlAlias1HR);
        $this->assertEquals($urlAlias1ENExpected, $urlAlias1EN);
        $this->assertEquals($urlAlias2HRExpected, $urlAlias2HR);
        $this->assertEquals($urlAlias2ENExpected, $urlAlias2EN);
    }
UrlAliasHandlerTest