aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/includes
diff options
context:
space:
mode:
authorMax Semenik <maxsem.wiki@gmail.com>2019-10-20 11:11:08 -0700
committerJames D. Forrester <jforrester@wikimedia.org>2019-10-30 14:31:22 -0700
commit48a323f70264a7ef4321912a802013df1d04d8c7 (patch)
tree33d1dccccee8dc2b5c8e85c8037201f821eaad49 /tests/phpunit/includes
parentd03d614c3422a5dc90f99ea3793487727c852489 (diff)
downloadmediawikicore-48a323f70264a7ef4321912a802013df1d04d8c7.tar.gz
mediawikicore-48a323f70264a7ef4321912a802013df1d04d8c7.zip
tests: Add explicit return type void to setUp() and tearDown()
Bug: T192167 Depends-On: I581e54278ac5da3f4e399e33f2c7ad468bae6b43 Change-Id: I3a21fb55db76bac51afdd399cf40ed0760e4f343
Diffstat (limited to 'tests/phpunit/includes')
-rw-r--r--tests/phpunit/includes/ActorMigrationTest.php4
-rw-r--r--tests/phpunit/includes/AutoLoaderTest.php4
-rw-r--r--tests/phpunit/includes/CategoryTest.php2
-rw-r--r--tests/phpunit/includes/ContentSecurityPolicyTest.php4
-rw-r--r--tests/phpunit/includes/DeprecatedGlobalTest.php4
-rw-r--r--tests/phpunit/includes/DiffHistoryBlobTest.php2
-rw-r--r--tests/phpunit/includes/EditPageTest.php2
-rw-r--r--tests/phpunit/includes/ExportTest.php2
-rw-r--r--tests/phpunit/includes/ExtraParserTest.php2
-rw-r--r--tests/phpunit/includes/FauxRequestTest.php4
-rw-r--r--tests/phpunit/includes/GitInfoTest.php2
-rw-r--r--tests/phpunit/includes/GlobalFunctions/GlobalTest.php2
-rw-r--r--tests/phpunit/includes/GlobalFunctions/wfParseUrlTest.php2
-rw-r--r--tests/phpunit/includes/GlobalFunctions/wfThumbIsStandardTest.php2
-rw-r--r--tests/phpunit/includes/HooksTest.php2
-rw-r--r--tests/phpunit/includes/HtmlTest.php4
-rw-r--r--tests/phpunit/includes/LinkFilterTest.php2
-rw-r--r--tests/phpunit/includes/MWTimestampTest.php2
-rw-r--r--tests/phpunit/includes/MediaWikiTest.php4
-rw-r--r--tests/phpunit/includes/MessageTest.php2
-rw-r--r--tests/phpunit/includes/MovePageTest.php2
-rw-r--r--tests/phpunit/includes/MultiHttpClientTest.php2
-rw-r--r--tests/phpunit/includes/OutputPageTest.php4
-rw-r--r--tests/phpunit/includes/PagePropsTest.php2
-rw-r--r--tests/phpunit/includes/Permissions/PermissionManagerTest.php4
-rw-r--r--tests/phpunit/includes/PrefixSearchTest.php4
-rw-r--r--tests/phpunit/includes/Revision/MutableRevisionRecordTest.php2
-rw-r--r--tests/phpunit/includes/Revision/RenderedRevisionTest.php2
-rw-r--r--tests/phpunit/includes/Revision/RevisionStoreDbTestBase.php2
-rw-r--r--tests/phpunit/includes/RevisionDbTestBase.php2
-rw-r--r--tests/phpunit/includes/RevisionMcrDbTest.php2
-rw-r--r--tests/phpunit/includes/RevisionTest.php2
-rw-r--r--tests/phpunit/includes/SampleTest.php4
-rw-r--r--tests/phpunit/includes/Storage/DerivedPageDataUpdaterTest.php2
-rw-r--r--tests/phpunit/includes/Storage/NameTableStoreTest.php2
-rw-r--r--tests/phpunit/includes/Storage/PageUpdaterTest.php2
-rw-r--r--tests/phpunit/includes/TemplateParserTest.php2
-rw-r--r--tests/phpunit/includes/TimeAdjustTest.php2
-rw-r--r--tests/phpunit/includes/TitleMethodsTest.php4
-rw-r--r--tests/phpunit/includes/TitlePermissionTest.php2
-rw-r--r--tests/phpunit/includes/TitleTest.php2
-rw-r--r--tests/phpunit/includes/WebRequestTest.php4
-rw-r--r--tests/phpunit/includes/WikiMapTest.php2
-rw-r--r--tests/phpunit/includes/XmlTest.php2
-rw-r--r--tests/phpunit/includes/actions/ActionTest.php2
-rw-r--r--tests/phpunit/includes/actions/WatchActionTest.php4
-rw-r--r--tests/phpunit/includes/api/ApiBlockTest.php2
-rw-r--r--tests/phpunit/includes/api/ApiCSPReportTest.php2
-rw-r--r--tests/phpunit/includes/api/ApiDeleteTest.php2
-rw-r--r--tests/phpunit/includes/api/ApiEditPageTest.php2
-rw-r--r--tests/phpunit/includes/api/ApiLoginTest.php2
-rw-r--r--tests/phpunit/includes/api/ApiLogoutTest.php2
-rw-r--r--tests/phpunit/includes/api/ApiOptionsTest.php2
-rw-r--r--tests/phpunit/includes/api/ApiQueryLanguageinfoTest.php2
-rw-r--r--tests/phpunit/includes/api/ApiQueryPrefixSearchTest.php2
-rw-r--r--tests/phpunit/includes/api/ApiQueryRecentChangesIntegrationTest.php2
-rw-r--r--tests/phpunit/includes/api/ApiQuerySearchTest.php2
-rw-r--r--tests/phpunit/includes/api/ApiQueryWatchlistIntegrationTest.php2
-rw-r--r--tests/phpunit/includes/api/ApiQueryWatchlistRawIntegrationTest.php2
-rw-r--r--tests/phpunit/includes/api/ApiRevisionDeleteTest.php2
-rw-r--r--tests/phpunit/includes/api/ApiSetNotificationTimestampIntegrationTest.php2
-rw-r--r--tests/phpunit/includes/api/ApiStashEditTest.php4
-rw-r--r--tests/phpunit/includes/api/ApiTestCase.php4
-rw-r--r--tests/phpunit/includes/api/ApiUnblockTest.php2
-rw-r--r--tests/phpunit/includes/api/ApiUploadTest.php2
-rw-r--r--tests/phpunit/includes/api/ApiUploadTestCase.php2
-rw-r--r--tests/phpunit/includes/api/ApiUserrightsTest.php2
-rw-r--r--tests/phpunit/includes/api/format/ApiFormatBaseTest.php2
-rw-r--r--tests/phpunit/includes/api/query/ApiQueryTest.php2
-rw-r--r--tests/phpunit/includes/auth/UserDataAuthenticationRequestTest.php2
-rw-r--r--tests/phpunit/includes/block/BlockManagerTest.php2
-rw-r--r--tests/phpunit/includes/block/BlockRestrictionStoreTest.php4
-rw-r--r--tests/phpunit/includes/cache/LocalisationCacheTest.php2
-rw-r--r--tests/phpunit/includes/cache/MessageCacheTest.php2
-rw-r--r--tests/phpunit/includes/changes/CategoryMembershipChangeTest.php2
-rw-r--r--tests/phpunit/includes/changes/ChangesListFilterTest.php2
-rw-r--r--tests/phpunit/includes/changes/OldChangesListTest.php2
-rw-r--r--tests/phpunit/includes/changes/RCCacheEntryFactoryTest.php2
-rw-r--r--tests/phpunit/includes/changes/RecentChangeTest.php2
-rw-r--r--tests/phpunit/includes/changetags/ChangeTagsTest.php2
-rw-r--r--tests/phpunit/includes/collation/CollationTest.php2
-rw-r--r--tests/phpunit/includes/collation/CustomUppercaseCollationTest.php2
-rw-r--r--tests/phpunit/includes/content/ContentHandlerTest.php4
-rw-r--r--tests/phpunit/includes/content/CssContentTest.php2
-rw-r--r--tests/phpunit/includes/content/FileContentHandlerTest.php2
-rw-r--r--tests/phpunit/includes/content/TextContentTest.php4
-rw-r--r--tests/phpunit/includes/content/WikitextContentHandlerTest.php2
-rw-r--r--tests/phpunit/includes/debug/DeprecationHelperTest.php2
-rw-r--r--tests/phpunit/includes/debug/MWDebugTest.php2
-rw-r--r--tests/phpunit/includes/deferred/LinksUpdateTest.php2
-rw-r--r--tests/phpunit/includes/deferred/SearchUpdateTest.php2
-rw-r--r--tests/phpunit/includes/diff/DifferenceEngineTest.php2
-rw-r--r--tests/phpunit/includes/filebackend/FileBackendIntegrationTest.php2
-rw-r--r--tests/phpunit/includes/filebackend/SwiftFileBackendTest.php2
-rw-r--r--tests/phpunit/includes/filebackend/filejournal/DBFileJournalIntegrationTest.php2
-rw-r--r--tests/phpunit/includes/filerepo/MigrateFileRepoLayoutTest.php4
-rw-r--r--tests/phpunit/includes/filerepo/StoreBatchTest.php4
-rw-r--r--tests/phpunit/includes/import/ImportLinkCacheIntegrationTest.php2
-rw-r--r--tests/phpunit/includes/import/ImportableOldRevisionImporterTest.php2
-rw-r--r--tests/phpunit/includes/jobqueue/JobQueueTest.php4
-rw-r--r--tests/phpunit/includes/jobqueue/jobs/CategoryMembershipChangeJobTest.php2
-rw-r--r--tests/phpunit/includes/jobqueue/jobs/ClearUserWatchlistJobTest.php2
-rw-r--r--tests/phpunit/includes/jobqueue/jobs/RefreshLinksJobTest.php2
-rw-r--r--tests/phpunit/includes/language/ConverterRuleTest.php2
-rw-r--r--tests/phpunit/includes/libs/CSSMinTest.php2
-rw-r--r--tests/phpunit/includes/libs/JavaScriptMinifierTest.php2
-rw-r--r--tests/phpunit/includes/libs/composer/ComposerInstalledTest.php2
-rw-r--r--tests/phpunit/includes/libs/composer/ComposerJsonTest.php2
-rw-r--r--tests/phpunit/includes/libs/composer/ComposerLockTest.php2
-rw-r--r--tests/phpunit/includes/libs/mime/MimeAnalyzerTest.php2
-rw-r--r--tests/phpunit/includes/libs/objectcache/BagOStuffTest.php4
-rw-r--r--tests/phpunit/includes/libs/objectcache/MultiWriteBagOStuffTest.php2
-rw-r--r--tests/phpunit/includes/libs/objectcache/WANObjectCacheTest.php2
-rw-r--r--tests/phpunit/includes/libs/rdbms/database/DatabaseSQLTest.php2
-rw-r--r--tests/phpunit/includes/libs/rdbms/database/DatabaseTest.php2
-rw-r--r--tests/phpunit/includes/linkeddata/PageDataRequestHandlerTest.php4
-rw-r--r--tests/phpunit/includes/linker/LinkRendererFactoryTest.php2
-rw-r--r--tests/phpunit/includes/linker/LinkRendererTest.php4
-rw-r--r--tests/phpunit/includes/logging/DatabaseLogEntryTest.php4
-rw-r--r--tests/phpunit/includes/logging/LogFormatterTest.php2
-rw-r--r--tests/phpunit/includes/logging/NewUsersLogFormatterTest.php2
-rw-r--r--tests/phpunit/includes/logging/PageLangLogFormatterTest.php2
-rw-r--r--tests/phpunit/includes/media/BitmapMetadataHandlerTest.php2
-rw-r--r--tests/phpunit/includes/media/BitmapScalingTest.php2
-rw-r--r--tests/phpunit/includes/media/DjVuTest.php2
-rw-r--r--tests/phpunit/includes/media/ExifBitmapTest.php2
-rw-r--r--tests/phpunit/includes/media/ExifRotationTest.php2
-rw-r--r--tests/phpunit/includes/media/ExifTest.php2
-rw-r--r--tests/phpunit/includes/media/FormatMetadataTest.php2
-rw-r--r--tests/phpunit/includes/media/GIFHandlerTest.php2
-rw-r--r--tests/phpunit/includes/media/JpegMetadataExtractorTest.php2
-rw-r--r--tests/phpunit/includes/media/JpegPixelFormatTest.php2
-rw-r--r--tests/phpunit/includes/media/JpegTest.php2
-rw-r--r--tests/phpunit/includes/media/MediaWikiMediaTestCase.php2
-rw-r--r--tests/phpunit/includes/media/PNGHandlerTest.php2
-rw-r--r--tests/phpunit/includes/media/PNGMetadataExtractorTest.php2
-rw-r--r--tests/phpunit/includes/media/TiffTest.php2
-rw-r--r--tests/phpunit/includes/media/WebPHandlerTest.php4
-rw-r--r--tests/phpunit/includes/media/XCFHandlerTest.php2
-rw-r--r--tests/phpunit/includes/objectcache/ObjectCacheTest.php2
-rw-r--r--tests/phpunit/includes/page/ArticleViewTest.php2
-rw-r--r--tests/phpunit/includes/page/ImagePage404Test.php2
-rw-r--r--tests/phpunit/includes/page/ImagePageTest.php2
-rw-r--r--tests/phpunit/includes/page/PageArchiveTestBase.php2
-rw-r--r--tests/phpunit/includes/page/WikiPageDbTestBase.php4
-rw-r--r--tests/phpunit/includes/page/WikiPageMcrDbTest.php2
-rw-r--r--tests/phpunit/includes/parser/MagicVariableTest.php2
-rw-r--r--tests/phpunit/includes/parser/ParserOptionsTest.php4
-rw-r--r--tests/phpunit/includes/parser/ParserOutputTest.php2
-rw-r--r--tests/phpunit/includes/parser/ParserPreloadTest.php4
-rw-r--r--tests/phpunit/includes/parser/PreprocessorTest.php2
-rw-r--r--tests/phpunit/includes/parser/SanitizerTest.php2
-rw-r--r--tests/phpunit/includes/parser/StripStateTest.php2
-rw-r--r--tests/phpunit/includes/password/Argon2PasswordTest.php2
-rw-r--r--tests/phpunit/includes/password/PasswordTestCase.php2
-rw-r--r--tests/phpunit/includes/preferences/DefaultPreferencesFactoryTest.php2
-rw-r--r--tests/phpunit/includes/rcfeed/RCFeedIntegrationTest.php2
-rw-r--r--tests/phpunit/includes/registration/ExtensionRegistryTest.php2
-rw-r--r--tests/phpunit/includes/resourceloader/MessageBlobStoreTest.php2
-rw-r--r--tests/phpunit/includes/resourceloader/ResourceLoaderFileModuleTest.php2
-rw-r--r--tests/phpunit/includes/resourceloader/ResourceLoaderTest.php2
-rw-r--r--tests/phpunit/includes/resourceloader/ResourceLoaderWikiModuleTest.php2
-rw-r--r--tests/phpunit/includes/search/SearchEnginePrefixTest.php4
-rw-r--r--tests/phpunit/includes/search/SearchEngineTest.php4
-rw-r--r--tests/phpunit/includes/search/SearchNearMatcherTest.php2
-rw-r--r--tests/phpunit/includes/session/BotPasswordSessionProviderTest.php2
-rw-r--r--tests/phpunit/includes/specialpage/AbstractChangesListSpecialPageTestCase.php4
-rw-r--r--tests/phpunit/includes/specialpage/SpecialPageTest.php2
-rw-r--r--tests/phpunit/includes/specials/ContribsPagerTest.php2
-rw-r--r--tests/phpunit/includes/specials/SpecialBlankPageTest.php2
-rw-r--r--tests/phpunit/includes/specials/SpecialBlockTest.php2
-rw-r--r--tests/phpunit/includes/specials/SpecialMIMESearchTest.php2
-rw-r--r--tests/phpunit/includes/specials/SpecialMuteTest.php2
-rw-r--r--tests/phpunit/includes/specials/SpecialPageDataTest.php2
-rw-r--r--tests/phpunit/includes/specials/SpecialPageTestBase.php4
-rw-r--r--tests/phpunit/includes/specials/SpecialWatchlistTest.php2
-rw-r--r--tests/phpunit/includes/specials/pagers/BlockListPagerTest.php2
-rw-r--r--tests/phpunit/includes/title/MediaWikiTitleCodecTest.php2
-rw-r--r--tests/phpunit/includes/title/NaiveImportTitleFactoryTest.php2
-rw-r--r--tests/phpunit/includes/title/NamespaceImportTitleFactoryTest.php2
-rw-r--r--tests/phpunit/includes/title/NamespaceInfoTest.php4
-rw-r--r--tests/phpunit/includes/title/SubpageImportTitleFactoryTest.php2
-rw-r--r--tests/phpunit/includes/upload/UploadBaseTest.php2
-rw-r--r--tests/phpunit/includes/upload/UploadFromUrlTest.php2
-rw-r--r--tests/phpunit/includes/upload/UploadStashTest.php2
-rw-r--r--tests/phpunit/includes/user/BotPasswordTest.php2
-rw-r--r--tests/phpunit/includes/user/LocalIdLookupTest.php2
-rw-r--r--tests/phpunit/includes/user/UserGroupMembershipTest.php2
-rw-r--r--tests/phpunit/includes/user/UserTest.php2
-rw-r--r--tests/phpunit/includes/utils/MWCryptHKDFTest.php2
-rw-r--r--tests/phpunit/includes/utils/MWGrantsTest.php2
-rw-r--r--tests/phpunit/includes/utils/UIDGeneratorTest.php2
-rw-r--r--tests/phpunit/includes/utils/ZipDirectoryReaderTest.php2
-rw-r--r--tests/phpunit/includes/watcheditem/WatchedItemStoreIntegrationTest.php2
194 files changed, 229 insertions, 229 deletions
diff --git a/tests/phpunit/includes/ActorMigrationTest.php b/tests/phpunit/includes/ActorMigrationTest.php
index 3a256e4437e1..5dade34f7920 100644
--- a/tests/phpunit/includes/ActorMigrationTest.php
+++ b/tests/phpunit/includes/ActorMigrationTest.php
@@ -17,7 +17,7 @@ class ActorMigrationTest extends MediaWikiLangTestCase {
'actor',
];
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$w = TestingAccessWrapper::newFromClass( ActorMigration::class );
@@ -48,7 +48,7 @@ class ActorMigrationTest extends MediaWikiLangTestCase {
];
}
- protected function tearDown() {
+ protected function tearDown() : void {
parent::tearDown();
ScopedCallback::consume( $this->resetActorMigration );
}
diff --git a/tests/phpunit/includes/AutoLoaderTest.php b/tests/phpunit/includes/AutoLoaderTest.php
index af6911d6001d..848030ac410b 100644
--- a/tests/phpunit/includes/AutoLoaderTest.php
+++ b/tests/phpunit/includes/AutoLoaderTest.php
@@ -7,7 +7,7 @@ class AutoLoaderTest extends MediaWikiTestCase {
private $oldPsr4;
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
// Fancy dance to trigger a rebuild of AutoLoader::$autoloadLocalClassesLower
@@ -30,7 +30,7 @@ class AutoLoaderTest extends MediaWikiTestCase {
__DIR__ . '/../data/autoloader/psr4';
}
- protected function tearDown() {
+ protected function tearDown() : void {
AutoLoader::$psr4Namespaces = $this->oldPsr4;
parent::tearDown();
}
diff --git a/tests/phpunit/includes/CategoryTest.php b/tests/phpunit/includes/CategoryTest.php
index 60fb144a44f1..ddacf0dc1d77 100644
--- a/tests/phpunit/includes/CategoryTest.php
+++ b/tests/phpunit/includes/CategoryTest.php
@@ -5,7 +5,7 @@
* @group Category
*/
class CategoryTest extends MediaWikiTestCase {
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->setMwGlobals( [
diff --git a/tests/phpunit/includes/ContentSecurityPolicyTest.php b/tests/phpunit/includes/ContentSecurityPolicyTest.php
index cd081f0d6e03..835682e1e394 100644
--- a/tests/phpunit/includes/ContentSecurityPolicyTest.php
+++ b/tests/phpunit/includes/ContentSecurityPolicyTest.php
@@ -6,7 +6,7 @@ class ContentSecurityPolicyTest extends MediaWikiTestCase {
/** @var ContentSecurityPolicy */
private $csp;
- protected function setUp() {
+ protected function setUp() : void {
global $wgUploadDirectory;
$this->setMwGlobals( [
'wgAllowExternalImages' => false,
@@ -49,7 +49,7 @@ class ContentSecurityPolicyTest extends MediaWikiTestCase {
$this->csp = TestingAccessWrapper::newFromObject( $csp );
$this->csp->nonce = 'secret';
- return parent::setUp();
+ parent::setUp();
}
/**
diff --git a/tests/phpunit/includes/DeprecatedGlobalTest.php b/tests/phpunit/includes/DeprecatedGlobalTest.php
index 59016d71636f..47978a6db18d 100644
--- a/tests/phpunit/includes/DeprecatedGlobalTest.php
+++ b/tests/phpunit/includes/DeprecatedGlobalTest.php
@@ -26,12 +26,12 @@ use PHPUnit\Framework\Error\Deprecated;
class DeprecatedGlobalTest extends MediaWikiTestCase {
private $oldErrorLevel;
- public function setUp() {
+ public function setUp() : void {
parent::setUp();
$this->oldErrorLevel = error_reporting( -1 );
}
- public function tearDown() {
+ public function tearDown() : void {
error_reporting( $this->oldErrorLevel );
parent::tearDown();
}
diff --git a/tests/phpunit/includes/DiffHistoryBlobTest.php b/tests/phpunit/includes/DiffHistoryBlobTest.php
index b75862ea0c9a..8e8eb54f40d2 100644
--- a/tests/phpunit/includes/DiffHistoryBlobTest.php
+++ b/tests/phpunit/includes/DiffHistoryBlobTest.php
@@ -2,7 +2,7 @@
class DiffHistoryBlobTest extends MediaWikiTestCase {
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->checkPHPExtension( 'hash' );
diff --git a/tests/phpunit/includes/EditPageTest.php b/tests/phpunit/includes/EditPageTest.php
index 22cc3f15e29c..4d9e0626573b 100644
--- a/tests/phpunit/includes/EditPageTest.php
+++ b/tests/phpunit/includes/EditPageTest.php
@@ -13,7 +13,7 @@ use MediaWiki\MediaWikiServices;
*/
class EditPageTest extends MediaWikiLangTestCase {
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$contLang = MediaWikiServices::getInstance()->getContentLanguage();
diff --git a/tests/phpunit/includes/ExportTest.php b/tests/phpunit/includes/ExportTest.php
index af10b9c4a622..da0b82e040c5 100644
--- a/tests/phpunit/includes/ExportTest.php
+++ b/tests/phpunit/includes/ExportTest.php
@@ -11,7 +11,7 @@ use MediaWiki\MediaWikiServices;
*/
class ExportTest extends MediaWikiLangTestCase {
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->setMwGlobals( [
'wgCapitalLinks' => true,
diff --git a/tests/phpunit/includes/ExtraParserTest.php b/tests/phpunit/includes/ExtraParserTest.php
index b9e02703266c..79314186fc63 100644
--- a/tests/phpunit/includes/ExtraParserTest.php
+++ b/tests/phpunit/includes/ExtraParserTest.php
@@ -14,7 +14,7 @@ class ExtraParserTest extends MediaWikiTestCase {
/** @var Parser */
protected $parser;
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->setMwGlobals( [
diff --git a/tests/phpunit/includes/FauxRequestTest.php b/tests/phpunit/includes/FauxRequestTest.php
index fc98113e7aa6..dba07a57f2e1 100644
--- a/tests/phpunit/includes/FauxRequestTest.php
+++ b/tests/phpunit/includes/FauxRequestTest.php
@@ -6,12 +6,12 @@ class FauxRequestTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
- public function setUp() {
+ public function setUp() : void {
parent::setUp();
$this->orgWgServer = $GLOBALS['wgServer'];
}
- public function tearDown() {
+ public function tearDown() : void {
$GLOBALS['wgServer'] = $this->orgWgServer;
parent::tearDown();
}
diff --git a/tests/phpunit/includes/GitInfoTest.php b/tests/phpunit/includes/GitInfoTest.php
index 67e480c4802e..a2ca5230fdcf 100644
--- a/tests/phpunit/includes/GitInfoTest.php
+++ b/tests/phpunit/includes/GitInfoTest.php
@@ -37,7 +37,7 @@ class GitInfoTest extends MediaWikiTestCase {
}
}
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->setMwGlobals( 'wgGitInfoCacheDirectory', __DIR__ . '/../data/gitinfo' );
}
diff --git a/tests/phpunit/includes/GlobalFunctions/GlobalTest.php b/tests/phpunit/includes/GlobalFunctions/GlobalTest.php
index 7b050ec36d33..b7255dc6f33b 100644
--- a/tests/phpunit/includes/GlobalFunctions/GlobalTest.php
+++ b/tests/phpunit/includes/GlobalFunctions/GlobalTest.php
@@ -7,7 +7,7 @@ use MediaWiki\Logger\LegacyLogger;
* @group GlobalFunctions
*/
class GlobalTest extends MediaWikiTestCase {
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$readOnlyFile = $this->getNewTempFile();
diff --git a/tests/phpunit/includes/GlobalFunctions/wfParseUrlTest.php b/tests/phpunit/includes/GlobalFunctions/wfParseUrlTest.php
index b20cfb5c22b0..4cb8108bfa14 100644
--- a/tests/phpunit/includes/GlobalFunctions/wfParseUrlTest.php
+++ b/tests/phpunit/includes/GlobalFunctions/wfParseUrlTest.php
@@ -25,7 +25,7 @@
* @covers ::wfParseUrl
*/
class WfParseUrlTest extends MediaWikiTestCase {
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->setMwGlobals( 'wgUrlProtocols', [
diff --git a/tests/phpunit/includes/GlobalFunctions/wfThumbIsStandardTest.php b/tests/phpunit/includes/GlobalFunctions/wfThumbIsStandardTest.php
index bdba6a355e24..ceb58a4bda34 100644
--- a/tests/phpunit/includes/GlobalFunctions/wfThumbIsStandardTest.php
+++ b/tests/phpunit/includes/GlobalFunctions/wfThumbIsStandardTest.php
@@ -8,7 +8,7 @@ use MediaWiki\MediaWikiServices;
*/
class WfThumbIsStandardTest extends MediaWikiTestCase {
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->setMwGlobals( [
diff --git a/tests/phpunit/includes/HooksTest.php b/tests/phpunit/includes/HooksTest.php
index bfff1ddce75d..b44ed9086753 100644
--- a/tests/phpunit/includes/HooksTest.php
+++ b/tests/phpunit/includes/HooksTest.php
@@ -4,7 +4,7 @@ use PHPUnit\Framework\Error\Deprecated;
class HooksTest extends MediaWikiTestCase {
- public function setUp() {
+ public function setUp() : void {
global $wgHooks;
parent::setUp();
Hooks::clear( 'MediaWikiHooksTest001' );
diff --git a/tests/phpunit/includes/HtmlTest.php b/tests/phpunit/includes/HtmlTest.php
index 935bf0ccf853..96ec0620519f 100644
--- a/tests/phpunit/includes/HtmlTest.php
+++ b/tests/phpunit/includes/HtmlTest.php
@@ -6,7 +6,7 @@ use PHPUnit\Framework\Error\Notice;
class HtmlTest extends MediaWikiTestCase {
private $restoreWarnings;
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->setMwGlobals( [
@@ -69,7 +69,7 @@ class HtmlTest extends MediaWikiTestCase {
$this->restoreWarnings = false;
}
- protected function tearDown() {
+ protected function tearDown() : void {
if ( $this->restoreWarnings ) {
$this->restoreWarnings = false;
Wikimedia\restoreWarnings();
diff --git a/tests/phpunit/includes/LinkFilterTest.php b/tests/phpunit/includes/LinkFilterTest.php
index 28ddc09bdd10..d1033e4df2e0 100644
--- a/tests/phpunit/includes/LinkFilterTest.php
+++ b/tests/phpunit/includes/LinkFilterTest.php
@@ -8,7 +8,7 @@ use Wikimedia\Rdbms\LikeMatch;
*/
class LinkFilterTest extends MediaWikiLangTestCase {
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->setMwGlobals( 'wgUrlProtocols', [
diff --git a/tests/phpunit/includes/MWTimestampTest.php b/tests/phpunit/includes/MWTimestampTest.php
index 9735eebd4bae..fa78b3ea375c 100644
--- a/tests/phpunit/includes/MWTimestampTest.php
+++ b/tests/phpunit/includes/MWTimestampTest.php
@@ -4,7 +4,7 @@
* Tests timestamp parsing and output.
*/
class MWTimestampTest extends MediaWikiLangTestCase {
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
// Avoid 'GetHumanTimestamp' hook and others
diff --git a/tests/phpunit/includes/MediaWikiTest.php b/tests/phpunit/includes/MediaWikiTest.php
index 77bbc07b3412..ba6f512a0b67 100644
--- a/tests/phpunit/includes/MediaWikiTest.php
+++ b/tests/phpunit/includes/MediaWikiTest.php
@@ -3,7 +3,7 @@
class MediaWikiTest extends MediaWikiTestCase {
private $oldServer, $oldGet, $oldPost;
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->setMwGlobals( [
@@ -20,7 +20,7 @@ class MediaWikiTest extends MediaWikiTestCase {
$this->oldPost = $_POST;
}
- protected function tearDown() {
+ protected function tearDown() : void {
parent::tearDown();
$_SERVER = $this->oldServer;
$_GET = $this->oldGet;
diff --git a/tests/phpunit/includes/MessageTest.php b/tests/phpunit/includes/MessageTest.php
index c9d64845b75c..4f5456e6376b 100644
--- a/tests/phpunit/includes/MessageTest.php
+++ b/tests/phpunit/includes/MessageTest.php
@@ -8,7 +8,7 @@ use Wikimedia\TestingAccessWrapper;
*/
class MessageTest extends MediaWikiLangTestCase {
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->setMwGlobals( [
diff --git a/tests/phpunit/includes/MovePageTest.php b/tests/phpunit/includes/MovePageTest.php
index 9c054f0366e5..ffb15a88df68 100644
--- a/tests/phpunit/includes/MovePageTest.php
+++ b/tests/phpunit/includes/MovePageTest.php
@@ -95,7 +95,7 @@ class MovePageTest extends MediaWikiTestCase {
);
}
- public function setUp() {
+ public function setUp() : void {
parent::setUp();
// Ensure we have some pages that are guaranteed to exist or not
diff --git a/tests/phpunit/includes/MultiHttpClientTest.php b/tests/phpunit/includes/MultiHttpClientTest.php
index 1c7e62d092b9..0c619f699851 100644
--- a/tests/phpunit/includes/MultiHttpClientTest.php
+++ b/tests/phpunit/includes/MultiHttpClientTest.php
@@ -8,7 +8,7 @@
class MultiHttpClientTest extends MediaWikiTestCase {
protected $client;
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$client = $this->getMockBuilder( MultiHttpClient::class )
->setConstructorArgs( [ [] ] )
diff --git a/tests/phpunit/includes/OutputPageTest.php b/tests/phpunit/includes/OutputPageTest.php
index 394d0b263c60..181bc9b5cf75 100644
--- a/tests/phpunit/includes/OutputPageTest.php
+++ b/tests/phpunit/includes/OutputPageTest.php
@@ -22,12 +22,12 @@ class OutputPageTest extends MediaWikiTestCase {
// @codingStandardsIgnoreEnd
// Ensure that we don't affect the global ResourceLoader state.
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
ResourceLoader::clearCache();
}
- protected function tearDown() {
+ protected function tearDown() : void {
parent::tearDown();
ResourceLoader::clearCache();
}
diff --git a/tests/phpunit/includes/PagePropsTest.php b/tests/phpunit/includes/PagePropsTest.php
index 222b3e3a024d..5faae5570563 100644
--- a/tests/phpunit/includes/PagePropsTest.php
+++ b/tests/phpunit/includes/PagePropsTest.php
@@ -28,7 +28,7 @@ class PagePropsTest extends MediaWikiLangTestCase {
*/
private $the_properties;
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->setMwGlobals( [
diff --git a/tests/phpunit/includes/Permissions/PermissionManagerTest.php b/tests/phpunit/includes/Permissions/PermissionManagerTest.php
index 81a768af38d7..be80eb81523b 100644
--- a/tests/phpunit/includes/Permissions/PermissionManagerTest.php
+++ b/tests/phpunit/includes/Permissions/PermissionManagerTest.php
@@ -53,7 +53,7 @@ class PermissionManagerTest extends MediaWikiLangTestCase {
/** Constant for self::testIsBlockedFrom */
const USER_TALK_PAGE = '<user talk page>';
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$localZone = 'UTC';
@@ -124,7 +124,7 @@ class PermissionManagerTest extends MediaWikiLangTestCase {
}
}
- public function tearDown() {
+ public function tearDown() : void {
parent::tearDown();
$this->restoreMwServices();
}
diff --git a/tests/phpunit/includes/PrefixSearchTest.php b/tests/phpunit/includes/PrefixSearchTest.php
index 4d9f8e171f14..4e799d9d7874 100644
--- a/tests/phpunit/includes/PrefixSearchTest.php
+++ b/tests/phpunit/includes/PrefixSearchTest.php
@@ -43,7 +43,7 @@ class PrefixSearchTest extends MediaWikiLangTestCase {
$this->insertPage( Title::makeTitle( self::NS_NONCAP, 'sandbox' ) );
}
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
if ( !$this->isWikitextNS( NS_MAIN ) ) {
@@ -62,7 +62,7 @@ class PrefixSearchTest extends MediaWikiLangTestCase {
TestingAccessWrapper::newFromClass( Hooks::class )->handlers = [];
}
- public function tearDown() {
+ public function tearDown() : void {
parent::tearDown();
TestingAccessWrapper::newFromClass( Hooks::class )->handlers = $this->originalHandlers;
diff --git a/tests/phpunit/includes/Revision/MutableRevisionRecordTest.php b/tests/phpunit/includes/Revision/MutableRevisionRecordTest.php
index f0d25a6d7964..f7b609c883c6 100644
--- a/tests/phpunit/includes/Revision/MutableRevisionRecordTest.php
+++ b/tests/phpunit/includes/Revision/MutableRevisionRecordTest.php
@@ -25,7 +25,7 @@ class MutableRevisionRecordTest extends MediaWikiTestCase {
use RevisionRecordTests;
- public function setUp() {
+ public function setUp() : void {
Title::clearCaches();
parent::setUp();
}
diff --git a/tests/phpunit/includes/Revision/RenderedRevisionTest.php b/tests/phpunit/includes/Revision/RenderedRevisionTest.php
index c61892356c1b..0998c14fdab2 100644
--- a/tests/phpunit/includes/Revision/RenderedRevisionTest.php
+++ b/tests/phpunit/includes/Revision/RenderedRevisionTest.php
@@ -31,7 +31,7 @@ class RenderedRevisionTest extends MediaWikiTestCase {
/** @var callable */
private $combinerCallback;
- public function setUp() {
+ public function setUp() : void {
parent::setUp();
$this->combinerCallback = function ( RenderedRevision $rr, array $hints = [] ) {
diff --git a/tests/phpunit/includes/Revision/RevisionStoreDbTestBase.php b/tests/phpunit/includes/Revision/RevisionStoreDbTestBase.php
index eea532100c0b..c10daa875c81 100644
--- a/tests/phpunit/includes/Revision/RevisionStoreDbTestBase.php
+++ b/tests/phpunit/includes/Revision/RevisionStoreDbTestBase.php
@@ -71,7 +71,7 @@ abstract class RevisionStoreDbTestBase extends MediaWikiTestCase {
*/
abstract protected function getMcrTablesToReset();
- public function setUp() {
+ public function setUp() : void {
parent::setUp();
$this->tablesUsed[] = 'archive';
$this->tablesUsed[] = 'page';
diff --git a/tests/phpunit/includes/RevisionDbTestBase.php b/tests/phpunit/includes/RevisionDbTestBase.php
index 436d225d897a..bcde8a3e9d66 100644
--- a/tests/phpunit/includes/RevisionDbTestBase.php
+++ b/tests/phpunit/includes/RevisionDbTestBase.php
@@ -61,7 +61,7 @@ abstract class RevisionDbTestBase extends MediaWikiTestCase {
*/
abstract protected function getMcrTablesToReset();
- protected function setUp() {
+ protected function setUp() : void {
$this->tablesUsed += $this->getMcrTablesToReset();
parent::setUp();
diff --git a/tests/phpunit/includes/RevisionMcrDbTest.php b/tests/phpunit/includes/RevisionMcrDbTest.php
index 2da2275202a8..82162de9d92d 100644
--- a/tests/phpunit/includes/RevisionMcrDbTest.php
+++ b/tests/phpunit/includes/RevisionMcrDbTest.php
@@ -19,7 +19,7 @@ class RevisionMcrDbTest extends RevisionDbTestBase {
use McrSchemaOverride;
- public function setUp() {
+ public function setUp() : void {
parent::setUp();
}
diff --git a/tests/phpunit/includes/RevisionTest.php b/tests/phpunit/includes/RevisionTest.php
index baa64b0cf67c..1ee2e67773a1 100644
--- a/tests/phpunit/includes/RevisionTest.php
+++ b/tests/phpunit/includes/RevisionTest.php
@@ -17,7 +17,7 @@ use Wikimedia\Rdbms\LoadBalancer;
*/
class RevisionTest extends MediaWikiTestCase {
- public function setUp() {
+ public function setUp() : void {
parent::setUp();
$this->setMwGlobals(
'wgMultiContentRevisionSchemaMigrationStage',
diff --git a/tests/phpunit/includes/SampleTest.php b/tests/phpunit/includes/SampleTest.php
index a965a60394d6..bf8a067739e9 100644
--- a/tests/phpunit/includes/SampleTest.php
+++ b/tests/phpunit/includes/SampleTest.php
@@ -8,7 +8,7 @@ class SampleTest extends MediaWikiLangTestCase {
/**
* Anything that needs to happen before your tests should go here.
*/
- protected function setUp() {
+ protected function setUp() : void {
// Be sure to call the parent setup and teardown functions.
// This makes sure that all the various cleanup and restorations
// happen as they should (including the restoration for setMwGlobals).
@@ -25,7 +25,7 @@ class SampleTest extends MediaWikiLangTestCase {
/**
* Anything cleanup you need to do should go here.
*/
- protected function tearDown() {
+ protected function tearDown() : void {
parent::tearDown();
}
diff --git a/tests/phpunit/includes/Storage/DerivedPageDataUpdaterTest.php b/tests/phpunit/includes/Storage/DerivedPageDataUpdaterTest.php
index c64169fd8c22..4ee1bdfa3b59 100644
--- a/tests/phpunit/includes/Storage/DerivedPageDataUpdaterTest.php
+++ b/tests/phpunit/includes/Storage/DerivedPageDataUpdaterTest.php
@@ -33,7 +33,7 @@ use DeferredUpdates;
*/
class DerivedPageDataUpdaterTest extends MediaWikiTestCase {
- public function tearDown() {
+ public function tearDown() : void {
MWTimestamp::setFakeTime( false );
parent::tearDown();
diff --git a/tests/phpunit/includes/Storage/NameTableStoreTest.php b/tests/phpunit/includes/Storage/NameTableStoreTest.php
index 0c22cb29e2b8..665122fc9c4f 100644
--- a/tests/phpunit/includes/Storage/NameTableStoreTest.php
+++ b/tests/phpunit/includes/Storage/NameTableStoreTest.php
@@ -25,7 +25,7 @@ use Wikimedia\TestingAccessWrapper;
*/
class NameTableStoreTest extends MediaWikiTestCase {
- public function setUp() {
+ public function setUp() : void {
$this->tablesUsed[] = 'slot_roles';
parent::setUp();
}
diff --git a/tests/phpunit/includes/Storage/PageUpdaterTest.php b/tests/phpunit/includes/Storage/PageUpdaterTest.php
index 9d6060591782..592d5e8cadd3 100644
--- a/tests/phpunit/includes/Storage/PageUpdaterTest.php
+++ b/tests/phpunit/includes/Storage/PageUpdaterTest.php
@@ -22,7 +22,7 @@ use WikiPage;
*/
class PageUpdaterTest extends MediaWikiTestCase {
- public function setUp() {
+ public function setUp() : void {
parent::setUp();
MediaWikiServices::getInstance()->getSlotRoleRegistry()->defineRoleWithModel(
diff --git a/tests/phpunit/includes/TemplateParserTest.php b/tests/phpunit/includes/TemplateParserTest.php
index 0bc44592fcd4..ad2deb5f8f8c 100644
--- a/tests/phpunit/includes/TemplateParserTest.php
+++ b/tests/phpunit/includes/TemplateParserTest.php
@@ -8,7 +8,7 @@ class TemplateParserTest extends MediaWikiTestCase {
protected $templateDir;
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->setMwGlobals( [
diff --git a/tests/phpunit/includes/TimeAdjustTest.php b/tests/phpunit/includes/TimeAdjustTest.php
index b59282dd7980..3244e8946f06 100644
--- a/tests/phpunit/includes/TimeAdjustTest.php
+++ b/tests/phpunit/includes/TimeAdjustTest.php
@@ -3,7 +3,7 @@
use MediaWiki\MediaWikiServices;
class TimeAdjustTest extends MediaWikiLangTestCase {
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
}
diff --git a/tests/phpunit/includes/TitleMethodsTest.php b/tests/phpunit/includes/TitleMethodsTest.php
index c36f8525dbd1..07fa2fb03b80 100644
--- a/tests/phpunit/includes/TitleMethodsTest.php
+++ b/tests/phpunit/includes/TitleMethodsTest.php
@@ -12,7 +12,7 @@ use MediaWiki\MediaWikiServices;
*/
class TitleMethodsTest extends MediaWikiLangTestCase {
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->mergeMwGlobalArrayValue(
@@ -462,7 +462,7 @@ class TitleMethodsTest extends MediaWikiLangTestCase {
);
}
- public function tearDown() {
+ public function tearDown() : void {
Title::clearCaches();
parent::tearDown();
}
diff --git a/tests/phpunit/includes/TitlePermissionTest.php b/tests/phpunit/includes/TitlePermissionTest.php
index 98460f290343..fff24dd58440 100644
--- a/tests/phpunit/includes/TitlePermissionTest.php
+++ b/tests/phpunit/includes/TitlePermissionTest.php
@@ -28,7 +28,7 @@ class TitlePermissionTest extends MediaWikiLangTestCase {
*/
protected $user, $anonUser, $userUser, $altUser;
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$localZone = 'UTC';
diff --git a/tests/phpunit/includes/TitleTest.php b/tests/phpunit/includes/TitleTest.php
index 3ae94e1a8e86..a931a3b4ac5b 100644
--- a/tests/phpunit/includes/TitleTest.php
+++ b/tests/phpunit/includes/TitleTest.php
@@ -9,7 +9,7 @@ use MediaWiki\MediaWikiServices;
* @group Title
*/
class TitleTest extends MediaWikiTestCase {
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->setMwGlobals( [
diff --git a/tests/phpunit/includes/WebRequestTest.php b/tests/phpunit/includes/WebRequestTest.php
index 0199cdb7fd31..bd43706fd7a2 100644
--- a/tests/phpunit/includes/WebRequestTest.php
+++ b/tests/phpunit/includes/WebRequestTest.php
@@ -5,7 +5,7 @@
*/
class WebRequestTest extends MediaWikiTestCase {
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->oldServer = $_SERVER;
@@ -13,7 +13,7 @@ class WebRequestTest extends MediaWikiTestCase {
$this->oldWgServer = $GLOBALS['wgServer'];
}
- protected function tearDown() {
+ protected function tearDown() : void {
$_SERVER = $this->oldServer;
$GLOBALS['wgRequest'] = $this->oldWgRequest;
$GLOBALS['wgServer'] = $this->oldWgServer;
diff --git a/tests/phpunit/includes/WikiMapTest.php b/tests/phpunit/includes/WikiMapTest.php
index 6fe9218b7fc2..c492fa8c9bab 100644
--- a/tests/phpunit/includes/WikiMapTest.php
+++ b/tests/phpunit/includes/WikiMapTest.php
@@ -9,7 +9,7 @@ use Wikimedia\Rdbms\DatabaseDomain;
*/
class WikiMapTest extends MediaWikiLangTestCase {
- public function setUp() {
+ public function setUp() : void {
parent::setUp();
$conf = new SiteConfiguration();
diff --git a/tests/phpunit/includes/XmlTest.php b/tests/phpunit/includes/XmlTest.php
index 082650192b5c..5b5af710870e 100644
--- a/tests/phpunit/includes/XmlTest.php
+++ b/tests/phpunit/includes/XmlTest.php
@@ -7,7 +7,7 @@ use MediaWiki\MediaWikiServices;
*/
class XmlTest extends MediaWikiTestCase {
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$langObj = MediaWikiServices::getInstance()->getLanguageFactory()->getLanguage( 'en' );
diff --git a/tests/phpunit/includes/actions/ActionTest.php b/tests/phpunit/includes/actions/ActionTest.php
index 4d977cbf1ed4..5b3a004a6859 100644
--- a/tests/phpunit/includes/actions/ActionTest.php
+++ b/tests/phpunit/includes/actions/ActionTest.php
@@ -14,7 +14,7 @@ use MediaWiki\Block\Restriction\PageRestriction;
*/
class ActionTest extends MediaWikiTestCase {
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$context = $this->getContext();
diff --git a/tests/phpunit/includes/actions/WatchActionTest.php b/tests/phpunit/includes/actions/WatchActionTest.php
index 78ecaea58048..683f09c55823 100644
--- a/tests/phpunit/includes/actions/WatchActionTest.php
+++ b/tests/phpunit/includes/actions/WatchActionTest.php
@@ -19,7 +19,7 @@ class WatchActionTest extends MediaWikiTestCase {
*/
private $testWikiPage;
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$testTitle = Title::newFromText( 'UTTest' );
@@ -32,7 +32,7 @@ class WatchActionTest extends MediaWikiTestCase {
/**
* @throws MWException
*/
- protected function tearDown() {
+ protected function tearDown() : void {
parent::tearDown();
Hooks::clear( 'WatchArticle' );
diff --git a/tests/phpunit/includes/api/ApiBlockTest.php b/tests/phpunit/includes/api/ApiBlockTest.php
index 3d9e758135b0..6bde976e683d 100644
--- a/tests/phpunit/includes/api/ApiBlockTest.php
+++ b/tests/phpunit/includes/api/ApiBlockTest.php
@@ -14,7 +14,7 @@ use MediaWiki\Block\Restriction\NamespaceRestriction;
class ApiBlockTest extends ApiTestCase {
protected $mUser = null;
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->tablesUsed = array_merge(
$this->tablesUsed,
diff --git a/tests/phpunit/includes/api/ApiCSPReportTest.php b/tests/phpunit/includes/api/ApiCSPReportTest.php
index b3e0543c7891..ac6d52bb16d1 100644
--- a/tests/phpunit/includes/api/ApiCSPReportTest.php
+++ b/tests/phpunit/includes/api/ApiCSPReportTest.php
@@ -7,7 +7,7 @@
*/
class ApiCSPReportTest extends MediaWikiIntegrationTestCase {
- public function setUp() {
+ public function setUp() : void {
parent::setUp();
$this->setMwGlobals( [
'CSPFalsePositiveUrls' => [],
diff --git a/tests/phpunit/includes/api/ApiDeleteTest.php b/tests/phpunit/includes/api/ApiDeleteTest.php
index 001b46d3f179..37d8c66dab27 100644
--- a/tests/phpunit/includes/api/ApiDeleteTest.php
+++ b/tests/phpunit/includes/api/ApiDeleteTest.php
@@ -13,7 +13,7 @@
*/
class ApiDeleteTest extends ApiTestCase {
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->tablesUsed = array_merge(
$this->tablesUsed,
diff --git a/tests/phpunit/includes/api/ApiEditPageTest.php b/tests/phpunit/includes/api/ApiEditPageTest.php
index c397e9e2715a..01fd0829726d 100644
--- a/tests/phpunit/includes/api/ApiEditPageTest.php
+++ b/tests/phpunit/includes/api/ApiEditPageTest.php
@@ -15,7 +15,7 @@ use MediaWiki\Block\DatabaseBlock;
*/
class ApiEditPageTest extends ApiTestCase {
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->setMwGlobals( [
diff --git a/tests/phpunit/includes/api/ApiLoginTest.php b/tests/phpunit/includes/api/ApiLoginTest.php
index 15486fedc3e8..13e863c7e06d 100644
--- a/tests/phpunit/includes/api/ApiLoginTest.php
+++ b/tests/phpunit/includes/api/ApiLoginTest.php
@@ -13,7 +13,7 @@ use Wikimedia\TestingAccessWrapper;
* @covers ApiLogin
*/
class ApiLoginTest extends ApiTestCase {
- public function setUp() {
+ public function setUp() : void {
parent::setUp();
$this->tablesUsed[] = 'bot_passwords';
diff --git a/tests/phpunit/includes/api/ApiLogoutTest.php b/tests/phpunit/includes/api/ApiLogoutTest.php
index 8254fdba7d94..9da4ab79fe92 100644
--- a/tests/phpunit/includes/api/ApiLogoutTest.php
+++ b/tests/phpunit/includes/api/ApiLogoutTest.php
@@ -9,7 +9,7 @@
*/
class ApiLogoutTest extends ApiTestCase {
- protected function setUp() {
+ protected function setUp() : void {
global $wgRequest, $wgUser;
parent::setUp();
diff --git a/tests/phpunit/includes/api/ApiOptionsTest.php b/tests/phpunit/includes/api/ApiOptionsTest.php
index bafe09b5f120..7aa743f637e2 100644
--- a/tests/phpunit/includes/api/ApiOptionsTest.php
+++ b/tests/phpunit/includes/api/ApiOptionsTest.php
@@ -21,7 +21,7 @@ class ApiOptionsTest extends MediaWikiLangTestCase {
private static $Success = [ 'options' => 'success' ];
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->mUserMock = $this->getMockBuilder( User::class )
diff --git a/tests/phpunit/includes/api/ApiQueryLanguageinfoTest.php b/tests/phpunit/includes/api/ApiQueryLanguageinfoTest.php
index 7d0609c8695c..4e5f3b1f2e4b 100644
--- a/tests/phpunit/includes/api/ApiQueryLanguageinfoTest.php
+++ b/tests/phpunit/includes/api/ApiQueryLanguageinfoTest.php
@@ -8,7 +8,7 @@
*/
class ApiQueryLanguageinfoTest extends ApiTestCase {
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
// register custom language names so this test is independent of CLDR
$this->setTemporaryHook(
diff --git a/tests/phpunit/includes/api/ApiQueryPrefixSearchTest.php b/tests/phpunit/includes/api/ApiQueryPrefixSearchTest.php
index cb5e76dd8daf..9cbffbf48c64 100644
--- a/tests/phpunit/includes/api/ApiQueryPrefixSearchTest.php
+++ b/tests/phpunit/includes/api/ApiQueryPrefixSearchTest.php
@@ -10,7 +10,7 @@
class ApiQueryPrefixSearchTest extends ApiTestCase {
const TEST_QUERY = 'unittest';
- public function setUp() {
+ public function setUp() : void {
parent::setUp();
$this->setMwGlobals( [
'wgSearchType' => MockCompletionSearchEngine::class,
diff --git a/tests/phpunit/includes/api/ApiQueryRecentChangesIntegrationTest.php b/tests/phpunit/includes/api/ApiQueryRecentChangesIntegrationTest.php
index ff0e2e69a8e8..c96f28efeed9 100644
--- a/tests/phpunit/includes/api/ApiQueryRecentChangesIntegrationTest.php
+++ b/tests/phpunit/includes/api/ApiQueryRecentChangesIntegrationTest.php
@@ -19,7 +19,7 @@ class ApiQueryRecentChangesIntegrationTest extends ApiTestCase {
$this->tablesUsed[] = 'page';
}
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
self::$users['ApiQueryRecentChangesIntegrationTestUser'] = $this->getMutableTestUser();
diff --git a/tests/phpunit/includes/api/ApiQuerySearchTest.php b/tests/phpunit/includes/api/ApiQuerySearchTest.php
index cf835ced0b1b..8666977d5796 100644
--- a/tests/phpunit/includes/api/ApiQuerySearchTest.php
+++ b/tests/phpunit/includes/api/ApiQuerySearchTest.php
@@ -93,7 +93,7 @@ class ApiQuerySearchTest extends ApiTestCase {
$this->assertEquals( $expect, $results );
}
- public function setUp() {
+ public function setUp() : void {
parent::setUp();
MockSearchEngine::clearMockResults();
$this->registerMockSearchEngine();
diff --git a/tests/phpunit/includes/api/ApiQueryWatchlistIntegrationTest.php b/tests/phpunit/includes/api/ApiQueryWatchlistIntegrationTest.php
index 7018ee306bad..02c2a56e89ff 100644
--- a/tests/phpunit/includes/api/ApiQueryWatchlistIntegrationTest.php
+++ b/tests/phpunit/includes/api/ApiQueryWatchlistIntegrationTest.php
@@ -20,7 +20,7 @@ class ApiQueryWatchlistIntegrationTest extends ApiTestCase {
);
}
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
self::$users['ApiQueryWatchlistIntegrationTestUser'] = $this->getMutableTestUser();
self::$users['ApiQueryWatchlistIntegrationTestUser2'] = $this->getMutableTestUser();
diff --git a/tests/phpunit/includes/api/ApiQueryWatchlistRawIntegrationTest.php b/tests/phpunit/includes/api/ApiQueryWatchlistRawIntegrationTest.php
index 4ebaa0dc811d..f42ce9b8c270 100644
--- a/tests/phpunit/includes/api/ApiQueryWatchlistRawIntegrationTest.php
+++ b/tests/phpunit/includes/api/ApiQueryWatchlistRawIntegrationTest.php
@@ -11,7 +11,7 @@ use MediaWiki\MediaWikiServices;
*/
class ApiQueryWatchlistRawIntegrationTest extends ApiTestCase {
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
self::$users['ApiQueryWatchlistRawIntegrationTestUser']
= $this->getMutableTestUser();
diff --git a/tests/phpunit/includes/api/ApiRevisionDeleteTest.php b/tests/phpunit/includes/api/ApiRevisionDeleteTest.php
index 7dc63fbe9eda..25bd6e94765a 100644
--- a/tests/phpunit/includes/api/ApiRevisionDeleteTest.php
+++ b/tests/phpunit/includes/api/ApiRevisionDeleteTest.php
@@ -15,7 +15,7 @@ class ApiRevisionDeleteTest extends ApiTestCase {
public static $page = 'Help:ApiRevDel_test';
public $revs = [];
- protected function setUp() {
+ protected function setUp() : void {
// Needs to be before setup since this gets cached
$this->mergeMwGlobalArrayValue(
'wgGroupPermissions',
diff --git a/tests/phpunit/includes/api/ApiSetNotificationTimestampIntegrationTest.php b/tests/phpunit/includes/api/ApiSetNotificationTimestampIntegrationTest.php
index 187e9e083ba6..610b30a7f20f 100644
--- a/tests/phpunit/includes/api/ApiSetNotificationTimestampIntegrationTest.php
+++ b/tests/phpunit/includes/api/ApiSetNotificationTimestampIntegrationTest.php
@@ -11,7 +11,7 @@ use MediaWiki\MediaWikiServices;
*/
class ApiSetNotificationTimestampIntegrationTest extends ApiTestCase {
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
self::$users[__CLASS__] = new TestUser( __CLASS__ );
}
diff --git a/tests/phpunit/includes/api/ApiStashEditTest.php b/tests/phpunit/includes/api/ApiStashEditTest.php
index ecb7e1ec4192..a5c39c4b50c9 100644
--- a/tests/phpunit/includes/api/ApiStashEditTest.php
+++ b/tests/phpunit/includes/api/ApiStashEditTest.php
@@ -13,7 +13,7 @@ use Psr\Log\NullLogger;
* @group Database
*/
class ApiStashEditTest extends ApiTestCase {
- public function setUp() {
+ public function setUp() : void {
parent::setUp();
$this->setService( 'PageEditStash', new PageEditStash(
new HashBagOStuff( [] ),
@@ -26,7 +26,7 @@ class ApiStashEditTest extends ApiTestCase {
$this->setMwGlobals( 'wgMainCacheType', 'hash' );
}
- public function tearDown() {
+ public function tearDown() : void {
parent::tearDown();
}
diff --git a/tests/phpunit/includes/api/ApiTestCase.php b/tests/phpunit/includes/api/ApiTestCase.php
index f0de8ba7da33..05ef71498f16 100644
--- a/tests/phpunit/includes/api/ApiTestCase.php
+++ b/tests/phpunit/includes/api/ApiTestCase.php
@@ -15,7 +15,7 @@ abstract class ApiTestCase extends MediaWikiLangTestCase {
*/
protected $apiContext;
- protected function setUp() {
+ protected function setUp() : void {
global $wgServer;
parent::setUp();
@@ -36,7 +36,7 @@ abstract class ApiTestCase extends MediaWikiLangTestCase {
$this->apiContext = new ApiTestContext();
}
- protected function tearDown() {
+ protected function tearDown() : void {
// Avoid leaking session over tests
MediaWiki\Session\SessionManager::getGlobalSession()->clear();
diff --git a/tests/phpunit/includes/api/ApiUnblockTest.php b/tests/phpunit/includes/api/ApiUnblockTest.php
index 4a73872fd7d8..0ab2ddf5e6ba 100644
--- a/tests/phpunit/includes/api/ApiUnblockTest.php
+++ b/tests/phpunit/includes/api/ApiUnblockTest.php
@@ -16,7 +16,7 @@ class ApiUnblockTest extends ApiTestCase {
/** @var User */
private $blockee;
- public function setUp() {
+ public function setUp() : void {
parent::setUp();
$this->tablesUsed = array_merge(
diff --git a/tests/phpunit/includes/api/ApiUploadTest.php b/tests/phpunit/includes/api/ApiUploadTest.php
index 8b18e32043cd..4e1f46512bbf 100644
--- a/tests/phpunit/includes/api/ApiUploadTest.php
+++ b/tests/phpunit/includes/api/ApiUploadTest.php
@@ -12,7 +12,7 @@ class ApiUploadTest extends ApiUploadTestCase {
return __DIR__ . '/../../data/media/' . $fileName;
}
- public function setUp() {
+ public function setUp() : void {
parent::setUp();
$this->tablesUsed[] = 'watchlist'; // This test might interfere with watchlists test.
$this->tablesUsed = array_merge( $this->tablesUsed, LocalFile::getQueryInfo()['tables'] );
diff --git a/tests/phpunit/includes/api/ApiUploadTestCase.php b/tests/phpunit/includes/api/ApiUploadTestCase.php
index d36f0144ad03..2ba2f99b4551 100644
--- a/tests/phpunit/includes/api/ApiUploadTestCase.php
+++ b/tests/phpunit/includes/api/ApiUploadTestCase.php
@@ -7,7 +7,7 @@ abstract class ApiUploadTestCase extends ApiTestCase {
/**
* Fixture -- run before every test
*/
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->setMwGlobals( [
diff --git a/tests/phpunit/includes/api/ApiUserrightsTest.php b/tests/phpunit/includes/api/ApiUserrightsTest.php
index 5f78ac6ef365..c17d95da273a 100644
--- a/tests/phpunit/includes/api/ApiUserrightsTest.php
+++ b/tests/phpunit/includes/api/ApiUserrightsTest.php
@@ -12,7 +12,7 @@ use MediaWiki\MediaWikiServices;
*/
class ApiUserrightsTest extends ApiTestCase {
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->tablesUsed = array_merge(
$this->tablesUsed,
diff --git a/tests/phpunit/includes/api/format/ApiFormatBaseTest.php b/tests/phpunit/includes/api/format/ApiFormatBaseTest.php
index 3cdb0f1fd2cf..68078a78debd 100644
--- a/tests/phpunit/includes/api/format/ApiFormatBaseTest.php
+++ b/tests/phpunit/includes/api/format/ApiFormatBaseTest.php
@@ -10,7 +10,7 @@ class ApiFormatBaseTest extends ApiFormatTestBase {
protected $printerName = 'mockbase';
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->setMwGlobals( [
'wgServer' => 'http://example.org'
diff --git a/tests/phpunit/includes/api/query/ApiQueryTest.php b/tests/phpunit/includes/api/query/ApiQueryTest.php
index 9ed37542ade0..132f0db30460 100644
--- a/tests/phpunit/includes/api/query/ApiQueryTest.php
+++ b/tests/phpunit/includes/api/query/ApiQueryTest.php
@@ -7,7 +7,7 @@
* @covers ApiQuery
*/
class ApiQueryTest extends ApiTestCase {
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
// Setup apiquerytestiw: as interwiki prefix
diff --git a/tests/phpunit/includes/auth/UserDataAuthenticationRequestTest.php b/tests/phpunit/includes/auth/UserDataAuthenticationRequestTest.php
index 8c9a88f77872..4114e189511f 100644
--- a/tests/phpunit/includes/auth/UserDataAuthenticationRequestTest.php
+++ b/tests/phpunit/includes/auth/UserDataAuthenticationRequestTest.php
@@ -12,7 +12,7 @@ class UserDataAuthenticationRequestTest extends AuthenticationRequestTestCase {
return new UserDataAuthenticationRequest;
}
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->setMwGlobals( 'wgHiddenPrefs', [] );
}
diff --git a/tests/phpunit/includes/block/BlockManagerTest.php b/tests/phpunit/includes/block/BlockManagerTest.php
index d50bf43b6804..c4e1a79efda9 100644
--- a/tests/phpunit/includes/block/BlockManagerTest.php
+++ b/tests/phpunit/includes/block/BlockManagerTest.php
@@ -22,7 +22,7 @@ class BlockManagerTest extends MediaWikiTestCase {
/** @var int */
protected $sysopId;
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->user = $this->getTestUser()->getUser();
diff --git a/tests/phpunit/includes/block/BlockRestrictionStoreTest.php b/tests/phpunit/includes/block/BlockRestrictionStoreTest.php
index b1e23baabf0a..523ca33b164a 100644
--- a/tests/phpunit/includes/block/BlockRestrictionStoreTest.php
+++ b/tests/phpunit/includes/block/BlockRestrictionStoreTest.php
@@ -19,13 +19,13 @@ class BlockRestrictionStoreTest extends \MediaWikiLangTestCase {
/** @var BlockRestrictionStore */
protected $blockRestrictionStore;
- public function setUp() {
+ public function setUp() : void {
parent::setUp();
$this->blockRestrictionStore = MediaWikiServices::getInstance()->getBlockRestrictionStore();
}
- public function tearDown() {
+ public function tearDown() : void {
parent::tearDown();
$this->resetTables();
}
diff --git a/tests/phpunit/includes/cache/LocalisationCacheTest.php b/tests/phpunit/includes/cache/LocalisationCacheTest.php
index 4dd819a61b86..163e0a99d8cc 100644
--- a/tests/phpunit/includes/cache/LocalisationCacheTest.php
+++ b/tests/phpunit/includes/cache/LocalisationCacheTest.php
@@ -11,7 +11,7 @@ use Psr\Log\NullLogger;
* @author Niklas Laxström
*/
class LocalisationCacheTest extends MediaWikiTestCase {
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->setMwGlobals( [
'wgExtensionMessagesFiles' => [],
diff --git a/tests/phpunit/includes/cache/MessageCacheTest.php b/tests/phpunit/includes/cache/MessageCacheTest.php
index e786f42ae970..e3c11a6132fb 100644
--- a/tests/phpunit/includes/cache/MessageCacheTest.php
+++ b/tests/phpunit/includes/cache/MessageCacheTest.php
@@ -10,7 +10,7 @@ use Wikimedia\TestingAccessWrapper;
*/
class MessageCacheTest extends MediaWikiLangTestCase {
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->configureLanguages();
MessageCache::singleton()->enable();
diff --git a/tests/phpunit/includes/changes/CategoryMembershipChangeTest.php b/tests/phpunit/includes/changes/CategoryMembershipChangeTest.php
index 955971d5a4d8..80ffcdeb151d 100644
--- a/tests/phpunit/includes/changes/CategoryMembershipChangeTest.php
+++ b/tests/phpunit/includes/changes/CategoryMembershipChangeTest.php
@@ -45,7 +45,7 @@ class CategoryMembershipChangeTest extends MediaWikiLangTestCase {
return self::$mockRecentChange;
}
- public function setUp() {
+ public function setUp() : void {
parent::setUp();
self::$notifyCallCounter = 0;
self::$mockRecentChange = $this->createMock( RecentChange::class );
diff --git a/tests/phpunit/includes/changes/ChangesListFilterTest.php b/tests/phpunit/includes/changes/ChangesListFilterTest.php
index 6574e12f8f19..46372b1898e2 100644
--- a/tests/phpunit/includes/changes/ChangesListFilterTest.php
+++ b/tests/phpunit/includes/changes/ChangesListFilterTest.php
@@ -8,7 +8,7 @@ use Wikimedia\TestingAccessWrapper;
class ChangesListFilterTest extends MediaWikiTestCase {
protected $group;
- public function setUp() {
+ public function setUp() : void {
$this->group = $this->getGroup( [ 'name' => 'group' ] );
parent::setUp();
diff --git a/tests/phpunit/includes/changes/OldChangesListTest.php b/tests/phpunit/includes/changes/OldChangesListTest.php
index f4048b4f0a85..1fab370b2287 100644
--- a/tests/phpunit/includes/changes/OldChangesListTest.php
+++ b/tests/phpunit/includes/changes/OldChangesListTest.php
@@ -24,7 +24,7 @@ class OldChangesListTest extends MediaWikiLangTestCase {
$this->testRecentChangesHelper = new TestRecentChangesHelper();
}
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->setMwGlobals( [
diff --git a/tests/phpunit/includes/changes/RCCacheEntryFactoryTest.php b/tests/phpunit/includes/changes/RCCacheEntryFactoryTest.php
index 558706d757d6..016b5ae190d7 100644
--- a/tests/phpunit/includes/changes/RCCacheEntryFactoryTest.php
+++ b/tests/phpunit/includes/changes/RCCacheEntryFactoryTest.php
@@ -28,7 +28,7 @@ class RCCacheEntryFactoryTest extends MediaWikiLangTestCase {
$this->testRecentChangesHelper = new TestRecentChangesHelper();
}
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->setMwGlobals( [
diff --git a/tests/phpunit/includes/changes/RecentChangeTest.php b/tests/phpunit/includes/changes/RecentChangeTest.php
index 491d3728ec50..eeca4b550f51 100644
--- a/tests/phpunit/includes/changes/RecentChangeTest.php
+++ b/tests/phpunit/includes/changes/RecentChangeTest.php
@@ -13,7 +13,7 @@ class RecentChangeTest extends MediaWikiTestCase {
protected $user_comment;
protected $context;
- public function setUp() {
+ public function setUp() : void {
parent::setUp();
$this->title = Title::newFromText( 'SomeTitle' );
diff --git a/tests/phpunit/includes/changetags/ChangeTagsTest.php b/tests/phpunit/includes/changetags/ChangeTagsTest.php
index ad31dce3767c..d98fbe8d4ee5 100644
--- a/tests/phpunit/includes/changetags/ChangeTagsTest.php
+++ b/tests/phpunit/includes/changetags/ChangeTagsTest.php
@@ -8,7 +8,7 @@ use MediaWiki\MediaWikiServices;
*/
class ChangeTagsTest extends MediaWikiTestCase {
- public function setUp() {
+ public function setUp() : void {
parent::setUp();
$this->tablesUsed[] = 'change_tag';
diff --git a/tests/phpunit/includes/collation/CollationTest.php b/tests/phpunit/includes/collation/CollationTest.php
index e97f14a5107a..e81520718b90 100644
--- a/tests/phpunit/includes/collation/CollationTest.php
+++ b/tests/phpunit/includes/collation/CollationTest.php
@@ -8,7 +8,7 @@
* @covers UppercaseCollation
*/
class CollationTest extends MediaWikiLangTestCase {
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->checkPHPExtension( 'intl' );
}
diff --git a/tests/phpunit/includes/collation/CustomUppercaseCollationTest.php b/tests/phpunit/includes/collation/CustomUppercaseCollationTest.php
index 9e42d3f312ee..9bda6c23182e 100644
--- a/tests/phpunit/includes/collation/CustomUppercaseCollationTest.php
+++ b/tests/phpunit/includes/collation/CustomUppercaseCollationTest.php
@@ -7,7 +7,7 @@ use MediaWiki\MediaWikiServices;
*/
class CustomUppercaseCollationTest extends MediaWikiTestCase {
- public function setUp() {
+ public function setUp() : void {
$this->collation = new CustomUppercaseCollation( [
'D',
'C',
diff --git a/tests/phpunit/includes/content/ContentHandlerTest.php b/tests/phpunit/includes/content/ContentHandlerTest.php
index 99ea782c376d..2d5ee2fcf507 100644
--- a/tests/phpunit/includes/content/ContentHandlerTest.php
+++ b/tests/phpunit/includes/content/ContentHandlerTest.php
@@ -9,7 +9,7 @@ use Wikimedia\TestingAccessWrapper;
*/
class ContentHandlerTest extends MediaWikiTestCase {
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->setMwGlobals( [
@@ -39,7 +39,7 @@ class ContentHandlerTest extends MediaWikiTestCase {
MediaWikiServices::getInstance()->resetServiceForTesting( 'LinkCache' );
}
- protected function tearDown() {
+ protected function tearDown() : void {
// Reset LinkCache
MediaWikiServices::getInstance()->resetServiceForTesting( 'LinkCache' );
diff --git a/tests/phpunit/includes/content/CssContentTest.php b/tests/phpunit/includes/content/CssContentTest.php
index 1b5b976b349d..d844fc7a3b24 100644
--- a/tests/phpunit/includes/content/CssContentTest.php
+++ b/tests/phpunit/includes/content/CssContentTest.php
@@ -9,7 +9,7 @@
*/
class CssContentTest extends JavaScriptContentTest {
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
// Anon user
diff --git a/tests/phpunit/includes/content/FileContentHandlerTest.php b/tests/phpunit/includes/content/FileContentHandlerTest.php
index 9149fc4f57fa..b840960361fa 100644
--- a/tests/phpunit/includes/content/FileContentHandlerTest.php
+++ b/tests/phpunit/includes/content/FileContentHandlerTest.php
@@ -11,7 +11,7 @@ class FileContentHandlerTest extends MediaWikiLangTestCase {
*/
private $handler;
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->handler = new FileContentHandler();
diff --git a/tests/phpunit/includes/content/TextContentTest.php b/tests/phpunit/includes/content/TextContentTest.php
index ecd23f133814..777352bc0b02 100644
--- a/tests/phpunit/includes/content/TextContentTest.php
+++ b/tests/phpunit/includes/content/TextContentTest.php
@@ -10,7 +10,7 @@ use MediaWiki\MediaWikiServices;
class TextContentTest extends MediaWikiLangTestCase {
protected $context;
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
// trigger purging of all page related tables
@@ -40,7 +40,7 @@ class TextContentTest extends MediaWikiLangTestCase {
MWTidy::destroySingleton();
}
- protected function tearDown() {
+ protected function tearDown() : void {
MWTidy::destroySingleton();
parent::tearDown();
}
diff --git a/tests/phpunit/includes/content/WikitextContentHandlerTest.php b/tests/phpunit/includes/content/WikitextContentHandlerTest.php
index 386c146ad8bd..bb287ddc0558 100644
--- a/tests/phpunit/includes/content/WikitextContentHandlerTest.php
+++ b/tests/phpunit/includes/content/WikitextContentHandlerTest.php
@@ -13,7 +13,7 @@ class WikitextContentHandlerTest extends MediaWikiLangTestCase {
*/
private $handler;
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->handler = ContentHandler::getForModelID( CONTENT_MODEL_WIKITEXT );
diff --git a/tests/phpunit/includes/debug/DeprecationHelperTest.php b/tests/phpunit/includes/debug/DeprecationHelperTest.php
index 2e4255329a4e..2c746c5b5036 100644
--- a/tests/phpunit/includes/debug/DeprecationHelperTest.php
+++ b/tests/phpunit/includes/debug/DeprecationHelperTest.php
@@ -13,7 +13,7 @@ class DeprecationHelperTest extends MediaWikiTestCase {
/** @var TestDeprecatedSubclass */
private $testSubclass;
- public function setUp() {
+ public function setUp() : void {
parent::setUp();
$this->testClass = new TestDeprecatedClass();
$this->testSubclass = new TestDeprecatedSubclass();
diff --git a/tests/phpunit/includes/debug/MWDebugTest.php b/tests/phpunit/includes/debug/MWDebugTest.php
index 6f0b1db9f256..216029d403df 100644
--- a/tests/phpunit/includes/debug/MWDebugTest.php
+++ b/tests/phpunit/includes/debug/MWDebugTest.php
@@ -2,7 +2,7 @@
class MWDebugTest extends MediaWikiTestCase {
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
/** Clear log before each test */
MWDebug::clearLog();
diff --git a/tests/phpunit/includes/deferred/LinksUpdateTest.php b/tests/phpunit/includes/deferred/LinksUpdateTest.php
index 6ae510aa3188..84bd88802b9c 100644
--- a/tests/phpunit/includes/deferred/LinksUpdateTest.php
+++ b/tests/phpunit/includes/deferred/LinksUpdateTest.php
@@ -28,7 +28,7 @@ class LinksUpdateTest extends MediaWikiLangTestCase {
);
}
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$dbw = wfGetDB( DB_MASTER );
$dbw->replace(
diff --git a/tests/phpunit/includes/deferred/SearchUpdateTest.php b/tests/phpunit/includes/deferred/SearchUpdateTest.php
index 43fbee800756..4b9ad05bb1eb 100644
--- a/tests/phpunit/includes/deferred/SearchUpdateTest.php
+++ b/tests/phpunit/includes/deferred/SearchUpdateTest.php
@@ -10,7 +10,7 @@ class SearchUpdateTest extends MediaWikiTestCase {
*/
private $su;
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->su = new SearchUpdate( 0, Title::newMainPage() );
}
diff --git a/tests/phpunit/includes/diff/DifferenceEngineTest.php b/tests/phpunit/includes/diff/DifferenceEngineTest.php
index 842d692a3b72..79ed62cc40b5 100644
--- a/tests/phpunit/includes/diff/DifferenceEngineTest.php
+++ b/tests/phpunit/includes/diff/DifferenceEngineTest.php
@@ -21,7 +21,7 @@ class DifferenceEngineTest extends MediaWikiTestCase {
private static $revisions;
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$title = $this->getTitle();
diff --git a/tests/phpunit/includes/filebackend/FileBackendIntegrationTest.php b/tests/phpunit/includes/filebackend/FileBackendIntegrationTest.php
index f7f2b6341bd6..676391601bd8 100644
--- a/tests/phpunit/includes/filebackend/FileBackendIntegrationTest.php
+++ b/tests/phpunit/includes/filebackend/FileBackendIntegrationTest.php
@@ -54,7 +54,7 @@ class FileBackendIntegrationTest extends MediaWikiIntegrationTestCase {
public $singleBackend;
private static $backendToUse;
- protected function setUp() {
+ protected function setUp() : void {
global $wgFileBackends;
parent::setUp();
$tmpDir = $this->getNewTempDirectory();
diff --git a/tests/phpunit/includes/filebackend/SwiftFileBackendTest.php b/tests/phpunit/includes/filebackend/SwiftFileBackendTest.php
index 13f2b1757887..1619779a51b8 100644
--- a/tests/phpunit/includes/filebackend/SwiftFileBackendTest.php
+++ b/tests/phpunit/includes/filebackend/SwiftFileBackendTest.php
@@ -16,7 +16,7 @@ class SwiftFileBackendTest extends MediaWikiTestCase {
/** @var TestingAccessWrapper|SwiftFileBackend */
private $backend;
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->backend = TestingAccessWrapper::newFromObject(
diff --git a/tests/phpunit/includes/filebackend/filejournal/DBFileJournalIntegrationTest.php b/tests/phpunit/includes/filebackend/filejournal/DBFileJournalIntegrationTest.php
index 9a0ba1c57497..8c4a453575d7 100644
--- a/tests/phpunit/includes/filebackend/filejournal/DBFileJournalIntegrationTest.php
+++ b/tests/phpunit/includes/filebackend/filejournal/DBFileJournalIntegrationTest.php
@@ -21,7 +21,7 @@ class DBFileJournalIntegrationTest extends MediaWikiIntegrationTestCase {
}
}
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$db = MediaWikiServices::getInstance()->getDBLoadBalancer()->getConnection( DB_MASTER );
diff --git a/tests/phpunit/includes/filerepo/MigrateFileRepoLayoutTest.php b/tests/phpunit/includes/filerepo/MigrateFileRepoLayoutTest.php
index 0c78c2bd86fc..247089df2a6f 100644
--- a/tests/phpunit/includes/filerepo/MigrateFileRepoLayoutTest.php
+++ b/tests/phpunit/includes/filerepo/MigrateFileRepoLayoutTest.php
@@ -9,7 +9,7 @@ class MigrateFileRepoLayoutTest extends MediaWikiTestCase {
protected $tmpFilepath;
protected $text = 'testing';
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$filename = 'Foo.png';
@@ -91,7 +91,7 @@ class MigrateFileRepoLayoutTest extends MediaWikiTestCase {
rmdir( $directory );
}
- protected function tearDown() {
+ protected function tearDown() : void {
foreach ( glob( $this->tmpPrefix . '*' ) as $directory ) {
$this->deleteFilesRecursively( $directory );
}
diff --git a/tests/phpunit/includes/filerepo/StoreBatchTest.php b/tests/phpunit/includes/filerepo/StoreBatchTest.php
index 337c65c4b763..fb13b42a67b5 100644
--- a/tests/phpunit/includes/filerepo/StoreBatchTest.php
+++ b/tests/phpunit/includes/filerepo/StoreBatchTest.php
@@ -11,7 +11,7 @@ class StoreBatchTest extends MediaWikiTestCase {
/** @var FileRepo */
protected $repo;
- protected function setUp() {
+ protected function setUp() : void {
global $wgFileBackends;
parent::setUp();
@@ -51,7 +51,7 @@ class StoreBatchTest extends MediaWikiTestCase {
$this->createdFiles = [];
}
- protected function tearDown() {
+ protected function tearDown() : void {
// Delete files
$this->repo->cleanupBatch( $this->createdFiles );
parent::tearDown();
diff --git a/tests/phpunit/includes/import/ImportLinkCacheIntegrationTest.php b/tests/phpunit/includes/import/ImportLinkCacheIntegrationTest.php
index 7d1d1a2f13bf..195c6382387e 100644
--- a/tests/phpunit/includes/import/ImportLinkCacheIntegrationTest.php
+++ b/tests/phpunit/includes/import/ImportLinkCacheIntegrationTest.php
@@ -17,7 +17,7 @@ class ImportLinkCacheIntegrationTest extends MediaWikiTestCase {
private $importStreamSource;
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$file = dirname( __DIR__ ) . '/../data/import/ImportLinkCacheIntegrationTest.xml';
diff --git a/tests/phpunit/includes/import/ImportableOldRevisionImporterTest.php b/tests/phpunit/includes/import/ImportableOldRevisionImporterTest.php
index a68ac83d2fd7..fdfa85b8c33c 100644
--- a/tests/phpunit/includes/import/ImportableOldRevisionImporterTest.php
+++ b/tests/phpunit/includes/import/ImportableOldRevisionImporterTest.php
@@ -9,7 +9,7 @@ use Psr\Log\NullLogger;
*/
class ImportableOldRevisionImporterTest extends MediaWikiIntegrationTestCase {
- public function setUp() {
+ public function setUp() : void {
parent::setUp();
$this->tablesUsed[] = 'change_tag';
diff --git a/tests/phpunit/includes/jobqueue/JobQueueTest.php b/tests/phpunit/includes/jobqueue/JobQueueTest.php
index fd73f8b2cdc9..3210dc146299 100644
--- a/tests/phpunit/includes/jobqueue/JobQueueTest.php
+++ b/tests/phpunit/includes/jobqueue/JobQueueTest.php
@@ -17,7 +17,7 @@ class JobQueueTest extends MediaWikiTestCase {
$this->tablesUsed[] = 'job';
}
- protected function setUp() {
+ protected function setUp() : void {
global $wgJobTypeConf;
parent::setUp();
@@ -52,7 +52,7 @@ class JobQueueTest extends MediaWikiTestCase {
}
}
- protected function tearDown() {
+ protected function tearDown() : void {
parent::tearDown();
foreach (
[
diff --git a/tests/phpunit/includes/jobqueue/jobs/CategoryMembershipChangeJobTest.php b/tests/phpunit/includes/jobqueue/jobs/CategoryMembershipChangeJobTest.php
index 673808d31a89..d8a262cdb804 100644
--- a/tests/phpunit/includes/jobqueue/jobs/CategoryMembershipChangeJobTest.php
+++ b/tests/phpunit/includes/jobqueue/jobs/CategoryMembershipChangeJobTest.php
@@ -20,7 +20,7 @@ class CategoryMembershipChangeJobTest extends MediaWikiTestCase {
*/
private $title;
- public function setUp() {
+ public function setUp() : void {
parent::setUp();
$this->setMwGlobals( 'wgRCWatchCategoryMembership', true );
$this->setContentLang( 'qqx' );
diff --git a/tests/phpunit/includes/jobqueue/jobs/ClearUserWatchlistJobTest.php b/tests/phpunit/includes/jobqueue/jobs/ClearUserWatchlistJobTest.php
index c7596bf46f8c..5fd6ea8f8601 100644
--- a/tests/phpunit/includes/jobqueue/jobs/ClearUserWatchlistJobTest.php
+++ b/tests/phpunit/includes/jobqueue/jobs/ClearUserWatchlistJobTest.php
@@ -13,7 +13,7 @@ use MediaWiki\MediaWikiServices;
*/
class ClearUserWatchlistJobTest extends MediaWikiTestCase {
- public function setUp() {
+ public function setUp() : void {
parent::setUp();
self::$users['ClearUserWatchlistJobTestUser']
= new TestUser( 'ClearUserWatchlistJobTestUser' );
diff --git a/tests/phpunit/includes/jobqueue/jobs/RefreshLinksJobTest.php b/tests/phpunit/includes/jobqueue/jobs/RefreshLinksJobTest.php
index 24ec2e40fd5a..b74ce047dcf3 100644
--- a/tests/phpunit/includes/jobqueue/jobs/RefreshLinksJobTest.php
+++ b/tests/phpunit/includes/jobqueue/jobs/RefreshLinksJobTest.php
@@ -13,7 +13,7 @@ use MediaWiki\MediaWikiServices;
*/
class RefreshLinksJobTest extends MediaWikiTestCase {
- public function setUp() {
+ public function setUp() : void {
parent::setUp();
$this->tablesUsed[] = 'page';
diff --git a/tests/phpunit/includes/language/ConverterRuleTest.php b/tests/phpunit/includes/language/ConverterRuleTest.php
index 1e06142887d8..0aeac9b53874 100644
--- a/tests/phpunit/includes/language/ConverterRuleTest.php
+++ b/tests/phpunit/includes/language/ConverterRuleTest.php
@@ -5,7 +5,7 @@
*/
class ConverterRuleTest extends MediaWikiTestCase {
- public function setUp() {
+ public function setUp() : void {
parent::setUp();
$this->setMwGlobals( 'wgUser', new User );
}
diff --git a/tests/phpunit/includes/libs/CSSMinTest.php b/tests/phpunit/includes/libs/CSSMinTest.php
index 5e6f4fa651fa..ace1c44ca7da 100644
--- a/tests/phpunit/includes/libs/CSSMinTest.php
+++ b/tests/phpunit/includes/libs/CSSMinTest.php
@@ -8,7 +8,7 @@ use Wikimedia\TestingAccessWrapper;
*/
class CSSMinTest extends MediaWikiTestCase {
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
// For wfExpandUrl
diff --git a/tests/phpunit/includes/libs/JavaScriptMinifierTest.php b/tests/phpunit/includes/libs/JavaScriptMinifierTest.php
index d57d0dd553cc..3dd81ebd3e4b 100644
--- a/tests/phpunit/includes/libs/JavaScriptMinifierTest.php
+++ b/tests/phpunit/includes/libs/JavaScriptMinifierTest.php
@@ -4,7 +4,7 @@ class JavaScriptMinifierTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
- protected function tearDown() {
+ protected function tearDown() : void {
parent::tearDown();
// Reset
$this->setMaxLineLength( 1000 );
diff --git a/tests/phpunit/includes/libs/composer/ComposerInstalledTest.php b/tests/phpunit/includes/libs/composer/ComposerInstalledTest.php
index ae022486d303..5e57cfede553 100644
--- a/tests/phpunit/includes/libs/composer/ComposerInstalledTest.php
+++ b/tests/phpunit/includes/libs/composer/ComposerInstalledTest.php
@@ -4,7 +4,7 @@ class ComposerInstalledTest extends PHPUnit\Framework\TestCase {
private $installed;
- public function setUp() {
+ public function setUp() : void {
parent::setUp();
$this->installed = __DIR__ . "/../../../data/composer/installed.json";
}
diff --git a/tests/phpunit/includes/libs/composer/ComposerJsonTest.php b/tests/phpunit/includes/libs/composer/ComposerJsonTest.php
index 720fa6e8fd1a..d6552b3054fa 100644
--- a/tests/phpunit/includes/libs/composer/ComposerJsonTest.php
+++ b/tests/phpunit/includes/libs/composer/ComposerJsonTest.php
@@ -4,7 +4,7 @@ class ComposerJsonTest extends PHPUnit\Framework\TestCase {
private $json, $json2;
- public function setUp() {
+ public function setUp() : void {
parent::setUp();
$this->json = __DIR__ . "/../../../data/composer/composer.json";
$this->json2 = __DIR__ . "/../../../data/composer/new-composer.json";
diff --git a/tests/phpunit/includes/libs/composer/ComposerLockTest.php b/tests/phpunit/includes/libs/composer/ComposerLockTest.php
index f5fcdbe01819..b1e61a7d5362 100644
--- a/tests/phpunit/includes/libs/composer/ComposerLockTest.php
+++ b/tests/phpunit/includes/libs/composer/ComposerLockTest.php
@@ -4,7 +4,7 @@ class ComposerLockTest extends PHPUnit\Framework\TestCase {
private $lock;
- public function setUp() {
+ public function setUp() : void {
parent::setUp();
$this->lock = __DIR__ . "/../../../data/composer/composer.lock";
}
diff --git a/tests/phpunit/includes/libs/mime/MimeAnalyzerTest.php b/tests/phpunit/includes/libs/mime/MimeAnalyzerTest.php
index ec6d1404e69c..4547fe693859 100644
--- a/tests/phpunit/includes/libs/mime/MimeAnalyzerTest.php
+++ b/tests/phpunit/includes/libs/mime/MimeAnalyzerTest.php
@@ -10,7 +10,7 @@ class MimeAnalyzerTest extends PHPUnit\Framework\TestCase {
/** @var MimeAnalyzer */
private $mimeAnalyzer;
- public function setUp() {
+ public function setUp() : void {
global $IP;
$this->mimeAnalyzer = new MimeAnalyzer( [
diff --git a/tests/phpunit/includes/libs/objectcache/BagOStuffTest.php b/tests/phpunit/includes/libs/objectcache/BagOStuffTest.php
index d239ac1bd7ae..5c54b7831745 100644
--- a/tests/phpunit/includes/libs/objectcache/BagOStuffTest.php
+++ b/tests/phpunit/includes/libs/objectcache/BagOStuffTest.php
@@ -14,7 +14,7 @@ class BagOStuffTest extends MediaWikiTestCase {
const TEST_KEY = 'test';
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
// type defined through parameter
@@ -499,7 +499,7 @@ class BagOStuffTest extends MediaWikiTestCase {
$this->assertTrue( $this->cache->unlock( $key2 ) );
}
- public function tearDown() {
+ public function tearDown() : void {
$this->cache->delete( $this->cache->makeKey( self::TEST_KEY ) );
$this->cache->delete( $this->cache->makeKey( self::TEST_KEY ) . ':lock' );
diff --git a/tests/phpunit/includes/libs/objectcache/MultiWriteBagOStuffTest.php b/tests/phpunit/includes/libs/objectcache/MultiWriteBagOStuffTest.php
index 9f88474e7b2c..d2a71bf5c793 100644
--- a/tests/phpunit/includes/libs/objectcache/MultiWriteBagOStuffTest.php
+++ b/tests/phpunit/includes/libs/objectcache/MultiWriteBagOStuffTest.php
@@ -11,7 +11,7 @@ class MultiWriteBagOStuffTest extends MediaWikiTestCase {
/** @var MultiWriteBagOStuff */
private $cache;
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->cache1 = new HashBagOStuff();
diff --git a/tests/phpunit/includes/libs/objectcache/WANObjectCacheTest.php b/tests/phpunit/includes/libs/objectcache/WANObjectCacheTest.php
index ae13e7c07d83..d05b6c10ea3a 100644
--- a/tests/phpunit/includes/libs/objectcache/WANObjectCacheTest.php
+++ b/tests/phpunit/includes/libs/objectcache/WANObjectCacheTest.php
@@ -25,7 +25,7 @@ class WANObjectCacheTest extends PHPUnit\Framework\TestCase {
/** @var BagOStuff */
private $internalCache;
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->cache = new WANObjectCache( [
diff --git a/tests/phpunit/includes/libs/rdbms/database/DatabaseSQLTest.php b/tests/phpunit/includes/libs/rdbms/database/DatabaseSQLTest.php
index 6c89db5ce97a..1c6bace4307d 100644
--- a/tests/phpunit/includes/libs/rdbms/database/DatabaseSQLTest.php
+++ b/tests/phpunit/includes/libs/rdbms/database/DatabaseSQLTest.php
@@ -19,7 +19,7 @@ class DatabaseSQLTest extends PHPUnit\Framework\TestCase {
/** @var DatabaseTestHelper|Database */
private $database;
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->database = new DatabaseTestHelper( __CLASS__, [ 'cliMode' => true ] );
}
diff --git a/tests/phpunit/includes/libs/rdbms/database/DatabaseTest.php b/tests/phpunit/includes/libs/rdbms/database/DatabaseTest.php
index f7cafcd5a6c3..ae2fcd44313c 100644
--- a/tests/phpunit/includes/libs/rdbms/database/DatabaseTest.php
+++ b/tests/phpunit/includes/libs/rdbms/database/DatabaseTest.php
@@ -17,7 +17,7 @@ class DatabaseTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
- protected function setUp() {
+ protected function setUp() : void {
$this->db = new DatabaseTestHelper( __CLASS__ . '::' . $this->getName() );
}
diff --git a/tests/phpunit/includes/linkeddata/PageDataRequestHandlerTest.php b/tests/phpunit/includes/linkeddata/PageDataRequestHandlerTest.php
index e3a200b2e95c..e08e13f90ce5 100644
--- a/tests/phpunit/includes/linkeddata/PageDataRequestHandlerTest.php
+++ b/tests/phpunit/includes/linkeddata/PageDataRequestHandlerTest.php
@@ -16,7 +16,7 @@ class PageDataRequestHandlerTest extends \MediaWikiLangTestCase {
*/
private $obLevel;
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->interfaceTitle = Title::newFromText( __CLASS__ );
@@ -25,7 +25,7 @@ class PageDataRequestHandlerTest extends \MediaWikiLangTestCase {
$this->setMwGlobals( 'wgArticlePath', '/wiki/$1' );
}
- protected function tearDown() {
+ protected function tearDown() : void {
$obLevel = ob_get_level();
while ( ob_get_level() > $this->obLevel ) {
diff --git a/tests/phpunit/includes/linker/LinkRendererFactoryTest.php b/tests/phpunit/includes/linker/LinkRendererFactoryTest.php
index ef023da19e62..f77bfac8158b 100644
--- a/tests/phpunit/includes/linker/LinkRendererFactoryTest.php
+++ b/tests/phpunit/includes/linker/LinkRendererFactoryTest.php
@@ -25,7 +25,7 @@ class LinkRendererFactoryTest extends MediaWikiLangTestCase {
*/
private $nsInfo;
- public function setUp() {
+ public function setUp() : void {
parent::setUp();
$services = MediaWikiServices::getInstance();
diff --git a/tests/phpunit/includes/linker/LinkRendererTest.php b/tests/phpunit/includes/linker/LinkRendererTest.php
index d359988a67b5..a46bbf698079 100644
--- a/tests/phpunit/includes/linker/LinkRendererTest.php
+++ b/tests/phpunit/includes/linker/LinkRendererTest.php
@@ -14,7 +14,7 @@ class LinkRendererTest extends MediaWikiLangTestCase {
*/
private $factory;
- public function setUp() {
+ public function setUp() : void {
parent::setUp();
$this->setMwGlobals( [
'wgArticlePath' => '/wiki/$1',
@@ -192,7 +192,7 @@ class LinkRendererTest extends MediaWikiLangTestCase {
);
}
- public function tearDown() {
+ public function tearDown() : void {
Title::clearCaches();
parent::tearDown();
}
diff --git a/tests/phpunit/includes/logging/DatabaseLogEntryTest.php b/tests/phpunit/includes/logging/DatabaseLogEntryTest.php
index 3d2214cdc0c7..c3add61ba8c1 100644
--- a/tests/phpunit/includes/logging/DatabaseLogEntryTest.php
+++ b/tests/phpunit/includes/logging/DatabaseLogEntryTest.php
@@ -4,7 +4,7 @@ use MediaWiki\MediaWikiServices;
use Wikimedia\Rdbms\IDatabase;
class DatabaseLogEntryTest extends MediaWikiTestCase {
- public function setUp() {
+ public function setUp() : void {
parent::setUp();
// These services cache their joins
@@ -12,7 +12,7 @@ class DatabaseLogEntryTest extends MediaWikiTestCase {
MediaWikiServices::getInstance()->resetServiceForTesting( 'ActorMigration' );
}
- public function tearDown() {
+ public function tearDown() : void {
parent::tearDown();
MediaWikiServices::getInstance()->resetServiceForTesting( 'CommentStore' );
diff --git a/tests/phpunit/includes/logging/LogFormatterTest.php b/tests/phpunit/includes/logging/LogFormatterTest.php
index 0eb723bb6ff7..c0043f8a72ab 100644
--- a/tests/phpunit/includes/logging/LogFormatterTest.php
+++ b/tests/phpunit/includes/logging/LogFormatterTest.php
@@ -48,7 +48,7 @@ class LogFormatterTest extends MediaWikiLangTestCase {
parent::tearDownAfterClass();
}
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->setMwGlobals( [
diff --git a/tests/phpunit/includes/logging/NewUsersLogFormatterTest.php b/tests/phpunit/includes/logging/NewUsersLogFormatterTest.php
index eee2981c1856..407b7732f783 100644
--- a/tests/phpunit/includes/logging/NewUsersLogFormatterTest.php
+++ b/tests/phpunit/includes/logging/NewUsersLogFormatterTest.php
@@ -6,7 +6,7 @@
*/
class NewUsersLogFormatterTest extends LogFormatterTestCase {
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
// Register LogHandler, see $wgNewUserLog in Setup.php
diff --git a/tests/phpunit/includes/logging/PageLangLogFormatterTest.php b/tests/phpunit/includes/logging/PageLangLogFormatterTest.php
index 33fd68f6c3d3..51f3b0dc6dc0 100644
--- a/tests/phpunit/includes/logging/PageLangLogFormatterTest.php
+++ b/tests/phpunit/includes/logging/PageLangLogFormatterTest.php
@@ -5,7 +5,7 @@
*/
class PageLangLogFormatterTest extends LogFormatterTestCase {
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
// Disable cldr extension
diff --git a/tests/phpunit/includes/media/BitmapMetadataHandlerTest.php b/tests/phpunit/includes/media/BitmapMetadataHandlerTest.php
index 32a6b6ac0a72..f9e89d81c407 100644
--- a/tests/phpunit/includes/media/BitmapMetadataHandlerTest.php
+++ b/tests/phpunit/includes/media/BitmapMetadataHandlerTest.php
@@ -5,7 +5,7 @@
*/
class BitmapMetadataHandlerTest extends MediaWikiTestCase {
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->setMwGlobals( 'wgShowEXIF', false );
diff --git a/tests/phpunit/includes/media/BitmapScalingTest.php b/tests/phpunit/includes/media/BitmapScalingTest.php
index fb96f7dbc1df..ebd4d10f6766 100644
--- a/tests/phpunit/includes/media/BitmapScalingTest.php
+++ b/tests/phpunit/includes/media/BitmapScalingTest.php
@@ -5,7 +5,7 @@
*/
class BitmapScalingTest extends MediaWikiTestCase {
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->setMwGlobals( [
diff --git a/tests/phpunit/includes/media/DjVuTest.php b/tests/phpunit/includes/media/DjVuTest.php
index d9b5d824dd08..cbcb4f7a4208 100644
--- a/tests/phpunit/includes/media/DjVuTest.php
+++ b/tests/phpunit/includes/media/DjVuTest.php
@@ -10,7 +10,7 @@ class DjVuTest extends MediaWikiMediaTestCase {
*/
protected $handler;
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
// cli tool setup
diff --git a/tests/phpunit/includes/media/ExifBitmapTest.php b/tests/phpunit/includes/media/ExifBitmapTest.php
index eb02e7ed58f1..920258a46e6b 100644
--- a/tests/phpunit/includes/media/ExifBitmapTest.php
+++ b/tests/phpunit/includes/media/ExifBitmapTest.php
@@ -10,7 +10,7 @@ class ExifBitmapTest extends MediaWikiMediaTestCase {
*/
protected $handler;
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->checkPHPExtension( 'exif' );
diff --git a/tests/phpunit/includes/media/ExifRotationTest.php b/tests/phpunit/includes/media/ExifRotationTest.php
index e64d4afadc12..6994c78636ea 100644
--- a/tests/phpunit/includes/media/ExifRotationTest.php
+++ b/tests/phpunit/includes/media/ExifRotationTest.php
@@ -12,7 +12,7 @@ class ExifRotationTest extends MediaWikiMediaTestCase {
/** @var BitmapHandler */
private $handler;
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->checkPHPExtension( 'exif' );
diff --git a/tests/phpunit/includes/media/ExifTest.php b/tests/phpunit/includes/media/ExifTest.php
index 876e46172b4b..5b1faec1a904 100644
--- a/tests/phpunit/includes/media/ExifTest.php
+++ b/tests/phpunit/includes/media/ExifTest.php
@@ -9,7 +9,7 @@ class ExifTest extends MediaWikiTestCase {
/** @var string */
protected $mediaPath;
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->checkPHPExtension( 'exif' );
diff --git a/tests/phpunit/includes/media/FormatMetadataTest.php b/tests/phpunit/includes/media/FormatMetadataTest.php
index e6d2b277190c..b156f0a551ce 100644
--- a/tests/phpunit/includes/media/FormatMetadataTest.php
+++ b/tests/phpunit/includes/media/FormatMetadataTest.php
@@ -5,7 +5,7 @@
*/
class FormatMetadataTest extends MediaWikiMediaTestCase {
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->checkPHPExtension( 'exif' );
diff --git a/tests/phpunit/includes/media/GIFHandlerTest.php b/tests/phpunit/includes/media/GIFHandlerTest.php
index 4dd7443e48b8..f6e0b3b6e43f 100644
--- a/tests/phpunit/includes/media/GIFHandlerTest.php
+++ b/tests/phpunit/includes/media/GIFHandlerTest.php
@@ -8,7 +8,7 @@ class GIFHandlerTest extends MediaWikiMediaTestCase {
/** @var GIFHandler */
protected $handler;
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->handler = new GIFHandler();
diff --git a/tests/phpunit/includes/media/JpegMetadataExtractorTest.php b/tests/phpunit/includes/media/JpegMetadataExtractorTest.php
index 6b6ece2f87e0..3f6684e8b188 100644
--- a/tests/phpunit/includes/media/JpegMetadataExtractorTest.php
+++ b/tests/phpunit/includes/media/JpegMetadataExtractorTest.php
@@ -13,7 +13,7 @@ class JpegMetadataExtractorTest extends MediaWikiIntegrationTestCase {
protected $filePath;
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->filePath = __DIR__ . '/../../data/media/';
diff --git a/tests/phpunit/includes/media/JpegPixelFormatTest.php b/tests/phpunit/includes/media/JpegPixelFormatTest.php
index 8d0ddf8df47e..7b3fda4963e7 100644
--- a/tests/phpunit/includes/media/JpegPixelFormatTest.php
+++ b/tests/phpunit/includes/media/JpegPixelFormatTest.php
@@ -10,7 +10,7 @@ use MediaWiki\Shell\Shell;
*/
class JpegPixelFormatTest extends MediaWikiMediaTestCase {
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
}
diff --git a/tests/phpunit/includes/media/JpegTest.php b/tests/phpunit/includes/media/JpegTest.php
index 13de7ff943ff..98e0f3ef0296 100644
--- a/tests/phpunit/includes/media/JpegTest.php
+++ b/tests/phpunit/includes/media/JpegTest.php
@@ -6,7 +6,7 @@
*/
class JpegTest extends MediaWikiMediaTestCase {
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->checkPHPExtension( 'exif' );
diff --git a/tests/phpunit/includes/media/MediaWikiMediaTestCase.php b/tests/phpunit/includes/media/MediaWikiMediaTestCase.php
index 2e9acfade47b..7958d791fe0b 100644
--- a/tests/phpunit/includes/media/MediaWikiMediaTestCase.php
+++ b/tests/phpunit/includes/media/MediaWikiMediaTestCase.php
@@ -11,7 +11,7 @@ abstract class MediaWikiMediaTestCase extends MediaWikiTestCase {
/** @var string */
protected $filePath;
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->filePath = $this->getFilePath();
diff --git a/tests/phpunit/includes/media/PNGHandlerTest.php b/tests/phpunit/includes/media/PNGHandlerTest.php
index 5a66586e2556..2cc61b76770b 100644
--- a/tests/phpunit/includes/media/PNGHandlerTest.php
+++ b/tests/phpunit/includes/media/PNGHandlerTest.php
@@ -8,7 +8,7 @@ class PNGHandlerTest extends MediaWikiMediaTestCase {
/** @var PNGHandler */
protected $handler;
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->handler = new PNGHandler();
}
diff --git a/tests/phpunit/includes/media/PNGMetadataExtractorTest.php b/tests/phpunit/includes/media/PNGMetadataExtractorTest.php
index 4d7ff48bbc91..afce4ed09b24 100644
--- a/tests/phpunit/includes/media/PNGMetadataExtractorTest.php
+++ b/tests/phpunit/includes/media/PNGMetadataExtractorTest.php
@@ -6,7 +6,7 @@
*/
class PNGMetadataExtractorTest extends MediaWikiTestCase {
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->filePath = __DIR__ . '/../../data/media/';
}
diff --git a/tests/phpunit/includes/media/TiffTest.php b/tests/phpunit/includes/media/TiffTest.php
index 8a69ec5b3aa3..470d048ad63b 100644
--- a/tests/phpunit/includes/media/TiffTest.php
+++ b/tests/phpunit/includes/media/TiffTest.php
@@ -10,7 +10,7 @@ class TiffTest extends MediaWikiTestCase {
/** @var string */
protected $filePath;
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->checkPHPExtension( 'exif' );
diff --git a/tests/phpunit/includes/media/WebPHandlerTest.php b/tests/phpunit/includes/media/WebPHandlerTest.php
index ac0ad98eddf4..e3881ab9b82d 100644
--- a/tests/phpunit/includes/media/WebPHandlerTest.php
+++ b/tests/phpunit/includes/media/WebPHandlerTest.php
@@ -4,13 +4,13 @@
* @covers WebPHandler
*/
class WebPHandlerTest extends MediaWikiTestCase {
- public function setUp() {
+ public function setUp() : void {
parent::setUp();
// Allocated file for testing
$this->tempFileName = tempnam( wfTempDir(), 'WEBP' );
}
- public function tearDown() {
+ public function tearDown() : void {
parent::tearDown();
unlink( $this->tempFileName );
}
diff --git a/tests/phpunit/includes/media/XCFHandlerTest.php b/tests/phpunit/includes/media/XCFHandlerTest.php
index b75335d6c0f3..40e78795b6e1 100644
--- a/tests/phpunit/includes/media/XCFHandlerTest.php
+++ b/tests/phpunit/includes/media/XCFHandlerTest.php
@@ -8,7 +8,7 @@ class XCFHandlerTest extends MediaWikiMediaTestCase {
/** @var XCFHandler */
protected $handler;
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->handler = new XCFHandler();
}
diff --git a/tests/phpunit/includes/objectcache/ObjectCacheTest.php b/tests/phpunit/includes/objectcache/ObjectCacheTest.php
index 7f52ca6039be..9440cdf3f920 100644
--- a/tests/phpunit/includes/objectcache/ObjectCacheTest.php
+++ b/tests/phpunit/includes/objectcache/ObjectCacheTest.php
@@ -2,7 +2,7 @@
class ObjectCacheTest extends MediaWikiTestCase {
- protected function setUp() {
+ protected function setUp() : void {
// Parent calls ObjectCache::clear() among other things
parent::setUp();
diff --git a/tests/phpunit/includes/page/ArticleViewTest.php b/tests/phpunit/includes/page/ArticleViewTest.php
index 96191ba5c2e8..dd61661389c7 100644
--- a/tests/phpunit/includes/page/ArticleViewTest.php
+++ b/tests/phpunit/includes/page/ArticleViewTest.php
@@ -11,7 +11,7 @@ use PHPUnit\Framework\MockObject\MockObject;
*/
class ArticleViewTest extends MediaWikiTestCase {
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->setUserLang( 'qqx' );
diff --git a/tests/phpunit/includes/page/ImagePage404Test.php b/tests/phpunit/includes/page/ImagePage404Test.php
index dccc2ebc5d8b..99cd1455fe3a 100644
--- a/tests/phpunit/includes/page/ImagePage404Test.php
+++ b/tests/phpunit/includes/page/ImagePage404Test.php
@@ -8,7 +8,7 @@ class ImagePage404Test extends MediaWikiMediaTestCase {
return parent::getRepoOptions() + [ 'transformVia404' => true ];
}
- public function setUp() {
+ public function setUp() : void {
$this->setMwGlobals( 'wgImageLimits', [
[ 320, 240 ],
[ 640, 480 ],
diff --git a/tests/phpunit/includes/page/ImagePageTest.php b/tests/phpunit/includes/page/ImagePageTest.php
index 7e43ce4e65c3..a741c0090b85 100644
--- a/tests/phpunit/includes/page/ImagePageTest.php
+++ b/tests/phpunit/includes/page/ImagePageTest.php
@@ -4,7 +4,7 @@ use Wikimedia\TestingAccessWrapper;
class ImagePageTest extends MediaWikiMediaTestCase {
- public function setUp() {
+ public function setUp() : void {
$this->setMwGlobals( 'wgImageLimits', [
[ 320, 240 ],
[ 640, 480 ],
diff --git a/tests/phpunit/includes/page/PageArchiveTestBase.php b/tests/phpunit/includes/page/PageArchiveTestBase.php
index b380c7e1a5aa..3d4d2a9946e0 100644
--- a/tests/phpunit/includes/page/PageArchiveTestBase.php
+++ b/tests/phpunit/includes/page/PageArchiveTestBase.php
@@ -78,7 +78,7 @@ abstract class PageArchiveTestBase extends MediaWikiTestCase {
return true;
}
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->tablesUsed += $this->getMcrTablesToReset();
diff --git a/tests/phpunit/includes/page/WikiPageDbTestBase.php b/tests/phpunit/includes/page/WikiPageDbTestBase.php
index f0d895ee9e77..0ed4f89d6b90 100644
--- a/tests/phpunit/includes/page/WikiPageDbTestBase.php
+++ b/tests/phpunit/includes/page/WikiPageDbTestBase.php
@@ -54,7 +54,7 @@ abstract class WikiPageDbTestBase extends MediaWikiLangTestCase {
*/
abstract protected function getMcrTablesToReset();
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->tablesUsed += $this->getMcrTablesToReset();
@@ -67,7 +67,7 @@ abstract class WikiPageDbTestBase extends MediaWikiLangTestCase {
$this->pagesToDelete = [];
}
- protected function tearDown() {
+ protected function tearDown() : void {
foreach ( $this->pagesToDelete as $p ) {
/* @var WikiPage $p */
diff --git a/tests/phpunit/includes/page/WikiPageMcrDbTest.php b/tests/phpunit/includes/page/WikiPageMcrDbTest.php
index fa98b52bcf87..ab5f9b1bafbf 100644
--- a/tests/phpunit/includes/page/WikiPageMcrDbTest.php
+++ b/tests/phpunit/includes/page/WikiPageMcrDbTest.php
@@ -17,7 +17,7 @@ class WikiPageMcrDbTest extends WikiPageDbTestBase {
use McrSchemaOverride;
- public function setUp() {
+ public function setUp() : void {
parent::setUp();
}
diff --git a/tests/phpunit/includes/parser/MagicVariableTest.php b/tests/phpunit/includes/parser/MagicVariableTest.php
index c5ee3d0e408c..9a74d0e12f93 100644
--- a/tests/phpunit/includes/parser/MagicVariableTest.php
+++ b/tests/phpunit/includes/parser/MagicVariableTest.php
@@ -39,7 +39,7 @@ class MagicVariableTest extends MediaWikiTestCase {
];
/** setup a basic parser object */
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$contLang = MediaWikiServices::getInstance()->getLanguageFactory()->getLanguage( 'en' );
diff --git a/tests/phpunit/includes/parser/ParserOptionsTest.php b/tests/phpunit/includes/parser/ParserOptionsTest.php
index ec25697bec77..78199ddc1f93 100644
--- a/tests/phpunit/includes/parser/ParserOptionsTest.php
+++ b/tests/phpunit/includes/parser/ParserOptionsTest.php
@@ -26,7 +26,7 @@ class ParserOptionsTest extends MediaWikiTestCase {
];
}
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
self::clearCache();
@@ -39,7 +39,7 @@ class ParserOptionsTest extends MediaWikiTestCase {
$this->setTemporaryHook( 'PageRenderingHash', null );
}
- protected function tearDown() {
+ protected function tearDown() : void {
self::clearCache();
parent::tearDown();
}
diff --git a/tests/phpunit/includes/parser/ParserOutputTest.php b/tests/phpunit/includes/parser/ParserOutputTest.php
index b823e7003a15..e0aee15c1d61 100644
--- a/tests/phpunit/includes/parser/ParserOutputTest.php
+++ b/tests/phpunit/includes/parser/ParserOutputTest.php
@@ -33,7 +33,7 @@ class ParserOutputTest extends MediaWikiLangTestCase {
];
}
- public function tearDown() {
+ public function tearDown() : void {
MWTimestamp::setFakeTime( false );
parent::tearDown();
diff --git a/tests/phpunit/includes/parser/ParserPreloadTest.php b/tests/phpunit/includes/parser/ParserPreloadTest.php
index 560b921a8dd6..a09c9415c13d 100644
--- a/tests/phpunit/includes/parser/ParserPreloadTest.php
+++ b/tests/phpunit/includes/parser/ParserPreloadTest.php
@@ -44,7 +44,7 @@ class ParserPreloadTest extends MediaWikiTestCase {
*/
private $title;
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->testParserOptions = ParserOptions::newFromUserAndLang( new User,
MediaWikiServices::getInstance()->getContentLanguage() );
@@ -56,7 +56,7 @@ class ParserPreloadTest extends MediaWikiTestCase {
$this->title = Title::newFromText( 'Preload Test' );
}
- protected function tearDown() {
+ protected function tearDown() : void {
parent::tearDown();
unset( $this->testParser );
diff --git a/tests/phpunit/includes/parser/PreprocessorTest.php b/tests/phpunit/includes/parser/PreprocessorTest.php
index d44123ee2c11..0cbe82055000 100644
--- a/tests/phpunit/includes/parser/PreprocessorTest.php
+++ b/tests/phpunit/includes/parser/PreprocessorTest.php
@@ -43,7 +43,7 @@ class PreprocessorTest extends MediaWikiTestCase {
Preprocessor_Hash::class
];
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->mOptions = ParserOptions::newFromUserAndLang( new User,
MediaWikiServices::getInstance()->getContentLanguage() );
diff --git a/tests/phpunit/includes/parser/SanitizerTest.php b/tests/phpunit/includes/parser/SanitizerTest.php
index 4841b56a5ef9..005d9011b917 100644
--- a/tests/phpunit/includes/parser/SanitizerTest.php
+++ b/tests/phpunit/includes/parser/SanitizerTest.php
@@ -7,7 +7,7 @@ use Wikimedia\TestingAccessWrapper;
*/
class SanitizerTest extends MediaWikiTestCase {
- protected function tearDown() {
+ protected function tearDown() : void {
MWTidy::destroySingleton();
parent::tearDown();
}
diff --git a/tests/phpunit/includes/parser/StripStateTest.php b/tests/phpunit/includes/parser/StripStateTest.php
index 0f4f6e0faed3..a0c502b3bc18 100644
--- a/tests/phpunit/includes/parser/StripStateTest.php
+++ b/tests/phpunit/includes/parser/StripStateTest.php
@@ -4,7 +4,7 @@
* @covers StripState
*/
class StripStateTest extends MediaWikiTestCase {
- public function setUp() {
+ public function setUp() : void {
parent::setUp();
$this->setContentLang( 'qqx' );
}
diff --git a/tests/phpunit/includes/password/Argon2PasswordTest.php b/tests/phpunit/includes/password/Argon2PasswordTest.php
index 6de56173a655..a49c5c533ae3 100644
--- a/tests/phpunit/includes/password/Argon2PasswordTest.php
+++ b/tests/phpunit/includes/password/Argon2PasswordTest.php
@@ -10,7 +10,7 @@
*/
class Argon2PasswordTest extends PasswordTestCase {
- public function setUp() {
+ public function setUp() : void {
parent::setUp();
if ( !defined( 'PASSWORD_ARGON2I' ) ) {
$this->markTestSkipped( 'Argon2 support not found' );
diff --git a/tests/phpunit/includes/password/PasswordTestCase.php b/tests/phpunit/includes/password/PasswordTestCase.php
index 4557aceeec6e..7b440bf5074f 100644
--- a/tests/phpunit/includes/password/PasswordTestCase.php
+++ b/tests/phpunit/includes/password/PasswordTestCase.php
@@ -29,7 +29,7 @@ abstract class PasswordTestCase extends MediaWikiTestCase {
*/
protected $passwordFactory;
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->passwordFactory = new PasswordFactory();
diff --git a/tests/phpunit/includes/preferences/DefaultPreferencesFactoryTest.php b/tests/phpunit/includes/preferences/DefaultPreferencesFactoryTest.php
index 1e063dd9eff9..c87f65cba2b9 100644
--- a/tests/phpunit/includes/preferences/DefaultPreferencesFactoryTest.php
+++ b/tests/phpunit/includes/preferences/DefaultPreferencesFactoryTest.php
@@ -37,7 +37,7 @@ class DefaultPreferencesFactoryTest extends \MediaWikiTestCase {
/** @var Config */
protected $config;
- public function setUp() {
+ public function setUp() : void {
parent::setUp();
$this->context = new RequestContext();
$this->context->setTitle( Title::newFromText( self::class ) );
diff --git a/tests/phpunit/includes/rcfeed/RCFeedIntegrationTest.php b/tests/phpunit/includes/rcfeed/RCFeedIntegrationTest.php
index 59fe4012b617..401f687ee56d 100644
--- a/tests/phpunit/includes/rcfeed/RCFeedIntegrationTest.php
+++ b/tests/phpunit/includes/rcfeed/RCFeedIntegrationTest.php
@@ -10,7 +10,7 @@
* @covers RCFeed
*/
class RCFeedIntegrationTest extends MediaWikiTestCase {
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->setMwGlobals( [
'wgCanonicalServer' => 'https://example.org',
diff --git a/tests/phpunit/includes/registration/ExtensionRegistryTest.php b/tests/phpunit/includes/registration/ExtensionRegistryTest.php
index fbd1bcb7d238..2f3462c07809 100644
--- a/tests/phpunit/includes/registration/ExtensionRegistryTest.php
+++ b/tests/phpunit/includes/registration/ExtensionRegistryTest.php
@@ -9,7 +9,7 @@ class ExtensionRegistryTest extends MediaWikiTestCase {
private $dataDir;
- public function setUp() {
+ public function setUp() : void {
parent::setUp();
$this->dataDir = __DIR__ . '/../../data/registration';
}
diff --git a/tests/phpunit/includes/resourceloader/MessageBlobStoreTest.php b/tests/phpunit/includes/resourceloader/MessageBlobStoreTest.php
index d5760ed4b261..98cac4dd3445 100644
--- a/tests/phpunit/includes/resourceloader/MessageBlobStoreTest.php
+++ b/tests/phpunit/includes/resourceloader/MessageBlobStoreTest.php
@@ -12,7 +12,7 @@ class MessageBlobStoreTest extends PHPUnit\Framework\TestCase {
const NAME = 'test.blobstore';
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
// MediaWiki's test wrapper sets $wgMainWANCache to CACHE_NONE.
// Use HashBagOStuff here so that we can observe caching.
diff --git a/tests/phpunit/includes/resourceloader/ResourceLoaderFileModuleTest.php b/tests/phpunit/includes/resourceloader/ResourceLoaderFileModuleTest.php
index 5e2cf8229cef..2b3ed10cca2d 100644
--- a/tests/phpunit/includes/resourceloader/ResourceLoaderFileModuleTest.php
+++ b/tests/phpunit/includes/resourceloader/ResourceLoaderFileModuleTest.php
@@ -5,7 +5,7 @@
*/
class ResourceLoaderFileModuleTest extends ResourceLoaderTestCase {
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$skinFactory = new SkinFactory();
diff --git a/tests/phpunit/includes/resourceloader/ResourceLoaderTest.php b/tests/phpunit/includes/resourceloader/ResourceLoaderTest.php
index 2cc72571cab0..47e3858240d1 100644
--- a/tests/phpunit/includes/resourceloader/ResourceLoaderTest.php
+++ b/tests/phpunit/includes/resourceloader/ResourceLoaderTest.php
@@ -5,7 +5,7 @@ use MediaWiki\MediaWikiServices;
class ResourceLoaderTest extends ResourceLoaderTestCase {
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->setMwGlobals( [
diff --git a/tests/phpunit/includes/resourceloader/ResourceLoaderWikiModuleTest.php b/tests/phpunit/includes/resourceloader/ResourceLoaderWikiModuleTest.php
index 089431e95275..f790710f6072 100644
--- a/tests/phpunit/includes/resourceloader/ResourceLoaderWikiModuleTest.php
+++ b/tests/phpunit/includes/resourceloader/ResourceLoaderWikiModuleTest.php
@@ -445,7 +445,7 @@ class ResourceLoaderWikiModuleTest extends ResourceLoaderTestCase {
);
}
- public function tearDown() {
+ public function tearDown() : void {
Title::clearCaches();
parent::tearDown();
}
diff --git a/tests/phpunit/includes/search/SearchEnginePrefixTest.php b/tests/phpunit/includes/search/SearchEnginePrefixTest.php
index ed750766d413..e76b1dd37e04 100644
--- a/tests/phpunit/includes/search/SearchEnginePrefixTest.php
+++ b/tests/phpunit/includes/search/SearchEnginePrefixTest.php
@@ -50,7 +50,7 @@ class SearchEnginePrefixTest extends MediaWikiLangTestCase {
$this->insertPage( 'External' );
}
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
if ( !$this->isWikitextNS( NS_MAIN ) ) {
@@ -70,7 +70,7 @@ class SearchEnginePrefixTest extends MediaWikiLangTestCase {
TestingAccessWrapper::newFromClass( Hooks::class )->handlers = [];
}
- public function tearDown() {
+ public function tearDown() : void {
parent::tearDown();
TestingAccessWrapper::newFromClass( Hooks::class )->handlers = $this->originalHandlers;
diff --git a/tests/phpunit/includes/search/SearchEngineTest.php b/tests/phpunit/includes/search/SearchEngineTest.php
index d66e480c054d..6a84584daee6 100644
--- a/tests/phpunit/includes/search/SearchEngineTest.php
+++ b/tests/phpunit/includes/search/SearchEngineTest.php
@@ -20,7 +20,7 @@ class SearchEngineTest extends MediaWikiLangTestCase {
* Checks for database type & version.
* Will skip current test if DB does not support search.
*/
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
// Search tests require MySQL or SQLite with FTS
@@ -45,7 +45,7 @@ class SearchEngineTest extends MediaWikiLangTestCase {
$this->search = new $searchType( $lb );
}
- protected function tearDown() {
+ protected function tearDown() : void {
unset( $this->search );
parent::tearDown();
diff --git a/tests/phpunit/includes/search/SearchNearMatcherTest.php b/tests/phpunit/includes/search/SearchNearMatcherTest.php
index e3a7ec9a04ec..14f2a1f1b5c7 100644
--- a/tests/phpunit/includes/search/SearchNearMatcherTest.php
+++ b/tests/phpunit/includes/search/SearchNearMatcherTest.php
@@ -30,7 +30,7 @@ class SearchNearMatcherTest extends \PHPUnit\Framework\TestCase {
$this->assertEquals( $expected, $title === null ? null : (string)$title );
}
- public function tearDown() {
+ public function tearDown() : void {
Title::clearCaches();
parent::tearDown();
}
diff --git a/tests/phpunit/includes/session/BotPasswordSessionProviderTest.php b/tests/phpunit/includes/session/BotPasswordSessionProviderTest.php
index 22980562650b..17863f816ebd 100644
--- a/tests/phpunit/includes/session/BotPasswordSessionProviderTest.php
+++ b/tests/phpunit/includes/session/BotPasswordSessionProviderTest.php
@@ -50,7 +50,7 @@ class BotPasswordSessionProviderTest extends MediaWikiTestCase {
return $manager->getProvider( BotPasswordSessionProvider::class );
}
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->setMwGlobals( [
diff --git a/tests/phpunit/includes/specialpage/AbstractChangesListSpecialPageTestCase.php b/tests/phpunit/includes/specialpage/AbstractChangesListSpecialPageTestCase.php
index 92d986d70ac2..d4a2baf548c1 100644
--- a/tests/phpunit/includes/specialpage/AbstractChangesListSpecialPageTestCase.php
+++ b/tests/phpunit/includes/specialpage/AbstractChangesListSpecialPageTestCase.php
@@ -15,7 +15,7 @@ abstract class AbstractChangesListSpecialPageTestCase extends MediaWikiTestCase
protected $oldPatrollersGroup;
- protected function setUp() {
+ protected function setUp() : void {
global $wgGroupPermissions;
parent::setUp();
@@ -43,7 +43,7 @@ abstract class AbstractChangesListSpecialPageTestCase extends MediaWikiTestCase
abstract protected function getPage();
- protected function tearDown() {
+ protected function tearDown() : void {
global $wgGroupPermissions;
parent::tearDown();
diff --git a/tests/phpunit/includes/specialpage/SpecialPageTest.php b/tests/phpunit/includes/specialpage/SpecialPageTest.php
index fe922a047011..f9145a796910 100644
--- a/tests/phpunit/includes/specialpage/SpecialPageTest.php
+++ b/tests/phpunit/includes/specialpage/SpecialPageTest.php
@@ -12,7 +12,7 @@ use PHPUnit\Framework\Error\Notice;
*/
class SpecialPageTest extends MediaWikiTestCase {
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->setContentLang( 'en' );
diff --git a/tests/phpunit/includes/specials/ContribsPagerTest.php b/tests/phpunit/includes/specials/ContribsPagerTest.php
index 1993250cfd62..78d3fdc37b41 100644
--- a/tests/phpunit/includes/specials/ContribsPagerTest.php
+++ b/tests/phpunit/includes/specials/ContribsPagerTest.php
@@ -13,7 +13,7 @@ class ContribsPagerTest extends MediaWikiTestCase {
/** @var LinkRenderer */
private $linkRenderer;
- public function setUp() {
+ public function setUp() : void {
$this->linkRenderer = MediaWikiServices::getInstance()->getLinkRenderer();
$context = new RequestContext();
$this->pager = new ContribsPager( $context, [
diff --git a/tests/phpunit/includes/specials/SpecialBlankPageTest.php b/tests/phpunit/includes/specials/SpecialBlankPageTest.php
index 5435afa36e14..2772d20d6935 100644
--- a/tests/phpunit/includes/specials/SpecialBlankPageTest.php
+++ b/tests/phpunit/includes/specials/SpecialBlankPageTest.php
@@ -8,7 +8,7 @@
*/
class SpecialBlankPageTest extends SpecialPageTestBase {
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->setUserLang( 'qqx' );
}
diff --git a/tests/phpunit/includes/specials/SpecialBlockTest.php b/tests/phpunit/includes/specials/SpecialBlockTest.php
index fe333fee53e1..c93e15c7a7fa 100644
--- a/tests/phpunit/includes/specials/SpecialBlockTest.php
+++ b/tests/phpunit/includes/specials/SpecialBlockTest.php
@@ -20,7 +20,7 @@ class SpecialBlockTest extends SpecialPageTestBase {
return new SpecialBlock();
}
- public function tearDown() {
+ public function tearDown() : void {
parent::tearDown();
$this->resetTables();
}
diff --git a/tests/phpunit/includes/specials/SpecialMIMESearchTest.php b/tests/phpunit/includes/specials/SpecialMIMESearchTest.php
index 499288e9f3ca..13dadfee64bd 100644
--- a/tests/phpunit/includes/specials/SpecialMIMESearchTest.php
+++ b/tests/phpunit/includes/specials/SpecialMIMESearchTest.php
@@ -9,7 +9,7 @@ class SpecialMIMESearchTest extends MediaWikiTestCase {
/** @var SpecialMIMESearch */
private $page;
- public function setUp() {
+ public function setUp() : void {
$this->page = new SpecialMIMESearch;
$context = new RequestContext();
$context->setTitle( Title::makeTitle( NS_SPECIAL, 'MIMESearch' ) );
diff --git a/tests/phpunit/includes/specials/SpecialMuteTest.php b/tests/phpunit/includes/specials/SpecialMuteTest.php
index d2b83e1798de..123c7d23f596 100644
--- a/tests/phpunit/includes/specials/SpecialMuteTest.php
+++ b/tests/phpunit/includes/specials/SpecialMuteTest.php
@@ -6,7 +6,7 @@
*/
class SpecialMuteTest extends SpecialPageTestBase {
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->setMwGlobals( [
diff --git a/tests/phpunit/includes/specials/SpecialPageDataTest.php b/tests/phpunit/includes/specials/SpecialPageDataTest.php
index b11973c9cdbc..8468b5b0457e 100644
--- a/tests/phpunit/includes/specials/SpecialPageDataTest.php
+++ b/tests/phpunit/includes/specials/SpecialPageDataTest.php
@@ -9,7 +9,7 @@
*/
class SpecialPageDataTest extends SpecialPageTestBase {
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->setContentLang( 'qqx' );
diff --git a/tests/phpunit/includes/specials/SpecialPageTestBase.php b/tests/phpunit/includes/specials/SpecialPageTestBase.php
index fc9e2f0d79ed..c104e58e1a71 100644
--- a/tests/phpunit/includes/specials/SpecialPageTestBase.php
+++ b/tests/phpunit/includes/specials/SpecialPageTestBase.php
@@ -15,13 +15,13 @@ abstract class SpecialPageTestBase extends MediaWikiTestCase {
private $obLevel;
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->obLevel = ob_get_level();
}
- protected function tearDown() {
+ protected function tearDown() : void {
$obLevel = ob_get_level();
while ( ob_get_level() > $this->obLevel ) {
diff --git a/tests/phpunit/includes/specials/SpecialWatchlistTest.php b/tests/phpunit/includes/specials/SpecialWatchlistTest.php
index c9c06db094aa..a7b00bb2b1f6 100644
--- a/tests/phpunit/includes/specials/SpecialWatchlistTest.php
+++ b/tests/phpunit/includes/specials/SpecialWatchlistTest.php
@@ -10,7 +10,7 @@ use Wikimedia\TestingAccessWrapper;
* @covers SpecialWatchlist
*/
class SpecialWatchlistTest extends SpecialPageTestBase {
- public function setUp() {
+ public function setUp() : void {
parent::setUp();
$this->tablesUsed = [ 'watchlist' ];
$this->setTemporaryHook(
diff --git a/tests/phpunit/includes/specials/pagers/BlockListPagerTest.php b/tests/phpunit/includes/specials/pagers/BlockListPagerTest.php
index a0291509cb73..92fe72146778 100644
--- a/tests/phpunit/includes/specials/pagers/BlockListPagerTest.php
+++ b/tests/phpunit/includes/specials/pagers/BlockListPagerTest.php
@@ -17,7 +17,7 @@ class BlockListPagerTest extends MediaWikiTestCase {
*/
private $linkRenderer;
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->linkRenderer = MediaWikiServices::getInstance()->getLinkRenderer();
diff --git a/tests/phpunit/includes/title/MediaWikiTitleCodecTest.php b/tests/phpunit/includes/title/MediaWikiTitleCodecTest.php
index fc83a70d76d9..79bc32942f0e 100644
--- a/tests/phpunit/includes/title/MediaWikiTitleCodecTest.php
+++ b/tests/phpunit/includes/title/MediaWikiTitleCodecTest.php
@@ -31,7 +31,7 @@ use MediaWiki\MediaWikiServices;
*/
class MediaWikiTitleCodecTest extends MediaWikiTestCase {
- public function setUp() {
+ public function setUp() : void {
parent::setUp();
$this->setMwGlobals( [
diff --git a/tests/phpunit/includes/title/NaiveImportTitleFactoryTest.php b/tests/phpunit/includes/title/NaiveImportTitleFactoryTest.php
index 71e52e8fedb6..7a82a429a87d 100644
--- a/tests/phpunit/includes/title/NaiveImportTitleFactoryTest.php
+++ b/tests/phpunit/includes/title/NaiveImportTitleFactoryTest.php
@@ -26,7 +26,7 @@
*/
class NaiveImportTitleFactoryTest extends MediaWikiTestCase {
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->setContentLang( 'en' );
diff --git a/tests/phpunit/includes/title/NamespaceImportTitleFactoryTest.php b/tests/phpunit/includes/title/NamespaceImportTitleFactoryTest.php
index ae8727668e5b..3ebb4bcef0a5 100644
--- a/tests/phpunit/includes/title/NamespaceImportTitleFactoryTest.php
+++ b/tests/phpunit/includes/title/NamespaceImportTitleFactoryTest.php
@@ -26,7 +26,7 @@
*/
class NamespaceImportTitleFactoryTest extends MediaWikiTestCase {
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->setContentLang( 'en' );
diff --git a/tests/phpunit/includes/title/NamespaceInfoTest.php b/tests/phpunit/includes/title/NamespaceInfoTest.php
index d8df252bd401..cfbbc68d17af 100644
--- a/tests/phpunit/includes/title/NamespaceInfoTest.php
+++ b/tests/phpunit/includes/title/NamespaceInfoTest.php
@@ -17,7 +17,7 @@ class NamespaceInfoTest extends MediaWikiTestCase {
*/
private $scopedCallback;
- public function setUp() {
+ public function setUp() : void {
parent::setUp();
// Boo, there's still some global state in the class :(
@@ -30,7 +30,7 @@ class NamespaceInfoTest extends MediaWikiTestCase {
ExtensionRegistry::getInstance()->setAttributeForTest( 'ExtensionNamespaces', [] );
}
- public function tearDown() {
+ public function tearDown() : void {
$this->scopedCallback = null;
parent::tearDown();
diff --git a/tests/phpunit/includes/title/SubpageImportTitleFactoryTest.php b/tests/phpunit/includes/title/SubpageImportTitleFactoryTest.php
index ff16f7901491..fcb7e1482ea6 100644
--- a/tests/phpunit/includes/title/SubpageImportTitleFactoryTest.php
+++ b/tests/phpunit/includes/title/SubpageImportTitleFactoryTest.php
@@ -26,7 +26,7 @@
*/
class SubpageImportTitleFactoryTest extends MediaWikiTestCase {
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->setContentLang( 'en' );
diff --git a/tests/phpunit/includes/upload/UploadBaseTest.php b/tests/phpunit/includes/upload/UploadBaseTest.php
index cafc846e9afa..bcc6452c4aeb 100644
--- a/tests/phpunit/includes/upload/UploadBaseTest.php
+++ b/tests/phpunit/includes/upload/UploadBaseTest.php
@@ -8,7 +8,7 @@ class UploadBaseTest extends MediaWikiTestCase {
/** @var UploadTestHandler */
protected $upload;
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->upload = new UploadTestHandler;
diff --git a/tests/phpunit/includes/upload/UploadFromUrlTest.php b/tests/phpunit/includes/upload/UploadFromUrlTest.php
index a69a137b72b4..36ef8210944a 100644
--- a/tests/phpunit/includes/upload/UploadFromUrlTest.php
+++ b/tests/phpunit/includes/upload/UploadFromUrlTest.php
@@ -8,7 +8,7 @@
* @covers UploadFromUrl
*/
class UploadFromUrlTest extends ApiTestCase {
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->setMwGlobals( [
diff --git a/tests/phpunit/includes/upload/UploadStashTest.php b/tests/phpunit/includes/upload/UploadStashTest.php
index 26088a3657cb..0291c650695e 100644
--- a/tests/phpunit/includes/upload/UploadStashTest.php
+++ b/tests/phpunit/includes/upload/UploadStashTest.php
@@ -16,7 +16,7 @@ class UploadStashTest extends MediaWikiTestCase {
*/
private $tmpFile;
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->tmpFile = $this->getNewTempFile();
diff --git a/tests/phpunit/includes/user/BotPasswordTest.php b/tests/phpunit/includes/user/BotPasswordTest.php
index 4ef8ea90a1c6..b2631b50bbbc 100644
--- a/tests/phpunit/includes/user/BotPasswordTest.php
+++ b/tests/phpunit/includes/user/BotPasswordTest.php
@@ -17,7 +17,7 @@ class BotPasswordTest extends MediaWikiTestCase {
/** @var string */
private $testUserName;
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->setMwGlobals( [
diff --git a/tests/phpunit/includes/user/LocalIdLookupTest.php b/tests/phpunit/includes/user/LocalIdLookupTest.php
index 0e4674455c48..9cfcedacf3c7 100644
--- a/tests/phpunit/includes/user/LocalIdLookupTest.php
+++ b/tests/phpunit/includes/user/LocalIdLookupTest.php
@@ -10,7 +10,7 @@ use MediaWiki\MediaWikiServices;
class LocalIdLookupTest extends MediaWikiTestCase {
private $localUsers = [];
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->setGroupPermissions( 'local-id-lookup-test', 'hideuser', true );
diff --git a/tests/phpunit/includes/user/UserGroupMembershipTest.php b/tests/phpunit/includes/user/UserGroupMembershipTest.php
index 6f575789f51c..dfc3e1313689 100644
--- a/tests/phpunit/includes/user/UserGroupMembershipTest.php
+++ b/tests/phpunit/includes/user/UserGroupMembershipTest.php
@@ -24,7 +24,7 @@ class UserGroupMembershipTest extends MediaWikiTestCase {
*/
protected $expiryTime;
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->setMwGlobals( [
diff --git a/tests/phpunit/includes/user/UserTest.php b/tests/phpunit/includes/user/UserTest.php
index 424e2792dae2..4d551630abdf 100644
--- a/tests/phpunit/includes/user/UserTest.php
+++ b/tests/phpunit/includes/user/UserTest.php
@@ -25,7 +25,7 @@ class UserTest extends MediaWikiTestCase {
*/
protected $user;
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->setMwGlobals( [
diff --git a/tests/phpunit/includes/utils/MWCryptHKDFTest.php b/tests/phpunit/includes/utils/MWCryptHKDFTest.php
index 05a33c5af6f2..ff9737014edb 100644
--- a/tests/phpunit/includes/utils/MWCryptHKDFTest.php
+++ b/tests/phpunit/includes/utils/MWCryptHKDFTest.php
@@ -6,7 +6,7 @@
*/
class MWCryptHKDFTest extends MediaWikiTestCase {
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->setMwGlobals( 'wgSecretKey', '5bf1945342e67799cb50704a7fa19ac6' );
diff --git a/tests/phpunit/includes/utils/MWGrantsTest.php b/tests/phpunit/includes/utils/MWGrantsTest.php
index eae9c15d824c..53977b459261 100644
--- a/tests/phpunit/includes/utils/MWGrantsTest.php
+++ b/tests/phpunit/includes/utils/MWGrantsTest.php
@@ -1,7 +1,7 @@
<?php
class MWGrantsTest extends MediaWikiTestCase {
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->setMwGlobals( [
diff --git a/tests/phpunit/includes/utils/UIDGeneratorTest.php b/tests/phpunit/includes/utils/UIDGeneratorTest.php
index e600021e9750..82341d9b370a 100644
--- a/tests/phpunit/includes/utils/UIDGeneratorTest.php
+++ b/tests/phpunit/includes/utils/UIDGeneratorTest.php
@@ -4,7 +4,7 @@ class UIDGeneratorTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
- protected function tearDown() {
+ protected function tearDown() : void {
// T46850
UIDGenerator::unitTestTearDown();
parent::tearDown();
diff --git a/tests/phpunit/includes/utils/ZipDirectoryReaderTest.php b/tests/phpunit/includes/utils/ZipDirectoryReaderTest.php
index 631e7d455466..5f235afd6742 100644
--- a/tests/phpunit/includes/utils/ZipDirectoryReaderTest.php
+++ b/tests/phpunit/includes/utils/ZipDirectoryReaderTest.php
@@ -8,7 +8,7 @@ class ZipDirectoryReaderTest extends MediaWikiIntegrationTestCase {
protected $zipDir;
protected $entries;
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$this->zipDir = __DIR__ . '/../../data/zip';
}
diff --git a/tests/phpunit/includes/watcheditem/WatchedItemStoreIntegrationTest.php b/tests/phpunit/includes/watcheditem/WatchedItemStoreIntegrationTest.php
index 20dbedb50bff..058fd5dbf7bd 100644
--- a/tests/phpunit/includes/watcheditem/WatchedItemStoreIntegrationTest.php
+++ b/tests/phpunit/includes/watcheditem/WatchedItemStoreIntegrationTest.php
@@ -12,7 +12,7 @@ use Wikimedia\TestingAccessWrapper;
*/
class WatchedItemStoreIntegrationTest extends MediaWikiTestCase {
- public function setUp() {
+ public function setUp() : void {
parent::setUp();
self::$users['WatchedItemStoreIntegrationTestUser']
= new TestUser( 'WatchedItemStoreIntegrationTestUser' );