function DrupalHtmlToTextTestCase::testDrupalHtmltoTextCollapsesWhitespace
7.x mail.test | DrupalHtmlToTextTestCase::testDrupalHtmltoTextCollapsesWhitespace() |
Test that whitespace is collapsed.
File
- drupal-7.x/
modules/ simpletest/ tests/ mail.test, line 298 - 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')
);
}