aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/test_framework/phpbb_database_connection_helper.php4
-rw-r--r--tests/test_framework/phpbb_database_test_connection_manager.php9
2 files changed, 5 insertions, 8 deletions
diff --git a/tests/test_framework/phpbb_database_connection_helper.php b/tests/test_framework/phpbb_database_connection_helper.php
index 6ba527b5d9..fbb85784f8 100644
--- a/tests/test_framework/phpbb_database_connection_helper.php
+++ b/tests/test_framework/phpbb_database_connection_helper.php
@@ -16,10 +16,10 @@
*/
class phpbb_database_connection_ODBC_PDO_wrapper extends PDO
{
- //Name of the driver being used (i.e. mssql, firebird)
+ // Name of the driver being used (i.e. mssql, firebird)
public $driver = '';
- //Version number of driver since PDO::getAttribute(PDO::ATTR_CLIENT_VERSION) is pretty useless for this
+ // Version number of driver since PDO::getAttribute(PDO::ATTR_CLIENT_VERSION) is pretty useless for this
public $version = 0;
function __construct($dbms, $version, $dsn, $user, $pass)
diff --git a/tests/test_framework/phpbb_database_test_connection_manager.php b/tests/test_framework/phpbb_database_test_connection_manager.php
index 6e3f602ab7..2334e08f78 100644
--- a/tests/test_framework/phpbb_database_test_connection_manager.php
+++ b/tests/test_framework/phpbb_database_test_connection_manager.php
@@ -8,7 +8,7 @@
*/
require_once dirname(__FILE__) . '/../../phpBB/includes/functions_install.php';
-require_once 'phpbb_database_connection_helper.php';
+require_once dirname(__FILE__) . '/phpbb_database_connection_helper.php';
class phpbb_database_test_connection_manager
{
@@ -86,12 +86,9 @@ class phpbb_database_test_connection_manager
//These require different connection strings on the phpBB side than they do in PDO
//so you must provide a DSN string for ODBC separately
- if ($this->config['dbms'] == 'mssql' || $this->config['dbms'] == 'firebird')
+ if (!empty($this->config['custom_dsn']) && ($this->config['dbms'] == 'mssql' || $this->config['dbms'] == 'firebird'))
{
- if (!empty($this->config['custom_dsn']))
- {
- $dsn = 'odbc:' . $this->config['custom_dsn'];
- }
+ $dsn = 'odbc:' . $this->config['custom_dsn'];
}
try