summaryrefslogtreecommitdiff
path: root/ext/wddx/tests/bug45901.phpt
blob: c89b230eb95956bd2fbe180fb66606d3287cf31c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--TEST--
Bug #45901 (wddx_serialize_value crash with SimpleXMLElement object)
--SKIPIF--
<?php
if (!extension_loaded("wddx")) print "skip";
if (!extension_loaded("simplexml")) print "skip SimpleXML not present";
?>
--FILE--
<?php

$xml = new SimpleXMLElement('<data></data>');
$xml->addChild('test');
echo wddx_serialize_value($xml, 'Variables') . "\n";
echo "DONE";
?>
--EXPECTF--
Deprecated: Function wddx_serialize_value() is deprecated in %sbug45901.php on line %d

Warning: wddx_serialize_value(): Class SimpleXMLElement can not be serialized in %sbug45901.php on line %d
<wddxPacket version='1.0'><header><comment>Variables</comment></header><data></data></wddxPacket>
DONE