29 $wgPasswordPolicy[
'policies'][
'default'] += [
30 'MinimalPasswordLength' => 1,
31 'MinimalPasswordLengthToLogin' => 1,
36 $this->assertNotSame(
'', $ret1->password );
37 $this->assertNotSame(
'', $ret2->password );
38 $this->assertNotSame( $ret1->password, $ret2->password );
43 $this->assertNull(
$ret->password );
53 'Create, empty request' => [
58 'Create, mailpassword set' => [
60 [
'mailpassword' => 1 ],
69 $req->username =
'UTSysop';
71 $this->assertInternalType(
'array',
$ret );
72 $this->assertArrayHasKey(
'provider',
$ret );
73 $this->assertInstanceOf( \Message::class,
$ret[
'provider'] );
74 $this->assertSame(
'authmanager-provider-temporarypassword',
$ret[
'provider']->getKey() );
75 $this->assertArrayHasKey(
'account',
$ret );
76 $this->assertInstanceOf( \Message::class,
$ret[
'account'] );
77 $this->assertSame( [
'UTSysop' ],
$ret[
'account']->getParams() );
$wgPasswordPolicy
Password policy for local wiki users.
this hook is for auditing only $req
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses & $ret