Fix SES test
This commit is contained in:
parent
8449d8a328
commit
2176ff6550
@ -100,15 +100,16 @@ class SesApiAsyncAwsTransportTest extends TestCase
|
||||
public function testSendThrowsForErrorResponse()
|
||||
{
|
||||
$client = new MockHttpClient(function (string $method, string $url, array $options): ResponseInterface {
|
||||
$xml = "<SendEmailResponse xmlns=\"https://email.amazonaws.com/doc/2010-03-31/\">
|
||||
<Error>
|
||||
<Message>i'm a teapot</Message>
|
||||
<Code>418</Code>
|
||||
</Error>
|
||||
</SendEmailResponse>";
|
||||
$json = json_encode([
|
||||
'message' => 'i\'m a teapot',
|
||||
'type' => 'sender',
|
||||
]);
|
||||
|
||||
return new MockResponse($xml, [
|
||||
return new MockResponse($json, [
|
||||
'http_code' => 418,
|
||||
'response_headers' => [
|
||||
'x-amzn-errortype' => '418',
|
||||
],
|
||||
]);
|
||||
});
|
||||
|
||||
|
@ -95,15 +95,16 @@ class SesHttpAsyncAwsTransportTest extends TestCase
|
||||
public function testSendThrowsForErrorResponse()
|
||||
{
|
||||
$client = new MockHttpClient(function (string $method, string $url, array $options): ResponseInterface {
|
||||
$xml = "<SendEmailResponse xmlns=\"https://email.amazonaws.com/doc/2010-03-31/\">
|
||||
<Error>
|
||||
<Message>i'm a teapot</Message>
|
||||
<Code>418</Code>
|
||||
</Error>
|
||||
</SendEmailResponse>";
|
||||
$json = json_encode([
|
||||
'message' => 'i\'m a teapot',
|
||||
'type' => 'sender',
|
||||
]);
|
||||
|
||||
return new MockResponse($xml, [
|
||||
return new MockResponse($json, [
|
||||
'http_code' => 418,
|
||||
'response_headers' => [
|
||||
'x-amzn-errortype' => '418',
|
||||
],
|
||||
]);
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user