summaryrefslogtreecommitdiffstats
path: root/tests/lib/ci_testcase.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/ci_testcase.php')
-rw-r--r--tests/lib/ci_testcase.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/lib/ci_testcase.php b/tests/lib/ci_testcase.php
index 8ca71fdf2..afccee017 100644
--- a/tests/lib/ci_testcase.php
+++ b/tests/lib/ci_testcase.php
@@ -172,6 +172,23 @@ class CI_TestCase extends PHPUnit_Framework_TestCase {
{
return $this->ci_config;
}
+
+ // --------------------------------------------------------------------
+
+ /**
+ * This overload is useful to create a stub, that need to have a specific method.
+ */
+ function __call($method, $args)
+ {
+ if ($this->{$method} instanceof Closure)
+ {
+ return call_user_func_array($this->{$method},$args);
+ }
+ else
+ {
+ return parent::__call($method, $args);
+ }
+ }
}
// EOF \ No newline at end of file