ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilMailOptionsTest Class Reference
+ Inheritance diagram for ilMailOptionsTest:
+ Collaboration diagram for ilMailOptionsTest:

Public Member Functions

 testConstructor ()
 

Additional Inherited Members

- Protected Member Functions inherited from ilMailBaseTest
 setUp ()
 
 setGlobalVariable ($name, $value)
 

Detailed Description

Definition at line 5 of file ilMailOptionsTest.php.

Member Function Documentation

◆ testConstructor()

ilMailOptionsTest::testConstructor ( )

Definition at line 7 of file ilMailOptionsTest.php.

8 {
9 $userId = 1;
10
11 $database = $this->getMockBuilder('ilDBInterface')
12 ->disableOriginalConstructor()
13 ->getMock();
14 $queryMock = $this->getMockBuilder('ilPDOStatement')
15 ->disableOriginalConstructor()
16 ->setMethods(array('fetchRow'))
17 ->getMock();
18
19 $object = $this->getMockBuilder(stdClass::class)->getMock();
20 $object->cronjob_notification = false;
21 $object->signature = 'smth';
22 $object->linebreak = false;
23 $object->incoming_type = 'MY';
24 $object->mail_address_option = 0;
25 $object->email = 'test@test.com';
26 $object->second_email = 'ilias@ilias.com';
27
28
29 $queryMock->method('fetchRow')->willReturn($object);
30 $database->expects($this->atLeastOnce())->method('queryF')->willReturn($queryMock);
31 $database->method('replace')->willReturn(0);
32
33 $this->setGlobalVariable('ilDB', $database);
34
35 $settings = $this->getMockBuilder('\ilSetting')->disableOriginalConstructor()->setMethods(array('set', 'get'))->getMock();
36 $this->setGlobalVariable('ilSetting', $settings);
37
38 $mailOptions = new ilMailOptions($userId);
39 }
setGlobalVariable($name, $value)
Class ilMailOptions this class handles user mails.

References ilMailBaseTest\setGlobalVariable().

+ Here is the call graph for this function:

The documentation for this class was generated from the following file: