summaryrefslogtreecommitdiff
path: root/ext/wddx
diff options
context:
space:
mode:
authorDerick Rethans <derick@php.net>2008-02-25 22:32:59 (GMT)
committerDerick Rethans <derick@php.net>2008-02-25 22:32:59 (GMT)
commitf81134a9f298d5635ce38ae4950ee27dbbf30f74 (patch)
treebdbbb446eeae4521f70dbd68c54a59abbaebf2b6 /ext/wddx
parentb8883b65b83bbd90c3ba27d8f87e9a983d664dce (diff)
downloadphp-f81134a9f298d5635ce38ae4950ee27dbbf30f74.tar.gz
- MFH: Fixed tests on 64bit platform.
Diffstat (limited to 'ext/wddx')
-rw-r--r--ext/wddx/tests/001-64bit.phpt62
-rw-r--r--ext/wddx/tests/001.phpt3
2 files changed, 64 insertions, 1 deletions
diff --git a/ext/wddx/tests/001-64bit.phpt b/ext/wddx/tests/001-64bit.phpt
new file mode 100644
index 0000000..78b1dc9
--- /dev/null
+++ b/ext/wddx/tests/001-64bit.phpt
@@ -0,0 +1,62 @@
+--TEST--
+wddx deserialization test (64-bit)
+--SKIPIF--
+<?php if (!extension_loaded("wddx")) print "skip"; ?>
+<?php echo PHP_INT_SIZE != 8 ? "skip 64-bit only" : "OK" ?>
+--INI--
+precision=14
+--FILE--
+<?php
+ $path = dirname(__FILE__);
+ var_dump(wddx_deserialize(file_get_contents("{$path}/wddx.xml")));
+?>
+--EXPECT--
+array(11) {
+ ["aNull"]=>
+ NULL
+ ["aString"]=>
+ string(8) "a string"
+ ["aNumber"]=>
+ float(-12.456)
+ ["aDateTime"]=>
+ int(897625932)
+ ["aDateTime2"]=>
+ int(329632332)
+ ["aDateTime3"]=>
+ int(2223088332)
+ ["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)
+ }
+ }
+}
diff --git a/ext/wddx/tests/001.phpt b/ext/wddx/tests/001.phpt
index 3efc0f4..e1aafd0 100644
--- a/ext/wddx/tests/001.phpt
+++ b/ext/wddx/tests/001.phpt
@@ -1,7 +1,8 @@
--TEST--
-wddx deserialization test
+wddx deserialization test (32-bit)
--SKIPIF--
<?php if (!extension_loaded("wddx")) print "skip"; ?>
+<?php echo PHP_INT_SIZE == 8 ? "skip 32-bit only" : "OK" ?>
--INI--
precision=14
--FILE--