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

Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update MailjetApiTransportTest::testSendSuccess with real message schema
  • Loading branch information
Starfox64 committed Apr 11, 2023
commit b3af2b2f67dee1dc5e459cc583bfc24ccae72e64
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,21 @@ public function testSendSuccess()
{
$json = json_encode([
'Messages' => [
'foo' => 'bar',
[
'Status' => 'success',
'To' => [
[
'Email' => '[email protected]',
'MessageUUID' => '7c5f9f29-42ba-4959-b19c-dcd8b2f327ca',
'MessageID' => 576460756513665525,
Comment thread
Starfox64 marked this conversation as resolved.
Outdated
'MessageHref' => 'https://api.mailjet.com/v3/message/576460756513665525'
]
]
]
],
]);

$responseHeaders = [
'x-mj-request-guid' => ['baz'],
];

$response = new MockResponse($json, ['response_headers' => $responseHeaders]);
$response = new MockResponse($json);

$client = new MockHttpClient($response);

Expand All @@ -124,7 +130,7 @@ public function testSendSuccess()

$sentMessage = $transport->send($email);
$this->assertInstanceOf(SentMessage::class, $sentMessage);
$this->assertSame('baz', $sentMessage->getMessageId());
$this->assertSame('576460756513665524', $sentMessage->getMessageId());
}

public function testSendWithDecodingException()
Expand Down