Fix unit test
This commit is contained in:
parent
a197ef5e02
commit
0f473eedfc
2 changed files with 7 additions and 3 deletions
|
@ -149,7 +149,8 @@ public static function checkResourcePermissions($conf)
|
||||||
'application',
|
'application',
|
||||||
'inc',
|
'inc',
|
||||||
'plugins',
|
'plugins',
|
||||||
'tpl/'.$conf->get('resource.theme'),
|
$conf->get('resource.raintpl_tpl'),
|
||||||
|
$conf->get('resource.raintpl_tpl').'/'.$conf->get('resource.theme'),
|
||||||
) as $path) {
|
) as $path) {
|
||||||
if (! is_readable(realpath($path))) {
|
if (! is_readable(realpath($path))) {
|
||||||
$errors[] = '"'.$path.'" directory is not readable';
|
$errors[] = '"'.$path.'" directory is not readable';
|
||||||
|
|
|
@ -288,7 +288,8 @@ public function testCheckCurrentResourcePermissions()
|
||||||
$conf->set('resource.log', 'data/log.txt');
|
$conf->set('resource.log', 'data/log.txt');
|
||||||
$conf->set('resource.page_cache', 'pagecache');
|
$conf->set('resource.page_cache', 'pagecache');
|
||||||
$conf->set('resource.raintpl_tmp', 'tmp');
|
$conf->set('resource.raintpl_tmp', 'tmp');
|
||||||
$conf->set('resource.theme', 'tpl');
|
$conf->set('resource.raintpl_tpl', 'tpl');
|
||||||
|
$conf->set('resource.theme', 'default');
|
||||||
$conf->set('resource.update_check', 'data/lastupdatecheck.txt');
|
$conf->set('resource.update_check', 'data/lastupdatecheck.txt');
|
||||||
|
|
||||||
$this->assertEquals(
|
$this->assertEquals(
|
||||||
|
@ -311,11 +312,13 @@ public function testCheckCurrentResourcePermissionsErrors()
|
||||||
$conf->set('resource.log', 'null/data/log.txt');
|
$conf->set('resource.log', 'null/data/log.txt');
|
||||||
$conf->set('resource.page_cache', 'null/pagecache');
|
$conf->set('resource.page_cache', 'null/pagecache');
|
||||||
$conf->set('resource.raintpl_tmp', 'null/tmp');
|
$conf->set('resource.raintpl_tmp', 'null/tmp');
|
||||||
$conf->set('resource.theme', 'null/tpl');
|
$conf->set('resource.raintpl_tpl', 'null/tpl');
|
||||||
|
$conf->set('resource.raintpl_theme', 'null/tpl/default');
|
||||||
$conf->set('resource.update_check', 'null/data/lastupdatecheck.txt');
|
$conf->set('resource.update_check', 'null/data/lastupdatecheck.txt');
|
||||||
$this->assertEquals(
|
$this->assertEquals(
|
||||||
array(
|
array(
|
||||||
'"null/tpl" directory is not readable',
|
'"null/tpl" directory is not readable',
|
||||||
|
'"null/tpl/default" directory is not readable',
|
||||||
'"null/cache" directory is not readable',
|
'"null/cache" directory is not readable',
|
||||||
'"null/cache" directory is not writable',
|
'"null/cache" directory is not writable',
|
||||||
'"null/data" directory is not readable',
|
'"null/data" directory is not readable',
|
||||||
|
|
Loading…
Reference in a new issue