diff options
Diffstat (limited to 'ext/dom/tests/DOMDocument_createProcessingInstruction_error.phpt')
-rw-r--r-- | ext/dom/tests/DOMDocument_createProcessingInstruction_error.phpt | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/ext/dom/tests/DOMDocument_createProcessingInstruction_error.phpt b/ext/dom/tests/DOMDocument_createProcessingInstruction_error.phpt new file mode 100644 index 0000000..a0c12b1 --- /dev/null +++ b/ext/dom/tests/DOMDocument_createProcessingInstruction_error.phpt @@ -0,0 +1,31 @@ +--TEST-- +DomDocument::createProcessingInstruction() - error test for DomDocument::createProcessingInstruction() +--CREDITS-- +Muhammad Khalid Adnan +# TestFest 2008 +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php + +$doc = new DOMDocument; + +$node = $doc->createElement("para"); +$newnode = $doc->appendChild($node); + +try { + $test_proc_inst = + $doc->createProcessingInstruction( "bla bla bla" ); + $node->appendChild($test_proc_inst); + + echo $doc->saveXML(); +} +catch (DOMException $e) +{ + echo 'Test failed!', PHP_EOL; +} + +?> +--EXPECT-- +Test failed! + |