Add test for IRC line for type protect/move_prot
[lhc/web/wiklou.git] / tests / phpunit / includes / changes / RecentChangeTest.php
index e00a45a..0dba183 100644 (file)
@@ -46,8 +46,11 @@ class RecentChangeTest extends MediaWikiTestCase {
         * - protect/protect
         * - protect/modifyprotect
         * - protect/unprotect
+        * - protect/move_prot
         * - upload/upload
         * - merge/merge
+        * - import/upload
+        * - import/interwiki
         *
         * As well as the following Auto Edit Summaries:
         * - blank
@@ -221,6 +224,15 @@ class RecentChangeTest extends MediaWikiTestCase {
                        $protectParams,
                        $this->user_comment
                );
+
+               # protect/move_prot
+               $this->assertIRCComment(
+                       $this->context->msg( 'movedarticleprotection', 'SomeTitle', 'OldTitle' )
+                               ->plain() . $sep . $this->user_comment,
+                       'protect', 'move_prot',
+                       array( 'OldTitle' ),
+                       $this->user_comment
+               );
        }
 
        /**
@@ -265,6 +277,29 @@ class RecentChangeTest extends MediaWikiTestCase {
                );
        }
 
+       /**
+        * @covers LogFormatter::getIRCActionText
+        */
+       public function testIrcMsgForLogTypeImport() {
+               $sep = $this->context->msg( 'colon-separator' )->text();
+
+               # import/upload
+               $this->assertIRCComment(
+                       $this->context->msg( 'import-logentry-upload', 'SomeTitle' )->plain() . $sep . $this->user_comment,
+                       'import', 'upload',
+                       array(),
+                       $this->user_comment
+               );
+
+               # import/interwiki
+               $this->assertIRCComment(
+                       $this->context->msg( 'import-logentry-interwiki', 'SomeTitle' )->plain() . $sep . $this->user_comment,
+                       'import', 'interwiki',
+                       array(),
+                       $this->user_comment
+               );
+       }
+
        /**
         * @todo Emulate these edits somehow and extract
         * raw edit summary from RecentChange object