eZ\Publish\Core\REST\Server\Tests\Input\Parser\PolicyCreateTest::getRoleServiceMock PHP Method

getRoleServiceMock() protected method

Get the role service mock object.
protected getRoleServiceMock ( ) : eZ\Publish\API\Repository\RoleService
return eZ\Publish\API\Repository\RoleService
    protected function getRoleServiceMock()
    {
        $roleServiceMock = $this->getMock('eZ\\Publish\\Core\\Repository\\RoleService', array(), array(), '', false);
        $roleServiceMock->expects($this->any())->method('newPolicyCreateStruct')->with($this->equalTo('content'), $this->equalTo('delete'))->will($this->returnValue(new PolicyCreateStruct(array('module' => 'content', 'function' => 'delete'))));
        return $roleServiceMock;
    }