diff options
author | Taufan Aditya <toopay@taufanaditya.com> | 2012-03-10 23:43:45 +0100 |
---|---|---|
committer | Taufan Aditya <toopay@taufanaditya.com> | 2012-03-10 23:43:45 +0100 |
commit | 8749bc7e836c196dfef37d3b7b5a67736a15092c (patch) | |
tree | eb647bc246487f444ea1ffd4e24317ab0200bf30 /tests/lib/ci_testcase.php | |
parent | e40c763bf969acbaa7c4c61be50f01e870062080 (diff) |
Fix incomplete and skipped test
Diffstat (limited to 'tests/lib/ci_testcase.php')
-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 |