[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:
Oleg Pudeyev 2012-12-06 23:42:13 -05:00
parent 771bb957ab
commit 1285bdff00

View file

@ -34,6 +34,16 @@ class phpbb_mock_cache
$this->data[$var_name] = $var; $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 * Obtain active bots
*/ */
@ -41,7 +51,7 @@ class phpbb_mock_cache
{ {
return $this->data['_bots']; return $this->data['_bots'];
} }
/** /**
* Obtain list of word censors. We don't need to parse them here, * Obtain list of word censors. We don't need to parse them here,
* that is tested elsewhere. * that is tested elsewhere.