Просмотр исходного кода

Ensure more tests worked on php 5.2

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@24686 44c647ce-9c0f-0410-b52a-842ac1e357ba
spabby 14 лет назад
Родитель
Сommit
3c7a15d5af

+ 3 - 0
tests/Zend/Controller/Action/HelperBrokerTest.php

@@ -324,6 +324,9 @@ class Zend_Controller_Action_HelperBrokerTest extends PHPUnit_Framework_TestCase
 
     public function testCanLoadNamespacedHelper()
     {
+        if (version_compare(PHP_VERSION, '5.3.0') === -1) {
+            $this->markTestSkipped('Namespaces not available in PHP < 5.3.0');
+        }
         $this->front->setControllerDirectory(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . '_files')
             ->setResponse(new Zend_Controller_Response_Cli())
             ->returnResponse(true);

+ 5 - 0
tests/Zend/Crypt/MathTest.php

@@ -36,6 +36,11 @@ class Zend_Crypt_MathTest extends PHPUnit_Framework_TestCase
 
     public function testRand()
     {
+        if (!extension_loaded('bcmath'))
+        {
+            $this->markTestSkipped('Extension bcmath not loaded');
+        }
+
         try {
             $math = new Zend_Crypt_Math_BigInteger();
         } catch (Zend_Crypt_Math_BigInteger_Exception $e) {