mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
[ticket/10327] Use $this->tools instead of creating a new instance of db_tools.
PHPBB3-10327
This commit is contained in:
parent
7e18d2b861
commit
607761e830
1 changed files with 3 additions and 10 deletions
|
@ -336,19 +336,12 @@ class phpbb_dbal_db_tools_test extends phpbb_database_test_case
|
||||||
|
|
||||||
public function test_index_exists()
|
public function test_index_exists()
|
||||||
{
|
{
|
||||||
$db_tools = new phpbb_db_tools($this->db);
|
$this->assertTrue($this->tools->sql_index_exists('prefix_table_name', 'i_simple'));
|
||||||
|
|
||||||
$this->assertTrue($db_tools->sql_index_exists('prefix_table_name', 'i_simple'));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function test_create_index_against_index_exists()
|
public function test_create_index_against_index_exists()
|
||||||
{
|
{
|
||||||
$db_tools = new phpbb_db_tools($this->db);
|
$this->tools->sql_create_index('prefix_table_name', 'fookey', array('c_timestamp', 'c_decimal'));
|
||||||
|
$this->assertTrue($this->tools->sql_index_exists('prefix_table_name', 'fookey'));
|
||||||
$table_name = 'prefix_table_name';
|
|
||||||
$index_name = 'fookey';
|
|
||||||
|
|
||||||
$db_tools->sql_create_index($table_name, $index_name, array('c_timestamp', 'c_decimal'));
|
|
||||||
$this->assertTrue($db_tools->sql_index_exists($table_name, $index_name));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue