From 96eab49a7a5d803fcc121fe5490b2484c6499d40 Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Sun, 3 Jul 2011 18:09:56 -0400 Subject: [PATCH] [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 --- tests/dbal/db_tools_test.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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 @@ -241,6 +241,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')); @@ -264,5 +273,4 @@ class phpbb_dbal_db_tools_test extends phpbb_database_test_case $this->tools->sql_table_drop('prefix_test_table'); } - }