1 mail.test BackdropHtmlToTextTestCase::testBackdropHtmltoTextRemoveTrailingWhitespace()

Tests that backdrop_wrap_mail() removes trailing whitespace before newlines.

File

core/modules/simpletest/tests/mail.test, line 260
Test the Backdrop mailing system.

Class

BackdropHtmlToTextTestCase
Unit tests for backdrop_html_to_text().

Code

function testBackdropHtmltoTextRemoveTrailingWhitespace() {
  $text = "Hi there! \nHerp Derp";
  $mail_lines = explode("\n", backdrop_wrap_mail($text));
  $this->assertNotEqual(" ", substr($mail_lines[0], -1), 'Trailing whitespace removed.');
}