Disable EchoGetEventsForRevision hook handlers while running tests

Extensions using this hook (e.g. DiscussionTools) cause test failures
otherwise.

Change-Id: I21159d03eebaf46ad94f4273ba698a59b8019185
This commit is contained in:
Bartosz Dziewoński 2021-07-26 13:56:44 +02:00
parent a0636f75a7
commit ee860bc577

View file

@ -402,6 +402,7 @@ class EchoDiscussionParserTest extends MediaWikiTestCase {
// enable pings from summary
'wgEchoMaxMentionsInEditSummary' => 5,
] );
$this->clearHook( 'EchoGetEventsForRevision' );
EchoDiscussionParser::generateEventsForRevision( $revision, false );
@ -718,6 +719,7 @@ class EchoDiscussionParserTest extends MediaWikiTestCase {
$this->setMwGlobals( 'wgEchoMentionStatusNotifications', true );
// enable multiple sections mentions
$this->setMwGlobals( 'wgEchoMentionsOnMultipleSectionEdits', true );
$this->clearHook( 'EchoGetEventsForRevision' );
EchoDiscussionParser::generateEventsForRevision( $revision, false );
@ -920,6 +922,7 @@ TEXT
// lower limit for the mention-failure-too-many notification
'wgEchoMaxMentionsCount' => 5
] );
$this->clearHook( 'EchoGetEventsForRevision' );
EchoDiscussionParser::generateEventsForRevision( $revision, false );