function DrupalHtmlToTextTestCase::testDrupalHtmltoTextCollapsesWhitespace
Test that whitespace is collapsed.
File
-
modules/
simpletest/ tests/ mail.test, line 373
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',
));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.