Code Duplication    Length = 21-21 lines in 2 locations

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

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