API: Remove long-deprecated methods (and one class)
[lhc/web/wiklou.git] / tests / phpunit / includes / api / ApiErrorFormatterTest.php
index f36faf7..144586e 100644 (file)
@@ -526,10 +526,6 @@ class ApiErrorFormatterTest extends MediaWikiLangTestCase {
         * @param array $expect
         */
        public function testGetMessageFromException( $exception, $options, $expect ) {
-               if ( $exception instanceof UsageException ) {
-                       $this->hideDeprecated( 'UsageException::getMessageArray' );
-               }
-
                $result = new ApiResult( 8388608 );
                $formatter = new ApiErrorFormatter( $result, Language::factory( 'en' ), 'html', false );
 
@@ -555,10 +551,6 @@ 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 );
 
@@ -579,12 +571,6 @@ class ApiErrorFormatterTest extends MediaWikiLangTestCase {
        }
 
        public static function provideGetMessageFromException() {
-               Wikimedia\suppressWarnings();
-               $usageException = new UsageException(
-                       '<b>Something broke!</b>', 'ue-code', 0, [ 'xxx' => 'yyy', 'baz' => 23 ]
-               );
-               Wikimedia\restoreWarnings();
-
                return [
                        'Normal exception' => [
                                new RuntimeException( '<b>Something broke!</b>' ),
@@ -604,24 +590,6 @@ class ApiErrorFormatterTest extends MediaWikiLangTestCase {
                                        'data' => [ 'foo' => 'bar', 'baz' => 42 ],
                                ]
                        ],
-                       'UsageException' => [
-                               $usageException,
-                               [],
-                               [
-                                       'text' => '&#60;b&#62;Something broke!&#60;/b&#62;',
-                                       'code' => 'ue-code',
-                                       'data' => [ 'xxx' => 'yyy', 'baz' => 23 ],
-                               ]
-                       ],
-                       'UsageException, wrapped' => [
-                               $usageException,
-                               [ 'wrap' => 'parentheses', 'code' => 'some-code', 'data' => [ 'foo' => 'bar', 'baz' => 42 ] ],
-                               [
-                                       'text' => '(&#60;b&#62;Something broke!&#60;/b&#62;)',
-                                       'code' => 'some-code',
-                                       'data' => [ 'xxx' => 'yyy', 'baz' => 42, 'foo' => 'bar' ],
-                               ]
-                       ],
                        'LocalizedException' => [
                                new LocalizedException( [ 'returnto', '<b>FooBar</b>' ] ),
                                [],