Class ilObjChatroomAdminAccessTest.
More...
◆ setUp()
ilObjChatroomAdminAccessTest::setUp |
( |
| ) |
|
|
protected |
Definition at line 20 of file class.ilObjChatroomAdminAccessTest.php.
References $ilAccessMock, and defined.
22 if(
defined(
'ILIAS_PHPUNIT_CONTEXT'))
24 include_once(
"./Services/PHPUnit/classes/class.ilUnitUtil.php");
25 ilUnitUtil::performInitialisation();
29 chdir(dirname(__FILE__));
33 require_once
'./Services/AccessControl/classes/class.ilAccessHandler.php';
34 $this->ilAccessMock = $this->getMock(
'ilAccessHandler');
38 require_once
'./Modules/Chatroom/classes/class.ilObjChatroomAdminAccess.php';
Class ilObjChatroomAdminAccess Access class for chatroom objects.
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'
◆ test_checkGotoIssueWithTargetNotAString()
ilObjChatroomAdminAccessTest::test_checkGotoIssueWithTargetNotAString |
( |
| ) |
|
Definition at line 79 of file class.ilObjChatroomAdminAccessTest.php.
References array.
81 $this->assertFalse($this->adminAccess->_checkGoto(
array(
'chtr',
'5')));
82 $this->assertFalse($this->adminAccess->_checkGoto(5));
Create styles array
The data for the language used.
◆ test_checkGotoReturnFalse()
ilObjChatroomAdminAccessTest::test_checkGotoReturnFalse |
( |
| ) |
|
Definition at line 61 of file class.ilObjChatroomAdminAccessTest.php.
63 $this->ilAccessMock->expects($this->any())->method(
'checkAccess')->with($this->equalTo(
'visible'), $this->equalTo(
''), $this->equalTo(
'1'))->will($this->returnValue(
false));
65 $this->assertFalse($this->adminAccess->_checkGoto(
''));
66 $this->assertFalse($this->adminAccess->_checkGoto(
'chtr'));
67 $this->assertFalse($this->adminAccess->_checkGoto(
'chtr_'));
68 $this->assertFalse($this->adminAccess->_checkGoto(
'chtr_'));
69 $this->assertFalse($this->adminAccess->_checkGoto(
'chtr_test'));
70 $this->assertFalse($this->adminAccess->_checkGoto(
'chtr_1'));
◆ test_checkGotoReturnTrue()
ilObjChatroomAdminAccessTest::test_checkGotoReturnTrue |
( |
| ) |
|
Definition at line 73 of file class.ilObjChatroomAdminAccessTest.php.
75 $this->ilAccessMock->expects($this->once())->method(
'checkAccess')->with($this->equalTo(
'visible'), $this->equalTo(
''), $this->equalTo(
'5'))->will($this->returnValue(
true));
76 $this->assertTrue($this->adminAccess->_checkGoto(
'chtr_5'));
◆ test_getCommands()
ilObjChatroomAdminAccessTest::test_getCommands |
( |
| ) |
|
Definition at line 47 of file class.ilObjChatroomAdminAccessTest.php.
References array.
50 array(
"permission" =>
"read",
"cmd" =>
"view",
"lang_var" =>
"enter",
"default" =>
true),
51 array(
"permission" =>
"write",
"cmd" =>
"edit",
"lang_var" =>
"edit"),
52 array(
"permission" =>
"write",
"cmd" =>
"versions",
"lang_var" =>
"versions"),
55 $commands = $this->adminAccess->_getCommands();
57 $this->assertInternalType(
"array", $commands);
58 $this->assertEquals($expected, $commands);
Create styles array
The data for the language used.
◆ testInstanceOf()
ilObjChatroomAdminAccessTest::testInstanceOf |
( |
| ) |
|
◆ $adminAccess
ilObjChatroomAdminAccessTest::$adminAccess |
|
protected |
◆ $ilAccessMock
ilObjChatroomAdminAccessTest::$ilAccessMock |
|
protected |
The documentation for this class was generated from the following file: