xref: /PHP-7.0/ext/xmlrpc/tests/005.phpt (revision e22c139f)
1--TEST--
2xmlrpc_encode() Simple test encode type double and String
3
4--CREDITS--
5Michel 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);
15echo $response;
16
17$response = xmlrpc_encode(-3.24234);
18echo $response;
19
20$response = xmlrpc_encode('Is string');
21echo $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>