eZ\Publish\Core\REST\Server\Tests\Input\Parser\UserCreateTest::getUserServiceMock PHP Method

getUserServiceMock() protected method

Get the user service mock object.
protected getUserServiceMock ( ) : eZ\Publish\API\Repository\UserService
return eZ\Publish\API\Repository\UserService
    protected function getUserServiceMock()
    {
        $userServiceMock = $this->getMock('eZ\\Publish\\Core\\Repository\\UserService', array(), array(), '', false);
        $contentType = $this->getContentType();
        $userServiceMock->expects($this->any())->method('newUserCreateStruct')->with($this->equalTo('login'), $this->equalTo('[email protected]'), $this->equalTo('password'), $this->equalTo('eng-US'), $this->equalTo($contentType))->will($this->returnValue(new UserCreateStruct(array('contentType' => $contentType, 'mainLanguageCode' => 'eng-US'))));
        return $userServiceMock;
    }