Class ilMailOptionsTest.
More...
◆ testConstructor()
ilMailOptionsTest::testConstructor |
( |
| ) |
|
- Exceptions
-
Definition at line 14 of file ilMailOptionsTest.php.
References Sabre\Event\once(), and ilMailBaseTest\setGlobalVariable().
18 $database = $this->getMockBuilder(ilDBInterface::class)
20 $queryMock = $this->getMockBuilder(ilDBStatement::class)
23 $object = $this->getMockBuilder(stdClass::class)->getMock();
24 $object->cronjob_notification =
false;
25 $object->signature =
'smth';
26 $object->linebreak =
false;
27 $object->incoming_type = 0;
28 $object->mail_address_option = 0;
29 $object->email =
'test@test.com';
30 $object->second_email =
'ilias@ilias.com';
33 $database->expects($this->
once())->method(
'fetchObject')->willReturn($object);
34 $database->expects($this->
once())->method(
'queryF')->willReturn($queryMock);
35 $database->method(
'replace')->willReturn(0);
39 $settings = $this->getMockBuilder(\ilSetting::class)->disableOriginalConstructor()->setMethods(array(
46 $this->assertEquals($object->signature, $mailOptions->getSignature());
47 $this->assertEquals($object->incoming_type, $mailOptions->getIncomingType());
48 $this->assertEquals($object->linebreak, $mailOptions->getLinebreak());
49 $this->assertEquals($object->cronjob_notification, $mailOptions->getCronjobNotification());
Class ilMailOptions this class handles user mails.
once($eventName, callable $callBack, $priority=100)
Subscribe to an event exactly once.
setGlobalVariable($name, $value)
The documentation for this class was generated from the following file: