diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 2cc6439..5ceef8b 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -6,9 +6,10 @@ ### Additional info -| Q | A -|-----------------------| --- -| This Package Version | 1.?.? -| Yii Framework Version | 1.1.? -| PHP version | -| Operating system | +| Q | A +|------------------------| --- +| This Package Version | 1.?.? +| Yii Framework Version | 1.1.? +| Symfony Mailer Version | 7.0.? +| PHP version | +| Operating system | diff --git a/src/Mailer.php b/src/Mailer.php index 727b1bf..3282ced 100644 --- a/src/Mailer.php +++ b/src/Mailer.php @@ -157,7 +157,7 @@ public function getTransport(): TransportInterface throw new \LogicException('Either "' . get_class($this) . '::$dsn" or "' . get_class($this) . '::$transport" property should be set.'); } - if ($this->dsn === 'array' || stripos($this->dsn, 'array://') !== false) { + if ($this->dsn === 'array://') { $this->_transport = new ArrayTransport(); } else { $this->_transport = Transport::fromDsn($this->dsn); diff --git a/src/transport/ArrayTransport.php b/src/transport/ArrayTransport.php index aca5233..02aea42 100644 --- a/src/transport/ArrayTransport.php +++ b/src/transport/ArrayTransport.php @@ -11,7 +11,7 @@ * * This transport can be useful while writing unit tests. * - * In {@see \yii1tech\mailer\Mailer::getTransport()} this transport will be created for DSN 'array' or 'array://'. + * In {@see \yii1tech\mailer\Mailer::getTransport()} this transport will be created for DSN 'array://'. * * @author Paul Klimov * @since 1.0 diff --git a/tests/MailerTest.php b/tests/MailerTest.php index 74db5ac..32d8aae 100644 --- a/tests/MailerTest.php +++ b/tests/MailerTest.php @@ -52,13 +52,6 @@ public function testCreateTransportFromCallable(): void public function testCreateArrayTransport(): void { /** @var Mailer $mailer */ - $mailer = Yii::createComponent([ - 'class' => Mailer::class, - 'dsn' => 'array', - ]); - - $this->assertTrue($mailer->getTransport() instanceof ArrayTransport); - $mailer = Yii::createComponent([ 'class' => Mailer::class, 'dsn' => 'array://',