Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F585023
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
35 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/tests/phpunit/includes/Html/HtmlTest.php b/tests/phpunit/includes/Html/HtmlTest.php
index 6fa9063141a..3af799fe016 100644
--- a/tests/phpunit/includes/Html/HtmlTest.php
+++ b/tests/phpunit/includes/Html/HtmlTest.php
@@ -110,7 +110,7 @@ class HtmlTest extends MediaWikiIntegrationTestCase {
);
}
- public function provideXmlMimeType() {
+ public static function provideXmlMimeType() {
return [
// ( $mimetype, $isXmlMimeType )
# HTML is not an XML MimeType
diff --git a/tests/phpunit/includes/Output/OutputPageTest.php b/tests/phpunit/includes/Output/OutputPageTest.php
index b3daf2effab..a40efb41c84 100644
--- a/tests/phpunit/includes/Output/OutputPageTest.php
+++ b/tests/phpunit/includes/Output/OutputPageTest.php
@@ -3243,7 +3243,7 @@ class OutputPageTest extends MediaWikiIntegrationTestCase {
$this->assertArraySubmapSame( $expectedEditableConfig, $op->getJSVars() );
}
- public function provideJsVarsAboutPageLang() {
+ public static function provideJsVarsAboutPageLang() {
// Format:
// - expected
// - title
@@ -3377,7 +3377,7 @@ class OutputPageTest extends MediaWikiIntegrationTestCase {
$this->assertSame( $expected, $op->userCanPreview() );
}
- public function providePermissionStatus() {
+ public static function providePermissionStatus() {
yield 'no errors' => [
PermissionStatus::newEmpty(),
'',
@@ -3398,7 +3398,7 @@ class OutputPageTest extends MediaWikiIntegrationTestCase {
];
}
- public function provideFormatPermissionStatus() {
+ public static function provideFormatPermissionStatus() {
yield 'RawMessage' => [
PermissionStatus::newEmpty()->fatal( new RawMessage( 'Foo Bar' ) ),
'(permissionserrorstext: 1)
diff --git a/tests/phpunit/includes/api/ApiOptionsTest.php b/tests/phpunit/includes/api/ApiOptionsTest.php
index 511b462d7e1..1671e984840 100644
--- a/tests/phpunit/includes/api/ApiOptionsTest.php
+++ b/tests/phpunit/includes/api/ApiOptionsTest.php
@@ -255,7 +255,7 @@ class ApiOptionsTest extends ApiTestCase {
$this->fail( "ApiUsageException was not thrown" );
}
- public function provideUserScenarios() {
+ public static function provideUserScenarios() {
return [
[ true, true, false ],
[ true, false, true ],
diff --git a/tests/phpunit/includes/api/ApiStashEditTest.php b/tests/phpunit/includes/api/ApiStashEditTest.php
index dcc922cf7ea..fafd0e0f131 100644
--- a/tests/phpunit/includes/api/ApiStashEditTest.php
+++ b/tests/phpunit/includes/api/ApiStashEditTest.php
@@ -436,7 +436,7 @@ class ApiStashEditTest extends ApiTestCase {
$this->assertEqualsWithDelta( $ttl, $wrapper->bag[$key][HashBagOStuff::KEY_EXP] - time(), 1 );
}
- public function signatureProvider() {
+ public static function signatureProvider() {
return [
'~~~' => [ '~~~', PageEditStash::MAX_SIGNATURE_TTL ],
'~~~~' => [ '~~~~', PageEditStash::MAX_SIGNATURE_TTL ],
diff --git a/tests/phpunit/includes/api/query/ApiQuerySiteinfoTest.php b/tests/phpunit/includes/api/query/ApiQuerySiteinfoTest.php
index 474370eaece..2879398ac8b 100644
--- a/tests/phpunit/includes/api/query/ApiQuerySiteinfoTest.php
+++ b/tests/phpunit/includes/api/query/ApiQuerySiteinfoTest.php
@@ -670,7 +670,7 @@ class ApiQuerySiteinfoTest extends ApiTestCase {
}
}
- public function skinsProvider() {
+ public static function skinsProvider() {
return [
'No language specified' => [ null ],
'Czech' => [ 'cs' ],
diff --git a/tests/phpunit/includes/block/BlockRestrictionStoreTest.php b/tests/phpunit/includes/block/BlockRestrictionStoreTest.php
index 345d712daa3..b8d894a0aba 100644
--- a/tests/phpunit/includes/block/BlockRestrictionStoreTest.php
+++ b/tests/phpunit/includes/block/BlockRestrictionStoreTest.php
@@ -439,7 +439,7 @@ class BlockRestrictionStoreTest extends \MediaWikiLangTestCase {
$this->assertSame( $expected, $this->blockRestrictionStore->equals( $a, $b ) );
}
- public function equalsDataProvider() {
+ public static function equalsDataProvider() {
return [
[
[
diff --git a/tests/phpunit/includes/content/Transform/PreSaveTransformParamsValueTest.php b/tests/phpunit/includes/content/Transform/PreSaveTransformParamsValueTest.php
index aad4f34d1fe..68a06167086 100644
--- a/tests/phpunit/includes/content/Transform/PreSaveTransformParamsValueTest.php
+++ b/tests/phpunit/includes/content/Transform/PreSaveTransformParamsValueTest.php
@@ -80,7 +80,7 @@ class PreSaveTransformParamsValueTest extends MediaWikiIntegrationTestCase {
$this->assertSame( $options, $params->getParserOptions() );
}
- public function provideParserOptions(): array {
+ public static function provideParserOptions(): array {
$user = new User();
$options = ParserOptions::newFromUser( $user );
return [
diff --git a/tests/phpunit/includes/import/ImportTest.php b/tests/phpunit/includes/import/ImportTest.php
index e49fc7e1005..b728285725e 100644
--- a/tests/phpunit/includes/import/ImportTest.php
+++ b/tests/phpunit/includes/import/ImportTest.php
@@ -36,7 +36,7 @@ class ImportTest extends MediaWikiLangTestCase {
);
}
- public function provideUnknownTagsXML() {
+ public static function provideUnknownTagsXML() {
return [
[
<<< EOF
@@ -99,7 +99,7 @@ EOF
$this->assertEquals( $redirectTitle, $redirect );
}
- public function provideRedirectXML() {
+ public static function provideRedirectXML() {
return [
[
<<< EOF
@@ -180,7 +180,7 @@ EOF
$this->assertEquals( $importNamespaces, $namespaces );
}
- public function provideSiteInfoXML() {
+ public static function provideSiteInfoXML() {
return [
[
<<< EOF
diff --git a/tests/phpunit/includes/installer/WebInstallerTest.php b/tests/phpunit/includes/installer/WebInstallerTest.php
index 8d5317c3100..ab7c0c6b50d 100644
--- a/tests/phpunit/includes/installer/WebInstallerTest.php
+++ b/tests/phpunit/includes/installer/WebInstallerTest.php
@@ -18,7 +18,7 @@ class WebInstallerTest extends MediaWikiIntegrationTestCase {
);
}
- public function provideGetAcceptLanguage() {
+ public static function provideGetAcceptLanguage() {
return [
[ 'de-ch', 'de-LI,de-CH;q=0.8,de;q=0.5,en;q=0.3' ],
// T189193: This should be 'de-de' or 'de'.
diff --git a/tests/phpunit/includes/language/LanguageIntegrationTest.php b/tests/phpunit/includes/language/LanguageIntegrationTest.php
index c20c2be414a..c56f0d5d089 100644
--- a/tests/phpunit/includes/language/LanguageIntegrationTest.php
+++ b/tests/phpunit/includes/language/LanguageIntegrationTest.php
@@ -1374,7 +1374,7 @@ class LanguageIntegrationTest extends LanguageClassesTestCase {
);
}
- public function provideFormatDurationBetweenTimestamps(): array {
+ public static function provideFormatDurationBetweenTimestamps(): array {
return [
// most test cases ported from provideFormatDuration()
[
diff --git a/tests/phpunit/includes/objectcache/ObjectCacheFactoryIntegrationTest.php b/tests/phpunit/includes/objectcache/ObjectCacheFactoryIntegrationTest.php
index 47b54738f63..f781516bb19 100644
--- a/tests/phpunit/includes/objectcache/ObjectCacheFactoryIntegrationTest.php
+++ b/tests/phpunit/includes/objectcache/ObjectCacheFactoryIntegrationTest.php
@@ -141,7 +141,7 @@ class ObjectCacheFactoryIntegrationTest extends MediaWikiIntegrationTestCase {
);
}
- public function provideLocalServerKeyspace() {
+ public static function provideLocalServerKeyspace() {
$dbDomain = static function ( $dbName, $dbPrefix ) {
global $wgDBmwschema;
return ( new DatabaseDomain( $dbName, $wgDBmwschema, $dbPrefix ) )->getId();
diff --git a/tests/phpunit/includes/page/WikiPageDbTest.php b/tests/phpunit/includes/page/WikiPageDbTest.php
index 1d4a4e73ee1..31cfcd8c6b5 100644
--- a/tests/phpunit/includes/page/WikiPageDbTest.php
+++ b/tests/phpunit/includes/page/WikiPageDbTest.php
@@ -1004,7 +1004,7 @@ just a test
more stuff
";
- public function provideReplaceSection() {
+ public static function provideReplaceSection() {
// NOTE: assume the Help namespace to contain wikitext
return [
[ 'Help:WikiPageTest_testReplaceSection',
diff --git a/tests/phpunit/includes/pager/ContributionsPagerTest.php b/tests/phpunit/includes/pager/ContributionsPagerTest.php
index 13d64b45e5b..8b6d98f213b 100644
--- a/tests/phpunit/includes/pager/ContributionsPagerTest.php
+++ b/tests/phpunit/includes/pager/ContributionsPagerTest.php
@@ -66,7 +66,7 @@ class ContributionsPagerTest extends MediaWikiIntegrationTestCase {
$pager->createRevisionRecord( $row );
}
- public function provideIsArchive() {
+ public static function provideIsArchive() {
return [
'Get revisions from the revision table' => [ false, [ 'rev_id' => 6789 ] ],
'Get revisions from the archive table' => [ true, [ 'ar_rev_id' => 9876 ] ],
@@ -192,7 +192,7 @@ class ContributionsPagerTest extends MediaWikiIntegrationTestCase {
$pager->getBody();
}
- public function provideRunHooks() {
+ public static function provideRunHooks() {
return [
'Do not run any hooks if runHooks is false' => [ false, false ],
'Run hooks if runHooks is true' => [ true, true ],
diff --git a/tests/phpunit/includes/parser/SanitizerTest.php b/tests/phpunit/includes/parser/SanitizerTest.php
index fd5654615c4..24b5acf1405 100644
--- a/tests/phpunit/includes/parser/SanitizerTest.php
+++ b/tests/phpunit/includes/parser/SanitizerTest.php
@@ -63,7 +63,7 @@ class SanitizerTest extends MediaWikiIntegrationTestCase {
];
}
- public function provideRemoveHTMLtags() {
+ public static function provideRemoveHTMLtags() {
return [
// former testSelfClosingTag
[
diff --git a/tests/phpunit/includes/preferences/DefaultPreferencesFactoryTest.php b/tests/phpunit/includes/preferences/DefaultPreferencesFactoryTest.php
index d118a00c6f0..4f3372119e2 100644
--- a/tests/phpunit/includes/preferences/DefaultPreferencesFactoryTest.php
+++ b/tests/phpunit/includes/preferences/DefaultPreferencesFactoryTest.php
@@ -290,7 +290,7 @@ class DefaultPreferencesFactoryTest extends \MediaWikiIntegrationTestCase {
);
}
- public function emailAuthenticationProvider() {
+ public static function emailAuthenticationProvider() {
$userNoEmail = new User;
$userEmailUnauthed = new User;
$userEmailUnauthed->setEmail( 'noauth@example.org' );
diff --git a/tests/phpunit/includes/preferences/SignatureValidatorTest.php b/tests/phpunit/includes/preferences/SignatureValidatorTest.php
index 05f87214771..8d9fc692d62 100644
--- a/tests/phpunit/includes/preferences/SignatureValidatorTest.php
+++ b/tests/phpunit/includes/preferences/SignatureValidatorTest.php
@@ -199,7 +199,7 @@ class SignatureValidatorTest extends MediaWikiIntegrationTestCase {
$this->assertFalse( $result );
}
- public function provideValidateSignature() {
+ public static function provideValidateSignature() {
yield 'Perfect' => [
'[[User:SignatureValidatorTest|Signature]] ([[User talk:SignatureValidatorTest|talk]])',
// no complaints from lint
diff --git a/tests/phpunit/includes/specials/SpecialContributionsTest.php b/tests/phpunit/includes/specials/SpecialContributionsTest.php
index 67681a2d1dc..35ff635eff2 100644
--- a/tests/phpunit/includes/specials/SpecialContributionsTest.php
+++ b/tests/phpunit/includes/specials/SpecialContributionsTest.php
@@ -123,7 +123,7 @@ class SpecialContributionsTest extends SpecialPageTestBase {
);
}
- public function executeForUserWithWhitespacesDataProvider(): array {
+ public static function executeForUserWithWhitespacesDataProvider(): array {
return [
'With an empty target' => [
'expected' => '',
diff --git a/tests/phpunit/includes/specials/redirects/SpecialTalkPageTest.php b/tests/phpunit/includes/specials/redirects/SpecialTalkPageTest.php
index 94dfa5f834a..d3c7819ff9d 100644
--- a/tests/phpunit/includes/specials/redirects/SpecialTalkPageTest.php
+++ b/tests/phpunit/includes/specials/redirects/SpecialTalkPageTest.php
@@ -47,7 +47,7 @@ class SpecialTalkPageTest extends MediaWikiIntegrationTestCase {
$this->assertHTMLEquals( $expectedRedirect, $output->getHTML(), 'redirect should contain appropriate HTML' );
}
- public function provideRedirects() {
+ public static function provideRedirects() {
$subjectTitleText = 'MediaWiki:ok';
$subjectTitle = Title::newFromText( $subjectTitleText );
$talkTitle = $subjectTitle->getTalkPageIfDefined();
@@ -78,7 +78,7 @@ class SpecialTalkPageTest extends MediaWikiIntegrationTestCase {
);
}
- public function provideNoRedirects() {
+ public static function provideNoRedirects() {
yield [ '', null ];
yield [ 'Special:TalkPage', null, 'title-invalid-talk-namespace', "value='Special:TalkPage'" ];
yield [ '', 'Special:TalkPage', 'title-invalid-talk-namespace', "value='Special:TalkPage'" ];
diff --git a/tests/phpunit/includes/title/TitleTest.php b/tests/phpunit/includes/title/TitleTest.php
index 02b1e142411..25d3d7ed6d8 100644
--- a/tests/phpunit/includes/title/TitleTest.php
+++ b/tests/phpunit/includes/title/TitleTest.php
@@ -146,7 +146,7 @@ class TitleTest extends MediaWikiIntegrationTestCase {
$this->assertEquals( $expectedBool, $title->hasSubjectNamespace( $ns ) );
}
- public function provideGetContentModel() {
+ public static function provideGetContentModel() {
return [
[ 'Help:Foo', CONTENT_MODEL_WIKITEXT ],
[ 'Help:Foo.js', CONTENT_MODEL_WIKITEXT ],
diff --git a/tests/phpunit/integration/includes/Permissions/GrantsLocalizationTest.php b/tests/phpunit/integration/includes/Permissions/GrantsLocalizationTest.php
index 185f1fc0ab2..f3e0cbf093e 100644
--- a/tests/phpunit/integration/includes/Permissions/GrantsLocalizationTest.php
+++ b/tests/phpunit/integration/includes/Permissions/GrantsLocalizationTest.php
@@ -38,7 +38,7 @@ class GrantsLocalizationTest extends MediaWikiIntegrationTestCase {
);
}
- public function provideGrantDescriptions() {
+ public static function provideGrantDescriptions() {
yield [ 'blockusers' ];
yield [ 'createeditmovepage' ];
yield [ 'delete' ];
diff --git a/tests/phpunit/integration/includes/Rest/Handler/Helper/PageContentHelperTest.php b/tests/phpunit/integration/includes/Rest/Handler/Helper/PageContentHelperTest.php
index dfb074876c7..363b7641fae 100644
--- a/tests/phpunit/integration/includes/Rest/Handler/Helper/PageContentHelperTest.php
+++ b/tests/phpunit/integration/includes/Rest/Handler/Helper/PageContentHelperTest.php
@@ -371,7 +371,7 @@ class PageContentHelperTest extends MediaWikiIntegrationTestCase {
$this->assertEquals( $expected, $data );
}
- public function provideConstructRestbaseCompatibleMetadata() {
+ public static function provideConstructRestbaseCompatibleMetadata() {
$pageName = 'User:Morg';
$page = PageIdentityValue::localIdentity( 7, NS_USER, 'Morg' );
$user = UserIdentityValue::newRegistered( 444, 'Morg' );
diff --git a/tests/phpunit/integration/includes/Rest/Handler/PageRedirectHandlerTest.php b/tests/phpunit/integration/includes/Rest/Handler/PageRedirectHandlerTest.php
index af7211120d9..05a44fe0ebd 100644
--- a/tests/phpunit/integration/includes/Rest/Handler/PageRedirectHandlerTest.php
+++ b/tests/phpunit/integration/includes/Rest/Handler/PageRedirectHandlerTest.php
@@ -87,7 +87,7 @@ class PageRedirectHandlerTest extends MediaWikiIntegrationTestCase {
}
}
- public function temporaryRedirectProvider() {
+ public static function temporaryRedirectProvider() {
yield [
'source',
'/page/{title}',
diff --git a/tests/phpunit/integration/includes/Rest/Handler/RedirectHandlerTest.php b/tests/phpunit/integration/includes/Rest/Handler/RedirectHandlerTest.php
index 1076241f9bd..329ecb2997d 100644
--- a/tests/phpunit/integration/includes/Rest/Handler/RedirectHandlerTest.php
+++ b/tests/phpunit/integration/includes/Rest/Handler/RedirectHandlerTest.php
@@ -13,7 +13,7 @@ use MediaWikiIntegrationTestCase;
class RedirectHandlerTest extends MediaWikiIntegrationTestCase {
use HandlerTestTrait;
- public function redirectConfigProvider() {
+ public static function redirectConfigProvider() {
return [
[
[ 'path' => '/v1/other/path/{param}', 'code' => 301 ],
@@ -30,7 +30,7 @@ class RedirectHandlerTest extends MediaWikiIntegrationTestCase {
];
}
- public function provideFailure() {
+ public static function provideFailure() {
return [
[
[ 'path' => '', 'code' => 308 ],
diff --git a/tests/phpunit/integration/includes/mail/EmailerTest.php b/tests/phpunit/integration/includes/mail/EmailerTest.php
index 8240bf34b52..276ee529075 100644
--- a/tests/phpunit/integration/includes/mail/EmailerTest.php
+++ b/tests/phpunit/integration/includes/mail/EmailerTest.php
@@ -57,7 +57,7 @@ class EmailerTest extends MediaWikiIntegrationTestCase {
$this->assertFalse( $status->isGood() );
}
- public function provideSend(): array {
+ public static function provideSend(): array {
$from = new MailAddress( 'foo@example.com', 'UserName', 'Real name' );
$to = new MailAddress( 'bar@example.com', 'UserName', 'Real name' );
$bodyHtml = '<p>Hello, World!</p>';
diff --git a/tests/phpunit/integration/includes/specials/SpecialRandomPageTest.php b/tests/phpunit/integration/includes/specials/SpecialRandomPageTest.php
index 9fc3d8d1f68..1d5c3835957 100644
--- a/tests/phpunit/integration/includes/specials/SpecialRandomPageTest.php
+++ b/tests/phpunit/integration/includes/specials/SpecialRandomPageTest.php
@@ -33,7 +33,7 @@ class SpecialRandomPageTest extends MediaWikiIntegrationTestCase {
$this->assertEquals( $expectedNS, $this->page->getNamespaces() );
}
- public function providerParsePar() {
+ public static function providerParsePar() {
global $wgContentNamespaces;
return [
diff --git a/tests/phpunit/maintenance/BackupDumperPageTest.php b/tests/phpunit/maintenance/BackupDumperPageTest.php
index a9090eb6b5b..dd9e8aeea64 100644
--- a/tests/phpunit/maintenance/BackupDumperPageTest.php
+++ b/tests/phpunit/maintenance/BackupDumperPageTest.php
@@ -95,7 +95,7 @@ class BackupDumperPageTest extends DumpTestCase {
return $dumper;
}
- public function schemaVersionProvider() {
+ public static function schemaVersionProvider() {
foreach ( XmlDumpWriter::$supportedSchemas as $schemaVersion ) {
yield [ $schemaVersion ];
}
diff --git a/tests/phpunit/maintenance/TextPassDumperDatabaseTest.php b/tests/phpunit/maintenance/TextPassDumperDatabaseTest.php
index dce01ea2626..6375bd2bdb2 100644
--- a/tests/phpunit/maintenance/TextPassDumperDatabaseTest.php
+++ b/tests/phpunit/maintenance/TextPassDumperDatabaseTest.php
@@ -32,7 +32,7 @@ class TextPassDumperDatabaseTest extends DumpTestCase {
$this->addTestPages( $this->getTestSysop()->getUser() );
}
- public function schemaVersionProvider() {
+ public static function schemaVersionProvider() {
foreach ( XmlDumpWriter::$supportedSchemas as $schemaVersion ) {
yield [ $schemaVersion ];
}
diff --git a/tests/phpunit/unit/includes/GlobalFunctions/WfEscapeWikiTextTest.php b/tests/phpunit/unit/includes/GlobalFunctions/WfEscapeWikiTextTest.php
index c9de634b8fe..17c09aacf88 100644
--- a/tests/phpunit/unit/includes/GlobalFunctions/WfEscapeWikiTextTest.php
+++ b/tests/phpunit/unit/includes/GlobalFunctions/WfEscapeWikiTextTest.php
@@ -28,7 +28,7 @@ class WfEscapeWikiTextTest extends MediaWikiUnitTestCase {
}
}
- public function provideEscape() {
+ public static function provideEscape() {
return [
'null' => [
null,
diff --git a/tests/phpunit/unit/includes/GlobalFunctions/WfStringToBoolTest.php b/tests/phpunit/unit/includes/GlobalFunctions/WfStringToBoolTest.php
index 88bc6dbb993..09e30701167 100644
--- a/tests/phpunit/unit/includes/GlobalFunctions/WfStringToBoolTest.php
+++ b/tests/phpunit/unit/includes/GlobalFunctions/WfStringToBoolTest.php
@@ -6,7 +6,7 @@
*/
class WfStringToBoolTest extends MediaWikiUnitTestCase {
- public function provideTestCases() {
+ public static function provideTestCases() {
return [
[ 'true', true ],
[ 'on', true ],
diff --git a/tests/phpunit/unit/includes/ParamValidator/TypeDef/ArrayDefTest.php b/tests/phpunit/unit/includes/ParamValidator/TypeDef/ArrayDefTest.php
index fe077b28bbd..d78aaad71fe 100644
--- a/tests/phpunit/unit/includes/ParamValidator/TypeDef/ArrayDefTest.php
+++ b/tests/phpunit/unit/includes/ParamValidator/TypeDef/ArrayDefTest.php
@@ -126,7 +126,7 @@ class ArrayDefTest extends TypeDefUnitTestCase {
];
}
- public function provideListSchema() {
+ public static function provideListSchema() {
yield 'simple list of strings' => [
'string',
[
@@ -171,7 +171,7 @@ class ArrayDefTest extends TypeDefUnitTestCase {
$this->assertArrayEquals( $expect, $paramSchema );
}
- public function provideMapSchema() {
+ public static function provideMapSchema() {
yield 'simple map of strings' => [
'string',
[
@@ -216,7 +216,7 @@ class ArrayDefTest extends TypeDefUnitTestCase {
$this->assertArrayEquals( $expect, $paramSchema );
}
- public function provideObjectSchema() {
+ public static function provideObjectSchema() {
yield 'object with two required properties, one an integer and another an enum' => [
[ 'a' => 'integer', 'b' => [ 'enum' => [ 'x', 'y', 'z' ] ] ],
[],
@@ -292,7 +292,7 @@ class ArrayDefTest extends TypeDefUnitTestCase {
$this->assertArrayEquals( $expect, $paramSchema );
}
- public function provideInvalidObjectSchema() {
+ public static function provideInvalidObjectSchema() {
yield 'object with property defined as both required and optional' => [
[ 'a' => 'integer' ],
[ 'a' => 'integer' ],
diff --git a/tests/phpunit/unit/includes/Permissions/PermissionManagerTest.php b/tests/phpunit/unit/includes/Permissions/PermissionManagerTest.php
index d5ac2535508..4f132128617 100644
--- a/tests/phpunit/unit/includes/Permissions/PermissionManagerTest.php
+++ b/tests/phpunit/unit/includes/Permissions/PermissionManagerTest.php
@@ -365,7 +365,7 @@ class PermissionManagerTest extends MediaWikiUnitTestCase {
$this->assertStatusMessagesExactly( $expectedStatus, $result );
}
- public function provideTestCheckQuickPermissionsHook() {
+ public static function provideTestCheckQuickPermissionsHook() {
// test name => [ $hookErrors, $expectedStatus ]
yield 'Hook returns false but no errors' => [
[],
diff --git a/tests/phpunit/unit/includes/Rest/Handler/HandlerTest.php b/tests/phpunit/unit/includes/Rest/Handler/HandlerTest.php
index 0bff3463760..001b129acae 100644
--- a/tests/phpunit/unit/includes/Rest/Handler/HandlerTest.php
+++ b/tests/phpunit/unit/includes/Rest/Handler/HandlerTest.php
@@ -516,7 +516,7 @@ class HandlerTest extends MediaWikiUnitTestCase {
$this->assertSame( $expectedParams, $params );
}
- public function provideValidateBodyParams_invalid() {
+ public static function provideValidateBodyParams_invalid() {
$paramDefintions = [
'foo' => [
ParamValidator::PARAM_TYPE => 'timestamp',
diff --git a/tests/phpunit/unit/includes/Rest/Validator/ValidatorTest.php b/tests/phpunit/unit/includes/Rest/Validator/ValidatorTest.php
index 31be24dbf85..ce658c01e2d 100644
--- a/tests/phpunit/unit/includes/Rest/Validator/ValidatorTest.php
+++ b/tests/phpunit/unit/includes/Rest/Validator/ValidatorTest.php
@@ -752,7 +752,7 @@ class ValidatorTest extends MediaWikiUnitTestCase {
}
}
- public function provideGetValue() {
+ public static function provideGetValue() {
return [
// Test case 0: Parameter exists in source and no normalization required
[
diff --git a/tests/phpunit/unit/includes/Settings/Source/EtcdSourceTest.php b/tests/phpunit/unit/includes/Settings/Source/EtcdSourceTest.php
index 1019ccf1894..1bc2eacdda6 100644
--- a/tests/phpunit/unit/includes/Settings/Source/EtcdSourceTest.php
+++ b/tests/phpunit/unit/includes/Settings/Source/EtcdSourceTest.php
@@ -200,7 +200,7 @@ class EtcdSourceTest extends TestCase {
/**
* All possible server-side exceptions.
*/
- public function provideServerFailures(): array {
+ public static function provideServerFailures(): array {
return [
[
new ConnectException(
diff --git a/tests/phpunit/unit/includes/Storage/RevertedTagUpdateManagerTest.php b/tests/phpunit/unit/includes/Storage/RevertedTagUpdateManagerTest.php
index b692aa15108..106ccd188ff 100644
--- a/tests/phpunit/unit/includes/Storage/RevertedTagUpdateManagerTest.php
+++ b/tests/phpunit/unit/includes/Storage/RevertedTagUpdateManagerTest.php
@@ -15,7 +15,7 @@ use MediaWikiUnitTestCase;
*/
class RevertedTagUpdateManagerTest extends MediaWikiUnitTestCase {
- public function provideApproveRevertedTagForRevision() {
+ public static function provideApproveRevertedTagForRevision() {
yield 'not revert' => [
new EditResult( false, 1234, 0, null, null, false, false, [] ),
false
diff --git a/tests/phpunit/unit/includes/content/FallbackContentHandlerTest.php b/tests/phpunit/unit/includes/content/FallbackContentHandlerTest.php
index 2b67aab0559..30e28d9ff10 100644
--- a/tests/phpunit/unit/includes/content/FallbackContentHandlerTest.php
+++ b/tests/phpunit/unit/includes/content/FallbackContentHandlerTest.php
@@ -49,7 +49,7 @@ class FallbackContentHandlerTest extends MediaWikiUnitTestCase {
$this->assertSame( '', $content->getData() );
}
- public function provideIsSupportedFormat() {
+ public static function provideIsSupportedFormat() {
return [
[ null, true ],
[ 'application/octet-stream', true ],
diff --git a/tests/phpunit/unit/includes/content/WikitextContentHandlerTest.php b/tests/phpunit/unit/includes/content/WikitextContentHandlerTest.php
index ab0c2ec4d29..e1f39df84aa 100644
--- a/tests/phpunit/unit/includes/content/WikitextContentHandlerTest.php
+++ b/tests/phpunit/unit/includes/content/WikitextContentHandlerTest.php
@@ -83,7 +83,7 @@ class WikitextContentHandlerTest extends MediaWikiUnitTestCase {
$this->assertSame( '', $content->getText() );
}
- public function provideIsSupportedFormat() {
+ public static function provideIsSupportedFormat() {
return [
[ null, true ],
[ CONTENT_FORMAT_WIKITEXT, true ],
diff --git a/tests/phpunit/unit/includes/db/MWLBFactoryTest.php b/tests/phpunit/unit/includes/db/MWLBFactoryTest.php
index a561ccdd726..cfde53eab1f 100644
--- a/tests/phpunit/unit/includes/db/MWLBFactoryTest.php
+++ b/tests/phpunit/unit/includes/db/MWLBFactoryTest.php
@@ -98,7 +98,7 @@ class MWLBFactoryTest extends MediaWikiUnitTestCase {
);
}
- public function setDomainAliasesProvider() {
+ public static function setDomainAliasesProvider() {
return [
[ 'enwiki', '', 'enwiki' ],
[ 'wikipedia', 'fr_', 'wikipedia-fr_' ],
diff --git a/tests/phpunit/unit/includes/libs/SamplingStatsdClientTest.php b/tests/phpunit/unit/includes/libs/SamplingStatsdClientTest.php
index ceccd55f96b..0c61e18c5a7 100644
--- a/tests/phpunit/unit/includes/libs/SamplingStatsdClientTest.php
+++ b/tests/phpunit/unit/includes/libs/SamplingStatsdClientTest.php
@@ -42,7 +42,7 @@ class SamplingStatsdClientTest extends TestCase {
$client->send( $data, $sampleRate );
}
- public function samplingDataProvider() {
+ public static function samplingDataProvider() {
$unsampled = new StatsdData();
$unsampled->setKey( 'foo' );
$unsampled->setValue( 1 );
diff --git a/tests/phpunit/unit/includes/libs/StatusValueTest.php b/tests/phpunit/unit/includes/libs/StatusValueTest.php
index 5e5f3923858..3d3992b6623 100644
--- a/tests/phpunit/unit/includes/libs/StatusValueTest.php
+++ b/tests/phpunit/unit/includes/libs/StatusValueTest.php
@@ -11,7 +11,7 @@ use StatusValue;
*/
class StatusValueTest extends MediaWikiUnitTestCase {
- public function provideToString() {
+ public static function provideToString() {
yield [
true, null, null,
'<OK, no errors detected, no value set>',
diff --git a/tests/phpunit/unit/includes/libs/StringUtilsTest.php b/tests/phpunit/unit/includes/libs/StringUtilsTest.php
index 9cffb5644d0..5359faeda03 100644
--- a/tests/phpunit/unit/includes/libs/StringUtilsTest.php
+++ b/tests/phpunit/unit/includes/libs/StringUtilsTest.php
@@ -150,7 +150,7 @@ class StringUtilsTest extends TestCase {
$this->assertSame( $replacement, $result );
}
- public function provideRegexReplacements() {
+ public static function provideRegexReplacements() {
return [
'meaningless characters' => [ ' "()*+-./?[]^a{|}ä' ],
'backslash' => [ '\\1' ],
diff --git a/tests/phpunit/unit/includes/libs/rdbms/database/QueryBuilderFromRawSqlTest.php b/tests/phpunit/unit/includes/libs/rdbms/database/QueryBuilderFromRawSqlTest.php
index 8ce1d65aeb1..fbac5a2b950 100644
--- a/tests/phpunit/unit/includes/libs/rdbms/database/QueryBuilderFromRawSqlTest.php
+++ b/tests/phpunit/unit/includes/libs/rdbms/database/QueryBuilderFromRawSqlTest.php
@@ -20,7 +20,7 @@ class QueryBuilderFromRawSqlTest extends MediaWikiUnitTestCase {
$this->assertSame( $expectedFlags, $query->getFlags() );
}
- public function provideBuildQuery() {
+ public static function provideBuildQuery() {
return [
[
'SELECT * FROM foo',
diff --git a/tests/phpunit/unit/includes/libs/telemetry/W3CTraceContextPropagatorTest.php b/tests/phpunit/unit/includes/libs/telemetry/W3CTraceContextPropagatorTest.php
index 3483df8e839..e2d2b05712c 100644
--- a/tests/phpunit/unit/includes/libs/telemetry/W3CTraceContextPropagatorTest.php
+++ b/tests/phpunit/unit/includes/libs/telemetry/W3CTraceContextPropagatorTest.php
@@ -96,7 +96,7 @@ class W3CTraceContextPropagatorTest extends MediaWikiUnitTestCase {
$this->assertSame( $expected, $carrier );
}
- public function provideInjectData(): iterable {
+ public static function provideInjectData(): iterable {
yield 'no active span context' => [
null,
[]
diff --git a/tests/phpunit/unit/includes/objectcache/RedisBagOStuffTest.php b/tests/phpunit/unit/includes/objectcache/RedisBagOStuffTest.php
index 32950ba462b..cb817df00c1 100644
--- a/tests/phpunit/unit/includes/objectcache/RedisBagOStuffTest.php
+++ b/tests/phpunit/unit/includes/objectcache/RedisBagOStuffTest.php
@@ -65,7 +65,7 @@ class RedisBagOStuffTest extends MediaWikiUnitTestCase {
$this->assertSame( $expected, $actual, $message );
}
- public function serializeProvider() {
+ public static function serializeProvider() {
return [
[
-1,
diff --git a/tests/phpunit/unit/includes/parser/MagicWordArrayTest.php b/tests/phpunit/unit/includes/parser/MagicWordArrayTest.php
index 37ccf1d318d..d716c7e1046 100644
--- a/tests/phpunit/unit/includes/parser/MagicWordArrayTest.php
+++ b/tests/phpunit/unit/includes/parser/MagicWordArrayTest.php
@@ -49,7 +49,7 @@ class MagicWordArrayTest extends MediaWikiUnitTestCase {
$this->assertSame( $expected, $array->matchStartToEnd( $input ) );
}
- public function provideMatchStartToEndCaseSensitive() {
+ public static function provideMatchStartToEndCaseSensitive() {
return [
'identifier is not automatically valid syntax' => [ 'ID', false ],
'mismatch' => [ 'unknown', false ],
@@ -69,7 +69,7 @@ class MagicWordArrayTest extends MediaWikiUnitTestCase {
$this->assertSame( $expected, $array->matchVariableStartToEnd( $input ) );
}
- public function provideMatchVariableStartToEnd() {
+ public static function provideMatchVariableStartToEnd() {
return [
'identifier is not automatically valid syntax' => [ 'ID' ],
'match' => [ 'SyNoNyM', [ 'ID', false ] ],
@@ -101,7 +101,7 @@ class MagicWordArrayTest extends MediaWikiUnitTestCase {
], $spy->getVariableStartToEndRegex() );
}
- public function provideMatchVariableStartToEndMultiple() {
+ public static function provideMatchVariableStartToEndMultiple() {
return [
[ 'thumb', [ 'img_thumbnail', false ] ],
[ 'upright=1.2', [ 'img_upright', '1.2' ] ],
@@ -127,7 +127,7 @@ class MagicWordArrayTest extends MediaWikiUnitTestCase {
$this->assertSame( $expectedText ?? $input, $text );
}
- public function provideMatchStartAndRemove() {
+ public static function provideMatchStartAndRemove() {
return [
'identifier is not automatically valid syntax' => [ 'ID', false ],
'match' => [ 'SyNoNyMx', 'ID', 'x' ],
@@ -151,7 +151,7 @@ class MagicWordArrayTest extends MediaWikiUnitTestCase {
$this->assertSame( $expectedText ?? $input, $text );
}
- public function provideMatchAndRemove() {
+ public static function provideMatchAndRemove() {
return [
'identifier is not automatically valid syntax' => [ 'ID' ],
'two matches' => [ 'xSyNoNyMxSyNoNyMx', [ 'ID' => false ], 'xxx' ],
@@ -175,7 +175,7 @@ class MagicWordArrayTest extends MediaWikiUnitTestCase {
$this->assertSame( $expectedText ?? $input, $text );
}
- public function provideMatchAndRemoveMultiple() {
+ public static function provideMatchAndRemoveMultiple() {
return [
[
'x__NOTC__x__NOTOC__x__NOTITLECONVERT__x',
diff --git a/tests/phpunit/unit/includes/parser/Parsoid/Config/SiteConfigTest.php b/tests/phpunit/unit/includes/parser/Parsoid/Config/SiteConfigTest.php
index e8e59312a02..6ae2fd4594f 100644
--- a/tests/phpunit/unit/includes/parser/Parsoid/Config/SiteConfigTest.php
+++ b/tests/phpunit/unit/includes/parser/Parsoid/Config/SiteConfigTest.php
@@ -906,7 +906,7 @@ class SiteConfigTest extends MediaWikiUnitTestCase {
$this->assertSame( null, $config->getMWConfigValue( 'CiteUnknownConfig' ) );
}
- public function provideMetricsData(): iterable {
+ public static function provideMetricsData(): iterable {
return [ [
"metric_name",
[
diff --git a/tests/phpunit/unit/includes/search/SearchIndexFieldTest.php b/tests/phpunit/unit/includes/search/SearchIndexFieldTest.php
index ecbd4845411..ddbbb55df13 100644
--- a/tests/phpunit/unit/includes/search/SearchIndexFieldTest.php
+++ b/tests/phpunit/unit/includes/search/SearchIndexFieldTest.php
@@ -6,7 +6,7 @@
*/
class SearchIndexFieldTest extends \MediaWikiUnitTestCase {
- public function provideMergeCases() {
+ public static function provideMergeCases() {
return [
[ 0, 'test', 0, 'test', true ],
[ SearchIndexField::INDEX_TYPE_NESTED, 'test',
diff --git a/tests/phpunit/unit/includes/user/Registration/LocalUserRegistrationProviderTest.php b/tests/phpunit/unit/includes/user/Registration/LocalUserRegistrationProviderTest.php
index b827c95c039..731bcc61396 100644
--- a/tests/phpunit/unit/includes/user/Registration/LocalUserRegistrationProviderTest.php
+++ b/tests/phpunit/unit/includes/user/Registration/LocalUserRegistrationProviderTest.php
@@ -62,7 +62,7 @@ class LocalUserRegistrationProviderTest extends MediaWikiUnitTestCase {
$this->provider->fetchRegistrationBatch( $users );
}
- public function provideInvalidInput(): iterable {
+ public static function provideInvalidInput(): iterable {
yield 'foreign UserIdentity instance' => [
[ new UserIdentityValue( 123, 'Admin', 'otherwiki' ) ],
new PreconditionException(
diff --git a/tests/phpunit/unit/includes/user/TempUser/TempUserDetailsLookupTest.php b/tests/phpunit/unit/includes/user/TempUser/TempUserDetailsLookupTest.php
index 434f462f887..697867ffc96 100644
--- a/tests/phpunit/unit/includes/user/TempUser/TempUserDetailsLookupTest.php
+++ b/tests/phpunit/unit/includes/user/TempUser/TempUserDetailsLookupTest.php
@@ -67,7 +67,7 @@ class TempUserDetailsLookupTest extends MediaWikiUnitTestCase {
$this->assertSame( $expired, $cached );
}
- public function provideIsExpired(): iterable {
+ public static function provideIsExpired(): iterable {
yield 'legacy IP user' => [
new UserIdentityValue( 0, '1.1.1.1' ),
null,
diff --git a/tests/phpunit/unit/includes/widget/UsersMultiselectWidgetTest.php b/tests/phpunit/unit/includes/widget/UsersMultiselectWidgetTest.php
index 6bcc3b5db14..35af1169f21 100644
--- a/tests/phpunit/unit/includes/widget/UsersMultiselectWidgetTest.php
+++ b/tests/phpunit/unit/includes/widget/UsersMultiselectWidgetTest.php
@@ -92,7 +92,7 @@ class UsersMultiselectWidgetTest extends MediaWikiUnitTestCase {
'getJavaScriptClassName did not return the expected value.' );
}
- public function provideGetConfig(): array {
+ public static function provideGetConfig(): array {
return [
'ipAllowed' => [
[
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sat, Jul 5, 5:31 AM (14 h, 38 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
227474
Default Alt Text
(35 KB)
Attached To
Mode
rMW mediawiki
Attached
Detach File
Event Timeline
Log In to Comment