18 if ( !self::$randInt ) {
19 self::$randInt = mt_rand( 1, 0xFFFFFF );
21 return sprintf(
'%06x.%03x', self::$randInt, ++self::$counter );
38 "TestUser $testName $id",
44 $testUser->getUser()->clearInstanceCache();
61 $groups = array_unique( $groups );
63 $key = implode(
',', $groups );
65 $testUser = isset( self::$testUsers[$key] )
66 ? self::$testUsers[$key]
69 if ( !$testUser || !$testUser->getUser()->isLoggedIn() ) {
75 if ( $groups === [
'bureaucrat',
'sysop' ] ) {
77 $password =
'UTSysopPassword';
82 self::$testUsers[$key] = $testUser =
new TestUser(
91 $testUser->getUser()->clearInstanceCache();
92 return self::$testUsers[$key];
108 self::$testUsers = [];