com php-src: Test extension xmlrpc encode type double and string decode type string and int: ext/xmlrpc/tests/005.phpt ext/xmlrpc/tests/006.phpt
ext/xmlrpc/tests/007.phpt
| From: | Stanislav Malyshev | Date: | Sun, 25 Aug 2013 04:44:50 +0000 |
| Subject: | com php-src: Test extension xmlrpc encode type double and string decode type string and int: ext/xmlrpc/tests/005.phpt ext/xmlrpc/tests/006.phpt ext/xmlrpc/tests/007.phpt |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-73098@lists.php.net to get a copy of this message | ||
Commit: e22c139fe09db7e74ad027db49d76921fc1a19fd
Author: root <root@precise64.(none)> Fri, 23 Aug 2013 01:06:58 +0000
Committer: Stanislav Malyshev <stas@php.net> Sat, 24 Aug 2013 21:44:50 -0700
Parents: 6b8dade6dc7709cbd890b3e7bbf447c6bb241637
Branches: PHP-5.4 PHP-5.5 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=e22c139fe09db7e74ad027db49d76921fc1a19fd
Log:
Test extension xmlrpc encode type double and string decode type string and int
Changed paths:
A ext/xmlrpc/tests/005.phpt
A ext/xmlrpc/tests/006.phpt
A ext/xmlrpc/tests/007.phpt
Diff:
diff --git a/ext/xmlrpc/tests/005.phpt b/ext/xmlrpc/tests/005.phpt
new file mode 100644
index 0000000..613dfde
--- /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
diff --git a/ext/xmlrpc/tests/006.phpt b/ext/xmlrpc/tests/006.phpt
new file mode 100644
index 0000000..f33932d
--- /dev/null
+++ b/ext/xmlrpc/tests/006.phpt
@@ -0,0 +1,29 @@
+--TEST--
+xmlrpc_decode() Simple test decode type string
+
+--CREDITS--
+Michel Araujo <araujo_michel@yahoo.com.br>
+#PHPSP 2013-08-22
+
+--SKIPIF--
+<?php if (!extension_loaded("xmlrpc")) print "skip"; ?>
+
+--FILE--
+<?php
+
+$xml = <<<XML
+<?xml version="1.0" encoding="utf-8"?>
+<params>
+<param>
+ <value>
+ <string>Is string</string>
+ </value>
+</param>
+</params>
+XML;
+
+$response = xmlrpc_decode($xml);
+echo $response;
+
+--EXPECT--
+Is string
\ No newline at end of file
diff --git a/ext/xmlrpc/tests/007.phpt b/ext/xmlrpc/tests/007.phpt
new file mode 100644
index 0000000..84c15a7
--- /dev/null
+++ b/ext/xmlrpc/tests/007.phpt
@@ -0,0 +1,29 @@
+--TEST--
+xmlrpc_decode() Simple test decode type int
+
+--CREDITS--
+Michel Araujo <araujo_michel@yahoo.com.br>
+#PHPSP 2013-08-22
+
+--SKIPIF--
+<?php if (!extension_loaded("xmlrpc")) print "skip"; ?>
+
+--FILE--
+<?php
+
+$xml = <<<XML
+<?xml version="1.0" encoding="utf-8"?>
+<params>
+<param>
+ <value>
+ <int>1</int>
+ </value>
+</param>
+</params>
+XML;
+
+$response = xmlrpc_decode($xml);
+echo $response;
+
+--EXPECT--
+1
\ No newline at end of file