X-Git-Url: http://git.cyclocoop.org/%28?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Fuser%2FUserTest.php;h=474decf2b0ec71526e11c9ff382d2acab0b44962;hb=8d9d8c8bb319482919d3d62732b9a0f689ede052;hp=a8989fbbaed83d367f5d11b15348b7efc9f359fc;hpb=d4b72572a6fd6b7549edb1fe123ef869e3db0e8a;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/user/UserTest.php b/tests/phpunit/includes/user/UserTest.php index a8989fbbae..474decf2b0 100644 --- a/tests/phpunit/includes/user/UserTest.php +++ b/tests/phpunit/includes/user/UserTest.php @@ -504,20 +504,24 @@ class UserTest extends MediaWikiTestCase { } /** + * @covers User::isRegistered * @covers User::isLoggedIn * @covers User::isAnon */ public function testLoggedIn() { $user = $this->getMutableTestUser()->getUser(); + $this->assertTrue( $user->isRegistered() ); $this->assertTrue( $user->isLoggedIn() ); $this->assertFalse( $user->isAnon() ); // Non-existent users are perceived as anonymous $user = User::newFromName( 'UTNonexistent' ); + $this->assertFalse( $user->isRegistered() ); $this->assertFalse( $user->isLoggedIn() ); $this->assertTrue( $user->isAnon() ); $user = new User; + $this->assertFalse( $user->isRegistered() ); $this->assertFalse( $user->isLoggedIn() ); $this->assertTrue( $user->isAnon() ); }