aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_framework
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2010-10-25 19:20:51 +0200
committerNils Adermann <naderman@naderman.de>2010-10-25 19:43:39 +0200
commitfa8dca2400f1bef5e3faa43e491a5e2c15eafe11 (patch)
tree915487e33eb06061473b15a1bffa0e13ae5a4df3 /tests/test_framework
parent9b4da986536e0bce0359d300df84fb03e265ef53 (diff)
downloadforums-fa8dca2400f1bef5e3faa43e491a5e2c15eafe11.tar
forums-fa8dca2400f1bef5e3faa43e491a5e2c15eafe11.tar.gz
forums-fa8dca2400f1bef5e3faa43e491a5e2c15eafe11.tar.bz2
forums-fa8dca2400f1bef5e3faa43e491a5e2c15eafe11.tar.xz
forums-fa8dca2400f1bef5e3faa43e491a5e2c15eafe11.zip
[task/mssql-db-tests] Split up database tests into SELECT and write operations
SELECT is based on the user table fixture, write (INSERT/UPDATE/DELETE) is tested using the config table fixture. PHPBB3-9868
Diffstat (limited to 'tests/test_framework')
-rw-r--r--tests/test_framework/phpbb_database_test_case.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/test_framework/phpbb_database_test_case.php b/tests/test_framework/phpbb_database_test_case.php
index de9a91fa45..a64bae8c57 100644
--- a/tests/test_framework/phpbb_database_test_case.php
+++ b/tests/test_framework/phpbb_database_test_case.php
@@ -9,6 +9,8 @@
abstract class phpbb_database_test_case extends PHPUnit_Extensions_Database_TestCase
{
+ private static $already_connected;
+
protected $test_case_helpers;
public function get_test_case_helpers()
@@ -333,23 +335,21 @@ abstract class phpbb_database_test_case extends PHPUnit_Extensions_Database_Test
public function getConnection()
{
- static $already_connected;
-
$config = $this->get_database_config();
$dbms = $this->get_dbms_data($config['dbms']);
- if (!$already_connected)
+ if (!self::$already_connected)
{
$this->recreate_db($config, $dbms);
}
$pdo = $this->new_pdo($config, $dbms, true);
- if (!$already_connected)
+ if (!self::$already_connected)
{
$this->load_schema($pdo, $config, $dbms);
- $already_connected = true;
+ self::$already_connected = true;
}
return $this->createDefaultDBConnection($pdo, 'testdb');