MediaWiki  REL1_24
RecentChangeTest Class Reference

Database More...

Inheritance diagram for RecentChangeTest:
Collaboration diagram for RecentChangeTest:

List of all members.

Public Member Functions

 __construct ()
 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 Member Functions

 assertIRCComment ($expected, $type, $action, $params, $comment=null, $msg= '')

Protected Attributes

 $context
 $target
 $title
 $user
 $user_comment

Detailed Description

Database

Definition at line 6 of file RecentChangeTest.php.


Constructor & Destructor Documentation


Member Function Documentation

RecentChangeTest::assertIRCComment ( expected,
type,
action,
params,
comment = null,
msg = '' 
) [protected]
Todo:
Emulate these edits somehow and extract raw edit summary from RecentChange object --
Parameters:
string$expectedExpected IRC text without colors codes
string$typeLog type (move, delete, suppress, patrol ...)
string$actionA log type action
array$params
string$comment(optional) A comment for the log action
string$msg(optional) A message for PHPUnit :-)

Definition at line 263 of file RecentChangeTest.php.

References $comment, $params, $type, IRCColourfulRCFeedFormatter\cleanupForIRC(), LogFormatter\newFromEntry(), title, and user.

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):

  • block/block
  • block/unblock
  • delete/delete
  • delete/restore
  • newusers/create
  • newusers/create2
  • newusers/autocreate
  • move/move
  • move/move_redir
  • protect/protect
  • protect/modifyprotect
  • protect/unprotect
  • upload/upload

As well as the following Auto Edit Summaries:

Definition at line 60 of file RecentChangeTest.php.

References array(), and assertIRCComment().


Member Data Documentation

RecentChangeTest::$context [protected]

Definition at line 11 of file RecentChangeTest.php.

RecentChangeTest::$target [protected]

Definition at line 8 of file RecentChangeTest.php.

RecentChangeTest::$title [protected]

Definition at line 7 of file RecentChangeTest.php.

RecentChangeTest::$user [protected]

Definition at line 9 of file RecentChangeTest.php.

RecentChangeTest::$user_comment [protected]

Definition at line 10 of file RecentChangeTest.php.


The documentation for this class was generated from the following file: