jenkins-bot has submitted this change and it was merged.

Change subject: Add tests for RecentChange::parse(To|From)RCType
......................................................................


Add tests for RecentChange::parse(To|From)RCType

Change-Id: I60278aaeef475ed3ec1515b1f5f28d6afcc700c5
---
M tests/phpunit/includes/changes/RecentChangeTest.php
1 file changed, 25 insertions(+), 0 deletions(-)

Approvals:
  Daniel Kinzler: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/tests/phpunit/includes/changes/RecentChangeTest.php 
b/tests/phpunit/includes/changes/RecentChangeTest.php
index beb911f..4d1a936 100644
--- a/tests/phpunit/includes/changes/RecentChangeTest.php
+++ b/tests/phpunit/includes/changes/RecentChangeTest.php
@@ -146,4 +146,29 @@
                $this->assertEquals( $expected, RecentChange::isInRCLifespan( 
$timestamp, $tolerance ) );
        }
 
+       public function provideRCTypes() {
+               return array(
+                       array( RC_EDIT, 'edit' ),
+                       array( RC_NEW, 'new' ),
+                       array( RC_LOG, 'log' ),
+                       array( RC_EXTERNAL, 'external' ),
+               );
+       }
+
+       /**
+        * @dataProvider provideRCTypes
+        * @covers RecentChange::parseFromRCType
+        */
+       public function testParseFromRCType( $rcType, $type ) {
+               $this->assertEquals( $type, RecentChange::parseFromRCType( 
$rcType ) );
+       }
+
+       /**
+        * @dataProvider provideRCTypes
+        * @covers RecentChange::parseToRCType
+        */
+       public function testParseToRCType( $rcType, $type ) {
+               $this->assertEquals( $rcType, RecentChange::parseToRCType( 
$type ) );
+       }
+
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I60278aaeef475ed3ec1515b1f5f28d6afcc700c5
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Addshore <[email protected]>
Gerrit-Reviewer: Aude <[email protected]>
Gerrit-Reviewer: Daniel Kinzler <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to