From ee96c8894ae8b272c41cd759423e01d16def4ae8 Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Sun, 24 Dec 2017 23:27:12 -0800 Subject: [PATCH 1/1] Add @covers tags to user tests Change-Id: I9ec5644e6b780937492eb5e0ea9e27ebad15ad43 --- tests/phpunit/includes/user/PasswordResetTest.php | 1 + tests/phpunit/includes/user/UserTest.php | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/tests/phpunit/includes/user/PasswordResetTest.php b/tests/phpunit/includes/user/PasswordResetTest.php index 68b79591f6..1f578ab0c8 100644 --- a/tests/phpunit/includes/user/PasswordResetTest.php +++ b/tests/phpunit/includes/user/PasswordResetTest.php @@ -3,6 +3,7 @@ use MediaWiki\Auth\AuthManager; /** + * @covers PasswordReset * @group Database */ class PasswordResetTest extends MediaWikiTestCase { diff --git a/tests/phpunit/includes/user/UserTest.php b/tests/phpunit/includes/user/UserTest.php index 2721c18e9f..f004e7913b 100644 --- a/tests/phpunit/includes/user/UserTest.php +++ b/tests/phpunit/includes/user/UserTest.php @@ -903,6 +903,9 @@ class UserTest extends MediaWikiTestCase { $block->delete(); } + /** + * @covers User::isPingLimitable + */ public function testIsPingLimitable() { $request = new FauxRequest(); $request->setIP( '1.2.3.4' ); @@ -939,6 +942,7 @@ class UserTest extends MediaWikiTestCase { } /** + * @covers User::getExperienceLevel * @dataProvider provideExperienceLevel */ public function testExperienceLevel( $editCount, $memberSince, $expLevel ) { @@ -968,6 +972,9 @@ class UserTest extends MediaWikiTestCase { $this->assertEquals( $expLevel, $user->getExperienceLevel() ); } + /** + * @covers User::getExperienceLevel + */ public function testExperienceLevelAnon() { $user = User::newFromName( '10.11.12.13', false ); -- 2.20.1