summaryrefslogtreecommitdiff
path: root/ext/xmlrpc/tests/001.phpt
blob: af41530ab2076933273050b17f4d26e9b1567042 (plain)
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
46
47
48
49
50
51
--TEST--
xmlrpc_encode_request() with wrong arguments
--SKIPIF--
<?php if (!extension_loaded("xmlrpc")) print "skip"; ?>
--FILE--
<?php

var_dump(xmlrpc_encode_request(-1, 1));
var_dump(xmlrpc_encode_request("", 1));
var_dump(xmlrpc_encode_request(3.4, 1));

echo "Done\n";
?>
--EXPECTF--
string(174) "<?xml version="1.0" encoding="iso-8859-1"?>
<methodCall>
<methodName>-1</methodName>
<params>
 <param>
  <value>
   <int>1</int>
  </value>
 </param>
</params>
</methodCall>
"
string(160) "<?xml version="1.0" encoding="iso-8859-1"?>
<methodCall>
<methodName/>
<params>
 <param>
  <value>
   <int>1</int>
  </value>
 </param>
</params>
</methodCall>
"
string(175) "<?xml version="1.0" encoding="iso-8859-1"?>
<methodCall>
<methodName>3.4</methodName>
<params>
 <param>
  <value>
   <int>1</int>
  </value>
 </param>
</params>
</methodCall>
"
Done