ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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.

54 {
55 $GLOBALS['ilDB'] = $this->getMockBuilder('ilDBMySQL')->disableOriginalConstructor()->setMethods(
56 array('quote', 'query', 'fetchAssoc')
57 )->getMock();
58
59 return $GLOBALS['ilDB'];
60 }
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64

References $GLOBALS.

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

+ Here is the caller graph for this function:

◆ createIlChatroomMock()

ilChatroomAbstractTest::createIlChatroomMock ( )
protected

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

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
40 }

References $ilChatroomMock.

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

+ Here is the caller graph for this function:

◆ createIlChatroomUserMock()

ilChatroomAbstractTest::createIlChatroomUserMock ( )
protected

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

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 }

References $ilChatroomUserMock.

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

+ Here is the caller graph for this function:

◆ setUp()

ilChatroomAbstractTest::setUp ( )
protected

Reimplemented in ilChatroomAbstractTaskTest, ilChatroomTaskHandlerTest, ilObjChatroomTest, ilChatroomClearTaskTest, ilChatroomGetPermissionsTaskTest, ilChatroomInfoTaskTest, and ilChatroomInitialTaskTest.

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: