diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-03-28 14:01:47 +0200 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-03-28 14:01:47 +0200 |
commit | 9602651a0d435b8ccef1965a154e8a33594de6f3 (patch) | |
tree | eef01a98150dc7703a98266fe92b0a802078b083 /tests/mocks/libraries/table.php | |
parent | 0cfc3fdaf1f0b928dd3cf3fc916275d30f34a550 (diff) | |
parent | 8e2478e7310b5cfff88b64ff5d84b71f1c124b58 (diff) |
Merge upstream branch
Diffstat (limited to 'tests/mocks/libraries/table.php')
-rw-r--r-- | tests/mocks/libraries/table.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/mocks/libraries/table.php b/tests/mocks/libraries/table.php new file mode 100644 index 000000000..1a6ff8d35 --- /dev/null +++ b/tests/mocks/libraries/table.php @@ -0,0 +1,15 @@ +<?php + +class Mock_Libraries_Table extends CI_Table { + + // Overide inaccesible private or protected method + public function __call($method, $params) + { + if (is_callable(array($this, '_'.$method))) + { + return call_user_func_array(array($this, '_'.$method), $params); + } + + throw new BadMethodCallException('Method '.$method.' was not found'); + } +}
\ No newline at end of file |