File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / dom / tests / bug65196.phpt
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Sun Jun 15 20:03:42 2014 UTC (10 years, 9 months ago) by misho
Branches: php, MAIN
CVS tags: v5_4_29, HEAD
php 5.4.29

--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===

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>