Kaynağa Gözat

Merge pull request #170 from aporat/unit-tests

Fixed 3 unit tests (Zend_Ldap, Zend_Config)
Frank Brückner 12 yıl önce
ebeveyn
işleme
6efbf4631c

+ 2 - 10
tests/Zend/Config/JsonTest.php

@@ -188,11 +188,7 @@ class Zend_Config_JsonTest extends PHPUnit_Framework_TestCase
 
     public function testRaisesExceptionOnInvalidJsonMarkup()
     {
-        if (version_compare(PHP_VERSION, '5.3.0', '<')) {
-            $this->setExpectedException('Zend_Config_Exception', 'Error parsing JSON data');
-        } else {
-            $this->setExpectedException('Zend_Json_Exception', 'Syntax');
-        }
+        $this->setExpectedException('Zend_Config_Exception', 'Error parsing JSON data');
         $config = new Zend_Config_Json($this->_iniFileInvalid);
     }
 
@@ -279,11 +275,7 @@ EOJ;
         }
         $json = '{"env":"ZEND_CONFIG_JSON_ENV","path":"ZEND_CONFIG_JSON_ENV_PATH/tests","int":ZEND_CONFIG_JSON_ENV_INT}';
 
-        if (version_compare(PHP_VERSION, '5.3.0', '<')) {
-            $this->setExpectedException('Zend_Config_Exception', 'Error parsing JSON data');
-        } else {
-            $this->setExpectedException('Zend_Json_Exception', 'Syntax');
-        }
+        $this->setExpectedException('Zend_Config_Exception', 'Error parsing JSON data');
         $config = new Zend_Config_Json($json, null, array('ignore_constants' => true));
     }
 }

+ 1 - 1
tests/Zend/Ldap/Node/OfflineTest.php

@@ -42,7 +42,7 @@ class Zend_Ldap_Node_OfflineTest extends Zend_Ldap_TestCase
 {
     protected function _assertLocalDateTimeString($timestamp, $value)
     {
-        $this->assertEquals(date('YmdHisO', $timestamp), $value);
+        $this->assertEquals(date('YmdHis\Z', $timestamp), $value);
     }
 
     protected function _assertUtcDateTimeString($localTimestamp, $value)