public function HtmlToTextTest::testDrupalHtmltoTextCollapsesWhitespace

Test that whitespace is collapsed.

File

drupal/core/modules/system/lib/Drupal/system/Tests/Mail/HtmlToTextTest.php, line 203
Definition of Drupal\system\Tests\Mail\HtmlToTextTest.

Class

HtmlToTextTest
Tests for drupal_html_to_text().

Namespace

Drupal\system\Tests\Mail

Code

public 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',
  ));
}