public function AmazonSesHandlerTest::testFailedSend in Amazon SES 2.0.x
Tests that a failed send is handled.
@dataProvider messageData
File
- tests/
src/ Kernel/ AmazonSesHandlerTest.php, line 63
Class
- AmazonSesHandlerTest
- Tests the Amazon SES handler service.
Namespace
Drupal\Tests\amazon_ses\KernelCode
public function testFailedSend($message) {
$this->prophecy
->sendEmail(Argument::type('array'))
->willThrow(SesException::class);
$client = $this->prophecy
->reveal();
$this->container
->set('amazon_ses.client', $client);
$handler = $this->container
->get('amazon_ses.handler');
$return = $handler
->send($message);
$this
->assertFalse($return);
}