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.php15
1 files changed, 2 insertions, 13 deletions
diff --git a/tests/config/ConfigJsonTest.php b/tests/config/ConfigJsonTest.php
index f884b0c6..c0ba5b8f 100644
--- a/tests/config/ConfigJsonTest.php
+++ b/tests/config/ConfigJsonTest.php
@@ -4,7 +4,7 @@ namespace Shaarli\Config;
4/** 4/**
5 * Class ConfigJsonTest 5 * Class ConfigJsonTest
6 */ 6 */
7class ConfigJsonTest extends \PHPUnit\Framework\TestCase 7class ConfigJsonTest extends \Shaarli\TestCase
8{ 8{
9 /** 9 /**
10 * @var ConfigJson 10 * @var ConfigJson
@@ -42,7 +42,7 @@ class ConfigJsonTest extends \PHPUnit\Framework\TestCase
42 public function testReadInvalidJson() 42 public function testReadInvalidJson()
43 { 43 {
44 $this->expectException(\Exception::class); 44 $this->expectException(\Exception::class);
45 $this->expectExceptionMessageRegExp(' /An error occurred while parsing JSON configuration file \\([\\w\\/\\.]+\\): error code #4/'); 45 $this->expectExceptionMessageRegExp('/An error occurred while parsing JSON configuration file \\([\\w\\/\\.]+\\): error code #4/');
46 46
47 $this->configIO->read('tests/utils/config/configInvalid.json.php'); 47 $this->configIO->read('tests/utils/config/configInvalid.json.php');
48 } 48 }
@@ -111,17 +111,6 @@ class ConfigJsonTest extends \PHPUnit\Framework\TestCase
111 /** 111 /**
112 * Write to invalid path. 112 * Write to invalid path.
113 */ 113 */
114 public function testWriteInvalidArray()
115 {
116 $this->expectException(\Shaarli\Exceptions\IOException::class);
117
118 $conf = array('conf' => 'value');
119 @$this->configIO->write(array(), $conf);
120 }
121
122 /**
123 * Write to invalid path.
124 */
125 public function testWriteInvalidBlank() 114 public function testWriteInvalidBlank()
126 { 115 {
127 $this->expectException(\Shaarli\Exceptions\IOException::class); 116 $this->expectException(\Shaarli\Exceptions\IOException::class);