summaryrefslogtreecommitdiffstats
path: root/tests/mocks/libraries/encrypt.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-06-08 14:45:57 +0200
committerAndrey Andreev <narf@bofh.bg>2012-06-08 14:45:57 +0200
commit1be495483749c661f785cdef574ac84b2176d43a (patch)
treec1155f0690a61df3ed65ee837765a13b35a4b3da /tests/mocks/libraries/encrypt.php
parent9637b40ca9e9ac1cdce2b895d3db09848a6eef76 (diff)
parentbb2da6fafaab754aee3e6745bf23db52e3aed57d (diff)
Merge pull request #1433 from jjaffeux/test-encryption-class
Test encryption class
Diffstat (limited to 'tests/mocks/libraries/encrypt.php')
-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