aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Webster <noxwizard@phpbb.com>2012-03-04 17:19:33 -0600
committerPatrick Webster <noxwizard@phpbb.com>2012-05-08 04:31:30 -0500
commit0a596c4b8c4d003d0c8af79af65cb5264e9754fe (patch)
tree8cb0d505d715a30de22fe107ad247ba7a3297469
parent5cbe919256a0046a896a88c47b96276b6d7c05d0 (diff)
downloadforums-0a596c4b8c4d003d0c8af79af65cb5264e9754fe.tar
forums-0a596c4b8c4d003d0c8af79af65cb5264e9754fe.tar.gz
forums-0a596c4b8c4d003d0c8af79af65cb5264e9754fe.tar.bz2
forums-0a596c4b8c4d003d0c8af79af65cb5264e9754fe.tar.xz
forums-0a596c4b8c4d003d0c8af79af65cb5264e9754fe.zip
[ticket/10678] More formatting requests
PHPBB3-10678
-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