mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CodeMirror
synced 2024-11-23 22:03:28 +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 = $this->createMock( UserOptionsLookup::class );
|
||||||
$userOptionsLookup->method( 'getOption' )->willReturn( true );
|
$userOptionsLookup->method( 'getOption' )->willReturn( true );
|
||||||
$this->setService( 'UserOptionsLookup', $userOptionsLookup );
|
|
||||||
|
|
||||||
$out = $this->getMockOutputPage();
|
$out = $this->getMockOutputPage();
|
||||||
$out->method( 'getModules' )->willReturn( [] );
|
$out->method( 'getModules' )->willReturn( [] );
|
||||||
|
@ -87,7 +86,6 @@ class HookTest extends MediaWikiIntegrationTestCase {
|
||||||
$out->method( 'getModules' )->willReturn( $module ? [ $module ] : [] );
|
$out->method( 'getModules' )->willReturn( $module ? [ $module ] : [] );
|
||||||
$userOptionsLookup = $this->createMock( UserOptionsLookup::class );
|
$userOptionsLookup = $this->createMock( UserOptionsLookup::class );
|
||||||
$userOptionsLookup->method( 'getOption' )->willReturn( true );
|
$userOptionsLookup->method( 'getOption' )->willReturn( true );
|
||||||
$this->setService( 'UserOptionsLookup', $userOptionsLookup );
|
|
||||||
|
|
||||||
if ( $gadget && !ExtensionRegistry::getInstance()->isLoaded( 'Gadgets' ) ) {
|
if ( $gadget && !ExtensionRegistry::getInstance()->isLoaded( 'Gadgets' ) ) {
|
||||||
$this->markTestSkipped( 'Skipped as Gadgets extension is not available' );
|
$this->markTestSkipped( 'Skipped as Gadgets extension is not available' );
|
||||||
|
|
Loading…
Reference in a new issue