mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 22:10:45 +02: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:
@@ -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.
|
||||
|
Reference in New Issue
Block a user