Code Duplication    Length = 21-21 lines in 2 locations

eZ/Publish/Core/Persistence/Legacy/Tests/Content/UrlAlias/UrlAliasHandlerTest.php 2 locations

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