ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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  public function executeDefault($requestedMethod)
12  {
13  return $requestedMethod;
14  }
15 
16  public function testFunc()
17  {
18  return true;
19  }
20 
27  public function mockedCanModerate($room, $subRoomId, $userId)
28  {
29  return $this->canModerate($room, $subRoomId, $userId);
30  }
31 
35  public function mockedExitIfNoRoomExists($room)
36  {
37  $this->exitIfNoRoomExists($room);
38  }
39 
45  public function mockedExitIfNoRoomPermission($room, $subRoomId, $user)
46  {
47  $this->exitIfNoRoomPermission($room, $subRoomId, $user);
48  }
49 
55  public function sendResponse($response)
56  {
57  throw new Exception(json_encode($response), 1456319946);
58  }
59 }
exitIfNoRoomExists($room)
Checks if a ilChatroom exists.
canModerate($room, $subRoom, $user_id)
Checks if the user has permission to moderate a ilChatroom.
Class ilChatroomGUIHandler.
$user
Definition: migrateto20.php:57
Class ilChatroomTaskHandlerMock.
mockedExitIfNoRoomPermission($room, $subRoomId, $user)
mockedCanModerate($room, $subRoomId, $userId)
exitIfNoRoomPermission($room, $subRoom, $chat_user)
Check if user can moderate a chatroom.
$response
sendResponse($response)
Override parent sendResponse for test purposes.