aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_framework/phpbb_functional_test_case.php
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2012-12-14 01:50:22 +0100
committerAndreas Fischer <bantu@phpbb.com>2012-12-14 01:50:22 +0100
commitb5142296b182a4bf0d552aac565d90aa0befd07a (patch)
tree55693645b3899359e363f8ddf0673bf0bf49257d /tests/test_framework/phpbb_functional_test_case.php
parent93222cf396192cc4e2d9a4dc741c60efda21404d (diff)
parent89f069637cd95f584db924407378b64df9910243 (diff)
downloadforums-b5142296b182a4bf0d552aac565d90aa0befd07a.tar
forums-b5142296b182a4bf0d552aac565d90aa0befd07a.tar.gz
forums-b5142296b182a4bf0d552aac565d90aa0befd07a.tar.bz2
forums-b5142296b182a4bf0d552aac565d90aa0befd07a.tar.xz
forums-b5142296b182a4bf0d552aac565d90aa0befd07a.zip
Merge remote-tracking branch 'p/ticket/11015' into develop
* p/ticket/11015: (30 commits) [ticket/11015] Move comment in the right place. [ticket/11015] Correctly transform 'mysqli' etc. in phpbb_convert_30_dbms_to_31 [ticket/11015] Fix 3.0 to 3.1 dbms conversion for mysqli. [ticket/11015] Change permission adding in database updater to new style. [ticket/11015] Change more docblocks to phpbb_db_driver. [ticket/11015] Installer still needs 3.0-style dbms name. [ticket/11015] Include functions.php because it is not always included. [ticket/11015] Convert database drivers to new spelling in post setup sync. [ticket/11015] Convert connect test to the new syntax. [ticket/11015] Restore whitespace to avoid conflict when merging develop. [ticket/11015] Fix functional test case. [ticket/11015] Change more docblocks. [ticket/11015] Include dbms name in exception message. [ticket/11015] Make phpbb_convert_30_dbms_to_31 more future proof [ticket/11015] Move db driver class name fixing to function [ticket/11015] Allow full dbms class name in tests/test_config.php [ticket/11015] Allow full dbms class name in config.php [ticket/11015] Remove strange method_exists call [tracker/11015] Prepend phpbb_db_driver_ for PHPBB_TEST_DBMS [ticket/11015] Re-introduce accidentally removed require in install_convert ...
Diffstat (limited to 'tests/test_framework/phpbb_functional_test_case.php')
-rw-r--r--tests/test_framework/phpbb_functional_test_case.php12
1 files changed, 5 insertions, 7 deletions
diff --git a/tests/test_framework/phpbb_functional_test_case.php b/tests/test_framework/phpbb_functional_test_case.php
index 1297e99ca5..67a5050892 100644
--- a/tests/test_framework/phpbb_functional_test_case.php
+++ b/tests/test_framework/phpbb_functional_test_case.php
@@ -102,14 +102,10 @@ class phpbb_functional_test_case extends phpbb_test_case
{
global $phpbb_root_path, $phpEx;
// so we don't reopen an open connection
- if (!($this->db instanceof dbal))
+ if (!($this->db instanceof phpbb_db_driver))
{
- if (!class_exists('dbal_' . self::$config['dbms']))
- {
- include($phpbb_root_path . 'includes/db/' . self::$config['dbms'] . ".$phpEx");
- }
- $sql_db = 'dbal_' . self::$config['dbms'];
- $this->db = new $sql_db();
+ $dbms = self::$config['dbms'];
+ $this->db = new $dbms();
$this->db->sql_connect(self::$config['dbhost'], self::$config['dbuser'], self::$config['dbpasswd'], self::$config['dbname'], self::$config['dbport']);
}
return $this->db;
@@ -206,6 +202,8 @@ class phpbb_functional_test_case extends phpbb_test_case
self::assertNotSame(false, $content);
self::assertContains('Welcome to Installation', $content);
+ // Installer uses 3.0-style dbms name
+ $data['dbms'] = str_replace('phpbb_db_driver_', '', $data['dbms']);
$content = self::do_request('create_table', $data);
self::assertNotSame(false, $content);
self::assertContains('The database tables used by phpBB', $content);