aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_framework/phpbb_database_test_connection_manager.php
diff options
context:
space:
mode:
authorPatrick Webster <noxwizard@phpbb.com>2012-12-05 22:57:06 -0600
committerPatrick Webster <noxwizard@phpbb.com>2012-12-05 22:57:06 -0600
commitdbb54b217b4d0c0669a566f9c950e8331887d276 (patch)
treea40ce20f624df31f2f8e29866df1ac1c85b04dd2 /tests/test_framework/phpbb_database_test_connection_manager.php
parent720ef233b122d00ef9d2128c9a0a518ff017b0d7 (diff)
downloadforums-dbb54b217b4d0c0669a566f9c950e8331887d276.tar
forums-dbb54b217b4d0c0669a566f9c950e8331887d276.tar.gz
forums-dbb54b217b4d0c0669a566f9c950e8331887d276.tar.bz2
forums-dbb54b217b4d0c0669a566f9c950e8331887d276.tar.xz
forums-dbb54b217b4d0c0669a566f9c950e8331887d276.zip
[ticket/11219] Coding guidelines and naming consistency changes
PHPBB3-11219
Diffstat (limited to 'tests/test_framework/phpbb_database_test_connection_manager.php')
-rw-r--r--tests/test_framework/phpbb_database_test_connection_manager.php24
1 files changed, 13 insertions, 11 deletions
diff --git a/tests/test_framework/phpbb_database_test_connection_manager.php b/tests/test_framework/phpbb_database_test_connection_manager.php
index 97281a0812..d7c2804aa7 100644
--- a/tests/test_framework/phpbb_database_test_connection_manager.php
+++ b/tests/test_framework/phpbb_database_test_connection_manager.php
@@ -430,17 +430,17 @@ class phpbb_database_test_connection_manager
/**
* Performs synchronisations on the database after a fixture has been loaded
*
- * @param PHPUnit_Extensions_Database_DataSet_XmlDataSet $tables Tables contained within the loaded fixture
+ * @param PHPUnit_Extensions_Database_DataSet_XmlDataSet $xml_data_set Information about the tables contained within the loaded fixture
*
* @return null
*/
- public function post_setup_synchronisation($xmlDataSet)
+ public function post_setup_synchronisation($xml_data_set)
{
$this->ensure_connected(__METHOD__);
$queries = array();
// Get escaped versions of the table names used in the fixture
- $table_names = array_map(array($this->pdo, 'PDO::quote'), $xmlDataSet->getTableNames());
+ $table_names = array_map(array($this->pdo, 'PDO::quote'), $xml_data_set->getTableNames());
switch ($this->config['dbms'])
{
@@ -469,18 +469,20 @@ class phpbb_database_test_connection_manager
continue;
}
- $maxval = (int)$max_row['MAX'];
- $maxval++;
+ $max_val = (int) $max_row['MAX'];
+ $max_val++;
- // This is not the "proper" way, but the proper way does not allow you to completely reset
- // tables with no rows since you have to select the next value to make the change go into effct.
- // You would have to go past the minimum value to set it correctly, but that's illegal.
- // Since we have no objects attached to our sequencers (triggers aren't attached), this works fine.
+ /**
+ * This is not the "proper" way, but the proper way does not allow you to completely reset
+ * tables with no rows since you have to select the next value to make the change go into effect.
+ * You would have to go past the minimum value to set it correctly, but that's illegal.
+ * Since we have no objects attached to our sequencers (triggers aren't attached), this works fine.
+ */
$queries[] = 'DROP SEQUENCE ' . $row['SEQUENCE_NAME'];
$queries[] = "CREATE SEQUENCE {$row['SEQUENCE_NAME']}
MINVALUE {$row['MIN_VALUE']}
INCREMENT BY {$row['INCREMENT_BY']}
- START WITH $maxval";
+ START WITH $max_val";
}
break;
@@ -495,7 +497,7 @@ class phpbb_database_test_connection_manager
while ($row = $result->fetch(PDO::FETCH_ASSOC))
{
// Get the columns used in the fixture for this table
- $column_names = $xmlDataSet->getTableMetaData($row['table_name'])->getColumns();
+ $column_names = $xml_data_set->getTableMetaData($row['table_name'])->getColumns();
// Skip sequences that weren't specified in the fixture
if (!in_array($row['column_name'], $column_names))