Skip to content

Commit 2aebca8

Browse files
committed
Add negative test for isElementContentWhitespace()
This was only tested for the "true" case. So for example, if this function ever broke and only returned true, this wouldn't be caught.
1 parent 45c93c1 commit 2aebca8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ext/dom/tests/domchardata.phpt

+2
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ $text = new DOMText('some text characters');
5555

5656
echo "Whole Text: ".$text->wholeText."\n";
5757
$text2 = $text->splitText(9);
58+
echo "Is Whitespace?: ", $text2->isElementContentWhitespace()?'YES':'NO', "\n";
5859

5960
echo "Split text: ".$text2->wholeText."\n";
6061
$text3 = $text2->splitText(1);
@@ -71,5 +72,6 @@ Comment Value: instructions
7172
New Comment Value: some more instructions
7273
Updated Comment Value: some more comment strings
7374
Whole Text: some text characters
75+
Is Whitespace?: NO
7476
Split text: characters
7577
Is Whitespace?: YES

0 commit comments

Comments
 (0)