File: 002.phpt

package info (click to toggle)
php-xmlrpc 3%3A1.0.0~rc3-6
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 648 kB
  • sloc: ansic: 5,180; xml: 153; php: 17; makefile: 3
file content (45 lines) | stat: -rw-r--r-- 800 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
--TEST--
xmlrpc_encode_request() and various arguments
--SKIPIF--
<?php if (!extension_loaded("xmlrpc")) print "skip"; ?>
--FILE--
<?php

$r = xmlrpc_encode_request("method", array());
var_dump(xmlrpc_decode_request($r, $method));
var_dump($method);

$r = xmlrpc_encode_request("method", 1);
var_dump(xmlrpc_decode_request($r, $method));
var_dump($method);

$r = xmlrpc_encode_request("method", 'param');
var_dump(xmlrpc_decode_request($r, $method));
var_dump($method);

$r = xmlrpc_encode_request(-1, "");
var_dump(xmlrpc_decode_request($r, $method));
var_dump($method);

echo "Done\n";
?>
--EXPECTF--
array(0) {
}
string(6) "method"
array(1) {
  [0]=>
  int(1)
}
string(6) "method"
array(1) {
  [0]=>
  string(5) "param"
}
string(6) "method"
array(1) {
  [0]=>
  string(0) ""
}
string(2) "-1"
Done