diff options
| author | Derick Rethans <derick@php.net> | 2008-02-25 22:34:11 +0000 |
|---|---|---|
| committer | Derick Rethans <derick@php.net> | 2008-02-25 22:34:11 +0000 |
| commit | a58f8d2a9bba1ad085b262d81c4dfca026c8d622 (patch) | |
| tree | 234909c4b933e328f713ddf60ab7246913a9d0d2 /ext/wddx | |
| parent | 08e237cc6db931ffd727f3257085d8f54410a458 (diff) | |
| download | php-git-a58f8d2a9bba1ad085b262d81c4dfca026c8d622.tar.gz | |
- MFH: Fixed tests on 64bit platform.
Diffstat (limited to 'ext/wddx')
| -rw-r--r-- | ext/wddx/tests/001-64bit.phpt | 62 | ||||
| -rw-r--r-- | ext/wddx/tests/001.phpt | 3 |
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 0000000000..78b1dc9994 --- /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 3efc0f4b07..e1aafd0ab0 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-- |
