From c6a4c2882d89c6bcceeeccd319549611a5d1801b Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Sun, 12 Mar 2017 16:09:34 +0100 Subject: Proper error if the conf file is invalid instead of fatal error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- tests/config/ConfigJsonTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/config') diff --git a/tests/config/ConfigJsonTest.php b/tests/config/ConfigJsonTest.php index 3527f83d..d237bc80 100644 --- a/tests/config/ConfigJsonTest.php +++ b/tests/config/ConfigJsonTest.php @@ -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() { -- cgit v1.2.3