Annotation of embedaddon/php/ext/simplexml/tests/SimpleXMLElement_addAttribute_basic.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: SimpleXMLElement->addAttribute()
                      3: --SKIPIF-- 
                      4: <?php if (!extension_loaded("simplexml")) die("skip"); ?>
                      5: --FILE-- 
                      6: <?php
                      7:        $simple = simplexml_load_file(dirname(__FILE__)."/book.xml");
                      8:        $simple->addAttribute('type','novels');
                      9:        
                     10:        var_dump($simple->attributes());
                     11:        echo "Done";
                     12: ?>
                     13: --EXPECTF--
                     14: object(SimpleXMLElement)#2 (1) {
                     15:   ["@attributes"]=>
                     16:   array(1) {
                     17:     ["type"]=>
                     18:     string(6) "novels"
                     19:   }
                     20: }
                     21: Done

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>