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') {
86 $this->createMock(ilDBInterface::class)
91 $gui->executeCommand();
Class ilMailOptions this class handles user mails.
getMailOptionsGUI(GlobalHttpState $httpState, ilCtrlInterface $ctrl, ilMailOptions $mail_options)
◆ testMailOptionsAreNotAccessibleIfGlobalAccessIsDeniedAndUserWillBeRedirectedToMailSystem()
ilMailOptionsGUITest::testMailOptionsAreNotAccessibleIfGlobalAccessIsDeniedAndUserWillBeRedirectedToMailSystem |
( |
| ) |
|
- Exceptions
-
Definition at line 97 of file ilMailOptionsGUITest.php.
References $http, ILIAS\LTI\ToolProvider\$key, ILIAS\LTI\ToolProvider\$settings, and getMailOptionsGUI().
99 $ctrl = $this->getMockBuilder(ilCtrl::class)->disableOriginalConstructor()->getMock();
100 $form = $this->getMockBuilder(ilMailOptionsFormGUI::class)->disableOriginalConstructor()->getMock();
102 $ctrl->method(
'getCmd')->willReturn(
'showOptions');
104 $request = $this->getMockBuilder(ServerRequestInterface::class)->disableOriginalConstructor()->getMock();
105 $request->method(
'getQueryParams')->willReturn([]);
108 $http = $this->getMockBuilder(GlobalHttpState::class)->getMock();
109 $http->method(
'wrapper')->willReturn($wrapper);
111 $ctrl->expects($this->once())->method(
'redirectByClass')->with(ilMailGUI::class);
113 $settings = $this->getMockBuilder(ilSetting::class)->disableOriginalConstructor()->onlyMethods([
'get'])->getMock();
114 $settings->method(
'get')->willReturnCallback(
static function (
string $key, ?
string $default = null) {
115 if ($key ===
'show_mail_settings') {
126 $this->createMock(ilDBInterface::class)
130 $gui->setForm($form);
131 $gui->executeCommand();
Class ilMailOptions this class handles user mails.
getMailOptionsGUI(GlobalHttpState $httpState, ilCtrlInterface $ctrl, ilMailOptions $mail_options)
◆ testMailOptionsAreNotAccessibleIfGlobalAccessIsDeniedAndUserWillBeRedirectedToPersonalSettings()
ilMailOptionsGUITest::testMailOptionsAreNotAccessibleIfGlobalAccessIsDeniedAndUserWillBeRedirectedToPersonalSettings |
( |
| ) |
|
- Exceptions
-
Definition at line 137 of file ilMailOptionsGUITest.php.
References $http, ILIAS\LTI\ToolProvider\$key, ILIAS\LTI\ToolProvider\$settings, and getMailOptionsGUI().
139 $this->expectException(ilCtrlException::class);
141 $request = $this->getMockBuilder(ServerRequestInterface::class)->disableOriginalConstructor()->getMock();
142 $ctrl = $this->createMock(ilCtrlInterface::class);
143 $form = $this->getMockBuilder(ilMailOptionsFormGUI::class)->disableOriginalConstructor()->getMock();
145 $ctrl->method(
'getCmd')->willReturn(
'showOptions');
147 $ctrl->expects($this->once())->method(
'redirectByClass')->with(ilPersonalSettingsGUI::class)->willThrowException(
151 $settings = $this->getMockBuilder(ilSetting::class)->disableOriginalConstructor()->onlyMethods([
'get'])->getMock();
152 $settings->method(
'get')->willReturnCallback(
static function (
string $key, ?
string $default = null) {
153 if ($key ===
'show_mail_settings') {
160 $request = $this->getMockBuilder(ServerRequestInterface::class)->disableOriginalConstructor()->getMock();
161 $request->method(
'getQueryParams')->willReturn([
162 'referrer' => ilPersonalSettingsGUI::class,
166 $http = $this->getMockBuilder(GlobalHttpState::class)->getMock();
167 $http->method(
'wrapper')->willReturn($wrapper);
173 $this->createMock(ilDBInterface::class)
177 $gui->setForm($form);
178 $gui->executeCommand();
Class ilMailOptions this class handles user mails.
getMailOptionsGUI(GlobalHttpState $httpState, ilCtrlInterface $ctrl, ilMailOptions $mail_options)
The documentation for this class was generated from the following file: