* @param array $expect
*/
public function testGetMessageFromException_BC( $exception, $options, $expect ) {
+ if ( $exception instanceof UsageException ) {
+ $this->hideDeprecated( 'UsageException::getMessageArray' );
+ }
+
$result = new ApiResult( 8388608 );
$formatter = new ApiErrorFormatter_BackCompat( $result );
}
public static function provideGetMessageFromException() {
- MediaWiki\suppressWarnings();
+ Wikimedia\suppressWarnings();
$usageException = new UsageException(
'<b>Something broke!</b>', 'ue-code', 0, [ 'xxx' => 'yyy', 'baz' => 23 ]
);
- MediaWiki\restoreWarnings();
+ Wikimedia\restoreWarnings();
return [
'Normal exception' => [