1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-06-23 03:25:18 +02:00

[ticket/10678] Fix formatting

PHPBB3-10678
This commit is contained in:
Patrick Webster
2012-02-28 13:47:15 -06:00
parent d578eff712
commit 5cbe919256
3 changed files with 15 additions and 7 deletions

View File

@ -1,4 +1,12 @@
<?php <?php
/**
*
* @package testing
* @copyright (c) 2011 phpBB Group
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
/** /**
* Used for passing in information about the PDO driver * Used for passing in information about the PDO driver
* since the PDO class reveals nothing about the DSN that * since the PDO class reveals nothing about the DSN that
@ -21,4 +29,4 @@ class phpbb_database_connection_ODBC_PDO_wrapper extends PDO
parent::__construct($dsn, $user, $pass); parent::__construct($dsn, $user, $pass);
} }
} }

View File

@ -33,7 +33,7 @@ abstract class phpbb_database_test_case extends PHPUnit_Extensions_Database_Test
$db_config = $this->get_database_config(); $db_config = $this->get_database_config();
//Firebird requires table and column names to be uppercase //Firebird requires table and column names to be uppercase
if($db_config['dbms'] == 'firebird') if ($db_config['dbms'] == 'firebird')
{ {
$xml_data = file_get_contents($path); $xml_data = file_get_contents($path);
$xml_data = preg_replace_callback('/(?:(<table name="))([a-z_]+)(?:(">))/', 'phpbb_database_test_case::to_upper', $xml_data); $xml_data = preg_replace_callback('/(?:(<table name="))([a-z_]+)(?:(">))/', 'phpbb_database_test_case::to_upper', $xml_data);

View File

@ -86,9 +86,9 @@ class phpbb_database_test_connection_manager
//These require different connection strings on the phpBB side than they do in PDO //These require different connection strings on the phpBB side than they do in PDO
//so you must provide a DSN string for ODBC separately //so you must provide a DSN string for ODBC separately
if($this->config['dbms'] == 'mssql' || $this->config['dbms'] == 'firebird') if ($this->config['dbms'] == 'mssql' || $this->config['dbms'] == 'firebird')
{ {
if(!empty($this->config['custom_dsn'])) if (!empty($this->config['custom_dsn']))
{ {
$dsn = 'odbc:' . $this->config['custom_dsn']; $dsn = 'odbc:' . $this->config['custom_dsn'];
} }
@ -96,7 +96,7 @@ class phpbb_database_test_connection_manager
try try
{ {
switch($this->config['dbms']) switch ($this->config['dbms'])
{ {
case 'mssql': case 'mssql':
case 'mssql_odbc': case 'mssql_odbc':
@ -104,7 +104,7 @@ class phpbb_database_test_connection_manager
break; break;
case 'firebird': case 'firebird':
if(!empty($this->config['custom_dsn'])) if (!empty($this->config['custom_dsn']))
{ {
$this->pdo = new phpbb_database_connection_ODBC_PDO_wrapper('firebird', 0, $dsn, $this->config['dbuser'], $this->config['dbpasswd']); $this->pdo = new phpbb_database_connection_ODBC_PDO_wrapper('firebird', 0, $dsn, $this->config['dbuser'], $this->config['dbpasswd']);
break; break;
@ -408,7 +408,7 @@ class phpbb_database_test_connection_manager
break; break;
} }
foreach($queries as $query) foreach ($queries as $query)
{ {
$this->pdo->exec($query); $this->pdo->exec($query);
} }