Class ilMailOptionsGUITest.
More...
◆ getMailOptionsGUI()
◆ testMailOptionsAreAccessibleIfGlobalAccessIsNotDenied()
| ilMailOptionsGUITest::testMailOptionsAreAccessibleIfGlobalAccessIsNotDenied |
( |
| ) |
|
- Exceptions
-
Definition at line 59 of file ilMailOptionsGUITest.php.
References $http, ILIAS\LTI\ToolProvider\$key, ILIAS\LTI\ToolProvider\$settings, and getMailOptionsGUI().
61 $ctrl = $this->getMockBuilder(ilCtrl::class)->disableOriginalConstructor()->getMock();
62 $form = $this->getMockBuilder(ilMailOptionsFormGUI::class)->disableOriginalConstructor()->getMock();
64 $ctrl->method(
'getCmd')->willReturn(
'showOptions');
66 $request = $this->getMockBuilder(ServerRequestInterface::class)->disableOriginalConstructor()->getMock();
67 $request->method(
'getQueryParams')->willReturn([]);
70 $http = $this->getMockBuilder(GlobalHttpState::class)->getMock();
71 $http->method(
'wrapper')->willReturn($wrapper);
73 $settings = $this->getMockBuilder(ilSetting::class)->disableOriginalConstructor()->onlyMethods([
'get'])->getMock();
74 $settings->method(
'get')->willReturnCallback(
static function (
string $key, ?
string $default = null) {
75 if ($key ===
'show_mail_settings') {
85 $this->createMock(\
ILIAS\Data\
Clock\ClockInterface::class),
87 $this->createMock(ilDBInterface::class)
92 $gui->executeCommand();
Class ChatMainBarProvider .
getMailOptionsGUI(GlobalHttpState $httpState, ilCtrlInterface $ctrl, ilMailOptions $mail_options)
◆ testMailOptionsAreNotAccessibleIfGlobalAccessIsDeniedAndUserWillBeRedirectedToMailSystem()
| ilMailOptionsGUITest::testMailOptionsAreNotAccessibleIfGlobalAccessIsDeniedAndUserWillBeRedirectedToMailSystem |
( |
| ) |
|
- Exceptions
-
Definition at line 98 of file ilMailOptionsGUITest.php.
References $http, ILIAS\LTI\ToolProvider\$key, ILIAS\LTI\ToolProvider\$settings, and getMailOptionsGUI().
100 $ctrl = $this->getMockBuilder(ilCtrl::class)->disableOriginalConstructor()->getMock();
101 $form = $this->getMockBuilder(ilMailOptionsFormGUI::class)->disableOriginalConstructor()->getMock();
103 $ctrl->method(
'getCmd')->willReturn(
'showOptions');
105 $request = $this->getMockBuilder(ServerRequestInterface::class)->disableOriginalConstructor()->getMock();
106 $request->method(
'getQueryParams')->willReturn([]);
109 $http = $this->getMockBuilder(GlobalHttpState::class)->getMock();
110 $http->method(
'wrapper')->willReturn($wrapper);
112 $ctrl->expects($this->once())->method(
'redirectByClass')->with(ilMailGUI::class);
114 $settings = $this->getMockBuilder(ilSetting::class)->disableOriginalConstructor()->onlyMethods([
'get'])->getMock();
115 $settings->method(
'get')->willReturnCallback(
static function (
string $key, ?
string $default = null) {
116 if ($key ===
'show_mail_settings') {
126 $this->createMock(\
ILIAS\Data\
Clock\ClockInterface::class),
128 $this->createMock(ilDBInterface::class)
132 $gui->setForm($form);
133 $gui->executeCommand();
Class ChatMainBarProvider .
getMailOptionsGUI(GlobalHttpState $httpState, ilCtrlInterface $ctrl, ilMailOptions $mail_options)
◆ testMailOptionsAreNotAccessibleIfGlobalAccessIsDeniedAndUserWillBeRedirectedToPersonalSettings()
| ilMailOptionsGUITest::testMailOptionsAreNotAccessibleIfGlobalAccessIsDeniedAndUserWillBeRedirectedToPersonalSettings |
( |
| ) |
|
- Exceptions
-
Definition at line 139 of file ilMailOptionsGUITest.php.
References $http, ILIAS\LTI\ToolProvider\$key, ILIAS\LTI\ToolProvider\$settings, and getMailOptionsGUI().
141 $this->expectException(ilCtrlException::class);
143 $request = $this->getMockBuilder(ServerRequestInterface::class)->disableOriginalConstructor()->getMock();
144 $ctrl = $this->createMock(ilCtrlInterface::class);
145 $form = $this->getMockBuilder(ilMailOptionsFormGUI::class)->disableOriginalConstructor()->getMock();
147 $ctrl->method(
'getCmd')->willReturn(
'showOptions');
149 $ctrl->expects($this->once())->method(
'redirectByClass')->with(ilPersonalSettingsGUI::class)->willThrowException(
153 $settings = $this->getMockBuilder(ilSetting::class)->disableOriginalConstructor()->onlyMethods([
'get'])->getMock();
154 $settings->method(
'get')->willReturnCallback(
static function (
string $key, ?
string $default = null) {
155 if ($key ===
'show_mail_settings') {
162 $request = $this->getMockBuilder(ServerRequestInterface::class)->disableOriginalConstructor()->getMock();
163 $request->method(
'getQueryParams')->willReturn([
164 'referrer' => ilPersonalSettingsGUI::class,
168 $http = $this->getMockBuilder(GlobalHttpState::class)->getMock();
169 $http->method(
'wrapper')->willReturn($wrapper);
174 $this->createMock(\
ILIAS\Data\
Clock\ClockInterface::class),
176 $this->createMock(ilDBInterface::class)
180 $gui->setForm($form);
181 $gui->executeCommand();
Class ChatMainBarProvider .
getMailOptionsGUI(GlobalHttpState $httpState, ilCtrlInterface $ctrl, ilMailOptions $mail_options)
The documentation for this class was generated from the following file: