MediaWiki
REL1_20
|
Public Member Functions | |
__construct () | |
assertIRCComment ($expected, $type, $action, $params, $comment=null, $msg= '') | |
testIrcMsgForLogTypeBlock () | |
The testIrcMsgForAction* tests are supposed to cover the hacky LogFormatter::getIRCActionText / bug 34508. | |
testIrcMsgForLogTypeDelete () | |
LogFormatter::getIRCActionText | |
testIrcMsgForLogTypeMove () | |
LogFormatter::getIRCActionText | |
testIrcMsgForLogTypeNewusers () | |
LogFormatter::getIRCActionText | |
testIrcMsgForLogTypePatrol () | |
LogFormatter::getIRCActionText | |
testIrcMsgForLogTypeProtect () | |
LogFormatter::getIRCActionText | |
testIrcMsgForLogTypeUpload () | |
LogFormatter::getIRCActionText | |
Protected Attributes | |
$context | |
$target | |
$title | |
$user | |
$user_comment |
Definition at line 5 of file RecentChangeTest.php.
Definition at line 12 of file RecentChangeTest.php.
References RequestContext\newExtraneousContext(), User\newFromName(), and Title\newFromText().
RecentChangeTest::assertIRCComment | ( | $ | expected, |
$ | type, | ||
$ | action, | ||
$ | params, | ||
$ | comment = null , |
||
$ | msg = '' |
||
) |
function testIrcMsgForBlankingAES() { $this->context->msg( 'autosumm-blank', .. ); }
function testIrcMsgForReplaceAES() { $this->context->msg( 'autosumm-replace', .. ); }
function testIrcMsgForRollbackAES() { $this->context->msg( 'revertpage', .. ); }
function testIrcMsgForUndoAES() { $this->context->msg( 'undo-summary', .. ); }
--
$expected | String Expected IRC text without colors codes |
$type | String Log type (move, delete, suppress, patrol ...) |
$action | String A log type action |
$comment | String (optional) A comment for the log action |
$msg | String (optional) A message for PHPUnit :-) |
Definition at line 250 of file RecentChangeTest.php.
References $comment, $params, RecentChange\cleanupForIRC(), and LogFormatter\newFromEntry().
Referenced by testIrcMsgForLogTypeBlock(), testIrcMsgForLogTypeDelete(), testIrcMsgForLogTypeMove(), testIrcMsgForLogTypeNewusers(), testIrcMsgForLogTypePatrol(), testIrcMsgForLogTypeProtect(), and testIrcMsgForLogTypeUpload().
The testIrcMsgForAction* tests are supposed to cover the hacky LogFormatter::getIRCActionText / bug 34508.
Third parties bots listen to those messages. They are clever enough to fetch the i18n messages from the wiki and then analyze the IRC feed to reverse engineer the $1, $2 messages. One thing bots can not detect is when MediaWiki change the meaning of a message like what happened when we deployed 1.19. $1 became the user performing the action which broke basically all bots around.
Should cover the following log actions (which are most commonly used by bots):
As well as the following Auto Edit Summaries:
Definition at line 59 of file RecentChangeTest.php.
References assertIRCComment().
LogFormatter::getIRCActionText
Definition at line 79 of file RecentChangeTest.php.
References assertIRCComment().
LogFormatter::getIRCActionText
Definition at line 126 of file RecentChangeTest.php.
References assertIRCComment().
LogFormatter::getIRCActionText
Definition at line 100 of file RecentChangeTest.php.
References assertIRCComment().
LogFormatter::getIRCActionText
Definition at line 152 of file RecentChangeTest.php.
References assertIRCComment().
LogFormatter::getIRCActionText
Definition at line 168 of file RecentChangeTest.php.
References assertIRCComment().
LogFormatter::getIRCActionText
Definition at line 201 of file RecentChangeTest.php.
References assertIRCComment().
RecentChangeTest::$context [protected] |
Definition at line 10 of file RecentChangeTest.php.
RecentChangeTest::$target [protected] |
Definition at line 7 of file RecentChangeTest.php.
RecentChangeTest::$title [protected] |
Definition at line 6 of file RecentChangeTest.php.
RecentChangeTest::$user [protected] |
Definition at line 8 of file RecentChangeTest.php.
RecentChangeTest::$user_comment [protected] |
Definition at line 9 of file RecentChangeTest.php.