*
* @file
*/
-use MediaWiki\MediaWikiServices;
/**
* The CentralIdLookup service allows for connecting local users with
const AUDIENCE_PUBLIC = 1;
const AUDIENCE_RAW = 2;
- /** @var CentralIdLookup[][] */
+ /** @var CentralIdLookup[] */
private static $instances = [];
/** @var string */
* Reset internal cache for unit testing
*/
public static function resetCache() {
- // TODO: manage service instances in MediaWikiServices
- MediaWikiServices::failUnlessBootstrapping( __METHOD__ );
+ if ( !defined( 'MW_PHPUNIT_TEST' ) ) {
+ throw new MWException( __METHOD__ . ' may only be called from unit tests!' );
+ }
self::$instances = [];
}