mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CodeMirror
synced 2024-11-27 15:40:00 +00:00
Update tests for PHPUnit 9.6
- Avoid withConsecutive() Bug: T342110 Change-Id: I32c7d465942c55608891165d79d22ae6e31a5aaf
This commit is contained in:
parent
380ec9d1ce
commit
1a038072b4
|
@ -43,9 +43,15 @@ class HookTest extends MediaWikiIntegrationTestCase {
|
|||
|
||||
$out = $this->getMockOutputPage();
|
||||
$out->method( 'getModules' )->willReturn( [] );
|
||||
$isFirstCall = true;
|
||||
$out->expects( $this->exactly( $expectedAddModuleCalls ) )
|
||||
->method( 'addModules' )
|
||||
->withConsecutive( [ $this->equalTo( $expectedFirstModule ) ] );
|
||||
->willReturnCallback( function ( $modules ) use ( $expectedFirstModule, &$isFirstCall ) {
|
||||
if ( $isFirstCall ) {
|
||||
$this->assertSame( $expectedFirstModule, $modules );
|
||||
}
|
||||
$isFirstCall = false;
|
||||
} );
|
||||
|
||||
( new Hooks( $userOptionsLookup, $this->getServiceContainer()->getMainConfig() ) )
|
||||
->onBeforePageDisplay( $out, $this->createMock( Skin::class ) );
|
||||
|
|
Loading…
Reference in a new issue