1 <?php declare(strict_types=1);
19 $database = $this->getMockBuilder(ilDBInterface::class)
21 $queryMock = $this->getMockBuilder(ilDBStatement::class)
24 $object = $this->getMockBuilder(stdClass::class)->getMock();
25 $object->cronjob_notification =
false;
26 $object->signature =
'smth';
27 $object->linebreak =
false;
28 $object->incoming_type = 1;
29 $object->mail_address_option = 0;
30 $object->email =
'test@test.com';
31 $object->second_email =
'ilias@ilias.com';
34 $database->expects($this->once())->method(
'fetchObject')->willReturn($object);
35 $database->expects($this->once())->method(
'queryF')->willReturn($queryMock);
36 $database->method(
'replace')->willReturn(0);
40 $settings = $this->getMockBuilder(ilSetting::class)->disableOriginalConstructor()->setMethods([
47 $this->assertEquals($object->signature, $mailOptions->getSignature());
48 $this->assertEquals($object->incoming_type, $mailOptions->getIncomingType());
49 $this->assertEquals($object->linebreak, $mailOptions->getLinebreak());
50 $this->assertEquals($object->cronjob_notification, $mailOptions->isCronJobNotificationEnabled());
Class ilMailOptions this class handles user mails.
setGlobalVariable(string $name, $value)