diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2009-02-22 13:37:51 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2009-02-22 13:37:51 +0100 |
commit | b9b85843572bf283f48285001e276ba7e61b63f6 (patch) | |
tree | 4c6f4571552ada9ccfb4030481dcf77308f8b254 /t | |
parent | d9a20acc4e789cca747ad360d87ee3f3e7aa58c1 (diff) |
updated to MediaWiki 1.14.0
Diffstat (limited to 't')
-rw-r--r-- | t/Search.inc | 14 | ||||
-rw-r--r-- | t/inc/Database.t | 10 | ||||
-rw-r--r-- | t/inc/Global.t | 10 |
3 files changed, 14 insertions, 20 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 +} diff --git a/t/inc/Database.t b/t/inc/Database.t index 5092be9d..4367fcd1 100644 --- a/t/inc/Database.t +++ b/t/inc/Database.t @@ -5,14 +5,12 @@ define( 'MEDIAWIKI', true ); require 't/Test.php'; require 'includes/Defines.php'; +require 'StartProfiler.php'; +require 'includes/AutoLoader.php'; require 'LocalSettings.php'; +require 'includes/Setup.php'; -plan( 13 ); - -require_ok( 'includes/ProfilerStub.php' ); -require_ok( 'includes/GlobalFunctions.php' ); -require_ok( 'includes/Exception.php' ); -require_ok( 'includes/Database.php' ); +plan( 9 ); $db = new Database( $wgDBserver, $wgDBuser, $wgDBpassword ); diff --git a/t/inc/Global.t b/t/inc/Global.t index adf8d135..7b2994e6 100644 --- a/t/inc/Global.t +++ b/t/inc/Global.t @@ -5,12 +5,12 @@ define( 'MEDIAWIKI', true ); require 't/Test.php'; require 'includes/Defines.php'; +require 'StartProfiler.php'; +require 'includes/AutoLoader.php'; require 'LocalSettings.php'; +require 'includes/Setup.php'; -plan( 48 ); - -require_ok( 'includes/ProfilerStub.php' ); -require_ok( 'includes/GlobalFunctions.php' ); +plan( 46 ); $wgReadOnly = null; $wgReadOnlyFile = tempnam(wfTempDir(), "mwtest_readonly"); @@ -48,7 +48,7 @@ is( wfQuotedPrintable( "\xc4\x88u legebla?", "UTF-8" ), $start = wfTime(); is( gettype( $start ), 'float', 'Time (type)' ); $end = wfTime(); -cmp_ok( $end, '>', $start, 'Time' ); +cmp_ok( $end, '>', $start, 'Time (compare)' ); $arr = wfArrayToCGI( array( 'baz' => 'AT&T', 'ignore' => '' ), |