ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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 56 of file class.ilChatroomAbstractTest.php.

References $GLOBALS, and array.

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

57  {
58  $GLOBALS['ilDB'] = $this->getMockBuilder('ilDBMySQL')->disableOriginalConstructor()->setMethods(
59  array('quote', 'query', 'fetchAssoc')
60  )->getMock();
61 
62  return $GLOBALS['ilDB'];
63  }
$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 33 of file class.ilChatroomAbstractTest.php.

References $ilChatroomMock, and array.

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

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

◆ createIlChatroomUserMock()

ilChatroomAbstractTest::createIlChatroomUserMock ( )
protected

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

References $ilChatroomUserMock, and array.

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

46  {
47  require_once './Modules/Chatroom/classes/class.ilChatroomUser.php';
48 
49  $this->ilChatroomUserMock = $this->getMockBuilder('ilChatroomUser')->disableOriginalConstructor()->setMethods(
50  array('getUserId', 'getUsername')
51  )->getMock();
52 
54  }
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  {
23  include_once("./Services/PHPUnit/classes/class.ilUnitUtil.php");
24  ilUnitUtil::performInitialisation();
25  }
26  else
27  {
28  chdir(dirname(__FILE__));
29  chdir('../../../');
30  }
31  }
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: