mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-17 22:11:26 +02:00
[ticket/11700] Fix dbal tests after config namespace mishap
PHPBB3-11700
This commit is contained in:
@@ -35,7 +35,7 @@ class phpbb_dbal_migrator_test extends phpbb_database_test_case
|
||||
$this->db = $this->new_dbal();
|
||||
$this->db_tools = new \phpbb\db\tools($this->db);
|
||||
|
||||
$this->config = new \phpbb\config\db($this->db, new phpbb_mock_cache, '\phpbb\config\config');
|
||||
$this->config = new \phpbb\config\db($this->db, new phpbb_mock_cache, 'phpbb_config');
|
||||
|
||||
$tools = array(
|
||||
new \phpbb\db\migration\tool\config($this->config),
|
||||
@@ -91,7 +91,7 @@ class phpbb_dbal_migrator_test extends phpbb_database_test_case
|
||||
|
||||
$this->assertSqlResultEquals(
|
||||
array(array('extra_column' => '1')),
|
||||
"SELECT extra_column FROM \phpbb\config\config WHERE config_name = 'foo'",
|
||||
"SELECT extra_column FROM phpbb_config WHERE config_name = 'foo'",
|
||||
'Dummy migration created extra_column with value 1 in all rows.'
|
||||
);
|
||||
|
||||
@@ -107,7 +107,7 @@ class phpbb_dbal_migrator_test extends phpbb_database_test_case
|
||||
);
|
||||
|
||||
// cleanup
|
||||
$this->db_tools->sql_column_remove('\phpbb\config\config', 'extra_column');
|
||||
$this->db_tools->sql_column_remove('phpbb_config', 'extra_column');
|
||||
}
|
||||
|
||||
public function test_unfulfillable()
|
||||
@@ -123,11 +123,11 @@ class phpbb_dbal_migrator_test extends phpbb_database_test_case
|
||||
|
||||
$this->assertSqlResultEquals(
|
||||
array(array('extra_column' => '1')),
|
||||
"SELECT extra_column FROM \phpbb\config\config WHERE config_name = 'foo'",
|
||||
"SELECT extra_column FROM phpbb_config WHERE config_name = 'foo'",
|
||||
'Dummy migration was run, even though an unfulfillable migration was found.'
|
||||
);
|
||||
|
||||
$this->db_tools->sql_column_remove('\phpbb\config\config', 'extra_column');
|
||||
$this->db_tools->sql_column_remove('phpbb_config', 'extra_column');
|
||||
}
|
||||
|
||||
public function test_if()
|
||||
@@ -192,7 +192,7 @@ class phpbb_dbal_migrator_test extends phpbb_database_test_case
|
||||
|
||||
$this->assertSqlResultEquals(
|
||||
array(array('bar_column' => '1')),
|
||||
"SELECT bar_column FROM \phpbb\config\config WHERE config_name = 'foo'",
|
||||
"SELECT bar_column FROM phpbb_config WHERE config_name = 'foo'",
|
||||
'Installing revert migration failed to create bar_column.'
|
||||
);
|
||||
|
||||
@@ -208,7 +208,7 @@ class phpbb_dbal_migrator_test extends phpbb_database_test_case
|
||||
|
||||
$this->assertFalse(isset($this->config['foobartest']));
|
||||
|
||||
$sql = 'SELECT * FROM \phpbb\config\config';
|
||||
$sql = 'SELECT * FROM phpbb_config';
|
||||
$result = $this->db->sql_query_limit($sql, 1);
|
||||
$row = $this->db->sql_fetchrow($result);
|
||||
$this->db->sql_freeresult($result);
|
||||
@@ -237,7 +237,7 @@ class phpbb_dbal_migrator_test extends phpbb_database_test_case
|
||||
// Failure should have caused an automatic roll-back, so this should not exist.
|
||||
$this->assertFalse(isset($this->config['foobar3']));
|
||||
|
||||
$sql = 'SELECT * FROM \phpbb\config\config';
|
||||
$sql = 'SELECT * FROM phpbb_config';
|
||||
$result = $this->db->sql_query_limit($sql, 1);
|
||||
$row = $this->db->sql_fetchrow($result);
|
||||
$this->db->sql_freeresult($result);
|
||||
|
Reference in New Issue
Block a user