summaryrefslogtreecommitdiffstats
path: root/tests/codeigniter/core/Log_test.php
diff options
context:
space:
mode:
authorGeorge Petculescu <gxgpet@gmail.com>2022-12-01 12:20:43 +0100
committerGeorge Petculescu <gxgpet@gmail.com>2022-12-01 12:20:43 +0100
commit127c44dfe4dcb42f506efaa0812a7e5afec99ac9 (patch)
treedccbab3f6d1a13b8f861ce4623f289e716c45a77 /tests/codeigniter/core/Log_test.php
parentad060386f3bd9b9bbebbd03c4f9279fe0c182b29 (diff)
Fixes #6174
Improves Log_test::test_configuration() test
Diffstat (limited to 'tests/codeigniter/core/Log_test.php')
-rw-r--r--tests/codeigniter/core/Log_test.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/codeigniter/core/Log_test.php b/tests/codeigniter/core/Log_test.php
index 3715949f6..fc3e11e1f 100644
--- a/tests/codeigniter/core/Log_test.php
+++ b/tests/codeigniter/core/Log_test.php
@@ -16,14 +16,14 @@ class Log_test extends CI_TestCase {
$enabled = new ReflectionProperty('CI_Log', '_enabled');
$enabled->setAccessible(TRUE);
- $this->ci_set_config('log_path', '/root/');
+ $this->ci_set_config('log_path', $this->ci_readonly_dir->url());
$this->ci_set_config('log_threshold', 'z');
$this->ci_set_config('log_date_format', 'd.m.Y');
$this->ci_set_config('log_filename', '');
$this->ci_set_config('log_file_permissions', '');
$instance = new CI_Log();
- $this->assertEquals($path->getValue($instance), '/root/');
+ $this->assertNotFalse(strpos($path->getValue($instance), 'application/readonly'));
$this->assertEquals($threshold->getValue($instance), 1);
$this->assertEquals($date_fmt->getValue($instance), 'd.m.Y');
$this->assertEquals($filename->getValue($instance), 'log-'.date('Y-m-d').'.php');
@@ -37,7 +37,7 @@ class Log_test extends CI_TestCase {
$this->ci_set_config('log_file_permissions', 0600);
$instance = new CI_Log();
- $this->assertEquals($path->getValue($instance), APPPATH.'logs/');
+ $this->assertEquals($path->getValue($instance), $this->ci_vfs_root->url().'application/logs'.DIRECTORY_SEPARATOR);
$this->assertEquals($threshold->getValue($instance), 0);
$this->assertEquals($date_fmt->getValue($instance), 'Y-m-d H:i:s');
$this->assertEquals($filename->getValue($instance), 'testname.log');