aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2011-07-03 18:09:56 -0400
committerNils Adermann <naderman@naderman.de>2011-07-03 18:09:56 -0400
commit96eab49a7a5d803fcc121fe5490b2484c6499d40 (patch)
tree3fab9245d6d1834adbf226cfb5e23dc31725d5f8
parent984fd07319d9c9dbd8af7298a94e08132e790f98 (diff)
downloadforums-96eab49a7a5d803fcc121fe5490b2484c6499d40.tar
forums-96eab49a7a5d803fcc121fe5490b2484c6499d40.tar.gz
forums-96eab49a7a5d803fcc121fe5490b2484c6499d40.tar.bz2
forums-96eab49a7a5d803fcc121fe5490b2484c6499d40.tar.xz
forums-96eab49a7a5d803fcc121fe5490b2484c6499d40.zip
[ticket/10247] Add a db_tools test for the removal of a primary key column.
The previous drop column test already deleted the primary key, so that one was replaced with an ordinary column. PHPBB3-10247
-rw-r--r--tests/dbal/db_tools_test.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/dbal/db_tools_test.php b/tests/dbal/db_tools_test.php
index eb2af4c4cc..ddea500f83 100644
--- a/tests/dbal/db_tools_test.php
+++ b/tests/dbal/db_tools_test.php
@@ -242,6 +242,15 @@ class phpbb_dbal_db_tools_test extends phpbb_database_test_case
public function test_column_remove()
{
+ $this->assertTrue($this->tools->sql_column_exists('prefix_table_name', 'c_int_size'));
+
+ $this->assertTrue($this->tools->sql_column_remove('prefix_table_name', 'c_int_size'));
+
+ $this->assertFalse($this->tools->sql_column_exists('prefix_table_name', 'c_int_size'));
+ }
+
+ public function test_column_remove_primary()
+ {
$this->assertTrue($this->tools->sql_column_exists('prefix_table_name', 'c_id'));
$this->assertTrue($this->tools->sql_column_remove('prefix_table_name', 'c_id'));
@@ -264,5 +273,4 @@ class phpbb_dbal_db_tools_test extends phpbb_database_test_case
$this->tools->sql_table_drop('prefix_test_table');
}
-
}