diff options
author | Phil Sturgeon <email@philsturgeon.co.uk> | 2012-03-11 03:01:30 +0100 |
---|---|---|
committer | Phil Sturgeon <email@philsturgeon.co.uk> | 2012-03-11 03:01:30 +0100 |
commit | 6efbe5d7312698c73bbd645950ff5c81793b21e7 (patch) | |
tree | eb647bc246487f444ea1ffd4e24317ab0200bf30 /tests/lib | |
parent | e40c763bf969acbaa7c4c61be50f01e870062080 (diff) | |
parent | 8749bc7e836c196dfef37d3b7b5a67736a15092c (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.php | 17 |
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 |