$expected_headers .= "Content-Type: text/plain; charset=UTF-8; format=flowed; delsp=yes
$line_end";
$expected_headers .= "Content-Transfer-Encoding: 8Bit
$line_end";
$expected_headers .= "X-Mailer: Drupal
$line_end";
$expected_headers .= "From: \"Foo, Bar, and Baz\" <
[email protected]>
$line_end";
$expected_headers .= "Reply-to:
[email protected]$line_end";
$mailer->
expects($this->
once())->
method('doMail'
) ->
with( $this->
equalTo('
[email protected]'
),
$this->
equalTo("=?utf-8?Q?test?={
$line_end} =?utf-8?Q?subject?="
),
$this->
equalTo(''
),
$this->
stringStartsWith($expected_headers),
) ->
willReturn(TRUE
);
$this->
assertTrue($mailer->
mail($message));
}}