aboutsummaryrefslogtreecommitdiffstats
path: root/tests/dbal/db_tools_test.php
diff options
context:
space:
mode:
authorPatrick Webster <noxwizard@phpbb.com>2014-06-15 14:18:39 -0500
committerPatrick Webster <noxwizard@phpbb.com>2014-06-15 14:18:39 -0500
commite6a8df7f7ea2036ae9943368ad1ea2cee7cd5655 (patch)
tree70e3c344e5320970cb105a77bf57761faf5b1e65 /tests/dbal/db_tools_test.php
parent2dc389c936eb22fbb3e74b86c51501059fd5c1a6 (diff)
downloadforums-e6a8df7f7ea2036ae9943368ad1ea2cee7cd5655.tar
forums-e6a8df7f7ea2036ae9943368ad1ea2cee7cd5655.tar.gz
forums-e6a8df7f7ea2036ae9943368ad1ea2cee7cd5655.tar.bz2
forums-e6a8df7f7ea2036ae9943368ad1ea2cee7cd5655.tar.xz
forums-e6a8df7f7ea2036ae9943368ad1ea2cee7cd5655.zip
[ticket/12643] Tests dropping similarly named columns
PHPBB3-12643
Diffstat (limited to 'tests/dbal/db_tools_test.php')
-rw-r--r--tests/dbal/db_tools_test.php11
1 files changed, 11 insertions, 0 deletions
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