aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/ApplicationUtilsTest.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2016-06-09 20:04:02 +0200
committerArthurHoaro <arthur@hoa.ro>2016-06-11 09:30:56 +0200
commit278d9ee2836df7d805845077f26f8cecd16f0f4f (patch)
tree9155cab8890074e83b54efaa649bfa74885d3ab5 /tests/ApplicationUtilsTest.php
parent7f179985b497053c59338667fe49c390aa626ab7 (diff)
downloadShaarli-278d9ee2836df7d805845077f26f8cecd16f0f4f.tar.gz
Shaarli-278d9ee2836df7d805845077f26f8cecd16f0f4f.tar.zst
Shaarli-278d9ee2836df7d805845077f26f8cecd16f0f4f.zip
ConfigManager no longer uses singleton pattern
Diffstat (limited to 'tests/ApplicationUtilsTest.php')
-rw-r--r--tests/ApplicationUtilsTest.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/ApplicationUtilsTest.php b/tests/ApplicationUtilsTest.php
index f92412ba..3da72639 100644
--- a/tests/ApplicationUtilsTest.php
+++ b/tests/ApplicationUtilsTest.php
@@ -276,7 +276,7 @@ class ApplicationUtilsTest extends PHPUnit_Framework_TestCase
276 */ 276 */
277 public function testCheckCurrentResourcePermissions() 277 public function testCheckCurrentResourcePermissions()
278 { 278 {
279 $conf = ConfigManager::getInstance(); 279 $conf = new ConfigManager('');
280 $conf->set('path.thumbnails_cache', 'cache'); 280 $conf->set('path.thumbnails_cache', 'cache');
281 $conf->set('path.config', 'data/config.php'); 281 $conf->set('path.config', 'data/config.php');
282 $conf->set('path.data_dir', 'data'); 282 $conf->set('path.data_dir', 'data');
@@ -290,7 +290,7 @@ class ApplicationUtilsTest extends PHPUnit_Framework_TestCase
290 290
291 $this->assertEquals( 291 $this->assertEquals(
292 array(), 292 array(),
293 ApplicationUtils::checkResourcePermissions() 293 ApplicationUtils::checkResourcePermissions($conf)
294 ); 294 );
295 } 295 }
296 296
@@ -299,7 +299,7 @@ class ApplicationUtilsTest extends PHPUnit_Framework_TestCase
299 */ 299 */
300 public function testCheckCurrentResourcePermissionsErrors() 300 public function testCheckCurrentResourcePermissionsErrors()
301 { 301 {
302 $conf = ConfigManager::getInstance(); 302 $conf = new ConfigManager('');
303 $conf->set('path.thumbnails_cache', 'null/cache'); 303 $conf->set('path.thumbnails_cache', 'null/cache');
304 $conf->set('path.config', 'null/data/config.php'); 304 $conf->set('path.config', 'null/data/config.php');
305 $conf->set('path.data_dir', 'null/data'); 305 $conf->set('path.data_dir', 'null/data');
@@ -322,7 +322,7 @@ class ApplicationUtilsTest extends PHPUnit_Framework_TestCase
322 '"null/tmp" directory is not readable', 322 '"null/tmp" directory is not readable',
323 '"null/tmp" directory is not writable' 323 '"null/tmp" directory is not writable'
324 ), 324 ),
325 ApplicationUtils::checkResourcePermissions() 325 ApplicationUtils::checkResourcePermissions($conf)
326 ); 326 );
327 } 327 }
328} 328}