Definition at line 27 of file ilMailOptionsGUITest.php.
◆ getMailOptionsGUI()
◆ testMailOptionsAreAccessibleIfGlobalAccessIsNotDenied()
ilMailOptionsGUITest::testMailOptionsAreAccessibleIfGlobalAccessIsNotDenied |
( |
| ) |
|
Definition at line 50 of file ilMailOptionsGUITest.php.
References $http, getMailOptionsGUI(), and null.
52 $ctrl = $this->getMockBuilder(ilCtrl::class)->disableOriginalConstructor()->getMock();
53 $form = $this->getMockBuilder(ilMailOptionsFormGUI::class)->disableOriginalConstructor()->getMock();
55 $ctrl->method(
'getCmd')->willReturn(
'showOptions');
57 $request = $this->getMockBuilder(ServerRequestInterface::class)->disableOriginalConstructor()->getMock();
58 $request->method(
'getQueryParams')->willReturn([]);
61 $http = $this->getMockBuilder(GlobalHttpState::class)->getMock();
62 $http->method(
'wrapper')->willReturn($wrapper);
64 $settings = $this->getMockBuilder(ilSetting::class)->disableOriginalConstructor()->onlyMethods([
'get'])->getMock();
65 $settings->method(
'get')->willReturnCallback(
static function (
string $key, ?
string $default =
null) {
66 if ($key ===
'show_mail_settings') {
78 $this->createMock(ilDBInterface::class)
83 $gui->executeCommand();
Interface Observer Contains several chained tasks and infos about them.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getMailOptionsGUI(GlobalHttpState $httpState, ilCtrlInterface $ctrl, ilMailOptions $mail_options)
◆ testMailOptionsAreNotAccessibleIfGlobalAccessIsDeniedAndUserWillBeRedirectedToMailSystem()
ilMailOptionsGUITest::testMailOptionsAreNotAccessibleIfGlobalAccessIsDeniedAndUserWillBeRedirectedToMailSystem |
( |
| ) |
|
Definition at line 86 of file ilMailOptionsGUITest.php.
References $http, getMailOptionsGUI(), and null.
88 $ctrl = $this->getMockBuilder(ilCtrl::class)->disableOriginalConstructor()->getMock();
89 $form = $this->getMockBuilder(ilMailOptionsFormGUI::class)->disableOriginalConstructor()->getMock();
91 $ctrl->method(
'getCmd')->willReturn(
'showOptions');
93 $request = $this->getMockBuilder(ServerRequestInterface::class)->disableOriginalConstructor()->getMock();
94 $request->method(
'getQueryParams')->willReturn([]);
97 $http = $this->getMockBuilder(GlobalHttpState::class)->getMock();
98 $http->method(
'wrapper')->willReturn($wrapper);
100 $ctrl->expects($this->once())->method(
'redirectByClass')->with(ilMailGUI::class);
102 $settings = $this->getMockBuilder(ilSetting::class)->disableOriginalConstructor()->onlyMethods([
'get'])->getMock();
103 $settings->method(
'get')->willReturnCallback(
static function (
string $key, ?
string $default =
null) {
104 if ($key ===
'show_mail_settings') {
116 $this->createMock(ilDBInterface::class)
120 $gui->setForm($form);
121 $gui->executeCommand();
Interface Observer Contains several chained tasks and infos about them.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getMailOptionsGUI(GlobalHttpState $httpState, ilCtrlInterface $ctrl, ilMailOptions $mail_options)
◆ testMailOptionsAreNotAccessibleIfGlobalAccessIsDeniedAndUserWillBeRedirectedToPersonalSettings()
ilMailOptionsGUITest::testMailOptionsAreNotAccessibleIfGlobalAccessIsDeniedAndUserWillBeRedirectedToPersonalSettings |
( |
| ) |
|
Definition at line 124 of file ilMailOptionsGUITest.php.
References $http, getMailOptionsGUI(), and null.
126 $this->expectException(ilCtrlException::class);
128 $request = $this->getMockBuilder(ServerRequestInterface::class)->disableOriginalConstructor()->getMock();
129 $ctrl = $this->createMock(ilCtrlInterface::class);
130 $form = $this->getMockBuilder(ilMailOptionsFormGUI::class)->disableOriginalConstructor()->getMock();
132 $ctrl->method(
'getCmd')->willReturn(
'showOptions');
134 $ctrl->expects($this->once())->method(
'redirectByClass')->with(ilPersonalSettingsGUI::class)->willThrowException(
138 $settings = $this->getMockBuilder(ilSetting::class)->disableOriginalConstructor()->onlyMethods([
'get'])->getMock();
139 $settings->method(
'get')->willReturnCallback(
static function (
string $key, ?
string $default =
null) {
140 if ($key ===
'show_mail_settings') {
147 $request = $this->getMockBuilder(ServerRequestInterface::class)->disableOriginalConstructor()->getMock();
148 $request->method(
'getQueryParams')->willReturn([
149 'referrer' => ilPersonalSettingsGUI::class,
153 $http = $this->getMockBuilder(GlobalHttpState::class)->getMock();
154 $http->method(
'wrapper')->willReturn($wrapper);
161 $this->createMock(ilDBInterface::class)
165 $gui->setForm($form);
166 $gui->executeCommand();
Interface Observer Contains several chained tasks and infos about them.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getMailOptionsGUI(GlobalHttpState $httpState, ilCtrlInterface $ctrl, ilMailOptions $mail_options)
The documentation for this class was generated from the following file: