Code Duplication    Length = 21-21 lines in 2 locations

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

@@ 5251-5271 (lines=21) @@
5248
     *
5249
     * @covers \eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Handler::locationSwapped
5250
     */
5251
    public function testLocationSwappedUpdatesLocationPathIdentificationString()
5252
    {
5253
        $handler = $this->getHandler();
5254
        $locationGateway = $this->getLocationGateway();
5255
        $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_swap_path_identification_string.php');
5256
5257
        $countBeforeReusing = $this->countRows();
5258
5259
        $handler->locationSwapped(314, 2, 315, 2);
5260
5261
        $this->assertEquals(
5262
            $countBeforeReusing,
5263
            $this->countRows()
5264
        );
5265
5266
        $locationData = $locationGateway->getBasicNodeData(314);
5267
        self::assertEquals('dva', $locationData['path_identification_string']);
5268
5269
        $locationData = $locationGateway->getBasicNodeData(315);
5270
        self::assertEquals('jedan', $locationData['path_identification_string']);
5271
    }
5272
5273
    /**
5274
     * Test for the locationSwapped() method.
@@ 5280-5300 (lines=21) @@
5277
     *
5278
     * @covers \eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Handler::locationSwapped
5279
     */
5280
    public function testLocationSwappedMultipleLanguagesUpdatesLocationPathIdentificationString()
5281
    {
5282
        $handler = $this->getHandler();
5283
        $locationGateway = $this->getLocationGateway();
5284
        $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_swap_multilang_path_identification_string.php');
5285
5286
        $countBeforeReusing = $this->countRows();
5287
5288
        $handler->locationSwapped(314, 2, 315, 2);
5289
5290
        $this->assertEquals(
5291
            $countBeforeReusing,
5292
            $this->countRows()
5293
        );
5294
5295
        $locationData = $locationGateway->getBasicNodeData(314);
5296
        self::assertEquals('zwei', $locationData['path_identification_string']);
5297
5298
        $locationData = $locationGateway->getBasicNodeData(315);
5299
        self::assertEquals('jedan', $locationData['path_identification_string']);
5300
    }
5301
5302
    /**
5303
     * @return int