mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
[ticket/14178] Fix installer's database helper test
PHPBB3-14178
This commit is contained in:
parent
eab8a12fb8
commit
635b5999b9
1 changed files with 17 additions and 1 deletions
|
@ -56,7 +56,23 @@ class phpbb_installer_database_helper_test extends phpbb_test_case
|
||||||
*/
|
*/
|
||||||
public function test_validate_table_prefix($expected, $test_string)
|
public function test_validate_table_prefix($expected, $test_string)
|
||||||
{
|
{
|
||||||
$this->assertEquals($expected, $this->database_helper->validate_table_prefix('sqlite3', $test_string));
|
$db_helper_mock = $this->getMockBuilder('\phpbb\install\helper\database')
|
||||||
|
->setMethods(array('get_available_dbms'))
|
||||||
|
->disableOriginalConstructor()
|
||||||
|
->getMock();
|
||||||
|
|
||||||
|
$db_helper_mock->method('get_available_dbms')
|
||||||
|
->willReturn(array('sqlite3' => array(
|
||||||
|
'LABEL' => 'SQLite3',
|
||||||
|
'SCHEMA' => 'sqlite',
|
||||||
|
'MODULE' => 'sqlite3',
|
||||||
|
'DELIM' => ';',
|
||||||
|
'DRIVER' => 'phpbb\db\driver\sqlite3',
|
||||||
|
'AVAILABLE' => true,
|
||||||
|
'2.0.x' => false,
|
||||||
|
)));
|
||||||
|
|
||||||
|
$this->assertEquals($expected, $db_helper_mock->validate_table_prefix('sqlite3', $test_string));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Data provider for the remove comments function
|
// Data provider for the remove comments function
|
||||||
|
|
Loading…
Add table
Reference in a new issue