public function setUp()
{
if (!self::$install_success) {
$this->fail('Installing phpBB has failed.');
}
// Clear the language array so that things
// that were added in other tests are gone
$this->lang = array();
$this->add_lang('common');
$db = $this->get_db();
foreach (static::setup_extensions() as $extension) {
$this->purge_cache();
$sql = 'SELECT ext_active
FROM ' . EXT_TABLE . "\n\t\t\t\tWHERE ext_name = '" . $db->sql_escape($extension) . "'";
$result = $db->sql_query($sql);
$status = (bool) $db->sql_fetchfield('ext_active');
$db->sql_freeresult($result);
if (!$status) {
$this->install_ext($extension);
}
}
}