summaryrefslogtreecommitdiffstats
path: root/tests/mocks
diff options
context:
space:
mode:
Diffstat (limited to 'tests/mocks')
-rw-r--r--tests/mocks/autoloader.php3
-rw-r--r--tests/mocks/ci_testcase.php27
2 files changed, 18 insertions, 12 deletions
diff --git a/tests/mocks/autoloader.php b/tests/mocks/autoloader.php
index 88070e508..bf3fbc508 100644
--- a/tests/mocks/autoloader.php
+++ b/tests/mocks/autoloader.php
@@ -6,8 +6,7 @@
//
// Prototype :
//
-// include_once('Mock_Core_Common') // Will load ./mocks/core/common.php
-// $mock_loader = new Mock_Core_Loader(); // Will load ./mocks/core/loader.php
+// include_once('Mock_Core_Loader') // Will load ./mocks/core/loader.php
// $mock_table = new Mock_Libraries_Table(); // Will load ./mocks/libraries/table.php
// $mock_database_driver = new Mock_Database_Driver(); // Will load ./mocks/database/driver.php
// and so on...
diff --git a/tests/mocks/ci_testcase.php b/tests/mocks/ci_testcase.php
index 5c83974b3..f327e6b07 100644
--- a/tests/mocks/ci_testcase.php
+++ b/tests/mocks/ci_testcase.php
@@ -48,6 +48,13 @@ class CI_TestCase extends PHPUnit_Framework_TestCase {
$this->tear_down();
}
}
+
+ // --------------------------------------------------------------------
+
+ public static function instance()
+ {
+ return self::$ci_test_instance;
+ }
// --------------------------------------------------------------------
@@ -62,6 +69,13 @@ class CI_TestCase extends PHPUnit_Framework_TestCase {
$this->ci_config[$key] = $val;
}
}
+
+ // --------------------------------------------------------------------
+
+ function ci_get_config()
+ {
+ return $this->ci_config;
+ }
// --------------------------------------------------------------------
@@ -153,19 +167,12 @@ class CI_TestCase extends PHPUnit_Framework_TestCase {
self::$ci_test_instance = $this;
parent::runBare();
}
-
- // --------------------------------------------------------------------
-
- public static function instance()
- {
- return self::$ci_test_instance;
- }
-
+
// --------------------------------------------------------------------
- function ci_get_config()
+ function helper($name)
{
- return $this->ci_config;
+ require_once(BASEPATH.'helpers/'.$name.'_helper.php');
}
// --------------------------------------------------------------------