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.
This commit is contained in:
Niels Dossche 2023-07-02 16:49:41 +02:00
parent 45c93c173c
commit 2aebca899c

View file

@ -55,6 +55,7 @@ $text = new DOMText('some text characters');
echo "Whole Text: ".$text->wholeText."\n";
$text2 = $text->splitText(9);
echo "Is Whitespace?: ", $text2->isElementContentWhitespace()?'YES':'NO', "\n";
echo "Split text: ".$text2->wholeText."\n";
$text3 = $text2->splitText(1);
@ -71,5 +72,6 @@ Comment Value: instructions
New Comment Value: some more instructions
Updated Comment Value: some more comment strings
Whole Text: some text characters
Is Whitespace?: NO
Split text: characters
Is Whitespace?: YES