aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_framework/phpbb_database_test_case.php
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2011-11-18 19:14:06 +0100
committerNils Adermann <naderman@naderman.de>2011-11-18 19:14:06 +0100
commitaddf81f62e69e23b4f31fc48997ac38683b88ebf (patch)
tree4078d3786e8c84f253aa80a73214c2d5ad2de00a /tests/test_framework/phpbb_database_test_case.php
parent5068c0588733f80a8433aea1cd6f763819caa9f7 (diff)
parent03918f7fd2fd790d5ebd4330f9f913bfcc206f91 (diff)
downloadforums-addf81f62e69e23b4f31fc48997ac38683b88ebf.tar
forums-addf81f62e69e23b4f31fc48997ac38683b88ebf.tar.gz
forums-addf81f62e69e23b4f31fc48997ac38683b88ebf.tar.bz2
forums-addf81f62e69e23b4f31fc48997ac38683b88ebf.tar.xz
forums-addf81f62e69e23b4f31fc48997ac38683b88ebf.zip
Merge branch 'develop' into feature/extension-manager
* develop: (93 commits) [ticket/10157] Add notification to update cpfs when installing a language. [ticket/10185] Always set board startdate on conversion [ticket/10419] Reword the language strings [ticket/9361] View correct error messages when editing account information [ticket/10457] Undefined variable $request, when print-viewing PMs [ticket/10452] Fix xHTML errors when print-viewing PMs [ticket/9066] Move regex into get_preg_expression function and add tests [ticket/10254] Add "phpBB Group" to "Modified by" in prosilver stylesheet.css [ticket/10254] Removing the subsilver2 NOTE, incompatible with phpBB.com. [ticket/10254] Removing the NOTE as it is incompatible with phpBB.com. [ticket/10254] Remove subsilver2 as default style on theme. [ticket/10254] Remove style names from themes and fix some informations on it. [ticket/7138] Allow simple header and footer for trigger_error() messages [ticket/9066] Disallow some database prefix to prevent same errors and problems [ticket/10365] Fix up S_POST_UNAPPROVED check, make it easier to read [ticket/10437] Do not display announcements that are waiting for approval [ticket/10087] Organize bans in acp_baninto optgroups [ticket/8616] Include old U_INBOX var for BC [ticket/10435] Remove global announcement from forums total topic count [ticket/10435] Readd local announcements to total topic count in viewforum ... Conflicts: phpBB/install/database_update.php
Diffstat (limited to 'tests/test_framework/phpbb_database_test_case.php')
-rw-r--r--tests/test_framework/phpbb_database_test_case.php42
1 files changed, 5 insertions, 37 deletions
diff --git a/tests/test_framework/phpbb_database_test_case.php b/tests/test_framework/phpbb_database_test_case.php
index e1b368dcea..b1484450b8 100644
--- a/tests/test_framework/phpbb_database_test_case.php
+++ b/tests/test_framework/phpbb_database_test_case.php
@@ -40,46 +40,14 @@ abstract class phpbb_database_test_case extends PHPUnit_Extensions_Database_Test
public function get_database_config()
{
- if (isset($_SERVER['PHPBB_TEST_DBMS']))
- {
- return array(
- 'dbms' => isset($_SERVER['PHPBB_TEST_DBMS']) ? $_SERVER['PHPBB_TEST_DBMS'] : '',
- 'dbhost' => isset($_SERVER['PHPBB_TEST_DBHOST']) ? $_SERVER['PHPBB_TEST_DBHOST'] : '',
- 'dbport' => isset($_SERVER['PHPBB_TEST_DBPORT']) ? $_SERVER['PHPBB_TEST_DBPORT'] : '',
- 'dbname' => isset($_SERVER['PHPBB_TEST_DBNAME']) ? $_SERVER['PHPBB_TEST_DBNAME'] : '',
- 'dbuser' => isset($_SERVER['PHPBB_TEST_DBUSER']) ? $_SERVER['PHPBB_TEST_DBUSER'] : '',
- 'dbpasswd' => isset($_SERVER['PHPBB_TEST_DBPASSWD']) ? $_SERVER['PHPBB_TEST_DBPASSWD'] : '',
- );
- }
- else if (file_exists(dirname(__FILE__) . '/../test_config.php'))
- {
- include(dirname(__FILE__) . '/../test_config.php');
-
- return array(
- 'dbms' => $dbms,
- 'dbhost' => $dbhost,
- 'dbport' => $dbport,
- 'dbname' => $dbname,
- 'dbuser' => $dbuser,
- 'dbpasswd' => $dbpasswd,
- );
- }
- else if (extension_loaded('sqlite') && version_compare(PHPUnit_Runner_Version::id(), '3.4.15', '>='))
- {
- // Silently use sqlite
- return array(
- 'dbms' => 'sqlite',
- 'dbhost' => dirname(__FILE__) . '/../phpbb_unit_tests.sqlite2', // filename
- 'dbport' => '',
- 'dbname' => '',
- 'dbuser' => '',
- 'dbpasswd' => '',
- );
- }
- else
+ $config = phpbb_test_case_helpers::get_test_config();
+
+ if (!isset($config['dbms']))
{
$this->markTestSkipped('Missing test_config.php: See first error.');
}
+
+ return $config;
}
public function getConnection()