summaryrefslogtreecommitdiff
path: root/ext/dom/tests
diff options
context:
space:
mode:
authorChristoph M. Becker <cmb@php.net>2015-09-05 01:32:08 +0200
committerChristoph M. Becker <cmb@php.net>2015-09-05 01:32:08 +0200
commitc9a8733ce2a953e46c07c380b15617d62f51dabd (patch)
tree3878419198e7f05c9e2ac1c486c92fff20a7a25c /ext/dom/tests
parent320e891f5b39d26b422185803c809c995b43b7b2 (diff)
parentdc1a8dd7f09af5807aadf3ed5ffc9c443cd9e74c (diff)
downloadphp-git-c9a8733ce2a953e46c07c380b15617d62f51dabd.tar.gz
Merge branch 'PHP-5.6'
* PHP-5.6: Fix #70001: Assigning to DOMNode::textContent does additional entity encoding Resolved conflicts: ext/dom/node.c
Diffstat (limited to 'ext/dom/tests')
-rw-r--r--ext/dom/tests/bug70001.phpt17
1 files changed, 17 insertions, 0 deletions
diff --git a/ext/dom/tests/bug70001.phpt b/ext/dom/tests/bug70001.phpt
new file mode 100644
index 0000000000..7a8c291d4b
--- /dev/null
+++ b/ext/dom/tests/bug70001.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Bug #70001 (Assigning to DOMNode::textContent does additional entity encoding)
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+$element = new DOMText('<p>foo & bar</p>');
+var_dump($element->textContent);
+$element = (new DOMDocument())->createTextNode('<p>foo & bar</p>');
+var_dump($element->textContent);
+$element->textContent = ('<p>foo & bar</p>');
+var_dump($element->textContent);
+?>
+--EXPECT--
+string(16) "<p>foo & bar</p>"
+string(16) "<p>foo & bar</p>"
+string(16) "<p>foo & bar</p>"