|
@@ 2696-2705 (lines=10) @@
|
| 2693 |
|
* @covers \eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Handler::locationMoved |
| 2694 |
|
* @expectedException \eZ\Publish\API\Repository\Exceptions\NotFoundException |
| 2695 |
|
*/ |
| 2696 |
|
public function testLocationMovedReparentHistory() |
| 2697 |
|
{ |
| 2698 |
|
$handler = $this->getHandler(); |
| 2699 |
|
$this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_move.php'); |
| 2700 |
|
|
| 2701 |
|
$handler->publishUrlAliasForLocation(4, 3, 'move-this', 'eng-GB', false); |
| 2702 |
|
$handler->locationMoved(4, 2, 3); |
| 2703 |
|
|
| 2704 |
|
$handler->lookup('move-here/move-this-history'); |
| 2705 |
|
} |
| 2706 |
|
|
| 2707 |
|
/** |
| 2708 |
|
* Test for the locationMoved() method. |
|
@@ 5172-5188 (lines=17) @@
|
| 5169 |
|
* @depends testLocationSwappedWithReusingNopEntry |
| 5170 |
|
* @group swap |
| 5171 |
|
*/ |
| 5172 |
|
public function testLocationSwappedWithReusingNopEntryCustomAliasIsDestroyed() |
| 5173 |
|
{ |
| 5174 |
|
$handler = $this->getHandler(); |
| 5175 |
|
$this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_swap_reusing_nop.php'); |
| 5176 |
|
|
| 5177 |
|
$handler->lookup('jedan/swap-that/search'); |
| 5178 |
|
$handler->locationSwapped(316, 314, 317, 315); |
| 5179 |
|
|
| 5180 |
|
try { |
| 5181 |
|
$handler->lookup('jedan/swap-that/search'); |
| 5182 |
|
$this->fail('Custom alias is not destroyed'); |
| 5183 |
|
} catch (NotFoundException $e) { |
| 5184 |
|
// Custom alias is destroyed by reusing NOP entry with existing autogenerated alias |
| 5185 |
|
// on the same level (that means link and ID are updated to the existing alias ID, |
| 5186 |
|
// so custom alias children entries are no longer properly linked (parent-link)) |
| 5187 |
|
} |
| 5188 |
|
} |
| 5189 |
|
|
| 5190 |
|
/** |
| 5191 |
|
* Test for the locationSwapped() method. |