--TEST-- Testing reading and writing to DOMNode::textContent --SKIPIF-- --FILE-- hi there HTML; $text = '

hello world ™

'; $dom = new DOMDocument('1.0', 'UTF-8'); $dom->loadHTML($html); $node = $dom->getElementById('test'); var_dump($node->textContent); $node->textContent = $text; var_dump($node->textContent == $text); var_dump($dom->saveHTML($node)); ?> --EXPECT-- string(8) "hi there" bool(true) string(63) "
<p>hello world &trade;</p>
"