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

testListVersions() public method

public testListVersions ( )
    public function testListVersions()
    {
        $this->getContentGatewayMock()->expects($this->once())->method('listVersions')->with($this->equalTo(23))->will($this->returnValue(array(array('ezcontentobject_version_version' => 2))));
        $this->getContentGatewayMock()->expects($this->once())->method('loadVersionedNameData')->with($this->equalTo(array(array('id' => 23, 'version' => 2))))->will($this->returnValue(array()));
        $this->getContentMapperMock()->expects($this->once())->method('extractVersionInfoListFromRows')->with($this->equalTo(array(array('ezcontentobject_version_version' => 2))), array())->will($this->returnValue(array(new VersionInfo())));
        $versions = $this->getTreeHandler()->listVersions(23);
        $this->assertEquals(array(new VersionInfo()), $versions);
    }