mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CodeMirror
synced 2024-11-23 13:56:44 +00:00
Remove $this->setService( 'UserOptionsLookup', ... ) in tests
The mocked service UserOptionsLookup is already injected via contructor to Hooks. Change-Id: I013aa6f62bd50802889a0037721ba06902d1a18e
This commit is contained in:
parent
6b3c480f02
commit
c3df98cff6
|
@ -39,7 +39,6 @@ class HookTest extends MediaWikiIntegrationTestCase {
|
|||
] );
|
||||
$userOptionsLookup = $this->createMock( UserOptionsLookup::class );
|
||||
$userOptionsLookup->method( 'getOption' )->willReturn( true );
|
||||
$this->setService( 'UserOptionsLookup', $userOptionsLookup );
|
||||
|
||||
$out = $this->getMockOutputPage();
|
||||
$out->method( 'getModules' )->willReturn( [] );
|
||||
|
@ -87,7 +86,6 @@ class HookTest extends MediaWikiIntegrationTestCase {
|
|||
$out->method( 'getModules' )->willReturn( $module ? [ $module ] : [] );
|
||||
$userOptionsLookup = $this->createMock( UserOptionsLookup::class );
|
||||
$userOptionsLookup->method( 'getOption' )->willReturn( true );
|
||||
$this->setService( 'UserOptionsLookup', $userOptionsLookup );
|
||||
|
||||
if ( $gadget && !ExtensionRegistry::getInstance()->isLoaded( 'Gadgets' ) ) {
|
||||
$this->markTestSkipped( 'Skipped as Gadgets extension is not available' );
|
||||
|
|
Loading…
Reference in a new issue