r82969 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r82968‎ | r82969 | r82970 >
Date:21:57, 28 February 2011
Author:overlordq
Status:ok (Comments)
Tags:
Comment:
Followup to r82874, restore lost edits
Modified paths:
  • /trunk/phase3/tests/parserTests.php (modified) (history)

Diff [purge]

Index: trunk/phase3/tests/parserTests.php
@@ -21,13 +21,13 @@
2222 * http://www.gnu.org/copyleft/gpl.html
2323 *
2424 * @file
25 - * @ingroup Maintenance
 25+ * @ingroup Testing
2626 */
2727
2828 $options = array( 'quick', 'color', 'quiet', 'help', 'show-output', 'record', 'run-disabled' );
2929 $optionsWithArgs = array( 'regex', 'seed', 'setversion' );
3030
31 -require_once( dirname( __FILE__ ) . '/../commandLine.inc' );
 31+require_once( dirname( __FILE__ ) . '/../maintenance/commandLine.inc' );
3232
3333 if ( isset( $options['help'] ) ) {
3434 echo <<<ENDS
@@ -59,8 +59,9 @@
6060
6161 # Cases of weird db corruption were encountered when running tests on earlyish
6262 # versions of SQLite
63 -if ( wfGetDB( DB_MASTER )->getType() == 'sqlite' ) {
64 - $version = wfGetDB( DB_MASTER )->getServerVersion();
 63+if ( $wgDBtype == 'sqlite' ) {
 64+ $db = wfGetDB( DB_MASTER );
 65+ $version = $db->getServerVersion();
6566 if ( version_compare( $version, '3.6' ) < 0 ) {
6667 die( "Parser tests require SQLite version 3.6 or later, you have $version\n" );
6768 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r82874Readding parserTests.php and testHelpers.inc with history back to r73884 when...platonides23:36, 26 February 2011

Comments

#Comment by Platonides (talk | contribs)   22:56, 28 February 2011

Is there a reason for the getType() to $wgDBtype?

wfGetDB( DB_MASTER )->getType() seems to work flawlessly without it. Why was it done in r78389?

Status & tagging log