aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/Updater/UpdaterTest.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2016-06-11 09:08:02 +0200
committerArthurHoaro <arthur@hoa.ro>2016-06-11 09:30:56 +0200
commit894a3c4bf38d8dcadb6941049b9167e5101805bd (patch)
tree6e158c07f620fced157dba0a51638590814b50bc /tests/Updater/UpdaterTest.php
parent51def0d84955c7a951bd091eb5eeb3fce9deabd4 (diff)
downloadShaarli-894a3c4bf38d8dcadb6941049b9167e5101805bd.tar.gz
Shaarli-894a3c4bf38d8dcadb6941049b9167e5101805bd.tar.zst
Shaarli-894a3c4bf38d8dcadb6941049b9167e5101805bd.zip
Rename configuration key for better sections
Diffstat (limited to 'tests/Updater/UpdaterTest.php')
-rw-r--r--tests/Updater/UpdaterTest.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/Updater/UpdaterTest.php b/tests/Updater/UpdaterTest.php
index 5ed2df6c..6bdce08b 100644
--- a/tests/Updater/UpdaterTest.php
+++ b/tests/Updater/UpdaterTest.php
@@ -38,7 +38,7 @@ class UpdaterTest extends PHPUnit_Framework_TestCase
38 public function testReadEmptyUpdatesFile() 38 public function testReadEmptyUpdatesFile()
39 { 39 {
40 $this->assertEquals(array(), read_updates_file('')); 40 $this->assertEquals(array(), read_updates_file(''));
41 $updatesFile = $this->conf->get('path.data_dir') . '/updates.txt'; 41 $updatesFile = $this->conf->get('resource.data_dir') . '/updates.txt';
42 touch($updatesFile); 42 touch($updatesFile);
43 $this->assertEquals(array(), read_updates_file($updatesFile)); 43 $this->assertEquals(array(), read_updates_file($updatesFile));
44 unlink($updatesFile); 44 unlink($updatesFile);
@@ -49,7 +49,7 @@ class UpdaterTest extends PHPUnit_Framework_TestCase
49 */ 49 */
50 public function testReadWriteUpdatesFile() 50 public function testReadWriteUpdatesFile()
51 { 51 {
52 $updatesFile = $this->conf->get('path.data_dir') . '/updates.txt'; 52 $updatesFile = $this->conf->get('resource.data_dir') . '/updates.txt';
53 $updatesMethods = array('m1', 'm2', 'm3'); 53 $updatesMethods = array('m1', 'm2', 'm3');
54 54
55 write_updates_file($updatesFile, $updatesMethods); 55 write_updates_file($updatesFile, $updatesMethods);
@@ -83,7 +83,7 @@ class UpdaterTest extends PHPUnit_Framework_TestCase
83 */ 83 */
84 public function testWriteUpdatesFileNotWritable() 84 public function testWriteUpdatesFileNotWritable()
85 { 85 {
86 $updatesFile = $this->conf->get('path.data_dir') . '/updates.txt'; 86 $updatesFile = $this->conf->get('resource.data_dir') . '/updates.txt';
87 touch($updatesFile); 87 touch($updatesFile);
88 chmod($updatesFile, 0444); 88 chmod($updatesFile, 0444);
89 try { 89 try {
@@ -189,7 +189,7 @@ $GLOBALS[\'privateLinkByDefault\'] = true;';
189 189
190 // make sure updated field is changed 190 // make sure updated field is changed
191 $this->conf->reload(); 191 $this->conf->reload();
192 $this->assertTrue($this->conf->get('general.default_private_links')); 192 $this->assertTrue($this->conf->get('privacy.default_private_links'));
193 $this->assertFalse(is_file($optionsFile)); 193 $this->assertFalse(is_file($optionsFile));
194 // Delete the generated file. 194 // Delete the generated file.
195 unlink($this->conf->getConfigFileExt()); 195 unlink($this->conf->getConfigFileExt());
@@ -243,8 +243,8 @@ $GLOBALS[\'privateLinkByDefault\'] = true;';
243 // Check JSON config data. 243 // Check JSON config data.
244 $this->conf->reload(); 244 $this->conf->reload();
245 $this->assertEquals('root', $this->conf->get('credentials.login')); 245 $this->assertEquals('root', $this->conf->get('credentials.login'));
246 $this->assertEquals('lala', $this->conf->get('extras.redirector')); 246 $this->assertEquals('lala', $this->conf->get('redirector.url'));
247 $this->assertEquals('data/datastore.php', $this->conf->get('path.datastore')); 247 $this->assertEquals('data/datastore.php', $this->conf->get('resource.datastore'));
248 $this->assertEquals('1', $this->conf->get('plugins.WALLABAG_VERSION')); 248 $this->assertEquals('1', $this->conf->get('plugins.WALLABAG_VERSION'));
249 249
250 rename($configFile . '.save.php', $configFile . '.php'); 250 rename($configFile . '.save.php', $configFile . '.php');