Skip to content

Commit 7b12056

Browse files
Tests: Add documentation
1 parent 0b56751 commit 7b12056

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/phpunit/tests/formatting/stripHtmlNewlines.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@
88
* @covers ::strip_html_newlines
99
*/
1010
class Tests_Formatting_StripHtmlNewlines extends WP_UnitTestCase {
11+
12+
/**
13+
* Verifies that newlines and carriage returns in text nodes are replaced
14+
* with spaces, including across inline elements like anchors.
15+
*
16+
* @ticket 5678
17+
*/
1118
public function test_strips_newlines_from_text_nodes() {
1219
$this->assertSame( '', strip_html_newlines( '' ), 'Empty string should be returned as-is.' );
1320
$this->assertSame( '<p>No newlines here.</p>', strip_html_newlines( '<p>No newlines here.</p>' ), 'Text without newlines should be returned as-is.' );

0 commit comments

Comments
 (0)