Code Duplication    Length = 22-22 lines in 2 locations

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

@@ 775-796 (lines=22) @@
772
     * @covers \eZ\Publish\Core\Persistence\Legacy\Content\Gateway\DoctrineDatabase::load
773
     * @covers \eZ\Publish\Core\Persistence\Legacy\Content\Gateway\DoctrineDatabase\QueryBuilder
774
     */
775
    public function testCreateFixtureForMapperExtractContentFromRowsMultipleVersions()
776
    {
777
        $this->insertDatabaseFixture(
778
            __DIR__ . '/../_fixtures/contentobjects.php'
779
        );
780
781
        $gateway = $this->getDatabaseGateway();
782
783
        $resFirst = $gateway->load(11, 1);
784
        $resSecond = $gateway->load(11, 2);
785
786
        $res = array_merge($resFirst, $resSecond);
787
788
        $orig = include __DIR__ . '/../_fixtures/extract_content_from_rows_multiple_versions.php';
789
790
        /*$this->storeFixture(
791
            __DIR__ . '/../_fixtures/extract_content_from_rows_multiple_versions.php',
792
            $res
793
        );*/
794
795
        $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.');
796
    }
797
798
    /**
799
     * @covers \eZ\Publish\Core\Persistence\Legacy\Content\Gateway\DoctrineDatabase::load
@@ 1804-1825 (lines=22) @@
1801
        );
1802
    }
1803
1804
    public function testLoadVersionInfo()
1805
    {
1806
        $this->insertDatabaseFixture(
1807
            __DIR__ . '/../_fixtures/contentobjects.php'
1808
        );
1809
1810
        $gateway = $this->getDatabaseGateway();
1811
1812
        $resFirst = $gateway->loadVersionInfo(11, 1);
1813
        $resSecond = $gateway->loadVersionInfo(11, 2);
1814
1815
        $res = array_merge($resFirst, $resSecond);
1816
1817
        $orig = include __DIR__ . '/../_fixtures/extract_version_info_from_rows_multiple_versions.php';
1818
1819
        /*$this->storeFixture(
1820
            __DIR__ . '/../_fixtures/extract_version_info_from_rows_multiple_versions.php',
1821
            $res
1822
        );*/
1823
1824
        $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.');
1825
    }
1826
1827
    /**
1828
     * Counts the number of relations in the database.