If the title for a 'title' or 'title-link' type is invalid, the code
still must not return a non-array from the method.
I'm not sure this is what was behind T176938, but it's the only thing I
can find that might cause the errors I saw logged at about the same
time.
Change-Id: Iae77eb6ad9a64d8b67074164ff0c0fea36826f3c
Right now it's quite slow because it reloads LocalisationCache
for every test case.
Change the reload to only happen once for the entire class.
Also use RequestContext instead of wgLang to match logic in
the parent class (MediaWikiLangTestCase).
$ phpunit includes/logging/LogFormatterTest.php
Before
- run 1) Time: 23.56 seconds, Memory: 48.00MB
- run 2) Time: 22.41 seconds, Memory: 48.75MB
After
- run 1) Time: 14.27 seconds, Memory: 47.50MB
- run 2) Time: 13.45 seconds, Memory: 47.25MB
Change-Id: Ia791563ca9094c36782acfe9826def45f2a1d621
It's unreasonable to expect newbies to know that "bug 12345" means "Task T14345"
except where it doesn't, so let's just standardise on the real numbers.
Change-Id: I46261416f7603558dceb76ebe695a5cac274e417
This localize the protect type, level and expiry on Special:Log/protect.
To allow i18n there are some details stored in the log params of new log
items, these details also shown on API output.
The details cannot get from the old existing data, because there are
containing L10n strings therefore i18n works only for new items.
In the api and for IRC the old description text is still stored in the
log params for backward compatibility.
This allows use of gender on Special:Log. Old messages are kept for use
in IRC. Tests already exists to ensure an unchanged IRC message.
Bug: T47988
Change-Id: I3bb85c61b857972e66c99c499d7d785c88cafb25
This moves out a bunch of stuff that doesnt
seem to test anything in RecentChange....
This also shows us how few tests RecentChange
actually has!
Change-Id: Ia5016c82c00dd7c35a6f1253d6e385b587ec485e
This allows for extensions to format their log entry parameters, and
keeps the code for formatting API log entry parameters in the same place
as for other formatting.
This also takes the opportunity to rearrange the output format slightly
to avoid conflicts like what's happening in T73020.
Bug: T35235
Bug: T73020
Bug: T91466
Change-Id: I6846ce09322eb404c506b5a51780a44ce9279fe2
LogFormatterTest replaces all extension localization files in
$wgExtensionMessagesFiles with its own, and correctly restores this
variable. But it neglects to refresh the localization cache after
restoring the variable, so subsequent extension tests are missing their
localization.
Change-Id: I74809af47830a5e09c36f8fec20c9c65b1e3aa17
This change adds types to LogFormatter like "msg" so log values
(parameters for the log message) can be formated as e.g. a message in
user or content language.
This change adds tests for LogFormatter, too. Tested are the normal log
params, the log params with type and the output of the comment.
This change repairs the changes I6a56c204 and I7218a173
Change-Id: Ief3665056b3bb613ff709821306017ee7967c444
As I6a56c204 breaks extensions because of changing protected methods to public, this has to be reverted. We need a solid solution and the next 1.21-wmf is being branched tomorrow. Revert is the sanest solution at the moment.
This reverts commit 888fe0ffb3
This change adds tests for LogFormatter. Tested are the normal log
params, the log params with type and the output of the comment.
Change-Id: I7218a1738c97db1d888605cecdfbffe21ca00fbf