Annotation of embedaddon/php/ext/dom/tests/DOMDocument_createAttribute_basic.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: DomDocument::createAttribute() - basic 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: // A pass case.
! 17: $test_attribute = $doc->createAttribute("hahaha");
! 18: $node->appendChild($test_attribute);
! 19:
! 20: echo $doc->saveXML();
! 21:
! 22: ?>
! 23: --EXPECT--
! 24: <?xml version="1.0"?>
! 25: <para hahaha=""/>
! 26:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>