summaryrefslogtreecommitdiffstats
path: root/tests/mocks/libraries
diff options
context:
space:
mode:
authorJoffrey Jaffeux <j.jaffeux@gmail.com>2012-06-06 01:40:18 +0200
committerJoffrey Jaffeux <j.jaffeux@gmail.com>2012-06-07 20:00:38 +0200
commit9d1407523ae585d45171b54123ba29c0ec831f79 (patch)
treee7ef6c326d38abf14a10c93b5386c3c44530e98e /tests/mocks/libraries
parentba7f50bf6553e2f4a3b81da9d5c2c9811e4022c8 (diff)
tests for encryption class
Diffstat (limited to 'tests/mocks/libraries')
-rw-r--r--tests/mocks/libraries/encrypt.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/mocks/libraries/encrypt.php b/tests/mocks/libraries/encrypt.php
new file mode 100644
index 000000000..a9bbaafdc
--- /dev/null
+++ b/tests/mocks/libraries/encrypt.php
@@ -0,0 +1,15 @@
+<?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