X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Fapi%2FApiErrorFormatterTest.php;h=f36faf7fed8190169f74e69aa40ef7f056d3aa68;hb=7d2aea8f5b7dcfc101ade64e3c97b825624115f7;hp=d47481cbe4f006981fc99bbb1e9cd5c765aee349;hpb=89539f2aa1b158fdcc703ad053e2580cb97a6385;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/api/ApiErrorFormatterTest.php b/tests/phpunit/includes/api/ApiErrorFormatterTest.php index d47481cbe4..f36faf7fed 100644 --- a/tests/phpunit/includes/api/ApiErrorFormatterTest.php +++ b/tests/phpunit/includes/api/ApiErrorFormatterTest.php @@ -555,6 +555,10 @@ class ApiErrorFormatterTest extends MediaWikiLangTestCase { * @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 ); @@ -575,11 +579,11 @@ class ApiErrorFormatterTest extends MediaWikiLangTestCase { } public static function provideGetMessageFromException() { - MediaWiki\suppressWarnings(); + Wikimedia\suppressWarnings(); $usageException = new UsageException( 'Something broke!', 'ue-code', 0, [ 'xxx' => 'yyy', 'baz' => 23 ] ); - MediaWiki\restoreWarnings(); + Wikimedia\restoreWarnings(); return [ 'Normal exception' => [