Page MenuHomeWickedGov Phorge

bootstrap.common.php
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

bootstrap.common.php

<?php
if ( ( PHP_SAPI !== 'cli' && PHP_SAPI !== 'phpdbg' ) || defined( 'MEDIAWIKI' ) ) {
exit( 'This file is only meant to be executed indirectly by PHPUnit\'s bootstrap process' );
}
fwrite( STDERR, 'Using PHP ' . PHP_VERSION . "\n" );
define( 'MEDIAWIKI', true );
define( 'MW_ENTRY_POINT', 'cli' );
// Set a flag which can be used to detect when other scripts have been entered
// through this entry point or not.
define( 'MW_PHPUNIT_TEST', true );
if ( getenv( 'PHPUNIT_WIKI' ) ) {
$wikiName = getenv( 'PHPUNIT_WIKI' );
$bits = explode( '-', $wikiName, 2 );
define( 'MW_DB', $bits[0] );
define( 'MW_PREFIX', $bits[1] ?? '' );
define( 'MW_WIKI_NAME', $wikiName );
}
require_once __DIR__ . '/../common/TestSetup.php';
require_once __DIR__ . "/../../includes/BootstrapHelperFunctions.php";
// phpcs:ignore MediaWiki.NamingConventions.ValidGlobalName.allowedPrefix
global $IP;
$IP = wfDetectInstallPath();
// Note: unit tests don't use a settings file but some code still assumes that one exists
wfDetectLocalSettingsFile( $IP );
if ( getenv( 'MW_INSTALL_PATH' ) === false ) {
// Set the env variable for BC with maintenance scripts and the like
putenv( 'MW_INSTALL_PATH=' . $IP );
}
TestSetup::snapshotGlobals();
// Start an output buffer to avoid headers being sent by constructors,
// data providers, etc. (T206476)
ob_start();

File Metadata

Mime Type
text/x-php
Expires
Tue, Aug 18, 22:27 (1 d, 13 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
3a/9b/1e6ff96c331924d9adb06ff12551
Default Alt Text
bootstrap.common.php (1 KB)

Event Timeline