Fix DjVu tests isolation
Change-Id: I97177572fc025c5ab4361146253d7df9c487c291
This commit is contained in:
parent
8ad5719e2c
commit
da300d4432
2 changed files with 9 additions and 0 deletions
|
|
@ -56,6 +56,7 @@ abstract class MediaHandler {
|
|||
if ( !isset( self::$handlers[$class] ) ) {
|
||||
self::$handlers[$class] = new $class;
|
||||
if ( !self::$handlers[$class]->isEnabled() ) {
|
||||
wfDebug( __METHOD__ . ": $class is not enabled\n" );
|
||||
self::$handlers[$class] = false;
|
||||
}
|
||||
}
|
||||
|
|
@ -63,6 +64,13 @@ abstract class MediaHandler {
|
|||
return self::$handlers[$class];
|
||||
}
|
||||
|
||||
/**
|
||||
* Resets all static caches
|
||||
*/
|
||||
public static function resetCache() {
|
||||
self::$handlers = array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get an associative array mapping magic word IDs to parameter names.
|
||||
* Will be used by the parser to identify parameters.
|
||||
|
|
|
|||
|
|
@ -246,6 +246,7 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
|
|||
}
|
||||
$this->mwGlobals = array();
|
||||
RequestContext::resetMain();
|
||||
MediaHandler::resetCache();
|
||||
|
||||
$phpErrorLevel = intval( ini_get( 'error_reporting' ) );
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue