Code Duplication    Length = 21-21 lines in 2 locations

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

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