Commit graph

67 commits

Author SHA1 Message Date
addshore 61e9957a95 Add extra case to EchoDiscussionParserTest::testGetSectionCount
Change-Id: Iaec5b891df256955f3e24c8251e5f2e2881f469b
2016-08-04 00:20:22 +00:00
addshore b09cba54c2 Remove unused generateUserIdsForValidUserMentions in test
Change-Id: I78bdd6c9a0cb0ce823ca09379c8152c9c034c237
2016-08-03 17:17:36 -07:00
addshore 5ee7d74c6d Add test for EchoDiscussionParser::extractHeader
Change-Id: Ie4a05e58fafd9d852b2a27fe2ac8f2930b03d2f0
2016-08-03 18:01:57 +00:00
addshore 0e23463185 Allow self mentions
Bug: T138080
Change-Id: I8832f71559741787084bc06e1f7c5ea0f7918d82
2016-08-03 12:38:34 +01:00
WMDE-Fisch 547abe3bdb Add tests for events on multiple sections edits
Mainly as preparation for future patches touching that issue.

Change-Id: I80fd885cbf670e0e3252e38b85703c9d052b3056
2016-08-02 17:15:31 +02:00
WMDE-Fisch 78632108fd Echo notifications for successful mentions
Adds new notification type and icon for successful mentions.
Complements existing test to consider successful mentions.

Bug: T139623
Change-Id: I7a77b40e8b14c95cadb9023065ee916247feacf9
2016-08-01 13:40:55 +02:00
WMDE-Fisch 86d3352464 Refactored generation of mention events.
To increase reusability in future changes.

Change-Id: Ia56f4c587361f0214d738cdf690cf9abf93a2021
2016-07-29 14:49:09 +02:00
WMDE-Fisch 4c7e5d2669 Rename mention-too-many failure notification.
Change-Id: I49041bd01697ae4c160766f194c92ff3d7a4a989
2016-07-27 16:41:29 +00:00
WMDE-Fisch 868190bbf6 Echo notifications for mention failures
- Adds global "$wgEchoMentionStatusNotifications"
   to activate mention status notifications.
   (must be set before extension is loaded)
 - Adds notification types and icon for some basic mention
   failures.
 - Adds failure and stats for anonymous IP.
 - Adds check for links to user subpages.
 - Adds config var for max mention notifications allowed.
 - Bundles notifications.
 - Refactors test for the event generation and adds tests
   for unknown users, user links with subpages and failures
   for too many mentions.

Bug: T136326
Change-Id: I388bdc3714feb9a2865a5ad10dbeabb0a6a09a4f
2016-07-27 13:00:25 +02:00
Kunal Mehta 1a189964bc Reset the TitleParser service without messing up the database
Calling MediaWikiTestCase::setService() appears to mess up the database,
so just reset it directly with MediaWikiServices, and tear it down to
avoid leaking any state.

Change-Id: Ibfd0a7f98f50506cd8402f966682f320bf715c8a
2016-05-11 10:13:01 -07:00
Kunal Mehta 1baa72cf08 Reset TitleParser service after modifying $wgContLang
Needed by I81d48616afd1ab2bde1a5f1d12f4aefb1c866d43

Change-Id: Ic64b0c45b7e6b8420874385f952a0dc4a93e0149
2016-05-11 09:04:33 -07:00
Brad Jorsch 406deaec3f Recreate test users for every test
The assumption currently made that "we only need to add these users
once" is only because of a hack in MediaWikiTestCase that is being
removed in If251739f.

Bug: T132411
Change-Id: I4924ae941b3844b39dd3f44c6986c3bf29b0d62a
2016-04-12 11:42:22 -04:00
James D. Forrester 7f7e6b8159 build: Enable phpcs rule 'PSR2.Methods.MethodDeclaration.StaticBeforeVisibility' and make pass
Change-Id: Iff0709c3a30f8c39d54bab2361e109c96aea6aa0
2015-10-29 13:06:43 +01:00
James D. Forrester 18969bf227 build: Enable phpcs rule 'Generic.Functions.FunctionCallArgumentSpacing.SpaceBeforeComma' and make pass
Change-Id: I5493cb692525ab6c0d560aebbe131f40b6016232
2015-10-29 12:57:02 +01:00
Siebrand Mazeland 33126b69aa Update formatting
In preparation of Code Sniffer based updates.

Change-Id: Id5d43332b44a37665d57dc24ef8c432bc65b2f6a
2015-10-03 23:28:54 -04:00
Kunal Mehta 3a1883f3db Add test case to demonstrate T68512 is fixed
Change-Id: Icadf33455aa09147e7f42809a9c36794ec7abd82
2015-07-06 17:31:08 -07:00
Kunal Mehta c1c91a0c1d Update tests/phpunit for new directory structure
Change-Id: Ic2d5659bb1db89cb62d3703ce59f3e58ba909886
2015-06-15 11:36:02 -07:00
Renamed from tests/phpunit/includes/DiscussionParserTest.php (Browse further)