MediaWiki
1.30.0
|
Wraps the user object, so we can also retain full access to properties like password if we log in via the API. More...
Public Member Functions | |
__construct ( $username, $realname='Real Name', $email='sample @example.com', $groups=[]) | |
getPassword () | |
getUser () | |
Static Public Member Functions | |
static | setPasswordForUser (User $user, $password) |
Set the password on a testing user. More... | |
Private Member Functions | |
assertNotReal () | |
setEmail ( $email) | |
setPassword ( $password) | |
setRealName ( $realname) | |
Private Attributes | |
string | $password |
User | $user |
string | $username |
Wraps the user object, so we can also retain full access to properties like password if we log in via the API.
Definition at line 7 of file TestUser.php.
TestUser::__construct | ( | $username, | |
$realname = 'Real Name' , |
|||
$email = 'sample@example.com' , |
|||
$groups = [] |
|||
) |
Definition at line 32 of file TestUser.php.
References $username, as, assertNotReal(), User\createNew(), User\newFromName(), setEmail(), setPassword(), setRealName(), and user.
|
private |
Definition at line 23 of file TestUser.php.
References $wgDBprefix, MediaWikiTestCase\DB_PREFIX, global, and MediaWikiTestCase\ORA_DB_PREFIX.
Referenced by __construct().
TestUser::getPassword | ( | ) |
TestUser::getUser | ( | ) |
|
private |
string |
Definition at line 102 of file TestUser.php.
References user.
Referenced by __construct().
|
private |
string | $password |
Definition at line 114 of file TestUser.php.
References setPasswordForUser(), and user.
Referenced by __construct().
|
static |
Set the password on a testing user.
This assumes we're still using the generic AuthManager config from PHPUnitMaintClass::finalSetup(), and just sets the password in the database directly.
User | $user | |
string | $password |
Definition at line 127 of file TestUser.php.
References $password, $user, DB_MASTER, User\getId(), RequestContext\getMain(), and wfGetDB().
Referenced by UserWrapper\__construct(), BlockTest\addDBData(), ApiBlockTest\addDBDataOnce(), MediaWiki\Auth\CheckBlocksSecondaryAuthenticationProviderTest\getBlockedUser(), setPassword(), BlockTest\testBlockedUserCanNotCreateAccount(), MediaWiki\Auth\AuthManagerTest\testCheckAccountCreatePermissions(), BlockTest\testDeprecatedConstructor(), and MediaWiki\Auth\CheckBlocksSecondaryAuthenticationProviderTest\testRangeBlock().
|
private |
string | $realname |
Definition at line 89 of file TestUser.php.
References user.
Referenced by __construct().
|
private |
Definition at line 16 of file TestUser.php.
Referenced by getPassword(), and setPasswordForUser().
|
private |
Definition at line 21 of file TestUser.php.
Referenced by getUser(), and setPasswordForUser().
|
private |
Definition at line 11 of file TestUser.php.
Referenced by __construct().