mirror of
https://github.com/phpbb/phpbb.git
synced 2025-01-17 22:28:46 +01:00
[feature/dbal-tests] Fix mysql (not mysqli) dbal test.
Correctly determine MySQL version from the database.
This commit is contained in:
parent
2bbfa9c29f
commit
e9de68f9a3
@ -126,8 +126,9 @@ abstract class phpbb_database_test_case extends PHPUnit_Extensions_Database_Test
|
||||
|
||||
if ($database_config['dbms'] == 'mysql')
|
||||
{
|
||||
$pdo->exec('SELECT VERSION() AS version');
|
||||
$sth = $pdo->query('SELECT VERSION() AS version');
|
||||
$row = $sth->fetch(PDO::FETCH_ASSOC);
|
||||
|
||||
if (version_compare($row['version'], '4.1.3', '>='))
|
||||
{
|
||||
$dbms_data['SCHEMA'] .= '_41';
|
||||
@ -136,7 +137,8 @@ abstract class phpbb_database_test_case extends PHPUnit_Extensions_Database_Test
|
||||
{
|
||||
$dbms_data['SCHEMA'] .= '_40';
|
||||
}
|
||||
unset($row);
|
||||
|
||||
unset($row, $sth);
|
||||
}
|
||||
|
||||
$sql_query = $this->split_sql_file(file_get_contents("../phpBB/install/schemas/{$dbms_data['SCHEMA']}_schema.sql"), $dbms_data['DELIM']);
|
||||
|
Loading…
x
Reference in New Issue
Block a user