$newServices = $this->newMediaWikiServices();
$oldServices = MediaWikiServices::forceGlobalInstance( $newServices );
- $service1 = $this->getMock( SalvageableService::class );
+ $service1 = $this->createMock( SalvageableService::class );
$service1->expects( $this->never() )
->method( 'salvage' );
$newServices = $this->newMediaWikiServices();
$oldServices = MediaWikiServices::forceGlobalInstance( $newServices );
- $service1 = $this->getMock( SalvageableService::class );
+ $service1 = $this->createMock( SalvageableService::class );
$service1->expects( $this->never() )
->method( 'salvage' );
- $service2 = $this->getMock( SalvageableService::class );
+ $service2 = $this->createMock( SalvageableService::class );
$service2->expects( $this->once() )
->method( 'salvage' )
->with( $service1 );
$newServices = $this->newMediaWikiServices();
$oldServices = MediaWikiServices::forceGlobalInstance( $newServices );
- $service1 = $this->getMock( DestructibleService::class );
+ $service1 = $this->createMock( DestructibleService::class );
$service1->expects( $this->once() )
->method( 'destroy' );
- $service2 = $this->getMock( DestructibleService::class );
+ $service2 = $this->createMock( DestructibleService::class );
$service2->expects( $this->never() )
->method( 'destroy' );
'Test',
function() use ( &$serviceCounter ) {
$serviceCounter++;
- $service = $this->getMock( 'MediaWiki\Services\DestructibleService' );
+ $service = $this->createMock( 'MediaWiki\Services\DestructibleService' );
$service->expects( $this->once() )->method( 'destroy' );
return $service;
}
$services->defineService(
'Test',
function() {
- $service = $this->getMock( 'MediaWiki\Services\DestructibleService' );
+ $service = $this->createMock( 'MediaWiki\Services\DestructibleService' );
$service->expects( $this->never() )->method( 'destroy' );
return $service;
}