91 $settings = $this->getMockBuilder(ilSetting::class)->disableOriginalConstructor()->onlyMethods([
'get'])->getMock();
92 $settings->method(
'get')->willReturnCallback(
static function (
string $key, ?
string $default =
null) {
93 if ($key ===
'mail_incoming_mail' || $key ===
'mail_address_option') {
97 if ($key ===
'show_mail_settings') {
101 if ($key ===
'usr_settings_disable_mail_incoming_mail') {
111 $this->createMock(ClockInterface::class),
115 $this->assertSame($this->
object->signature, $mailOptions->getSignature());
116 $this->assertSame($this->
object->incoming_type, $mailOptions->getIncomingType());
117 $this->assertSame($this->
object->cronjob_notification, $mailOptions->isCronJobNotificationEnabled());
118 $this->assertSame($this->
object->absence_status, $mailOptions->getAbsenceStatus());
119 $this->assertSame($this->
object->absent_from, $mailOptions->getAbsentFrom());
120 $this->assertSame($this->
object->absent_until, $mailOptions->getAbsentUntil());
121 $this->assertSame($this->
object->absence_ar_subject, $mailOptions->getAbsenceAutoresponderSubject());
122 $this->assertSame($this->
object->absence_ar_body, $mailOptions->getAbsenceAutoresponderBody());
MockObject &ilSetting $settings
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null