1--TEST-- 2Document::importNode() with unsupported node type 3--EXTENSIONS-- 4dom 5--FILE-- 6<?php 7 8// For legacy documents this should warn 9$dom = new DOMDocument(); 10var_dump($dom->importNode($dom)); 11 12// For modern documents this should throw 13$dom = Dom\HTMLDocument::createEmpty(); 14try { 15 $dom->importNode($dom); 16} catch (DOMException $e) { 17 echo $e->getMessage(), "\n"; 18} 19 20?> 21--EXPECTF-- 22Warning: DOMDocument::importNode(): Cannot import: Node Type Not Supported in %s on line %d 23bool(false) 24Not Supported Error 25