xref: /PHP-5.5/ext/wddx/tests/bug45901.phpt (revision 94fd10cd)
1--TEST--
2Bug #45901 (wddx_serialize_value crash with SimpleXMLElement object)
3--SKIPIF--
4<?php
5if (!extension_loaded("wddx")) print "skip";
6if (!extension_loaded("simplexml")) print "skip SimpleXML not present";
7?>
8--FILE--
9<?php
10
11$xml = new SimpleXMLElement('<data></data>');
12$xml->addChild('test');
13echo wddx_serialize_value($xml, 'Variables') . "\n";
14echo "DONE";
15?>
16--EXPECTF--
17<wddxPacket version='1.0'><header><comment>Variables</comment></header><data><struct><var name='php_class_name'><string>SimpleXMLElement</string></var><var name='test'><struct><var name='php_class_name'><string>SimpleXMLElement</string></var></struct></var></struct></data></wddxPacket>
18DONE