function setUp() { // Make sure MWDebug class is enabled static $MWDebugEnabled = false; if (!$MWDebugEnabled) { MWDebug::init(); $MWDebugEnabled = true; } /** Clear log before each test */ MWDebug::clearLog(); }
protected function setUp() { parent::setUp(); // Make sure MWDebug class is enabled static $MWDebugEnabled = false; if (!$MWDebugEnabled) { MWDebug::init(); $MWDebugEnabled = true; } /** Clear log before each test */ MWDebug::clearLog(); wfSuppressWarnings(); }
} $wgSessionsInObjectCache = true; if ($wgPHPSessionHandling !== 'enable' && $wgPHPSessionHandling !== 'warn' && $wgPHPSessionHandling !== 'disable') { $wgPHPSessionHandling = 'warn'; } if (defined('MW_NO_SESSION')) { // If the entry point wants no session, force 'disable' here unless they // specifically set it to the (undocumented) 'warn'. $wgPHPSessionHandling = MW_NO_SESSION === 'warn' ? 'warn' : 'disable'; } Profiler::instance()->scopedProfileOut($ps_default); // Disable MWDebug for command line mode, this prevents MWDebug from eating up // all the memory from logging SQL queries on maintenance scripts global $wgCommandLineMode; if ($wgDebugToolbar && !$wgCommandLineMode) { MWDebug::init(); } if (!class_exists('AutoLoader')) { require_once "{$IP}/includes/AutoLoader.php"; } // Reset the global service locator, so any services that have already been created will be // re-created while taking into account any custom settings and extensions. MediaWikiServices::resetGlobalInstance(new GlobalVarConfig(), 'quick'); if ($wgSharedDB && $wgSharedTables) { // Apply $wgSharedDB table aliases for the local LB (all non-foreign DB connections) MediaWikiServices::getInstance()->getDBLoadBalancer()->setTableAliases(array_fill_keys($wgSharedTables, ['dbname' => $wgSharedDB, 'schema' => $wgSharedSchema, 'prefix' => $wgSharedPrefix])); } // Define a constant that indicates that the bootstrapping of the service locator // is complete. define('MW_SERVICE_BOOTSTRAP_COMPLETE', 1); // Install a header callback to prevent caching of responses with cookies (T127993)
public static function setUpBeforeClass() { parent::setUpBeforeClass(); MWDebug::init(); MediaWiki\suppressWarnings(); }