Umherirrender has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/203013

Change subject: Add test for IRC line for legacy type block/block
......................................................................

Add test for IRC line for legacy type block/block

Follow-Up: I08aea8399ce766e98c1a76e237169f220c6cc751
Change-Id: I8626e8ce28104d20a6145d47e647ef0ad86b3523
---
M tests/phpunit/includes/changes/RecentChangeTest.php
1 file changed, 15 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/13/203013/1

diff --git a/tests/phpunit/includes/changes/RecentChangeTest.php 
b/tests/phpunit/includes/changes/RecentChangeTest.php
index 0dba183..e39c382 100644
--- a/tests/phpunit/includes/changes/RecentChangeTest.php
+++ b/tests/phpunit/includes/changes/RecentChangeTest.php
@@ -76,6 +76,19 @@
                        ),
                        $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 @@
         * @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 @@
                        $logEntry->setComment( $comment );
                }
                $logEntry->setParameters( $params );
+               $logEntry->setLegacy( $legacy );
 
                $formatter = LogFormatter::newFromEntry( $logEntry );
                $formatter->setContext( $this->context );

-- 
To view, visit https://gerrit.wikimedia.org/r/203013
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8626e8ce28104d20a6145d47e647ef0ad86b3523
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <umherirrender_de...@web.de>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to