public function testGetContentState() { $handler = $this->getObjectStateHandler(); $mapperMock = $this->getMapperMock(); $gatewayMock = $this->getGatewayMock(); $gatewayMock->expects($this->once())->method('loadObjectStateDataForContent')->with($this->equalTo(42), $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->getContentState(42, 2); $this->assertInstanceOf('eZ\\Publish\\SPI\\Persistence\\Content\\ObjectState', $result); }