1--TEST-- 2DomDocument::createAttribute() - error test for DomDocument::createAttribute() 3--CREDITS-- 4Muhammad Khalid Adnan 5# TestFest 2008 6--SKIPIF-- 7<?php require_once('skipif.inc'); ?> 8--FILE-- 9<?php 10 11$doc = new DOMDocument; 12 13$node = $doc->createElement("para"); 14$newnode = $doc->appendChild($node); 15 16try { 17 $failed_test_attribute = $doc->createAttribute("ha haha"); 18 $node->appendChild($failed_test_attribute); 19 20 echo $doc->saveXML(); 21} 22catch (DOMException $e) { 23 echo 'Test failed!', PHP_EOL; 24} 25 26?> 27--EXPECT-- 28Test failed! 29 30