Proper error if the conf file is invalid instead of fatal error
Error: An error occurred while parsing configuration JSON file (data/config.json.php): error code #4 ➜ Syntax error Please check your JSON syntax (without PHP comment tags) using a JSON lint tool such as jsonlint.com.
This commit is contained in:
parent
7fc5f07492
commit
c6a4c2882d
3 changed files with 14 additions and 4 deletions
tests/config
|
@ -40,7 +40,7 @@ class ConfigJsonTest extends \PHPUnit_Framework_TestCase
|
|||
* Read a non existent config file -> empty array.
|
||||
*
|
||||
* @expectedException \Exception
|
||||
* @expectedExceptionMessage An error occurred while parsing JSON file: error code #4
|
||||
* @expectedExceptionMessageRegExp /An error occurred while parsing JSON configuration file \([\w\/\.]+\): error code #4/
|
||||
*/
|
||||
public function testReadInvalidJson()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue