function DrupalHtmlToTextTestCase::testDrupalHtmltoTextCollapsesWhitespace in Drupal 7
Test that whitespace is collapsed.
File
- modules/
simpletest/ tests/ mail.test, line 373 - Test the Drupal mailing system.
Class
- DrupalHtmlToTextTestCase
- Unit tests for drupal_html_to_text().
Code
function testDrupalHtmltoTextCollapsesWhitespace() {
$input = "<p>Drupal Drupal\n\nDrupal<pre>Drupal Drupal\n\nDrupal</pre>Drupal Drupal\n\nDrupal</p>";
// @todo The whitespace should be collapsed.
$collapsed = "Drupal Drupal\n\nDrupalDrupal Drupal\n\nDrupalDrupal Drupal\n\nDrupal\n\n";
$this
->assertHtmlToText($input, $collapsed, 'Whitespace is collapsed', array(
'p',
));
}