mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
[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
This commit is contained in:
parent
ebdd96592a
commit
771bb957ab
1 changed files with 42 additions and 0 deletions
42
tests/mock/null_cache.php
Normal file
42
tests/mock/null_cache.php
Normal file
|
@ -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)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue