aboutsummaryrefslogtreecommitdiffstats
path: root/tests/dbal/db_tools_test.php
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2011-10-14 17:20:51 +0200
committerAndreas Fischer <bantu@phpbb.com>2011-10-14 17:23:29 +0200
commit607761e8303f456929e4755d8fabb69d9d16561a (patch)
treed5c7bdd06feb2cb4b4ba2fb94b33469aa9bfb943 /tests/dbal/db_tools_test.php
parent7e18d2b861826f399805656143fbdb940f302221 (diff)
downloadforums-607761e8303f456929e4755d8fabb69d9d16561a.tar
forums-607761e8303f456929e4755d8fabb69d9d16561a.tar.gz
forums-607761e8303f456929e4755d8fabb69d9d16561a.tar.bz2
forums-607761e8303f456929e4755d8fabb69d9d16561a.tar.xz
forums-607761e8303f456929e4755d8fabb69d9d16561a.zip
[ticket/10327] Use $this->tools instead of creating a new instance of db_tools.
PHPBB3-10327
Diffstat (limited to 'tests/dbal/db_tools_test.php')
-rw-r--r--tests/dbal/db_tools_test.php13
1 files changed, 3 insertions, 10 deletions
diff --git a/tests/dbal/db_tools_test.php b/tests/dbal/db_tools_test.php
index 927bce4597..daf464d600 100644
--- a/tests/dbal/db_tools_test.php
+++ b/tests/dbal/db_tools_test.php
@@ -336,19 +336,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'));
}
}