Disable remote loading during PHPUnit tests

Bug: T65015
Change-Id: I205c5e247f314f734178f6c745eaa507f736083a
This commit is contained in:
Tim Starling 2023-07-04 09:36:15 +10:00
parent c3c92b748f
commit 51941a42ec

View file

@ -299,6 +299,11 @@ abstract class BaseBlacklist {
return [];
}
if ( defined( 'MW_PHPUNIT_TEST' ) ) {
wfDebugLog( 'SpamBlacklist', 'remote loading disabled during PHPUnit test' );
return [];
}
$miss = false;
$cache = MediaWikiServices::getInstance()->getMainWANObjectCache();
$regexes = $cache->getWithSetCallback(