Merge "build: Updating mediawiki/mediawiki-codesniffer to 15.0.0"
[lhc/web/wiklou.git] / tests / phpunit / includes / api / format / ApiFormatPhpTest.php
index 0028bbb..2d2e29b 100644 (file)
@@ -20,7 +20,7 @@ class ApiFormatPhpTest extends ApiFormatTestBase {
        }
 
        public static function provideGeneralEncoding() {
-               // @codingStandardsIgnoreStart Generic.Files.LineLength
+               // phpcs:disable Generic.Files.LineLength
                return array_merge(
                        self::addFormatVersion( 1, [
                                // Basic types
@@ -97,7 +97,7 @@ class ApiFormatPhpTest extends ApiFormatTestBase {
                                        'a:1:{s:3:"foo";s:3:"foo";}' ],
                        ] )
                );
-               // @codingStandardsIgnoreEnd
+               // phpcs:enable
        }
 
        public function testCrossDomainMangling() {
@@ -133,12 +133,10 @@ class ApiFormatPhpTest extends ApiFormatTestBase {
                        $printer->closePrinter();
                        ob_end_clean();
                        $this->fail( 'Expected exception not thrown' );
-               } catch ( UsageException $ex ) {
+               } catch ( ApiUsageException $ex ) {
                        ob_end_clean();
-                       $this->assertSame(
-                               'This response cannot be represented using format=php. ' .
-                                       'See https://phabricator.wikimedia.org/T68776',
-                               $ex->getMessage(),
+                       $this->assertTrue(
+                               $ex->getStatusValue()->hasMessage( 'apierror-formatphp' ),
                                'Expected exception'
                        );
                }