diff --git a/tests/phpunit/bootstrap.php b/tests/phpunit/bootstrap.php index 2f874f12116..3819662a5b1 100644 --- a/tests/phpunit/bootstrap.php +++ b/tests/phpunit/bootstrap.php @@ -53,7 +53,7 @@ define( 'MW_ENTRY_POINT', 'cli' ); $IP = realpath( __DIR__ . '/../../' ); // We don't use a settings file here but some code still assumes that one exists wfRequireOnceInGlobalScope( "$IP/includes/BootstrapHelperFunctions.php" ); -define( 'MW_CONFIG_FILE', wfDetectLocalSettingsFile( $IP ) ); +wfDetectLocalSettingsFile( $IP ); // these variables must be defined before setup runs $GLOBALS['IP'] = $IP; diff --git a/tests/phpunit/phpunit.php b/tests/phpunit/phpunit.php index 6f79eb8f884..f643767795a 100755 --- a/tests/phpunit/phpunit.php +++ b/tests/phpunit/phpunit.php @@ -183,9 +183,7 @@ require_once "$IP/includes/BootstrapHelperFunctions.php"; $wrapper = new PHPUnitMaintClass(); $wrapper->setup(); - -// Define how settings are loaded (e.g. LocalSettings.php) -define( 'MW_CONFIG_FILE', $wrapper->loadSettings() ); +$wrapper->loadSettings(); function wfPHPUnitSetup() { // phpcs:ignore MediaWiki.NamingConventions.ValidGlobalName.allowedPrefix