<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" />
<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>
"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",
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 ];
if ( $badParams ) {
$this->dieWithError(
- [ 'apierror-mustpostparams', join( ', ', $badParams ), count( $badParams ) ]
+ [ 'apierror-mustpostparams', implode( ', ', $badParams ), count( $badParams ) ]
);
}
}
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' );
}
$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 );
$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
if ( $failed ) {
throw new \UnexpectedValueException(
"AuthPlugin failed to reset password for $username in the following domains: "
- . join( ' ', $failed )
+ . implode( ' ', $failed )
);
}
}
} 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;
}
}
}
- $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
/**
* An ugly, ugly hack.
* @private
- * @param string $str
+ * @param string $msgKey
*/
function msgWiki( $msgKey ) {
global $wgOut;
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 );
}
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';
}
$next = "$field > $value OR $field = $value AND ($next)";
}
}
- $display = join( ' ', array_reverse( $display ) );
+ $display = implode( ' ', array_reverse( $display ) );
return [ $next, $display ];
}
$next = "$field > $value OR $field = $value AND ($next)";
}
}
- $prompt = join( ' ', array_reverse( $prompt ) );
+ $prompt = implode( ' ', array_reverse( $prompt ) );
$this->output( "... $prompt\n" );
wfWaitForSlaves();
}
use Wikimedia\TestingAccessWrapper;
-abstract class MWHttpRequestTestCase extends PHPUnit_Framework_TestCase {
+abstract class MWHttpRequestTestCase extends PHPUnit\Framework\TestCase {
protected static $httpEngine;
protected $oldHttpEngine;
* 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();
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 );
class PhpunitTestRecorder extends TestRecorder {
private $testCase;
- public function setTestCase( PHPUnit_Framework_TestCase $testCase ) {
+ public function setTestCase( PHPUnit\Framework\TestCase $testCase ) {
$this->testCase = $testCase;
}
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 );
}
/**
* @since 1.18
*/
-abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
+abstract class MediaWikiTestCase extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
use MediaWiki\Session\SessionManager;
-class FauxRequestTest extends PHPUnit_Framework_TestCase {
+class FauxRequestTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
* @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 ) {
*
* @author Jeroen De Dauw < jeroendedauw@gmail.com >
*/
-class MediaWikiVersionFetcherTest extends PHPUnit_Framework_TestCase {
+class MediaWikiVersionFetcherTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
* @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;
* @author Addshore
* @covers TitleArrayFromResult
*/
-class TitleArrayFromResultTest extends PHPUnit_Framework_TestCase {
+class TitleArrayFromResultTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
/**
* @covers WikiReference
*/
-class WikiReferenceTest extends PHPUnit_Framework_TestCase {
+class WikiReferenceTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
/**
* @group Xml
*/
-class XmlJsTest extends PHPUnit_Framework_TestCase {
+class XmlJsTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
$userName = $user->getName();
$userDbkey = str_replace( ' ', '_', $userName );
$request = new FauxRequest( [
- 'titles' => join( '|', [
+ 'titles' => implode( '|', [
'Special:MyContributions',
'Special:MyPage',
'Special:MyTalk/subpage',
/**
* 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
*/
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,
*
* @author Jeroen De Dauw < jeroendedauw@gmail.com >
*/
-class ComposerVersionNormalizerTest extends PHPUnit_Framework_TestCase {
+class ComposerVersionNormalizerTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
use Wikimedia\TestingAccessWrapper;
-class EtcdConfigTest extends PHPUnit_Framework_TestCase {
+class EtcdConfigTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
namespace MediaWiki\Logger\Monolog;
-class LogstashFormatterTest extends \PHPUnit_Framework_TestCase {
+class LogstashFormatterTest extends \PHPUnit\Framework\TestCase {
/**
* @dataProvider provideV1
* @param array $record The input record.
/**
* @covers MWCallableUpdate
*/
-class MWCallableUpdateTest extends PHPUnit_Framework_TestCase {
+class MWCallableUpdateTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
/**
* @covers TransactionRoundDefiningUpdate
*/
-class TransactionRoundDefiningUpdateTest extends PHPUnit_Framework_TestCase {
+class TransactionRoundDefiningUpdateTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
/**
* @covers ExternalStoreFactory
*/
-class ExternalStoreFactoryTest extends PHPUnit_Framework_TestCase {
+class ExternalStoreFactoryTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
/**
* @covers HTMLRestrictionsField
*/
-class HTMLRestrictionsFieldTest extends PHPUnit_Framework_TestCase {
+class HTMLRestrictionsFieldTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
* @licence GNU GPL v2+
* @author Thiemo Kreuz
*/
-class JobQueueMemoryTest extends PHPUnit_Framework_TestCase {
+class JobQueueMemoryTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
*
* @group Database
*/
-class ArrayUtilsTest extends PHPUnit_Framework_TestCase {
+class ArrayUtilsTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
/**
* @covers DeferredStringifier
*/
-class DeferredStringifierTest extends PHPUnit_Framework_TestCase {
+class DeferredStringifierTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
/**
* @covers DnsSrvDiscoverer
*/
-class DnsSrvDiscovererTest extends PHPUnit_Framework_TestCase {
+class DnsSrvDiscovererTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
*
* @author Jeroen De Dauw < jeroendedauw@gmail.com >
*/
-abstract class GenericArrayObjectTest extends PHPUnit_Framework_TestCase {
+abstract class GenericArrayObjectTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
/**
* @group HashRing
*/
-class HashRingTest extends PHPUnit_Framework_TestCase {
+class HashRingTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
/**
* @covers HtmlArmor
*/
-class HtmlArmorTest extends PHPUnit_Framework_TestCase {
+class HtmlArmorTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
* @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;
* @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;
<?php
-class JavaScriptMinifierTest extends PHPUnit_Framework_TestCase {
+class JavaScriptMinifierTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
* PHP Unit tests for MWMessagePack
* @covers MWMessagePack
*/
-class MWMessagePackTest extends PHPUnit_Framework_TestCase {
+class MWMessagePackTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
/**
* @group Cache
*/
-class MapCacheLRUTest extends PHPUnit_Framework_TestCase {
+class MapCacheLRUTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
* PHP Unit tests for MemoizedCallable class.
* @covers MemoizedCallable
*/
-class MemoizedCallableTest extends PHPUnit_Framework_TestCase {
+class MemoizedCallableTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
*
* @group Cache
*/
-class ProcessCacheLRUTest extends PHPUnit_Framework_TestCase {
+class ProcessCacheLRUTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
/**
* @covers SamplingStatsdClient
*/
-class SamplingStatsdClientTest extends PHPUnit_Framework_TestCase {
+class SamplingStatsdClientTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
<?php
-class StringUtilsTest extends PHPUnit_Framework_TestCase {
+class StringUtilsTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
* @author Ori Livneh <ori@wikimedia.org>
*/
-class TimingTest extends PHPUnit_Framework_TestCase {
+class TimingTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
* @copyright © 2014 Wikimedia Foundation and contributors
* @since 1.25
*/
-class XhprofDataTest extends PHPUnit_Framework_TestCase {
+class XhprofDataTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
* @file
*/
-class XhprofTest extends PHPUnit_Framework_TestCase {
+class XhprofTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
* @group Xml
* @covers XMLTypeCheck
*/
-class XmlTypeCheckTest extends PHPUnit_Framework_TestCase {
+class XmlTypeCheckTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
*
* @author Daniel Kinzler
*/
-class HttpAcceptNegotiatorTest extends \PHPUnit_Framework_TestCase {
+class HttpAcceptNegotiatorTest extends \PHPUnit\Framework\TestCase {
public function provideGetFirstSupportedValue() {
return [
*
* @author Daniel Kinzler
*/
-class HttpAcceptParserTest extends \PHPUnit_Framework_TestCase {
+class HttpAcceptParserTest extends \PHPUnit\Framework\TestCase {
public function provideParseWeights() {
return [
* @group Media
* @covers MimeAnalyzer
*/
-class MimeAnalyzerTest extends PHPUnit_Framework_TestCase {
+class MimeAnalyzerTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
/**
* @group BagOStuff
*/
-class CachedBagOStuffTest extends PHPUnit_Framework_TestCase {
+class CachedBagOStuffTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
/**
* @group BagOStuff
*/
-class HashBagOStuffTest extends PHPUnit_Framework_TestCase {
+class HashBagOStuffTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
* @covers WANObjectCache::getInterimValue
* @covers WANObjectCache::setInterimValue
*/
-class WANObjectCacheTest extends PHPUnit_Framework_TestCase {
+class WANObjectCacheTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
/**
* @covers \Wikimedia\Rdbms\TransactionProfiler
*/
-class TransactionProfilerTest extends PHPUnit_Framework_TestCase {
+class TransactionProfilerTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
*
* @author Daniel Kinzler
*/
-class ConnectionManagerTest extends \PHPUnit_Framework_TestCase {
+class ConnectionManagerTest extends \PHPUnit\Framework\TestCase {
/**
* @return IDatabase|PHPUnit_Framework_MockObject_MockObject
*
* @author Daniel Kinzler
*/
-class SessionConsistentConnectionManagerTest extends \PHPUnit_Framework_TestCase {
+class SessionConsistentConnectionManagerTest extends \PHPUnit\Framework\TestCase {
/**
* @return IDatabase|PHPUnit_Framework_MockObject_MockObject
/**
* @covers Wikimedia\Rdbms\DBConnRef
*/
-class DBConnRefTest extends PHPUnit_Framework_TestCase {
+class DBConnRefTest extends PHPUnit\Framework\TestCase {
/**
* @return ILoadBalancer
/**
* @covers Wikimedia\Rdbms\DatabaseDomain
*/
-class DatabaseDomainTest extends PHPUnit_Framework_TestCase {
+class DatabaseDomainTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
}
}
-class DatabaseMysqlBaseTest extends PHPUnit_Framework_TestCase {
+class DatabaseMysqlBaseTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
* 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;
use Wikimedia\Rdbms\TransactionProfiler;
use Wikimedia\TestingAccessWrapper;
-class DatabaseTest extends PHPUnit_Framework_TestCase {
+class DatabaseTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
* @group Media
* @covers XMPReader
*/
-class XMPTest extends PHPUnit_Framework_TestCase {
+class XMPTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
/**
* @group Media
*/
-class XMPValidateTest extends PHPUnit_Framework_TestCase {
+class XMPValidateTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
/**
* @group BagOStuff
*/
-class RedisBagOStuffTest extends PHPUnit_Framework_TestCase {
+class RedisBagOStuffTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
* @covers ParserOptions
* @covers ParserOutput
*/
-class ParserIntegrationTest extends PHPUnit_Framework_TestCase {
+class ParserIntegrationTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
/**
* @covers VersionChecker
*/
-class VersionCheckerTest extends PHPUnit_Framework_TestCase {
+class VersionCheckerTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
* @group ResourceLoader
* @covers DerivativeResourceLoaderContext
*/
-class DerivativeResourceLoaderContextTest extends PHPUnit_Framework_TestCase {
+class DerivativeResourceLoaderContextTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
* @group Cache
* @covers MessageBlobStore
*/
-class MessageBlobStoreTest extends PHPUnit_Framework_TestCase {
+class MessageBlobStoreTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
/**
* @group ResourceLoader
*/
-class ResourceLoaderClientHtmlTest extends PHPUnit_Framework_TestCase {
+class ResourceLoaderClientHtmlTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
* @group Cache
* @covers ResourceLoaderContext
*/
-class ResourceLoaderContextTest extends PHPUnit_Framework_TestCase {
+class ResourceLoaderContextTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
/**
* @group ResourceLoader
*/
-class ResourceLoaderSkinModuleTest extends PHPUnit_Framework_TestCase {
+class ResourceLoaderSkinModuleTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
* 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
*
* @group MediaWiki
*/
-class ServiceContainerTest extends PHPUnit_Framework_TestCase {
+class ServiceContainerTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
/**
* @group Shell
*/
-class CommandFactoryTest extends PHPUnit_Framework_TestCase {
+class CommandFactoryTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
* @covers \MediaWiki\Shell\Command
* @group Shell
*/
-class CommandTest extends PHPUnit_Framework_TestCase {
+class CommandTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
use MediaWiki\Shell\Shell;
use Wikimedia\TestingAccessWrapper;
-class FirejailCommandTest extends PHPUnit_Framework_TestCase {
+class FirejailCommandTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
* @covers \MediaWiki\Shell\Shell
* @group Shell
*/
-class ShellTest extends PHPUnit_Framework_TestCase {
+class ShellTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
*
* @author Katie Filbert < aude.wiki@gmail.com >
*/
-class FileBasedSiteLookupTest extends PHPUnit_Framework_TestCase {
+class FileBasedSiteLookupTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
*
* @author Marius Hoch
*/
-class MediaWikiPageNameNormalizerTest extends PHPUnit_Framework_TestCase {
+class MediaWikiPageNameNormalizerTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
*
* @author Daniel Kinzler
*/
-class SiteExporterTest extends PHPUnit_Framework_TestCase {
+class SiteExporterTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
*
* @author Daniel Kinzler
*/
-class SiteImporterTest extends PHPUnit_Framework_TestCase {
+class SiteImporterTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
*
* @author Katie Filbert < aude.wiki@gmail.com >
*/
-class SitesCacheFileBuilderTest extends PHPUnit_Framework_TestCase {
+class SitesCacheFileBuilderTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
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 );
/**
* @covers AvroValidator
*/
-class AvroValidatorTest extends PHPUnit_Framework_TestCase {
+class AvroValidatorTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
/**
* @covers ClassCollector
*/
-class ClassCollectorTest extends PHPUnit_Framework_TestCase {
+class ClassCollectorTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
/**
* @covers FileContentsHasherTest
*/
-class FileContentsHasherTest extends PHPUnit_Framework_TestCase {
+class FileContentsHasherTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
*
* @covers MWCryptHash
*/
-class MWCryptHashTest extends PHPUnit_Framework_TestCase {
+class MWCryptHashTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
<?php
-class MWRestrictionsTest extends PHPUnit_Framework_TestCase {
+class MWRestrictionsTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
<?php
-class UIDGeneratorTest extends PHPUnit_Framework_TestCase {
+class UIDGeneratorTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
* @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;
)
->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
) );
)
->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
) );
)
->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
) );
)
->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
) );
*
* @author Thiemo Kreuz
*/
-class LanguageCodeTest extends PHPUnit_Framework_TestCase {
+class LanguageCodeTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
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;
function testExistingSeveral() {
$this->assertFilter(
- join( "\n", [
+ implode( "\n", [
self::$textId1,
self::$textId5,
self::$textId3,
}
}
- 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 );
*
* @author Marius Hoch < hoo@online.de >
*/
-class AvailableRightsTest extends PHPUnit_Framework_TestCase {
+class AvailableRightsTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
* 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;
'MediaWikiTestCase',
'ResourceLoaderTestCase',
'PHPUnit_Framework_TestCase',
+ '\\?PHPUnit\\Framework\\TestCase',
'DumpTestCase',
] );
$testClassRegex = "^class .* extends ($testClassRegex)";