aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/config/ConfigManagerTest.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2016-05-29 16:10:32 +0200
committerArthurHoaro <arthur@hoa.ro>2016-06-11 09:30:56 +0200
commitda10377b3c263d96a46cf9101c202554343d2cd0 (patch)
treed91d1fcdbd79367418007add4d135d3f84e57a04 /tests/config/ConfigManagerTest.php
parenteeea1c3daa87f133c57c96fa17ed26b02c392636 (diff)
downloadShaarli-da10377b3c263d96a46cf9101c202554343d2cd0.tar.gz
Shaarli-da10377b3c263d96a46cf9101c202554343d2cd0.tar.zst
Shaarli-da10377b3c263d96a46cf9101c202554343d2cd0.zip
Rename configuration keys and fix GLOBALS in templates
Diffstat (limited to 'tests/config/ConfigManagerTest.php')
-rw-r--r--tests/config/ConfigManagerTest.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/config/ConfigManagerTest.php b/tests/config/ConfigManagerTest.php
index 7390699c..9ff0f473 100644
--- a/tests/config/ConfigManagerTest.php
+++ b/tests/config/ConfigManagerTest.php
@@ -131,7 +131,7 @@ class ConfigManagerTest extends PHPUnit_Framework_TestCase
131 */ 131 */
132 public function testExistsOk() 132 public function testExistsOk()
133 { 133 {
134 $this->assertTrue($this->conf->exists('login')); 134 $this->assertTrue($this->conf->exists('credentials.login'));
135 $this->assertTrue($this->conf->exists('config.foo')); 135 $this->assertTrue($this->conf->exists('config.foo'));
136 } 136 }
137 137
@@ -163,12 +163,12 @@ class ConfigManagerTest extends PHPUnit_Framework_TestCase
163 public function testReload() 163 public function testReload()
164 { 164 {
165 ConfigManager::$CONFIG_FILE = 'tests/utils/config/configTmp'; 165 ConfigManager::$CONFIG_FILE = 'tests/utils/config/configTmp';
166 $newConf = ConfigJson::$PHP_HEADER . '{ "key": "value" }'; 166 $newConf = ConfigJson::getPhpHeaders() . '{ "key": "value" }';
167 file_put_contents($this->conf->getConfigFile(), $newConf); 167 file_put_contents($this->conf->getConfigFile(), $newConf);
168 $this->conf->reload(); 168 $this->conf->reload();
169 unlink($this->conf->getConfigFile()); 169 unlink($this->conf->getConfigFile());
170 // Previous conf no longer exists, and new values have been loaded. 170 // Previous conf no longer exists, and new values have been loaded.
171 $this->assertFalse($this->conf->exists('login')); 171 $this->assertFalse($this->conf->exists('credentials.login'));
172 $this->assertEquals('value', $this->conf->get('key')); 172 $this->assertEquals('value', $this->conf->get('key'));
173 } 173 }
174} 174}