当前位置: 首页>>代码示例>>PHP>>正文


PHP phpbb_database_test_case::setup方法代码示例

本文整理汇总了PHP中phpbb_database_test_case::setup方法的典型用法代码示例。如果您正苦于以下问题:PHP phpbb_database_test_case::setup方法的具体用法?PHP phpbb_database_test_case::setup怎么用?PHP phpbb_database_test_case::setup使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在phpbb_database_test_case的用法示例。


在下文中一共展示了phpbb_database_test_case::setup方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: setup

 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);
 }
开发者ID:VOLKERMORD,项目名称:phpbb,代码行数:7,代码来源:migrator_tool_config_text_test.php

示例2: setup

	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');
	}
开发者ID:bantu,项目名称:phpbb,代码行数:26,代码来源:migrator_tool_module_test.php

示例3: setup

 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);
 }
开发者ID:VOLKERMORD,项目名称:phpbb,代码行数:10,代码来源:migrator_tool_permission_test.php

示例4: setup

 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');
 }
开发者ID:Voxel37,项目名称:phpbb,代码行数:16,代码来源:migrator_tool_module_test.php


注:本文中的phpbb_database_test_case::setup方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。