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