From: umherirrender Date: Thu, 9 Apr 2015 09:32:56 +0000 (+0200) Subject: Add test for IRC line for legacy type block/block X-Git-Tag: 1.31.0-rc.0~11523^2 X-Git-Url: http://git.heureux-cyclage.org/?a=commitdiff_plain;h=4e34450dca695ec5af69e79ecef6c8f832f4599e;p=lhc%2Fweb%2Fwiklou.git Add test for IRC line for legacy type block/block Follow-Up: I08aea8399ce766e98c1a76e237169f220c6cc751 Change-Id: I8626e8ce28104d20a6145d47e647ef0ad86b3523 --- diff --git a/tests/phpunit/includes/changes/RecentChangeTest.php b/tests/phpunit/includes/changes/RecentChangeTest.php index 0dba1830ad..e39c3823cd 100644 --- a/tests/phpunit/includes/changes/RecentChangeTest.php +++ b/tests/phpunit/includes/changes/RecentChangeTest.php @@ -76,6 +76,19 @@ class RecentChangeTest extends MediaWikiTestCase { ), $this->user_comment ); + # block/block - legacy + $this->assertIRCComment( + $this->context->msg( 'blocklogentry', 'SomeTitle', 'duration', '(flags)' )->plain() + . $sep . $this->user_comment, + 'block', 'block', + array( + 'duration', + 'flags', + ), + $this->user_comment, + '', + true + ); # block/unblock $this->assertIRCComment( $this->context->msg( 'unblocklogentry', 'SomeTitle' )->plain() . $sep . $this->user_comment, @@ -332,7 +345,7 @@ class RecentChangeTest extends MediaWikiTestCase { * @param string $msg (optional) A message for PHPUnit :-) */ protected function assertIRCComment( $expected, $type, $action, $params, - $comment = null, $msg = '' + $comment = null, $msg = '', $legacy = false ) { $logEntry = new ManualLogEntry( $type, $action ); $logEntry->setPerformer( $this->user ); @@ -341,6 +354,7 @@ class RecentChangeTest extends MediaWikiTestCase { $logEntry->setComment( $comment ); } $logEntry->setParameters( $params ); + $logEntry->setLegacy( $legacy ); $formatter = LogFormatter::newFromEntry( $logEntry ); $formatter->setContext( $this->context );