build: Updating mediawiki/mediawiki-codesniffer to 16.0.0
authorUmherirrender <umherirrender_de.wp@web.de>
Sat, 17 Feb 2018 12:29:13 +0000 (13:29 +0100)
committerUmherirrender <umherirrender_de.wp@web.de>
Sat, 17 Feb 2018 12:29:13 +0000 (13:29 +0100)
Change-Id: I59b59f79bbf3ce4feff3b3a20c1c31bc16370531

107 files changed:
.phpcs.xml
composer.json
includes/Message.php
includes/api/ApiBase.php
includes/api/ApiMain.php
includes/auth/AuthPluginPrimaryAuthenticationProvider.php
includes/parser/ParserOptions.php
includes/skins/QuickTemplate.php
includes/user/ExternalUserNames.php
maintenance/checkLess.php
maintenance/cleanupUsersWithNoId.php
maintenance/migrateComments.php
tests/integration/includes/http/MWHttpRequestTestCase.php
tests/integration/includes/shell/FirejailCommandTest.php
tests/parser/ParserTestRunner.php
tests/parser/PhpunitTestRecorder.php
tests/phpunit/MediaWikiPHPUnitTestListener.php
tests/phpunit/MediaWikiTestCase.php
tests/phpunit/includes/FauxRequestTest.php
tests/phpunit/includes/GlobalFunctions/wfArrayFilterTest.php
tests/phpunit/includes/MediaWikiVersionFetcherTest.php
tests/phpunit/includes/SanitizerValidateEmailTest.php
tests/phpunit/includes/TitleArrayFromResultTest.php
tests/phpunit/includes/WikiReferenceTest.php
tests/phpunit/includes/XmlJsTest.php
tests/phpunit/includes/api/ApiPageSetTest.php
tests/phpunit/includes/api/query/ApiQueryContinueTestBase.php
tests/phpunit/includes/auth/EmailNotificationSecondaryAuthenticationProviderTest.php
tests/phpunit/includes/composer/ComposerVersionNormalizerTest.php
tests/phpunit/includes/config/EtcdConfigTest.php
tests/phpunit/includes/debug/logger/monolog/LogstashFormatterTest.php
tests/phpunit/includes/deferred/MWCallableUpdateTest.php
tests/phpunit/includes/deferred/TransactionRoundDefiningUpdateTest.php
tests/phpunit/includes/externalstore/ExternalStoreFactoryTest.php
tests/phpunit/includes/htmlform/HTMLRestrictionsFieldTest.php
tests/phpunit/includes/jobqueue/JobQueueMemoryTest.php
tests/phpunit/includes/libs/ArrayUtilsTest.php
tests/phpunit/includes/libs/DeferredStringifierTest.php
tests/phpunit/includes/libs/DnsSrvDiscovererTest.php
tests/phpunit/includes/libs/GenericArrayObjectTest.php
tests/phpunit/includes/libs/HashRingTest.php
tests/phpunit/includes/libs/HtmlArmorTest.php
tests/phpunit/includes/libs/IEUrlExtensionTest.php
tests/phpunit/includes/libs/IPTest.php
tests/phpunit/includes/libs/JavaScriptMinifierTest.php
tests/phpunit/includes/libs/MWMessagePackTest.php
tests/phpunit/includes/libs/MapCacheLRUTest.php
tests/phpunit/includes/libs/MemoizedCallableTest.php
tests/phpunit/includes/libs/ProcessCacheLRUTest.php
tests/phpunit/includes/libs/SamplingStatsdClientTest.php
tests/phpunit/includes/libs/StringUtilsTest.php
tests/phpunit/includes/libs/TimingTest.php
tests/phpunit/includes/libs/XhprofDataTest.php
tests/phpunit/includes/libs/XhprofTest.php
tests/phpunit/includes/libs/XmlTypeCheckTest.php
tests/phpunit/includes/libs/http/HttpAcceptNegotiatorTest.php
tests/phpunit/includes/libs/http/HttpAcceptParserTest.php
tests/phpunit/includes/libs/mime/MimeAnalyzerTest.php
tests/phpunit/includes/libs/objectcache/CachedBagOStuffTest.php
tests/phpunit/includes/libs/objectcache/HashBagOStuffTest.php
tests/phpunit/includes/libs/objectcache/WANObjectCacheTest.php
tests/phpunit/includes/libs/rdbms/TransactionProfilerTest.php
tests/phpunit/includes/libs/rdbms/connectionmanager/ConnectionManagerTest.php
tests/phpunit/includes/libs/rdbms/connectionmanager/SessionConsistentConnectionManagerTest.php
tests/phpunit/includes/libs/rdbms/database/DBConnRefTest.php
tests/phpunit/includes/libs/rdbms/database/DatabaseDomainTest.php
tests/phpunit/includes/libs/rdbms/database/DatabaseMysqlBaseTest.php
tests/phpunit/includes/libs/rdbms/database/DatabaseSQLTest.php
tests/phpunit/includes/libs/rdbms/database/DatabaseTest.php
tests/phpunit/includes/libs/xmp/XMPTest.php
tests/phpunit/includes/libs/xmp/XMPValidateTest.php
tests/phpunit/includes/objectcache/RedisBagOStuffTest.php
tests/phpunit/includes/parser/ParserIntegrationTest.php
tests/phpunit/includes/registration/VersionCheckerTest.php
tests/phpunit/includes/resourceloader/DerivativeResourceLoaderContextTest.php
tests/phpunit/includes/resourceloader/MessageBlobStoreTest.php
tests/phpunit/includes/resourceloader/ResourceLoaderClientHtmlTest.php
tests/phpunit/includes/resourceloader/ResourceLoaderContextTest.php
tests/phpunit/includes/resourceloader/ResourceLoaderSkinModuleTest.php
tests/phpunit/includes/search/SearchSuggestionSetTest.php
tests/phpunit/includes/services/ServiceContainerTest.php
tests/phpunit/includes/shell/CommandFactoryTest.php
tests/phpunit/includes/shell/CommandTest.php
tests/phpunit/includes/shell/FirejailCommandTest.php
tests/phpunit/includes/shell/ShellTest.php
tests/phpunit/includes/site/FileBasedSiteLookupTest.php
tests/phpunit/includes/site/MediaWikiPageNameNormalizerTest.php
tests/phpunit/includes/site/SiteExporterTest.php
tests/phpunit/includes/site/SiteImporterTest.php
tests/phpunit/includes/site/SitesCacheFileBuilderTest.php
tests/phpunit/includes/sparql/SparqlClientTest.php
tests/phpunit/includes/utils/AvroValidatorTest.php
tests/phpunit/includes/utils/ClassCollectorTest.php
tests/phpunit/includes/utils/FileContentsHasherTest.php
tests/phpunit/includes/utils/MWCryptHashTest.php
tests/phpunit/includes/utils/MWRestrictionsTest.php
tests/phpunit/includes/utils/UIDGeneratorTest.php
tests/phpunit/includes/utils/ZipDirectoryReaderTest.php
tests/phpunit/includes/watcheditem/WatchedItemQueryServiceUnitTest.php
tests/phpunit/includes/watcheditem/WatchedItemStoreUnitTest.php
tests/phpunit/languages/LanguageCodeTest.php
tests/phpunit/maintenance/BenchmarkerTest.php
tests/phpunit/maintenance/fetchTextTest.php
tests/phpunit/phpunit.php
tests/phpunit/structure/AvailableRightsTest.php
tests/phpunit/structure/ExtensionJsonValidationTest.php
tests/phpunit/structure/StructureTest.php

index 7f90f27..cd55428 100644 (file)
@@ -7,7 +7,6 @@
                <exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic" />
                <exclude name="MediaWiki.Commenting.FunctionComment.MissingParamTag" />
                <exclude name="MediaWiki.Commenting.FunctionComment.MissingReturn" />
-               <exclude name="MediaWiki.Commenting.FunctionComment.ParamNameNoMatch" />
                <exclude name="MediaWiki.Commenting.FunctionComment.ExtraParamComment" />
                <exclude name="MediaWiki.Commenting.FunctionComment.WrongStyle" />
                <exclude name="MediaWiki.Commenting.IllegalSingleLineComment.IllegalSingleLineCommentStart" />
@@ -29,6 +28,8 @@
                <exclude name="MediaWiki.Commenting.FunctionComment.SpacingDocTag" />
                <exclude name="Squiz.Scope.MethodScope.Missing" />
                <exclude name="Squiz.Scope.MemberVarScope.Missing" />
+               <exclude name="MediaWiki.Commenting.MissingCovers.MissingCovers" />
+               <exclude name="MediaWiki.Usage.AssignmentInReturn.AssignmentInReturn" />
        </rule>
        <rule ref="MediaWiki.NamingConventions.PrefixedGlobalFunctions">
                <properties>
index 56d1633..c96374f 100644 (file)
@@ -55,7 +55,7 @@
                "jakub-onderka/php-parallel-lint": "0.9.2",
                "jetbrains/phpstorm-stubs": "dev-master#1b9906084d6635456fcf3f3a01f0d7d5b99a578a",
                "justinrainbow/json-schema": "~5.2",
-               "mediawiki/mediawiki-codesniffer": "15.0.0",
+               "mediawiki/mediawiki-codesniffer": "16.0.0",
                "monolog/monolog": "~1.22.1",
                "nikic/php-parser": "3.1.3",
                "nmred/kafka-php": "0.1.5",
index fac9a59..7d05f41 100644 (file)
@@ -1105,7 +1105,7 @@ class Message implements MessageSpecifier, Serializable {
        public static function listParam( array $list, $type = 'text' ) {
                if ( !isset( self::$listTypeMap[$type] ) ) {
                        throw new InvalidArgumentException(
-                               "Invalid type '$type'. Known types are: " . join( ', ', array_keys( self::$listTypeMap ) )
+                               "Invalid type '$type'. Known types are: " . implode( ', ', array_keys( self::$listTypeMap ) )
                        );
                }
                return [ 'list' => $list, 'type' => $type ];
index 62d73f4..228d319 100644 (file)
@@ -897,7 +897,7 @@ abstract class ApiBase extends ContextSource {
 
                if ( $badParams ) {
                        $this->dieWithError(
-                               [ 'apierror-mustpostparams', join( ', ', $badParams ), count( $badParams ) ]
+                               [ 'apierror-mustpostparams', implode( ', ', $badParams ), count( $badParams ) ]
                        );
                }
        }
@@ -1152,7 +1152,7 @@ abstract class ApiBase extends ContextSource {
                                if ( $multi ) {
                                        // This loses the potential $wgContLang->checkTitleEncoding() transformation
                                        // done by WebRequest for $_GET. Let's call that a feature.
-                                       $value = join( "\x1f", $request->normalizeUnicode( explode( "\x1f", $rawValue ) ) );
+                                       $value = implode( "\x1f", $request->normalizeUnicode( explode( "\x1f", $rawValue ) ) );
                                } else {
                                        $this->dieWithError( 'apierror-badvalue-notmultivalue', 'badvalue_notmultivalue' );
                                }
@@ -1829,7 +1829,7 @@ abstract class ApiBase extends ContextSource {
                $msgs = [ $this->msg( 'api-usage-mailinglist-ref' ) ];
                Hooks::run( 'ApiDeprecationHelp', [ &$msgs ] );
                if ( count( $msgs ) > 1 ) {
-                       $key = '$' . join( ' $', range( 1, count( $msgs ) ) );
+                       $key = '$' . implode( ' $', range( 1, count( $msgs ) ) );
                        $msg = ( new RawMessage( $key ) )->params( $msgs );
                } else {
                        $msg = reset( $msgs );
index 008015b..a7e3c1b 100644 (file)
@@ -593,7 +593,7 @@ class ApiMain extends ApiBase {
                $this->setCacheMode( 'private' );
 
                $response = $this->getRequest()->response();
-               $headerStr = 'MediaWiki-API-Error: ' . join( ', ', $errCodes );
+               $headerStr = 'MediaWiki-API-Error: ' . implode( ', ', $errCodes );
                $response->header( $headerStr );
 
                // Reset and print just the error message
index b8e36bc..cd0734d 100644 (file)
@@ -272,7 +272,7 @@ class AuthPluginPrimaryAuthenticationProvider
                        if ( $failed ) {
                                throw new \UnexpectedValueException(
                                        "AuthPlugin failed to reset password for $username in the following domains: "
-                                               . join( ' ', $failed )
+                                               . implode( ' ', $failed )
                                );
                        }
                }
index bbddbe2..ff21ef0 100644 (file)
@@ -1254,7 +1254,7 @@ class ParserOptions {
                } elseif ( $value instanceof Language ) {
                        return $value->getCode();
                } elseif ( is_array( $value ) ) {
-                       return '[' . join( ',', array_map( [ $this, 'optionToString' ], $value ) ) . ']';
+                       return '[' . implode( ',', array_map( [ $this, 'optionToString' ], $value ) ) . ']';
                } else {
                        return (string)$value;
                }
@@ -1295,7 +1295,7 @@ class ParserOptions {
                        }
                }
 
-               $confstr = $values ? join( '!', $values ) : 'canonical';
+               $confstr = $values ? implode( '!', $values ) : 'canonical';
 
                // add in language specific options, if any
                // @todo FIXME: This is just a way of retrieving the url/user preferred variant
index e8466dc..1886746 100644 (file)
@@ -153,7 +153,7 @@ abstract class QuickTemplate {
        /**
         * An ugly, ugly hack.
         * @private
-        * @param string $str
+        * @param string $msgKey
         */
        function msgWiki( $msgKey ) {
                global $wgOut;
index 13ac6b2..f039d04 100644 (file)
@@ -56,7 +56,7 @@ class ExternalUserNames {
                        if ( $interwikiLookup->isValidInterwiki( $firstIw ) ) {
                                $title = MWNamespace::getCanonicalName( NS_USER ) . ':' . substr( $userName, $pos + 1 );
                                if ( $iw ) {
-                                       $title = join( ':', $iw ) . ':' . $title;
+                                       $title = implode( ':', $iw ) . ':' . $title;
                                }
                                return Title::makeTitle( NS_MAIN, $title, '', $firstIw );
                        }
index f001236..55ffcb8 100644 (file)
@@ -43,7 +43,7 @@ class CheckLess extends Maintenance {
                self::requireTestsAutoloader();
 
                // If phpunit isn't available by autoloader try pulling it in
-               if ( !class_exists( 'PHPUnit_Framework_TestCase' ) ) {
+               if ( !class_exists( 'PHPUnit\\Framework\\TestCase' ) ) {
                        require_once 'PHPUnit/Autoload.php';
                }
 
index 3763d3b..b2fdf2f 100644 (file)
@@ -110,7 +110,7 @@ class CleanupUsersWithNoId extends LoggedUpdateMaintenance {
                                $next = "$field > $value OR $field = $value AND ($next)";
                        }
                }
-               $display = join( ' ', array_reverse( $display ) );
+               $display = implode( ' ', array_reverse( $display ) );
                return [ $next, $display ];
        }
 
index c35315d..cb72c1e 100644 (file)
@@ -205,7 +205,7 @@ class MigrateComments extends LoggedUpdateMaintenance {
                                        $next = "$field > $value OR $field = $value AND ($next)";
                                }
                        }
-                       $prompt = join( ' ', array_reverse( $prompt ) );
+                       $prompt = implode( ' ', array_reverse( $prompt ) );
                        $this->output( "... $prompt\n" );
                        wfWaitForSlaves();
                }
index cc769d7..262eb35 100644 (file)
@@ -2,7 +2,7 @@
 
 use Wikimedia\TestingAccessWrapper;
 
-abstract class MWHttpRequestTestCase extends PHPUnit_Framework_TestCase {
+abstract class MWHttpRequestTestCase extends PHPUnit\Framework\TestCase {
        protected static $httpEngine;
        protected $oldHttpEngine;
 
index 598c715..c69fa73 100644 (file)
@@ -9,7 +9,7 @@ use MediaWiki\Shell\Shell;
  * as long as firejail and sudo has similar config.
  * @group Shell
  */
-class FirejailCommandIntegrationTest extends PHPUnit_Framework_TestCase {
+class FirejailCommandIntegrationTest extends PHPUnit\Framework\TestCase {
 
        public function setUp() {
                parent::setUp();
index 4dd4bc6..4f6f6b6 100644 (file)
@@ -889,7 +889,7 @@ class ParserTestRunner {
                if ( isset( $output ) && isset( $opts['showflags'] ) ) {
                        $actualFlags = array_keys( TestingAccessWrapper::newFromObject( $output )->mFlags );
                        sort( $actualFlags );
-                       $out .= "\nflags=" . join( ', ', $actualFlags );
+                       $out .= "\nflags=" . implode( ', ', $actualFlags );
                }
 
                ScopedCallback::consume( $teardownGuard );
index 2f82ca7..1a2cfc9 100644 (file)
@@ -3,7 +3,7 @@
 class PhpunitTestRecorder extends TestRecorder {
        private $testCase;
 
-       public function setTestCase( PHPUnit_Framework_TestCase $testCase ) {
+       public function setTestCase( PHPUnit\Framework\TestCase $testCase ) {
                $this->testCase = $testCase;
        }
 
index dd606d8..0a162a2 100644 (file)
@@ -11,7 +11,7 @@ class MediaWikiPHPUnitTestListener
        protected function getTestName( PHPUnit_Framework_Test $test ) {
                $name = get_class( $test );
 
-               if ( $test instanceof PHPUnit_Framework_TestCase ) {
+               if ( $test instanceof PHPUnit\Framework\TestCase ) {
                        $name .= '::' . $test->getName( true );
                }
 
index 817f161..652b1ee 100644 (file)
@@ -14,7 +14,7 @@ use Wikimedia\TestingAccessWrapper;
 /**
  * @since 1.18
  */
-abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
+abstract class MediaWikiTestCase extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index f6ccbc7..9f8bb38 100644 (file)
@@ -2,7 +2,7 @@
 
 use MediaWiki\Session\SessionManager;
 
-class FauxRequestTest extends PHPUnit_Framework_TestCase {
+class FauxRequestTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index 8adb55f..1011a37 100644 (file)
@@ -5,7 +5,7 @@
  * @covers ::wfArrayFilter
  * @covers ::wfArrayFilterByKey
  */
-class WfArrayFilterTest extends \PHPUnit_Framework_TestCase {
+class WfArrayFilterTest extends \PHPUnit\Framework\TestCase {
        public function testWfArrayFilter() {
                $arr = [ 'a' => 1, 'b' => 2, 'c' => 3 ];
                $filtered = wfArrayFilter( $arr, function ( $val, $key ) {
index 6aa9849..87a7dff 100644 (file)
@@ -10,7 +10,7 @@
  *
  * @author Jeroen De Dauw < jeroendedauw@gmail.com >
  */
-class MediaWikiVersionFetcherTest extends PHPUnit_Framework_TestCase {
+class MediaWikiVersionFetcherTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index c7e15ea..c4e4308 100644 (file)
@@ -5,7 +5,7 @@
  * @todo all test methods in this class should be refactored and...
  *    use a single test method and a single data provider...
  */
-class SanitizerValidateEmailTest extends PHPUnit_Framework_TestCase {
+class SanitizerValidateEmailTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index 63956c1..af49ecf 100644 (file)
@@ -4,7 +4,7 @@
  * @author Addshore
  * @covers TitleArrayFromResult
  */
-class TitleArrayFromResultTest extends PHPUnit_Framework_TestCase {
+class TitleArrayFromResultTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index dc2e9ae..e4b21ce 100644 (file)
@@ -3,7 +3,7 @@
 /**
  * @covers WikiReference
  */
-class WikiReferenceTest extends PHPUnit_Framework_TestCase {
+class WikiReferenceTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index dec7bf3..c7975ef 100644 (file)
@@ -3,7 +3,7 @@
 /**
  * @group Xml
  */
-class XmlJsTest extends PHPUnit_Framework_TestCase {
+class XmlJsTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index 10bdfa7..b9e4645 100644 (file)
@@ -108,7 +108,7 @@ class ApiPageSetTest extends ApiTestCase {
                $userName = $user->getName();
                $userDbkey = str_replace( ' ', '_', $userName );
                $request = new FauxRequest( [
-                       'titles' => join( '|', [
+                       'titles' => implode( '|', [
                                'Special:MyContributions',
                                'Special:MyPage',
                                'Special:MyTalk/subpage',
index 2371eea..d2bdb49 100644 (file)
@@ -157,7 +157,7 @@ abstract class ApiQueryContinueTestBase extends ApiQueryTestBase {
 
        /**
         * Recursively merge the new result returned from the query to the previous results.
-        * @param mixed $results
+        * @param mixed &$results
         * @param mixed $newResult
         * @param bool $numericIds If true, treat keys as ids to be merged instead of appending
         */
index dd02793..1a7ed12 100644 (file)
@@ -5,7 +5,7 @@ namespace MediaWiki\Auth;
 use Psr\Log\LoggerInterface;
 use Wikimedia\TestingAccessWrapper;
 
-class EmailNotificationSecondaryAuthenticationProviderTest extends \PHPUnit_Framework_TestCase {
+class EmailNotificationSecondaryAuthenticationProviderTest extends \PHPUnit\Framework\TestCase {
        public function testConstructor() {
                $config = new \HashConfig( [
                        'EnableEmail' => true,
index 9ade892..c607ae5 100644 (file)
@@ -7,7 +7,7 @@
  *
  * @author Jeroen De Dauw < jeroendedauw@gmail.com >
  */
-class ComposerVersionNormalizerTest extends PHPUnit_Framework_TestCase {
+class ComposerVersionNormalizerTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index 379eebd..c833934 100644 (file)
@@ -2,7 +2,7 @@
 
 use Wikimedia\TestingAccessWrapper;
 
-class EtcdConfigTest extends PHPUnit_Framework_TestCase {
+class EtcdConfigTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index 8086b4b..1ee188e 100644 (file)
@@ -2,7 +2,7 @@
 
 namespace MediaWiki\Logger\Monolog;
 
-class LogstashFormatterTest extends \PHPUnit_Framework_TestCase {
+class LogstashFormatterTest extends \PHPUnit\Framework\TestCase {
        /**
         * @dataProvider provideV1
         * @param array $record The input record.
index 6977aef..3ab9b56 100644 (file)
@@ -3,7 +3,7 @@
 /**
  * @covers MWCallableUpdate
  */
-class MWCallableUpdateTest extends PHPUnit_Framework_TestCase {
+class MWCallableUpdateTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index 1261c24..693897e 100644 (file)
@@ -3,7 +3,7 @@
 /**
  * @covers TransactionRoundDefiningUpdate
  */
-class TransactionRoundDefiningUpdateTest extends PHPUnit_Framework_TestCase {
+class TransactionRoundDefiningUpdateTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index d43e04a..f762693 100644 (file)
@@ -3,7 +3,7 @@
 /**
  * @covers ExternalStoreFactory
  */
-class ExternalStoreFactoryTest extends PHPUnit_Framework_TestCase {
+class ExternalStoreFactoryTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index 75c93be..c4290e1 100644 (file)
@@ -3,7 +3,7 @@
 /**
  * @covers HTMLRestrictionsField
  */
-class HTMLRestrictionsFieldTest extends PHPUnit_Framework_TestCase {
+class HTMLRestrictionsFieldTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index d5a267e..b5d6144 100644 (file)
@@ -8,7 +8,7 @@
  * @licence GNU GPL v2+
  * @author Thiemo Kreuz
  */
-class JobQueueMemoryTest extends PHPUnit_Framework_TestCase {
+class JobQueueMemoryTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index 8831265..4fbbc99 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @group Database
  */
-class ArrayUtilsTest extends PHPUnit_Framework_TestCase {
+class ArrayUtilsTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index c995840..c9cdf58 100644 (file)
@@ -3,7 +3,7 @@
 /**
  * @covers DeferredStringifier
  */
-class DeferredStringifierTest extends PHPUnit_Framework_TestCase {
+class DeferredStringifierTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index 264cc00..1b3397c 100644 (file)
@@ -3,7 +3,7 @@
 /**
  * @covers DnsSrvDiscoverer
  */
-class DnsSrvDiscovererTest extends PHPUnit_Framework_TestCase {
+class DnsSrvDiscovererTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index 3e8aaeb..a7cf755 100644 (file)
@@ -26,7 +26,7 @@
  *
  * @author Jeroen De Dauw < jeroendedauw@gmail.com >
  */
-abstract class GenericArrayObjectTest extends PHPUnit_Framework_TestCase {
+abstract class GenericArrayObjectTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index 040bebf..ba28828 100644 (file)
@@ -3,7 +3,7 @@
 /**
  * @group HashRing
  */
-class HashRingTest extends PHPUnit_Framework_TestCase {
+class HashRingTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index eb601e7..c5e87e4 100644 (file)
@@ -3,7 +3,7 @@
 /**
  * @covers HtmlArmor
  */
-class HtmlArmorTest extends PHPUnit_Framework_TestCase {
+class HtmlArmorTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index 8192f01..03c7b0c 100644 (file)
@@ -5,7 +5,7 @@
  * @todo tests below for findIE6Extension should be split into...
  *    ...a dataprovider and test method.
  */
-class IEUrlExtensionTest extends PHPUnit_Framework_TestCase {
+class IEUrlExtensionTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index a36b259..6a75181 100644 (file)
@@ -8,7 +8,7 @@
  * @todo Test methods in this call should be split into a method and a
  * dataprovider.
  */
-class IPTest extends PHPUnit_Framework_TestCase {
+class IPTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index 98494c4..6105678 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-class JavaScriptMinifierTest extends PHPUnit_Framework_TestCase {
+class JavaScriptMinifierTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index 57c9831..695a734 100644 (file)
@@ -3,7 +3,7 @@
  * PHP Unit tests for MWMessagePack
  * @covers MWMessagePack
  */
-class MWMessagePackTest extends PHPUnit_Framework_TestCase {
+class MWMessagePackTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index 363b081..2a962b7 100644 (file)
@@ -2,7 +2,7 @@
 /**
  * @group Cache
  */
-class MapCacheLRUTest extends PHPUnit_Framework_TestCase {
+class MapCacheLRUTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index d09171c..d64ba3d 100644 (file)
@@ -24,7 +24,7 @@ class ArrayBackedMemoizedCallable extends MemoizedCallable {
  * PHP Unit tests for MemoizedCallable class.
  * @covers MemoizedCallable
  */
-class MemoizedCallableTest extends PHPUnit_Framework_TestCase {
+class MemoizedCallableTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index ddb7bfa..c8940e5 100644 (file)
@@ -9,7 +9,7 @@
  *
  * @group Cache
  */
-class ProcessCacheLRUTest extends PHPUnit_Framework_TestCase {
+class ProcessCacheLRUTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index d0e404b..85b8c62 100644 (file)
@@ -6,7 +6,7 @@ use Liuggio\StatsdClient\Sender\SenderInterface;
 /**
  * @covers SamplingStatsdClient
  */
-class SamplingStatsdClientTest extends PHPUnit_Framework_TestCase {
+class SamplingStatsdClientTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index 3e5ccac..fcfa53e 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-class StringUtilsTest extends PHPUnit_Framework_TestCase {
+class StringUtilsTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index 7e166f8..581a518 100644 (file)
@@ -19,7 +19,7 @@
  * @author Ori Livneh <ori@wikimedia.org>
  */
 
-class TimingTest extends PHPUnit_Framework_TestCase {
+class TimingTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index d226227..1cbd86f 100644 (file)
@@ -24,7 +24,7 @@
  * @copyright Â© 2014 Wikimedia Foundation and contributors
  * @since 1.25
  */
-class XhprofDataTest extends PHPUnit_Framework_TestCase {
+class XhprofDataTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index e2723b9..0ea1328 100644 (file)
@@ -18,7 +18,7 @@
  * @file
  */
 
-class XhprofTest extends PHPUnit_Framework_TestCase {
+class XhprofTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index 8a11d87..8616b41 100644 (file)
@@ -5,7 +5,7 @@
  * @group Xml
  * @covers XMLTypeCheck
  */
-class XmlTypeCheckTest extends PHPUnit_Framework_TestCase {
+class XmlTypeCheckTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index 10dca7d..02eac11 100644 (file)
@@ -7,7 +7,7 @@ use Wikimedia\Http\HttpAcceptNegotiator;
  *
  * @author Daniel Kinzler
  */
-class HttpAcceptNegotiatorTest extends \PHPUnit_Framework_TestCase {
+class HttpAcceptNegotiatorTest extends \PHPUnit\Framework\TestCase {
 
        public function provideGetFirstSupportedValue() {
                return [
index 788c297..e4b47b4 100644 (file)
@@ -7,7 +7,7 @@ use Wikimedia\Http\HttpAcceptParser;
  *
  * @author Daniel Kinzler
  */
-class HttpAcceptParserTest extends \PHPUnit_Framework_TestCase {
+class HttpAcceptParserTest extends \PHPUnit\Framework\TestCase {
 
        public function provideParseWeights() {
                return [
index 1f3cae5..fbe5a2b 100644 (file)
@@ -3,7 +3,7 @@
  * @group Media
  * @covers MimeAnalyzer
  */
-class MimeAnalyzerTest extends PHPUnit_Framework_TestCase {
+class MimeAnalyzerTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index d71b16c..d0360a9 100644 (file)
@@ -5,7 +5,7 @@ use Wikimedia\TestingAccessWrapper;
 /**
  * @group BagOStuff
  */
-class CachedBagOStuffTest extends PHPUnit_Framework_TestCase {
+class CachedBagOStuffTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index 9eb3409..332e23b 100644 (file)
@@ -5,7 +5,7 @@ use Wikimedia\TestingAccessWrapper;
 /**
  * @group BagOStuff
  */
-class HashBagOStuffTest extends PHPUnit_Framework_TestCase {
+class HashBagOStuffTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index ca78f65..77198f9 100644 (file)
@@ -16,7 +16,7 @@ use Wikimedia\TestingAccessWrapper;
  * @covers WANObjectCache::getInterimValue
  * @covers WANObjectCache::setInterimValue
  */
-class WANObjectCacheTest extends PHPUnit_Framework_TestCase {
+class WANObjectCacheTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index 25613fe..538d625 100644 (file)
@@ -6,7 +6,7 @@ use Psr\Log\LoggerInterface;
 /**
  * @covers \Wikimedia\Rdbms\TransactionProfiler
  */
-class TransactionProfilerTest extends PHPUnit_Framework_TestCase {
+class TransactionProfilerTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index 2a707d3..dd86a73 100644 (file)
@@ -12,7 +12,7 @@ use Wikimedia\Rdbms\ConnectionManager;
  *
  * @author Daniel Kinzler
  */
-class ConnectionManagerTest extends \PHPUnit_Framework_TestCase {
+class ConnectionManagerTest extends \PHPUnit\Framework\TestCase {
 
        /**
         * @return IDatabase|PHPUnit_Framework_MockObject_MockObject
index 20ce095..8d7d104 100644 (file)
@@ -12,7 +12,7 @@ use Wikimedia\Rdbms\SessionConsistentConnectionManager;
  *
  * @author Daniel Kinzler
  */
-class SessionConsistentConnectionManagerTest extends \PHPUnit_Framework_TestCase {
+class SessionConsistentConnectionManagerTest extends \PHPUnit\Framework\TestCase {
 
        /**
         * @return IDatabase|PHPUnit_Framework_MockObject_MockObject
index e660265..d1f961a 100644 (file)
@@ -10,7 +10,7 @@ use Wikimedia\Rdbms\ResultWrapper;
 /**
  * @covers Wikimedia\Rdbms\DBConnRef
  */
-class DBConnRefTest extends PHPUnit_Framework_TestCase {
+class DBConnRefTest extends PHPUnit\Framework\TestCase {
 
        /**
         * @return ILoadBalancer
index 4e5f735..b13e8fc 100644 (file)
@@ -5,7 +5,7 @@ use Wikimedia\Rdbms\DatabaseDomain;
 /**
  * @covers Wikimedia\Rdbms\DatabaseDomain
  */
-class DatabaseDomainTest extends PHPUnit_Framework_TestCase {
+class DatabaseDomainTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index ce067aa..9f8c11a 100644 (file)
@@ -109,7 +109,7 @@ class FakeDatabaseMysqlBase extends DatabaseMysqlBase {
        }
 }
 
-class DatabaseMysqlBaseTest extends PHPUnit_Framework_TestCase {
+class DatabaseMysqlBaseTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index d8ebeff..184d626 100644 (file)
@@ -6,7 +6,7 @@ use Wikimedia\Rdbms\LikeMatch;
  * Test the parts of the Database abstract class that deal
  * with creating SQL text.
  */
-class DatabaseSQLTest extends PHPUnit_Framework_TestCase {
+class DatabaseSQLTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index b42a367..542470d 100644 (file)
@@ -5,7 +5,7 @@ use Wikimedia\Rdbms\LBFactorySingle;
 use Wikimedia\Rdbms\TransactionProfiler;
 use Wikimedia\TestingAccessWrapper;
 
-class DatabaseTest extends PHPUnit_Framework_TestCase {
+class DatabaseTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index 7becad2..73fd471 100644 (file)
@@ -4,7 +4,7 @@
  * @group Media
  * @covers XMPReader
  */
-class XMPTest extends PHPUnit_Framework_TestCase {
+class XMPTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index 0785920..746f68a 100644 (file)
@@ -5,7 +5,7 @@ use Psr\Log\NullLogger;
 /**
  * @group Media
  */
-class XMPValidateTest extends PHPUnit_Framework_TestCase {
+class XMPValidateTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index 6e8c9ce..df5614d 100644 (file)
@@ -5,7 +5,7 @@ use Wikimedia\TestingAccessWrapper;
 /**
  * @group BagOStuff
  */
-class RedisBagOStuffTest extends PHPUnit_Framework_TestCase {
+class RedisBagOStuffTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index 28430ad..0e1605a 100644 (file)
@@ -26,7 +26,7 @@ use Wikimedia\ScopedCallback;
  * @covers ParserOptions
  * @covers ParserOutput
  */
-class ParserIntegrationTest extends PHPUnit_Framework_TestCase {
+class ParserIntegrationTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index 4a2810b..929ff0f 100644 (file)
@@ -3,7 +3,7 @@
 /**
  * @covers VersionChecker
  */
-class VersionCheckerTest extends PHPUnit_Framework_TestCase {
+class VersionCheckerTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index db1fb64..e4f58eb 100644 (file)
@@ -4,7 +4,7 @@
  * @group ResourceLoader
  * @covers DerivativeResourceLoaderContext
  */
-class DerivativeResourceLoaderContextTest extends PHPUnit_Framework_TestCase {
+class DerivativeResourceLoaderContextTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index c00432e..fa4d804 100644 (file)
@@ -6,7 +6,7 @@ use Wikimedia\TestingAccessWrapper;
  * @group Cache
  * @covers MessageBlobStore
  */
-class MessageBlobStoreTest extends PHPUnit_Framework_TestCase {
+class MessageBlobStoreTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index e51d0d6..7bfd769 100644 (file)
@@ -5,7 +5,7 @@ use Wikimedia\TestingAccessWrapper;
 /**
  * @group ResourceLoader
  */
-class ResourceLoaderClientHtmlTest extends PHPUnit_Framework_TestCase {
+class ResourceLoaderClientHtmlTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index f848556..b226ee1 100644 (file)
@@ -8,7 +8,7 @@
  * @group Cache
  * @covers ResourceLoaderContext
  */
-class ResourceLoaderContextTest extends PHPUnit_Framework_TestCase {
+class ResourceLoaderContextTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index 0718af6..a1b1422 100644 (file)
@@ -3,7 +3,7 @@
 /**
  * @group ResourceLoader
  */
-class ResourceLoaderSkinModuleTest extends PHPUnit_Framework_TestCase {
+class ResourceLoaderSkinModuleTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index 28c69fa..54533a7 100644 (file)
@@ -19,7 +19,7 @@
  * http://www.gnu.org/copyleft/gpl.html
  */
 
-class SearchSuggestionSetTest extends \PHPUnit_Framework_TestCase {
+class SearchSuggestionSetTest extends \PHPUnit\Framework\TestCase {
        /**
         * Test that adding a new suggestion at the end
         * will keep proper score ordering
index 768ed91..1e8175e 100644 (file)
@@ -6,7 +6,7 @@ use MediaWiki\Services\ServiceContainer;
  *
  * @group MediaWiki
  */
-class ServiceContainerTest extends PHPUnit_Framework_TestCase {
+class ServiceContainerTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index cb2669f..b031431 100644 (file)
@@ -9,7 +9,7 @@ use Wikimedia\TestingAccessWrapper;
 /**
  * @group Shell
  */
-class CommandFactoryTest extends PHPUnit_Framework_TestCase {
+class CommandFactoryTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index 2ba7bdc..3862cc2 100644 (file)
@@ -7,7 +7,7 @@ use Wikimedia\TestingAccessWrapper;
  * @covers \MediaWiki\Shell\Command
  * @group Shell
  */
-class CommandTest extends PHPUnit_Framework_TestCase {
+class CommandTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index 1585375..199393c 100644 (file)
@@ -23,7 +23,7 @@ use MediaWiki\Shell\FirejailCommand;
 use MediaWiki\Shell\Shell;
 use Wikimedia\TestingAccessWrapper;
 
-class FirejailCommandTest extends PHPUnit_Framework_TestCase {
+class FirejailCommandTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index 986a665..8162bc0 100644 (file)
@@ -6,7 +6,7 @@ use MediaWiki\Shell\Shell;
  * @covers \MediaWiki\Shell\Shell
  * @group Shell
  */
-class ShellTest extends PHPUnit_Framework_TestCase {
+class ShellTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index 05aa6d3..69e0e38 100644 (file)
@@ -27,7 +27,7 @@
  *
  * @author Katie Filbert < aude.wiki@gmail.com >
  */
-class FileBasedSiteLookupTest extends PHPUnit_Framework_TestCase {
+class FileBasedSiteLookupTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index d230550..2ac2714 100644 (file)
@@ -27,7 +27,7 @@ use MediaWiki\Site\MediaWikiPageNameNormalizer;
  *
  * @author Marius Hoch
  */
-class MediaWikiPageNameNormalizerTest extends PHPUnit_Framework_TestCase {
+class MediaWikiPageNameNormalizerTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index 3a41b5f..279bbb2 100644 (file)
@@ -29,7 +29,7 @@
  *
  * @author Daniel Kinzler
  */
-class SiteExporterTest extends PHPUnit_Framework_TestCase {
+class SiteExporterTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index 373dcc2..7c949ac 100644 (file)
@@ -29,7 +29,7 @@
  *
  * @author Daniel Kinzler
  */
-class SiteImporterTest extends PHPUnit_Framework_TestCase {
+class SiteImporterTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index c411ed8..8c84ce5 100644 (file)
@@ -27,7 +27,7 @@
  *
  * @author Katie Filbert < aude.wiki@gmail.com >
  */
-class SitesCacheFileBuilderTest extends PHPUnit_Framework_TestCase {
+class SitesCacheFileBuilderTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index e07e425..cfaf49b 100644 (file)
@@ -4,12 +4,11 @@ namespace MediaWiki\Sparql;
 use Http;
 use MediaWiki\Http\HttpRequestFactory;
 use MWHttpRequest;
-use PHPUnit_Framework_TestCase;
 
 /**
  * @covers \MediaWiki\Sparql\SparqlClient
  */
-class SparqlClientTest extends PHPUnit_Framework_TestCase {
+class SparqlClientTest extends \PHPUnit\Framework\TestCase {
 
        private function getRequestFactory( $request ) {
                $requestFactory = $this->getMock( HttpRequestFactory::class );
index caeeaab..12d2574 100644 (file)
@@ -12,7 +12,7 @@
 /**
  * @covers AvroValidator
  */
-class AvroValidatorTest extends PHPUnit_Framework_TestCase {
+class AvroValidatorTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index 796d459..9e5163f 100644 (file)
@@ -3,7 +3,7 @@
 /**
  * @covers ClassCollector
  */
-class ClassCollectorTest extends PHPUnit_Framework_TestCase {
+class ClassCollectorTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index b3885bd..316d9f4 100644 (file)
@@ -3,7 +3,7 @@
 /**
  * @covers FileContentsHasherTest
  */
-class FileContentsHasherTest extends PHPUnit_Framework_TestCase {
+class FileContentsHasherTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index 66c8d00..94705bf 100644 (file)
@@ -5,7 +5,7 @@
  *
  * @covers MWCryptHash
  */
-class MWCryptHashTest extends PHPUnit_Framework_TestCase {
+class MWCryptHashTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index c411e53..abdfbb1 100644 (file)
@@ -1,5 +1,5 @@
 <?php
-class MWRestrictionsTest extends PHPUnit_Framework_TestCase {
+class MWRestrictionsTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index c6b8bdd..d335a93 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-class UIDGeneratorTest extends PHPUnit_Framework_TestCase {
+class UIDGeneratorTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index 09a0676..9f18e5a 100644 (file)
@@ -4,7 +4,7 @@
  * @covers ZipDirectoryReader
  * NOTE: this test is more like an integration test than a unit test
  */
-class ZipDirectoryReaderTest extends PHPUnit_Framework_TestCase {
+class ZipDirectoryReaderTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index 5e36e94..b6cf239 100644 (file)
@@ -57,7 +57,7 @@ class WatchedItemQueryServiceUnitTest extends MediaWikiTestCase {
                        )
                        ->will( $this->returnCallback( function ( $a, $conj ) {
                                $sqlConj = $conj === LIST_AND ? ' AND ' : ' OR ';
-                               return join( $sqlConj, array_map( function ( $s ) {
+                               return implode( $sqlConj, array_map( function ( $s ) {
                                        return '(' . $s . ')';
                                }, $a
                                ) );
@@ -1572,7 +1572,7 @@ class WatchedItemQueryServiceUnitTest extends MediaWikiTestCase {
                        )
                        ->will( $this->returnCallback( function ( $a, $conj ) {
                                $sqlConj = $conj === LIST_AND ? ' AND ' : ' OR ';
-                               return join( $sqlConj, array_map( function ( $s ) {
+                               return implode( $sqlConj, array_map( function ( $s ) {
                                        return '(' . $s . ')';
                                }, $a
                                ) );
index 52e653c..9485170 100644 (file)
@@ -443,7 +443,7 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                        )
                        ->will( $this->returnCallback( function ( $a, $conj ) {
                                $sqlConj = $conj === LIST_AND ? ' AND ' : ' OR ';
-                               return join( $sqlConj, array_map( function ( $s ) {
+                               return implode( $sqlConj, array_map( function ( $s ) {
                                        return '(' . $s . ')';
                                }, $a
                                ) );
@@ -540,7 +540,7 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                        )
                        ->will( $this->returnCallback( function ( $a, $conj ) {
                                $sqlConj = $conj === LIST_AND ? ' AND ' : ' OR ';
-                               return join( $sqlConj, array_map( function ( $s ) {
+                               return implode( $sqlConj, array_map( function ( $s ) {
                                        return '(' . $s . ')';
                                }, $a
                                ) );
index d77291a..544a063 100644 (file)
@@ -6,7 +6,7 @@
  *
  * @author Thiemo Kreuz
  */
-class LanguageCodeTest extends PHPUnit_Framework_TestCase {
+class LanguageCodeTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index 0b8d0d9..c15d789 100644 (file)
@@ -4,13 +4,12 @@ namespace MediaWiki\Tests\Maintenance;
 
 use Benchmarker;
 use MediaWikiCoversValidator;
-use PHPUnit_Framework_TestCase;
 use Wikimedia\TestingAccessWrapper;
 
 /**
  * @covers Benchmarker
  */
-class BenchmarkerTest extends PHPUnit_Framework_TestCase {
+class BenchmarkerTest extends \PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index 14dfb44..97e0c88 100644 (file)
@@ -215,7 +215,7 @@ class FetchTextTest extends MediaWikiTestCase {
 
        function testExistingSeveral() {
                $this->assertFilter(
-                       join( "\n", [
+                       implode( "\n", [
                                self::$textId1,
                                self::$textId5,
                                self::$textId3,
index a78bd82..fa249b2 100755 (executable)
@@ -113,7 +113,7 @@ class PHPUnitMaintClass extends Maintenance {
                        }
                }
 
-               if ( !class_exists( 'PHPUnit_Framework_TestCase' ) ) {
+               if ( !class_exists( 'PHPUnit\\Framework\\TestCase' ) ) {
                        echo "PHPUnit not found. Please install it and other dev dependencies by
                running `composer install` in MediaWiki root directory.\n";
                        exit( 1 );
index 4ab0c2c..6c2ff02 100644 (file)
@@ -6,7 +6,7 @@
  *
  * @author Marius Hoch < hoo@online.de >
  */
-class AvailableRightsTest extends PHPUnit_Framework_TestCase {
+class AvailableRightsTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index 0cf4659..60c97cc 100644 (file)
@@ -20,7 +20,7 @@
  * Validates all loaded extensions and skins using the ExtensionRegistry
  * against the extension.json schema in the docs/ folder.
  */
-class ExtensionJsonValidationTest extends PHPUnit_Framework_TestCase {
+class ExtensionJsonValidationTest extends PHPUnit\Framework\TestCase {
 
        use MediaWikiCoversValidator;
 
index 9016cb7..3543463 100644 (file)
@@ -25,6 +25,7 @@ class StructureTest extends MediaWikiTestCase {
                        'MediaWikiTestCase',
                        'ResourceLoaderTestCase',
                        'PHPUnit_Framework_TestCase',
+                       '\\?PHPUnit\\Framework\\TestCase',
                        'DumpTestCase',
                ] );
                $testClassRegex = "^class .* extends ($testClassRegex)";