diff options
author | ArthurHoaro <arthur@hoa.ro> | 2020-10-03 12:59:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-03 12:59:16 +0200 |
commit | 7b18876361f2223672f3a2cac9fc0da16d12d69f (patch) | |
tree | 03a655c46d801d56211fb05cc2930824dace4565 /tests/config | |
parent | ee07b7283faa197fc062ed85f4f96f98e8e77b03 (diff) | |
parent | d246e2c5129fe8d3f8e1429b4e8ff8e3e486c779 (diff) | |
download | Shaarli-7b18876361f2223672f3a2cac9fc0da16d12d69f.tar.gz Shaarli-7b18876361f2223672f3a2cac9fc0da16d12d69f.tar.zst Shaarli-7b18876361f2223672f3a2cac9fc0da16d12d69f.zip |
Merge pull request #1575 from ArthurHoaro/feature/php8
Diffstat (limited to 'tests/config')
-rw-r--r-- | tests/config/ConfigJsonTest.php | 15 | ||||
-rw-r--r-- | tests/config/ConfigManagerTest.php | 2 | ||||
-rw-r--r-- | tests/config/ConfigPhpTest.php | 2 | ||||
-rw-r--r-- | tests/config/ConfigPluginTest.php | 2 |
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 | */ |
7 | class ConfigJsonTest extends \PHPUnit\Framework\TestCase | 7 | class 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 | */ |
10 | class ConfigManagerTest extends \PHPUnit\Framework\TestCase | 10 | class 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 | */ |
11 | class ConfigPhpTest extends \PHPUnit\Framework\TestCase | 11 | class 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 | */ |
12 | class ConfigPluginTest extends \PHPUnit\Framework\TestCase | 12 | class ConfigPluginTest extends \Shaarli\TestCase |
13 | { | 13 | { |
14 | /** | 14 | /** |
15 | * Test save_plugin_config with valid data. | 15 | * Test save_plugin_config with valid data. |