Class ilObjChatroomTest.
More...
◆ setUp()
ilObjChatroomTest::setUp |
( |
| ) |
|
|
protected |
◆ test_GetPublicObjId()
ilObjChatroomTest::test_GetPublicObjId |
( |
| ) |
|
Definition at line 53 of file class.ilObjChatroomTest.php.
References $GLOBALS, $query, array, ilChatroomAbstractTest\createGlobalIlDBMock(), and object.
57 $query =
'SELECT object_id FROM chatroom_settings WHERE room_type=default';
58 $GLOBALS[
'ilDB']->expects($this->once())->method(
'query')->with($this->equalTo(
$query));
59 $GLOBALS[
'ilDB']->expects($this->once())->method(
'quote')->with($this->equalTo(
'default'))->will($this->returnValue(
'default'));
60 $GLOBALS[
'ilDB']->expects($this->once())->method(
'fetchAssoc')->will($this->returnValue(
array(
'object_id' =>
'6')));
62 $this->assertEquals(6, $this->
object->_getPublicObjId());
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
Create styles array
The data for the language used.
Create new PHPExcel object
obj_idprivate
◆ test_GetPublicObjIdDefaultValue()
ilObjChatroomTest::test_GetPublicObjIdDefaultValue |
( |
| ) |
|
Definition at line 65 of file class.ilObjChatroomTest.php.
References $GLOBALS, $query, ilChatroomAbstractTest\createGlobalIlDBMock(), and object.
69 $query =
'SELECT object_id FROM chatroom_settings WHERE room_type=default';
70 $GLOBALS[
'ilDB']->expects($this->once())->method(
'query')->with($this->equalTo(
$query));
71 $GLOBALS[
'ilDB']->expects($this->once())->method(
'quote')->with($this->equalTo(
'default'))->will($this->returnValue(
'default'));
72 $GLOBALS[
'ilDB']->expects($this->once())->method(
'fetchAssoc')->will($this->returnValue(null));
74 $this->assertEquals(0, $this->
object->_getPublicObjId());
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
Create new PHPExcel object
obj_idprivate
◆ test_GetPublicRefId()
ilObjChatroomTest::test_GetPublicRefId |
( |
| ) |
|
◆ testConstructor()
ilObjChatroomTest::testConstructor |
( |
| ) |
|
◆ testGetPersonalInformation()
ilObjChatroomTest::testGetPersonalInformation |
( |
| ) |
|
Definition at line 36 of file class.ilObjChatroomTest.php.
38 $this->ilChatroomUserMock->expects($this->once())->method(
'getUserId')->will($this->returnValue(6));
39 $this->ilChatroomUserMock->expects($this->once())->method(
'getUsername')->will($this->returnValue(
'username'));
41 $userInfo = $this->
object->getPersonalInformation($this->ilChatroomUserMock);
43 $this->assertInstanceOf(
'stdClass', $userInfo);
44 $this->assertEquals(
'username', $userInfo->username);
45 $this->assertEquals(6, $userInfo->id);
◆ testInitDefaultRoles()
ilObjChatroomTest::testInitDefaultRoles |
( |
| ) |
|
Definition at line 77 of file class.ilObjChatroomTest.php.
References object.
80 $this->backupStaticAttributes =
true;
81 $this->
object->expects($this->once())->method(
'createDefaultRole');
82 $this->assertEmpty($this->
object->initDefaultRoles());
Create new PHPExcel object
obj_idprivate
◆ $object
ilObjChatroomTest::$object |
|
protected |
The documentation for this class was generated from the following file: