public function setup()
 {
     parent::setup();
     $this->db = $this->new_dbal();
     $this->config_text = new \phpbb\config\db_text($this->db, 'phpbb_config_text');
     $this->tool = new \phpbb\db\migration\tool\config_text($this->config_text);
 }
	public function setup()
	{
		// Need global $db, $user for delete_module function in acp_modules
		global $phpbb_root_path, $phpEx, $skip_add_log, $db, $user, $phpbb_log;

		parent::setup();

		// Disable the logs
		$skip_add_log = true;

		$db = $this->db = $this->new_dbal();
		$this->cache = new \phpbb\cache\service(new \phpbb\cache\driver\dummy(), new \phpbb\config\config(array()), $this->db, $phpbb_root_path, $phpEx);
		$lang_loader = new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx);
		$lang = new \phpbb\language\language($lang_loader);
		$user = $this->user = new \phpbb\user($lang, '\phpbb\datetime');

		$cache = new phpbb_mock_cache;
		$phpbb_dispatcher = new phpbb_mock_event_dispatcher();
		$auth = $this->getMock('\phpbb\auth\auth');
		$phpbb_log = new \phpbb\log\log($db, $user, $auth, $phpbb_dispatcher, $phpbb_root_path, 'adm/', $phpEx, LOG_TABLE);

		$phpbb_extension_manager = new phpbb_mock_extension_manager($phpbb_root_path);
		$module_manager = new \phpbb\module\module_manager($cache, $this->db, $phpbb_extension_manager, MODULES_TABLE, $phpbb_root_path, $phpEx);

		$this->tool = new \phpbb\db\migration\tool\module($this->db, $this->cache, $this->user, $module_manager, $phpbb_root_path, $phpEx, 'phpbb_modules');
	}
 public function setup()
 {
     // Global $db and $cache are needed in acp/auth.php constructor
     global $phpbb_root_path, $phpEx, $db, $cache;
     parent::setup();
     $db = $this->db = $this->new_dbal();
     $cache = $this->cache = new \phpbb\cache\service(new \phpbb\cache\driver\dummy(), new \phpbb\config\config(array()), $this->db, $phpbb_root_path, $phpEx);
     $this->auth = new \phpbb\auth\auth();
     $this->tool = new \phpbb\db\migration\tool\permission($this->db, $this->cache, $this->auth, $phpbb_root_path, $phpEx);
 }
 public function setup()
 {
     // Need global $db, $user for delete_module function in acp_modules
     global $phpbb_root_path, $phpEx, $skip_add_log, $db, $user, $phpbb_log;
     parent::setup();
     // Force add_log function to not be used
     $skip_add_log = true;
     $db = $this->db = $this->new_dbal();
     $this->cache = new \phpbb\cache\service(new \phpbb\cache\driver\null(), new \phpbb\config\config(array()), $this->db, $phpbb_root_path, $phpEx);
     $user = $this->user = new \phpbb\user('\\phpbb\\user');
     $cache = new phpbb_mock_cache();
     $phpbb_dispatcher = new phpbb_mock_event_dispatcher();
     $auth = $this->getMock('\\phpbb\\auth\\auth');
     $phpbb_log = new \phpbb\log\log($db, $user, $auth, $phpbb_dispatcher, $phpbb_root_path, 'adm/', $phpEx, LOG_TABLE);
     $this->tool = new \phpbb\db\migration\tool\module($this->db, $this->cache, $this->user, $phpbb_root_path, $phpEx, 'phpbb_modules');
 }