parent::setUp();
// Register LogHandler, see $wgNewUserLog in Setup.php
- $this->mergeMwGlobalArrayValue( 'wgLogActionsHandlers', array(
+ $this->mergeMwGlobalArrayValue( 'wgLogActionsHandlers', [
'newusers/newusers' => 'NewUsersLogFormatter',
'newusers/create' => 'NewUsersLogFormatter',
'newusers/create2' => 'NewUsersLogFormatter',
'newusers/byemail' => 'NewUsersLogFormatter',
'newusers/autocreate' => 'NewUsersLogFormatter',
- ) );
+ ] );
}
/**
* Do not change the existing data, just add a new database row
*/
public static function provideNewUsersLogDatabaseRows() {
- return array(
+ return [
// Only old logs
- array(
- array(
+ [
+ [
'type' => 'newusers',
'action' => 'newusers',
'comment' => 'newusers comment',
'user_text' => 'New user',
'namespace' => NS_USER,
'title' => 'New user',
- 'params' => array(),
- ),
- array(
+ 'params' => [],
+ ],
+ [
'legacy' => true,
'text' => 'User account New user was created',
- 'api' => array(),
- ),
- ),
- );
+ 'api' => [],
+ ],
+ ],
+ ];
}
/**
* Do not change the existing data, just add a new database row
*/
public static function provideCreateLogDatabaseRows() {
- return array(
+ return [
// Current format
- array(
- array(
+ [
+ [
'type' => 'newusers',
'action' => 'create',
'comment' => 'newusers comment',
'user_text' => 'New user',
'namespace' => NS_USER,
'title' => 'New user',
- 'params' => array(
+ 'params' => [
'4::userid' => 1,
- ),
- ),
- array(
+ ],
+ ],
+ [
'text' => 'User account New user was created',
- 'api' => array(
+ 'api' => [
'userid' => 1,
- ),
- ),
- ),
- );
+ ],
+ ],
+ ],
+ ];
}
/**
* Do not change the existing data, just add a new database row
*/
public static function provideCreate2LogDatabaseRows() {
- return array(
+ return [
// Current format
- array(
- array(
+ [
+ [
'type' => 'newusers',
'action' => 'create2',
'comment' => 'newusers comment',
'user_text' => 'User',
'namespace' => NS_USER,
'title' => 'UTSysop',
- 'params' => array(
+ 'params' => [
'4::userid' => 1,
- ),
- ),
- array(
+ ],
+ ],
+ [
'text' => 'User account UTSysop was created by User',
- 'api' => array(
+ 'api' => [
'userid' => 1,
- ),
- ),
- ),
- );
+ ],
+ ],
+ ],
+ ];
}
/**
* Do not change the existing data, just add a new database row
*/
public static function provideByemailLogDatabaseRows() {
- return array(
+ return [
// Current format
- array(
- array(
+ [
+ [
'type' => 'newusers',
'action' => 'byemail',
'comment' => 'newusers comment',
'user_text' => 'Sysop',
'namespace' => NS_USER,
'title' => 'UTSysop',
- 'params' => array(
+ 'params' => [
'4::userid' => 1,
- ),
- ),
- array(
+ ],
+ ],
+ [
'text' => 'User account UTSysop was created by Sysop and password was sent by email',
- 'api' => array(
+ 'api' => [
'userid' => 1,
- ),
- ),
- ),
- );
+ ],
+ ],
+ ],
+ ];
}
/**
* Do not change the existing data, just add a new database row
*/
public static function provideAutocreateLogDatabaseRows() {
- return array(
+ return [
// Current format
- array(
- array(
+ [
+ [
'type' => 'newusers',
'action' => 'autocreate',
'comment' => 'newusers comment',
'user_text' => 'New user',
'namespace' => NS_USER,
'title' => 'New user',
- 'params' => array(
+ 'params' => [
'4::userid' => 1,
- ),
- ),
- array(
+ ],
+ ],
+ [
'text' => 'User account New user was created automatically',
- 'api' => array(
+ 'api' => [
'userid' => 1,
- ),
- ),
- ),
- );
+ ],
+ ],
+ ],
+ ];
}
/**