1--TEST-- 2removeChild() where the node is not a child 3--EXTENSIONS-- 4dom 5--FILE-- 6<?php 7$document = new DOMDocument(); 8$real_parent = $document->createElement('real'); 9$parent = $document->createElement('p'); 10$child1 = $document->createElement('child1'); 11$child2 = $document->createElement('child2'); 12$real_parent->appendChild($child1); 13$parent->appendChild($child2); 14try { 15 $parent->removeChild($child1); 16} catch (DOMException $e) { 17 echo "DOMException: " . $e->getMessage(); 18} 19--EXPECT-- 20DOMException: Not Found Error 21