Code Duplication    Length = 16-16 lines in 2 locations

eZ/Publish/Core/Persistence/Legacy/Tests/Content/Gateway/DoctrineDatabaseTest.php 2 locations

@@ 1356-1371 (lines=16) @@
1353
    /**
1354
     * @covers \eZ\Publish\Core\Persistence\Legacy\Content\Gateway\DoctrineDatabase::loadRelations
1355
     */
1356
    public function testLoadRelationsByVersion()
1357
    {
1358
        $this->insertRelationFixture();
1359
1360
        $gateway = $this->getDatabaseGateway();
1361
1362
        $relations = $gateway->loadRelations(57, 1);
1363
1364
        $this->assertCount(1, $relations, 'Expecting one relation to be loaded');
1365
1366
        $this->assertValuesInRows(
1367
            'ezcontentobject_link_to_contentobject_id',
1368
            [58],
1369
            $relations
1370
        );
1371
    }
1372
1373
    /**
1374
     * @covers \eZ\Publish\Core\Persistence\Legacy\Content\Gateway\DoctrineDatabase::loadRelations
@@ 1390-1405 (lines=16) @@
1387
    /**
1388
     * @covers \eZ\Publish\Core\Persistence\Legacy\Content\Gateway\DoctrineDatabase::loadReverseRelations
1389
     */
1390
    public function testLoadReverseRelations()
1391
    {
1392
        $this->insertRelationFixture();
1393
1394
        $gateway = $this->getDatabaseGateway();
1395
1396
        $relations = $gateway->loadReverseRelations(58);
1397
1398
        self::assertCount(2, $relations);
1399
1400
        $this->assertValuesInRows(
1401
            'ezcontentobject_link_from_contentobject_id',
1402
            [57, 61],
1403
            $relations
1404
        );
1405
    }
1406
1407
    /**
1408
     * @covers \eZ\Publish\Core\Persistence\Legacy\Content\Gateway\DoctrineDatabase::loadReverseRelations