summaryrefslogtreecommitdiff
path: root/t/Search.inc
diff options
context:
space:
mode:
Diffstat (limited to 't/Search.inc')
-rw-r--r--t/Search.inc14
1 files changed, 5 insertions, 9 deletions
diff --git a/t/Search.inc b/t/Search.inc
index fa8a8b97..25229306 100644
--- a/t/Search.inc
+++ b/t/Search.inc
@@ -14,19 +14,15 @@ function buildTestDatabase( $tables ) {
global $wgDBprefix, $wgDBserver, $wgDBadminuser, $wgDBadminpassword, $wgDBname, $wgDBtype;
$oldPrefix = $wgDBprefix;
$wgDBprefix = 'parsertest';
- $class = 'Database' . ucfirst( $wgDBtype );
- $db = new $class (
- $wgDBserver,
- $wgDBadminuser,
- $wgDBadminpassword,
- $wgDBname );
+
+ $db = wfGetDB ( DB_SLAVE );
+
if( $db->isOpen() ) {
if ( !( stristr( $db->getSoftwareLink(), 'MySQL') && version_compare( $db->getServerVersion(), '4.1', '<' ) ) ) {
# Database that supports CREATE TABLE ... LIKE
foreach ($tables as $tbl) {
$newTableName = $db->tableName( $tbl );
- #$tableName = $oldPrefix . $tbl;
- $tableName = $tbl;
+ $tableName = $oldPrefix . $tbl;
$db->query("CREATE TEMPORARY TABLE $newTableName (LIKE $tableName)");
}
} else {
@@ -162,4 +158,4 @@ END
$got = $this->fetchIds( $this->search->searchTitle( 'smithee' ) );
is( $got, $exp, "Title power search" );
}
-} \ No newline at end of file
+}