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

testLoadByIdentifier() public method

    public function testLoadByIdentifier()
    {
        $handler = $this->getObjectStateHandler();
        $mapperMock = $this->getMapperMock();
        $gatewayMock = $this->getGatewayMock();
        $gatewayMock->expects($this->once())->method('loadObjectStateDataByIdentifier')->with($this->equalTo('not_locked'), $this->equalTo(2))->will($this->returnValue(array(array())));
        $mapperMock->expects($this->once())->method('createObjectStateFromData')->with($this->equalTo(array(array())))->will($this->returnValue($this->getObjectStateFixture()));
        $result = $handler->loadByIdentifier('not_locked', 2);
        $this->assertInstanceOf('eZ\\Publish\\SPI\\Persistence\\Content\\ObjectState', $result);
    }