summaryrefslogtreecommitdiffstats
path: root/tests/codeigniter/core/Config_test.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/codeigniter/core/Config_test.php')
-rw-r--r--tests/codeigniter/core/Config_test.php13
1 files changed, 9 insertions, 4 deletions
diff --git a/tests/codeigniter/core/Config_test.php b/tests/codeigniter/core/Config_test.php
index 8e312e361..f125fc6e9 100644
--- a/tests/codeigniter/core/Config_test.php
+++ b/tests/codeigniter/core/Config_test.php
@@ -205,13 +205,18 @@ class Config_test extends CI_TestCase {
'number' => 42,
'letter' => 'Z'
);
+
$pkg_dir = 'package';
- $this->ci_vfs_create($file.'.php', '<?php $config = '.var_export($cfg2, TRUE).';', $this->ci_app_root,
- array($pkg_dir, 'config'));
- $this->config->_config_paths[] = $this->ci_vfs_path($pkg_dir.'/', APPPATH);
+ $this->ci_vfs_create(
+ $file.'.php',
+ '<?php $config = '.var_export($cfg2, TRUE).';',
+ $this->ci_app_root,
+ array($pkg_dir, 'config')
+ );
+ array_unshift($this->config->_config_paths, $this->ci_vfs_path($pkg_dir.'/', APPPATH));
$this->assertTrue($this->config->load($file, TRUE));
$this->assertEquals(array_merge($cfg, $cfg2), $this->config->item($file));
- array_pop($this->config->_config_paths);
+ array_shift($this->config->_config_paths);
// Test graceful fail of invalid file
$file = 'badfile';