2003-06-28 06:55:47 +00:00
|
|
|
--TEST--
|
2005-08-14 01:17:52 +00:00
|
|
|
wddx unserialization test
|
2005-12-21 11:43:24 +00:00
|
|
|
--SKIPIF--
|
|
|
|
<?php if (!extension_loaded("wddx")) print "skip"; ?>
|
2003-06-28 06:55:47 +00:00
|
|
|
--FILE--
|
|
|
|
<?php
|
|
|
|
$path = dirname(__FILE__);
|
2005-08-14 01:17:52 +00:00
|
|
|
var_dump(wddx_unserialize(file_get_contents("{$path}/wddx.xml")));
|
2003-06-28 06:55:47 +00:00
|
|
|
?>
|
|
|
|
--EXPECT--
|
|
|
|
array(11) {
|
|
|
|
["aNull"]=>
|
|
|
|
NULL
|
|
|
|
["aString"]=>
|
|
|
|
string(8) "a string"
|
|
|
|
["aNumber"]=>
|
|
|
|
float(-12.456)
|
|
|
|
["aDateTime"]=>
|
2004-03-01 10:44:22 +00:00
|
|
|
int(897625932)
|
2003-06-28 06:55:47 +00:00
|
|
|
["aDateTime2"]=>
|
2004-03-01 10:44:22 +00:00
|
|
|
int(329632332)
|
2003-06-28 06:55:47 +00:00
|
|
|
["aDateTime3"]=>
|
2004-04-04 18:07:36 +00:00
|
|
|
string(22) "2040-06-12T04:32:12+00"
|
2003-06-28 06:55:47 +00:00
|
|
|
["aBoolean"]=>
|
|
|
|
bool(true)
|
|
|
|
["anArray"]=>
|
|
|
|
array(2) {
|
|
|
|
[0]=>
|
|
|
|
int(10)
|
|
|
|
[1]=>
|
|
|
|
string(14) "second element"
|
|
|
|
}
|
|
|
|
["aBinary"]=>
|
|
|
|
string(11) "binary data"
|
|
|
|
["anObject"]=>
|
|
|
|
array(2) {
|
|
|
|
["s"]=>
|
|
|
|
string(8) "a string"
|
|
|
|
["n"]=>
|
|
|
|
float(-12.456)
|
|
|
|
}
|
|
|
|
["aRecordset"]=>
|
|
|
|
array(2) {
|
|
|
|
["NAME"]=>
|
|
|
|
array(2) {
|
|
|
|
[0]=>
|
|
|
|
string(8) "John Doe"
|
|
|
|
[1]=>
|
|
|
|
string(8) "Jane Doe"
|
|
|
|
}
|
|
|
|
["AGE"]=>
|
|
|
|
array(2) {
|
|
|
|
[0]=>
|
|
|
|
int(34)
|
|
|
|
[1]=>
|
|
|
|
int(31)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2006-08-07 22:19:45 +00:00
|
|
|
--UEXPECT--
|
|
|
|
array(11) {
|
|
|
|
[u"aNull"]=>
|
|
|
|
NULL
|
|
|
|
[u"aString"]=>
|
|
|
|
string(8) "a string"
|
|
|
|
[u"aNumber"]=>
|
|
|
|
float(-12.456)
|
|
|
|
[u"aDateTime"]=>
|
|
|
|
int(897625932)
|
|
|
|
[u"aDateTime2"]=>
|
|
|
|
int(329632332)
|
|
|
|
[u"aDateTime3"]=>
|
|
|
|
string(22) "2040-06-12T04:32:12+00"
|
|
|
|
[u"aBoolean"]=>
|
|
|
|
bool(true)
|
|
|
|
[u"anArray"]=>
|
|
|
|
array(2) {
|
|
|
|
[0]=>
|
|
|
|
int(10)
|
|
|
|
[1]=>
|
|
|
|
string(14) "second element"
|
|
|
|
}
|
|
|
|
[u"aBinary"]=>
|
|
|
|
string(11) "binary data"
|
|
|
|
[u"anObject"]=>
|
|
|
|
array(2) {
|
|
|
|
[u"s"]=>
|
|
|
|
string(8) "a string"
|
|
|
|
[u"n"]=>
|
|
|
|
float(-12.456)
|
|
|
|
}
|
|
|
|
[u"aRecordset"]=>
|
|
|
|
array(2) {
|
|
|
|
[u"NAME"]=>
|
|
|
|
array(2) {
|
|
|
|
[0]=>
|
|
|
|
string(8) "John Doe"
|
|
|
|
[1]=>
|
|
|
|
string(8) "Jane Doe"
|
|
|
|
}
|
|
|
|
[u"AGE"]=>
|
|
|
|
array(2) {
|
|
|
|
[0]=>
|
|
|
|
int(34)
|
|
|
|
[1]=>
|
|
|
|
int(31)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|