Code Duplication    Length = 21-21 lines in 2 locations

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

@@ 5200-5220 (lines=21) @@
5197
     *
5198
     * @covers \eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Handler::locationSwapped
5199
     */
5200
    public function testLocationSwappedUpdatesLocationPathIdentificationString()
5201
    {
5202
        $handler = $this->getHandler();
5203
        $locationGateway = $this->getLocationGateway();
5204
        $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_swap_path_identification_string.php');
5205
5206
        $countBeforeReusing = $this->countRows();
5207
5208
        $handler->locationSwapped(314, 2, 315, 2);
5209
5210
        $this->assertEquals(
5211
            $countBeforeReusing,
5212
            $this->countRows()
5213
        );
5214
5215
        $locationData = $locationGateway->getBasicNodeData(314);
5216
        self::assertEquals('dva', $locationData['path_identification_string']);
5217
5218
        $locationData = $locationGateway->getBasicNodeData(315);
5219
        self::assertEquals('jedan', $locationData['path_identification_string']);
5220
    }
5221
5222
    /**
5223
     * Test for the locationSwapped() method.
@@ 5229-5249 (lines=21) @@
5226
     *
5227
     * @covers \eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Handler::locationSwapped
5228
     */
5229
    public function testLocationSwappedMultipleLanguagesUpdatesLocationPathIdentificationString()
5230
    {
5231
        $handler = $this->getHandler();
5232
        $locationGateway = $this->getLocationGateway();
5233
        $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_swap_multilang_path_identification_string.php');
5234
5235
        $countBeforeReusing = $this->countRows();
5236
5237
        $handler->locationSwapped(314, 2, 315, 2);
5238
5239
        $this->assertEquals(
5240
            $countBeforeReusing,
5241
            $this->countRows()
5242
        );
5243
5244
        $locationData = $locationGateway->getBasicNodeData(314);
5245
        self::assertEquals('zwei', $locationData['path_identification_string']);
5246
5247
        $locationData = $locationGateway->getBasicNodeData(315);
5248
        self::assertEquals('jedan', $locationData['path_identification_string']);
5249
    }
5250
5251
    /**
5252
     * @return int