Code Duplication    Length = 21-21 lines in 2 locations

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

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