diff options
author | Oleg Pudeyev <oleg@bsdpower.com> | 2012-12-06 23:41:02 -0500 |
---|---|---|
committer | Oleg Pudeyev <oleg@bsdpower.com> | 2012-12-06 23:41:02 -0500 |
commit | 771bb957ab4dee865ce1678eb675c37874d04e98 (patch) | |
tree | 8e367b8f859af3d6a552c0ecc47a1e4e0fd54d39 /tests/mock | |
parent | ebdd96592a100139c48204ef133e706c0ac465d1 (diff) | |
download | forums-771bb957ab4dee865ce1678eb675c37874d04e98.tar forums-771bb957ab4dee865ce1678eb675c37874d04e98.tar.gz forums-771bb957ab4dee865ce1678eb675c37874d04e98.tar.bz2 forums-771bb957ab4dee865ce1678eb675c37874d04e98.tar.xz forums-771bb957ab4dee865ce1678eb675c37874d04e98.zip |
[ticket/10972] Add mock null cache.
The mock cache has instrumentation methods and therefore is non-trivial
to implement. For those times when we don't care that the cache caches,
null cache is a simpler implementation.
PHPBB3-10972
Diffstat (limited to 'tests/mock')
-rw-r--r-- | tests/mock/null_cache.php | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/tests/mock/null_cache.php b/tests/mock/null_cache.php new file mode 100644 index 0000000000..aca20ca77b --- /dev/null +++ b/tests/mock/null_cache.php @@ -0,0 +1,42 @@ +<?php +/** +* +* @package testing +* @copyright (c) 2012 phpBB Group +* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* +*/ + +class phpbb_mock_null_cache +{ + public function __construct() + { + } + + public function get($var_name) + { + return false; + } + + public function put($var_name, $var, $ttl = 0) + { + } + + public function destroy($var_name, $table = '') + { + } + + public function obtain_bots() + { + return array(); + } + + public function obtain_word_list() + { + return array(); + } + + public function set_bots($bots) + { + } +} |