◆ getUserById()
ilMailMimeTest::getUserById |
( |
|
$usrId | ) |
|
|
protected |
- Parameters
-
- Returns
Definition at line 171 of file ilMailMimeTest.php.
References array.
Referenced by setUp().
173 $user = $this->getMockBuilder(
'\ilObjUser')->disableOriginalConstructor()->setMethods(
176 $user->expects($this->any())->method(
'getId')->will($this->returnValue($usrId));
Create styles array
The data for the language used.
◆ setUp()
ilMailMimeTest::setUp |
( |
| ) |
|
|
protected |
◆ testFactoryWillReturnSystemSenderForAnonymousUserId()
ilMailMimeTest::testFactoryWillReturnSystemSenderForAnonymousUserId |
( |
| ) |
|
Definition at line 148 of file ilMailMimeTest.php.
References $factory, and array.
150 $settings = $this->getMockBuilder(
'\ilSetting')->disableOriginalConstructor()->setMethods(
array(
'set',
'get'))->getMock();
152 $factory = new \ilMailMimeSenderFactory($settings);
153 $this->assertInstanceOf(
'\ilMailMimeSenderSystem',
$factory->getSenderByUsrId(\ANONYMOUS_USER_ID));
Create styles array
The data for the language used.
◆ testFactoryWillReturnSystemSenderWhenExplicitlyRequested()
ilMailMimeTest::testFactoryWillReturnSystemSenderWhenExplicitlyRequested |
( |
| ) |
|
Definition at line 159 of file ilMailMimeTest.php.
References $factory, and array.
161 $settings = $this->getMockBuilder(
'\ilSetting')->disableOriginalConstructor()->setMethods(
array(
'set',
'get'))->getMock();
163 $factory = new \ilMailMimeSenderFactory($settings);
164 $this->assertInstanceOf(
'\ilMailMimeSenderSystem',
$factory->system());
Create styles array
The data for the language used.
◆ testFactoryWillReturnUserSenderForExistingUserId()
ilMailMimeTest::testFactoryWillReturnUserSenderForExistingUserId |
( |
| ) |
|
Definition at line 184 of file ilMailMimeTest.php.
References $factory, and array.
186 $settings = $this->getMockBuilder(
'\ilSetting')->disableOriginalConstructor()->setMethods(
array(
'set',
'get'))->getMock();
188 $factory = new \ilMailMimeSenderFactory($settings);
189 $this->assertInstanceOf(
'\ilMailMimeSenderUser',
$factory->getSenderByUsrId(self::USER_ID));
Create styles array
The data for the language used.
◆ testFactoryWillReturnUserSenderWhenExplicitlyRequested()
ilMailMimeTest::testFactoryWillReturnUserSenderWhenExplicitlyRequested |
( |
| ) |
|
Definition at line 195 of file ilMailMimeTest.php.
References $factory, and array.
197 $settings = $this->getMockBuilder(
'\ilSetting')->disableOriginalConstructor()->setMethods(
array(
'set',
'get'))->getMock();
199 $factory = new \ilMailMimeSenderFactory($settings);
200 $this->assertInstanceOf(
'\ilMailMimeSenderUser',
$factory->user(self::USER_ID));
Create styles array
The data for the language used.
◆ testMimMailDelegatesEmailDeliveryToDefaultTransport()
ilMailMimeTest::testMimMailDelegatesEmailDeliveryToDefaultTransport |
( |
| ) |
|
Definition at line 62 of file ilMailMimeTest.php.
References array, and ilMailBaseTest\setGlobalVariable().
64 $defaultTransport = $this->getMockBuilder(
'\ilMailMimeTransport')->getMock();
65 $defaultTransport->expects($this->once())->method(
'send');
67 $transportFactory = $this->getMockBuilder(
'\ilMailMimeTransportFactory')->disableOriginalConstructor()->getMock();
68 $transportFactory->expects($this->any())->method(
'getTransport')->will($this->returnValue($defaultTransport));
71 $settings = $this->getMockBuilder(
'\ilSetting')->disableOriginalConstructor()->setMethods(
array(
'set',
'get'))->getMock();
74 $mail = new \ilMimeMail();
Create styles array
The data for the language used.
setGlobalVariable($name, $value)
◆ testMimMailDelegatesEmailDeliveryToThePassedTransporter()
ilMailMimeTest::testMimMailDelegatesEmailDeliveryToThePassedTransporter |
( |
| ) |
|
Definition at line 40 of file ilMailMimeTest.php.
References array, and ilMailBaseTest\setGlobalVariable().
42 $defaultTransport = $this->getMockBuilder(
'\ilMailMimeTransport')->getMock();
43 $defaultTransport->expects($this->never())->method(
'send');
45 $transport = $this->getMockBuilder(
'\ilMailMimeTransport')->getMock();
46 $transport->expects($this->once())->method(
'send');
48 $transportFactory = $this->getMockBuilder(
'\ilMailMimeTransportFactory')->disableOriginalConstructor()->getMock();
49 $transportFactory->expects($this->any())->method(
'getTransport')->will($this->returnValue($defaultTransport));
52 $settings = $this->getMockBuilder(
'\ilSetting')->disableOriginalConstructor()->setMethods(
array(
'set',
'get'))->getMock();
55 $mail = new \ilMimeMail();
56 $mail->send($transport);
Create styles array
The data for the language used.
setGlobalVariable($name, $value)
◆ testTransportFactoryWillReturnNullTransportIfExternalEmailDeliveryIsDisabled()
ilMailMimeTest::testTransportFactoryWillReturnNullTransportIfExternalEmailDeliveryIsDisabled |
( |
| ) |
|
Definition at line 81 of file ilMailMimeTest.php.
References $factory, $key, array, and ilMailBaseTest\setGlobalVariable().
83 $settings = $this->getMockBuilder(
'\ilSetting')->disableOriginalConstructor()->setMethods(
array(
'set',
'get'))->getMock();
84 $settings->expects($this->any())->method(
'get')->will($this->returnCallback(
function (
$key) {
85 if (
'mail_allow_external' ==
$key) {
93 $factory = new \ilMailMimeTransportFactory($settings);
94 $this->assertInstanceOf(
'\ilMailMimeTransportNull',
$factory->getTransport());
Create styles array
The data for the language used.
setGlobalVariable($name, $value)
◆ testTransportFactoryWillReturnSendmailTransportIfSmtpTransportIsDisabled()
ilMailMimeTest::testTransportFactoryWillReturnSendmailTransportIfSmtpTransportIsDisabled |
( |
| ) |
|
Definition at line 124 of file ilMailMimeTest.php.
References $factory, $key, array, and ilMailBaseTest\setGlobalVariable().
126 $settings = $this->getMockBuilder(
'\ilSetting')->disableOriginalConstructor()->setMethods(
array(
'set',
'get'))->getMock();
127 $settings->expects($this->any())->method(
'get')->will($this->returnCallback(
function (
$key) {
128 if (
'mail_allow_external' ==
$key) {
133 if (
'mail_smtp_status' ==
$key) {
141 $factory = new \ilMailMimeTransportFactory($settings);
142 $this->assertInstanceOf(
'\ilMailMimeTransportSendMail',
$factory->getTransport());
Create styles array
The data for the language used.
setGlobalVariable($name, $value)
◆ testTransportFactoryWillReturnSmtpTransportIfEnabled()
ilMailMimeTest::testTransportFactoryWillReturnSmtpTransportIfEnabled |
( |
| ) |
|
Definition at line 100 of file ilMailMimeTest.php.
References $factory, $key, array, and ilMailBaseTest\setGlobalVariable().
102 $settings = $this->getMockBuilder(
'\ilSetting')->disableOriginalConstructor()->setMethods(
array(
'set',
'get'))->getMock();
103 $settings->expects($this->any())->method(
'get')->will($this->returnCallback(
function (
$key) {
104 if (
'mail_allow_external' ==
$key) {
109 if (
'mail_smtp_status' ==
$key) {
117 $factory = new \ilMailMimeTransportFactory($settings);
118 $this->assertInstanceOf(
'\ilMailMimeTransportSmtp',
$factory->getTransport());
Create styles array
The data for the language used.
setGlobalVariable($name, $value)
◆ USER_ID
const ilMailMimeTest::USER_ID = 6 |
The documentation for this class was generated from the following file: