Code Duplication    Length = 21-21 lines in 2 locations

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

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