From 794726a464452a6056d8a2ba06c4394767d4c497 Mon Sep 17 00:00:00 2001 From: Mate Bartus Date: Wed, 8 Jul 2015 18:08:50 +0200 Subject: [ticket/13740] Fix database test PHPBB3-13740 --- tests/installer/database_helper_test.php | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'tests/installer') diff --git a/tests/installer/database_helper_test.php b/tests/installer/database_helper_test.php index 84445c86c5..d2ebe76ad5 100644 --- a/tests/installer/database_helper_test.php +++ b/tests/installer/database_helper_test.php @@ -18,11 +18,6 @@ class phpbb_installer_database_helper_test extends phpbb_test_case */ private $database_helper; - /** - * @var phpbb\db\driver\driver_interface - */ - private $dbms_mock; - public function setUp() { $filesystem = new \phpbb\filesystem\filesystem(); @@ -61,7 +56,7 @@ class phpbb_installer_database_helper_test extends phpbb_test_case */ public function test_validate_table_prefix($expected, $test_string) { - $this->assertEquals($expected, $this->database_helper->validate_table_prefix('oracle', $test_string)); + $this->assertEquals($expected, $this->database_helper->validate_table_prefix('sqlite3', $test_string)); } // Data provider for the remove comments function @@ -97,7 +92,7 @@ class phpbb_installer_database_helper_test extends phpbb_test_case 'SELECT * FROM table', ), 'abcd "efgh"' . "\n" . - 'qwerty' . "\n" . + 'qwerty;' . "\n" . 'SELECT * FROM table', ';', ), @@ -130,9 +125,16 @@ class phpbb_installer_database_helper_test extends phpbb_test_case ), array( array( - array('title' => 'INST_ERR_PREFIX_TOO_LONG'), + array('title' => array('INST_ERR_PREFIX_TOO_LONG', 200)), + ), + 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + ), + array( + array( + array('title' => 'INST_ERR_DB_INVALID_PREFIX'), + array('title' => array('INST_ERR_PREFIX_TOO_LONG', 200)), ), - 'php_bb_', + '_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', ), ); } -- cgit v1.2.1