cvs: php-src(PHP_4_3) /ext/wddx/tests 001.phpt wddx.xml

From: Date: Mon, 05 Apr 2004 14:10:19 +0000
Subject: cvs: php-src(PHP_4_3) /ext/wddx/tests 001.phpt wddx.xml
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-26968@lists.php.net to get a copy of this message
iliaa Mon Apr 5 10:10:19 2004 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/wddx/tests wddx.xml 001.phpt Log: Restore wddx tests, without the troublesome date conversions. http://cvs.php.net/diff.php/php-src/ext/wddx/tests/wddx.xml?r1=1.1.2.3&r2=1.1.2.4&ty=u Index: php-src/ext/wddx/tests/wddx.xml diff -u /dev/null php-src/ext/wddx/tests/wddx.xml:1.1.2.4 --- /dev/null Mon Apr 5 10:10:19 2004 +++ php-src/ext/wddx/tests/wddx.xml Mon Apr 5 10:10:19 2004 @@ -0,0 +1,51 @@ +<?xml version='1.0'?> +<!DOCTYPE wddxPacket SYSTEM 'wddx_0100.dtd'> +<wddxPacket version='1.0'> +<header/> + <data> + <struct> + <var name='aNull'> + <null/> + </var> + <var name='aString'> + <string>a string</string> + </var> + <var name='aNumber'> + <number>-12.456</number> + </var> + <var name='aBoolean'> + <boolean value='true'/> + </var> + <var name='anArray'> + <array length='2'> + <number>10</number> + <string>second element</string> + </array> + </var> + <var name='aBinary'> + <binary length='11'>YmluYXJ5IGRhdGE=</binary> + </var> + <var name='anObject'> + <struct> + <var name='s'> + <string>a string</string> + </var> + <var name='n'> + <number>-12.456</number> + </var> + </struct> + </var> + <var name='aRecordset'> + <recordset rowCount='2' fieldNames='NAME,AGE'> + <field name='NAME'> + <string>John Doe</string> + <string>Jane Doe</string> + </field> + <field name='AGE'> + <number>34</number> + <number>31</number> + </field> + </recordset> + </struct> + </data> +</wddxPacket> http://cvs.php.net/diff.php/php-src/ext/wddx/tests/001.phpt?r1=1.1.2.3&r2=1.1.2.4&ty=u Index: php-src/ext/wddx/tests/001.phpt diff -u /dev/null php-src/ext/wddx/tests/001.phpt:1.1.2.4 --- /dev/null Mon Apr 5 10:10:19 2004 +++ php-src/ext/wddx/tests/001.phpt Mon Apr 5 10:10:19 2004 @@ -0,0 +1,51 @@ +--TEST-- +wddx deserialization test +--FILE-- +<?php + $path = dirname(__FILE__); + var_dump(wddx_deserialize(file_get_contents("{$path}/wddx.xml"))); +?> +--EXPECT-- +array(8) { + ["aNull"]=> + NULL + ["aString"]=> + string(8) "a string" + ["aNumber"]=> + float(-12.456) + ["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) + } + } +}

« previous php.cvs (#26968) next »