Explorar el Código

[1.12] Fixes for PHP 5.3

- SplPriorityQueue in 5.3 does not have a constructor; remove call to
  parent::__construct
- is_callable behavior differs between 5.2 and 5.3; skip some tests when
  under 5.3

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@24713 44c647ce-9c0f-0410-b52a-842ac1e357ba
matthew hace 13 años
padre
commit
d822efad11

+ 0 - 1
library/Zend/Stdlib/SplPriorityQueue.php

@@ -404,7 +404,6 @@ class Zend_Stdlib_SplPriorityQueue extends SplPriorityQueue implements Serializa
     public function __construct()
     {
         $this->isPhp53 = version_compare(PHP_VERSION, '5.3', '>=');
-        parent::__construct();
     }
 
     /**

+ 6 - 0
tests/Zend/Stdlib/CallbackHandlerTest.php

@@ -116,12 +116,18 @@ class Zend_Stdlib_CallbackHandlerTest extends PHPUnit_Framework_TestCase
 
     public function testCallbackConsistingOfStringContextWithNonStaticMethodShouldRaiseException()
     {
+        if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
+            $this->markTestSkipped('Behavior of is_callable changes between 5.2 and 5.3');
+        }
         $this->setExpectedException('Zend_Stdlib_Exception_InvalidCallbackException');
         $handler     = new Zend_Stdlib_CallbackHandler(array('Zend_Stdlib_TestAsset_SignalHandlers_InstanceMethod', 'handler'));
     }
 
     public function testStringCallbackConsistingOfNonStaticMethodShouldRaiseException()
     {
+        if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
+            $this->markTestSkipped('Behavior of is_callable changes between 5.2 and 5.3');
+        }
         $this->setExpectedException('Zend_Stdlib_Exception_InvalidCallbackException');
         $handler = new Zend_Stdlib_CallbackHandler('Zend_Stdlib_TestAsset_SignalHandlers_InstanceMethod::handler');
     }