aboutsummaryrefslogtreecommitdiffstats
path: root/tests/installer/database_helper_test.php
diff options
context:
space:
mode:
authorMate Bartus <mate.bartus@gmail.com>2015-07-08 13:17:42 +0200
committerMate Bartus <mate.bartus@gmail.com>2015-07-08 16:25:30 +0200
commit1c01252b5d899c488e007659234b6224ac3f4c19 (patch)
tree3e2efbe676c75d237aefafccb0e77f2767e47ca8 /tests/installer/database_helper_test.php
parent612eead5a9932d459d8b65f9217f895c33b51c39 (diff)
downloadforums-1c01252b5d899c488e007659234b6224ac3f4c19.tar
forums-1c01252b5d899c488e007659234b6224ac3f4c19.tar.gz
forums-1c01252b5d899c488e007659234b6224ac3f4c19.tar.bz2
forums-1c01252b5d899c488e007659234b6224ac3f4c19.tar.xz
forums-1c01252b5d899c488e007659234b6224ac3f4c19.zip
[ticket/13740] Fix test stubs
PHPBB3-13740
Diffstat (limited to 'tests/installer/database_helper_test.php')
-rw-r--r--tests/installer/database_helper_test.php20
1 files changed, 4 insertions, 16 deletions
diff --git a/tests/installer/database_helper_test.php b/tests/installer/database_helper_test.php
index 80c76c004b..84445c86c5 100644
--- a/tests/installer/database_helper_test.php
+++ b/tests/installer/database_helper_test.php
@@ -28,10 +28,6 @@ class phpbb_installer_database_helper_test extends phpbb_test_case
$filesystem = new \phpbb\filesystem\filesystem();
$phpbb_root_path = '';
$this->database_helper = new \phpbb\install\helper\database($filesystem, $phpbb_root_path);
-
- // I used oracle because it tolerates the shortest table prefixes
- // so it's the simplest to write test cases for
- $this->dbms_mock = $this->getMock('\phpbb\db\driver\oracle');
}
/**
@@ -65,7 +61,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($this->dbms_mock, $test_string));
+ $this->assertEquals($expected, $this->database_helper->validate_table_prefix('oracle', $test_string));
}
// Data provider for the remove comments function
@@ -100,17 +96,9 @@ class phpbb_installer_database_helper_test extends phpbb_test_case
'abcd "efgh"' . "\n" . 'qwerty',
'SELECT * FROM table',
),
- 'abcd "efgh"
- qwerty;
- SELECT * FROM table',
- ';',
- ),
- array(
- array(
- 'SELECT * FROM table1',
- 'SELECT * FROM table2 WHERE i_am="king"',
- ),
- 'SELECT * FROM table1; SELECT * FROM table2 WHERE i_am="king"',
+ 'abcd "efgh"' . "\n" .
+ 'qwerty' . "\n" .
+ 'SELECT * FROM table',
';',
),
);