summaryrefslogtreecommitdiffstats
path: root/tests/lib/common.php
diff options
context:
space:
mode:
authorPascal Kriete <pascal.kriete@ellislab.com>2011-04-21 06:59:45 +0200
committerPascal Kriete <pascal.kriete@ellislab.com>2011-04-21 06:59:45 +0200
commitfe372e30a8f05ec4a77dc9a5ea2ec471b3488bd3 (patch)
treec7997a722ebadaa77faa7c9615edd4aeff2308e9 /tests/lib/common.php
parentc5d93cb3d4d8909507cbed548620e58d26c7c4bd (diff)
Fixing up the scope soup, and adding a way to set core config items.
Diffstat (limited to 'tests/lib/common.php')
-rw-r--r--tests/lib/common.php18
1 files changed, 12 insertions, 6 deletions
diff --git a/tests/lib/common.php b/tests/lib/common.php
index 482721a9a..994e9bc22 100644
--- a/tests/lib/common.php
+++ b/tests/lib/common.php
@@ -4,18 +4,24 @@
function &get_instance()
{
- $test = CodeIgniterTestCase::$test_instance;
- return $test->ci_instance;
+ $test = CI_TestCase::instance();
+ $instance = $test->ci_instance();
+ return $instance;
}
-// Config Stuff | @todo High priority!
// --------------------------------------------------------------------
-function get_config() { die('implement me'); }
+function &get_config() {
+ $test = CI_TestCase::instance();
+ $config = $test->ci_config_array();
+
+ return $config;
+}
function config_item($item)
{
- return CodeIgniterTestCase::ci_config($item);
+ $test = CI_TestCase::instance();
+ return $test->ci_config_item($item);
}
// --------------------------------------------------------------------
@@ -27,7 +33,7 @@ function load_class($class, $directory = 'libraries', $prefix = 'CI_')
throw new Exception('Not Implemented: Non-core load_class()');
}
- $test = CodeIgniterTestCase::$test_instance;
+ $test = CI_TestCase::instance();
$obj =& $test->ci_core_class($class);