Code Duplication    Length = 22-22 lines in 2 locations

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

@@ 749-770 (lines=22) @@
746
     * @covers \eZ\Publish\Core\Persistence\Legacy\Content\Gateway\DoctrineDatabase::load
747
     * @covers \eZ\Publish\Core\Persistence\Legacy\Content\Gateway\DoctrineDatabase\QueryBuilder
748
     */
749
    public function testCreateFixtureForMapperExtractContentFromRowsMultipleVersions()
750
    {
751
        $this->insertDatabaseFixture(
752
            __DIR__ . '/../_fixtures/contentobjects.php'
753
        );
754
755
        $gateway = $this->getDatabaseGateway();
756
757
        $resFirst = $gateway->load(11, 1);
758
        $resSecond = $gateway->load(11, 2);
759
760
        $res = array_merge($resFirst, $resSecond);
761
762
        $orig = include __DIR__ . '/../_fixtures/extract_content_from_rows_multiple_versions.php';
763
764
        /*$this->storeFixture(
765
            __DIR__ . '/../_fixtures/extract_content_from_rows_multiple_versions.php',
766
            $res
767
        );*/
768
769
        $this->assertEquals($orig, $res, 'Fixtures differ between what was previously stored(expected) and what it now generates(actual), this hints either some mistake in impl or that the fixture (../_fixtures/extract_content_from_rows_multiple_versions.php) and tests needs to be adapted.');
770
    }
771
772
    /**
773
     * @covers \eZ\Publish\Core\Persistence\Legacy\Content\Gateway\DoctrineDatabase::load
@@ 1789-1810 (lines=22) @@
1786
        );
1787
    }
1788
1789
    public function testLoadVersionInfo()
1790
    {
1791
        $this->insertDatabaseFixture(
1792
            __DIR__ . '/../_fixtures/contentobjects.php'
1793
        );
1794
1795
        $gateway = $this->getDatabaseGateway();
1796
1797
        $resFirst = $gateway->loadVersionInfo(11, 1);
1798
        $resSecond = $gateway->loadVersionInfo(11, 2);
1799
1800
        $res = array_merge($resFirst, $resSecond);
1801
1802
        $orig = include __DIR__ . '/../_fixtures/extract_version_info_from_rows_multiple_versions.php';
1803
1804
        $this->assertEquals($orig, $res, 'Fixtures differ between what was previously stored(expected) and what it now generates(actual), this hints either some mistake in impl or that the fixture (../_fixtures/extract_content_from_rows_multiple_versions.php) and tests needs to be adapted.');
1805
    }
1806
1807
    /**
1808
     * Counts the number of relations in the database.
1809
     *
1810
     * @param int $fromId
1811
     * @param int $toId
1812
     *
1813
     * @return int