|
@@ 5267-5287 (lines=21) @@
|
| 5264 |
|
* |
| 5265 |
|
* @covers \eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Handler::locationSwapped |
| 5266 |
|
*/ |
| 5267 |
|
public function testLocationSwappedUpdatesLocationPathIdentificationString() |
| 5268 |
|
{ |
| 5269 |
|
$handler = $this->getHandler(); |
| 5270 |
|
$locationGateway = $this->getLocationGateway(); |
| 5271 |
|
$this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_swap_path_identification_string.php'); |
| 5272 |
|
|
| 5273 |
|
$countBeforeReusing = $this->countRows(); |
| 5274 |
|
|
| 5275 |
|
$handler->locationSwapped(314, 2, 315, 2); |
| 5276 |
|
|
| 5277 |
|
$this->assertEquals( |
| 5278 |
|
$countBeforeReusing, |
| 5279 |
|
$this->countRows() |
| 5280 |
|
); |
| 5281 |
|
|
| 5282 |
|
$locationData = $locationGateway->getBasicNodeData(314); |
| 5283 |
|
self::assertEquals('dva', $locationData['path_identification_string']); |
| 5284 |
|
|
| 5285 |
|
$locationData = $locationGateway->getBasicNodeData(315); |
| 5286 |
|
self::assertEquals('jedan', $locationData['path_identification_string']); |
| 5287 |
|
} |
| 5288 |
|
|
| 5289 |
|
/** |
| 5290 |
|
* Test for the locationSwapped() method. |
|
@@ 5296-5316 (lines=21) @@
|
| 5293 |
|
* |
| 5294 |
|
* @covers \eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Handler::locationSwapped |
| 5295 |
|
*/ |
| 5296 |
|
public function testLocationSwappedMultipleLanguagesUpdatesLocationPathIdentificationString() |
| 5297 |
|
{ |
| 5298 |
|
$handler = $this->getHandler(); |
| 5299 |
|
$locationGateway = $this->getLocationGateway(); |
| 5300 |
|
$this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_swap_multilang_path_identification_string.php'); |
| 5301 |
|
|
| 5302 |
|
$countBeforeReusing = $this->countRows(); |
| 5303 |
|
|
| 5304 |
|
$handler->locationSwapped(314, 2, 315, 2); |
| 5305 |
|
|
| 5306 |
|
$this->assertEquals( |
| 5307 |
|
$countBeforeReusing, |
| 5308 |
|
$this->countRows() |
| 5309 |
|
); |
| 5310 |
|
|
| 5311 |
|
$locationData = $locationGateway->getBasicNodeData(314); |
| 5312 |
|
self::assertEquals('zwei', $locationData['path_identification_string']); |
| 5313 |
|
|
| 5314 |
|
$locationData = $locationGateway->getBasicNodeData(315); |
| 5315 |
|
self::assertEquals('jedan', $locationData['path_identification_string']); |
| 5316 |
|
} |
| 5317 |
|
|
| 5318 |
|
/** |
| 5319 |
|
* @return int |