Annotation of embedaddon/php/ext/dom/tests/DOMDocument_createAttribute_error1.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: DomDocument::createAttribute() - error test for DomDocument::createAttribute()
3: --CREDITS--
4: Muhammad 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:
16: try {
17: $failed_test_attribute = $doc->createAttribute("ha haha");
18: $node->appendChild($failed_test_attribute);
19:
20: echo $doc->saveXML();
21: }
22: catch (DOMException $e) {
23: echo 'Test failed!', PHP_EOL;
24: }
25:
26: ?>
27: --EXPECT--
28: Test failed!
29:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>