cvs: php-src(PHP_5_2) /ext/wddx/tests 003.phpt
| From: | Mark Karpeles | Date: | Thu, 20 Nov 2008 15:12:28 +0000 |
| Subject: | cvs: php-src(PHP_5_2) /ext/wddx/tests 003.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-54343@lists.php.net to get a copy of this message | ||
magicaltux Thu Nov 20 15:12:28 2008 UTC
Modified files: (Branch: PHP_5_2)
/php-src/ext/wddx/tests 003.phpt
Log:
- ext/wddx: fixed test 003 which depended on arch (32bits vs 64bits)
http://cvs.php.net/viewvc.cgi/php-src/ext/wddx/tests/003.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u
Index: php-src/ext/wddx/tests/003.phpt
diff -u php-src/ext/wddx/tests/003.phpt:1.1.2.2 php-src/ext/wddx/tests/003.phpt:1.1.2.3
--- php-src/ext/wddx/tests/003.phpt:1.1.2.2 Thu Nov 20 14:35:22 2008
+++ php-src/ext/wddx/tests/003.phpt Thu Nov 20 15:12:28 2008
@@ -7,57 +7,20 @@
--FILE--
<?php
$path = dirname(__FILE__);
- $fp = fopen("{$path}/wddx.xml", 'r');
+ $fp = fopen("php://temp", 'w+');
+ fputs($fp, "<wddxPacket version='1.0'><header><comment>TEST
comment</comment></header><data><struct><var
name='var1'><null/></var><var
name='var2'><string>some string</string></var><var
name='var3'><number>756</number></var><var
name='var4'><boolean
value='true'/></var></struct></data></wddxPacket>");
+ rewind($fp);
var_dump(wddx_deserialize($fp));
fclose($fp);
?>
--EXPECT--
-array(11) {
- ["aNull"]=>
+array(4) {
+ ["var1"]=>
NULL
- ["aString"]=>
- string(8) "a string"
- ["aNumber"]=>
- float(-12.456)
- ["aDateTime"]=>
- int(897625932)
- ["aDateTime2"]=>
- int(329632332)
- ["aDateTime3"]=>
- int(2223088332)
- ["aBoolean"]=>
+ ["var2"]=>
+ string(11) "some string"
+ ["var3"]=>
+ int(756)
+ ["var4"]=>
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)
- }
- }
}