ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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
 
 $rbacsystem
 

Detailed Description

Member Function Documentation

◆ executeDefault()

ilChatroomTaskHandlerMock::executeDefault (   $requestedMethod)

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

13  {
14  return $requestedMethod;
15  }

◆ mockedCanModerate()

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

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

References ilChatroomGUIHandler\canModerate().

29  {
30  return $this->canModerate($room, $subRoomId, $userId);
31  }
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 36 of file class.ilChatroomTaskHandlerMock.php.

References ilChatroomGUIHandler\exitIfNoRoomExists().

37  {
38  $this->exitIfNoRoomExists($room);
39  }
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 46 of file class.ilChatroomTaskHandlerMock.php.

References ilChatroomGUIHandler\exitIfNoRoomPermission().

47  {
48  $this->exitIfNoRoomPermission($room, $subRoomId, $user);
49  }
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 56 of file class.ilChatroomTaskHandlerMock.php.

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

◆ testFunc()

ilChatroomTaskHandlerMock::testFunc ( )

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

18  {
19  return true;
20  }

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