They are supposed to call overrideMwServices() instead, per
documentation. One test does call resetGlobalServices(), probably by
mistake. It can be private so other tests won't make the same mistake.
Change-Id: I11ed598fcc901d0d9951724f2d210d3a7a1482d2
* MediaWikiServices.
* @return MediaWikiServices
*/
* MediaWikiServices.
* @return MediaWikiServices
*/
- protected static function resetGlobalServices( Config $bootstrapConfig = null ) {
+ private static function resetGlobalServices( Config $bootstrapConfig = null ) {
$oldServices = MediaWikiServices::getInstance();
$oldConfigFactory = $oldServices->getConfigFactory();
$oldLoadBalancerFactory = $oldServices->getDBLoadBalancerFactory();
$oldServices = MediaWikiServices::getInstance();
$oldConfigFactory = $oldServices->getConfigFactory();
$oldLoadBalancerFactory = $oldServices->getDBLoadBalancerFactory();
*/
public function testNewKnownCurrent() {
// Setup the services
*/
public function testNewKnownCurrent() {
// Setup the services
- $this->resetGlobalServices();
+ $this->overrideMwServices();
$cache = new WANObjectCache( [ 'cache' => new HashBagOStuff() ] );
$this->setService( 'MainWANObjectCache', $cache );
$db = wfGetDB( DB_MASTER );
$cache = new WANObjectCache( [ 'cache' => new HashBagOStuff() ] );
$this->setService( 'MainWANObjectCache', $cache );
$db = wfGetDB( DB_MASTER );