public function HtmlToTextTest::testDrupalHtmltoTextCollapsesWhitespace in Drupal 9
Same name and namespace in other branches
- 8 core/modules/system/tests/src/Functional/Mail/HtmlToTextTest.php \Drupal\Tests\system\Functional\Mail\HtmlToTextTest::testDrupalHtmltoTextCollapsesWhitespace()
Tests that whitespace is collapsed.
File
- core/
modules/ system/ tests/ src/ Functional/ Mail/ HtmlToTextTest.php, line 195
Class
Namespace
Drupal\Tests\system\Functional\MailCode
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', [
'p',
]);
}