1--TEST-- 2Dom\Element::insertAdjacentHTML() with HTML nodes - edge case 3--EXTENSIONS-- 4dom 5--FILE-- 6<?php 7 8$dom = Dom\HTMLDocument::createFromString("", LIBXML_NOERROR); 9 10$fragment = $dom->createDocumentFragment(); 11$node = $fragment->appendChild($dom->createElement("node")); 12 13$node->insertAdjacentHTML(Dom\AdjacentPosition::BeforeBegin, "<p>foo</p>"); 14 15echo $dom->saveHtml($fragment), "\n"; 16 17$dom->firstChild->insertAdjacentHTML(Dom\AdjacentPosition::AfterBegin, $node->outerHTML); 18 19echo $dom->saveHtml(), "\n"; 20 21?> 22--EXPECT-- 23<p>foo</p><node></node> 24<html><node></node><head></head><body></body></html> 25