summaryrefslogtreecommitdiffstats
path: root/tests/mocks/libraries
diff options
context:
space:
mode:
authorAndrew <browner12@gmail.com>2014-02-11 09:55:48 +0100
committerAndrew <browner12@gmail.com>2014-02-11 09:55:48 +0100
commitb6d8b962e44202a74c9b9321a4a53f61a753fccf (patch)
tree2d3c533a55964a0d124f7cd6bb1d3d98c7b84056 /tests/mocks/libraries
parent41713aaa665189dd0a191c333c73c4a7b9f37c78 (diff)
parent29e12641a1bb952f493462db6757ae12c7da1f2c (diff)
Merge branch 'develop' into patch-1
Conflicts: system/libraries/Calendar.php
Diffstat (limited to 'tests/mocks/libraries')
-rw-r--r--tests/mocks/libraries/encryption.php39
1 files changed, 39 insertions, 0 deletions
diff --git a/tests/mocks/libraries/encryption.php b/tests/mocks/libraries/encryption.php
new file mode 100644
index 000000000..028eecc72
--- /dev/null
+++ b/tests/mocks/libraries/encryption.php
@@ -0,0 +1,39 @@
+<?php
+
+class Mock_Libraries_Encryption extends CI_Encryption {
+
+ /**
+ * __get_params()
+ *
+ * Allows public calls to the otherwise protected _get_params().
+ */
+ public function __get_params($params)
+ {
+ return $this->_get_params($params);
+ }
+
+ // --------------------------------------------------------------------
+
+ /**
+ * get_key()
+ *
+ * Allows checking for key changes.
+ */
+ public function get_key()
+ {
+ return $this->_key;
+ }
+
+ // --------------------------------------------------------------------
+
+ /**
+ * __driver_get_handle()
+ *
+ * Allows checking for _mcrypt_get_handle(), _openssl_get_handle()
+ */
+ public function __driver_get_handle($driver, $cipher, $mode)
+ {
+ return $this->{'_'.$driver.'_get_handle'}($cipher, $mode);
+ }
+
+} \ No newline at end of file