1--TEST-- 2Dom\Node::appendChild() with fragment of multiple elements 3--EXTENSIONS-- 4dom 5--FILE-- 6<?php 7 8$dom = Dom\XMLDocument::createEmpty(); 9 10$fragment = $dom->createDocumentFragment(); 11$fragment->appendChild($dom->createElement('foo')); 12$fragment->appendChild($dom->createElement('bar')); 13 14try { 15 $dom->appendChild($fragment); 16} catch (DOMException $e) { 17 echo $e->getMessage(), "\n"; 18} 19 20echo $dom->saveXml($fragment), "\n"; 21 22?> 23--EXPECT-- 24Cannot have more than one element child in a document 25<foo/><bar/> 26