Fix mention failures not beeing sent.

While manual rebasing the bundle patch the wrong
line was removed.

Also improves tests to check for notifyAgent.

See I1069aeb5523db8710da4e8e21065bf447d031e3c

Change-Id: I33ddeccea153d6f6ae97e5c60e8b47dc24fb4833
This commit is contained in:
WMDE-Fisch 2016-08-15 14:03:45 +02:00
parent 1113d0b0f7
commit c81e1b93d2
2 changed files with 8 additions and 1 deletions

View file

@ -183,7 +183,6 @@ abstract class EchoDiscussionParser {
'section-title' => $header,
'revid' => $revision->getId(),
'mentioned-users' => $userMentions['validMentions'],
'notifyAgent' => true
),
'agent' => $agent,
) );
@ -231,6 +230,7 @@ abstract class EchoDiscussionParser {
'subject-name' => $unknownUser,
'section-title' => $header,
'revid' => $revision->getId(),
'notifyAgent' => true
),
'agent' => $agent,
) );

View file

@ -376,11 +376,13 @@ class EchoDiscussionParserTest extends MediaWikiTestCase {
'type' => 'mention-failure',
'agent' => 'Admin',
'section-title' => 'Hello Users',
'notifyAgent' => true,
),
array(
'type' => 'mention-failure',
'agent' => 'Admin',
'section-title' => 'Hello Users',
'notifyAgent' => true,
),
),
),
@ -396,11 +398,13 @@ class EchoDiscussionParserTest extends MediaWikiTestCase {
'type' => 'mention',
'agent' => 'Admin',
'section-title' => 'Hello Users',
'notifyAgent' => null,
),
array(
'type' => 'mention-success',
'agent' => 'Admin',
'section-title' => 'Hello Users',
'notifyAgent' => true,
),
),
),
@ -416,6 +420,7 @@ class EchoDiscussionParserTest extends MediaWikiTestCase {
'type' => 'mention-failure',
'agent' => 'Admin',
'section-title' => 'Section 2',
'notifyAgent' => true,
),
),
),
@ -431,6 +436,7 @@ class EchoDiscussionParserTest extends MediaWikiTestCase {
'type' => 'mention-failure',
'agent' => 'Admin',
'section-title' => 'Section 2',
'notifyAgent' => true,
),
),
),
@ -462,6 +468,7 @@ class EchoDiscussionParserTest extends MediaWikiTestCase {
'type' => $event->getType(),
'agent' => $event->getAgent()->getName(),
'section-title' => $event->getExtraParam( 'section-title' ),
'notifyAgent' => $event->getExtraParam( 'notifyAgent' )
);
return false;
}