Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b1ce16b

Browse files
committed
Fix SES test
1 parent 8449d8a commit b1ce16b

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

src/Symfony/Component/Mailer/Bridge/Amazon/Tests/Transport/SesApiAsyncAwsTransportTest.php

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -100,15 +100,16 @@ public function testSend()
100100
public function testSendThrowsForErrorResponse()
101101
{
102102
$client = new MockHttpClient(function (string $method, string $url, array $options): ResponseInterface {
103-
$xml = "<SendEmailResponse xmlns=\"https://email.amazonaws.com/doc/2010-03-31/\">
104-
<Error>
105-
<Message>i'm a teapot</Message>
106-
<Code>418</Code>
107-
</Error>
108-
</SendEmailResponse>";
109-
110-
return new MockResponse($xml, [
103+
$json = \json_encode([
104+
'message' => 'i\'m a teapot',
105+
'type' => 'sender',
106+
]);
107+
108+
return new MockResponse($json, [
111109
'http_code' => 418,
110+
'response_headers' => [
111+
'x-amzn-errortype' => '418',
112+
],
112113
]);
113114
});
114115

0 commit comments

Comments
 (0)