<exclude-pattern>maintenance/doMaintenance\.php</exclude-pattern>
<exclude-pattern>maintenance/mergeMessageFileList\.php</exclude-pattern>
<exclude-pattern>maintenance/commandLine\.inc</exclude-pattern>
+ <exclude-pattern>tests/phpunit/MediaWikiIntegrationTestCase\.php</exclude-pattern>
</rule>
<rule ref="Generic.Files.LineLength">
<exclude-pattern>*/languages/messages/Messages*\.php</exclude-pattern>
*
* @param string $key A key such as "rev_user" identifying the actor
* field being fetched.
- * @return array With three keys:
+ * @return array[] With three keys:
* - tables: (string[]) to include in the `$table` to `IDatabase->select()`
* - fields: (string[]) to include in the `$vars` to `IDatabase->select()`
* - joins: (array) to include in the `$join_conds` to `IDatabase->select()`
* All tables, fields, and joins are aliased, so `+` is safe to use.
+ * @phan-return array{tables:string[],fields:string[],joins:array}
*/
public function getJoin( $key ) {
if ( !isset( $this->joinCache[$key] ) ) {
* @since 1.31 Method signature changed, $key parameter added (with deprecated back compat)
* @param string|null $key A key such as "rev_comment" identifying the comment
* field being fetched.
- * @return array With three keys:
+ * @return array[] With three keys:
* - tables: (string[]) to include in the `$table` to `IDatabase->select()`
* - fields: (string[]) to include in the `$vars` to `IDatabase->select()`
* - joins: (array) to include in the `$join_conds` to `IDatabase->select()`
/** $var array Map of web UI block messages to corresponding API messages and codes */
private static $blockMsgMap = [
'blockedtext' => [ 'apierror-blocked', 'blocked' ],
- 'blockedtext-partial' => [ 'apierror-blocked', 'blocked' ],
+ 'blockedtext-partial' => [ 'apierror-blocked-partial', 'blocked' ],
'autoblockedtext' => [ 'apierror-autoblocked', 'autoblocked' ],
'systemblockedtext' => [ 'apierror-systemblocked', 'blocked' ],
+ 'blockedtext-composite' => [ 'apierror-blocked', 'blocked' ],
];
/** @var ApiMain */
'badipaddress' => 'invalidip',
'blankpage' => 'emptypage',
'blockedtext' => 'blocked',
+ 'blockedtext-composite' => 'blocked',
+ 'blockedtext-partial' => 'blocked',
'cannotdelete' => 'cantdelete',
'cannotundelete' => 'cantundelete',
'cantmove-titleprotected' => 'protectedtitle',
}
public static function setUpBeforeClass() {
+ global $IP;
parent::setUpBeforeClass();
+ if ( !file_exists( "$IP/LocalSettings.php" ) ) {
+ echo 'A working MediaWiki installation with a configured LocalSettings.php file is'
+ . ' required for tests that extend ' . self::class;
+ die();
+ }
self::initializeForStandardPhpunitEntrypointIfNeeded();
// Get the original service locator