summaryrefslogtreecommitdiff
path: root/ext/xmlrpc/tests/005.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/xmlrpc/tests/005.phpt')
-rw-r--r--ext/xmlrpc/tests/005.phpt47
1 files changed, 47 insertions, 0 deletions
diff --git a/ext/xmlrpc/tests/005.phpt b/ext/xmlrpc/tests/005.phpt
new file mode 100644
index 0000000000..613dfde249
--- /dev/null
+++ b/ext/xmlrpc/tests/005.phpt
@@ -0,0 +1,47 @@
+--TEST--
+xmlrpc_encode() Simple test encode type double and String
+
+--CREDITS--
+Michel Araujo <araujo_michel@yahoo.com.br>
+#PHPSP 2013-08-22
+
+--SKIPIF--
+<?php if (!extension_loaded("xmlrpc")) print "skip"; ?>
+
+--FILE--
+<?php
+
+$response = xmlrpc_encode(3.24234);
+echo $response;
+
+$response = xmlrpc_encode(-3.24234);
+echo $response;
+
+$response = xmlrpc_encode('Is string');
+echo $response;
+
+--EXPECT--
+<?xml version="1.0" encoding="utf-8"?>
+<params>
+<param>
+ <value>
+ <double>3.24234</double>
+ </value>
+</param>
+</params>
+<?xml version="1.0" encoding="utf-8"?>
+<params>
+<param>
+ <value>
+ <double>-3.24234</double>
+ </value>
+</param>
+</params>
+<?xml version="1.0" encoding="utf-8"?>
+<params>
+<param>
+ <value>
+ <string>Is string</string>
+ </value>
+</param>
+</params> \ No newline at end of file