1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 14:00:31 +02:00

[ticket/10586] Correctly purge board cache and don't rename install directory

PHPBB3-10586
This commit is contained in:
Nils Adermann
2012-03-18 22:57:37 +01:00
committed by David King
parent 76e6195194
commit 1bbb32a5cf
4 changed files with 40 additions and 20 deletions

View File

@@ -16,6 +16,7 @@ class phpbb_functional_test_case extends phpbb_test_case
protected $cache = null;
protected $db = null;
protected $extension_manager = null;
static protected $config = array();
static protected $already_installed = false;
@@ -86,11 +87,41 @@ class phpbb_functional_test_case extends phpbb_test_case
return $this->db;
}
protected function get_ext_manager()
protected function get_cache_driver()
{
if (!$this->cache)
{
$this->cache = new phpbb_cache_driver_file;
}
return $this->cache;
}
protected function purge_cache()
{
$cache = $this->get_cache_driver();
$cache->purge();
$cache->unload();
$cache->load();
}
protected function get_extension_manager()
{
global $phpbb_root_path, $phpEx;
$this->cache = ($this->cache instanceof phpbb_cache_driver_null) ? $this->cache : new phpbb_cache_driver_null;
return new phpbb_extension_manager($this->get_db(), self::$config['table_prefix'] . 'ext', $phpbb_root_path, ".$phpEx", $this->cache);
if (!$this->extension_manager)
{
$this->extension_manager = new phpbb_extension_manager(
$this->get_db(),
self::$config['table_prefix'] . 'ext',
$phpbb_root_path,
".$phpEx",
$this->get_cache_driver()
);
}
return $this->extension_manager;
}
protected function install_board()