35 $req->action = $action;
36 $info[$action] =
$req->getFieldInfo();
42 'No need to retype password on login' );
44 'Need to retype when creating new password' );
46 'Need to retype when changing password' );
48 $this->assertNotEquals(
51 'Password field for change is differentiated from login'
53 $this->assertNotEquals(
56 'Password field for change is differentiated from create'
58 $this->assertNotEquals(
61 'Retype field for change is differentiated from create'
67 'Empty request, login' => [
72 'Empty request, change' => [
77 'Empty request, remove' => [
82 'Username + password, login' => [
84 $data = [
'username' =>
'User',
'password' =>
'Bar' ],
87 'Username + password, change' => [
89 [
'username' =>
'User',
'password' =>
'Bar' ],
92 'Username + password + retype' => [
94 [
'username' =>
'User',
'password' =>
'Bar',
'retype' =>
'baz' ],
97 'Username empty, login' => [
99 [
'username' =>
'',
'password' =>
'Bar' ],
102 'Username empty, change' => [
104 [
'username' =>
'',
'password' =>
'Bar',
'retype' =>
'baz' ],
107 'Password empty, login' => [
109 [
'username' =>
'User',
'password' =>
'' ],
112 'Password empty, login, with retype' => [
114 [
'username' =>
'User',
'password' =>
'',
'retype' =>
'baz' ],
119 [
'username' =>
'User',
'password' =>
'Bar',
'retype' =>
'' ],
128 $req->username =
'UTSysop';
130 $this->assertInternalType(
'array',
$ret );
131 $this->assertArrayHasKey(
'provider',
$ret );
132 $this->assertInstanceOf( \Message::class,
$ret[
'provider'] );
133 $this->assertSame(
'authmanager-provider-password',
$ret[
'provider']->getKey() );
134 $this->assertArrayHasKey(
'account',
$ret );
135 $this->assertInstanceOf( \Message::class,
$ret[
'account'] );
136 $this->assertSame( [
'UTSysop' ],
$ret[
'account']->getParams() );
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