ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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, and array.

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['loaded']
Global hash that tracks already loaded includes.
Create styles array
The data for the language used.
+ Here is the caller graph for this function:

◆ createIlChatroomMock()

ilChatroomAbstractTest::createIlChatroomMock ( )
protected

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

References $ilChatroomMock, and array.

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  }
Create styles array
The data for the language used.
+ Here is the caller graph for this function:

◆ createIlChatroomUserMock()

ilChatroomAbstractTest::createIlChatroomUserMock ( )
protected

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

References $ilChatroomUserMock, and array.

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  }
Create styles array
The data for the language used.
+ Here is the caller graph for this function:

◆ setUp()

ilChatroomAbstractTest::setUp ( )
protected

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

References defined.

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  }
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'
Definition: bootstrap.php:27

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: