Annotation of embedaddon/php/ext/simplexml/tests/SimpleXMLElement_addAttribute_required_attribute_name.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: SimpleXMLElement: Test to ensure that the required attribute name correctly is giving a warning
! 3: --CREDITS--
! 4: Havard Eide <nucleuz@gmail.com>
! 5: #PHPTestFest2009 Norway 2009-06-09 \o/
! 6: --SKIPIF--
! 7: <?php if (!extension_loaded("simplexml")) { echo "skip extension not available"; } ?>
! 8: --FILE--
! 9: <?php
! 10: $a = new SimpleXMLElement("<php>testfest</php>");
! 11: $a->addAttribute( "", "" );
! 12: echo $a->asXML();
! 13: ?>
! 14: --EXPECTF--
! 15: Warning: SimpleXMLElement::addAttribute(): Attribute name is required in %s on line %d
! 16: <?xml version="1.0"?>
! 17: <php>testfest</php>
! 18:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>