From 42bc6d51e15c180f35632d5c03c649225f8dbf74 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 16 Dec 2014 16:16:45 +0200 Subject: Fix #3419 --- tests/codeigniter/core/Config_test.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'tests/codeigniter/core') 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', 'ci_app_root, - array($pkg_dir, 'config')); - $this->config->_config_paths[] = $this->ci_vfs_path($pkg_dir.'/', APPPATH); + $this->ci_vfs_create( + $file.'.php', + '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'; -- cgit v1.2.3-24-g4f1b