File tree Expand file tree Collapse file tree 3 files changed +105
-0
lines changed Expand file tree Collapse file tree 3 files changed +105
-0
lines changed Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ xmlrpc_encode() Simple test encode type double and String
3
+
4
+ --CREDITS--
5
+ Michel Araujo <araujo_michel@yahoo.com.br>
6
+ #PHPSP 2013-08-22
7
+
8
+ --SKIPIF--
9
+ <?php if (!extension_loaded ("xmlrpc " )) print "skip " ; ?>
10
+
11
+ --FILE--
12
+ <?php
13
+
14
+ $ response = xmlrpc_encode (3.24234 );
15
+ echo $ response ;
16
+
17
+ $ response = xmlrpc_encode (-3.24234 );
18
+ echo $ response ;
19
+
20
+ $ response = xmlrpc_encode ('Is string ' );
21
+ echo $ response ;
22
+
23
+ --EXPECT --
24
+ <? xml version="1.0 " encoding="utf-8 "?>
25
+ <params>
26
+ <param>
27
+ <value>
28
+ <double>3.24234</double>
29
+ </value>
30
+ </param>
31
+ </params>
32
+ <? xml version="1.0 " encoding="utf-8 "?>
33
+ <params>
34
+ <param>
35
+ <value>
36
+ <double>-3.24234</double>
37
+ </value>
38
+ </param>
39
+ </params>
40
+ <? xml version="1.0 " encoding="utf-8 "?>
41
+ <params>
42
+ <param>
43
+ <value>
44
+ <string>Is string</string>
45
+ </value>
46
+ </param>
47
+ </params>
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ xmlrpc_decode() Simple test decode type string
3
+
4
+ --CREDITS--
5
+ Michel Araujo <araujo_michel@yahoo.com.br>
6
+ #PHPSP 2013-08-22
7
+
8
+ --SKIPIF--
9
+ <?php if (!extension_loaded ("xmlrpc " )) print "skip " ; ?>
10
+
11
+ --FILE--
12
+ <?php
13
+
14
+ $ xml = <<<XML
15
+ <?xml version="1.0" encoding="utf-8"?>
16
+ <params>
17
+ <param>
18
+ <value>
19
+ <string>Is string</string>
20
+ </value>
21
+ </param>
22
+ </params>
23
+ XML ;
24
+
25
+ $ response = xmlrpc_decode ($ xml );
26
+ echo $ response ;
27
+
28
+ --EXPECT --
29
+ Is string
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ xmlrpc_decode() Simple test decode type int
3
+
4
+ --CREDITS--
5
+ Michel Araujo <araujo_michel@yahoo.com.br>
6
+ #PHPSP 2013-08-22
7
+
8
+ --SKIPIF--
9
+ <?php if (!extension_loaded ("xmlrpc " )) print "skip " ; ?>
10
+
11
+ --FILE--
12
+ <?php
13
+
14
+ $ xml = <<<XML
15
+ <?xml version="1.0" encoding="utf-8"?>
16
+ <params>
17
+ <param>
18
+ <value>
19
+ <int>1</int>
20
+ </value>
21
+ </param>
22
+ </params>
23
+ XML ;
24
+
25
+ $ response = xmlrpc_decode ($ xml );
26
+ echo $ response ;
27
+
28
+ --EXPECT --
29
+ 1
You can’t perform that action at this time.
0 commit comments