aboutsummaryrefslogtreecommitdiffstats
path: root/tests/dbal/db_tools_test.php
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2011-11-18 19:14:06 +0100
committerNils Adermann <naderman@naderman.de>2011-11-18 19:14:06 +0100
commitaddf81f62e69e23b4f31fc48997ac38683b88ebf (patch)
tree4078d3786e8c84f253aa80a73214c2d5ad2de00a /tests/dbal/db_tools_test.php
parent5068c0588733f80a8433aea1cd6f763819caa9f7 (diff)
parent03918f7fd2fd790d5ebd4330f9f913bfcc206f91 (diff)
downloadforums-addf81f62e69e23b4f31fc48997ac38683b88ebf.tar
forums-addf81f62e69e23b4f31fc48997ac38683b88ebf.tar.gz
forums-addf81f62e69e23b4f31fc48997ac38683b88ebf.tar.bz2
forums-addf81f62e69e23b4f31fc48997ac38683b88ebf.tar.xz
forums-addf81f62e69e23b4f31fc48997ac38683b88ebf.zip
Merge branch 'develop' into feature/extension-manager
* develop: (93 commits) [ticket/10157] Add notification to update cpfs when installing a language. [ticket/10185] Always set board startdate on conversion [ticket/10419] Reword the language strings [ticket/9361] View correct error messages when editing account information [ticket/10457] Undefined variable $request, when print-viewing PMs [ticket/10452] Fix xHTML errors when print-viewing PMs [ticket/9066] Move regex into get_preg_expression function and add tests [ticket/10254] Add "phpBB Group" to "Modified by" in prosilver stylesheet.css [ticket/10254] Removing the subsilver2 NOTE, incompatible with phpBB.com. [ticket/10254] Removing the NOTE as it is incompatible with phpBB.com. [ticket/10254] Remove subsilver2 as default style on theme. [ticket/10254] Remove style names from themes and fix some informations on it. [ticket/7138] Allow simple header and footer for trigger_error() messages [ticket/9066] Disallow some database prefix to prevent same errors and problems [ticket/10365] Fix up S_POST_UNAPPROVED check, make it easier to read [ticket/10437] Do not display announcements that are waiting for approval [ticket/10087] Organize bans in acp_baninto optgroups [ticket/8616] Include old U_INBOX var for BC [ticket/10435] Remove global announcement from forums total topic count [ticket/10435] Readd local announcements to total topic count in viewforum ... Conflicts: phpBB/install/database_update.php
Diffstat (limited to 'tests/dbal/db_tools_test.php')
-rw-r--r--tests/dbal/db_tools_test.php26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/dbal/db_tools_test.php b/tests/dbal/db_tools_test.php
index 753cc08fc5..c0c66b5be7 100644
--- a/tests/dbal/db_tools_test.php
+++ b/tests/dbal/db_tools_test.php
@@ -234,6 +234,14 @@ class phpbb_dbal_db_tools_test extends phpbb_database_test_case
$this->assertEquals($row2, $row_actual);
}
+ public function test_list_columns()
+ {
+ $this->assertEquals(
+ array_keys($this->table_data['COLUMNS']),
+ array_values($this->tools->sql_list_columns('prefix_table_name'))
+ );
+ }
+
public function test_column_exists()
{
$this->assertTrue($this->tools->sql_column_exists('prefix_table_name', 'c_id'));
@@ -258,6 +266,13 @@ class phpbb_dbal_db_tools_test extends phpbb_database_test_case
$this->assertFalse($this->tools->sql_column_exists('prefix_table_name', 'c_id'));
}
+ public function test_list_tables()
+ {
+ $tables = $this->tools->sql_list_tables();
+ $this->assertTrue(isset($tables['prefix_table_name']));
+ $this->assertFalse(isset($tables['prefix_does_not_exist']));
+ }
+
public function test_table_exists()
{
$this->assertTrue($this->tools->sql_table_exists('prefix_table_name'));
@@ -333,4 +348,15 @@ class phpbb_dbal_db_tools_test extends phpbb_database_test_case
),
));
}
+
+ public function test_index_exists()
+ {
+ $this->assertTrue($this->tools->sql_index_exists('prefix_table_name', 'i_simple'));
+ }
+
+ public function test_create_index_against_index_exists()
+ {
+ $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'));
+ }
}