Prior to this patch, one could not run this command from within an extension
directory: `../../vendor/bin/phpunit -c ../../phpunit.xml.dist tests/phpunit`,
because our code in bootstrap.php loaded "LocalSettings.php" instead of
$IP/LocalSettings.php.
Note that making this change does not result in loading LocalSettings.php when
running unit tests.
Bug: T87781
Change-Id: Iee8440f11a2bb255567646289a1986d636c12765
define( 'MEDIAWIKI', true );
define( 'MW_PHPUNIT_TEST', true );
-// We don't use a settings file here but some code still assumes that one exists
-define( 'MW_CONFIG_FILE', 'LocalSettings.php' );
-
$IP = realpath( __DIR__ . '/../../' );
+// We don't use a settings file here but some code still assumes that one exists
+define( 'MW_CONFIG_FILE', "$IP/LocalSettings.php" );
// these variables must be defined before setup runs
$GLOBALS['IP'] = $IP;