Class ilObjChatroomAdminAccessTest.
More...
◆ setUp()
ilObjChatroomAdminAccessTest::setUp |
( |
| ) |
|
|
protected |
Definition at line 20 of file class.ilObjChatroomAdminAccessTest.php.
References $ilAccessMock.
22 if (defined(
'ILIAS_PHPUNIT_CONTEXT')) {
23 include_once(
"./Services/PHPUnit/classes/class.ilUnitUtil.php");
24 ilUnitUtil::performInitialisation();
26 chdir(dirname(__FILE__));
30 require_once
'./Services/AccessControl/classes/class.ilAccessHandler.php';
31 $this->ilAccessMock = $this->createMock(
'ilAccessHandler');
35 require_once
'./Modules/Chatroom/classes/class.ilObjChatroomAdminAccess.php';
Class ilObjChatroomAdminAccess Access class for chatroom objects.
◆ test_checkGotoIssueWithTargetNotAString()
ilObjChatroomAdminAccessTest::test_checkGotoIssueWithTargetNotAString |
( |
| ) |
|
Definition at line 76 of file class.ilObjChatroomAdminAccessTest.php.
78 $this->assertFalse($this->adminAccess->_checkGoto(array(
'chtr',
'5')));
79 $this->assertFalse($this->adminAccess->_checkGoto(5));
◆ test_checkGotoReturnFalse()
ilObjChatroomAdminAccessTest::test_checkGotoReturnFalse |
( |
| ) |
|
Definition at line 58 of file class.ilObjChatroomAdminAccessTest.php.
60 $this->ilAccessMock->expects($this->any())->method(
'checkAccess')->with($this->equalTo(
'visible'), $this->equalTo(
''), $this->equalTo(
'1'))->will($this->returnValue(
false));
62 $this->assertFalse($this->adminAccess->_checkGoto(
''));
63 $this->assertFalse($this->adminAccess->_checkGoto(
'chtr'));
64 $this->assertFalse($this->adminAccess->_checkGoto(
'chtr_'));
65 $this->assertFalse($this->adminAccess->_checkGoto(
'chtr_'));
66 $this->assertFalse($this->adminAccess->_checkGoto(
'chtr_test'));
67 $this->assertFalse($this->adminAccess->_checkGoto(
'chtr_1'));
◆ test_checkGotoReturnTrue()
ilObjChatroomAdminAccessTest::test_checkGotoReturnTrue |
( |
| ) |
|
Definition at line 70 of file class.ilObjChatroomAdminAccessTest.php.
References Sabre\Event\once().
72 $this->ilAccessMock->expects($this->
once())->method(
'checkAccess')->with($this->equalTo(
'visible'), $this->equalTo(
''), $this->equalTo(
'5'))->will($this->returnValue(
true));
73 $this->assertTrue($this->adminAccess->_checkGoto(
'chtr_5'));
once($eventName, callable $callBack, $priority=100)
Subscribe to an event exactly once.
◆ test_getCommands()
ilObjChatroomAdminAccessTest::test_getCommands |
( |
| ) |
|
Definition at line 44 of file class.ilObjChatroomAdminAccessTest.php.
47 array(
"permission" =>
"read",
"cmd" =>
"view",
"lang_var" =>
"enter",
"default" =>
true),
48 array(
"permission" =>
"write",
"cmd" =>
"edit",
"lang_var" =>
"edit"),
49 array(
"permission" =>
"write",
"cmd" =>
"versions",
"lang_var" =>
"versions"),
52 $commands = $this->adminAccess->_getCommands();
54 $this->assertInternalType(
"array", $commands);
55 $this->assertEquals($expected, $commands);
◆ testInstanceOf()
ilObjChatroomAdminAccessTest::testInstanceOf |
( |
| ) |
|
◆ $adminAccess
ilObjChatroomAdminAccessTest::$adminAccess |
|
protected |
◆ $ilAccessMock
ilObjChatroomAdminAccessTest::$ilAccessMock |
|
protected |
The documentation for this class was generated from the following file: