1 mail.test | BackdropHtmlToTextTestCase::testBackdropHtmltoTextUsenetSignature() |
Tests backdrop_wrap_mail() retains whitespace from Usenet style signatures.
RFC 3676 says, "This is a special case; an (optionally quoted or quoted and stuffed) line consisting of DASH DASH SP is neither fixed nor flowed."
File
- core/
modules/ simpletest/ tests/ mail.test, line 272 - Test the Backdrop mailing system.
Class
- BackdropHtmlToTextTestCase
- Unit tests for backdrop_html_to_text().
Code
function testBackdropHtmltoTextUsenetSignature() {
$text = "Hi there!\n-- \nFoo Bar";
$mail_lines = explode("\n", backdrop_wrap_mail($text));
$this->assertEqual("-- ", $mail_lines[1], 'Trailing whitespace not removed for dash-dash-space signatures.');
$text = "Hi there!\n-- \nFoo Bar";
$mail_lines = explode("\n", backdrop_wrap_mail($text));
$this->assertEqual("--", $mail_lines[1], 'Trailing whitespace removed for incorrect dash-dash-space signatures.');
}