ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
class.ilChatroomTaskHandlerMock.php
Go to the documentation of this file.
1 <?php
2 
3 require_once './Modules/Chatroom/classes/class.ilChatroomGUIHandler.php';
4 
10 {
11 
12  public function executeDefault($requestedMethod)
13  {
14  return $requestedMethod;
15  }
16 
17  public function testFunc()
18  {
19  return true;
20  }
21 
28  public function mockedCanModerate($room, $subRoomId, $userId)
29  {
30  return $this->canModerate($room, $subRoomId, $userId);
31  }
32 
36  public function mockedExitIfNoRoomExists($room)
37  {
38  $this->exitIfNoRoomExists($room);
39  }
40 
46  public function mockedExitIfNoRoomPermission($room, $subRoomId, $user)
47  {
48  $this->exitIfNoRoomPermission($room, $subRoomId, $user);
49  }
50 
56  public function sendResponse($response)
57  {
58  throw new Exception(json_encode($response), 1456319946);
59  }
60 }
exitIfNoRoomExists($room)
Checks if a ilChatroom exists.
canModerate($room, $subRoom, $user_id)
Checks if the user has permission to moderate a ilChatroom.
Class ilChatroomGUIHandler.
Class ilChatroomTaskHandlerMock.
mockedExitIfNoRoomPermission($room, $subRoomId, $user)
mockedCanModerate($room, $subRoomId, $userId)
exitIfNoRoomPermission($room, $subRoom, $chat_user)
Check if user can moderate a chatroom.
sendResponse($response)
Override parent sendResponse for test purposes.