1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-12 03:34:04 +02:00

[ticket/13421] Move tools to subdirectory

PHPBB3-13421
This commit is contained in:
Joas Schilling
2014-12-06 16:34:02 +01:00
parent d78bb2865b
commit ec90f2b380
26 changed files with 42 additions and 42 deletions

View File

@@ -30,7 +30,7 @@ class phpbb_dbal_auto_increment_test extends phpbb_database_test_case
parent::setUp();
$this->db = $this->new_dbal();
$this->tools = new \phpbb\db\tools($this->db);
$this->tools = new \phpbb\db\tools\tools($this->db);
$this->table_data = array(
'COLUMNS' => array(

View File

@@ -17,7 +17,7 @@ class phpbb_dbal_db_tools_test extends phpbb_database_test_case
{
/** @var \phpbb\db\driver\driver_interface */
protected $db;
/** @var \phpbb\db\tools_interface */
/** @var \phpbb\db\tools\tools_interface */
protected $tools;
protected $table_exists;
protected $table_data;
@@ -32,7 +32,7 @@ class phpbb_dbal_db_tools_test extends phpbb_database_test_case
parent::setUp();
$this->db = $this->new_dbal();
$this->tools = new \phpbb\db\tools($this->db);
$this->tools = new \phpbb\db\tools\tools($this->db);
$this->table_data = array(
'COLUMNS' => array(
@@ -340,7 +340,7 @@ class phpbb_dbal_db_tools_test extends phpbb_database_test_case
public function test_perform_schema_changes_drop_tables()
{
$db_tools = $this->getMock('\phpbb\db\tools', array(
$db_tools = $this->getMock('\phpbb\db\tools\tools', array(
'sql_table_exists',
'sql_table_drop',
), array(&$this->db));
@@ -366,7 +366,7 @@ class phpbb_dbal_db_tools_test extends phpbb_database_test_case
public function test_perform_schema_changes_drop_columns()
{
$db_tools = $this->getMock('\phpbb\db\tools', array(
$db_tools = $this->getMock('\phpbb\db\tools\tools', array(
'sql_column_exists',
'sql_column_remove',
), array(&$this->db));

View File

@@ -38,7 +38,7 @@ class phpbb_dbal_migrator_test extends phpbb_database_test_case
parent::setUp();
$this->db = $this->new_dbal();
$this->db_tools = new \phpbb\db\tools($this->db);
$this->db_tools = new \phpbb\db\tools\tools($this->db);
$this->config = new \phpbb\config\db($this->db, new phpbb_mock_cache, 'phpbb_config');

View File

@@ -150,7 +150,7 @@ class phpbb_extension_manager_test extends phpbb_database_test_case
$config = new \phpbb\config\config(array('version' => PHPBB_VERSION));
$db = $this->new_dbal();
$db_tools = new \phpbb\db\tools($db);
$db_tools = new \phpbb\db\tools\tools($db);
$phpbb_root_path = __DIR__ . './../../phpBB/';
$php_ext = 'php';
$table_prefix = 'phpbb_';

View File

@@ -41,7 +41,7 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case
'version' => '3.1.0',
));
$this->db = $this->new_dbal();
$this->db_tools = new \phpbb\db\tools($this->db);
$this->db_tools = new \phpbb\db\tools\tools($this->db);
$this->phpbb_root_path = dirname(__FILE__) . '/';
$this->phpEx = 'php';
$this->user = new \phpbb\user('\phpbb\datetime');

View File

@@ -18,7 +18,7 @@ class phpbb_migrator_convert_timezones_test extends phpbb_database_test_case
public function getDataSet()
{
$this->db = $this->new_dbal();
$db_tools = new \phpbb\db\tools($this->db);
$db_tools = new \phpbb\db\tools\tools($this->db);
// user_dst doesn't exist anymore, must re-add it to test this
$db_tools->sql_column_add('phpbb_users', 'user_dst', array('BOOL', 1));
@@ -59,7 +59,7 @@ class phpbb_migrator_convert_timezones_test extends phpbb_database_test_case
$this->migration = new \phpbb\db\migration\data\v310\timezone(
new \phpbb\config\config(array()),
$this->db,
new \phpbb\db\tools($this->db),
new \phpbb\db\tools\tools($this->db),
$phpbb_root_path,
$phpEx,
'phpbb_'
@@ -90,7 +90,7 @@ class phpbb_migrator_convert_timezones_test extends phpbb_database_test_case
}
$this->db->sql_freeresult($result);
$db_tools = new \phpbb\db\tools($this->db);
$db_tools = new \phpbb\db\tools\tools($this->db);
// Remove the user_dst field again
$db_tools->sql_column_remove('phpbb_users', 'user_dst');

View File

@@ -30,7 +30,7 @@ class schema_generator_test extends phpbb_test_case
$this->config = new \phpbb\config\config(array());
$this->db = new \phpbb\db\driver\sqlite();
$this->db_tools = new \phpbb\db\tools($this->db);
$this->db_tools = new \phpbb\db\tools\tools($this->db);
$this->table_prefix = 'phpbb_';
}

View File

@@ -32,7 +32,7 @@ class phpbb_notification_convert_test extends phpbb_database_test_case
$this->migration = new \phpbb\db\migration\data\v310\notification_options_reconvert(
new \phpbb\config\config(array()),
$this->db,
new \phpbb\db\tools($this->db),
new \phpbb\db\tools\tools($this->db),
$phpbb_root_path,
$phpEx,
'phpbb_'

View File

@@ -77,7 +77,7 @@ abstract class phpbb_database_test_case extends PHPUnit_Extensions_Database_Test
global $table_prefix;
$db = new \phpbb\db\driver\sqlite();
$schema_generator = new \phpbb\db\migration\schema_generator($classes, new \phpbb\config\config(array()), $db, new \phpbb\db\tools($db, true), $phpbb_root_path, $phpEx, $table_prefix);
$schema_generator = new \phpbb\db\migration\schema_generator($classes, new \phpbb\config\config(array()), $db, new \phpbb\db\tools\tools($db, true), $phpbb_root_path, $phpEx, $table_prefix);
file_put_contents(self::$schema_file, json_encode($schema_generator->get_schema()));
}

View File

@@ -370,11 +370,11 @@ class phpbb_database_test_connection_manager
->get_classes();
$db = new \phpbb\db\driver\sqlite();
$schema_generator = new \phpbb\db\migration\schema_generator($classes, new \phpbb\config\config(array()), $db, new \phpbb\db\tools($db, true), $phpbb_root_path, $phpEx, $table_prefix);
$schema_generator = new \phpbb\db\migration\schema_generator($classes, new \phpbb\config\config(array()), $db, new \phpbb\db\tools\tools($db, true), $phpbb_root_path, $phpEx, $table_prefix);
$db_table_schema = $schema_generator->get_schema();
}
$db_tools = new \phpbb\db\tools($db, true);
$db_tools = new \phpbb\db\tools\tools($db, true);
foreach ($db_table_schema as $table_name => $table_data)
{
$queries = $db_tools->sql_create_table(

View File

@@ -230,7 +230,7 @@ class phpbb_functional_test_case extends phpbb_test_case
$config = new \phpbb\config\config(array());
$db = $this->get_db();
$db_tools = new \phpbb\db\tools($db);
$db_tools = new \phpbb\db\tools\tools($db);
$migrator = new \phpbb\db\migrator(
$config,