aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMate Bartus <mate.bartus@gmail.com>2015-07-08 18:08:50 +0200
committerMate Bartus <mate.bartus@gmail.com>2015-07-09 15:30:29 +0200
commit794726a464452a6056d8a2ba06c4394767d4c497 (patch)
treecf393490dbe3e161965df5018d525ffff2711fe2 /tests
parent1c01252b5d899c488e007659234b6224ac3f4c19 (diff)
downloadforums-794726a464452a6056d8a2ba06c4394767d4c497.tar
forums-794726a464452a6056d8a2ba06c4394767d4c497.tar.gz
forums-794726a464452a6056d8a2ba06c4394767d4c497.tar.bz2
forums-794726a464452a6056d8a2ba06c4394767d4c497.tar.xz
forums-794726a464452a6056d8a2ba06c4394767d4c497.zip
[ticket/13740] Fix database test
PHPBB3-13740
Diffstat (limited to 'tests')
-rw-r--r--tests/installer/database_helper_test.php20
1 files changed, 11 insertions, 9 deletions
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',
),
);
}