Merge "Add missing @covers to backend related tests"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Sat, 2 Feb 2019 23:20:26 +0000 (23:20 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Sat, 2 Feb 2019 23:20:26 +0000 (23:20 +0000)
41 files changed:
.phpcs.xml
RELEASE-NOTES-1.33
autoload.php
includes/exception/ILocalizedException.php [new file with mode: 0644]
includes/exception/LocalizedException.php
includes/skins/BaseTemplate.php
includes/skins/QuickTemplate.php
includes/specials/SpecialMediaStatistics.php
includes/specials/SpecialTags.php
includes/specials/SpecialTrackingCategories.php
maintenance/updateCredits.php
package.json
resources/Resources.php
resources/src/jquery.tablesorter.styles/images/sort_both.png [new file with mode: 0644]
resources/src/jquery.tablesorter.styles/images/sort_both.svg [new file with mode: 0644]
resources/src/jquery.tablesorter.styles/images/sort_down.png [new file with mode: 0644]
resources/src/jquery.tablesorter.styles/images/sort_down.svg [new file with mode: 0644]
resources/src/jquery.tablesorter.styles/images/sort_up.png [new file with mode: 0644]
resources/src/jquery.tablesorter.styles/images/sort_up.svg [new file with mode: 0644]
resources/src/jquery.tablesorter.styles/jquery.tablesorter.styles.less [new file with mode: 0644]
resources/src/jquery.tablesorter/images/sort_both.png [deleted file]
resources/src/jquery.tablesorter/images/sort_both.svg [deleted file]
resources/src/jquery.tablesorter/images/sort_down.png [deleted file]
resources/src/jquery.tablesorter/images/sort_down.svg [deleted file]
resources/src/jquery.tablesorter/images/sort_up.png [deleted file]
resources/src/jquery.tablesorter/images/sort_up.svg [deleted file]
resources/src/jquery.tablesorter/jquery.tablesorter.less [deleted file]
resources/src/jquery/jquery.makeCollapsible.js
resources/src/jquery/jquery.suggestions.js
resources/src/mediawiki.inspect.js
resources/src/mediawiki.notification/notification.js
resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js
resources/src/mediawiki.special.apisandbox/apisandbox.js
resources/src/mediawiki.special.userrights.js
tests/phpunit/includes/content/WikitextContentTest.php
tests/phpunit/includes/db/DatabaseSqliteTest.php
tests/phpunit/includes/libs/rdbms/database/DatabaseMysqlBaseTest.php
tests/phpunit/includes/libs/rdbms/database/DatabaseSQLTest.php
tests/phpunit/includes/parser/ParserOutputTest.php
tests/phpunit/includes/parser/TidyTest.php
tests/phpunit/includes/specials/SpecialBlockTest.php

index 3978c2a..61307aa 100644 (file)
@@ -82,7 +82,6 @@
                <exclude-pattern>*/includes/jobqueue/JobSpecification\.php</exclude-pattern>
                <exclude-pattern>*/includes/RevisionList\.php</exclude-pattern>
                <exclude-pattern>*/includes/installer/PhpBugTests\.php</exclude-pattern>
-               <exclude-pattern>*/includes/exception/LocalizedException\.php</exclude-pattern>
                <exclude-pattern>*/includes/specials/SpecialMostinterwikis\.php</exclude-pattern>
                <exclude-pattern>*/includes/cache/CacheDependency\.php</exclude-pattern>
                <exclude-pattern>*/includes/cache/CacheHelper\.php</exclude-pattern>
                <exclude-pattern>*/includes/deferred/CdnCacheUpdate\.php</exclude-pattern>
                <exclude-pattern>*/includes/diff/DairikiDiff\.php</exclude-pattern>
                <exclude-pattern>*/includes/diff/DiffEngine\.php</exclude-pattern>
-               <exclude-pattern>*/includes/exception/LocalizedException\.php</exclude-pattern>
                <exclude-pattern>*/includes/Feed\.php</exclude-pattern>
                <exclude-pattern>*/includes/filerepo/file/LocalFile\.php</exclude-pattern>
                <exclude-pattern>*/includes/gallery/PackedOverlayImageGallery\.php</exclude-pattern>
index 436d1a3..5c4832a 100644 (file)
@@ -220,6 +220,8 @@ because of Phabricator reports.
 * (T209699) The jquery.async module has been deprecated. JavaScript code that
   needs asynchronous behaviour should use Promises.
 * Password::equals() is deprecated, use verify().
+* BaseTemplate::msgWiki() and QuickTemplate::msgWiki() will be removed. Use
+  other means to fetch a properly escaped message string or Message object.
 
 === Other changes in 1.33 ===
 * (T208871) The hard-coded Google search form on the database error page was
index 0d17916..2559552 100644 (file)
@@ -648,7 +648,7 @@ $wgAutoloadLocalClasses = [
        'IEUrlExtension' => __DIR__ . '/includes/libs/IEUrlExtension.php',
        'IExpiringStore' => __DIR__ . '/includes/libs/objectcache/IExpiringStore.php',
        'IJobSpecification' => __DIR__ . '/includes/jobqueue/JobSpecification.php',
-       'ILocalizedException' => __DIR__ . '/includes/exception/LocalizedException.php',
+       'ILocalizedException' => __DIR__ . '/includes/exception/ILocalizedException.php',
        'IMaintainableDatabase' => __DIR__ . '/includes/libs/rdbms/database/IMaintainableDatabase.php',
        'IP' => __DIR__ . '/includes/libs/IP.php',
        'IPTC' => __DIR__ . '/includes/media/IPTC.php',
diff --git a/includes/exception/ILocalizedException.php b/includes/exception/ILocalizedException.php
new file mode 100644 (file)
index 0000000..048da42
--- /dev/null
@@ -0,0 +1,33 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
+
+/**
+ * Interface for MediaWiki-localized exceptions
+ *
+ * @since 1.29
+ * @ingroup Exception
+ */
+interface ILocalizedException {
+       /**
+        * Return a Message object for this exception
+        * @return Message
+        */
+       public function getMessageObject();
+}
index c0182d5..082d665 100644 (file)
  * @file
  */
 
-/**
- * Interface for MediaWiki-localized exceptions
- *
- * @since 1.29
- * @ingroup Exception
- */
-interface ILocalizedException {
-       /**
-        * Return a Message object for this exception
-        * @return Message
-        */
-       public function getMessageObject();
-}
-
 /**
  * Basic localized exception.
  *
index a71daa0..02247bd 100644 (file)
@@ -46,7 +46,7 @@ abstract class BaseTemplate extends QuickTemplate {
        /**
         * @param string $str
         * @warning You should never use this method. I18n messages should be escaped
-        * @deprecated 1.32 Use ->msg() or ->msgWiki() instead.
+        * @deprecated 1.32 Use ->msg() or ->getMsg() instead.
         * @suppress SecurityCheck-XSS
         * @return-taint exec_html
         */
@@ -55,7 +55,11 @@ abstract class BaseTemplate extends QuickTemplate {
                echo $this->getMsg( $str )->text();
        }
 
+       /**
+        * @deprecated since 1.33 Use ->msg() or ->getMsg() instead.
+        */
        function msgWiki( $str ) {
+               // TODO: Add wfDeprecated( __METHOD__, '1.33' ) after 1.33 got released
                echo $this->getMsg( $str )->parseAsBlock();
        }
 
index 06d0f7b..1e688eb 100644 (file)
@@ -129,7 +129,7 @@ abstract class QuickTemplate {
         * @private
         * @param string $msgKey
         * @warning You should never use this method. I18n messages should be escaped
-        * @deprecated 1.32 Use ->msg() or ->msgWiki() instead.
+        * @deprecated 1.32 Use ->msg() instead.
         * @suppress SecurityCheck-XSS
         * @return-taint exec_html
         */
@@ -140,10 +140,11 @@ abstract class QuickTemplate {
 
        /**
         * An ugly, ugly hack.
-        * @private
+        * @deprecated since 1.33 Use ->msg() instead.
         * @param string $msgKey
         */
        function msgWiki( $msgKey ) {
+               // TODO: Add wfDeprecated( __METHOD__, '1.33' ) after 1.33 got released
                global $wgOut;
 
                $text = wfMessage( $msgKey )->plain();
index 873decb..a56a745 100644 (file)
@@ -261,7 +261,10 @@ class MediaStatisticsPage extends QueryPage {
         * @param string $mediaType
         */
        protected function outputTableStart( $mediaType ) {
-               $this->getOutput()->addHTML(
+               $out = $this->getOutput();
+               $out->addModuleStyles( 'jquery.tablesorter.styles' );
+               $out->addModules( 'jquery.tablesorter' );
+               $out->addHTML(
                        Html::openElement(
                                'table',
                                [ 'class' => [
index fe8fa19..0c74e76 100644 (file)
@@ -165,6 +165,8 @@ class SpecialTags extends SpecialPage {
                        }
                }
 
+               $out->addModuleStyles( 'jquery.tablesorter.styles' );
+               $out->addModules( 'jquery.tablesorter' );
                $out->addHTML( Xml::tags(
                        'table',
                        [ 'class' => 'mw-datatable sortable mw-tags-table' ],
index 4a586b7..1afbb5e 100644 (file)
@@ -40,6 +40,8 @@ class SpecialTrackingCategories extends SpecialPage {
                $this->setHeaders();
                $this->outputHeader();
                $this->getOutput()->allowClickjacking();
+               $this->getOutput()->addModuleStyles( 'jquery.tablesorter.styles' );
+               $this->getOutput()->addModules( 'jquery.tablesorter' );
                $this->getOutput()->addHTML(
                        Html::openElement( 'table', [ 'class' => 'mw-datatable sortable',
                                'id' => 'mw-trackingcategories-table' ] ) . "\n" .
index b7e8c1c..25ce3ce 100644 (file)
@@ -26,6 +26,12 @@ if ( PHP_SAPI != 'cli' ) {
        die( "This script can only be run from the command line.\n" );
 }
 
+// class Collator is provided by the intl extension.
+// It is only suggested in composer.json, so remind here when not loaded.
+if ( !extension_loaded( 'intl' ) ) {
+       die( "This script needs the 'intl' extension to be loaded." );
+}
+
 $CREDITS = 'CREDITS';
 $START_CONTRIBUTORS = '<!-- BEGIN CONTRIBUTOR LIST -->';
 $END_CONTRIBUTORS = '<!-- END CONTRIBUTOR LIST -->';
index c0570cf..5b65a09 100644 (file)
@@ -10,7 +10,7 @@
     "selenium-test": "wdio ./tests/selenium/wdio.conf.js"
   },
   "devDependencies": {
-    "eslint-config-wikimedia": "0.10.0",
+    "eslint-config-wikimedia": "0.10.1",
     "grunt": "1.0.3",
     "grunt-banana-checker": "0.6.0",
     "grunt-contrib-copy": "1.0.0",
index 9464cf7..83f11f8 100644 (file)
@@ -320,13 +320,17 @@ return [
        'jquery.tablesorter' => [
                'targets' => [ 'desktop', 'mobile' ],
                'scripts' => 'resources/src/jquery.tablesorter/jquery.tablesorter.js',
-               'styles' => 'resources/src/jquery.tablesorter/jquery.tablesorter.less',
                'messages' => [ 'sort-descending', 'sort-ascending' ],
                'dependencies' => [
+                       'jquery.tablesorter.styles',
                        'mediawiki.RegExp',
                        'mediawiki.language.months',
                ],
        ],
+       'jquery.tablesorter.styles' => [
+               'targets' => [ 'desktop', 'mobile' ],
+               'styles' => 'resources/src/jquery.tablesorter.styles/jquery.tablesorter.styles.less',
+       ],
        'jquery.textSelection' => [
                'scripts' => 'resources/src/jquery/jquery.textSelection.js',
                'dependencies' => 'jquery.client',
diff --git a/resources/src/jquery.tablesorter.styles/images/sort_both.png b/resources/src/jquery.tablesorter.styles/images/sort_both.png
new file mode 100644 (file)
index 0000000..fc63091
Binary files /dev/null and b/resources/src/jquery.tablesorter.styles/images/sort_both.png differ
diff --git a/resources/src/jquery.tablesorter.styles/images/sort_both.svg b/resources/src/jquery.tablesorter.styles/images/sort_both.svg
new file mode 100644 (file)
index 0000000..872a8db
--- /dev/null
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" width="21" height="9" viewBox="0 0 21 9">
+       <path d="M14.5 5l-4 4-4-4zM14.5 4l-4-4-4 4z"/>
+</svg>
diff --git a/resources/src/jquery.tablesorter.styles/images/sort_down.png b/resources/src/jquery.tablesorter.styles/images/sort_down.png
new file mode 100644 (file)
index 0000000..ce04a0f
Binary files /dev/null and b/resources/src/jquery.tablesorter.styles/images/sort_down.png differ
diff --git a/resources/src/jquery.tablesorter.styles/images/sort_down.svg b/resources/src/jquery.tablesorter.styles/images/sort_down.svg
new file mode 100644 (file)
index 0000000..452606a
--- /dev/null
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" width="21" height="4" viewBox="0 0 21 4">
+       <path d="M14.5 0l-4 4-4-4z"/>
+</svg>
diff --git a/resources/src/jquery.tablesorter.styles/images/sort_up.png b/resources/src/jquery.tablesorter.styles/images/sort_up.png
new file mode 100644 (file)
index 0000000..2ebe071
Binary files /dev/null and b/resources/src/jquery.tablesorter.styles/images/sort_up.png differ
diff --git a/resources/src/jquery.tablesorter.styles/images/sort_up.svg b/resources/src/jquery.tablesorter.styles/images/sort_up.svg
new file mode 100644 (file)
index 0000000..38f6374
--- /dev/null
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" width="21" height="4" viewBox="0 0 21 4">
+       <path d="M6.5 4l4-4 4 4z"/>
+</svg>
diff --git a/resources/src/jquery.tablesorter.styles/jquery.tablesorter.styles.less b/resources/src/jquery.tablesorter.styles/jquery.tablesorter.styles.less
new file mode 100644 (file)
index 0000000..c941da0
--- /dev/null
@@ -0,0 +1,22 @@
+@import 'mediawiki.mixins';
+
+/* Table Sorting */
+
+.client-js .sortable:not( .jquery-tablesorter ) > thead > :last-of-type > th:not( .unsortable ),
+.jquery-tablesorter th.headerSort {
+       .background-image-svg( 'images/sort_both.svg', 'images/sort_both.png' );
+       cursor: pointer;
+       background-repeat: no-repeat;
+       background-position: center right;
+       padding-right: 21px;
+}
+
+.jquery-tablesorter {
+       th.headerSortUp {
+               .background-image-svg( 'images/sort_up.svg', 'images/sort_up.png' );
+       }
+
+       th.headerSortDown {
+               .background-image-svg( 'images/sort_down.svg', 'images/sort_down.png' );
+       }
+}
diff --git a/resources/src/jquery.tablesorter/images/sort_both.png b/resources/src/jquery.tablesorter/images/sort_both.png
deleted file mode 100644 (file)
index fc63091..0000000
Binary files a/resources/src/jquery.tablesorter/images/sort_both.png and /dev/null differ
diff --git a/resources/src/jquery.tablesorter/images/sort_both.svg b/resources/src/jquery.tablesorter/images/sort_both.svg
deleted file mode 100644 (file)
index 872a8db..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="21" height="9" viewBox="0 0 21 9">
-       <path d="M14.5 5l-4 4-4-4zM14.5 4l-4-4-4 4z"/>
-</svg>
diff --git a/resources/src/jquery.tablesorter/images/sort_down.png b/resources/src/jquery.tablesorter/images/sort_down.png
deleted file mode 100644 (file)
index ce04a0f..0000000
Binary files a/resources/src/jquery.tablesorter/images/sort_down.png and /dev/null differ
diff --git a/resources/src/jquery.tablesorter/images/sort_down.svg b/resources/src/jquery.tablesorter/images/sort_down.svg
deleted file mode 100644 (file)
index 452606a..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="21" height="4" viewBox="0 0 21 4">
-       <path d="M14.5 0l-4 4-4-4z"/>
-</svg>
diff --git a/resources/src/jquery.tablesorter/images/sort_up.png b/resources/src/jquery.tablesorter/images/sort_up.png
deleted file mode 100644 (file)
index 2ebe071..0000000
Binary files a/resources/src/jquery.tablesorter/images/sort_up.png and /dev/null differ
diff --git a/resources/src/jquery.tablesorter/images/sort_up.svg b/resources/src/jquery.tablesorter/images/sort_up.svg
deleted file mode 100644 (file)
index 38f6374..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="21" height="4" viewBox="0 0 21 4">
-       <path d="M6.5 4l4-4 4 4z"/>
-</svg>
diff --git a/resources/src/jquery.tablesorter/jquery.tablesorter.less b/resources/src/jquery.tablesorter/jquery.tablesorter.less
deleted file mode 100644 (file)
index ce24b0d..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-@import 'mediawiki.mixins';
-
-/* Table Sorting */
-
-table.jquery-tablesorter {
-       th.headerSort {
-               .background-image-svg( 'images/sort_both.svg', 'images/sort_both.png' );
-               cursor: pointer;
-               background-repeat: no-repeat;
-               background-position: center right;
-               padding-right: 21px;
-       }
-
-       th.headerSortUp {
-               .background-image-svg( 'images/sort_up.svg', 'images/sort_up.png' );
-       }
-
-       th.headerSortDown {
-               .background-image-svg( 'images/sort_down.svg', 'images/sort_down.png' );
-       }
-}
index f5f0475..09306f6 100644 (file)
@@ -82,7 +82,6 @@
                        }
                }
 
-               // eslint-disable-next-line jquery/no-animate-toggle
                $containers.toggle( action === 'expand' );
                hookCallback();
        }
index 01d2ba5..d9a094c 100644 (file)
                                // Only fetch if the value in the textbox changed and is not empty, or if the results were hidden
                                // if the textbox is empty then clear the result div, but leave other settings intouched
                                if ( val.length === 0 ) {
-                                       // eslint-disable-next-line jquery/no-animate-toggle
                                        $.suggestions.hide( context );
                                        context.data.prevText = '';
                                } else if (
                                        if ( context.data !== undefined ) {
                                                if ( context.data.$textbox.val().length === 0 ) {
                                                        // Hide the div when no suggestion exist
-                                                       // eslint-disable-next-line jquery/no-animate-toggle
                                                        $.suggestions.hide( context );
                                                } else {
                                                        // Rebuild the suggestions list
                                        break;
                                // Escape
                                case 27:
-                                       // eslint-disable-next-line jquery/no-animate-toggle
                                        $.suggestions.hide( context );
                                        $.suggestions.restore( context );
                                        $.suggestions.cancel( context );
                                case 13:
                                        preventDefault = wasVisible;
                                        selected = context.data.$container.find( '.suggestions-result-current' );
-                                       // eslint-disable-next-line jquery/no-animate-toggle
                                        $.suggestions.hide( context );
                                        if ( selected.length === 0 || context.data.selectedWithMouse ) {
                                                // If nothing is selected or if something was selected with the mouse
                                                                        // This will hide the link we're just clicking on, which causes problems
                                                                        // when done synchronously in at least Firefox 3.6 (T64858).
                                                                        setTimeout( function () {
-                                                                               // eslint-disable-next-line jquery/no-animate-toggle
                                                                                $.suggestions.hide( context );
                                                                        } );
                                                                }
                                                                        // This will hide the link we're just clicking on, which causes problems
                                                                        // when done synchronously in at least Firefox 3.6 (T64858).
                                                                        setTimeout( function () {
-                                                                               // eslint-disable-next-line jquery/no-animate-toggle
                                                                                $.suggestions.hide( context );
                                                                        } );
                                                                }
                                        } )
                                        .on( 'keypress', function ( e ) {
                                                context.data.keypressedCount++;
-                                               // eslint-disable-next-line jquery/no-event-shorthand
                                                $.suggestions.keypress( e, context, context.data.keypressed );
                                        } )
                                        .on( 'keyup', function ( e ) {
                                                        e.which === context.data.keypressed &&
                                                        allowed.indexOf( e.which ) !== -1
                                                ) {
-                                                       // eslint-disable-next-line jquery/no-event-shorthand
                                                        $.suggestions.keypress( e, context, context.data.keypressed );
                                                }
                                        } )
                                                if ( context.data.mouseDownOn.length > 0 ) {
                                                        return;
                                                }
-                                               // eslint-disable-next-line jquery/no-animate-toggle
                                                $.suggestions.hide( context );
                                                $.suggestions.cancel( context );
                                        } );
index 72a27fa..849ccbc 100644 (file)
                } );
        }
 
-       function humanSize( bytes ) {
+       function humanSize( bytesInput ) {
                var i,
+                       bytes = +bytesInput,
                        units = [ '', ' KiB', ' MiB', ' GiB', ' TiB', ' PiB' ];
 
-               if ( !$.isNumeric( bytes ) || bytes === 0 ) {
-                       return bytes;
+               if ( bytes === 0 || isNaN( bytes ) ) {
+                       return bytesInput;
                }
 
                for ( i = 0; bytes >= 1024; bytes /= 1024 ) {
index 2765d07..e8450df 100644 (file)
                                        $area.css( 'display', 'none' );
                                        notif.$notification.remove();
                                } else {
+                                       // FIXME: Use CSS transition
+                                       // eslint-disable-next-line jquery/no-slide
                                        notif.$notification.slideUp( 'fast', function () {
                                                $( this ).remove();
                                        } );
index 1651432..6eb8867 100644 (file)
                                        title: '', // Because it's a hidden group, this title actually appears nowhere
                                        hidden: true,
                                        allowArbitrary: true,
+                                       // FIXME: $.isNumeric is deprecated
                                        validate: $.isNumeric,
                                        range: {
                                                min: 0, // The server normalizes negative numbers to 0 results
                                        title: '', // Because it's a hidden group, this title actually appears nowhere
                                        hidden: true,
                                        allowArbitrary: true,
+                                       // FIXME: $.isNumeric is deprecated
                                        validate: $.isNumeric,
                                        range: {
                                                min: 0,
         * @param {number|string} newValue New value
         */
        mw.rcfilters.Controller.prototype.updateNumericPreference = function ( prefName, newValue ) {
+               // FIXME: $.isNumeric is deprecated
+               // eslint-disable-next-line jquery/no-is-numeric
                if ( !$.isNumeric( newValue ) ) {
                        return;
                }
index 19eac98..68c7ddc 100644 (file)
                        // OO.ui.ButtonWidget doesn't take focus itself (T128054)
                        $focus = $( '#mw-apisandbox-ui' ).find( document.activeElement );
                        if ( $focus.length ) {
-                               // eslint-disable-next-line jquery/no-event-shorthand
                                $focus[ 0 ].blur();
                        }
 
                                }
 
                                that.deprecatedItemsFieldset = new OO.ui.FieldsetLayout().addItems( deprecatedItems ).toggle( false );
-                               // eslint-disable-next-line jquery/no-animate-toggle
                                tmp = $( '<fieldset>' )
                                        .toggle( !that.deprecatedItemsFieldset.isEmpty() )
                                        .append(
index 63d9623..a4f5d1a 100644 (file)
@@ -12,7 +12,6 @@
 
        // Dynamically show/hide the "other time" input under each dropdown
        $( '.mw-userrights-nested select' ).on( 'change', function ( e ) {
-               // eslint-disable-next-line jquery/no-animate-toggle
                $( e.target.parentNode ).find( 'input' ).toggle( $( e.target ).val() === 'other' );
        } );
 
index f689cae..2fc7794 100644 (file)
@@ -360,6 +360,10 @@ just a test"
                $this->assertEquals( CONTENT_MODEL_WIKITEXT, $content->getContentHandler()->getModelID() );
        }
 
+       /**
+        * @covers ParserOptions::getRedirectTarget
+        * @covers ParserOptions::setRedirectTarget
+        */
        public function testRedirectParserOption() {
                $title = Title::newFromText( 'testRedirectParserOption' );
 
index eebb045..e61bd05 100644 (file)
@@ -474,6 +474,9 @@ class DatabaseSqliteTest extends MediaWikiTestCase {
                return $indexes;
        }
 
+       /**
+        * @coversNothing
+        */
        public function testCaseInsensitiveLike() {
                // TODO: Test this for all databases
                $db = DatabaseSqlite::newStandaloneInstance( ':memory:' );
index b7dbe0b..4c92545 100644 (file)
@@ -672,7 +672,7 @@ class DatabaseMysqlBaseTest extends PHPUnit\Framework\TestCase {
                $this->assertSame( 'CAST( fieldName AS SIGNED )', $output );
        }
 
-       /*
+       /**
         * @covers Wikimedia\Rdbms\Database::setIndexAliases
         */
        public function testIndexAliases() {
index 4a9603c..d1d1aa3 100644 (file)
@@ -740,6 +740,10 @@ class DatabaseSQLTest extends PHPUnit\Framework\TestCase {
                ];
        }
 
+       /**
+        * @covers Wikimedia\Rdbms\Database::insertSelect
+        * @covers Wikimedia\Rdbms\Database::nativeInsertSelect
+        */
        public function testInsertSelectBatching() {
                $dbWeb = new DatabaseTestHelper( __CLASS__, [ 'cliMode' => false ] );
                $rows = [];
@@ -1874,6 +1878,7 @@ class DatabaseSQLTest extends PHPUnit\Framework\TestCase {
 
        /**
         * @expectedException \Wikimedia\Rdbms\DBTransactionStateError
+        * @covers \Wikimedia\Rdbms\Database::assertTransactionStatus
         */
        public function testTransactionErrorState1() {
                $wrapper = TestingAccessWrapper::newFromObject( $this->database );
index 390ea41..cb8257c 100644 (file)
@@ -849,6 +849,11 @@ EOF
                $this->assertFieldValues( $a, $expected );
        }
 
+       /**
+        * @covers ParserOutput::mergeInternalMetaDataFrom
+        * @covers ParserOutput::getTimes
+        * @covers ParserOutput::resetParseStartTime
+        */
        public function testMergeInternalMetaDataFrom_parseStartTime() {
                /** @var object $a */
                $a = new ParserOutput();
index be5125c..898ef2d 100644 (file)
@@ -2,6 +2,7 @@
 
 /**
  * @group Parser
+ * @covers MWTidy
  */
 class TidyTest extends MediaWikiTestCase {
 
index 55a8b66..0643e0e 100644 (file)
@@ -29,6 +29,7 @@ class SpecialBlockTest extends SpecialPageTestBase {
        public function testGetFormFields() {
                $this->setMwGlobals( [
                        'wgEnablePartialBlocks' => false,
+                       'wgBlockAllowsUTEdit' => true,
                ] );
                $page = $this->newSpecialPage();
                $wrappedPage = TestingAccessWrapper::newFromObject( $page );
@@ -71,6 +72,7 @@ class SpecialBlockTest extends SpecialPageTestBase {
        public function testMaybeAlterFormDefaults() {
                $this->setMwGlobals( [
                        'wgEnablePartialBlocks' => false,
+                       'wgBlockAllowsUTEdit' => true,
                ] );
 
                $block = $this->insertBlock();