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

Public Member Functions

 testSystemAsIncomingTypeWontUpdate ()
 
 testOnlyFirstMailWillResultInUpdateProcess ()
 
 testOnlySecondMailWillResultInUpdateProcess ()
 
 testNoMailWillResultInUpdateProcess ()
 
 testNothingWillBeAdjusted ()
 

Additional Inherited Members

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

Detailed Description

Definition at line 6 of file ilMailTransportSettingsTest.php.

Member Function Documentation

◆ testNoMailWillResultInUpdateProcess()

ilMailTransportSettingsTest::testNoMailWillResultInUpdateProcess ( )

Definition at line 62 of file ilMailTransportSettingsTest.php.

References array.

63  {
64  $mailOptions = $this->getMockBuilder('ilMailOptions')
65  ->disableOriginalConstructor()
66  ->setMethods(array('updateOptions'))
67  ->getMock();
68 
69  $mailOptions->expects($this->once())->method('updateOptions');
70  $mailOptions->setIncomingType(2);
71  $mailOptions->setMailAddressOption(3);
72 
73  $setting = new ilMailTransportSettings($mailOptions);
74  $setting->adjust('', '');
75 
76  $this->assertEquals(0, $mailOptions->getIncomingType());
77  }
Create styles array
The data for the language used.

◆ testNothingWillBeAdjusted()

ilMailTransportSettingsTest::testNothingWillBeAdjusted ( )

Definition at line 79 of file ilMailTransportSettingsTest.php.

References array.

80  {
81  $mailOptions = $this->getMockBuilder('ilMailOptions')
82  ->disableOriginalConstructor()
83  ->setMethods(array('updateOptions'))
84  ->getMock();
85 
86  $mailOptions->expects($this->never())->method('updateOptions');
87  $mailOptions->setIncomingType(2);
88  $mailOptions->setMailAddressOption(5);
89 
90  $setting = new ilMailTransportSettings($mailOptions);
91  $setting->adjust('test@ilias-test.de', 'someone@php-test.net');
92 
93  $this->assertEquals(2, $mailOptions->getIncomingType());
94  $this->assertEquals(5, $mailOptions->getMailAddressOption());
95  }
Create styles array
The data for the language used.

◆ testOnlyFirstMailWillResultInUpdateProcess()

ilMailTransportSettingsTest::testOnlyFirstMailWillResultInUpdateProcess ( )

Definition at line 26 of file ilMailTransportSettingsTest.php.

References array.

27  {
28  $mailOptions = $this->getMockBuilder('ilMailOptions')
29  ->disableOriginalConstructor()
30  ->setMethods(array('updateOptions'))
31  ->getMock();
32 
33  $mailOptions->expects($this->once())->method('updateOptions');
34  $mailOptions->setIncomingType(2);
35  $mailOptions->setMailAddressOption(4);
36 
37  $setting = new ilMailTransportSettings($mailOptions);
38  $setting->adjust('test@ilias-test.de', '');
39 
40 
41  $this->assertEquals(3, $mailOptions->getMailAddressOption());
42  }
Create styles array
The data for the language used.

◆ testOnlySecondMailWillResultInUpdateProcess()

ilMailTransportSettingsTest::testOnlySecondMailWillResultInUpdateProcess ( )

Definition at line 44 of file ilMailTransportSettingsTest.php.

References array.

45  {
46  $mailOptions = $this->getMockBuilder('ilMailOptions')
47  ->disableOriginalConstructor()
48  ->setMethods(array('updateOptions'))
49  ->getMock();
50 
51  $mailOptions->expects($this->once())->method('updateOptions');
52  $mailOptions->setIncomingType(2);
53  $mailOptions->setMailAddressOption(3);
54 
55  $setting = new ilMailTransportSettings($mailOptions);
56  $setting->adjust('', 'test@ilias-test.de');
57 
58 
59  $this->assertEquals(4, $mailOptions->getMailAddressOption());
60  }
Create styles array
The data for the language used.

◆ testSystemAsIncomingTypeWontUpdate()

ilMailTransportSettingsTest::testSystemAsIncomingTypeWontUpdate ( )

Definition at line 8 of file ilMailTransportSettingsTest.php.

References array.

9  {
10  $mailOptions = $this->getMockBuilder('ilMailOptions')
11  ->disableOriginalConstructor()
12  ->setMethods(array('updateOptions'))
13  ->getMock();
14 
15  $mailOptions->setIncomingType(0);
16  $mailOptions->setMailAddressOption(3);
17 
18  $setting = new ilMailTransportSettings($mailOptions);
19  $setting->adjust('test@ilias-test.de', 'someone@php-test.net');
20 
21 
22  $this->assertEquals(0, $mailOptions->getIncomingType());
23  $this->assertEquals(3, $mailOptions->getMailAddressOption());
24  }
Create styles array
The data for the language used.

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