diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-06-08 14:45:57 +0200 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-06-08 14:45:57 +0200 |
commit | 1be495483749c661f785cdef574ac84b2176d43a (patch) | |
tree | c1155f0690a61df3ed65ee837765a13b35a4b3da /tests/mocks/libraries/encrypt.php | |
parent | 9637b40ca9e9ac1cdce2b895d3db09848a6eef76 (diff) | |
parent | bb2da6fafaab754aee3e6745bf23db52e3aed57d (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.php | 15 |
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 |