Addressing comments, array() to []
Signed-off-by: Branko Kokanovic <branko@kokanovic.org>
This commit is contained in:
parent
8101059062
commit
7cef9b0248
|
@ -259,7 +259,7 @@ class Mailer implements IMailer {
|
|||
if (!empty($smtpSecurity)) {
|
||||
$transport->setEncryption($smtpSecurity);
|
||||
}
|
||||
$streamingOptions = $this->config->getSystemValue('mail_smtpstreamoptions', array());
|
||||
$streamingOptions = $this->config->getSystemValue('mail_smtpstreamoptions', []);
|
||||
if (is_array($streamingOptions) && !empty($streamingOptions)) {
|
||||
$transport->setStreamOptions($streamingOptions);
|
||||
}
|
||||
|
|
|
@ -172,7 +172,7 @@ class MailerTest extends TestCase {
|
|||
$this->config->method('getSystemValue')
|
||||
->will($this->returnValueMap([
|
||||
['mail_smtpmode', 'smtp', 'smtp'],
|
||||
['mail_smtpstreamoptions', array(), array('foo' => 1)]
|
||||
['mail_smtpstreamoptions', [], ['foo' => 1]]
|
||||
]));
|
||||
$mailer = self::invokePrivate($this->mailer, 'getInstance');
|
||||
$this->assertEquals(1, count($mailer->getTransport()->getStreamOptions()));
|
||||
|
@ -184,7 +184,7 @@ class MailerTest extends TestCase {
|
|||
$this->config->method('getSystemValue')
|
||||
->will($this->returnValueMap([
|
||||
['mail_smtpmode', 'smtp', 'smtp'],
|
||||
['mail_smtpstreamoptions', array(), 'bar']
|
||||
['mail_smtpstreamoptions', [], 'bar']
|
||||
]));
|
||||
$mailer = self::invokePrivate($this->mailer, 'getInstance');
|
||||
$this->assertEquals(0, count($mailer->getTransport()->getStreamOptions()));
|
||||
|
|
Loading…
Reference in New Issue