Suppress deprecation warnings for b/c use of UsageException::getMessageArray()
authorC. Scott Ananian <cscott@cscott.net>
Mon, 24 Sep 2018 21:16:10 +0000 (17:16 -0400)
committerC. Scott Ananian <cscott@cscott.net>
Mon, 24 Sep 2018 21:18:00 +0000 (17:18 -0400)
Follow up to efaaa2c1d61964dffcd8427cf52568020f9067ea (which was a
follow up to Iae0e2ce3).

These are exposed when T191960 is fixed.

Change-Id: I7c517b5a7cccfe9c324d0a9eeb7d774aa1be8adb

tests/phpunit/includes/api/ApiErrorFormatterTest.php

index aa579ab..f36faf7 100644 (file)
@@ -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 );