diff options
Diffstat (limited to 'modules/simpletest/tests')
-rw-r--r-- | modules/simpletest/tests/mail.test | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/modules/simpletest/tests/mail.test b/modules/simpletest/tests/mail.test index 641d606ff..5db3abb7e 100644 --- a/modules/simpletest/tests/mail.test +++ b/modules/simpletest/tests/mail.test @@ -25,7 +25,7 @@ class MailTestCase extends DrupalWebTestCase implements MailSystemInterface { parent::setUp(); // Set MailTestCase (i.e. this class) as the SMTP library - variable_set('mail_sending_system', array('default-system' => 'MailTestCase')); + variable_set('mail_system', array('default-system' => 'MailTestCase')); } /** @@ -42,6 +42,21 @@ class MailTestCase extends DrupalWebTestCase implements MailSystemInterface { } /** + * Concatenate and wrap the e-mail body for plain-text mails. + * + * @see DefaultMailSystem + */ + public function format(array $message) { + // Join the body array into one string. + $message['body'] = implode("\n\n", $message['body']); + // Convert any HTML to plain-text. + $message['body'] = drupal_html_to_text($message['body']); + // Wrap the mail body for sending. + $message['body'] = drupal_wrap_mail($message['body']); + return $message; + } + + /** * Send function that is called through the mail system. */ public function mail(array $message) { |