Jelajahi Sumber

ZF-8809
- Ensured Datatime requires the exception class so it will run in isolation
- Fixed XmlRpc unit tests to run without warning in 64bit environment
- http://marc.info/?l=php-internals&m=126342906502518

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@20278 44c647ce-9c0f-0410-b52a-842ac1e357ba

ralph 16 tahun lalu
induk
melakukan
02cec7bc10

+ 1 - 0
library/Zend/XmlRpc/Value/DateTime.php

@@ -71,6 +71,7 @@ class Zend_XmlRpc_Value_DateTime extends Zend_XmlRpc_Value_Scalar
         } else {
             $timestamp = strtotime($value);
             if ($timestamp === false || $timestamp == -1) { // cannot convert the value to a timestamp
+                require_once 'Zend/XmlRpc/Value/Exception.php';
                 throw new Zend_XmlRpc_Value_Exception('Cannot convert given value \''. $value .'\' to a timestamp');
             }
 

TEMPAT SAMPAH
tests/Zend/Paginator/_files/test.sqlite


+ 3 - 2
tests/Zend/XmlRpc/ValueTest.php

@@ -135,7 +135,8 @@ class Zend_XmlRpc_ValueTest extends PHPUnit_Framework_TestCase
     public function testMarshalI4FromOverlongNativeThrowsException()
     {
         $this->setExpectedException('Zend_XmlRpc_Value_Exception', 'Overlong integer given');
-        Zend_XmlRpc_Value::getXmlRpcValue(PHP_INT_MAX + 1, Zend_XmlRpc_Value::XMLRPC_TYPE_I4);
+        $x = Zend_XmlRpc_Value::getXmlRpcValue(PHP_INT_MAX + 5000, Zend_XmlRpc_Value::XMLRPC_TYPE_I4);
+        var_dump($x);
     }
 
     /**
@@ -144,7 +145,7 @@ class Zend_XmlRpc_ValueTest extends PHPUnit_Framework_TestCase
     public function testMarshalIntegerFromOverlongNativeThrowsException()
     {
         $this->setExpectedException('Zend_XmlRpc_Value_Exception', 'Overlong integer given');
-        Zend_XmlRpc_Value::getXmlRpcValue(PHP_INT_MAX + 1, Zend_XmlRpc_Value::XMLRPC_TYPE_INTEGER);
+        Zend_XmlRpc_Value::getXmlRpcValue(PHP_INT_MAX + 5000, Zend_XmlRpc_Value::XMLRPC_TYPE_INTEGER);
     }
 
     // BigInteger