xref: /PHP-5.3/ext/wddx/tests/002.phpt (revision 75b07963)
1--TEST--
2wddx packet construction using wddx ressource
3--SKIPIF--
4<?php if (!extension_loaded("wddx")) print "skip"; ?>
5--INI--
6precision=14
7--FILE--
8<?php
9	$pkt = wddx_packet_start('TEST comment');
10
11	$var1 = NULL;
12	$var2 = 'some string';
13	$var3 = 756;
14	$var4 = true;
15
16	// add vars to packet
17	wddx_add_vars($pkt, 'var1', 'var2', array('var3', 'var4'));
18	echo wddx_packet_end($pkt);
19?>
20--EXPECT--
21<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>
22