summaryrefslogtreecommitdiffstats
path: root/tests/lib
diff options
context:
space:
mode:
authorPhil Sturgeon <email@philsturgeon.co.uk>2012-03-11 03:01:30 +0100
committerPhil Sturgeon <email@philsturgeon.co.uk>2012-03-11 03:01:30 +0100
commit6efbe5d7312698c73bbd645950ff5c81793b21e7 (patch)
treeeb647bc246487f444ea1ffd4e24317ab0200bf30 /tests/lib
parente40c763bf969acbaa7c4c61be50f01e870062080 (diff)
parent8749bc7e836c196dfef37d3b7b5a67736a15092c (diff)
Merge pull request #1161 from toopay/unit-tests
Unit Tests marked as "Incomplete" now completed.
Diffstat (limited to 'tests/lib')
-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