eZ\Publish\Core\REST\Server\Tests\Input\Parser\ObjectStateCreateTest::getObjectStateServiceMock PHP Method

getObjectStateServiceMock() protected method

Get the object state service mock object.
protected getObjectStateServiceMock ( ) : eZ\Publish\API\Repository\ObjectStateService
return eZ\Publish\API\Repository\ObjectStateService
    protected function getObjectStateServiceMock()
    {
        $objectStateServiceMock = $this->getMock('eZ\\Publish\\Core\\Repository\\ObjectStateService', array(), array(), '', false);
        $objectStateServiceMock->expects($this->any())->method('newObjectStateCreateStruct')->with($this->equalTo('test-state'))->will($this->returnValue(new ObjectStateCreateStruct(array('identifier' => 'test-state'))));
        return $objectStateServiceMock;
    }