public $functionHooks = array();
public $transparentHooks = array();
- //Fuzz test
+ // Fuzz test
public $maxFuzzTestLength = 300;
public $fuzzSeed = 0;
public $memoryLimit = 50;
parent::setUp();
- //Setup CLI arguments
+ // Setup CLI arguments
if ( $this->getCliArg( 'regex' ) ) {
$this->regex = $this->getCliArg( 'regex' );
} else {
);
$tmpGlobals['wgForeignFileRepos'] = array();
$tmpGlobals['wgDefaultExternalStore'] = array();
- $tmpGlobals['wgEnableParserCache'] = false;
+ $tmpGlobals['wgParserCacheType'] = CACHE_NONE;
$tmpGlobals['wgCapitalLinks'] = true;
$tmpGlobals['wgNoFollowLinks'] = true;
$tmpGlobals['wgNoFollowDomainExceptions'] = array();
$tmpGlobals['wgAdaptiveMessageCache'] = true;
$tmpGlobals['wgUseDatabaseMessages'] = true;
$tmpGlobals['wgLocaltimezone'] = 'UTC';
- $tmpGlobals['wgDeferredUpdateList'] = array();
$tmpGlobals['wgGroupPermissions'] = array(
'*' => array(
'createaccount' => true,
$this->djVuSupport = new DjVuSupport();
// Tidy support
$this->tidySupport = new TidySupport();
+ $tmpGlobals['wgTidyConfig'] = null;
$tmpGlobals['wgUseTidy'] = false;
- $tmpGlobals['wgAlwaysUseTidy'] = false;
$tmpGlobals['wgDebugTidy'] = false;
- $tmpGlobals['wgTidyConf'] = $IP . '/includes/tidy.conf';
+ $tmpGlobals['wgTidyConf'] = $IP . '/includes/tidy/tidy.conf';
$tmpGlobals['wgTidyOpts'] = '';
$tmpGlobals['wgTidyInternal'] = $this->tidySupport->isInternal();
$wgNamespaceAliases['Image'] = $this->savedWeirdGlobals['image_alias'];
$wgNamespaceAliases['Image_talk'] = $this->savedWeirdGlobals['image_talk_alias'];
+ MWTidy::destroySingleton();
+
// Restore backends
RepoGroup::destroySingleton();
FileBackendGroup::destroySingleton();
function addDBData() {
$this->tablesUsed[] = 'site_stats';
# disabled for performance
- #$this->tablesUsed[] = 'image';
+ # $this->tablesUsed[] = 'image';
# Update certain things in site_stats
$this->db->insert( 'site_stats',
}
}
- //ParserTest setup/teardown functions
+ // ParserTest setup/teardown functions
/**
* Set up the global variables for a consistent environment for each test.
foreach ( $configLines as $line ) {
list( $var, $value ) = explode( '=', $line, 2 );
- $settings[$var] = eval( "return $value;" ); //???
+ $settings[$var] = eval( "return $value;" ); // ???
}
}
$GLOBALS[$var] = $val;
}
+ MWTidy::destroySingleton();
MagicWord::clearCache();
# The entries saved into RepoGroup cache with previous globals will be wrong.
public function testParserTest( $desc, $input, $result, $opts, $config ) {
if ( $this->regex != '' && !preg_match( '/' . $this->regex . '/', $desc ) ) {
$this->assertTrue( true ); // XXX: don't flood output with "test made no assertions"
- //$this->markTestSkipped( 'Filtered out by the user' );
+ // $this->markTestSkipped( 'Filtered out by the user' );
return;
}
if ( $id % 100 == 0 ) {
$usage = intval( memory_get_usage( true ) / $this->memoryLimit / 1048576 * 100 );
- //echo "{$this->fuzzSeed}: $numSuccess/$numTotal (mem: $usage%)\n";
+ // echo "{$this->fuzzSeed}: $numSuccess/$numTotal (mem: $usage%)\n";
if ( $usage > 90 ) {
$ret = "Out of memory:\n";
$memStats = $this->getMemoryBreakdown();
}
}
- //Various getter functions
+ // Various getter functions
/**
* Get an input dictionary from a set of parser test files
return $parser;
}
- //Various action functions
+ // Various action functions
public function addArticle( $name, $text, $line ) {
self::$articles[$name] = array( $text, $line );
return isset( $wgParser->mTransparentTagHooks[$name] );
}
- //Various "cleanup" functions
+ // Various "cleanup" functions
/**
* Remove last character if it is a newline
}
}
- //Test options parser functions
+ // Test options parser functions
protected function parseOptions( $instring ) {
$opts = array();