RevisionTest: Make @covers tags absolute
[lhc/web/wiklou.git] / tests / phpunit / includes / changes / TestRecentChangesHelper.php
index faa1dcc..2c30948 100644 (file)
@@ -1,5 +1,7 @@
 <?php
 
+use MediaWiki\MediaWikiServices;
+
 /**
  * Helper for generating test recent changes entries.
  *
@@ -10,7 +12,6 @@ class TestRecentChangesHelper {
        public function makeEditRecentChange( User $user, $titleText, $curid, $thisid, $lastid,
                $timestamp, $counter, $watchingUsers
        ) {
-
                $attribs = array_merge(
                        $this->getDefaultAttributes( $titleText, $timestamp ),
                        [
@@ -70,7 +71,6 @@ class TestRecentChangesHelper {
        public function makeNewBotEditRecentChange( User $user, $titleText, $curid, $thisid, $lastid,
                $timestamp, $counter, $watchingUsers
        ) {
-
                $attribs = array_merge(
                        $this->getDefaultAttributes( $titleText, $timestamp ),
                        [
@@ -100,7 +100,8 @@ class TestRecentChangesHelper {
        public function getCacheEntry( $recentChange ) {
                $rcCacheFactory = new RCCacheEntryFactory(
                        new RequestContext(),
-                       [ 'diff' => 'diff', 'cur' => 'cur', 'last' => 'last' ]
+                       [ 'diff' => 'diff', 'cur' => 'cur', 'last' => 'last' ],
+                       MediaWikiServices::getInstance()->getLinkRenderer()
                );
                return $rcCacheFactory->newFromRecentChange( $recentChange, false );
        }
@@ -108,7 +109,6 @@ class TestRecentChangesHelper {
        public function makeCategorizationRecentChange(
                User $user, $titleText, $curid, $thisid, $lastid, $timestamp
        ) {
-
                $attribs = array_merge(
                        $this->getDefaultAttributes( $titleText, $timestamp ),
                        [
@@ -119,6 +119,8 @@ class TestRecentChangesHelper {
                                'rc_last_oldid' => $lastid,
                                'rc_cur_id' => $curid,
                                'rc_comment' => '[[:Testpage]] added to category',
+                               'rc_comment_text' => '[[:Testpage]] added to category',
+                               'rc_comment_data' => null,
                                'rc_old_len' => 0,
                                'rc_new_len' => 0,
                        ]
@@ -139,6 +141,8 @@ class TestRecentChangesHelper {
                        'rc_old_len' => 212,
                        'rc_new_len' => 188,
                        'rc_comment' => '',
+                       'rc_comment_text' => '',
+                       'rc_comment_data' => null,
                        'rc_minor' => 0,
                        'rc_bot' => 0,
                        'rc_type' => 0,