eZ\Publish\Core\Persistence\Legacy\Tests\Content\Gateway\DoctrineDatabaseTest::testListVersions PHP Method

testListVersions() public method

public testListVersions ( )
    public function testListVersions()
    {
        $this->insertDatabaseFixture(__DIR__ . '/../_fixtures/contentobjects.php');
        $gateway = $this->getDatabaseGateway();
        $res = $gateway->listVersions(226);
        $this->assertEquals(2, count($res));
        foreach ($res as $row) {
            $this->assertEquals(22, count($row));
        }
        $this->assertEquals(675, $res[0]['ezcontentobject_version_id']);
        $this->assertEquals(676, $res[1]['ezcontentobject_version_id']);
        //$orig = include __DIR__ . '/../_fixtures/restricted_version_rows.php';
        /*$this->storeFixture(
              __DIR__ . '/../_fixtures/restricted_version_rows.php',
              $res
          );*/
        //$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/restricted_version_rows.php) and tests needs to be adapted." );
    }
DoctrineDatabaseTest