Skip to content

Commit cd2c8f7

Browse files
Mail: Remove obsolete test
1 parent 2b4c48a commit cd2c8f7

1 file changed

Lines changed: 0 additions & 46 deletions

File tree

components/ILIAS/Mail/tests/gui/ilMailOptionsGUITest.php

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -124,50 +124,4 @@ public function testMailOptionsAreNotAccessibleIfGlobalAccessIsDeniedAndUserWill
124124
$gui->setForm($form);
125125
$gui->executeCommand();
126126
}
127-
128-
public function testMailOptionsAreNotAccessibleIfGlobalAccessIsDeniedAndUserWillBeRedirectedToPersonalSettings(): void
129-
{
130-
$this->expectException(ilCtrlException::class);
131-
132-
$request = $this->getMockBuilder(ServerRequestInterface::class)->disableOriginalConstructor()->getMock();
133-
$ctrl = $this->createMock(ilCtrlInterface::class);
134-
$form = $this->getMockBuilder(ilMailOptionsFormGUI::class)->disableOriginalConstructor()->getMock();
135-
136-
$ctrl->method('getCmd')->willReturn('showOptions');
137-
138-
$ctrl->expects($this->once())->method('redirectByClass')->with(PersonalSettingsGUI::class)->willThrowException(
139-
new ilCtrlException('Script terminated')
140-
);
141-
142-
$settings = $this->getMockBuilder(ilSetting::class)->disableOriginalConstructor()->onlyMethods(['get'])->getMock();
143-
$settings->method('get')->willReturnCallback(static function (string $key, ?string $default = null) {
144-
if ($key === 'show_mail_settings') {
145-
return '0';
146-
}
147-
148-
return $default;
149-
});
150-
151-
$request = $this->getMockBuilder(ServerRequestInterface::class)->disableOriginalConstructor()->getMock();
152-
$request->method('getQueryParams')->willReturn([
153-
'referrer' => PersonalSettingsGUI::class,
154-
]);
155-
$wrapper = new WrapperFactory($request);
156-
157-
$http = $this->getMockBuilder(GlobalHttpState::class)->getMock();
158-
$http->method('wrapper')->willReturn($wrapper);
159-
160-
$options = new ilMailOptions(
161-
0,
162-
null,
163-
$this->createMock(\ILIAS\Data\Clock\ClockInterface::class),
164-
$settings,
165-
$this->createMock(ilDBInterface::class),
166-
$this->createMock(UserSettings::class)
167-
);
168-
169-
$gui = $this->getMailOptionsGUI($http, $ctrl, $options);
170-
$gui->setForm($form);
171-
$gui->executeCommand();
172-
}
173127
}

0 commit comments

Comments
 (0)