Migrate import log to new log system
[lhc/web/wiklou.git] / tests / phpunit / includes / changes / RecentChangeTest.php
index e00a45a..b3cb7b5 100644 (file)
@@ -48,6 +48,8 @@ class RecentChangeTest extends MediaWikiTestCase {
         * - protect/unprotect
         * - upload/upload
         * - merge/merge
+        * - import/upload
+        * - import/interwiki
         *
         * As well as the following Auto Edit Summaries:
         * - blank
@@ -265,6 +267,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