summaryrefslogtreecommitdiff
path: root/ext/dom/tests
diff options
context:
space:
mode:
authorLior Kaplan <kaplanlior@gmail.com>2014-01-11 13:43:40 +0200
committerLior Kaplan <kaplanlior@gmail.com>2014-01-11 13:43:40 +0200
commit650fb41a77b3a24ab4130b05fff243b64b241877 (patch)
treeb64f1cfd733f03ce1db807733ddf87ac8d62a903 /ext/dom/tests
parent5a58c4dae727fbc8bd92770c2708baf9e7688857 (diff)
downloadphp-650fb41a77b3a24ab4130b05fff243b64b241877.tar.gz
Imported Upstream version 5.5.8+dfsgupstream/5.5.8+dfsg
Diffstat (limited to 'ext/dom/tests')
-rw-r--r--ext/dom/tests/bug65196.phpt26
1 files changed, 26 insertions, 0 deletions
diff --git a/ext/dom/tests/bug65196.phpt b/ext/dom/tests/bug65196.phpt
new file mode 100644
index 000000000..c77f97222
--- /dev/null
+++ b/ext/dom/tests/bug65196.phpt
@@ -0,0 +1,26 @@
+--TEST--
+bug #65196 (Passing DOMDocumentFragment to DOMDocument::saveHTML() Produces invalid Markup)
+--SKIPIF--
+<?php
+extension_loaded("dom") or die("skip need ext/dom");
+?>
+--FILE--
+<?php
+$dom = new DOMDocument();
+
+$frag1 = $dom->createDocumentFragment();
+var_dump($dom->saveHTML($frag1));
+
+$frag2 = $dom->createDocumentFragment();
+$div = $dom->createElement('div');
+$div->appendChild($dom->createElement('span'));
+$frag2->appendChild($div);
+$frag2->appendChild($dom->createElement('div'));
+$frag2->appendChild($dom->createElement('div'));
+var_dump($dom->saveHTML($frag2));
+?>
+===DONE===
+--EXPECT--
+string(0) ""
+string(46) "<div><span></span></div><div></div><div></div>"
+===DONE===