eZ\Publish\Core\Persistence\Legacy\Tests\Content\ObjectState\ObjectStateHandlerTest::testLoadObjectStates PHP Method

testLoadObjectStates() public method

    public function testLoadObjectStates()
    {
        $handler = $this->getObjectStateHandler();
        $mapperMock = $this->getMapperMock();
        $gatewayMock = $this->getGatewayMock();
        $gatewayMock->expects($this->once())->method('loadObjectStateListData')->with($this->equalTo(2))->will($this->returnValue(array(array())));
        $mapperMock->expects($this->once())->method('createObjectStateListFromData')->with($this->equalTo(array(array())))->will($this->returnValue(array($this->getObjectStateFixture(), $this->getObjectStateFixture())));
        $result = $handler->loadObjectStates(2);
        foreach ($result as $resultItem) {
            $this->assertInstanceOf('eZ\\Publish\\SPI\\Persistence\\Content\\ObjectState', $resultItem);
        }
    }