aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/config
diff options
context:
space:
mode:
Diffstat (limited to 'tests/config')
-rw-r--r--tests/config/ConfigJsonTest.php15
-rw-r--r--tests/config/ConfigManagerTest.php2
-rw-r--r--tests/config/ConfigPhpTest.php2
-rw-r--r--tests/config/ConfigPluginTest.php2
4 files changed, 5 insertions, 16 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);
diff --git a/tests/config/ConfigManagerTest.php b/tests/config/ConfigManagerTest.php
index 802e6524..65d8ba2c 100644
--- a/tests/config/ConfigManagerTest.php
+++ b/tests/config/ConfigManagerTest.php
@@ -7,7 +7,7 @@ namespace Shaarli\Config;
7 * Note: it only test the manager with ConfigJson, 7 * Note: it only test the manager with ConfigJson,
8 * ConfigPhp is only a workaround to handle the transition to JSON type. 8 * ConfigPhp is only a workaround to handle the transition to JSON type.
9 */ 9 */
10class ConfigManagerTest extends \PHPUnit\Framework\TestCase 10class ConfigManagerTest extends \Shaarli\TestCase
11{ 11{
12 /** 12 /**
13 * @var ConfigManager 13 * @var ConfigManager
diff --git a/tests/config/ConfigPhpTest.php b/tests/config/ConfigPhpTest.php
index a9aa80f5..7bf9fe64 100644
--- a/tests/config/ConfigPhpTest.php
+++ b/tests/config/ConfigPhpTest.php
@@ -8,7 +8,7 @@ namespace Shaarli\Config;
8 * which are kept between tests. 8 * which are kept between tests.
9 * @runTestsInSeparateProcesses 9 * @runTestsInSeparateProcesses
10 */ 10 */
11class ConfigPhpTest extends \PHPUnit\Framework\TestCase 11class ConfigPhpTest extends \Shaarli\TestCase
12{ 12{
13 /** 13 /**
14 * @var ConfigPhp 14 * @var ConfigPhp
diff --git a/tests/config/ConfigPluginTest.php b/tests/config/ConfigPluginTest.php
index 3a45f623..fa72d8c4 100644
--- a/tests/config/ConfigPluginTest.php
+++ b/tests/config/ConfigPluginTest.php
@@ -9,7 +9,7 @@ require_once 'application/config/ConfigPlugin.php';
9/** 9/**
10 * Unitary tests for Shaarli config related functions 10 * Unitary tests for Shaarli config related functions
11 */ 11 */
12class ConfigPluginTest extends \PHPUnit\Framework\TestCase 12class ConfigPluginTest extends \Shaarli\TestCase
13{ 13{
14 /** 14 /**
15 * Test save_plugin_config with valid data. 15 * Test save_plugin_config with valid data.