eZ\Publish\Core\REST\Server\Tests\Input\Parser\RoleInputTest::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('newRoleCreateStruct')->with($this->equalTo('Identifier Bar'))->will($this->returnValue(new RoleCreateStruct(array('identifier' => 'Identifier Bar'))));
        return $roleServiceMock;
    }