|
|
@@ -103,6 +103,9 @@ class EmailTest extends TestCase
|
|
|
$this->transports = [
|
|
|
'debug' => [
|
|
|
'className' => 'Debug'
|
|
|
+ ],
|
|
|
+ 'badClassName' => [
|
|
|
+ 'className' => 'TestFalse'
|
|
|
]
|
|
|
];
|
|
|
Email::configTransport($this->transports);
|
|
|
@@ -119,6 +122,7 @@ class EmailTest extends TestCase
|
|
|
Log::drop('email');
|
|
|
Email::drop('test');
|
|
|
Email::dropTransport('debug');
|
|
|
+ Email::dropTransport('badClassName');
|
|
|
Email::dropTransport('test_smtp');
|
|
|
}
|
|
|
|
|
|
@@ -357,6 +361,20 @@ class EmailTest extends TestCase
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * Tests not found transport class name exception
|
|
|
+ *
|
|
|
+ * @return void
|
|
|
+ *
|
|
|
+ * @expectedException \InvalidArgumentException
|
|
|
+ * @expectedExceptionMessage Transport class "TestFalse" not found.
|
|
|
+ */
|
|
|
+ public function testClassNameException()
|
|
|
+ {
|
|
|
+ $email = new Email();
|
|
|
+ $email->transport('badClassName');
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
* Tests that it is possible to unset the email pattern and make use of filter_var() instead.
|
|
|
*
|
|
|
* @return void
|