Annotation of embedaddon/php/ext/xmlrpc/tests/002.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: xmlrpc_encode_request() and various arguments
3: --SKIPIF--
4: <?php if (!extension_loaded("xmlrpc")) print "skip"; ?>
5: --FILE--
6: <?php
7:
8: $r = xmlrpc_encode_request("method", array());
9: var_dump(xmlrpc_decode_request($r, $method));
10: var_dump($method);
11:
12: $r = xmlrpc_encode_request("method", 1);
13: var_dump(xmlrpc_decode_request($r, $method));
14: var_dump($method);
15:
16: $r = xmlrpc_encode_request("method", 'param');
17: var_dump(xmlrpc_decode_request($r, $method));
18: var_dump($method);
19:
20: $r = xmlrpc_encode_request(-1, "");
21: var_dump(xmlrpc_decode_request($r, $method));
22: var_dump($method);
23:
24: $r = xmlrpc_encode_request(array(), 1);
25: var_dump(xmlrpc_decode_request($r, $method));
26: var_dump($method);
27:
28: echo "Done\n";
29: ?>
30: --EXPECTF--
31: array(0) {
32: }
33: string(6) "method"
34: array(1) {
35: [0]=>
36: int(1)
37: }
38: string(6) "method"
39: array(1) {
40: [0]=>
41: string(5) "param"
42: }
43: string(6) "method"
44: array(1) {
45: [0]=>
46: string(0) ""
47: }
48: string(2) "-1"
49:
50: Warning: xmlrpc_encode_request() expects parameter 1 to be string, array given in %s on line %d
51: NULL
52: string(2) "-1"
53: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>