ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilChatroomTaskHandlerMock Class Reference

Class ilChatroomTaskHandlerMock. More...

+ Inheritance diagram for ilChatroomTaskHandlerMock:
+ Collaboration diagram for ilChatroomTaskHandlerMock:

Public Member Functions

 executeDefault ($requestedMethod)
 
 testFunc ()
 
 mockedCanModerate ($room, $subRoomId, $userId)
 
 mockedExitIfNoRoomExists ($room)
 
 mockedExitIfNoRoomPermission ($room, $subRoomId, $user)
 
 sendResponse ($response)
 Override parent sendResponse for test purposes. More...
 
- Public Member Functions inherited from ilChatroomGUIHandler
 __construct (ilChatroomObjectGUI $gui)
 
 sendResponse ($response)
 Sends a json encoded response and exits the php process. More...
 
 hasPermission ($permission)
 Checks for access with ilRbacSystem. More...
 
 execute ($method)
 Executes given $method if existing, otherwise executes executeDefault() method. More...
 
 executeDefault ($requestedMethod)
 
 redirectIfNoPermission ($permission)
 Checks for requested permissions and redirects if the permission check failed. More...
 
 isSuccessful ($response)
 Checks for success param in an json decoded response. More...
 

Additional Inherited Members

- Protected Member Functions inherited from ilChatroomGUIHandler
 getRoomByObjectId ($objectId)
 
 exitIfNoRoomExists ($room)
 Checks if a ilChatroom exists. More...
 
 exitIfNoRoomPermission ($room, $subRoom, $chat_user)
 Check if user can moderate a chatroom. More...
 
 canModerate ($room, $subRoom, $user_id)
 Checks if the user has permission to moderate a ilChatroom. More...
 
 isMainRoom ($subRoomId)
 
- Protected Attributes inherited from ilChatroomGUIHandler
 $gui
 
 $ilUser
 
 $ilCtrl
 
 $ilLng
 
 $webDirectory
 
 $upload
 

Detailed Description

Member Function Documentation

◆ executeDefault()

ilChatroomTaskHandlerMock::executeDefault (   $requestedMethod)

Definition at line 11 of file class.ilChatroomTaskHandlerMock.php.

12  {
13  return $requestedMethod;
14  }

◆ mockedCanModerate()

ilChatroomTaskHandlerMock::mockedCanModerate (   $room,
  $subRoomId,
  $userId 
)
Parameters
ilChatroom | PHPUnit_Framework_MockObject_MockObject$room
int$subRoomId
int$userId
Returns
bool

Definition at line 27 of file class.ilChatroomTaskHandlerMock.php.

References ilChatroomGUIHandler\canModerate().

28  {
29  return $this->canModerate($room, $subRoomId, $userId);
30  }
canModerate($room, $subRoom, $user_id)
Checks if the user has permission to moderate a ilChatroom.
+ Here is the call graph for this function:

◆ mockedExitIfNoRoomExists()

ilChatroomTaskHandlerMock::mockedExitIfNoRoomExists (   $room)
Parameters
ilChatroom$room

Definition at line 35 of file class.ilChatroomTaskHandlerMock.php.

References ilChatroomGUIHandler\exitIfNoRoomExists().

36  {
37  $this->exitIfNoRoomExists($room);
38  }
exitIfNoRoomExists($room)
Checks if a ilChatroom exists.
+ Here is the call graph for this function:

◆ mockedExitIfNoRoomPermission()

ilChatroomTaskHandlerMock::mockedExitIfNoRoomPermission (   $room,
  $subRoomId,
  $user 
)
Parameters
ilChatroom$room
int$subRoomId
ilChatroomUser$user

Definition at line 45 of file class.ilChatroomTaskHandlerMock.php.

References ilChatroomGUIHandler\exitIfNoRoomPermission().

46  {
47  $this->exitIfNoRoomPermission($room, $subRoomId, $user);
48  }
exitIfNoRoomPermission($room, $subRoom, $chat_user)
Check if user can moderate a chatroom.
+ Here is the call graph for this function:

◆ sendResponse()

ilChatroomTaskHandlerMock::sendResponse (   $response)

Override parent sendResponse for test purposes.

It should echo json encoded data and exit the process.

Parameters
array$response
Exceptions
Exception

Definition at line 55 of file class.ilChatroomTaskHandlerMock.php.

References $response.

56  {
57  throw new Exception(json_encode($response), 1456319946);
58  }
$response

◆ testFunc()

ilChatroomTaskHandlerMock::testFunc ( )

Definition at line 16 of file class.ilChatroomTaskHandlerMock.php.

17  {
18  return true;
19  }

The documentation for this class was generated from the following file: