aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/config
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2018-07-28 09:41:29 +0200
committerGitHub <noreply@github.com>2018-07-28 09:41:29 +0200
commitad5f47adbaee1eef85e90950ab8a45fe82959924 (patch)
treed23a186661db00d36cb2b2287a7bf890fbc62cfb /tests/config
parent8fdd65b88412a0db28c723a486650c434fe5668c (diff)
parent7b4fea0e39be9e74e9aef13e73af9bbd2b1a6397 (diff)
downloadShaarli-ad5f47adbaee1eef85e90950ab8a45fe82959924.tar.gz
Shaarli-ad5f47adbaee1eef85e90950ab8a45fe82959924.tar.zst
Shaarli-ad5f47adbaee1eef85e90950ab8a45fe82959924.zip
Merge pull request #687 from ArthurHoaro/web-thumb
Use web-thumbnailer to retrieve thumbnails
Diffstat (limited to 'tests/config')
-rw-r--r--tests/config/ConfigManagerTest.php23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/config/ConfigManagerTest.php b/tests/config/ConfigManagerTest.php
index 1ec447b2..4a4e94ac 100644
--- a/tests/config/ConfigManagerTest.php
+++ b/tests/config/ConfigManagerTest.php
@@ -81,6 +81,18 @@ class ConfigManagerTest extends \PHPUnit_Framework_TestCase
81 $this->assertEquals('testSetWriteGetNested', $this->conf->get('foo.bar.key.stuff')); 81 $this->assertEquals('testSetWriteGetNested', $this->conf->get('foo.bar.key.stuff'));
82 } 82 }
83 83
84 public function testSetDeleteNested()
85 {
86 $this->conf->set('foo.bar.key.stuff', 'testSetDeleteNested');
87 $this->assertTrue($this->conf->exists('foo.bar'));
88 $this->assertTrue($this->conf->exists('foo.bar.key.stuff'));
89 $this->assertEquals('testSetDeleteNested', $this->conf->get('foo.bar.key.stuff'));
90
91 $this->conf->remove('foo.bar');
92 $this->assertFalse($this->conf->exists('foo.bar.key.stuff'));
93 $this->assertFalse($this->conf->exists('foo.bar'));
94 }
95
84 /** 96 /**
85 * Set with an empty key. 97 * Set with an empty key.
86 * 98 *
@@ -104,6 +116,17 @@ class ConfigManagerTest extends \PHPUnit_Framework_TestCase
104 } 116 }
105 117
106 /** 118 /**
119 * Remove with an empty key.
120 *
121 * @expectedException \Exception
122 * @expectedExceptionMessageRegExp #^Invalid setting key parameter. String expected, got.*#
123 */
124 public function testRmoveEmptyKey()
125 {
126 $this->conf->remove('');
127 }
128
129 /**
107 * Try to write the config without mandatory parameter (e.g. 'login'). 130 * Try to write the config without mandatory parameter (e.g. 'login').
108 * 131 *
109 * @expectedException Shaarli\Config\Exception\MissingFieldConfigException 132 * @expectedException Shaarli\Config\Exception\MissingFieldConfigException