ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilChatroomAbstractTest Class Reference

Class ilChatroomAbstractTest. More...

+ Inheritance diagram for ilChatroomAbstractTest:
+ Collaboration diagram for ilChatroomAbstractTest:

Protected Member Functions

 setUp ()
 
 createIlChatroomMock ()
 
 createIlChatroomUserMock ()
 
 createGlobalIlDBMock ()
 

Protected Attributes

 $ilChatroomMock
 
 $ilChatroomUserMock
 

Detailed Description

Member Function Documentation

◆ createGlobalIlDBMock()

ilChatroomAbstractTest::createGlobalIlDBMock ( )
protected

Definition at line 53 of file class.ilChatroomAbstractTest.php.

References $GLOBALS.

Referenced by ilChatroomInfoTaskTest\setUp(), ilObjChatroomTest\test_GetPublicObjId(), and ilObjChatroomTest\test_GetPublicObjIdDefaultValue().

54  {
55  $GLOBALS['ilDB'] = $this->getMockBuilder('ilDBMySQL')->disableOriginalConstructor()->setMethods(
56  array('quote', 'query', 'fetchAssoc')
57  )->getMock();
58 
59  return $GLOBALS['ilDB'];
60  }
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.
+ Here is the caller graph for this function:

◆ createIlChatroomMock()

ilChatroomAbstractTest::createIlChatroomMock ( )
protected

Definition at line 30 of file class.ilChatroomAbstractTest.php.

References $ilChatroomMock.

Referenced by ilChatroomTaskHandlerTest\testCanModerate(), ilChatroomTaskHandlerTest\testExitIfNoRoomExists(), ilChatroomTaskHandlerTest\testExitIfNoRoomPermissionFails(), and ilChatroomTaskHandlerTest\testExitIfNoRoomPermissionSuccess().

31  {
32  require_once './Modules/Chatroom/classes/class.ilChatroom.php';
33  require_once './Services/Utilities/classes/class.ilUtil.php';
34 
35  $this->ilChatroomMock = $this->getMockBuilder('ilChatroom')->disableOriginalConstructor()->setMethods(
36  array('isOwnerOfPrivateRoom', 'clearMessages')
37  )->getMock();
38 
39  return $this->ilChatroomMock;
40  }
+ Here is the caller graph for this function:

◆ createIlChatroomUserMock()

ilChatroomAbstractTest::createIlChatroomUserMock ( )
protected

Definition at line 42 of file class.ilChatroomAbstractTest.php.

References $ilChatroomUserMock.

Referenced by ilObjChatroomTest\setUp(), ilChatroomTaskHandlerTest\testExitIfNoRoomPermissionFails(), and ilChatroomTaskHandlerTest\testExitIfNoRoomPermissionSuccess().

43  {
44  require_once './Modules/Chatroom/classes/class.ilChatroomUser.php';
45 
46  $this->ilChatroomUserMock = $this->getMockBuilder('ilChatroomUser')->disableOriginalConstructor()->setMethods(
47  array('getUserId', 'getUsername')
48  )->getMock();
49 
51  }
+ Here is the caller graph for this function:

◆ setUp()

ilChatroomAbstractTest::setUp ( )
protected

Definition at line 19 of file class.ilChatroomAbstractTest.php.

20  {
21  if (defined('ILIAS_PHPUNIT_CONTEXT')) {
22  include_once("./Services/PHPUnit/classes/class.ilUnitUtil.php");
23  ilUnitUtil::performInitialisation();
24  } else {
25  chdir(dirname(__FILE__));
26  chdir('../../../');
27  }
28  }

Field Documentation

◆ $ilChatroomMock

ilChatroomAbstractTest::$ilChatroomMock
protected

Definition at line 13 of file class.ilChatroomAbstractTest.php.

Referenced by createIlChatroomMock().

◆ $ilChatroomUserMock

ilChatroomAbstractTest::$ilChatroomUserMock
protected

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

Referenced by createIlChatroomUserMock().


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