From e6a8df7f7ea2036ae9943368ad1ea2cee7cd5655 Mon Sep 17 00:00:00 2001 From: Patrick Webster Date: Sun, 15 Jun 2014 14:18:39 -0500 Subject: [PATCH] [ticket/12643] Tests dropping similarly named columns PHPBB3-12643 --- tests/dbal/db_tools_test.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/dbal/db_tools_test.php b/tests/dbal/db_tools_test.php index 320eac3bf3..7cf05a34d4 100644 --- a/tests/dbal/db_tools_test.php +++ b/tests/dbal/db_tools_test.php @@ -248,6 +248,17 @@ class phpbb_dbal_db_tools_test extends phpbb_database_test_case $this->assertFalse($this->tools->sql_column_exists('prefix_table_name', 'c_int_size')); } + public function test_column_remove_similar_name() + { + $this->assertTrue($this->tools->sql_column_exists('prefix_table_name', 'c_vchar')); + $this->assertTrue($this->tools->sql_column_exists('prefix_table_name', 'c_vchar_size')); + + $this->assertTrue($this->tools->sql_column_remove('prefix_table_name', 'c_vchar')); + + $this->assertFalse($this->tools->sql_column_exists('prefix_table_name', 'c_vchar')); + $this->assertTrue($this->tools->sql_column_exists('prefix_table_name', 'c_vchar_size')); + } + public function test_column_remove_with_index() { // Create column