diff options
author | Igor Wiedler <igor@wiedler.ch> | 2011-10-14 17:50:53 +0200 |
---|---|---|
committer | Igor Wiedler <igor@wiedler.ch> | 2011-10-14 17:50:53 +0200 |
commit | 99d6f00d514f77059384d88cace34faec3d09022 (patch) | |
tree | 6b9f5999d5f6d5cbe0200e64b53f80fd16e648e2 /tests | |
parent | 8a82ec95a56f70b7b5ea10cfe9e98574e5230195 (diff) | |
parent | cafefe9379059dd40a5e259c9bb36f07943c72c7 (diff) | |
download | forums-99d6f00d514f77059384d88cace34faec3d09022.tar forums-99d6f00d514f77059384d88cace34faec3d09022.tar.gz forums-99d6f00d514f77059384d88cace34faec3d09022.tar.bz2 forums-99d6f00d514f77059384d88cace34faec3d09022.tar.xz forums-99d6f00d514f77059384d88cace34faec3d09022.zip |
Merge branch 'develop-olympus' into develop
* develop-olympus:
[ticket/10327] Use $this->tools instead of creating a new instance of db_tools.
[ticket/10327] Also change CREATE UNIQUE INDEX to use ALTER TABLE.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/dbal/db_tools_test.php | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/tests/dbal/db_tools_test.php b/tests/dbal/db_tools_test.php index b34b471e5c..c0c66b5be7 100644 --- a/tests/dbal/db_tools_test.php +++ b/tests/dbal/db_tools_test.php @@ -351,19 +351,12 @@ class phpbb_dbal_db_tools_test extends phpbb_database_test_case public function test_index_exists() { - $db_tools = new phpbb_db_tools($this->db); - - $this->assertTrue($db_tools->sql_index_exists('prefix_table_name', 'i_simple')); + $this->assertTrue($this->tools->sql_index_exists('prefix_table_name', 'i_simple')); } public function test_create_index_against_index_exists() { - $db_tools = new phpbb_db_tools($this->db); - - $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)); + $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')); } } |