$tmpGlobals['wgStyleDirectory'] = "$IP/skins";
}
+ # Replace all media handlers with a mock. We do not need to generate
+ # actual thumbnails to do parser testing, we only care about receiving
+ # a ThumbnailImage properly initialized.
+ global $wgMediaHandlers;
+ foreach( $wgMediaHandlers as $type => $handler ) {
+ $tmpGlobals['wgMediaHandlers'][$type] = 'MockBitmapHandler';
+ }
+
$tmpHooks = $wgHooks;
$tmpHooks['ParserTestParser'][] = 'ParserTestParserHook::setup';
$tmpHooks['ParserGetVariableValueTs'][] = 'ParserTest::getFakeTimestamp';
$backend = self::$backendToUse;
}
} else {
- $backend = new FSFileBackend( array(
+ # Replace with a mock. We do not care about generating real
+ # files on the filesystem, just need to expose the file
+ # informations.
+ $backend = new MockFileBackend( array(
'name' => 'local-backend',
'lockManager' => 'nullLockManager',
'containerPaths' => array(
return;
}
+ $backend = RepoGroup::singleton()->getLocalRepo()->getBackend();
+ if( $backend instanceof MockFileBackend ) {
+ # In memory backend, so dont bother cleaning them up.
+ return;
+ }
+
$base = $this->getBaseDir();
// delete the files first, then the dirs.
self::deleteFiles(