19 declare(strict_types=1);
    38     protected function setUp(): void
    42         if (!defined(
'ROOT_FOLDER_ID')) {
    43             define(
'ROOT_FOLDER_ID', time());
    49         $lng = $this->getMockBuilder(ilLanguage::class)->disableOriginalConstructor()->onlyMethods(
    50             [
'loadLanguageModule', 
'txt']
    53         $lng->method(
'loadLanguageModule')->with(
    55                 $this->equalTo(
'chatroom'),
    56                 $this->equalTo(
'meta')
    68         $rbacsystem = $this->getMockBuilder(ilRbacSystem::class)->disableOriginalConstructor()->onlyMethods(
    80         ?InvocationOrder $times = null
    82         if ($times === null) {
    83             $times = $this->any();
    86         return $GLOBALS[
'rbacsystem']->expects($times)
    87             ->method(
'checkAccess')
    88             ->with($this->equalTo($permission))->willReturn(
    95         $ctrl = $this->createMock(ilCtrlInterface::class);
   104         $user = $this->getMockBuilder(ilObjUser::class)->disableOriginalConstructor()->getMock();
   113         $this->gui->method(
'getConnector')->willReturn($returnValue);
   120     ): InvocationMocker {
   121         return $this->ilChatroomMock->method(
'isOwnerOfPrivateRoom')->with(
   122             $this->equalTo($userId),
   123             $this->equalTo($subRoomId)
   124         )->willReturn($result);
   129         return $this->ilChatroomUserMock->method(
'getUserId')->willReturn($userId);
   135         $this->ilChatroomServerConnectorMock = $this->getMockBuilder(ilChatroomServerConnector::class)->setConstructorArgs(
   137         )->onlyMethods([
'file_get_contents'])->getMock();
   144         return $this->ilChatroomServerConnectorMock->method(
'file_get_contents')->willReturn(
   151         $this->
object = $this->getMockBuilder(ilObjChatroom::class)->disableOriginalConstructor()->onlyMethods(
   154         $this->
object->method(
'getId')->willReturn($id);
   161         $mock->expects($this->once())->method(
'sendResponse')->with(
   163         )->willReturnCallback(
   164             static function (): never {
 
Class ilChatroomAbstractTest. 
 
createIlChatroomIsOwnerOfPrivateRoomMock(int $userId, int $subRoomId, bool $result)
 
createSendResponseMock(MockObject $mock, $response)
 
createIlChatroomUserGetUserIdMock(int $userId)
 
Class ilChatroomAbstractTaskTest. 
 
createGlobalRbacSystemCheckAccessMock(string $permission, bool $result, ?InvocationOrder $times=null)
 
createGlobalRbacSystemMock()
 
createIlChatroomServerConnectorFileGetContentsMock($returnValue)
 
Class ilChatroomServerConnector. 
 
createIlObjChatroomMock(int $id)
 
createIlChatroomServerConnectorMock(ilChatroomServerSettings $settings)
 
Class ilChatroomServerSettings. 
 
setGlobalVariable(string $name, $value)
 
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins 
 
$ilChatroomServerConnectorMock
 
createGlobalIlLanguageMock()
 
createIlObjChatroomGUIGetConnectorMock($returnValue)