Tests that drupal_wrap_mail() removes trailing whitespace before newlines.
public function testRemoveTrailingWhitespace() {
$text = "Hi there! \nHerp Derp";
$mail_lines = explode("\n", drupal_wrap_mail($text));
$this
->assertNotEqual(" ", substr($mail_lines[0], -1), 'Trailing whitespace removed.');
}