summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordchill42 <dchill42@gmail.com>2012-10-15 00:23:52 +0200
committerdchill42 <dchill42@gmail.com>2012-10-15 00:23:52 +0200
commite3621cc79fa4b4658768fea0694cc0ae52835d85 (patch)
tree98d6de3a69fc8b775c8c10f6b29b11492c070245
parent92e5511d9b7667314c2a292c889f283c2f70e22a (diff)
Adapted Config load test to VFS APPPATH
Signed-off-by: dchill42 <dchill42@gmail.com>
-rw-r--r--tests/codeigniter/core/Config_test.php20
1 files changed, 6 insertions, 14 deletions
diff --git a/tests/codeigniter/core/Config_test.php b/tests/codeigniter/core/Config_test.php
index 7782a7898..80e0862ff 100644
--- a/tests/codeigniter/core/Config_test.php
+++ b/tests/codeigniter/core/Config_test.php
@@ -94,7 +94,7 @@ class Config_test extends CI_TestCase {
public function test_load()
{
- // Create VFS tree of application config files
+ // Create config files in VFS
$file1 = 'test.php';
$file2 = 'secttest';
$key1 = 'testconfig';
@@ -107,18 +107,10 @@ class Config_test extends CI_TestCase {
'two' => 2,
'three' => true
);
- $tree = array(
- 'application' => array(
- 'config' => array(
- $file1 => '<?php $config = '.var_export($cfg1, TRUE).';',
- $file2.'.php' => '<?php $config = '.var_export($cfg2, TRUE).';'
- )
- )
- );
- $root = vfsStream::setup('root', NULL, $tree);
-
- // Set config path with VFS URL
- $this->config->_config_paths = array(vfsStream::url('application').'/');
+ $this->ci_vfs_create(array(
+ $file1 => '<?php $config = '.var_export($cfg1, TRUE).';',
+ $file2.'.php' => '<?php $config = '.var_export($cfg2, TRUE).';'
+ ), '', $this->ci_app_root, 'config');
// Test regular load
$this->assertTrue($this->config->load($file1));
@@ -140,4 +132,4 @@ class Config_test extends CI_TestCase {
$this->assertNull($this->config->load($file3));
}
-}
+} \ No newline at end of file