aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_framework
diff options
context:
space:
mode:
authorPatrick Webster <noxwizard@phpbb.com>2012-04-02 05:57:48 -0500
committerPatrick Webster <noxwizard@phpbb.com>2012-05-08 04:31:31 -0500
commit9bb2785da0c84bcc4a95f737b7da14c58c5d4380 (patch)
treeb39f211715fcd3ad68af7fc4355222ac08ff1118 /tests/test_framework
parent0a596c4b8c4d003d0c8af79af65cb5264e9754fe (diff)
downloadforums-9bb2785da0c84bcc4a95f737b7da14c58c5d4380.tar
forums-9bb2785da0c84bcc4a95f737b7da14c58c5d4380.tar.gz
forums-9bb2785da0c84bcc4a95f737b7da14c58c5d4380.tar.bz2
forums-9bb2785da0c84bcc4a95f737b7da14c58c5d4380.tar.xz
forums-9bb2785da0c84bcc4a95f737b7da14c58c5d4380.zip
[ticket/10678] More formatting and docblocks
PHPBB3-10678
Diffstat (limited to 'tests/test_framework')
-rw-r--r--tests/test_framework/phpbb_database_test_case.php10
-rw-r--r--tests/test_framework/phpbb_database_test_connection_manager.php6
2 files changed, 12 insertions, 4 deletions
diff --git a/tests/test_framework/phpbb_database_test_case.php b/tests/test_framework/phpbb_database_test_case.php
index b8be6a852a..53c3702aa6 100644
--- a/tests/test_framework/phpbb_database_test_case.php
+++ b/tests/test_framework/phpbb_database_test_case.php
@@ -32,7 +32,7 @@ abstract class phpbb_database_test_case extends PHPUnit_Extensions_Database_Test
{
$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')
{
$xml_data = file_get_contents($path);
@@ -129,6 +129,14 @@ abstract class phpbb_database_test_case extends PHPUnit_Extensions_Database_Test
return new phpbb_database_test_connection_manager($config);
}
+ /**
+ * Converts a match in the middle of a string to uppercase.
+ * This is necessary for tranforming the fixture information for Firebird tests
+ *
+ * @param $matches The array of matches from a regular expression
+ *
+ * @return string The string with the specified match converted to uppercase
+ */
public static function to_upper($matches)
{
return $matches[1] . strtoupper($matches[2]) . $matches[3];
diff --git a/tests/test_framework/phpbb_database_test_connection_manager.php b/tests/test_framework/phpbb_database_test_connection_manager.php
index 2334e08f78..3c4a112d0d 100644
--- a/tests/test_framework/phpbb_database_test_connection_manager.php
+++ b/tests/test_framework/phpbb_database_test_connection_manager.php
@@ -84,8 +84,8 @@ class phpbb_database_test_connection_manager
break;
}
- //These require different connection strings on the phpBB side than they do in PDO
- //so you must provide a DSN string for ODBC separately
+ // 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 (!empty($this->config['custom_dsn']) && ($this->config['dbms'] == 'mssql' || $this->config['dbms'] == 'firebird'))
{
$dsn = 'odbc:' . $this->config['custom_dsn'];
@@ -106,7 +106,7 @@ class phpbb_database_test_connection_manager
$this->pdo = new phpbb_database_connection_ODBC_PDO_wrapper('firebird', 0, $dsn, $this->config['dbuser'], $this->config['dbpasswd']);
break;
}
- //Fall through if they're using the firebird PDO driver and not the generic ODBC driver
+ // Fall through if they're using the firebird PDO driver and not the generic ODBC driver
default:
$this->pdo = new PDO($dsn, $this->config['dbuser'], $this->config['dbpasswd']);