aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/config/ConfigJsonTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/config/ConfigJsonTest.php')
-rw-r--r--tests/config/ConfigJsonTest.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/config/ConfigJsonTest.php b/tests/config/ConfigJsonTest.php
index f1612e9b..f884b0c6 100644
--- a/tests/config/ConfigJsonTest.php
+++ b/tests/config/ConfigJsonTest.php
@@ -38,12 +38,12 @@ class ConfigJsonTest extends \PHPUnit\Framework\TestCase
38 38
39 /** 39 /**
40 * Read a non existent config file -> empty array. 40 * Read a non existent config file -> empty array.
41 *
42 * @expectedException \Exception
43 * @expectedExceptionMessageRegExp /An error occurred while parsing JSON configuration file \([\w\/\.]+\): error code #4/
44 */ 41 */
45 public function testReadInvalidJson() 42 public function testReadInvalidJson()
46 { 43 {
44 $this->expectException(\Exception::class);
45 $this->expectExceptionMessageRegExp(' /An error occurred while parsing JSON configuration file \\([\\w\\/\\.]+\\): error code #4/');
46
47 $this->configIO->read('tests/utils/config/configInvalid.json.php'); 47 $this->configIO->read('tests/utils/config/configInvalid.json.php');
48 } 48 }
49 49
@@ -110,22 +110,22 @@ class ConfigJsonTest extends \PHPUnit\Framework\TestCase
110 110
111 /** 111 /**
112 * Write to invalid path. 112 * Write to invalid path.
113 *
114 * @expectedException \Shaarli\Exceptions\IOException
115 */ 113 */
116 public function testWriteInvalidArray() 114 public function testWriteInvalidArray()
117 { 115 {
116 $this->expectException(\Shaarli\Exceptions\IOException::class);
117
118 $conf = array('conf' => 'value'); 118 $conf = array('conf' => 'value');
119 @$this->configIO->write(array(), $conf); 119 @$this->configIO->write(array(), $conf);
120 } 120 }
121 121
122 /** 122 /**
123 * Write to invalid path. 123 * Write to invalid path.
124 *
125 * @expectedException \Shaarli\Exceptions\IOException
126 */ 124 */
127 public function testWriteInvalidBlank() 125 public function testWriteInvalidBlank()
128 { 126 {
127 $this->expectException(\Shaarli\Exceptions\IOException::class);
128
129 $conf = array('conf' => 'value'); 129 $conf = array('conf' => 'value');
130 @$this->configIO->write('', $conf); 130 @$this->configIO->write('', $conf);
131 } 131 }