15 $mailOptions = $this->getMockBuilder(\ilMailOptions::class)
16 ->disableOriginalConstructor()
17 ->setMethods(array(
'updateOptions'))
20 $mailOptions->setIncomingType(0);
21 $mailOptions->setMailAddressOption(3);
24 $setting->adjust(
'test@ilias-test.de',
'someone@php-test.net');
27 $this->assertEquals(0, $mailOptions->getIncomingType());
28 $this->assertEquals(3, $mailOptions->getMailAddressOption());
36 $mailOptions = $this->getMockBuilder(\ilMailOptions::class)
37 ->disableOriginalConstructor()
38 ->setMethods(array(
'updateOptions'))
41 $mailOptions->expects($this->
once())->method(
'updateOptions');
42 $mailOptions->setIncomingType(2);
43 $mailOptions->setMailAddressOption(4);
46 $setting->adjust(
'test@ilias-test.de',
'');
49 $this->assertEquals(3, $mailOptions->getMailAddressOption());
57 $mailOptions = $this->getMockBuilder(\ilMailOptions::class)
58 ->disableOriginalConstructor()
59 ->setMethods(array(
'updateOptions'))
62 $mailOptions->expects($this->
once())->method(
'updateOptions');
63 $mailOptions->setIncomingType(2);
64 $mailOptions->setMailAddressOption(3);
67 $setting->adjust(
'',
'test@ilias-test.de');
70 $this->assertEquals(4, $mailOptions->getMailAddressOption());
78 $mailOptions = $this->getMockBuilder(\ilMailOptions::class)
79 ->disableOriginalConstructor()
80 ->setMethods(array(
'updateOptions'))
83 $mailOptions->expects($this->
once())->method(
'updateOptions');
84 $mailOptions->setIncomingType(2);
85 $mailOptions->setMailAddressOption(3);
88 $setting->adjust(
'',
'');
90 $this->assertEquals(0, $mailOptions->getIncomingType());
98 $mailOptions = $this->getMockBuilder(\ilMailOptions::class)
99 ->disableOriginalConstructor()
100 ->setMethods(array(
'updateOptions'))
103 $mailOptions->expects($this->never())->method(
'updateOptions');
104 $mailOptions->setIncomingType(2);
105 $mailOptions->setMailAddressOption(5);
108 $setting->adjust(
'test@ilias-test.de',
'someone@php-test.net');
110 $this->assertEquals(2, $mailOptions->getIncomingType());
111 $this->assertEquals(5, $mailOptions->getMailAddressOption());
testNoMailWillResultInUpdateProcess()
Class ilMailTransportSettingsTest.
testSystemAsIncomingTypeWontUpdate()
testOnlySecondMailWillResultInUpdateProcess()
testNothingWillBeAdjusted()
testOnlyFirstMailWillResultInUpdateProcess()
once($eventName, callable $callBack, $priority=100)
Subscribe to an event exactly once.