xref: /PHP-7.3/ext/dom/tests/bug70001.phpt (revision b2954c64)
1--TEST--
2Bug #70001 (Assigning to DOMNode::textContent does additional entity encoding)
3--SKIPIF--
4<?php require_once('skipif.inc'); ?>
5--FILE--
6<?php
7$element = new DOMText('<p>foo & bar</p>');
8var_dump($element->textContent);
9$element = (new DOMDocument())->createTextNode('<p>foo & bar</p>');
10var_dump($element->textContent);
11$element->textContent = ('<p>foo & bar</p>');
12var_dump($element->textContent);
13?>
14--EXPECT--
15string(16) "<p>foo & bar</p>"
16string(16) "<p>foo & bar</p>"
17string(16) "<p>foo & bar</p>"
18