diff options
Diffstat (limited to 'UserMerge/tests')
-rw-r--r-- | UserMerge/tests/phan/config.php | 3 | ||||
-rw-r--r-- | UserMerge/tests/phpunit/MergeUserTest.php | 10 |
2 files changed, 13 insertions, 0 deletions
diff --git a/UserMerge/tests/phan/config.php b/UserMerge/tests/phan/config.php new file mode 100644 index 00000000..f2660b8a --- /dev/null +++ b/UserMerge/tests/phan/config.php @@ -0,0 +1,3 @@ +<?php + +return require __DIR__ . '/../../vendor/mediawiki/mediawiki-phan-config/src/config.php'; 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(); |