Annotation of embedaddon/php/ext/simplexml/tests/bug46047.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Bug #46047 (SimpleXML converts empty nodes into object with nested array)
        !             3: --SKIPIF--
        !             4: <?php if (!extension_loaded("simplexml")) print "skip"; ?>
        !             5: --FILE--
        !             6: <?php
        !             7: $xml = new SimpleXMLElement('<foo><bar><![CDATA[]]></bar><baz/></foo>', 
        !             8:   LIBXML_NOCDATA);
        !             9: print_r($xml);
        !            10: 
        !            11: $xml = new SimpleXMLElement('<foo><bar></bar><baz/></foo>');
        !            12: print_r($xml);
        !            13: 
        !            14: $xml = new SimpleXMLElement('<foo><bar/><baz/></foo>');
        !            15: print_r($xml);
        !            16: ?>
        !            17: ===DONE===
        !            18: --EXPECTF--
        !            19: SimpleXMLElement Object
        !            20: (
        !            21:     [bar] => SimpleXMLElement Object
        !            22:         (
        !            23:         )
        !            24: 
        !            25:     [baz] => SimpleXMLElement Object
        !            26:         (
        !            27:         )
        !            28: 
        !            29: )
        !            30: SimpleXMLElement Object
        !            31: (
        !            32:     [bar] => SimpleXMLElement Object
        !            33:         (
        !            34:         )
        !            35: 
        !            36:     [baz] => SimpleXMLElement Object
        !            37:         (
        !            38:         )
        !            39: 
        !            40: )
        !            41: SimpleXMLElement Object
        !            42: (
        !            43:     [bar] => SimpleXMLElement Object
        !            44:         (
        !            45:         )
        !            46: 
        !            47:     [baz] => SimpleXMLElement Object
        !            48:         (
        !            49:         )
        !            50: 
        !            51: )
        !            52: ===DONE===
        !            53:        

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