From eb4594d8ee6a662f6e268a8d802c8a7110cd55c7 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Thu, 22 Jan 2015 23:17:59 +0100 Subject: [ticket/13282] Add unit test for adding integer column with default null PHPBB3-13282 --- tests/dbal/db_tools_test.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests/dbal/db_tools_test.php') diff --git a/tests/dbal/db_tools_test.php b/tests/dbal/db_tools_test.php index 51f9daacfb..5832b966d8 100644 --- a/tests/dbal/db_tools_test.php +++ b/tests/dbal/db_tools_test.php @@ -415,4 +415,11 @@ class phpbb_dbal_db_tools_test extends phpbb_database_test_case $this->tools->sql_create_unique_index('prefix_table_name', 'i_uniq_ts_id', array('c_timestamp', 'c_id')); $this->assertTrue($this->tools->sql_unique_index_exists('prefix_table_name', 'i_uniq_ts_id')); } + + public function test_create_int_default_null() + { + $this->assertFalse($this->tools->sql_column_exists('prefix_table_name', 'c_bug_13282')); + $this->assertTrue($this->tools->sql_column_add('prefix_table_name', 'c_bug_13282', array('TINT:2'))); + $this->assertTrue($this->tools->sql_column_exists('prefix_table_name', 'c_bug_13282')); + } } -- cgit v1.2.1