mirror of
https://github.com/phpbb/phpbb.git
synced 2025-04-14 04:42:04 +02:00
[ticket/11386] Update tests with new constructors for ext.manager/migrator
PHPBB3-11386
This commit is contained in:
parent
39ca212e17
commit
8415ae839c
@ -44,7 +44,26 @@ class phpbb_dbal_migrator_test extends phpbb_database_test_case
|
||||
$tools = array(
|
||||
new phpbb_db_migration_tool_config($this->config),
|
||||
);
|
||||
$this->migrator = new phpbb_db_migrator($this->config, $this->db, $this->db_tools, 'phpbb_migrations', dirname(__FILE__) . '/../../phpBB/', 'php', 'phpbb_', $tools);
|
||||
|
||||
$this->extension_manager = new phpbb_extension_manager(
|
||||
new phpbb_mock_container_builder(),
|
||||
$this->db,
|
||||
$this->config,
|
||||
'phpbb_ext',
|
||||
dirname(__FILE__) . '/../../phpBB/',
|
||||
'.php',
|
||||
null
|
||||
);
|
||||
$this->migrator = new phpbb_db_migrator(
|
||||
$this->config,
|
||||
$this->db,
|
||||
$this->db_tools,
|
||||
$this->extension_manager,
|
||||
'phpbb_migrations',
|
||||
dirname(__FILE__) . '/../../phpBB/',
|
||||
'php',
|
||||
'phpbb_', $tools
|
||||
);
|
||||
}
|
||||
|
||||
public function test_update()
|
||||
|
@ -97,15 +97,28 @@ class phpbb_extension_manager_test extends phpbb_database_test_case
|
||||
$php_ext = 'php';
|
||||
$table_prefix = 'phpbb_';
|
||||
|
||||
return new phpbb_extension_manager(
|
||||
$manager = new phpbb_extension_manager(
|
||||
new phpbb_mock_container_builder(),
|
||||
$db,
|
||||
$config,
|
||||
new phpbb_db_migrator($config, $db, $db_tools, 'phpbb_migrations', $phpbb_root_path, $php_ext, $table_prefix, array()),
|
||||
'phpbb_ext',
|
||||
dirname(__FILE__) . '/',
|
||||
'.' . $php_ext,
|
||||
($with_cache) ? new phpbb_mock_cache() : null
|
||||
);
|
||||
$migrator = new phpbb_db_migrator(
|
||||
$config,
|
||||
$db,
|
||||
$db_tools,
|
||||
$manager,
|
||||
'phpbb_migrations',
|
||||
$phpbb_root_path,
|
||||
$php_ext,
|
||||
$table_prefix,
|
||||
array()
|
||||
);
|
||||
$manager->set_migrator($migrator);
|
||||
|
||||
return $manager;
|
||||
}
|
||||
}
|
||||
|
@ -53,7 +53,6 @@ class metadata_manager_test extends phpbb_database_test_case
|
||||
new phpbb_mock_container_builder(),
|
||||
$this->db,
|
||||
$this->config,
|
||||
new phpbb_db_migrator($this->config, $this->db, $this->db_tools, 'phpbb_migrations', $this->phpbb_root_path, $this->php_ext, $this->table_prefix, array()),
|
||||
'phpbb_ext',
|
||||
$this->phpbb_root_path,
|
||||
$this->phpEx,
|
||||
|
@ -138,16 +138,29 @@ class phpbb_functional_test_case extends phpbb_test_case
|
||||
$db = $this->get_db();
|
||||
$db_tools = new phpbb_db_tools($db);
|
||||
|
||||
return new phpbb_extension_manager(
|
||||
$extension_manager = new phpbb_extension_manager(
|
||||
new phpbb_mock_container_builder(),
|
||||
$db,
|
||||
$config,
|
||||
new phpbb_db_migrator($config, $db, $db_tools, self::$config['table_prefix'] . 'migrations', $phpbb_root_path, $php_ext, self::$config['table_prefix'], array()),
|
||||
self::$config['table_prefix'] . 'ext',
|
||||
dirname(__FILE__) . '/',
|
||||
'.' . $php_ext,
|
||||
$this->get_cache_driver()
|
||||
);
|
||||
$migrator = new phpbb_db_migrator(
|
||||
$config,
|
||||
$db,
|
||||
$db_tools,
|
||||
$manager,
|
||||
self::$config['table_prefix'] . 'migrations',
|
||||
$phpbb_root_path,
|
||||
$php_ext,
|
||||
self::$config['table_prefix'],
|
||||
array()
|
||||
);
|
||||
$extension_manager->set_migrator($migrator);
|
||||
|
||||
return $extension_manager;
|
||||
}
|
||||
|
||||
static protected function install_board()
|
||||
|
Loading…
x
Reference in New Issue
Block a user