1--TEST-- 2registerNodeClass() with an abstract class should fail 3--EXTENSIONS-- 4dom 5--FILE-- 6<?php 7 8abstract class Test extends DOMElement { 9 abstract function foo(); 10} 11 12$dom = new DOMDocument; 13 14try { 15 $dom->registerNodeClass("DOMElement", "Test"); 16} catch (ValueError $e) { 17 echo "ValueError: ", $e->getMessage(), "\n"; 18} 19 20$dom->createElement("foo"); 21 22?> 23--EXPECT-- 24ValueError: DOMDocument::registerNodeClass(): Argument #2 ($extendedClass) must not be an abstract class 25