|
@@ 2426-2440 (lines=15) @@
|
| 2423 |
|
* @covers \eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Handler::listGlobalURLAliases |
| 2424 |
|
* @depends testLookupResourceUrlAlias |
| 2425 |
|
*/ |
| 2426 |
|
public function testListGlobalURLAliasesWithLanguageCode() |
| 2427 |
|
{ |
| 2428 |
|
$handler = $this->getHandler(); |
| 2429 |
|
$this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_resource.php'); |
| 2430 |
|
|
| 2431 |
|
$globalAliasList = $handler->listGlobalURLAliases('eng-GB'); |
| 2432 |
|
|
| 2433 |
|
self::assertEquals( |
| 2434 |
|
array( |
| 2435 |
|
$handler->lookup('is-alive'), |
| 2436 |
|
$handler->lookup('nop-element/search'), |
| 2437 |
|
), |
| 2438 |
|
$globalAliasList |
| 2439 |
|
); |
| 2440 |
|
} |
| 2441 |
|
|
| 2442 |
|
/** |
| 2443 |
|
* Test for the listGlobalURLAliases() method. |
|
@@ 2808-2821 (lines=14) @@
|
| 2805 |
|
* |
| 2806 |
|
* @covers \eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Handler::locationCopied |
| 2807 |
|
*/ |
| 2808 |
|
public function testLocationCopiedCopiedLocationAliasIsValid() |
| 2809 |
|
{ |
| 2810 |
|
$handler = $this->getHandler(); |
| 2811 |
|
$this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_copy.php'); |
| 2812 |
|
|
| 2813 |
|
$urlAlias = $handler->lookup('move-this'); |
| 2814 |
|
|
| 2815 |
|
$handler->locationCopied(4, 400, 3); |
| 2816 |
|
|
| 2817 |
|
self::assertEquals( |
| 2818 |
|
$urlAlias, |
| 2819 |
|
$handler->lookup('move-this') |
| 2820 |
|
); |
| 2821 |
|
} |
| 2822 |
|
|
| 2823 |
|
/** |
| 2824 |
|
* Test for the locationCopied() method. |
|
@@ 2828-2841 (lines=14) @@
|
| 2825 |
|
* |
| 2826 |
|
* @covers \eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Handler::locationCopied |
| 2827 |
|
*/ |
| 2828 |
|
public function testLocationCopiedCopiedSubtreeIsValid() |
| 2829 |
|
{ |
| 2830 |
|
$handler = $this->getHandler(); |
| 2831 |
|
$this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_copy.php'); |
| 2832 |
|
|
| 2833 |
|
$urlAlias = $handler->lookup('move-this/sub1/sub2'); |
| 2834 |
|
|
| 2835 |
|
$handler->locationCopied(4, 400, 3); |
| 2836 |
|
|
| 2837 |
|
self::assertEquals( |
| 2838 |
|
$urlAlias, |
| 2839 |
|
$handler->lookup('move-this/sub1/sub2') |
| 2840 |
|
); |
| 2841 |
|
} |
| 2842 |
|
|
| 2843 |
|
/** |
| 2844 |
|
* Test for the locationCopied() method. |