TXT,
$options['body'
] );
} public function testSendEmailWithHeadersShouldCalledInfobipWithTheRightParameters() { $email =
$this->
basicValidEmail();
$email->
getHeaders() ->
addTextHeader('X-Infobip-IntermediateReport', 'true'
) ->
addTextHeader('X-Infobip-NotifyUrl', 'https://foo.bar'
) ->
addTextHeader('X-Infobip-NotifyContentType', 'application/json'
) ->
addTextHeader('X-Infobip-MessageId', 'RANDOM-CUSTOM-ID'
);
$this->transport->
send($email);
$options =
$this->response->
getRequestOptions();
$this->
arrayHasKey('body'
);
$this->
assertStringMatchesFormat(<<<'TXT'
%a
--%s
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Content-Disposition: form-data; name="intermediateReport"
true
--%s
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Content-Disposition: form-data; name="notifyUrl"
https://foo.bar
--%s
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Content-Disposition: form-data; name="notifyContentType"
application/json
--%s
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Content-Disposition: form-data; name="messageId"
RANDOM-CUSTOM-ID
--%s--