felipe          Wed Sep 10 00:09:31 2008 UTC

  Modified files:              
    /php-src/ext/xmlrpc/tests   bug18916.phpt bug45226.phpt 
  Log:
  - New tests
  
http://cvs.php.net/viewvc.cgi/php-src/ext/xmlrpc/tests/bug18916.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/xmlrpc/tests/bug18916.phpt
diff -u /dev/null php-src/ext/xmlrpc/tests/bug18916.phpt:1.2
--- /dev/null   Wed Sep 10 00:09:31 2008
+++ php-src/ext/xmlrpc/tests/bug18916.phpt      Wed Sep 10 00:09:30 2008
@@ -0,0 +1,21 @@
+--TEST--
+Bug #18916 (xmlrpc_set_type() not working)
+--INI--
+date.timezone="America/Sao_Paulo"
+--FILE--
+<?php
+
+$params = date("Ymd\TH:i:s", time());
+xmlrpc_set_type($params, 'datetime');
+echo xmlrpc_encode($params);
+
+?>
+--EXPECTF--
+<?xml version="1.0" encoding="utf-8"?>
+<params>
+<param>
+ <value>
+  <dateTime.iso8601>%dT%d:%d:%d</dateTime.iso8601>
+ </value>
+</param>
+</params>
http://cvs.php.net/viewvc.cgi/php-src/ext/xmlrpc/tests/bug45226.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/xmlrpc/tests/bug45226.phpt
diff -u /dev/null php-src/ext/xmlrpc/tests/bug45226.phpt:1.2
--- /dev/null   Wed Sep 10 00:09:31 2008
+++ php-src/ext/xmlrpc/tests/bug45226.phpt      Wed Sep 10 00:09:30 2008
@@ -0,0 +1,53 @@
+--TEST--
+Bug #45226 (xmlrpc_set_type() segfaults with valid ISO8601 date string)
+--INI--
+date.timezone="America/Sao_Paulo"
+--FILE--
+<?php
+
+$d = date(DATE_ISO8601);
+xmlrpc_set_type($d, 'datetime');
+echo xmlrpc_encode_request('method.call', array('date' => $d));
+
+$d = '2008-01-01 20:00:00';
+xmlrpc_set_type($d, 'datetime');
+echo xmlrpc_encode_request('method.call', array('date' => $d));
+
+?>
+--EXPECTF--
+<?xml version="1.0" encoding="iso-8859-1"?>
+<methodCall>
+<methodName>method.call</methodName>
+<params>
+ <param>
+  <value>
+   <struct>
+    <member>
+     <name>date</name>
+     <value>
+      <dateTime.iso8601>%d-%d-%dT%d:%d:%d%s%d</dateTime.iso8601>
+     </value>
+    </member>
+   </struct>
+  </value>
+ </param>
+</params>
+</methodCall>
+<?xml version="1.0" encoding="iso-8859-1"?>
+<methodCall>
+<methodName>method.call</methodName>
+<params>
+ <param>
+  <value>
+   <struct>
+    <member>
+     <name>date</name>
+     <value>
+      <dateTime.iso8601>%d-%d-%d %d:%d:%d</dateTime.iso8601>
+     </value>
+    </member>
+   </struct>
+  </value>
+ </param>
+</params>
+</methodCall>



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to