mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ConfirmEdit
synced 2024-11-27 17:40:11 +00:00
phpunit: Check for MW_PHPUNIT_TEST constant
$wgWikimediaJenkinsCI may not be enabled in LocalSettings.php. tests/phpunit/phpunit.php reads this global, but vendor/bin/phpunit does not. Bug: T90875 Change-Id: I91628f0e63d4f67d1d3060cca3a17b95e0faf826
This commit is contained in:
parent
bb500cc638
commit
aca8deafb1
|
@ -152,7 +152,7 @@ class ConfirmEditHooks implements
|
|||
global $wgCaptchaTriggers, $wgWikimediaJenkinsCI;
|
||||
|
||||
// There is no need to run (core) tests with enabled ConfirmEdit - bug T44145
|
||||
if ( isset( $wgWikimediaJenkinsCI ) && $wgWikimediaJenkinsCI === true ) {
|
||||
if ( defined( 'MW_PHPUNIT_TEST' ) || ( isset( $wgWikimediaJenkinsCI ) && $wgWikimediaJenkinsCI === true ) ) {
|
||||
$wgCaptchaTriggers = array_fill_keys( array_keys( $wgCaptchaTriggers ), false );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue