summaryrefslogtreecommitdiffstats
path: root/tests/mocks/libraries/table.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-03-28 12:45:04 +0200
committerAndrey Andreev <narf@bofh.bg>2012-03-28 12:45:04 +0200
commit2cb262ff0ee22f3928e39f19dc0112b9eb26cabc (patch)
tree9ccc0e2dc903ed4b40b7b73d41f5b98dfb45514c /tests/mocks/libraries/table.php
parentc2c4694469be036120156d16364c7a822c744094 (diff)
parent3b2587e1559d2cbe751d04f801f999ef3fa4e74c (diff)
Merge upstream branch
Diffstat (limited to 'tests/mocks/libraries/table.php')
-rw-r--r--tests/mocks/libraries/table.php15
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