public function setUp() { parent::setUp(); $this->get_db(); $this->phpbb_extension_manager = $this->get_extension_manager(); $this->purge_cache(); }
public function setUp() { parent::setUp(); $this->login(); $this->admin_login(); $this->add_lang('acp/users'); }
public function setUp() { parent::setUp(); $this->set_extension_group_permission(1); $this->path = __DIR__ . '/fixtures/files/'; $this->add_lang('posting'); $this->login(); }
public function setUp() { parent::setUp(); $this->path = __DIR__ . '/fixtures/files/'; $this->login(); $this->admin_login(); $this->add_lang(array('acp/board', 'ucp', 'acp/users', 'acp/groups')); $this->set_acp_settings(); }
public function setUp() { parent::setUp(); $this->phpbb_extension_manager = $this->get_extension_manager(); $this->purge_cache(); $this->phpbb_extension_manager->enable('foo/bar'); $this->login(); $this->admin_login(); $this->add_lang('acp/extensions'); }
public function setUp() { parent::setUp(); // Load all language files $this->add_lang_ext('robertheim/topictags', array('info_acp_topictags', 'permissions_topictags', 'topictags_acp', 'topictags')); global $table_prefix; $this->auth = $this->getMock('\\phpbb\\auth\\auth'); $config = new \phpbb\config\config(array(prefixes::CONFIG . '_allowed_tags_regex' => '/^[a-z]{3,30}$/i')); $db_helper = new db_helper($this->get_db()); $config_text = new \phpbb\config\db_text($this->get_db(), $table_prefix . 'config_text'); $this->tags_manager = new \robertheim\topictags\service\tags_manager($this->get_db(), $config, $config_text, $this->auth, $db_helper, $table_prefix); }
public function setUp() { parent::setUp(); $this->get_db(); $acl_ary = array('auth_option' => 'u_foo', 'is_global' => 1); $sql = 'INSERT INTO phpbb_acl_options ' . $this->db->sql_build_array('INSERT', $acl_ary); $this->db->sql_query($sql); $this->phpbb_extension_manager = $this->get_extension_manager(); $this->purge_cache(); $this->login(); $this->admin_login(); $this->add_lang('acp/permissions'); }
public function setUp() { parent::setUp(); $this->get_db(); // Clear the phpbb_ext table $this->db->sql_query('DELETE FROM phpbb_ext'); // Insert our base data $insert_rows = array(array('ext_name' => 'vendor2/foo', 'ext_active' => true, 'ext_state' => 'b:0;'), array('ext_name' => 'vendor/moo', 'ext_active' => false, 'ext_state' => 'b:0;'), array('ext_name' => 'vendor/test2', 'ext_active' => true, 'ext_state' => 'b:0;'), array('ext_name' => 'vendor/test3', 'ext_active' => false, 'ext_state' => 'b:0;')); $this->db->sql_multi_insert('phpbb_ext', $insert_rows); $this->login(); $this->admin_login(); $this->add_lang('acp/extensions'); }
public function setUp() { parent::setUp(); // Only doing this within the functional framework because we need a // URL // Global $config required by unique_id // Global $user required by fileupload::remote_upload global $config, $user; if (!is_array($config)) { $config = array(); } $config['rand_seed'] = ''; $config['rand_seed_last_update'] = time() + 600; $user = new phpbb_mock_user(); $user->lang = new phpbb_mock_lang(); }
public function setUp() { global $db; parent::setUp(); $this->phpbb_extension_manager = $this->get_extension_manager(); $this->phpbb_extension_manager->enable('foo/bar'); $modules = new acp_modules(); $db = $this->get_db(); $sql = 'SELECT module_id FROM ' . MODULES_TABLE . "\n\t\t\tWHERE module_langname = 'acp'\n\t\t\t\tAND module_class = 'ACP_CAT_DOT_MODS'"; $result = $db->sql_query($sql); $module_id = (int) $db->sql_fetchfield('module_id'); $db->sql_freeresult($result); $parent_data = array('module_basename' => '', 'module_enabled' => 1, 'module_display' => 1, 'parent_id' => $module_id, 'module_class' => 'acp', 'module_langname' => 'ACP_FOOBAR_TITLE', 'module_mode' => '', 'module_auth' => ''); $modules->update_module_data($parent_data, true); $module_data = array('module_basename' => 'foo\\bar\\acp\\main_module', 'module_enabled' => 1, 'module_display' => 1, 'parent_id' => $parent_data['module_id'], 'module_class' => 'acp', 'module_langname' => 'ACP_FOOBAR_TITLE', 'module_mode' => 'mode', 'module_auth' => ''); $modules->update_module_data($module_data, true); $parent_data = array('module_basename' => '', 'module_enabled' => 1, 'module_display' => 1, 'parent_id' => 0, 'module_class' => 'ucp', 'module_langname' => 'UCP_FOOBAR_TITLE', 'module_mode' => '', 'module_auth' => ''); $modules->update_module_data($parent_data, true); $module_data = array('module_basename' => 'foo\\bar\\ucp\\main_module', 'module_enabled' => 1, 'module_display' => 1, 'parent_id' => $parent_data['module_id'], 'module_class' => 'ucp', 'module_langname' => 'UCP_FOOBAR_TITLE', 'module_mode' => 'mode', 'module_auth' => ''); $modules->update_module_data($module_data, true); $this->purge_cache(); }
public function setUp() { parent::setUp(); // Only doing this within the functional framework because we need a // URL // Global $config required by unique_id global $config, $phpbb_root_path, $phpEx; if (!is_array($config)) { $config = array(); } $config['rand_seed'] = ''; $config['rand_seed_last_update'] = time() + 600; $this->filesystem = new \phpbb\filesystem\filesystem(); $this->language = new \phpbb\language\language(new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx)); $this->request = $this->getMock('\\phpbb\\request\\request'); $this->php_ini = new \bantu\IniGetWrapper\IniGetWrapper(); $container = new phpbb_mock_container_builder(); $container->set('files.filespec', new \phpbb\files\filespec($this->filesystem, $this->language, $this->php_ini, new \FastImageSize\FastImageSize(), $this->phpbb_root_path)); $this->factory = new \phpbb\files\factory($container); $container->set('files.factory', $this->factory); $container->set('files.types.remote', new \phpbb\files\types\remote($this->factory, $this->language, $this->php_ini, $this->request, $phpbb_root_path)); $this->phpbb_root_path = $phpbb_root_path; }
public function setUp() { parent::setUp(); $this->path = __DIR__ . '/fixtures/files/'; $this->add_lang('posting'); }
public function setUp() { parent::setUp(); }
public function setUp() { parent::setUp(); $this->path = __DIR__ . '/images/'; }
public function setUp() { parent::setUp(); //$this->force_allow_birthday(); //$this->require_birthday(); }
public function setUp() { parent::setUp(); $this->purge_cache(); }
public function setUp() { parent::setUp(); $this->login(); $this->admin_login(); }