summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'UserMerge/tests/phpunit/MergeUserTest.php')
-rw-r--r--UserMerge/tests/phpunit/MergeUserTest.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/UserMerge/tests/phpunit/MergeUserTest.php b/UserMerge/tests/phpunit/MergeUserTest.php
index 6ae2e4e4..06d8a287 100644
--- a/UserMerge/tests/phpunit/MergeUserTest.php
+++ b/UserMerge/tests/phpunit/MergeUserTest.php
@@ -16,6 +16,7 @@ class MergeUserTest extends MediaWikiTestCase {
}
$user->setName( $name );
$user->addToDatabase();
+ SiteStatsUpdate::factory( [ 'users' => 1 ] )->doUpdate();
return $user;
}
@@ -28,6 +29,9 @@ class MergeUserTest extends MediaWikiTestCase {
$u = User::newFromName( $u->getName() );
}
+ /**
+ * @covers MergeUser::merge
+ */
public function testBasicMerge() {
$user1 = $this->getNewTestUser();
$user1->addToDatabase();
@@ -45,6 +49,9 @@ class MergeUserTest extends MediaWikiTestCase {
$this->assertEquals( 'baz', $user2->getOption( 'foo' ) );
}
+ /**
+ * @covers MergeUser::merge
+ */
public function testMergeOfUserGroups() {
$user1 = $this->getNewTestUser();
$user1->addGroup( 'group1' );
@@ -62,6 +69,9 @@ class MergeUserTest extends MediaWikiTestCase {
$this->assertArrayEquals( [ 'group1', 'group2' ], $user2->getGroups() );
}
+ /**
+ * @covers MergeUser::delete
+ */
public function testDeleteUser() {
$user1 = $this->getNewTestUser();
$user2 = $this->getNewTestUser();