Class ilChatroomAbstractTaskTest.
More...
◆ createGlobalIlCtrlMock()
| ilChatroomAbstractTaskTest::createGlobalIlCtrlMock |
( |
| ) |
|
|
protected |
◆ createGlobalIlLanguageMock()
| ilChatroomAbstractTaskTest::createGlobalIlLanguageMock |
( |
| ) |
|
|
protected |
◆ createGlobalIlUserMock()
| ilChatroomAbstractTaskTest::createGlobalIlUserMock |
( |
| ) |
|
|
protected |
◆ createGlobalRbacSystemCheckAccessMock()
| ilChatroomAbstractTaskTest::createGlobalRbacSystemCheckAccessMock |
( |
string |
$permission, |
|
|
bool |
$result, |
|
|
?InvocationOrder |
$times = null |
|
) |
| |
|
protected |
Definition at line 77 of file class.ilChatroomAbstractTaskTest.php.
81 {
82 if ($times === null) {
83 $times = $this->any();
84 }
85
86 return $GLOBALS[
'rbacsystem']->expects($times)
87 ->method('checkAccess')
88 ->with($this->equalTo($permission))->willReturn(
89 $result
90 );
91 }
References $GLOBALS.
◆ createGlobalRbacSystemMock()
| ilChatroomAbstractTaskTest::createGlobalRbacSystemMock |
( |
| ) |
|
|
protected |
Definition at line 66 of file class.ilChatroomAbstractTaskTest.php.
67 {
68 $rbacsystem = $this->getMockBuilder(ilRbacSystem::class)->disableOriginalConstructor()->onlyMethods(
69 ['checkAccess']
70 )->getMock();
71
73
74 return $rbacsystem;
75 }
class ilRbacSystem system function like checkAccess, addActiveRole ... Supporting system functions ar...
References ilChatroomAbstractTest\setGlobalVariable().
◆ createIlChatroomIsOwnerOfPrivateRoomMock()
| ilChatroomAbstractTaskTest::createIlChatroomIsOwnerOfPrivateRoomMock |
( |
int |
$userId, |
|
|
int |
$subRoomId, |
|
|
bool |
$result |
|
) |
| |
|
protected |
Definition at line 116 of file class.ilChatroomAbstractTaskTest.php.
120 : InvocationMocker {
121 return $this->ilChatroomMock->method('isOwnerOfPrivateRoom')->with(
122 $this->equalTo($userId),
123 $this->equalTo($subRoomId)
124 )->willReturn($result);
125 }
◆ createIlChatroomServerConnectorFileGetContentsMock()
| ilChatroomAbstractTaskTest::createIlChatroomServerConnectorFileGetContentsMock |
( |
|
$returnValue | ) |
|
|
protected |
Definition at line 142 of file class.ilChatroomAbstractTaskTest.php.
142 : InvocationMocker
143 {
144 return $this->ilChatroomServerConnectorMock->method('file_get_contents')->willReturn(
145 $returnValue
146 );
147 }
◆ createIlChatroomServerConnectorMock()
Definition at line 132 of file class.ilChatroomAbstractTaskTest.php.
135 $this->ilChatroomServerConnectorMock = $this->getMockBuilder(ilChatroomServerConnector::class)->setConstructorArgs(
137 )->onlyMethods(['file_get_contents'])->getMock();
138
140 }
$ilChatroomServerConnectorMock
Class ilChatroomServerConnector.
◆ createIlChatroomUserGetUserIdMock()
| ilChatroomAbstractTaskTest::createIlChatroomUserGetUserIdMock |
( |
int |
$userId | ) |
|
|
protected |
◆ createIlObjChatroomGUIGetConnectorMock()
| ilChatroomAbstractTaskTest::createIlObjChatroomGUIGetConnectorMock |
( |
|
$returnValue | ) |
|
|
protected |
◆ createIlObjChatroomMock()
| ilChatroomAbstractTaskTest::createIlObjChatroomMock |
( |
int |
$id | ) |
|
|
protected |
Definition at line 149 of file class.ilChatroomAbstractTaskTest.php.
150 {
151 $this->object = $this->getMockBuilder(ilObjChatroom::class)->disableOriginalConstructor()->onlyMethods(
152 ['getId']
153 )->getMock();
154 $this->
object->method(
'getId')->willReturn(
$id);
155
157 }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
◆ createSendResponseMock()
| ilChatroomAbstractTaskTest::createSendResponseMock |
( |
MockObject |
$mock, |
|
|
|
$response |
|
) |
| |
|
protected |
Definition at line 159 of file class.ilChatroomAbstractTaskTest.php.
159 : void
160 {
161 $mock->expects($this->once())->method('sendResponse')->with(
163 )->willReturnCallback(
164 static function (): void {
165 throw new Exception('Exit', 0);
166 }
167 );
168 }
References $response.
◆ setUp()
| ilChatroomAbstractTaskTest::setUp |
( |
| ) |
|
|
protected |
◆ $gui
| ilChatroomAbstractTaskTest::$gui |
|
protected |
◆ $ilChatroomServerConnectorMock
| ilChatroomAbstractTaskTest::$ilChatroomServerConnectorMock |
|
protected |
◆ $object
| ilChatroomAbstractTaskTest::$object |
|
protected |
The documentation for this class was generated from the following file: