mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-25 19:38:53 +00:00
[ticket/10972] Add destroy method to mock cache.
I actually needed the version that destroys tables, therefore I ended up writing a mock null cache. This code is currently unused but will probably be handy at some point. PHPBB3-10972
This commit is contained in:
parent
771bb957ab
commit
1285bdff00
1 changed files with 11 additions and 1 deletions
|
@ -34,6 +34,16 @@ class phpbb_mock_cache
|
|||
$this->data[$var_name] = $var;
|
||||
}
|
||||
|
||||
public function destroy($var_name, $table = '')
|
||||
{
|
||||
if ($table)
|
||||
{
|
||||
throw new Exception('Destroying tables is not implemented yet');
|
||||
}
|
||||
|
||||
unset($this->data[$var_name]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Obtain active bots
|
||||
*/
|
||||
|
@ -41,7 +51,7 @@ class phpbb_mock_cache
|
|||
{
|
||||
return $this->data['_bots'];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Obtain list of word censors. We don't need to parse them here,
|
||||
* that is tested elsewhere.
|
||||
|
|
Loading…
Add table
Reference in a new issue