Annotation of embedaddon/php/ext/simplexml/tests/bug44478.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #44478 (Inconsistent behaviour when assigning new nodes)
! 3: --SKIPIF--
! 4: <?php if (!extension_loaded("simplexml")) print "skip"; ?>
! 5: --FILE--
! 6: <?php
! 7: $xml_element = new simpleXMLElement('<root></root>');
! 8: $xml_element->node1 = 'a & b';
! 9: print $xml_element->node1."\n";
! 10: $xml_element->node1 = 'a & b';
! 11: print $xml_element->node1."\n";
! 12: $xml_element->addChild('node2','a & b');
! 13: print $xml_element->node2."\n";
! 14: $xml_element->node2 = 'a & b';
! 15: print $xml_element->node2."\n";
! 16:
! 17: print $xml_element->asXML();
! 18:
! 19: ?>
! 20: ===DONE===
! 21: --EXPECTF--
! 22: a & b
! 23: a & b
! 24: a & b
! 25: a & b
! 26: <?xml version="1.0"?>
! 27: <root><node1>a &#38; b</node1><node2>a & b</node2></root>
! 28: ===DONE===
! 29:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>