summaryrefslogtreecommitdiffstats
path: root/tests/mocks/libraries/encrypt.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/mocks/libraries/encrypt.php')
-rw-r--r--tests/mocks/libraries/encrypt.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/mocks/libraries/encrypt.php b/tests/mocks/libraries/encrypt.php
new file mode 100644
index 000000000..f1859398f
--- /dev/null
+++ b/tests/mocks/libraries/encrypt.php
@@ -0,0 +1,16 @@
+<?php
+
+class Mock_Libraries_Encrypt extends CI_Encrypt {
+
+ // Overide inaccesible 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