Code Duplication    Length = 22-22 lines in 2 locations

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

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