From a9f3d0ec7eb7680b4b52c466c3e0868663bb77ab Mon Sep 17 00:00:00 2001
From: catch <catch@35733.no-reply.drupal.org>
Date: Wed, 19 Jun 2024 13:45:54 +0100
Subject: [PATCH] Issue #3421418 by mstrelan, Spokje, xjm, mondrake, longwave,
 acbramley: Add void return typehints to all test methods

---
 .../AccessAnnouncementTest.php                |   4 +-
 .../AlertsJsonFeedTest.php                    |   4 +-
 .../tests/src/Kernel/AnnounceRendererTest.php |   4 +-
 .../src/Unit/AnnounceFetcherUnitTest.php      |   2 +-
 .../src/Functional/IpAddressBlockingTest.php  |   2 +-
 .../Migrate/d7/MigrateBlockedIpsTest.php      |   2 +-
 .../ban/tests/src/Unit/BanMiddlewareTest.php  |   4 +-
 .../tests/src/Functional/BasicAuthTest.php    |  14 +-
 .../tests/src/Functional/BigPipeTest.php      |   8 +-
 .../BigPipePreviewTest.php                    |   2 +-
 .../BigPipeRegressionTest.php                 |   8 +-
 ...peInterfacePreviewThemeSuggestionsTest.php |   2 +-
 ...igPipeResponseAttachmentsProcessorTest.php |   4 +-
 .../src/Unit/Render/FiberPlaceholderTest.php  |   2 +-
 .../src/Unit/Render/ManyPlaceholderTest.php   |   2 +-
 .../Placeholder/BigPipeStrategyTest.php       |   2 +-
 .../StackMiddleware/ContentLengthTest.php     |   2 +-
 .../src/Functional/BlockAdminThemeTest.php    |   4 +-
 .../tests/src/Functional/BlockCacheTest.php   |  10 +-
 .../tests/src/Functional/BlockDemoTest.php    |   2 +-
 .../src/Functional/BlockFormInBlockTest.php   |   4 +-
 .../src/Functional/BlockHiddenRegionTest.php  |   2 +-
 .../src/Functional/BlockHookOperationTest.php |   2 +-
 .../tests/src/Functional/BlockHtmlTest.php    |   2 +-
 .../tests/src/Functional/BlockInstallTest.php |   2 +-
 .../src/Functional/BlockInvalidRegionTest.php |   2 +-
 .../src/Functional/BlockLanguageCacheTest.php |   2 +-
 .../src/Functional/BlockLanguageTest.php      |   6 +-
 .../src/Functional/BlockRenderOrderTest.php   |   2 +-
 .../Functional/BlockSystemBrandingTest.php    |   2 +-
 .../block/tests/src/Functional/BlockTest.php  |  28 +--
 .../tests/src/Functional/BlockUiTest.php      |  20 +-
 .../tests/src/Functional/BlockXssTest.php     |   8 +-
 .../Functional/NonDefaultBlockAdminTest.php   |   2 +-
 .../src/Functional/Views/DisplayBlockTest.php |  12 +-
 .../src/FunctionalJavascript/BlockAddTest.php |   2 +-
 .../BlockContextualLinksTest.php              |   2 +-
 .../FunctionalJavascript/BlockDragTest.php    |   2 +-
 .../FunctionalJavascript/BlockFilterTest.php  |   2 +-
 .../src/Kernel/BlockConfigSchemaTest.php      |   2 +-
 .../tests/src/Kernel/BlockInterfaceTest.php   |   2 +-
 .../tests/src/Kernel/BlockRebuildTest.php     |   6 +-
 .../tests/src/Kernel/BlockStorageUnitTest.php |   4 +-
 .../Kernel/BlockTemplateSuggestionsTest.php   |   2 +-
 .../tests/src/Kernel/BlockViewBuilderTest.php |   8 +-
 .../d6/MigrateBlockContentTranslationTest.php |   2 +-
 .../Kernel/Migrate/d6/MigrateBlockTest.php    |   2 +-
 .../d7/MigrateBlockContentTranslationTest.php |   2 +-
 .../Kernel/Migrate/d7/MigrateBlockTest.php    |   2 +-
 .../src/Kernel/NewDefaultThemeBlocksTest.php  |   4 +-
 .../src/Unit/BlockConfigEntityUnitTest.php    |   2 +-
 .../block/tests/src/Unit/BlockFormTest.php    |   2 +-
 .../tests/src/Unit/BlockRepositoryTest.php    |   4 +-
 .../src/Unit/CategoryAutocompleteTest.php     |   2 +-
 .../src/Unit/Menu/BlockLocalTasksTest.php     |   4 +-
 .../DisplayVariant/BlockPageVariantTest.php   |   4 +-
 .../migrate/process/BlockRegionTest.php       |   4 +-
 .../migrate/process/BlockSettingsTest.php     |   2 +-
 .../migrate/process/BlockVisibilityTest.php   |  12 +-
 .../Functional/BlockContentCacheTagsTest.php  |   2 +-
 .../BlockContentContextualLinksTest.php       |   2 +-
 .../Functional/BlockContentCreationTest.php   |  14 +-
 .../src/Functional/BlockContentListTest.php   |   2 +-
 .../Functional/BlockContentListViewsTest.php  |   2 +-
 .../Functional/BlockContentPageViewTest.php   |   2 +-
 .../Functional/BlockContentRevisionsTest.php  |   2 +-
 .../src/Functional/BlockContentSaveTest.php   |   6 +-
 .../src/Functional/BlockContentTypeTest.php   |  10 +-
 .../tests/src/Functional/PageEditTest.php     |   2 +-
 .../src/Functional/UnpublishedBlockTest.php   |   2 +-
 .../Views/BlockContentFieldFilterTest.php     |   2 +-
 .../Views/BlockContentIntegrationTest.php     |   2 +-
 .../Views/BlockContentRedirectTest.php        |   2 +-
 .../Views/BlockContentWizardTest.php          |   2 +-
 .../Kernel/BlockContentAccessHandlerTest.php  |   2 +-
 .../src/Kernel/BlockContentDeletionTest.php   |   2 +-
 .../src/Kernel/BlockContentDeriverTest.php    |   2 +-
 ...ockContentEntityReferenceSelectionTest.php |   6 +-
 .../Kernel/BlockContentPermissionsTest.php    |   2 +-
 .../Kernel/BlockTemplateSuggestionsTest.php   |   2 +-
 .../MigrateBlockContentBodyFieldTest.php      |   2 +-
 .../MigrateBlockContentEntityDisplayTest.php  |   2 +-
 ...grateBlockContentEntityFormDisplayTest.php |   2 +-
 .../Migrate/MigrateBlockContentStubTest.php   |   4 +-
 .../Migrate/MigrateBlockContentTypeTest.php   |   2 +-
 .../Migrate/d6/MigrateBlockContentTest.php    |   2 +-
 ...grateCustomBlockContentTranslationTest.php |   2 +-
 ...grateCustomBlockContentTranslationTest.php |   2 +-
 .../Migrate/d7/MigrateCustomBlockTest.php     |   2 +-
 .../Views/RevisionRelationshipsTest.php       |   2 +-
 .../src/Kernel/Views/RevisionUserTest.php     |   2 +-
 .../src/Unit/Access/AccessGroupAndTest.php    |   2 +-
 .../src/Unit/Access/DependentAccessTest.php   |   6 +-
 .../Unit/Menu/BlockContentLocalTasksTest.php  |   2 +-
 .../src/Kernel/BreakpointDiscoveryTest.php    |   8 +-
 .../tests/src/Unit/BreakpointTest.php         |  12 +-
 .../src/Functional/AddedStylesheetsTest.php   |   2 +-
 .../src/Functional/ImageUploadAccessTest.php  |   2 +-
 .../tests/src/Functional/ImageUploadTest.php  |   6 +-
 .../Functional/MediaEntityMetadataApiTest.php |   2 +-
 .../src/FunctionalJavascript/AdminUiTest.php  |  10 +-
 .../CKEditor5AllowedTagsTest.php              |  12 +-
 .../CKEditor5DialogTest.php                   |   2 +-
 .../CKEditor5FragmentLinkTest.php             |   2 +-
 .../CKEditor5OffCanvasTest.php                |   2 +-
 .../CKEditor5ReadOnlyModeTest.php             |   2 +-
 .../FunctionalJavascript/CKEditor5Test.php    |  16 +-
 .../src/FunctionalJavascript/EmphasisTest.php |   4 +-
 .../src/FunctionalJavascript/ImageTest.php    |   2 +-
 .../FunctionalJavascript/ImageTestBase.php    |  10 +-
 .../FunctionalJavascript/MediaLibraryTest.php |   6 +-
 .../MediaLinkabilityTest.php                  |   4 +-
 .../FunctionalJavascript/MediaPreviewTest.php |   8 +-
 .../src/FunctionalJavascript/MediaTest.php    |  22 +--
 .../SourceEditingTest.php                     |   4 +-
 .../src/FunctionalJavascript/StyleTest.php    |   4 +-
 .../src/FunctionalJavascript/TableTest.php    |   4 +-
 .../src/Kernel/CKEditor5PluginManagerTest.php |   6 +-
 .../src/Kernel/CKEditor5StylesheetsTest.php   |   2 +-
 .../src/Kernel/ConfigurablePluginTest.php     |   2 +-
 .../tests/src/Kernel/ValidatorsTest.php       |   4 +-
 .../src/Functional/CommentAccessTest.php      |   4 +-
 .../tests/src/Functional/CommentAdminTest.php |  10 +-
 .../src/Functional/CommentAnonymousTest.php   |   2 +-
 .../tests/src/Functional/CommentBlockTest.php |   2 +-
 .../tests/src/Functional/CommentCSSTest.php   |   2 +-
 .../src/Functional/CommentCacheTagsTest.php   |   2 +-
 .../CommentDisplayConfigurableTest.php        |   2 +-
 .../Functional/CommentEntityReferenceTest.php |   4 +-
 .../src/Functional/CommentEntityTest.php      |   2 +-
 .../src/Functional/CommentFieldsTest.php      |   8 +-
 .../src/Functional/CommentInterfaceTest.php   |   8 +-
 .../src/Functional/CommentLanguageTest.php    |   2 +-
 .../src/Functional/CommentLinksAlterTest.php  |   2 +-
 .../tests/src/Functional/CommentLinksTest.php |   2 +-
 .../Functional/CommentNewIndicatorTest.php    |   2 +-
 .../src/Functional/CommentNodeAccessTest.php  |   2 +-
 .../src/Functional/CommentNodeChangesTest.php |   2 +-
 .../src/Functional/CommentNonNodeTest.php     |   6 +-
 .../tests/src/Functional/CommentPagerTest.php |  10 +-
 .../src/Functional/CommentPreviewTest.php     |   6 +-
 .../tests/src/Functional/CommentRssTest.php   |   2 +-
 .../src/Functional/CommentStatisticsTest.php  |   2 +-
 .../CommentStatusFieldAccessTest.php          |   2 +-
 .../src/Functional/CommentThreadingTest.php   |   2 +-
 .../tests/src/Functional/CommentTitleTest.php |   4 +-
 .../Functional/CommentTokenReplaceTest.php    |   2 +-
 .../Functional/CommentTranslationUITest.php   |   2 +-
 .../tests/src/Functional/CommentTypeTest.php  |   6 +-
 .../Rest/CommentResourceTestBase.php          |   4 +-
 .../Functional/Rest/CommentXmlAnonTest.php    |   4 +-
 .../Rest/CommentXmlBasicAuthTest.php          |   4 +-
 .../Functional/Rest/CommentXmlCookieTest.php  |   4 +-
 .../src/Functional/Views/CommentAdminTest.php |   4 +-
 .../Views/CommentApproveLinkTest.php          |   2 +-
 .../src/Functional/Views/CommentEditTest.php  |   2 +-
 .../Views/CommentFieldFilterTest.php          |   2 +-
 .../Views/CommentOperationsTest.php           |   2 +-
 .../src/Functional/Views/CommentRowTest.php   |   2 +-
 .../Views/DefaultViewRecentCommentsTest.php   |   2 +-
 .../src/Functional/Views/NodeCommentsTest.php |   4 +-
 .../tests/src/Functional/Views/RowRssTest.php |   2 +-
 .../tests/src/Functional/Views/WizardTest.php |   2 +-
 .../tests/src/Kernel/CommentBaseFieldTest.php |   2 +-
 .../tests/src/Kernel/CommentBundlesTest.php   |   2 +-
 .../CommentDefaultFormatterCacheTagsTest.php  |   2 +-
 .../src/Kernel/CommentFieldAccessTest.php     |   2 +-
 .../tests/src/Kernel/CommentHostnameTest.php  |   2 +-
 .../src/Kernel/CommentIntegrationTest.php     |   4 +-
 .../tests/src/Kernel/CommentItemTest.php      |   4 +-
 .../tests/src/Kernel/CommentOrphanTest.php    |   2 +-
 .../Kernel/CommentStringIdEntitiesTest.php    |   2 +-
 .../tests/src/Kernel/CommentUninstallTest.php |   4 +-
 .../src/Kernel/CommentValidationTest.php      |   4 +-
 .../Kernel/Migrate/MigrateCommentStubTest.php |   2 +-
 .../d6/MigrateCommentEntityDisplayTest.php    |   2 +-
 ...ateCommentEntityFormDisplaySubjectTest.php |   2 +-
 .../MigrateCommentEntityFormDisplayTest.php   |   2 +-
 .../d6/MigrateCommentFieldInstanceTest.php    |   2 +-
 .../Migrate/d6/MigrateCommentFieldTest.php    |   2 +-
 .../Kernel/Migrate/d6/MigrateCommentTest.php  |   2 +-
 .../Migrate/d6/MigrateCommentTypeTest.php     |   4 +-
 ...EntityTranslationCheckRequirementsTest.php |   2 +-
 .../d7/MigrateCommentEntityDisplayTest.php    |   2 +-
 ...ateCommentEntityFormDisplaySubjectTest.php |   2 +-
 .../MigrateCommentEntityFormDisplayTest.php   |   2 +-
 .../d7/MigrateCommentFieldInstanceTest.php    |   2 +-
 .../Migrate/d7/MigrateCommentFieldTest.php    |   2 +-
 .../Kernel/Migrate/d7/MigrateCommentTest.php  |   2 +-
 .../Migrate/d7/MigrateCommentTypeTest.php     |   4 +-
 .../source/CommentTypeRequirementsTest.php    |   2 +-
 .../src/Kernel/Views/CommentAdminViewTest.php |   2 +-
 .../src/Kernel/Views/CommentDepthTest.php     |   2 +-
 .../src/Kernel/Views/CommentFieldNameTest.php |   2 +-
 .../src/Kernel/Views/CommentLinksTest.php     |   4 +-
 .../src/Kernel/Views/CommentUserNameTest.php  |   2 +-
 .../Views/CommentViewsFieldAccessTest.php     |   2 +-
 .../Views/FilterAndArgumentUserUidTest.php    |   2 +-
 .../tests/src/Unit/CommentLinkBuilderTest.php |   2 +-
 .../tests/src/Unit/CommentManagerTest.php     |   2 +-
 .../src/Unit/CommentStatisticsUnitTest.php    |   2 +-
 .../tests/src/Unit/Entity/CommentLockTest.php |   2 +-
 .../views/field/CommentBulkFormTest.php       |   2 +-
 ...yMetadataConfigOverrideIntegrationTest.php |   2 +-
 .../Functional/ConfigDependencyWebTest.php    |   2 +-
 .../ConfigDraggableListBuilderTest.php        |   2 +-
 .../ConfigEntityFormOverrideTest.php          |   2 +-
 .../ConfigEntityListMultilingualTest.php      |   2 +-
 .../src/Functional/ConfigEntityListTest.php   |   6 +-
 .../Functional/ConfigEntityStatusUITest.php   |   2 +-
 .../tests/src/Functional/ConfigEntityTest.php |   4 +-
 .../Functional/ConfigExportImportUITest.php   |   4 +-
 .../src/Functional/ConfigExportUITest.php     |   2 +-
 .../src/Functional/ConfigFormOverrideTest.php |   2 +-
 .../src/Functional/ConfigImportAllTest.php    |   2 +-
 .../ConfigImportInstallProfileTest.php        |   2 +-
 .../src/Functional/ConfigImportUITest.php     |  20 +-
 .../src/Functional/ConfigImportUploadTest.php |   2 +-
 .../ConfigInstallProfileOverrideTest.php      |   2 +-
 ...figInstallProfileUnmetDependenciesTest.php |   2 +-
 .../src/Functional/ConfigInstallWebTest.php   |   8 +-
 .../ConfigLanguageOverrideWebTest.php         |   2 +-
 .../ConfigSingleImportExportTest.php          |   6 +-
 .../LanguageNegotiationFormOverrideTest.php   |   2 +-
 .../SchemaConfigListenerWebTest.php           |   2 +-
 .../TransformedConfigExportImportUITest.php   |   2 +-
 .../FunctionalJavascript/ConfigEntityTest.php |   2 +-
 .../FunctionalJavascript/ConfigExportTest.php |   2 +-
 .../ConfigUninstallViaCliImportTest.php       |   2 +-
 .../src/Unit/Menu/ConfigLocalTasksTest.php    |   2 +-
 .../Functional/ConfigTranslationCacheTest.php |   2 +-
 .../ConfigTranslationDateFormatUiTest.php     |   4 +-
 .../ConfigTranslationInstallTest.php          |   2 +-
 .../ConfigTranslationListUiTest.php           |   2 +-
 .../ConfigTranslationOverviewTest.php         |   8 +-
 .../ConfigTranslationUiModulesTest.php        |  14 +-
 ...ConfigTranslationUiSiteInformationTest.php |   4 +-
 .../Functional/ConfigTranslationUiTest.php    |  16 +-
 .../ConfigTranslationUiThemeTest.php          |   2 +-
 .../ConfigTranslationViewListUiTest.php       |   4 +-
 .../ConfigTranslationUiTest.php               |   4 +-
 .../tests/src/Kernel/ConfigMapperTest.php     |   2 +-
 .../src/Kernel/ConfigTranslationFormTest.php  |   2 +-
 ...igrateSystemMaintenanceTranslationTest.php |   2 +-
 .../d6/MigrateSystemSiteTranslationTest.php   |   2 +-
 .../d6/MigrateUserConfigsTranslationTest.php  |   2 +-
 ...serProfileFieldInstanceTranslationTest.php |   2 +-
 ...rateUserProfileTranslationRollbackTest.php |   2 +-
 ...igrateSystemMaintenanceTranslationTest.php |   2 +-
 .../d7/MigrateSystemSiteTranslationTest.php   |   2 +-
 .../d7/MigrateUserConfigsTranslationTest.php  |   2 +-
 .../tests/src/Unit/ConfigEntityMapperTest.php |  12 +-
 .../tests/src/Unit/ConfigFieldMapperTest.php  |   2 +-
 .../src/Unit/ConfigMapperManagerTest.php      |   2 +-
 .../tests/src/Unit/ConfigNamesMapperTest.php  |  60 +++---
 .../src/Functional/ContactLanguageTest.php    |   2 +-
 .../src/Functional/ContactPersonalTest.php    |   8 +-
 .../src/Functional/ContactSitewideTest.php    |   4 +-
 .../src/Functional/ContactStorageTest.php     |   2 +-
 .../Rest/MessageResourceTestBase.php          |   6 +-
 .../src/Functional/Views/ContactLinkTest.php  |   2 +-
 .../tests/src/Kernel/MessageEntityTest.php    |   2 +-
 .../Migrate/MigrateContactCategoryTest.php    |   2 +-
 .../Migrate/d6/MigrateContactSettingsTest.php |   2 +-
 .../Migrate/d7/MigrateContactSettingsTest.php |   2 +-
 .../src/Kernel/Views/ContactFieldsTest.php    |   2 +-
 .../tests/src/Unit/MailHandlerTest.php        |   4 +-
 .../ContentModerationWorkflowTypeTest.php     |   2 +-
 .../Functional/DefaultModerationStateTest.php |   4 +-
 ...uilderContentModerationIntegrationTest.php |   4 +-
 .../ModeratedContentLocalTaskTest.php         |   2 +-
 .../Functional/ModeratedContentViewTest.php   |   4 +-
 .../src/Functional/ModerationActionsTest.php  |   2 +-
 .../ModerationContentTranslationTest.php      |   2 +-
 .../src/Functional/ModerationFormTest.php     |  12 +-
 .../src/Functional/ModerationLocaleTest.php   |   8 +-
 .../ModerationRevisionRevertTest.php          |   2 +-
 .../Functional/ModerationStateAccessTest.php  |   2 +-
 .../Functional/ModerationStateBlockTest.php   |   2 +-
 .../Functional/ModerationStateNodeTest.php    |   8 +-
 .../ModerationStateNodeTypeTest.php           |   6 +-
 .../tests/src/Functional/NodeAccessTest.php   |   2 +-
 .../ViewsModerationStateFilterTest.php        |   6 +-
 ...kspaceContentModerationIntegrationTest.php |   2 +-
 .../Kernel/ContentModerationAccessTest.php    |   2 +-
 .../ContentModerationPermissionsTest.php      |   2 +-
 .../Kernel/ContentModerationResaveTest.php    |   2 +-
 ...oderationStateAccessControlHandlerTest.php |   2 +-
 .../ContentModerationStateResourceTest.php    |   2 +-
 ...ontentModerationStateStorageSchemaTest.php |   2 +-
 .../src/Kernel/ContentModerationStateTest.php |  30 +--
 .../Kernel/ContentModerationSyncingTest.php   |  10 +-
 .../ContentModerationWorkflowConfigTest.php   |   2 +-
 .../ContentModerationWorkflowTypeApiTest.php  |   8 +-
 .../src/Kernel/DefaultRevisionStateTest.php   |   2 +-
 .../tests/src/Kernel/EntityOperationsTest.php |   6 +-
 .../EntityStateChangeValidationTest.php       |  16 +-
 .../tests/src/Kernel/EntityTypeInfoTest.php   |   8 +-
 .../tests/src/Kernel/InitialStateTest.php     |   2 +-
 .../src/Kernel/ModerationInformationTest.php  |  12 +-
 .../ModerationStateFieldItemListTest.php      |  36 ++--
 .../src/Kernel/ModerationStateWidgetTest.php  |   4 +-
 .../tests/src/Kernel/NodeAccessTest.php       |   2 +-
 .../tests/src/Kernel/StateFormatterTest.php   |   2 +-
 .../src/Kernel/ViewsDataIntegrationTest.php   |   2 +-
 .../Kernel/ViewsModerationStateFilterTest.php |   8 +-
 .../Kernel/ViewsModerationStateSortTest.php   |   4 +-
 .../WorkspacesContentModerationStateTest.php  |  12 +-
 .../ContentModerationRouteSubscriberTest.php  |   2 +-
 .../tests/src/Unit/ContentPreprocessTest.php  |   2 +-
 .../src/Unit/LatestRevisionCheckTest.php      |   2 +-
 .../src/Unit/ModerationInformationTest.php    |   8 +-
 .../Unit/StateTransitionValidationTest.php    |   2 +-
 .../ContentTranslationContextualLinksTest.php |   2 +-
 .../ContentTranslationDisableSettingTest.php  |   2 +-
 .../ContentTranslationEnableTest.php          |   2 +-
 .../ContentTranslationEntityBundleUITest.php  |   2 +-
 .../ContentTranslationLanguageChangeTest.php  |   4 +-
 .../ContentTranslationLinkTagTest.php         |   4 +-
 .../ContentTranslationMetadataFieldsTest.php  |   4 +-
 ...ewTranslationWithExistingRevisionsTest.php |   4 +-
 .../ContentTranslationOperationsTest.php      |   4 +-
 ...slationOutdatedRevisionTranslationTest.php |   2 +-
 ...slationRevisionTranslationDeletionTest.php |   2 +-
 .../ContentTranslationSettingsTest.php        |   8 +-
 .../ContentTranslationStandardFieldsTest.php  |   4 +-
 .../ContentTranslationSyncImageTest.php       |   2 +-
 .../ContentTranslationUISkipTest.php          |   2 +-
 .../ContentTranslationUITestBase.php          |   2 +-
 ...entTranslationUntranslatableFieldsTest.php |   2 +-
 .../ContentTranslationWorkflowsTest.php       |   2 +-
 .../Views/ContentTranslationViewsUITest.php   |   2 +-
 .../Functional/Views/TranslationLinkTest.php  |   2 +-
 .../ContentTranslationConfigUITest.php        |   2 +-
 .../ContentTranslationContextualLinksTest.php |   2 +-
 .../ContentTranslationConfigImportTest.php    |   2 +-
 ...ContentTranslationEntityBundleInfoTest.php |   8 +-
 ...ontentTranslationFieldSyncRevisionTest.php |   4 +-
 .../Kernel/ContentTranslationHandlerTest.php  |   2 +-
 .../ContentTranslationModuleInstallTest.php   |   2 +-
 .../ContentTranslationPermissionsTest.php     |   2 +-
 .../ContentTranslationSettingsApiTest.php     |   2 +-
 .../Kernel/ContentTranslationSyncUnitTest.php |   6 +-
 .../d6/MigrateTaxonomyTermTranslationTest.php |   2 +-
 .../MigrateEntityTranslationSettingsTest.php  |   2 +-
 ...ontentTranslationManageAccessCheckTest.php |   2 +-
 .../Menu/ContentTranslationLocalTasksTest.php |   2 +-
 .../ContextualDynamicContextTest.php          |   4 +-
 .../ContextualLinksTest.php                   |   8 +-
 .../DuplicateContextualLinksTest.php          |   2 +-
 .../src/FunctionalJavascript/EditModeTest.php |   2 +-
 .../tests/src/Kernel/ContextualUnitTest.php   |   4 +-
 .../tests/src/Functional/DateFilterTest.php   |   2 +-
 .../src/Functional/DateTimeFieldTest.php      |  12 +-
 .../DateTimeTimeAgoFormatterTest.php          |   2 +-
 .../src/Functional/DateTimeWidgetTest.php     |   2 +-
 .../src/Functional/Views/FilterDateTest.php   |   4 +-
 .../src/Kernel/DateTimeFormInjectionTest.php  |   2 +-
 .../tests/src/Kernel/DateTimeItemTest.php     |  12 +-
 .../src/Kernel/Views/ArgumentDateTimeTest.php |  14 +-
 .../src/Kernel/Views/DateTimeSchemaTest.php   |   2 +-
 .../tests/src/Kernel/Views/FilterDateTest.php |   4 +-
 .../src/Kernel/Views/FilterDateTimeTest.php   |   2 +-
 .../src/Kernel/Views/SortDateTimeTest.php     |   2 +-
 .../Plugin/migrate/field/DateFieldTest.php    |   4 +-
 .../src/Functional/DateRangeFieldTest.php     |  14 +-
 .../tests/src/Kernel/DateRangeItemTest.php    |   2 +-
 .../src/Kernel/SeparatorTranslationTest.php   |   2 +-
 .../Views/EntityTypeWithoutViewsDataTest.php  |   2 +-
 .../tests/src/Kernel/Views/FilterDateTest.php |   2 +-
 .../dblog/tests/src/Functional/DbLogTest.php  |  24 +--
 .../tests/src/Functional/DbLogViewsTest.php   |   2 +-
 .../src/Kernel/ConnectionFailureTest.php      |   2 +-
 .../tests/src/Kernel/DbLogControllerTest.php  |   4 +-
 .../src/Kernel/DbLogFormInjectionTest.php     |   2 +-
 .../dblog/tests/src/Kernel/DbLogTest.php      |   4 +-
 .../Migrate/d6/MigrateDblogConfigsTest.php    |   2 +-
 .../Migrate/d7/MigrateDblogConfigsTest.php    |   2 +-
 .../src/Kernel/Views/ViewsIntegrationTest.php |   6 +-
 .../DynamicPageCacheIntegrationTest.php       |   2 +-
 .../tests/src/Functional/EditorAdminTest.php  |  10 +-
 .../src/Functional/EditorLoadingTest.php      |   4 +-
 .../EditorPrivateFileReferenceFilterTest.php  |   2 +-
 .../src/Functional/EditorSecurityTest.php     |   6 +-
 .../FunctionalJavascript/EditorAdminTest.php  |   4 +-
 .../Kernel/EditorFileReferenceFilterTest.php  |   2 +-
 .../tests/src/Kernel/EditorFileUsageTest.php  |   4 +-
 .../Kernel/EditorFilterIntegrationTest.php    |   2 +-
 .../tests/src/Kernel/EditorManagerTest.php    |   2 +-
 .../tests/src/Kernel/EntityUpdateTest.php     |   2 +-
 .../src/Unit/EditorConfigEntityUnitTest.php   |   2 +-
 .../src/Unit/EditorXssFilter/StandardTest.php |   4 +-
 .../Functional/Boolean/BooleanFieldTest.php   |   4 +-
 .../Boolean/BooleanFormatterSettingsTest.php  |   2 +-
 .../src/Functional/Email/EmailFieldTest.php   |   2 +-
 .../EntityReferenceAdminTest.php              |   6 +-
 .../EntityReferenceAutoCreateTest.php         |   6 +-
 .../EntityReferenceFieldDefaultValueTest.php  |   4 +-
 ...erenceFieldTranslatedReferenceViewTest.php |   2 +-
 .../EntityReferenceFileUploadTest.php         |   2 +-
 .../EntityReferenceIntegrationTest.php        |   2 +-
 .../EntityReferenceXSSTest.php                |   2 +-
 .../EntityReference/Views/SelectionTest.php   |   2 +-
 .../tests/src/Functional/FieldAccessTest.php  |   2 +-
 .../FieldDefaultValueCallbackTest.php         |   2 +-
 .../tests/src/Functional/FieldHelpTest.php    |   2 +-
 .../FieldImportDeleteUninstallUiTest.php      |   2 +-
 .../field/tests/src/Functional/FormTest.php   |  28 +--
 .../FunctionalString/StringFieldTest.php      |   2 +-
 .../tests/src/Functional/NestedFormTest.php   |   4 +-
 .../src/Functional/Number/NumberFieldTest.php |  10 +-
 .../Functional/ReEnableModuleFieldTest.php    |   2 +-
 .../src/Functional/TranslationWebTest.php     |   2 +-
 .../src/Functional/Views/FieldUITest.php      |   6 +-
 .../Boolean/BooleanFormatterSettingsTest.php  |   2 +-
 .../EntityReferenceAdminTest.php              |   2 +-
 .../MultipleValueWidgetTest.php               |   4 +-
 .../Number/NumberFieldTest.php                |   2 +-
 .../Kernel/Boolean/BooleanFormatterTest.php   |   2 +-
 .../src/Kernel/Boolean/BooleanItemTest.php    |   2 +-
 .../field/tests/src/Kernel/BulkDeleteTest.php |   8 +-
 .../src/Kernel/ConfigFieldDefinitionTest.php  |   4 +-
 .../field/tests/src/Kernel/DisplayApiTest.php |   6 +-
 .../src/Kernel/DisplayModeUpdateTest.php      |   2 +-
 .../tests/src/Kernel/Email/EmailItemTest.php  |   2 +-
 ...qlContentEntityStorageSchemaColumnTest.php |   4 +-
 .../EntityReferenceFormatterTest.php          |  14 +-
 .../EntityReferenceItemTest.php               |  18 +-
 .../EntityReferenceSettingsTest.php           |   4 +-
 .../Views/EntityReferenceRelationshipTest.php |  10 +-
 .../EntityReference/Views/SelectionTest.php   |   4 +-
 .../tests/src/Kernel/FieldAttachOtherTest.php |  10 +-
 .../src/Kernel/FieldAttachStorageTest.php     |  14 +-
 .../field/tests/src/Kernel/FieldCrudTest.php  |  14 +-
 .../tests/src/Kernel/FieldDataCountTest.php   |   4 +-
 .../Kernel/FieldDefinitionIntegrityTest.php   |   4 +-
 .../tests/src/Kernel/FieldDisplayTest.php     |   2 +-
 .../tests/src/Kernel/FieldFormatterTest.php   |   2 +-
 .../src/Kernel/FieldImportChangeTest.php      |   2 +-
 .../src/Kernel/FieldImportCreateTest.php      |   4 +-
 .../src/Kernel/FieldImportDeleteTest.php      |   2 +-
 .../Kernel/FieldImportDeleteUninstallTest.php |   4 +-
 .../tests/src/Kernel/FieldStorageCrudTest.php |  20 +-
 .../Kernel/FieldTypeCategoryDiscoveryTest.php |   2 +-
 .../src/Kernel/FieldTypePluginManagerTest.php |  10 +-
 .../tests/src/Kernel/FieldValidationTest.php  |   4 +-
 .../src/Kernel/FormatterPluginManagerTest.php |   2 +-
 .../KernelString/RawStringFormatterTest.php   |   2 +-
 .../KernelString/StringFormatterTest.php      |   4 +-
 .../Kernel/KernelString/UuidFormatterTest.php |   2 +-
 .../src/Kernel/KernelString/UuidItemTest.php  |   2 +-
 .../d6/MigrateFieldFormatterSettingsTest.php  |   2 +-
 ...grateFieldInstanceLabelDescriptionTest.php |   2 +-
 ...rateFieldInstanceOptionTranslationTest.php |   2 +-
 .../Migrate/d6/MigrateFieldInstanceTest.php   |   4 +-
 .../d6/MigrateFieldOptionTranslationTest.php  |   2 +-
 .../Kernel/Migrate/d6/MigrateFieldTest.php    |   2 +-
 .../d6/MigrateFieldWidgetSettingsTest.php     |   2 +-
 .../d7/MigrateFieldFormatterSettingsTest.php  |   2 +-
 ...grateFieldInstanceLabelDescriptionTest.php |   2 +-
 ...rateFieldInstanceOptionTranslationTest.php |   2 +-
 .../Migrate/d7/MigrateFieldInstanceTest.php   |   2 +-
 ...MigrateFieldInstanceWidgetSettingsTest.php |   2 +-
 .../d7/MigrateFieldOptionTranslationTest.php  |   2 +-
 .../Kernel/Migrate/d7/MigrateFieldTest.php    |   4 +-
 .../Migrate/d7/MigrateViewModesTest.php       |   2 +-
 .../Migrate/d7/RollbackFieldInstanceTest.php  |   2 +-
 .../Kernel/Migrate/d7/RollbackFieldTest.php   |   2 +-
 .../Migrate/d7/RollbackViewModesTest.php      |   2 +-
 .../src/Kernel/Number/NumberItemTest.php      |   4 +-
 .../field/tests/src/Kernel/ShapeItemTest.php  |   2 +-
 .../field/tests/src/Kernel/TestItemTest.php   |   2 +-
 .../Kernel/TestItemWithDependenciesTest.php   |   2 +-
 .../tests/src/Kernel/TestObjectItemTest.php   |   2 +-
 .../Timestamp/TimestampFormatterTest.php      |   4 +-
 .../Kernel/Timestamp/TimestampItemTest.php    |   2 +-
 .../tests/src/Kernel/TranslationTest.php      |   4 +-
 .../tests/src/Kernel/Uri/UriItemTest.php      |   2 +-
 .../Kernel/Views/HandlerFieldFieldTest.php    |   2 +-
 .../src/Kernel/WidgetPluginManagerTest.php    |   4 +-
 .../FieldConfigAccessControlHandlerTest.php   |   2 +-
 .../src/Unit/FieldConfigEntityUnitTest.php    |  10 +-
 ...dStorageConfigAccessControlHandlerTest.php |   2 +-
 .../Unit/FieldStorageConfigEntityUnitTest.php |   8 +-
 .../src/Unit/FieldUninstallValidatorTest.php  |   6 +-
 .../migrate/process/ProcessFieldTest.php      |   2 +-
 .../process/d6/FieldInstanceSettingsTest.php  |   2 +-
 .../migrate/process/d6/FieldSettingsTest.php  |   2 +-
 .../process/d6/FieldTypeDefaultsTest.php      |   4 +-
 .../process/d7/FieldInstanceSettingsTest.php  |   2 +-
 .../migrate/process/d7/FieldSettingsTest.php  |   2 +-
 .../process/d7/FieldTypeDefaultsTest.php      |   2 +-
 .../tests/src/Functional/FieldLayoutTest.php  |   4 +-
 .../FunctionalJavascript/FieldLayoutTest.php  |  10 +-
 .../Kernel/FieldLayoutEntityDisplayTest.php   |   2 +-
 .../src/Kernel/FieldLayoutUninstallTest.php   |   2 +-
 .../tests/src/Unit/FieldLayoutBuilderTest.php |   8 +-
 .../src/Functional/EntityDisplayModeTest.php  |   6 +-
 .../src/Functional/EntityDisplayTest.php      |   2 +-
 .../FieldTypeCategoriesIntegrationTest.php    |   2 +-
 .../src/Functional/FieldUIDeleteTest.php      |   2 +-
 .../src/Functional/FieldUIIndentationTest.php |   2 +-
 .../tests/src/Functional/FieldUIRouteTest.php |   4 +-
 .../src/Functional/ManageDisplayTest.php      |  12 +-
 .../Functional/ManageFieldsFunctionalTest.php |  24 +--
 .../Functional/ManageFieldsLifecycleTest.php  |   2 +-
 .../ManageFieldsMultipleTypesTest.php         |   4 +-
 .../tests/src/Functional/ManageFieldsTest.php |  16 +-
 .../DefaultValueWidgetTest.php                |   2 +-
 .../DisplayModeBundleSelectionTest.php        |   2 +-
 .../EntityDisplayTest.php                     |   6 +-
 .../ManageDisplayTest.php                     |   6 +-
 .../FunctionalJavascript/ManageFieldsTest.php |  14 +-
 .../tests/src/Kernel/EntityDisplayTest.php    |  26 +--
 .../src/Kernel/EntityFormDisplayTest.php      |  12 +-
 .../src/Unit/FieldConfigEditFormTest.php      |   2 +-
 .../tests/src/Unit/FieldUiTableTest.php       |   2 +-
 .../field_ui/tests/src/Unit/FieldUiTest.php   |   6 +-
 .../tests/src/Functional/DownloadTest.php     |   6 +-
 .../FileFieldAnonymousSubmissionTest.php      |   8 +-
 .../src/Functional/FileFieldDisplayTest.php   |   8 +-
 .../FileFieldFormatterAccessTest.php          |   2 +-
 .../src/Functional/FileFieldPathTest.php      |   2 +-
 .../Functional/FileFieldRSSContentTest.php    |   2 +-
 .../src/Functional/FileFieldRevisionTest.php  |   2 +-
 .../src/Functional/FileFieldValidateTest.php  |   8 +-
 .../src/Functional/FileFieldWidgetTest.php    |  20 +-
 .../tests/src/Functional/FileListingTest.php  |   4 +-
 .../Functional/FileManagedFileElementTest.php |  10 +-
 .../Functional/FileOnTranslatedEntityTest.php |   4 +-
 .../tests/src/Functional/FilePrivateTest.php  |   2 +-
 .../src/Functional/FileTokenReplaceTest.php   |   2 +-
 .../Formatter/FileAudioFormatterTest.php      |   2 +-
 .../Formatter/FileVideoFormatterTest.php      |   4 +-
 .../src/Functional/MultipleFileUploadTest.php |   2 +-
 .../PrivateFileOnTranslatedEntityTest.php     |   2 +-
 .../Functional/Rest/FileResourceTestBase.php  |   2 +-
 .../src/Functional/SaveUploadFormTest.php     |  24 +--
 .../tests/src/Functional/SaveUploadTest.php   |  28 +--
 .../AjaxFileManagedMultipleTest.php           |   2 +-
 .../FileFieldValidateTest.php                 |   2 +-
 .../FileFieldWidgetTest.php                   |   6 +-
 .../FileManagedFileElementTest.php            |   2 +-
 .../MaximumFileSizeExceededUploadTest.php     |   2 +-
 .../file/tests/src/Kernel/AccessTest.php      |   8 +-
 .../tests/src/Kernel/ComputedFileUrlTest.php  |   6 +-
 .../file/tests/src/Kernel/CopyTest.php        |  12 +-
 .../file/tests/src/Kernel/DeleteTest.php      |   6 +-
 .../file/tests/src/Kernel/FileItemTest.php    |   2 +-
 .../src/Kernel/FileItemValidationTest.php     |   2 +-
 .../src/Kernel/FileManagedAccessTest.php      |   2 +-
 .../tests/src/Kernel/FileRepositoryTest.php   |  16 +-
 .../file/tests/src/Kernel/FileUriItemTest.php |   2 +-
 .../file/tests/src/Kernel/FileUrlTest.php     |   2 +-
 .../Formatter/FileEntityFormatterTest.php     |  12 +-
 .../file/tests/src/Kernel/LoadTest.php        |  12 +-
 .../file/tests/src/Kernel/ManagedFileTest.php |   2 +-
 .../Kernel/Migrate/MigrateFileStubTest.php    |   2 +-
 .../Migrate/d6/MigrateFileConfigsTest.php     |   2 +-
 .../src/Kernel/Migrate/d6/MigrateFileTest.php |   2 +-
 .../d6/MigrateUploadEntityDisplayTest.php     |   4 +-
 .../d6/MigrateUploadEntityFormDisplayTest.php |   4 +-
 .../Migrate/d6/MigrateUploadFieldTest.php     |   2 +-
 .../Migrate/d6/MigrateUploadInstanceTest.php  |   2 +-
 .../Kernel/Migrate/d6/MigrateUploadTest.php   |   2 +-
 .../Migrate/d7/MigrateFileConfigsTest.php     |   2 +-
 .../src/Kernel/Migrate/d7/MigrateFileTest.php |   2 +-
 .../Migrate/d7/MigratePrivateFileTest.php     |   2 +-
 .../file/tests/src/Kernel/MoveTest.php        |  14 +-
 .../FileExtensionConstraintValidatorTest.php  |   2 +-
 ...ImageDimensionsConstraintValidatorTest.php |   2 +-
 .../FileIsImageConstraintValidatorTest.php    |   2 +-
 .../FileNameLengthConstraintValidatorTest.php |   2 +-
 .../FileSizeLimitConstraintValidatorTest.php  |   2 +-
 .../file/tests/src/Kernel/SaveTest.php        |   2 +-
 .../file/tests/src/Kernel/SpaceUsedTest.php   |   2 +-
 .../file/tests/src/Kernel/UsageTest.php       |  16 +-
 .../Kernel/Views/ExtensionViewsFieldTest.php  |   2 +-
 .../Kernel/Views/FileViewsFieldAccessTest.php |   2 +-
 .../Plugin/migrate/field/d6/FileFieldTest.php |   4 +-
 .../Plugin/migrate/field/d7/FileFieldTest.php |   4 +-
 .../migrate/process/d6/FieldFileTest.php      |   2 +-
 .../Plugin/migrate/process/d6/FileUriTest.php |  10 +-
 .../file/tests/src/Unit/SanitizeNameTest.php  |   2 +-
 .../tests/src/Functional/FilterAdminTest.php  |  10 +-
 .../Functional/FilterDefaultFormatTest.php    |   2 +-
 .../tests/src/Functional/FilterFormTest.php   |   2 +-
 .../src/Functional/FilterFormatAccessTest.php |   6 +-
 .../tests/src/Functional/FilterHooksTest.php  |   2 +-
 .../Functional/FilterHtmlImageSecureTest.php  |   2 +-
 .../src/Functional/FilterSecurityTest.php     |   4 +-
 .../filter/tests/src/Kernel/FilterAPITest.php |  16 +-
 .../src/Kernel/FilterCaptionTwigDebugTest.php |   2 +-
 .../tests/src/Kernel/FilterCrudTest.php       |   4 +-
 .../src/Kernel/FilterDefaultConfigTest.php    |   4 +-
 .../tests/src/Kernel/FilterKernelTest.php     |  20 +-
 .../tests/src/Kernel/FilterNoFormatTest.php   |   2 +-
 .../Migrate/d6/FilterFormatPermissionTest.php |   2 +-
 .../Migrate/d6/MigrateFilterFormatTest.php    |   2 +-
 .../Migrate/d7/MigrateFilterFormatTest.php    |   2 +-
 .../Migrate/d7/MigrateFilterSettingsTest.php  |   2 +-
 .../Plugin/migrate/process/FilterIdTest.php   |   2 +-
 .../migrate/process/FilterSettingsTest.php    |   2 +-
 .../src/Kernel/TextFormatElementFormTest.php  |   2 +-
 .../filter/tests/src/Unit/FilterHtmlTest.php  |   4 +-
 .../src/Unit/FilterUninstallValidatorTest.php |   6 +-
 .../src/Functional/ExperimentalHelpTest.php   |   2 +-
 .../tests/src/Functional/HelpBlockTest.php    |   2 +-
 .../src/Functional/HelpPageOrderTest.php      |   2 +-
 .../help/tests/src/Functional/HelpTest.php    |   2 +-
 .../src/Functional/HelpTopicSearchTest.php    |   6 +-
 .../tests/src/Functional/HelpTopicTest.php    |   4 +-
 .../Functional/HelpTopicTranslationTest.php   |   2 +-
 .../src/Functional/HelpTopicsSyntaxTest.php   |   2 +-
 .../help/tests/src/Functional/NoHelpTest.php  |   2 +-
 .../tests/src/Kernel/HelpEmptyPageTest.php    |   2 +-
 .../tests/src/Kernel/HelpSearchPluginTest.php |   2 +-
 .../tests/src/Unit/HelpTopicDiscoveryTest.php |  16 +-
 .../src/Unit/HelpTopicTwigLoaderTest.php      |   6 +-
 .../help/tests/src/Unit/HelpTopicTwigTest.php |   6 +-
 .../tests/src/Functional/HistoryTest.php      |   2 +-
 .../src/Kernel/Views/HistoryTimestampTest.php |   2 +-
 .../src/Functional/ImageAdminStylesTest.php   |  14 +-
 .../src/Functional/ImageDimensionsTest.php    |   2 +-
 .../Functional/ImageEffect/ConvertTest.php    |   2 +-
 .../ImageFieldDefaultImagesTest.php           |   4 +-
 .../src/Functional/ImageFieldDisplayTest.php  |   8 +-
 .../src/Functional/ImageFieldValidateTest.php |   8 +-
 .../src/Functional/ImageFieldWidgetTest.php   |   2 +-
 .../ImageOnTranslatedEntityTest.php           |   2 +-
 .../src/Functional/ImageStyleDeleteTest.php   |   2 +-
 .../ImageStyleDownloadAccessControlTest.php   |   4 +-
 .../src/Functional/ImageStyleFlushTest.php    |   2 +-
 .../Functional/ImageStylesPathAndUrlTest.php  |  18 +-
 .../Functional/Rest/ImageStyleXmlAnonTest.php |   2 +-
 .../Rest/ImageStyleXmlBasicAuthTest.php       |   2 +-
 .../Rest/ImageStyleXmlCookieTest.php          |   2 +-
 .../ImageAdminStylesTest.php                  |   2 +-
 .../ImageFieldValidateTest.php                |   4 +-
 .../tests/src/Kernel/ImageEffectsTest.php     |  20 +-
 .../tests/src/Kernel/ImageFormatterTest.php   |   6 +-
 .../tests/src/Kernel/ImageImportTest.php      |   2 +-
 .../image/tests/src/Kernel/ImageItemTest.php  |   6 +-
 .../ImageStyleCustomStreamWrappersTest.php    |   2 +-
 .../src/Kernel/ImageStyleIntegrationTest.php  |   4 +-
 .../src/Kernel/ImageThemeFunctionTest.php     |   6 +-
 .../Migrate/d6/MigrateImageCacheTest.php      |   8 +-
 .../Kernel/Migrate/d6/MigrateImageTest.php    |   2 +-
 .../Migrate/d7/MigrateImageSettingsTest.php   |   2 +-
 .../Migrate/d7/MigrateImageStylesTest.php     |   2 +-
 .../src/Kernel/Views/ImageViewsDataTest.php   |   2 +-
 .../Views/RelationshipUserImageDataTest.php   |   2 +-
 .../image/tests/src/Unit/ImageStyleTest.php   |   8 +-
 .../DenyPrivateImageStyleDownloadTest.php     |   2 +-
 .../FormErrorHandlerFileUploadTest.php        |   2 +-
 .../FormErrorHandlerCKEditor5Test.php         |   2 +-
 .../src/Kernel/FormElementInlineErrorTest.php |   2 +-
 .../tests/src/Unit/FormErrorHandlerTest.php   |   4 +-
 .../tests/src/Functional/BlockContentTest.php |   2 +-
 .../tests/src/Functional/CommentTest.php      |  10 +-
 .../Functional/ConfigurableLanguageTest.php   |   2 +-
 .../tests/src/Functional/EntryPointTest.php   |   2 +-
 .../Functional/ExternalNormalizersTest.php    |   2 +-
 .../jsonapi/tests/src/Functional/FileTest.php |   4 +-
 .../tests/src/Functional/FileUploadTest.php   |  30 +--
 .../src/Functional/InternalEntitiesTest.php   |   8 +-
 .../JsonApiFilterRegressionTest.php           |   8 +-
 .../JsonApiFunctionalDateFieldTest.php        |   2 +-
 .../JsonApiFunctionalMultilingualTest.php     |  10 +-
 .../src/Functional/JsonApiFunctionalTest.php  |   6 +-
 .../Functional/JsonApiPatchRegressionTest.php |  14 +-
 .../src/Functional/JsonApiRegressionTest.php  |  32 +--
 .../tests/src/Functional/MediaTest.php        |   4 +-
 .../src/Functional/MenuLinkContentTest.php    |   4 +-
 .../tests/src/Functional/MessageTest.php      |  14 +-
 .../jsonapi/tests/src/Functional/NodeTest.php |   8 +-
 .../tests/src/Functional/ResourceTestBase.php |  16 +-
 .../RestExportJsonApiUnsupported.php          |   2 +-
 .../src/Functional/RestJsonApiUnsupported.php |   2 +-
 .../tests/src/Functional/ShortcutTest.php     |   2 +-
 .../jsonapi/tests/src/Functional/TermTest.php |   6 +-
 .../jsonapi/tests/src/Functional/UserTest.php |  26 +--
 .../src/Kernel/Context/FieldResolverTest.php  |   8 +-
 .../Kernel/Controller/EntityResourceTest.php  |   4 +-
 .../src/Kernel/Controller/FileUploadTest.php  |   2 +-
 .../ResourceObjectNormalizerCacherTest.php    |   2 +-
 .../JsonApiDocumentTopLevelNormalizerTest.php |  18 +-
 .../LinkCollectionNormalizerTest.php          |   4 +-
 .../Normalizer/RelationshipNormalizerTest.php |   2 +-
 .../tests/src/Kernel/Query/FilterTest.php     |  18 +-
 .../ResourceType/RelatedResourceTypesTest.php |   6 +-
 .../ResourceTypeRepositoryTest.php            |  16 +-
 .../Revisions/VersionNegotiatorTest.php       |  10 +-
 .../src/Kernel/Serializer/SerializerTest.php  |   2 +-
 .../tests/src/Kernel/TestCoverageTest.php     |   2 +-
 .../ResourceResponseValidatorTest.php         |   2 +-
 .../src/Unit/JsonApiResource/LinkTest.php     |   2 +-
 .../tests/src/Unit/JsonApiSpecTest.php        |   4 +-
 .../HttpExceptionNormalizerTest.php           |   2 +-
 .../JsonApiDocumentTopLevelNormalizerTest.php |   4 +-
 .../ResourceIdentifierNormalizerTest.php      |   4 +-
 .../Unit/Query/EntityConditionGroupTest.php   |   4 +-
 .../src/Unit/Query/EntityConditionTest.php    |   4 +-
 .../tests/src/Unit/Query/OffsetPageTest.php   |   4 +-
 .../jsonapi/tests/src/Unit/Query/SortTest.php |   4 +-
 .../tests/src/Unit/Routing/RoutesTest.php     |  12 +-
 .../AdminPathEntityConverterLanguageTest.php  |   2 +-
 .../ConfigurableLanguageManagerTest.php       |   6 +-
 .../EntityTypeWithoutLanguageFormTest.php     |   2 +-
 .../LanguageBlockSettingsVisibilityTest.php   |   2 +-
 .../src/Functional/LanguageBreadcrumbTest.php |   2 +-
 ...uageBrowserDetectionAcceptLanguageTest.php |   2 +-
 .../LanguageBrowserDetectionTest.php          |   2 +-
 ...guageConfigInstallOverrideExistingTest.php |   2 +-
 .../LanguageConfigOverrideImportTest.php      |   4 +-
 .../Functional/LanguageConfigSchemaTest.php   |   2 +-
 .../LanguageConfigurationElementTest.php      |  10 +-
 .../Functional/LanguageConfigurationTest.php  |   4 +-
 ...anguageCustomLanguageConfigurationTest.php |   2 +-
 .../LanguageEntityFieldAccessHookTest.php     |   2 +-
 .../LanguageListModuleInstallTest.php         |   2 +-
 .../tests/src/Functional/LanguageListTest.php |   4 +-
 .../src/Functional/LanguageLocaleListTest.php |   2 +-
 .../LanguageNegotiationContentEntityTest.php  |   4 +-
 .../LanguageNegotiationInfoTest.php           |   4 +-
 .../LanguageNegotiationSessionTest.php        |   2 +-
 .../Functional/LanguageNegotiationUrlTest.php |   2 +-
 .../LanguagePathMonolingualTest.php           |   2 +-
 .../LanguageSelectorTranslatableTest.php      |   4 +-
 .../src/Functional/LanguageSwitchingTest.php  |  10 +-
 .../LanguageUILanguageNegotiationTest.php     |  10 +-
 .../Functional/LanguageUrlRewritingTest.php   |   4 +-
 .../ConfigurableLanguageResourceTestBase.php  |   2 +-
 .../Condition/LanguageConditionTest.php       |   2 +-
 .../ConfigurableLanguageManagerTest.php       |   2 +-
 .../src/Kernel/ConfigurableLanguageTest.php   |   2 +-
 .../src/Kernel/EntityDefaultLanguageTest.php  |   2 +-
 .../src/Kernel/EntityUrlLanguageTest.php      |   4 +-
 .../LanguageConfigFactoryOverrideTest.php     |   2 +-
 .../LanguageConfigOverrideInstallTest.php     |   2 +-
 .../LanguageDependencyInjectionTest.php       |   4 +-
 .../tests/src/Kernel/LanguageFallbackTest.php |   2 +-
 .../Kernel/LanguageNegotiatorPluginTest.php   |   2 +-
 .../src/Kernel/LanguageSelectWidgetTest.php   |   4 +-
 .../Migrate/d6/MigrateDefaultLanguageTest.php |   6 +-
 ...rateLanguageContentCommentSettingsTest.php |   2 +-
 ...MigrateLanguageContentMenuSettingsTest.php |   2 +-
 .../d6/MigrateLanguageContentSettingsTest.php |   2 +-
 ...eContentTaxonomyVocabularySettingsTest.php |   2 +-
 ...MigrateLanguageNegotiationSettingsTest.php |   8 +-
 .../Kernel/Migrate/d6/MigrateLanguageTest.php |   2 +-
 .../Migrate/d7/MigrateDefaultLanguageTest.php |   6 +-
 ...CommentSettingsNoEntityTranslationTest.php |   2 +-
 ...rateLanguageContentCommentSettingsTest.php |   2 +-
 ...MigrateLanguageContentMenuSettingsTest.php |   2 +-
 .../d7/MigrateLanguageContentSettingsTest.php |   2 +-
 ...eContentTaxonomyVocabularySettingsTest.php |   2 +-
 ...MigrateLanguageNegotiationSettingsTest.php |   8 +-
 .../src/Kernel/OverriddenConfigImportTest.php |   2 +-
 .../src/Kernel/Views/ArgumentLanguageTest.php |   2 +-
 .../src/Kernel/Views/FieldLanguageTest.php    |   2 +-
 .../src/Kernel/Views/FilterLanguageTest.php   |   2 +-
 .../Config/LanguageConfigOverrideTest.php     |   6 +-
 .../src/Unit/ConfigurableLanguageUnitTest.php |   4 +-
 .../Unit/ContentLanguageSettingsUnitTest.php  |  16 +-
 .../src/Unit/LanguageNegotiationUrlTest.php   |   6 +-
 .../src/Unit/Menu/LanguageLocalTasksTest.php  |   4 +-
 .../LanguageNegotiationContentEntityTest.php  |   6 +-
 .../src/Unit/process/LanguageDomainsTest.php  |   2 +-
 .../Unit/process/LanguageNegotiationTest.php  |   6 +-
 .../src/Unit/process/LanguageTypesTest.php    |   6 +-
 .../Functional/LayoutBuilderAccessTest.php    |   4 +-
 .../Functional/LayoutBuilderBlocksTest.php    |  14 +-
 .../LayoutBuilderDefaultValuesTest.php        |   2 +-
 ...FieldBlockEntityReferenceCacheTagsTest.php |   2 +-
 .../Functional/LayoutBuilderFormModeTest.php  |   2 +-
 .../Functional/LayoutBuilderLocalTaskTest.php |   4 +-
 .../Functional/LayoutBuilderOverridesTest.php |  12 +-
 .../LayoutBuilderPrepareLayoutTest.php        |   2 +-
 .../LayoutBuilderSectionStorageTest.php       |   2 +-
 .../src/Functional/LayoutBuilderTest.php      |  34 ++--
 .../LayoutBuilderThemeSuggestionsTest.php     |   4 +-
 .../LayoutBuilderTranslationTest.php          |   4 +-
 .../Functional/LayoutBuilderViewModeTest.php  |   6 +-
 .../src/Functional/LayoutDisplayTest.php      |   2 +-
 .../src/Functional/LayoutSectionTest.php      |  12 +-
 .../Functional/Rest/OverrideSectionsTest.php  |   2 +-
 .../FunctionalJavascript/AjaxBlockTest.php    |   2 +-
 .../FunctionalJavascript/BlockFilterTest.php  |   2 +-
 .../BlockFormMessagesTest.php                 |   2 +-
 .../ContentPreviewToggleTest.php              |   2 +-
 .../ContextualLinksTest.php                   |   4 +-
 .../FunctionalJavascript/FieldBlockTest.php   |   4 +-
 .../InlineBlockPrivateFilesTest.php           |   2 +-
 .../FunctionalJavascript/InlineBlockTest.php  |  20 +-
 .../ItemLayoutFieldBlockTest.php              |   2 +-
 .../LayoutBuilderDisableInteractionsTest.php  |   2 +-
 .../LayoutBuilderNestedFormUiTest.php         |   4 +-
 .../LayoutBuilderOptInTest.php                |   4 +-
 .../LayoutBuilderTest.php                     |   6 +-
 .../LayoutBuilderToolbarTest.php              |   2 +-
 .../LayoutBuilderUiTest.php                   |   8 +-
 .../MoveBlockFormTest.php                     |   2 +-
 .../TestMultiWidthLayoutsTest.php             |   2 +-
 .../src/Kernel/DefaultsSectionStorageTest.php |  12 +-
 .../tests/src/Kernel/FieldBlockTest.php       |  16 +-
 .../LayoutBuilderBreadcrumbAlterTest.php      |   2 +-
 .../LayoutBuilderEntityViewDisplayTest.php    |   6 +-
 ...outBuilderFieldLayoutCompatibilityTest.php |   2 +-
 .../src/Kernel/LayoutBuilderInstallTest.php   |   2 +-
 .../Kernel/LayoutEntityHelperTraitTest.php    |   6 +-
 .../src/Kernel/LayoutSectionItemListTest.php  |   4 +-
 .../Kernel/OverridesSectionStorageTest.php    |  14 +-
 .../tests/src/Kernel/SectionListTestBase.php  |  18 +-
 .../tests/src/Kernel/SectionListTraitTest.php |   2 +-
 .../src/Kernel/TranslatableFieldTest.php      |   2 +-
 .../Unit/BlockComponentRenderArrayTest.php    |  16 +-
 .../src/Unit/DefaultsSectionStorageTest.php   |  10 +-
 .../tests/src/Unit/InlineBlockUsageTest.php   |   2 +-
 .../LayoutBuilderIsActiveCacheContextTest.php |   6 +-
 .../src/Unit/LayoutBuilderRoutesTest.php      |   2 +-
 .../src/Unit/LayoutEntityHelperTraitTest.php  |   4 +-
 ...LayoutSectionStorageParamConverterTest.php |   6 +-
 .../Unit/LayoutTempstoreRepositoryTest.php    |   6 +-
 .../Unit/LayoutTempstoreRouteEnhancerTest.php |   2 +-
 .../src/Unit/OverridesSectionStorageTest.php  |   4 +-
 .../tests/src/Unit/SectionComponentTest.php   |   2 +-
 .../tests/src/Unit/SectionRenderTest.php      |  12 +-
 .../src/Unit/SectionStorageManagerTest.php    |  12 +-
 .../tests/src/Unit/SectionTest.php            |  32 +--
 .../tests/src/Kernel/LayoutTest.php           |   4 +-
 .../tests/src/Functional/LinkFieldTest.php    |   4 +-
 .../tests/src/Functional/LinkFieldUITest.php  |   2 +-
 .../Functional/Views/LinkViewsTokensTest.php  |   2 +-
 .../LinkFieldFormStatesTest.php               |   2 +-
 .../src/Kernel/LinkItemSerializationTest.php  |   4 +-
 .../link/tests/src/Kernel/LinkItemTest.php    |   2 +-
 .../src/Kernel/LinkItemUrlValidationTest.php  |   2 +-
 .../Plugin/migrate/field/d7/LinkFieldTest.php |   2 +-
 .../link/tests/src/Unit/LinkFormatterTest.php |   6 +-
 ...ternalProtocolsConstraintValidatorTest.php |   6 +-
 .../Plugin/migrate/field/d6/LinkFieldTest.php |   2 +-
 .../Plugin/migrate/process/FieldLinkTest.php  |   4 +-
 .../LocaleConfigTranslationImportTest.php     |  10 +-
 .../LocaleConfigTranslationTest.php           |   4 +-
 .../src/Functional/LocaleContentTest.php      |   6 +-
 .../tests/src/Functional/LocaleExportTest.php |   4 +-
 .../Functional/LocaleFileSystemFormTest.php   |   2 +-
 .../Functional/LocaleImportFunctionalTest.php |  12 +-
 .../LocaleJavascriptTranslationTest.php       |   4 +-
 .../src/Functional/LocaleLocaleLookupTest.php |   6 +-
 .../LocaleNonInteractiveInstallTest.php       |   2 +-
 .../tests/src/Functional/LocalePathTest.php   |   2 +-
 .../src/Functional/LocalePluralFormatTest.php |   6 +-
 .../LocaleTranslatedSchemaDefinitionTest.php  |   4 +-
 ...aleTranslationChangeProjectVersionTest.php |   2 +-
 .../LocaleTranslationDownloadTest.php         |   2 +-
 .../Functional/LocaleTranslationUiTest.php    |  12 +-
 .../src/Functional/LocaleUpdateCronTest.php   |   2 +-
 .../LocaleUpdateDevelopmentReleaseTest.php    |   2 +-
 .../Functional/LocaleUpdateInterfaceTest.php  |   2 +-
 .../tests/src/Functional/LocaleUpdateTest.php |  16 +-
 .../tests/src/Kernel/LocaleBuildTest.php      |   2 +-
 .../src/Kernel/LocaleConfigManagerTest.php    |   6 +-
 .../LocaleConfigSubscriberForeignTest.php     |  18 +-
 .../src/Kernel/LocaleConfigSubscriberTest.php |  14 +-
 .../LocaleConfigurableLanguageManagerTest.php |   2 +-
 .../src/Kernel/LocaleStringIsSafeTest.php     |   4 +-
 .../tests/src/Kernel/LocaleStringTest.php     |   4 +-
 .../Kernel/LocaleTranslationProjectsTest.php  |   2 +-
 .../src/Kernel/LocaleTranslationTest.php      |   2 +-
 .../tests/src/Kernel/LocaleUpdateTest.php     |   2 +-
 .../Migrate/MigrateLocaleConfigsTest.php      |   2 +-
 .../tests/src/Unit/LocaleLookupTest.php       |  12 +-
 .../tests/src/Unit/LocaleTranslationTest.php  |   2 +-
 .../src/Unit/Menu/LocaleLocalTasksTest.php    |   2 +-
 .../locale/tests/src/Unit/StringBaseTest.php  |   4 +-
 .../MediaThumbnailFormatterTest.php           |   2 +-
 .../FieldFormatter/OEmbedFormatterTest.php    |   4 +-
 .../FieldWidget/OEmbedFieldWidgetTest.php     |   2 +-
 .../tests/src/Functional/MediaAccessTest.php  |  10 +-
 .../src/Functional/MediaBulkFormTest.php      |   2 +-
 .../Functional/MediaContextualLinksTest.php   |   2 +-
 .../tests/src/Functional/MediaInstallTest.php |   2 +-
 .../src/Functional/MediaOverviewPageTest.php  |   2 +-
 .../src/Functional/MediaRequirementsTest.php  |   2 +-
 .../src/Functional/MediaRevisionTest.php      |   6 +-
 .../src/Functional/MediaSettingsTest.php      |   2 +-
 .../src/Functional/MediaSourceFileTest.php    |   4 +-
 .../src/Functional/MediaSourceImageTest.php   |   2 +-
 .../MediaTemplateSuggestionsTest.php          |   2 +-
 .../src/Functional/MediaTypeCreationTest.php  |   2 +-
 .../src/Functional/MediaUiFunctionalTest.php  |  10 +-
 .../Functional/MediaUiReferenceWidgetTest.php |   2 +-
 .../src/Functional/ProviderRepositoryTest.php |   4 +-
 .../src/Functional/ResourceFetcherTest.php    |   2 +-
 .../Functional/Rest/MediaResourceTestBase.php |   2 +-
 .../tests/src/Functional/UrlResolverTest.php  |   6 +-
 .../FunctionalJavascript/MediaDisplayTest.php |   2 +-
 ...MediaEmbedFilterConfigurationUiAddTest.php |   2 +-
 ...ediaEmbedFilterConfigurationUiEditTest.php |   2 +-
 .../MediaReferenceFieldHelpTest.php           |   2 +-
 .../MediaSourceAudioVideoTest.php             |   4 +-
 .../MediaSourceFileTest.php                   |   2 +-
 .../MediaSourceImageTest.php                  |   2 +-
 .../MediaSourceOEmbedVideoTest.php            |   4 +-
 .../MediaStandardProfileTest.php              |   2 +-
 .../MediaTypeCreationTest.php                 |   6 +-
 .../MediaUiJavascriptTest.php                 |   2 +-
 .../MediaViewsWizardTest.php                  |   4 +-
 .../Kernel/MediaAccessControlHandlerTest.php  |   4 +-
 .../tests/src/Kernel/MediaCreationTest.php    |   4 +-
 ...diaEmbedFilterDisabledIntegrationsTest.php |   2 +-
 .../tests/src/Kernel/MediaEmbedFilterTest.php |  14 +-
 .../MediaEmbedFilterTranslationTest.php       |   2 +-
 .../src/Kernel/MediaLinkRelationsTest.php     |   2 +-
 .../MediaMappingsConstraintValidatorTest.php  |   2 +-
 .../tests/src/Kernel/MediaSourceFileTest.php  |   4 +-
 .../tests/src/Kernel/MediaSourceTest.php      |  20 +-
 .../media/tests/src/Kernel/MediaTest.php      |   6 +-
 .../tests/src/Kernel/MediaTranslationTest.php |   2 +-
 .../src/Kernel/OEmbedIframeControllerTest.php |   4 +-
 .../OEmbedResourceConstraintValidatorTest.php |   4 +-
 .../tests/src/Kernel/OEmbedSourceTest.php     |   2 +-
 .../src/Kernel/Views/RevisionUserTest.php     |   2 +-
 .../tests/src/Unit/IFrameUrlHelperTest.php    |   2 +-
 .../media/tests/src/Unit/ResourceTest.php     |   2 +-
 .../MediaLibraryDisplayModeTest.php           |   2 +-
 .../tests/src/Functional/SettingsFormTest.php |   2 +-
 .../ContentModerationTest.php                 |   4 +-
 .../EmbeddedFormWidgetTest.php                |   2 +-
 .../EntityReferenceWidgetTest.php             |   8 +-
 .../FieldUiIntegrationTest.php                |   2 +-
 .../MediaOverviewTest.php                     |   2 +-
 .../FunctionalJavascript/TranslationsTest.php |   2 +-
 .../ViewsUiIntegrationTest.php                |   2 +-
 .../FunctionalJavascript/WidgetAccessTest.php |   4 +-
 .../WidgetAnonymousTest.php                   |   2 +-
 .../FunctionalJavascript/WidgetOEmbedTest.php |   4 +-
 .../FunctionalJavascript/WidgetUploadTest.php |   4 +-
 .../FunctionalJavascript/WidgetViewsTest.php  |   2 +-
 .../WidgetWithoutTypesTest.php                |   2 +-
 .../src/Kernel/MediaLibraryAccessTest.php     |  10 +-
 .../src/Kernel/MediaLibraryAddFormTest.php    |   8 +-
 .../src/Kernel/MediaLibraryStateTest.php      |  14 +-
 .../src/Kernel/MediaLibraryWidgetTest.php     |   4 +-
 .../MenuLinkContentDeleteFormTest.php         |   2 +-
 .../Functional/MenuLinkContentFormTest.php    |   8 +-
 .../MenuLinkContentTranslationUITest.php      |   4 +-
 ...enuLinkContentCacheabilityBubblingTest.php |   2 +-
 .../src/Kernel/MenuLinkContentDeriverTest.php |   2 +-
 .../tests/src/Kernel/MenuLinksTest.php        |  12 +-
 .../MigrateMenuLinkContentStubTest.php        |   2 +-
 .../d6/MigrateMenuLinkLocalizedTest.php       |   2 +-
 .../Kernel/Migrate/d6/MigrateMenuLinkTest.php |   2 +-
 .../d6/MigrateMenuLinkTranslationTest.php     |   2 +-
 .../d7/MigrateMenuLinkLocalizedTest.php       |   2 +-
 .../Kernel/Migrate/d7/MigrateMenuLinkTest.php |   2 +-
 .../d7/MigrateMenuLinkTranslationTest.php     |   2 +-
 .../Kernel/PathAliasMenuLinkContentTest.php   |   2 +-
 .../Plugin/migrate/process/LinkUriTest.php    |   6 +-
 .../Unit/MenuLinkContentEntityAccessTest.php  |   2 +-
 .../tests/src/Unit/MenuLinkPluginTest.php     |   2 +-
 .../src/Functional/MenuCacheTagsTest.php      |   2 +-
 .../src/Functional/MenuLinkReorderTest.php    |   2 +-
 .../MenuUiContentModerationTest.php           |   4 +-
 .../MenuUiContentTranslationTest.php          |   2 +-
 .../src/Functional/MenuUiLanguageTest.php     |   2 +-
 .../tests/src/Functional/MenuUiNodeTest.php   |   6 +-
 .../tests/src/Functional/MenuUiTest.php       |  18 +-
 .../src/Functional/MenuUninstallTest.php      |   2 +-
 .../MenuUiJavascriptTest.php                  |   2 +-
 .../Migrate/MigrateMenuSettingsTest.php       |   2 +-
 .../Functional/MigrateNoMigrateDrupalTest.php |   2 +-
 .../process/DownloadFunctionalTest.php        |   2 +-
 .../tests/src/Kernel/HighWaterTest.php        |   8 +-
 .../tests/src/Kernel/MigrateBundleTest.php    |   6 +-
 .../src/Kernel/MigrateConfigRollbackTest.php  |   2 +-
 .../src/Kernel/MigrateEmbeddedDataTest.php    |   2 +-
 .../Kernel/MigrateEntityContentBaseTest.php   |   8 +-
 .../MigrateEntityContentValidationTest.php    |   6 +-
 .../tests/src/Kernel/MigrateEventsTest.php    |   2 +-
 .../src/Kernel/MigrateExecutableTest.php      |   2 +-
 .../Kernel/MigrateExternalTranslatedTest.php  |   2 +-
 .../src/Kernel/MigrateInterruptionTest.php    |   2 +-
 .../tests/src/Kernel/MigrateLookupTest.php    |  10 +-
 .../tests/src/Kernel/MigrateMessageTest.php   |   6 +-
 .../MigrateProcessErrorMessagesTest.php       |   4 +-
 .../MigrateRollbackEntityConfigTest.php       |   2 +-
 .../tests/src/Kernel/MigrateRollbackTest.php  |   2 +-
 .../tests/src/Kernel/MigrateSkipRowTest.php   |   2 +-
 .../src/Kernel/MigrateSourceTestBase.php      |   2 +-
 .../src/Kernel/MigrateSqlSourceTestBase.php   |   2 +-
 .../tests/src/Kernel/MigrateStatusTest.php    |   2 +-
 .../tests/src/Kernel/MigrateStubTest.php      |  12 +-
 .../src/Kernel/MigrationPluginManagerTest.php |   2 +-
 .../tests/src/Kernel/MigrationTest.php        |   2 +-
 .../src/Kernel/Plugin/EntityExistsTest.php    |   2 +-
 .../src/Kernel/Plugin/EntityRevisionTest.php  |   2 +-
 .../tests/src/Kernel/Plugin/LogTest.php       |   2 +-
 .../MigrationPluginConfigurationTest.php      |   2 +-
 .../Kernel/Plugin/MigrationPluginListTest.php |   2 +-
 .../Plugin/MigrationProvidersExistTest.php    |   8 +-
 .../tests/src/Kernel/Plugin/MigrationTest.php |  10 +-
 .../src/Kernel/Plugin/id_map/SqlTest.php      |   4 +-
 .../source/MigrationSourceCacheTest.php       |   4 +-
 .../tests/src/Kernel/QueryBatchTest.php       |   6 +-
 .../migrate/tests/src/Kernel/SqlBaseTest.php  |   4 +-
 .../tests/src/Kernel/TrackChangesTest.php     |   2 +-
 .../tests/src/Kernel/process/DownloadTest.php |   6 +-
 .../tests/src/Kernel/process/ExtractTest.php  |   2 +-
 .../tests/src/Kernel/process/FileCopyTest.php |  14 +-
 .../Kernel/process/HandleMultiplesTest.php    |   2 +-
 .../tests/src/Kernel/process/RouteTest.php    |   4 +-
 .../tests/src/Unit/Event/EventBaseTest.php    |   4 +-
 .../src/Unit/Event/MigrateImportEventTest.php |   4 +-
 .../Event/MigratePostRowSaveEventTest.php     |   4 +-
 .../Unit/Event/MigratePreRowSaveEventTest.php |   2 +-
 .../Exception/RequirementsExceptionTest.php   |   4 +-
 .../MigrateExecutableMemoryExceededTest.php   |   6 +-
 .../tests/src/Unit/MigrateExecutableTest.php  |  28 +--
 .../tests/src/Unit/MigrateLookupTest.php      |   6 +-
 .../tests/src/Unit/MigrateSourceTest.php      |  24 +--
 .../Unit/MigrateSqlIdMapEnsureTablesTest.php  |   4 +-
 .../tests/src/Unit/MigrateSqlIdMapTest.php    |  50 ++---
 .../tests/src/Unit/MigrateStubTest.php        |   6 +-
 .../src/Unit/MigrationPluginManagerTest.php   |   4 +-
 .../migrate/tests/src/Unit/MigrationTest.php  |  14 +-
 .../destination/CheckRequirementsTest.php     |   2 +-
 .../destination/EntityContentBaseTest.php     |   6 +-
 .../destination/EntityRevisionTest.php        |   4 +-
 .../migrate/tests/src/Unit/RowTest.php        |  30 +--
 .../migrate/tests/src/Unit/SqlBaseTest.php    |   2 +-
 .../tests/src/Unit/destination/ConfigTest.php |   4 +-
 .../Unit/destination/EntityRevisionTest.php   |  10 +-
 .../PerComponentEntityDisplayTest.php         |   2 +-
 .../PerComponentEntityFormDisplayTest.php     |   2 +-
 .../tests/src/Unit/process/ArrayBuildTest.php |  10 +-
 .../tests/src/Unit/process/CallbackTest.php   |   6 +-
 .../tests/src/Unit/process/ConcatTest.php     |   6 +-
 .../src/Unit/process/DefaultValueTest.php     |   2 +-
 .../tests/src/Unit/process/ExplodeTest.php    |  16 +-
 .../tests/src/Unit/process/ExtractTest.php    |  10 +-
 .../tests/src/Unit/process/FileCopyTest.php   |   2 +-
 .../tests/src/Unit/process/FlattenTest.php    |   4 +-
 .../tests/src/Unit/process/FormatDateTest.php |  10 +-
 .../tests/src/Unit/process/GetTest.php        |  12 +-
 .../tests/src/Unit/process/LogTest.php        |   2 +-
 .../process/MakeUniqueEntityFieldTest.php     |   8 +-
 .../src/Unit/process/MenuLinkParentTest.php   |   4 +-
 .../src/Unit/process/MigrationLookupTest.php  |  12 +-
 .../src/Unit/process/NullCoalesceTest.php     |   6 +-
 .../Unit/process/ProcessPluginBaseTest.php    |   2 +-
 .../src/Unit/process/SkipOnEmptyTest.php      |  14 +-
 .../src/Unit/process/SkipRowIfNotSetTest.php  |   4 +-
 .../tests/src/Unit/process/StaticMapTest.php  |  18 +-
 .../tests/src/Unit/process/SubProcessTest.php |   6 +-
 .../tests/src/Unit/process/SubstrTest.php     |   8 +-
 .../tests/src/Unit/process/UrlEncodeTest.php  |   2 +-
 .../src/Kernel/IdMapTableNoDummyTest.php      |   2 +-
 .../Kernel/MigrateFieldPluginManagerTest.php  |   6 +-
 .../NodeMigrationTypePluginAlterTest.php      |   2 +-
 .../migrate/DestinationCategoryTest.php       |   4 +-
 .../source/ContentEntityConstructorTest.php   |   2 +-
 .../migrate/source/ContentEntityTest.php      |  10 +-
 .../tests/src/Kernel/StateFileExistsTest.php  |   2 +-
 .../src/Kernel/d6/EntityContentBaseTest.php   |   6 +-
 .../src/Kernel/d6/FieldDiscoveryTest.php      |  10 +-
 .../src/Kernel/d6/FollowUpMigrationsTest.php  |   2 +-
 .../Kernel/d6/MigrateDrupal6AuditIdsTest.php  |  10 +-
 .../src/Kernel/d6/MigrationProcessTest.php    |   2 +-
 ...riableTranslationCheckRequirementsTest.php |   2 +-
 .../src/Kernel/d7/FieldDiscoveryTest.php      |   8 +-
 .../src/Kernel/d7/FollowUpMigrationsTest.php  |   2 +-
 .../Kernel/d7/MigrateDrupal7AuditIdsTest.php  |  10 +-
 .../src/Kernel/d7/MigrationProcessTest.php    |   2 +-
 .../dependencies/MigrateDependenciesTest.php  |   2 +-
 .../ValidateMigrationStateTestTrait.php       |   2 +-
 .../tests/src/Unit/FieldDiscoveryTest.php     |   8 +-
 .../Unit/MigrateFieldPluginManagerTest.php    |   2 +-
 .../Unit/MigrationConfigurationTraitTest.php  |   2 +-
 .../tests/src/Unit/MigrationStateUnitTest.php |   2 +-
 .../src/Unit/source/DrupalSqlBaseTest.php     |   6 +-
 .../src/Unit/source/d6/Drupal6SqlBaseTest.php |   8 +-
 .../src/Functional/CredentialFormTest.php     |   2 +-
 .../src/Functional/MigrateAccessTest.php      |   2 +-
 .../src/Functional/MigrateControllerTest.php  |   2 +-
 .../MigrateUpgradeFormStepsTest.php           |   2 +-
 .../MultilingualReviewPageTestBase.php        |   2 +-
 .../NoMultilingualReviewPageTestBase.php      |   2 +-
 .../src/Functional/SourceProviderTest.php     |   2 +-
 .../src/Functional/d6/IdConflictTest.php      |   2 +-
 .../src/Functional/d6/NodeClassicTest.php     |   2 +-
 .../tests/src/Functional/d6/Upgrade6Test.php  |   2 +-
 .../src/Functional/d7/DoubleSlashTest.php     |   2 +-
 .../tests/src/Functional/d7/FilePathTest.php  |   2 +-
 .../src/Functional/d7/IdConflictTest.php      |   2 +-
 .../tests/src/Functional/d7/Upgrade7Test.php  |   2 +-
 .../src/FunctionalJavascript/SettingsTest.php |   2 +-
 .../src/Kernel/MigrationLabelExistTest.php    |   2 +-
 ...llerIsolationLevelExistingSettingsTest.php |   2 +-
 ...erIsolationLevelNoDatabaseSettingsTest.php |   2 +-
 .../tests/src/Functional/RequirementsTest.php |   2 +-
 .../mysql/Console/DbDumpCommandTest.php       |   6 +-
 .../mysql/DatabaseExceptionWrapperTest.php    |   4 +-
 .../tests/src/Kernel/mysql/DbDumpTest.php     |   4 +-
 .../src/Kernel/mysql/MysqlDriverTest.php      |   2 +-
 .../tests/src/Kernel/mysql/PrefixInfoTest.php |   2 +-
 .../src/Kernel/mysql/TemporaryQueryTest.php   |   2 +-
 .../mysql/tests/src/Unit/InstallTasksTest.php |   2 +-
 .../src/Functional/NavigationLogoTest.php     |   2 +-
 .../NavigationShortcutsBlockTest.php          |   2 +-
 .../src/Functional/NavigationTopBarTest.php   |   2 +-
 .../Functional/NavigationUserBlockTest.php    |   2 +-
 .../Kernel/SystemMenuNavigationBlockTest.php  |   4 +-
 .../MultiStepNodeFormBasicOptionsTest.php     |   2 +-
 .../Functional/NodeAccessBaseTableTest.php    |   2 +-
 .../Functional/NodeAccessCacheabilityTest.php |   4 +-
 .../NodeAccessCacheabilityWithNodeGrants.php  |   2 +-
 .../src/Functional/NodeAccessFieldTest.php    |   2 +-
 .../NodeAccessGrantsCacheContextTest.php      |   2 +-
 .../NodeAccessLanguageFallbackTest.php        |   2 +-
 .../src/Functional/NodeAccessMenuLinkTest.php |   2 +-
 .../src/Functional/NodeAccessPagerTest.php    |   2 +-
 .../NodeAccessRebuildNodeGrantsTest.php       |   4 +-
 .../tests/src/Functional/NodeAdminTest.php    |   6 +-
 .../Functional/NodeBlockFunctionalTest.php    |   2 +-
 .../Functional/NodeContextualLinksTest.php    |   2 +-
 .../tests/src/Functional/NodeCreationTest.php |  14 +-
 .../tests/src/Functional/NodeEditFormTest.php |   6 +-
 .../NodeEntityViewModeAlterTest.php           |   2 +-
 .../Functional/NodeFieldMultilingualTest.php  |   4 +-
 .../NodeFormSaveChangedTimeTest.php           |   2 +-
 .../tests/src/Functional/NodeHelpTest.php     |   2 +-
 .../tests/src/Functional/NodeLinksTest.php    |   2 +-
 .../src/Functional/NodePostSettingsTest.php   |   2 +-
 .../Functional/NodePreviewAnonymousTest.php   |   2 +-
 .../src/Functional/NodeQueryAlterTest.php     |  10 +-
 .../src/Functional/NodeRSSContentTest.php     |   4 +-
 .../src/Functional/NodeRevisionsAllTest.php   |   2 +-
 .../src/Functional/NodeRevisionsTest.php      |   6 +-
 .../NodeRevisionsUiBypassAccessTest.php       |   2 +-
 .../src/Functional/NodeRevisionsUiTest.php    |   6 +-
 .../tests/src/Functional/NodeRssCacheTest.php |   2 +-
 .../tests/src/Functional/NodeSaveTest.php     |   8 +-
 .../src/Functional/NodeSyndicateBlockTest.php |   2 +-
 .../tests/src/Functional/NodeTitleTest.php    |   2 +-
 .../tests/src/Functional/NodeTitleXSSTest.php |   2 +-
 .../src/Functional/NodeTranslationUITest.php  |  16 +-
 .../NodeTypeInitialLanguageTest.php           |   4 +-
 .../tests/src/Functional/NodeTypeTest.php     |  12 +-
 .../Functional/NodeTypeTranslationTest.php    |   4 +-
 .../src/Functional/NodeViewLanguageTest.php   |   2 +-
 .../tests/src/Functional/NodeViewTest.php     |   6 +-
 .../tests/src/Functional/PagePreviewTest.php  |   8 +-
 .../tests/src/Functional/PageViewTest.php     |   2 +-
 .../Functional/Rest/NodeResourceTestBase.php  |   2 +-
 .../src/Functional/Rest/NodeXmlAnonTest.php   |   2 +-
 .../Functional/Rest/NodeXmlBasicAuthTest.php  |   2 +-
 .../src/Functional/Rest/NodeXmlCookieTest.php |   2 +-
 .../Functional/Views/BulkFormAccessTest.php   |   4 +-
 .../src/Functional/Views/BulkFormTest.php     |   4 +-
 .../Functional/Views/FilterNodeAccessTest.php |   2 +-
 .../src/Functional/Views/FrontPageTest.php    |   8 +-
 .../Views/NodeContextualLinksTest.php         |   2 +-
 .../Functional/Views/NodeFieldFilterTest.php  |   2 +-
 .../Functional/Views/NodeFieldTokensTest.php  |   2 +-
 .../Functional/Views/NodeIntegrationTest.php  |   2 +-
 .../src/Functional/Views/NodeLanguageTest.php |   4 +-
 .../Functional/Views/NodeViewsAnalyzeTest.php |   2 +-
 .../src/Functional/Views/RevisionLinkTest.php |   2 +-
 .../src/Functional/Views/StatusExtraTest.php  |   2 +-
 ...enTaxonomyTermReferenceFieldWizardTest.php |   2 +-
 .../Views/Wizard/NodeRevisionWizardTest.php   |   2 +-
 .../CollapsedSummariesTest.php                |   2 +-
 .../ContextualLinksTest.php                   |   2 +-
 .../NodeDeleteConfirmTest.php                 |   4 +-
 .../NodePreviewLinkTest.php                   |   2 +-
 .../SettingSummariesContentTypeTest.php       |   2 +-
 .../Kernel/Config/NodeImportChangeTest.php    |   2 +-
 .../Kernel/Config/NodeImportCreateTest.php    |   4 +-
 .../Kernel/Migrate/MigrateNodeStubTest.php    |   2 +-
 .../d6/MigrateNodeBundleSettingsTest.php      |   2 +-
 .../Migrate/d6/MigrateNodeCompleteTest.php    |   2 +-
 .../Migrate/d6/MigrateNodeConfigsTest.php     |   2 +-
 .../Migrate/d6/MigrateNodeDeriverTest.php     |   4 +-
 .../Migrate/d6/MigrateNodeRevisionTest.php    |   2 +-
 .../d6/MigrateNodeSettingPromoteTest.php      |   2 +-
 .../d6/MigrateNodeSettingStatusTest.php       |   2 +-
 .../d6/MigrateNodeSettingStickyTest.php       |   2 +-
 .../src/Kernel/Migrate/d6/MigrateNodeTest.php |   2 +-
 .../Kernel/Migrate/d6/MigrateNodeTypeTest.php |   2 +-
 .../Migrate/d6/MigrateViewModesTest.php       |   2 +-
 .../d6/NodeTranslationRedirectTest.php        |   2 +-
 .../Migrate/d7/MigrateNodeCompleteTest.php    |   4 +-
 .../Migrate/d7/MigrateNodeDeriverTest.php     |   6 +-
 .../Migrate/d7/MigrateNodeRevisionTest.php    |   2 +-
 .../Migrate/d7/MigrateNodeSettingsTest.php    |   2 +-
 .../src/Kernel/Migrate/d7/MigrateNodeTest.php |   2 +-
 .../Migrate/d7/MigrateNodeTitleLabelTest.php  |   2 +-
 .../Kernel/Migrate/d7/MigrateNodeTypeTest.php |   2 +-
 .../d7/NodeTranslationRedirectTest.php        |   2 +-
 ...NodeAccessLanguageAwareCombinationTest.php |   2 +-
 .../Kernel/NodeAccessLanguageAwareTest.php    |   2 +-
 .../src/Kernel/NodeAccessLanguageTest.php     |   6 +-
 .../src/Kernel/NodeAccessRecordsTest.php      |   2 +-
 .../node/tests/src/Kernel/NodeAccessTest.php  |   4 +-
 .../src/Kernel/NodeBodyFieldStorageTest.php   |   2 +-
 .../tests/src/Kernel/NodeFieldAccessTest.php  |   2 +-
 .../src/Kernel/NodeFieldOverridesTest.php     |   2 +-
 .../tests/src/Kernel/NodeListBuilderTest.php  |   2 +-
 .../tests/src/Kernel/NodeLoadMultipleTest.php |   4 +-
 .../node/tests/src/Kernel/NodeOwnerTest.php   |   4 +-
 .../tests/src/Kernel/NodeTokenReplaceTest.php |   2 +-
 .../tests/src/Kernel/NodeValidationTest.php   |   2 +-
 .../tests/src/Kernel/NodeViewBuilderTest.php  |   2 +-
 .../tests/src/Kernel/SummaryLengthTest.php    |   2 +-
 .../Views/ArgumentNodeRevisionIdTest.php      |   2 +-
 .../Kernel/Views/ArgumentUidRevisionTest.php  |   2 +-
 .../Kernel/Views/FilterUidRevisionTest.php    |   2 +-
 .../src/Kernel/Views/NidArgumentTest.php      |   2 +-
 .../Kernel/Views/NodeViewsFieldAccessTest.php |   2 +-
 .../Views/RevisionCreateTimestampTest.php     |   2 +-
 .../Views/RevisionRelationshipsTest.php       |   2 +-
 .../src/Kernel/Views/RevisionUidTest.php      |   2 +-
 .../src/Unit/NodeOperationAccessTest.php      |   2 +-
 .../Unit/PageCache/DenyNodePreviewTest.php    |   2 +-
 .../Plugin/views/field/NodeBulkFormTest.php   |   2 +-
 .../src/Functional/OptionsFieldUITest.php     |  10 +-
 .../OptionsFloatFieldImportTest.php           |   2 +-
 .../OptionsSelectDynamicValuesTest.php        |   2 +-
 .../src/Functional/OptionsWidgetsTest.php     |  16 +-
 .../OptionsFieldUITest.php                    |   6 +-
 .../tests/src/Kernel/OptionsFieldTest.php     |   4 +-
 .../src/Kernel/OptionsFormattersTest.php      |   2 +-
 .../src/Kernel/Views/FileViewsDataTest.php    |   2 +-
 .../Kernel/Views/OptionsListArgumentTest.php  |   2 +-
 .../Kernel/Views/OptionsListFilterTest.php    |   4 +-
 .../tests/src/Kernel/Views/ViewsDataTest.php  |   2 +-
 .../PageCacheTagsIntegrationTest.php          |   2 +-
 .../tests/src/Functional/PageCacheTest.php    |  26 +--
 .../tests/src/Functional/PathAdminTest.php    |   2 +-
 .../tests/src/Functional/PathAliasTest.php    |   8 +-
 .../Functional/PathContentModerationTest.php  |   4 +-
 .../tests/src/Functional/PathLanguageTest.php |   2 +-
 .../src/Functional/PathLanguageUiTest.php     |   8 +-
 .../src/Functional/PathMediaFormTest.php      |   2 +-
 .../tests/src/Functional/PathNodeFormTest.php |   2 +-
 .../src/Functional/PathTaxonomyTermTest.php   |   2 +-
 .../Kernel/Migrate/d6/MigrateUrlAliasTest.php |   4 +-
 .../Kernel/Migrate/d7/MigrateUrlAliasTest.php |   2 +-
 .../Migrate/d7/MigrateUrlAliasTestBase.php    |   2 +-
 .../path/tests/src/Kernel/PathItemTest.php    |   2 +-
 .../src/Kernel/PathNoCanonicalLinkTest.php    |   2 +-
 .../Unit/Field/PathFieldDefinitionTest.php    |   2 +-
 .../migrate/process/PathSetTranslatedTest.php |   2 +-
 .../src/Functional/UrlAlterFunctionalTest.php |   2 +-
 .../path_alias/tests/src/Kernel/AliasTest.php |  12 +-
 .../tests/src/Kernel/PathHooksTest.php        |   2 +-
 .../tests/src/Unit/AliasManagerTest.php       |  24 +--
 .../PathProcessor/AliasPathProcessorTest.php  |   4 +-
 .../pgsql/DatabaseExceptionWrapperTest.php    |   2 +-
 .../src/Kernel/pgsql/KernelTestBaseTest.php   |   2 +-
 .../tests/src/Kernel/pgsql/SchemaTest.php     |   4 +-
 .../src/Kernel/pgsql/TemporaryQueryTest.php   |   2 +-
 .../pgsql/tests/src/Unit/SchemaTest.php       |   2 +-
 .../tests/src/Unit/PasswordVerifyTest.php     |  12 +-
 .../Functional/ResponsiveImageAdminUITest.php |   2 +-
 .../ResponsiveImageFieldDisplayTest.php       |  14 +-
 .../src/Functional/ViewsIntegrationTest.php   |   2 +-
 .../ResponsiveImageFieldUiTest.php            |   2 +-
 .../d7/MigrateResponsiveImageStylesTest.php   |   2 +-
 .../Kernel/ResponsiveImageIntegrationTest.php |   2 +-
 ...sponsiveImageStyleConfigEntityUnitTest.php |  14 +-
 .../EntityResource/EntityResourceTestBase.php |   8 +-
 .../ModeratedNodeXmlAnonTest.php              |   2 +-
 .../ModeratedNodeXmlBasicAuthTest.php         |   2 +-
 .../ModeratedNodeXmlCookieTest.php            |   2 +-
 .../XmlEntityNormalizationQuirksTrait.php     |   4 +-
 .../Functional/FileUploadResourceTestBase.php |  22 +--
 .../tests/src/Functional/ResourceTest.php     |   8 +-
 .../Views/ExcludedFieldTokenTest.php          |   2 +-
 .../src/Functional/Views/FieldCounterTest.php |   2 +-
 .../Functional/Views/RestExportAuthTest.php   |   2 +-
 .../Views/StyleSerializerEntityTest.php       |  14 +-
 .../Functional/Views/StyleSerializerTest.php  |  12 +-
 .../Kernel/Entity/ConfigDependenciesTest.php  |   8 +-
 .../src/Kernel/Entity/RestPermissionsTest.php |   2 +-
 .../Kernel/Entity/RestResourceConfigTest.php  |   2 +-
 .../EntityResourceRestTestCoverageTest.php    |   2 +-
 .../tests/src/Kernel/RequestHandlerTest.php   |   2 +-
 .../tests/src/Kernel/Views/RestExportTest.php |   2 +-
 .../Views/StyleSerializerKernelTest.php       |   2 +-
 .../rest/tests/src/Unit/CollectRoutesTest.php |   2 +-
 .../Unit/Entity/RestResourceConfigTest.php    |   2 +-
 .../EntityResourceValidationTraitTest.php     |   4 +-
 .../ResourceResponseSubscriberTest.php        |   8 +-
 .../Plugin/views/style/SerializerTest.php     |   2 +-
 .../src/Functional/SearchAdminThemeTest.php   |   2 +-
 .../SearchAdvancedSearchFormTest.php          |   4 +-
 .../tests/src/Functional/SearchBlockTest.php  |   2 +-
 .../SearchCommentCountToggleTest.php          |   2 +-
 .../src/Functional/SearchCommentTest.php      |   6 +-
 .../SearchConfigSettingsFormTest.php          |  12 +-
 .../src/Functional/SearchDateIntervalTest.php |   2 +-
 .../src/Functional/SearchEmbedFormTest.php    |   2 +-
 .../tests/src/Functional/SearchExactTest.php  |   2 +-
 .../SearchKeywordsConditionsTest.php          |   2 +-
 .../src/Functional/SearchLanguageTest.php     |   4 +-
 .../SearchMultilingualEntityTest.php          |   2 +-
 .../Functional/SearchNodeDiacriticsTest.php   |   2 +-
 .../Functional/SearchNodePunctuationTest.php  |   2 +-
 .../SearchNodeUpdateAndDeletionTest.php       |   4 +-
 .../Functional/SearchNumberMatchingTest.php   |   2 +-
 .../src/Functional/SearchNumbersTest.php      |   2 +-
 .../Functional/SearchPageCacheTagsTest.php    |   4 +-
 .../src/Functional/SearchPageOverrideTest.php |   2 +-
 .../src/Functional/SearchPageTextTest.php     |   4 +-
 .../SearchPreprocessLangcodeTest.php          |   4 +-
 .../src/Functional/SearchQueryAlterTest.php   |   2 +-
 .../src/Functional/SearchRankingTest.php      |   4 +-
 .../Migrate/d6/MigrateSearchPageTest.php      |   2 +-
 .../Migrate/d6/MigrateSearchSettingsTest.php  |   2 +-
 .../Migrate/d7/MigrateSearchPageTest.php      |   6 +-
 .../Migrate/d7/MigrateSearchSettingsTest.php  |   2 +-
 .../tests/src/Kernel/SearchExcerptTest.php    |   4 +-
 .../tests/src/Kernel/SearchIndexTest.php      |   2 +-
 .../tests/src/Kernel/SearchMatchTest.php      |   2 +-
 .../src/Kernel/SearchTextProcessorTest.php    |   4 +-
 .../tests/src/Kernel/SearchTokenizerTest.php  |   4 +-
 .../src/Unit/SearchPageRepositoryTest.php     |  16 +-
 .../src/Unit/SearchPluginCollectionTest.php   |   4 +-
 .../src/Kernel/EntitySerializationTest.php    |  22 +--
 .../src/Kernel/FieldItemSerializationTest.php |   6 +-
 .../src/Kernel/MapDataNormalizerTest.php      |   4 +-
 .../tests/src/Kernel/SerializationTest.php    |   2 +-
 ...erSerializationClassesCompilerPassTest.php |   2 +-
 .../src/Unit/Encoder/JsonEncoderTest.php      |   2 +-
 .../tests/src/Unit/Encoder/XmlEncoderTest.php |  10 +-
 .../ChainEntityResolverTest.php               |  10 +-
 .../Unit/EntityResolver/UuidResolverTest.php  |   8 +-
 .../DefaultExceptionSubscriberTest.php        |   2 +-
 .../Normalizer/ComplexDataNormalizerTest.php  |   6 +-
 .../Normalizer/ConfigEntityNormalizerTest.php |   4 +-
 .../ContentEntityNormalizerTest.php           |   6 +-
 .../DateTimeIso8601NormalizerTest.php         |  16 +-
 .../Normalizer/DateTimeNormalizerTest.php     |  14 +-
 .../Unit/Normalizer/EntityNormalizerTest.php  |  12 +-
 ...EntityReferenceFieldItemNormalizerTest.php |  26 +--
 .../Unit/Normalizer/ListNormalizerTest.php    |   4 +-
 .../Unit/Normalizer/NormalizerBaseTest.php    |   2 +-
 .../Unit/Normalizer/NullNormalizerTest.php    |   4 +-
 .../PrimitiveDataNormalizerTest.php           |   6 +-
 .../TimestampItemNormalizerTest.php           |   8 +-
 .../Normalizer/TimestampNormalizerTest.php    |  10 +-
 .../Normalizer/TypedDataNormalizerTest.php    |   4 +-
 .../tests/src/Functional/SettingsTrayTest.php |   4 +-
 .../FunctionalJavascript/ConfigAccessTest.php |   2 +-
 .../OverriddenConfigurationTest.php           |   4 +-
 .../SettingsTrayBlockFormTest.php             |   6 +-
 ...uginHasSettingsTrayFormAccessCheckTest.php |   2 +-
 .../src/Functional/ShortcutCacheTagsTest.php  |   4 +-
 .../src/Functional/ShortcutLinksTest.php      |  20 +-
 .../tests/src/Functional/ShortcutSetsTest.php |  24 +--
 .../Migrate/MigrateShortcutStubTest.php       |   2 +-
 .../Migrate/d7/MigrateShortcutSetTest.php     |   2 +-
 .../d7/MigrateShortcutSetUsersTest.php        |   2 +-
 .../Kernel/Migrate/d7/MigrateShortcutTest.php |   2 +-
 .../Kernel/ShortcutClaroIntegrationTest.php   |   2 +-
 .../src/Unit/Menu/ShortcutLocalTasksTest.php  |   2 +-
 .../sqlite/DatabaseExceptionWrapperTest.php   |   2 +-
 .../src/Kernel/sqlite/TemporaryQueryTest.php  |   2 +-
 .../sqlite/tests/src/Unit/ConnectionTest.php  |   2 +-
 .../tests/src/Functional/SyslogTest.php       |   2 +-
 .../Migrate/d6/MigrateSyslogConfigsTest.php   |   2 +-
 .../Migrate/d7/MigrateSyslogConfigsTest.php   |   2 +-
 .../syslog/tests/src/Kernel/SyslogTest.php    |   6 +-
 .../EntityTestComputedFieldNormalizerTest.php |   6 +-
 .../Rest/EntityTestTextItemNormalizerTest.php |   2 +-
 .../src/Functional/Ajax/FrameworkTest.php     |   6 +-
 .../Functional/Ajax/OffCanvasDialogTest.php   |   2 +-
 .../tests/src/Functional/Batch/PageTest.php   |   6 +-
 .../src/Functional/Batch/ProcessingTest.php   |  16 +-
 .../Bootstrap/DrupalMessengerServiceTest.php  |   2 +-
 .../tests/src/Functional/Cache/ClearTest.php  |   2 +-
 .../Cache/SessionExistsCacheContextTest.php   |   2 +-
 .../Common/EarlyRenderingControllerTest.php   |   2 +-
 .../src/Functional/Common/FormatDateTest.php  |   2 +-
 .../src/Functional/Common/RenderWebTest.php   |   2 +-
 .../tests/src/Functional/Common/UrlTest.php   |   2 +-
 .../Condition/ConditionFormTest.php           |   2 +-
 .../src/Functional/CsrfRequestHeaderTest.php  |   2 +-
 .../Database/SelectPagerDefaultTest.php       |  10 +-
 .../Database/SelectTableSortDefaultTest.php   |   6 +-
 .../Datetime/DrupalDateTimeTest.php           |   4 +-
 .../TimeZoneAbbreviationRouteTest.php         |   4 +-
 .../DrupalKernel/ContainerRebuildWebTest.php  |   4 +-
 .../DrupalKernel/ContainerResetWebTest.php    |   2 +-
 .../DrupalKernel/ContentNegotiationTest.php   |   2 +-
 .../src/Functional/Entity/EntityAddUITest.php |   4 +-
 .../Entity/EntityCacheTagsTestBase.php        |   2 +-
 .../Entity/EntityComputedFieldTest.php        |   2 +-
 .../src/Functional/Entity/EntityFormTest.php  |  10 +-
 .../Entity/EntityListBuilderTest.php          |   6 +-
 .../Entity/EntityOperationsTest.php           |   2 +-
 .../EntityReferenceFieldCreationTest.php      |   2 +-
 .../Functional/Entity/EntityRevisionsTest.php |   6 +-
 .../Entity/EntityTranslationFormTest.php      |   2 +-
 .../Entity/EntityViewControllerTest.php       |   6 +-
 .../Entity/EntityWithUriCacheTagsTestBase.php |   2 +-
 .../tests/src/Functional/File/ConfigTest.php  |   2 +-
 .../File/FileSaveHtaccessLoggingTest.php      |   2 +-
 .../FileTransfer/FileTransferTest.php         |   2 +-
 .../tests/src/Functional/Form/AlterTest.php   |   2 +-
 .../Functional/Form/ArbitraryRebuildTest.php  |   4 +-
 .../src/Functional/Form/CheckboxTest.php      |   2 +-
 .../src/Functional/Form/ConfirmFormTest.php   |   4 +-
 .../tests/src/Functional/Form/ElementTest.php |  20 +-
 .../Functional/Form/ElementsAccessTest.php    |   2 +-
 .../Functional/Form/ElementsContainerTest.php |   2 +-
 .../Functional/Form/ElementsLabelsTest.php    |   8 +-
 .../Form/ElementsTableSelectTest.php          |  18 +-
 .../Form/ElementsVerticalTabsTest.php         |   6 +-
 .../tests/src/Functional/Form/EmailTest.php   |   2 +-
 .../src/Functional/Form/FormObjectTest.php    |   2 +-
 .../Form/FormStoragePageCacheTest.php         |   4 +-
 .../tests/src/Functional/Form/FormTest.php    |  32 +--
 .../Form/LanguageSelectElementTest.php        |   4 +-
 .../Form/MenuLinksetSettingsFormTest.php      |   2 +-
 .../Form/ModulesListFormWebTest.php           |  12 +-
 .../tests/src/Functional/Form/RebuildTest.php |   2 +-
 .../src/Functional/Form/RedirectTest.php      |   4 +-
 .../src/Functional/Form/ResponseTest.php      |   2 +-
 .../Form/StateValuesCleanAdvancedTest.php     |   2 +-
 .../Functional/Form/StateValuesCleanTest.php  |   2 +-
 .../tests/src/Functional/Form/StorageTest.php |  12 +-
 .../Functional/Form/SystemConfigFormTest.php  |   2 +-
 .../tests/src/Functional/Form/UrlTest.php     |   2 +-
 .../src/Functional/Form/ValidationTest.php    |  10 +-
 .../Functional/Lock/LockFunctionalTest.php    |   4 +-
 .../Menu/BreadcrumbFrontCacheContextsTest.php |   2 +-
 .../src/Functional/Menu/BreadcrumbTest.php    |   4 +-
 .../LinksetControllerMultiLingualTest.php     |   4 +-
 .../Functional/Menu/LinksetControllerTest.php |  12 +-
 .../src/Functional/Menu/LocalActionTest.php   |   2 +-
 .../src/Functional/Menu/LocalTasksTest.php    |   6 +-
 .../src/Functional/Menu/MenuAccessTest.php    |   2 +-
 .../Functional/Menu/MenuLinkSecurityTest.php  |   2 +-
 .../src/Functional/Menu/MenuRouterTest.php    |   8 +-
 .../src/Functional/Module/ClassLoaderTest.php |  10 +-
 .../src/Functional/Module/DependencyTest.php  |  22 +--
 .../Module/DeprecatedTemplateTest.php         |   2 +-
 .../Module/HookRequirementsTest.php           |   2 +-
 .../Module/PrepareUninstallTest.php           |   2 +-
 .../src/Functional/Module/UninstallTest.php   |   6 +-
 .../src/Functional/Module/VersionTest.php     |   2 +-
 .../Functional/Page/DefaultMetatagsTest.php   |   2 +-
 .../tests/src/Functional/Pager/PagerTest.php  |   8 +-
 .../ParamConverter/UpcastingTest.php          |   6 +-
 .../Functional/Render/AjaxPageStateTest.php   |   6 +-
 .../Functional/Render/DisplayVariantTest.php  |   2 +-
 .../Render/HtmlResponseAttachmentsTest.php    |   4 +-
 .../Render/PlaceholderMessageTest.php         |   2 +-
 .../RenderArrayNonHtmlSubscriberTest.php      |   2 +-
 .../UrlBubbleableMetadataBubblingTest.php     |   2 +-
 .../Functional/Routing/DestinationTest.php    |   2 +-
 .../Routing/RouterPermissionTest.php          |   2 +-
 .../src/Functional/Routing/RouterTest.php     |  28 +--
 .../ServiceProviderWebTest.php                |   2 +-
 .../Session/SessionAuthenticationTest.php     |   6 +-
 .../Functional/Session/SessionHttpsTest.php   |   2 +-
 .../src/Functional/Session/SessionTest.php    |  16 +-
 .../StackSessionHandlerIntegrationTest.php    |   2 +-
 .../Functional/System/AccessDeniedTest.php    |   4 +-
 .../Functional/System/AdminMetaTagTest.php    |   2 +-
 .../tests/src/Functional/System/AdminTest.php |   4 +-
 .../src/Functional/System/CronRunTest.php     |  10 +-
 .../System/DateFormatsLockedTest.php          |   2 +-
 .../System/DateFormatsMachineNameTest.php     |   2 +-
 .../src/Functional/System/DateTimeTest.php    |   6 +-
 .../System/DefaultMobileMetaTagsTest.php      |   4 +-
 .../Functional/System/ErrorHandlerTest.php    |   6 +-
 .../src/Functional/System/FrontPageTest.php   |   2 +-
 .../src/Functional/System/HtaccessTest.php    |   4 +-
 .../src/Functional/System/IndexPhpTest.php    |   2 +-
 .../System/MainContentFallbackTest.php        |   2 +-
 .../Functional/System/PageNotFoundTest.php    |   4 +-
 .../src/Functional/System/PageTitleTest.php   |   6 +-
 .../Functional/System/PhpRequirementTest.php  |   2 +-
 .../System/ResponseGeneratorTest.php          |   2 +-
 .../System/ShutdownFunctionsTest.php          |   2 +-
 .../Functional/System/SiteMaintenanceTest.php |   4 +-
 .../System/SitesDirectoryHardeningTest.php    |   4 +-
 .../src/Functional/System/StatusTest.php      |   6 +-
 .../Functional/System/SystemAuthorizeTest.php |   2 +-
 .../tests/src/Functional/System/ThemeTest.php |  18 +-
 .../Functional/System/TokenReplaceWebTest.php |   2 +-
 .../Functional/System/TrustedHostsTest.php    |  10 +-
 .../Functional/Theme/EngineNyanCatTest.php    |   2 +-
 .../src/Functional/Theme/EngineTwigTest.php   |  14 +-
 .../Theme/EntityFilteringThemeTest.php        |   2 +-
 .../tests/src/Functional/Theme/FastTest.php   |   2 +-
 .../Functional/Theme/HtmlAttributesTest.php   |   2 +-
 .../Theme/ImageLoadingAttributeTest.php       |   2 +-
 .../MaintenanceThemeUpdateRegistryTest.php    |   2 +-
 .../Theme/ThemeEarlyInitializationTest.php    |   2 +-
 .../src/Functional/Theme/ThemeInfoTest.php    |   4 +-
 .../Theme/ThemeSuggestionsAlterTest.php       |  10 +-
 .../tests/src/Functional/Theme/ThemeTest.php  |  22 +--
 .../src/Functional/Theme/ThemeTokenTest.php   |   2 +-
 .../src/Functional/Theme/ThemeUiTest.php      |  10 +-
 .../src/Functional/Theme/ThemeUpdateTest.php  |   2 +-
 .../Theme/ToolbarClaroOverridesTest.php       |   2 +-
 .../Functional/Theme/TwigDebugMarkupTest.php  |   2 +-
 .../Functional/Theme/TwigEnvironmentTest.php  |   2 +-
 .../Functional/Theme/TwigExtensionTest.php    |  12 +-
 .../Theme/TwigRegistryLoaderTest.php          |   4 +-
 .../src/Functional/Theme/TwigSettingsTest.php |   8 +-
 .../src/Functional/Theme/TwigTransTest.php    |   4 +-
 .../UpdateSystem/BrokenCacheUpdateTest.php    |   2 +-
 .../DependencyHookInvocationTest.php          |   2 +-
 .../UpdateSystem/DependencyMissingTest.php    |   2 +-
 .../UpdateSystem/DependencyOrderingTest.php   |   4 +-
 .../UpdateSystem/EntityUpdateInitialTest.php  |   2 +-
 .../UpdateSystem/InvalidUpdateHookTest.php    |   2 +-
 .../NoPreExistingSchemaUpdateTest.php         |   2 +-
 .../UpdateSystem/RebuildScriptTest.php        |   2 +-
 .../UpdateSystem/UpdateCacheTest.php          |   2 +-
 .../UpdatePathLastRemovedTest.php             |   2 +-
 .../UpdatePathNewDependencyTest.php           |   2 +-
 .../UpdatePathTestBaseFilledTest.php          |   4 +-
 .../UpdatePathTestJavaScriptTest.php          |   2 +-
 .../UpdatePathWithBrokenRoutingTest.php       |   2 +-
 .../UpdatePostUpdateExceptionTest.php         |   2 +-
 .../UpdatePostUpdateFailingTest.php           |   2 +-
 .../UpdateSystem/UpdatePostUpdateTest.php     |   2 +-
 .../UpdateRemovedPostUpdateTest.php           |   2 +-
 .../UpdateSystem/UpdateSchemaTest.php         |   2 +-
 .../UpdateSystem/UpdateScriptTest.php         |  18 +-
 .../UpdateSystem/UpdatesWith7xTest.php        |   2 +-
 .../CopyFieldValueTest.php                    |   2 +-
 .../Form/ElementsTableSelectTest.php          |   4 +-
 .../FunctionalJavascript/Form/RebuildTest.php |   2 +-
 .../Form/TriggeringElementTest.php            |   4 +-
 .../FunctionalJavascript/FrameworkTest.php    |   6 +-
 .../ModalRendererTest.php                     |   4 +-
 .../FunctionalJavascript/ModuleFilterTest.php |   2 +-
 .../ModuleUninstallFilterTest.php             |   2 +-
 .../FunctionalJavascript/OffCanvasTest.php    |   4 +-
 .../System/DateFormatTest.php                 |   2 +-
 .../ThemeSettingsFormTest.php                 |   2 +-
 .../tests/src/Kernel/Action/ActionTest.php    |   4 +-
 .../src/Kernel/Block/SystemMenuBlockTest.php  |   6 +-
 .../tests/src/Kernel/Common/AddFeedTest.php   |   4 +-
 .../Kernel/Common/FormElementsRenderTest.php  |   2 +-
 .../src/Kernel/Common/PageRenderTest.php      |   4 +-
 .../src/Kernel/Common/SystemListingTest.php   |   4 +-
 .../tests/src/Kernel/Common/UrlTest.php       |  14 +-
 .../DateFormatAccessControlHandlerTest.php    |   2 +-
 .../tests/src/Kernel/DecoratedServiceTest.php |   2 +-
 .../Kernel/Entity/ConfigEntityImportTest.php  |   2 +-
 .../src/Kernel/Entity/EntityLabelTest.php     |   2 +-
 ...ityReferenceSelectionReferenceableTest.php |   2 +-
 .../Kernel/Extension/ModuleHandlerTest.php    |  16 +-
 .../src/Kernel/Form/ElementsFieldsetTest.php  |   2 +-
 .../tests/src/Kernel/Form/FileElementTest.php |   2 +-
 .../src/Kernel/Form/FormElementLabelTest.php  |   2 +-
 .../Kernel/Form/FormElementMaxlengthTest.php  |   2 +-
 .../src/Kernel/Form/ProgrammaticTest.php      |   4 +-
 .../InstallTranslationFilePatternTest.php     |   4 +-
 .../InstallerDependenciesResolutionTest.php   |   2 +-
 .../Kernel/Installer/UninstallKernelTest.php  |   4 +-
 .../system/tests/src/Kernel/Mail/MailTest.php |  12 +-
 .../tests/src/Kernel/Menu/MenuStorageTest.php |   2 +-
 .../Kernel/MenuAccessControlHandlerTest.php   |   2 +-
 .../Migrate/d6/MigrateActionConfigsTest.php   |   2 +-
 .../Kernel/Migrate/d6/MigrateActionsTest.php  |   2 +-
 .../Migrate/d6/MigrateDateFormatTest.php      |   2 +-
 .../src/Kernel/Migrate/d6/MigrateMenuTest.php |   2 +-
 .../d6/MigrateSystemConfigurationTest.php     |   2 +-
 .../Migrate/d7/MigrateActionConfigsTest.php   |   2 +-
 .../Kernel/Migrate/d7/MigrateActionsTest.php  |   2 +-
 .../d7/MigrateGlobalThemeSettingsTest.php     |   2 +-
 .../src/Kernel/Migrate/d7/MigrateMenuTest.php |   2 +-
 .../Migrate/d7/MigrateMenuTranslationTest.php |   2 +-
 .../d7/MigrateSystemConfigurationTest.php     |   2 +-
 .../Migrate/d7/MigrateThemeSettingsTest.php   |   2 +-
 .../tests/src/Kernel/Module/InstallTest.php   |   2 +-
 .../tests/src/Kernel/PermissionsTest.php      |   2 +-
 .../PhpStorage/PhpStorageFactoryTest.php      |   6 +-
 .../src/Kernel/Scripts/DbCommandBaseTest.php  |   8 +-
 .../Kernel/Scripts/DbImportCommandTest.php    |   2 +-
 .../Kernel/Scripts/DbToolsApplicationTest.php |   4 +-
 .../tests/src/Kernel/System/CronQueueTest.php |   6 +-
 .../tests/src/Kernel/System/FloodTest.php     |   6 +-
 .../tests/src/Kernel/System/InfoAlterTest.php |   2 +-
 .../tests/src/Kernel/Theme/FunctionsTest.php  |  10 +-
 .../tests/src/Kernel/Theme/ThemeTest.php      |  16 +-
 .../tests/src/Kernel/Theme/TwigFilterTest.php |   2 +-
 .../src/Kernel/Theme/TwigNamespaceTest.php    |   4 +-
 .../tests/src/Kernel/Theme/TwigRawTest.php    |   4 +-
 .../tests/src/Kernel/TimezoneResolverTest.php |   2 +-
 .../Kernel/Token/TokenReplaceKernelTest.php   |   8 +-
 .../src/Unit/Batch/BatchControllerTest.php    |   2 +-
 .../PathBasedBreadcrumbBuilderTest.php        |  16 +-
 .../SecurityFileUploadEventSubscriberTest.php |   4 +-
 .../Unit/FileTransfer/FileTransferTest.php    |   2 +-
 .../tests/src/Unit/Menu/MenuLinkTreeTest.php  |   2 +-
 .../src/Unit/Menu/SystemLocalTasksTest.php    |   2 +-
 .../src/Unit/Pager/PreprocessPagerTest.php    |  12 +-
 .../Unit/Routing/AdminRouteSubscriberTest.php |   2 +-
 .../system/tests/src/Unit/TraitAccessTest.php |   2 +-
 .../tests/src/Functional/EarlyDateTest.php    |   2 +-
 .../Functional/Rest/TermResourceTestBase.php  |   4 +-
 .../src/Functional/Rest/TermXmlAnonTest.php   |   2 +-
 .../Functional/Rest/TermXmlBasicAuthTest.php  |   2 +-
 .../src/Functional/Rest/TermXmlCookieTest.php |   2 +-
 .../taxonomy/tests/src/Functional/RssTest.php |   2 +-
 .../src/Functional/TaxonomyRevisionTest.php   |   2 +-
 .../TaxonomyTermIndentationTest.php           |   2 +-
 .../src/Functional/TaxonomyTermPagerTest.php  |   4 +-
 .../tests/src/Functional/TermAccessTest.php   |   2 +-
 .../src/Functional/TermAutocompleteTest.php   |   4 +-
 .../Functional/TermContextualLinksTest.php    |   2 +-
 .../tests/src/Functional/TermIndexTest.php    |   4 +-
 .../tests/src/Functional/TermLanguageTest.php |   6 +-
 .../tests/src/Functional/TermParentsTest.php  |   8 +-
 .../tests/src/Functional/TermTest.php         |  20 +-
 .../TermTranslationFieldViewTest.php          |   2 +-
 .../src/Functional/TermTranslationTest.php    |   4 +-
 .../src/Functional/TermTranslationUITest.php  |   4 +-
 .../tests/src/Functional/ThemeTest.php        |   2 +-
 .../Views/TaxonomyDefaultArgumentTest.php     |   2 +-
 .../Views/TaxonomyFieldAllTermsTest.php       |   4 +-
 .../Views/TaxonomyFieldFilterTest.php         |   2 +-
 .../Views/TaxonomyIndexTidUiTest.php          |  10 +-
 .../Functional/Views/TaxonomyParentUITest.php |   2 +-
 .../Views/TaxonomyRelationshipTest.php        |   2 +-
 .../Views/TaxonomyTermArgumentDepthTest.php   |   2 +-
 .../Functional/Views/TaxonomyTermViewTest.php |   2 +-
 .../Views/TaxonomyVocabularyArgumentTest.php  |   2 +-
 .../Views/TermDisplayConfigurableTest.php     |   2 +-
 .../Functional/Views/TermNameFieldTest.php    |   2 +-
 .../Views/TermTranslationViewsTest.php        |   2 +-
 .../src/Functional/VocabularyLanguageTest.php |   4 +-
 .../Functional/VocabularyPermissionsTest.php  |   6 +-
 .../VocabularySerializationTest.php           |   2 +-
 .../Functional/VocabularyTranslationTest.php  |   2 +-
 .../tests/src/Functional/VocabularyUiTest.php |   8 +-
 .../ContextProvider/TermContextTest.php       |   4 +-
 .../tests/src/Kernel/LoadMultipleTest.php     |   2 +-
 .../Migrate/MigrateTaxonomyConfigsTest.php    |   2 +-
 .../Migrate/MigrateTaxonomyTermStubTest.php   |   4 +-
 .../Migrate/TaxonomyTermDeriverTest.php       |   2 +-
 .../Migrate/d6/MigrateTaxonomyTermTest.php    |   2 +-
 .../d6/MigrateTaxonomyVocabularyTest.php      |   2 +-
 ...grateTaxonomyVocabularyTranslationTest.php |   2 +-
 .../MigrateTermLocalizedTranslationTest.php   |   2 +-
 .../Migrate/d6/MigrateTermNodeComplete.php    |   2 +-
 .../d6/MigrateTermNodeRevisionTest.php        |   2 +-
 .../Kernel/Migrate/d6/MigrateTermNodeTest.php |   4 +-
 .../d6/MigrateTermNodeTranslationTest.php     |   2 +-
 .../d6/MigrateVocabularyEntityDisplayTest.php |   4 +-
 ...MigrateVocabularyEntityFormDisplayTest.php |   4 +-
 .../d6/MigrateVocabularyFieldInstanceTest.php |   4 +-
 .../Migrate/d6/MigrateVocabularyFieldTest.php |   2 +-
 .../Migrate/d7/MigrateNodeTaxonomyTest.php    |   2 +-
 .../Migrate/d7/MigrateTaxonomyTermTest.php    |   2 +-
 .../d7/MigrateTaxonomyTermTranslationTest.php |   2 +-
 .../d7/MigrateTaxonomyVocabularyTest.php      |   2 +-
 ...grateTaxonomyVocabularyTranslationTest.php |   2 +-
 .../MigrateTermLocalizedTranslationTest.php   |   2 +-
 .../tests/src/Kernel/PendingRevisionTest.php  |   2 +-
 .../src/Kernel/TaxonomyQueryAlterTest.php     |   2 +-
 .../tests/src/Kernel/TermEntityQueryTest.php  |   2 +-
 .../src/Kernel/TermEntityReferenceTest.php    |   2 +-
 .../Kernel/TermHierarchyValidationTest.php    |   2 +-
 .../tests/src/Kernel/TermKernelTest.php       |   8 +-
 .../tests/src/Kernel/TermValidationTest.php   |   2 +-
 .../tests/src/Kernel/TokenReplaceTest.php     |   2 +-
 .../Views/ArgumentTransformTermTest.php       |   2 +-
 .../Views/ArgumentValidatorTermNameTest.php   |   4 +-
 .../Views/ArgumentValidatorTermTest.php       |   2 +-
 .../Views/TaxonomyDefaultArgumentTest.php     |   6 +-
 .../src/Kernel/Views/TaxonomyFieldTidTest.php |   2 +-
 .../src/Kernel/Views/TaxonomyFieldVidTest.php |   2 +-
 .../Views/TaxonomyIndexTidFilterTest.php      |   2 +-
 .../Views/TaxonomyViewsFieldAccessTest.php    |   2 +-
 .../tests/src/Kernel/VocabularyCrudTest.php   |   6 +-
 .../src/Unit/Menu/TaxonomyLocalTasksTest.php  |   2 +-
 .../field/TaxonomyTermReferenceFieldTest.php  |   2 +-
 .../src/Functional/TelephoneFieldTest.php     |   4 +-
 .../tests/src/Kernel/TelephoneItemTest.php    |   2 +-
 .../tests/src/Functional/TextFieldTest.php    |  10 +-
 .../TextareaWithSummaryTest.php               |   4 +-
 .../Kernel/Migrate/MigrateTextConfigsTest.php |   2 +-
 .../tests/src/Kernel/TextFormatterTest.php    |   2 +-
 .../tests/src/Kernel/TextItemBaseTest.php     |   4 +-
 .../text/tests/src/Kernel/TextSummaryTest.php |  12 +-
 .../src/Kernel/TextWithSummaryItemTest.php    |   2 +-
 .../Plugin/migrate/field/d6/TextFieldTest.php |   8 +-
 .../Plugin/migrate/field/d7/TextFieldTest.php |   2 +-
 .../src/Functional/ToolbarAdminMenuTest.php   |  18 +-
 .../Functional/ToolbarCacheContextsTest.php   |   4 +-
 .../src/Functional/ToolbarHookToolbarTest.php |   2 +-
 .../Functional/ToolbarMenuTranslationTest.php |   2 +-
 .../ToolbarActiveTrailTest.php                |   2 +-
 .../ToolbarIntegrationTest.php                |   4 +-
 .../ToolbarStoredStateTest.php                |   2 +-
 .../Unit/PageCache/AllowToolbarPathTest.php   |   2 +-
 .../FileTransferAuthorizeFormTest.php         |   2 +-
 .../src/Functional/UpdateContribTest.php      |  28 +--
 .../Functional/UpdateManagerUpdateTest.php    |   4 +-
 .../UpdateSemverCoreSecurityCoverageTest.php  |   2 +-
 .../src/Functional/UpdateSemverCoreTest.php   |  10 +-
 .../UpdateSemverTestBaselineTrait.php         |  10 +-
 ...ateSemverTestSecurityAvailabilityTrait.php |   2 +-
 .../src/Functional/UpdateSettingsFormTest.php |   2 +-
 .../tests/src/Functional/UpdateUploadTest.php |   8 +-
 .../Migrate/d6/MigrateUpdateConfigsTest.php   |   2 +-
 .../Kernel/UpdateDeleteFileIfStaleTest.php    |   2 +-
 .../tests/src/Kernel/UpdateReportTest.php     |   6 +-
 .../tests/src/Kernel/UpdateStorageTest.php    |   2 +-
 .../src/Unit/Menu/UpdateLocalTasksTest.php    |   6 +-
 .../src/Unit/ProjectCoreCompatibilityTest.php |   2 +-
 .../tests/src/Unit/UpdateFetcherTest.php      |   6 +-
 .../update/tests/src/Unit/UpdateMailTest.php  |   2 +-
 .../tests/src/Functional/AccessRoleUITest.php |   2 +-
 .../Functional/Rest/UserResourceTestBase.php  |   4 +-
 .../src/Functional/Rest/UserXmlAnonTest.php   |   2 +-
 .../Functional/Rest/UserXmlBasicAuthTest.php  |   4 +-
 .../src/Functional/Rest/UserXmlCookieTest.php |   4 +-
 .../src/Functional/UserAccountLinksTest.php   |   8 +-
 .../src/Functional/UserAdminLanguageTest.php  |   8 +-
 .../src/Functional/UserAdminListingTest.php   |   2 +-
 .../tests/src/Functional/UserAdminTest.php    |   4 +-
 .../tests/src/Functional/UserBlocksTest.php   |   4 +-
 .../tests/src/Functional/UserCancelTest.php   |  30 +--
 .../src/Functional/UserCreateFailMailTest.php |   2 +-
 .../tests/src/Functional/UserCreateTest.php   |   2 +-
 .../tests/src/Functional/UserEditTest.php     |  14 +-
 .../Functional/UserEditedOwnAccountTest.php   |   2 +-
 .../Functional/UserLanguageCreationTest.php   |   2 +-
 .../tests/src/Functional/UserLanguageTest.php |   2 +-
 .../src/Functional/UserLoginHttpTest.php      |   4 +-
 .../tests/src/Functional/UserLoginTest.php    |  14 +-
 .../src/Functional/UserPasswordResetTest.php  |  20 +-
 .../Functional/UserPermissionsAdminTest.php   |   2 +-
 .../src/Functional/UserPermissionsTest.php    |  12 +-
 .../tests/src/Functional/UserPictureTest.php  |   6 +-
 .../Functional/UserRegistrationRestTest.php   |   2 +-
 .../src/Functional/UserRegistrationTest.php   |  14 +-
 .../src/Functional/UserRoleAdminTest.php      |   4 +-
 .../Functional/UserRolesAssignmentTest.php    |   4 +-
 .../tests/src/Functional/UserSearchTest.php   |   2 +-
 .../tests/src/Functional/UserSubAdminTest.php |   2 +-
 .../tests/src/Functional/UserTimeZoneTest.php |   2 +-
 .../src/Functional/UserTokenReplaceTest.php   |   2 +-
 .../src/Functional/UserTranslationUITest.php  |   2 +-
 .../src/Functional/Views/AccessRoleTest.php   |   4 +-
 .../Functional/Views/BulkFormAccessTest.php   |   4 +-
 .../src/Functional/Views/BulkFormTest.php     |   4 +-
 .../Views/FilterPermissionUiTest.php          |   2 +-
 .../Functional/Views/HandlerFieldRoleTest.php |   2 +-
 .../Views/HandlerFieldUserNameTest.php        |   4 +-
 .../Views/HandlerFilterUserNameTest.php       |   6 +-
 .../Functional/Views/RolesRidArgumentTest.php |   2 +-
 .../src/Functional/Views/UserChangedTest.php  |   2 +-
 .../Views/UserFieldsAccessChangeTest.php      |   4 +-
 .../PasswordConfirmWidgetTest.php             |   6 +-
 .../PermissionFilterTest.php                  |   2 +-
 .../RegistrationWithUserFieldsTest.php        |   2 +-
 .../UserPasswordResetTest.php                 |   2 +-
 .../UserPermissionsTest.php                   |   2 +-
 .../Condition/UserRoleConditionTest.php       |   2 +-
 .../CurrentUserContextTest.php                |   2 +-
 .../Kernel/Controller/UserControllerTest.php  |   2 +-
 .../Kernel/Field/UserNameFormatterTest.php    |   2 +-
 .../Migrate/MigrateUserAdminPassTest.php      |   2 +-
 .../Kernel/Migrate/MigrateUserStubTest.php    |   2 +-
 ...grateProfileFieldOptionTranslationTest.php |   2 +-
 .../Migrate/d6/MigrateUserConfigsTest.php     |   2 +-
 .../d6/MigrateUserContactSettingsTest.php     |   2 +-
 .../d6/MigrateUserPictureD6FileTest.php       |   2 +-
 .../MigrateUserProfileEntityDisplayTest.php   |   2 +-
 ...igrateUserProfileEntityFormDisplayTest.php |   2 +-
 .../MigrateUserProfileFieldInstanceTest.php   |   2 +-
 .../d6/MigrateUserProfileFieldTest.php        |   2 +-
 .../d6/MigrateUserProfileValuesTest.php       |   2 +-
 .../Kernel/Migrate/d6/MigrateUserRoleTest.php |   2 +-
 .../src/Kernel/Migrate/d6/MigrateUserTest.php |   2 +-
 .../d6/ProfileFieldCheckRequirementsTest.php  |   2 +-
 .../Migrate/d7/MigrateUserFloodTest.php       |   2 +-
 .../Kernel/Migrate/d7/MigrateUserMailTest.php |   2 +-
 .../MigrateUserPictureEntityDisplayTest.php   |   2 +-
 ...igrateUserPictureEntityFormDisplayTest.php |   2 +-
 .../MigrateUserPictureFieldInstanceTest.php   |   2 +-
 .../d7/MigrateUserPictureFieldTest.php        |   2 +-
 .../Kernel/Migrate/d7/MigrateUserRoleTest.php |   2 +-
 .../Migrate/d7/MigrateUserSettingsTest.php    |   2 +-
 .../src/Kernel/Migrate/d7/MigrateUserTest.php |   2 +-
 .../d7/ProfileFieldCheckRequirementsTest.php  |   2 +-
 .../Migrate/d7/UserMigrationClassTest.php     |   2 +-
 .../src/Kernel/UserAccountFormFieldsTest.php  |   6 +-
 .../UserAccountFormPasswordResetTest.php      |   2 +-
 .../src/Kernel/UserActionConfigSchemaTest.php |   2 +-
 .../src/Kernel/UserAnonymousActivateTest.php  |   2 +-
 .../user/tests/src/Kernel/UserDeleteTest.php  |   2 +-
 .../tests/src/Kernel/UserEntityLabelTest.php  |   2 +-
 .../src/Kernel/UserEntityReferenceTest.php    |   2 +-
 .../user/tests/src/Kernel/UserEntityTest.php  |   6 +-
 .../user/tests/src/Kernel/UserFieldsTest.php  |   2 +-
 .../user/tests/src/Kernel/UserInstallTest.php |   2 +-
 .../tests/src/Kernel/UserMailDefaultsTest.php |   2 +-
 .../tests/src/Kernel/UserMailNotifyTest.php   |   6 +-
 .../tests/src/Kernel/UserRoleDeleteTest.php   |   4 +-
 .../tests/src/Kernel/UserRoleEntityTest.php   |   6 +-
 .../tests/src/Kernel/UserSaveStatusTest.php   |   2 +-
 .../user/tests/src/Kernel/UserSaveTest.php    |   2 +-
 .../tests/src/Kernel/UserValidationTest.php   |   4 +-
 .../src/Kernel/Views/AccessPermissionTest.php |   4 +-
 .../src/Kernel/Views/ArgumentDefaultTest.php  |   2 +-
 .../src/Kernel/Views/ArgumentValidateTest.php |   4 +-
 .../Views/HandlerArgumentUserUidTest.php      |   2 +-
 .../Views/HandlerFieldPermissionTest.php      |   2 +-
 .../Views/HandlerFilterCurrentUserTest.php    |   4 +-
 .../Views/HandlerFilterPermissionTest.php     |   2 +-
 .../Kernel/Views/HandlerFilterRolesTest.php   |   4 +-
 .../RelationshipRepresentativeNodeTest.php    |   2 +-
 .../tests/src/Kernel/Views/UserDataTest.php   |   2 +-
 .../tests/src/Kernel/Views/UserRoleTest.php   |   2 +-
 .../src/Kernel/Views/UserViewsDataTest.php    |   2 +-
 .../Kernel/Views/UserViewsFieldAccessTest.php |   2 +-
 .../tests/src/Kernel/WhoIsOnlineBlockTest.php |   2 +-
 .../Unit/Form/EntityPermissionsFormTest.php   |   2 +-
 .../src/Unit/Menu/UserLocalTasksTest.php      |   6 +-
 .../src/Unit/PermissionAccessCheckTest.php    |   2 +-
 .../tests/src/Unit/PermissionHandlerTest.php  |   8 +-
 .../Unit/Plugin/Action/AddRoleUserTest.php    |   4 +-
 .../Unit/Plugin/Action/RemoveRoleUserTest.php |   4 +-
 .../src/Unit/Plugin/Core/Entity/UserTest.php  |   2 +-
 .../Plugin/Derivative/UserLocalTaskTest.php   |   2 +-
 ...tectedUserFieldConstraintValidatorTest.php |   2 +-
 .../UserMailRequiredValidatorTest.php         |   2 +-
 .../migrate/process/ConvertTokensTest.php     |   4 +-
 .../Plugin/views/field/UserBulkFormTest.php   |   2 +-
 .../src/Unit/Theme/AdminNegotiatorTest.php    |   2 +-
 .../tests/src/Unit/ToolbarLinkBuilderTest.php |   2 +-
 .../src/Unit/UserAccessControlHandlerTest.php |  12 +-
 .../user/tests/src/Unit/UserAuthTest.php      |  12 +-
 .../src/Unit/UserRegistrationResourceTest.php |   8 +-
 .../src/Unit/Views/Argument/RolesRidTest.php  |   2 +-
 .../tests/src/Functional/BulkFormTest.php     |   2 +-
 .../tests/src/Functional/DefaultViewsTest.php |   4 +-
 .../Functional/Entity/BaseFieldAccessTest.php |   2 +-
 .../Entity/EntityQueryAccessTest.php          |   4 +-
 .../src/Functional/Entity/FieldEntityTest.php |   2 +-
 .../Entity/FieldEntityTranslationTest.php     |   2 +-
 .../FieldRenderedEntityTranslationTest.php    |   2 +-
 .../Entity/ViewNonTranslatableEntityTest.php  |   2 +-
 .../tests/src/Functional/GlossaryTest.php     |   2 +-
 .../Handler/AreaHTTPStatusCodeTest.php        |   2 +-
 .../tests/src/Functional/Handler/AreaTest.php |   6 +-
 .../Functional/Handler/AreaTitleWebTest.php   |   2 +-
 .../Handler/FieldDropButtonTest.php           |   2 +-
 .../Handler/FieldEntityLinkBaseTest.php       |   2 +-
 .../Handler/FieldEntityOperationsTest.php     |   2 +-
 .../Handler/FieldGroupRowsWebTest.php         |   4 +-
 .../src/Functional/Handler/FieldWebTest.php   |  10 +-
 .../src/Functional/Handler/FilterDateTest.php |   4 +-
 .../Handler/FilterPlaceholderTextTest.php     |   2 +-
 .../src/Functional/Handler/HandlerTest.php    |  12 +-
 .../src/Functional/Plugin/AccessTest.php      |   4 +-
 .../Functional/Plugin/ArgumentDefaultTest.php |  12 +-
 .../src/Functional/Plugin/CacheTagTest.php    |   2 +-
 .../src/Functional/Plugin/CacheWebTest.php    |   4 +-
 .../ContextualFiltersBlockContextTest.php     |   2 +-
 .../Plugin/ContextualFiltersStringTest.php    |   2 +-
 .../Functional/Plugin/DisabledDisplayTest.php |   2 +-
 .../Plugin/DisplayAttachmentTest.php          |   4 +-
 .../Plugin/DisplayEntityReferenceTest.php     |   2 +-
 .../src/Functional/Plugin/DisplayFeedTest.php |   8 +-
 .../Plugin/DisplayFeedTranslationTest.php     |   2 +-
 .../Functional/Plugin/DisplayPageWebTest.php  |   8 +-
 .../src/Functional/Plugin/DisplayTest.php     |  18 +-
 .../Plugin/ExposedFormCheckboxesTest.php      |   4 +-
 .../src/Functional/Plugin/ExposedFormTest.php |  20 +-
 .../src/Functional/Plugin/FilterTest.php      |   6 +-
 .../src/Functional/Plugin/MenuLinkTest.php    |   2 +-
 .../src/Functional/Plugin/MiniPagerTest.php   |   4 +-
 .../Functional/Plugin/MonthDatePluginTest.php |   2 +-
 .../Plugin/NumericFormatPluralTest.php        |   2 +-
 .../tests/src/Functional/Plugin/PagerTest.php |  20 +-
 .../Functional/Plugin/QueryOptionsTest.php    |   2 +-
 .../Functional/Plugin/StyleSummaryTest.php    |   2 +-
 .../src/Functional/Plugin/StyleTableTest.php  |  14 +-
 .../src/Functional/Plugin/ViewsBulkTest.php   |   2 +-
 .../src/Functional/Plugin/ViewsFormTest.php   |   2 +-
 .../src/Functional/RenderCacheWebTest.php     |   4 +-
 .../src/Functional/SearchIntegrationTest.php  |   2 +-
 .../src/Functional/SearchMultilingualTest.php |   2 +-
 .../src/Functional/TaxonomyGlossaryTest.php   |   2 +-
 .../src/Functional/UserBatchActionTest.php    |   2 +-
 .../tests/src/Functional/UserPathTest.php     |   2 +-
 .../tests/src/Functional/ViewAjaxTest.php     |   4 +-
 .../tests/src/Functional/ViewElementTest.php  |   4 +-
 .../src/Functional/ViewTranslationTest.php    |   2 +-
 .../src/Functional/ViewsEscapingTest.php      |   4 +-
 .../src/Functional/ViewsFormAlterTest.php     |   2 +-
 .../src/Functional/ViewsFormMultipleTest.php  |   2 +-
 .../Functional/ViewsNoResultsBehaviorTest.php |   2 +-
 .../Functional/ViewsThemeIntegrationTest.php  |   2 +-
 .../tests/src/Functional/Wizard/BasicTest.php |   4 +-
 .../Wizard/EntityTestRevisionTest.php         |   2 +-
 .../Functional/Wizard/ItemsPerPageTest.php    |   2 +-
 .../tests/src/Functional/Wizard/MenuTest.php  |   2 +-
 .../src/Functional/Wizard/NodeWizardTest.php  |   2 +-
 .../tests/src/Functional/Wizard/PagerTest.php |   2 +-
 .../src/Functional/Wizard/SortingTest.php     |   2 +-
 .../src/Functional/Wizard/TaggedWithTest.php  |   6 +-
 .../BlockExposedFilterAJAXTest.php            |   2 +-
 .../ClickSortingAJAXTest.php                  |   2 +-
 .../ExposedFilterAJAXTest.php                 |   6 +-
 .../FunctionalJavascript/GlossaryViewTest.php |   4 +-
 .../PaginationAJAXTest.php                    |   4 +-
 .../Plugin/BulkOperationsTest.php             |   2 +-
 .../views/Handler/ContextualFilterTest.php    |   2 +-
 .../Plugin/views/Handler/FieldTest.php        |   2 +-
 .../Plugin/views/Handler/FilterTest.php       |   2 +-
 .../Handler/GroupedExposedFilterTest.php      |   2 +-
 .../FunctionalJavascript/RedirectAjaxTest.php |   2 +-
 .../views/tests/src/Kernel/BasicTest.php      |   6 +-
 .../CacheableMetadataCalculationTest.php      |   2 +-
 .../src/Kernel/Entity/EntityViewsDataTest.php |  16 +-
 ...EntityViewsWithMultivalueBasefieldTest.php |   2 +-
 .../Kernel/Entity/FilterEntityBundleTest.php  |   2 +-
 .../Entity/LatestRevisionFilterTest.php       |   2 +-
 .../LatestTranslationAffectedRevisionTest.php |   2 +-
 .../Kernel/Entity/RowEntityRenderersTest.php  |  10 +-
 .../Entity/ViewEntityDependenciesTest.php     |   2 +-
 ...sEntitySchemaSubscriberIntegrationTest.php |  24 +--
 .../tests/src/Kernel/FieldApiDataTest.php     |   4 +-
 .../Kernel/Handler/AreaDisplayLinkTest.php    |   2 +-
 .../src/Kernel/Handler/AreaEmptyTest.php      |   2 +-
 .../src/Kernel/Handler/AreaEntityTest.php     |   4 +-
 .../src/Kernel/Handler/AreaMessagesTest.php   |   2 +-
 .../src/Kernel/Handler/AreaOrderTest.php      |   2 +-
 .../src/Kernel/Handler/AreaResultTest.php     |   4 +-
 .../tests/src/Kernel/Handler/AreaTest.php     |   4 +-
 .../tests/src/Kernel/Handler/AreaTextTest.php |   2 +-
 .../src/Kernel/Handler/AreaTitleTest.php      |   2 +-
 .../tests/src/Kernel/Handler/AreaViewTest.php |   2 +-
 .../src/Kernel/Handler/ArgumentDateTest.php   |  12 +-
 .../src/Kernel/Handler/ArgumentNullTest.php   |   2 +-
 .../src/Kernel/Handler/ArgumentStringTest.php |   2 +-
 .../Handler/ComputedBundleFieldTest.php       |   2 +-
 .../src/Kernel/Handler/ComputedFieldTest.php  |   2 +-
 .../EntityTestViewsFieldAccessTest.php        |   2 +-
 .../src/Kernel/Handler/FieldBooleanTest.php   |   2 +-
 .../src/Kernel/Handler/FieldCounterTest.php   |   4 +-
 .../src/Kernel/Handler/FieldCustomTest.php    |   6 +-
 .../src/Kernel/Handler/FieldDateTest.php      |   2 +-
 .../Kernel/Handler/FieldDropbuttonTest.php    |   2 +-
 .../Kernel/Handler/FieldEntityLinkTest.php    |   2 +-
 .../src/Kernel/Handler/FieldFieldTest.php     |  30 +--
 .../src/Kernel/Handler/FieldFileSizeTest.php  |   2 +-
 .../src/Kernel/Handler/FieldGroupRowsTest.php |   2 +-
 .../src/Kernel/Handler/FieldKernelTest.php    |  24 +--
 .../src/Kernel/Handler/FieldNumericTest.php   |   2 +-
 .../Handler/FieldRenderedEntityTest.php       |   2 +-
 .../Kernel/Handler/FieldSelfTokensTest.php    |   2 +-
 .../tests/src/Kernel/Handler/FieldUrlTest.php |   2 +-
 .../FilterBooleanOperatorDefaultTest.php      |   2 +-
 .../FilterBooleanOperatorStringTest.php       |   4 +-
 .../Handler/FilterBooleanOperatorTest.php     |   4 +-
 .../src/Kernel/Handler/FilterCombineTest.php  |  26 +--
 .../src/Kernel/Handler/FilterEqualityTest.php |   8 +-
 .../Kernel/Handler/FilterInOperatorTest.php   |  10 +-
 .../src/Kernel/Handler/FilterNumericTest.php  |  26 +--
 .../src/Kernel/Handler/FilterStringTest.php   |  52 ++---
 .../src/Kernel/Handler/HandlerAliasTest.php   |   2 +-
 .../tests/src/Kernel/Handler/SortDateTest.php |   2 +-
 .../src/Kernel/Handler/SortRandomTest.php     |   4 +-
 .../tests/src/Kernel/Handler/SortTest.php     |   4 +-
 .../Kernel/Handler/SortTranslationTest.php    |   2 +-
 .../views/tests/src/Kernel/ModuleTest.php     |  14 +-
 .../Kernel/Plugin/ArgumentValidatorTest.php   |   4 +-
 .../Kernel/Plugin/BlockDependenciesTest.php   |   4 +-
 .../tests/src/Kernel/Plugin/CacheTest.php     |  18 +-
 .../Plugin/CastedIntFieldJoinTestBase.php     |   2 +-
 .../Plugin/Display/ViewsMenuLinkTest.php      |   2 +-
 .../src/Kernel/Plugin/DisplayExtenderTest.php |   4 +-
 .../src/Kernel/Plugin/DisplayKernelTest.php   |   6 +-
 .../src/Kernel/Plugin/DisplayPageTest.php     |  12 +-
 .../Kernel/Plugin/ExposedFormRenderTest.php   |   4 +-
 .../Kernel/Plugin/FieldOrLanguageJoinTest.php |   4 +-
 .../tests/src/Kernel/Plugin/JoinTest.php      |   4 +-
 .../src/Kernel/Plugin/PagerKernelTest.php     |   2 +-
 .../src/Kernel/Plugin/PluginBaseTest.php      |   6 +-
 .../tests/src/Kernel/Plugin/QueryTest.php     |   2 +-
 .../Kernel/Plugin/RelationshipJoinInTest.php  |   2 +-
 .../src/Kernel/Plugin/RelationshipTest.php    |   4 +-
 .../tests/src/Kernel/Plugin/RowEntityTest.php |   2 +-
 .../src/Kernel/Plugin/RowRenderCacheTest.php  |   4 +-
 .../tests/src/Kernel/Plugin/RssFieldsTest.php |   2 +-
 .../Kernel/Plugin/SqlEntityLoadingTest.php    |   2 +-
 .../tests/src/Kernel/Plugin/SqlQueryTest.php  |   4 +-
 .../src/Kernel/Plugin/StyleFieldsTest.php     |   2 +-
 .../tests/src/Kernel/Plugin/StyleGridTest.php |   2 +-
 .../src/Kernel/Plugin/StyleHtmlListTest.php   |   2 +-
 .../src/Kernel/Plugin/StyleMappingTest.php    |   2 +-
 .../src/Kernel/Plugin/StyleTableUnitTest.php  |   2 +-
 .../tests/src/Kernel/Plugin/StyleTest.php     |   6 +-
 .../Kernel/Plugin/StyleUnformattedTest.php    |   2 +-
 .../src/Kernel/Plugin/ViewsBlockTest.php      |   8 +-
 .../Kernel/Plugin/ViewsSqlExceptionTest.php   |   2 +-
 .../tests/src/Kernel/PluginInstanceTest.php   |   4 +-
 .../tests/src/Kernel/QueryGroupByTest.php     |  24 +--
 .../src/Kernel/RenderCacheIntegrationTest.php |  16 +-
 .../views/tests/src/Kernel/TestViewsTest.php  |   2 +-
 .../tests/src/Kernel/TokenReplaceTest.php     |   8 +-
 .../tests/src/Kernel/ViewElementTest.php      |   6 +-
 .../tests/src/Kernel/ViewExecutableTest.php   |  28 +--
 .../views/tests/src/Kernel/ViewRenderTest.php |   2 +-
 .../tests/src/Kernel/ViewStorageTest.php      |   4 +-
 ...ViewsConfigDependenciesIntegrationTest.php |   6 +-
 .../views/tests/src/Kernel/ViewsDataTest.php  |   2 +-
 .../views/tests/src/Kernel/ViewsHooksTest.php |   6 +-
 .../tests/src/Kernel/ViewsPreprocessTest.php  |   8 +-
 .../tests/src/Kernel/ViewsTemplateTest.php    |   4 +-
 .../Wizard/WizardPluginBaseKernelTest.php     |   2 +-
 .../Controller/ViewAjaxControllerTest.php     |  20 +-
 .../EventSubscriber/RouteSubscriberTest.php   |   4 +-
 .../src/Unit/Plugin/Block/ViewsBlockTest.php  |   6 +-
 .../Plugin/Derivative/ViewsLocalTaskTest.php  |  12 +-
 .../tests/src/Unit/Plugin/HandlerBaseTest.php |   4 +-
 .../tests/src/Unit/Plugin/area/EntityTest.php |  12 +-
 .../src/Unit/Plugin/area/MessagesTest.php     |   2 +-
 .../tests/src/Unit/Plugin/area/ResultTest.php |   4 +-
 .../tests/src/Unit/Plugin/area/ViewTest.php   |   2 +-
 .../argument_default/QueryParameterTest.php   |   2 +-
 .../Unit/Plugin/argument_default/RawTest.php  |   2 +-
 .../Plugin/argument_validator/EntityTest.php  |  10 +-
 .../src/Unit/Plugin/display/PageTest.php      |   4 +-
 .../Plugin/display/PathPluginBaseTest.php     |  28 +--
 .../src/Unit/Plugin/field/CounterTest.php     |   8 +-
 .../Unit/Plugin/field/FieldPluginBaseTest.php |  22 +--
 .../tests/src/Unit/Plugin/field/FieldTest.php |  26 +--
 .../Plugin/filter/FilterPluginBaseTest.php    |   2 +-
 .../src/Unit/Plugin/filter/InOperatorTest.php |   2 +-
 .../Unit/Plugin/pager/PagerPluginBaseTest.php |  30 +--
 .../src/Unit/Plugin/pager/SqlBaseTest.php     |   2 +-
 .../tests/src/Unit/Plugin/query/SqlTest.php   |  18 +-
 .../Unit/Plugin/views/display/BlockTest.php   |   4 +-
 .../views/field/EntityOperationsUnitTest.php  |  10 +-
 .../Plugin/views/query/MysqlDateSqlTest.php   |   8 +-
 .../views/query/PostgresqlDateSqlTest.php     |   8 +-
 .../Plugin/views/query/SqliteDateSqlTest.php  |   8 +-
 .../views/tests/src/Unit/PluginBaseTest.php   |   6 +-
 .../tests/src/Unit/PluginTypeListTest.php     |   2 +-
 .../Unit/Routing/ViewPageControllerTest.php   |   8 +-
 .../src/Unit/ViewExecutableFactoryTest.php    |   2 +-
 .../tests/src/Unit/ViewExecutableTest.php     |  38 ++--
 .../tests/src/Unit/ViewsDataHelperTest.php    |   2 +-
 .../views/tests/src/Unit/ViewsDataTest.php    |  30 +--
 .../src/Unit/ViewsHandlerManagerTest.php      |   8 +-
 .../views/tests/src/Unit/ViewsTest.php        |   6 +-
 .../tests/src/Unit/WizardPluginBaseTest.php   |   2 +-
 .../tests/src/Functional/AnalyzeTest.php      |   2 +-
 .../tests/src/Functional/AreaEntityUITest.php |   2 +-
 .../src/Functional/ArgumentValidatorTest.php  |   2 +-
 .../tests/src/Functional/CachedDataUITest.php |   2 +-
 .../src/Functional/CustomBooleanTest.php      |   4 +-
 .../tests/src/Functional/DefaultViewsTest.php |   6 +-
 .../src/Functional/DisplayAttachmentTest.php  |   4 +-
 .../tests/src/Functional/DisplayCRUDTest.php  |   8 +-
 .../src/Functional/DisplayExtenderUITest.php  |   2 +-
 .../tests/src/Functional/DisplayFeedTest.php  |   2 +-
 .../tests/src/Functional/DisplayPathTest.php  |   8 +-
 .../tests/src/Functional/DisplayTest.php      |  20 +-
 .../tests/src/Functional/DuplicateTest.php    |   2 +-
 .../src/Functional/ExposedFormUITest.php      |   8 +-
 .../tests/src/Functional/FieldUITest.php      |   4 +-
 .../src/Functional/FilterBooleanWebTest.php   |   2 +-
 .../src/Functional/FilterNumericWebTest.php   |   2 +-
 .../tests/src/Functional/FilterUITest.php     |   6 +-
 .../tests/src/Functional/GroupByTest.php      |   2 +-
 .../tests/src/Functional/HandlerTest.php      |  10 +-
 .../Functional/NewViewConfigSchemaTest.php    |   2 +-
 .../src/Functional/OverrideDisplaysTest.php   |   6 +-
 .../tests/src/Functional/PreviewTest.php      |  10 +-
 .../tests/src/Functional/QueryTest.php        |   2 +-
 .../src/Functional/RearrangeFieldsTest.php    |   2 +-
 .../tests/src/Functional/RedirectTest.php     |   2 +-
 .../tests/src/Functional/ReportFieldsTest.php |   2 +-
 .../tests/src/Functional/ReportTest.php       |   2 +-
 .../tests/src/Functional/RowUITest.php        |   2 +-
 .../tests/src/Functional/SettingsTest.php     |   2 +-
 .../tests/src/Functional/StorageTest.php      |   2 +-
 .../tests/src/Functional/StyleTableTest.php   |   2 +-
 .../tests/src/Functional/StyleUITest.php      |   2 +-
 .../src/Functional/TokenizeAreaUITest.php     |   2 +-
 .../src/Functional/TranslatedViewTest.php     |   2 +-
 .../src/Functional/UnsavedPreviewTest.php     |   2 +-
 .../tests/src/Functional/ViewEditTest.php     |   8 +-
 .../tests/src/Functional/ViewsListTest.php    |   2 +-
 .../tests/src/Functional/WizardTest.php       |   2 +-
 .../views_ui/tests/src/Functional/XssTest.php |   4 +-
 .../FunctionalJavascript/AdminAjaxTest.php    |   4 +-
 .../src/FunctionalJavascript/DisplayTest.php  |   8 +-
 .../FunctionalJavascript/FieldDialogsTest.php |   2 +-
 .../FilterCriteriaTest.php                    |   4 +-
 .../FilterOptionsTest.php                     |   2 +-
 .../src/FunctionalJavascript/PreviewTest.php  |   6 +-
 .../FunctionalJavascript/ViewsListingTest.php |   2 +-
 .../FunctionalJavascript/ViewsWizardTest.php  |   2 +-
 .../views_ui/tests/src/Kernel/TagTest.php     |   4 +-
 .../Unit/Form/Ajax/RearrangeFilterTest.php    |   2 +-
 .../tests/src/Unit/ViewListBuilderTest.php    |   2 +-
 .../tests/src/Unit/ViewUIObjectTest.php       |   6 +-
 ...orkflowCustomStateTransitionAccessTest.php |   2 +-
 .../src/Functional/WorkflowUiNoTypeTest.php   |   2 +-
 .../tests/src/Functional/WorkflowUiTest.php   |  12 +-
 .../src/Kernel/ComplexWorkflowTypeTest.php    |   2 +-
 .../src/Kernel/PredefinedWorkflowTypeTest.php |   2 +-
 .../tests/src/Kernel/RequiredStatesTest.php   |   8 +-
 .../WorkflowAccessControlHandlerTest.php      |   4 +-
 .../src/Kernel/WorkflowDependenciesTest.php   |   2 +-
 .../workflows/tests/src/Unit/StateTest.php    |  12 +-
 .../tests/src/Unit/TransitionTest.php         |   4 +-
 ...ateTransitionOperationsAccessCheckTest.php |   6 +-
 .../workflows/tests/src/Unit/WorkflowTest.php |  82 ++++----
 .../src/Functional/PathWorkspacesTest.php     |   6 +-
 .../Functional/Rest/WorkspaceXmlAnonTest.php  |   2 +-
 .../Rest/WorkspaceXmlBasicAuthTest.php        |   2 +-
 .../Rest/WorkspaceXmlCookieTest.php           |   2 +-
 .../ActiveWorkspaceUpdateTest.php             |   2 +-
 .../src/Functional/WorkspaceBypassTest.php    |   2 +-
 .../Functional/WorkspaceCacheContextTest.php  |   2 +-
 .../WorkspaceConcurrentEditingTest.php        |   2 +-
 ...orkspaceMenuLinkContentIntegrationTest.php |   2 +-
 .../Functional/WorkspacePermissionsTest.php   |  10 +-
 .../src/Functional/WorkspaceSwitcherTest.php  |   6 +-
 .../tests/src/Functional/WorkspaceTest.php    |  18 +-
 .../src/Functional/WorkspaceViewTest.php      |   4 +-
 .../Functional/WorkspaceViewsBulkFormTest.php |   2 +-
 .../Functional/WorkspacesUninstallTest.php    |   2 +-
 .../WorkspaceToolbarIntegrationTest.php       |   4 +-
 ...rtedNewEntitiesConstraintValidatorTest.php |   4 +-
 .../tests/src/Kernel/WorkspaceAccessTest.php  |   6 +-
 .../src/Kernel/WorkspaceAssociationTest.php   |   2 +-
 .../tests/src/Kernel/WorkspaceCRUDTest.php    |   8 +-
 .../src/Kernel/WorkspaceInformationTest.php   |   8 +-
 .../src/Kernel/WorkspaceIntegrationTest.php   |  28 +--
 .../tests/src/Kernel/WorkspaceMergerTest.php  |   2 +-
 .../src/Kernel/WorkspacePublishFormTest.php   |   2 +-
 .../src/Unit/ActiveWorkspaceCheckTest.php     |   2 +-
 .../Unit/WorkspaceRequestSubscriberTest.php   |   4 +-
 .../src/Functional/DemoUmamiProfileTest.php   |   6 +-
 .../UmamiMultilingualInstallTest.php          |   2 +-
 .../AssetAggregationAcrossPagesTest.php       |   4 +-
 .../OpenTelemetryFrontPagePerformanceTest.php |   6 +-
 .../OpenTelemetryNodePagePerformanceTest.php  |   8 +-
 .../tests/src/Functional/MinimalTest.php      |   2 +-
 .../StandardJavascriptTest.php                |   2 +-
 .../StandardPerformanceTest.php               |   2 +-
 .../tests/src/Traits/StandardTestTrait.php    |   2 +-
 .../BuildTests/Command/GenerateThemeTest.php  |   6 +-
 .../Composer/ComposerValidateTest.php         |   2 +-
 .../Template/ComposerProjectTemplatesTest.php |   6 +-
 .../Framework/Tests/BuildTestTest.php         |  12 +-
 .../Framework/Tests/HtRouterTest.php          |   2 +-
 .../TestSiteApplication/InstallTest.php       |   2 +-
 .../Ajax/AjaxCallbacksTest.php                |   4 +-
 .../Ajax/AjaxFormCacheTest.php                |   6 +-
 .../Ajax/AjaxFormImageButtonTest.php          |   4 +-
 .../Ajax/AjaxFormPageCacheTest.php            |   4 +-
 .../Ajax/AjaxInGroupTest.php                  |   2 +-
 .../Ajax/AjaxTest.php                         |  12 +-
 .../Ajax/CommandsTest.php                     |   2 +-
 .../Ajax/DialogTest.php                       |   2 +-
 .../Ajax/ElementValidationTest.php            |   2 +-
 .../Ajax/FocusFirstCommandTest.php            |   2 +-
 .../Ajax/FormValuesTest.php                   |   4 +-
 .../Ajax/MessageCommandTest.php               |   2 +-
 .../Ajax/MultiFormTest.php                    |   2 +-
 .../Ajax/ThrobberTest.php                     |   2 +-
 .../BrowserWithJavascriptTest.php             |   8 +-
 .../Components/ComponentRenderTest.php        |   4 +-
 .../Core/CsrfTokenRaceTest.php                |   2 +-
 .../Core/Form/FormGroupingElementsTest.php    |   6 +-
 .../Core/Form/JavascriptStatesTest.php        |   2 +-
 .../Core/JsMessageTest.php                    |   2 +-
 .../Core/MachineNameTest.php                  |   2 +-
 .../Core/Session/SessionTest.php              |   2 +-
 .../Dialog/DialogPositionTest.php             |   2 +-
 .../EntityReferenceAutocompleteWidgetTest.php |   4 +-
 .../JavascriptDeprecationTest.php             |   2 +-
 .../JavascriptGetDrupalSettingsTest.php       |   2 +-
 .../MachineNameTransliterationTest.php        |   2 +-
 .../TableDrag/TableDragTest.php               |  12 +-
 .../Tests/DrupalSelenium2DriverTest.php       |   2 +-
 .../Tests/JSInteractionTest.php               |   6 +-
 .../Tests/JSWebAssertTest.php                 |   2 +-
 .../Theme/ClaroEntityDisplayTest.php          |   6 +-
 .../Theme/ClaroMenuUiJavascriptTest.php       |   2 +-
 .../Theme/ClaroModalDisplayTest.php           |   2 +-
 .../Theme/ClaroPasswordConfirmWidgetTest.php  |   4 +-
 .../Theme/ClaroTableDragTest.php              |   2 +-
 .../Theme/ClaroViewsBulkOperationsTest.php    |   2 +-
 .../Theme/ClaroViewsUiTest.php                |   4 +-
 .../Theme/OliveroMessagesTest.php             |   2 +-
 .../Bootstrap/UncaughtExceptionTest.php       |  16 +-
 .../Breadcrumb/Breadcrumb404Test.php          |   2 +-
 .../FunctionalTests/BrowserTestBaseTest.php   |  38 ++--
 .../BrowserTestBaseUserAgentTest.php          |   2 +-
 .../Core/Container/ServiceDeprecationTest.php |   2 +-
 .../Core/Test/ModuleInstallBatchTest.php      |   2 +-
 .../Core/Test/PhpUnitBridgeTest.php           |   4 +-
 .../Datetime/TimestampAgoFormatterTest.php    |   2 +-
 .../Datetime/TimestampTest.php                |   2 +-
 ...erInputMappingOnFieldDeltaElementsTest.php |   2 +-
 ...EntityFormFieldValidationFilteringTest.php |   2 +-
 .../Entity/DeleteMultipleFormTest.php         |   4 +-
 .../Entity/EntityBundleListCacheTest.php      |   2 +-
 ...yleDatabaseConnectionInSettingsPhpTest.php |   4 +-
 .../Drupal/FunctionalTests/FolderTest.php     |   2 +-
 .../GetTestMethodCallerExtendsTest.php        |   2 +-
 .../GetTestMethodCallerTest.php               |   2 +-
 .../HttpKernel/CorsIntegrationTest.php        |   2 +-
 .../Image/ToolkitSetupFormTest.php            |   2 +-
 ...istributionProfileExistingSettingsTest.php |   2 +-
 .../Installer/DistributionProfileTest.php     |   2 +-
 ...istributionProfileTranslationQueryTest.php |   2 +-
 .../DistributionProfileTranslationTest.php    |   2 +-
 .../DrupalFlushAllCachesInInstallerTest.php   |   2 +-
 .../InstallProfileDependenciesTest.php        |   2 +-
 ...InstallerBrokenDatabaseCredentialsTest.php |   2 +-
 ...nstallerBrokenDatabasePortSettingsTest.php |   2 +-
 ...ConfigDirectorySetNoDirectoryErrorTest.php |   2 +-
 ...allerConfigDirectorySetNoDirectoryTest.php |   2 +-
 .../InstallerDatabaseErrorMessagesTest.php    |   2 +-
 .../Installer/InstallerEmptySettingsTest.php  |   2 +-
 ...llerExistingBrokenDatabaseSettingsTest.php |   2 +-
 .../InstallerExistingConfigDirectoryTest.php  |   2 +-
 ...nstallerExistingConfigMultilingualTest.php |   2 +-
 .../InstallerExistingConfigNoConfigTest.php   |   2 +-
 ...nstallerExistingConfigNoSystemSiteTest.php |   2 +-
 ...tallerExistingConfigProfileHookInstall.php |   2 +-
 ...ingConfigSyncDirectoryMultilingualTest.php |   2 +-
 ...gConfigSyncDirectoryProfileHookInstall.php |   2 +-
 ...ConfigSyncDirectoryProfileMismatchTest.php |   2 +-
 .../InstallerExistingConfigTestBase.php       |   2 +-
 .../InstallerExistingDatabaseSettingsTest.php |   2 +-
 .../InstallerExistingInstallationTest.php     |   2 +-
 ...InstallerExistingSettingsNoProfileTest.php |   2 +-
 .../InstallerExistingSettingsTest.php         |   2 +-
 .../InstallerLanguageDirectionTest.php        |   2 +-
 .../Installer/InstallerLanguagePageTest.php   |   2 +-
 .../InstallerNonDefaultDatabaseDriverTest.php |   2 +-
 ...nEnglishProfileWithoutLocaleModuleTest.php |   2 +-
 .../Installer/InstallerPerformanceTest.php    |   2 +-
 .../Installer/InstallerPostInstallTest.php    |   2 +-
 .../InstallerProfileRequirementsTest.php      |   2 +-
 .../Installer/InstallerRouterTest.php         |   2 +-
 .../InstallerSiteConfigProfileTest.php        |   2 +-
 .../InstallerSkipPermissionHardeningTest.php  |   2 +-
 .../Installer/InstallerTest.php               |   4 +-
 .../InstallerThemesBlocksProfileTest.php      |   2 +-
 .../InstallerTranslationExistingFileTest.php  |   2 +-
 ...tionMultipleLanguageNonInteractiveTest.php |   2 +-
 ...stallerTranslationMultipleLanguageTest.php |   2 +-
 .../InstallerTranslationQueryTest.php         |   2 +-
 .../Installer/InstallerTranslationTest.php    |   2 +-
 .../Installer/MinimalInstallerTest.php        |   2 +-
 .../MultipleDistributionsProfileTest.php      |   2 +-
 .../Installer/SingleVisibleProfileTest.php    |   2 +-
 .../Installer/SiteNameTest.php                |   2 +-
 .../Installer/SiteSettingsFormTest.php        |   2 +-
 .../Installer/StandardInstallerTest.php       |   4 +-
 .../Installer/TestingProfileInstallTest.php   |   2 +-
 .../Libraries/JqueryUiLibraryAssetsTest.php   |   8 +-
 .../Libraries/ManyAssetsLoadOrderTest.php     |   2 +-
 .../FunctionalTests/MailCaptureTest.php       |   2 +-
 .../Menu/MenuActiveTrail403Test.php           |   2 +-
 .../Routing/CaseInsensitivePathTest.php       |   4 +-
 .../Routing/DefaultFormatTest.php             |   4 +-
 .../Routing/LazyRouteProviderInstallTest.php  |   2 +-
 .../Routing/PathEncodedTest.php               |   4 +-
 .../Routing/RouteCachingLanguageTest.php      |   2 +-
 ...eCachingNonPathLanguageNegotiationTest.php |   2 +-
 .../Routing/RouteCachingQueryAlteredTest.php  |   2 +-
 .../Theme/ClaroLayoutBuilderTest.php          |   2 +-
 .../FunctionalTests/Theme/ClaroTest.php       |   6 +-
 .../FunctionalTests/Theme/OliveroTest.php     |   8 +-
 .../Update/UpdatePathTestBaseTest.php         |  12 +-
 .../FunctionalTests/UserHelpersTest.php       |   2 +-
 .../Drupal/FunctionalTests/WebAssertTest.php  |  26 +--
 .../Render/FormattableMarkupKernelTest.php    |   4 +-
 .../KernelTests/Config/DefaultConfigTest.php  |   2 +-
 .../KernelTests/Config/TypedConfigTest.php    |   4 +-
 .../Drupal/KernelTests/ConfigFormTestBase.php |   2 +-
 .../Core/Action/DeleteActionTest.php          |   4 +-
 .../Core/Action/EmailActionTest.php           |   2 +-
 .../Core/Action/PublishActionTest.php         |   6 +-
 .../Core/Action/SaveActionTest.php            |   4 +-
 .../KernelTests/Core/Ajax/CommandsTest.php    |   4 +-
 .../KernelTests/Core/Archiver/TarTest.php     |   2 +-
 .../KernelTests/Core/Archiver/ZipTest.php     |   4 +-
 .../Core/Asset/AttachedAssetsTest.php         |  38 ++--
 .../Asset/LibraryDiscoveryIntegrationTest.php |  18 +-
 ...solvedLibraryDefinitionsFilesMatchTest.php |   2 +-
 .../Core/Batch/BatchKernelTest.php            |   2 +-
 .../Core/Batch/BatchNegotiatorTest.php        |   2 +-
 .../Core/Block/MultipleBlockFormTest.php      |   2 +-
 .../Bootstrap/ExtensionPathResolverTest.php   |   2 +-
 .../Core/Bootstrap/ResettableStaticTest.php   |   2 +-
 .../Core/Bootstrap/ShutdownFunctionTest.php   |   2 +-
 .../Core/Cache/ApcuBackendTest.php            |   2 +-
 .../Core/Cache/CacheCollectorTest.php         |   2 +-
 .../Cache/CacheContextOptimizationTest.php    |   4 +-
 .../Core/Cache/DatabaseBackendTagTest.php     |   2 +-
 .../Core/Cache/DatabaseBackendTest.php        |   8 +-
 .../Cache/GenericCacheBackendUnitTestBase.php |  22 +--
 .../Core/Common/DrupalFlushAllCachesTest.php  |   2 +-
 .../KernelTests/Core/Common/XssUnitTest.php   |   4 +-
 ...CacheabilityMetadataConfigOverrideTest.php |   4 +-
 .../Core/Config/ConfigCRUDTest.php            |   8 +-
 .../Core/Config/ConfigDependencyTest.php      |  14 +-
 .../Core/Config/ConfigDiffTest.php            |   4 +-
 .../Core/Config/ConfigEntityNormalizeTest.php |   2 +-
 .../Config/ConfigEntityStaticCacheTest.php    |   6 +-
 .../Core/Config/ConfigEntityStatusTest.php    |   2 +-
 .../Core/Config/ConfigEntityStorageTest.php   |   4 +-
 .../Core/Config/ConfigEntityUnitTest.php      |   2 +-
 .../Core/Config/ConfigEventsTest.php          |   4 +-
 .../Core/Config/ConfigExportStorageTest.php   |   2 +-
 .../Core/Config/ConfigFileContentTest.php     |   4 +-
 .../Core/Config/ConfigImportRecreateTest.php  |   2 +-
 .../ConfigImportRenameValidationTest.php      |   4 +-
 .../ConfigImporterMissingContentTest.php      |   4 +-
 .../Core/Config/ConfigImporterTest.php        |  42 ++--
 .../Core/Config/ConfigInstallTest.php         |  14 +-
 .../Config/ConfigLanguageOverrideTest.php     |   2 +-
 .../Core/Config/ConfigModuleOverridesTest.php |   2 +-
 .../Core/Config/ConfigOverrideTest.php        |   2 +-
 .../Config/ConfigOverridesPriorityTest.php    |   2 +-
 .../Config/ConfigSchemaDeprecationTest.php    |   2 +-
 .../Core/Config/ConfigSchemaTest.php          |  22 +--
 .../Core/Config/ConfigSnapshotTest.php        |   2 +-
 .../Config/Entity/ConfigEntityUpdaterTest.php |   8 +-
 .../ExcludedModulesEventSubscriberTest.php    |   2 +-
 .../Core/Config/ExportStorageManagerTest.php  |   4 +-
 .../Core/Config/FileStorageFactoryTest.php    |   2 +-
 .../Config/ImportStorageTransformerTest.php   |   6 +-
 .../Core/Config/SchemaCheckTraitTest.php      |   2 +-
 .../Core/Config/Storage/CachedStorageTest.php |   2 +-
 .../Config/Storage/ConfigStorageTestBase.php  |   8 +-
 .../Config/Storage/DatabaseStorageTest.php    |   2 +-
 .../Core/Config/Storage/FileStorageTest.php   |   4 +-
 .../Config/Storage/ManagedStorageTest.php     |   2 +-
 .../Core/Config/Storage/MemoryStorageTest.php |   2 +-
 .../Storage/StorageReplaceDataWrapperTest.php |   4 +-
 .../Core/Controller/ControllerBaseTest.php    |   4 +-
 .../KernelTests/Core/Database/AlterTest.php   |  14 +-
 .../Core/Database/BasicSyntaxTest.php         |  14 +-
 .../Core/Database/CaseSensitivityTest.php     |   2 +-
 .../Core/Database/ConnectionTest.php          |  20 +-
 .../Database/DatabaseExceptionWrapperTest.php |   2 +-
 .../Core/Database/DeleteTruncateTest.php      |  12 +-
 .../DriverSpecificConnectionUnitTestBase.php  |   2 +-
 .../Database/DriverSpecificSyntaxTestBase.php |   2 +-
 .../KernelTests/Core/Database/FetchTest.php   |  18 +-
 .../Core/Database/InsertDefaultsTest.php      |   6 +-
 .../Core/Database/InsertLobTest.php           |   6 +-
 .../KernelTests/Core/Database/InsertTest.php  |  18 +-
 .../Core/Database/InvalidDataTest.php         |   4 +-
 .../KernelTests/Core/Database/LoggingTest.php |  12 +-
 .../KernelTests/Core/Database/MergeTest.php   |  18 +-
 .../KernelTests/Core/Database/QueryTest.php   |  12 +-
 .../Core/Database/RangeQueryTest.php          |   2 +-
 .../Core/Database/RegressionTest.php          |   8 +-
 .../Core/Database/ReplicaKillSwitchTest.php   |   2 +-
 .../Core/Database/ReservedWordTest.php        |  14 +-
 .../Core/Database/SelectCloneTest.php         |   4 +-
 .../Core/Database/SelectComplexTest.php       |  36 ++--
 .../Core/Database/SelectLeastTest.php         |   2 +-
 .../Core/Database/SelectOrderedTest.php       |   6 +-
 .../Core/Database/SelectSubqueryTest.php      |  18 +-
 .../KernelTests/Core/Database/SelectTest.php  |  48 ++---
 .../Core/Database/SerializeQueryTest.php      |   2 +-
 .../Core/Database/StatementTest.php           |   2 +-
 .../KernelTests/Core/Database/TaggingTest.php |  14 +-
 .../Core/Database/TemporaryQueryTestBase.php  |   2 +-
 .../Core/Database/UpdateComplexTest.php       |  16 +-
 .../Core/Database/UpdateLobTest.php           |   6 +-
 .../KernelTests/Core/Database/UpdateTest.php  |  18 +-
 .../KernelTests/Core/Database/UpsertTest.php  |   6 +-
 .../Core/Datetime/DateFormatterTest.php       |   4 +-
 .../Core/Datetime/DatelistElementFormTest.php |   2 +-
 .../Core/Datetime/DatetimeElementFormTest.php |   4 +-
 .../Core/Datetime/Element/TimezoneTest.php    |   8 +-
 .../Core/Datetime/TimestampSchemaTest.php     |   2 +-
 .../ServicesDefaultsTest.php                  |   6 +-
 .../DrupalKernel/DrupalKernelSiteTest.php     |   2 +-
 .../Core/DrupalKernel/DrupalKernelTest.php    |  10 +-
 .../DrupalKernel/ServiceDestructionTest.php   |   4 +-
 .../Core/Element/PathElementFormTest.php      |   2 +-
 .../Core/Entity/BundleClassTest.php           |  12 +-
 .../Entity/BundleConstraintValidatorTest.php  |   2 +-
 .../BundlePermissionHandlerTraitTest.php      |   2 +-
 .../Core/Entity/ConfigEntityAdapterTest.php   |  16 +-
 .../Core/Entity/ConfigEntityQueryTest.php     |  16 +-
 .../Core/Entity/ContentEntityChangedTest.php  |   4 +-
 .../Core/Entity/ContentEntityCloneTest.php    |  16 +-
 ...ntEntityFieldMethodInvocationOrderTest.php |   2 +-
 .../Entity/ContentEntityHasChangesTest.php    |   2 +-
 .../ContentEntityNonRevisionableFieldTest.php |   6 +-
 .../Entity/ContentEntityNullStorageTest.php   |   4 +-
 .../Entity/ContentEntityStorageBaseTest.php   |   2 +-
 .../Core/Entity/CreateSampleEntityTest.php    |   2 +-
 .../DefaultTableMappingIntegrationTest.php    |   6 +-
 .../EntityAutocompleteElementFormTest.php     |   8 +-
 .../Entity/EntityAccessControlHandlerTest.php |  18 +-
 .../KernelTests/Core/Entity/EntityApiTest.php |  10 +-
 .../Core/Entity/EntityAutocompleteTest.php    |   4 +-
 .../Core/Entity/EntityBaseTest.php            |   2 +-
 .../Core/Entity/EntityBundleConditionTest.php |   2 +-
 .../Core/Entity/EntityBundleFieldTest.php     |   2 +-
 .../Core/Entity/EntityBundleListenerTest.php  |   2 +-
 .../Core/Entity/EntityCrudHookTest.php        |  16 +-
 ...ntityDecoupledTranslationRevisionsTest.php |  12 +-
 .../Entity/EntityDefinitionUpdateTest.php     |  64 +++---
 .../Core/Entity/EntityDeriverTest.php         |   2 +-
 .../Core/Entity/EntityDisplayBaseTest.php     |   4 +-
 .../Core/Entity/EntityDisplayFormBaseTest.php |   2 +-
 .../Entity/EntityDisplayRepositoryTest.php    |   4 +-
 .../Core/Entity/EntityDuplicateTest.php       |   2 +-
 .../Entity/EntityFieldDefaultValueTest.php    |   4 +-
 .../Core/Entity/EntityFieldTest.php           |  28 +--
 .../EntityHasFieldConstraintValidatorTest.php |   2 +-
 .../Core/Entity/EntityKernelTestBaseTest.php  |   2 +-
 .../Core/Entity/EntityKeysTest.php            |   2 +-
 .../Core/Entity/EntityLoadByUuidTest.php      |   2 +-
 ...tyNonRevisionableTranslatableFieldTest.php |   2 +-
 .../Core/Entity/EntityQueryAggregateTest.php  |   4 +-
 .../Entity/EntityQueryRelationshipTest.php    |   4 +-
 .../Core/Entity/EntityQueryTest.php           |  32 +--
 .../Core/Entity/EntityReferenceFieldTest.php  |  14 +-
 .../EntityReferenceSelectionSortTest.php      |   2 +-
 .../Core/Entity/EntityRepositoryTest.php      |   4 +-
 .../Entity/EntityRevisionTranslationTest.php  |  12 +-
 .../Core/Entity/EntityRevisionsTest.php       |  14 +-
 .../Core/Entity/EntitySchemaTest.php          |  12 +-
 .../Core/Entity/EntityTranslationTest.php     |  22 +--
 .../EntityTypeConstraintValidatorTest.php     |   2 +-
 .../Core/Entity/EntityTypeConstraintsTest.php |   4 +-
 .../Core/Entity/EntityTypeTest.php            |   2 +-
 .../Entity/EntityTypedDataDefinitionTest.php  |   8 +-
 .../Core/Entity/EntityUUIDTest.php            |   2 +-
 .../Core/Entity/EntityValidationTest.php      |   6 +-
 .../Core/Entity/EntityViewBuilderTest.php     |  14 +-
 .../Core/Entity/EntityViewHookTest.php        |   2 +-
 .../Core/Entity/FieldSqlStorageTest.php       |  16 +-
 .../Entity/FieldTranslationSqlStorageTest.php |   2 +-
 .../FieldWidgetConstraintValidatorTest.php    |   6 +-
 .../FieldableEntityDefinitionUpdateTest.php   |   6 +-
 .../RevisionableContentEntityBaseTest.php     |   4 +-
 .../Core/Entity/RouteProviderTest.php         |   4 +-
 .../Sql/SqlContentEntityStorageSchemaTest.php |   2 +-
 .../ValidReferenceConstraintValidatorTest.php |   4 +-
 .../ExceptionLoggingSubscriberTest.php        |   2 +-
 .../Extension/ModuleExtensionListTest.php     |   2 +-
 .../ModuleHandlerDeprecatedHookTest.php       |   6 +-
 ...HandlerDeprecatedHookUnimplementedTest.php |   2 +-
 .../Core/Extension/ModuleHandlerTest.php      |   4 +-
 .../Extension/ModuleImplementsAlterTest.php   |   4 +-
 .../Core/Extension/ModuleInstallerTest.php    |  20 +-
 .../ThemeEngineExtensionListTest.php          |   2 +-
 .../Core/Extension/ThemeExtensionListTest.php |   4 +-
 .../Core/Extension/UpdateDescriptionTest.php  |   2 +-
 .../Core/Extension/UpdateSchemaTest.php       |   2 +-
 .../Field/Entity/BaseFieldOverrideTest.php    |   6 +-
 .../Core/Field/FieldAccessTest.php            |   2 +-
 .../KernelTests/Core/Field/FieldItemTest.php  |   2 +-
 .../Core/Field/FieldMissingTypeTest.php       |   4 +-
 .../Core/Field/FieldSettingsTest.php          |   8 +-
 .../Core/Field/FieldType/PasswordItemTest.php |  18 +-
 .../Core/Field/MapBaseFieldTest.php           |   2 +-
 .../KernelTests/Core/File/DirectoryTest.php   |  14 +-
 .../KernelTests/Core/File/FileCopyTest.php    |   6 +-
 .../Core/File/FileDeleteRecursiveTest.php     |   8 +-
 .../KernelTests/Core/File/FileDeleteTest.php  |   6 +-
 .../KernelTests/Core/File/FileMoveTest.php    |   6 +-
 .../Core/File/FileSaveDataTest.php            |   2 +-
 .../Core/File/FileSystemRequirementsTest.php  |   2 +-
 .../Core/File/FileSystemTempDirectoryTest.php |   4 +-
 .../KernelTests/Core/File/FileSystemTest.php  |  12 +-
 .../Core/File/FileUrlGeneratorTest.php        |  16 +-
 .../KernelTests/Core/File/HtaccessTest.php    |   2 +-
 .../KernelTests/Core/File/MimeTypeTest.php    |   2 +-
 .../Core/File/ReadOnlyStreamWrapperTest.php   |   2 +-
 .../Core/File/ScanDirectoryTest.php           |  14 +-
 .../Core/File/StreamWrapperTest.php           |  10 +-
 .../Core/File/UrlTransformRelativeTest.php    |   2 +-
 .../Core/Form/ExternalFormUrlTest.php         |   2 +-
 .../Core/Form/FormActionXssTest.php           |   2 +-
 .../KernelTests/Core/Form/FormCacheTest.php   |   6 +-
 .../Core/Form/FormDefaultHandlersTest.php     |   2 +-
 .../Form/FormValidationMessageOrderTest.php   |   2 +-
 .../Form/TriggeringElementProgrammedTest.php  |   2 +-
 .../Core/Http/LinkRelationsTest.php           |   2 +-
 .../HttpKernel/StackKernelIntegrationTest.php |   4 +-
 .../KernelTests/Core/Image/ToolkitTest.php    |  12 +-
 .../Core/Installer/InstallerLanguageTest.php  |   4 +-
 .../Installer/InstallerRedirectTraitTest.php  |   2 +-
 .../DatabaseStorageExpirableTest.php          |   4 +-
 .../KeyValueStore/DatabaseStorageTest.php     |   2 +-
 .../KeyValueStore/GarbageCollectionTest.php   |   2 +-
 .../KeyValueContentEntityStorageTest.php      |   4 +-
 .../Core/KeyValueStore/StorageTestBase.php    |  10 +-
 .../Core/Layout/IconBuilderTest.php           |   2 +-
 .../Drupal/KernelTests/Core/Lock/LockTest.php |   4 +-
 .../Core/Menu/LocalActionManagerTest.php      |   2 +-
 .../Menu/MenuLinkDefaultIntegrationTest.php   |   2 +-
 .../Core/Menu/MenuLinkTreeTest.php            |   6 +-
 .../Core/Menu/MenuTreeStorageTest.php         |  16 +-
 .../Core/Messenger/MessengerTest.php          |   8 +-
 .../Core/Pager/PagerManagerTest.php           |   4 +-
 .../Core/Pager/RequestPagerTest.php           |   4 +-
 .../EntityConverterLatestRevisionTest.php     |  12 +-
 .../Core/Path/PathValidatorTest.php           |   2 +-
 .../KernelTests/Core/Path/UrlAlterTest.php    |   2 +-
 .../Annotation/ContextDefinitionTest.php      |   2 +-
 .../Condition/ConditionTestDualUserTest.php   |   2 +-
 .../Condition/CurrentThemeConditionTest.php   |   2 +-
 .../OptionalContextConditionTest.php          |   6 +-
 .../Core/Plugin/Condition/RequestPathTest.php |   2 +-
 .../Plugin/Condition/ResponseStatusTest.php   |   2 +-
 .../Context/ContextAwarePluginTraitTest.php   |   8 +-
 .../Core/Plugin/ContextDefinitionTest.php     |   6 +-
 .../Core/Plugin/ContextHandlerTest.php        |   4 +-
 .../Core/Plugin/ContextPluginTest.php         |   2 +-
 .../Core/Plugin/ContextTypedDataTest.php      |   4 +-
 .../Core/Plugin/DefaultPluginManagerTest.php  |   2 +-
 .../Core/Plugin/DerivativeTest.php            |   2 +-
 .../Plugin/Discovery/DiscoveryTestBase.php    |   2 +-
 .../Plugin/EntityContextTypedDataTest.php     |   2 +-
 .../KernelTests/Core/Plugin/FactoryTest.php   |   4 +-
 .../Core/Plugin/InspectionTest.php            |   2 +-
 .../Core/Queue/QueueSerializationTest.php     |   2 +-
 .../KernelTests/Core/Queue/QueueTest.php      |   4 +-
 .../Core/Render/Element/ActionsTest.php       |   2 +-
 .../Render/Element/DeprecatedElementTest.php  |   2 +-
 .../Core/Render/Element/MachineNameTest.php   |   2 +-
 .../Core/Render/Element/PluginAlterTest.php   |   2 +-
 .../Render/Element/RenderElementTypesTest.php |   8 +-
 .../Render/Element/TableSortExtenderTest.php  |   2 +-
 .../Core/Render/Element/TableTest.php         |  26 +--
 .../Core/Render/Element/WeightTest.php        |   4 +-
 .../Render/ElementInfoIntegrationTest.php     |   2 +-
 .../Core/Render/RenderCacheTest.php           |   4 +-
 .../KernelTests/Core/Render/RenderTest.php    |   8 +-
 .../Core/RouteProcessor/RouteNoneTest.php     |   2 +-
 .../RouteProcessorCurrentIntegrationTest.php  |   2 +-
 .../Routing/ContentNegotiationRoutingTest.php |   4 +-
 .../Core/Routing/ExceptionHandlingTest.php    |  18 +-
 .../Core/Routing/MatcherDumperTest.php        |  10 +-
 .../Core/Routing/PathChangedHelperTest.php    |   2 +-
 .../Core/Routing/RouteProviderTest.php        |  34 ++--
 .../Core/Routing/UrlIntegrationTest.php       |   2 +-
 .../ServiceProvider/ServiceProviderTest.php   |   4 +-
 .../Core/Session/AccountSwitcherTest.php      |   2 +-
 .../SessionManagerDestroyNoCliCheckTest.php   |   2 +-
 .../Core/Site/SettingsRewriteTest.php         |   2 +-
 .../StreamWrapperManagerTest.php              |   2 +-
 .../TranslationStringTest.php                 |   2 +-
 .../AnonymousPrivateTempStoreTest.php         |   4 +-
 .../Core/TempStore/TempStoreDatabaseTest.php  |   2 +-
 .../Core/Test/AssertMailTraitTest.php         |   2 +-
 .../Core/Test/EnvironmentCleanerTest.php      |   2 +-
 .../Core/Test/PhpUnitBridgeTest.php           |   4 +-
 .../Core/Theme/BaseThemeMissingTest.php       |   2 +-
 .../Core/Theme/BaseThemeRequiredTest.php      |   2 +-
 .../Core/Theme/ClaroVerticalTabsTest.php      |   2 +-
 .../Theme/ConfigImportThemeInstallTest.php    |   2 +-
 .../Core/Theme/FrontMatterTest.php            |   4 +-
 .../KernelTests/Core/Theme/ImageTest.php      |   8 +-
 .../Core/Theme/MaintenanceThemeTest.php       |   2 +-
 .../KernelTests/Core/Theme/MessageTest.php    |   2 +-
 .../KernelTests/Core/Theme/RegistryTest.php   |  14 +-
 .../Core/Theme/Stable9LibraryOverrideTest.php |   2 +-
 .../Theme/Stable9TemplateOverrideTest.php     |   2 +-
 .../Core/Theme/ThemeInstallerTest.php         |  34 ++--
 .../Core/Theme/ThemeSettingsTest.php          |   6 +-
 .../Core/Theme/TwigEnvironmentTest.php        |  12 +-
 .../Core/Theme/TwigMarkupInterfaceTest.php    |   4 +-
 .../Core/Theme/TwigWhiteListTest.php          |   2 +-
 .../AllowedValuesConstraintValidatorTest.php  |   6 +-
 .../ComplexDataConstraintValidatorTest.php    |   2 +-
 .../RecursiveContextualValidatorTest.php      |   4 +-
 .../TypedData/TypedDataDefinitionTest.php     |   8 +-
 .../Core/TypedData/TypedDataTest.php          |  10 +-
 .../KernelTests/Core/Updater/UpdaterTest.php  |   2 +-
 .../Core/Url/LinkGenerationTest.php           |   2 +-
 .../Core/Validation/ConstraintFactoryTest.php |   2 +-
 .../Core/Validation/ConstraintsTest.php       |   2 +-
 .../Validation/UniqueFieldConstraintTest.php  |   6 +-
 .../UniqueValuesConstraintValidatorTest.php   |   8 +-
 .../KernelTestBaseShutdownTest.php            |   4 +-
 .../Drupal/KernelTests/KernelTestBaseTest.php |  32 +--
 .../RedirectOnExceptionTest.php               |   2 +-
 core/tests/Drupal/Tests/CSpell/SortTest.php   |   4 +-
 .../AnnotatedClassDiscoveryCachedTest.php     |   2 +-
 .../AnnotatedClassDiscoveryTest.php           |   4 +-
 .../Annotation/AnnotationBaseTest.php         |   6 +-
 .../DocParserIgnoredClassesTest.php           |   2 +-
 .../Annotation/MockFileFinderTest.php         |   2 +-
 .../AnnotationBridgeDecoratorTest.php         |   2 +-
 .../Component/Annotation/PluginIdTest.php     |   4 +-
 .../Tests/Component/Annotation/PluginTest.php |  12 +-
 .../Component/Assertion/InspectorTest.php     |  28 +--
 .../Component/ClassFinder/ClassFinderTest.php |   2 +-
 .../Component/Datetime/DateTimePlusTest.php   |  38 ++--
 .../Tests/Component/Datetime/TimeTest.php     |  12 +-
 .../Datetime/TimeWithNoRequestTest.php        |   2 +-
 .../DependencyInjection/ContainerTest.php     |  98 +++++-----
 .../Dumper/OptimizedPhpArrayDumperTest.php    |  20 +-
 .../Component/Diff/DiffFormatterTest.php      |   2 +-
 .../Diff/Engine/HWLDFWordAccumulatorTest.php  |   4 +-
 .../Discovery/YamlDirectoryDiscoveryTest.php  |   8 +-
 .../Component/Discovery/YamlDiscoveryTest.php |   4 +-
 .../Tests/Component/DrupalComponentTest.php   |   6 +-
 .../FileCache/FileCacheFactoryTest.php        |  12 +-
 .../Component/FileCache/FileCacheTest.php     |   8 +-
 .../FileSecurity/FileSecurityTest.php         |   8 +-
 .../FileSystem/RegexDirectoryIteratorTest.php |   2 +-
 .../Component/FrontMatter/FrontMatterTest.php |   6 +-
 .../Tests/Component/Gettext/PoHeaderTest.php  |   2 +-
 .../Component/Gettext/PoStreamWriterTest.php  |   6 +-
 .../Tests/Component/Graph/GraphTest.php       |   2 +-
 .../SecuredRedirectResponseTest.php           |   2 +-
 .../PhpStorage/FileStorageReadOnlyTest.php    |   4 +-
 .../Component/PhpStorage/FileStorageTest.php  |   6 +-
 .../MTimeProtectedFileStorageBase.php         |   4 +-
 .../Plugin/Attribute/AttributeBaseTest.php    |   6 +-
 .../AttributeClassDiscoveryCachedTest.php     |   2 +-
 .../Attribute/AttributeClassDiscoveryTest.php |   4 +-
 .../Plugin/Attribute/PluginIdTest.php         |   2 +-
 .../Component/Plugin/Attribute/PluginTest.php |   8 +-
 .../Component/Plugin/Context/ContextTest.php  |   4 +-
 .../Component/Plugin/DefaultFactoryTest.php   |  20 +-
 .../Discovery/AnnotatedClassDiscoveryTest.php |   2 +-
 .../AttributeBridgeDecoratorTest.php          |   2 +-
 .../Discovery/DiscoveryCachedTraitTest.php    |   2 +-
 .../Plugin/Discovery/DiscoveryTraitTest.php   |  10 +-
 .../StaticDiscoveryDecoratorTest.php          |   6 +-
 .../Plugin/Factory/ReflectionFactoryTest.php  |   4 +-
 .../Tests/Component/Plugin/PluginBaseTest.php |   8 +-
 .../Plugin/PluginManagerBaseTest.php          |   8 +-
 .../ProxyBuilder/ProxyBuilderTest.php         |  28 +--
 .../Render/FormattableMarkupTest.php          |   6 +-
 .../Component/Render/HtmlEscapedTextTest.php  |   4 +-
 .../Component/Render/PlainTextOutputTest.php  |   2 +-
 .../Component/Serialization/JsonTest.php      |  10 +-
 .../Component/Serialization/YamlPeclTest.php  |  12 +-
 .../Component/Serialization/YamlTest.php      |  12 +-
 .../PhpTransliterationTest.php                |   4 +-
 .../Utility/ArgumentsResolverTest.php         |  16 +-
 .../Tests/Component/Utility/ColorTest.php     |   8 +-
 .../Tests/Component/Utility/CryptTest.php     |   6 +-
 .../Utility/DeprecationHelperTest.php         |   2 +-
 .../Component/Utility/EmailValidatorTest.php  |   4 +-
 .../Component/Utility/EnvironmentTest.php     |   2 +-
 .../Tests/Component/Utility/HtmlTest.php      |  22 +--
 .../Tests/Component/Utility/ImageTest.php     |   2 +-
 .../Component/Utility/NestedArrayTest.php     |  20 +-
 .../Tests/Component/Utility/NumberTest.php    |   6 +-
 .../Tests/Component/Utility/RandomTest.php    |  18 +-
 .../Tests/Component/Utility/RectangleTest.php |   6 +-
 .../Component/Utility/ReflectionTest.php      |   2 +-
 .../Tests/Component/Utility/SortArrayTest.php |   8 +-
 .../Tests/Component/Utility/TimerTest.php     |   2 +-
 .../Tests/Component/Utility/UnicodeTest.php   |  14 +-
 .../Tests/Component/Utility/UrlHelperTest.php |  22 +--
 .../Tests/Component/Utility/UserAgentTest.php |   2 +-
 .../Tests/Component/Utility/VariableTest.php  |   2 +-
 .../Tests/Component/Utility/XssTest.php       |  16 +-
 .../Drupal/Tests/Component/Uuid/UuidTest.php  |   6 +-
 .../Drupal/Tests/Composer/ComposerTest.php    |   4 +-
 .../Tests/Composer/Generator/BuilderTest.php  |   2 +-
 .../Generator/MetapackageUpdateTest.php       |   2 +-
 .../OverlapWithTopLevelDependenciesTest.php   |   2 +-
 .../Plugin/ProjectMessage/ConfigTest.php      |   4 +-
 .../Scaffold/Functional/ComposerHookTest.php  |   4 +-
 .../Functional/ManageGitIgnoreTest.php        |   8 +-
 .../Scaffold/Functional/ScaffoldTest.php      |  10 +-
 .../Functional/ScaffoldUpgradeTest.php        |   2 +-
 .../Scaffold/Integration/AppendOpTest.php     |   2 +-
 .../Scaffold/Integration/ReplaceOpTest.php    |   4 +-
 .../ScaffoldFileCollectionTest.php            |   2 +-
 .../Scaffold/Integration/SkipOpTest.php       |   2 +-
 .../Plugin/VendorHardening/ConfigTest.php     |   8 +-
 .../VendorHardeningPluginTest.php             |  10 +-
 .../Drupal/Tests/ComposerIntegrationTest.php  |   4 +-
 .../Tests/Core/Access/AccessManagerTest.php   |  20 +-
 .../Core/Access/AccessResultForbiddenTest.php |   4 +-
 .../Core/Access/AccessResultNeutralTest.php   |   4 +-
 .../Tests/Core/Access/AccessResultTest.php    |  30 +--
 .../Tests/Core/Access/CsrfAccessCheckTest.php |   6 +-
 .../Core/Access/CsrfTokenGeneratorTest.php    |  12 +-
 .../Core/Access/CustomAccessCheckTest.php     |   4 +-
 .../Core/Access/DefaultAccessCheckTest.php    |   2 +-
 .../Core/Access/RouteProcessorCsrfTest.php    |   8 +-
 .../Tests/Core/Ajax/AjaxCommandsTest.php      |  50 ++---
 .../Tests/Core/Ajax/AjaxResponseTest.php      |   4 +-
 .../Ajax/OpenOffCanvasDialogCommandTest.php   |   2 +-
 .../Core/Annotation/PluralTranslationTest.php |   4 +-
 .../Tests/Core/Annotation/TranslationTest.php |   2 +-
 .../Tests/Core/Asset/AssetResolverTest.php    |   4 +-
 .../Asset/CssCollectionGrouperUnitTest.php    |   2 +-
 .../Asset/CssCollectionRendererUnitTest.php   |   4 +-
 .../Tests/Core/Asset/CssOptimizerUnitTest.php |   6 +-
 .../Tests/Core/Asset/JsOptimizerUnitTest.php  |   4 +-
 .../LibrariesDirectoryFileFinderTest.php      |   2 +-
 .../Asset/LibraryDependencyResolverTest.php   |   6 +-
 .../Asset/LibraryDiscoveryCollectorTest.php   |   8 +-
 .../Core/Asset/LibraryDiscoveryParserTest.php |  44 ++---
 .../Tests/Core/Asset/LibraryDiscoveryTest.php |   6 +-
 .../AuthenticationCollectorTest.php           |   2 +-
 .../AuthenticationManagerTest.php             |   4 +-
 .../Tests/Core/Batch/BatchBuilderTest.php     |  28 +--
 .../Tests/Core/Batch/PercentagesTest.php      |   2 +-
 .../Drupal/Tests/Core/Block/BlockBaseTest.php |   2 +-
 .../Tests/Core/Block/BlockManagerTest.php     |   8 +-
 .../Core/Breadcrumb/BreadcrumbManagerTest.php |  10 +-
 .../Tests/Core/Breadcrumb/BreadcrumbTest.php  |   2 +-
 .../BackendChainImplementationUnitTest.php    |  18 +-
 .../Tests/Core/Cache/CacheCollectorTest.php   |  30 +--
 .../Tests/Core/Cache/CacheFactoryTest.php     |   8 +-
 .../Core/Cache/CacheTagsInvalidatorTest.php   |   4 +-
 .../Drupal/Tests/Core/Cache/CacheTest.php     |   8 +-
 .../Core/Cache/CacheableMetadataTest.php      |  12 +-
 .../Cache/ChainedFastBackendFactoryTest.php   |   4 +-
 .../Core/Cache/ChainedFastBackendTest.php     |   4 +-
 .../Context/CacheContextsManagerTest.php      |  14 +-
 .../Cache/Context/CookieCacheContextTest.php  |   2 +-
 .../Cache/Context/HeadersCacheContextTest.php |   2 +-
 .../Context/IsFrontPathCacheContextTest.php   |   4 +-
 .../Context/PathParentCacheContextTest.php    |   2 +-
 .../ProtocolVersionCacheContextTest.php       |   2 +-
 .../Context/QueryArgsCacheContextTest.php     |   2 +-
 .../Cache/Context/SessionCacheContextTest.php |   4 +-
 .../Core/Cache/DatabaseBackendFactoryTest.php |   2 +-
 .../Tests/Core/Cache/NullBackendTest.php      |   2 +-
 .../Tests/Core/Cache/VariationCacheTest.php   |  12 +-
 .../Tests/Core/Command/QuickStartTest.php     |   8 +-
 .../Tests/Core/Common/AttributesTest.php      |   6 +-
 .../Tests/Core/Common/DiffArrayTest.php       |   2 +-
 .../Drupal/Tests/Core/Common/TagsTest.php     |   4 +-
 .../ConditionAccessResolverTraitTest.php      |   2 +-
 .../Tests/Core/Config/CachedStorageTest.php   |   2 +-
 .../Config/ConfigDependencyManagerTest.php    |   2 +-
 .../Config/ConfigFactoryOverrideBaseTest.php  |   2 +-
 .../Tests/Core/Config/ConfigFactoryTest.php   |   2 +-
 .../Drupal/Tests/Core/Config/ConfigTest.php   |  34 ++--
 .../Entity/ConfigDependencyManagerTest.php    |   4 +-
 .../Entity/ConfigEntityBaseUnitTest.php       |  36 ++--
 .../Entity/ConfigEntityDependencyTest.php     |   4 +-
 .../Config/Entity/ConfigEntityStorageTest.php |  28 +--
 .../Config/Entity/ConfigEntityTypeTest.php    |  16 +-
 .../Config/Entity/EntityDisplayBaseTest.php   |  10 +-
 .../Entity/EntityDisplayModeBaseUnitTest.php  |   6 +-
 .../Config/Entity/Query/QueryFactoryTest.php  |   2 +-
 .../Config/ExtensionInstallStorageTest.php    |   2 +-
 .../Tests/Core/Config/ImmutableConfigTest.php |   8 +-
 .../Tests/Core/Config/NullStorageTest.php     |   2 +-
 .../Tests/Core/Config/ReadOnlyStorageTest.php |   8 +-
 .../Tests/Core/Config/StorageComparerTest.php |  10 +-
 .../Core/Config/StorageCopyTraitTest.php      |   4 +-
 .../Core/Controller/AjaxRendererTest.php      |   2 +-
 .../Core/Controller/ControllerBaseTest.php    |   2 +-
 .../Controller/ControllerResolverTest.php     |  12 +-
 .../Core/Controller/TitleResolverTest.php     |  12 +-
 core/tests/Drupal/Tests/Core/CronTest.php     |   4 +-
 .../Tests/Core/Database/ConditionTest.php     |   8 +-
 .../Tests/Core/Database/ConnectionTest.php    |  30 +--
 .../Tests/Core/Database/OrderByTest.php       |   4 +-
 .../Core/Database/RowCountExceptionTest.php   |   4 +-
 .../Tests/Core/Database/UrlConversionTest.php |  12 +-
 .../Tests/Core/Datetime/DateHelperTest.php    |  10 +-
 .../Drupal/Tests/Core/Datetime/DateTest.php   |  12 +-
 .../Core/Datetime/DrupalDateTimeTest.php      |  16 +-
 .../AuthenticationProviderPassTest.php        |   2 +-
 .../Compiler/BackendCompilerPassTest.php      |   2 +-
 .../Compiler/ProxyServicesPassTest.php        |   6 +-
 .../Compiler/StackedKernelPassTest.php        |   4 +-
 .../Compiler/TaggedHandlersPassTest.php       |  30 +--
 .../ContainerBuilderTest.php                  |  14 +-
 .../DependencyInjection/ContainerTest.php     |   2 +-
 .../DependencySerializationTest.php           |   2 +-
 .../YamlFileLoaderTest.php                    |   4 +-
 .../Core/Discovery/YamlDiscoveryTest.php      |   2 +-
 .../Tests/Core/Display/DisplayVariantTest.php |  14 +-
 .../DiscoverServiceProvidersTest.php          |   4 +-
 .../Core/DrupalKernel/DrupalKernelTest.php    |   6 +-
 .../DrupalKernel/ValidateHostnameTest.php     |   2 +-
 core/tests/Drupal/Tests/Core/DrupalTest.php   |  68 +++----
 .../EntityRevisionRouteEnhancerTest.php       |   6 +-
 .../Enhancer/ParamConversionEnhancerTest.php  |   4 +-
 ...ityFormDisplayAccessControlHandlerTest.php |   2 +-
 .../Core/Entity/BaseFieldDefinitionTest.php   |  36 ++--
 .../Core/Entity/ContentEntityBaseUnitTest.php |  28 +--
 .../Enhancer/EntityRouteEnhancerTest.php      |   2 +-
 .../Core/Entity/EntityAccessCheckTest.php     |   6 +-
 .../EntityConstraintViolationListTest.php     |  10 +-
 .../Entity/EntityCreateAccessCheckTest.php    |   2 +-
 .../Core/Entity/EntityFieldManagerTest.php    |  32 +--
 .../Core/Entity/EntityFormBuilderTest.php     |   2 +-
 .../Tests/Core/Entity/EntityFormTest.php      |  12 +-
 .../Tests/Core/Entity/EntityLinkTest.php      |   2 +-
 .../Core/Entity/EntityListBuilderTest.php     |   2 +-
 .../Core/Entity/EntityRepositoryTest.php      |   2 +-
 .../Core/Entity/EntityResolverManagerTest.php |  28 +--
 .../Core/Entity/EntityTypeBundleInfoTest.php  |   8 +-
 .../Core/Entity/EntityTypeManagerTest.php     |  22 +--
 .../Core/Entity/EntityTypeRepositoryTest.php  |   8 +-
 .../Tests/Core/Entity/EntityTypeTest.php      |  64 +++---
 .../Tests/Core/Entity/EntityUnitTest.php      |  54 +++---
 .../Tests/Core/Entity/EntityUrlTest.php       |  10 +-
 .../Tests/Core/Entity/FieldDefinitionTest.php |  28 +--
 .../KeyValueEntityStorageTest.php             |  24 +--
 .../Tests/Core/Entity/Query/Sql/QueryTest.php |   4 +-
 .../Routing/DefaultHtmlRouteProviderTest.php  |  12 +-
 .../Entity/Sql/DefaultTableMappingTest.php    |  20 +-
 .../Sql/SqlContentEntityStorageSchemaTest.php |  16 +-
 .../Sql/SqlContentEntityStorageTest.php       |  44 ++---
 .../TypedData/EntityAdapterUnitTest.php       |  46 ++---
 .../ActiveLinkResponseFilterTest.php          |   6 +-
 .../CustomPageExceptionHtmlSubscriberTest.php |   4 +-
 .../ExceptionJsonSubscriberTest.php           |   2 +-
 .../FinalExceptionSubscriberTest.php          |   2 +-
 .../FinishResponseSubscriberTest.php          |   4 +-
 .../ModuleRouteSubscriberTest.php             |   2 +-
 .../OptionsRequestSubscriberTest.php          |   6 +-
 .../PathRootsSubscriberTest.php               |   2 +-
 .../PsrResponseSubscriberTest.php             |   4 +-
 .../RedirectResponseSubscriberTest.php        |   8 +-
 .../RssResponseRelativeUrlFilterTest.php      |   2 +-
 .../SpecialAttributesRouteSubscriberTest.php  |   4 +-
 .../Core/Extension/DefaultConfigTest.php      |   2 +-
 .../Tests/Core/Extension/DependencyTest.php   |   6 +-
 .../Core/Extension/ExtensionDiscoveryTest.php |   4 +-
 .../Core/Extension/ExtensionListTest.php      |  28 +--
 .../Extension/ExtensionSerializationTest.php  |   4 +-
 .../Core/Extension/InfoParserUnitTest.php     |  22 +--
 .../Core/Extension/ModuleHandlerTest.php      |  46 ++---
 .../Tests/Core/Extension/ModuleInfoTest.php   |   2 +-
 ...RequiredByThemesUninstallValidatorTest.php |   6 +-
 .../RequiredModuleUninstallValidatorTest.php  |   6 +-
 .../Core/Extension/ThemeExtensionListTest.php |   4 +-
 .../Tests/Core/Extension/ThemeHandlerTest.php |   4 +-
 .../Field/FieldDefinitionListenerTest.php     |  10 +-
 .../Core/Field/FieldFilteredMarkupTest.php    |   4 +-
 .../FieldInputValueNormalizerTraitTest.php    |   6 +-
 .../Tests/Core/Field/FieldItemListTest.php    |  12 +-
 .../Core/Field/FieldTypePluginManagerTest.php |   6 +-
 .../Core/Field/PluginSettingsBaseTest.php     |   2 +-
 .../Drupal/Tests/Core/File/FileSystemTest.php |  12 +-
 .../File/FileUploadSanitizeNameEventTest.php  |  12 +-
 .../Tests/Core/Flood/MemoryBackendTest.php    |  10 +-
 .../Core/Form/ConfigFormBaseTraitTest.php     |   6 +-
 .../Tests/Core/Form/ConfigTargetTest.php      |   6 +-
 .../Tests/Core/Form/ConfirmFormHelperTest.php |  10 +-
 .../FormAjaxSubscriberTest.php                |  14 +-
 .../Core/Form/FormAjaxResponseBuilderTest.php |  12 +-
 .../Tests/Core/Form/FormBuilderTest.php       |  54 +++---
 .../Drupal/Tests/Core/Form/FormCacheTest.php  |  26 +--
 .../Tests/Core/Form/FormElementHelperTest.php |   4 +-
 .../Tests/Core/Form/FormErrorHandlerTest.php  |   4 +-
 .../Drupal/Tests/Core/Form/FormHelperTest.php |   4 +-
 .../Core/Form/FormStateDecoratorBaseTest.php  | 182 +++++++++---------
 .../Drupal/Tests/Core/Form/FormStateTest.php  |  42 ++--
 .../Core/Form/FormStateValuesTraitTest.php    |  12 +-
 .../Tests/Core/Form/FormSubmitterTest.php     |  16 +-
 .../Tests/Core/Form/FormValidatorTest.php     |  20 +-
 .../Drupal/Tests/Core/Form/OptGroupTest.php   |   2 +-
 .../Tests/Core/Form/SubformStateTest.php      |  24 +--
 .../Core/Http/CacheableExceptionTest.php      |   4 +-
 .../Tests/Core/Http/ClientFactoryTest.php     |   2 +-
 .../Http/TrustedHostsRequestFactoryTest.php   |   2 +-
 .../Drupal/Tests/Core/Image/ImageTest.php     |  50 ++---
 .../Tests/Core/Language/LanguageUnitTest.php  |  12 +-
 .../Tests/Core/Layout/LayoutDefaultTest.php   |   2 +-
 .../Core/Layout/LayoutPluginManagerTest.php   |  14 +-
 ...DrupalStandardsListenerDeprecationTest.php |   2 +-
 .../Core/Lock/LockBackendAbstractTest.php     |   6 +-
 .../Core/Logger/LogMessageParserTest.php      |   2 +-
 .../Core/Logger/LoggerChannelFactoryTest.php  |   2 +-
 .../Tests/Core/Logger/LoggerChannelTest.php   |   6 +-
 .../Tests/Core/Mail/MailFormatHelperTest.php  |   2 +-
 .../Tests/Core/Mail/MailManagerTest.php       |   4 +-
 .../Core/Mail/Plugin/Mail/PhpMailTest.php     |   2 +-
 .../Mail/Plugin/Mail/SymfonyMailerTest.php    |   4 +-
 .../Core/Menu/ContextualLinkDefaultTest.php   |  14 +-
 .../Core/Menu/ContextualLinkManagerTest.php   |  14 +-
 .../DefaultMenuLinkTreeManipulatorsTest.php   |   8 +-
 .../Core/Menu/LocalActionDefaultTest.php      |   6 +-
 .../Core/Menu/LocalActionManagerTest.php      |   4 +-
 .../Tests/Core/Menu/LocalTaskDefaultTest.php  |  24 +--
 .../Tests/Core/Menu/LocalTaskManagerTest.php  |  12 +-
 .../Tests/Core/Menu/MenuActiveTrailTest.php   |   6 +-
 .../Core/Menu/MenuLinkDefaultFormTest.php     |   2 +-
 .../Tests/Core/Menu/MenuLinkDefaultTest.php   |   4 +-
 .../Core/Menu/MenuLinkTreeElementTest.php     |   4 +-
 .../Core/Menu/MenuTreeParametersTest.php      |  14 +-
 .../Core/Menu/StaticMenuLinkOverridesTest.php |  10 +-
 .../Core/PageCache/ChainRequestPolicyTest.php |  10 +-
 .../PageCache/ChainResponsePolicyTest.php     |   8 +-
 .../CommandLineOrUnsafeMethodTest.php         |   4 +-
 .../Core/PageCache/NoSessionOpenTest.php      |   2 +-
 .../ParamConverter/EntityConverterTest.php    |   8 +-
 .../EntityRevisionParamConverterTest.php      |  12 +-
 .../ParamConverterManagerTest.php             |  12 +-
 .../Password/DefaultPasswordGeneratorTest.php |   2 +-
 .../Tests/Core/Password/PhpPasswordTest.php   |   8 +-
 .../Tests/Core/Path/PathMatcherTest.php       |   2 +-
 .../Tests/Core/Path/PathValidatorTest.php     |  36 ++--
 .../PathProcessor/PathProcessorFrontTest.php  |   4 +-
 .../Core/PathProcessor/PathProcessorTest.php  |   2 +-
 .../CategorizingPluginManagerTraitTest.php    |   8 +-
 .../ContextDefinitionIsSatisfiedTest.php      |   2 +-
 .../Plugin/Context/ContextDefinitionTest.php  |   8 +-
 .../Tests/Core/Plugin/Context/ContextTest.php |  10 +-
 ...EntityContextDefinitionIsSatisfiedTest.php |   6 +-
 .../Context/LazyContextRepositoryTest.php     |  12 +-
 .../Tests/Core/Plugin/ContextHandlerTest.php  |  20 +-
 .../DefaultLazyPluginCollectionTest.php       |  30 +--
 .../Core/Plugin/DefaultPluginManagerTest.php  |  36 ++--
 .../DefaultSingleLazyPluginCollectionTest.php |   8 +-
 ...tainerDerivativeDiscoveryDecoratorTest.php |   2 +-
 .../DerivativeDiscoveryDecoratorTest.php      |  16 +-
 .../Plugin/Discovery/HookDiscoveryTest.php    |   8 +-
 .../Discovery/YamlDirectoryDiscoveryTest.php  |   4 +-
 .../Discovery/YamlDiscoveryDecoratorTest.php  |   2 +-
 .../Plugin/Discovery/YamlDiscoveryTest.php    |   6 +-
 .../Plugin/FilteredPluginManagerTraitTest.php |   2 +-
 .../Core/Plugin/PluginDependencyTraitTest.php |   4 +-
 .../Core/Plugin/PluginFormFactoryTest.php     |  14 +-
 .../Core/Plugin/PluginWithFormsTraitTest.php  |   2 +-
 .../Drupal/Tests/Core/PrivateKeyTest.php      |   6 +-
 .../Core/ProxyBuilder/ProxyBuilderTest.php    |   2 +-
 .../Core/Render/BubbleableMetadataTest.php    |  18 +-
 .../Tests/Core/Render/Element/HtmlTagTest.php |   4 +-
 .../Core/Render/Element/MachineNameTest.php   |   4 +-
 .../Render/Element/PasswordConfirmTest.php    |   2 +-
 .../Core/Render/Element/PasswordTest.php      |   2 +-
 .../Core/Render/Element/RenderElementTest.php |   4 +-
 .../Core/Render/Element/TableSelectTest.php   |   4 +-
 .../Core/Render/Element/TextareaTest.php      |   2 +-
 .../Core/Render/Element/TextfieldTest.php     |   2 +-
 .../Tests/Core/Render/Element/TokenTest.php   |   2 +-
 .../Core/Render/ElementInfoManagerTest.php    |   4 +-
 .../Drupal/Tests/Core/Render/ElementTest.php  |  20 +-
 .../MetadataBubblingUrlGeneratorTest.php      |   2 +-
 .../ChainedPlaceholderStrategyTest.php        |   6 +-
 .../Core/Render/PlaceholderGeneratorTest.php  |   4 +-
 .../Core/Render/RendererBubblingTest.php      |  12 +-
 .../Tests/Core/Render/RendererDebugTest.php   |   2 +-
 .../Core/Render/RendererPlaceholdersTest.php  |  20 +-
 .../Core/Render/RendererRecursionTest.php     |   6 +-
 .../Drupal/Tests/Core/Render/RendererTest.php |  32 +--
 .../Tests/Core/Route/RoleAccessCheckTest.php  |   2 +-
 .../RouteProcessorManagerTest.php             |   2 +-
 .../Core/Routing/AcceptHeaderMatcherTest.php  |   4 +-
 .../Core/Routing/AccessAwareRouterTest.php    |   8 +-
 .../Routing/ContentTypeHeaderMatcherTest.php  |  10 +-
 .../Core/Routing/CurrentRouteMatchTest.php    |   8 +-
 .../Core/Routing/LazyRouteCollectionTest.php  |   6 +-
 .../Tests/Core/Routing/MethodFilterTest.php   |  12 +-
 .../Core/Routing/PathChangedHelperTest.php    |   2 +-
 .../Core/Routing/RedirectDestinationTest.php  |   8 +-
 .../Routing/RequestFormatRouteFilterTest.php  |   6 +-
 .../Tests/Core/Routing/RouteBuilderTest.php   |  12 +-
 .../Tests/Core/Routing/RouteCompilerTest.php  |   6 +-
 .../Tests/Core/Routing/RouteMatchTest.php     |   2 +-
 .../Tests/Core/Routing/RoutePreloaderTest.php |  10 +-
 .../Drupal/Tests/Core/Routing/RouterTest.php  |   2 +-
 .../Core/Routing/RouterUnsupportedTest.php    |   2 +-
 .../Routing/TrustedRedirectResponseTest.php   |   8 +-
 .../Tests/Core/Routing/UrlGeneratorTest.php   |  30 +--
 .../Security/DoTrustedCallbackTraitTest.php   |   8 +-
 .../Core/Security/RequestSanitizerTest.php    |  10 +-
 .../Session/AccessPolicyProcessorTest.php     |  26 +--
 .../Tests/Core/Session/AccountProxyTest.php   |   6 +-
 .../Core/Session/AnonymousUserSessionTest.php |   2 +-
 .../Session/CalculatedPermissionsItemTest.php |   6 +-
 .../Session/CalculatedPermissionsTest.php     |   2 +-
 .../Tests/Core/Session/MetadataBagTest.php    |   2 +-
 .../Session/PermissionsHashGeneratorTest.php  |   8 +-
 .../RefinableCalculatedPermissionsTest.php    |  12 +-
 .../Core/Session/SessionConfigurationTest.php |  16 +-
 .../Tests/Core/Session/UserSessionTest.php    |   4 +-
 .../Session/WriteSafeSessionHandlerTest.php   |   8 +-
 .../Drupal/Tests/Core/Site/SettingsTest.php   |  16 +-
 .../StackMiddleware/ContentLengthTest.php     |   2 +-
 .../NegotiationMiddlewareTest.php             |  12 +-
 .../ReverseProxyMiddlewareTest.php            |   4 +-
 .../StringTranslation/ByteSizeMarkupTest.php  |   2 +-
 .../PluralTranslatableMarkupTest.php          |   4 +-
 .../TranslatableMarkupTest.php                |   6 +-
 .../TranslationManagerTest.php                |   4 +-
 .../TranslationWrapperTest.php                |   2 +-
 .../Core/TempStore/PrivateTempStoreTest.php   |  14 +-
 .../Core/TempStore/SharedTempStoreTest.php    |  26 +--
 .../Core/Template/AttributeHelperTest.php     |   6 +-
 .../Tests/Core/Template/AttributeTest.php     |  36 ++--
 .../Loader/ThemeRegistryLoaderTest.php        |   2 +-
 .../Tests/Core/Template/TwigExtensionTest.php |  32 +--
 .../Tests/Core/Template/TwigSandboxTest.php   |  10 +-
 .../Core/Test/AssertContentTraitTest.php      |   2 +-
 .../Tests/Core/Test/BrowserTestBaseTest.php   |   6 +-
 .../Tests/Core/Test/JUnitConverterTest.php    |   8 +-
 .../Tests/Core/Test/PhpUnitAutoloaderTest.php |   2 +-
 .../Core/Test/PhpUnitBridgeIsolatedTest.php   |   2 +-
 .../Tests/Core/Test/PhpUnitBridgeTest.php     |   4 +-
 .../Drupal/Tests/Core/Test/PhpUnitCliTest.php |   2 +-
 .../Tests/Core/Test/PhpUnitTestRunnerTest.php |   8 +-
 .../Core/Test/RunTests/TestFileParserTest.php |   4 +-
 .../Tests/Core/Test/TestDatabaseTest.php      |   6 +-
 .../Tests/Core/Test/TestDiscoveryTest.php     |  18 +-
 .../Tests/Core/Test/TestSetupTraitTest.php    |   2 +-
 .../Tests/Core/Test/TestSuiteBaseTest.php     |   2 +-
 .../Core/Theme/AjaxBasePageNegotiatorTest.php |   8 +-
 .../Theme/Component/ComponentMetadataTest.php |   4 +-
 .../Component/ComponentPluginManagerTest.php  |   2 +-
 .../Theme/CoreThemesAutoloadedForTests.php    |   2 +-
 .../Drupal/Tests/Core/Theme/RegistryTest.php  |   4 +-
 .../Tests/Core/Theme/ThemeNegotiatorTest.php  |   8 +-
 .../PhpTransliterationTest.php                |   2 +-
 .../RecursiveContextualValidatorTest.php      |  22 +--
 .../Drupal/Tests/Core/UnroutedUrlTest.php     |  20 +-
 .../Core/Update/UpdateHookRegistryTest.php    |   4 +-
 .../Tests/Core/Update/UpdateRegistryTest.php  |  24 +--
 core/tests/Drupal/Tests/Core/UrlTest.php      |  64 +++---
 .../Core/Utility/CallableResolverTest.php     |   4 +-
 .../Tests/Core/Utility/LinkGeneratorTest.php  |  34 ++--
 .../Drupal/Tests/Core/Utility/TokenTest.php   |  16 +-
 .../Core/Utility/UnroutedUrlAssemblerTest.php |  14 +-
 .../Drupal/Tests/ExpectDeprecationTest.php    |   4 +-
 core/tests/Drupal/Tests/PhpCs/SortTest.php    |   4 +-
 .../Tests/Scripts/TestSiteApplicationTest.php |  14 +-
 .../Config/SchemaConfigListenerTestTrait.php  |   2 +-
 core/tests/Drupal/Tests/UnitTestCaseTest.php  |   4 +-
 3054 files changed, 8414 insertions(+), 8414 deletions(-)

diff --git a/core/modules/announcements_feed/tests/src/FunctionalJavascript/AccessAnnouncementTest.php b/core/modules/announcements_feed/tests/src/FunctionalJavascript/AccessAnnouncementTest.php
index 189f42f845ae..02718fe8e406 100644
--- a/core/modules/announcements_feed/tests/src/FunctionalJavascript/AccessAnnouncementTest.php
+++ b/core/modules/announcements_feed/tests/src/FunctionalJavascript/AccessAnnouncementTest.php
@@ -40,7 +40,7 @@ public function setUp():void {
   /**
    * Test of viewing announcements by a user with appropriate permission.
    */
-  public function testAnnounceFirstLogin() {
+  public function testAnnounceFirstLogin(): void {
     $this->drupalLogin(
       $this->drupalCreateUser(
         [
@@ -62,7 +62,7 @@ public function testAnnounceFirstLogin() {
   /**
    * Testing announce icon without announce permission.
    */
-  public function testAnnounceWithoutPermission() {
+  public function testAnnounceWithoutPermission(): void {
     // User without "access announcements" permission.
     $account = $this->drupalCreateUser(
       [
diff --git a/core/modules/announcements_feed/tests/src/FunctionalJavascript/AlertsJsonFeedTest.php b/core/modules/announcements_feed/tests/src/FunctionalJavascript/AlertsJsonFeedTest.php
index 96f3b81b3e1f..a4b09d7feaee 100644
--- a/core/modules/announcements_feed/tests/src/FunctionalJavascript/AlertsJsonFeedTest.php
+++ b/core/modules/announcements_feed/tests/src/FunctionalJavascript/AlertsJsonFeedTest.php
@@ -56,7 +56,7 @@ public function setUp():void {
   /**
    * Check the status of the announcements when the feed is updated and removed.
    */
-  public function testAnnounceFeedUpdatedAndRemoved() {
+  public function testAnnounceFeedUpdatedAndRemoved(): void {
     $this->markTestSkipped('Skipped due to major version-specific logic. See https://www.drupal.org/project/drupal/issues/3359322');
     $this->drupalLogin($this->user);
     $this->drupalGet('<front>');
@@ -88,7 +88,7 @@ public function testAnnounceFeedUpdatedAndRemoved() {
   /**
    * Check with an empty JSON feed.
    */
-  public function testAnnounceFeedEmpty() {
+  public function testAnnounceFeedEmpty(): void {
     // Change the feed url and reset temp storage.
     AnnounceTestHttpClientMiddleware::setAnnounceTestEndpoint('/announce-feed-json/empty');
 
diff --git a/core/modules/announcements_feed/tests/src/Kernel/AnnounceRendererTest.php b/core/modules/announcements_feed/tests/src/Kernel/AnnounceRendererTest.php
index d91eebca43da..0c02a77fbe49 100644
--- a/core/modules/announcements_feed/tests/src/Kernel/AnnounceRendererTest.php
+++ b/core/modules/announcements_feed/tests/src/Kernel/AnnounceRendererTest.php
@@ -16,7 +16,7 @@ class AnnounceRendererTest extends AnnounceTestBase {
   /**
    * Tests rendered valid when something goes wrong.
    */
-  public function testRendererException() {
+  public function testRendererException(): void {
     $this->setTestFeedResponses([
       new Response(403),
     ]);
@@ -28,7 +28,7 @@ public function testRendererException() {
   /**
    * Tests rendered valid content.
    */
-  public function testRendererContent() {
+  public function testRendererContent(): void {
     $feed_item_1 = [
       'id' => '1001',
       'content_html' => 'Test teaser 1',
diff --git a/core/modules/announcements_feed/tests/src/Unit/AnnounceFetcherUnitTest.php b/core/modules/announcements_feed/tests/src/Unit/AnnounceFetcherUnitTest.php
index f919d86c1cfa..a5f98b7cc39c 100644
--- a/core/modules/announcements_feed/tests/src/Unit/AnnounceFetcherUnitTest.php
+++ b/core/modules/announcements_feed/tests/src/Unit/AnnounceFetcherUnitTest.php
@@ -50,7 +50,7 @@ public function setUp():void {
    *
    * @dataProvider urlProvider
    */
-  public function testValidateUrl($url, $isValid) {
+  public function testValidateUrl($url, $isValid): void {
     $this->assertEquals($isValid, $this->fetcher->validateUrl($url));
   }
 
diff --git a/core/modules/ban/tests/src/Functional/IpAddressBlockingTest.php b/core/modules/ban/tests/src/Functional/IpAddressBlockingTest.php
index ee1aeb29f0a6..94bd146e7161 100644
--- a/core/modules/ban/tests/src/Functional/IpAddressBlockingTest.php
+++ b/core/modules/ban/tests/src/Functional/IpAddressBlockingTest.php
@@ -30,7 +30,7 @@ class IpAddressBlockingTest extends BrowserTestBase {
   /**
    * Tests various user input to confirm correct validation and saving of data.
    */
-  public function testIPAddressValidation() {
+  public function testIPAddressValidation(): void {
     // Create user.
     $admin_user = $this->drupalCreateUser(['ban IP addresses']);
     $this->drupalLogin($admin_user);
diff --git a/core/modules/ban/tests/src/Kernel/Migrate/d7/MigrateBlockedIpsTest.php b/core/modules/ban/tests/src/Kernel/Migrate/d7/MigrateBlockedIpsTest.php
index 4e9f0e0e496e..a8177d312f43 100644
--- a/core/modules/ban/tests/src/Kernel/Migrate/d7/MigrateBlockedIpsTest.php
+++ b/core/modules/ban/tests/src/Kernel/Migrate/d7/MigrateBlockedIpsTest.php
@@ -34,7 +34,7 @@ protected function setUp(): void {
   /**
    * Tests migration of blocked IPs.
    */
-  public function testBlockedIps() {
+  public function testBlockedIps(): void {
     $this->startCollectingMessages();
     $this->executeMigration('d7_blocked_ips');
     $this->assertEmpty($this->migrateMessages);
diff --git a/core/modules/ban/tests/src/Unit/BanMiddlewareTest.php b/core/modules/ban/tests/src/Unit/BanMiddlewareTest.php
index 4b43d161715e..77b9b87d9347 100644
--- a/core/modules/ban/tests/src/Unit/BanMiddlewareTest.php
+++ b/core/modules/ban/tests/src/Unit/BanMiddlewareTest.php
@@ -51,7 +51,7 @@ protected function setUp(): void {
   /**
    * Tests a banned IP.
    */
-  public function testBannedIp() {
+  public function testBannedIp(): void {
     $banned_ip = '17.0.0.2';
     $this->banManager->expects($this->once())
       ->method('isBanned')
@@ -71,7 +71,7 @@ public function testBannedIp() {
   /**
    * Tests an unbanned IP.
    */
-  public function testUnbannedIp() {
+  public function testUnbannedIp(): void {
     $unbanned_ip = '18.0.0.2';
     $this->banManager->expects($this->once())
       ->method('isBanned')
diff --git a/core/modules/basic_auth/tests/src/Functional/BasicAuthTest.php b/core/modules/basic_auth/tests/src/Functional/BasicAuthTest.php
index 1d9f3fca3fd8..c91b28eabf96 100644
--- a/core/modules/basic_auth/tests/src/Functional/BasicAuthTest.php
+++ b/core/modules/basic_auth/tests/src/Functional/BasicAuthTest.php
@@ -39,7 +39,7 @@ class BasicAuthTest extends BrowserTestBase {
   /**
    * Tests http basic authentication.
    */
-  public function testBasicAuth() {
+  public function testBasicAuth(): void {
     // Enable page caching.
     $config = $this->config('system.performance');
     $config->set('cache.page.max_age', 300);
@@ -95,7 +95,7 @@ public function testBasicAuth() {
   /**
    * Tests the global login flood control.
    */
-  public function testGlobalLoginFloodControl() {
+  public function testGlobalLoginFloodControl(): void {
     $this->config('user.flood')
       ->set('ip_limit', 2)
       // Set a high per-user limit out so that it is not relevant in the test.
@@ -120,7 +120,7 @@ public function testGlobalLoginFloodControl() {
   /**
    * Tests the per-user login flood control.
    */
-  public function testPerUserLoginFloodControl() {
+  public function testPerUserLoginFloodControl(): void {
     $this->config('user.flood')
       // Set a high global limit out so that it is not relevant in the test.
       ->set('ip_limit', 4000)
@@ -158,7 +158,7 @@ public function testPerUserLoginFloodControl() {
   /**
    * Tests compatibility with locale/UI translation.
    */
-  public function testLocale() {
+  public function testLocale(): void {
     ConfigurableLanguage::createFromLangcode('de')->save();
     $this->config('system.site')->set('default_langcode', 'de')->save();
 
@@ -173,7 +173,7 @@ public function testLocale() {
   /**
    * Tests if a comprehensive message is displayed when the route is denied.
    */
-  public function testUnauthorizedErrorMessage() {
+  public function testUnauthorizedErrorMessage(): void {
     $account = $this->drupalCreateUser();
     $url = Url::fromRoute('router_test.11');
 
@@ -209,7 +209,7 @@ public function testUnauthorizedErrorMessage() {
    *
    * @see \Drupal\basic_auth\Authentication\Provider\BasicAuth::challengeException()
    */
-  public function testCacheabilityOf401Response() {
+  public function testCacheabilityOf401Response(): void {
     $url = Url::fromRoute('router_test.11');
 
     $assert_response_cacheability = function ($expected_page_cache_header_value, $expected_dynamic_page_cache_header_value) use ($url) {
@@ -249,7 +249,7 @@ public function testCacheabilityOf401Response() {
    *
    * @see https://www.drupal.org/node/2817727
    */
-  public function testControllerNotCalledBeforeAuth() {
+  public function testControllerNotCalledBeforeAuth(): void {
     $this->drupalGet('/basic_auth_test/state/modify');
     $this->assertSession()->statusCodeEquals(401);
     $this->drupalGet('/basic_auth_test/state/read');
diff --git a/core/modules/big_pipe/tests/src/Functional/BigPipeTest.php b/core/modules/big_pipe/tests/src/Functional/BigPipeTest.php
index 0c55b3884864..08cabf578218 100644
--- a/core/modules/big_pipe/tests/src/Functional/BigPipeTest.php
+++ b/core/modules/big_pipe/tests/src/Functional/BigPipeTest.php
@@ -78,7 +78,7 @@ protected function performMetaRefresh() {
    * - big_pipe_page_attachments()
    * - \Drupal\big_pipe\Controller\BigPipeController
    */
-  public function testNoJsDetection() {
+  public function testNoJsDetection(): void {
     $no_js_to_js_markup = '<script>document.cookie = "' . BigPipeStrategy::NOJS_COOKIE . '=1; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT"</script>';
 
     // 1. No session (anonymous).
@@ -142,7 +142,7 @@ public function testNoJsDetection() {
    *
    * @see \Drupal\big_pipe_test\BigPipePlaceholderTestCases
    */
-  public function testBigPipe() {
+  public function testBigPipe(): void {
     // Simulate production.
     $this->config('system.logging')->set('error_level', ERROR_REPORTING_HIDE)->save();
 
@@ -231,7 +231,7 @@ public function testBigPipe() {
    *
    * @see \Drupal\big_pipe_test\BigPipePlaceholderTestCases
    */
-  public function testBigPipeNoJs() {
+  public function testBigPipeNoJs(): void {
     // Simulate production.
     $this->config('system.logging')->set('error_level', ERROR_REPORTING_HIDE)->save();
 
@@ -294,7 +294,7 @@ public function testBigPipeNoJs() {
   /**
    * Tests BigPipe with a multi-occurrence placeholder.
    */
-  public function testBigPipeMultiOccurrencePlaceholders() {
+  public function testBigPipeMultiOccurrencePlaceholders(): void {
     $this->drupalLogin($this->rootUser);
     $this->assertSessionCookieExists('1');
     $this->assertBigPipeNoJsCookieExists('0');
diff --git a/core/modules/big_pipe/tests/src/FunctionalJavascript/BigPipePreviewTest.php b/core/modules/big_pipe/tests/src/FunctionalJavascript/BigPipePreviewTest.php
index 727331081631..3579ca7b2f4a 100644
--- a/core/modules/big_pipe/tests/src/FunctionalJavascript/BigPipePreviewTest.php
+++ b/core/modules/big_pipe/tests/src/FunctionalJavascript/BigPipePreviewTest.php
@@ -31,7 +31,7 @@ class BigPipePreviewTest extends WebDriverTestBase {
   /**
    * Test preview functionality within placeholders.
    */
-  public function testLazyLoaderPreview() {
+  public function testLazyLoaderPreview(): void {
     $user = $this->drupalCreateUser([]);
     $display_name = $user->getDisplayName();
     $this->drupalLogin($user);
diff --git a/core/modules/big_pipe/tests/src/FunctionalJavascript/BigPipeRegressionTest.php b/core/modules/big_pipe/tests/src/FunctionalJavascript/BigPipeRegressionTest.php
index 22188d9fc806..d811b561d8e1 100644
--- a/core/modules/big_pipe/tests/src/FunctionalJavascript/BigPipeRegressionTest.php
+++ b/core/modules/big_pipe/tests/src/FunctionalJavascript/BigPipeRegressionTest.php
@@ -45,7 +45,7 @@ protected function setUp(): void {
    *
    * @see https://www.drupal.org/node/2678662
    */
-  public function testMultipleClosingBodies_2678662() {
+  public function testMultipleClosingBodies_2678662(): void {
     $this->assertTrue($this->container->get('module_installer')->install(['render_placeholder_message_test'], TRUE), 'Installed modules.');
 
     $this->drupalLogin($this->drupalCreateUser());
@@ -78,7 +78,7 @@ public function testMultipleClosingBodies_2678662() {
    *
    * @see https://www.drupal.org/node/2712935
    */
-  public function testMessages_2712935() {
+  public function testMessages_2712935(): void {
     $this->assertTrue($this->container->get('module_installer')->install(['render_placeholder_message_test'], TRUE), 'Installed modules.');
 
     $this->drupalLogin($this->drupalCreateUser());
@@ -118,7 +118,7 @@ public function testMessages_2712935() {
    *
    * @see https://www.drupal.org/node/2802923
    */
-  public function testPlaceholderInParagraph_2802923() {
+  public function testPlaceholderInParagraph_2802923(): void {
     $this->drupalLogin($this->drupalCreateUser());
     $this->drupalGet(Url::fromRoute('big_pipe_regression_test.2802923'));
 
@@ -131,7 +131,7 @@ public function testPlaceholderInParagraph_2802923() {
    * Repeat loading of same page for two times, after second time the page is
    * cached and the bug consistently reproducible.
    */
-  public function testBigPipeLargeContent() {
+  public function testBigPipeLargeContent(): void {
     $user = $this->drupalCreateUser();
     $this->drupalLogin($user);
     $assert_session = $this->assertSession();
diff --git a/core/modules/big_pipe/tests/src/Kernel/BigPipeInterfacePreviewThemeSuggestionsTest.php b/core/modules/big_pipe/tests/src/Kernel/BigPipeInterfacePreviewThemeSuggestionsTest.php
index 5ac95bcca3c6..73ccd3144f11 100644
--- a/core/modules/big_pipe/tests/src/Kernel/BigPipeInterfacePreviewThemeSuggestionsTest.php
+++ b/core/modules/big_pipe/tests/src/Kernel/BigPipeInterfacePreviewThemeSuggestionsTest.php
@@ -60,7 +60,7 @@ protected function setUp(): void {
   /**
    * Tests template suggestions from big_pipe_theme_suggestions_big_pipe_interface_preview().
    */
-  public function testBigPipeThemeHookSuggestions() {
+  public function testBigPipeThemeHookSuggestions(): void {
     $entity = $this->controller->create([
       'id' => 'test_block1',
       'theme' => 'stark',
diff --git a/core/modules/big_pipe/tests/src/Unit/Render/BigPipeResponseAttachmentsProcessorTest.php b/core/modules/big_pipe/tests/src/Unit/Render/BigPipeResponseAttachmentsProcessorTest.php
index 964154eb5ce8..80c3d2de08c3 100644
--- a/core/modules/big_pipe/tests/src/Unit/Render/BigPipeResponseAttachmentsProcessorTest.php
+++ b/core/modules/big_pipe/tests/src/Unit/Render/BigPipeResponseAttachmentsProcessorTest.php
@@ -34,7 +34,7 @@ class BigPipeResponseAttachmentsProcessorTest extends UnitTestCase {
    *
    * @dataProvider nonHtmlResponseProvider
    */
-  public function testNonHtmlResponse($response_class) {
+  public function testNonHtmlResponse($response_class): void {
     $big_pipe_response_attachments_processor = $this->createBigPipeResponseAttachmentsProcessor($this->prophesize(AttachmentsResponseProcessorInterface::class));
 
     $non_html_response = new $response_class();
@@ -54,7 +54,7 @@ public static function nonHtmlResponseProvider() {
    *
    * @dataProvider attachmentsProvider
    */
-  public function testHtmlResponse(array $attachments) {
+  public function testHtmlResponse(array $attachments): void {
     $big_pipe_response = new BigPipeResponse(new HtmlResponse('original'));
     $big_pipe_response->setAttachments($attachments);
 
diff --git a/core/modules/big_pipe/tests/src/Unit/Render/FiberPlaceholderTest.php b/core/modules/big_pipe/tests/src/Unit/Render/FiberPlaceholderTest.php
index 47f7be38cb40..25b9d45103ad 100644
--- a/core/modules/big_pipe/tests/src/Unit/Render/FiberPlaceholderTest.php
+++ b/core/modules/big_pipe/tests/src/Unit/Render/FiberPlaceholderTest.php
@@ -33,7 +33,7 @@ class FiberPlaceholderTest extends UnitTestCase {
   /**
    * @covers \Drupal\big_pipe\Render\BigPipe::sendPlaceholders
    */
-  public function testLongPlaceholderFiberSuspendingLoop() {
+  public function testLongPlaceholderFiberSuspendingLoop(): void {
     $request_stack = $this->prophesize(RequestStack::class);
     $request_stack->getMainRequest()
       ->willReturn(new Request());
diff --git a/core/modules/big_pipe/tests/src/Unit/Render/ManyPlaceholderTest.php b/core/modules/big_pipe/tests/src/Unit/Render/ManyPlaceholderTest.php
index e6bd1811f705..7446def8ce05 100644
--- a/core/modules/big_pipe/tests/src/Unit/Render/ManyPlaceholderTest.php
+++ b/core/modules/big_pipe/tests/src/Unit/Render/ManyPlaceholderTest.php
@@ -25,7 +25,7 @@ class ManyPlaceholderTest extends UnitTestCase {
   /**
    * @covers \Drupal\big_pipe\Render\BigPipe::sendNoJsPlaceholders
    */
-  public function testManyNoJsPlaceHolders() {
+  public function testManyNoJsPlaceHolders(): void {
     $session = $this->prophesize(SessionInterface::class);
     $session->start()->willReturn(TRUE);
     $session->save()->shouldBeCalled();
diff --git a/core/modules/big_pipe/tests/src/Unit/Render/Placeholder/BigPipeStrategyTest.php b/core/modules/big_pipe/tests/src/Unit/Render/Placeholder/BigPipeStrategyTest.php
index 864449845b79..f69b82d2096f 100644
--- a/core/modules/big_pipe/tests/src/Unit/Render/Placeholder/BigPipeStrategyTest.php
+++ b/core/modules/big_pipe/tests/src/Unit/Render/Placeholder/BigPipeStrategyTest.php
@@ -25,7 +25,7 @@ class BigPipeStrategyTest extends UnitTestCase {
    *
    * @dataProvider placeholdersProvider
    */
-  public function testProcessPlaceholders(array $placeholders, $method, $route_match_has_no_big_pipe_option, $request_has_session, $request_has_big_pipe_nojs_cookie, array $expected_big_pipe_placeholders) {
+  public function testProcessPlaceholders(array $placeholders, $method, $route_match_has_no_big_pipe_option, $request_has_session, $request_has_big_pipe_nojs_cookie, array $expected_big_pipe_placeholders): void {
     $request = new Request();
     $request->setMethod($method);
     if ($request_has_big_pipe_nojs_cookie) {
diff --git a/core/modules/big_pipe/tests/src/Unit/StackMiddleware/ContentLengthTest.php b/core/modules/big_pipe/tests/src/Unit/StackMiddleware/ContentLengthTest.php
index 34388d32eadf..3a6090b7afff 100644
--- a/core/modules/big_pipe/tests/src/Unit/StackMiddleware/ContentLengthTest.php
+++ b/core/modules/big_pipe/tests/src/Unit/StackMiddleware/ContentLengthTest.php
@@ -24,7 +24,7 @@ final class ContentLengthTest extends UnitTestCase {
    * @covers ::handle
    * @dataProvider providerTestSetContentLengthHeader
    */
-  public function testHandle(false|int $expected_header, Response $response) {
+  public function testHandle(false|int $expected_header, Response $response): void {
     $kernel = $this->prophesize(HttpKernelInterface::class);
     $request = Request::create('/');
     $kernel->handle($request, HttpKernelInterface::MAIN_REQUEST, TRUE)->willReturn($response);
diff --git a/core/modules/block/tests/src/Functional/BlockAdminThemeTest.php b/core/modules/block/tests/src/Functional/BlockAdminThemeTest.php
index 3f250d96a235..7d712fe6673e 100644
--- a/core/modules/block/tests/src/Functional/BlockAdminThemeTest.php
+++ b/core/modules/block/tests/src/Functional/BlockAdminThemeTest.php
@@ -28,7 +28,7 @@ class BlockAdminThemeTest extends BrowserTestBase {
   /**
    * Check for the accessibility of the admin theme on the block admin page.
    */
-  public function testAdminTheme() {
+  public function testAdminTheme(): void {
     // Create administrative user.
     $admin_user = $this->drupalCreateUser([
       'administer blocks',
@@ -53,7 +53,7 @@ public function testAdminTheme() {
   /**
    * Ensure contextual links are disabled in Claro theme.
    */
-  public function testClaroAdminTheme() {
+  public function testClaroAdminTheme(): void {
     // Create administrative user.
     $admin_user = $this->drupalCreateUser([
       'access administration pages',
diff --git a/core/modules/block/tests/src/Functional/BlockCacheTest.php b/core/modules/block/tests/src/Functional/BlockCacheTest.php
index ec5cd4355f92..1c6886eb08fa 100644
--- a/core/modules/block/tests/src/Functional/BlockCacheTest.php
+++ b/core/modules/block/tests/src/Functional/BlockCacheTest.php
@@ -82,7 +82,7 @@ protected function setUp(): void {
   /**
    * Tests "user.roles" cache context.
    */
-  public function testCachePerRole() {
+  public function testCachePerRole(): void {
     \Drupal::state()->set('block_test.cache_contexts', ['user.roles']);
 
     // Enable our test block. Set some content for it to display.
@@ -134,7 +134,7 @@ public function testCachePerRole() {
   /**
    * Tests a cacheable block without any additional cache context.
    */
-  public function testCachePermissions() {
+  public function testCachePermissions(): void {
     // user.permissions is a required context, so a user with different
     // permissions will see a different version of the block.
     \Drupal::state()->set('block_test.cache_contexts', []);
@@ -162,7 +162,7 @@ public function testCachePermissions() {
   /**
    * Tests non-cacheable block.
    */
-  public function testNoCache() {
+  public function testNoCache(): void {
     \Drupal::state()->set('block_test.cache_max_age', 0);
 
     $current_content = $this->randomMachineName();
@@ -183,7 +183,7 @@ public function testNoCache() {
   /**
    * Tests "user" cache context.
    */
-  public function testCachePerUser() {
+  public function testCachePerUser(): void {
     \Drupal::state()->set('block_test.cache_contexts', ['user']);
 
     $current_content = $this->randomMachineName();
@@ -215,7 +215,7 @@ public function testCachePerUser() {
   /**
    * Tests "url" cache context.
    */
-  public function testCachePerPage() {
+  public function testCachePerPage(): void {
     \Drupal::state()->set('block_test.cache_contexts', ['url']);
 
     $current_content = $this->randomMachineName();
diff --git a/core/modules/block/tests/src/Functional/BlockDemoTest.php b/core/modules/block/tests/src/Functional/BlockDemoTest.php
index 0b06daf0ebc5..e88104f3bdf3 100644
--- a/core/modules/block/tests/src/Functional/BlockDemoTest.php
+++ b/core/modules/block/tests/src/Functional/BlockDemoTest.php
@@ -28,7 +28,7 @@ class BlockDemoTest extends BrowserTestBase {
   /**
    * Check for the accessibility of the admin block demo page.
    */
-  public function testBlockDemo() {
+  public function testBlockDemo(): void {
     // Create administrative user.
     $admin_user = $this->drupalCreateUser([
       'administer blocks',
diff --git a/core/modules/block/tests/src/Functional/BlockFormInBlockTest.php b/core/modules/block/tests/src/Functional/BlockFormInBlockTest.php
index 7077279e8924..079cc02cd1c5 100644
--- a/core/modules/block/tests/src/Functional/BlockFormInBlockTest.php
+++ b/core/modules/block/tests/src/Functional/BlockFormInBlockTest.php
@@ -39,7 +39,7 @@ protected function setUp(): void {
   /**
    * Tests to see if form in block's redirect isn't cached.
    */
-  public function testCachePerPage() {
+  public function testCachePerPage(): void {
     $form_values = ['email' => 'test@example.com'];
 
     // Go to "test-page" and test if the block is enabled.
@@ -69,7 +69,7 @@ public function testCachePerPage() {
   /**
    * Tests the actual placeholders.
    */
-  public function testPlaceholders() {
+  public function testPlaceholders(): void {
     $this->drupalGet('test-multiple-forms');
 
     $placeholder = 'form_action_' . Crypt::hashBase64('Drupal\Core\Form\FormBuilder::prepareForm');
diff --git a/core/modules/block/tests/src/Functional/BlockHiddenRegionTest.php b/core/modules/block/tests/src/Functional/BlockHiddenRegionTest.php
index 6b79694c2f40..264283a7631c 100644
--- a/core/modules/block/tests/src/Functional/BlockHiddenRegionTest.php
+++ b/core/modules/block/tests/src/Functional/BlockHiddenRegionTest.php
@@ -51,7 +51,7 @@ protected function setUp(): void {
   /**
    * Tests that hidden regions do not inherit blocks when a theme is installed.
    */
-  public function testBlockNotInHiddenRegion() {
+  public function testBlockNotInHiddenRegion(): void {
 
     // Ensure that the search form block is displayed.
     $this->drupalGet('');
diff --git a/core/modules/block/tests/src/Functional/BlockHookOperationTest.php b/core/modules/block/tests/src/Functional/BlockHookOperationTest.php
index 53076f65eef1..37fa57284b8f 100644
--- a/core/modules/block/tests/src/Functional/BlockHookOperationTest.php
+++ b/core/modules/block/tests/src/Functional/BlockHookOperationTest.php
@@ -43,7 +43,7 @@ protected function setUp(): void {
   /**
    * Tests the block list to see if the test_operation link is added.
    */
-  public function testBlockOperationAlter() {
+  public function testBlockOperationAlter(): void {
     // Add a test block, any block will do.
     // Set the machine name so the test_operation link can be built later.
     $block_id = $this->randomMachineName(16);
diff --git a/core/modules/block/tests/src/Functional/BlockHtmlTest.php b/core/modules/block/tests/src/Functional/BlockHtmlTest.php
index 439984bd4a5c..e0f31032070b 100644
--- a/core/modules/block/tests/src/Functional/BlockHtmlTest.php
+++ b/core/modules/block/tests/src/Functional/BlockHtmlTest.php
@@ -48,7 +48,7 @@ protected function setUp(): void {
   /**
    * Tests for valid HTML for a block.
    */
-  public function testHtml() {
+  public function testHtml(): void {
     $this->drupalGet('');
 
     // Ensure that a block's ID is converted to an HTML valid ID, and that
diff --git a/core/modules/block/tests/src/Functional/BlockInstallTest.php b/core/modules/block/tests/src/Functional/BlockInstallTest.php
index 6897526c86d3..eebbd02c7a2f 100644
--- a/core/modules/block/tests/src/Functional/BlockInstallTest.php
+++ b/core/modules/block/tests/src/Functional/BlockInstallTest.php
@@ -18,7 +18,7 @@ class BlockInstallTest extends BrowserTestBase {
    */
   protected $defaultTheme = 'stark';
 
-  public function testCacheTagInvalidationUponInstallation() {
+  public function testCacheTagInvalidationUponInstallation(): void {
     // Warm the page cache.
     $this->drupalGet('');
     $this->assertSession()->pageTextNotContains('Powered by Drupal');
diff --git a/core/modules/block/tests/src/Functional/BlockInvalidRegionTest.php b/core/modules/block/tests/src/Functional/BlockInvalidRegionTest.php
index a111dacc75fe..514ae49846de 100644
--- a/core/modules/block/tests/src/Functional/BlockInvalidRegionTest.php
+++ b/core/modules/block/tests/src/Functional/BlockInvalidRegionTest.php
@@ -43,7 +43,7 @@ protected function setUp(): void {
   /**
    * Tests that blocks assigned to invalid regions work correctly.
    */
-  public function testBlockInInvalidRegion() {
+  public function testBlockInInvalidRegion(): void {
     // Enable a test block and place it in an invalid region.
     $block = $this->drupalPlaceBlock('test_html');
     \Drupal::configFactory()->getEditable('block.block.' . $block->id())->set('region', 'invalid_region')->save();
diff --git a/core/modules/block/tests/src/Functional/BlockLanguageCacheTest.php b/core/modules/block/tests/src/Functional/BlockLanguageCacheTest.php
index b728d0732359..6b2f5a2e69c5 100644
--- a/core/modules/block/tests/src/Functional/BlockLanguageCacheTest.php
+++ b/core/modules/block/tests/src/Functional/BlockLanguageCacheTest.php
@@ -54,7 +54,7 @@ protected function setUp(): void {
   /**
    * Creates a block in a language, check blocks page in all languages.
    */
-  public function testBlockLinks() {
+  public function testBlockLinks(): void {
     // Create admin user to be able to access block admin.
     $admin_user = $this->drupalCreateUser([
       'administer blocks',
diff --git a/core/modules/block/tests/src/Functional/BlockLanguageTest.php b/core/modules/block/tests/src/Functional/BlockLanguageTest.php
index 173d939e7670..d1b297c2d473 100644
--- a/core/modules/block/tests/src/Functional/BlockLanguageTest.php
+++ b/core/modules/block/tests/src/Functional/BlockLanguageTest.php
@@ -69,7 +69,7 @@ protected function setUp(): void {
   /**
    * Tests the visibility settings for the blocks based on language.
    */
-  public function testLanguageBlockVisibility() {
+  public function testLanguageBlockVisibility(): void {
     // Check if the visibility setting is available.
     $default_theme = $this->config('system.theme')->get('default');
     $this->drupalGet('admin/structure/block/add/system_powered_by_block' . '/' . $default_theme);
@@ -108,7 +108,7 @@ public function testLanguageBlockVisibility() {
   /**
    * Tests if the visibility settings are removed if the language is deleted.
    */
-  public function testLanguageBlockVisibilityLanguageDelete() {
+  public function testLanguageBlockVisibilityLanguageDelete(): void {
     // Enable a standard block and set the visibility setting for one language.
     $edit = [
       'visibility' => [
@@ -145,7 +145,7 @@ public function testLanguageBlockVisibilityLanguageDelete() {
   /**
    * Tests block language visibility with different language types.
    */
-  public function testMultipleLanguageTypes() {
+  public function testMultipleLanguageTypes(): void {
     // Customize content language detection to be different from interface
     // language detection.
     $edit = [
diff --git a/core/modules/block/tests/src/Functional/BlockRenderOrderTest.php b/core/modules/block/tests/src/Functional/BlockRenderOrderTest.php
index 1fb9a6fbe59f..fd909f6ae336 100644
--- a/core/modules/block/tests/src/Functional/BlockRenderOrderTest.php
+++ b/core/modules/block/tests/src/Functional/BlockRenderOrderTest.php
@@ -41,7 +41,7 @@ protected function setUp(): void {
   /**
    * Tests the render order of the blocks.
    */
-  public function testBlockRenderOrder() {
+  public function testBlockRenderOrder(): void {
     // Enable test blocks and place them in the same region.
     $region = 'header';
     $test_blocks = [
diff --git a/core/modules/block/tests/src/Functional/BlockSystemBrandingTest.php b/core/modules/block/tests/src/Functional/BlockSystemBrandingTest.php
index a0bed0cf80df..dc20aefd6bd8 100644
--- a/core/modules/block/tests/src/Functional/BlockSystemBrandingTest.php
+++ b/core/modules/block/tests/src/Functional/BlockSystemBrandingTest.php
@@ -39,7 +39,7 @@ protected function setUp(): void {
   /**
    * Tests system branding block configuration.
    */
-  public function testSystemBrandingSettings() {
+  public function testSystemBrandingSettings(): void {
     $site_logo_xpath = '//div[@id="block-site-branding"]/a/img';
     $site_name_xpath = '//div[@id="block-site-branding"]/a[text() = "Drupal"]';
     $site_slogan_xpath = '//div[@id="block-site-branding"]/descendant::text()[last()]';
diff --git a/core/modules/block/tests/src/Functional/BlockTest.php b/core/modules/block/tests/src/Functional/BlockTest.php
index 1861c39d1f55..4738e97f0a9f 100644
--- a/core/modules/block/tests/src/Functional/BlockTest.php
+++ b/core/modules/block/tests/src/Functional/BlockTest.php
@@ -26,7 +26,7 @@ class BlockTest extends BlockTestBase {
   /**
    * Tests block visibility.
    */
-  public function testBlockVisibility() {
+  public function testBlockVisibility(): void {
     $block_name = 'system_powered_by_block';
     // Create a random title for the block.
     $title = $this->randomMachineName(8);
@@ -86,7 +86,7 @@ public function testBlockVisibility() {
   /**
    * Tests that visibility can be properly toggled.
    */
-  public function testBlockToggleVisibility() {
+  public function testBlockToggleVisibility(): void {
     $block_name = 'system_powered_by_block';
     // Create a random title for the block.
     $title = $this->randomMachineName(8);
@@ -123,7 +123,7 @@ public function testBlockToggleVisibility() {
   /**
    * Tests block visibility when leaving "pages" textarea empty.
    */
-  public function testBlockVisibilityListedEmpty() {
+  public function testBlockVisibilityListedEmpty(): void {
     $block_name = 'system_powered_by_block';
     // Create a random title for the block.
     $title = $this->randomMachineName(8);
@@ -160,7 +160,7 @@ public function testBlockVisibilityListedEmpty() {
   /**
    * Tests adding a block from the library page with a weight query string.
    */
-  public function testAddBlockFromLibraryWithWeight() {
+  public function testAddBlockFromLibraryWithWeight(): void {
     $default_theme = $this->config('system.theme')->get('default');
     // Test one positive, zero, and one negative weight.
     foreach (['7', '0', '-9'] as $weight) {
@@ -209,7 +209,7 @@ public function testAddBlockFromLibraryWithWeight() {
   /**
    * Tests configuring and moving a module-define block to specific regions.
    */
-  public function testBlock() {
+  public function testBlock(): void {
     // Place page title block to test error messages.
     $this->drupalPlaceBlock('page_title_block');
 
@@ -293,7 +293,7 @@ public function testBlock() {
   /**
    * Tests that the block form has a theme selector when not passed via the URL.
    */
-  public function testBlockThemeSelector() {
+  public function testBlockThemeSelector(): void {
     // Install all themes.
     $themes = [
       'olivero',
@@ -326,7 +326,7 @@ public function testBlockThemeSelector() {
   /**
    * Tests block display of theme titles.
    */
-  public function testThemeName() {
+  public function testThemeName(): void {
     // Enable the help block.
     $this->drupalPlaceBlock('help_block', ['region' => 'help']);
     $this->drupalPlaceBlock('local_tasks_block');
@@ -342,7 +342,7 @@ public function testThemeName() {
   /**
    * Tests block title display settings.
    */
-  public function testHideBlockTitle() {
+  public function testHideBlockTitle(): void {
     $block_name = 'system_powered_by_block';
     // Create a random title for the block.
     $title = $this->randomMachineName(8);
@@ -426,7 +426,7 @@ public function moveBlockToRegion(array $block, $region) {
    * - "block:<block ID>"
    * - "block_plugin:<block plugin ID>"
    */
-  public function testBlockCacheTags() {
+  public function testBlockCacheTags(): void {
     // The page cache only works for anonymous users.
     $this->drupalLogout();
 
@@ -535,7 +535,7 @@ public function testBlockCacheTags() {
   /**
    * Tests that a link exists to block layout from the appearance form.
    */
-  public function testThemeAdminLink() {
+  public function testThemeAdminLink(): void {
     $this->drupalPlaceBlock('help_block', ['region' => 'help']);
     $theme_admin = $this->drupalCreateUser([
       'administer blocks',
@@ -551,7 +551,7 @@ public function testThemeAdminLink() {
   /**
    * Tests that uninstalling a theme removes its block configuration.
    */
-  public function testUninstallTheme() {
+  public function testUninstallTheme(): void {
     /** @var \Drupal\Core\Extension\ThemeInstallerInterface $theme_installer */
     $theme_installer = \Drupal::service('theme_installer');
 
@@ -571,7 +571,7 @@ public function testUninstallTheme() {
   /**
    * Tests the block access.
    */
-  public function testBlockAccess() {
+  public function testBlockAccess(): void {
     $this->drupalPlaceBlock('test_access', ['region' => 'help']);
 
     $this->drupalGet('<front>');
@@ -585,7 +585,7 @@ public function testBlockAccess() {
   /**
    * Tests block_user_role_delete.
    */
-  public function testBlockUserRoleDelete() {
+  public function testBlockUserRoleDelete(): void {
     $role1 = Role::create(['id' => 'test_role1', 'label' => 'Test role 1']);
     $role1->save();
 
@@ -618,7 +618,7 @@ public function testBlockUserRoleDelete() {
   /**
    * Tests block title.
    */
-  public function testBlockTitle() {
+  public function testBlockTitle(): void {
     // Create a custom title for the block.
     $title = "This block's <b>great!</b>";
     // Enable a standard block.
diff --git a/core/modules/block/tests/src/Functional/BlockUiTest.php b/core/modules/block/tests/src/Functional/BlockUiTest.php
index aa3adda8e841..d555b20cdd30 100644
--- a/core/modules/block/tests/src/Functional/BlockUiTest.php
+++ b/core/modules/block/tests/src/Functional/BlockUiTest.php
@@ -95,7 +95,7 @@ protected function setUp(): void {
   /**
    * Tests block demo page exists and functions correctly.
    */
-  public function testBlockDemoUiPage() {
+  public function testBlockDemoUiPage(): void {
     $this->drupalPlaceBlock('help_block', ['region' => 'help']);
     $this->drupalGet('admin/structure/block');
     $this->clickLink('Demonstrate block regions (Stark)');
@@ -129,7 +129,7 @@ public function testBlockDemoUiPage() {
   /**
    * Tests block admin page exists and functions correctly.
    */
-  public function testBlockAdminUiPage() {
+  public function testBlockAdminUiPage(): void {
     // Visit the blocks admin ui.
     $this->drupalGet('admin/structure/block');
     // Look for the blocks table.
@@ -192,7 +192,7 @@ public function testBlockAdminUiPage() {
   /**
    * Tests the block categories on the listing page.
    */
-  public function testCandidateBlockList() {
+  public function testCandidateBlockList(): void {
     $this->drupalGet('admin/structure/block');
     $this->clickLink('Place block');
     $this->assertSession()->elementExists('xpath', '//tr[.//td/div[text()="Display message"] and .//td[text()="Block test"] and .//td//a[contains(@href, "admin/structure/block/add/test_block_instantiation/stark")]]');
@@ -209,7 +209,7 @@ public function testCandidateBlockList() {
   /**
    * Tests the behavior of unsatisfied context-aware blocks.
    */
-  public function testContextAwareUnsatisfiedBlocks() {
+  public function testContextAwareUnsatisfiedBlocks(): void {
     $this->drupalGet('admin/structure/block');
     $this->clickLink('Place block');
     // Verify that the context-aware test block does not appear.
@@ -222,7 +222,7 @@ public function testContextAwareUnsatisfiedBlocks() {
   /**
    * Tests the behavior of context-aware blocks.
    */
-  public function testContextAwareBlocks() {
+  public function testContextAwareBlocks(): void {
     $expected_text = '<div id="test_context_aware--username">' . \Drupal::currentUser()->getAccountName() . '</div>';
     $this->drupalGet('');
     $this->assertSession()->pageTextNotContains('Test context-aware block');
@@ -273,7 +273,7 @@ public function testContextAwareBlocks() {
   /**
    * Tests that the BlockForm populates machine name correctly.
    */
-  public function testMachineNameSuggestion() {
+  public function testMachineNameSuggestion(): void {
     // Check the form uses the raw machine name suggestion when no instance
     // already exists.
     $url = 'admin/structure/block/add/test_block_instantiation/stark';
@@ -299,7 +299,7 @@ public function testMachineNameSuggestion() {
   /**
    * Tests the block placement indicator.
    */
-  public function testBlockPlacementIndicator() {
+  public function testBlockPlacementIndicator(): void {
     // Test the block placement indicator with using the domain as URL language
     // indicator. This causes destination query parameters to be absolute URLs.
     \Drupal::service('module_installer')->install(['language', 'locale']);
@@ -355,7 +355,7 @@ public function testBlockPlacementIndicator() {
   /**
    * Tests if validation errors are passed plugin form to the parent form.
    */
-  public function testBlockValidateErrors() {
+  public function testBlockValidateErrors(): void {
     $this->drupalGet('admin/structure/block/add/test_settings_validation/stark');
     $this->submitForm([
       'region' => 'content',
@@ -369,7 +369,7 @@ public function testBlockValidateErrors() {
   /**
    * Tests that the enable/disable routes are protected from CSRF.
    */
-  public function testRouteProtection() {
+  public function testRouteProtection(): void {
     // Get the first block generated in our setUp method.
     /** @var \Drupal\block\BlockInterface $block */
     $block = reset($this->blocks);
@@ -383,7 +383,7 @@ public function testRouteProtection() {
   /**
    * Tests that users without permission are not able to view broken blocks.
    */
-  public function testBrokenBlockVisibility() {
+  public function testBrokenBlockVisibility(): void {
     $assert_session = $this->assertSession();
 
     $block = $this->drupalPlaceBlock('broken');
diff --git a/core/modules/block/tests/src/Functional/BlockXssTest.php b/core/modules/block/tests/src/Functional/BlockXssTest.php
index 28b68b465f6e..cd9000af9890 100644
--- a/core/modules/block/tests/src/Functional/BlockXssTest.php
+++ b/core/modules/block/tests/src/Functional/BlockXssTest.php
@@ -33,7 +33,7 @@ class BlockXssTest extends BrowserTestBase {
   /**
    * Tests that nothing is escaped other than the blocks explicitly tested.
    */
-  public function testNoUnexpectedEscaping() {
+  public function testNoUnexpectedEscaping(): void {
     $this->drupalLogin($this->drupalCreateUser([
       'administer blocks',
       'access administration pages',
@@ -46,7 +46,7 @@ public function testNoUnexpectedEscaping() {
   /**
    * Tests XSS in title.
    */
-  public function testXssInTitle() {
+  public function testXssInTitle(): void {
     $this->container->get('module_installer')->install(['block_test']);
     $this->drupalPlaceBlock('test_xss_title', ['label' => '<script>alert("XSS label");</script>']);
 
@@ -69,7 +69,7 @@ public function testXssInTitle() {
   /**
    * Tests XSS in category.
    */
-  public function testXssInCategory() {
+  public function testXssInCategory(): void {
     $this->container->get('module_installer')->install(['block_test']);
     $this->drupalPlaceBlock('test_xss_title');
     $this->drupalLogin($this->drupalCreateUser([
@@ -84,7 +84,7 @@ public function testXssInCategory() {
   /**
    * Tests various modules that provide blocks for XSS.
    */
-  public function testBlockXss() {
+  public function testBlockXss(): void {
     $this->drupalLogin($this->drupalCreateUser([
       'administer blocks',
       'access administration pages',
diff --git a/core/modules/block/tests/src/Functional/NonDefaultBlockAdminTest.php b/core/modules/block/tests/src/Functional/NonDefaultBlockAdminTest.php
index 59f301440029..1c09346e247c 100644
--- a/core/modules/block/tests/src/Functional/NonDefaultBlockAdminTest.php
+++ b/core/modules/block/tests/src/Functional/NonDefaultBlockAdminTest.php
@@ -37,7 +37,7 @@ protected function setUp(): void {
   /**
    * Tests non-default theme admin.
    */
-  public function testNonDefaultBlockAdmin() {
+  public function testNonDefaultBlockAdmin(): void {
     $admin_user = $this->drupalCreateUser([
       'administer blocks',
       'administer themes',
diff --git a/core/modules/block/tests/src/Functional/Views/DisplayBlockTest.php b/core/modules/block/tests/src/Functional/Views/DisplayBlockTest.php
index 4d74e8e494ee..fc999957e00e 100644
--- a/core/modules/block/tests/src/Functional/Views/DisplayBlockTest.php
+++ b/core/modules/block/tests/src/Functional/Views/DisplayBlockTest.php
@@ -63,7 +63,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['block_test_view
   /**
    * Tests default and content block categories.
    */
-  public function testBlockCategory() {
+  public function testBlockCategory(): void {
     $this->drupalLogin($this->drupalCreateUser([
       'administer views',
       'administer blocks',
@@ -145,7 +145,7 @@ public function testBlockCategory() {
   /**
    * Tests removing a block display.
    */
-  public function testDeleteBlockDisplay() {
+  public function testDeleteBlockDisplay(): void {
     // To test all combinations possible we first place create two instances
     // of the block display of the first view.
     $block_1 = $this->drupalPlaceBlock('views_block:test_view_block-block_1', ['label' => 'test_view_block-block_1:1']);
@@ -198,7 +198,7 @@ public function testDeleteBlockDisplay() {
   /**
    * Tests the block form for a Views block.
    */
-  public function testViewsBlockForm() {
+  public function testViewsBlockForm(): void {
     $this->drupalLogin($this->drupalCreateUser(['administer blocks']));
     $default_theme = $this->config('system.theme')->get('default');
     $this->drupalGet('admin/structure/block/add/views_block:test_view_block-block_1/' . $default_theme);
@@ -262,7 +262,7 @@ public function testViewsBlockForm() {
   /**
    * Tests the actual rendering of the views block.
    */
-  public function testBlockRendering() {
+  public function testBlockRendering(): void {
     // Create a block and set a custom title.
     $block = $this->drupalPlaceBlock('views_block:test_view_block-block_1', [
       'label' => 'test_view_block-block_1:1',
@@ -296,7 +296,7 @@ public function testBlockRendering() {
   /**
    * Tests the various test cases of empty block rendering.
    */
-  public function testBlockEmptyRendering() {
+  public function testBlockEmptyRendering(): void {
     $url = new Url('test_page_test.test_page');
     // Remove all views_test_data entries.
     \Drupal::database()->truncate('views_test_data')->execute();
@@ -379,7 +379,7 @@ public function testBlockEmptyRendering() {
   /**
    * Tests the contextual links on a Views block.
    */
-  public function testBlockContextualLinks() {
+  public function testBlockContextualLinks(): void {
     $this->drupalLogin($this->drupalCreateUser([
       'administer views',
       'access contextual links',
diff --git a/core/modules/block/tests/src/FunctionalJavascript/BlockAddTest.php b/core/modules/block/tests/src/FunctionalJavascript/BlockAddTest.php
index 66570a8ff9b3..595b5ed68770 100644
--- a/core/modules/block/tests/src/FunctionalJavascript/BlockAddTest.php
+++ b/core/modules/block/tests/src/FunctionalJavascript/BlockAddTest.php
@@ -29,7 +29,7 @@ class BlockAddTest extends WebDriverTestBase {
   /**
    * Tests the AJAX for the theme selector.
    */
-  public function testBlockAddThemeSelector() {
+  public function testBlockAddThemeSelector(): void {
     \Drupal::service('theme_installer')->install(['claro']);
 
     $this->drupalLogin($this->drupalCreateUser([
diff --git a/core/modules/block/tests/src/FunctionalJavascript/BlockContextualLinksTest.php b/core/modules/block/tests/src/FunctionalJavascript/BlockContextualLinksTest.php
index d5490c91d23c..c425731e8448 100644
--- a/core/modules/block/tests/src/FunctionalJavascript/BlockContextualLinksTest.php
+++ b/core/modules/block/tests/src/FunctionalJavascript/BlockContextualLinksTest.php
@@ -50,7 +50,7 @@ protected function setUp(): void {
   /**
    * Test that remove/configure contextual links are present in the block.
    */
-  public function testBlockContextualRemoveLinks() {
+  public function testBlockContextualRemoveLinks(): void {
     $this->drupalGet('<front>');
     $contextual_id = "[data-contextual-id^='block:block=$this->blockId:langcode=en']";
     $this->assertSession()->waitForElement('css', "$contextual_id .contextual-links");
diff --git a/core/modules/block/tests/src/FunctionalJavascript/BlockDragTest.php b/core/modules/block/tests/src/FunctionalJavascript/BlockDragTest.php
index 2bb94851ad36..7c098a4082f9 100644
--- a/core/modules/block/tests/src/FunctionalJavascript/BlockDragTest.php
+++ b/core/modules/block/tests/src/FunctionalJavascript/BlockDragTest.php
@@ -37,7 +37,7 @@ protected function setUp(): void {
   /**
    * Tests drag and drop blocks.
    */
-  public function testDragAndDropBlocks() {
+  public function testDragAndDropBlocks(): void {
     // Resize window to work around https://github.com/bitovi/syn/issues/164.
     $this->getSession()->resizeWindow(1024, 2048);
     $this->drupalGet('admin/structure/block');
diff --git a/core/modules/block/tests/src/FunctionalJavascript/BlockFilterTest.php b/core/modules/block/tests/src/FunctionalJavascript/BlockFilterTest.php
index fd7baaffa053..bf511af086e1 100644
--- a/core/modules/block/tests/src/FunctionalJavascript/BlockFilterTest.php
+++ b/core/modules/block/tests/src/FunctionalJavascript/BlockFilterTest.php
@@ -40,7 +40,7 @@ protected function setUp(): void {
   /**
    * Tests block filter.
    */
-  public function testBlockFilter() {
+  public function testBlockFilter(): void {
     $this->drupalGet('admin/structure/block');
     $assertSession = $this->assertSession();
     $session = $this->getSession();
diff --git a/core/modules/block/tests/src/Kernel/BlockConfigSchemaTest.php b/core/modules/block/tests/src/Kernel/BlockConfigSchemaTest.php
index 1f4e74b69150..8b2ead48edaf 100644
--- a/core/modules/block/tests/src/Kernel/BlockConfigSchemaTest.php
+++ b/core/modules/block/tests/src/Kernel/BlockConfigSchemaTest.php
@@ -63,7 +63,7 @@ protected function setUp(): void {
   /**
    * Tests the block config schema for block plugins.
    */
-  public function testBlockConfigSchema() {
+  public function testBlockConfigSchema(): void {
     foreach ($this->blockManager->getDefinitions() as $block_id => $definition) {
       $id = $this->randomMachineName();
       $block = Block::create([
diff --git a/core/modules/block/tests/src/Kernel/BlockInterfaceTest.php b/core/modules/block/tests/src/Kernel/BlockInterfaceTest.php
index f08150a50b1f..f74a05864f57 100644
--- a/core/modules/block/tests/src/Kernel/BlockInterfaceTest.php
+++ b/core/modules/block/tests/src/Kernel/BlockInterfaceTest.php
@@ -33,7 +33,7 @@ class BlockInterfaceTest extends KernelTestBase {
    * subsequent method calls are just attempting to cause a failure if a
    * dependency outside of the plugin configuration is required.
    */
-  public function testBlockInterface() {
+  public function testBlockInterface(): void {
     $manager = $this->container->get('plugin.manager.block');
     $configuration = [
       'label' => 'Custom Display Message',
diff --git a/core/modules/block/tests/src/Kernel/BlockRebuildTest.php b/core/modules/block/tests/src/Kernel/BlockRebuildTest.php
index 86ba21fd851e..cd5b0427e67d 100644
--- a/core/modules/block/tests/src/Kernel/BlockRebuildTest.php
+++ b/core/modules/block/tests/src/Kernel/BlockRebuildTest.php
@@ -47,7 +47,7 @@ public static function setUpBeforeClass(): void {
   /**
    * @covers ::block_rebuild
    */
-  public function testRebuildNoBlocks() {
+  public function testRebuildNoBlocks(): void {
     block_rebuild();
     $messages = \Drupal::messenger()->all();
     \Drupal::messenger()->deleteAll();
@@ -57,7 +57,7 @@ public function testRebuildNoBlocks() {
   /**
    * @covers ::block_rebuild
    */
-  public function testRebuildNoInvalidBlocks() {
+  public function testRebuildNoInvalidBlocks(): void {
     $this->placeBlock('system_powered_by_block', ['region' => 'content']);
 
     block_rebuild();
@@ -69,7 +69,7 @@ public function testRebuildNoInvalidBlocks() {
   /**
    * @covers ::block_rebuild
    */
-  public function testRebuildInvalidBlocks() {
+  public function testRebuildInvalidBlocks(): void {
     $this->placeBlock('system_powered_by_block', ['region' => 'content']);
     $block1 = $this->placeBlock('system_powered_by_block');
     $block2 = $this->placeBlock('system_powered_by_block');
diff --git a/core/modules/block/tests/src/Kernel/BlockStorageUnitTest.php b/core/modules/block/tests/src/Kernel/BlockStorageUnitTest.php
index 565141316655..a77450f5470a 100644
--- a/core/modules/block/tests/src/Kernel/BlockStorageUnitTest.php
+++ b/core/modules/block/tests/src/Kernel/BlockStorageUnitTest.php
@@ -46,7 +46,7 @@ protected function setUp(): void {
   /**
    * Tests CRUD operations.
    */
-  public function testBlockCRUD() {
+  public function testBlockCRUD(): void {
     $this->assertInstanceOf(ConfigEntityStorage::class, $this->controller);
 
     // Run each test method in the same installation.
@@ -147,7 +147,7 @@ protected function deleteTests() {
   /**
    * Tests the installation of default blocks.
    */
-  public function testDefaultBlocks() {
+  public function testDefaultBlocks(): void {
     \Drupal::service('theme_installer')->install(['stark']);
     $entities = $this->controller->loadMultiple();
     $this->assertEmpty($entities, 'There are no blocks initially.');
diff --git a/core/modules/block/tests/src/Kernel/BlockTemplateSuggestionsTest.php b/core/modules/block/tests/src/Kernel/BlockTemplateSuggestionsTest.php
index c3f21790ed4c..049b9f74cccc 100644
--- a/core/modules/block/tests/src/Kernel/BlockTemplateSuggestionsTest.php
+++ b/core/modules/block/tests/src/Kernel/BlockTemplateSuggestionsTest.php
@@ -25,7 +25,7 @@ class BlockTemplateSuggestionsTest extends KernelTestBase {
   /**
    * Tests template suggestions from block_theme_suggestions_block().
    */
-  public function testBlockThemeHookSuggestions() {
+  public function testBlockThemeHookSuggestions(): void {
     $this->installConfig(['system']);
 
     // Create a block using a plugin with derivative to be preprocessed.
diff --git a/core/modules/block/tests/src/Kernel/BlockViewBuilderTest.php b/core/modules/block/tests/src/Kernel/BlockViewBuilderTest.php
index 2f09a31d0a91..ef87c8185784 100644
--- a/core/modules/block/tests/src/Kernel/BlockViewBuilderTest.php
+++ b/core/modules/block/tests/src/Kernel/BlockViewBuilderTest.php
@@ -74,7 +74,7 @@ protected function setUp(): void {
   /**
    * Tests the rendering of blocks.
    */
-  public function testBasicRendering() {
+  public function testBasicRendering(): void {
     \Drupal::state()->set('block_test.content', '');
 
     $entity = $this->controller->create([
@@ -127,7 +127,7 @@ public function testBasicRendering() {
   /**
    * Tests block render cache handling.
    */
-  public function testBlockViewBuilderCache() {
+  public function testBlockViewBuilderCache(): void {
     // Verify cache handling for a non-empty block.
     $this->verifyRenderCacheHandling();
 
@@ -191,7 +191,7 @@ protected function verifyRenderCacheHandling() {
    * @see hook_block_view_alter()
    * @see hook_block_view_BASE_BLOCK_ID_alter()
    */
-  public function testBlockViewBuilderViewAlter() {
+  public function testBlockViewBuilderViewAlter(): void {
     // Establish baseline.
     $build = $this->getBlockRenderArray();
     $this->setRawContent((string) $this->renderer->renderRoot($build));
@@ -225,7 +225,7 @@ public function testBlockViewBuilderViewAlter() {
    * @see hook_block_build_alter()
    * @see hook_block_build_BASE_BLOCK_ID_alter()
    */
-  public function testBlockViewBuilderBuildAlter() {
+  public function testBlockViewBuilderBuildAlter(): void {
     // Force a request via GET so we can test the render cache.
     $request = \Drupal::request();
     $request_method = $request->server->get('REQUEST_METHOD');
diff --git a/core/modules/block/tests/src/Kernel/Migrate/d6/MigrateBlockContentTranslationTest.php b/core/modules/block/tests/src/Kernel/Migrate/d6/MigrateBlockContentTranslationTest.php
index bf628ebabeba..8fd9422428da 100644
--- a/core/modules/block/tests/src/Kernel/Migrate/d6/MigrateBlockContentTranslationTest.php
+++ b/core/modules/block/tests/src/Kernel/Migrate/d6/MigrateBlockContentTranslationTest.php
@@ -55,7 +55,7 @@ protected function setUp(): void {
   /**
    * Tests the migration of block title translation.
    */
-  public function testBlockContentTranslation() {
+  public function testBlockContentTranslation(): void {
     /** @var \Drupal\language\ConfigurableLanguageManagerInterface $language_manager */
     $language_manager = $this->container->get('language_manager');
 
diff --git a/core/modules/block/tests/src/Kernel/Migrate/d6/MigrateBlockTest.php b/core/modules/block/tests/src/Kernel/Migrate/d6/MigrateBlockTest.php
index c0edc533de2e..310b7aca41ca 100644
--- a/core/modules/block/tests/src/Kernel/Migrate/d6/MigrateBlockTest.php
+++ b/core/modules/block/tests/src/Kernel/Migrate/d6/MigrateBlockTest.php
@@ -95,7 +95,7 @@ public function assertEntity(string $id, array $visibility, string $region, stri
   /**
    * Tests the block migration.
    */
-  public function testBlockMigration() {
+  public function testBlockMigration(): void {
     $blocks = Block::loadMultiple();
     $this->assertCount(25, $blocks);
 
diff --git a/core/modules/block/tests/src/Kernel/Migrate/d7/MigrateBlockContentTranslationTest.php b/core/modules/block/tests/src/Kernel/Migrate/d7/MigrateBlockContentTranslationTest.php
index bd7dd6c2c092..62b438076031 100644
--- a/core/modules/block/tests/src/Kernel/Migrate/d7/MigrateBlockContentTranslationTest.php
+++ b/core/modules/block/tests/src/Kernel/Migrate/d7/MigrateBlockContentTranslationTest.php
@@ -59,7 +59,7 @@ protected function setUp(): void {
   /**
    * Tests the migration of block title translation.
    */
-  public function testBlockContentTranslation() {
+  public function testBlockContentTranslation(): void {
     // @todo Skipped due to frequent random test failures.
     // See https://www.drupal.org/project/drupal/issues/3389365
     $this->markTestSkipped();
diff --git a/core/modules/block/tests/src/Kernel/Migrate/d7/MigrateBlockTest.php b/core/modules/block/tests/src/Kernel/Migrate/d7/MigrateBlockTest.php
index 0578aad80c30..2ef460b60f55 100644
--- a/core/modules/block/tests/src/Kernel/Migrate/d7/MigrateBlockTest.php
+++ b/core/modules/block/tests/src/Kernel/Migrate/d7/MigrateBlockTest.php
@@ -115,7 +115,7 @@ public function assertEntity(string $id, string $plugin_id, array $roles, string
   /**
    * Tests the block migration.
    */
-  public function testBlockMigration() {
+  public function testBlockMigration(): void {
     $this->assertEntity('bartik_system_main', 'system_main_block', [], '', 'content', 'olivero', 0, '', '0');
     $this->assertEntity('bartik_search_form', 'search_form_block', [], '', 'content', 'olivero', -1, '', '0');
     $this->assertEntity('bartik_user_login', 'user_login_block', [], '', 'content', 'olivero', 0, 'User login title', 'visible');
diff --git a/core/modules/block/tests/src/Kernel/NewDefaultThemeBlocksTest.php b/core/modules/block/tests/src/Kernel/NewDefaultThemeBlocksTest.php
index 3e3637e70081..51be75bc9459 100644
--- a/core/modules/block/tests/src/Kernel/NewDefaultThemeBlocksTest.php
+++ b/core/modules/block/tests/src/Kernel/NewDefaultThemeBlocksTest.php
@@ -52,7 +52,7 @@ protected function setUp(): void {
   /**
    * Check the blocks are correctly copied by block_themes_installed().
    */
-  public function testNewDefaultThemeBlocks() {
+  public function testNewDefaultThemeBlocks(): void {
     $default_theme = $this->defaultTheme;
     $theme_installer = $this->themeInstaller;
     $theme_installer->install([$default_theme]);
@@ -115,7 +115,7 @@ public function testNewDefaultThemeBlocks() {
   /**
    * Checks that a theme block is still created when same ID exists.
    */
-  public function testBlockCollision() {
+  public function testBlockCollision(): void {
     $default_theme = $this->defaultTheme;
     $theme_installer = $this->themeInstaller;
     $theme_installer->install([$default_theme]);
diff --git a/core/modules/block/tests/src/Unit/BlockConfigEntityUnitTest.php b/core/modules/block/tests/src/Unit/BlockConfigEntityUnitTest.php
index b12f180a703d..ddea9a72d0bb 100644
--- a/core/modules/block/tests/src/Unit/BlockConfigEntityUnitTest.php
+++ b/core/modules/block/tests/src/Unit/BlockConfigEntityUnitTest.php
@@ -94,7 +94,7 @@ protected function setUp(): void {
   /**
    * @covers ::calculateDependencies
    */
-  public function testCalculateDependencies() {
+  public function testCalculateDependencies(): void {
     $this->themeHandler->themeExists('stark')->willReturn(TRUE);
     $values = ['theme' => 'stark'];
     // Mock the entity under test so that we can mock getPluginCollections().
diff --git a/core/modules/block/tests/src/Unit/BlockFormTest.php b/core/modules/block/tests/src/Unit/BlockFormTest.php
index 73edd5b4cf2e..093652dffe8c 100644
--- a/core/modules/block/tests/src/Unit/BlockFormTest.php
+++ b/core/modules/block/tests/src/Unit/BlockFormTest.php
@@ -142,7 +142,7 @@ protected function getBlockMockWithMachineName($machine_name) {
    *
    * @see \Drupal\block\BlockForm::getUniqueMachineName()
    */
-  public function testGetUniqueMachineName() {
+  public function testGetUniqueMachineName(): void {
     $blocks = [];
 
     $blocks['test'] = $this->getBlockMockWithMachineName('test');
diff --git a/core/modules/block/tests/src/Unit/BlockRepositoryTest.php b/core/modules/block/tests/src/Unit/BlockRepositoryTest.php
index 15ac1c718fb1..4d36f8aa36ce 100644
--- a/core/modules/block/tests/src/Unit/BlockRepositoryTest.php
+++ b/core/modules/block/tests/src/Unit/BlockRepositoryTest.php
@@ -78,7 +78,7 @@ protected function setUp(): void {
    *
    * @dataProvider providerBlocksConfig
    */
-  public function testGetVisibleBlocksPerRegion(array $blocks_config, array $expected_blocks) {
+  public function testGetVisibleBlocksPerRegion(array $blocks_config, array $expected_blocks): void {
     $blocks = [];
     foreach ($blocks_config as $block_id => $block_config) {
       $block = $this->createMock('Drupal\block\BlockInterface');
@@ -149,7 +149,7 @@ public static function providerBlocksConfig() {
    *
    * @covers ::getVisibleBlocksPerRegion
    */
-  public function testGetVisibleBlocksPerRegionWithContext() {
+  public function testGetVisibleBlocksPerRegionWithContext(): void {
     $block = $this->createMock('Drupal\block\BlockInterface');
     $block->expects($this->once())
       ->method('access')
diff --git a/core/modules/block/tests/src/Unit/CategoryAutocompleteTest.php b/core/modules/block/tests/src/Unit/CategoryAutocompleteTest.php
index f54c2a90775b..79802e1e376a 100644
--- a/core/modules/block/tests/src/Unit/CategoryAutocompleteTest.php
+++ b/core/modules/block/tests/src/Unit/CategoryAutocompleteTest.php
@@ -48,7 +48,7 @@ protected function setUp(): void {
    *
    * @dataProvider providerTestAutocompleteSuggestions
    */
-  public function testAutocompleteSuggestions($string, $suggestions) {
+  public function testAutocompleteSuggestions($string, $suggestions): void {
     $suggestions = array_map(function ($suggestion) {
       return ['value' => $suggestion, 'label' => Html::escape($suggestion)];
     }, $suggestions);
diff --git a/core/modules/block/tests/src/Unit/Menu/BlockLocalTasksTest.php b/core/modules/block/tests/src/Unit/Menu/BlockLocalTasksTest.php
index 52e28bc45b9b..50f34b4f6538 100644
--- a/core/modules/block/tests/src/Unit/Menu/BlockLocalTasksTest.php
+++ b/core/modules/block/tests/src/Unit/Menu/BlockLocalTasksTest.php
@@ -67,7 +67,7 @@ protected function setUp(): void {
   /**
    * Tests the admin edit local task.
    */
-  public function testBlockAdminLocalTasks() {
+  public function testBlockAdminLocalTasks(): void {
     $this->assertLocalTasks('entity.block.edit_form', [['entity.block.edit_form']]);
   }
 
@@ -76,7 +76,7 @@ public function testBlockAdminLocalTasks() {
    *
    * @dataProvider providerTestBlockAdminDisplay
    */
-  public function testBlockAdminDisplay($route, $expected) {
+  public function testBlockAdminDisplay($route, $expected): void {
     $this->assertLocalTasks($route, $expected);
   }
 
diff --git a/core/modules/block/tests/src/Unit/Plugin/DisplayVariant/BlockPageVariantTest.php b/core/modules/block/tests/src/Unit/Plugin/DisplayVariant/BlockPageVariantTest.php
index 4604f8b69d10..d9648265184e 100644
--- a/core/modules/block/tests/src/Unit/Plugin/DisplayVariant/BlockPageVariantTest.php
+++ b/core/modules/block/tests/src/Unit/Plugin/DisplayVariant/BlockPageVariantTest.php
@@ -201,7 +201,7 @@ public static function providerBuild() {
    *
    * @dataProvider providerBuild
    */
-  public function testBuild(array $blocks_config, $visible_block_count, array $expected_render_array) {
+  public function testBuild(array $blocks_config, $visible_block_count, array $expected_render_array): void {
     $display_variant = $this->setUpDisplayVariant();
     $display_variant->setMainContent(['#markup' => 'Hello kittens!']);
 
@@ -236,7 +236,7 @@ public function testBuild(array $blocks_config, $visible_block_count, array $exp
    *
    * @covers ::build
    */
-  public function testBuildWithoutMainContent() {
+  public function testBuildWithoutMainContent(): void {
     $display_variant = $this->setUpDisplayVariant();
     $this->blockRepository->expects($this->once())
       ->method('getVisibleBlocksPerRegion')
diff --git a/core/modules/block/tests/src/Unit/Plugin/migrate/process/BlockRegionTest.php b/core/modules/block/tests/src/Unit/Plugin/migrate/process/BlockRegionTest.php
index bde7c734d4e1..e63737b50494 100644
--- a/core/modules/block/tests/src/Unit/Plugin/migrate/process/BlockRegionTest.php
+++ b/core/modules/block/tests/src/Unit/Plugin/migrate/process/BlockRegionTest.php
@@ -57,7 +57,7 @@ protected function transform(array $value, ?Row $row = NULL) {
    *
    * @covers ::transform
    */
-  public function testTransformSameThemeRegionExists() {
+  public function testTransformSameThemeRegionExists(): void {
     $this->assertSame('triptych_second', $this->transform(['bartik', 'bartik', 'triptych_middle']));
   }
 
@@ -69,7 +69,7 @@ public function testTransformSameThemeRegionExists() {
    *
    * @covers ::transform
    */
-  public function testTransformSameThemeRegionNotExists() {
+  public function testTransformSameThemeRegionNotExists(): void {
     $this->assertSame('content', $this->transform(['bartik', 'bartik', 'footer']));
   }
 
diff --git a/core/modules/block/tests/src/Unit/Plugin/migrate/process/BlockSettingsTest.php b/core/modules/block/tests/src/Unit/Plugin/migrate/process/BlockSettingsTest.php
index 38a14531fdb8..c8d209d1ca7e 100644
--- a/core/modules/block/tests/src/Unit/Plugin/migrate/process/BlockSettingsTest.php
+++ b/core/modules/block/tests/src/Unit/Plugin/migrate/process/BlockSettingsTest.php
@@ -27,7 +27,7 @@ class BlockSettingsTest extends UnitTestCase {
    *
    * @dataProvider providerTestTransform
    */
-  public function testTransform($value, $expected) {
+  public function testTransform($value, $expected): void {
     $executable = $this->prophesize(MigrateExecutableInterface::class)
       ->reveal();
     $row = $this->prophesize(Row::class)->reveal();
diff --git a/core/modules/block/tests/src/Unit/Plugin/migrate/process/BlockVisibilityTest.php b/core/modules/block/tests/src/Unit/Plugin/migrate/process/BlockVisibilityTest.php
index f8f939aeae04..e88ca8cdf595 100644
--- a/core/modules/block/tests/src/Unit/Plugin/migrate/process/BlockVisibilityTest.php
+++ b/core/modules/block/tests/src/Unit/Plugin/migrate/process/BlockVisibilityTest.php
@@ -40,7 +40,7 @@ protected function setUp(): void {
   /**
    * @covers ::transform
    */
-  public function testTransformNoData() {
+  public function testTransformNoData(): void {
     $transformed_value = $this->plugin->transform([0, '', []], $this->migrateExecutable, $this->row, 'destination_property');
     $this->assertEmpty($transformed_value);
   }
@@ -48,7 +48,7 @@ public function testTransformNoData() {
   /**
    * @covers ::transform
    */
-  public function testTransformSinglePageWithFront() {
+  public function testTransformSinglePageWithFront(): void {
     $visibility = $this->plugin->transform([0, '<front>', []], $this->migrateExecutable, $this->row, 'destination_property');
     $this->assertSame('request_path', $visibility['request_path']['id']);
     $this->assertTrue($visibility['request_path']['negate']);
@@ -58,7 +58,7 @@ public function testTransformSinglePageWithFront() {
   /**
    * @covers ::transform
    */
-  public function testTransformMultiplePagesWithFront() {
+  public function testTransformMultiplePagesWithFront(): void {
     $visibility = $this->plugin->transform([1, "foo\n/bar\rbaz\r\n<front>", []], $this->migrateExecutable, $this->row, 'destination_property');
     $this->assertSame('request_path', $visibility['request_path']['id']);
     $this->assertFalse($visibility['request_path']['negate']);
@@ -68,7 +68,7 @@ public function testTransformMultiplePagesWithFront() {
   /**
    * @covers ::transform
    */
-  public function testTransformPhpEnabled() {
+  public function testTransformPhpEnabled(): void {
     $this->moduleHandler->moduleExists('php')->willReturn(TRUE);
     $visibility = $this->plugin->transform([2, '<?php', []], $this->migrateExecutable, $this->row, 'destination_property');
     $this->assertSame('php', $visibility['php']['id']);
@@ -79,7 +79,7 @@ public function testTransformPhpEnabled() {
   /**
    * @covers ::transform
    */
-  public function testTransformPhpDisabled() {
+  public function testTransformPhpDisabled(): void {
     $this->moduleHandler->moduleExists('php')->willReturn(FALSE);
     $transformed_value = $this->plugin->transform([2, '<?php', []], $this->migrateExecutable, $this->row, 'destination_property');
     $this->assertEmpty($transformed_value);
@@ -88,7 +88,7 @@ public function testTransformPhpDisabled() {
   /**
    * @covers ::transform
    */
-  public function testTransformException() {
+  public function testTransformException(): void {
     $this->moduleHandler->moduleExists('php')->willReturn(FALSE);
     $migrate_lookup = $this->prophesize(MigrateLookupInterface::class);
     $this->row = $this->getMockBuilder('Drupal\migrate\Row')
diff --git a/core/modules/block_content/tests/src/Functional/BlockContentCacheTagsTest.php b/core/modules/block_content/tests/src/Functional/BlockContentCacheTagsTest.php
index 5079d2abe40f..b8a01bca98fd 100644
--- a/core/modules/block_content/tests/src/Functional/BlockContentCacheTagsTest.php
+++ b/core/modules/block_content/tests/src/Functional/BlockContentCacheTagsTest.php
@@ -75,7 +75,7 @@ protected function getAdditionalCacheTagsForEntity(EntityInterface $entity) {
   /**
    * Tests that the block is cached with the correct contexts and tags.
    */
-  public function testBlock() {
+  public function testBlock(): void {
     $block = $this->drupalPlaceBlock('block_content:' . $this->entity->uuid());
     $build = $this->container->get('entity_type.manager')->getViewBuilder('block')->view($block, 'block');
 
diff --git a/core/modules/block_content/tests/src/Functional/BlockContentContextualLinksTest.php b/core/modules/block_content/tests/src/Functional/BlockContentContextualLinksTest.php
index 75759b2c171e..c01a2ff07707 100644
--- a/core/modules/block_content/tests/src/Functional/BlockContentContextualLinksTest.php
+++ b/core/modules/block_content/tests/src/Functional/BlockContentContextualLinksTest.php
@@ -26,7 +26,7 @@ class BlockContentContextualLinksTest extends BlockContentTestBase {
   /**
    * Tests contextual links.
    */
-  public function testBlockContentContextualLinks() {
+  public function testBlockContentContextualLinks(): void {
     $block_content = $this->createBlockContent();
 
     $block = $this->placeBlock('block_content:' . $block_content->uuid());
diff --git a/core/modules/block_content/tests/src/Functional/BlockContentCreationTest.php b/core/modules/block_content/tests/src/Functional/BlockContentCreationTest.php
index 34a830fbb499..36cf12e2a9bb 100644
--- a/core/modules/block_content/tests/src/Functional/BlockContentCreationTest.php
+++ b/core/modules/block_content/tests/src/Functional/BlockContentCreationTest.php
@@ -53,7 +53,7 @@ protected function setUp(): void {
   /**
    * Creates a "Basic block" block and verifies its consistency in the database.
    */
-  public function testBlockContentCreation() {
+  public function testBlockContentCreation(): void {
     $this->drupalLogin($this->adminUser);
 
     // Create a block.
@@ -77,7 +77,7 @@ public function testBlockContentCreation() {
   /**
    * Creates a "Basic page" block with multiple view modes.
    */
-  public function testBlockContentCreationMultipleViewModes() {
+  public function testBlockContentCreationMultipleViewModes(): void {
     // Add a new view mode and verify if it is selected as expected.
     $this->drupalLogin($this->drupalCreateUser(['administer display modes']));
     $this->drupalGet('admin/structure/display-modes/view/add/block_content');
@@ -140,7 +140,7 @@ public function testBlockContentCreationMultipleViewModes() {
   /**
    * Tests the redirect workflow of creating a block_content and block.
    */
-  public function testBlockContentFormSubmitHandlers() {
+  public function testBlockContentFormSubmitHandlers(): void {
     $this->drupalLogin($this->adminUser);
 
     // Create a block and place in block layout.
@@ -193,7 +193,7 @@ public function testBlockContentFormSubmitHandlers() {
    * Creates a content block from defaults and ensures that the 'basic block'
    * type is being used.
    */
-  public function testDefaultBlockContentCreation() {
+  public function testDefaultBlockContentCreation(): void {
     $edit = [];
     $edit['info[0][value]'] = $this->randomMachineName(8);
     $edit['body[0][value]'] = $this->randomMachineName(16);
@@ -212,7 +212,7 @@ public function testDefaultBlockContentCreation() {
   /**
    * Verifies that a transaction rolls back the failed creation.
    */
-  public function testFailedBlockCreation() {
+  public function testFailedBlockCreation(): void {
     // Create a block.
     try {
       $this->createBlockContent('fail_creation');
@@ -236,7 +236,7 @@ public function testFailedBlockCreation() {
   /**
    * Tests deleting a block.
    */
-  public function testBlockDelete() {
+  public function testBlockDelete(): void {
     // Create a block.
     $edit = [];
     $edit['info[0][value]'] = $this->randomMachineName(8);
@@ -299,7 +299,7 @@ public function testBlockDelete() {
   /**
    * Tests placed content blocks create a dependency in the block placement.
    */
-  public function testConfigDependencies() {
+  public function testConfigDependencies(): void {
     $block = $this->createBlockContent();
     // Place the block.
     $block_placement_id = mb_strtolower($block->label());
diff --git a/core/modules/block_content/tests/src/Functional/BlockContentListTest.php b/core/modules/block_content/tests/src/Functional/BlockContentListTest.php
index 9e7930a380a7..58ddfe6686e1 100644
--- a/core/modules/block_content/tests/src/Functional/BlockContentListTest.php
+++ b/core/modules/block_content/tests/src/Functional/BlockContentListTest.php
@@ -90,7 +90,7 @@ public function testBlockRegionPlacement(): void {
   /**
    * Tests the content block listing page with different permissions.
    */
-  public function testListing() {
+  public function testListing(): void {
     // Test with the admin user.
     $this->drupalLogin($this->drupalCreateUser(['access block library', 'administer block content']));
     $this->drupalGet('admin/content/block');
diff --git a/core/modules/block_content/tests/src/Functional/BlockContentListViewsTest.php b/core/modules/block_content/tests/src/Functional/BlockContentListViewsTest.php
index 666a8e5fcddc..09a6912e3b87 100644
--- a/core/modules/block_content/tests/src/Functional/BlockContentListViewsTest.php
+++ b/core/modules/block_content/tests/src/Functional/BlockContentListViewsTest.php
@@ -77,7 +77,7 @@ protected function setUp(): void {
   /**
    * Tests the content block listing page.
    */
-  public function testListing() {
+  public function testListing(): void {
     // Test with an admin user.
     $this->drupalLogin($this->adminUser);
     $this->drupalGet('admin/content/block');
diff --git a/core/modules/block_content/tests/src/Functional/BlockContentPageViewTest.php b/core/modules/block_content/tests/src/Functional/BlockContentPageViewTest.php
index 87c59d6e0ae6..1c55c23bef96 100644
--- a/core/modules/block_content/tests/src/Functional/BlockContentPageViewTest.php
+++ b/core/modules/block_content/tests/src/Functional/BlockContentPageViewTest.php
@@ -26,7 +26,7 @@ class BlockContentPageViewTest extends BlockContentTestBase {
   /**
    * Checks block edit and fallback functionality.
    */
-  public function testPageEdit() {
+  public function testPageEdit(): void {
     $this->drupalLogin($this->adminUser);
     $block = $this->createBlockContent();
 
diff --git a/core/modules/block_content/tests/src/Functional/BlockContentRevisionsTest.php b/core/modules/block_content/tests/src/Functional/BlockContentRevisionsTest.php
index 756ebbb8c2d0..a58d770221b4 100644
--- a/core/modules/block_content/tests/src/Functional/BlockContentRevisionsTest.php
+++ b/core/modules/block_content/tests/src/Functional/BlockContentRevisionsTest.php
@@ -66,7 +66,7 @@ protected function setUp(): void {
   /**
    * Checks block revision related operations.
    */
-  public function testRevisions() {
+  public function testRevisions(): void {
     $blocks = $this->blocks;
     $logs = $this->revisionLogs;
 
diff --git a/core/modules/block_content/tests/src/Functional/BlockContentSaveTest.php b/core/modules/block_content/tests/src/Functional/BlockContentSaveTest.php
index cedd793d81af..e70aa7514f2a 100644
--- a/core/modules/block_content/tests/src/Functional/BlockContentSaveTest.php
+++ b/core/modules/block_content/tests/src/Functional/BlockContentSaveTest.php
@@ -37,7 +37,7 @@ protected function setUp(): void {
   /**
    * Checks whether content block IDs are saved properly during an import.
    */
-  public function testImport() {
+  public function testImport(): void {
     // Content block ID must be a number that is not in the database.
     $max_id = (int) \Drupal::entityQueryAggregate('block_content')
       ->accessCheck(FALSE)
@@ -69,7 +69,7 @@ public function testImport() {
    *
    * Verifies the static block load cache is cleared upon save.
    */
-  public function testDeterminingChanges() {
+  public function testDeterminingChanges(): void {
     // Initial creation.
     $block = $this->createBlockContent('test_changes');
     // Creating a block should set the changed date to the current time
@@ -104,7 +104,7 @@ public function testDeterminingChanges() {
    *
    * @see block_test_block_insert()
    */
-  public function testBlockContentSaveOnInsert() {
+  public function testBlockContentSaveOnInsert(): void {
     // block_content_test_block_content_insert() triggers a save on insert if the
     // title equals 'new'.
     $block = $this->createBlockContent('new');
diff --git a/core/modules/block_content/tests/src/Functional/BlockContentTypeTest.php b/core/modules/block_content/tests/src/Functional/BlockContentTypeTest.php
index 1881608ea79b..0f355b91218e 100644
--- a/core/modules/block_content/tests/src/Functional/BlockContentTypeTest.php
+++ b/core/modules/block_content/tests/src/Functional/BlockContentTypeTest.php
@@ -62,7 +62,7 @@ protected function setUp(): void {
   /**
    * Tests the order of the block content types on the add page.
    */
-  public function testBlockContentAddPageOrder() {
+  public function testBlockContentAddPageOrder(): void {
     $this->createBlockContentType(['id' => 'bundle_1', 'label' => 'Bundle 1']);
     $this->createBlockContentType(['id' => 'bundle_2', 'label' => 'Aaa Bundle 2']);
     $this->drupalLogin($this->adminUser);
@@ -73,7 +73,7 @@ public function testBlockContentAddPageOrder() {
   /**
    * Tests creating a block type programmatically and via a form.
    */
-  public function testBlockContentTypeCreation() {
+  public function testBlockContentTypeCreation(): void {
     // Log in a test user.
     $this->drupalLogin($this->adminUser);
 
@@ -122,7 +122,7 @@ public function testBlockContentTypeCreation() {
   /**
    * Tests editing a block type using the UI.
    */
-  public function testBlockContentTypeEditing() {
+  public function testBlockContentTypeEditing(): void {
     $this->drupalPlaceBlock('system_breadcrumb_block');
     // Now create an initial block-type.
     $this->createBlockContentType('basic', TRUE);
@@ -174,7 +174,7 @@ public function testBlockContentTypeEditing() {
   /**
    * Tests deleting a block type that still has content.
    */
-  public function testBlockContentTypeDeletion() {
+  public function testBlockContentTypeDeletion(): void {
     // Now create an initial block-type.
     $this->createBlockContentType('basic', TRUE);
 
@@ -201,7 +201,7 @@ public function testBlockContentTypeDeletion() {
   /**
    * Tests that redirects work as expected when multiple block types exist.
    */
-  public function testsBlockContentAddTypes() {
+  public function testsBlockContentAddTypes(): void {
     // Now create an initial block-type.
     $this->createBlockContentType('basic', TRUE);
 
diff --git a/core/modules/block_content/tests/src/Functional/PageEditTest.php b/core/modules/block_content/tests/src/Functional/PageEditTest.php
index 6301ce26ca4a..0c61afd87517 100644
--- a/core/modules/block_content/tests/src/Functional/PageEditTest.php
+++ b/core/modules/block_content/tests/src/Functional/PageEditTest.php
@@ -34,7 +34,7 @@ protected function setUp(): void {
   /**
    * Checks block edit functionality.
    */
-  public function testPageEdit() {
+  public function testPageEdit(): void {
     $this->drupalLogin($this->adminUser);
 
     $title_key = 'info[0][value]';
diff --git a/core/modules/block_content/tests/src/Functional/UnpublishedBlockTest.php b/core/modules/block_content/tests/src/Functional/UnpublishedBlockTest.php
index 9d7b50dea141..202ff2f98110 100644
--- a/core/modules/block_content/tests/src/Functional/UnpublishedBlockTest.php
+++ b/core/modules/block_content/tests/src/Functional/UnpublishedBlockTest.php
@@ -30,7 +30,7 @@ class UnpublishedBlockTest extends BrowserTestBase {
   /**
    * Tests unpublishing of block_content entities.
    */
-  public function testViewShowsCorrectStates() {
+  public function testViewShowsCorrectStates(): void {
     $block_content = BlockContent::create([
       'info' => 'Test block',
       'type' => 'basic',
diff --git a/core/modules/block_content/tests/src/Functional/Views/BlockContentFieldFilterTest.php b/core/modules/block_content/tests/src/Functional/Views/BlockContentFieldFilterTest.php
index de54116e1fc2..674e99923861 100644
--- a/core/modules/block_content/tests/src/Functional/Views/BlockContentFieldFilterTest.php
+++ b/core/modules/block_content/tests/src/Functional/Views/BlockContentFieldFilterTest.php
@@ -73,7 +73,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['block_content_t
   /**
    * Tests body and info filters.
    */
-  public function testFilters() {
+  public function testFilters(): void {
     // Test the info filter page, which filters for info contains 'Comida'.
     // Should show just the Spanish translation, once.
     $this->assertPageCounts('test-info-filter', ['es' => 1, 'fr' => 0, 'en' => 0], 'Comida info filter');
diff --git a/core/modules/block_content/tests/src/Functional/Views/BlockContentIntegrationTest.php b/core/modules/block_content/tests/src/Functional/Views/BlockContentIntegrationTest.php
index 832e3ab65e67..ec22ec4bfe9c 100644
--- a/core/modules/block_content/tests/src/Functional/Views/BlockContentIntegrationTest.php
+++ b/core/modules/block_content/tests/src/Functional/Views/BlockContentIntegrationTest.php
@@ -26,7 +26,7 @@ class BlockContentIntegrationTest extends BlockContentTestBase {
   /**
    * Tests basic block_content view with a block_content_type argument.
    */
-  public function testBlockContentViewTypeArgument() {
+  public function testBlockContentViewTypeArgument(): void {
     // Create two content types with three block_contents each.
     $types = [];
     $all_ids = [];
diff --git a/core/modules/block_content/tests/src/Functional/Views/BlockContentRedirectTest.php b/core/modules/block_content/tests/src/Functional/Views/BlockContentRedirectTest.php
index 3708785da942..78da976346b3 100644
--- a/core/modules/block_content/tests/src/Functional/Views/BlockContentRedirectTest.php
+++ b/core/modules/block_content/tests/src/Functional/Views/BlockContentRedirectTest.php
@@ -33,7 +33,7 @@ class BlockContentRedirectTest extends BlockContentTestBase {
   /**
    * Tests the redirect destination when editing block content.
    */
-  public function testRedirectDestination() {
+  public function testRedirectDestination(): void {
     $this->drupalLogin($this->drupalCreateUser(['access block library', 'administer block content']));
     $this->drupalGet('admin/content/block');
 
diff --git a/core/modules/block_content/tests/src/Functional/Views/BlockContentWizardTest.php b/core/modules/block_content/tests/src/Functional/Views/BlockContentWizardTest.php
index d3088b02f8a6..662f99dd0c00 100644
--- a/core/modules/block_content/tests/src/Functional/Views/BlockContentWizardTest.php
+++ b/core/modules/block_content/tests/src/Functional/Views/BlockContentWizardTest.php
@@ -34,7 +34,7 @@ protected function setUp(): void {
   /**
    * Tests creating a 'block_content' entity view.
    */
-  public function testViewAddBlockContent() {
+  public function testViewAddBlockContent(): void {
     $view = [];
     $view['label'] = $this->randomMachineName(16);
     $view['id'] = $this->randomMachineName(16);
diff --git a/core/modules/block_content/tests/src/Kernel/BlockContentAccessHandlerTest.php b/core/modules/block_content/tests/src/Kernel/BlockContentAccessHandlerTest.php
index f6a50be88cc8..6252aa736156 100644
--- a/core/modules/block_content/tests/src/Kernel/BlockContentAccessHandlerTest.php
+++ b/core/modules/block_content/tests/src/Kernel/BlockContentAccessHandlerTest.php
@@ -136,7 +136,7 @@ protected function setUp(): void {
    * @phpstan-param class-string<\Drupal\Core\Access\AccessResultInterface>|null $parent_access
    * @phpstan-param class-string<\Drupal\Core\Access\AccessResultInterface> $expected_access
    */
-  public function testAccess(string $operation, bool $published, bool $reusable, array $permissions, bool $isLatest, ?string $parent_access, string $expected_access, ?string $expected_access_message = NULL) {
+  public function testAccess(string $operation, bool $published, bool $reusable, array $permissions, bool $isLatest, ?string $parent_access, string $expected_access, ?string $expected_access_message = NULL): void {
     /** @var \Drupal\Core\Entity\RevisionableStorageInterface $entityStorage */
     $entityStorage = \Drupal::entityTypeManager()->getStorage('block_content');
 
diff --git a/core/modules/block_content/tests/src/Kernel/BlockContentDeletionTest.php b/core/modules/block_content/tests/src/Kernel/BlockContentDeletionTest.php
index a825d1423fc8..07d932f36cdf 100644
--- a/core/modules/block_content/tests/src/Kernel/BlockContentDeletionTest.php
+++ b/core/modules/block_content/tests/src/Kernel/BlockContentDeletionTest.php
@@ -37,7 +37,7 @@ protected function setUp(): void {
   /**
    * Tests deleting a block_content updates the discovered block plugin.
    */
-  public function testDeletingBlockContentShouldClearPluginCache() {
+  public function testDeletingBlockContentShouldClearPluginCache(): void {
     // Create a block content type.
     $block_content_type = BlockContentType::create([
       'id' => 'spiffy',
diff --git a/core/modules/block_content/tests/src/Kernel/BlockContentDeriverTest.php b/core/modules/block_content/tests/src/Kernel/BlockContentDeriverTest.php
index ab2c7e803856..edd3e0e096c1 100644
--- a/core/modules/block_content/tests/src/Kernel/BlockContentDeriverTest.php
+++ b/core/modules/block_content/tests/src/Kernel/BlockContentDeriverTest.php
@@ -63,7 +63,7 @@ protected function setUp(): void {
   /**
    * Tests that only reusable blocks are derived.
    */
-  public function testReusableBlocksOnlyAreDerived() {
+  public function testReusableBlocksOnlyAreDerived(): void {
     // Create a block content type.
     $block_content_type = BlockContentType::create([
       'id' => 'spiffy',
diff --git a/core/modules/block_content/tests/src/Kernel/BlockContentEntityReferenceSelectionTest.php b/core/modules/block_content/tests/src/Kernel/BlockContentEntityReferenceSelectionTest.php
index fbccd8a15927..87592d981b6a 100644
--- a/core/modules/block_content/tests/src/Kernel/BlockContentEntityReferenceSelectionTest.php
+++ b/core/modules/block_content/tests/src/Kernel/BlockContentEntityReferenceSelectionTest.php
@@ -120,7 +120,7 @@ protected function setUp(): void {
    * @throws \Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
    * @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
    */
-  public function testQueriesNotAltered() {
+  public function testQueriesNotAltered(): void {
     // Ensure that queries without all the tags are not altered.
     $query = $this->entityTypeManager->getStorage('block_content')
       ->getQuery()
@@ -145,7 +145,7 @@ public function testQueriesNotAltered() {
    *
    * @throws \Drupal\Core\Entity\EntityStorageException
    */
-  public function testNoConditions() {
+  public function testNoConditions(): void {
     $this->assertEquals(
       $this->expectations['block_reusable'],
       $this->selectionHandler->getReferenceableEntities()
@@ -168,7 +168,7 @@ public function testNoConditions() {
    *
    * @throws \Exception
    */
-  public function testFieldConditions($condition_type, $is_reusable) {
+  public function testFieldConditions($condition_type, $is_reusable): void {
     $this->selectionHandler->setTestMode($condition_type, $is_reusable);
     $this->assertEquals(
       $is_reusable ? $this->expectations['block_reusable'] : $this->expectations['block_non_reusable'],
diff --git a/core/modules/block_content/tests/src/Kernel/BlockContentPermissionsTest.php b/core/modules/block_content/tests/src/Kernel/BlockContentPermissionsTest.php
index 857afbf013e0..e10b4c95ccf6 100644
--- a/core/modules/block_content/tests/src/Kernel/BlockContentPermissionsTest.php
+++ b/core/modules/block_content/tests/src/Kernel/BlockContentPermissionsTest.php
@@ -48,7 +48,7 @@ public function setUp(): void {
   /**
    * @covers ::blockTypePermissions
    */
-  public function testDynamicPermissions() {
+  public function testDynamicPermissions(): void {
     $permissions = $this->permissionHandler->getPermissions();
     $this->assertArrayNotHasKey('edit any basic block content', $permissions, 'The per-block-type permission does not exist.');
     $this->assertArrayNotHasKey('edit any square block content', $permissions, 'The per-block-type permission does not exist.');
diff --git a/core/modules/block_content/tests/src/Kernel/BlockTemplateSuggestionsTest.php b/core/modules/block_content/tests/src/Kernel/BlockTemplateSuggestionsTest.php
index 671df462815c..426f9c3ec5c8 100644
--- a/core/modules/block_content/tests/src/Kernel/BlockTemplateSuggestionsTest.php
+++ b/core/modules/block_content/tests/src/Kernel/BlockTemplateSuggestionsTest.php
@@ -59,7 +59,7 @@ protected function setUp(): void {
   /**
    * Tests template suggestions from block_content_theme_suggestions_block().
    */
-  public function testBlockThemeHookSuggestions() {
+  public function testBlockThemeHookSuggestions(): void {
     // Create a block using a block_content plugin.
     $block = Block::create([
       'plugin' => 'block_content:' . $this->blockContent->uuid(),
diff --git a/core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentBodyFieldTest.php b/core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentBodyFieldTest.php
index 7f379e55dc3c..bc48e30eea81 100644
--- a/core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentBodyFieldTest.php
+++ b/core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentBodyFieldTest.php
@@ -35,7 +35,7 @@ protected function setUp(): void {
   /**
    * Tests the block content body field migration.
    */
-  public function testBlockContentBodyFieldMigration() {
+  public function testBlockContentBodyFieldMigration(): void {
     /** @var \Drupal\field\FieldStorageConfigInterface $storage */
     $storage = FieldStorageConfig::load('block_content.body');
     $this->assertInstanceOf(FieldStorageConfigInterface::class, $storage);
diff --git a/core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentEntityDisplayTest.php b/core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentEntityDisplayTest.php
index b1e47a8022f2..8aabd8960509 100644
--- a/core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentEntityDisplayTest.php
+++ b/core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentEntityDisplayTest.php
@@ -52,7 +52,7 @@ protected function assertDisplay(string $id, string $component_id): void {
   /**
    * Tests the migrated display configuration.
    */
-  public function testMigration() {
+  public function testMigration(): void {
     $this->assertDisplay('block_content.basic.default', 'body');
   }
 
diff --git a/core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentEntityFormDisplayTest.php b/core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentEntityFormDisplayTest.php
index 7781d0a8f771..edbe0ca83f86 100644
--- a/core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentEntityFormDisplayTest.php
+++ b/core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentEntityFormDisplayTest.php
@@ -52,7 +52,7 @@ protected function assertDisplay(string $id, string $component_id): void {
   /**
    * Tests the migrated display configuration.
    */
-  public function testMigration() {
+  public function testMigration(): void {
     $this->assertDisplay('block_content.basic.default', 'body');
   }
 
diff --git a/core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentStubTest.php b/core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentStubTest.php
index 5180987a383c..c90393586d30 100644
--- a/core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentStubTest.php
+++ b/core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentStubTest.php
@@ -34,7 +34,7 @@ protected function setUp(): void {
   /**
    * Tests creation of block content stubs with no block_content_type available.
    */
-  public function testStubFailure() {
+  public function testStubFailure(): void {
     // Expected MigrateException thrown when no bundles exist.
     $this->expectException(MigrateException::class);
     $this->expectExceptionMessage('Stubbing failed, no bundles available for entity type: block_content');
@@ -44,7 +44,7 @@ public function testStubFailure() {
   /**
    * Tests creation of block content stubs when there is a block_content_type.
    */
-  public function testStubSuccess() {
+  public function testStubSuccess(): void {
     BlockContentType::create([
       'id' => 'test_block_content_type',
       'label' => 'Test block content type',
diff --git a/core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentTypeTest.php b/core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentTypeTest.php
index 4e3871dc4d88..1b20314ec835 100644
--- a/core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentTypeTest.php
+++ b/core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentTypeTest.php
@@ -30,7 +30,7 @@ protected function setUp(): void {
   /**
    * Tests the block content type migration.
    */
-  public function testBlockContentTypeMigration() {
+  public function testBlockContentTypeMigration(): void {
     /** @var \Drupal\block_content\BlockContentTypeInterface $entity */
     $entity = BlockContentType::load('basic');
     $this->assertInstanceOf(BlockContentTypeInterface::class, $entity);
diff --git a/core/modules/block_content/tests/src/Kernel/Migrate/d6/MigrateBlockContentTest.php b/core/modules/block_content/tests/src/Kernel/Migrate/d6/MigrateBlockContentTest.php
index 50f3e8014ca3..cd9020474731 100644
--- a/core/modules/block_content/tests/src/Kernel/Migrate/d6/MigrateBlockContentTest.php
+++ b/core/modules/block_content/tests/src/Kernel/Migrate/d6/MigrateBlockContentTest.php
@@ -38,7 +38,7 @@ protected function setUp(): void {
   /**
    * Tests the Drupal 6 content block to Drupal 8 migration.
    */
-  public function testBlockMigration() {
+  public function testBlockMigration(): void {
     /** @var \Drupal\block_content\Entity\BlockContent $block */
     $block = BlockContent::load(1);
     $this->assertSame('My block 1', $block->label());
diff --git a/core/modules/block_content/tests/src/Kernel/Migrate/d6/MigrateCustomBlockContentTranslationTest.php b/core/modules/block_content/tests/src/Kernel/Migrate/d6/MigrateCustomBlockContentTranslationTest.php
index fd65c07f35d6..bc042de34381 100644
--- a/core/modules/block_content/tests/src/Kernel/Migrate/d6/MigrateCustomBlockContentTranslationTest.php
+++ b/core/modules/block_content/tests/src/Kernel/Migrate/d6/MigrateCustomBlockContentTranslationTest.php
@@ -43,7 +43,7 @@ protected function setUp(): void {
   /**
    * Tests the Drupal 6 i18n content block strings to Drupal 8 migration.
    */
-  public function testCustomBlockContentTranslation() {
+  public function testCustomBlockContentTranslation(): void {
     /** @var \Drupal\block_content\Entity\BlockContent $block */
     $block = BlockContent::load(1)->getTranslation('fr');
     $this->assertSame('fr - Static Block', $block->label());
diff --git a/core/modules/block_content/tests/src/Kernel/Migrate/d7/MigrateCustomBlockContentTranslationTest.php b/core/modules/block_content/tests/src/Kernel/Migrate/d7/MigrateCustomBlockContentTranslationTest.php
index 86bd211450aa..da086a435136 100644
--- a/core/modules/block_content/tests/src/Kernel/Migrate/d7/MigrateCustomBlockContentTranslationTest.php
+++ b/core/modules/block_content/tests/src/Kernel/Migrate/d7/MigrateCustomBlockContentTranslationTest.php
@@ -45,7 +45,7 @@ protected function setUp(): void {
   /**
    * Tests the Drupal 7 i18n content block strings to Drupal 8 migration.
    */
-  public function testCustomBlockContentTranslation() {
+  public function testCustomBlockContentTranslation(): void {
     /** @var \Drupal\block_content\Entity\BlockContent $block */
     $block = BlockContent::load(1)->getTranslation('fr');
     $this->assertSame('fr - Mildly amusing limerick of the day', $block->label());
diff --git a/core/modules/block_content/tests/src/Kernel/Migrate/d7/MigrateCustomBlockTest.php b/core/modules/block_content/tests/src/Kernel/Migrate/d7/MigrateCustomBlockTest.php
index a990975d450d..7ba7ae83549b 100644
--- a/core/modules/block_content/tests/src/Kernel/Migrate/d7/MigrateCustomBlockTest.php
+++ b/core/modules/block_content/tests/src/Kernel/Migrate/d7/MigrateCustomBlockTest.php
@@ -40,7 +40,7 @@ protected function setUp(): void {
   /**
    * Tests migration of content blocks from Drupal 7 to Drupal 8.
    */
-  public function testCustomBlockMigration() {
+  public function testCustomBlockMigration(): void {
     $block = BlockContent::load(1);
     $this->assertInstanceOf(BlockContentInterface::class, $block);
     /** @var \Drupal\block_content\BlockContentInterface $block */
diff --git a/core/modules/block_content/tests/src/Kernel/Views/RevisionRelationshipsTest.php b/core/modules/block_content/tests/src/Kernel/Views/RevisionRelationshipsTest.php
index d2b19bbc8827..05d56f17ce66 100644
--- a/core/modules/block_content/tests/src/Kernel/Views/RevisionRelationshipsTest.php
+++ b/core/modules/block_content/tests/src/Kernel/Views/RevisionRelationshipsTest.php
@@ -44,7 +44,7 @@ class RevisionRelationshipsTest extends KernelTestBase {
   /**
    * Create a block_content with revision and rest result count for both views.
    */
-  public function testBlockContentRevisionRelationship() {
+  public function testBlockContentRevisionRelationship(): void {
     $this->installEntitySchema('block_content');
     ViewTestData::createTestViews(static::class, ['block_content_test_views']);
 
diff --git a/core/modules/block_content/tests/src/Kernel/Views/RevisionUserTest.php b/core/modules/block_content/tests/src/Kernel/Views/RevisionUserTest.php
index 68f0d17cf84b..a72e079033f7 100644
--- a/core/modules/block_content/tests/src/Kernel/Views/RevisionUserTest.php
+++ b/core/modules/block_content/tests/src/Kernel/Views/RevisionUserTest.php
@@ -68,7 +68,7 @@ protected function setUp($import_test_views = TRUE): void {
   /**
    * Tests the block_content_revision_user relationship.
    */
-  public function testRevisionUser() {
+  public function testRevisionUser(): void {
     $primary_author = $this->createUser();
     $secondary_author = $this->createUser();
 
diff --git a/core/modules/block_content/tests/src/Unit/Access/AccessGroupAndTest.php b/core/modules/block_content/tests/src/Unit/Access/AccessGroupAndTest.php
index 080ba55c245d..b9fd73b49fa6 100644
--- a/core/modules/block_content/tests/src/Unit/Access/AccessGroupAndTest.php
+++ b/core/modules/block_content/tests/src/Unit/Access/AccessGroupAndTest.php
@@ -29,7 +29,7 @@ protected function setUp(): void {
   /**
    * @covers \Drupal\block_content\Access\AccessGroupAnd
    */
-  public function testGroups() {
+  public function testGroups(): void {
     $allowedAccessible = $this->createAccessibleDouble(AccessResult::allowed());
     $forbiddenAccessible = $this->createAccessibleDouble(AccessResult::forbidden());
     $neutralAccessible = $this->createAccessibleDouble(AccessResult::neutral());
diff --git a/core/modules/block_content/tests/src/Unit/Access/DependentAccessTest.php b/core/modules/block_content/tests/src/Unit/Access/DependentAccessTest.php
index 5abd871079a7..55c9a89a10ca 100644
--- a/core/modules/block_content/tests/src/Unit/Access/DependentAccessTest.php
+++ b/core/modules/block_content/tests/src/Unit/Access/DependentAccessTest.php
@@ -50,7 +50,7 @@ protected function setUp(): void {
    *
    * @dataProvider providerTestSetFirst
    */
-  public function testSetAccessDependency($use_set_first) {
+  public function testSetAccessDependency($use_set_first): void {
     $testRefinable = new RefinableDependentAccessTraitTestClass();
 
     if ($use_set_first) {
@@ -77,7 +77,7 @@ public function testSetAccessDependency($use_set_first) {
    *
    * @dataProvider providerTestSetFirst
    */
-  public function testMergeNonGroup($use_set_first) {
+  public function testMergeNonGroup($use_set_first): void {
     $testRefinable = new RefinableDependentAccessTraitTestClass();
     if ($use_set_first) {
       $testRefinable->setAccessDependency($this->forbidden);
@@ -109,7 +109,7 @@ public function testMergeNonGroup($use_set_first) {
    *
    * @dataProvider providerTestSetFirst
    */
-  public function testMergeGroup($use_set_first) {
+  public function testMergeGroup($use_set_first): void {
     $andGroup = new AccessGroupAnd();
     $andGroup->addDependency($this->forbidden);
     $testRefinable = new RefinableDependentAccessTraitTestClass();
diff --git a/core/modules/block_content/tests/src/Unit/Menu/BlockContentLocalTasksTest.php b/core/modules/block_content/tests/src/Unit/Menu/BlockContentLocalTasksTest.php
index b81ad8905202..f38e6d6504b8 100644
--- a/core/modules/block_content/tests/src/Unit/Menu/BlockContentLocalTasksTest.php
+++ b/core/modules/block_content/tests/src/Unit/Menu/BlockContentLocalTasksTest.php
@@ -68,7 +68,7 @@ protected function setUp(): void {
    *
    * @dataProvider getBlockContentListingRoutes
    */
-  public function testBlockContentListLocalTasks($route) {
+  public function testBlockContentListLocalTasks($route): void {
     $this->assertLocalTasks($route, [
       0 => [
         'system.admin_content',
diff --git a/core/modules/breakpoint/tests/src/Kernel/BreakpointDiscoveryTest.php b/core/modules/breakpoint/tests/src/Kernel/BreakpointDiscoveryTest.php
index 421fe65e6ee8..3bbe7941e819 100644
--- a/core/modules/breakpoint/tests/src/Kernel/BreakpointDiscoveryTest.php
+++ b/core/modules/breakpoint/tests/src/Kernel/BreakpointDiscoveryTest.php
@@ -35,7 +35,7 @@ protected function setUp(): void {
   /**
    * Tests the breakpoint group created for a theme.
    */
-  public function testThemeBreakpoints() {
+  public function testThemeBreakpoints(): void {
     // Verify the breakpoint group for breakpoint_theme_test was created.
     $expected_breakpoints = [
       'breakpoint_theme_test.mobile' => [
@@ -100,7 +100,7 @@ public function testThemeBreakpoints() {
   /**
    * Tests the custom breakpoint group provided by a theme and a module.
    */
-  public function testCustomBreakpointGroups() {
+  public function testCustomBreakpointGroups(): void {
     // Verify the breakpoint group for breakpoint_theme_test.group2 was created.
     $expected_breakpoints = [
       'breakpoint_theme_test.group2.narrow' => [
@@ -152,7 +152,7 @@ public function testCustomBreakpointGroups() {
   /**
    * Tests the breakpoint group created for a module.
    */
-  public function testModuleBreakpoints() {
+  public function testModuleBreakpoints(): void {
     $expected_breakpoints = [
       'breakpoint_module_test.mobile' => [
         'label' => 'mobile',
@@ -188,7 +188,7 @@ public function testModuleBreakpoints() {
   /**
    * Tests the collection of breakpoint groups.
    */
-  public function testBreakpointGroups() {
+  public function testBreakpointGroups(): void {
     $expected = [
       'olivero' => 'Olivero',
       'breakpoint_module_test' => 'Breakpoint test module',
diff --git a/core/modules/breakpoint/tests/src/Unit/BreakpointTest.php b/core/modules/breakpoint/tests/src/Unit/BreakpointTest.php
index 20a45dceb0ea..b91e65c5fed9 100644
--- a/core/modules/breakpoint/tests/src/Unit/BreakpointTest.php
+++ b/core/modules/breakpoint/tests/src/Unit/BreakpointTest.php
@@ -64,7 +64,7 @@ protected function setupBreakpoint() {
   /**
    * @covers ::getLabel
    */
-  public function testGetLabel() {
+  public function testGetLabel(): void {
     $this->pluginDefinition['label'] = 'Test label';
     $this->setupBreakpoint();
     $this->assertEquals(new TranslatableMarkup('Test label', [], ['context' => 'breakpoint'], $this->stringTranslation), $this->breakpoint->getLabel());
@@ -73,7 +73,7 @@ public function testGetLabel() {
   /**
    * @covers ::getWeight
    */
-  public function testGetWeight() {
+  public function testGetWeight(): void {
     $this->pluginDefinition['weight'] = '4';
     $this->setupBreakpoint();
     // Assert that the type returned in an integer.
@@ -83,7 +83,7 @@ public function testGetWeight() {
   /**
    * @covers ::getMediaQuery
    */
-  public function testGetMediaQuery() {
+  public function testGetMediaQuery(): void {
     $this->pluginDefinition['mediaQuery'] = 'only screen and (min-width: 1220px)';
     $this->setupBreakpoint();
     $this->assertEquals('only screen and (min-width: 1220px)', $this->breakpoint->getMediaQuery());
@@ -92,7 +92,7 @@ public function testGetMediaQuery() {
   /**
    * @covers ::getMultipliers
    */
-  public function testGetMultipliers() {
+  public function testGetMultipliers(): void {
     $this->pluginDefinition['multipliers'] = ['1x', '2x'];
     $this->setupBreakpoint();
     $this->assertSame(['1x', '2x'], $this->breakpoint->getMultipliers());
@@ -101,7 +101,7 @@ public function testGetMultipliers() {
   /**
    * @covers ::getProvider
    */
-  public function testGetProvider() {
+  public function testGetProvider(): void {
     $this->pluginDefinition['provider'] = 'Breakpoint';
     $this->setupBreakpoint();
     $this->assertEquals('Breakpoint', $this->breakpoint->getProvider());
@@ -110,7 +110,7 @@ public function testGetProvider() {
   /**
    * @covers ::getGroup
    */
-  public function testGetGroup() {
+  public function testGetGroup(): void {
     $this->pluginDefinition['group'] = 'Breakpoint';
     $this->setupBreakpoint();
     $this->assertEquals('Breakpoint', $this->breakpoint->getGroup());
diff --git a/core/modules/ckeditor5/tests/src/Functional/AddedStylesheetsTest.php b/core/modules/ckeditor5/tests/src/Functional/AddedStylesheetsTest.php
index 970aaf86175f..d54a315a6d4d 100644
--- a/core/modules/ckeditor5/tests/src/Functional/AddedStylesheetsTest.php
+++ b/core/modules/ckeditor5/tests/src/Functional/AddedStylesheetsTest.php
@@ -97,7 +97,7 @@ function (ConstraintViolation $v) {
   /**
    * Test the ckeditor5-stylesheets theme config.
    */
-  public function testCkeditorStylesheets() {
+  public function testCkeditorStylesheets(): void {
     $assert_session = $this->assertSession();
 
     /** @var \Drupal\Core\Extension\ThemeInstallerInterface $theme_installer */
diff --git a/core/modules/ckeditor5/tests/src/Functional/ImageUploadAccessTest.php b/core/modules/ckeditor5/tests/src/Functional/ImageUploadAccessTest.php
index 17854a89cb28..2caaf7a5b114 100644
--- a/core/modules/ckeditor5/tests/src/Functional/ImageUploadAccessTest.php
+++ b/core/modules/ckeditor5/tests/src/Functional/ImageUploadAccessTest.php
@@ -18,7 +18,7 @@ class ImageUploadAccessTest extends ImageUploadTest {
   /**
    * Test access to the CKEditor 5 image upload controller.
    */
-  public function testCkeditor5ImageUploadRoute() {
+  public function testCkeditor5ImageUploadRoute(): void {
     $this->createBasicFormat();
     $url = $this->getUploadUrl();
     $test_image = file_get_contents(current($this->getTestFiles('image'))->uri);
diff --git a/core/modules/ckeditor5/tests/src/Functional/ImageUploadTest.php b/core/modules/ckeditor5/tests/src/Functional/ImageUploadTest.php
index a4303e8fc4ea..29e50adaabfb 100644
--- a/core/modules/ckeditor5/tests/src/Functional/ImageUploadTest.php
+++ b/core/modules/ckeditor5/tests/src/Functional/ImageUploadTest.php
@@ -60,7 +60,7 @@ protected function setUp(): void {
   /**
    * Tests using the file upload route with a disallowed extension.
    */
-  public function testUploadFileExtension() {
+  public function testUploadFileExtension(): void {
     $this->createBasicFormat();
     $this->createEditorWithUpload([
       'status' => TRUE,
@@ -86,7 +86,7 @@ public function testUploadFileExtension() {
   /**
    * Tests using the file upload route with a file size larger than allowed.
    */
-  public function testFileUploadLargerFileSize() {
+  public function testFileUploadLargerFileSize(): void {
     $this->createBasicFormat();
     $this->createEditorWithUpload([
       'status' => TRUE,
@@ -120,7 +120,7 @@ public function testFileUploadLargerFileSize() {
    *
    * @see https://www.drupal.org/project/drupal/issues/3184974
    */
-  public function testLockAfterFailedValidation() {
+  public function testLockAfterFailedValidation(): void {
     $this->createBasicFormat();
     $this->createEditorWithUpload([
       'status' => TRUE,
diff --git a/core/modules/ckeditor5/tests/src/Functional/MediaEntityMetadataApiTest.php b/core/modules/ckeditor5/tests/src/Functional/MediaEntityMetadataApiTest.php
index 8ab999fe22b6..d4af20d6bf98 100644
--- a/core/modules/ckeditor5/tests/src/Functional/MediaEntityMetadataApiTest.php
+++ b/core/modules/ckeditor5/tests/src/Functional/MediaEntityMetadataApiTest.php
@@ -215,7 +215,7 @@ function (ConstraintViolation $v) {
   /**
    * Tests the media entity metadata API.
    */
-  public function testApi() {
+  public function testApi(): void {
     $path = '/ckeditor5/filtered_html/media-entity-metadata';
     $token = $this->container->get('csrf_token')->get(ltrim($path, '/'));
     $uuid = $this->mediaImage->uuid();
diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/AdminUiTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/AdminUiTest.php
index 3bbf63a83090..dcc358b739f0 100644
--- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/AdminUiTest.php
+++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/AdminUiTest.php
@@ -26,7 +26,7 @@ class AdminUiTest extends CKEditor5TestBase {
   /**
    * Confirm settings only trigger AJAX when select value is CKEditor 5.
    */
-  public function testSettingsOnlyFireAjaxWithCkeditor5() {
+  public function testSettingsOnlyFireAjaxWithCkeditor5(): void {
     $page = $this->getSession()->getPage();
     $assert_session = $this->assertSession();
     $this->addNewTextFormat($page, $assert_session);
@@ -139,7 +139,7 @@ protected function assertNoAjaxRequestTriggered(int $expected_cumulative_ajax_re
   /**
    * CKEditor 5's filter UI modifications should not break it for other editors.
    */
-  public function testUnavailableFiltersHiddenWhenSwitching() {
+  public function testUnavailableFiltersHiddenWhenSwitching(): void {
     $page = $this->getSession()->getPage();
     $assert_session = $this->assertSession();
     $this->createNewTextFormat($page, $assert_session, 'unicorn');
@@ -154,7 +154,7 @@ public function testUnavailableFiltersHiddenWhenSwitching() {
   /**
    * Test that filter settings are only visible when the filter is enabled.
    */
-  public function testFilterCheckboxesToggleSettings() {
+  public function testFilterCheckboxesToggleSettings(): void {
     $page = $this->getSession()->getPage();
     $assert_session = $this->assertSession();
 
@@ -272,7 +272,7 @@ public function testMessagesDoNotAccumulate(): void {
   /**
    * Tests the plugin settings form section.
    */
-  public function testPluginSettingsFormSection() {
+  public function testPluginSettingsFormSection(): void {
     $page = $this->getSession()->getPage();
     $assert_session = $this->assertSession();
 
@@ -316,7 +316,7 @@ public function testPluginSettingsFormSection() {
   /**
    * Tests the language config form.
    */
-  public function testLanguageConfigForm() {
+  public function testLanguageConfigForm(): void {
     $page = $this->getSession()->getPage();
     $assert_session = $this->assertSession();
 
diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5AllowedTagsTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5AllowedTagsTest.php
index efa8ffa0825b..22a369eca034 100644
--- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5AllowedTagsTest.php
+++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5AllowedTagsTest.php
@@ -57,7 +57,7 @@ class CKEditor5AllowedTagsTest extends CKEditor5TestBase {
   /**
    * Test enabling CKEditor 5 in a way that triggers validation.
    */
-  public function testEnablingToVersion5Validation() {
+  public function testEnablingToVersion5Validation(): void {
     $page = $this->getSession()->getPage();
     $assert_session = $this->assertSession();
 
@@ -128,7 +128,7 @@ public function testImageUploadsRemainEnabled(): void {
   /**
    * Confirm that switching to CKEditor 5 from another editor updates tags.
    */
-  public function testSwitchToVersion5() {
+  public function testSwitchToVersion5(): void {
     $page = $this->getSession()->getPage();
     $assert_session = $this->assertSession();
 
@@ -162,7 +162,7 @@ public function testSwitchToVersion5() {
   /**
    * Tests that the img tag is added after enabling image uploads.
    */
-  public function testImgAddedViaUploadPlugin() {
+  public function testImgAddedViaUploadPlugin(): void {
     $page = $this->getSession()->getPage();
     $assert_session = $this->assertSession();
 
@@ -234,7 +234,7 @@ public function testImgAddedViaUploadPlugin() {
   /**
    * Test filter_html allowed tags.
    */
-  public function testAllowedTags() {
+  public function testAllowedTags(): void {
     $page = $this->getSession()->getPage();
     $assert_session = $this->assertSession();
 
@@ -338,7 +338,7 @@ public function testAllowedTags() {
   /**
    * Test that <drupal-media> is added to allowed tags when media embed enabled.
    */
-  public function testMediaElementAllowedTags() {
+  public function testMediaElementAllowedTags(): void {
     $page = $this->getSession()->getPage();
     $assert_session = $this->assertSession();
 
@@ -417,7 +417,7 @@ public function testMediaElementAllowedTags() {
   /**
    * Tests full HTML text format.
    */
-  public function testFullHtml() {
+  public function testFullHtml(): void {
     FilterFormat::create(
       Yaml::parseFile('core/profiles/standard/config/install/filter.format.full_html.yml')
     )->save();
diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5DialogTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5DialogTest.php
index 51447052f378..924faeaa616a 100644
--- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5DialogTest.php
+++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5DialogTest.php
@@ -33,7 +33,7 @@ class CKEditor5DialogTest extends CKEditor5TestBase {
   /**
    * Tests if CKEditor 5 tooltips can be interacted with in dialogs.
    */
-  public function testCKEditor5FocusInTooltipsInDialog() {
+  public function testCKEditor5FocusInTooltipsInDialog(): void {
     FilterFormat::create([
       'format' => 'test_format',
       'name' => 'CKEditor 5 with link',
diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5FragmentLinkTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5FragmentLinkTest.php
index 0e446e4e4263..fc36e1799bd2 100644
--- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5FragmentLinkTest.php
+++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5FragmentLinkTest.php
@@ -95,7 +95,7 @@ protected function setUp(): void {
   /**
    * Tests if the fragment link to a textarea works with CKEditor 5 enabled.
    */
-  public function testFragmentLink() {
+  public function testFragmentLink(): void {
     $session = $this->getSession();
     $web_assert = $this->assertSession();
     $ckeditor_class = '.ck-editor';
diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5OffCanvasTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5OffCanvasTest.php
index eea39462ba19..212584749ec1 100644
--- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5OffCanvasTest.php
+++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5OffCanvasTest.php
@@ -24,7 +24,7 @@ class CKEditor5OffCanvasTest extends CKEditor5TestBase {
   /**
    * Tests if CKEditor is properly styled inside an off-canvas dialog.
    */
-  public function testOffCanvasStyles() {
+  public function testOffCanvasStyles(): void {
     $assert_session = $this->assertSession();
     $page = $this->getSession()->getPage();
 
diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5ReadOnlyModeTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5ReadOnlyModeTest.php
index 4a287960b7ec..bec3961ec462 100644
--- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5ReadOnlyModeTest.php
+++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5ReadOnlyModeTest.php
@@ -52,7 +52,7 @@ protected function setUp(): void {
   /**
    * Test that disabling a CKEditor 5 field results in an uneditable editor.
    */
-  public function testReadOnlyMode() {
+  public function testReadOnlyMode(): void {
     $page = $this->getSession()->getPage();
     $assert_session = $this->assertSession();
     $this->addNewTextFormat($page, $assert_session);
diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5Test.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5Test.php
index 2d0f8068734c..901714da5650 100644
--- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5Test.php
+++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5Test.php
@@ -40,7 +40,7 @@ class CKEditor5Test extends CKEditor5TestBase {
   /**
    * Tests configuring CKEditor 5 for existing content.
    */
-  public function testExistingContent() {
+  public function testExistingContent(): void {
     $page = $this->getSession()->getPage();
     $assert_session = $this->assertSession();
 
@@ -72,7 +72,7 @@ public function testExistingContent() {
   /**
    * Ensures that attribute values are encoded.
    */
-  public function testAttributeEncoding() {
+  public function testAttributeEncoding(): void {
     $page = $this->getSession()->getPage();
     $assert_session = $this->assertSession();
 
@@ -147,7 +147,7 @@ function (ConstraintViolation $v) {
   /**
    * Test headings configuration.
    */
-  public function testHeadingsPlugin() {
+  public function testHeadingsPlugin(): void {
     $page = $this->getSession()->getPage();
     $assert_session = $this->assertSession();
 
@@ -222,7 +222,7 @@ public function testHeadingsPlugin() {
   /**
    * Test for Language of Parts plugin.
    */
-  public function testLanguageOfPartsPlugin() {
+  public function testLanguageOfPartsPlugin(): void {
     $page = $this->getSession()->getPage();
     $assert_session = $this->assertSession();
 
@@ -404,7 +404,7 @@ protected function enableDisabledToolbarItem(string $toolbar_item_id): void {
   /**
    * Confirms active tab status is intact after AJAX refresh.
    */
-  public function testActiveTabsMaintained() {
+  public function testActiveTabsMaintained(): void {
     $page = $this->getSession()->getPage();
     $assert_session = $this->assertSession();
 
@@ -543,7 +543,7 @@ public function testActiveTabsMaintained() {
   /**
    * Ensures that CKEditor 5 integrates with file reference filter.
    */
-  public function testEditorFileReferenceIntegration() {
+  public function testEditorFileReferenceIntegration(): void {
     $page = $this->getSession()->getPage();
     $assert_session = $this->assertSession();
 
@@ -601,7 +601,7 @@ public function testEditorFileReferenceIntegration() {
   /**
    * Ensures that CKEditor italic model is converted to em.
    */
-  public function testEmphasis() {
+  public function testEmphasis(): void {
     $page = $this->getSession()->getPage();
     $assert_session = $this->assertSession();
 
@@ -628,7 +628,7 @@ public function testEmphasis() {
   /**
    * Tests list plugin.
    */
-  public function testListPlugin() {
+  public function testListPlugin(): void {
     FilterFormat::create([
       'format' => 'test_format',
       'name' => 'CKEditor 5 with list',
diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/EmphasisTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/EmphasisTest.php
index f811d2fb6e1f..2e21e5588058 100644
--- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/EmphasisTest.php
+++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/EmphasisTest.php
@@ -120,7 +120,7 @@ function (ConstraintViolation $v) {
   /**
    * Ensures that CKEditor italic model is converted to em.
    */
-  public function testEmphasis() {
+  public function testEmphasis(): void {
     $page = $this->getSession()->getPage();
     $assert_session = $this->assertSession();
 
@@ -142,7 +142,7 @@ public function testEmphasis() {
   /**
    * Tests that arbitrary attributes are allowed via GHS.
    */
-  public function testEmphasisArbitraryHtml() {
+  public function testEmphasisArbitraryHtml(): void {
     $assert_session = $this->assertSession();
     $editor = Editor::load('test_format');
     $settings = $editor->getSettings();
diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageTest.php
index 55526f7380f8..5dd5caf183cf 100644
--- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageTest.php
+++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageTest.php
@@ -136,7 +136,7 @@ protected function addImage() {
   /**
    * Tests the ckeditor5_imageResize and ckeditor5_imageUpload settings forms.
    */
-  public function testImageSettingsForm() {
+  public function testImageSettingsForm(): void {
     $assert_session = $this->assertSession();
 
     $this->drupalGet('admin/config/content/formats/manage/test_format');
diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageTestBase.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageTestBase.php
index 7eb2894cc95b..3ef2ca9e66fb 100644
--- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageTestBase.php
+++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageTestBase.php
@@ -101,7 +101,7 @@ protected function addImage() {
   /**
    * Ensures that attributes are retained on conversion.
    */
-  public function testAttributeRetentionDuringUpcasting() {
+  public function testAttributeRetentionDuringUpcasting(): void {
     // Run test cases in a single test to make the test run faster.
     $attributes_to_retain = [
       '-none-' => 'inline',
@@ -163,7 +163,7 @@ public function testAttributeRetentionDuringUpcasting() {
    *
    * @dataProvider providerLinkability
    */
-  public function testImageArbitraryHtml(string $image_type, bool $unrestricted) {
+  public function testImageArbitraryHtml(string $image_type, bool $unrestricted): void {
     $editor = Editor::load('test_format');
     $settings = $editor->getSettings();
 
@@ -210,7 +210,7 @@ public function testImageArbitraryHtml(string $image_type, bool $unrestricted) {
    *
    * @dataProvider providerLinkability
    */
-  public function testLinkability(string $image_type, bool $unrestricted) {
+  public function testLinkability(string $image_type, bool $unrestricted): void {
     assert($image_type === 'inline' || $image_type === 'block');
 
     // Disable filter_html.
@@ -361,7 +361,7 @@ public function testLinkability(string $image_type, bool $unrestricted) {
    *
    * @dataProvider providerAltTextRequired
    */
-  public function testAltTextRequired(bool $unrestricted) {
+  public function testAltTextRequired(bool $unrestricted): void {
     // Disable filter_html.
     if ($unrestricted) {
       FilterFormat::load('test_format')
@@ -584,7 +584,7 @@ public function testWidth(string $width): void {
   /**
    * Ensures that images can have caption set.
    */
-  public function testImageCaption() {
+  public function testImageCaption(): void {
     $page = $this->getSession()->getPage();
     $assert_session = $this->assertSession();
 
diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaLibraryTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaLibraryTest.php
index ea91158c9af1..9344a2477846 100644
--- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaLibraryTest.php
+++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaLibraryTest.php
@@ -155,7 +155,7 @@ function (ConstraintViolation $v) {
   /**
    * Tests using drupalMedia button to embed media into CKEditor 5.
    */
-  public function testButton() {
+  public function testButton(): void {
     // Skipped due to frequent random test failures.
     // @todo Fix this and stop skipping it at https://www.drupal.org/i/3351597.
     $this->markTestSkipped();
@@ -226,7 +226,7 @@ public function testButton() {
   /**
    * Tests the allowed media types setting on the MediaEmbed filter.
    */
-  public function testAllowedMediaTypes() {
+  public function testAllowedMediaTypes(): void {
     $test_cases = [
       'all_media_types' => [],
       'only_image' => ['image' => 'image'],
@@ -278,7 +278,7 @@ public function testAllowedMediaTypes() {
   /**
    * Ensures that alt text can be changed on Media Library inserted Media.
    */
-  public function testAlt() {
+  public function testAlt(): void {
     $page = $this->getSession()->getPage();
     $assert_session = $this->assertSession();
 
diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaLinkabilityTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaLinkabilityTest.php
index 209b1de962c1..f8a41742db15 100644
--- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaLinkabilityTest.php
+++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaLinkabilityTest.php
@@ -88,7 +88,7 @@ function (ConstraintViolation $v) {
    *
    * @dataProvider providerLinkability
    */
-  public function testLinkability(bool $unrestricted) {
+  public function testLinkability(bool $unrestricted): void {
     // Disable filter_html.
     if ($unrestricted) {
       FilterFormat::load('test_format')
@@ -233,7 +233,7 @@ public static function providerLinkability(): array {
    *
    * @dataProvider providerLinkability
    */
-  public function testLinkManualDecorator(bool $unrestricted) {
+  public function testLinkManualDecorator(bool $unrestricted): void {
     \Drupal::service('module_installer')->install(['ckeditor5_manual_decorator_test']);
     $this->resetAll();
 
diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaPreviewTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaPreviewTest.php
index 6eb257958123..3eb2986d5472 100644
--- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaPreviewTest.php
+++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaPreviewTest.php
@@ -19,7 +19,7 @@ class MediaPreviewTest extends MediaTestBase {
   /**
    * Tests that failed media embed preview requests inform the end user.
    */
-  public function testErrorMessages() {
+  public function testErrorMessages(): void {
     // This test currently frequently causes the SQLite database to lock, so
     // skip the test on SQLite until the issue can be resolved.
     // @todo https://www.drupal.org/project/drupal/issues/3273626
@@ -87,7 +87,7 @@ public function testErrorMessages() {
   /**
    * The CKEditor Widget must load a preview generated using the default theme.
    */
-  public function testPreviewUsesDefaultThemeAndIsClientCacheable() {
+  public function testPreviewUsesDefaultThemeAndIsClientCacheable(): void {
     // Make the node edit form use the admin theme, like on most Drupal sites.
     $this->config('node.settings')
       ->set('use_admin_theme', TRUE)
@@ -144,7 +144,7 @@ public function testPreviewUsesDefaultThemeAndIsClientCacheable() {
    *
    * @dataProvider previewAccessProvider
    */
-  public function testEmbedPreviewAccess($media_embed_enabled, $can_use_format) {
+  public function testEmbedPreviewAccess($media_embed_enabled, $can_use_format): void {
     // Reconfigure the host entity's text format to suit our needs.
     /** @var \Drupal\filter\FilterFormatInterface $format */
     $format = FilterFormat::load($this->host->body->format);
@@ -207,7 +207,7 @@ public static function previewAccessProvider() {
   /**
    * Ensure media preview isn't clickable.
    */
-  public function testMediaPointerEvent() {
+  public function testMediaPointerEvent(): void {
     $entityViewDisplay = EntityViewDisplay::load('media.image.view_mode_1');
     $thumbnail = $entityViewDisplay->getComponent('thumbnail');
     $thumbnail['settings']['image_link'] = 'file';
diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaTest.php
index 94298af359a6..32f0ef191bb2 100644
--- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaTest.php
+++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaTest.php
@@ -30,7 +30,7 @@ class MediaTest extends MediaTestBase {
   /**
    * Tests that `<drupal-media>` is converted into a block element.
    */
-  public function testConversion() {
+  public function testConversion(): void {
     // Wrap the `<drupal-media>` markup in a `<p>`.
     $original_value = $this->host->body->value;
     $this->host->body->value = '<p>foo' . $original_value . '</p>';
@@ -50,7 +50,7 @@ public function testConversion() {
    *
    * @see \Drupal\Tests\media\Kernel\MediaEmbedFilterTest::testOnlyDrupalMediaTagProcessed()
    */
-  public function testOnlyDrupalMediaTagProcessed() {
+  public function testOnlyDrupalMediaTagProcessed(): void {
     $original_value = $this->host->body->value;
     $this->host->body->value = str_replace('drupal-media', 'p', $original_value);
     $this->host->save();
@@ -75,7 +75,7 @@ public function testOnlyDrupalMediaTagProcessed() {
   /**
    * Tests adding media to a list does not split the list.
    */
-  public function testMediaSplitList() {
+  public function testMediaSplitList(): void {
     $assert_session = $this->assertSession();
 
     $editor = Editor::load('test_format');
@@ -136,7 +136,7 @@ function (ConstraintViolation $v) {
   /**
    * Tests that arbitrary attributes are allowed via GHS.
    */
-  public function testMediaArbitraryHtml() {
+  public function testMediaArbitraryHtml(): void {
     $assert_session = $this->assertSession();
 
     $editor = Editor::load('test_format');
@@ -193,7 +193,7 @@ function (ConstraintViolation $v) {
   /**
    * Tests caption editing in the CKEditor widget.
    */
-  public function testEditableCaption() {
+  public function testEditableCaption(): void {
     $page = $this->getSession()->getPage();
     $assert_session = $this->assertSession();
     // Test that setting caption to blank string doesn't break 'Edit media'
@@ -362,7 +362,7 @@ public function testAltDisabled(): void {
   /**
    * Tests the CKEditor 5 media plugin can override image media's alt attribute.
    */
-  public function testAlt() {
+  public function testAlt(): void {
     $page = $this->getSession()->getPage();
     $assert_session = $this->assertSession();
     $this->drupalGet($this->host->toUrl('edit-form'));
@@ -472,7 +472,7 @@ public function testAlt() {
   /**
    * Tests the CKEditor 5 media plugin loads the translated alt attribute.
    */
-  public function testTranslationAlt() {
+  public function testTranslationAlt(): void {
     \Drupal::service('module_installer')->install(['language', 'content_translation']);
     $this->resetAll();
     ConfigurableLanguage::createFromLangcode('fr')->save();
@@ -572,7 +572,7 @@ public function testTranslationAlt() {
    * the media style toolbar allows altering the alignment and that the changes
    * are reflected on the widget and downcast drupal-media tag.
    */
-  public function testAlignment() {
+  public function testAlignment(): void {
     $assert_session = $this->assertSession();
     $page = $this->getSession()->getPage();
     $this->drupalGet($this->host->toUrl('edit-form'));
@@ -623,7 +623,7 @@ public function testAlignment() {
   /**
    * Ensures that Drupal Media Styles can be displayed in a dropdown.
    */
-  public function testDrupalMediaStyleInDropdown() {
+  public function testDrupalMediaStyleInDropdown(): void {
     \Drupal::service('module_installer')->install(['ckeditor5_drupalelementstyle_test']);
     $this->resetAll();
 
@@ -660,7 +660,7 @@ public function testDrupalMediaStyleInDropdown() {
   /**
    * Tests Drupal Media Style with a CSS class.
    */
-  public function testDrupalMediaStyleWithClass() {
+  public function testDrupalMediaStyleWithClass(): void {
     $editor = Editor::load('test_format');
     $editor->setSettings([
       'toolbar' => [
@@ -747,7 +747,7 @@ function (ConstraintViolation $v) {
    *
    * @dataProvider providerTestViewMode
    */
-  public function testViewMode(bool $with_alignment) {
+  public function testViewMode(bool $with_alignment): void {
     EntityViewMode::create([
       'id' => 'media.view_mode_3',
       'targetEntityType' => 'media',
diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/SourceEditingTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/SourceEditingTest.php
index b7c1af2d0514..ea925522dda6 100644
--- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/SourceEditingTest.php
+++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/SourceEditingTest.php
@@ -24,7 +24,7 @@ class SourceEditingTest extends SourceEditingTestBase {
   /**
    * @covers \Drupal\ckeditor5\Plugin\CKEditor5Plugin\SourceEditing::buildConfigurationForm
    */
-  public function testSourceEditingSettingsForm() {
+  public function testSourceEditingSettingsForm(): void {
     $this->drupalLogin($this->drupalCreateUser(['administer filters']));
 
     $page = $this->getSession()->getPage();
@@ -71,7 +71,7 @@ public function testSourceEditingSettingsForm() {
    *
    * @dataProvider providerAllowingExtraAttributes
    */
-  public function testAllowingExtraAttributes(string $original_markup, string $expected_markup, ?string $allowed_elements_string = NULL) {
+  public function testAllowingExtraAttributes(string $original_markup, string $expected_markup, ?string $allowed_elements_string = NULL): void {
     $this->host->body->value = $original_markup;
     $this->host->save();
 
diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/StyleTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/StyleTest.php
index 1e09a5b91bc8..67d33b3726b6 100644
--- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/StyleTest.php
+++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/StyleTest.php
@@ -24,7 +24,7 @@ class StyleTest extends CKEditor5TestBase {
   /**
    * @covers \Drupal\ckeditor5\Plugin\CKEditor5Plugin\Style::buildConfigurationForm
    */
-  public function testStyleSettingsForm() {
+  public function testStyleSettingsForm(): void {
     $this->drupalLogin($this->drupalCreateUser(['administer filters']));
 
     $page = $this->getSession()->getPage();
@@ -151,7 +151,7 @@ public function testStyleSettingsForm() {
   /**
    * Tests Style functionality: setting a class, expected style choices.
    */
-  public function testStyleFunctionality() {
+  public function testStyleFunctionality(): void {
     FilterFormat::create([
       'format' => 'test_format',
       'name' => 'Test format',
diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/TableTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/TableTest.php
index 975e5810c768..188f36974b96 100644
--- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/TableTest.php
+++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/TableTest.php
@@ -126,7 +126,7 @@ function (ConstraintViolation $v) {
   /**
    * Confirms tables convert to the expected markup.
    */
-  public function testTableConversion() {
+  public function testTableConversion(): void {
     $assert_session = $this->assertSession();
     $page = $this->getSession()->getPage();
 
@@ -153,7 +153,7 @@ public function testTableConversion() {
   /**
    * Tests creating a table with caption in the UI.
    */
-  public function testTableCaptionUi() {
+  public function testTableCaptionUi(): void {
     $assert_session = $this->assertSession();
     $page = $this->getSession()->getPage();
 
diff --git a/core/modules/ckeditor5/tests/src/Kernel/CKEditor5PluginManagerTest.php b/core/modules/ckeditor5/tests/src/Kernel/CKEditor5PluginManagerTest.php
index 6d635a7f781b..2de924c0ed32 100644
--- a/core/modules/ckeditor5/tests/src/Kernel/CKEditor5PluginManagerTest.php
+++ b/core/modules/ckeditor5/tests/src/Kernel/CKEditor5PluginManagerTest.php
@@ -1119,7 +1119,7 @@ public static function providerProvidedElementsInvalidElementSubset(): array {
   /**
    * Tests the enabling of plugins.
    */
-  public function testEnabledPlugins() {
+  public function testEnabledPlugins(): void {
     $editor = Editor::load('basic_html');
 
     // Case 1: no extra CKEditor 5 plugins.
@@ -1290,7 +1290,7 @@ public function testEnabledPlugins() {
    * @covers \Drupal\ckeditor5\Plugin\CKEditor5PluginManager::getProvidedElements
    * @dataProvider providerTestProvidedElements
    */
-  public function testProvidedElements(array $plugins, array $text_editor_settings, array $expected_elements, string $expected_readable_string) {
+  public function testProvidedElements(array $plugins, array $text_editor_settings, array $expected_elements, string $expected_readable_string): void {
     $this->enableModules(['ckeditor5_plugin_elements_test']);
 
     $text_editor = Editor::create([
@@ -1540,7 +1540,7 @@ public static function providerTestProvidedElements(): array {
    *
    * @dataProvider providerTestPluginSupportingElement
    */
-  public function testPluginSupportingElement(string $tag, ?string $expected_plugin_id) {
+  public function testPluginSupportingElement(string $tag, ?string $expected_plugin_id): void {
     $this->enableModules(['ckeditor5_definition_supporting_element']);
     $plugin_id = $this->manager->findPluginSupportingElement($tag);
     $this->assertSame($expected_plugin_id, $plugin_id);
diff --git a/core/modules/ckeditor5/tests/src/Kernel/CKEditor5StylesheetsTest.php b/core/modules/ckeditor5/tests/src/Kernel/CKEditor5StylesheetsTest.php
index 4b20ac6d1b3d..a034d16de709 100644
--- a/core/modules/ckeditor5/tests/src/Kernel/CKEditor5StylesheetsTest.php
+++ b/core/modules/ckeditor5/tests/src/Kernel/CKEditor5StylesheetsTest.php
@@ -34,7 +34,7 @@ class CKEditor5StylesheetsTest extends KernelTestBase {
    *
    * @dataProvider externalStylesheetsProvider
    */
-  public function testExternalStylesheets($theme, $expected) {
+  public function testExternalStylesheets($theme, $expected): void {
     \Drupal::service('theme_installer')->install([$theme]);
     $this->config('system.theme')->set('default', $theme)->save();
     $this->assertSame($expected, _ckeditor5_theme_css($theme));
diff --git a/core/modules/ckeditor5/tests/src/Kernel/ConfigurablePluginTest.php b/core/modules/ckeditor5/tests/src/Kernel/ConfigurablePluginTest.php
index 3edfa27720ed..16d571cf9802 100644
--- a/core/modules/ckeditor5/tests/src/Kernel/ConfigurablePluginTest.php
+++ b/core/modules/ckeditor5/tests/src/Kernel/ConfigurablePluginTest.php
@@ -46,7 +46,7 @@ protected function setUp(): void {
   /**
    * Tests default settings for configurable CKEditor 5 plugins.
    */
-  public function testDefaults() {
+  public function testDefaults(): void {
     $all_definitions = $this->manager->getDefinitions();
     $configurable_definitions = array_filter($all_definitions, function (CKEditor5PluginDefinition $definition): bool {
       return $definition->isConfigurable();
diff --git a/core/modules/ckeditor5/tests/src/Kernel/ValidatorsTest.php b/core/modules/ckeditor5/tests/src/Kernel/ValidatorsTest.php
index 6550a5f0167f..78272fff453d 100644
--- a/core/modules/ckeditor5/tests/src/Kernel/ValidatorsTest.php
+++ b/core/modules/ckeditor5/tests/src/Kernel/ValidatorsTest.php
@@ -72,7 +72,7 @@ protected function setUp(): void {
    *   All expected violations for the given CKEditor 5 settings, with property
    *   path as keys and message as values.
    */
-  public function test(array $ckeditor5_settings, array $expected_violations) {
+  public function test(array $ckeditor5_settings, array $expected_violations): void {
     // The data provider is unable to access services, so the test scenario of
     // testing with CKEditor 5's default settings is partially provided here.
     if ($ckeditor5_settings === ['__DEFAULT__']) {
@@ -655,7 +655,7 @@ public static function provider(): array {
    * @param array $expected_violations
    *   All expected violations for the pair.
    */
-  public function testPair(array $ckeditor5_settings, array $editor_image_upload_settings, array $filters, array $expected_violations) {
+  public function testPair(array $ckeditor5_settings, array $editor_image_upload_settings, array $filters, array $expected_violations): void {
     $text_editor = Editor::create([
       'format' => 'dummy',
       'editor' => 'ckeditor5',
diff --git a/core/modules/comment/tests/src/Functional/CommentAccessTest.php b/core/modules/comment/tests/src/Functional/CommentAccessTest.php
index df6f41d9091f..209f17f6c169 100644
--- a/core/modules/comment/tests/src/Functional/CommentAccessTest.php
+++ b/core/modules/comment/tests/src/Functional/CommentAccessTest.php
@@ -75,7 +75,7 @@ protected function setUp(): void {
   /**
    * Tests commenting disabled for access-blocked entities.
    */
-  public function testCannotCommentOnEntitiesYouCannotView() {
+  public function testCannotCommentOnEntitiesYouCannotView(): void {
     $assert = $this->assertSession();
 
     $comment_url = 'comment/reply/node/' . $this->unpublishedNode->id() . '/comment';
@@ -93,7 +93,7 @@ public function testCannotCommentOnEntitiesYouCannotView() {
   /**
    * Tests cannot view comment reply form on entities you cannot view.
    */
-  public function testCannotViewCommentReplyFormOnEntitiesYouCannotView() {
+  public function testCannotViewCommentReplyFormOnEntitiesYouCannotView(): void {
     $assert = $this->assertSession();
 
     // Create a comment on an unpublished node.
diff --git a/core/modules/comment/tests/src/Functional/CommentAdminTest.php b/core/modules/comment/tests/src/Functional/CommentAdminTest.php
index ce220b6d1201..f8dfc8a9b38b 100644
--- a/core/modules/comment/tests/src/Functional/CommentAdminTest.php
+++ b/core/modules/comment/tests/src/Functional/CommentAdminTest.php
@@ -35,7 +35,7 @@ protected function setUp(): void {
   /**
    * Tests comment approval functionality through admin/content/comment.
    */
-  public function testApprovalAdminInterface() {
+  public function testApprovalAdminInterface(): void {
     // Set anonymous comments to require approval.
     user_role_change_permissions(RoleInterface::ANONYMOUS_ID, [
       'access comments' => TRUE,
@@ -128,7 +128,7 @@ public function testApprovalAdminInterface() {
   /**
    * Tests comment approval functionality through the node interface.
    */
-  public function testApprovalNodeInterface() {
+  public function testApprovalNodeInterface(): void {
     // Set anonymous comments to require approval.
     user_role_change_permissions(RoleInterface::ANONYMOUS_ID, [
       'access comments' => TRUE,
@@ -181,7 +181,7 @@ public function testApprovalNodeInterface() {
   /**
    * Tests comment bundle admin.
    */
-  public function testCommentAdmin() {
+  public function testCommentAdmin(): void {
     // Login.
     $this->drupalLogin($this->adminUser);
     // Browse to comment bundle overview.
@@ -203,7 +203,7 @@ public function testCommentAdmin() {
   /**
    * Tests editing a comment as an admin.
    */
-  public function testEditComment() {
+  public function testEditComment(): void {
     // Enable anonymous user comments.
     user_role_grant_permissions(RoleInterface::ANONYMOUS_ID, [
       'access comments',
@@ -244,7 +244,7 @@ public function testEditComment() {
   /**
    * Tests commented translation deletion admin view.
    */
-  public function testCommentedTranslationDeletion() {
+  public function testCommentedTranslationDeletion(): void {
     \Drupal::service('module_installer')->install([
       'language',
       'locale',
diff --git a/core/modules/comment/tests/src/Functional/CommentAnonymousTest.php b/core/modules/comment/tests/src/Functional/CommentAnonymousTest.php
index 529018cb4ff1..dd21d393d2ff 100644
--- a/core/modules/comment/tests/src/Functional/CommentAnonymousTest.php
+++ b/core/modules/comment/tests/src/Functional/CommentAnonymousTest.php
@@ -41,7 +41,7 @@ protected function setUp(): void {
   /**
    * Tests anonymous comment functionality.
    */
-  public function testAnonymous() {
+  public function testAnonymous(): void {
     $this->setCommentAnonymous(CommentInterface::ANONYMOUS_MAYNOT_CONTACT);
 
     // Preview comments (with `skip comment approval` permission).
diff --git a/core/modules/comment/tests/src/Functional/CommentBlockTest.php b/core/modules/comment/tests/src/Functional/CommentBlockTest.php
index c1565fdfe01e..1c368a78d78a 100644
--- a/core/modules/comment/tests/src/Functional/CommentBlockTest.php
+++ b/core/modules/comment/tests/src/Functional/CommentBlockTest.php
@@ -45,7 +45,7 @@ protected function setUp(): void {
   /**
    * Tests the recent comments block.
    */
-  public function testRecentCommentBlock() {
+  public function testRecentCommentBlock(): void {
     $this->drupalLogin($this->adminUser);
     $this->drupalPlaceBlock('views_block:comments_recent-block_1');
 
diff --git a/core/modules/comment/tests/src/Functional/CommentCSSTest.php b/core/modules/comment/tests/src/Functional/CommentCSSTest.php
index 645e075b9c85..6894ffef589d 100644
--- a/core/modules/comment/tests/src/Functional/CommentCSSTest.php
+++ b/core/modules/comment/tests/src/Functional/CommentCSSTest.php
@@ -42,7 +42,7 @@ protected function setUp(): void {
   /**
    * Tests CSS classes on comments.
    */
-  public function testCommentClasses() {
+  public function testCommentClasses(): void {
     // Create all permutations for comments, users, and nodes.
     $parameters = [
       'node_uid' => [0, $this->webUser->id()],
diff --git a/core/modules/comment/tests/src/Functional/CommentCacheTagsTest.php b/core/modules/comment/tests/src/Functional/CommentCacheTagsTest.php
index 8f11f20a29c4..71f75312f72a 100644
--- a/core/modules/comment/tests/src/Functional/CommentCacheTagsTest.php
+++ b/core/modules/comment/tests/src/Functional/CommentCacheTagsTest.php
@@ -103,7 +103,7 @@ protected function createEntity() {
   /**
    * Tests that comments invalidate the cache tag of their host entity.
    */
-  public function testCommentEntity() {
+  public function testCommentEntity(): void {
     $this->verifyPageCache($this->entityTestCamelid->toUrl(), 'MISS');
     $this->verifyPageCache($this->entityTestCamelid->toUrl(), 'HIT');
 
diff --git a/core/modules/comment/tests/src/Functional/CommentDisplayConfigurableTest.php b/core/modules/comment/tests/src/Functional/CommentDisplayConfigurableTest.php
index c84c4d205333..0ffbb1bcf95c 100644
--- a/core/modules/comment/tests/src/Functional/CommentDisplayConfigurableTest.php
+++ b/core/modules/comment/tests/src/Functional/CommentDisplayConfigurableTest.php
@@ -38,7 +38,7 @@ protected function setUp(): void {
   /**
    * Sets base fields to configurable display and check settings are respected.
    */
-  public function testDisplayConfigurable() {
+  public function testDisplayConfigurable(): void {
     // Add a comment.
     $nid = $this->node->id();
     /** @var \Drupal\comment\CommentInterface $comment */
diff --git a/core/modules/comment/tests/src/Functional/CommentEntityReferenceTest.php b/core/modules/comment/tests/src/Functional/CommentEntityReferenceTest.php
index 1b328e924aa4..9130bf290866 100644
--- a/core/modules/comment/tests/src/Functional/CommentEntityReferenceTest.php
+++ b/core/modules/comment/tests/src/Functional/CommentEntityReferenceTest.php
@@ -83,7 +83,7 @@ protected function setUp(): void {
   /**
    * Tests that comments are correctly saved as entity references.
    */
-  public function testCommentAsEntityReference() {
+  public function testCommentAsEntityReference(): void {
     // Load the node and save it.
     $edit = [
       'entity_reference_comment' => $this->comment->id(),
@@ -100,7 +100,7 @@ public function testCommentAsEntityReference() {
   /**
    * Tests that comments of unpublished are not shown.
    */
-  public function testCommentOfUnpublishedNodeBypassAccess() {
+  public function testCommentOfUnpublishedNodeBypassAccess(): void {
     // Unpublish the node that has the comment.
     $this->node->setUnpublished()->save();
 
diff --git a/core/modules/comment/tests/src/Functional/CommentEntityTest.php b/core/modules/comment/tests/src/Functional/CommentEntityTest.php
index a783eee9a55c..b822bb9afa66 100644
--- a/core/modules/comment/tests/src/Functional/CommentEntityTest.php
+++ b/core/modules/comment/tests/src/Functional/CommentEntityTest.php
@@ -69,7 +69,7 @@ protected function setUp(): void {
   /**
    * Tests CSS classes on comments.
    */
-  public function testEntityChanges() {
+  public function testEntityChanges(): void {
     $this->drupalLogin($this->webUser);
     // Create a new node.
     $term = $this->createTerm($this->vocab, ['uid' => $this->webUser->id()]);
diff --git a/core/modules/comment/tests/src/Functional/CommentFieldsTest.php b/core/modules/comment/tests/src/Functional/CommentFieldsTest.php
index 3e41b977774e..bce7eb07200f 100644
--- a/core/modules/comment/tests/src/Functional/CommentFieldsTest.php
+++ b/core/modules/comment/tests/src/Functional/CommentFieldsTest.php
@@ -31,7 +31,7 @@ class CommentFieldsTest extends CommentTestBase {
   /**
    * Tests that the default 'comment_body' field is correctly added.
    */
-  public function testCommentDefaultFields() {
+  public function testCommentDefaultFields(): void {
     // Do not make assumptions on default node types created by the test
     // installation profile, and create our own.
     $this->drupalCreateContentType(['type' => 'test_node_type']);
@@ -69,7 +69,7 @@ public function testCommentDefaultFields() {
   /**
    * Tests that you can remove a comment field.
    */
-  public function testCommentFieldDelete() {
+  public function testCommentFieldDelete(): void {
     $this->drupalCreateContentType(['type' => 'test_node_type']);
     $this->addDefaultCommentField('node', 'test_node_type');
     // We want to test the handling of removing the primary comment field, so we
@@ -99,7 +99,7 @@ public function testCommentFieldDelete() {
   /**
    * Tests link building with non-default comment field names.
    */
-  public function testCommentFieldLinksNonDefaultName() {
+  public function testCommentFieldLinksNonDefaultName(): void {
     $this->drupalCreateContentType(['type' => 'test_node_type']);
     $this->addDefaultCommentField('node', 'test_node_type', 'comment2');
 
@@ -145,7 +145,7 @@ public function testCommentFieldLinksNonDefaultName() {
   /**
    * Tests creating a comment field through the interface.
    */
-  public function testCommentFieldCreate() {
+  public function testCommentFieldCreate(): void {
     // Create user who can administer user fields.
     $user = $this->drupalCreateUser([
       'administer user fields',
diff --git a/core/modules/comment/tests/src/Functional/CommentInterfaceTest.php b/core/modules/comment/tests/src/Functional/CommentInterfaceTest.php
index 48477dffccfc..beb71661cd4f 100644
--- a/core/modules/comment/tests/src/Functional/CommentInterfaceTest.php
+++ b/core/modules/comment/tests/src/Functional/CommentInterfaceTest.php
@@ -46,7 +46,7 @@ protected function setUp(): void {
   /**
    * Tests the comment interface.
    */
-  public function testCommentInterface() {
+  public function testCommentInterface(): void {
 
     // Post comment #1 without subject or preview.
     $this->drupalLogin($this->webUser);
@@ -227,7 +227,7 @@ public function testCommentInterface() {
    * comment body are used for the subject. If this would break within a word,
    * then the break is put at the previous word boundary instead.
    */
-  public function testAutoFilledSubject() {
+  public function testAutoFilledSubject(): void {
     $this->drupalLogin($this->webUser);
     $this->drupalGet('node/' . $this->node->id());
 
@@ -260,7 +260,7 @@ public function testAutoFilledSubject() {
    * with the additional check that HTML is stripped appropriately prior to
    * character-counting.
    */
-  public function testAutoFilledHtmlSubject() {
+  public function testAutoFilledHtmlSubject(): void {
     // Set up two default (i.e. filtered HTML) input formats, because then we
     // can select one of them. Then create a user that can use these formats,
     // log the user in, and then GET the node page on which to test the
@@ -309,7 +309,7 @@ public function testAutoFilledHtmlSubject() {
   /**
    * Tests the comment formatter configured with a custom comment view mode.
    */
-  public function testViewMode() {
+  public function testViewMode(): void {
     $this->drupalLogin($this->webUser);
     $this->drupalGet($this->node->toUrl());
     $comment_text = $this->randomMachineName();
diff --git a/core/modules/comment/tests/src/Functional/CommentLanguageTest.php b/core/modules/comment/tests/src/Functional/CommentLanguageTest.php
index e098ea3f340f..213e4e042111 100644
--- a/core/modules/comment/tests/src/Functional/CommentLanguageTest.php
+++ b/core/modules/comment/tests/src/Functional/CommentLanguageTest.php
@@ -106,7 +106,7 @@ protected function setUp(): void {
   /**
    * Tests that comment language is properly set.
    */
-  public function testCommentLanguage() {
+  public function testCommentLanguage(): void {
 
     // Create two nodes, one for english and one for french, and comment each
     // node using both english and french as content language by changing URL
diff --git a/core/modules/comment/tests/src/Functional/CommentLinksAlterTest.php b/core/modules/comment/tests/src/Functional/CommentLinksAlterTest.php
index aeb6c015863b..20d1c06e9fbc 100644
--- a/core/modules/comment/tests/src/Functional/CommentLinksAlterTest.php
+++ b/core/modules/comment/tests/src/Functional/CommentLinksAlterTest.php
@@ -31,7 +31,7 @@ protected function setUp(): void {
   /**
    * Tests comment links altering.
    */
-  public function testCommentLinksAlter() {
+  public function testCommentLinksAlter(): void {
     $this->drupalLogin($this->webUser);
     $comment_text = $this->randomMachineName();
     $subject = $this->randomMachineName();
diff --git a/core/modules/comment/tests/src/Functional/CommentLinksTest.php b/core/modules/comment/tests/src/Functional/CommentLinksTest.php
index bb2b0c36b248..dd625e675750 100644
--- a/core/modules/comment/tests/src/Functional/CommentLinksTest.php
+++ b/core/modules/comment/tests/src/Functional/CommentLinksTest.php
@@ -49,7 +49,7 @@ class CommentLinksTest extends CommentTestBase {
   /**
    * Tests that comment links are output and can be hidden.
    */
-  public function testCommentLinks() {
+  public function testCommentLinks(): void {
     // Remove additional user permissions from $this->webUser added by setUp(),
     // since this test is limited to anonymous and authenticated roles only.
     $roles = $this->webUser->getRoles();
diff --git a/core/modules/comment/tests/src/Functional/CommentNewIndicatorTest.php b/core/modules/comment/tests/src/Functional/CommentNewIndicatorTest.php
index 88a91176ad9b..aab533350423 100644
--- a/core/modules/comment/tests/src/Functional/CommentNewIndicatorTest.php
+++ b/core/modules/comment/tests/src/Functional/CommentNewIndicatorTest.php
@@ -57,7 +57,7 @@ protected function renderNewCommentsNodeLinks(array $node_ids) {
   /**
    * Tests new comment marker.
    */
-  public function testCommentNewCommentsIndicator() {
+  public function testCommentNewCommentsIndicator(): void {
     // Test if the right links are displayed when no comment is present for the
     // node.
     $this->drupalLogin($this->adminUser);
diff --git a/core/modules/comment/tests/src/Functional/CommentNodeAccessTest.php b/core/modules/comment/tests/src/Functional/CommentNodeAccessTest.php
index fa89d9bb8695..6e75e64fe266 100644
--- a/core/modules/comment/tests/src/Functional/CommentNodeAccessTest.php
+++ b/core/modules/comment/tests/src/Functional/CommentNodeAccessTest.php
@@ -53,7 +53,7 @@ protected function setUp(): void {
   /**
    * Tests that threaded comments can be viewed.
    */
-  public function testThreadedCommentView() {
+  public function testThreadedCommentView(): void {
     // Set comments to have subject required and preview disabled.
     $this->setCommentPreview(DRUPAL_DISABLED);
     $this->setCommentForm(TRUE);
diff --git a/core/modules/comment/tests/src/Functional/CommentNodeChangesTest.php b/core/modules/comment/tests/src/Functional/CommentNodeChangesTest.php
index bc76ae97a878..feae4736c69c 100644
--- a/core/modules/comment/tests/src/Functional/CommentNodeChangesTest.php
+++ b/core/modules/comment/tests/src/Functional/CommentNodeChangesTest.php
@@ -23,7 +23,7 @@ class CommentNodeChangesTest extends CommentTestBase {
   /**
    * Tests that comments are deleted with the node.
    */
-  public function testNodeDeletion() {
+  public function testNodeDeletion(): void {
     $this->drupalLogin($this->webUser);
     $comment = $this->postComment($this->node, $this->randomMachineName(), $this->randomMachineName());
     $this->assertInstanceOf(Comment::class, $comment);
diff --git a/core/modules/comment/tests/src/Functional/CommentNonNodeTest.php b/core/modules/comment/tests/src/Functional/CommentNonNodeTest.php
index 9693ac528f7f..67a498278f68 100644
--- a/core/modules/comment/tests/src/Functional/CommentNonNodeTest.php
+++ b/core/modules/comment/tests/src/Functional/CommentNonNodeTest.php
@@ -265,7 +265,7 @@ public function getUnapprovedComment($subject) {
   /**
    * Tests anonymous comment functionality.
    */
-  public function testCommentFunctionality() {
+  public function testCommentFunctionality(): void {
     $limited_user = $this->drupalCreateUser([
       'administer entity_test fields',
     ]);
@@ -490,7 +490,7 @@ public function testCommentFunctionality() {
   /**
    * Tests comment fields cannot be added to entity types without integer IDs.
    */
-  public function testsNonIntegerIdEntities() {
+  public function testsNonIntegerIdEntities(): void {
     // Create a bundle for entity_test_string_id.
     entity_test_create_bundle('entity_test', 'Entity Test', 'entity_test_string_id');
     $limited_user = $this->drupalCreateUser([
@@ -526,7 +526,7 @@ public function testsNonIntegerIdEntities() {
   /**
    * Ensures that comment settings are not required.
    */
-  public function testCommentSettingsNotRequired() {
+  public function testCommentSettingsNotRequired(): void {
     $limited_user = $this->drupalCreateUser([
       'administer entity_test fields',
     ]);
diff --git a/core/modules/comment/tests/src/Functional/CommentPagerTest.php b/core/modules/comment/tests/src/Functional/CommentPagerTest.php
index 3d1b927cb458..d6b01d72173b 100644
--- a/core/modules/comment/tests/src/Functional/CommentPagerTest.php
+++ b/core/modules/comment/tests/src/Functional/CommentPagerTest.php
@@ -23,7 +23,7 @@ class CommentPagerTest extends CommentTestBase {
   /**
    * Confirms comment paging works correctly with flat and threaded comments.
    */
-  public function testCommentPaging() {
+  public function testCommentPaging(): void {
     $this->drupalLogin($this->adminUser);
 
     // Set comment variables.
@@ -113,7 +113,7 @@ public function testCommentPaging() {
   /**
    * Confirms comment paging works correctly with flat and threaded comments.
    */
-  public function testCommentPermalink() {
+  public function testCommentPermalink(): void {
     $this->drupalLogin($this->adminUser);
 
     // Set comment variables.
@@ -145,7 +145,7 @@ public function testCommentPermalink() {
   /**
    * Tests comment ordering and threading.
    */
-  public function testCommentOrderingThreading() {
+  public function testCommentOrderingThreading(): void {
     $this->drupalLogin($this->adminUser);
 
     // Set comment variables.
@@ -246,7 +246,7 @@ public function assertCommentOrder(array $comments, array $expected_order): void
   /**
    * Tests calculation of first page with new comment.
    */
-  public function testCommentNewPageIndicator() {
+  public function testCommentNewPageIndicator(): void {
     $this->drupalLogin($this->adminUser);
 
     // Set comment variables.
@@ -338,7 +338,7 @@ public function testCommentNewPageIndicator() {
   /**
    * Confirms comment paging works correctly with two pagers.
    */
-  public function testTwoPagers() {
+  public function testTwoPagers(): void {
     // Add another field to article content-type.
     $this->addDefaultCommentField('node', 'article', 'comment_2');
     // Set default to display comment list with unique pager id.
diff --git a/core/modules/comment/tests/src/Functional/CommentPreviewTest.php b/core/modules/comment/tests/src/Functional/CommentPreviewTest.php
index 6175e382ebc2..3d9676c8b73a 100644
--- a/core/modules/comment/tests/src/Functional/CommentPreviewTest.php
+++ b/core/modules/comment/tests/src/Functional/CommentPreviewTest.php
@@ -36,7 +36,7 @@ class CommentPreviewTest extends CommentTestBase {
   /**
    * Tests comment preview.
    */
-  public function testCommentPreview() {
+  public function testCommentPreview(): void {
     $this->setCommentPreview(DRUPAL_OPTIONAL);
     $this->setCommentForm(TRUE);
     $this->setCommentSubject(TRUE);
@@ -92,7 +92,7 @@ public function testCommentPreview() {
   /**
    * Tests comment preview.
    */
-  public function testCommentPreviewDuplicateSubmission() {
+  public function testCommentPreviewDuplicateSubmission(): void {
     $this->setCommentPreview(DRUPAL_OPTIONAL);
     $this->setCommentForm(TRUE);
     $this->setCommentSubject(TRUE);
@@ -133,7 +133,7 @@ public function testCommentPreviewDuplicateSubmission() {
   /**
    * Tests comment edit, preview, and save.
    */
-  public function testCommentEditPreviewSave() {
+  public function testCommentEditPreviewSave(): void {
     $web_user = $this->drupalCreateUser([
       'access comments',
       'post comments',
diff --git a/core/modules/comment/tests/src/Functional/CommentRssTest.php b/core/modules/comment/tests/src/Functional/CommentRssTest.php
index d0f84215a307..3aed649a0a12 100644
--- a/core/modules/comment/tests/src/Functional/CommentRssTest.php
+++ b/core/modules/comment/tests/src/Functional/CommentRssTest.php
@@ -49,7 +49,7 @@ protected function setUp(): void {
   /**
    * Tests comments as part of an RSS feed.
    */
-  public function testCommentRss() {
+  public function testCommentRss(): void {
     // Find comment in RSS feed.
     $this->drupalLogin($this->webUser);
     $this->postComment($this->node, $this->randomMachineName(), $this->randomMachineName());
diff --git a/core/modules/comment/tests/src/Functional/CommentStatisticsTest.php b/core/modules/comment/tests/src/Functional/CommentStatisticsTest.php
index 9a309f16e0ab..202db96c3623 100644
--- a/core/modules/comment/tests/src/Functional/CommentStatisticsTest.php
+++ b/core/modules/comment/tests/src/Functional/CommentStatisticsTest.php
@@ -53,7 +53,7 @@ protected function setUp(): void {
   /**
    * Tests the node comment statistics.
    */
-  public function testCommentNodeCommentStatistics() {
+  public function testCommentNodeCommentStatistics(): void {
     $node_storage = $this->container->get('entity_type.manager')->getStorage('node');
     // Set comments to have subject and preview disabled.
     $this->setCommentPreview(DRUPAL_DISABLED);
diff --git a/core/modules/comment/tests/src/Functional/CommentStatusFieldAccessTest.php b/core/modules/comment/tests/src/Functional/CommentStatusFieldAccessTest.php
index 9a654e7316c4..e3f336c33783 100644
--- a/core/modules/comment/tests/src/Functional/CommentStatusFieldAccessTest.php
+++ b/core/modules/comment/tests/src/Functional/CommentStatusFieldAccessTest.php
@@ -85,7 +85,7 @@ protected function setUp(): void {
   /**
    * Tests comment status field access.
    */
-  public function testCommentStatusFieldAccessStatus() {
+  public function testCommentStatusFieldAccessStatus(): void {
     $this->drupalLogin($this->nodeAuthor);
     $this->drupalGet('node/add/article');
     $assert = $this->assertSession();
diff --git a/core/modules/comment/tests/src/Functional/CommentThreadingTest.php b/core/modules/comment/tests/src/Functional/CommentThreadingTest.php
index 12eb2b149747..38620e75af52 100644
--- a/core/modules/comment/tests/src/Functional/CommentThreadingTest.php
+++ b/core/modules/comment/tests/src/Functional/CommentThreadingTest.php
@@ -21,7 +21,7 @@ class CommentThreadingTest extends CommentTestBase {
   /**
    * Tests the comment threading.
    */
-  public function testCommentThreading() {
+  public function testCommentThreading(): void {
     // Set comments to have a subject with preview disabled.
     $this->setCommentPreview(DRUPAL_DISABLED);
     $this->setCommentForm(TRUE);
diff --git a/core/modules/comment/tests/src/Functional/CommentTitleTest.php b/core/modules/comment/tests/src/Functional/CommentTitleTest.php
index 644aadb96410..a215a36d440b 100644
--- a/core/modules/comment/tests/src/Functional/CommentTitleTest.php
+++ b/core/modules/comment/tests/src/Functional/CommentTitleTest.php
@@ -19,7 +19,7 @@ class CommentTitleTest extends CommentTestBase {
   /**
    * Tests markup for comments with empty titles.
    */
-  public function testCommentEmptyTitles() {
+  public function testCommentEmptyTitles(): void {
     // Create a node.
     $this->drupalLogin($this->webUser);
     $this->node = $this->drupalCreateNode(['type' => 'article', 'promote' => 1, 'uid' => $this->webUser->id()]);
@@ -67,7 +67,7 @@ public function testCommentEmptyTitles() {
   /**
    * Tests markup for comments with populated titles.
    */
-  public function testCommentPopulatedTitles() {
+  public function testCommentPopulatedTitles(): void {
     // Set comments to have a subject with preview disabled.
     $this->setCommentPreview(DRUPAL_DISABLED);
     $this->setCommentForm(TRUE);
diff --git a/core/modules/comment/tests/src/Functional/CommentTokenReplaceTest.php b/core/modules/comment/tests/src/Functional/CommentTokenReplaceTest.php
index 76a28ce954fb..9bbc1e8c530a 100644
--- a/core/modules/comment/tests/src/Functional/CommentTokenReplaceTest.php
+++ b/core/modules/comment/tests/src/Functional/CommentTokenReplaceTest.php
@@ -34,7 +34,7 @@ class CommentTokenReplaceTest extends CommentTestBase {
   /**
    * Creates a comment, then tests the tokens generated from it.
    */
-  public function testCommentTokenReplacement() {
+  public function testCommentTokenReplacement(): void {
     $token_service = \Drupal::token();
     $language_interface = \Drupal::languageManager()->getCurrentLanguage();
     $url_options = [
diff --git a/core/modules/comment/tests/src/Functional/CommentTranslationUITest.php b/core/modules/comment/tests/src/Functional/CommentTranslationUITest.php
index 7cfb47da61c0..b1e575d4b547 100644
--- a/core/modules/comment/tests/src/Functional/CommentTranslationUITest.php
+++ b/core/modules/comment/tests/src/Functional/CommentTranslationUITest.php
@@ -204,7 +204,7 @@ protected function doTestAuthoringInfo() {
   /**
    * Tests translate link on comment content admin page.
    */
-  public function testTranslateLinkCommentAdminPage() {
+  public function testTranslateLinkCommentAdminPage(): void {
     $this->adminUser = $this->drupalCreateUser(array_merge(parent::getTranslatorPermissions(), ['access administration pages', 'administer comments', 'skip comment approval']));
     $this->drupalLogin($this->adminUser);
 
diff --git a/core/modules/comment/tests/src/Functional/CommentTypeTest.php b/core/modules/comment/tests/src/Functional/CommentTypeTest.php
index 1eb95ea4f584..9ac706b12a5f 100644
--- a/core/modules/comment/tests/src/Functional/CommentTypeTest.php
+++ b/core/modules/comment/tests/src/Functional/CommentTypeTest.php
@@ -57,7 +57,7 @@ protected function setUp(): void {
   /**
    * Tests creating a comment type programmatically and via a form.
    */
-  public function testCommentTypeCreation() {
+  public function testCommentTypeCreation(): void {
     // Create a comment type programmatically.
     $type = $this->createCommentType('other');
 
@@ -121,7 +121,7 @@ public function testCommentTypeCreation() {
   /**
    * Tests editing a comment type using the UI.
    */
-  public function testCommentTypeEditing() {
+  public function testCommentTypeEditing(): void {
     $this->drupalLogin($this->adminUser);
 
     $field = FieldConfig::loadByName('comment', 'comment', 'comment_body');
@@ -156,7 +156,7 @@ public function testCommentTypeEditing() {
   /**
    * Tests deleting a comment type that still has content.
    */
-  public function testCommentTypeDeletion() {
+  public function testCommentTypeDeletion(): void {
     // Create a comment type programmatically.
     $type = $this->createCommentType('foo');
     $this->drupalCreateContentType(['type' => 'page']);
diff --git a/core/modules/comment/tests/src/Functional/Rest/CommentResourceTestBase.php b/core/modules/comment/tests/src/Functional/Rest/CommentResourceTestBase.php
index 5dd9abdd32db..60b13b236169 100644
--- a/core/modules/comment/tests/src/Functional/Rest/CommentResourceTestBase.php
+++ b/core/modules/comment/tests/src/Functional/Rest/CommentResourceTestBase.php
@@ -289,7 +289,7 @@ protected function getExpectedCacheContexts() {
    * - base fields that are marked as required, but yet can still result in
    *   validation errors other than "missing required field".
    */
-  public function testPostDxWithoutCriticalBaseFields() {
+  public function testPostDxWithoutCriticalBaseFields(): void {
     $this->initAuthentication();
     $this->provisionEntityResource();
     $this->setUpAuthorization('POST');
@@ -341,7 +341,7 @@ protected function getExpectedUnauthorizedAccessMessage($method) {
   /**
    * Tests POSTing a comment with and without 'skip comment approval'.
    */
-  public function testPostSkipCommentApproval() {
+  public function testPostSkipCommentApproval(): void {
     $this->initAuthentication();
     $this->provisionEntityResource();
     $this->setUpAuthorization('POST');
diff --git a/core/modules/comment/tests/src/Functional/Rest/CommentXmlAnonTest.php b/core/modules/comment/tests/src/Functional/Rest/CommentXmlAnonTest.php
index 958364568173..6404656dfe99 100644
--- a/core/modules/comment/tests/src/Functional/Rest/CommentXmlAnonTest.php
+++ b/core/modules/comment/tests/src/Functional/Rest/CommentXmlAnonTest.php
@@ -55,7 +55,7 @@ class CommentXmlAnonTest extends CommentResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public function testPostDxWithoutCriticalBaseFields() {
+  public function testPostDxWithoutCriticalBaseFields(): void {
     // Deserialization of the XML format is not supported.
     $this->markTestSkipped();
   }
@@ -63,7 +63,7 @@ public function testPostDxWithoutCriticalBaseFields() {
   /**
    * {@inheritdoc}
    */
-  public function testPostSkipCommentApproval() {
+  public function testPostSkipCommentApproval(): void {
     // Deserialization of the XML format is not supported.
     $this->markTestSkipped();
   }
diff --git a/core/modules/comment/tests/src/Functional/Rest/CommentXmlBasicAuthTest.php b/core/modules/comment/tests/src/Functional/Rest/CommentXmlBasicAuthTest.php
index cc62c590df45..05fec0c0a771 100644
--- a/core/modules/comment/tests/src/Functional/Rest/CommentXmlBasicAuthTest.php
+++ b/core/modules/comment/tests/src/Functional/Rest/CommentXmlBasicAuthTest.php
@@ -44,7 +44,7 @@ class CommentXmlBasicAuthTest extends CommentResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public function testPostDxWithoutCriticalBaseFields() {
+  public function testPostDxWithoutCriticalBaseFields(): void {
     // Deserialization of the XML format is not supported.
     $this->markTestSkipped();
   }
@@ -52,7 +52,7 @@ public function testPostDxWithoutCriticalBaseFields() {
   /**
    * {@inheritdoc}
    */
-  public function testPostSkipCommentApproval() {
+  public function testPostSkipCommentApproval(): void {
     // Deserialization of the XML format is not supported.
     $this->markTestSkipped();
   }
diff --git a/core/modules/comment/tests/src/Functional/Rest/CommentXmlCookieTest.php b/core/modules/comment/tests/src/Functional/Rest/CommentXmlCookieTest.php
index 44b6fc95030a..44028b9db894 100644
--- a/core/modules/comment/tests/src/Functional/Rest/CommentXmlCookieTest.php
+++ b/core/modules/comment/tests/src/Functional/Rest/CommentXmlCookieTest.php
@@ -39,7 +39,7 @@ class CommentXmlCookieTest extends CommentResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public function testPostDxWithoutCriticalBaseFields() {
+  public function testPostDxWithoutCriticalBaseFields(): void {
     // Deserialization of the XML format is not supported.
     $this->markTestSkipped();
   }
@@ -47,7 +47,7 @@ public function testPostDxWithoutCriticalBaseFields() {
   /**
    * {@inheritdoc}
    */
-  public function testPostSkipCommentApproval() {
+  public function testPostSkipCommentApproval(): void {
     // Deserialization of the XML format is not supported.
     $this->markTestSkipped();
   }
diff --git a/core/modules/comment/tests/src/Functional/Views/CommentAdminTest.php b/core/modules/comment/tests/src/Functional/Views/CommentAdminTest.php
index 2676189c1208..2156aad327f9 100644
--- a/core/modules/comment/tests/src/Functional/Views/CommentAdminTest.php
+++ b/core/modules/comment/tests/src/Functional/Views/CommentAdminTest.php
@@ -55,7 +55,7 @@ protected function setUp(): void {
   /**
    * Tests comment approval functionality through admin/content/comment.
    */
-  public function testApprovalAdminInterface() {
+  public function testApprovalAdminInterface(): void {
     // Set anonymous comments to require approval.
     user_role_change_permissions(RoleInterface::ANONYMOUS_ID, [
       'access comments' => TRUE,
@@ -205,7 +205,7 @@ public function testApprovalAdminInterface() {
   /**
    * Tests commented entity label of admin view.
    */
-  public function testCommentedEntityLabel() {
+  public function testCommentedEntityLabel(): void {
     \Drupal::service('module_installer')->install(['block_content']);
     \Drupal::service('router.builder')->rebuildIfNeeded();
     $bundle = BlockContentType::create([
diff --git a/core/modules/comment/tests/src/Functional/Views/CommentApproveLinkTest.php b/core/modules/comment/tests/src/Functional/Views/CommentApproveLinkTest.php
index a5e7e65886a0..97edfbcc442f 100644
--- a/core/modules/comment/tests/src/Functional/Views/CommentApproveLinkTest.php
+++ b/core/modules/comment/tests/src/Functional/Views/CommentApproveLinkTest.php
@@ -43,7 +43,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['comment_test_vi
   /**
    * Tests that "approve comment" link exists and works as expected.
    */
-  public function testCommentApproveLink() {
+  public function testCommentApproveLink(): void {
     $this->drupalLogin($this->drupalCreateUser(['administer comments']));
     // Set the comment status to unpublished.
     $this->comment->setUnpublished();
diff --git a/core/modules/comment/tests/src/Functional/Views/CommentEditTest.php b/core/modules/comment/tests/src/Functional/Views/CommentEditTest.php
index b75da43e194a..c932d19b34e2 100644
--- a/core/modules/comment/tests/src/Functional/Views/CommentEditTest.php
+++ b/core/modules/comment/tests/src/Functional/Views/CommentEditTest.php
@@ -21,7 +21,7 @@ class CommentEditTest extends CommentBrowserTestBase {
   /**
    * Tests comment label in admin view.
    */
-  public function testCommentEdit() {
+  public function testCommentEdit(): void {
     $this->drupalLogin($this->adminUser);
     // Post a comment to node.
     $node_comment = $this->postComment($this->node, $this->randomMachineName(), $this->randomMachineName(), TRUE);
diff --git a/core/modules/comment/tests/src/Functional/Views/CommentFieldFilterTest.php b/core/modules/comment/tests/src/Functional/Views/CommentFieldFilterTest.php
index 63b84c45c57d..0c58b3320d63 100644
--- a/core/modules/comment/tests/src/Functional/Views/CommentFieldFilterTest.php
+++ b/core/modules/comment/tests/src/Functional/Views/CommentFieldFilterTest.php
@@ -85,7 +85,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['comment_test_vi
   /**
    * Tests body and title filters.
    */
-  public function testFilters() {
+  public function testFilters(): void {
     // Test the title filter page, which filters for title contains 'Comida'.
     // Should show just the Spanish translation, once.
     $this->assertPageCounts('test-title-filter', ['es' => 1, 'fr' => 0, 'en' => 0], 'Comida title filter');
diff --git a/core/modules/comment/tests/src/Functional/Views/CommentOperationsTest.php b/core/modules/comment/tests/src/Functional/Views/CommentOperationsTest.php
index 04a67d304a66..9f657ca01f49 100644
--- a/core/modules/comment/tests/src/Functional/Views/CommentOperationsTest.php
+++ b/core/modules/comment/tests/src/Functional/Views/CommentOperationsTest.php
@@ -26,7 +26,7 @@ class CommentOperationsTest extends CommentTestBase {
   /**
    * Tests the operations field plugin.
    */
-  public function testCommentOperations() {
+  public function testCommentOperations(): void {
     $admin_account = $this->drupalCreateUser(['administer comments']);
     $this->drupalLogin($admin_account);
     $this->drupalGet('test-comment-operations');
diff --git a/core/modules/comment/tests/src/Functional/Views/CommentRowTest.php b/core/modules/comment/tests/src/Functional/Views/CommentRowTest.php
index 2011a8becb49..f8502f890d89 100644
--- a/core/modules/comment/tests/src/Functional/Views/CommentRowTest.php
+++ b/core/modules/comment/tests/src/Functional/Views/CommentRowTest.php
@@ -26,7 +26,7 @@ class CommentRowTest extends CommentTestBase {
   /**
    * Tests comment row.
    */
-  public function testCommentRow() {
+  public function testCommentRow(): void {
     $this->drupalGet('test-comment-row');
     $this->assertSession()->elementsCount('xpath', '//article[contains(@class, "comment")]', 1);
   }
diff --git a/core/modules/comment/tests/src/Functional/Views/DefaultViewRecentCommentsTest.php b/core/modules/comment/tests/src/Functional/Views/DefaultViewRecentCommentsTest.php
index fbf13cf3e698..65bd437ce272 100644
--- a/core/modules/comment/tests/src/Functional/Views/DefaultViewRecentCommentsTest.php
+++ b/core/modules/comment/tests/src/Functional/Views/DefaultViewRecentCommentsTest.php
@@ -118,7 +118,7 @@ protected function setUp($import_test_views = TRUE, $modules = []): void {
   /**
    * Tests the block defined by the comments_recent view.
    */
-  public function testBlockDisplay() {
+  public function testBlockDisplay(): void {
     $user = $this->drupalCreateUser(['access comments']);
     $this->drupalLogin($user);
 
diff --git a/core/modules/comment/tests/src/Functional/Views/NodeCommentsTest.php b/core/modules/comment/tests/src/Functional/Views/NodeCommentsTest.php
index 56c80d658e89..da0c274f1c83 100644
--- a/core/modules/comment/tests/src/Functional/Views/NodeCommentsTest.php
+++ b/core/modules/comment/tests/src/Functional/Views/NodeCommentsTest.php
@@ -33,7 +33,7 @@ class NodeCommentsTest extends CommentTestBase {
   /**
    * Tests the new comments field plugin.
    */
-  public function testNewComments() {
+  public function testNewComments(): void {
     $this->drupalGet('test-new-comments');
     $this->assertSession()->statusCodeEquals(200);
     $new_comments = $this->cssSelect(".views-field-new-comments a:contains('1')");
@@ -43,7 +43,7 @@ public function testNewComments() {
   /**
    * Test the comment count field.
    */
-  public function testCommentCount() {
+  public function testCommentCount(): void {
     $this->drupalGet('test-comment-count');
     $this->assertSession()->statusCodeEquals(200);
     $this->assertCount(2, $this->cssSelect('.views-row'));
diff --git a/core/modules/comment/tests/src/Functional/Views/RowRssTest.php b/core/modules/comment/tests/src/Functional/Views/RowRssTest.php
index a58f1cae5bfe..d4e905897010 100644
--- a/core/modules/comment/tests/src/Functional/Views/RowRssTest.php
+++ b/core/modules/comment/tests/src/Functional/Views/RowRssTest.php
@@ -27,7 +27,7 @@ class RowRssTest extends CommentTestBase {
   /**
    * Tests comment rss output.
    */
-  public function testRssRow() {
+  public function testRssRow(): void {
     $this->drupalGet('test-comment-rss');
 
     // Because the response is XML we can't use the page which depends on an
diff --git a/core/modules/comment/tests/src/Functional/Views/WizardTest.php b/core/modules/comment/tests/src/Functional/Views/WizardTest.php
index 12286a0a85b7..1b94591e5b58 100644
--- a/core/modules/comment/tests/src/Functional/Views/WizardTest.php
+++ b/core/modules/comment/tests/src/Functional/Views/WizardTest.php
@@ -43,7 +43,7 @@ protected function setUp($import_test_views = TRUE, $modules = []): void {
   /**
    * Tests adding a view of comments.
    */
-  public function testCommentWizard() {
+  public function testCommentWizard(): void {
     $view = [];
     $view['label'] = $this->randomMachineName(16);
     $view['id'] = $this->randomMachineName(16);
diff --git a/core/modules/comment/tests/src/Kernel/CommentBaseFieldTest.php b/core/modules/comment/tests/src/Kernel/CommentBaseFieldTest.php
index 6b6da07b346c..24c43a8eac67 100644
--- a/core/modules/comment/tests/src/Kernel/CommentBaseFieldTest.php
+++ b/core/modules/comment/tests/src/Kernel/CommentBaseFieldTest.php
@@ -41,7 +41,7 @@ protected function setUp(): void {
   /**
    * Tests comment as a base field.
    */
-  public function testCommentBaseField() {
+  public function testCommentBaseField(): void {
     // Verify entity creation.
     $entity = CommentTestBaseField::create([
       'name' => $this->randomMachineName(),
diff --git a/core/modules/comment/tests/src/Kernel/CommentBundlesTest.php b/core/modules/comment/tests/src/Kernel/CommentBundlesTest.php
index cc2f5a80948a..ee5ea547ee48 100644
--- a/core/modules/comment/tests/src/Kernel/CommentBundlesTest.php
+++ b/core/modules/comment/tests/src/Kernel/CommentBundlesTest.php
@@ -60,7 +60,7 @@ protected function setUp(): void {
   /**
    * Tests that the entity_id field is set correctly for each comment bundle.
    */
-  public function testEntityIdField() {
+  public function testEntityIdField(): void {
     $field_definitions = [];
 
     foreach (array_keys($this->targetEntityTypes) as $id) {
diff --git a/core/modules/comment/tests/src/Kernel/CommentDefaultFormatterCacheTagsTest.php b/core/modules/comment/tests/src/Kernel/CommentDefaultFormatterCacheTagsTest.php
index ecbc1d64c09c..4eca26e06106 100644
--- a/core/modules/comment/tests/src/Kernel/CommentDefaultFormatterCacheTagsTest.php
+++ b/core/modules/comment/tests/src/Kernel/CommentDefaultFormatterCacheTagsTest.php
@@ -71,7 +71,7 @@ protected function setUp(): void {
   /**
    * Tests the bubbling of cache tags.
    */
-  public function testCacheTags() {
+  public function testCacheTags(): void {
     /** @var \Drupal\Core\Render\RendererInterface $renderer */
     $renderer = $this->container->get('renderer');
 
diff --git a/core/modules/comment/tests/src/Kernel/CommentFieldAccessTest.php b/core/modules/comment/tests/src/Kernel/CommentFieldAccessTest.php
index c1f492035ad8..82e1e1c759d0 100644
--- a/core/modules/comment/tests/src/Kernel/CommentFieldAccessTest.php
+++ b/core/modules/comment/tests/src/Kernel/CommentFieldAccessTest.php
@@ -95,7 +95,7 @@ protected function setUp(): void {
   /**
    * Tests permissions on comment fields.
    */
-  public function testAccessToAdministrativeFields() {
+  public function testAccessToAdministrativeFields(): void {
     // Create a comment type.
     $comment_type = CommentType::create([
       'id' => 'comment',
diff --git a/core/modules/comment/tests/src/Kernel/CommentHostnameTest.php b/core/modules/comment/tests/src/Kernel/CommentHostnameTest.php
index a0e0c7e68a73..305ae0cfbc5f 100644
--- a/core/modules/comment/tests/src/Kernel/CommentHostnameTest.php
+++ b/core/modules/comment/tests/src/Kernel/CommentHostnameTest.php
@@ -30,7 +30,7 @@ class CommentHostnameTest extends KernelTestBase {
    *
    * @covers ::getDefaultHostname
    */
-  public function testGetDefaultHostname() {
+  public function testGetDefaultHostname(): void {
     // Create a fake request to be used for testing.
     $request = Request::create('/', 'GET', [], [], [], ['REMOTE_ADDR' => '203.0.113.1']);
     $request->setSession(new Session(new MockArraySessionStorage()));
diff --git a/core/modules/comment/tests/src/Kernel/CommentIntegrationTest.php b/core/modules/comment/tests/src/Kernel/CommentIntegrationTest.php
index 58ab6a9102ed..ff1fc72da680 100644
--- a/core/modules/comment/tests/src/Kernel/CommentIntegrationTest.php
+++ b/core/modules/comment/tests/src/Kernel/CommentIntegrationTest.php
@@ -59,7 +59,7 @@ protected function setUp(): void {
    * @see comment_entity_view_display_presave()
    * @see CommentDefaultFormatter::calculateDependencies()
    */
-  public function testViewMode() {
+  public function testViewMode(): void {
     $mode = $this->randomMachineName();
     // Create a new comment view mode and a view display entity.
     EntityViewMode::create([
@@ -151,7 +151,7 @@ public function testViewMode() {
   /**
    * Tests the default owner of comment entities.
    */
-  public function testCommentDefaultOwner() {
+  public function testCommentDefaultOwner(): void {
     $comment = Comment::create([
       'comment_type' => 'comment',
     ]);
diff --git a/core/modules/comment/tests/src/Kernel/CommentItemTest.php b/core/modules/comment/tests/src/Kernel/CommentItemTest.php
index c0cf918bcdb9..12ac7a097345 100644
--- a/core/modules/comment/tests/src/Kernel/CommentItemTest.php
+++ b/core/modules/comment/tests/src/Kernel/CommentItemTest.php
@@ -40,7 +40,7 @@ protected function setUp(): void {
   /**
    * Tests using entity fields of the comment field type.
    */
-  public function testCommentItem() {
+  public function testCommentItem(): void {
     $this->addDefaultCommentField('entity_test', 'entity_test', 'comment');
 
     // Verify entity creation.
@@ -74,7 +74,7 @@ public function testCommentItem() {
   /**
    * Tests comment author name.
    */
-  public function testCommentAuthorName() {
+  public function testCommentAuthorName(): void {
     $this->installEntitySchema('comment');
     $this->addDefaultCommentField('entity_test', 'entity_test', 'comment');
 
diff --git a/core/modules/comment/tests/src/Kernel/CommentOrphanTest.php b/core/modules/comment/tests/src/Kernel/CommentOrphanTest.php
index 5c660f57b511..8c31076f4751 100644
--- a/core/modules/comment/tests/src/Kernel/CommentOrphanTest.php
+++ b/core/modules/comment/tests/src/Kernel/CommentOrphanTest.php
@@ -39,7 +39,7 @@ protected function setUp(): void {
    *
    * @dataProvider providerTestOrphan
    */
-  public function testOrphan($property) {
+  public function testOrphan($property): void {
 
     DateFormat::create([
       'id' => 'fallback',
diff --git a/core/modules/comment/tests/src/Kernel/CommentStringIdEntitiesTest.php b/core/modules/comment/tests/src/Kernel/CommentStringIdEntitiesTest.php
index a2b3f46dedc1..ff57326f69a7 100644
--- a/core/modules/comment/tests/src/Kernel/CommentStringIdEntitiesTest.php
+++ b/core/modules/comment/tests/src/Kernel/CommentStringIdEntitiesTest.php
@@ -44,7 +44,7 @@ protected function setUp(): void {
   /**
    * Tests that comment fields cannot be added entities with non-integer IDs.
    */
-  public function testCommentFieldNonStringId() {
+  public function testCommentFieldNonStringId(): void {
     $this->expectException(\UnexpectedValueException::class);
     $bundle = CommentType::create([
       'id' => 'foo',
diff --git a/core/modules/comment/tests/src/Kernel/CommentUninstallTest.php b/core/modules/comment/tests/src/Kernel/CommentUninstallTest.php
index ddeb62260a2c..8c40b5a44cf0 100644
--- a/core/modules/comment/tests/src/Kernel/CommentUninstallTest.php
+++ b/core/modules/comment/tests/src/Kernel/CommentUninstallTest.php
@@ -58,7 +58,7 @@ protected function setUp(): void {
   /**
    * Tests if comment module uninstall fails if the field exists.
    */
-  public function testCommentUninstallWithField() {
+  public function testCommentUninstallWithField(): void {
     // Ensure that the field exists before uninstalling.
     $field_storage = FieldStorageConfig::loadByName('comment', 'comment_body');
     $this->assertNotNull($field_storage);
@@ -72,7 +72,7 @@ public function testCommentUninstallWithField() {
   /**
    * Tests if uninstallation succeeds if the field has been deleted beforehand.
    */
-  public function testCommentUninstallWithoutField() {
+  public function testCommentUninstallWithoutField(): void {
     // Tests if uninstall succeeds if the field has been deleted beforehand.
     // Manually delete the comment_body field before module uninstall.
     FieldStorageConfig::loadByName('comment', 'comment_body')->delete();
diff --git a/core/modules/comment/tests/src/Kernel/CommentValidationTest.php b/core/modules/comment/tests/src/Kernel/CommentValidationTest.php
index b0a7ae38c28b..fc1d295908e6 100644
--- a/core/modules/comment/tests/src/Kernel/CommentValidationTest.php
+++ b/core/modules/comment/tests/src/Kernel/CommentValidationTest.php
@@ -41,7 +41,7 @@ protected function setUp(): void {
   /**
    * Tests the comment validation constraints.
    */
-  public function testValidation() {
+  public function testValidation(): void {
     // Add a user.
     $user = User::create(['name' => 'test', 'status' => TRUE]);
     $user->save();
@@ -192,7 +192,7 @@ public function testValidation() {
   /**
    * Tests that comments of unpublished nodes are not valid.
    */
-  public function testValidationOfCommentOfUnpublishedNode() {
+  public function testValidationOfCommentOfUnpublishedNode(): void {
     // Create a page node type.
     $this->entityTypeManager->getStorage('node_type')->create([
       'type' => 'page',
diff --git a/core/modules/comment/tests/src/Kernel/Migrate/MigrateCommentStubTest.php b/core/modules/comment/tests/src/Kernel/Migrate/MigrateCommentStubTest.php
index 21a134fe89f5..d2a74fd7a466 100644
--- a/core/modules/comment/tests/src/Kernel/Migrate/MigrateCommentStubTest.php
+++ b/core/modules/comment/tests/src/Kernel/Migrate/MigrateCommentStubTest.php
@@ -56,7 +56,7 @@ protected function setUp(): void {
   /**
    * Tests creation of comment stubs.
    */
-  public function testStub() {
+  public function testStub(): void {
     $this->performStubTest('comment');
   }
 
diff --git a/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentEntityDisplayTest.php b/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentEntityDisplayTest.php
index 4fb6cbe2e674..0e28da2a8652 100644
--- a/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentEntityDisplayTest.php
+++ b/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentEntityDisplayTest.php
@@ -57,7 +57,7 @@ protected function assertDisplay(string $id, string $component_id): void {
   /**
    * Tests the migrated display configuration.
    */
-  public function testMigration() {
+  public function testMigration(): void {
     $this->assertDisplay('node.article.default', 'comment_node_article');
     $this->assertDisplay('node.company.default', 'comment_node_company');
     $this->assertDisplay('node.employee.default', 'comment_node_employee');
diff --git a/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentEntityFormDisplaySubjectTest.php b/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentEntityFormDisplaySubjectTest.php
index 4b79d333a98b..6186dee9cf7a 100644
--- a/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentEntityFormDisplaySubjectTest.php
+++ b/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentEntityFormDisplaySubjectTest.php
@@ -63,7 +63,7 @@ protected function assertSubjectNotVisible(string $id): void {
   /**
    * Tests the migrated display configuration.
    */
-  public function testMigration() {
+  public function testMigration(): void {
     $this->assertSubjectVisible('comment.comment_node_article.default');
     $this->assertSubjectVisible('comment.comment_node_company.default');
     $this->assertSubjectVisible('comment.comment_node_employee.default');
diff --git a/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentEntityFormDisplayTest.php b/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentEntityFormDisplayTest.php
index 021c9a48a36b..3c7590701d36 100644
--- a/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentEntityFormDisplayTest.php
+++ b/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentEntityFormDisplayTest.php
@@ -55,7 +55,7 @@ protected function assertDisplay(string $id, string $component_id): void {
   /**
    * Tests the migrated display configuration.
    */
-  public function testMigration() {
+  public function testMigration(): void {
     $this->assertDisplay('node.article.default', 'comment_node_article');
     $this->assertDisplay('node.company.default', 'comment_node_company');
     $this->assertDisplay('node.employee.default', 'comment_node_employee');
diff --git a/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentFieldInstanceTest.php b/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentFieldInstanceTest.php
index f6696baba679..97163fcb21c4 100644
--- a/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentFieldInstanceTest.php
+++ b/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentFieldInstanceTest.php
@@ -75,7 +75,7 @@ protected function assertEntity(string $bundle, string $field_name, int $default
   /**
    * Tests the migrated field instance values.
    */
-  public function testMigration() {
+  public function testMigration(): void {
     $this->assertEntity('article', 'comment_node_article', 2, 1, 50, 0, FALSE, 1);
     $this->assertEntity('company', 'comment_node_company', 2, 1, 50, 0, FALSE, 1);
     $this->assertEntity('employee', 'comment_node_employee', 2, 1, 50, 0, FALSE, 1);
diff --git a/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentFieldTest.php b/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentFieldTest.php
index cbe2ba86be0c..f1336881bfdb 100644
--- a/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentFieldTest.php
+++ b/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentFieldTest.php
@@ -51,7 +51,7 @@ protected function assertEntity(string $comment_type): void {
   /**
    * Tests the migrated comment fields.
    */
-  public function testMigration() {
+  public function testMigration(): void {
     $this->assertEntity('comment_node_article');
     $this->assertEntity('comment_node_company');
     $this->assertEntity('comment_node_employee');
diff --git a/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentTest.php b/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentTest.php
index e747be917117..8cc17c7fda3e 100644
--- a/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentTest.php
+++ b/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentTest.php
@@ -59,7 +59,7 @@ protected function setUp(): void {
   /**
    * Tests the migrated comments.
    */
-  public function testMigration() {
+  public function testMigration(): void {
     $comment = Comment::load(1);
     $this->assertSame('The first comment.', $comment->getSubject());
     $this->assertSame('The first comment body.', $comment->comment_body->value);
diff --git a/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentTypeTest.php b/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentTypeTest.php
index 8ee007673985..f3480914b437 100644
--- a/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentTypeTest.php
+++ b/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentTypeTest.php
@@ -40,7 +40,7 @@ protected function assertEntity(string $id, string $label): void {
   /**
    * Tests the migrated comment types.
    */
-  public function testMigration() {
+  public function testMigration(): void {
     $this->installConfig(['comment']);
     $this->executeMigration('d6_comment_type');
 
@@ -74,7 +74,7 @@ public function testMigration() {
    *
    * @dataProvider providerTestNoCommentTypeMigration
    */
-  public function testNoCommentTypeMigration(array $disabled_source_modules, array $expected_messages) {
+  public function testNoCommentTypeMigration(array $disabled_source_modules, array $expected_messages): void {
     if (!empty($disabled_source_modules)) {
       $this->sourceDatabase->update('system')
         ->condition('name', $disabled_source_modules, 'IN')
diff --git a/core/modules/comment/tests/src/Kernel/Migrate/d7/CommentEntityTranslationCheckRequirementsTest.php b/core/modules/comment/tests/src/Kernel/Migrate/d7/CommentEntityTranslationCheckRequirementsTest.php
index 3166215c59d5..47dc5969acdb 100644
--- a/core/modules/comment/tests/src/Kernel/Migrate/d7/CommentEntityTranslationCheckRequirementsTest.php
+++ b/core/modules/comment/tests/src/Kernel/Migrate/d7/CommentEntityTranslationCheckRequirementsTest.php
@@ -28,7 +28,7 @@ class CommentEntityTranslationCheckRequirementsTest extends MigrateDrupal7TestBa
    *
    * @dataProvider providerTestCheckRequirements
    */
-  public function testCheckRequirements($module) {
+  public function testCheckRequirements($module): void {
     // Disable the module in the source site.
     $this->sourceDatabase->update('system')
       ->condition('name', $module)
diff --git a/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentEntityDisplayTest.php b/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentEntityDisplayTest.php
index 09bf1c59a90f..d4c501fd869c 100644
--- a/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentEntityDisplayTest.php
+++ b/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentEntityDisplayTest.php
@@ -55,7 +55,7 @@ protected function assertDisplay(string $id, string $component_id): void {
   /**
    * Tests the migrated display configuration.
    */
-  public function testMigration() {
+  public function testMigration(): void {
     $this->assertDisplay('node.page.default', 'comment_node_page');
     $this->assertDisplay('node.article.default', 'comment_node_article');
     $this->assertDisplay('node.book.default', 'comment_node_book');
diff --git a/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentEntityFormDisplaySubjectTest.php b/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentEntityFormDisplaySubjectTest.php
index c3346be203e6..8331ddda88bd 100644
--- a/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentEntityFormDisplaySubjectTest.php
+++ b/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentEntityFormDisplaySubjectTest.php
@@ -60,7 +60,7 @@ protected function assertSubjectNotVisible(string $id): void {
   /**
    * Tests the migrated display configuration.
    */
-  public function testMigration() {
+  public function testMigration(): void {
     $this->assertSubjectVisible('comment.comment_node_page.default');
     $this->assertSubjectVisible('comment.comment_node_article.default');
     $this->assertSubjectVisible('comment.comment_node_book.default');
diff --git a/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentEntityFormDisplayTest.php b/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentEntityFormDisplayTest.php
index 9020d7bfa03d..e4384f9165ca 100644
--- a/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentEntityFormDisplayTest.php
+++ b/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentEntityFormDisplayTest.php
@@ -54,7 +54,7 @@ protected function assertDisplay(string $id, string $component_id): void {
   /**
    * Tests the migrated display configuration.
    */
-  public function testMigration() {
+  public function testMigration(): void {
     $this->assertDisplay('node.page.default', 'comment_node_page');
     $this->assertDisplay('node.article.default', 'comment_node_article');
     $this->assertDisplay('node.book.default', 'comment_node_book');
diff --git a/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentFieldInstanceTest.php b/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentFieldInstanceTest.php
index b6e12b2f98d5..08035c02625f 100644
--- a/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentFieldInstanceTest.php
+++ b/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentFieldInstanceTest.php
@@ -74,7 +74,7 @@ protected function assertEntity(string $bundle, string $field_name, int $default
   /**
    * Tests the migrated fields.
    */
-  public function testMigration() {
+  public function testMigration(): void {
     $this->assertEntity('page', 'comment_node_page', 0, 1, 50, 0, TRUE, 1);
     $this->assertEntity('article', 'comment_node_article', 2, 1, 50, 0, TRUE, 1);
     $this->assertEntity('blog', 'comment_node_blog', 2, 1, 50, 0, TRUE, 1);
diff --git a/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentFieldTest.php b/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentFieldTest.php
index 840149a5db1d..24a5d6d43913 100644
--- a/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentFieldTest.php
+++ b/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentFieldTest.php
@@ -48,7 +48,7 @@ protected function assertEntity(string $comment_type): void {
   /**
    * Tests the migrated comment fields.
    */
-  public function testMigration() {
+  public function testMigration(): void {
     $this->assertEntity('comment_node_page');
     $this->assertEntity('comment_node_article');
     $this->assertEntity('comment_node_blog');
diff --git a/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentTest.php b/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentTest.php
index 2a5f6c54dac4..e60a4562e375 100644
--- a/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentTest.php
+++ b/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentTest.php
@@ -66,7 +66,7 @@ protected function setUp(): void {
   /**
    * Tests the migrated comments.
    */
-  public function testMigration() {
+  public function testMigration(): void {
     $comment = Comment::load(1);
     $this->assertInstanceOf(Comment::class, $comment);
     $this->assertSame('Subject field in English', $comment->getSubject());
diff --git a/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentTypeTest.php b/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentTypeTest.php
index 0bf90afa248c..f5b014e9fdd5 100644
--- a/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentTypeTest.php
+++ b/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentTypeTest.php
@@ -40,7 +40,7 @@ protected function assertEntity(string $id, string $label): void {
   /**
    * Tests the migrated comment types.
    */
-  public function testMigration() {
+  public function testMigration(): void {
     $this->migrateCommentTypes();
 
     $comment_fields = [
@@ -80,7 +80,7 @@ public function testMigration() {
    *
    * @dataProvider providerTestNoCommentTypeMigration
    */
-  public function testNoCommentTypeMigration(array $disabled_source_modules, array $expected_messages) {
+  public function testNoCommentTypeMigration(array $disabled_source_modules, array $expected_messages): void {
     if (!empty($disabled_source_modules)) {
       $this->sourceDatabase->update('system')
         ->condition('name', $disabled_source_modules, 'IN')
diff --git a/core/modules/comment/tests/src/Kernel/Plugin/migrate/source/CommentTypeRequirementsTest.php b/core/modules/comment/tests/src/Kernel/Plugin/migrate/source/CommentTypeRequirementsTest.php
index 29404430f430..379e51803b05 100644
--- a/core/modules/comment/tests/src/Kernel/Plugin/migrate/source/CommentTypeRequirementsTest.php
+++ b/core/modules/comment/tests/src/Kernel/Plugin/migrate/source/CommentTypeRequirementsTest.php
@@ -31,7 +31,7 @@ class CommentTypeRequirementsTest extends MigrateDrupal7TestBase {
    *
    * @dataProvider providerTestCheckCommentTypeRequirements
    */
-  public function testCheckCommentTypeRequirements(array $disabled_source_modules, string $exception_message, string $migration_plugin_id) {
+  public function testCheckCommentTypeRequirements(array $disabled_source_modules, string $exception_message, string $migration_plugin_id): void {
     if (!empty($disabled_source_modules)) {
       $this->sourceDatabase->update('system')
         ->condition('name', $disabled_source_modules, 'IN')
diff --git a/core/modules/comment/tests/src/Kernel/Views/CommentAdminViewTest.php b/core/modules/comment/tests/src/Kernel/Views/CommentAdminViewTest.php
index 7713a558e843..a0e4ae3e38a6 100644
--- a/core/modules/comment/tests/src/Kernel/Views/CommentAdminViewTest.php
+++ b/core/modules/comment/tests/src/Kernel/Views/CommentAdminViewTest.php
@@ -135,7 +135,7 @@ protected function setUp($import_test_views = TRUE): void {
   /**
    * Tests comment admin view filters.
    */
-  public function testFilters() {
+  public function testFilters(): void {
     $this->doTestFilters('page_published');
     // Unpublish the comments to test the Unapproved comments tab.
     foreach ($this->comments as $comment) {
diff --git a/core/modules/comment/tests/src/Kernel/Views/CommentDepthTest.php b/core/modules/comment/tests/src/Kernel/Views/CommentDepthTest.php
index 58020cca1b53..48b6c2dd9453 100644
--- a/core/modules/comment/tests/src/Kernel/Views/CommentDepthTest.php
+++ b/core/modules/comment/tests/src/Kernel/Views/CommentDepthTest.php
@@ -43,7 +43,7 @@ protected function setUp($import_test_views = TRUE): void {
   /**
    * Test the comment depth.
    */
-  public function testCommentDepth() {
+  public function testCommentDepth(): void {
     $this->enableModules(['field']);
     $this->installConfig(['field']);
 
diff --git a/core/modules/comment/tests/src/Kernel/Views/CommentFieldNameTest.php b/core/modules/comment/tests/src/Kernel/Views/CommentFieldNameTest.php
index 0cc0611a815a..713ca4186b5d 100644
--- a/core/modules/comment/tests/src/Kernel/Views/CommentFieldNameTest.php
+++ b/core/modules/comment/tests/src/Kernel/Views/CommentFieldNameTest.php
@@ -53,7 +53,7 @@ class CommentFieldNameTest extends KernelTestBase {
   /**
    * Tests comment field name.
    */
-  public function testCommentFieldName() {
+  public function testCommentFieldName(): void {
     $renderer = $this->container->get('renderer');
 
     $this->installEntitySchema('user');
diff --git a/core/modules/comment/tests/src/Kernel/Views/CommentLinksTest.php b/core/modules/comment/tests/src/Kernel/Views/CommentLinksTest.php
index 954e24efb099..ecd8d4e48862 100644
--- a/core/modules/comment/tests/src/Kernel/Views/CommentLinksTest.php
+++ b/core/modules/comment/tests/src/Kernel/Views/CommentLinksTest.php
@@ -46,7 +46,7 @@ protected function setUp($import_test_views = TRUE): void {
   /**
    * Tests the comment approve link.
    */
-  public function testLinkApprove() {
+  public function testLinkApprove(): void {
     $host = EntityTest::create(['name' => $this->randomString()]);
     $host->save();
 
@@ -112,7 +112,7 @@ public function testLinkApprove() {
   /**
    * Tests the comment reply link.
    */
-  public function testLinkReply() {
+  public function testLinkReply(): void {
     $this->enableModules(['field']);
     $this->installSchema('comment', ['comment_entity_statistics']);
     $this->installConfig(['field']);
diff --git a/core/modules/comment/tests/src/Kernel/Views/CommentUserNameTest.php b/core/modules/comment/tests/src/Kernel/Views/CommentUserNameTest.php
index 6259dff4603c..02b2eb0b23c7 100644
--- a/core/modules/comment/tests/src/Kernel/Views/CommentUserNameTest.php
+++ b/core/modules/comment/tests/src/Kernel/Views/CommentUserNameTest.php
@@ -107,7 +107,7 @@ protected function setUp($import_test_views = TRUE): void {
   /**
    * Tests the username formatter.
    */
-  public function testUsername() {
+  public function testUsername(): void {
     $view_id = $this->randomMachineName();
     $view = View::create([
       'id' => $view_id,
diff --git a/core/modules/comment/tests/src/Kernel/Views/CommentViewsFieldAccessTest.php b/core/modules/comment/tests/src/Kernel/Views/CommentViewsFieldAccessTest.php
index 01679b517fc4..3b682c4d8ea5 100644
--- a/core/modules/comment/tests/src/Kernel/Views/CommentViewsFieldAccessTest.php
+++ b/core/modules/comment/tests/src/Kernel/Views/CommentViewsFieldAccessTest.php
@@ -34,7 +34,7 @@ protected function setUp($import_test_views = TRUE): void {
   /**
    * Check access for comment fields.
    */
-  public function testCommentFields() {
+  public function testCommentFields(): void {
     $user = User::create([
       'name' => 'test user',
     ]);
diff --git a/core/modules/comment/tests/src/Kernel/Views/FilterAndArgumentUserUidTest.php b/core/modules/comment/tests/src/Kernel/Views/FilterAndArgumentUserUidTest.php
index a2abce8b1073..40eaeeaa3cb6 100644
--- a/core/modules/comment/tests/src/Kernel/Views/FilterAndArgumentUserUidTest.php
+++ b/core/modules/comment/tests/src/Kernel/Views/FilterAndArgumentUserUidTest.php
@@ -52,7 +52,7 @@ class FilterAndArgumentUserUidTest extends KernelTestBase {
   /**
    * Tests the user posted or commented filter and argument handlers.
    */
-  public function testHandlers() {
+  public function testHandlers(): void {
     $this->installEntitySchema('user');
     $this->installEntitySchema('node');
     $this->installEntitySchema('comment');
diff --git a/core/modules/comment/tests/src/Unit/CommentLinkBuilderTest.php b/core/modules/comment/tests/src/Unit/CommentLinkBuilderTest.php
index 11507f3d72f0..1d26daaf4a91 100644
--- a/core/modules/comment/tests/src/Unit/CommentLinkBuilderTest.php
+++ b/core/modules/comment/tests/src/Unit/CommentLinkBuilderTest.php
@@ -115,7 +115,7 @@ protected function setUp(): void {
    *
    * @covers ::buildCommentedEntityLinks
    */
-  public function testCommentLinkBuilder(array $node_args, $context, $has_access_comments, $history_exists, $has_post_comments, $is_anonymous, $expected) {
+  public function testCommentLinkBuilder(array $node_args, $context, $has_access_comments, $history_exists, $has_post_comments, $is_anonymous, $expected): void {
     $node = $this->getMockNode(...$node_args);
     $this->moduleHandler->expects($this->any())
       ->method('moduleExists')
diff --git a/core/modules/comment/tests/src/Unit/CommentManagerTest.php b/core/modules/comment/tests/src/Unit/CommentManagerTest.php
index 1409a886d4e3..89230901befb 100644
--- a/core/modules/comment/tests/src/Unit/CommentManagerTest.php
+++ b/core/modules/comment/tests/src/Unit/CommentManagerTest.php
@@ -23,7 +23,7 @@ class CommentManagerTest extends UnitTestCase {
    *
    * @covers ::getFields
    */
-  public function testGetFields() {
+  public function testGetFields(): void {
     // Set up a content entity type.
     $entity_type = $this->createMock('Drupal\Core\Entity\ContentEntityTypeInterface');
     $entity_type->expects($this->any())
diff --git a/core/modules/comment/tests/src/Unit/CommentStatisticsUnitTest.php b/core/modules/comment/tests/src/Unit/CommentStatisticsUnitTest.php
index 0e1d7809d853..146d68277d7c 100644
--- a/core/modules/comment/tests/src/Unit/CommentStatisticsUnitTest.php
+++ b/core/modules/comment/tests/src/Unit/CommentStatisticsUnitTest.php
@@ -99,7 +99,7 @@ protected function setUp(): void {
    * @group Drupal
    * @group Comment
    */
-  public function testRead() {
+  public function testRead(): void {
     $this->callsToFetch = 0;
     $results = $this->commentStatistics->read(['1' => 'boo', '2' => 'foo'], 'snafus');
     $this->assertEquals(['something', 'something-else'], $results);
diff --git a/core/modules/comment/tests/src/Unit/Entity/CommentLockTest.php b/core/modules/comment/tests/src/Unit/Entity/CommentLockTest.php
index 27441f6d4261..81ee1d77e069 100644
--- a/core/modules/comment/tests/src/Unit/Entity/CommentLockTest.php
+++ b/core/modules/comment/tests/src/Unit/Entity/CommentLockTest.php
@@ -19,7 +19,7 @@ class CommentLockTest extends UnitTestCase {
   /**
    * Tests the lock behavior.
    */
-  public function testLocks() {
+  public function testLocks(): void {
     $container = new ContainerBuilder();
     $container->set('module_handler', $this->createMock('Drupal\Core\Extension\ModuleHandlerInterface'));
     $container->set('current_user', $this->createMock('Drupal\Core\Session\AccountInterface'));
diff --git a/core/modules/comment/tests/src/Unit/Plugin/views/field/CommentBulkFormTest.php b/core/modules/comment/tests/src/Unit/Plugin/views/field/CommentBulkFormTest.php
index c25bb7489739..377dd1e2894e 100644
--- a/core/modules/comment/tests/src/Unit/Plugin/views/field/CommentBulkFormTest.php
+++ b/core/modules/comment/tests/src/Unit/Plugin/views/field/CommentBulkFormTest.php
@@ -29,7 +29,7 @@ protected function tearDown(): void {
   /**
    * Tests the constructor assignment of actions.
    */
-  public function testConstructor() {
+  public function testConstructor(): void {
     $actions = [];
 
     for ($i = 1; $i <= 2; $i++) {
diff --git a/core/modules/config/tests/src/Functional/CacheabilityMetadataConfigOverrideIntegrationTest.php b/core/modules/config/tests/src/Functional/CacheabilityMetadataConfigOverrideIntegrationTest.php
index 3e1f74fe6b53..bd619cec8372 100644
--- a/core/modules/config/tests/src/Functional/CacheabilityMetadataConfigOverrideIntegrationTest.php
+++ b/core/modules/config/tests/src/Functional/CacheabilityMetadataConfigOverrideIntegrationTest.php
@@ -46,7 +46,7 @@ protected function setUp(): void {
   /**
    * Tests if config overrides correctly set cacheability metadata.
    */
-  public function testConfigOverride() {
+  public function testConfigOverride(): void {
     // Check the default (disabled) state of the cache context. The block label
     // should not be overridden.
     $this->drupalGet('<front>');
diff --git a/core/modules/config/tests/src/Functional/ConfigDependencyWebTest.php b/core/modules/config/tests/src/Functional/ConfigDependencyWebTest.php
index 0be204b22b5f..97a16d7671ce 100644
--- a/core/modules/config/tests/src/Functional/ConfigDependencyWebTest.php
+++ b/core/modules/config/tests/src/Functional/ConfigDependencyWebTest.php
@@ -36,7 +36,7 @@ class ConfigDependencyWebTest extends BrowserTestBase {
    *
    * @see \Drupal\Core\Config\Entity\ConfigDependencyDeleteFormTrait
    */
-  public function testConfigDependencyDeleteFormTrait() {
+  public function testConfigDependencyDeleteFormTrait(): void {
     $this->drupalLogin($this->drupalCreateUser([
       'administer site configuration',
     ]));
diff --git a/core/modules/config/tests/src/Functional/ConfigDraggableListBuilderTest.php b/core/modules/config/tests/src/Functional/ConfigDraggableListBuilderTest.php
index 8688fc517ec9..a04b9b9b37a0 100644
--- a/core/modules/config/tests/src/Functional/ConfigDraggableListBuilderTest.php
+++ b/core/modules/config/tests/src/Functional/ConfigDraggableListBuilderTest.php
@@ -28,7 +28,7 @@ class ConfigDraggableListBuilderTest extends BrowserTestBase {
   /**
    * Tests draggable lists.
    */
-  public function testDraggableList() {
+  public function testDraggableList(): void {
     $this->drupalLogin($this->drupalCreateUser(['administer permissions']));
 
     // Create more than 50 roles.
diff --git a/core/modules/config/tests/src/Functional/ConfigEntityFormOverrideTest.php b/core/modules/config/tests/src/Functional/ConfigEntityFormOverrideTest.php
index 1cad82aaee0b..b4789958f28f 100644
--- a/core/modules/config/tests/src/Functional/ConfigEntityFormOverrideTest.php
+++ b/core/modules/config/tests/src/Functional/ConfigEntityFormOverrideTest.php
@@ -26,7 +26,7 @@ class ConfigEntityFormOverrideTest extends BrowserTestBase {
   /**
    * Tests that overrides do not affect forms or listing screens.
    */
-  public function testFormsWithOverrides() {
+  public function testFormsWithOverrides(): void {
     $this->drupalLogin($this->drupalCreateUser([
       'administer site configuration',
     ]));
diff --git a/core/modules/config/tests/src/Functional/ConfigEntityListMultilingualTest.php b/core/modules/config/tests/src/Functional/ConfigEntityListMultilingualTest.php
index 8c3cb03f2296..1b006248fc2d 100644
--- a/core/modules/config/tests/src/Functional/ConfigEntityListMultilingualTest.php
+++ b/core/modules/config/tests/src/Functional/ConfigEntityListMultilingualTest.php
@@ -43,7 +43,7 @@ protected function setUp(): void {
   /**
    * Tests the listing UI with different language scenarios.
    */
-  public function testListUI() {
+  public function testListUI(): void {
     // Log in as an administrative user to access the full menu trail.
     $this->drupalLogin($this->drupalCreateUser([
       'access administration pages',
diff --git a/core/modules/config/tests/src/Functional/ConfigEntityListTest.php b/core/modules/config/tests/src/Functional/ConfigEntityListTest.php
index 8f618ba041a1..d8cea1dd10ad 100644
--- a/core/modules/config/tests/src/Functional/ConfigEntityListTest.php
+++ b/core/modules/config/tests/src/Functional/ConfigEntityListTest.php
@@ -45,7 +45,7 @@ protected function setUp(): void {
   /**
    * Tests entity list builder methods.
    */
-  public function testList() {
+  public function testList(): void {
     $controller = \Drupal::entityTypeManager()->getListBuilder('config_test');
 
     // Test getStorage() method.
@@ -216,7 +216,7 @@ public function testList() {
   /**
    * Tests the listing UI.
    */
-  public function testListUI() {
+  public function testListUI(): void {
     // Log in as an administrative user to access the full menu trail.
     $this->drupalLogin($this->drupalCreateUser([
       'access administration pages',
@@ -314,7 +314,7 @@ public function testListUI() {
   /**
    * Tests paging.
    */
-  public function testPager() {
+  public function testPager(): void {
     $this->drupalLogin($this->drupalCreateUser([
       'administer site configuration',
     ]));
diff --git a/core/modules/config/tests/src/Functional/ConfigEntityStatusUITest.php b/core/modules/config/tests/src/Functional/ConfigEntityStatusUITest.php
index 90f882199cd7..8cf60997ee29 100644
--- a/core/modules/config/tests/src/Functional/ConfigEntityStatusUITest.php
+++ b/core/modules/config/tests/src/Functional/ConfigEntityStatusUITest.php
@@ -28,7 +28,7 @@ class ConfigEntityStatusUITest extends BrowserTestBase {
   /**
    * Tests status operations.
    */
-  public function testCRUD() {
+  public function testCRUD(): void {
     $this->drupalLogin($this->drupalCreateUser([
       'administer site configuration',
     ]));
diff --git a/core/modules/config/tests/src/Functional/ConfigEntityTest.php b/core/modules/config/tests/src/Functional/ConfigEntityTest.php
index 6a6057ac0d52..686e379cbaf1 100644
--- a/core/modules/config/tests/src/Functional/ConfigEntityTest.php
+++ b/core/modules/config/tests/src/Functional/ConfigEntityTest.php
@@ -40,7 +40,7 @@ class ConfigEntityTest extends BrowserTestBase {
   /**
    * Tests CRUD operations.
    */
-  public function testCRUD() {
+  public function testCRUD(): void {
     $default_langcode = \Drupal::languageManager()->getDefaultLanguage()->getId();
     // Verify default properties on a newly created empty entity.
     $storage = \Drupal::entityTypeManager()->getStorage('config_test');
@@ -227,7 +227,7 @@ public function testCRUD() {
   /**
    * Tests CRUD operations through the UI.
    */
-  public function testCrudUi() {
+  public function testCrudUi(): void {
     $this->drupalLogin($this->drupalCreateUser([
       'administer site configuration',
     ]));
diff --git a/core/modules/config/tests/src/Functional/ConfigExportImportUITest.php b/core/modules/config/tests/src/Functional/ConfigExportImportUITest.php
index b4935da7a078..013b2e7a2645 100644
--- a/core/modules/config/tests/src/Functional/ConfigExportImportUITest.php
+++ b/core/modules/config/tests/src/Functional/ConfigExportImportUITest.php
@@ -96,7 +96,7 @@ protected function setUp(): void {
   /**
    * Tests a simple site export import case.
    */
-  public function testExportImport() {
+  public function testExportImport(): void {
     // After installation there is no snapshot and nothing to import.
     $this->drupalGet('admin/config/development/configuration');
     $this->assertSession()->pageTextNotContains('Warning message');
@@ -224,7 +224,7 @@ public function testExportImport() {
   /**
    * Tests an export and import of collections.
    */
-  public function testExportImportCollections() {
+  public function testExportImportCollections(): void {
 
     /** @var \Drupal\Core\Config\StorageInterface $active_storage */
     $active_storage = \Drupal::service('config.storage');
diff --git a/core/modules/config/tests/src/Functional/ConfigExportUITest.php b/core/modules/config/tests/src/Functional/ConfigExportUITest.php
index 6a2cdc55bd72..9a25e1117139 100644
--- a/core/modules/config/tests/src/Functional/ConfigExportUITest.php
+++ b/core/modules/config/tests/src/Functional/ConfigExportUITest.php
@@ -47,7 +47,7 @@ protected function setUp(): void {
   /**
    * Tests export of configuration.
    */
-  public function testExport() {
+  public function testExport(): void {
     // Verify the export page with export submit button is available.
     $this->drupalGet('admin/config/development/configuration/full/export');
     $this->assertSession()->buttonExists('Export');
diff --git a/core/modules/config/tests/src/Functional/ConfigFormOverrideTest.php b/core/modules/config/tests/src/Functional/ConfigFormOverrideTest.php
index 273874c2c704..5459f18d8b89 100644
--- a/core/modules/config/tests/src/Functional/ConfigFormOverrideTest.php
+++ b/core/modules/config/tests/src/Functional/ConfigFormOverrideTest.php
@@ -22,7 +22,7 @@ class ConfigFormOverrideTest extends BrowserTestBase {
   /**
    * Tests that overrides do not affect forms.
    */
-  public function testFormsWithOverrides() {
+  public function testFormsWithOverrides(): void {
     $this->drupalLogin($this->drupalCreateUser([
       'access administration pages',
       'administer site configuration',
diff --git a/core/modules/config/tests/src/Functional/ConfigImportAllTest.php b/core/modules/config/tests/src/Functional/ConfigImportAllTest.php
index 8b574c83807d..9fa9c5ab2363 100644
--- a/core/modules/config/tests/src/Functional/ConfigImportAllTest.php
+++ b/core/modules/config/tests/src/Functional/ConfigImportAllTest.php
@@ -60,7 +60,7 @@ protected function setUp(): void {
   /**
    * Tests that a fixed set of modules can be installed and uninstalled.
    */
-  public function testInstallUninstall() {
+  public function testInstallUninstall(): void {
 
     // Get a list of modules to enable.
     $all_modules = $this->container->get('extension.list.module')->getList();
diff --git a/core/modules/config/tests/src/Functional/ConfigImportInstallProfileTest.php b/core/modules/config/tests/src/Functional/ConfigImportInstallProfileTest.php
index 67b3f93e5207..0ec7fa40525d 100644
--- a/core/modules/config/tests/src/Functional/ConfigImportInstallProfileTest.php
+++ b/core/modules/config/tests/src/Functional/ConfigImportInstallProfileTest.php
@@ -58,7 +58,7 @@ protected function setUp(): void {
    *
    * @see \Drupal\Core\EventSubscriber\ConfigImportSubscriber
    */
-  public function testInstallProfileValidation() {
+  public function testInstallProfileValidation(): void {
     $sync = $this->container->get('config.storage.sync');
     $this->copyConfig($this->container->get('config.storage'), $sync);
     $core = $sync->read('core.extension');
diff --git a/core/modules/config/tests/src/Functional/ConfigImportUITest.php b/core/modules/config/tests/src/Functional/ConfigImportUITest.php
index 9e54269460cf..68a911e0ff11 100644
--- a/core/modules/config/tests/src/Functional/ConfigImportUITest.php
+++ b/core/modules/config/tests/src/Functional/ConfigImportUITest.php
@@ -55,7 +55,7 @@ protected function setUp(): void {
   /**
    * Tests importing configuration.
    */
-  public function testImport() {
+  public function testImport(): void {
     $name = 'system.site';
     $dynamic_name = 'config_test.dynamic.new';
     /** @var \Drupal\Core\Config\StorageInterface $sync */
@@ -240,7 +240,7 @@ public function testImport() {
   /**
    * Tests concurrent importing of configuration.
    */
-  public function testImportLock() {
+  public function testImportLock(): void {
     // Create updated configuration object.
     $new_site_name = 'Config import test ' . $this->randomString();
     $this->prepareSiteNameUpdate($new_site_name);
@@ -267,7 +267,7 @@ public function testImportLock() {
   /**
    * Tests verification of site UUID before importing configuration.
    */
-  public function testImportSiteUuidValidation() {
+  public function testImportSiteUuidValidation(): void {
     $sync = \Drupal::service('config.storage.sync');
     // Create updated configuration object.
     $config_data = $this->config('system.site')->get();
@@ -284,7 +284,7 @@ public function testImportSiteUuidValidation() {
   /**
    * Tests the screen that shows differences between active and sync.
    */
-  public function testImportDiff() {
+  public function testImportDiff(): void {
     $sync = $this->container->get('config.storage.sync');
     $config_name = 'config_test.system';
     $change_key = 'foo';
@@ -360,7 +360,7 @@ public function testImportDiff() {
   /**
    * Tests that multiple validation errors are listed on the page.
    */
-  public function testImportValidation() {
+  public function testImportValidation(): void {
     // Set state value so that
     // \Drupal\config_import_test\EventSubscriber::onConfigImportValidate() logs
     // validation errors.
@@ -382,7 +382,7 @@ public function testImportValidation() {
     $this->assertNotEquals($this->config('system.site')->get('name'), $new_site_name);
   }
 
-  public function testConfigUninstallConfigException() {
+  public function testConfigUninstallConfigException(): void {
     $sync = $this->container->get('config.storage.sync');
 
     $core_extension = $this->config('core.extension')->get();
@@ -408,7 +408,7 @@ public function prepareSiteNameUpdate($new_site_name) {
   /**
    * Tests an import that results in an error.
    */
-  public function testImportErrorLog() {
+  public function testImportErrorLog(): void {
     $name_primary = 'config_test.dynamic.primary';
     $name_secondary = 'config_test.dynamic.secondary';
     $sync = $this->container->get('config.storage.sync');
@@ -462,7 +462,7 @@ public function testImportErrorLog() {
    *
    * @see \Drupal\Core\Entity\Event\BundleConfigImportValidate
    */
-  public function testEntityBundleDelete() {
+  public function testEntityBundleDelete(): void {
     \Drupal::service('module_installer')->install(['node']);
     $this->copyConfig($this->container->get('config.storage'), $this->container->get('config.storage.sync'));
 
@@ -506,7 +506,7 @@ public function testEntityBundleDelete() {
    *
    * @see \Drupal\Core\EventSubscriber\ConfigImportSubscriber
    */
-  public function testExtensionValidation() {
+  public function testExtensionValidation(): void {
     \Drupal::service('module_installer')->install(['node']);
     \Drupal::service('theme_installer')->install(['test_subtheme']);
     $this->rebuildContainer();
@@ -539,7 +539,7 @@ public function testExtensionValidation() {
   /**
    * Tests that errors set in the batch and on the ConfigImporter are merged.
    */
-  public function testBatchErrors() {
+  public function testBatchErrors(): void {
     $new_site_name = 'Config import test ' . $this->randomString();
     $this->prepareSiteNameUpdate($new_site_name);
     \Drupal::state()->set('config_import_steps_alter.error', TRUE);
diff --git a/core/modules/config/tests/src/Functional/ConfigImportUploadTest.php b/core/modules/config/tests/src/Functional/ConfigImportUploadTest.php
index 81840bcdc9e6..064a9c0b2f14 100644
--- a/core/modules/config/tests/src/Functional/ConfigImportUploadTest.php
+++ b/core/modules/config/tests/src/Functional/ConfigImportUploadTest.php
@@ -49,7 +49,7 @@ protected function setUp(): void {
   /**
    * Tests importing configuration.
    */
-  public function testImport() {
+  public function testImport(): void {
     // Verify access to the config upload form.
     $this->drupalGet('admin/config/development/configuration/full/import');
     $this->assertSession()->statusCodeEquals(200);
diff --git a/core/modules/config/tests/src/Functional/ConfigInstallProfileOverrideTest.php b/core/modules/config/tests/src/Functional/ConfigInstallProfileOverrideTest.php
index 6419facb2906..1bf53507e128 100644
--- a/core/modules/config/tests/src/Functional/ConfigInstallProfileOverrideTest.php
+++ b/core/modules/config/tests/src/Functional/ConfigInstallProfileOverrideTest.php
@@ -38,7 +38,7 @@ class ConfigInstallProfileOverrideTest extends BrowserTestBase {
   /**
    * Tests install profile config changes.
    */
-  public function testInstallProfileConfigOverwrite() {
+  public function testInstallProfileConfigOverwrite(): void {
     $config_name = 'system.cron';
     // The expected configuration from the system module.
     $expected_original_data = [
diff --git a/core/modules/config/tests/src/Functional/ConfigInstallProfileUnmetDependenciesTest.php b/core/modules/config/tests/src/Functional/ConfigInstallProfileUnmetDependenciesTest.php
index 001cc527b212..df839d0ff1d9 100644
--- a/core/modules/config/tests/src/Functional/ConfigInstallProfileUnmetDependenciesTest.php
+++ b/core/modules/config/tests/src/Functional/ConfigInstallProfileUnmetDependenciesTest.php
@@ -96,7 +96,7 @@ protected function copyTestingOverrides() {
   /**
    * Confirms that the installation succeeded.
    */
-  public function testInstalled() {
+  public function testInstalled(): void {
     if ($this->expectedException) {
       $this->assertStringContainsString('Configuration objects provided by <em class="placeholder">testing_config_overrides</em> have unmet dependencies: <em class="placeholder">system.action.user_block_user_action (does_not_exist)</em>', $this->expectedException->getMessage());
       $this->assertStringContainsString('Drupal\Core\Config\UnmetDependenciesException', $this->expectedException->getMessage());
diff --git a/core/modules/config/tests/src/Functional/ConfigInstallWebTest.php b/core/modules/config/tests/src/Functional/ConfigInstallWebTest.php
index ec2b92ea0ffb..00b6f4b56c2d 100644
--- a/core/modules/config/tests/src/Functional/ConfigInstallWebTest.php
+++ b/core/modules/config/tests/src/Functional/ConfigInstallWebTest.php
@@ -55,7 +55,7 @@ protected function setUp(): void {
   /**
    * Tests module re-installation.
    */
-  public function testIntegrationModuleReinstallation() {
+  public function testIntegrationModuleReinstallation(): void {
     $default_config = 'config_integration_test.settings';
     $default_configuration_entity = 'config_test.dynamic.config_integration_test';
 
@@ -135,7 +135,7 @@ public function testIntegrationModuleReinstallation() {
   /**
    * Tests pre-existing configuration detection.
    */
-  public function testPreExistingConfigInstall() {
+  public function testPreExistingConfigInstall(): void {
     $this->drupalLogin($this->adminUser);
 
     // Try to install config_install_fail_test and config_test. Doing this
@@ -201,7 +201,7 @@ public function testPreExistingConfigInstall() {
   /**
    * Tests unmet dependencies detection.
    */
-  public function testUnmetDependenciesInstall() {
+  public function testUnmetDependenciesInstall(): void {
     $this->drupalLogin($this->adminUser);
     // We need to install separately since config_install_dependency_test does
     // not depend on config_test and order is important.
@@ -228,7 +228,7 @@ public function testUnmetDependenciesInstall() {
   /**
    * Tests config_requirements().
    */
-  public function testConfigModuleRequirements() {
+  public function testConfigModuleRequirements(): void {
     $this->drupalLogin($this->adminUser);
     $this->drupalGet('admin/modules');
     $this->submitForm(['modules[config][enable]' => TRUE], 'Install');
diff --git a/core/modules/config/tests/src/Functional/ConfigLanguageOverrideWebTest.php b/core/modules/config/tests/src/Functional/ConfigLanguageOverrideWebTest.php
index eeff36568c78..1b6594abd9b4 100644
--- a/core/modules/config/tests/src/Functional/ConfigLanguageOverrideWebTest.php
+++ b/core/modules/config/tests/src/Functional/ConfigLanguageOverrideWebTest.php
@@ -41,7 +41,7 @@ protected function setUp(): void {
   /**
    * Tests translating the site name.
    */
-  public function testSiteNameTranslation() {
+  public function testSiteNameTranslation(): void {
     $adminUser = $this->drupalCreateUser([
       'administer site configuration',
       'administer languages',
diff --git a/core/modules/config/tests/src/Functional/ConfigSingleImportExportTest.php b/core/modules/config/tests/src/Functional/ConfigSingleImportExportTest.php
index ea00319cfb50..8423fc5fb368 100644
--- a/core/modules/config/tests/src/Functional/ConfigSingleImportExportTest.php
+++ b/core/modules/config/tests/src/Functional/ConfigSingleImportExportTest.php
@@ -45,7 +45,7 @@ protected function setUp(): void {
   /**
    * Tests importing a single configuration file.
    */
-  public function testImport() {
+  public function testImport(): void {
     $storage = \Drupal::entityTypeManager()->getStorage('config_test');
     $uuid = \Drupal::service('uuid');
 
@@ -200,7 +200,7 @@ public function testImport() {
   /**
    * Tests importing a simple configuration file.
    */
-  public function testImportSimpleConfiguration() {
+  public function testImportSimpleConfiguration(): void {
     $this->drupalLogin($this->drupalCreateUser(['import configuration']));
     $config = $this->config('system.site')->set('name', 'Test simple import');
 
@@ -243,7 +243,7 @@ public function testImportSimpleConfiguration() {
   /**
    * Tests exporting a single configuration file.
    */
-  public function testExport() {
+  public function testExport(): void {
     $this->drupalLogin($this->drupalCreateUser(['export configuration']));
 
     // Verify that the simple configuration option is selected when specified
diff --git a/core/modules/config/tests/src/Functional/LanguageNegotiationFormOverrideTest.php b/core/modules/config/tests/src/Functional/LanguageNegotiationFormOverrideTest.php
index 188dda24597c..931902a4db87 100644
--- a/core/modules/config/tests/src/Functional/LanguageNegotiationFormOverrideTest.php
+++ b/core/modules/config/tests/src/Functional/LanguageNegotiationFormOverrideTest.php
@@ -27,7 +27,7 @@ class LanguageNegotiationFormOverrideTest extends BrowserTestBase {
   /**
    * Tests that overrides do not affect language-negotiation form values.
    */
-  public function testFormWithOverride() {
+  public function testFormWithOverride(): void {
     $this->drupalLogin($this->drupalCreateUser([
       'access administration pages',
       'administer site configuration',
diff --git a/core/modules/config/tests/src/Functional/SchemaConfigListenerWebTest.php b/core/modules/config/tests/src/Functional/SchemaConfigListenerWebTest.php
index a8d8840d6082..1ed96822155f 100644
--- a/core/modules/config/tests/src/Functional/SchemaConfigListenerWebTest.php
+++ b/core/modules/config/tests/src/Functional/SchemaConfigListenerWebTest.php
@@ -27,7 +27,7 @@ class SchemaConfigListenerWebTest extends BrowserTestBase {
   /**
    * Tests \Drupal\Core\Config\Development\ConfigSchemaChecker.
    */
-  public function testConfigSchemaChecker() {
+  public function testConfigSchemaChecker(): void {
     $this->drupalLogin($this->drupalCreateUser(['administer site configuration']));
 
     // Test a non-existing schema.
diff --git a/core/modules/config/tests/src/Functional/TransformedConfigExportImportUITest.php b/core/modules/config/tests/src/Functional/TransformedConfigExportImportUITest.php
index cba8b6b429ed..3456df0f153d 100644
--- a/core/modules/config/tests/src/Functional/TransformedConfigExportImportUITest.php
+++ b/core/modules/config/tests/src/Functional/TransformedConfigExportImportUITest.php
@@ -48,7 +48,7 @@ protected function setUp(): void {
   /**
    * Tests a simple site export import case.
    */
-  public function testTransformedExportImport() {
+  public function testTransformedExportImport(): void {
     // After installation there is no snapshot but a new site name.
     $this->drupalGet('admin/config/development/configuration');
     $this->assertSession()->pageTextNotContains('Warning message');
diff --git a/core/modules/config/tests/src/FunctionalJavascript/ConfigEntityTest.php b/core/modules/config/tests/src/FunctionalJavascript/ConfigEntityTest.php
index 9de2bbe8b674..612a654bcf55 100644
--- a/core/modules/config/tests/src/FunctionalJavascript/ConfigEntityTest.php
+++ b/core/modules/config/tests/src/FunctionalJavascript/ConfigEntityTest.php
@@ -26,7 +26,7 @@ class ConfigEntityTest extends WebDriverTestBase {
   /**
    * Tests ajax operations through the UI on 'Add' page.
    */
-  public function testAjaxOnAddPage() {
+  public function testAjaxOnAddPage(): void {
     $this->drupalLogin($this->drupalCreateUser([
       'administer site configuration',
     ]));
diff --git a/core/modules/config/tests/src/FunctionalJavascript/ConfigExportTest.php b/core/modules/config/tests/src/FunctionalJavascript/ConfigExportTest.php
index ae1c582348f3..aacee5065b01 100644
--- a/core/modules/config/tests/src/FunctionalJavascript/ConfigExportTest.php
+++ b/core/modules/config/tests/src/FunctionalJavascript/ConfigExportTest.php
@@ -78,7 +78,7 @@ protected function createBlockContent($title) {
   /**
    * Tests Ajax form functionality on the config export page.
    */
-  public function testAjaxOnExportPage() {
+  public function testAjaxOnExportPage(): void {
     $this->drupalLogin($this->drupalCreateUser([
       'export configuration',
       'administer blocks',
diff --git a/core/modules/config/tests/src/Kernel/ConfigUninstallViaCliImportTest.php b/core/modules/config/tests/src/Kernel/ConfigUninstallViaCliImportTest.php
index 96b79b22f64f..51be5dbc64b2 100644
--- a/core/modules/config/tests/src/Kernel/ConfigUninstallViaCliImportTest.php
+++ b/core/modules/config/tests/src/Kernel/ConfigUninstallViaCliImportTest.php
@@ -65,7 +65,7 @@ protected function setUp(): void {
    *
    * @see \Drupal\config\ConfigSubscriber
    */
-  public function testConfigUninstallViaCli() {
+  public function testConfigUninstallViaCli(): void {
     $this->assertTrue($this->container->get('module_handler')->moduleExists('config'));
     $sync = $this->container->get('config.storage.sync');
     $extensions = $sync->read('core.extension');
diff --git a/core/modules/config/tests/src/Unit/Menu/ConfigLocalTasksTest.php b/core/modules/config/tests/src/Unit/Menu/ConfigLocalTasksTest.php
index 753f949776d8..99248e5f72bf 100644
--- a/core/modules/config/tests/src/Unit/Menu/ConfigLocalTasksTest.php
+++ b/core/modules/config/tests/src/Unit/Menu/ConfigLocalTasksTest.php
@@ -26,7 +26,7 @@ protected function setUp(): void {
    *
    * @dataProvider getConfigAdminRoutes
    */
-  public function testConfigAdminLocalTasks($route, $expected) {
+  public function testConfigAdminLocalTasks($route, $expected): void {
     $this->assertLocalTasks($route, $expected);
   }
 
diff --git a/core/modules/config_translation/tests/src/Functional/ConfigTranslationCacheTest.php b/core/modules/config_translation/tests/src/Functional/ConfigTranslationCacheTest.php
index 4c16afa7657f..f1818b5cae93 100644
--- a/core/modules/config_translation/tests/src/Functional/ConfigTranslationCacheTest.php
+++ b/core/modules/config_translation/tests/src/Functional/ConfigTranslationCacheTest.php
@@ -121,7 +121,7 @@ protected function setUp(): void {
   /**
    * Tests the translation of field and field storage configuration.
    */
-  public function testFieldConfigTranslation() {
+  public function testFieldConfigTranslation(): void {
     // Add a test field which has a translatable field setting and a
     // translatable field storage setting.
     $field_name = $this->randomMachineName();
diff --git a/core/modules/config_translation/tests/src/Functional/ConfigTranslationDateFormatUiTest.php b/core/modules/config_translation/tests/src/Functional/ConfigTranslationDateFormatUiTest.php
index 64ab57fe5d37..021fe1f17363 100644
--- a/core/modules/config_translation/tests/src/Functional/ConfigTranslationDateFormatUiTest.php
+++ b/core/modules/config_translation/tests/src/Functional/ConfigTranslationDateFormatUiTest.php
@@ -47,7 +47,7 @@ protected function setUp(): void {
   /**
    * Tests date format translation behavior.
    */
-  public function testDateFormatUI() {
+  public function testDateFormatUI(): void {
     $this->drupalGet('admin/config/regional/date-time');
 
     // Assert translation link unlocked date format.
@@ -68,7 +68,7 @@ public function testDateFormatUI() {
   /**
    * Tests date format translation.
    */
-  public function testDateFormatTranslation() {
+  public function testDateFormatTranslation(): void {
 
     $this->drupalGet('admin/config/regional/date-time');
 
diff --git a/core/modules/config_translation/tests/src/Functional/ConfigTranslationInstallTest.php b/core/modules/config_translation/tests/src/Functional/ConfigTranslationInstallTest.php
index 23e9d1e6872b..5f454f6dacb3 100644
--- a/core/modules/config_translation/tests/src/Functional/ConfigTranslationInstallTest.php
+++ b/core/modules/config_translation/tests/src/Functional/ConfigTranslationInstallTest.php
@@ -64,7 +64,7 @@ protected function getPo($langcode) {
 PO;
   }
 
-  public function testConfigTranslation() {
+  public function testConfigTranslation(): void {
     \Drupal::service('module_installer')->install(['node', 'field_ui']);
     $this->createContentType(['type' => 'article']);
 
diff --git a/core/modules/config_translation/tests/src/Functional/ConfigTranslationListUiTest.php b/core/modules/config_translation/tests/src/Functional/ConfigTranslationListUiTest.php
index 0cb1ede702e8..f9cbbf370afb 100644
--- a/core/modules/config_translation/tests/src/Functional/ConfigTranslationListUiTest.php
+++ b/core/modules/config_translation/tests/src/Functional/ConfigTranslationListUiTest.php
@@ -495,7 +495,7 @@ public function doSettingsPageTest($link) {
   /**
    * Tests if translate link is added to operations in all configuration lists.
    */
-  public function testTranslateOperationInListUi() {
+  public function testTranslateOperationInListUi(): void {
     // All lists based on paths provided by the module.
     $this->doBlockListTest();
     $this->doMenuListTest();
diff --git a/core/modules/config_translation/tests/src/Functional/ConfigTranslationOverviewTest.php b/core/modules/config_translation/tests/src/Functional/ConfigTranslationOverviewTest.php
index 1854e19d562f..ed082d4a6a9f 100644
--- a/core/modules/config_translation/tests/src/Functional/ConfigTranslationOverviewTest.php
+++ b/core/modules/config_translation/tests/src/Functional/ConfigTranslationOverviewTest.php
@@ -85,7 +85,7 @@ protected function setUp(): void {
   /**
    * Tests the config translation mapper page.
    */
-  public function testMapperListPage() {
+  public function testMapperListPage(): void {
     $this->drupalGet('admin/config/regional/config-translation');
     $this->assertSession()->linkByHrefExists('admin/config/regional/config-translation/config_test');
     $this->assertSession()->linkByHrefExists('admin/config/people/accounts/translate');
@@ -138,7 +138,7 @@ public function testMapperListPage() {
   /**
    * Tests availability of hidden entities in the translation overview.
    */
-  public function testHiddenEntities() {
+  public function testHiddenEntities(): void {
     // Hidden languages are only available to translate through the
     // configuration translation listings.
     $this->drupalGet('admin/config/regional/config-translation/configurable_language');
@@ -159,7 +159,7 @@ public function testHiddenEntities() {
   /**
    * Tests that overrides do not affect listing screens.
    */
-  public function testListingPageWithOverrides() {
+  public function testListingPageWithOverrides(): void {
     $original_label = 'Default';
     $overridden_label = 'Overridden label';
 
@@ -184,7 +184,7 @@ public function testListingPageWithOverrides() {
   /**
    * Tests the field listing for the translate operation.
    */
-  public function testListingFieldsPage() {
+  public function testListingFieldsPage(): void {
     // Create a content type.
     $node_type = NodeType::create([
       'type' => 'basic',
diff --git a/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiModulesTest.php b/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiModulesTest.php
index e821698c3b5c..b27453b8fb3a 100644
--- a/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiModulesTest.php
+++ b/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiModulesTest.php
@@ -23,7 +23,7 @@ class ConfigTranslationUiModulesTest extends ConfigTranslationUiTestBase {
   /**
    * Tests the contact form translation.
    */
-  public function testContactConfigEntityTranslation() {
+  public function testContactConfigEntityTranslation(): void {
     $this->drupalLogin($this->adminUser);
 
     $this->drupalGet('admin/structure/contact');
@@ -161,7 +161,7 @@ public function testContactConfigEntityTranslation() {
   /**
    * Tests the views translation interface.
    */
-  public function testViewsTranslationUI() {
+  public function testViewsTranslationUI(): void {
     $this->drupalLogin($this->adminUser);
 
     $description = 'All content promoted to the front page.';
@@ -207,7 +207,7 @@ public function testViewsTranslationUI() {
   /**
    * Tests the translation of field and field storage configuration.
    */
-  public function testFieldConfigTranslation() {
+  public function testFieldConfigTranslation(): void {
     // Add a test field which has a translatable field setting and a
     // translatable field storage setting.
     $field_name = $this->randomMachineName();
@@ -247,7 +247,7 @@ public function testFieldConfigTranslation() {
   /**
    * Tests the translation of a boolean field settings.
    */
-  public function testBooleanFieldConfigTranslation() {
+  public function testBooleanFieldConfigTranslation(): void {
     // Add a test boolean field.
     $field_name = $this->randomMachineName();
     FieldStorageConfig::create([
@@ -287,7 +287,7 @@ public function testBooleanFieldConfigTranslation() {
   /**
    * Tests text_format translation.
    */
-  public function testTextFormatTranslation() {
+  public function testTextFormatTranslation(): void {
     $this->drupalLogin($this->adminUser);
     /** @var \Drupal\Core\Config\ConfigFactoryInterface $config_factory */
     $config_factory = $this->container->get('config.factory');
@@ -383,7 +383,7 @@ public function testTextFormatTranslation() {
   /**
    * Tests field translation for node fields.
    */
-  public function testNodeFieldTranslation() {
+  public function testNodeFieldTranslation(): void {
     NodeType::create(['type' => 'article', 'name' => 'Article'])->save();
 
     $field_name = 'translatable_field';
@@ -422,7 +422,7 @@ public function testNodeFieldTranslation() {
   /**
    * Test translation save confirmation message.
    */
-  public function testMenuTranslationWithoutChange() {
+  public function testMenuTranslationWithoutChange(): void {
     $this->drupalLogin($this->adminUser);
     $this->drupalGet('admin/structure/menu/manage/main/translate/tyv/add');
     $this->submitForm([], 'Save translation');
diff --git a/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiSiteInformationTest.php b/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiSiteInformationTest.php
index 469bf3aab985..bc24521bb0a8 100644
--- a/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiSiteInformationTest.php
+++ b/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiSiteInformationTest.php
@@ -16,7 +16,7 @@ class ConfigTranslationUiSiteInformationTest extends ConfigTranslationUiTestBase
   /**
    * Tests the site information translation interface.
    */
-  public function testSiteInformationTranslationUi() {
+  public function testSiteInformationTranslationUi(): void {
     $this->drupalLogin($this->adminUser);
 
     $site_name = 'Name of the site for testing configuration translation';
@@ -121,7 +121,7 @@ public function testSiteInformationTranslationUi() {
   /**
    * Tests the site information translation interface.
    */
-  public function testSourceValueDuplicateSave() {
+  public function testSourceValueDuplicateSave(): void {
     $this->drupalLogin($this->adminUser);
 
     $site_name = 'Site name for testing configuration translation';
diff --git a/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiTest.php b/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiTest.php
index 936ecda1f1d9..ed2bf54955bc 100644
--- a/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiTest.php
+++ b/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiTest.php
@@ -24,7 +24,7 @@ class ConfigTranslationUiTest extends ConfigTranslationUiTestBase {
    * names involved building up one configuration translation form. Test that
    * the translations are saved for all configuration names properly.
    */
-  public function testAccountSettingsConfigurationTranslation() {
+  public function testAccountSettingsConfigurationTranslation(): void {
     $this->drupalLogin($this->adminUser);
 
     $this->drupalGet('admin/config/people/accounts');
@@ -58,7 +58,7 @@ public function testAccountSettingsConfigurationTranslation() {
   /**
    * Tests source and target language edge cases.
    */
-  public function testSourceAndTargetLanguage() {
+  public function testSourceAndTargetLanguage(): void {
     $this->drupalLogin($this->adminUser);
 
     // Loading translation page for not-specified language (und)
@@ -104,7 +104,7 @@ public function testSourceAndTargetLanguage() {
   /**
    * Tests plural source elements in configuration translation forms.
    */
-  public function testPluralConfigStringsSourceElements() {
+  public function testPluralConfigStringsSourceElements(): void {
     $this->drupalLogin($this->adminUser);
 
     // Languages to test, with various number of plural forms.
@@ -148,7 +148,7 @@ public function testPluralConfigStringsSourceElements() {
   /**
    * Tests translation of plural strings with multiple plural forms in config.
    */
-  public function testPluralConfigStrings() {
+  public function testPluralConfigStrings(): void {
     $this->drupalLogin($this->adminUser);
 
     // First import a .po file with multiple plural forms.
@@ -197,7 +197,7 @@ public function testPluralConfigStrings() {
   /**
    * Tests translation storage in locale storage.
    */
-  public function testLocaleDBStorage() {
+  public function testLocaleDBStorage(): void {
     // Enable import of translations. By default this is disabled for automated
     // tests.
     $this->config('locale.settings')
@@ -249,7 +249,7 @@ public function testLocaleDBStorage() {
   /**
    * Tests the single language existing.
    */
-  public function testSingleLanguageUI() {
+  public function testSingleLanguageUI(): void {
     $this->drupalLogin($this->adminUser);
 
     // Delete French language
@@ -279,7 +279,7 @@ public function testSingleLanguageUI() {
   /**
    * Tests the config_translation_info_alter() hook.
    */
-  public function testAlterInfo() {
+  public function testAlterInfo(): void {
     $this->drupalLogin($this->adminUser);
 
     $this->container->get('state')->set('config_translation_test_config_translation_info_alter', TRUE);
@@ -295,7 +295,7 @@ public function testAlterInfo() {
   /**
    * Tests the sequence data type translation.
    */
-  public function testSequenceTranslation() {
+  public function testSequenceTranslation(): void {
     $this->drupalLogin($this->adminUser);
     /** @var \Drupal\Core\Config\ConfigFactoryInterface $config_factory */
     $config_factory = $this->container->get('config.factory');
diff --git a/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiThemeTest.php b/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiThemeTest.php
index 041954fb11b1..611e4f7e4197 100644
--- a/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiThemeTest.php
+++ b/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiThemeTest.php
@@ -67,7 +67,7 @@ protected function setUp(): void {
   /**
    * Tests that theme provided *.config_translation.yml files are found.
    */
-  public function testThemeDiscovery() {
+  public function testThemeDiscovery(): void {
     // Install the test theme and rebuild routes.
     $theme = 'config_translation_test_theme';
 
diff --git a/core/modules/config_translation/tests/src/Functional/ConfigTranslationViewListUiTest.php b/core/modules/config_translation/tests/src/Functional/ConfigTranslationViewListUiTest.php
index 35783204a072..a79c5ed92c93 100644
--- a/core/modules/config_translation/tests/src/Functional/ConfigTranslationViewListUiTest.php
+++ b/core/modules/config_translation/tests/src/Functional/ConfigTranslationViewListUiTest.php
@@ -56,7 +56,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['views_test_conf
   /**
    * Tests views_ui list to see if translate link is added to operations.
    */
-  public function testTranslateOperationInViewListUi() {
+  public function testTranslateOperationInViewListUi(): void {
     // Views UI List 'admin/structure/views'.
     $this->drupalGet('admin/structure/views');
     $translate_link = 'admin/structure/views/view/test_view/translate';
@@ -74,7 +74,7 @@ public function testTranslateOperationInViewListUi() {
   /**
    * Test to ensure that TimestampFormatter translation works.
    */
-  public function testTimestampFormatterTranslation() {
+  public function testTimestampFormatterTranslation(): void {
     ConfigurableLanguage::createFromLangcode('de')->save();
 
     $this->drupalCreateContentType(['type' => 'article']);
diff --git a/core/modules/config_translation/tests/src/FunctionalJavascript/ConfigTranslationUiTest.php b/core/modules/config_translation/tests/src/FunctionalJavascript/ConfigTranslationUiTest.php
index f80528a0770f..5d8b08bc54d6 100644
--- a/core/modules/config_translation/tests/src/FunctionalJavascript/ConfigTranslationUiTest.php
+++ b/core/modules/config_translation/tests/src/FunctionalJavascript/ConfigTranslationUiTest.php
@@ -33,7 +33,7 @@ class ConfigTranslationUiTest extends WebDriverTestBase {
   /**
    * Tests that contextual link related to views.
    */
-  public function testViewContextualLink() {
+  public function testViewContextualLink(): void {
     $user = $this->drupalCreateUser([
       'translate configuration',
       'access contextual links',
@@ -49,7 +49,7 @@ public function testViewContextualLink() {
   /**
    * Tests that the add, edit and delete operations open in a modal.
    */
-  public function testConfigTranslationDialog() {
+  public function testConfigTranslationDialog(): void {
     $page = $this->getSession()->getPage();
     ConfigurableLanguage::createFromLangcode('fi')->save();
 
diff --git a/core/modules/config_translation/tests/src/Kernel/ConfigMapperTest.php b/core/modules/config_translation/tests/src/Kernel/ConfigMapperTest.php
index d720074e4e20..20dd11311f59 100644
--- a/core/modules/config_translation/tests/src/Kernel/ConfigMapperTest.php
+++ b/core/modules/config_translation/tests/src/Kernel/ConfigMapperTest.php
@@ -29,7 +29,7 @@ class ConfigMapperTest extends KernelTestBase {
   /**
    * Tests adding config names to mapper.
    */
-  public function testAddingConfigNames() {
+  public function testAddingConfigNames(): void {
     // Get a config names mapper.
     $mappers = \Drupal::service('plugin.manager.config_translation.mapper')->getMappers();
     $mapper = $mappers['system.site_information_settings'];
diff --git a/core/modules/config_translation/tests/src/Kernel/ConfigTranslationFormTest.php b/core/modules/config_translation/tests/src/Kernel/ConfigTranslationFormTest.php
index 09d3585c913a..17d8b2d09481 100644
--- a/core/modules/config_translation/tests/src/Kernel/ConfigTranslationFormTest.php
+++ b/core/modules/config_translation/tests/src/Kernel/ConfigTranslationFormTest.php
@@ -29,7 +29,7 @@ class ConfigTranslationFormTest extends KernelTestBase {
   /**
    * Tests altering of the configuration translation forms.
    */
-  public function testConfigTranslationFormAlter() {
+  public function testConfigTranslationFormAlter(): void {
     $this->installConfig(['config_translation_test']);
 
     $definitions = $this->container->get('plugin.manager.config_translation.mapper')->getDefinitions();
diff --git a/core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateSystemMaintenanceTranslationTest.php b/core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateSystemMaintenanceTranslationTest.php
index 698361fdf7a3..1c6c8a852b42 100644
--- a/core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateSystemMaintenanceTranslationTest.php
+++ b/core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateSystemMaintenanceTranslationTest.php
@@ -33,7 +33,7 @@ protected function setUp(): void {
   /**
    * Tests migration of system variables to system.maintenance.yml.
    */
-  public function testSystemMaintenance() {
+  public function testSystemMaintenance(): void {
     $config = \Drupal::service('language_manager')->getLanguageConfigOverride('fr', 'system.maintenance');
     $this->assertSame('fr - Drupal is currently under maintenance. We should be back shortly. Thank you for your patience.', $config->get('message'));
   }
diff --git a/core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateSystemSiteTranslationTest.php b/core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateSystemSiteTranslationTest.php
index a820aaf2c436..64e67ad63fcd 100644
--- a/core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateSystemSiteTranslationTest.php
+++ b/core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateSystemSiteTranslationTest.php
@@ -33,7 +33,7 @@ protected function setUp(): void {
   /**
    * Tests migration of system (site) variables to system.site.yml.
    */
-  public function testSystemSite() {
+  public function testSystemSite(): void {
     $config_translation = \Drupal::service('language_manager')->getLanguageConfigOverride('fr', 'system.site');
     $this->assertSame('fr site name', $config_translation->get('name'));
     $this->assertSame('fr_site_mail@example.com', $config_translation->get('mail'));
diff --git a/core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateUserConfigsTranslationTest.php b/core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateUserConfigsTranslationTest.php
index 4077f42abf42..c18edc10f1da 100644
--- a/core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateUserConfigsTranslationTest.php
+++ b/core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateUserConfigsTranslationTest.php
@@ -41,7 +41,7 @@ protected function setUp(): void {
   /**
    * Tests migration of i18n user variables to user.mail.yml.
    */
-  public function testUserMail() {
+  public function testUserMail(): void {
     $config = \Drupal::service('language_manager')->getLanguageConfigOverride('fr', 'user.mail');
     $this->assertSame('fr - Account details for [user:name] at [site:name] (approved)', $config->get('status_activated.subject'));
     $this->assertSame("fr - [user:name],\r\n\r\nYour account at [site:name] has been activated.\r\n\r\nYou may now log in by clicking on this link or copying and pasting it in your browser:\r\n\r\n[user:one-time-login-url]\r\n\r\nThis is a one-time login, so it can be used only once.\r\n\r\nAfter logging in, you will be redirected to [user:edit-url] so you can change your password.\r\n\r\nOnce you have set your own password, you will be able to log in to [site:login-url] in the future using:\r\n\r\nusername: [user:name]\r\n", $config->get('status_activated.body'));
diff --git a/core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateUserProfileFieldInstanceTranslationTest.php b/core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateUserProfileFieldInstanceTranslationTest.php
index 95ad8077e5f1..2132a129c79a 100644
--- a/core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateUserProfileFieldInstanceTranslationTest.php
+++ b/core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateUserProfileFieldInstanceTranslationTest.php
@@ -26,7 +26,7 @@ class MigrateUserProfileFieldInstanceTranslationTest extends MigrateDrupal6TestB
   /**
    * Tests migration of translated user profile fields.
    */
-  public function testUserProfileFields() {
+  public function testUserProfileFields(): void {
     $this->executeMigrations([
       'language',
       'user_profile_field',
diff --git a/core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateUserProfileTranslationRollbackTest.php b/core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateUserProfileTranslationRollbackTest.php
index 2eed9d6ea6d7..e9783463fe90 100644
--- a/core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateUserProfileTranslationRollbackTest.php
+++ b/core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateUserProfileTranslationRollbackTest.php
@@ -27,7 +27,7 @@ class MigrateUserProfileTranslationRollbackTest extends MigrateDrupal6TestBase {
   /**
    * Tests rollback of the complete node migration.
    */
-  public function testRollback() {
+  public function testRollback(): void {
     $migration_ids = [
       'user_profile_field',
       'd6_profile_field_option_translation',
diff --git a/core/modules/config_translation/tests/src/Kernel/Migrate/d7/MigrateSystemMaintenanceTranslationTest.php b/core/modules/config_translation/tests/src/Kernel/Migrate/d7/MigrateSystemMaintenanceTranslationTest.php
index 6d12e1dab52d..d0fc20ddbaf5 100644
--- a/core/modules/config_translation/tests/src/Kernel/Migrate/d7/MigrateSystemMaintenanceTranslationTest.php
+++ b/core/modules/config_translation/tests/src/Kernel/Migrate/d7/MigrateSystemMaintenanceTranslationTest.php
@@ -33,7 +33,7 @@ protected function setUp(): void {
   /**
    * Tests migrations of i18n maintenance variable.
    */
-  public function testSystemMaintenance() {
+  public function testSystemMaintenance(): void {
     $config = \Drupal::service('language_manager')->getLanguageConfigOverride('is', 'system.maintenance');
     $this->assertSame('is - This is a custom maintenance mode message.', $config->get('message'));
   }
diff --git a/core/modules/config_translation/tests/src/Kernel/Migrate/d7/MigrateSystemSiteTranslationTest.php b/core/modules/config_translation/tests/src/Kernel/Migrate/d7/MigrateSystemSiteTranslationTest.php
index 520941afc227..0b4d427094d1 100644
--- a/core/modules/config_translation/tests/src/Kernel/Migrate/d7/MigrateSystemSiteTranslationTest.php
+++ b/core/modules/config_translation/tests/src/Kernel/Migrate/d7/MigrateSystemSiteTranslationTest.php
@@ -36,7 +36,7 @@ protected function setUp(): void {
   /**
    * Tests migration of system (site) variables to system.site.yml.
    */
-  public function testSystemSite() {
+  public function testSystemSite(): void {
     $language_manager = \Drupal::service('language_manager');
     $config_translation = $language_manager->getLanguageConfigOverride('fr', 'system.site');
     $this->assertSame('The Site Name', $config_translation->get('name'));
diff --git a/core/modules/config_translation/tests/src/Kernel/Migrate/d7/MigrateUserConfigsTranslationTest.php b/core/modules/config_translation/tests/src/Kernel/Migrate/d7/MigrateUserConfigsTranslationTest.php
index c487f96879e8..3d68f0d06570 100644
--- a/core/modules/config_translation/tests/src/Kernel/Migrate/d7/MigrateUserConfigsTranslationTest.php
+++ b/core/modules/config_translation/tests/src/Kernel/Migrate/d7/MigrateUserConfigsTranslationTest.php
@@ -47,7 +47,7 @@ protected function setUp(): void {
   /**
    * Tests migration of i18n user variables to user.mail and user.settings.
    */
-  public function testUserConfig() {
+  public function testUserConfig(): void {
     // Tests migration of i18n user variables to user.mail.yml.
     $language_manager = \Drupal::service('language_manager');
     $config = $language_manager->getLanguageConfigOverride('is', 'user.mail');
diff --git a/core/modules/config_translation/tests/src/Unit/ConfigEntityMapperTest.php b/core/modules/config_translation/tests/src/Unit/ConfigEntityMapperTest.php
index 39b4f2a90bed..3889274b885e 100644
--- a/core/modules/config_translation/tests/src/Unit/ConfigEntityMapperTest.php
+++ b/core/modules/config_translation/tests/src/Unit/ConfigEntityMapperTest.php
@@ -113,7 +113,7 @@ protected function setUp(): void {
   /**
    * Tests ConfigEntityMapper::setEntity() and ConfigEntityMapper::getEntity().
    */
-  public function testEntityGetterAndSetter() {
+  public function testEntityGetterAndSetter(): void {
     $this->entity
       ->expects($this->once())
       ->method('id')
@@ -152,7 +152,7 @@ public function testEntityGetterAndSetter() {
   /**
    * Tests ConfigEntityMapper::getOverviewRouteParameters().
    */
-  public function testGetOverviewRouteParameters() {
+  public function testGetOverviewRouteParameters(): void {
     $entity_type = $this->createMock('Drupal\Core\Config\Entity\ConfigEntityTypeInterface');
     $this->entityTypeManager
       ->expects($this->once())
@@ -175,7 +175,7 @@ public function testGetOverviewRouteParameters() {
   /**
    * Tests ConfigEntityMapper::getType().
    */
-  public function testGetType() {
+  public function testGetType(): void {
     $result = $this->configEntityMapper->getType();
     $this->assertSame('configurable_language', $result);
   }
@@ -183,7 +183,7 @@ public function testGetType() {
   /**
    * Tests ConfigEntityMapper::getTypeName().
    */
-  public function testGetTypeName() {
+  public function testGetTypeName(): void {
     $entity_type = $this->createMock('Drupal\Core\Config\Entity\ConfigEntityTypeInterface');
     $entity_type->expects($this->once())
       ->method('getLabel')
@@ -201,7 +201,7 @@ public function testGetTypeName() {
   /**
    * Tests ConfigEntityMapper::getTypeLabel().
    */
-  public function testGetTypeLabel() {
+  public function testGetTypeLabel(): void {
     $entity_type = $this->createMock('Drupal\Core\Config\Entity\ConfigEntityTypeInterface');
     $entity_type->expects($this->once())
       ->method('getLabel')
@@ -219,7 +219,7 @@ public function testGetTypeLabel() {
   /**
    * Tests ConfigEntityMapper::getOperations().
    */
-  public function testGetOperations() {
+  public function testGetOperations(): void {
     $result = $this->configEntityMapper->getOperations();
 
     $expected = [
diff --git a/core/modules/config_translation/tests/src/Unit/ConfigFieldMapperTest.php b/core/modules/config_translation/tests/src/Unit/ConfigFieldMapperTest.php
index 35fc7a10f201..481bc708ce37 100644
--- a/core/modules/config_translation/tests/src/Unit/ConfigFieldMapperTest.php
+++ b/core/modules/config_translation/tests/src/Unit/ConfigFieldMapperTest.php
@@ -87,7 +87,7 @@ protected function setUp(): void {
    *
    * @covers ::setEntity
    */
-  public function testSetEntity() {
+  public function testSetEntity(): void {
     $entity_type = $this->createMock('Drupal\Core\Config\Entity\ConfigEntityTypeInterface');
     $entity_type
       ->expects($this->any())
diff --git a/core/modules/config_translation/tests/src/Unit/ConfigMapperManagerTest.php b/core/modules/config_translation/tests/src/Unit/ConfigMapperManagerTest.php
index 81d55a2d5796..149fecb7fa89 100644
--- a/core/modules/config_translation/tests/src/Unit/ConfigMapperManagerTest.php
+++ b/core/modules/config_translation/tests/src/Unit/ConfigMapperManagerTest.php
@@ -72,7 +72,7 @@ protected function setUp(): void {
    *
    * @dataProvider providerTestHasTranslatable
    */
-  public function testHasTranslatable(TypedDataInterface $element, $expected) {
+  public function testHasTranslatable(TypedDataInterface $element, $expected): void {
     $this->typedConfigManager
       ->expects($this->once())
       ->method('get')
diff --git a/core/modules/config_translation/tests/src/Unit/ConfigNamesMapperTest.php b/core/modules/config_translation/tests/src/Unit/ConfigNamesMapperTest.php
index 2eaa4a14d72b..d20ac0d49272 100644
--- a/core/modules/config_translation/tests/src/Unit/ConfigNamesMapperTest.php
+++ b/core/modules/config_translation/tests/src/Unit/ConfigNamesMapperTest.php
@@ -150,7 +150,7 @@ protected function setUp(): void {
   /**
    * Tests ConfigNamesMapper::getTitle().
    */
-  public function testGetTitle() {
+  public function testGetTitle(): void {
     $result = $this->configNamesMapper->getTitle();
     $this->assertSame($this->pluginDefinition['title'], (string) $result);
   }
@@ -158,7 +158,7 @@ public function testGetTitle() {
   /**
    * Tests ConfigNamesMapper::getBaseRouteName().
    */
-  public function testGetBaseRouteName() {
+  public function testGetBaseRouteName(): void {
     $result = $this->configNamesMapper->getBaseRouteName();
     $this->assertSame($this->pluginDefinition['base_route_name'], $result);
   }
@@ -166,7 +166,7 @@ public function testGetBaseRouteName() {
   /**
    * Tests ConfigNamesMapper::getBaseRouteParameters().
    */
-  public function testGetBaseRouteParameters() {
+  public function testGetBaseRouteParameters(): void {
     $result = $this->configNamesMapper->getBaseRouteParameters();
     $this->assertSame([], $result);
   }
@@ -174,7 +174,7 @@ public function testGetBaseRouteParameters() {
   /**
    * Tests ConfigNamesMapper::getBaseRoute().
    */
-  public function testGetBaseRoute() {
+  public function testGetBaseRoute(): void {
     $result = $this->configNamesMapper->getBaseRoute();
     $this->assertSame($this->baseRoute, $result);
   }
@@ -182,7 +182,7 @@ public function testGetBaseRoute() {
   /**
    * Tests ConfigNamesMapper::getBasePath().
    */
-  public function testGetBasePath() {
+  public function testGetBasePath(): void {
     $this->urlGenerator->expects($this->once())
       ->method('getPathFromRoute')
       ->with('system.site_information_settings', [])
@@ -194,7 +194,7 @@ public function testGetBasePath() {
   /**
    * Tests ConfigNamesMapper::getOverviewRouteName().
    */
-  public function testGetOverviewRouteName() {
+  public function testGetOverviewRouteName(): void {
     $result = $this->configNamesMapper->getOverviewRouteName();
     $expected = 'config_translation.item.overview.' . $this->pluginDefinition['base_route_name'];
     $this->assertSame($expected, $result);
@@ -203,7 +203,7 @@ public function testGetOverviewRouteName() {
   /**
    * Tests ConfigNamesMapper::getOverviewRouteParameters().
    */
-  public function testGetOverviewRouteParameters() {
+  public function testGetOverviewRouteParameters(): void {
     $result = $this->configNamesMapper->getOverviewRouteParameters();
     $this->assertSame([], $result);
   }
@@ -211,7 +211,7 @@ public function testGetOverviewRouteParameters() {
   /**
    * Tests ConfigNamesMapper::getOverviewRoute().
    */
-  public function testGetOverviewRoute() {
+  public function testGetOverviewRoute(): void {
     $expected = new Route('/admin/config/system/site-information/translate',
       [
         '_controller' => '\Drupal\config_translation\Controller\ConfigTranslationController::itemPage',
@@ -228,7 +228,7 @@ public function testGetOverviewRoute() {
   /**
    * Tests ConfigNamesMapper::getOverviewPath().
    */
-  public function testGetOverviewPath() {
+  public function testGetOverviewPath(): void {
     $this->urlGenerator->expects($this->once())
       ->method('getPathFromRoute')
       ->with('config_translation.item.overview.system.site_information_settings', [])
@@ -241,7 +241,7 @@ public function testGetOverviewPath() {
   /**
    * Tests ConfigNamesMapper::getAddRouteName().
    */
-  public function testGetAddRouteName() {
+  public function testGetAddRouteName(): void {
     $result = $this->configNamesMapper->getAddRouteName();
     $expected = 'config_translation.item.add.' . $this->pluginDefinition['base_route_name'];
     $this->assertSame($expected, $result);
@@ -250,7 +250,7 @@ public function testGetAddRouteName() {
   /**
    * Tests ConfigNamesMapper::getAddRouteParameters().
    */
-  public function testGetAddRouteParameters() {
+  public function testGetAddRouteParameters(): void {
     $route_match = new RouteMatch('example', new Route('/test/{langcode}'), ['langcode' => 'xx']);
     $this->configNamesMapper->populateFromRouteMatch($route_match);
 
@@ -262,7 +262,7 @@ public function testGetAddRouteParameters() {
   /**
    * Tests ConfigNamesMapper::getAddRoute().
    */
-  public function testGetAddRoute() {
+  public function testGetAddRoute(): void {
     $expected = new Route('/admin/config/system/site-information/translate/{langcode}/add',
       [
         '_form' => '\Drupal\config_translation\Form\ConfigTranslationAddForm',
@@ -279,7 +279,7 @@ public function testGetAddRoute() {
   /**
    * Tests ConfigNamesMapper::getEditRouteName().
    */
-  public function testGetEditRouteName() {
+  public function testGetEditRouteName(): void {
     $result = $this->configNamesMapper->getEditRouteName();
     $expected = 'config_translation.item.edit.' . $this->pluginDefinition['base_route_name'];
     $this->assertSame($expected, $result);
@@ -288,7 +288,7 @@ public function testGetEditRouteName() {
   /**
    * Tests ConfigNamesMapper::getEditRouteParameters().
    */
-  public function testGetEditRouteParameters() {
+  public function testGetEditRouteParameters(): void {
     $route_match = new RouteMatch('example', new Route('/test/{langcode}'), ['langcode' => 'xx']);
     $this->configNamesMapper->populateFromRouteMatch($route_match);
 
@@ -300,7 +300,7 @@ public function testGetEditRouteParameters() {
   /**
    * Tests ConfigNamesMapper::getEditRoute().
    */
-  public function testGetEditRoute() {
+  public function testGetEditRoute(): void {
     $expected = new Route('/admin/config/system/site-information/translate/{langcode}/edit',
       [
         '_form' => '\Drupal\config_translation\Form\ConfigTranslationEditForm',
@@ -317,7 +317,7 @@ public function testGetEditRoute() {
   /**
    * Tests ConfigNamesMapper::getDeleteRouteName().
    */
-  public function testGetDeleteRouteName() {
+  public function testGetDeleteRouteName(): void {
     $result = $this->configNamesMapper->getDeleteRouteName();
     $expected = 'config_translation.item.delete.' . $this->pluginDefinition['base_route_name'];
     $this->assertSame($expected, $result);
@@ -326,7 +326,7 @@ public function testGetDeleteRouteName() {
   /**
    * Tests ConfigNamesMapper::getDeleteRouteParameters().
    */
-  public function testGetDeleteRouteParameters() {
+  public function testGetDeleteRouteParameters(): void {
     $route_match = new RouteMatch('example', new Route('/test/{langcode}'), ['langcode' => 'xx']);
     $this->configNamesMapper->populateFromRouteMatch($route_match);
 
@@ -338,7 +338,7 @@ public function testGetDeleteRouteParameters() {
   /**
    * Tests ConfigNamesMapper::getRoute().
    */
-  public function testGetDeleteRoute() {
+  public function testGetDeleteRoute(): void {
     $expected = new Route('/admin/config/system/site-information/translate/{langcode}/delete',
       [
         '_form' => '\Drupal\config_translation\Form\ConfigTranslationDeleteForm',
@@ -355,7 +355,7 @@ public function testGetDeleteRoute() {
   /**
    * Tests ConfigNamesMapper::getConfigNames().
    */
-  public function testGetConfigNames() {
+  public function testGetConfigNames(): void {
     $result = $this->configNamesMapper->getConfigNames();
     $this->assertSame($this->pluginDefinition['names'], $result);
   }
@@ -363,7 +363,7 @@ public function testGetConfigNames() {
   /**
    * Tests ConfigNamesMapper::addConfigName().
    */
-  public function testAddConfigName() {
+  public function testAddConfigName(): void {
     $names = $this->configNamesMapper->getConfigNames();
     $this->configNamesMapper->addConfigName('test');
     $names[] = 'test';
@@ -374,7 +374,7 @@ public function testAddConfigName() {
   /**
    * Tests ConfigNamesMapper::getWeight().
    */
-  public function testGetWeight() {
+  public function testGetWeight(): void {
     $result = $this->configNamesMapper->getWeight();
     $this->assertSame($this->pluginDefinition['weight'], $result);
   }
@@ -382,7 +382,7 @@ public function testGetWeight() {
   /**
    * Tests ConfigNamesMapper::populateFromRouteMatch().
    */
-  public function testPopulateFromRouteMatch() {
+  public function testPopulateFromRouteMatch(): void {
     // Make sure the language code is not set initially.
     $this->assertNull($this->configNamesMapper->getInternalLangcode());
 
@@ -405,7 +405,7 @@ public function testPopulateFromRouteMatch() {
   /**
    * Tests ConfigNamesMapper::getTypeLabel().
    */
-  public function testGetTypeLabel() {
+  public function testGetTypeLabel(): void {
     $result = $this->configNamesMapper->getTypeLabel();
     $this->assertSame($this->pluginDefinition['title'], (string) $result);
   }
@@ -413,7 +413,7 @@ public function testGetTypeLabel() {
   /**
    * Tests ConfigNamesMapper::getLangcode().
    */
-  public function testGetLangcode() {
+  public function testGetLangcode(): void {
     // Test that the getLangcode() falls back to 'en', if no explicit language
     // code is provided.
     $config_factory = $this->getConfigFactoryStub([
@@ -460,7 +460,7 @@ public function testGetLangcode() {
   /**
    * Tests ConfigNamesMapper::getConfigData().
    */
-  public function testGetConfigData() {
+  public function testGetConfigData(): void {
     $configs = [
       'system.site' => [
         'name' => 'Drupal',
@@ -496,7 +496,7 @@ public function testGetConfigData() {
    *
    * @dataProvider providerTestHasSchema
    */
-  public function testHasSchema(array $mock_return_values, $expected) {
+  public function testHasSchema(array $mock_return_values, $expected): void {
     // As the configuration names are arbitrary, simply use integers.
     $config_names = range(1, count($mock_return_values));
     $this->configNamesMapper->setConfigNames($config_names);
@@ -543,7 +543,7 @@ public static function providerTestHasSchema() {
    *
    * @dataProvider providerTestHasTranslatable
    */
-  public function testHasTranslatable(array $mock_return_values, $expected) {
+  public function testHasTranslatable(array $mock_return_values, $expected): void {
     // As the configuration names are arbitrary, simply use integers.
     $config_names = range(1, count($mock_return_values));
     $this->configNamesMapper->setConfigNames($config_names);
@@ -592,7 +592,7 @@ public static function providerTestHasTranslatable() {
    *
    * @dataProvider providerTestHasTranslation
    */
-  public function testHasTranslation(array $mock_return_values, $expected) {
+  public function testHasTranslation(array $mock_return_values, $expected): void {
     $language = new Language();
 
     // As the configuration names are arbitrary, simply use integers.
@@ -634,7 +634,7 @@ public static function providerTestHasTranslation() {
   /**
    * Tests ConfigNamesMapper::getTypeName().
    */
-  public function testGetTypeName() {
+  public function testGetTypeName(): void {
     $result = $this->configNamesMapper->getTypeName();
     $this->assertSame('Settings', (string) $result);
   }
@@ -642,7 +642,7 @@ public function testGetTypeName() {
   /**
    * Tests ConfigNamesMapper::hasTranslation().
    */
-  public function testGetOperations() {
+  public function testGetOperations(): void {
     $expected = [
       'translate' => [
         'title' => 'Translate',
diff --git a/core/modules/contact/tests/src/Functional/ContactLanguageTest.php b/core/modules/contact/tests/src/Functional/ContactLanguageTest.php
index 54acd4eafcf7..a4a7d7c79f84 100644
--- a/core/modules/contact/tests/src/Functional/ContactLanguageTest.php
+++ b/core/modules/contact/tests/src/Functional/ContactLanguageTest.php
@@ -53,7 +53,7 @@ protected function setUp(): void {
   /**
    * Tests configuration options with language enabled.
    */
-  public function testContactLanguage() {
+  public function testContactLanguage(): void {
     // Ensure that contact form by default does not show the language select.
     $this->drupalGet('contact');
     $this->assertSession()->statusCodeEquals(200);
diff --git a/core/modules/contact/tests/src/Functional/ContactPersonalTest.php b/core/modules/contact/tests/src/Functional/ContactPersonalTest.php
index 0c2a91fe2dd3..2a4616b728b5 100644
--- a/core/modules/contact/tests/src/Functional/ContactPersonalTest.php
+++ b/core/modules/contact/tests/src/Functional/ContactPersonalTest.php
@@ -81,7 +81,7 @@ protected function setUp(): void {
   /**
    * Tests that mails for contact messages are correctly sent.
    */
-  public function testSendPersonalContactMessage() {
+  public function testSendPersonalContactMessage(): void {
     // Ensure that the web user's email needs escaping.
     $mail = $this->webUser->getAccountName() . '&escaped@example.com';
     $this->webUser->setEmail($mail)->save();
@@ -135,7 +135,7 @@ public function testSendPersonalContactMessage() {
   /**
    * Tests access to the personal contact form.
    */
-  public function testPersonalContactAccess() {
+  public function testPersonalContactAccess(): void {
     // Test allowed access to admin user's contact form.
     $this->drupalLogin($this->webUser);
     $this->drupalGet('user/' . $this->adminUser->id() . '/contact');
@@ -256,7 +256,7 @@ public function testPersonalContactAccess() {
   /**
    * Tests the personal contact form flood protection.
    */
-  public function testPersonalContactFlood() {
+  public function testPersonalContactFlood(): void {
     $flood_limit = 3;
     $this->config('contact.settings')->set('flood.limit', $flood_limit)->save();
 
@@ -283,7 +283,7 @@ public function testPersonalContactFlood() {
   /**
    * Tests the personal contact form based access when an admin adds users.
    */
-  public function testAdminContact() {
+  public function testAdminContact(): void {
     user_role_grant_permissions(RoleInterface::ANONYMOUS_ID, ['access user contact forms']);
     $this->checkContactAccess(200);
     $this->checkContactAccess(403, FALSE);
diff --git a/core/modules/contact/tests/src/Functional/ContactSitewideTest.php b/core/modules/contact/tests/src/Functional/ContactSitewideTest.php
index 378ee9284c67..09b56fae0364 100644
--- a/core/modules/contact/tests/src/Functional/ContactSitewideTest.php
+++ b/core/modules/contact/tests/src/Functional/ContactSitewideTest.php
@@ -59,7 +59,7 @@ protected function setUp(): void {
   /**
    * Tests configuration options and the site-wide contact form.
    */
-  public function testSiteWideContact() {
+  public function testSiteWideContact(): void {
     // Tests name and email fields for authenticated and anonymous users.
     $this->drupalLogin($this->drupalCreateUser([
       'access site-wide contact form',
@@ -440,7 +440,7 @@ public function testSiteWideContact() {
   /**
    * Tests auto-reply on the site-wide contact form.
    */
-  public function testAutoReply() {
+  public function testAutoReply(): void {
     // Create and log in administrative user.
     $admin_user = $this->drupalCreateUser([
       'access site-wide contact form',
diff --git a/core/modules/contact/tests/src/Functional/ContactStorageTest.php b/core/modules/contact/tests/src/Functional/ContactStorageTest.php
index bef5bfb9697f..65bc730f20b3 100644
--- a/core/modules/contact/tests/src/Functional/ContactStorageTest.php
+++ b/core/modules/contact/tests/src/Functional/ContactStorageTest.php
@@ -41,7 +41,7 @@ class ContactStorageTest extends ContactSitewideTest {
   /**
    * Tests configuration options and the site-wide contact form.
    */
-  public function testContactStorage() {
+  public function testContactStorage(): void {
     // Create and log in administrative user.
     $admin_user = $this->drupalCreateUser([
       'access site-wide contact form',
diff --git a/core/modules/contact/tests/src/Functional/Rest/MessageResourceTestBase.php b/core/modules/contact/tests/src/Functional/Rest/MessageResourceTestBase.php
index 096f993db8f7..d9fb6a5ad940 100644
--- a/core/modules/contact/tests/src/Functional/Rest/MessageResourceTestBase.php
+++ b/core/modules/contact/tests/src/Functional/Rest/MessageResourceTestBase.php
@@ -112,7 +112,7 @@ protected function getExpectedUnauthorizedAccessMessage($method) {
   /**
    * {@inheritdoc}
    */
-  public function testGet() {
+  public function testGet(): void {
     // Contact Message entities are not stored, so they cannot be retrieved.
     $this->expectException(RouteNotFoundException::class);
     $this->expectExceptionMessage('Route "rest.entity.contact_message.GET" does not exist.');
@@ -124,7 +124,7 @@ public function testGet() {
   /**
    * {@inheritdoc}
    */
-  public function testPatch() {
+  public function testPatch(): void {
     // Contact Message entities are not stored, so they cannot be modified.
     $this->expectException(RouteNotFoundException::class);
     $this->expectExceptionMessage('Route "rest.entity.contact_message.PATCH" does not exist.');
@@ -136,7 +136,7 @@ public function testPatch() {
   /**
    * {@inheritdoc}
    */
-  public function testDelete() {
+  public function testDelete(): void {
     // Contact Message entities are not stored, so they cannot be deleted.
     $this->expectException(RouteNotFoundException::class);
     $this->expectExceptionMessage('Route "rest.entity.contact_message.DELETE" does not exist.');
diff --git a/core/modules/contact/tests/src/Functional/Views/ContactLinkTest.php b/core/modules/contact/tests/src/Functional/Views/ContactLinkTest.php
index a08ff26bd1fc..294dd6495567 100644
--- a/core/modules/contact/tests/src/Functional/Views/ContactLinkTest.php
+++ b/core/modules/contact/tests/src/Functional/Views/ContactLinkTest.php
@@ -54,7 +54,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['contact_test_vi
   /**
    * Tests contact link.
    */
-  public function testContactLink() {
+  public function testContactLink(): void {
     $accounts = [];
     $accounts['root'] = User::load(1);
     // Create an account with access to all contact pages.
diff --git a/core/modules/contact/tests/src/Kernel/MessageEntityTest.php b/core/modules/contact/tests/src/Kernel/MessageEntityTest.php
index babf2b8f1e1b..164c4790e548 100644
--- a/core/modules/contact/tests/src/Kernel/MessageEntityTest.php
+++ b/core/modules/contact/tests/src/Kernel/MessageEntityTest.php
@@ -38,7 +38,7 @@ protected function setUp(): void {
   /**
    * Tests some of the methods.
    */
-  public function testMessageMethods() {
+  public function testMessageMethods(): void {
     $message_storage = $this->container->get('entity_type.manager')->getStorage('contact_message');
     $message = $message_storage->create(['contact_form' => 'feedback']);
 
diff --git a/core/modules/contact/tests/src/Kernel/Migrate/MigrateContactCategoryTest.php b/core/modules/contact/tests/src/Kernel/Migrate/MigrateContactCategoryTest.php
index 4cd886fb0d19..4ce64609d11a 100644
--- a/core/modules/contact/tests/src/Kernel/Migrate/MigrateContactCategoryTest.php
+++ b/core/modules/contact/tests/src/Kernel/Migrate/MigrateContactCategoryTest.php
@@ -59,7 +59,7 @@ protected function assertEntity(string $id, string $expected_label, array $expec
   /**
    * The Drupal 6 and 7 contact categories to Drupal 8 migration.
    */
-  public function testContactCategory() {
+  public function testContactCategory(): void {
     $this->assertEntity('website_feedback', 'Website feedback', ['admin@example.com'], '', 0);
     $this->assertEntity('some_other_category', 'Some other category', ['test@example.com'], 'Thanks for contacting us, we will reply ASAP!', 1);
     $this->assertEntity('a_category_much_longer_than_th', 'A category much longer than thirty two characters', ['fortyninechars@example.com'], '', 2);
diff --git a/core/modules/contact/tests/src/Kernel/Migrate/d6/MigrateContactSettingsTest.php b/core/modules/contact/tests/src/Kernel/Migrate/d6/MigrateContactSettingsTest.php
index 2653a9992515..4c8c1dcf0c4f 100644
--- a/core/modules/contact/tests/src/Kernel/Migrate/d6/MigrateContactSettingsTest.php
+++ b/core/modules/contact/tests/src/Kernel/Migrate/d6/MigrateContactSettingsTest.php
@@ -32,7 +32,7 @@ protected function setUp(): void {
   /**
    * Tests migration of contact variables to contact.settings.yml.
    */
-  public function testContactSettings() {
+  public function testContactSettings(): void {
     $config = $this->config('contact.settings');
     $this->assertTrue($config->get('user_default_enabled'));
     $this->assertSame(3, $config->get('flood.limit'));
diff --git a/core/modules/contact/tests/src/Kernel/Migrate/d7/MigrateContactSettingsTest.php b/core/modules/contact/tests/src/Kernel/Migrate/d7/MigrateContactSettingsTest.php
index 60a0286c686a..d7f515839f83 100644
--- a/core/modules/contact/tests/src/Kernel/Migrate/d7/MigrateContactSettingsTest.php
+++ b/core/modules/contact/tests/src/Kernel/Migrate/d7/MigrateContactSettingsTest.php
@@ -30,7 +30,7 @@ protected function setUp(): void {
   /**
    * Tests migration of Contact's variables to configuration.
    */
-  public function testContactSettings() {
+  public function testContactSettings(): void {
     $config = $this->config('contact.settings');
     $this->assertTrue($config->get('user_default_enabled'));
     $this->assertSame(33, $config->get('flood.limit'));
diff --git a/core/modules/contact/tests/src/Kernel/Views/ContactFieldsTest.php b/core/modules/contact/tests/src/Kernel/Views/ContactFieldsTest.php
index 4bdc00de4982..b444c7105d9a 100644
--- a/core/modules/contact/tests/src/Kernel/Views/ContactFieldsTest.php
+++ b/core/modules/contact/tests/src/Kernel/Views/ContactFieldsTest.php
@@ -31,7 +31,7 @@ class ContactFieldsTest extends KernelTestBase {
   /**
    * Tests the views data generation.
    */
-  public function testViewsData() {
+  public function testViewsData(): void {
     $this->installConfig(['contact']);
     FieldStorageConfig::create([
       'type' => 'text',
diff --git a/core/modules/contact/tests/src/Unit/MailHandlerTest.php b/core/modules/contact/tests/src/Unit/MailHandlerTest.php
index 6fbdff1d4dfd..139e0cd480aa 100644
--- a/core/modules/contact/tests/src/Unit/MailHandlerTest.php
+++ b/core/modules/contact/tests/src/Unit/MailHandlerTest.php
@@ -99,7 +99,7 @@ protected function setUp(): void {
    *
    * @covers ::sendMailMessages
    */
-  public function testInvalidRecipient() {
+  public function testInvalidRecipient(): void {
     $message = $this->createMock('\Drupal\contact\MessageInterface');
     $message->expects($this->once())
       ->method('isPersonal')
@@ -133,7 +133,7 @@ public function testInvalidRecipient() {
    *
    * @covers ::sendMailMessages
    */
-  public function testSendMailMessages(bool $anonymous, ?bool $auto_reply, bool $copy_sender, array $results) {
+  public function testSendMailMessages(bool $anonymous, ?bool $auto_reply, bool $copy_sender, array $results): void {
     if ($anonymous) {
       $message = $this->getAnonymousMockMessage(explode(', ', $results[0]['to']), $auto_reply, $copy_sender);
       $sender = $this->getMockSender();
diff --git a/core/modules/content_moderation/tests/src/Functional/ContentModerationWorkflowTypeTest.php b/core/modules/content_moderation/tests/src/Functional/ContentModerationWorkflowTypeTest.php
index 198fbab82785..57e685212572 100644
--- a/core/modules/content_moderation/tests/src/Functional/ContentModerationWorkflowTypeTest.php
+++ b/core/modules/content_moderation/tests/src/Functional/ContentModerationWorkflowTypeTest.php
@@ -43,7 +43,7 @@ protected function setUp(): void {
   /**
    * Tests creating a new workflow using the content moderation plugin.
    */
-  public function testNewWorkflow() {
+  public function testNewWorkflow(): void {
     $types[] = $this->createContentType();
     $types[] = $this->createContentType();
     $types[] = $this->createContentType();
diff --git a/core/modules/content_moderation/tests/src/Functional/DefaultModerationStateTest.php b/core/modules/content_moderation/tests/src/Functional/DefaultModerationStateTest.php
index 309526e7ec10..ab825c87c6b6 100644
--- a/core/modules/content_moderation/tests/src/Functional/DefaultModerationStateTest.php
+++ b/core/modules/content_moderation/tests/src/Functional/DefaultModerationStateTest.php
@@ -29,7 +29,7 @@ protected function setUp(): void {
   /**
    * Tests a workflow with a default moderation state set.
    */
-  public function testPublishedDefaultState() {
+  public function testPublishedDefaultState(): void {
     // Set the default moderation state to be "published".
     $this->drupalGet('admin/config/workflow/workflows/manage/' . $this->workflow->id());
     $this->submitForm(['type_settings[workflow_settings][default_moderation_state]' => 'published'], 'Save');
@@ -47,7 +47,7 @@ public function testPublishedDefaultState() {
   /**
    * Tests access to deleting the default state.
    */
-  public function testDeleteDefaultStateAccess() {
+  public function testDeleteDefaultStateAccess(): void {
     $this->drupalGet('admin/config/workflow/workflows/manage/editorial/state/archived/delete');
     $this->assertSession()->statusCodeEquals(200);
 
diff --git a/core/modules/content_moderation/tests/src/Functional/LayoutBuilderContentModerationIntegrationTest.php b/core/modules/content_moderation/tests/src/Functional/LayoutBuilderContentModerationIntegrationTest.php
index 075c9ac697eb..8d523fa40636 100644
--- a/core/modules/content_moderation/tests/src/Functional/LayoutBuilderContentModerationIntegrationTest.php
+++ b/core/modules/content_moderation/tests/src/Functional/LayoutBuilderContentModerationIntegrationTest.php
@@ -96,7 +96,7 @@ protected function setUp(): void {
   /**
    * Tests that Layout changes are respected by Content Moderation.
    */
-  public function testLayoutModeration() {
+  public function testLayoutModeration(): void {
     $page = $this->getSession()->getPage();
     $assert_session = $this->assertSession();
 
@@ -169,7 +169,7 @@ public function testLayoutModeration() {
   /**
    * Test placing inline blocks that belong to a moderated content block bundle.
    */
-  public function testModeratedInlineBlockBundles() {
+  public function testModeratedInlineBlockBundles(): void {
     $page = $this->getSession()->getPage();
     $assert_session = $this->assertSession();
 
diff --git a/core/modules/content_moderation/tests/src/Functional/ModeratedContentLocalTaskTest.php b/core/modules/content_moderation/tests/src/Functional/ModeratedContentLocalTaskTest.php
index dfdb166f1b4f..48f097a30614 100644
--- a/core/modules/content_moderation/tests/src/Functional/ModeratedContentLocalTaskTest.php
+++ b/core/modules/content_moderation/tests/src/Functional/ModeratedContentLocalTaskTest.php
@@ -52,7 +52,7 @@ protected function setUp(): void {
   /**
    * Tests the moderated content local task appears.
    */
-  public function testModeratedContentLocalTask() {
+  public function testModeratedContentLocalTask(): void {
     $this->drupalLogin($this->adminUser);
 
     // Verify the moderated content tab exists.
diff --git a/core/modules/content_moderation/tests/src/Functional/ModeratedContentViewTest.php b/core/modules/content_moderation/tests/src/Functional/ModeratedContentViewTest.php
index e829f0bb510c..25cbff3e9486 100644
--- a/core/modules/content_moderation/tests/src/Functional/ModeratedContentViewTest.php
+++ b/core/modules/content_moderation/tests/src/Functional/ModeratedContentViewTest.php
@@ -67,7 +67,7 @@ protected function setUp(): void {
   /**
    * Tests the moderated content page.
    */
-  public function testModeratedContentPage() {
+  public function testModeratedContentPage(): void {
     $assert_session = $this->assertSession();
     $this->drupalLogin($this->adminUser);
 
@@ -151,7 +151,7 @@ public function testModeratedContentPage() {
   /**
    * Tests the moderated content page with multilingual content.
    */
-  public function testModeratedContentPageMultilingual() {
+  public function testModeratedContentPageMultilingual(): void {
     ConfigurableLanguage::createFromLangcode('fr')->save();
 
     $node = $this->drupalCreateNode([
diff --git a/core/modules/content_moderation/tests/src/Functional/ModerationActionsTest.php b/core/modules/content_moderation/tests/src/Functional/ModerationActionsTest.php
index 7cd22de0b518..340c08e7a956 100644
--- a/core/modules/content_moderation/tests/src/Functional/ModerationActionsTest.php
+++ b/core/modules/content_moderation/tests/src/Functional/ModerationActionsTest.php
@@ -63,7 +63,7 @@ protected function setUp(): void {
    *
    * @dataProvider nodeStatusActionsTestCases
    */
-  public function testNodeStatusActions($action, $bundle, $warning_appears, $starting_status, $final_status) {
+  public function testNodeStatusActions($action, $bundle, $warning_appears, $starting_status, $final_status): void {
     // Create and run an action on a node.
     $node = Node::create([
       'type' => $bundle,
diff --git a/core/modules/content_moderation/tests/src/Functional/ModerationContentTranslationTest.php b/core/modules/content_moderation/tests/src/Functional/ModerationContentTranslationTest.php
index fe0fd22454f4..aa62fd7a79e1 100644
--- a/core/modules/content_moderation/tests/src/Functional/ModerationContentTranslationTest.php
+++ b/core/modules/content_moderation/tests/src/Functional/ModerationContentTranslationTest.php
@@ -68,7 +68,7 @@ protected function setUp(): void {
   /**
    * Tests existing translations being edited after enabling content moderation.
    */
-  public function testModerationWithExistingContent() {
+  public function testModerationWithExistingContent(): void {
     // Create a published article in English.
     $edit = [
       'title[0][value]' => 'Published English node',
diff --git a/core/modules/content_moderation/tests/src/Functional/ModerationFormTest.php b/core/modules/content_moderation/tests/src/Functional/ModerationFormTest.php
index d84d3f97c446..a265feb7f1ba 100644
--- a/core/modules/content_moderation/tests/src/Functional/ModerationFormTest.php
+++ b/core/modules/content_moderation/tests/src/Functional/ModerationFormTest.php
@@ -61,7 +61,7 @@ protected function setUp(): void {
    * @see \Drupal\content_moderation\EntityOperations
    * @see \Drupal\Tests\content_moderation\Functional\ModerationStateBlockTest::testCustomBlockModeration
    */
-  public function testModerationForm() {
+  public function testModerationForm(): void {
     // Test the states that appear by default when creating a new item of
     // content.
     $this->drupalGet('node/add/moderated_content');
@@ -198,7 +198,7 @@ public function testModerationForm() {
   /**
    * Tests moderation non-bundle entity type.
    */
-  public function testNonBundleModerationForm() {
+  public function testNonBundleModerationForm(): void {
     $this->drupalLogin($this->rootUser);
     $this->workflow->getTypePlugin()->addEntityTypeAndBundle('entity_test_mulrevpub', 'entity_test_mulrevpub');
     $this->workflow->save();
@@ -266,7 +266,7 @@ public function testNonBundleModerationForm() {
   /**
    * Tests the revision author is updated when the moderation form is used.
    */
-  public function testModerationFormSetsRevisionAuthor() {
+  public function testModerationFormSetsRevisionAuthor(): void {
     // Create new moderated content in published.
     $node = $this->createNode(['type' => 'moderated_content', 'moderation_state' => 'published']);
     // Make a pending revision.
@@ -292,7 +292,7 @@ public function testModerationFormSetsRevisionAuthor() {
   /**
    * Tests translated and moderated nodes.
    */
-  public function testContentTranslationNodeForm() {
+  public function testContentTranslationNodeForm(): void {
     $this->drupalLogin($this->rootUser);
 
     // Add French language.
@@ -493,7 +493,7 @@ public function testContentTranslationNodeForm() {
   /**
    * Tests the moderation_state field when an alternative widget is set.
    */
-  public function testAlternativeModerationStateWidget() {
+  public function testAlternativeModerationStateWidget(): void {
     $entity_form_display = EntityFormDisplay::load('node.moderated_content.default');
     $entity_form_display->setComponent('moderation_state', [
       'type' => 'string_textfield',
@@ -514,7 +514,7 @@ public function testAlternativeModerationStateWidget() {
    * @covers \Drupal\content_moderation\Plugin\WorkflowType\ContentModeration::workflowHasData
    * @covers \Drupal\content_moderation\Plugin\WorkflowType\ContentModeration::workflowStateHasData
    */
-  public function testWorkflowInUse() {
+  public function testWorkflowInUse(): void {
     $user = $this->createUser([
       'administer workflows',
       'create moderated_content content',
diff --git a/core/modules/content_moderation/tests/src/Functional/ModerationLocaleTest.php b/core/modules/content_moderation/tests/src/Functional/ModerationLocaleTest.php
index d4bce6246029..206433a99526 100644
--- a/core/modules/content_moderation/tests/src/Functional/ModerationLocaleTest.php
+++ b/core/modules/content_moderation/tests/src/Functional/ModerationLocaleTest.php
@@ -68,7 +68,7 @@ protected function setUp(): void {
   /**
    * Tests article translations can be moderated separately.
    */
-  public function testTranslateModeratedContent() {
+  public function testTranslateModeratedContent(): void {
     // Create a published article in English.
     $edit = [
       'title[0][value]' => 'Published English node',
@@ -218,7 +218,7 @@ public function testTranslateModeratedContent() {
   /**
    * Tests that individual translations can be moderated independently.
    */
-  public function testLanguageIndependentContentModeration() {
+  public function testLanguageIndependentContentModeration(): void {
     // Create a published article in English (revision 1).
     $this->drupalGet('node/add/article');
     $node = $this->submitNodeForm('Test 1.1 EN', 'published');
@@ -415,7 +415,7 @@ public function testLanguageIndependentContentModeration() {
   /**
    * Checks that new translation values are populated properly.
    */
-  public function testNewTranslationSourceValues() {
+  public function testNewTranslationSourceValues(): void {
     // Create a published article in Italian (revision 1).
     $this->drupalGet('node/add/article');
     $node = $this->submitNodeForm('Test 1.1 IT', 'published', TRUE, 'it');
@@ -452,7 +452,7 @@ public function testNewTranslationSourceValues() {
   /**
    * Tests article revision history shows revisions for the correct translation.
    */
-  public function testTranslationRevisionsHistory() {
+  public function testTranslationRevisionsHistory(): void {
     // Create a published article in English.
     $edit = [
       'title[0][value]' => 'English node',
diff --git a/core/modules/content_moderation/tests/src/Functional/ModerationRevisionRevertTest.php b/core/modules/content_moderation/tests/src/Functional/ModerationRevisionRevertTest.php
index b5d9026ef1d8..b7823c02357a 100644
--- a/core/modules/content_moderation/tests/src/Functional/ModerationRevisionRevertTest.php
+++ b/core/modules/content_moderation/tests/src/Functional/ModerationRevisionRevertTest.php
@@ -64,7 +64,7 @@ protected function setUp(): void {
   /**
    * Tests that reverting a revision works.
    */
-  public function testEditingAfterRevertRevision() {
+  public function testEditingAfterRevertRevision(): void {
     // Create a draft.
     $this->drupalGet('node/add/moderated_bundle');
     $this->submitForm([
diff --git a/core/modules/content_moderation/tests/src/Functional/ModerationStateAccessTest.php b/core/modules/content_moderation/tests/src/Functional/ModerationStateAccessTest.php
index 0fe50084a508..d8f435116e09 100644
--- a/core/modules/content_moderation/tests/src/Functional/ModerationStateAccessTest.php
+++ b/core/modules/content_moderation/tests/src/Functional/ModerationStateAccessTest.php
@@ -53,7 +53,7 @@ protected function setUp(): void {
   /**
    * Tests the view operation access handler with the view permission.
    */
-  public function testViewShowsCorrectStates() {
+  public function testViewShowsCorrectStates(): void {
     $permissions = [
       'access content',
       'view all revisions',
diff --git a/core/modules/content_moderation/tests/src/Functional/ModerationStateBlockTest.php b/core/modules/content_moderation/tests/src/Functional/ModerationStateBlockTest.php
index 34b03ed22ff5..5880df23bd67 100644
--- a/core/modules/content_moderation/tests/src/Functional/ModerationStateBlockTest.php
+++ b/core/modules/content_moderation/tests/src/Functional/ModerationStateBlockTest.php
@@ -63,7 +63,7 @@ protected function setUp(): void {
    * @see \Drupal\content_moderation\EntityOperations::entityPresave
    * @see \Drupal\content_moderation\Tests\ModerationFormTest::testModerationForm
    */
-  public function testCustomBlockModeration() {
+  public function testCustomBlockModeration(): void {
     $this->drupalLogin($this->rootUser);
 
     // Enable moderation for content blocks.
diff --git a/core/modules/content_moderation/tests/src/Functional/ModerationStateNodeTest.php b/core/modules/content_moderation/tests/src/Functional/ModerationStateNodeTest.php
index f5296310aad0..f403f8b244e7 100644
--- a/core/modules/content_moderation/tests/src/Functional/ModerationStateNodeTest.php
+++ b/core/modules/content_moderation/tests/src/Functional/ModerationStateNodeTest.php
@@ -33,7 +33,7 @@ protected function setUp(): void {
   /**
    * Tests creating and deleting content.
    */
-  public function testCreatingContent() {
+  public function testCreatingContent(): void {
     $this->drupalGet('node/add/moderated_content');
     $this->submitForm([
       'title[0][value]' => 'moderated content',
@@ -86,7 +86,7 @@ public function testCreatingContent() {
   /**
    * Tests edit form destinations.
    */
-  public function testFormSaveDestination() {
+  public function testFormSaveDestination(): void {
     // Create new moderated content in draft.
     $this->drupalGet('node/add/moderated_content');
     $this->submitForm([
@@ -137,7 +137,7 @@ public function testFormSaveDestination() {
   /**
    * Tests pagers aren't broken by content_moderation.
    */
-  public function testPagers() {
+  public function testPagers(): void {
     // Create 51 nodes to force the pager.
     foreach (range(1, 51) as $delta) {
       Node::create([
@@ -160,7 +160,7 @@ public function testPagers() {
   /**
    * Tests the workflow when a user has no Content Moderation permissions.
    */
-  public function testNoContentModerationPermissions() {
+  public function testNoContentModerationPermissions(): void {
     $session_assert = $this->assertSession();
 
     // Create a user with quite advanced node permissions but no content
diff --git a/core/modules/content_moderation/tests/src/Functional/ModerationStateNodeTypeTest.php b/core/modules/content_moderation/tests/src/Functional/ModerationStateNodeTypeTest.php
index 4c12134eebf0..de2a87168e44 100644
--- a/core/modules/content_moderation/tests/src/Functional/ModerationStateNodeTypeTest.php
+++ b/core/modules/content_moderation/tests/src/Functional/ModerationStateNodeTypeTest.php
@@ -23,7 +23,7 @@ class ModerationStateNodeTypeTest extends ModerationStateTestBase {
    * @covers \Drupal\content_moderation\EntityTypeInfo::formAlter
    * @covers \Drupal\content_moderation\Entity\Handler\NodeModerationHandler::enforceRevisionsBundleFormAlter
    */
-  public function testNotModerated() {
+  public function testNotModerated(): void {
     $this->drupalLogin($this->adminUser);
     $this->createContentTypeFromUi('Not moderated', 'not_moderated');
     $this->assertSession()->pageTextContains('The content type Not moderated has been added.');
@@ -42,7 +42,7 @@ public function testNotModerated() {
    * @covers \Drupal\content_moderation\EntityTypeInfo::formAlter
    * @covers \Drupal\content_moderation\Entity\Handler\NodeModerationHandler::enforceRevisionsBundleFormAlter
    */
-  public function testEnablingOnExistingContent() {
+  public function testEnablingOnExistingContent(): void {
     $editor_permissions = [
       'administer workflows',
       'access administration pages',
@@ -108,7 +108,7 @@ public function testEnablingOnExistingContent() {
   /**
    * @covers \Drupal\content_moderation\Entity\Handler\NodeModerationHandler::enforceRevisionsBundleFormAlter
    */
-  public function testEnforceRevisionsEntityFormAlter() {
+  public function testEnforceRevisionsEntityFormAlter(): void {
     $this->drupalLogin($this->adminUser);
     $this->createContentTypeFromUi('Moderated', 'moderated');
 
diff --git a/core/modules/content_moderation/tests/src/Functional/NodeAccessTest.php b/core/modules/content_moderation/tests/src/Functional/NodeAccessTest.php
index 2cdb1144f3ed..ddbca36e3e3d 100644
--- a/core/modules/content_moderation/tests/src/Functional/NodeAccessTest.php
+++ b/core/modules/content_moderation/tests/src/Functional/NodeAccessTest.php
@@ -72,7 +72,7 @@ protected function setUp(): void {
   /**
    * Verifies that a non-admin user can still access the appropriate pages.
    */
-  public function testPageAccess() {
+  public function testPageAccess(): void {
     // Initially disable access grant records in
     // node_access_test_node_access_records().
     \Drupal::state()->set('node_access_test.private', TRUE);
diff --git a/core/modules/content_moderation/tests/src/Functional/ViewsModerationStateFilterTest.php b/core/modules/content_moderation/tests/src/Functional/ViewsModerationStateFilterTest.php
index ab3948c61c29..fd86154bf8f0 100644
--- a/core/modules/content_moderation/tests/src/Functional/ViewsModerationStateFilterTest.php
+++ b/core/modules/content_moderation/tests/src/Functional/ViewsModerationStateFilterTest.php
@@ -85,7 +85,7 @@ protected function setUp($import_test_views = TRUE, $modules = []): void {
    * @covers ::calculateDependencies
    * @covers ::onDependencyRemoval
    */
-  public function testModerationStateFilterDependencyHandling() {
+  public function testModerationStateFilterDependencyHandling(): void {
     // First, check that the view doesn't have any config dependency when there
     // are no states configured in the filter.
     $view_id = 'test_content_moderation_state_filter_base_table';
@@ -170,7 +170,7 @@ public function loadViewUnchanged($view_id) {
    *
    * @dataProvider providerTestWorkflowChanges
    */
-  public function testWorkflowChanges($view_id) {
+  public function testWorkflowChanges($view_id): void {
     // First, apply the Editorial workflow to both of our content types.
     $this->drupalGet('admin/config/workflow/workflows/manage/editorial/type/node');
     $this->submitForm([
@@ -277,7 +277,7 @@ public static function providerTestWorkflowChanges() {
   /**
    * Tests the content moderation state filter caching is correct.
    */
-  public function testFilterRenderCache() {
+  public function testFilterRenderCache(): void {
     // Initially all states of the workflow are displayed.
     $this->drupalGet('admin/config/workflow/workflows/manage/editorial/type/node');
     $this->submitForm(['bundles[example_a]' => TRUE], 'Save');
diff --git a/core/modules/content_moderation/tests/src/Functional/WorkspaceContentModerationIntegrationTest.php b/core/modules/content_moderation/tests/src/Functional/WorkspaceContentModerationIntegrationTest.php
index bb47a4e89e11..5829390ecc6b 100644
--- a/core/modules/content_moderation/tests/src/Functional/WorkspaceContentModerationIntegrationTest.php
+++ b/core/modules/content_moderation/tests/src/Functional/WorkspaceContentModerationIntegrationTest.php
@@ -52,7 +52,7 @@ protected function setUp(): void {
   /**
    * Tests moderating nodes in a workspace.
    */
-  public function testModerationInWorkspace() {
+  public function testModerationInWorkspace(): void {
     $stage = Workspace::load('stage');
     $this->switchToWorkspace($stage);
 
diff --git a/core/modules/content_moderation/tests/src/Kernel/ContentModerationAccessTest.php b/core/modules/content_moderation/tests/src/Kernel/ContentModerationAccessTest.php
index a59b39580228..aeffeb19f28d 100644
--- a/core/modules/content_moderation/tests/src/Kernel/ContentModerationAccessTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/ContentModerationAccessTest.php
@@ -62,7 +62,7 @@ protected function setUp(): void {
   /**
    * Tests access cacheability.
    */
-  public function testAccessCacheability() {
+  public function testAccessCacheability(): void {
     $node = $this->createNode(['type' => 'page']);
 
     /** @var \Drupal\user\RoleInterface $authenticated */
diff --git a/core/modules/content_moderation/tests/src/Kernel/ContentModerationPermissionsTest.php b/core/modules/content_moderation/tests/src/Kernel/ContentModerationPermissionsTest.php
index c0172b89ae56..b9a4a81d108c 100644
--- a/core/modules/content_moderation/tests/src/Kernel/ContentModerationPermissionsTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/ContentModerationPermissionsTest.php
@@ -39,7 +39,7 @@ protected function setUp(): void {
    *
    * @dataProvider permissionsTestCases
    */
-  public function testPermissions($workflow, $permissions) {
+  public function testPermissions($workflow, $permissions): void {
     Workflow::create($workflow)->save();
     $this->assertEquals($permissions, (new Permissions())->transitionPermissions());
   }
diff --git a/core/modules/content_moderation/tests/src/Kernel/ContentModerationResaveTest.php b/core/modules/content_moderation/tests/src/Kernel/ContentModerationResaveTest.php
index 7551d998a778..f1e37debc43d 100644
--- a/core/modules/content_moderation/tests/src/Kernel/ContentModerationResaveTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/ContentModerationResaveTest.php
@@ -76,7 +76,7 @@ protected function setUp(): void {
   /**
    * Tests that Content Moderation works with entities being resaved.
    */
-  public function testContentModerationResave() {
+  public function testContentModerationResave(): void {
     $entity = $this->entityStorage->create();
     $this->assertSame('draft', $entity->get('moderation_state')->value);
     $this->assertNull(\Drupal::state()->get('content_moderation_test_resave'));
diff --git a/core/modules/content_moderation/tests/src/Kernel/ContentModerationStateAccessControlHandlerTest.php b/core/modules/content_moderation/tests/src/Kernel/ContentModerationStateAccessControlHandlerTest.php
index cdb70c079bcf..7d3448850f6a 100644
--- a/core/modules/content_moderation/tests/src/Kernel/ContentModerationStateAccessControlHandlerTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/ContentModerationStateAccessControlHandlerTest.php
@@ -45,7 +45,7 @@ protected function setUp(): void {
    * @covers ::checkAccess
    * @covers ::checkCreateAccess
    */
-  public function testHandler() {
+  public function testHandler(): void {
     $entity = ContentModerationState::create([]);
     $this->assertFalse($this->accessControlHandler->access($entity, 'view'));
     $this->assertFalse($this->accessControlHandler->access($entity, 'update'));
diff --git a/core/modules/content_moderation/tests/src/Kernel/ContentModerationStateResourceTest.php b/core/modules/content_moderation/tests/src/Kernel/ContentModerationStateResourceTest.php
index d2f5356be356..6de00d4df983 100644
--- a/core/modules/content_moderation/tests/src/Kernel/ContentModerationStateResourceTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/ContentModerationStateResourceTest.php
@@ -22,7 +22,7 @@ class ContentModerationStateResourceTest extends KernelTestBase {
   /**
    * @see \Drupal\content_moderation\Entity\ContentModerationState
    */
-  public function testCreateContentModerationStateResource() {
+  public function testCreateContentModerationStateResource(): void {
     $this->expectException(PluginNotFoundException::class);
     $this->expectExceptionMessage('The "entity:content_moderation_state" plugin does not exist.');
     RestResourceConfig::create([
diff --git a/core/modules/content_moderation/tests/src/Kernel/ContentModerationStateStorageSchemaTest.php b/core/modules/content_moderation/tests/src/Kernel/ContentModerationStateStorageSchemaTest.php
index bf0cfdf9ed3d..2f01fb2e56e5 100644
--- a/core/modules/content_moderation/tests/src/Kernel/ContentModerationStateStorageSchemaTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/ContentModerationStateStorageSchemaTest.php
@@ -60,7 +60,7 @@ protected function setUp(): void {
    *
    * @covers ::getEntitySchema
    */
-  public function testUniqueKeys() {
+  public function testUniqueKeys(): void {
     // Create a node which will create a new ContentModerationState entity.
     $node = Node::create([
       'title' => 'Test title',
diff --git a/core/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php b/core/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php
index 9cfc05086b67..934ce06d1bc1 100644
--- a/core/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php
@@ -114,7 +114,7 @@ protected function setUp(): void {
    *
    * @dataProvider basicModerationTestCases
    */
-  public function testBasicModeration($entity_type_id) {
+  public function testBasicModeration($entity_type_id): void {
     $entity = $this->createEntity($entity_type_id, 'draft');
     $entity = $this->reloadEntity($entity);
     $this->assertEquals('draft', $entity->moderation_state->value);
@@ -204,7 +204,7 @@ public static function basicModerationTestCases() {
    *
    * @dataProvider basicModerationTestCases
    */
-  public function testContentModerationStateDataRemoval($entity_type_id) {
+  public function testContentModerationStateDataRemoval($entity_type_id): void {
     /** @var \Drupal\Core\Entity\ContentEntityInterface $entity */
     $entity = $this->createEntity($entity_type_id);
     $entity = $this->reloadEntity($entity);
@@ -218,7 +218,7 @@ public function testContentModerationStateDataRemoval($entity_type_id) {
    *
    * @dataProvider basicModerationTestCases
    */
-  public function testContentModerationStateRevisionDataRemoval($entity_type_id) {
+  public function testContentModerationStateRevisionDataRemoval($entity_type_id): void {
     /** @var \Drupal\Core\Entity\ContentEntityInterface $entity */
     $entity = $this->createEntity($entity_type_id);
     $revision_1 = clone $entity;
@@ -253,7 +253,7 @@ public function testContentModerationStateRevisionDataRemoval($entity_type_id) {
    *
    * @dataProvider basicModerationTestCases
    */
-  public function testContentModerationStatePendingRevisionDataRemoval($entity_type_id) {
+  public function testContentModerationStatePendingRevisionDataRemoval($entity_type_id): void {
     $entity = $this->createEntity($entity_type_id, 'published');
     $entity->setNewRevision(TRUE);
     $entity->moderation_state = 'draft';
@@ -273,7 +273,7 @@ public function testContentModerationStatePendingRevisionDataRemoval($entity_typ
   /**
    * Tests removal of content moderation state entities for preexisting content.
    */
-  public function testExistingContentModerationStateDataRemoval() {
+  public function testExistingContentModerationStateDataRemoval(): void {
     /** @var \Drupal\Core\Entity\RevisionableStorageInterface $storage */
     $storage = $this->entityTypeManager->getStorage('entity_test_mulrevpub');
 
@@ -299,7 +299,7 @@ public function testExistingContentModerationStateDataRemoval() {
    *
    * @dataProvider basicModerationTestCases
    */
-  public function testContentModerationStateTranslationDataRemoval($entity_type_id) {
+  public function testContentModerationStateTranslationDataRemoval($entity_type_id): void {
     // Test content moderation state translation deletion.
     if ($this->entityTypeManager->getDefinition($entity_type_id)->isTranslatable()) {
       /** @var \Drupal\Core\Entity\ContentEntityInterface $entity */
@@ -323,7 +323,7 @@ public function testContentModerationStateTranslationDataRemoval($entity_type_id
   /**
    * Tests basic multilingual content moderation through the API.
    */
-  public function testMultilingualModeration() {
+  public function testMultilingualModeration(): void {
     $this->createContentType([
       'type' => 'example',
     ]);
@@ -433,7 +433,7 @@ public function testMultilingualModeration() {
   /**
    * Tests moderation when the moderation_state field has a config override.
    */
-  public function testModerationWithFieldConfigOverride() {
+  public function testModerationWithFieldConfigOverride(): void {
     $this->createContentType([
       'type' => 'test_type',
     ]);
@@ -465,7 +465,7 @@ public function testModerationWithFieldConfigOverride() {
    *
    * @dataProvider moderationWithSpecialLanguagesTestCases
    */
-  public function testModerationWithSpecialLanguages($original_language, $updated_language) {
+  public function testModerationWithSpecialLanguages($original_language, $updated_language): void {
     $workflow = $this->createEditorialWorkflow();
     $this->addEntityTypeAndBundleToWorkflow($workflow, $this->revEntityTypeId, $this->revEntityTypeId);
 
@@ -507,7 +507,7 @@ public static function moderationWithSpecialLanguagesTestCases() {
   /**
    * Tests changing the language of content without adding a translation.
    */
-  public function testChangingContentLangcode() {
+  public function testChangingContentLangcode(): void {
     $this->createContentType([
       'type' => 'test_type',
     ]);
@@ -540,7 +540,7 @@ public function testChangingContentLangcode() {
   /**
    * Tests that a non-translatable entity type with a langcode can be moderated.
    */
-  public function testNonTranslatableEntityTypeModeration() {
+  public function testNonTranslatableEntityTypeModeration(): void {
     $workflow = $this->createEditorialWorkflow();
     $this->addEntityTypeAndBundleToWorkflow($workflow, $this->revEntityTypeId, $this->revEntityTypeId);
 
@@ -563,7 +563,7 @@ public function testNonTranslatableEntityTypeModeration() {
   /**
    * Tests moderation of a non-translatable entity type with no langcode.
    */
-  public function testNonLangcodeEntityTypeModeration() {
+  public function testNonLangcodeEntityTypeModeration(): void {
     // Unset the langcode entity key for 'entity_test_rev'.
     $entity_type = clone $this->entityTypeManager->getDefinition($this->revEntityTypeId);
     $keys = $entity_type->getKeys();
@@ -598,7 +598,7 @@ public function testNonLangcodeEntityTypeModeration() {
   /**
    * Tests the dependencies of the workflow when using content moderation.
    */
-  public function testWorkflowDependencies() {
+  public function testWorkflowDependencies(): void {
     $node_type = $this->createContentType([
       'type' => 'example',
     ]);
@@ -641,7 +641,7 @@ public function testWorkflowDependencies() {
   /**
    * Tests the content moderation workflow dependencies for non-config bundles.
    */
-  public function testWorkflowNonConfigBundleDependencies() {
+  public function testWorkflowNonConfigBundleDependencies(): void {
     // Create a bundle not based on any particular configuration.
     entity_test_create_bundle('test_bundle');
 
@@ -681,7 +681,7 @@ public function testWorkflowNonConfigBundleDependencies() {
    *
    * @dataProvider basicModerationTestCases
    */
-  public function testRevisionDefaultState($entity_type_id) {
+  public function testRevisionDefaultState($entity_type_id): void {
     // Check that the revision default state of the moderated entity and the
     // content moderation state entity always match.
     $entity = $this->createEntity($entity_type_id, 'published');
diff --git a/core/modules/content_moderation/tests/src/Kernel/ContentModerationSyncingTest.php b/core/modules/content_moderation/tests/src/Kernel/ContentModerationSyncingTest.php
index 78556eefdaec..8204273393a6 100644
--- a/core/modules/content_moderation/tests/src/Kernel/ContentModerationSyncingTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/ContentModerationSyncingTest.php
@@ -44,7 +44,7 @@ protected function setUp(): void {
   /**
    * Tests no new revision is forced during a sync.
    */
-  public function testNoRevisionForcedDuringSync() {
+  public function testNoRevisionForcedDuringSync(): void {
     $entity = EntityTestMulRevPub::create([
       'moderation_state' => 'draft',
       'name' => 'foo',
@@ -62,7 +62,7 @@ public function testNoRevisionForcedDuringSync() {
   /**
    * Tests changing the moderation state during a sync.
    */
-  public function testSingleRevisionStateChangedDuringSync() {
+  public function testSingleRevisionStateChangedDuringSync(): void {
     $entity = EntityTestMulRevPub::create([
       'moderation_state' => 'published',
       'name' => 'foo',
@@ -88,7 +88,7 @@ public function testSingleRevisionStateChangedDuringSync() {
   /**
    * Tests state changes with multiple revisions during a sync.
    */
-  public function testMultipleRevisionStateChangedDuringSync() {
+  public function testMultipleRevisionStateChangedDuringSync(): void {
     $entity = EntityTestMulRevPub::create([
       'moderation_state' => 'published',
       'name' => 'foo',
@@ -116,7 +116,7 @@ public function testMultipleRevisionStateChangedDuringSync() {
   /**
    * Tests modifying a previous revision during a sync.
    */
-  public function testUpdatingPreviousRevisionDuringSync() {
+  public function testUpdatingPreviousRevisionDuringSync(): void {
     /** @var \Drupal\Core\Entity\RevisionableStorageInterface $storage */
     $storage = $this->container->get('entity_type.manager')->getStorage('entity_test_mulrevpub');
 
@@ -144,7 +144,7 @@ public function testUpdatingPreviousRevisionDuringSync() {
   /**
    * Tests a moderation state changed on a previous revision during a sync.
    */
-  public function testStateChangedPreviousRevisionDuringSync() {
+  public function testStateChangedPreviousRevisionDuringSync(): void {
     /** @var \Drupal\Core\Entity\RevisionableStorageInterface $storage */
     $storage = $this->container->get('entity_type.manager')->getStorage('entity_test_mulrevpub');
 
diff --git a/core/modules/content_moderation/tests/src/Kernel/ContentModerationWorkflowConfigTest.php b/core/modules/content_moderation/tests/src/Kernel/ContentModerationWorkflowConfigTest.php
index 93d88cd1dd22..20f23a54347c 100644
--- a/core/modules/content_moderation/tests/src/Kernel/ContentModerationWorkflowConfigTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/ContentModerationWorkflowConfigTest.php
@@ -83,7 +83,7 @@ protected function setUp(): void {
   /**
    * Tests deleting a state via config import.
    */
-  public function testDeletingStateViaConfiguration() {
+  public function testDeletingStateViaConfiguration(): void {
     $config_sync = \Drupal::service('config.storage.sync');
 
     // Alter the workflow data.
diff --git a/core/modules/content_moderation/tests/src/Kernel/ContentModerationWorkflowTypeApiTest.php b/core/modules/content_moderation/tests/src/Kernel/ContentModerationWorkflowTypeApiTest.php
index 8bf6f0cf676b..79b47665d2bd 100644
--- a/core/modules/content_moderation/tests/src/Kernel/ContentModerationWorkflowTypeApiTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/ContentModerationWorkflowTypeApiTest.php
@@ -46,7 +46,7 @@ protected function setUp(): void {
    * @covers ::addEntityTypeAndBundle
    * @covers ::removeEntityTypeAndBundle
    */
-  public function testGetBundlesForEntityType() {
+  public function testGetBundlesForEntityType(): void {
     /** @var \Drupal\content_moderation\Plugin\WorkflowType\ContentModeration $workflow_plugin */
     $workflow_plugin = $this->workflow->getTypePlugin();
     // The content moderation plugin does not validate the existence of the
@@ -64,7 +64,7 @@ public function testGetBundlesForEntityType() {
    * @covers ::addEntityTypeAndBundle
    * @covers ::removeEntityTypeAndBundle
    */
-  public function testAppliesToEntityTypeAndBundle() {
+  public function testAppliesToEntityTypeAndBundle(): void {
     /** @var \Drupal\content_moderation\Plugin\WorkflowType\ContentModeration $workflow_plugin */
     $workflow_plugin = $this->workflow->getTypePlugin();
     // The content moderation plugin does not validate the existence of the
@@ -80,7 +80,7 @@ public function testAppliesToEntityTypeAndBundle() {
   /**
    * @covers ::addEntityTypeAndBundle
    */
-  public function testAddEntityTypeAndBundle() {
+  public function testAddEntityTypeAndBundle(): void {
     /** @var \Drupal\content_moderation\Plugin\WorkflowType\ContentModeration $workflow_plugin */
     $workflow_plugin = $this->workflow->getTypePlugin();
 
@@ -104,7 +104,7 @@ public function testAddEntityTypeAndBundle() {
    * @covers ::addEntityTypeAndBundle
    * @covers ::removeEntityTypeAndBundle
    */
-  public function testRemoveEntityTypeAndBundle() {
+  public function testRemoveEntityTypeAndBundle(): void {
     /** @var \Drupal\content_moderation\Plugin\WorkflowType\ContentModeration $workflow_plugin */
     $workflow_plugin = $this->workflow->getTypePlugin();
 
diff --git a/core/modules/content_moderation/tests/src/Kernel/DefaultRevisionStateTest.php b/core/modules/content_moderation/tests/src/Kernel/DefaultRevisionStateTest.php
index b0d13d29befd..34a6664238b7 100644
--- a/core/modules/content_moderation/tests/src/Kernel/DefaultRevisionStateTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/DefaultRevisionStateTest.php
@@ -62,7 +62,7 @@ protected function setUp(): void {
   /**
    * Tests a translatable Node.
    */
-  public function testMultilingual() {
+  public function testMultilingual(): void {
     // Enable French.
     ConfigurableLanguage::createFromLangcode('fr')->save();
     $node_type = NodeType::create([
diff --git a/core/modules/content_moderation/tests/src/Kernel/EntityOperationsTest.php b/core/modules/content_moderation/tests/src/Kernel/EntityOperationsTest.php
index 6282ba0b6eaa..69c1b93a9c7c 100644
--- a/core/modules/content_moderation/tests/src/Kernel/EntityOperationsTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/EntityOperationsTest.php
@@ -60,7 +60,7 @@ protected function createNodeType() {
   /**
    * Verifies that the process of saving pending revisions works as expected.
    */
-  public function testPendingRevisions() {
+  public function testPendingRevisions(): void {
     // Create a new node in draft.
     $page = Node::create([
       'type' => 'page',
@@ -134,7 +134,7 @@ public function testPendingRevisions() {
   /**
    * Verifies that a newly-created node can go straight to published.
    */
-  public function testPublishedCreation() {
+  public function testPublishedCreation(): void {
     // Create a new node in draft.
     $page = Node::create([
       'type' => 'page',
@@ -156,7 +156,7 @@ public function testPublishedCreation() {
   /**
    * Verifies that an unpublished state may be made the default revision.
    */
-  public function testArchive() {
+  public function testArchive(): void {
     $page = Node::create([
       'type' => 'page',
       'title' => $this->randomString(),
diff --git a/core/modules/content_moderation/tests/src/Kernel/EntityStateChangeValidationTest.php b/core/modules/content_moderation/tests/src/Kernel/EntityStateChangeValidationTest.php
index 5d8d76134949..e769818a9cb2 100644
--- a/core/modules/content_moderation/tests/src/Kernel/EntityStateChangeValidationTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/EntityStateChangeValidationTest.php
@@ -68,7 +68,7 @@ protected function setUp(): void {
    *
    * @covers ::validate
    */
-  public function testValidTransition() {
+  public function testValidTransition(): void {
     $this->setCurrentUser($this->adminUser);
 
     $node_type = NodeType::create([
@@ -99,7 +99,7 @@ public function testValidTransition() {
    *
    * @covers ::validate
    */
-  public function testInvalidTransition() {
+  public function testInvalidTransition(): void {
     $this->setCurrentUser($this->adminUser);
 
     $node_type = NodeType::create([
@@ -128,7 +128,7 @@ public function testInvalidTransition() {
   /**
    * Tests validation with an invalid state.
    */
-  public function testInvalidState() {
+  public function testInvalidState(): void {
     $node_type = NodeType::create([
       'type' => 'example',
       'name' => 'Example',
@@ -152,7 +152,7 @@ public function testInvalidState() {
   /**
    * Tests validation with no initial state or an invalid state.
    */
-  public function testInvalidStateWithoutExisting() {
+  public function testInvalidStateWithoutExisting(): void {
     $this->setCurrentUser($this->adminUser);
     // Create content without moderation enabled for the content type.
     $node_type = NodeType::create([
@@ -202,7 +202,7 @@ public function testInvalidStateWithoutExisting() {
   /**
    * Tests state transition validation with multiple languages.
    */
-  public function testInvalidStateMultilingual() {
+  public function testInvalidStateMultilingual(): void {
     $this->setCurrentUser($this->adminUser);
 
     ConfigurableLanguage::createFromLangcode('fr')->save();
@@ -260,7 +260,7 @@ public function testInvalidStateMultilingual() {
   /**
    * Tests that content without prior moderation information can be moderated.
    */
-  public function testExistingContentWithNoModeration() {
+  public function testExistingContentWithNoModeration(): void {
     $this->setCurrentUser($this->adminUser);
 
     $node_type = NodeType::create([
@@ -297,7 +297,7 @@ public function testExistingContentWithNoModeration() {
   /**
    * Tests that content without prior moderation information can be translated.
    */
-  public function testExistingMultilingualContentWithNoModeration() {
+  public function testExistingMultilingualContentWithNoModeration(): void {
     $this->setCurrentUser($this->adminUser);
 
     // Enable French.
@@ -343,7 +343,7 @@ public function testExistingMultilingualContentWithNoModeration() {
   /**
    * @dataProvider transitionAccessValidationTestCases
    */
-  public function testTransitionAccessValidation($permissions, $target_state, $messages) {
+  public function testTransitionAccessValidation($permissions, $target_state, $messages): void {
     $node_type = NodeType::create([
       'type' => 'example',
       'name' => 'Example',
diff --git a/core/modules/content_moderation/tests/src/Kernel/EntityTypeInfoTest.php b/core/modules/content_moderation/tests/src/Kernel/EntityTypeInfoTest.php
index d1032902b6b2..78f6e6e35159 100644
--- a/core/modules/content_moderation/tests/src/Kernel/EntityTypeInfoTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/EntityTypeInfoTest.php
@@ -67,7 +67,7 @@ protected function setUp(): void {
   /**
    * @covers ::entityBaseFieldInfo
    */
-  public function testEntityBaseFieldInfo() {
+  public function testEntityBaseFieldInfo(): void {
     $definition = $this->entityTypeManager->getDefinition('entity_test');
     $definition->setHandlerClass('moderation', ModerationHandler::class);
 
@@ -86,7 +86,7 @@ public function testEntityBaseFieldInfo() {
    *
    * @dataProvider providerTestEntityTypeAlter
    */
-  public function testEntityTypeAlter($entity_type_id, $moderatable) {
+  public function testEntityTypeAlter($entity_type_id, $moderatable): void {
     $entity_types = $this->entityTypeManager->getDefinitions();
     $this->assertSame($moderatable, $entity_types[$entity_type_id]->hasHandlerClass('moderation'));
   }
@@ -112,7 +112,7 @@ public static function providerTestEntityTypeAlter() {
   /**
    * @covers ::entityBaseFieldInfo
    */
-  public function testBaseFieldOnlyAddedToModeratedEntityTypes() {
+  public function testBaseFieldOnlyAddedToModeratedEntityTypes(): void {
     $definition = $this->entityTypeManager->getDefinition('entity_test_with_bundle');
 
     EntityTestBundle::create([
@@ -133,7 +133,7 @@ public function testBaseFieldOnlyAddedToModeratedEntityTypes() {
   /**
    * Tests entity base field provider.
    */
-  public function testEntityBaseFieldProvider() {
+  public function testEntityBaseFieldProvider(): void {
     $this->enableModeration('entity_test_mulrev', 'entity_test_mulrev');
     $this->container->get('state')->set('entity_test.field_test_item', TRUE);
 
diff --git a/core/modules/content_moderation/tests/src/Kernel/InitialStateTest.php b/core/modules/content_moderation/tests/src/Kernel/InitialStateTest.php
index 739c76d3606f..2c856a591f57 100644
--- a/core/modules/content_moderation/tests/src/Kernel/InitialStateTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/InitialStateTest.php
@@ -44,7 +44,7 @@ protected function setUp(): void {
   /**
    * Tests the correct initial state.
    */
-  public function testInitialState() {
+  public function testInitialState(): void {
     $node_type = NodeType::create([
       'type' => 'example',
       'name' => 'Example',
diff --git a/core/modules/content_moderation/tests/src/Kernel/ModerationInformationTest.php b/core/modules/content_moderation/tests/src/Kernel/ModerationInformationTest.php
index 84e886c20995..70cde38a4763 100644
--- a/core/modules/content_moderation/tests/src/Kernel/ModerationInformationTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/ModerationInformationTest.php
@@ -63,7 +63,7 @@ protected function setUp(): void {
   /**
    * @covers ::getDefaultRevisionId
    */
-  public function testGetDefaultRevisionId() {
+  public function testGetDefaultRevisionId(): void {
     $entity_test_rev = EntityTestRev::create([
       'name' => 'Default Revision',
       'moderation_state' => 'published',
@@ -84,7 +84,7 @@ public function testGetDefaultRevisionId() {
    * @covers ::isDefaultRevisionPublished
    * @dataProvider isDefaultRevisionPublishedTestCases
    */
-  public function testIsDefaultRevisionPublished($initial_state, $final_state, $initial_is_default_published, $final_is_default_published) {
+  public function testIsDefaultRevisionPublished($initial_state, $final_state, $initial_is_default_published, $final_is_default_published): void {
     $entity = EntityTestMulRevPub::create([
       'moderation_state' => $initial_state,
     ]);
@@ -131,7 +131,7 @@ public static function isDefaultRevisionPublishedTestCases() {
   /**
    * @covers ::isDefaultRevisionPublished
    */
-  public function testIsDefaultRevisionPublishedMultilingual() {
+  public function testIsDefaultRevisionPublishedMultilingual(): void {
     $entity = EntityTestMulRevPub::create([
       'moderation_state' => 'draft',
     ]);
@@ -153,7 +153,7 @@ public function testIsDefaultRevisionPublishedMultilingual() {
   /**
    * @covers ::hasPendingRevision
    */
-  public function testHasPendingRevision() {
+  public function testHasPendingRevision(): void {
     $entity = EntityTestMulRevPub::create([
       'moderation_state' => 'published',
     ]);
@@ -184,7 +184,7 @@ public function testHasPendingRevision() {
   /**
    * @covers ::getOriginalState
    */
-  public function testGetOriginalState() {
+  public function testGetOriginalState(): void {
     $entity = EntityTestMulRevPub::create([
       'moderation_state' => 'published',
     ]);
@@ -196,7 +196,7 @@ public function testGetOriginalState() {
   /**
    * @covers ::getOriginalState
    */
-  public function testGetOriginalStateMultilingual() {
+  public function testGetOriginalStateMultilingual(): void {
     $entity = EntityTestMulRevPub::create([
       'moderation_state' => 'draft',
     ]);
diff --git a/core/modules/content_moderation/tests/src/Kernel/ModerationStateFieldItemListTest.php b/core/modules/content_moderation/tests/src/Kernel/ModerationStateFieldItemListTest.php
index 5b93b8574e2e..1c83da34b697 100644
--- a/core/modules/content_moderation/tests/src/Kernel/ModerationStateFieldItemListTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/ModerationStateFieldItemListTest.php
@@ -79,7 +79,7 @@ protected function setUp(): void {
   /**
    * Tests the field item list when accessing an index.
    */
-  public function testArrayIndex() {
+  public function testArrayIndex(): void {
     $this->assertFalse($this->testNode->isPublished());
     $this->assertEquals('draft', $this->testNode->moderation_state[0]->value);
   }
@@ -87,7 +87,7 @@ public function testArrayIndex() {
   /**
    * Tests the field item list when iterating.
    */
-  public function testArrayIteration() {
+  public function testArrayIteration(): void {
     $states = [];
     foreach ($this->testNode->moderation_state as $item) {
       $states[] = $item->value;
@@ -98,14 +98,14 @@ public function testArrayIteration() {
   /**
    * @covers ::getValue
    */
-  public function testGetValue() {
+  public function testGetValue(): void {
     $this->assertEquals([['value' => 'draft']], $this->testNode->moderation_state->getValue());
   }
 
   /**
    * @covers ::get
    */
-  public function testGet() {
+  public function testGet(): void {
     $this->assertEquals('draft', $this->testNode->moderation_state->get(0)->value);
     $this->expectException(\InvalidArgumentException::class);
     $this->testNode->moderation_state->get(2);
@@ -114,7 +114,7 @@ public function testGet() {
   /**
    * Tests the item list when it is emptied and appended to.
    */
-  public function testEmptyStateAndAppend() {
+  public function testEmptyStateAndAppend(): void {
     // This test case mimics the lifecycle of an entity that is being patched in
     // a rest resource.
     $this->testNode->moderation_state->setValue([]);
@@ -130,7 +130,7 @@ public function testEmptyStateAndAppend() {
   /**
    * Tests an empty value assigned to the field item.
    */
-  public function testEmptyFieldItem() {
+  public function testEmptyFieldItem(): void {
     $this->testNode->moderation_state->value = '';
     $this->assertEquals('', $this->testNode->moderation_state->value);
     $this->assertEmptiedModerationFieldItemList();
@@ -139,7 +139,7 @@ public function testEmptyFieldItem() {
   /**
    * Tests an empty value assigned to the field item list.
    */
-  public function testEmptyFieldItemList() {
+  public function testEmptyFieldItemList(): void {
     $this->testNode->moderation_state = '';
     $this->assertEquals('', $this->testNode->moderation_state->value);
     $this->assertEmptiedModerationFieldItemList();
@@ -148,7 +148,7 @@ public function testEmptyFieldItemList() {
   /**
    * Tests the field item when it is unset.
    */
-  public function testUnsetItemList() {
+  public function testUnsetItemList(): void {
     unset($this->testNode->moderation_state);
     $this->assertEquals(NULL, $this->testNode->moderation_state->value);
     $this->assertEmptiedModerationFieldItemList();
@@ -157,7 +157,7 @@ public function testUnsetItemList() {
   /**
    * Tests the field item when it is assigned NULL.
    */
-  public function testAssignNullItemList() {
+  public function testAssignNullItemList(): void {
     $this->testNode->moderation_state = NULL;
     $this->assertEquals(NULL, $this->testNode->moderation_state->value);
     $this->assertEmptiedModerationFieldItemList();
@@ -183,7 +183,7 @@ protected function assertEmptiedModerationFieldItemList(): void {
   /**
    * Tests the list class with a non moderated entity.
    */
-  public function testNonModeratedEntity() {
+  public function testNonModeratedEntity(): void {
     $unmoderated_node = Node::create([
       'type' => 'unmoderated',
       'title' => 'Test title',
@@ -201,7 +201,7 @@ public function testNonModeratedEntity() {
    *
    * @dataProvider moderationStateChangesTestCases
    */
-  public function testModerationStateChanges($initial_state, $final_state, $first_published, $first_is_default, $second_published, $second_is_default) {
+  public function testModerationStateChanges($initial_state, $final_state, $first_published, $first_is_default, $second_published, $second_is_default): void {
     $this->testNode->moderation_state->value = $initial_state;
     $this->assertEquals($first_published, $this->testNode->isPublished());
     $this->assertEquals($first_is_default, $this->testNode->isDefaultRevision());
@@ -255,7 +255,7 @@ public static function moderationStateChangesTestCases() {
   /**
    * Tests updating the state for an entity without a workflow.
    */
-  public function testEntityWithNoWorkflow() {
+  public function testEntityWithNoWorkflow(): void {
     $node_type = NodeType::create([
       'type' => 'example_no_workflow',
       'name' => 'No-Workflow example',
@@ -283,7 +283,7 @@ public function testEntityWithNoWorkflow() {
    *
    * @dataProvider entityUnserializeTestCases
    */
-  public function testEntityUnserialize($state, $default, $published) {
+  public function testEntityUnserialize($state, $default, $published): void {
     $this->testNode->moderation_state->value = $state;
 
     $this->assertEquals($state, $this->testNode->moderation_state->value);
@@ -320,7 +320,7 @@ public static function entityUnserializeTestCases() {
    *
    * @dataProvider moderatedEntityWithExistingIdTestCases
    */
-  public function testModeratedEntityWithExistingId($state) {
+  public function testModeratedEntityWithExistingId($state): void {
     $node = Node::create([
       'title' => 'Test title',
       'type' => 'example',
@@ -348,7 +348,7 @@ public static function moderatedEntityWithExistingIdTestCases() {
   /**
    * Test customizing the default moderation state.
    */
-  public function testWorkflowCustomizedInitialState() {
+  public function testWorkflowCustomizedInitialState(): void {
     $workflow = Workflow::load('editorial');
     $configuration = $workflow->getTypePlugin()->getConfiguration();
 
@@ -380,7 +380,7 @@ public function testWorkflowCustomizedInitialState() {
   /**
    * Tests the field item list when used with existing unmoderated content.
    */
-  public function testWithExistingUnmoderatedContent() {
+  public function testWithExistingUnmoderatedContent(): void {
     $node = Node::create([
       'title' => 'Test title',
       'type' => 'unmoderated',
@@ -413,7 +413,7 @@ public function testWithExistingUnmoderatedContent() {
   /**
    * Test generating sample values for entities with a moderation state.
    */
-  public function testModerationStateSampleValues() {
+  public function testModerationStateSampleValues(): void {
     $this->container->get('current_user')->setAccount(
       $this->createUser([
         'use editorial transition create_new_draft',
@@ -430,7 +430,7 @@ public function testModerationStateSampleValues() {
   /**
    * Tests field item list translation support with unmoderated content.
    */
-  public function testTranslationWithExistingUnmoderatedContent() {
+  public function testTranslationWithExistingUnmoderatedContent(): void {
     $node = Node::create([
       'title' => 'Published en',
       'langcode' => 'en',
diff --git a/core/modules/content_moderation/tests/src/Kernel/ModerationStateWidgetTest.php b/core/modules/content_moderation/tests/src/Kernel/ModerationStateWidgetTest.php
index ef543db10989..8354e59fa816 100644
--- a/core/modules/content_moderation/tests/src/Kernel/ModerationStateWidgetTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/ModerationStateWidgetTest.php
@@ -60,7 +60,7 @@ protected function setUp(): void {
   /**
    * Tests the widget does not impact a non-moderated entity.
    */
-  public function testWidgetNonModeratedEntity() {
+  public function testWidgetNonModeratedEntity(): void {
     // Create an unmoderated entity and build a form display which will include
     // the ModerationStateWidget plugin, in a hidden state.
     $entity = Node::create([
@@ -85,7 +85,7 @@ public function testWidgetNonModeratedEntity() {
   /**
    * @covers ::isApplicable
    */
-  public function testIsApplicable() {
+  public function testIsApplicable(): void {
     // The moderation_state field definition should be applicable to our widget.
     $fields = $this->container->get('entity_field.manager')->getFieldDefinitions('node', 'test_type');
     $this->assertTrue(ModerationStateWidget::isApplicable($fields['moderation_state']));
diff --git a/core/modules/content_moderation/tests/src/Kernel/NodeAccessTest.php b/core/modules/content_moderation/tests/src/Kernel/NodeAccessTest.php
index ab1fa1f3177e..5d6cfb8a154f 100644
--- a/core/modules/content_moderation/tests/src/Kernel/NodeAccessTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/NodeAccessTest.php
@@ -69,7 +69,7 @@ protected function setUp(): void {
   /**
    * @covers \Drupal\content_moderation\ModerationInformation::getDefaultRevisionId
    */
-  public function testGetDefaultRevisionId() {
+  public function testGetDefaultRevisionId(): void {
     // Create an admin user.
     $user = $this->createUser([], NULL, TRUE);
     \Drupal::currentUser()->setAccount($user);
diff --git a/core/modules/content_moderation/tests/src/Kernel/StateFormatterTest.php b/core/modules/content_moderation/tests/src/Kernel/StateFormatterTest.php
index ab708d29b00d..8c402ec968f0 100644
--- a/core/modules/content_moderation/tests/src/Kernel/StateFormatterTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/StateFormatterTest.php
@@ -50,7 +50,7 @@ protected function setUp(): void {
    *
    * @dataProvider formatterTestCases
    */
-  public function testStateFieldFormatter($field_value, $formatter_settings, $expected_output) {
+  public function testStateFieldFormatter($field_value, $formatter_settings, $expected_output): void {
     $entity = EntityTestRev::create([
       'moderation_state' => $field_value,
     ]);
diff --git a/core/modules/content_moderation/tests/src/Kernel/ViewsDataIntegrationTest.php b/core/modules/content_moderation/tests/src/Kernel/ViewsDataIntegrationTest.php
index 53275888d072..60e65b5f5f71 100644
--- a/core/modules/content_moderation/tests/src/Kernel/ViewsDataIntegrationTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/ViewsDataIntegrationTest.php
@@ -59,7 +59,7 @@ protected function setUp($import_test_views = TRUE): void {
   /**
    * Tests the content moderation state views field.
    */
-  public function testContentModerationStateField() {
+  public function testContentModerationStateField(): void {
     $node = Node::create([
       'type' => 'page',
       'title' => 'Test title',
diff --git a/core/modules/content_moderation/tests/src/Kernel/ViewsModerationStateFilterTest.php b/core/modules/content_moderation/tests/src/Kernel/ViewsModerationStateFilterTest.php
index 3ab020927056..9b3771e98e0c 100644
--- a/core/modules/content_moderation/tests/src/Kernel/ViewsModerationStateFilterTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/ViewsModerationStateFilterTest.php
@@ -85,7 +85,7 @@ protected function setUp($import_test_views = TRUE): void {
   /**
    * Tests the content moderation state filter.
    */
-  public function testStateFilterViewsRelationship() {
+  public function testStateFilterViewsRelationship(): void {
     $workflow = Workflow::load('editorial');
     $workflow->getTypePlugin()->addEntityTypeAndBundle('node', 'example');
     $workflow->getTypePlugin()->addState('translated_draft', 'Bar');
@@ -180,7 +180,7 @@ public function testStateFilterViewsRelationship() {
   /**
    * Tests the moderation filter with a non-translatable entity type.
    */
-  public function testNonTranslatableEntityType() {
+  public function testNonTranslatableEntityType(): void {
     $workflow = Workflow::load('editorial');
     $workflow->getTypePlugin()->addEntityTypeAndBundle('entity_test_no_bundle', 'entity_test_no_bundle');
     $workflow->save();
@@ -201,7 +201,7 @@ public function testNonTranslatableEntityType() {
   /**
    * Tests the moderation state filter on an entity added via a relationship.
    */
-  public function testModerationStateFilterOnJoinedEntity() {
+  public function testModerationStateFilterOnJoinedEntity(): void {
     $workflow = Workflow::load('editorial');
     $workflow->getTypePlugin()->addEntityTypeAndBundle('node', 'example');
     $workflow->save();
@@ -275,7 +275,7 @@ public function testModerationStateFilterOnJoinedEntity() {
   /**
    * Tests the list of states in the filter plugin.
    */
-  public function testStateFilterStatesList() {
+  public function testStateFilterStatesList(): void {
     // By default a view of nodes will not have states to filter.
     $workflow = Workflow::load('editorial');
     $workflow->getTypePlugin()->removeEntityTypeAndBundle('node', 'example');
diff --git a/core/modules/content_moderation/tests/src/Kernel/ViewsModerationStateSortTest.php b/core/modules/content_moderation/tests/src/Kernel/ViewsModerationStateSortTest.php
index da968fc7f5e3..47a90f201316 100644
--- a/core/modules/content_moderation/tests/src/Kernel/ViewsModerationStateSortTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/ViewsModerationStateSortTest.php
@@ -65,7 +65,7 @@ protected function setUp($import_test_views = TRUE): void {
   /**
    * Tests sorting with a standard data base table.
    */
-  public function testSortBaseTable() {
+  public function testSortBaseTable(): void {
     $this->enableModules(['content_moderation_test_views']);
     $this->installConfig(['content_moderation_test_views']);
 
@@ -104,7 +104,7 @@ public function testSortBaseTable() {
   /**
    * Tests sorting with the revision base table.
    */
-  public function testSortRevisionBaseTable() {
+  public function testSortRevisionBaseTable(): void {
     $this->enableModules(['content_moderation_test_views']);
     $this->installConfig(['content_moderation_test_views']);
 
diff --git a/core/modules/content_moderation/tests/src/Kernel/WorkspacesContentModerationStateTest.php b/core/modules/content_moderation/tests/src/Kernel/WorkspacesContentModerationStateTest.php
index 5a03dee9cfcb..5967d8d5b410 100644
--- a/core/modules/content_moderation/tests/src/Kernel/WorkspacesContentModerationStateTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/WorkspacesContentModerationStateTest.php
@@ -55,7 +55,7 @@ protected function setUp(): void {
    *
    * @see \Drupal\workspaces\EntityTypeInfo::entityTypeAlter()
    */
-  public function testWorkspaceEntityTypeModeration() {
+  public function testWorkspaceEntityTypeModeration(): void {
     /** @var \Drupal\content_moderation\ModerationInformationInterface $moderation_info */
     $moderation_info = \Drupal::service('content_moderation.moderation_information');
     $entity_type = \Drupal::entityTypeManager()->getDefinition('workspace');
@@ -67,7 +67,7 @@ public function testWorkspaceEntityTypeModeration() {
    *
    * @see content_moderation_workspace_access()
    */
-  public function testContentModerationIntegrationWithWorkspaces() {
+  public function testContentModerationIntegrationWithWorkspaces(): void {
     $editorial = $this->createEditorialWorkflow();
     $access_handler = \Drupal::entityTypeManager()->getAccessControlHandler('workspace');
 
@@ -191,7 +191,7 @@ public function testContentModerationStateDataRemoval($entity_type_id = NULL): v
   /**
    * {@inheritdoc}
    */
-  public function testModerationWithFieldConfigOverride() {
+  public function testModerationWithFieldConfigOverride(): void {
     // This test does not assert anything that can be workspace-specific.
     $this->markTestSkipped();
   }
@@ -199,7 +199,7 @@ public function testModerationWithFieldConfigOverride() {
   /**
    * {@inheritdoc}
    */
-  public function testWorkflowDependencies() {
+  public function testWorkflowDependencies(): void {
     // This test does not assert anything that can be workspace-specific.
     $this->markTestSkipped();
   }
@@ -207,7 +207,7 @@ public function testWorkflowDependencies() {
   /**
    * {@inheritdoc}
    */
-  public function testWorkflowNonConfigBundleDependencies() {
+  public function testWorkflowNonConfigBundleDependencies(): void {
     // This test does not assert anything that can be workspace-specific.
     $this->markTestSkipped();
   }
@@ -215,7 +215,7 @@ public function testWorkflowNonConfigBundleDependencies() {
   /**
    * {@inheritdoc}
    */
-  public function testGetCurrentUserId() {
+  public function testGetCurrentUserId(): void {
     // This test does not assert anything that can be workspace-specific.
     $this->markTestSkipped();
   }
diff --git a/core/modules/content_moderation/tests/src/Unit/ContentModerationRouteSubscriberTest.php b/core/modules/content_moderation/tests/src/Unit/ContentModerationRouteSubscriberTest.php
index 1c1a942d18aa..9d703c71ff0b 100644
--- a/core/modules/content_moderation/tests/src/Unit/ContentModerationRouteSubscriberTest.php
+++ b/core/modules/content_moderation/tests/src/Unit/ContentModerationRouteSubscriberTest.php
@@ -229,7 +229,7 @@ public static function setLatestRevisionFlagTestCases() {
    *
    * @dataProvider setLatestRevisionFlagTestCases
    */
-  public function testSetLatestRevisionFlag($defaults, $parameters, $expected_parameters = FALSE) {
+  public function testSetLatestRevisionFlag($defaults, $parameters, $expected_parameters = FALSE): void {
     $route = new Route('/foo/{entity_test}', $defaults, [], [
       'parameters' => $parameters,
     ]);
diff --git a/core/modules/content_moderation/tests/src/Unit/ContentPreprocessTest.php b/core/modules/content_moderation/tests/src/Unit/ContentPreprocessTest.php
index 7c8071b46e06..7da1cfa314e2 100644
--- a/core/modules/content_moderation/tests/src/Unit/ContentPreprocessTest.php
+++ b/core/modules/content_moderation/tests/src/Unit/ContentPreprocessTest.php
@@ -20,7 +20,7 @@ class ContentPreprocessTest extends UnitTestCase {
    * @covers ::isLatestVersionPage
    * @dataProvider routeNodeProvider
    */
-  public function testIsLatestVersionPage($route_name, $route_nid, $check_nid, $result, $message) {
+  public function testIsLatestVersionPage($route_name, $route_nid, $check_nid, $result, $message): void {
     $content_preprocess = new ContentPreprocess($this->setupCurrentRouteMatch($route_name, $route_nid));
     $node = $this->setupNode($check_nid);
     $this->assertEquals($result, $content_preprocess->isLatestVersionPage($node), $message);
diff --git a/core/modules/content_moderation/tests/src/Unit/LatestRevisionCheckTest.php b/core/modules/content_moderation/tests/src/Unit/LatestRevisionCheckTest.php
index 3f094dc07003..41b469683ca7 100644
--- a/core/modules/content_moderation/tests/src/Unit/LatestRevisionCheckTest.php
+++ b/core/modules/content_moderation/tests/src/Unit/LatestRevisionCheckTest.php
@@ -59,7 +59,7 @@ protected function setUp(): void {
    *
    * @dataProvider accessSituationProvider
    */
-  public function testLatestAccessPermissions($entity_class, $entity_type, $has_pending_revision, array $account_permissions, $is_owner, $result_class) {
+  public function testLatestAccessPermissions($entity_class, $entity_type, $has_pending_revision, array $account_permissions, $is_owner, $result_class): void {
 
     /** @var \Drupal\Core\Session\AccountInterface $account */
     $account = $this->prophesize(AccountInterface::class);
diff --git a/core/modules/content_moderation/tests/src/Unit/ModerationInformationTest.php b/core/modules/content_moderation/tests/src/Unit/ModerationInformationTest.php
index f35b3b7f29ec..2ba7527eb1b9 100644
--- a/core/modules/content_moderation/tests/src/Unit/ModerationInformationTest.php
+++ b/core/modules/content_moderation/tests/src/Unit/ModerationInformationTest.php
@@ -71,7 +71,7 @@ public function setupModerationBundleInfo($bundle, $workflow = NULL) {
   /**
    * @covers ::isModeratedEntityType
    */
-  public function testIsModeratedEntityType() {
+  public function testIsModeratedEntityType(): void {
     $moderation_information = new ModerationInformation($this->getEntityTypeManager(), $this->setupModerationBundleInfo('test_bundle', 'workflow'));
 
     $moderated_entity_type = $this->prophesize(EntityTypeInterface::class);
@@ -88,7 +88,7 @@ public function testIsModeratedEntityType() {
    * @dataProvider providerWorkflow
    * @covers ::isModeratedEntity
    */
-  public function testIsModeratedEntity($workflow, $expected) {
+  public function testIsModeratedEntity($workflow, $expected): void {
     $moderation_information = new ModerationInformation($this->getEntityTypeManager(), $this->setupModerationBundleInfo('test_bundle', $workflow));
 
     $entity_type = new ContentEntityType([
@@ -108,7 +108,7 @@ public function testIsModeratedEntity($workflow, $expected) {
    * @dataProvider providerWorkflow
    * @covers ::getWorkflowForEntity
    */
-  public function testGetWorkflowForEntity($workflow) {
+  public function testGetWorkflowForEntity($workflow): void {
     $entity_type_manager = $this->prophesize(EntityTypeManagerInterface::class);
     if ($workflow) {
       $workflow_entity = $this->prophesize(WorkflowInterface::class)->reveal();
@@ -131,7 +131,7 @@ public function testGetWorkflowForEntity($workflow) {
    * @dataProvider providerWorkflow
    * @covers ::shouldModerateEntitiesOfBundle
    */
-  public function testShouldModerateEntities($workflow, $expected) {
+  public function testShouldModerateEntities($workflow, $expected): void {
     $entity_type = new ContentEntityType([
       'id' => 'test_entity_type',
       'bundle_entity_type' => 'entity_test_bundle',
diff --git a/core/modules/content_moderation/tests/src/Unit/StateTransitionValidationTest.php b/core/modules/content_moderation/tests/src/Unit/StateTransitionValidationTest.php
index b2aaaeee7827..70c413f5fa81 100644
--- a/core/modules/content_moderation/tests/src/Unit/StateTransitionValidationTest.php
+++ b/core/modules/content_moderation/tests/src/Unit/StateTransitionValidationTest.php
@@ -69,7 +69,7 @@ protected function setUp(): void {
    *
    * @dataProvider userTransitionsProvider
    */
-  public function testUserSensitiveValidTransitions($from_id, $to_id, $permission, $allowed, $result) {
+  public function testUserSensitiveValidTransitions($from_id, $to_id, $permission, $allowed, $result): void {
     $user = $this->prophesize(AccountInterface::class);
     // The one listed permission will be returned as instructed; Any others are
     // always denied.
diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationContextualLinksTest.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationContextualLinksTest.php
index b4c75b527433..8ccc0e6feaec 100644
--- a/core/modules/content_translation/tests/src/Functional/ContentTranslationContextualLinksTest.php
+++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationContextualLinksTest.php
@@ -112,7 +112,7 @@ protected function setUp(): void {
   /**
    * Tests that a contextual link is available for translating a node.
    */
-  public function testContentTranslationContextualLinks() {
+  public function testContentTranslationContextualLinks(): void {
     // Create a node.
     $title = $this->randomString();
     $this->drupalCreateNode(['type' => $this->bundle, 'title' => $title, 'langcode' => 'en']);
diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationDisableSettingTest.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationDisableSettingTest.php
index bafefceb99b2..854b750de56e 100644
--- a/core/modules/content_translation/tests/src/Functional/ContentTranslationDisableSettingTest.php
+++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationDisableSettingTest.php
@@ -32,7 +32,7 @@ class ContentTranslationDisableSettingTest extends BrowserTestBase {
   /**
    * Tests that entity schemas are up-to-date after enabling translation.
    */
-  public function testDisableSetting() {
+  public function testDisableSetting(): void {
     // Define selectors.
     $group_checkbox = 'entity_types[menu_link_content]';
     $translatable_checkbox = 'settings[menu_link_content][menu_link_content][translatable]';
diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationEnableTest.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationEnableTest.php
index 67778bf16741..097cd05a58a0 100644
--- a/core/modules/content_translation/tests/src/Functional/ContentTranslationEnableTest.php
+++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationEnableTest.php
@@ -36,7 +36,7 @@ class ContentTranslationEnableTest extends BrowserTestBase {
   /**
    * Tests that entity schemas are up-to-date after enabling translation.
    */
-  public function testEnable() {
+  public function testEnable(): void {
     $this->drupalLogin($this->rootUser);
     // Enable modules and make sure the related config entity type definitions
     // are installed.
diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationEntityBundleUITest.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationEntityBundleUITest.php
index a41dc6fcaf99..a1454538b870 100644
--- a/core/modules/content_translation/tests/src/Functional/ContentTranslationEntityBundleUITest.php
+++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationEntityBundleUITest.php
@@ -43,7 +43,7 @@ protected function setUp(): void {
   /**
    * Tests content types default translation behavior.
    */
-  public function testContentTypeUI() {
+  public function testContentTypeUI(): void {
     // Create first content type.
     $this->drupalCreateContentType(['type' => 'article']);
     // Enable content translation.
diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationLanguageChangeTest.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationLanguageChangeTest.php
index d9d92e13519d..57378e546644 100644
--- a/core/modules/content_translation/tests/src/Functional/ContentTranslationLanguageChangeTest.php
+++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationLanguageChangeTest.php
@@ -78,7 +78,7 @@ protected function setUp(): void {
   /**
    * Tests that the source language is properly set when changing.
    */
-  public function testLanguageChange() {
+  public function testLanguageChange(): void {
     // Create a node in English.
     $this->drupalGet('node/add/article');
     $edit = [
@@ -113,7 +113,7 @@ public function testLanguageChange() {
   /**
    * Tests that title does not change on ajax call with new language value.
    */
-  public function testTitleDoesNotChangesOnChangingLanguageWidgetAndTriggeringAjaxCall() {
+  public function testTitleDoesNotChangesOnChangingLanguageWidgetAndTriggeringAjaxCall(): void {
     // Create a node in English.
     $this->drupalGet('node/add/article', ['query' => ['test_field_only_en_fr' => 1]]);
     $edit = [
diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationLinkTagTest.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationLinkTagTest.php
index bd8f3466caa6..29e91a49af20 100644
--- a/core/modules/content_translation/tests/src/Functional/ContentTranslationLinkTagTest.php
+++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationLinkTagTest.php
@@ -85,7 +85,7 @@ protected function createTranslatableEntity() {
   /**
    * Tests alternate link tag found for entity types with canonical links.
    */
-  public function testCanonicalAlternateTags() {
+  public function testCanonicalAlternateTags(): void {
     /** @var \Drupal\Core\Language\LanguageManagerInterface $languageManager */
     $languageManager = $this->container->get('language_manager');
     /** @var \Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager */
@@ -142,7 +142,7 @@ function ($langcode) use ($url_base, $languageManager) {
   /**
    * Tests alternate link tag missing for entity types without canonical links.
    */
-  public function testCanonicalAlternateTagsMissing() {
+  public function testCanonicalAlternateTagsMissing(): void {
     /** @var \Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager */
     $entityTypeManager = $this->container->get('entity_type.manager');
 
diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationMetadataFieldsTest.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationMetadataFieldsTest.php
index 094f12de9103..e949397b4e3f 100644
--- a/core/modules/content_translation/tests/src/Functional/ContentTranslationMetadataFieldsTest.php
+++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationMetadataFieldsTest.php
@@ -56,7 +56,7 @@ protected function setUp(): void {
   /**
    * Tests skipping setting non translatable metadata fields.
    */
-  public function testSkipUntranslatable() {
+  public function testSkipUntranslatable(): void {
     $this->drupalLogin($this->translator);
     $fields = \Drupal::service('entity_field.manager')->getFieldDefinitions($this->entityTypeId, $this->bundle);
 
@@ -112,7 +112,7 @@ public function testSkipUntranslatable() {
   /**
    * Tests setting translatable metadata fields.
    */
-  public function testSetTranslatable() {
+  public function testSetTranslatable(): void {
     $this->drupalLogin($this->translator);
     $fields = \Drupal::service('entity_field.manager')->getFieldDefinitions($this->entityTypeId, $this->bundle);
 
diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationNewTranslationWithExistingRevisionsTest.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationNewTranslationWithExistingRevisionsTest.php
index ccad2c9bad2d..7a8955a262eb 100644
--- a/core/modules/content_translation/tests/src/Functional/ContentTranslationNewTranslationWithExistingRevisionsTest.php
+++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationNewTranslationWithExistingRevisionsTest.php
@@ -50,7 +50,7 @@ protected function setUp(): void {
   /**
    * Tests a translation with a draft is not deleted.
    */
-  public function testDraftTranslationIsNotDeleted() {
+  public function testDraftTranslationIsNotDeleted(): void {
     $this->drupalLogin($this->translator);
 
     // Create a test node.
@@ -116,7 +116,7 @@ public function testDraftTranslationIsNotDeleted() {
   /**
    * Test translation delete hooks are not invoked.
    */
-  public function testCreatingNewDraftDoesNotInvokeDeleteHook() {
+  public function testCreatingNewDraftDoesNotInvokeDeleteHook(): void {
     $this->drupalLogin($this->translator);
 
     // Create a test node.
diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationOperationsTest.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationOperationsTest.php
index 95368d97d990..3a521b8fe6a9 100644
--- a/core/modules/content_translation/tests/src/Functional/ContentTranslationOperationsTest.php
+++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationOperationsTest.php
@@ -77,7 +77,7 @@ protected function setUp(): void {
   /**
    * Tests that the operation "Translate" is displayed in the content listing.
    */
-  public function testOperationTranslateLink() {
+  public function testOperationTranslateLink(): void {
     $node = $this->drupalCreateNode(['type' => 'article', 'langcode' => 'es']);
     // Verify no translation operation links are displayed for users without
     // permission.
@@ -143,7 +143,7 @@ public function testOperationTranslateLink() {
    *
    * @see content_translation_translate_access()
    */
-  public function testContentTranslationOverviewAccess() {
+  public function testContentTranslationOverviewAccess(): void {
     $access_control_handler = \Drupal::entityTypeManager()->getAccessControlHandler('node');
     $user = $this->createUser(['create content translations', 'access content']);
     $this->drupalLogin($user);
diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationOutdatedRevisionTranslationTest.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationOutdatedRevisionTranslationTest.php
index 2361421e3f32..96726c68756a 100644
--- a/core/modules/content_translation/tests/src/Functional/ContentTranslationOutdatedRevisionTranslationTest.php
+++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationOutdatedRevisionTranslationTest.php
@@ -39,7 +39,7 @@ protected function setUp(): void {
   /**
    * Tests that outdated revision translations work correctly.
    */
-  public function testFlagAsOutdatedHidden() {
+  public function testFlagAsOutdatedHidden(): void {
     // Create a test node.
     $values = [
       'title' => 'Test 1.1 EN',
diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationRevisionTranslationDeletionTest.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationRevisionTranslationDeletionTest.php
index 2f81f4c766e0..8ecd28de8fe4 100644
--- a/core/modules/content_translation/tests/src/Functional/ContentTranslationRevisionTranslationDeletionTest.php
+++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationRevisionTranslationDeletionTest.php
@@ -39,7 +39,7 @@ protected function setUp(): void {
   /**
    * Tests that translation overview handles pending revisions correctly.
    */
-  public function testOverview() {
+  public function testOverview(): void {
     $index = 1;
     $accounts = [
       $this->rootUser,
diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationSettingsTest.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationSettingsTest.php
index dc00957e4b9e..10e55ae6f852 100644
--- a/core/modules/content_translation/tests/src/Functional/ContentTranslationSettingsTest.php
+++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationSettingsTest.php
@@ -74,7 +74,7 @@ protected function setUp(): void {
   /**
    * Tests that the settings UI works as expected.
    */
-  public function testSettingsUI() {
+  public function testSettingsUI(): void {
     // Check for the content_translation_menu_links_discovered_alter() changes.
     $this->drupalGet('admin/config');
     $this->assertSession()->linkExists('Content language and translation');
@@ -245,7 +245,7 @@ public function testSettingsUI() {
   /**
    * Tests the language settings checkbox on account settings page.
    */
-  public function testAccountLanguageSettingsUI() {
+  public function testAccountLanguageSettingsUI(): void {
     // Make sure the checkbox is available and not checked by default.
     $this->drupalGet('admin/config/people/accounts');
     $this->assertSession()->fieldExists('language[content_translation]');
@@ -291,7 +291,7 @@ protected function assertSettings(string $entity_type, ?string $bundle, bool $en
   /**
    * Tests that field setting depends on bundle translatability.
    */
-  public function testFieldTranslatableSettingsUI() {
+  public function testFieldTranslatableSettingsUI(): void {
     // At least one field needs to be translatable to enable article for
     // translation. Create an extra field to be used for this purpose. We use
     // the UI to test our form alterations.
@@ -325,7 +325,7 @@ public function testFieldTranslatableSettingsUI() {
   /**
    * Tests the translatable settings checkbox for untranslatable entities.
    */
-  public function testNonTranslatableTranslationSettingsUI() {
+  public function testNonTranslatableTranslationSettingsUI(): void {
     $this->drupalGet('admin/config/regional/content-language');
     $this->assertSession()->fieldNotExists('settings[entity_test][entity_test][translatable]');
   }
diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationStandardFieldsTest.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationStandardFieldsTest.php
index ff580980abcd..96a2da72e87f 100644
--- a/core/modules/content_translation/tests/src/Functional/ContentTranslationStandardFieldsTest.php
+++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationStandardFieldsTest.php
@@ -60,7 +60,7 @@ protected function setUp(): void {
   /**
    * Tests that translatable fields are being rendered.
    */
-  public function testFieldTranslatableArticle() {
+  public function testFieldTranslatableArticle(): void {
     // Install block and field modules.
     \Drupal::service('module_installer')->install(
       [
@@ -167,7 +167,7 @@ public function testFieldTranslatableArticle() {
   /**
    * Tests that revision_log is not translatable.
    */
-  public function testRevisionLogNotTranslatable() {
+  public function testRevisionLogNotTranslatable(): void {
     $path = 'admin/config/regional/content-language';
     $this->drupalGet($path);
     $this->assertSession()->fieldNotExists('edit-settings-node-article-fields-revision-log');
diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationSyncImageTest.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationSyncImageTest.php
index 46fcba4d0fbd..61d2edcdc6d2 100644
--- a/core/modules/content_translation/tests/src/Functional/ContentTranslationSyncImageTest.php
+++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationSyncImageTest.php
@@ -105,7 +105,7 @@ protected function getEditorPermissions() {
   /**
    * Tests image field synchronization.
    */
-  public function testImageFieldSync() {
+  public function testImageFieldSync(): void {
     // Check that the alt and title fields are enabled for the image field.
     $this->drupalLogin($this->editor);
     $this->drupalGet('entity_test_mul/structure/' . $this->entityTypeId . '/fields/' . $this->entityTypeId . '.' . $this->entityTypeId . '.' . $this->fieldName);
diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationUISkipTest.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationUISkipTest.php
index d9dd0100ec50..d069e9c5be00 100644
--- a/core/modules/content_translation/tests/src/Functional/ContentTranslationUISkipTest.php
+++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationUISkipTest.php
@@ -30,7 +30,7 @@ class ContentTranslationUISkipTest extends BrowserTestBase {
   /**
    * Tests the content_translation_ui_skip key functionality.
    */
-  public function testUICheckSkip() {
+  public function testUICheckSkip(): void {
     $admin_user = $this->drupalCreateUser([
       'translate any entity',
       'administer content translation',
diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationUITestBase.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationUITestBase.php
index 335f7a05a076..75aaec084a8a 100644
--- a/core/modules/content_translation/tests/src/Functional/ContentTranslationUITestBase.php
+++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationUITestBase.php
@@ -53,7 +53,7 @@ abstract class ContentTranslationUITestBase extends ContentTranslationTestBase {
   /**
    * Tests the basic translation UI.
    */
-  public function testTranslationUI() {
+  public function testTranslationUI(): void {
     $this->doTestBasicTranslation();
     $this->doTestTranslationOverview();
     $this->doTestOutdatedStatus();
diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationUntranslatableFieldsTest.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationUntranslatableFieldsTest.php
index 2a12a8ad2a01..d0b8a15e1f83 100644
--- a/core/modules/content_translation/tests/src/Functional/ContentTranslationUntranslatableFieldsTest.php
+++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationUntranslatableFieldsTest.php
@@ -84,7 +84,7 @@ protected function setupTestFields() {
   /**
    * Tests that hiding untranslatable field widgets works correctly.
    */
-  public function testHiddenWidgets() {
+  public function testHiddenWidgets(): void {
     /** @var \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager */
     $entity_type_manager = $this->container->get('entity_type.manager');
     $id = $this->createEntity(['title' => $this->randomString()], 'en');
diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationWorkflowsTest.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationWorkflowsTest.php
index 0dbb05b54a6c..ae49210101b6 100644
--- a/core/modules/content_translation/tests/src/Functional/ContentTranslationWorkflowsTest.php
+++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationWorkflowsTest.php
@@ -190,7 +190,7 @@ protected function setupEntity(?UserInterface $user = NULL) {
   /**
    * Tests simple and editorial translation workflows.
    */
-  public function testWorkflows() {
+  public function testWorkflows(): void {
     // Test workflows for the editor.
     $expected_status = [
       'edit' => 200,
diff --git a/core/modules/content_translation/tests/src/Functional/Views/ContentTranslationViewsUITest.php b/core/modules/content_translation/tests/src/Functional/Views/ContentTranslationViewsUITest.php
index 3a929c0ba57f..d4a6432b8f8c 100644
--- a/core/modules/content_translation/tests/src/Functional/Views/ContentTranslationViewsUITest.php
+++ b/core/modules/content_translation/tests/src/Functional/Views/ContentTranslationViewsUITest.php
@@ -35,7 +35,7 @@ class ContentTranslationViewsUITest extends UITestBase {
   /**
    * Tests the views UI.
    */
-  public function testViewsUI() {
+  public function testViewsUI(): void {
     $this->drupalGet('admin/structure/views/view/test_view/edit');
     $this->assertSession()->titleEquals('Test view (Views test data) | Drupal');
   }
diff --git a/core/modules/content_translation/tests/src/Functional/Views/TranslationLinkTest.php b/core/modules/content_translation/tests/src/Functional/Views/TranslationLinkTest.php
index ce3c9c877f90..9111383d5969 100644
--- a/core/modules/content_translation/tests/src/Functional/Views/TranslationLinkTest.php
+++ b/core/modules/content_translation/tests/src/Functional/Views/TranslationLinkTest.php
@@ -71,7 +71,7 @@ protected function getTranslatorPermissions() {
   /**
    * Tests the content translation overview link field handler.
    */
-  public function testTranslationLink() {
+  public function testTranslationLink(): void {
     $this->drupalGet('test-entity-translations-link');
     $this->assertSession()->linkByHrefExists('user/1/translations');
     $this->assertSession()->linkByHrefNotExists('user/2/translations', 'The translations link is not present when content_translation_translate_access() is FALSE.');
diff --git a/core/modules/content_translation/tests/src/FunctionalJavascript/ContentTranslationConfigUITest.php b/core/modules/content_translation/tests/src/FunctionalJavascript/ContentTranslationConfigUITest.php
index ed54b4527079..4f4b7da3709f 100644
--- a/core/modules/content_translation/tests/src/FunctionalJavascript/ContentTranslationConfigUITest.php
+++ b/core/modules/content_translation/tests/src/FunctionalJavascript/ContentTranslationConfigUITest.php
@@ -33,7 +33,7 @@ class ContentTranslationConfigUITest extends WebDriverTestBase {
   /**
    * Tests that the content translation configuration javascript does't fail.
    */
-  public function testContentTranslationConfigUI() {
+  public function testContentTranslationConfigUI(): void {
     $content_translation_manager = $this->container->get('content_translation.manager');
     $content_translation_manager->setEnabled('node', 'article', TRUE);
     $this->rebuildContainer();
diff --git a/core/modules/content_translation/tests/src/FunctionalJavascript/ContentTranslationContextualLinksTest.php b/core/modules/content_translation/tests/src/FunctionalJavascript/ContentTranslationContextualLinksTest.php
index 4d71d0e0db83..8e11084b1f62 100644
--- a/core/modules/content_translation/tests/src/FunctionalJavascript/ContentTranslationContextualLinksTest.php
+++ b/core/modules/content_translation/tests/src/FunctionalJavascript/ContentTranslationContextualLinksTest.php
@@ -61,7 +61,7 @@ protected function setUp(): void {
   /**
    * Tests that a contextual link is available for translating a node.
    */
-  public function testContentTranslationContextualLinks() {
+  public function testContentTranslationContextualLinks(): void {
     $node = $this->drupalCreateNode(['type' => 'page', 'title' => 'Test']);
 
     // Check that the translate link appears on the node page.
diff --git a/core/modules/content_translation/tests/src/Kernel/ContentTranslationConfigImportTest.php b/core/modules/content_translation/tests/src/Kernel/ContentTranslationConfigImportTest.php
index a718864245fd..c75ab238b1e2 100644
--- a/core/modules/content_translation/tests/src/Kernel/ContentTranslationConfigImportTest.php
+++ b/core/modules/content_translation/tests/src/Kernel/ContentTranslationConfigImportTest.php
@@ -68,7 +68,7 @@ protected function setUp(): void {
   /**
    * Tests config import updates.
    */
-  public function testConfigImportUpdates() {
+  public function testConfigImportUpdates(): void {
     $entity_type_id = 'entity_test_mul';
     $config_id = $entity_type_id . '.' . $entity_type_id;
     $config_name = 'language.content_settings.' . $config_id;
diff --git a/core/modules/content_translation/tests/src/Kernel/ContentTranslationEntityBundleInfoTest.php b/core/modules/content_translation/tests/src/Kernel/ContentTranslationEntityBundleInfoTest.php
index 8c141b70882e..86f04e806296 100644
--- a/core/modules/content_translation/tests/src/Kernel/ContentTranslationEntityBundleInfoTest.php
+++ b/core/modules/content_translation/tests/src/Kernel/ContentTranslationEntityBundleInfoTest.php
@@ -61,7 +61,7 @@ protected function setUp(): void {
   /**
    * Tests that modules can know whether bundles are translatable.
    */
-  public function testHookInvocationOrder() {
+  public function testHookInvocationOrder(): void {
     $this->contentTranslationManager->setEnabled('entity_test_mul', 'entity_test_mul', TRUE);
     $this->bundleInfo->clearCachedBundles();
     $this->bundleInfo->getAllBundleInfo();
@@ -88,7 +88,7 @@ public function testHookInvocationOrder() {
   /**
    * Tests that field synchronization is skipped for disabled bundles.
    */
-  public function testFieldSynchronizationWithDisabledBundle() {
+  public function testFieldSynchronizationWithDisabledBundle(): void {
     $entity = EntityTestMul::create();
     $entity->save();
 
@@ -104,7 +104,7 @@ public function testFieldSynchronizationWithDisabledBundle() {
    *
    * @throws \Drupal\Core\Entity\EntityStorageException
    */
-  public function testBundleClearOnLanguageContentSettingInsert() {
+  public function testBundleClearOnLanguageContentSettingInsert(): void {
     $node = $this->getBundledNode();
     $this->assertFalse($node->isTranslatable());
     $this->contentTranslationManager->setEnabled('node', 'bundle_test', TRUE);
@@ -117,7 +117,7 @@ public function testBundleClearOnLanguageContentSettingInsert() {
    * @throws \Drupal\Core\Entity\EntityStorageException
    * @throws \Exception
    */
-  public function testBundleClearOnLanguageContentSettingUpdate() {
+  public function testBundleClearOnLanguageContentSettingUpdate(): void {
     $node = $this->getBundledNode();
     $this->assertFalse($node->isTranslatable());
     $this->container->get('entity_type.manager')->getStorage('language_content_settings')->create([
diff --git a/core/modules/content_translation/tests/src/Kernel/ContentTranslationFieldSyncRevisionTest.php b/core/modules/content_translation/tests/src/Kernel/ContentTranslationFieldSyncRevisionTest.php
index 71260e8eca17..4d06bb0219ea 100644
--- a/core/modules/content_translation/tests/src/Kernel/ContentTranslationFieldSyncRevisionTest.php
+++ b/core/modules/content_translation/tests/src/Kernel/ContentTranslationFieldSyncRevisionTest.php
@@ -127,7 +127,7 @@ protected function setUp(): void {
    * @covers \Drupal\content_translation\FieldTranslationSynchronizer::synchronizeFields
    * @covers \Drupal\content_translation\FieldTranslationSynchronizer::synchronizeItems
    */
-  public function testFieldSynchronizationAndValidation() {
+  public function testFieldSynchronizationAndValidation(): void {
     // Test that when untranslatable field widgets are displayed, synchronized
     // field properties can be changed only in default revisions.
     $this->setUntranslatableFieldWidgetsDisplay(TRUE);
@@ -456,7 +456,7 @@ public function testFileFieldSynchronization(): void {
   /**
    * Tests changing the default language of an entity.
    */
-  public function testChangeDefaultLanguageNonTranslatableFieldsHidden() {
+  public function testChangeDefaultLanguageNonTranslatableFieldsHidden(): void {
     $this->setUntranslatableFieldWidgetsDisplay(FALSE);
     $entity = $this->saveNewEntity();
     $entity->langcode = 'it';
diff --git a/core/modules/content_translation/tests/src/Kernel/ContentTranslationHandlerTest.php b/core/modules/content_translation/tests/src/Kernel/ContentTranslationHandlerTest.php
index a4c2817d95d1..02674fd0ad62 100644
--- a/core/modules/content_translation/tests/src/Kernel/ContentTranslationHandlerTest.php
+++ b/core/modules/content_translation/tests/src/Kernel/ContentTranslationHandlerTest.php
@@ -103,7 +103,7 @@ protected function setUp(): void {
    * @covers ::entityFormSharedElements
    * @covers ::addTranslatabilityClue
    */
-  public function testEntityFormSharedElements(array $element, $default_translation_affected, $default_translation, $translation_form, array $expected) {
+  public function testEntityFormSharedElements(array $element, $default_translation_affected, $default_translation, $translation_form, array $expected): void {
     $this->state->set('entity_test.translation', TRUE);
     $this->state->set('entity_test.untranslatable_fields.default_translation_affected', $default_translation_affected);
     $this->entityTypeBundleInfo->clearCachedBundles();
diff --git a/core/modules/content_translation/tests/src/Kernel/ContentTranslationModuleInstallTest.php b/core/modules/content_translation/tests/src/Kernel/ContentTranslationModuleInstallTest.php
index 5d33311b95ea..5da1fb908c6d 100644
--- a/core/modules/content_translation/tests/src/Kernel/ContentTranslationModuleInstallTest.php
+++ b/core/modules/content_translation/tests/src/Kernel/ContentTranslationModuleInstallTest.php
@@ -62,7 +62,7 @@ protected function setUp(): void {
   /**
    * Tests that content translation fields are created upon module installation.
    */
-  public function testFieldUpdates() {
+  public function testFieldUpdates(): void {
     // The module ships a translatable bundle of the 'entity_test_with_bundle'
     // entity type.
     $this->installConfig(['content_translation_test']);
diff --git a/core/modules/content_translation/tests/src/Kernel/ContentTranslationPermissionsTest.php b/core/modules/content_translation/tests/src/Kernel/ContentTranslationPermissionsTest.php
index 146dc29bf65e..cd396e634c32 100644
--- a/core/modules/content_translation/tests/src/Kernel/ContentTranslationPermissionsTest.php
+++ b/core/modules/content_translation/tests/src/Kernel/ContentTranslationPermissionsTest.php
@@ -40,7 +40,7 @@ protected function setUp(): void {
   /**
    * Tests that enabling translation via the API triggers schema updates.
    */
-  public function testPermissions() {
+  public function testPermissions(): void {
     $this->container->get('content_translation.manager')->setEnabled('entity_test_mul', 'entity_test_mul', TRUE);
     $this->container->get('content_translation.manager')->setEnabled('entity_test_mul_with_bundle', 'test', TRUE);
     $permissions = $this->container->get('user.permissions')->getPermissions();
diff --git a/core/modules/content_translation/tests/src/Kernel/ContentTranslationSettingsApiTest.php b/core/modules/content_translation/tests/src/Kernel/ContentTranslationSettingsApiTest.php
index cd1f05f2a565..448ea0ee9e4f 100644
--- a/core/modules/content_translation/tests/src/Kernel/ContentTranslationSettingsApiTest.php
+++ b/core/modules/content_translation/tests/src/Kernel/ContentTranslationSettingsApiTest.php
@@ -37,7 +37,7 @@ protected function setUp(): void {
   /**
    * Tests that enabling translation via the API triggers schema updates.
    */
-  public function testSettingsApi() {
+  public function testSettingsApi(): void {
     $this->container->get('content_translation.manager')->setEnabled('entity_test_mul', 'entity_test_mul', TRUE);
     $schema = Database::getConnection()->schema();
     $result =
diff --git a/core/modules/content_translation/tests/src/Kernel/ContentTranslationSyncUnitTest.php b/core/modules/content_translation/tests/src/Kernel/ContentTranslationSyncUnitTest.php
index 38b0ba261894..72d369824c31 100644
--- a/core/modules/content_translation/tests/src/Kernel/ContentTranslationSyncUnitTest.php
+++ b/core/modules/content_translation/tests/src/Kernel/ContentTranslationSyncUnitTest.php
@@ -87,7 +87,7 @@ protected function setUp(): void {
   /**
    * Tests the field synchronization algorithm.
    */
-  public function testFieldSync() {
+  public function testFieldSync(): void {
     // Add a new item to the source items and check that its added to all the
     // translations.
     $sync_langcode = $this->langcodes[2];
@@ -178,7 +178,7 @@ public function testFieldSync() {
   /**
    * Tests that items holding the same values are correctly synchronized.
    */
-  public function testMultipleSyncedValues() {
+  public function testMultipleSyncedValues(): void {
     $sync_langcode = $this->langcodes[1];
     $unchanged_items = $this->unchangedFieldValues[$sync_langcode];
 
@@ -237,7 +237,7 @@ function ($delta) {
   /**
    * Tests that one change in a synchronized column triggers a change in all columns.
    */
-  public function testDifferingSyncedColumns() {
+  public function testDifferingSyncedColumns(): void {
     $sync_langcode = $this->langcodes[2];
     $unchanged_items = $this->unchangedFieldValues[$sync_langcode];
     $field_values = $this->unchangedFieldValues;
diff --git a/core/modules/content_translation/tests/src/Kernel/Migrate/d6/MigrateTaxonomyTermTranslationTest.php b/core/modules/content_translation/tests/src/Kernel/Migrate/d6/MigrateTaxonomyTermTranslationTest.php
index ae2f5a8e494a..914473cf68eb 100644
--- a/core/modules/content_translation/tests/src/Kernel/Migrate/d6/MigrateTaxonomyTermTranslationTest.php
+++ b/core/modules/content_translation/tests/src/Kernel/Migrate/d6/MigrateTaxonomyTermTranslationTest.php
@@ -124,7 +124,7 @@ protected function assertHierarchy(string $vid, int $tid, array $parent_ids): vo
   /**
    * Tests the Drupal 6 i18n taxonomy term to Drupal 8 migration.
    */
-  public function testTranslatedTaxonomyTerms() {
+  public function testTranslatedTaxonomyTerms(): void {
     $this->assertEntity(1, 'zu', 'zu - term 1 of vocabulary 1', 'vocabulary_1_i_0_', 'zu - description of term 1 of vocabulary 1', NULL, 0, []);
     $this->assertEntity(2, 'fr', 'fr - term 2 of vocabulary 2', 'vocabulary_2_i_1_', 'fr - description of term 2 of vocabulary 2', NULL, 3, []);
     $this->assertEntity(3, 'fr', 'fr - term 3 of vocabulary 2', 'vocabulary_2_i_1_', 'fr - description of term 3 of vocabulary 2', NULL, 4, ['2']);
diff --git a/core/modules/content_translation/tests/src/Kernel/Migrate/d7/MigrateEntityTranslationSettingsTest.php b/core/modules/content_translation/tests/src/Kernel/Migrate/d7/MigrateEntityTranslationSettingsTest.php
index 22d8f95a43c6..3487c0606ec6 100644
--- a/core/modules/content_translation/tests/src/Kernel/Migrate/d7/MigrateEntityTranslationSettingsTest.php
+++ b/core/modules/content_translation/tests/src/Kernel/Migrate/d7/MigrateEntityTranslationSettingsTest.php
@@ -59,7 +59,7 @@ protected function setUp(): void {
   /**
    * Tests entity translation settings migration.
    */
-  public function testEntityTranslationSettingsMigration() {
+  public function testEntityTranslationSettingsMigration(): void {
     // Tests 'comment_node_test_content_type' entity translation settings.
     $config = $this->config('language.content_settings.comment.comment_node_test_content_type');
     $this->assertSame($config->get('target_entity_type_id'), 'comment');
diff --git a/core/modules/content_translation/tests/src/Unit/Access/ContentTranslationManageAccessCheckTest.php b/core/modules/content_translation/tests/src/Unit/Access/ContentTranslationManageAccessCheckTest.php
index 11af029a694d..de493c5187db 100644
--- a/core/modules/content_translation/tests/src/Unit/Access/ContentTranslationManageAccessCheckTest.php
+++ b/core/modules/content_translation/tests/src/Unit/Access/ContentTranslationManageAccessCheckTest.php
@@ -51,7 +51,7 @@ protected function setUp(): void {
    *
    * @covers ::access
    */
-  public function testCreateAccess() {
+  public function testCreateAccess(): void {
     // Set the mock translation handler.
     $translation_handler = $this->createMock('\Drupal\content_translation\ContentTranslationHandlerInterface');
     $translation_handler->expects($this->once())
diff --git a/core/modules/content_translation/tests/src/Unit/Menu/ContentTranslationLocalTasksTest.php b/core/modules/content_translation/tests/src/Unit/Menu/ContentTranslationLocalTasksTest.php
index be57e9eb4458..ccb1ba534a2b 100644
--- a/core/modules/content_translation/tests/src/Unit/Menu/ContentTranslationLocalTasksTest.php
+++ b/core/modules/content_translation/tests/src/Unit/Menu/ContentTranslationLocalTasksTest.php
@@ -48,7 +48,7 @@ protected function setUp(): void {
    *
    * @dataProvider providerTestBlockAdminDisplay
    */
-  public function testBlockAdminDisplay($route, $expected) {
+  public function testBlockAdminDisplay($route, $expected): void {
     $this->assertLocalTasks($route, $expected);
   }
 
diff --git a/core/modules/contextual/tests/src/Functional/ContextualDynamicContextTest.php b/core/modules/contextual/tests/src/Functional/ContextualDynamicContextTest.php
index 4e80c5795d84..fca3ec805aac 100644
--- a/core/modules/contextual/tests/src/Functional/ContextualDynamicContextTest.php
+++ b/core/modules/contextual/tests/src/Functional/ContextualDynamicContextTest.php
@@ -88,7 +88,7 @@ protected function setUp(): void {
    * Ensures that contextual link placeholders always exist, even if the user is
    * not allowed to use contextual links.
    */
-  public function testDifferentPermissions() {
+  public function testDifferentPermissions(): void {
     $this->drupalLogin($this->editorUser);
 
     // Create three nodes in the following order:
@@ -172,7 +172,7 @@ public function testDifferentPermissions() {
   /**
    * Tests the contextual placeholder content is protected by a token.
    */
-  public function testTokenProtection() {
+  public function testTokenProtection(): void {
     $this->drupalLogin($this->editorUser);
 
     // Create a node that will have a contextual link.
diff --git a/core/modules/contextual/tests/src/FunctionalJavascript/ContextualLinksTest.php b/core/modules/contextual/tests/src/FunctionalJavascript/ContextualLinksTest.php
index aa7ba560c4fe..deedcd668891 100644
--- a/core/modules/contextual/tests/src/FunctionalJavascript/ContextualLinksTest.php
+++ b/core/modules/contextual/tests/src/FunctionalJavascript/ContextualLinksTest.php
@@ -42,7 +42,7 @@ protected function setUp(): void {
   /**
    * Tests the visibility of contextual links.
    */
-  public function testContextualLinksVisibility() {
+  public function testContextualLinksVisibility(): void {
     $this->drupalGet('user');
     $contextualLinks = $this->assertSession()->waitForElement('css', '.contextual button');
     $this->assertEmpty($contextualLinks);
@@ -74,7 +74,7 @@ public function testContextualLinksVisibility() {
   /**
    * Tests clicking contextual links.
    */
-  public function testContextualLinksClick() {
+  public function testContextualLinksClick(): void {
     $this->container->get('module_installer')->install(['contextual_test']);
     // Test clicking contextual link without toolbar.
     $this->drupalGet('user');
@@ -124,7 +124,7 @@ public function testContextualLinksClick() {
   /**
    * Tests the contextual links destination.
    */
-  public function testContextualLinksDestination() {
+  public function testContextualLinksDestination(): void {
     $this->grantPermissions(Role::load(Role::AUTHENTICATED_ID), [
       'access contextual links',
       'administer blocks',
@@ -139,7 +139,7 @@ public function testContextualLinksDestination() {
   /**
    * Tests the contextual links destination with query.
    */
-  public function testContextualLinksDestinationWithQuery() {
+  public function testContextualLinksDestinationWithQuery(): void {
     $this->grantPermissions(Role::load(Role::AUTHENTICATED_ID), [
       'access contextual links',
       'administer blocks',
diff --git a/core/modules/contextual/tests/src/FunctionalJavascript/DuplicateContextualLinksTest.php b/core/modules/contextual/tests/src/FunctionalJavascript/DuplicateContextualLinksTest.php
index b67bcd5c5329..8549a9c06ffc 100644
--- a/core/modules/contextual/tests/src/FunctionalJavascript/DuplicateContextualLinksTest.php
+++ b/core/modules/contextual/tests/src/FunctionalJavascript/DuplicateContextualLinksTest.php
@@ -33,7 +33,7 @@ class DuplicateContextualLinksTest extends WebDriverTestBase {
   /**
    * Tests the contextual links with same id.
    */
-  public function testSameContextualLinks() {
+  public function testSameContextualLinks(): void {
     $this->drupalPlaceBlock('views_block:contextual_recent-block_1', ['id' => 'first']);
     $this->drupalPlaceBlock('views_block:contextual_recent-block_1', ['id' => 'second']);
     $this->drupalCreateContentType(['type' => 'page']);
diff --git a/core/modules/contextual/tests/src/FunctionalJavascript/EditModeTest.php b/core/modules/contextual/tests/src/FunctionalJavascript/EditModeTest.php
index 50427cd7110b..6d7f8c493ff4 100644
--- a/core/modules/contextual/tests/src/FunctionalJavascript/EditModeTest.php
+++ b/core/modules/contextual/tests/src/FunctionalJavascript/EditModeTest.php
@@ -67,7 +67,7 @@ protected function setUp(): void {
   /**
    * Tests enabling and disabling edit mode.
    */
-  public function testEditModeEnableDisable() {
+  public function testEditModeEnableDisable(): void {
     $web_assert = $this->assertSession();
     $page = $this->getSession()->getPage();
     // Get the page twice to ensure edit mode remains enabled after a new page
diff --git a/core/modules/contextual/tests/src/Kernel/ContextualUnitTest.php b/core/modules/contextual/tests/src/Kernel/ContextualUnitTest.php
index b09f0f9e55f3..dfb2fb2f0dc8 100644
--- a/core/modules/contextual/tests/src/Kernel/ContextualUnitTest.php
+++ b/core/modules/contextual/tests/src/Kernel/ContextualUnitTest.php
@@ -110,7 +110,7 @@ public static function contextualLinksDataProvider(): array {
    *
    * @dataProvider contextualLinksDataProvider
    */
-  public function testContextualLinksToId(array $links, string $id) {
+  public function testContextualLinksToId(array $links, string $id): void {
     $this->assertSame($id, _contextual_links_to_id($links));
   }
 
@@ -126,7 +126,7 @@ public function testContextualLinksToId(array $links, string $id) {
    *
    * @dataProvider contextualLinksDataProvider
    */
-  public function testContextualIdToLinks(array $links, string $id) {
+  public function testContextualIdToLinks(array $links, string $id): void {
     $this->assertSame($links, _contextual_id_to_links($id));
   }
 
diff --git a/core/modules/datetime/tests/src/Functional/DateFilterTest.php b/core/modules/datetime/tests/src/Functional/DateFilterTest.php
index 3bc64daa5229..fdee4433d352 100644
--- a/core/modules/datetime/tests/src/Functional/DateFilterTest.php
+++ b/core/modules/datetime/tests/src/Functional/DateFilterTest.php
@@ -82,7 +82,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['datetime_test']
   /**
    * Tests the limit of the expose operator functionality.
    */
-  public function testLimitExposedOperators() {
+  public function testLimitExposedOperators(): void {
 
     $this->drupalGet('test_exposed_filter_datetime');
     $this->assertSession()->statusCodeEquals(200);
diff --git a/core/modules/datetime/tests/src/Functional/DateTimeFieldTest.php b/core/modules/datetime/tests/src/Functional/DateTimeFieldTest.php
index 845c96560cce..5d788a4e7632 100644
--- a/core/modules/datetime/tests/src/Functional/DateTimeFieldTest.php
+++ b/core/modules/datetime/tests/src/Functional/DateTimeFieldTest.php
@@ -43,7 +43,7 @@ protected function getTestFieldType() {
   /**
    * Tests date field functionality.
    */
-  public function testDateField() {
+  public function testDateField(): void {
     $field_name = $this->fieldStorage->getName();
 
     $display_repository = \Drupal::service('entity_display.repository');
@@ -222,7 +222,7 @@ public function testDateField() {
   /**
    * Tests date and time field.
    */
-  public function testDatetimeField() {
+  public function testDatetimeField(): void {
     $field_name = $this->fieldStorage->getName();
     $field_label = $this->field->label();
     // Change the field to a datetime field.
@@ -383,7 +383,7 @@ public function testDatetimeField() {
   /**
    * Tests Date List Widget functionality.
    */
-  public function testDatelistWidget() {
+  public function testDatelistWidget(): void {
     $field_name = $this->fieldStorage->getName();
     $field_label = $this->field->label();
 
@@ -662,7 +662,7 @@ protected function datelistDataProvider($field_label) {
   /**
    * Tests default value functionality.
    */
-  public function testDefaultValue() {
+  public function testDefaultValue(): void {
     // Create a test content type.
     $this->drupalCreateContentType(['type' => 'date_content']);
 
@@ -788,7 +788,7 @@ public function testDefaultValue() {
   /**
    * Tests that invalid values are caught and marked as invalid.
    */
-  public function testInvalidField() {
+  public function testInvalidField(): void {
     // Change the field to a datetime field.
     $this->fieldStorage->setSetting('datetime_type', 'datetime');
     $this->fieldStorage->save();
@@ -879,7 +879,7 @@ public function testInvalidField() {
   /**
    * Tests that 'Date' field storage setting form is disabled if field has data.
    */
-  public function testDateStorageSettings() {
+  public function testDateStorageSettings(): void {
     // Create a test content type.
     $this->drupalCreateContentType(['type' => 'date_content']);
 
diff --git a/core/modules/datetime/tests/src/Functional/DateTimeTimeAgoFormatterTest.php b/core/modules/datetime/tests/src/Functional/DateTimeTimeAgoFormatterTest.php
index 94cafb4a09cb..0a7e1dd2ae21 100644
--- a/core/modules/datetime/tests/src/Functional/DateTimeTimeAgoFormatterTest.php
+++ b/core/modules/datetime/tests/src/Functional/DateTimeTimeAgoFormatterTest.php
@@ -104,7 +104,7 @@ protected function setUp(): void {
   /**
    * Tests the formatter settings.
    */
-  public function testSettings() {
+  public function testSettings(): void {
     $this->drupalGet('entity_test/structure/entity_test/display');
 
     $edit = [
diff --git a/core/modules/datetime/tests/src/Functional/DateTimeWidgetTest.php b/core/modules/datetime/tests/src/Functional/DateTimeWidgetTest.php
index 05035906f71d..a008e4bff92c 100644
--- a/core/modules/datetime/tests/src/Functional/DateTimeWidgetTest.php
+++ b/core/modules/datetime/tests/src/Functional/DateTimeWidgetTest.php
@@ -36,7 +36,7 @@ protected function getTestFieldType() {
   /**
    * Test default value functionality.
    */
-  public function testDateOnlyDefaultValue() {
+  public function testDateOnlyDefaultValue(): void {
     // Create a test content type.
     $this->drupalCreateContentType(['type' => 'date_only_content']);
 
diff --git a/core/modules/datetime/tests/src/Functional/Views/FilterDateTest.php b/core/modules/datetime/tests/src/Functional/Views/FilterDateTest.php
index 5d5851fab5a5..677839e9a616 100644
--- a/core/modules/datetime/tests/src/Functional/Views/FilterDateTest.php
+++ b/core/modules/datetime/tests/src/Functional/Views/FilterDateTest.php
@@ -123,7 +123,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['views_test_conf
   /**
    * Tests exposed grouped filters.
    */
-  public function testExposedGroupedFilters() {
+  public function testExposedGroupedFilters(): void {
     $filter_identifier = $this->fieldName . '_value';
     $this->drupalGet('admin/structure/views/nojs/handler/test_filter_datetime/default/filter/' . $filter_identifier);
     $this->submitForm([], 'Expose filter');
@@ -216,7 +216,7 @@ protected function assertIds(array $expected_ids = []): void {
   /**
    * Tests exposed date filters with a pager.
    */
-  public function testExposedFilterWithPager() {
+  public function testExposedFilterWithPager(): void {
     // Expose the empty and not empty operators in a grouped filter.
     $this->drupalGet('admin/structure/views/nojs/handler/test_filter_datetime/default/filter/' . $this->fieldName . '_value');
     $this->submitForm([], t('Expose filter'));
diff --git a/core/modules/datetime/tests/src/Kernel/DateTimeFormInjectionTest.php b/core/modules/datetime/tests/src/Kernel/DateTimeFormInjectionTest.php
index d0e9afce8b93..8b790d9dbd3d 100644
--- a/core/modules/datetime/tests/src/Kernel/DateTimeFormInjectionTest.php
+++ b/core/modules/datetime/tests/src/Kernel/DateTimeFormInjectionTest.php
@@ -93,7 +93,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) {
   /**
    * Tests custom string injection serialization.
    */
-  public function testDatetimeSerialization() {
+  public function testDatetimeSerialization(): void {
     $form_state = new FormState();
     $form_state->setRequestMethod('POST');
     $form_state->setCached();
diff --git a/core/modules/datetime/tests/src/Kernel/DateTimeItemTest.php b/core/modules/datetime/tests/src/Kernel/DateTimeItemTest.php
index a5de8267e7af..e7a9d16d5a8b 100644
--- a/core/modules/datetime/tests/src/Kernel/DateTimeItemTest.php
+++ b/core/modules/datetime/tests/src/Kernel/DateTimeItemTest.php
@@ -70,7 +70,7 @@ protected function setUp(): void {
   /**
    * Tests using entity fields of the datetime field type.
    */
-  public function testDateTime() {
+  public function testDateTime(): void {
     $this->fieldStorage->setSetting('datetime_type', DateTimeItem::DATETIME_TYPE_DATETIME);
     $this->fieldStorage->save();
 
@@ -114,7 +114,7 @@ public function testDateTime() {
   /**
    * Tests using entity fields of the date field type.
    */
-  public function testDateOnly() {
+  public function testDateOnly(): void {
     $this->fieldStorage->setSetting('datetime_type', DateTimeItem::DATETIME_TYPE_DATE);
     $this->fieldStorage->save();
 
@@ -167,7 +167,7 @@ public function testDateOnly() {
   /**
    * Tests DateTimeItem::setValue().
    */
-  public function testSetValue() {
+  public function testSetValue(): void {
     // Test a date+time field.
     $this->fieldStorage->setSetting('datetime_type', DateTimeItem::DATETIME_TYPE_DATETIME);
     $this->fieldStorage->save();
@@ -224,7 +224,7 @@ public function testSetValue() {
   /**
    * Tests setting the value of the DateTimeItem directly.
    */
-  public function testSetValueProperty() {
+  public function testSetValueProperty(): void {
     // Test Date::setValue() with a date+time field.
     // Test a date+time field.
     $this->fieldStorage->setSetting('datetime_type', DateTimeItem::DATETIME_TYPE_DATETIME);
@@ -261,7 +261,7 @@ public function testSetValueProperty() {
    *
    * @dataProvider datetimeValidationProvider
    */
-  public function testDatetimeValidation($value) {
+  public function testDatetimeValidation($value): void {
     $this->expectException(AssertionFailedError::class);
 
     $this->fieldStorage->setSetting('datetime_type', DateTimeItem::DATETIME_TYPE_DATETIME);
@@ -321,7 +321,7 @@ public static function datetimeValidationProvider() {
    *
    * @dataProvider dateOnlyValidationProvider
    */
-  public function testDateOnlyValidation($value) {
+  public function testDateOnlyValidation($value): void {
     $this->expectException(AssertionFailedError::class);
 
     $this->fieldStorage->setSetting('datetime_type', DateTimeItem::DATETIME_TYPE_DATE);
diff --git a/core/modules/datetime/tests/src/Kernel/Views/ArgumentDateTimeTest.php b/core/modules/datetime/tests/src/Kernel/Views/ArgumentDateTimeTest.php
index 59345983d8d5..9c9244aea63b 100644
--- a/core/modules/datetime/tests/src/Kernel/Views/ArgumentDateTimeTest.php
+++ b/core/modules/datetime/tests/src/Kernel/Views/ArgumentDateTimeTest.php
@@ -52,7 +52,7 @@ protected function setUp($import_test_views = TRUE): void {
    *
    * @see \Drupal\datetime\Plugin\views\argument\YearDate
    */
-  public function testDatetimeArgumentYear() {
+  public function testDatetimeArgumentYear(): void {
     $view = Views::getView('test_argument_datetime');
 
     // The 'default' display has the 'year' argument.
@@ -95,7 +95,7 @@ public function testDatetimeArgumentYear() {
    *
    * @see \Drupal\datetime\Plugin\views\argument\MonthDate
    */
-  public function testDatetimeArgumentMonth() {
+  public function testDatetimeArgumentMonth(): void {
     $view = Views::getView('test_argument_datetime');
     // The 'embed_1' display has the 'month' argument.
     $view->setDisplay('embed_1');
@@ -121,7 +121,7 @@ public function testDatetimeArgumentMonth() {
    *
    * @see \Drupal\datetime\Plugin\views\argument\DayDate
    */
-  public function testDatetimeArgumentDay() {
+  public function testDatetimeArgumentDay(): void {
     $view = Views::getView('test_argument_datetime');
 
     // The 'embed_2' display has the 'day' argument.
@@ -145,7 +145,7 @@ public function testDatetimeArgumentDay() {
   /**
    * Tests year, month, and day arguments combined.
    */
-  public function testDatetimeArgumentAll() {
+  public function testDatetimeArgumentAll(): void {
     $view = Views::getView('test_argument_datetime');
     // The 'embed_3' display has year, month, and day arguments.
     $view->setDisplay('embed_3');
@@ -167,7 +167,7 @@ public function testDatetimeArgumentAll() {
   /**
    * Tests week WW argument.
    */
-  public function testDatetimeArgumentWeek() {
+  public function testDatetimeArgumentWeek(): void {
     $view = Views::getView('test_argument_datetime');
     // The 'embed_4' display has WW argument.
     $view->setDisplay('embed_4');
@@ -191,7 +191,7 @@ public function testDatetimeArgumentWeek() {
   /**
    * Tests full_date CCYYMMDD argument.
    */
-  public function testDatetimeArgumentFullDate() {
+  public function testDatetimeArgumentFullDate(): void {
     $view = Views::getView('test_argument_datetime');
     // The 'embed_5' display has CCYYMMDD argument.
     $view->setDisplay('embed_5');
@@ -213,7 +213,7 @@ public function testDatetimeArgumentFullDate() {
   /**
    * Tests year_month CCYYMM argument.
    */
-  public function testDatetimeArgumentYearMonth() {
+  public function testDatetimeArgumentYearMonth(): void {
     $view = Views::getView('test_argument_datetime');
     // The 'embed_6' display has CCYYMM argument.
     $view->setDisplay('embed_6');
diff --git a/core/modules/datetime/tests/src/Kernel/Views/DateTimeSchemaTest.php b/core/modules/datetime/tests/src/Kernel/Views/DateTimeSchemaTest.php
index 662b34d5d459..0463e084c6ef 100644
--- a/core/modules/datetime/tests/src/Kernel/Views/DateTimeSchemaTest.php
+++ b/core/modules/datetime/tests/src/Kernel/Views/DateTimeSchemaTest.php
@@ -24,7 +24,7 @@ class DateTimeSchemaTest extends DateTimeHandlerTestBase {
   /**
    * Tests argument plugin schema.
    */
-  public function testDateTimeSchema() {
+  public function testDateTimeSchema(): void {
     // Test argument schema.
     $view = Views::getView('test_argument_datetime');
     $view->initHandlers();
diff --git a/core/modules/datetime/tests/src/Kernel/Views/FilterDateTest.php b/core/modules/datetime/tests/src/Kernel/Views/FilterDateTest.php
index e3c70d8f2685..4d4997b2b37a 100644
--- a/core/modules/datetime/tests/src/Kernel/Views/FilterDateTest.php
+++ b/core/modules/datetime/tests/src/Kernel/Views/FilterDateTest.php
@@ -87,7 +87,7 @@ protected function setUp($import_test_views = TRUE): void {
   /**
    * Tests offsets with date-only fields.
    */
-  public function testDateOffsets() {
+  public function testDateOffsets(): void {
     $view = Views::getView('test_filter_datetime');
     $field = static::$fieldName . '_value';
 
@@ -171,7 +171,7 @@ public function testDateOffsets() {
   /**
    * Tests date filter with date-only fields.
    */
-  public function testDateIs() {
+  public function testDateIs(): void {
     $view = Views::getView('test_filter_datetime');
     $field = static::$fieldName . '_value';
 
diff --git a/core/modules/datetime/tests/src/Kernel/Views/FilterDateTimeTest.php b/core/modules/datetime/tests/src/Kernel/Views/FilterDateTimeTest.php
index 9ba6fe57e8ad..5861acf8c7f2 100644
--- a/core/modules/datetime/tests/src/Kernel/Views/FilterDateTimeTest.php
+++ b/core/modules/datetime/tests/src/Kernel/Views/FilterDateTimeTest.php
@@ -73,7 +73,7 @@ protected function setUp($import_test_views = TRUE): void {
   /**
    * Tests filter operations.
    */
-  public function testDatetimeFilter() {
+  public function testDatetimeFilter(): void {
     $this->_testOffset();
     $this->_testBetween();
     $this->_testExact();
diff --git a/core/modules/datetime/tests/src/Kernel/Views/SortDateTimeTest.php b/core/modules/datetime/tests/src/Kernel/Views/SortDateTimeTest.php
index 9c276736156e..96eaeb065960 100644
--- a/core/modules/datetime/tests/src/Kernel/Views/SortDateTimeTest.php
+++ b/core/modules/datetime/tests/src/Kernel/Views/SortDateTimeTest.php
@@ -51,7 +51,7 @@ protected function setUp($import_test_views = TRUE): void {
   /**
    * Tests the datetime sort handler.
    */
-  public function testDateTimeSort() {
+  public function testDateTimeSort(): void {
     $field = static::$fieldName . '_value';
     $view = Views::getView('test_sort_datetime');
 
diff --git a/core/modules/datetime/tests/src/Unit/Plugin/migrate/field/DateFieldTest.php b/core/modules/datetime/tests/src/Unit/Plugin/migrate/field/DateFieldTest.php
index 54833c375481..7d1f0d52253b 100644
--- a/core/modules/datetime/tests/src/Unit/Plugin/migrate/field/DateFieldTest.php
+++ b/core/modules/datetime/tests/src/Unit/Plugin/migrate/field/DateFieldTest.php
@@ -26,7 +26,7 @@ class DateFieldTest extends UnitTestCase {
    *
    * @dataProvider providerTestDefineValueProcessPipeline
    */
-  public function testDefineValueProcessPipeline($data, $from_format, $to_format) {
+  public function testDefineValueProcessPipeline($data, $from_format, $to_format): void {
     $migration = $this->createMock('Drupal\migrate\Plugin\MigrationInterface');
     $pipeline = [
       'plugin' => 'sub_process',
@@ -134,7 +134,7 @@ public static function providerTestDefineValueProcessPipeline() {
    *
    * @covers ::defineValueProcessPipeline
    */
-  public function testDefineValueProcessPipelineException() {
+  public function testDefineValueProcessPipelineException(): void {
     $migration = $this->createMock('Drupal\migrate\Plugin\MigrationInterface');
 
     $plugin = new DateField([], '', []);
diff --git a/core/modules/datetime_range/tests/src/Functional/DateRangeFieldTest.php b/core/modules/datetime_range/tests/src/Functional/DateRangeFieldTest.php
index 40751e7fddce..e2b07cdc0f00 100644
--- a/core/modules/datetime_range/tests/src/Functional/DateRangeFieldTest.php
+++ b/core/modules/datetime_range/tests/src/Functional/DateRangeFieldTest.php
@@ -56,7 +56,7 @@ protected function getTestFieldType() {
   /**
    * Tests date field functionality.
    */
-  public function testDateRangeField() {
+  public function testDateRangeField(): void {
     $field_name = $this->fieldStorage->getName();
     $field_label = $this->field->label();
 
@@ -261,7 +261,7 @@ public function testDateRangeField() {
   /**
    * Tests date and time field.
    */
-  public function testDatetimeRangeField() {
+  public function testDatetimeRangeField(): void {
     $field_name = $this->fieldStorage->getName();
     $field_label = $this->field->label();
 
@@ -439,7 +439,7 @@ public function testDatetimeRangeField() {
   /**
    * Tests all-day field.
    */
-  public function testAlldayRangeField() {
+  public function testAlldayRangeField(): void {
     $field_name = $this->fieldStorage->getName();
     $field_label = $this->field->label();
 
@@ -615,7 +615,7 @@ public function testAlldayRangeField() {
   /**
    * Tests Date Range List Widget functionality.
    */
-  public function testDatelistWidget() {
+  public function testDatelistWidget(): void {
     $field_name = $this->fieldStorage->getName();
     $field_label = $this->field->label();
 
@@ -972,7 +972,7 @@ protected static function datelistDataProvider() {
   /**
    * Tests default value functionality.
    */
-  public function testDefaultValue() {
+  public function testDefaultValue(): void {
     // Create a test content type.
     $this->drupalCreateContentType(['type' => 'date_content']);
 
@@ -1162,7 +1162,7 @@ public function testDefaultValue() {
   /**
    * Tests that invalid values are caught and marked as invalid.
    */
-  public function testInvalidField() {
+  public function testInvalidField(): void {
     // Change the field to a datetime field.
     $this->fieldStorage->setSetting('datetime_type', DateRangeItem::DATETIME_TYPE_DATETIME);
     $this->fieldStorage->save();
@@ -1375,7 +1375,7 @@ public function testInvalidField() {
   /**
    * Tests that 'Date' field storage setting form is disabled if field has data.
    */
-  public function testDateStorageSettings() {
+  public function testDateStorageSettings(): void {
     // Create a test content type.
     $this->drupalCreateContentType(['type' => 'date_content']);
 
diff --git a/core/modules/datetime_range/tests/src/Kernel/DateRangeItemTest.php b/core/modules/datetime_range/tests/src/Kernel/DateRangeItemTest.php
index 3e9b45b701ac..08aceceab597 100644
--- a/core/modules/datetime_range/tests/src/Kernel/DateRangeItemTest.php
+++ b/core/modules/datetime_range/tests/src/Kernel/DateRangeItemTest.php
@@ -82,7 +82,7 @@ protected function setUp(): void {
   /**
    * Tests the field configured for date-only.
    */
-  public function testDateOnly() {
+  public function testDateOnly(): void {
     $this->fieldStorage->setSetting('datetime_type', DateRangeItem::DATETIME_TYPE_DATE);
     $field_name = $this->fieldStorage->getName();
     // Create an entity.
diff --git a/core/modules/datetime_range/tests/src/Kernel/SeparatorTranslationTest.php b/core/modules/datetime_range/tests/src/Kernel/SeparatorTranslationTest.php
index 06cc1cb8e720..92c0d9452a8e 100644
--- a/core/modules/datetime_range/tests/src/Kernel/SeparatorTranslationTest.php
+++ b/core/modules/datetime_range/tests/src/Kernel/SeparatorTranslationTest.php
@@ -93,7 +93,7 @@ protected function setUp(): void {
   /**
    * Tests the translation of the range separator.
    */
-  public function testSeparatorTranslation() {
+  public function testSeparatorTranslation(): void {
     // Create an entity.
     $entity = EntityTest::create([
       'name' => $this->randomString(),
diff --git a/core/modules/datetime_range/tests/src/Kernel/Views/EntityTypeWithoutViewsDataTest.php b/core/modules/datetime_range/tests/src/Kernel/Views/EntityTypeWithoutViewsDataTest.php
index 48b40e5d1065..4020059b7d1a 100644
--- a/core/modules/datetime_range/tests/src/Kernel/Views/EntityTypeWithoutViewsDataTest.php
+++ b/core/modules/datetime_range/tests/src/Kernel/Views/EntityTypeWithoutViewsDataTest.php
@@ -35,7 +35,7 @@ class EntityTypeWithoutViewsDataTest extends KernelTestBase {
    *
    * @see datetime_test_entity_type_alter()
    */
-  public function testEntityTypeWithoutViewsData() {
+  public function testEntityTypeWithoutViewsData(): void {
     $view_yaml = $this->getModulePath('taxonomy') . '/' . InstallStorage::CONFIG_OPTIONAL_DIRECTORY . '/views.view.taxonomy_term.yml';
     $values = Yaml::decode(file_get_contents($view_yaml));
     $this->assertEquals(SAVED_NEW, View::create($values)->save());
diff --git a/core/modules/datetime_range/tests/src/Kernel/Views/FilterDateTest.php b/core/modules/datetime_range/tests/src/Kernel/Views/FilterDateTest.php
index fea0aa9e2eec..c5d53ac4dc91 100644
--- a/core/modules/datetime_range/tests/src/Kernel/Views/FilterDateTest.php
+++ b/core/modules/datetime_range/tests/src/Kernel/Views/FilterDateTest.php
@@ -118,7 +118,7 @@ protected function setUp($import_test_views = TRUE): void {
   /**
    * Tests offsets with date-only fields.
    */
-  public function testDateOffsets() {
+  public function testDateOffsets(): void {
     $view = Views::getView('test_filter_datetime');
     $field_start = static::$fieldName . '_value';
     $field_end = static::$fieldName . '_end_value';
diff --git a/core/modules/dblog/tests/src/Functional/DbLogTest.php b/core/modules/dblog/tests/src/Functional/DbLogTest.php
index 8be02b251518..2dba2c1fafdb 100644
--- a/core/modules/dblog/tests/src/Functional/DbLogTest.php
+++ b/core/modules/dblog/tests/src/Functional/DbLogTest.php
@@ -83,7 +83,7 @@ protected function setUp(): void {
    * Database Logging module functionality through both the admin and user
    * interfaces.
    */
-  public function testDbLog() {
+  public function testDbLog(): void {
     // Log in the admin user.
     $this->drupalLogin($this->adminUser);
 
@@ -110,7 +110,7 @@ public function testDbLog() {
   /**
    * Tests individual log event page.
    */
-  public function testLogEventPage() {
+  public function testLogEventPage(): void {
     // Login the admin user.
     $this->drupalLogin($this->adminUser);
 
@@ -178,7 +178,7 @@ public function testOnError(): void {
   /**
    * Tests that a 403 event is logged with the exception triggering it.
    */
-  public function test403LogEventPage() {
+  public function test403LogEventPage(): void {
     $assert_session = $this->assertSession();
     $uri = 'admin/reports';
 
@@ -218,7 +218,7 @@ public function test403LogEventPage() {
   /**
    * Tests not-existing log event page.
    */
-  public function testLogEventNotFoundPage() {
+  public function testLogEventNotFoundPage(): void {
     // Login the admin user.
     $this->drupalLogin($this->adminUser);
 
@@ -237,7 +237,7 @@ public function testLogEventNotFoundPage() {
    * - Incorrect location: When location attribute is incorrect uri which can
    *   not be used to generate a valid link.
    */
-  public function testLogEventPageWithMissingInfo() {
+  public function testLogEventPageWithMissingInfo(): void {
     $this->drupalLogin($this->adminUser);
     $connection = Database::getConnection();
 
@@ -280,7 +280,7 @@ public function testLogEventPageWithMissingInfo() {
   /**
    * Test that twig errors are displayed correctly.
    */
-  public function testMessageParsing() {
+  public function testMessageParsing(): void {
     $this->drupalLogin($this->adminUser);
     // Log a common twig error with {{ }} and { } variables.
     \Drupal::service('logger.factory')->get("php")
@@ -617,7 +617,7 @@ private function doNode($type) {
    * Logs in the admin user, creates a database log event, and tests the
    * functionality of clearing the database log through the admin interface.
    */
-  public function testDBLogAddAndClear() {
+  public function testDBLogAddAndClear(): void {
     global $base_root;
     $connection = Database::getConnection();
     // Get a count of how many watchdog entries already exist.
@@ -652,7 +652,7 @@ public function testDBLogAddAndClear() {
   /**
    * Tests the database log filter functionality at admin/reports/dblog.
    */
-  public function testFilter() {
+  public function testFilter(): void {
     $this->drupalLogin($this->adminUser);
 
     // Clear the log to ensure that only generated entries will be found.
@@ -828,7 +828,7 @@ protected function assertLogMessage(string $log_message, string $message): void
   /**
    * Tests that the details page displays correctly for a temporary user.
    */
-  public function testTemporaryUser() {
+  public function testTemporaryUser(): void {
     // Create a temporary user.
     $temporary_user = $this->drupalCreateUser();
     $temporary_user_uid = $temporary_user->id();
@@ -859,7 +859,7 @@ public function testTemporaryUser() {
   /**
    * Make sure HTML tags are filtered out in the log overview links.
    */
-  public function testOverviewLinks() {
+  public function testOverviewLinks(): void {
     $this->drupalLogin($this->adminUser);
     // cSpell:disable-next-line
     $this->generateLogEntries(1, ['message' => "&lt;script&gt;alert('foo');&lt;/script&gt;<strong>Lorem</strong> ipsum dolor sit amet, consectetur adipiscing & elit."]);
@@ -882,7 +882,7 @@ public function testOverviewLinks() {
   /**
    * Tests sorting for entries with the same timestamp.
    */
-  public function testSameTimestampEntries() {
+  public function testSameTimestampEntries(): void {
     $this->drupalLogin($this->adminUser);
 
     $this->generateLogEntries(1, ['timestamp' => 1498062000, 'type' => 'same_time', 'message' => 'First']);
@@ -900,7 +900,7 @@ public function testSameTimestampEntries() {
   /**
    * Tests that the details page displays correctly backtrace.
    */
-  public function testBacktrace() {
+  public function testBacktrace(): void {
     $this->drupalLogin($this->adminUser);
     $this->drupalGet('/error-test/generate-warnings');
 
diff --git a/core/modules/dblog/tests/src/Functional/DbLogViewsTest.php b/core/modules/dblog/tests/src/Functional/DbLogViewsTest.php
index a8a39b2d799e..812723802896 100644
--- a/core/modules/dblog/tests/src/Functional/DbLogViewsTest.php
+++ b/core/modules/dblog/tests/src/Functional/DbLogViewsTest.php
@@ -59,7 +59,7 @@ protected function filterLogsEntries($type = NULL, $severity = NULL) {
   /**
    * Tests the empty text for the watchdog view is not using an input format.
    */
-  public function testEmptyText() {
+  public function testEmptyText(): void {
     $view = Views::getView('watchdog');
     $data = $view->storage->toArray();
     $area = $data['display']['default']['display_options']['empty']['area'];
diff --git a/core/modules/dblog/tests/src/Kernel/ConnectionFailureTest.php b/core/modules/dblog/tests/src/Kernel/ConnectionFailureTest.php
index e8ab1320c8c1..afb79e42b2ab 100644
--- a/core/modules/dblog/tests/src/Kernel/ConnectionFailureTest.php
+++ b/core/modules/dblog/tests/src/Kernel/ConnectionFailureTest.php
@@ -22,7 +22,7 @@ class ConnectionFailureTest extends KernelTestBase {
   /**
    * Tests logging of connection failures.
    */
-  public function testConnectionFailureLogging() {
+  public function testConnectionFailureLogging(): void {
     $this->installSchema('dblog', ['watchdog']);
 
     // MySQL errors like "1153 - Got a packet bigger than 'max_allowed_packet'
diff --git a/core/modules/dblog/tests/src/Kernel/DbLogControllerTest.php b/core/modules/dblog/tests/src/Kernel/DbLogControllerTest.php
index 06ca1706bab6..327751f6519b 100644
--- a/core/modules/dblog/tests/src/Kernel/DbLogControllerTest.php
+++ b/core/modules/dblog/tests/src/Kernel/DbLogControllerTest.php
@@ -31,7 +31,7 @@ protected function setUp(): void {
   /**
    * Tests links with non latin characters.
    */
-  public function testNonLatinCharacters() {
+  public function testNonLatinCharacters(): void {
 
     $link = 'hello-
       科州的小九寨沟绝美高山湖泊酱凉拌素鸡照烧鸡黄玫瑰
@@ -64,7 +64,7 @@ public function testNonLatinCharacters() {
   /**
    * Tests corrupted log entries can still display available data.
    */
-  public function testDbLogCorrupted() {
+  public function testDbLogCorrupted(): void {
     $dblog_controller = DbLogController::create($this->container);
 
     // Check message with properly serialized data.
diff --git a/core/modules/dblog/tests/src/Kernel/DbLogFormInjectionTest.php b/core/modules/dblog/tests/src/Kernel/DbLogFormInjectionTest.php
index 9113dc6eb878..59c4b8f4e1de 100644
--- a/core/modules/dblog/tests/src/Kernel/DbLogFormInjectionTest.php
+++ b/core/modules/dblog/tests/src/Kernel/DbLogFormInjectionTest.php
@@ -93,7 +93,7 @@ protected function setUp(): void {
   /**
    * Tests db log injection serialization.
    */
-  public function testLoggerSerialization() {
+  public function testLoggerSerialization(): void {
     $form_state = new FormState();
 
     // Forms are only serialized during POST requests.
diff --git a/core/modules/dblog/tests/src/Kernel/DbLogTest.php b/core/modules/dblog/tests/src/Kernel/DbLogTest.php
index c86f062ab155..9bdc36cb98a9 100644
--- a/core/modules/dblog/tests/src/Kernel/DbLogTest.php
+++ b/core/modules/dblog/tests/src/Kernel/DbLogTest.php
@@ -35,7 +35,7 @@ protected function setUp(): void {
   /**
    * Tests that cron correctly applies the database log row limit.
    */
-  public function testDbLogCron() {
+  public function testDbLogCron(): void {
     $row_limit = 100;
     // Generate additional log entries.
     $this->generateLogEntries($row_limit + 10);
@@ -65,7 +65,7 @@ function (callable $hook, string $module) use (&$implementation_count) {
   /**
    * Tests that only valid placeholders are stored in the variables column.
    */
-  public function testInvalidPlaceholders() {
+  public function testInvalidPlaceholders(): void {
     \Drupal::logger('my_module')->warning('Hello @string @array @object', ['@string' => '', '@array' => [], '@object' => new \stdClass()]);
     $variables = \Drupal::database()
       ->select('watchdog', 'w')
diff --git a/core/modules/dblog/tests/src/Kernel/Migrate/d6/MigrateDblogConfigsTest.php b/core/modules/dblog/tests/src/Kernel/Migrate/d6/MigrateDblogConfigsTest.php
index f8cdd96beaa5..0e02c879c00b 100644
--- a/core/modules/dblog/tests/src/Kernel/Migrate/d6/MigrateDblogConfigsTest.php
+++ b/core/modules/dblog/tests/src/Kernel/Migrate/d6/MigrateDblogConfigsTest.php
@@ -37,7 +37,7 @@ protected function setUp(): void {
   /**
    * Tests migration of dblog variables to dblog.settings.yml.
    */
-  public function testDblogSettings() {
+  public function testDblogSettings(): void {
     $config = $this->config('dblog.settings');
     $this->assertSame(10000, $config->get('row_limit'));
     $this->assertConfigSchema(\Drupal::service('config.typed'), 'dblog.settings', $config->get());
diff --git a/core/modules/dblog/tests/src/Kernel/Migrate/d7/MigrateDblogConfigsTest.php b/core/modules/dblog/tests/src/Kernel/Migrate/d7/MigrateDblogConfigsTest.php
index b25c425f39cb..92e338cebcd9 100644
--- a/core/modules/dblog/tests/src/Kernel/Migrate/d7/MigrateDblogConfigsTest.php
+++ b/core/modules/dblog/tests/src/Kernel/Migrate/d7/MigrateDblogConfigsTest.php
@@ -30,7 +30,7 @@ protected function setUp(): void {
   /**
    * Tests migration of dblog variables to dblog.settings.yml.
    */
-  public function testDblogSettings() {
+  public function testDblogSettings(): void {
     $config = $this->config('dblog.settings');
     $this->assertSame(10000, $config->get('row_limit'));
   }
diff --git a/core/modules/dblog/tests/src/Kernel/Views/ViewsIntegrationTest.php b/core/modules/dblog/tests/src/Kernel/Views/ViewsIntegrationTest.php
index a743f2cda4d9..ee75d0738b22 100644
--- a/core/modules/dblog/tests/src/Kernel/Views/ViewsIntegrationTest.php
+++ b/core/modules/dblog/tests/src/Kernel/Views/ViewsIntegrationTest.php
@@ -50,7 +50,7 @@ protected function setUp($import_test_views = TRUE): void {
   /**
    * Tests the messages escaping functionality.
    */
-  public function testMessages() {
+  public function testMessages(): void {
 
     // Remove the watchdog entries added by the potential batch process.
     $this->container->get('database')->truncate('watchdog')->execute();
@@ -94,7 +94,7 @@ public function testMessages() {
   /**
    * Tests the relationship with the users_field_data table.
    */
-  public function testRelationship() {
+  public function testRelationship(): void {
     $view = Views::getView('dblog_integration_test');
     $view->setDisplay('page_1');
     // The uid relationship should now join to the {users_field_data} table.
@@ -107,7 +107,7 @@ public function testRelationship() {
   /**
    * Tests views can be filtered by severity and log type.
    */
-  public function testFiltering() {
+  public function testFiltering(): void {
     // Remove the watchdog entries added by the potential batch process.
     $this->container->get('database')->truncate('watchdog')->execute();
     $this->createLogEntries();
diff --git a/core/modules/dynamic_page_cache/tests/src/Functional/DynamicPageCacheIntegrationTest.php b/core/modules/dynamic_page_cache/tests/src/Functional/DynamicPageCacheIntegrationTest.php
index a41b01735fe4..93ac6ba1e614 100644
--- a/core/modules/dynamic_page_cache/tests/src/Functional/DynamicPageCacheIntegrationTest.php
+++ b/core/modules/dynamic_page_cache/tests/src/Functional/DynamicPageCacheIntegrationTest.php
@@ -48,7 +48,7 @@ protected function setUp(): void {
   /**
    * Tests that Dynamic Page Cache works correctly, and verifies the edge cases.
    */
-  public function testDynamicPageCache() {
+  public function testDynamicPageCache(): void {
     // Controllers returning plain response objects are ignored by Dynamic Page
     // Cache.
     $url = Url::fromUri('route:dynamic_page_cache_test.response');
diff --git a/core/modules/editor/tests/src/Functional/EditorAdminTest.php b/core/modules/editor/tests/src/Functional/EditorAdminTest.php
index 67a648876b24..8a7091281877 100644
--- a/core/modules/editor/tests/src/Functional/EditorAdminTest.php
+++ b/core/modules/editor/tests/src/Functional/EditorAdminTest.php
@@ -58,7 +58,7 @@ protected function setUp(): void {
   /**
    * Tests an existing format without any editors available.
    */
-  public function testNoEditorAvailable() {
+  public function testNoEditorAvailable(): void {
     $this->drupalLogin($this->adminUser);
     $this->drupalGet('admin/config/content/formats/manage/filtered_html');
 
@@ -82,7 +82,7 @@ public function testNoEditorAvailable() {
   /**
    * Tests adding a text editor to an existing text format.
    */
-  public function testAddEditorToExistingFormat() {
+  public function testAddEditorToExistingFormat(): void {
     $this->enableUnicornEditor();
     $this->drupalLogin($this->adminUser);
     $this->drupalGet('admin/config/content/formats/manage/filtered_html');
@@ -103,7 +103,7 @@ public function testAddEditorToExistingFormat() {
   /**
    * Tests adding a text editor to a new text format.
    */
-  public function testAddEditorToNewFormat() {
+  public function testAddEditorToNewFormat(): void {
     $this->addEditorToNewFormat('monoceros', 'Monoceros');
     $this->verifyUnicornEditorConfiguration('monoceros');
   }
@@ -111,7 +111,7 @@ public function testAddEditorToNewFormat() {
   /**
    * Tests format disabling.
    */
-  public function testDisableFormatWithEditor() {
+  public function testDisableFormatWithEditor(): void {
     $formats = ['monoceros' => 'Monoceros', 'tattoo' => 'Tattoo'];
 
     // Install the node module.
@@ -161,7 +161,7 @@ public function testDisableFormatWithEditor() {
   /**
    * Tests switching text editor to none does not throw a TypeError.
    */
-  public function testSwitchEditorToNone() {
+  public function testSwitchEditorToNone(): void {
     $this->enableUnicornEditor();
     $this->drupalLogin($this->adminUser);
     $this->drupalGet('admin/config/content/formats/manage/filtered_html');
diff --git a/core/modules/editor/tests/src/Functional/EditorLoadingTest.php b/core/modules/editor/tests/src/Functional/EditorLoadingTest.php
index 5b08b95f8eb0..49bbfee754ec 100644
--- a/core/modules/editor/tests/src/Functional/EditorLoadingTest.php
+++ b/core/modules/editor/tests/src/Functional/EditorLoadingTest.php
@@ -132,7 +132,7 @@ protected function setUp(): void {
   /**
    * Tests loading of text editors.
    */
-  public function testLoading() {
+  public function testLoading(): void {
     // Only associate a text editor with the "Full HTML" text format.
     $editor = Editor::create([
       'format' => 'full_html',
@@ -247,7 +247,7 @@ public function testLoading() {
   /**
    * Tests supported element types.
    */
-  public function testSupportedElementTypes() {
+  public function testSupportedElementTypes(): void {
     // Associate the unicorn text editor with the "Full HTML" text format.
     $editor = Editor::create([
       'format' => 'full_html',
diff --git a/core/modules/editor/tests/src/Functional/EditorPrivateFileReferenceFilterTest.php b/core/modules/editor/tests/src/Functional/EditorPrivateFileReferenceFilterTest.php
index 5dcea7ee3f57..d838b476c99a 100644
--- a/core/modules/editor/tests/src/Functional/EditorPrivateFileReferenceFilterTest.php
+++ b/core/modules/editor/tests/src/Functional/EditorPrivateFileReferenceFilterTest.php
@@ -42,7 +42,7 @@ class EditorPrivateFileReferenceFilterTest extends BrowserTestBase {
   /**
    * Tests the editor file reference filter with private files.
    */
-  public function testEditorPrivateFileReferenceFilter() {
+  public function testEditorPrivateFileReferenceFilter(): void {
     $author = $this->drupalCreateUser();
     $this->drupalLogin($author);
 
diff --git a/core/modules/editor/tests/src/Functional/EditorSecurityTest.php b/core/modules/editor/tests/src/Functional/EditorSecurityTest.php
index 619fff339a4d..79a96944fb05 100644
--- a/core/modules/editor/tests/src/Functional/EditorSecurityTest.php
+++ b/core/modules/editor/tests/src/Functional/EditorSecurityTest.php
@@ -239,7 +239,7 @@ protected function setUp(): void {
    *
    * Tests 8 scenarios. Tests only with a text editor that is not XSS-safe.
    */
-  public function testInitialSecurity() {
+  public function testInitialSecurity(): void {
     $expected = [
       [
         'node_id' => 1,
@@ -315,7 +315,7 @@ public function testInitialSecurity() {
    * format and contains a <script> tag to the Full HTML text format, the
    * <script> tag would be executed. Unless we apply appropriate filtering.
    */
-  public function testSwitchingSecurity() {
+  public function testSwitchingSecurity(): void {
     $expected = [
       [
         'node_id' => 1,
@@ -441,7 +441,7 @@ public function testSwitchingSecurity() {
   /**
    * Tests the standard text editor XSS filter being overridden.
    */
-  public function testEditorXssFilterOverride() {
+  public function testEditorXssFilterOverride(): void {
     // First: the Standard text editor XSS filter.
     $this->drupalLogin($this->normalUser);
     $this->drupalGet('node/2/edit');
diff --git a/core/modules/editor/tests/src/FunctionalJavascript/EditorAdminTest.php b/core/modules/editor/tests/src/FunctionalJavascript/EditorAdminTest.php
index d83d594c3e11..25a1e9869d56 100644
--- a/core/modules/editor/tests/src/FunctionalJavascript/EditorAdminTest.php
+++ b/core/modules/editor/tests/src/FunctionalJavascript/EditorAdminTest.php
@@ -47,7 +47,7 @@ protected function setUp(): void {
   /**
    * Tests that editor selection can be toggled without breaking ajax.
    */
-  public function testEditorSelection() {
+  public function testEditorSelection(): void {
     $page = $this->getSession()->getPage();
     $assert_session = $this->assertSession();
 
@@ -75,7 +75,7 @@ public function testEditorSelection() {
    * because the form state must change accordingly.
    * @see https://www.drupal.org/project/drupal/issues/3230829
    */
-  public function testEditorCreation() {
+  public function testEditorCreation(): void {
     $page = $this->getSession()->getPage();
     $assert_session = $this->assertSession();
 
diff --git a/core/modules/editor/tests/src/Kernel/EditorFileReferenceFilterTest.php b/core/modules/editor/tests/src/Kernel/EditorFileReferenceFilterTest.php
index 6f5218ef10a2..62bf8573f023 100644
--- a/core/modules/editor/tests/src/Kernel/EditorFileReferenceFilterTest.php
+++ b/core/modules/editor/tests/src/Kernel/EditorFileReferenceFilterTest.php
@@ -56,7 +56,7 @@ protected function setUp(): void {
   /**
    * Tests the editor file reference filter.
    */
-  public function testEditorFileReferenceFilter() {
+  public function testEditorFileReferenceFilter(): void {
     $filter = $this->filters['editor_file_reference'];
 
     $test = function ($input) use ($filter) {
diff --git a/core/modules/editor/tests/src/Kernel/EditorFileUsageTest.php b/core/modules/editor/tests/src/Kernel/EditorFileUsageTest.php
index 826710f04a5f..fa29a8471dc4 100644
--- a/core/modules/editor/tests/src/Kernel/EditorFileUsageTest.php
+++ b/core/modules/editor/tests/src/Kernel/EditorFileUsageTest.php
@@ -83,7 +83,7 @@ protected function setUp(): void {
   /**
    * Tests file save operations when node with referenced files is saved.
    */
-  public function testFileSaveOperations() {
+  public function testFileSaveOperations(): void {
     $permanent_image = File::create([
       'uri' => 'core/misc/druplicon.png',
       'status' => 1,
@@ -122,7 +122,7 @@ public function testFileSaveOperations() {
   /**
    * Tests the configurable text editor manager.
    */
-  public function testEditorEntityHooks() {
+  public function testEditorEntityHooks(): void {
     $image_paths = [
       0 => 'core/misc/druplicon.png',
       1 => 'core/misc/tree.png',
diff --git a/core/modules/editor/tests/src/Kernel/EditorFilterIntegrationTest.php b/core/modules/editor/tests/src/Kernel/EditorFilterIntegrationTest.php
index c8a108d4a9c2..b9423e04ab92 100644
--- a/core/modules/editor/tests/src/Kernel/EditorFilterIntegrationTest.php
+++ b/core/modules/editor/tests/src/Kernel/EditorFilterIntegrationTest.php
@@ -23,7 +23,7 @@ class EditorFilterIntegrationTest extends KernelTestBase {
   /**
    * Tests text format removal or disabling.
    */
-  public function testTextFormatIntegration() {
+  public function testTextFormatIntegration(): void {
     // Create an arbitrary text format.
     $format = FilterFormat::create([
       'format' => $this->randomMachineName(),
diff --git a/core/modules/editor/tests/src/Kernel/EditorManagerTest.php b/core/modules/editor/tests/src/Kernel/EditorManagerTest.php
index f57654d7b505..3eb105a1f459 100644
--- a/core/modules/editor/tests/src/Kernel/EditorManagerTest.php
+++ b/core/modules/editor/tests/src/Kernel/EditorManagerTest.php
@@ -57,7 +57,7 @@ protected function setUp(): void {
   /**
    * Tests the configurable text editor manager.
    */
-  public function testManager() {
+  public function testManager(): void {
     $this->editorManager = $this->container->get('plugin.manager.editor');
 
     // Case 1: no text editor available:
diff --git a/core/modules/editor/tests/src/Kernel/EntityUpdateTest.php b/core/modules/editor/tests/src/Kernel/EntityUpdateTest.php
index 067fa46fabc7..413c371540db 100644
--- a/core/modules/editor/tests/src/Kernel/EntityUpdateTest.php
+++ b/core/modules/editor/tests/src/Kernel/EntityUpdateTest.php
@@ -46,7 +46,7 @@ protected function setUp(): void {
    *
    * @see editor_test_entity_update()
    */
-  public function testEntityUpdate() {
+  public function testEntityUpdate(): void {
     // Create a node.
     $node = Node::create([
       'type' => 'page',
diff --git a/core/modules/editor/tests/src/Unit/EditorConfigEntityUnitTest.php b/core/modules/editor/tests/src/Unit/EditorConfigEntityUnitTest.php
index ac7af5b79d54..b33fe90d22b3 100644
--- a/core/modules/editor/tests/src/Unit/EditorConfigEntityUnitTest.php
+++ b/core/modules/editor/tests/src/Unit/EditorConfigEntityUnitTest.php
@@ -93,7 +93,7 @@ protected function setUp(): void {
   /**
    * @covers ::calculateDependencies
    */
-  public function testCalculateDependencies() {
+  public function testCalculateDependencies(): void {
     $format_id = 'filter.format.test';
     $values = ['editor' => $this->editorId, 'format' => $format_id];
 
diff --git a/core/modules/editor/tests/src/Unit/EditorXssFilter/StandardTest.php b/core/modules/editor/tests/src/Unit/EditorXssFilter/StandardTest.php
index 60ad4d94a1bb..30adc3dbc601 100644
--- a/core/modules/editor/tests/src/Unit/EditorXssFilter/StandardTest.php
+++ b/core/modules/editor/tests/src/Unit/EditorXssFilter/StandardTest.php
@@ -539,7 +539,7 @@ public static function providerTestFilterXss() {
    *
    * @dataProvider providerTestFilterXss
    */
-  public function testFilterXss($input, $expected_output) {
+  public function testFilterXss($input, $expected_output): void {
     $output = Standard::filterXss($input, $this->format);
     $this->assertSame($expected_output, $output);
   }
@@ -563,7 +563,7 @@ public function testFilterXss($input, $expected_output) {
    *
    * @dataProvider providerTestBlackListMode
    */
-  public function testBlacklistMode($value, $expected, $message, array $disallowed_tags) {
+  public function testBlacklistMode($value, $expected, $message, array $disallowed_tags): void {
     $value = Standard::filter($value, $disallowed_tags);
     $this->assertSame($expected, $value, $message);
   }
diff --git a/core/modules/field/tests/src/Functional/Boolean/BooleanFieldTest.php b/core/modules/field/tests/src/Functional/Boolean/BooleanFieldTest.php
index 3d2145afc617..6306f66a50a0 100644
--- a/core/modules/field/tests/src/Functional/Boolean/BooleanFieldTest.php
+++ b/core/modules/field/tests/src/Functional/Boolean/BooleanFieldTest.php
@@ -64,7 +64,7 @@ protected function setUp(): void {
   /**
    * Tests boolean field.
    */
-  public function testBooleanField() {
+  public function testBooleanField(): void {
     $on = $this->randomMachineName();
     $off = $this->randomMachineName();
     $label = $this->randomMachineName();
@@ -185,7 +185,7 @@ public function testBooleanField() {
   /**
    * Tests field access.
    */
-  public function testFormAccess() {
+  public function testFormAccess(): void {
     $on = 'boolean_on';
     $off = 'boolean_off';
     $label = 'boolean_label';
diff --git a/core/modules/field/tests/src/Functional/Boolean/BooleanFormatterSettingsTest.php b/core/modules/field/tests/src/Functional/Boolean/BooleanFormatterSettingsTest.php
index bab7cd360513..266c3dbbb9f6 100644
--- a/core/modules/field/tests/src/Functional/Boolean/BooleanFormatterSettingsTest.php
+++ b/core/modules/field/tests/src/Functional/Boolean/BooleanFormatterSettingsTest.php
@@ -90,7 +90,7 @@ protected function setUp(): void {
   /**
    * Tests the formatter settings page for the Boolean formatter.
    */
-  public function testBooleanFormatterSettings() {
+  public function testBooleanFormatterSettings(): void {
     // List the options we expect to see on the settings form. Omit the one
     // with the Unicode check/x characters, which does not appear to work
     // well in BrowserTestBase.
diff --git a/core/modules/field/tests/src/Functional/Email/EmailFieldTest.php b/core/modules/field/tests/src/Functional/Email/EmailFieldTest.php
index f9d04093c429..cf024258ea48 100644
--- a/core/modules/field/tests/src/Functional/Email/EmailFieldTest.php
+++ b/core/modules/field/tests/src/Functional/Email/EmailFieldTest.php
@@ -58,7 +58,7 @@ protected function setUp(): void {
   /**
    * Tests email field.
    */
-  public function testEmailField() {
+  public function testEmailField(): void {
     // Create a field with settings to validate.
     $field_name = $this->randomMachineName();
     $this->fieldStorage = FieldStorageConfig::create([
diff --git a/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceAdminTest.php b/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceAdminTest.php
index 2301a68fdbef..58272b6eca8c 100644
--- a/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceAdminTest.php
+++ b/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceAdminTest.php
@@ -79,7 +79,7 @@ protected function setUp(): void {
   /**
    * Tests the Entity Reference Admin UI.
    */
-  public function testFieldAdminHandler() {
+  public function testFieldAdminHandler(): void {
     $bundle_path = 'admin/structure/types/manage/' . $this->type;
     // Create a new view and display it as an entity reference.
     $edit = [
@@ -260,7 +260,7 @@ public function testFieldAdminHandler() {
   /**
    * Tests the formatters for the Entity References.
    */
-  public function testAvailableFormatters() {
+  public function testAvailableFormatters(): void {
     // Create a new vocabulary.
     Vocabulary::create(['vid' => 'tags', 'name' => 'tags'])->save();
 
@@ -321,7 +321,7 @@ public function testAvailableFormatters() {
    * The tested entity reference field has multiple target bundles and is set
    * to auto-create the target entity.
    */
-  public function testMultipleTargetBundles() {
+  public function testMultipleTargetBundles(): void {
     /** @var \Drupal\taxonomy\Entity\Vocabulary[] $vocabularies */
     $vocabularies = [];
     for ($i = 0; $i < 2; $i++) {
diff --git a/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceAutoCreateTest.php b/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceAutoCreateTest.php
index b7305cb0c5c8..5de1e0a9b8bc 100644
--- a/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceAutoCreateTest.php
+++ b/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceAutoCreateTest.php
@@ -107,7 +107,7 @@ protected function setUp(): void {
   /**
    * Tests the autocomplete input element and entity auto-creation.
    */
-  public function testAutoCreate() {
+  public function testAutoCreate(): void {
     $this->drupalGet('node/add/' . $this->referencingType);
     $target = $this->assertSession()->fieldExists("edit-test-field-0-target-id");
     $this->assertTrue($target->hasClass("form-autocomplete"));
@@ -160,7 +160,7 @@ public function testAutoCreate() {
    * Tests if an entity reference field having multiple target bundles is
    * storing the auto-created entity in the right destination.
    */
-  public function testMultipleTargetBundles() {
+  public function testMultipleTargetBundles(): void {
     /** @var \Drupal\taxonomy\Entity\Vocabulary[] $vocabularies */
     $vocabularies = [];
     for ($i = 0; $i < 2; $i++) {
@@ -255,7 +255,7 @@ public function testMultipleTargetBundles() {
   /**
    * Tests autocreation for an entity that has no bundles.
    */
-  public function testNoBundles() {
+  public function testNoBundles(): void {
     $account = $this->drupalCreateUser([
       'access content',
       "create $this->referencingType content",
diff --git a/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceFieldDefaultValueTest.php b/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceFieldDefaultValueTest.php
index 229306a44d8c..86daa6d1a101 100644
--- a/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceFieldDefaultValueTest.php
+++ b/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceFieldDefaultValueTest.php
@@ -62,7 +62,7 @@ protected function setUp(): void {
   /**
    * Tests that default values are correctly translated to UUIDs in config.
    */
-  public function testEntityReferenceDefaultValue() {
+  public function testEntityReferenceDefaultValue(): void {
     // Create a node to be referenced.
     $referenced_node = $this->drupalCreateNode(['type' => 'referenced_content']);
 
@@ -126,7 +126,7 @@ public function testEntityReferenceDefaultValue() {
    *
    * @see \Drupal\Core\Field\Plugin\Field\FieldType\EntityReferenceItem::onDependencyRemoval()
    */
-  public function testEntityReferenceDefaultConfigValue() {
+  public function testEntityReferenceDefaultConfigValue(): void {
     // Create a node to be referenced.
     $referenced_node_type = $this->drupalCreateContentType(['type' => 'referenced_config_to_delete']);
     $referenced_node_type2 = $this->drupalCreateContentType(['type' => 'referenced_config_to_preserve']);
diff --git a/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceFieldTranslatedReferenceViewTest.php b/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceFieldTranslatedReferenceViewTest.php
index 864223fd5829..777dc86b0e01 100644
--- a/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceFieldTranslatedReferenceViewTest.php
+++ b/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceFieldTranslatedReferenceViewTest.php
@@ -163,7 +163,7 @@ protected function setUp(): void {
   /**
    * Tests if the entity is displayed in an entity reference field.
    */
-  public function testEntityReferenceDisplay() {
+  public function testEntityReferenceDisplay(): void {
     // Create a translated referrer entity.
     $this->referrerEntity = $this->createReferrerEntity();
     $this->assertEntityReferenceDisplay();
diff --git a/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceFileUploadTest.php b/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceFileUploadTest.php
index 74f9920d73b1..d18cfb1cafc9 100644
--- a/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceFileUploadTest.php
+++ b/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceFileUploadTest.php
@@ -125,7 +125,7 @@ protected function setUp(): void {
   /**
    * Tests that the autocomplete input element does not cause ajax fatal.
    */
-  public function testFileUpload() {
+  public function testFileUpload(): void {
     $user1 = $this->drupalCreateUser([
       'access content',
       "create $this->referencingType content",
diff --git a/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceIntegrationTest.php b/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceIntegrationTest.php
index 302466b86917..ce2f385a8b4a 100644
--- a/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceIntegrationTest.php
+++ b/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceIntegrationTest.php
@@ -71,7 +71,7 @@ protected function setUp(): void {
   /**
    * Tests the entity reference field with all its supported field widgets.
    */
-  public function testSupportedEntityTypesAndWidgets() {
+  public function testSupportedEntityTypesAndWidgets(): void {
     foreach ($this->getTestEntities() as $key => $referenced_entities) {
       $this->fieldName = 'field_test_' . $referenced_entities[0]->getEntityTypeId();
 
diff --git a/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceXSSTest.php b/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceXSSTest.php
index 6017fb4059fe..5bb52d6206f1 100644
--- a/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceXSSTest.php
+++ b/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceXSSTest.php
@@ -41,7 +41,7 @@ class EntityReferenceXSSTest extends BrowserTestBase {
   /**
    * Tests markup is escaped in the entity reference select and label formatter.
    */
-  public function testEntityReferenceXSS() {
+  public function testEntityReferenceXSS(): void {
     $this->drupalCreateContentType(['type' => 'article']);
 
     // Create a node with markup in the title.
diff --git a/core/modules/field/tests/src/Functional/EntityReference/Views/SelectionTest.php b/core/modules/field/tests/src/Functional/EntityReference/Views/SelectionTest.php
index ea0fa36604cb..d0a167608dd6 100644
--- a/core/modules/field/tests/src/Functional/EntityReference/Views/SelectionTest.php
+++ b/core/modules/field/tests/src/Functional/EntityReference/Views/SelectionTest.php
@@ -86,7 +86,7 @@ protected function setUp(): void {
   /**
    * Tests that the Views selection handles the views output properly.
    */
-  public function testAutocompleteOutput() {
+  public function testAutocompleteOutput(): void {
     // Reset any internal static caching.
     \Drupal::service('entity_type.manager')->getStorage('node')->resetCache();
 
diff --git a/core/modules/field/tests/src/Functional/FieldAccessTest.php b/core/modules/field/tests/src/Functional/FieldAccessTest.php
index 47b1ebc6091b..6a357184b73f 100644
--- a/core/modules/field/tests/src/Functional/FieldAccessTest.php
+++ b/core/modules/field/tests/src/Functional/FieldAccessTest.php
@@ -86,7 +86,7 @@ protected function setUp(): void {
   /**
    * Tests that hook_entity_field_access() is called.
    */
-  public function testFieldAccess() {
+  public function testFieldAccess(): void {
 
     // Assert the text is visible.
     $this->drupalGet('node/' . $this->node->id());
diff --git a/core/modules/field/tests/src/Functional/FieldDefaultValueCallbackTest.php b/core/modules/field/tests/src/Functional/FieldDefaultValueCallbackTest.php
index 41537e37c8d8..f9405facbc69 100644
--- a/core/modules/field/tests/src/Functional/FieldDefaultValueCallbackTest.php
+++ b/core/modules/field/tests/src/Functional/FieldDefaultValueCallbackTest.php
@@ -60,7 +60,7 @@ protected function setUp(): void {
 
   }
 
-  public function testDefaultValueCallbackForm() {
+  public function testDefaultValueCallbackForm(): void {
     // Create a field and storage for checking.
     /** @var \Drupal\field\Entity\FieldStorageConfig $field_storage */
     FieldStorageConfig::create([
diff --git a/core/modules/field/tests/src/Functional/FieldHelpTest.php b/core/modules/field/tests/src/Functional/FieldHelpTest.php
index 40a2a07811de..14991493a283 100644
--- a/core/modules/field/tests/src/Functional/FieldHelpTest.php
+++ b/core/modules/field/tests/src/Functional/FieldHelpTest.php
@@ -46,7 +46,7 @@ protected function setUp(): void {
   /**
    * Tests the Field module's help page.
    */
-  public function testFieldHelp() {
+  public function testFieldHelp(): void {
     // Log in the admin user.
     $this->drupalLogin($this->adminUser);
 
diff --git a/core/modules/field/tests/src/Functional/FieldImportDeleteUninstallUiTest.php b/core/modules/field/tests/src/Functional/FieldImportDeleteUninstallUiTest.php
index ed065630965b..c7dbb38eeacd 100644
--- a/core/modules/field/tests/src/Functional/FieldImportDeleteUninstallUiTest.php
+++ b/core/modules/field/tests/src/Functional/FieldImportDeleteUninstallUiTest.php
@@ -48,7 +48,7 @@ protected function setUp(): void {
   /**
    * Tests deleting field storages and fields as part of config import.
    */
-  public function testImportDeleteUninstall() {
+  public function testImportDeleteUninstall(): void {
     // Create a telephone field.
     $field_storage = FieldStorageConfig::create([
       'field_name' => 'field_tel',
diff --git a/core/modules/field/tests/src/Functional/FormTest.php b/core/modules/field/tests/src/Functional/FormTest.php
index aed41e76c27e..80fcfd6198c3 100644
--- a/core/modules/field/tests/src/Functional/FormTest.php
+++ b/core/modules/field/tests/src/Functional/FormTest.php
@@ -113,7 +113,7 @@ protected function setUp(): void {
     ];
   }
 
-  public function testFieldFormSingle() {
+  public function testFieldFormSingle(): void {
     $field_storage = $this->fieldStorageSingle;
     $field_name = $field_storage['field_name'];
     $this->field['field_name'] = $field_name;
@@ -195,7 +195,7 @@ public function testFieldFormSingle() {
   /**
    * Tests field widget default values on entity forms.
    */
-  public function testFieldFormDefaultValue() {
+  public function testFieldFormDefaultValue(): void {
     $field_storage = $this->fieldStorageSingle;
     $field_name = $field_storage['field_name'];
     $this->field['field_name'] = $field_name;
@@ -225,7 +225,7 @@ public function testFieldFormDefaultValue() {
     $this->assertTrue($entity->{$field_name}->isEmpty(), 'Field is now empty.');
   }
 
-  public function testFieldFormSingleRequired() {
+  public function testFieldFormSingleRequired(): void {
     $field_storage = $this->fieldStorageSingle;
     $field_name = $field_storage['field_name'];
     $this->field['field_name'] = $field_name;
@@ -265,7 +265,7 @@ public function testFieldFormSingleRequired() {
     $this->assertSession()->pageTextContains("{$this->field['label']} field is required.");
   }
 
-  public function testFieldFormUnlimited() {
+  public function testFieldFormUnlimited(): void {
     $field_storage = $this->fieldStorageUnlimited;
     $field_name = $field_storage['field_name'];
     $this->field['field_name'] = $field_name;
@@ -360,7 +360,7 @@ public function testFieldFormUnlimited() {
   /**
    * Tests the position of the required label.
    */
-  public function testFieldFormUnlimitedRequired() {
+  public function testFieldFormUnlimitedRequired(): void {
     $field_name = $this->fieldStorageUnlimited['field_name'];
     $this->field['field_name'] = $field_name;
     $this->field['required'] = TRUE;
@@ -384,7 +384,7 @@ public function testFieldFormUnlimitedRequired() {
   /**
    * Tests widget handling of multiple required radios.
    */
-  public function testFieldFormMultivalueWithRequiredRadio() {
+  public function testFieldFormMultivalueWithRequiredRadio(): void {
     /** @var \Drupal\Core\Entity\EntityDisplayRepositoryInterface $display_repository */
     $display_repository = \Drupal::service('entity_display.repository');
 
@@ -439,7 +439,7 @@ public function testFieldFormMultivalueWithRequiredRadio() {
   /**
    * Tests widgets handling multiple values.
    */
-  public function testFieldFormMultipleWidget() {
+  public function testFieldFormMultipleWidget(): void {
     // Create a field with fixed cardinality, configure the form to use a
     // "multiple" widget.
     $field_storage = $this->fieldStorageMultiple;
@@ -495,7 +495,7 @@ public function testFieldFormMultipleWidget() {
   /**
    * Tests fields with no 'edit' access.
    */
-  public function testFieldFormAccess() {
+  public function testFieldFormAccess(): void {
     /** @var \Drupal\Core\Entity\EntityDisplayRepositoryInterface $display_repository */
     $display_repository = \Drupal::service('entity_display.repository');
 
@@ -593,7 +593,7 @@ public function testFieldFormAccess() {
   /**
    * Tests hiding a field in a form.
    */
-  public function testHiddenField() {
+  public function testHiddenField(): void {
     $entity_type = 'entity_test_rev';
     $field_storage = $this->fieldStorageSingle;
     $field_storage['entity_type'] = $entity_type;
@@ -668,7 +668,7 @@ public function testHiddenField() {
   /**
    * Tests the form display of the label for multi-value fields.
    */
-  public function testLabelOnMultiValueFields() {
+  public function testLabelOnMultiValueFields(): void {
     $user = $this->drupalCreateUser(['administer entity_test content']);
     $this->drupalLogin($user);
 
@@ -707,28 +707,28 @@ public function testLabelOnMultiValueFields() {
   /**
    * Tests hook_field_widget_complete_form_alter().
    */
-  public function testFieldFormMultipleWidgetAlter() {
+  public function testFieldFormMultipleWidgetAlter(): void {
     $this->widgetAlterTest('hook_field_widget_complete_form_alter', 'test_field_widget_multiple');
   }
 
   /**
    * Tests hook_field_widget_complete_form_alter() with single value elements.
    */
-  public function testFieldFormMultipleWidgetAlterSingleValues() {
+  public function testFieldFormMultipleWidgetAlterSingleValues(): void {
     $this->widgetAlterTest('hook_field_widget_complete_form_alter', 'test_field_widget_multiple_single_value');
   }
 
   /**
    * Tests hook_field_widget_complete_WIDGET_TYPE_form_alter().
    */
-  public function testFieldFormMultipleWidgetTypeAlter() {
+  public function testFieldFormMultipleWidgetTypeAlter(): void {
     $this->widgetAlterTest('hook_field_widget_complete_WIDGET_TYPE_form_alter', 'test_field_widget_multiple');
   }
 
   /**
    * Tests hook_field_widget_complete_WIDGET_TYPE_form_alter() with single value elements.
    */
-  public function testFieldFormMultipleWidgetTypeAlterSingleValues() {
+  public function testFieldFormMultipleWidgetTypeAlterSingleValues(): void {
     $this->widgetAlterTest('hook_field_widget_complete_WIDGET_TYPE_form_alter', 'test_field_widget_multiple_single_value');
   }
 
diff --git a/core/modules/field/tests/src/Functional/FunctionalString/StringFieldTest.php b/core/modules/field/tests/src/Functional/FunctionalString/StringFieldTest.php
index 2484584441f3..bb8b98eb8c8b 100644
--- a/core/modules/field/tests/src/Functional/FunctionalString/StringFieldTest.php
+++ b/core/modules/field/tests/src/Functional/FunctionalString/StringFieldTest.php
@@ -55,7 +55,7 @@ protected function setUp(): void {
   /**
    * Tests widgets.
    */
-  public function testTextfieldWidgets() {
+  public function testTextfieldWidgets(): void {
     $this->_testTextfieldWidgets('string', 'string_textfield');
     $this->_testTextfieldWidgets('string_long', 'string_textarea');
   }
diff --git a/core/modules/field/tests/src/Functional/NestedFormTest.php b/core/modules/field/tests/src/Functional/NestedFormTest.php
index 1d981dfc8991..d0c7703b94a0 100644
--- a/core/modules/field/tests/src/Functional/NestedFormTest.php
+++ b/core/modules/field/tests/src/Functional/NestedFormTest.php
@@ -81,7 +81,7 @@ protected function setUp(): void {
   /**
    * Tests Field API form integration within a subform.
    */
-  public function testNestedFieldForm() {
+  public function testNestedFieldForm(): void {
     /** @var \Drupal\Core\Entity\EntityDisplayRepositoryInterface $display_repository */
     $display_repository = \Drupal::service('entity_display.repository');
 
@@ -203,7 +203,7 @@ public function testNestedFieldForm() {
   /**
    * Tests entity level validation within subforms.
    */
-  public function testNestedEntityFormEntityLevelValidation() {
+  public function testNestedEntityFormEntityLevelValidation(): void {
     // Create two entities.
     $storage = $this->container->get('entity_type.manager')
       ->getStorage('entity_test_constraints');
diff --git a/core/modules/field/tests/src/Functional/Number/NumberFieldTest.php b/core/modules/field/tests/src/Functional/Number/NumberFieldTest.php
index 51ea7bdcf8ab..8ddf0b9e18d7 100644
--- a/core/modules/field/tests/src/Functional/Number/NumberFieldTest.php
+++ b/core/modules/field/tests/src/Functional/Number/NumberFieldTest.php
@@ -48,7 +48,7 @@ protected function setUp(): void {
   /**
    * Tests decimal field.
    */
-  public function testNumberDecimalField() {
+  public function testNumberDecimalField(): void {
     // Create a field with settings to validate.
     $field_name = $this->randomMachineName();
     FieldStorageConfig::create([
@@ -136,7 +136,7 @@ public function testNumberDecimalField() {
   /**
    * Tests integer field.
    */
-  public function testNumberIntegerField() {
+  public function testNumberIntegerField(): void {
     $minimum = rand(-4000, -2000);
     $maximum = rand(2000, 4000);
 
@@ -302,7 +302,7 @@ public function testNumberIntegerField() {
   /**
    * Tests float field.
    */
-  public function testNumberFloatField() {
+  public function testNumberFloatField(): void {
     // Create a field with settings to validate.
     $field_name = $this->randomMachineName();
     FieldStorageConfig::create([
@@ -395,7 +395,7 @@ public function testNumberFloatField() {
   /**
    * Tests setting the minimum value of a float field through the interface.
    */
-  public function testCreateNumberFloatField() {
+  public function testCreateNumberFloatField(): void {
     // Create a float field.
     $field_name = $this->randomMachineName();
     FieldStorageConfig::create([
@@ -420,7 +420,7 @@ public function testCreateNumberFloatField() {
   /**
    * Tests setting the minimum value of a decimal field through the interface.
    */
-  public function testCreateNumberDecimalField() {
+  public function testCreateNumberDecimalField(): void {
     // Create a decimal field.
     $field_name = $this->randomMachineName();
     FieldStorageConfig::create([
diff --git a/core/modules/field/tests/src/Functional/ReEnableModuleFieldTest.php b/core/modules/field/tests/src/Functional/ReEnableModuleFieldTest.php
index 957c7c91b5c6..56668ca3214b 100644
--- a/core/modules/field/tests/src/Functional/ReEnableModuleFieldTest.php
+++ b/core/modules/field/tests/src/Functional/ReEnableModuleFieldTest.php
@@ -54,7 +54,7 @@ protected function setUp(): void {
    *
    * @see field_system_info_alter()
    */
-  public function testReEnabledField() {
+  public function testReEnabledField(): void {
     // Add a telephone field to the article content type.
     $field_storage = FieldStorageConfig::create([
       'field_name' => 'field_telephone',
diff --git a/core/modules/field/tests/src/Functional/TranslationWebTest.php b/core/modules/field/tests/src/Functional/TranslationWebTest.php
index 2593984dedb0..ecdae5e52431 100644
--- a/core/modules/field/tests/src/Functional/TranslationWebTest.php
+++ b/core/modules/field/tests/src/Functional/TranslationWebTest.php
@@ -95,7 +95,7 @@ protected function setUp(): void {
   /**
    * Tests field translations when creating a new revision.
    */
-  public function testFieldFormTranslationRevisions() {
+  public function testFieldFormTranslationRevisions(): void {
     $web_user = $this->drupalCreateUser([
       'view test entity',
       'administer entity_test content',
diff --git a/core/modules/field/tests/src/Functional/Views/FieldUITest.php b/core/modules/field/tests/src/Functional/Views/FieldUITest.php
index df2f79551fdb..e96d17bb2823 100644
--- a/core/modules/field/tests/src/Functional/Views/FieldUITest.php
+++ b/core/modules/field/tests/src/Functional/Views/FieldUITest.php
@@ -58,7 +58,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['field_test_view
   /**
    * Tests basic field handler settings in the UI.
    */
-  public function testHandlerUI() {
+  public function testHandlerUI(): void {
     $url = "admin/structure/views/nojs/handler/test_view_fieldapi/default/field/field_name_0";
     $this->drupalGet($url);
 
@@ -107,7 +107,7 @@ public function testHandlerUI() {
   /**
    * Tests the basic field handler form when aggregation is enabled.
    */
-  public function testHandlerUIAggregation() {
+  public function testHandlerUIAggregation(): void {
     // Enable aggregation.
     $edit = ['group_by' => '1'];
     $this->drupalGet('admin/structure/views/nojs/display/test_view_fieldapi/default/group_by');
@@ -129,7 +129,7 @@ public function testHandlerUIAggregation() {
   /**
    * Tests adding a boolean field filter handler.
    */
-  public function testBooleanFilterHandler() {
+  public function testBooleanFilterHandler(): void {
     // Create a boolean field.
     $field_name = 'field_boolean';
     $field_storage = FieldStorageConfig::create([
diff --git a/core/modules/field/tests/src/FunctionalJavascript/Boolean/BooleanFormatterSettingsTest.php b/core/modules/field/tests/src/FunctionalJavascript/Boolean/BooleanFormatterSettingsTest.php
index 47c31b320c95..085f11cd41ec 100644
--- a/core/modules/field/tests/src/FunctionalJavascript/Boolean/BooleanFormatterSettingsTest.php
+++ b/core/modules/field/tests/src/FunctionalJavascript/Boolean/BooleanFormatterSettingsTest.php
@@ -89,7 +89,7 @@ protected function setUp(): void {
   /**
    * Tests the formatter settings page for the Boolean formatter.
    */
-  public function testBooleanFormatterSettings() {
+  public function testBooleanFormatterSettings(): void {
     // List the options we expect to see on the settings form. Omit the one
     // with the Unicode check/x characters, which does not appear to work
     // well in BrowserTestBase.
diff --git a/core/modules/field/tests/src/FunctionalJavascript/EntityReference/EntityReferenceAdminTest.php b/core/modules/field/tests/src/FunctionalJavascript/EntityReference/EntityReferenceAdminTest.php
index 9249c4ebfd61..85f84b0ad41d 100644
--- a/core/modules/field/tests/src/FunctionalJavascript/EntityReference/EntityReferenceAdminTest.php
+++ b/core/modules/field/tests/src/FunctionalJavascript/EntityReference/EntityReferenceAdminTest.php
@@ -113,7 +113,7 @@ protected function setUp(): void {
   /**
    * Tests the Entity Reference Admin UI.
    */
-  public function testFieldAdminHandler() {
+  public function testFieldAdminHandler(): void {
     $bundle_path = 'admin/structure/types/manage/' . $this->type;
 
     $page = $this->getSession()->getPage();
diff --git a/core/modules/field/tests/src/FunctionalJavascript/MultipleValueWidgetTest.php b/core/modules/field/tests/src/FunctionalJavascript/MultipleValueWidgetTest.php
index a25f04810157..442cbf40f1b6 100644
--- a/core/modules/field/tests/src/FunctionalJavascript/MultipleValueWidgetTest.php
+++ b/core/modules/field/tests/src/FunctionalJavascript/MultipleValueWidgetTest.php
@@ -66,7 +66,7 @@ protected function setUp(): void {
   /**
    * Tests the 'Add more' functionality.
    */
-  public function testFieldMultipleValueWidget() {
+  public function testFieldMultipleValueWidget(): void {
     $this->drupalGet('entity_test/add');
 
     $assert_session = $this->assertSession();
@@ -172,7 +172,7 @@ public function testFieldMultipleValueWidget() {
   /**
    * Tests that no validation occurs on field on "Add more" click.
    */
-  public function testFieldMultipleValueWidgetAddMoreNoValidation() {
+  public function testFieldMultipleValueWidgetAddMoreNoValidation(): void {
     // Set unlimited field to be required.
     $field_name = 'field_unlimited';
     $field = FieldConfig::loadByName('entity_test', 'entity_test', $field_name);
diff --git a/core/modules/field/tests/src/FunctionalJavascript/Number/NumberFieldTest.php b/core/modules/field/tests/src/FunctionalJavascript/Number/NumberFieldTest.php
index e960706ff018..9a9f95420e1b 100644
--- a/core/modules/field/tests/src/FunctionalJavascript/Number/NumberFieldTest.php
+++ b/core/modules/field/tests/src/FunctionalJavascript/Number/NumberFieldTest.php
@@ -46,7 +46,7 @@ protected function setUp(): void {
   /**
    * Tests default formatter behavior.
    */
-  public function testNumberFormatter() {
+  public function testNumberFormatter(): void {
     $type = $this->randomMachineName();
     $float_field = $this->randomMachineName();
     $integer_field = $this->randomMachineName();
diff --git a/core/modules/field/tests/src/Kernel/Boolean/BooleanFormatterTest.php b/core/modules/field/tests/src/Kernel/Boolean/BooleanFormatterTest.php
index 2a3a9e22033d..c37ccc0db256 100644
--- a/core/modules/field/tests/src/Kernel/Boolean/BooleanFormatterTest.php
+++ b/core/modules/field/tests/src/Kernel/Boolean/BooleanFormatterTest.php
@@ -107,7 +107,7 @@ protected function renderEntityFields(FieldableEntityInterface $entity, EntityVi
   /**
    * Tests boolean formatter output.
    */
-  public function testBooleanFormatter() {
+  public function testBooleanFormatter(): void {
     $data = [];
     $data[] = [0, [], 'Off'];
     $data[] = [1, [], 'On'];
diff --git a/core/modules/field/tests/src/Kernel/Boolean/BooleanItemTest.php b/core/modules/field/tests/src/Kernel/Boolean/BooleanItemTest.php
index 1c3d9d9c7119..8f20fee08962 100644
--- a/core/modules/field/tests/src/Kernel/Boolean/BooleanItemTest.php
+++ b/core/modules/field/tests/src/Kernel/Boolean/BooleanItemTest.php
@@ -48,7 +48,7 @@ protected function setUp(): void {
   /**
    * Tests using entity fields of the boolean field type.
    */
-  public function testBooleanItem() {
+  public function testBooleanItem(): void {
     // Verify entity creation.
     $entity = EntityTest::create();
     $value = '1';
diff --git a/core/modules/field/tests/src/Kernel/BulkDeleteTest.php b/core/modules/field/tests/src/Kernel/BulkDeleteTest.php
index eaa497802eea..2653dc4a2e5d 100644
--- a/core/modules/field/tests/src/Kernel/BulkDeleteTest.php
+++ b/core/modules/field/tests/src/Kernel/BulkDeleteTest.php
@@ -166,7 +166,7 @@ protected function setUp(): void {
    * This tests how EntityFieldQuery interacts with field deletion and could be
    * moved to FieldCrudTestCase, but depends on this class's setUp().
    */
-  public function testDeleteField() {
+  public function testDeleteField(): void {
     $bundle = reset($this->bundles);
     $field_storage = reset($this->fieldStorages);
     $field_name = $field_storage->getName();
@@ -227,7 +227,7 @@ public function testDeleteField() {
   /**
    * Tests that recreating a field with the name as a deleted field works.
    */
-  public function testPurgeWithDeletedAndActiveField() {
+  public function testPurgeWithDeletedAndActiveField(): void {
     $bundle = reset($this->bundles);
     // Create another field storage.
     $field_name = 'bf_3';
@@ -323,7 +323,7 @@ public function testPurgeWithDeletedAndActiveField() {
    * Verify that field data items and fields are purged when a field storage is
    * deleted.
    */
-  public function testPurgeField() {
+  public function testPurgeField(): void {
     // Start recording hook invocations.
     field_test_memorize();
 
@@ -384,7 +384,7 @@ public function testPurgeField() {
    * Verify that field storages are preserved and purged correctly as multiple
    * fields are deleted and purged.
    */
-  public function testPurgeFieldStorage() {
+  public function testPurgeFieldStorage(): void {
     // Start recording hook invocations.
     field_test_memorize();
 
diff --git a/core/modules/field/tests/src/Kernel/ConfigFieldDefinitionTest.php b/core/modules/field/tests/src/Kernel/ConfigFieldDefinitionTest.php
index 933adbea9acc..41c46b3e3a88 100644
--- a/core/modules/field/tests/src/Kernel/ConfigFieldDefinitionTest.php
+++ b/core/modules/field/tests/src/Kernel/ConfigFieldDefinitionTest.php
@@ -44,7 +44,7 @@ protected function setUp(): void {
   /**
    * Makes sure a field definition is exposed for a configurable field.
    */
-  public function testBundleFieldDefinition() {
+  public function testBundleFieldDefinition(): void {
     $definitions = \Drupal::service('entity_field.manager')->getFieldDefinitions($this->entityType, $this->bundle);
     $this->assertTrue(isset($definitions[$this->fieldTestData->field->getName()]));
     $this->assertInstanceOf(FieldDefinitionInterface::class, $definitions[$this->fieldTestData->field->getName()]);
@@ -55,7 +55,7 @@ public function testBundleFieldDefinition() {
   /**
    * Makes sure a field storage definition is exposed for a configurable field.
    */
-  public function testFieldStorageDefinition() {
+  public function testFieldStorageDefinition(): void {
     $field_storage_definitions = \Drupal::service('entity_field.manager')->getFieldStorageDefinitions($this->entityType);
     $this->assertTrue(isset($field_storage_definitions[$this->fieldTestData->field->getName()]));
     $this->assertInstanceOf(FieldStorageDefinitionInterface::class, $field_storage_definitions[$this->fieldTestData->field->getName()]);
diff --git a/core/modules/field/tests/src/Kernel/DisplayApiTest.php b/core/modules/field/tests/src/Kernel/DisplayApiTest.php
index 33df6d7e8063..fb4e446cfa2f 100644
--- a/core/modules/field/tests/src/Kernel/DisplayApiTest.php
+++ b/core/modules/field/tests/src/Kernel/DisplayApiTest.php
@@ -132,7 +132,7 @@ protected function setUp(): void {
   /**
    * Tests the FieldItemListInterface::view() method.
    */
-  public function testFieldItemListView() {
+  public function testFieldItemListView(): void {
     $items = $this->entity->get($this->fieldName);
 
     \Drupal::service('theme_installer')->install(['stark']);
@@ -231,7 +231,7 @@ public function testFieldItemListView() {
   /**
    * Tests the FieldItemInterface::view() method.
    */
-  public function testFieldItemView() {
+  public function testFieldItemView(): void {
     // No display settings: check that default display settings are used.
     $settings = \Drupal::service('plugin.manager.field.formatter')->getDefaultSettings('field_test_default');
     $setting = $settings['test_formatter_setting'];
@@ -295,7 +295,7 @@ public function testFieldItemView() {
   /**
    * Tests that the prepareView() formatter method still fires for empty values.
    */
-  public function testFieldEmpty() {
+  public function testFieldEmpty(): void {
     // Uses \Drupal\field_test\Plugin\Field\FieldFormatter\TestFieldEmptyFormatter.
     $display = [
       'label' => 'hidden',
diff --git a/core/modules/field/tests/src/Kernel/DisplayModeUpdateTest.php b/core/modules/field/tests/src/Kernel/DisplayModeUpdateTest.php
index fa71871db810..473b24ac8ae9 100644
--- a/core/modules/field/tests/src/Kernel/DisplayModeUpdateTest.php
+++ b/core/modules/field/tests/src/Kernel/DisplayModeUpdateTest.php
@@ -110,7 +110,7 @@ protected function setUp(): void {
   /**
    * Ensure display modes are updated when fields are created.
    */
-  public function testDisplayModeUpdateAfterFieldCreation() {
+  public function testDisplayModeUpdateAfterFieldCreation(): void {
 
     // Sanity test: field has not been created yet, so should not exist in display.
     $this->assertArrayNotHasKey('field_test', \Drupal::config($this->defaultViewDisplayName)->get('hidden'));
diff --git a/core/modules/field/tests/src/Kernel/Email/EmailItemTest.php b/core/modules/field/tests/src/Kernel/Email/EmailItemTest.php
index 8bdbeafc6307..3b80f9333a99 100644
--- a/core/modules/field/tests/src/Kernel/Email/EmailItemTest.php
+++ b/core/modules/field/tests/src/Kernel/Email/EmailItemTest.php
@@ -48,7 +48,7 @@ protected function setUp(): void {
   /**
    * Tests using entity fields of the email field type.
    */
-  public function testEmailItem() {
+  public function testEmailItem(): void {
     // Verify entity creation.
     $entity = EntityTest::create();
     $value = 'test@example.com';
diff --git a/core/modules/field/tests/src/Kernel/Entity/Update/SqlContentEntityStorageSchemaColumnTest.php b/core/modules/field/tests/src/Kernel/Entity/Update/SqlContentEntityStorageSchemaColumnTest.php
index 584abc849c84..8fbb3ce637d6 100644
--- a/core/modules/field/tests/src/Kernel/Entity/Update/SqlContentEntityStorageSchemaColumnTest.php
+++ b/core/modules/field/tests/src/Kernel/Entity/Update/SqlContentEntityStorageSchemaColumnTest.php
@@ -100,7 +100,7 @@ protected function setUp(): void {
   /**
    * Tests that column-level schema changes are detected for fields with data.
    */
-  public function testColumnUpdate() {
+  public function testColumnUpdate(): void {
     // Change the field type in the stored schema.
     $schema = \Drupal::keyValue('entity.storage_schema.sql')->get('entity_test_rev.field_schema_data.test');
     $schema['entity_test_rev__test']['fields']['test_value']['type'] = 'varchar_ascii';
@@ -117,7 +117,7 @@ public function testColumnUpdate() {
   /**
    * Tests that schema changes are updated for fields with data with the flag.
    */
-  public function testColumnUpdateWithFlag() {
+  public function testColumnUpdateWithFlag(): void {
     // Change the field type in the stored schema.
     $schema = \Drupal::keyValue('entity.storage_schema.sql')->get('entity_test_rev.field_schema_data.test');
     $schema['entity_test_rev__test']['fields']['test_value']['type'] = 'varchar_ascii';
diff --git a/core/modules/field/tests/src/Kernel/EntityReference/EntityReferenceFormatterTest.php b/core/modules/field/tests/src/Kernel/EntityReference/EntityReferenceFormatterTest.php
index f6d25969e7a8..640b19ae3d50 100644
--- a/core/modules/field/tests/src/Kernel/EntityReference/EntityReferenceFormatterTest.php
+++ b/core/modules/field/tests/src/Kernel/EntityReference/EntityReferenceFormatterTest.php
@@ -129,7 +129,7 @@ protected function setUp(): void {
   /**
    * Assert inaccessible items don't change the data of the fields.
    */
-  public function testAccess() {
+  public function testAccess(): void {
     // Revoke the 'view test entity' permission for this test.
     Role::load(RoleInterface::ANONYMOUS_ID)
       ->revokePermission('view test entity')
@@ -171,7 +171,7 @@ public function testAccess() {
   /**
    * Tests the merging of cache metadata.
    */
-  public function testCustomCacheTagFormatter() {
+  public function testCustomCacheTagFormatter(): void {
     /** @var \Drupal\Core\Render\RendererInterface $renderer */
     $renderer = $this->container->get('renderer');
     $formatter = 'entity_reference_custom_cache_tag';
@@ -184,7 +184,7 @@ public function testCustomCacheTagFormatter() {
   /**
    * Tests the ID formatter.
    */
-  public function testIdFormatter() {
+  public function testIdFormatter(): void {
     $formatter = 'entity_reference_entity_id';
     $build = $this->buildRenderArray([$this->referencedEntity, $this->unsavedReferencedEntity], $formatter);
 
@@ -196,7 +196,7 @@ public function testIdFormatter() {
   /**
    * Tests the entity formatter.
    */
-  public function testEntityFormatter() {
+  public function testEntityFormatter(): void {
     /** @var \Drupal\Core\Render\RendererInterface $renderer */
     $renderer = $this->container->get('renderer');
     $formatter = 'entity_reference_entity_view';
@@ -236,7 +236,7 @@ public function testEntityFormatter() {
   /**
    * Tests the recursive rendering protection of the entity formatter.
    */
-  public function testEntityFormatterRecursiveRendering() {
+  public function testEntityFormatterRecursiveRendering(): void {
     /** @var \Drupal\Core\Render\RendererInterface $renderer */
     $renderer = $this->container->get('renderer');
     $formatter = 'entity_reference_entity_view';
@@ -300,7 +300,7 @@ public function testEntityFormatterRecursiveRendering() {
   /**
    * Renders the same entity referenced from different places.
    */
-  public function testEntityReferenceRecursiveProtectionWithManyRenderedEntities() {
+  public function testEntityReferenceRecursiveProtectionWithManyRenderedEntities(): void {
     $formatter = 'entity_reference_entity_view';
     $view_builder = $this->entityTypeManager->getViewBuilder($this->entityType);
 
@@ -343,7 +343,7 @@ public function testEntityReferenceRecursiveProtectionWithManyRenderedEntities()
   /**
    * Tests the label formatter.
    */
-  public function testLabelFormatter() {
+  public function testLabelFormatter(): void {
     $this->installEntitySchema('entity_test_label');
     /** @var \Drupal\Core\Render\RendererInterface $renderer */
     $renderer = $this->container->get('renderer');
diff --git a/core/modules/field/tests/src/Kernel/EntityReference/EntityReferenceItemTest.php b/core/modules/field/tests/src/Kernel/EntityReference/EntityReferenceItemTest.php
index 96eae7307db2..5f23894ee22d 100644
--- a/core/modules/field/tests/src/Kernel/EntityReference/EntityReferenceItemTest.php
+++ b/core/modules/field/tests/src/Kernel/EntityReference/EntityReferenceItemTest.php
@@ -131,7 +131,7 @@ protected function setUp(): void {
   /**
    * Tests the entity reference field type for referencing content entities.
    */
-  public function testContentEntityReferenceItem() {
+  public function testContentEntityReferenceItem(): void {
     $tid = $this->term->id();
 
     // Just being able to create the entity like this verifies a lot of code.
@@ -220,7 +220,7 @@ public function testContentEntityReferenceItem() {
   /**
    * Tests the ::generateSampleValue() method.
    */
-  public function testGenerateSampleValue() {
+  public function testGenerateSampleValue(): void {
     $entity = EntityTest::create();
 
     // Test while a term exists.
@@ -238,7 +238,7 @@ public function testGenerateSampleValue() {
   /**
    * Tests the ::generateSampleValue() method when it has a circular reference.
    */
-  public function testGenerateSampleValueCircularReference() {
+  public function testGenerateSampleValueCircularReference(): void {
     // Delete the existing entity.
     $this->entityStringId->delete();
 
@@ -251,7 +251,7 @@ public function testGenerateSampleValueCircularReference() {
   /**
    * Tests referencing content entities with string IDs.
    */
-  public function testContentEntityReferenceItemWithStringId() {
+  public function testContentEntityReferenceItemWithStringId(): void {
     $entity = EntityTest::create();
     $entity->field_test_entity_test_string_id->target_id = $this->entityStringId->id();
     $entity->save();
@@ -267,7 +267,7 @@ public function testContentEntityReferenceItemWithStringId() {
   /**
    * Tests the entity reference field type for referencing config entities.
    */
-  public function testConfigEntityReferenceItem() {
+  public function testConfigEntityReferenceItem(): void {
     $referenced_entity_id = $this->vocabulary->id();
 
     // Just being able to create the entity like this verifies a lot of code.
@@ -314,7 +314,7 @@ public function testConfigEntityReferenceItem() {
   /**
    * Tests entity auto create.
    */
-  public function testEntityAutoCreate() {
+  public function testEntityAutoCreate(): void {
     // The term entity is unsaved here.
     $term = Term::create([
       'name' => $this->randomMachineName(),
@@ -338,7 +338,7 @@ public function testEntityAutoCreate() {
   /**
    * Tests saving order sequence doesn't matter.
    */
-  public function testEntitySaveOrder() {
+  public function testEntitySaveOrder(): void {
     // The term entity is unsaved here.
     $term = Term::create([
       'name' => $this->randomMachineName(),
@@ -365,7 +365,7 @@ public function testEntitySaveOrder() {
   /**
    * Tests that the 'handler' field setting stores the proper plugin ID.
    */
-  public function testSelectionHandlerSettings() {
+  public function testSelectionHandlerSettings(): void {
     $field_name = $this->randomMachineName();
     $field_storage = FieldStorageConfig::create([
       'field_name' => $field_name,
@@ -422,7 +422,7 @@ public function testSelectionHandlerSettings() {
   /**
    * Tests ValidReferenceConstraint with newly created and unsaved entities.
    */
-  public function testAutocreateValidation() {
+  public function testAutocreateValidation(): void {
     // The term entity is unsaved here.
     $term = Term::create([
       'name' => $this->randomMachineName(),
diff --git a/core/modules/field/tests/src/Kernel/EntityReference/EntityReferenceSettingsTest.php b/core/modules/field/tests/src/Kernel/EntityReference/EntityReferenceSettingsTest.php
index 39cef2ebd64e..b52bb98957d2 100644
--- a/core/modules/field/tests/src/Kernel/EntityReference/EntityReferenceSettingsTest.php
+++ b/core/modules/field/tests/src/Kernel/EntityReference/EntityReferenceSettingsTest.php
@@ -90,7 +90,7 @@ protected function setUp(): void {
   /**
    * Tests that config bundle deletions are mirrored in field config settings.
    */
-  public function testConfigTargetBundleDeletion() {
+  public function testConfigTargetBundleDeletion(): void {
     // Create two vocabularies.
     /** @var \Drupal\taxonomy\Entity\Vocabulary[] $vocabularies */
     $vocabularies = [];
@@ -150,7 +150,7 @@ public function testConfigTargetBundleDeletion() {
   /**
    * Tests that deletions of custom bundles are mirrored in field settings.
    */
-  public function testCustomTargetBundleDeletion() {
+  public function testCustomTargetBundleDeletion(): void {
     // Attach an entity reference field to $this->nodeType.
     $name = $this->randomMachineName();
     $label = $this->randomString();
diff --git a/core/modules/field/tests/src/Kernel/EntityReference/Views/EntityReferenceRelationshipTest.php b/core/modules/field/tests/src/Kernel/EntityReference/Views/EntityReferenceRelationshipTest.php
index bfa42e40877a..9c29942da67f 100644
--- a/core/modules/field/tests/src/Kernel/EntityReference/Views/EntityReferenceRelationshipTest.php
+++ b/core/modules/field/tests/src/Kernel/EntityReference/Views/EntityReferenceRelationshipTest.php
@@ -91,7 +91,7 @@ protected function setUp($import_test_views = TRUE): void {
   /**
    * Tests using the views relationship.
    */
-  public function testNoDataTableRelationship() {
+  public function testNoDataTableRelationship(): void {
 
     // Create some test entities which link each other.
     $referenced_entity = EntityTestMul::create();
@@ -171,7 +171,7 @@ public function testNoDataTableRelationship() {
    *
    * @see entity_reference_field_views_data()
    */
-  public function testDataTableRelationship() {
+  public function testDataTableRelationship(): void {
 
     // Create some test entities which link each other.
     $referenced_entity = EntityTest::create();
@@ -252,7 +252,7 @@ public function testDataTableRelationship() {
    *
    * @see entity_reference_field_views_data()
    */
-  public function testDataTableRelationshipWithLongFieldName() {
+  public function testDataTableRelationshipWithLongFieldName(): void {
     // Create some test entities which link each other.
     $referenced_entity = EntityTest::create();
     $referenced_entity->save();
@@ -293,7 +293,7 @@ public function testDataTableRelationshipWithLongFieldName() {
   /**
    * Tests group by with optional and empty relationship.
    */
-  public function testGroupByWithEmptyRelationships() {
+  public function testGroupByWithEmptyRelationships(): void {
     $entities = [];
     // Create 4 entities with name1 and 3 entities with name2.
     for ($i = 1; $i <= 4; $i++) {
@@ -354,7 +354,7 @@ public function testGroupByWithEmptyRelationships() {
   /**
    * Test that config entities don't get relationships added.
    */
-  public function testEntityReferenceConfigEntity() {
+  public function testEntityReferenceConfigEntity(): void {
     // Create reference from entity_test to a config entity.
     $this->createEntityReferenceField('entity_test', 'entity_test', 'field_test_config_entity', 'field_test_config_entity', 'user_role');
     Views::viewsData()->clear();
diff --git a/core/modules/field/tests/src/Kernel/EntityReference/Views/SelectionTest.php b/core/modules/field/tests/src/Kernel/EntityReference/Views/SelectionTest.php
index 7ea1311ef70a..2ba0b7ae0d66 100644
--- a/core/modules/field/tests/src/Kernel/EntityReference/Views/SelectionTest.php
+++ b/core/modules/field/tests/src/Kernel/EntityReference/Views/SelectionTest.php
@@ -94,7 +94,7 @@ protected function setUp(): void {
   /**
    * Tests the selection handler.
    */
-  public function testSelectionHandler() {
+  public function testSelectionHandler(): void {
     // Tests the selection handler.
     $this->assertResults($this->selectionHandler->getReferenceableEntities());
 
@@ -139,7 +139,7 @@ public function testSelectionHandler() {
    * If we expect our output to not have the <a> tags, and this matches what's
    * produced by the tag-stripping method, we'll know that it's working.
    */
-  public function testAnchorTagStripping() {
+  public function testAnchorTagStripping(): void {
     $filtered_rendered_results_formatted = [];
     foreach ($this->selectionHandler->getReferenceableEntities() as $subresults) {
       $filtered_rendered_results_formatted += array_map(fn(MarkupInterface $markup): string => (string) $markup, $subresults);
diff --git a/core/modules/field/tests/src/Kernel/FieldAttachOtherTest.php b/core/modules/field/tests/src/Kernel/FieldAttachOtherTest.php
index e68d874f6179..fffd2a500ef7 100644
--- a/core/modules/field/tests/src/Kernel/FieldAttachOtherTest.php
+++ b/core/modules/field/tests/src/Kernel/FieldAttachOtherTest.php
@@ -27,7 +27,7 @@ protected function setUp(): void {
   /**
    * Tests rendering fields with EntityDisplay build().
    */
-  public function testEntityDisplayBuild() {
+  public function testEntityDisplayBuild(): void {
     $this->createFieldWithStorage('_2');
 
     $entity_type = 'entity_test';
@@ -137,7 +137,7 @@ public function testEntityDisplayBuild() {
   /**
    * Tests rendering fields with EntityDisplay::buildMultiple().
    */
-  public function testEntityDisplayViewMultiple() {
+  public function testEntityDisplayViewMultiple(): void {
     // Use a formatter that has a prepareView() step.
     $display = \Drupal::service('entity_display.repository')
       ->getViewDisplay('entity_test', 'entity_test', 'full')
@@ -165,7 +165,7 @@ public function testEntityDisplayViewMultiple() {
    * Complements unit test coverage in
    * \Drupal\Tests\Core\Entity\Sql\SqlContentEntityStorageTest.
    */
-  public function testEntityCache() {
+  public function testEntityCache(): void {
     // Initialize random values and a test entity.
     $entity_init = EntityTest::create(['type' => $this->fieldTestData->field->getTargetBundle()]);
     $values = $this->_generateTestFieldValues($this->fieldTestData->field_storage->getCardinality());
@@ -248,7 +248,7 @@ public function testEntityCache() {
    * This could be much more thorough, but it does verify that the correct
    * widgets show up.
    */
-  public function testEntityFormDisplayBuildForm() {
+  public function testEntityFormDisplayBuildForm(): void {
     $this->createFieldWithStorage('_2');
 
     $entity_type = 'entity_test';
@@ -300,7 +300,7 @@ public function testEntityFormDisplayBuildForm() {
   /**
    * Tests \Drupal\Core\Entity\Display\EntityFormDisplayInterface::extractFormValues().
    */
-  public function testEntityFormDisplayExtractFormValues() {
+  public function testEntityFormDisplayExtractFormValues(): void {
     $this->createFieldWithStorage('_2');
 
     $entity_type = 'entity_test';
diff --git a/core/modules/field/tests/src/Kernel/FieldAttachStorageTest.php b/core/modules/field/tests/src/Kernel/FieldAttachStorageTest.php
index 1bb91b4aabfe..e72cae7c29ea 100644
--- a/core/modules/field/tests/src/Kernel/FieldAttachStorageTest.php
+++ b/core/modules/field/tests/src/Kernel/FieldAttachStorageTest.php
@@ -29,7 +29,7 @@ protected function setUp(): void {
    * Works independently of the underlying field storage backend. Inserts or
    * updates random field data and then loads and verifies the data.
    */
-  public function testFieldAttachSaveLoad() {
+  public function testFieldAttachSaveLoad(): void {
     $entity_type = 'entity_test_rev';
     $this->createFieldWithStorage('', $entity_type);
     $cardinality = $this->fieldTestData->field_storage->getCardinality();
@@ -78,7 +78,7 @@ public function testFieldAttachSaveLoad() {
   /**
    * Tests the 'multiple' load feature.
    */
-  public function testFieldAttachLoadMultiple() {
+  public function testFieldAttachLoadMultiple(): void {
     $entity_type = 'entity_test_rev';
 
     // Define 2 bundles.
@@ -149,7 +149,7 @@ public function testFieldAttachLoadMultiple() {
   /**
    * Tests insert and update with empty or NULL fields.
    */
-  public function testFieldAttachSaveEmptyData() {
+  public function testFieldAttachSaveEmptyData(): void {
     $entity_type = 'entity_test';
     $this->createFieldWithStorage('', $entity_type);
 
@@ -197,7 +197,7 @@ public function testFieldAttachSaveEmptyData() {
   /**
    * Tests insert with empty or NULL fields, with default value.
    */
-  public function testFieldAttachSaveEmptyDataDefaultValue() {
+  public function testFieldAttachSaveEmptyDataDefaultValue(): void {
     $entity_type = 'entity_test_rev';
     $this->createFieldWithStorage('', $entity_type);
 
@@ -230,7 +230,7 @@ public function testFieldAttachSaveEmptyDataDefaultValue() {
   /**
    * Tests entity deletion.
    */
-  public function testFieldAttachDelete() {
+  public function testFieldAttachDelete(): void {
     $entity_type = 'entity_test_rev';
     $this->createFieldWithStorage('', $entity_type);
     $cardinality = $this->fieldTestData->field_storage->getCardinality();
@@ -291,7 +291,7 @@ public function testFieldAttachDelete() {
   /**
    * Tests entity_bundle_create().
    */
-  public function testEntityCreateBundle() {
+  public function testEntityCreateBundle(): void {
     $entity_type = 'entity_test_rev';
     $this->createFieldWithStorage('', $entity_type);
     $cardinality = $this->fieldTestData->field_storage->getCardinality();
@@ -319,7 +319,7 @@ public function testEntityCreateBundle() {
   /**
    * Tests entity_bundle_delete().
    */
-  public function testEntityDeleteBundle() {
+  public function testEntityDeleteBundle(): void {
     $entity_type = 'entity_test_rev';
     $this->createFieldWithStorage('', $entity_type);
 
diff --git a/core/modules/field/tests/src/Kernel/FieldCrudTest.php b/core/modules/field/tests/src/Kernel/FieldCrudTest.php
index e95f8c56468b..57ebe04bf314 100644
--- a/core/modules/field/tests/src/Kernel/FieldCrudTest.php
+++ b/core/modules/field/tests/src/Kernel/FieldCrudTest.php
@@ -69,7 +69,7 @@ protected function setUp(): void {
   /**
    * Tests the creation of a field.
    */
-  public function testCreateField() {
+  public function testCreateField(): void {
     $field = FieldConfig::create($this->fieldDefinition);
     $field->save();
 
@@ -130,7 +130,7 @@ public function testCreateField() {
    * @covers ::setPropertyConstraints
    * @covers ::addPropertyConstraints
    */
-  public function testFieldPropertyConstraints() {
+  public function testFieldPropertyConstraints(): void {
     $field = FieldConfig::create($this->fieldDefinition);
     $field->save();
     $field_name = $this->fieldStorage->getName();
@@ -202,7 +202,7 @@ protected function doFieldPropertyConstraintsTests() {
   /**
    * Tests creating a field with custom storage set.
    */
-  public function testCreateFieldCustomStorage() {
+  public function testCreateFieldCustomStorage(): void {
     $field_name = $this->randomMachineName();
     \Drupal::state()->set('field_test_custom_storage', $field_name);
 
@@ -240,7 +240,7 @@ public function testCreateFieldCustomStorage() {
   /**
    * Tests reading back a field definition.
    */
-  public function testReadField() {
+  public function testReadField(): void {
     FieldConfig::create($this->fieldDefinition)->save();
 
     // Read the field back.
@@ -253,7 +253,7 @@ public function testReadField() {
   /**
    * Tests the update of a field.
    */
-  public function testUpdateField() {
+  public function testUpdateField(): void {
     FieldConfig::create($this->fieldDefinition)->save();
 
     // Check that basic changes are saved.
@@ -275,7 +275,7 @@ public function testUpdateField() {
   /**
    * Tests the deletion of a field with no data.
    */
-  public function testDeleteFieldNoData() {
+  public function testDeleteFieldNoData(): void {
     // Deleting and purging fields with data is tested in
     // \Drupal\Tests\field\Kernel\BulkDeleteTest.
 
@@ -309,7 +309,7 @@ public function testDeleteFieldNoData() {
   /**
    * Tests the cross deletion behavior between field storages and fields.
    */
-  public function testDeleteFieldCrossDeletion() {
+  public function testDeleteFieldCrossDeletion(): void {
     $field_definition_2 = $this->fieldDefinition;
     $field_definition_2['bundle'] .= '_another_bundle';
     entity_test_create_bundle($field_definition_2['bundle']);
diff --git a/core/modules/field/tests/src/Kernel/FieldDataCountTest.php b/core/modules/field/tests/src/Kernel/FieldDataCountTest.php
index 8dc4f61950f4..5de98028c45e 100644
--- a/core/modules/field/tests/src/Kernel/FieldDataCountTest.php
+++ b/core/modules/field/tests/src/Kernel/FieldDataCountTest.php
@@ -48,7 +48,7 @@ protected function setUp(): void {
   /**
    * Tests entityCount() and hadData() methods.
    */
-  public function testEntityCountAndHasData() {
+  public function testEntityCountAndHasData(): void {
     // Create a field with a cardinality of 2 to show that we are counting
     // entities and not rows in a table.
     /** @var \Drupal\field\Entity\FieldStorageConfig $field_storage */
@@ -146,7 +146,7 @@ public function testEntityCountAndHasData() {
   /**
    * Verify that we can count a table that contains an entry with index 0.
    */
-  public function testCountWithIndex0() {
+  public function testCountWithIndex0(): void {
     // Create a field that will require dedicated storage.
     /** @var \Drupal\field\Entity\FieldStorageConfig $field_storage */
     $field_storage = FieldStorageConfig::create([
diff --git a/core/modules/field/tests/src/Kernel/FieldDefinitionIntegrityTest.php b/core/modules/field/tests/src/Kernel/FieldDefinitionIntegrityTest.php
index 8089374ee279..c453aba24bfe 100644
--- a/core/modules/field/tests/src/Kernel/FieldDefinitionIntegrityTest.php
+++ b/core/modules/field/tests/src/Kernel/FieldDefinitionIntegrityTest.php
@@ -27,7 +27,7 @@ class FieldDefinitionIntegrityTest extends KernelTestBase {
   /**
    * Tests the integrity of field plugin definitions.
    */
-  public function testFieldPluginDefinitionIntegrity() {
+  public function testFieldPluginDefinitionIntegrity(): void {
     // Enable all core modules that provide field plugins, and their
     // dependencies.
     $this->enableModules(
@@ -92,7 +92,7 @@ public function testFieldPluginDefinitionIntegrity() {
   /**
    * Tests to load field plugin definitions used in core's existing entities.
    */
-  public function testFieldPluginDefinitionAvailability() {
+  public function testFieldPluginDefinitionAvailability(): void {
     $this->enableModules(
       $this->modulesWithSubdirectory('src' . DIRECTORY_SEPARATOR . 'Entity')
     );
diff --git a/core/modules/field/tests/src/Kernel/FieldDisplayTest.php b/core/modules/field/tests/src/Kernel/FieldDisplayTest.php
index 0dd66a50c71e..a73bf5ee810a 100644
--- a/core/modules/field/tests/src/Kernel/FieldDisplayTest.php
+++ b/core/modules/field/tests/src/Kernel/FieldDisplayTest.php
@@ -101,7 +101,7 @@ protected function setUp(): void {
   /**
    * Tests that visually hidden works with core.
    */
-  public function testFieldVisualHidden() {
+  public function testFieldVisualHidden(): void {
     $value = $this->randomMachineName();
 
     // Set the formatter to link to the entity.
diff --git a/core/modules/field/tests/src/Kernel/FieldFormatterTest.php b/core/modules/field/tests/src/Kernel/FieldFormatterTest.php
index 7755d4c58895..3d34a77d5fb3 100644
--- a/core/modules/field/tests/src/Kernel/FieldFormatterTest.php
+++ b/core/modules/field/tests/src/Kernel/FieldFormatterTest.php
@@ -87,7 +87,7 @@ protected function setUp(): void {
   /**
    * Tests availability of third party settings in field render arrays.
    */
-  public function testThirdPartySettings() {
+  public function testThirdPartySettings(): void {
     $third_party_settings = [
       'field_test' => [
         'foo' => 'bar',
diff --git a/core/modules/field/tests/src/Kernel/FieldImportChangeTest.php b/core/modules/field/tests/src/Kernel/FieldImportChangeTest.php
index 3bb49e37c1bf..d1f328dd2934 100644
--- a/core/modules/field/tests/src/Kernel/FieldImportChangeTest.php
+++ b/core/modules/field/tests/src/Kernel/FieldImportChangeTest.php
@@ -27,7 +27,7 @@ class FieldImportChangeTest extends FieldKernelTestBase {
   /**
    * Tests importing an updated field.
    */
-  public function testImportChange() {
+  public function testImportChange(): void {
     entity_test_create_bundle('test_bundle');
 
     $this->installConfig(['field_test_config']);
diff --git a/core/modules/field/tests/src/Kernel/FieldImportCreateTest.php b/core/modules/field/tests/src/Kernel/FieldImportCreateTest.php
index bbc13945b67d..4848a29a0762 100644
--- a/core/modules/field/tests/src/Kernel/FieldImportCreateTest.php
+++ b/core/modules/field/tests/src/Kernel/FieldImportCreateTest.php
@@ -18,7 +18,7 @@ class FieldImportCreateTest extends FieldKernelTestBase {
   /**
    * Tests creating field storages and fields during default config import.
    */
-  public function testImportCreateDefault() {
+  public function testImportCreateDefault(): void {
     $field_name = 'field_test_import';
     $field_storage_id = "entity_test.$field_name";
     $field_id = "entity_test.entity_test.$field_name";
@@ -74,7 +74,7 @@ public function testImportCreateDefault() {
   /**
    * Tests creating field storages and fields during config import.
    */
-  public function testImportCreate() {
+  public function testImportCreate(): void {
     // A field storage with one single field.
     $field_name = 'field_test_import_sync';
     $field_storage_id = "entity_test.$field_name";
diff --git a/core/modules/field/tests/src/Kernel/FieldImportDeleteTest.php b/core/modules/field/tests/src/Kernel/FieldImportDeleteTest.php
index 9dc6f0af9e9e..13ebe5166bd2 100644
--- a/core/modules/field/tests/src/Kernel/FieldImportDeleteTest.php
+++ b/core/modules/field/tests/src/Kernel/FieldImportDeleteTest.php
@@ -29,7 +29,7 @@ class FieldImportDeleteTest extends FieldKernelTestBase {
   /**
    * Tests deleting field storages and fields as part of config import.
    */
-  public function testImportDelete() {
+  public function testImportDelete(): void {
     entity_test_create_bundle('test_bundle');
 
     $this->installConfig(['field_test_config']);
diff --git a/core/modules/field/tests/src/Kernel/FieldImportDeleteUninstallTest.php b/core/modules/field/tests/src/Kernel/FieldImportDeleteUninstallTest.php
index 517cb85ea3c9..44eabcbfa9af 100644
--- a/core/modules/field/tests/src/Kernel/FieldImportDeleteUninstallTest.php
+++ b/core/modules/field/tests/src/Kernel/FieldImportDeleteUninstallTest.php
@@ -38,7 +38,7 @@ protected function setUp(): void {
   /**
    * Tests deleting field storages and fields as part of config import.
    */
-  public function testImportDeleteUninstall() {
+  public function testImportDeleteUninstall(): void {
     // Create a field to delete to prove that
     // \Drupal\field\ConfigImporterFieldPurger does not purge fields that are
     // not related to the configuration synchronization.
@@ -113,7 +113,7 @@ public function testImportDeleteUninstall() {
   /**
    * Tests purging previously deleted fields and storages in config import.
    */
-  public function testImportAlreadyDeletedUninstall() {
+  public function testImportAlreadyDeletedUninstall(): void {
     // Create a telephone field for validation.
     $field_storage = FieldStorageConfig::create([
       'field_name' => 'field_test',
diff --git a/core/modules/field/tests/src/Kernel/FieldStorageCrudTest.php b/core/modules/field/tests/src/Kernel/FieldStorageCrudTest.php
index ce9900e248db..683602c2e71c 100644
--- a/core/modules/field/tests/src/Kernel/FieldStorageCrudTest.php
+++ b/core/modules/field/tests/src/Kernel/FieldStorageCrudTest.php
@@ -34,7 +34,7 @@ class FieldStorageCrudTest extends FieldKernelTestBase {
   /**
    * Tests the creation of a field storage.
    */
-  public function testCreate() {
+  public function testCreate(): void {
     $field_storage_definition = [
       'field_name' => 'field_2',
       'entity_type' => 'entity_test',
@@ -189,7 +189,7 @@ public function testCreate() {
    * This behavior is needed to allow field storage creation within updates,
    * since plugin classes (and thus the field type schema) cannot be accessed.
    */
-  public function testCreateWithExplicitSchema() {
+  public function testCreateWithExplicitSchema(): void {
     $schema = [
       'dummy' => 'foobar',
     ];
@@ -205,7 +205,7 @@ public function testCreateWithExplicitSchema() {
   /**
    * Tests reading field storage definitions.
    */
-  public function testRead() {
+  public function testRead(): void {
     $field_storage_definition = [
       'field_name' => 'field_1',
       'entity_type' => 'entity_test',
@@ -244,7 +244,7 @@ public function testRead() {
   /**
    * Tests creation of indexes on data column.
    */
-  public function testIndexes() {
+  public function testIndexes(): void {
     // Check that indexes specified by the field type are used by default.
     $field_storage = FieldStorageConfig::create([
       'field_name' => 'field_1',
@@ -294,7 +294,7 @@ public function testIndexes() {
   /**
    * Tests the deletion of a field storage.
    */
-  public function testDeleteNoData() {
+  public function testDeleteNoData(): void {
     // Deleting and purging field storages with data is tested in
     // \Drupal\Tests\field\Kernel\BulkDeleteTest.
 
@@ -374,7 +374,7 @@ public function testDeleteNoData() {
     }
   }
 
-  public function testUpdateFieldType() {
+  public function testUpdateFieldType(): void {
     $field_storage = FieldStorageConfig::create([
       'field_name' => 'field_type',
       'entity_type' => 'entity_test',
@@ -395,7 +395,7 @@ public function testUpdateFieldType() {
   /**
    * Tests changing a field storage type.
    */
-  public function testUpdateEntityType() {
+  public function testUpdateEntityType(): void {
     $field_storage = FieldStorageConfig::create([
       'field_name' => 'field_type',
       'entity_type' => 'entity_test',
@@ -413,7 +413,7 @@ public function testUpdateEntityType() {
   /**
    * Tests changing a field storage entity type.
    */
-  public function testUpdateEntityTargetType() {
+  public function testUpdateEntityTargetType(): void {
     $field_storage = FieldStorageConfig::create([
       'field_name' => 'field_type',
       'entity_type' => 'entity_test',
@@ -431,7 +431,7 @@ public function testUpdateEntityTargetType() {
   /**
    * Tests updating a field storage.
    */
-  public function testUpdate() {
+  public function testUpdate(): void {
     // Create a field with a defined cardinality, so that we can ensure it's
     // respected. Since cardinality enforcement is consistent across database
     // systems, it makes a good test case.
@@ -473,7 +473,7 @@ public function testUpdate() {
   /**
    * Tests field type modules forbidding an update.
    */
-  public function testUpdateForbid() {
+  public function testUpdateForbid(): void {
     $field_storage = FieldStorageConfig::create([
       'field_name' => 'forbidden',
       'entity_type' => 'entity_test',
diff --git a/core/modules/field/tests/src/Kernel/FieldTypeCategoryDiscoveryTest.php b/core/modules/field/tests/src/Kernel/FieldTypeCategoryDiscoveryTest.php
index 9afb4f64a23f..317460c86243 100644
--- a/core/modules/field/tests/src/Kernel/FieldTypeCategoryDiscoveryTest.php
+++ b/core/modules/field/tests/src/Kernel/FieldTypeCategoryDiscoveryTest.php
@@ -25,7 +25,7 @@ class FieldTypeCategoryDiscoveryTest extends KernelTestBase {
   /**
    * Tests custom field type categories created by modules.
    */
-  public function testFieldTypeCategories() {
+  public function testFieldTypeCategories(): void {
     $category = \Drupal::service('plugin.manager.field.field_type_category')->createInstance('test_category');
     $expected = [
       'Test category',
diff --git a/core/modules/field/tests/src/Kernel/FieldTypePluginManagerTest.php b/core/modules/field/tests/src/Kernel/FieldTypePluginManagerTest.php
index c356e900d8d8..fec0c06148d8 100644
--- a/core/modules/field/tests/src/Kernel/FieldTypePluginManagerTest.php
+++ b/core/modules/field/tests/src/Kernel/FieldTypePluginManagerTest.php
@@ -18,7 +18,7 @@ class FieldTypePluginManagerTest extends FieldKernelTestBase {
   /**
    * Tests the default settings convenience methods.
    */
-  public function testDefaultSettings() {
+  public function testDefaultSettings(): void {
     $field_type_manager = \Drupal::service('plugin.manager.field.field_type');
     foreach (['test_field', 'shape', 'hidden_test_field'] as $type) {
       $definition = $field_type_manager->getDefinition($type);
@@ -30,7 +30,7 @@ public function testDefaultSettings() {
   /**
    * Tests creation of field item instances.
    */
-  public function testCreateInstance() {
+  public function testCreateInstance(): void {
     /** @var \Drupal\Core\Field\FieldTypePluginManagerInterface $field_type_manager */
     $field_type_manager = \Drupal::service('plugin.manager.field.field_type');
     foreach (['test_field', 'shape', 'hidden_test_field'] as $type) {
@@ -57,7 +57,7 @@ public function testCreateInstance() {
   /**
    * Tests creation of field item instances.
    */
-  public function testCreateInstanceWithConfig() {
+  public function testCreateInstanceWithConfig(): void {
     /** @var \Drupal\Core\Field\FieldTypePluginManagerInterface $field_type_manager */
     $field_type_manager = \Drupal::service('plugin.manager.field.field_type');
     $type = 'test_field';
@@ -89,7 +89,7 @@ public function testCreateInstanceWithConfig() {
   /**
    * Tests all field items provide an existing main property.
    */
-  public function testMainProperty() {
+  public function testMainProperty(): void {
     // Let's enable all Drupal modules in Drupal core, so we test any field
     // type plugin.
     $this->enableAllCoreModules();
@@ -115,7 +115,7 @@ public function testMainProperty() {
   /**
    * Tests UI definitions per entity type.
    */
-  public function testUiDefinitionsPerEntityType() {
+  public function testUiDefinitionsPerEntityType(): void {
     /** @var \Drupal\Core\Field\FieldTypePluginManagerInterface $field_type_manager */
     $field_type_manager = \Drupal::service('plugin.manager.field.field_type');
     $definitions = $field_type_manager->getEntityTypeUiDefinitions('node');
diff --git a/core/modules/field/tests/src/Kernel/FieldValidationTest.php b/core/modules/field/tests/src/Kernel/FieldValidationTest.php
index dd31a4d6ad84..83c6f44351c2 100644
--- a/core/modules/field/tests/src/Kernel/FieldValidationTest.php
+++ b/core/modules/field/tests/src/Kernel/FieldValidationTest.php
@@ -47,7 +47,7 @@ protected function setUp(): void {
   /**
    * Tests that the number of values is validated against the field cardinality.
    */
-  public function testCardinalityConstraint() {
+  public function testCardinalityConstraint(): void {
     $cardinality = $this->fieldTestData->field_storage->getCardinality();
     $entity = $this->entity;
 
@@ -67,7 +67,7 @@ public function testCardinalityConstraint() {
   /**
    * Tests that constraints defined by the field type are validated.
    */
-  public function testFieldConstraints() {
+  public function testFieldConstraints(): void {
     $cardinality = $this->fieldTestData->field_storage->getCardinality();
     $entity = $this->entity;
 
diff --git a/core/modules/field/tests/src/Kernel/FormatterPluginManagerTest.php b/core/modules/field/tests/src/Kernel/FormatterPluginManagerTest.php
index 7d2717cd5480..06b4654541ef 100644
--- a/core/modules/field/tests/src/Kernel/FormatterPluginManagerTest.php
+++ b/core/modules/field/tests/src/Kernel/FormatterPluginManagerTest.php
@@ -18,7 +18,7 @@ class FormatterPluginManagerTest extends FieldKernelTestBase {
    *
    * @see \Drupal\field\Tests\WidgetPluginManagerTest::testNotApplicableFallback()
    */
-  public function testNotApplicableFallback() {
+  public function testNotApplicableFallback(): void {
     /** @var \Drupal\Core\Field\FormatterPluginManager $formatter_plugin_manager */
     $formatter_plugin_manager = \Drupal::service('plugin.manager.field.formatter');
 
diff --git a/core/modules/field/tests/src/Kernel/KernelString/RawStringFormatterTest.php b/core/modules/field/tests/src/Kernel/KernelString/RawStringFormatterTest.php
index 7c9fdc24ba97..f57a25e4b6ae 100644
--- a/core/modules/field/tests/src/Kernel/KernelString/RawStringFormatterTest.php
+++ b/core/modules/field/tests/src/Kernel/KernelString/RawStringFormatterTest.php
@@ -109,7 +109,7 @@ protected function renderEntityFields(FieldableEntityInterface $entity, EntityVi
   /**
    * Tests string formatter output.
    */
-  public function testStringFormatter() {
+  public function testStringFormatter(): void {
     $value = $this->randomString();
     $value .= "\n\n<strong>" . $this->randomString() . '</strong>';
     $value .= "\n\n" . $this->randomString();
diff --git a/core/modules/field/tests/src/Kernel/KernelString/StringFormatterTest.php b/core/modules/field/tests/src/Kernel/KernelString/StringFormatterTest.php
index b9395cc4b5e8..6c55462e257f 100644
--- a/core/modules/field/tests/src/Kernel/KernelString/StringFormatterTest.php
+++ b/core/modules/field/tests/src/Kernel/KernelString/StringFormatterTest.php
@@ -121,7 +121,7 @@ protected function renderEntityFields(FieldableEntityInterface $entity, EntityVi
   /**
    * Tests string formatter output.
    */
-  public function testStringFormatter() {
+  public function testStringFormatter(): void {
     $value = $this->randomString();
     $value .= "\n\n<strong>" . $this->randomString() . '</strong>';
     $value .= "\n\n" . $this->randomString();
@@ -194,7 +194,7 @@ public function testStringFormatter() {
   /**
    * Test "link_to_entity" feature on fields which are added to config entity.
    */
-  public function testLinkToContentForEntitiesWithNoCanonicalPath() {
+  public function testLinkToContentForEntitiesWithNoCanonicalPath(): void {
     $this->enableModules(['entity_test']);
     $field_name = 'test_field_name';
     $entity_type = $bundle = 'entity_test_label';
diff --git a/core/modules/field/tests/src/Kernel/KernelString/UuidFormatterTest.php b/core/modules/field/tests/src/Kernel/KernelString/UuidFormatterTest.php
index f4013e66ea63..4ad35a1303ea 100644
--- a/core/modules/field/tests/src/Kernel/KernelString/UuidFormatterTest.php
+++ b/core/modules/field/tests/src/Kernel/KernelString/UuidFormatterTest.php
@@ -35,7 +35,7 @@ protected function setUp(): void {
   /**
    * Tests string formatter output.
    */
-  public function testUuidStringFormatter() {
+  public function testUuidStringFormatter(): void {
     $entity = EntityTest::create([]);
     $entity->save();
 
diff --git a/core/modules/field/tests/src/Kernel/KernelString/UuidItemTest.php b/core/modules/field/tests/src/Kernel/KernelString/UuidItemTest.php
index 1009c4b65a51..68cab88881d6 100644
--- a/core/modules/field/tests/src/Kernel/KernelString/UuidItemTest.php
+++ b/core/modules/field/tests/src/Kernel/KernelString/UuidItemTest.php
@@ -18,7 +18,7 @@ class UuidItemTest extends FieldKernelTestBase {
   /**
    * Tests 'uuid' random values.
    */
-  public function testSampleValue() {
+  public function testSampleValue(): void {
     $entity = EntityTest::create([]);
     $entity->save();
 
diff --git a/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldFormatterSettingsTest.php b/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldFormatterSettingsTest.php
index 2000ef2addd9..c2955f2d1123 100644
--- a/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldFormatterSettingsTest.php
+++ b/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldFormatterSettingsTest.php
@@ -47,7 +47,7 @@ protected function assertComponentNotExists(string $display_id, string $componen
   /**
    * Tests that migrated entity display settings can be loaded using D8 API's.
    */
-  public function testEntityDisplaySettings() {
+  public function testEntityDisplaySettings(): void {
     // Run tests.
     $field_name = "field_test";
     $expected = [
diff --git a/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldInstanceLabelDescriptionTest.php b/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldInstanceLabelDescriptionTest.php
index 935ef567f78a..62114c591f76 100644
--- a/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldInstanceLabelDescriptionTest.php
+++ b/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldInstanceLabelDescriptionTest.php
@@ -59,7 +59,7 @@ public static function migrateDumpAlter(KernelTestBase $test) {
   /**
    * Tests migration of field label and description translations.
    */
-  public function testFieldInstanceLabelDescriptionTranslationMigration() {
+  public function testFieldInstanceLabelDescriptionTranslationMigration(): void {
     $language_manager = $this->container->get('language_manager');
 
     // Tests fields on 'story' node type.
diff --git a/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldInstanceOptionTranslationTest.php b/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldInstanceOptionTranslationTest.php
index 0c2d9fbc9b7b..b3eaccf1a0a9 100644
--- a/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldInstanceOptionTranslationTest.php
+++ b/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldInstanceOptionTranslationTest.php
@@ -42,7 +42,7 @@ protected function setUp(): void {
   /**
    * Tests migration of file variables to file.settings.yml.
    */
-  public function testFieldInstanceOptionTranslation() {
+  public function testFieldInstanceOptionTranslation(): void {
     $language_manager = $this->container->get('language_manager');
 
     /** @var \Drupal\language\Config\LanguageConfigOverride $config_translation */
diff --git a/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldInstanceTest.php b/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldInstanceTest.php
index 6ca40283739a..e85f216de1c0 100644
--- a/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldInstanceTest.php
+++ b/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldInstanceTest.php
@@ -24,7 +24,7 @@ class MigrateFieldInstanceTest extends MigrateDrupal6TestBase {
   /**
    * Tests migration of file variables to file.settings.yml.
    */
-  public function testFieldInstanceMigration() {
+  public function testFieldInstanceMigration(): void {
     $this->migrateFields();
     $this->installConfig(['comment']);
     $this->executeMigration('d6_comment_type');
@@ -179,7 +179,7 @@ public function testFieldInstanceMigration() {
   /**
    * Tests migrating fields into non-existent content types.
    */
-  public function testMigrateFieldIntoUnknownNodeType() {
+  public function testMigrateFieldIntoUnknownNodeType(): void {
     $this->sourceDatabase->delete('node_type')
       ->condition('type', 'test_planet')
       ->execute();
diff --git a/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldOptionTranslationTest.php b/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldOptionTranslationTest.php
index 4f2223d888c7..8a06b183df0c 100644
--- a/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldOptionTranslationTest.php
+++ b/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldOptionTranslationTest.php
@@ -38,7 +38,7 @@ protected function setUp(): void {
   /**
    * Tests the Drupal 6 field to Drupal 8 migration.
    */
-  public function testFieldOptionTranslation() {
+  public function testFieldOptionTranslation(): void {
     $language_manager = $this->container->get('language_manager');
 
     // Test a select list with allowed values of key only.
diff --git a/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldTest.php b/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldTest.php
index 7b01ce525be0..789fac2fab34 100644
--- a/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldTest.php
+++ b/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldTest.php
@@ -25,7 +25,7 @@ protected function setUp(): void {
   /**
    * Tests the Drupal 6 field to Drupal 8 migration.
    */
-  public function testFields() {
+  public function testFields(): void {
     // Text field.
     /** @var \Drupal\field\Entity\FieldStorageConfig $field_storage */
     $field_storage = FieldStorageConfig::load('node.field_test');
diff --git a/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldWidgetSettingsTest.php b/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldWidgetSettingsTest.php
index 3ef3b6a6f415..6e2bf60c00c4 100644
--- a/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldWidgetSettingsTest.php
+++ b/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldWidgetSettingsTest.php
@@ -32,7 +32,7 @@ protected function setUp(): void {
   /**
    * Tests that migrated view modes can be loaded using D8 API's.
    */
-  public function testWidgetSettings() {
+  public function testWidgetSettings(): void {
     // Test the config can be loaded.
     $form_display = EntityFormDisplay::load('node.story.default');
     $this->assertNotNull($form_display);
diff --git a/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldFormatterSettingsTest.php b/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldFormatterSettingsTest.php
index 867b612a0528..ad426e82865e 100644
--- a/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldFormatterSettingsTest.php
+++ b/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldFormatterSettingsTest.php
@@ -95,7 +95,7 @@ protected function assertComponentNotExists(string $display_id, string $componen
   /**
    * Tests migration of D7 field formatter settings.
    */
-  public function testMigration() {
+  public function testMigration(): void {
     $this->assertEntity('comment.comment_node_article.default');
     $this->assertComponent('comment.comment_node_article.default', 'comment_body', 'text_default', 'hidden', 0);
 
diff --git a/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceLabelDescriptionTest.php b/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceLabelDescriptionTest.php
index 0ff526cd5464..191ee44a8697 100644
--- a/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceLabelDescriptionTest.php
+++ b/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceLabelDescriptionTest.php
@@ -78,7 +78,7 @@ public static function migrateDumpAlter(KernelTestBase $test) {
   /**
    * Tests migration of file variables to file.settings.yml.
    */
-  public function testFieldInstanceLabelDescriptionTranslationMigration() {
+  public function testFieldInstanceLabelDescriptionTranslationMigration(): void {
     $language_manager = $this->container->get('language_manager');
 
     // Check that the deleted field with translations was skipped.
diff --git a/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceOptionTranslationTest.php b/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceOptionTranslationTest.php
index 8e3c47234164..4dc437991d66 100644
--- a/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceOptionTranslationTest.php
+++ b/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceOptionTranslationTest.php
@@ -51,7 +51,7 @@ protected function setUp(): void {
   /**
    * Migrate field instance option translations.
    */
-  public function testFieldInstanceOptionTranslation() {
+  public function testFieldInstanceOptionTranslation(): void {
     $language_manager = $this->container->get('language_manager');
 
     /** @var \Drupal\language\Config\LanguageConfigOverride $config_translation */
diff --git a/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceTest.php b/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceTest.php
index 69cf915eac39..e3eb6744ba7a 100644
--- a/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceTest.php
+++ b/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceTest.php
@@ -108,7 +108,7 @@ protected function assertEntityReferenceFields(string $id, array $target_bundles
   /**
    * Tests migrating D7 field instances to field_config entities.
    */
-  public function testFieldInstances() {
+  public function testFieldInstances(): void {
     $this->assertEntity('comment.comment_node_page.comment_body', 'Comment', 'text_long', TRUE, FALSE);
     $this->assertEntity('node.page.body', 'Body', 'text_with_summary', FALSE, FALSE);
     $this->assertEntity('comment.comment_node_article.comment_body', 'Comment', 'text_long', TRUE, FALSE);
diff --git a/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceWidgetSettingsTest.php b/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceWidgetSettingsTest.php
index 6db3e78b4c6c..2415b3edee85 100644
--- a/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceWidgetSettingsTest.php
+++ b/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceWidgetSettingsTest.php
@@ -86,7 +86,7 @@ protected function assertComponent(string $display_id, string $component_id, str
   /**
    * Tests that migrated view modes can be loaded using D8 APIs.
    */
-  public function testWidgetSettings() {
+  public function testWidgetSettings(): void {
     $this->assertEntity('node.page.default', 'node', 'page');
     $this->assertComponent('node.page.default', 'body', 'text_textarea_with_summary', -4);
     $this->assertComponent('node.page.default', 'field_text_plain', 'string_textfield', -2);
diff --git a/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldOptionTranslationTest.php b/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldOptionTranslationTest.php
index 43f2800257ec..cb3e8662c251 100644
--- a/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldOptionTranslationTest.php
+++ b/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldOptionTranslationTest.php
@@ -49,7 +49,7 @@ protected function setUp(): void {
   /**
    * Tests the Drupal 7 field option translation to Drupal 8 migration.
    */
-  public function testFieldOptionTranslation() {
+  public function testFieldOptionTranslation(): void {
     $language_manager = $this->container->get('language_manager');
 
     /** @var \Drupal\language\Config\LanguageConfigOverride $config_translation */
diff --git a/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldTest.php b/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldTest.php
index 9021b9586b64..81631820ce68 100644
--- a/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldTest.php
+++ b/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldTest.php
@@ -70,7 +70,7 @@ protected function assertEntity(string $id, string $expected_type, bool $expecte
   /**
    * Tests migrating D7 fields to field_storage_config entities.
    */
-  public function testFields() {
+  public function testFields(): void {
     \Drupal::service('module_installer')->install(['datetime_range']);
     $this->installConfig(static::$modules);
     $this->executeMigration('d7_field');
@@ -196,7 +196,7 @@ public function testFields() {
   /**
    * Tests migrating D7 datetime fields.
    */
-  public function testDatetimeFields() {
+  public function testDatetimeFields(): void {
     $this->installConfig(static::$modules);
     $this->executeMigration('d7_field');
 
diff --git a/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateViewModesTest.php b/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateViewModesTest.php
index 6edb1b63334f..08ff4c30ff2a 100644
--- a/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateViewModesTest.php
+++ b/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateViewModesTest.php
@@ -50,7 +50,7 @@ protected function assertEntity(string $id, string $label, string $entity_type):
   /**
    * Tests migration of D7 view mode variables to D8 config entities.
    */
-  public function testMigration() {
+  public function testMigration(): void {
     $this->assertEntity('comment.full', 'Full', 'comment');
     $this->assertEntity('node.teaser', 'Teaser', 'node');
     $this->assertEntity('node.full', 'Full', 'node');
diff --git a/core/modules/field/tests/src/Kernel/Migrate/d7/RollbackFieldInstanceTest.php b/core/modules/field/tests/src/Kernel/Migrate/d7/RollbackFieldInstanceTest.php
index 2ab197f6a6f6..650db8a29455 100644
--- a/core/modules/field/tests/src/Kernel/Migrate/d7/RollbackFieldInstanceTest.php
+++ b/core/modules/field/tests/src/Kernel/Migrate/d7/RollbackFieldInstanceTest.php
@@ -17,7 +17,7 @@ class RollbackFieldInstanceTest extends MigrateFieldInstanceTest {
   /**
    * Tests migrating D7 fields to field_storage_config entities, then rolling back.
    */
-  public function testFieldInstances() {
+  public function testFieldInstances(): void {
     // Test that the field instances have migrated (prior to rollback).
     parent::testFieldInstances();
 
diff --git a/core/modules/field/tests/src/Kernel/Migrate/d7/RollbackFieldTest.php b/core/modules/field/tests/src/Kernel/Migrate/d7/RollbackFieldTest.php
index 0e7629c3eb3a..3e0d22d966d1 100644
--- a/core/modules/field/tests/src/Kernel/Migrate/d7/RollbackFieldTest.php
+++ b/core/modules/field/tests/src/Kernel/Migrate/d7/RollbackFieldTest.php
@@ -17,7 +17,7 @@ class RollbackFieldTest extends MigrateFieldTest {
   /**
    * Tests migrating D7 fields to field_storage_config entities, then rolling back.
    */
-  public function testFields() {
+  public function testFields(): void {
     // Test that the fields have migrated (prior to rollback).
     parent::testFields();
 
diff --git a/core/modules/field/tests/src/Kernel/Migrate/d7/RollbackViewModesTest.php b/core/modules/field/tests/src/Kernel/Migrate/d7/RollbackViewModesTest.php
index f69a9f9316da..7099294a78e9 100644
--- a/core/modules/field/tests/src/Kernel/Migrate/d7/RollbackViewModesTest.php
+++ b/core/modules/field/tests/src/Kernel/Migrate/d7/RollbackViewModesTest.php
@@ -22,7 +22,7 @@ class RollbackViewModesTest extends MigrateViewModesTest {
   /**
    * Tests migrating D7 view modes, then rolling back.
    */
-  public function testMigration() {
+  public function testMigration(): void {
     // Test that the view modes have migrated (prior to rollback).
     parent::testMigration();
 
diff --git a/core/modules/field/tests/src/Kernel/Number/NumberItemTest.php b/core/modules/field/tests/src/Kernel/Number/NumberItemTest.php
index 091bcc43859c..ce72c0e4ab06 100644
--- a/core/modules/field/tests/src/Kernel/Number/NumberItemTest.php
+++ b/core/modules/field/tests/src/Kernel/Number/NumberItemTest.php
@@ -52,7 +52,7 @@ protected function setUp(): void {
   /**
    * Tests using entity fields of the number field type.
    */
-  public function testNumberItem() {
+  public function testNumberItem(): void {
     // Verify entity creation.
     $entity = EntityTest::create();
     $integer = rand(0, 10);
@@ -148,7 +148,7 @@ public function testNumberItem() {
    *
    * @throws \Drupal\Core\Entity\EntityStorageException
    */
-  public function testConstraints($type, $min, $max, $value, $expect_constraints, $expected_constraint_message = '') {
+  public function testConstraints($type, $min, $max, $value, $expect_constraints, $expected_constraint_message = ''): void {
     $field = FieldConfig::loadByName('entity_test', 'entity_test', 'field_' . $type);
     $field->setSetting('min', $min);
     $field->setSetting('max', $max);
diff --git a/core/modules/field/tests/src/Kernel/ShapeItemTest.php b/core/modules/field/tests/src/Kernel/ShapeItemTest.php
index 61a9b843b3ff..e33c04a6140f 100644
--- a/core/modules/field/tests/src/Kernel/ShapeItemTest.php
+++ b/core/modules/field/tests/src/Kernel/ShapeItemTest.php
@@ -53,7 +53,7 @@ protected function setUp(): void {
   /**
    * Tests using entity fields of the shape field type.
    */
-  public function testShapeItem() {
+  public function testShapeItem(): void {
     // Verify entity creation.
     $entity = EntityTest::create();
     $shape = 'cube';
diff --git a/core/modules/field/tests/src/Kernel/TestItemTest.php b/core/modules/field/tests/src/Kernel/TestItemTest.php
index 9185d6f9fb99..f5f1874d7dc0 100644
--- a/core/modules/field/tests/src/Kernel/TestItemTest.php
+++ b/core/modules/field/tests/src/Kernel/TestItemTest.php
@@ -54,7 +54,7 @@ protected function setUp(): void {
   /**
    * Tests using entity fields of the test field type.
    */
-  public function testTestItem() {
+  public function testTestItem(): void {
     // Verify entity creation.
     $entity = EntityTest::create();
     $value = rand(1, 10);
diff --git a/core/modules/field/tests/src/Kernel/TestItemWithDependenciesTest.php b/core/modules/field/tests/src/Kernel/TestItemWithDependenciesTest.php
index 51ce521596e1..6a1e0fce1164 100644
--- a/core/modules/field/tests/src/Kernel/TestItemWithDependenciesTest.php
+++ b/core/modules/field/tests/src/Kernel/TestItemWithDependenciesTest.php
@@ -31,7 +31,7 @@ class TestItemWithDependenciesTest extends FieldKernelTestBase {
   /**
    * Tests that field types can add dependencies to field config entities.
    */
-  public function testTestItemWithDependencies() {
+  public function testTestItemWithDependencies(): void {
     // Create a 'test_field_with_dependencies' field and storage for validation.
     FieldStorageConfig::create([
       'field_name' => $this->fieldName,
diff --git a/core/modules/field/tests/src/Kernel/TestObjectItemTest.php b/core/modules/field/tests/src/Kernel/TestObjectItemTest.php
index 5338f3083d2e..c90262bc891e 100644
--- a/core/modules/field/tests/src/Kernel/TestObjectItemTest.php
+++ b/core/modules/field/tests/src/Kernel/TestObjectItemTest.php
@@ -44,7 +44,7 @@ protected function setUp(): void {
   /**
    * Tests the serialization of a field type that has an object.
    */
-  public function testTestObjectItem() {
+  public function testTestObjectItem(): void {
     $object = new \stdClass();
     $object->foo = 'bar';
     $entity = EntityTest::create();
diff --git a/core/modules/field/tests/src/Kernel/Timestamp/TimestampFormatterTest.php b/core/modules/field/tests/src/Kernel/Timestamp/TimestampFormatterTest.php
index 5e0a96bb451f..c6a20ba2979f 100644
--- a/core/modules/field/tests/src/Kernel/Timestamp/TimestampFormatterTest.php
+++ b/core/modules/field/tests/src/Kernel/Timestamp/TimestampFormatterTest.php
@@ -107,7 +107,7 @@ protected function renderEntityFields(FieldableEntityInterface $entity, EntityVi
   /**
    * Tests TimestampFormatter.
    */
-  public function testTimestampFormatter() {
+  public function testTimestampFormatter(): void {
     $data = [];
 
     // Test standard formats.
@@ -145,7 +145,7 @@ public function testTimestampFormatter() {
   /**
    * Tests TimestampAgoFormatter.
    */
-  public function testTimestampAgoFormatter() {
+  public function testTimestampAgoFormatter(): void {
     $data = [];
 
     foreach ([1, 2, 3, 4, 5, 6, 7] as $granularity) {
diff --git a/core/modules/field/tests/src/Kernel/Timestamp/TimestampItemTest.php b/core/modules/field/tests/src/Kernel/Timestamp/TimestampItemTest.php
index 5a8a2aba8dc4..7d097c387924 100644
--- a/core/modules/field/tests/src/Kernel/Timestamp/TimestampItemTest.php
+++ b/core/modules/field/tests/src/Kernel/Timestamp/TimestampItemTest.php
@@ -55,7 +55,7 @@ protected function setUp(): void {
   /**
    * Tests using entity fields of the datetime field type.
    */
-  public function testDateTime() {
+  public function testDateTime(): void {
     // Verify entity creation.
     $entity = EntityTest::create();
     $value = 1488914208;
diff --git a/core/modules/field/tests/src/Kernel/TranslationTest.php b/core/modules/field/tests/src/Kernel/TranslationTest.php
index 02e58e3108da..b021e108873f 100644
--- a/core/modules/field/tests/src/Kernel/TranslationTest.php
+++ b/core/modules/field/tests/src/Kernel/TranslationTest.php
@@ -108,7 +108,7 @@ protected function setUp(): void {
   /**
    * Tests translatable fields storage/retrieval.
    */
-  public function testTranslatableFieldSaveLoad() {
+  public function testTranslatableFieldSaveLoad(): void {
     // Enable field translations for nodes.
     field_test_entity_info_translatable('node', TRUE);
     $entity_type = \Drupal::entityTypeManager()->getDefinition('node');
@@ -204,7 +204,7 @@ public function testTranslatableFieldSaveLoad() {
    *
    * @see https://www.drupal.org/node/2404739
    */
-  public function testFieldAccess() {
+  public function testFieldAccess(): void {
     $access_control_handler = \Drupal::entityTypeManager()->getAccessControlHandler($this->entityType);
     $this->assertTrue($access_control_handler->fieldAccess('view', $this->field));
   }
diff --git a/core/modules/field/tests/src/Kernel/Uri/UriItemTest.php b/core/modules/field/tests/src/Kernel/Uri/UriItemTest.php
index ca4bbdbb35ff..90a7c856d0d5 100644
--- a/core/modules/field/tests/src/Kernel/Uri/UriItemTest.php
+++ b/core/modules/field/tests/src/Kernel/Uri/UriItemTest.php
@@ -35,7 +35,7 @@ class UriItemTest extends FieldKernelTestBase {
   /**
    * Tests URI field.
    */
-  public function testUriField() {
+  public function testUriField(): void {
     $label = $this->randomMachineName();
 
     // Create a field with settings to validate.
diff --git a/core/modules/field/tests/src/Kernel/Views/HandlerFieldFieldTest.php b/core/modules/field/tests/src/Kernel/Views/HandlerFieldFieldTest.php
index 523cbccd3047..def2a913fcdc 100644
--- a/core/modules/field/tests/src/Kernel/Views/HandlerFieldFieldTest.php
+++ b/core/modules/field/tests/src/Kernel/Views/HandlerFieldFieldTest.php
@@ -66,7 +66,7 @@ class HandlerFieldFieldTest extends KernelTestBase {
   /**
    * Tests fields rendering in views.
    */
-  public function testFieldRender() {
+  public function testFieldRender(): void {
     $this->installConfig(['filter']);
     $this->installEntitySchema('user');
     $this->installEntitySchema('node');
diff --git a/core/modules/field/tests/src/Kernel/WidgetPluginManagerTest.php b/core/modules/field/tests/src/Kernel/WidgetPluginManagerTest.php
index 5c0a38569d94..d567a506d063 100644
--- a/core/modules/field/tests/src/Kernel/WidgetPluginManagerTest.php
+++ b/core/modules/field/tests/src/Kernel/WidgetPluginManagerTest.php
@@ -16,7 +16,7 @@ class WidgetPluginManagerTest extends FieldKernelTestBase {
   /**
    * Tests that the widget definitions alter hook works.
    */
-  public function testWidgetDefinitionAlter() {
+  public function testWidgetDefinitionAlter(): void {
     $widget_definition = \Drupal::service('plugin.manager.field.widget')->getDefinition('test_field_widget_multiple');
 
     // Test if hook_field_widget_info_alter is being called.
@@ -28,7 +28,7 @@ public function testWidgetDefinitionAlter() {
    *
    * @see \Drupal\field\Tests\FormatterPluginManagerTest::testNotApplicableFallback()
    */
-  public function testNotApplicableFallback() {
+  public function testNotApplicableFallback(): void {
     /** @var \Drupal\Core\Field\WidgetPluginManager $widget_plugin_manager */
     $widget_plugin_manager = \Drupal::service('plugin.manager.field.widget');
 
diff --git a/core/modules/field/tests/src/Unit/FieldConfigAccessControlHandlerTest.php b/core/modules/field/tests/src/Unit/FieldConfigAccessControlHandlerTest.php
index 67d900c626e0..53afa0e38308 100644
--- a/core/modules/field/tests/src/Unit/FieldConfigAccessControlHandlerTest.php
+++ b/core/modules/field/tests/src/Unit/FieldConfigAccessControlHandlerTest.php
@@ -37,7 +37,7 @@ protected function setUp(): void {
   /**
    * Ensures field config access is working properly.
    */
-  public function testAccess() {
+  public function testAccess(): void {
     $this->assertAllowOperations([], $this->anon);
     $this->assertAllowOperations(['view', 'update', 'delete'], $this->member);
   }
diff --git a/core/modules/field/tests/src/Unit/FieldConfigEntityUnitTest.php b/core/modules/field/tests/src/Unit/FieldConfigEntityUnitTest.php
index 5797c8a35205..51e564c35994 100644
--- a/core/modules/field/tests/src/Unit/FieldConfigEntityUnitTest.php
+++ b/core/modules/field/tests/src/Unit/FieldConfigEntityUnitTest.php
@@ -113,7 +113,7 @@ protected function setUp(): void {
   /**
    * @covers ::calculateDependencies
    */
-  public function testCalculateDependencies() {
+  public function testCalculateDependencies(): void {
     // Mock the interfaces necessary to create a dependency on a bundle entity.
     $target_entity_type = $this->createMock('\Drupal\Core\Entity\EntityTypeInterface');
     $target_entity_type->expects($this->any())
@@ -151,7 +151,7 @@ public function testCalculateDependencies() {
   /**
    * Tests that invalid bundles are handled.
    */
-  public function testCalculateDependenciesIncorrectBundle() {
+  public function testCalculateDependenciesIncorrectBundle(): void {
     $storage = $this->createMock('\Drupal\Core\Config\Entity\ConfigEntityStorageInterface');
     $storage->expects($this->any())
       ->method('load')
@@ -194,7 +194,7 @@ public function testCalculateDependenciesIncorrectBundle() {
   /**
    * @covers ::onDependencyRemoval
    */
-  public function testOnDependencyRemoval() {
+  public function testOnDependencyRemoval(): void {
     $this->fieldTypePluginManager->expects($this->any())
       ->method('getDefinition')
       ->with('test_field')
@@ -223,7 +223,7 @@ public function testOnDependencyRemoval() {
   /**
    * @covers ::toArray
    */
-  public function testToArray() {
+  public function testToArray(): void {
     $field = new FieldConfig([
       'field_name' => $this->fieldStorage->getName(),
       'entity_type' => 'test_entity_type',
@@ -268,7 +268,7 @@ public function testToArray() {
   /**
    * @covers ::getType
    */
-  public function testGetType() {
+  public function testGetType(): void {
     // Ensure that FieldConfig::getType() is not delegated to
     // FieldStorage.
     $this->entityFieldManager->expects($this->never())
diff --git a/core/modules/field/tests/src/Unit/FieldStorageConfigAccessControlHandlerTest.php b/core/modules/field/tests/src/Unit/FieldStorageConfigAccessControlHandlerTest.php
index ab0f9d2492e6..8b31e5a7e1a9 100644
--- a/core/modules/field/tests/src/Unit/FieldStorageConfigAccessControlHandlerTest.php
+++ b/core/modules/field/tests/src/Unit/FieldStorageConfigAccessControlHandlerTest.php
@@ -176,7 +176,7 @@ public function assertAllowOperations(array $allow_operations, AccountInterface
   /**
    * Ensures field storage config access is working properly.
    */
-  public function testAccess() {
+  public function testAccess(): void {
     $this->assertAllowOperations([], $this->anon);
     $this->assertAllowOperations(['view', 'update', 'delete'], $this->member);
 
diff --git a/core/modules/field/tests/src/Unit/FieldStorageConfigEntityUnitTest.php b/core/modules/field/tests/src/Unit/FieldStorageConfigEntityUnitTest.php
index 937d08810908..43be1c5739c3 100644
--- a/core/modules/field/tests/src/Unit/FieldStorageConfigEntityUnitTest.php
+++ b/core/modules/field/tests/src/Unit/FieldStorageConfigEntityUnitTest.php
@@ -67,7 +67,7 @@ protected function setUp(): void {
   /**
    * @covers ::calculateDependencies
    */
-  public function testCalculateDependencies() {
+  public function testCalculateDependencies(): void {
     // Create a mock entity type for FieldStorageConfig.
     $fieldStorageConfigentityType = $this->createMock('\Drupal\Core\Config\Entity\ConfigEntityTypeInterface');
     $fieldStorageConfigentityType->expects($this->any())
@@ -116,7 +116,7 @@ public function testCalculateDependencies() {
    *
    * @covers ::getCardinality
    */
-  public function testStoredCardinality() {
+  public function testStoredCardinality(): void {
     $this->fieldTypeManager->expects($this->any())
       ->method('getDefinition')
       ->with('test_field_type')
@@ -143,7 +143,7 @@ public function testStoredCardinality() {
    *
    * @covers ::getCardinality
    */
-  public function testEnforcedCardinality() {
+  public function testEnforcedCardinality(): void {
     $this->fieldTypeManager->expects($this->any())
       ->method('getDefinition')
       ->with('test_field_type')
@@ -175,7 +175,7 @@ public function testEnforcedCardinality() {
    * @param mixed $enforced_cardinality
    *   Enforced cardinality
    */
-  public function testInvalidEnforcedCardinality($enforced_cardinality) {
+  public function testInvalidEnforcedCardinality($enforced_cardinality): void {
     $this->fieldTypeManager->expects($this->any())
       ->method('getDefinition')
       ->with('test_field_type')
diff --git a/core/modules/field/tests/src/Unit/FieldUninstallValidatorTest.php b/core/modules/field/tests/src/Unit/FieldUninstallValidatorTest.php
index ebd28aaacf46..dffb6798bdf0 100644
--- a/core/modules/field/tests/src/Unit/FieldUninstallValidatorTest.php
+++ b/core/modules/field/tests/src/Unit/FieldUninstallValidatorTest.php
@@ -39,7 +39,7 @@ protected function setUp(): void {
   /**
    * @covers ::validate
    */
-  public function testValidateNoStorages() {
+  public function testValidateNoStorages(): void {
     $this->fieldUninstallValidator->expects($this->once())
       ->method('getFieldStoragesByModule')
       ->willReturn([]);
@@ -53,7 +53,7 @@ public function testValidateNoStorages() {
   /**
    * @covers ::validate
    */
-  public function testValidateDeleted() {
+  public function testValidateDeleted(): void {
     $field_storage = $this->getMockBuilder('Drupal\field\Entity\FieldStorageConfig')
       ->disableOriginalConstructor()
       ->getMock();
@@ -73,7 +73,7 @@ public function testValidateDeleted() {
   /**
    * @covers ::validate
    */
-  public function testValidateNoDeleted() {
+  public function testValidateNoDeleted(): void {
     $field_storage = $this->getMockBuilder('Drupal\field\Entity\FieldStorageConfig')
       ->disableOriginalConstructor()
       ->getMock();
diff --git a/core/modules/field/tests/src/Unit/Plugin/migrate/process/ProcessFieldTest.php b/core/modules/field/tests/src/Unit/Plugin/migrate/process/ProcessFieldTest.php
index 1014e9f056cf..61d60f1c0524 100644
--- a/core/modules/field/tests/src/Unit/Plugin/migrate/process/ProcessFieldTest.php
+++ b/core/modules/field/tests/src/Unit/Plugin/migrate/process/ProcessFieldTest.php
@@ -81,7 +81,7 @@ protected function setUp(): void {
    * @covers ::transform
    * @dataProvider providerTestTransform
    */
-  public function testTransform($method, $value, $expected_value, $migrate_exception = '', $plugin_not_found = FALSE) {
+  public function testTransform($method, $value, $expected_value, $migrate_exception = '', $plugin_not_found = FALSE): void {
     if ($method) {
       $this->fieldPlugin->$method($this->row->reveal())->willReturn($expected_value);
     }
diff --git a/core/modules/field/tests/src/Unit/Plugin/migrate/process/d6/FieldInstanceSettingsTest.php b/core/modules/field/tests/src/Unit/Plugin/migrate/process/d6/FieldInstanceSettingsTest.php
index 06fa3e8f2110..c22194ad520a 100644
--- a/core/modules/field/tests/src/Unit/Plugin/migrate/process/d6/FieldInstanceSettingsTest.php
+++ b/core/modules/field/tests/src/Unit/Plugin/migrate/process/d6/FieldInstanceSettingsTest.php
@@ -23,7 +23,7 @@ class FieldInstanceSettingsTest extends UnitTestCase {
    *
    * @dataProvider getSettingsProvider
    */
-  public function testGetSettings($field_type, $instance_settings, $expected) {
+  public function testGetSettings($field_type, $instance_settings, $expected): void {
     $instance_settings = unserialize($instance_settings);
     $migration = $this->createMock(MigrationInterface::class);
     $plugin = new FieldInstanceSettings([], 'd6_field_field_settings', []);
diff --git a/core/modules/field/tests/src/Unit/Plugin/migrate/process/d6/FieldSettingsTest.php b/core/modules/field/tests/src/Unit/Plugin/migrate/process/d6/FieldSettingsTest.php
index d8307276d19d..978bb9ea78a0 100644
--- a/core/modules/field/tests/src/Unit/Plugin/migrate/process/d6/FieldSettingsTest.php
+++ b/core/modules/field/tests/src/Unit/Plugin/migrate/process/d6/FieldSettingsTest.php
@@ -21,7 +21,7 @@ class FieldSettingsTest extends UnitTestCase {
    *
    * @dataProvider getSettingsProvider
    */
-  public function testGetSettings($field_type, $field_settings, $allowed_values) {
+  public function testGetSettings($field_type, $field_settings, $allowed_values): void {
     $migration = $this->createMock(MigrationInterface::class);
     $plugin = new FieldSettings([], 'd6_field_settings', []);
 
diff --git a/core/modules/field/tests/src/Unit/Plugin/migrate/process/d6/FieldTypeDefaultsTest.php b/core/modules/field/tests/src/Unit/Plugin/migrate/process/d6/FieldTypeDefaultsTest.php
index d3f3c3b7b1a9..8c15d4b96d68 100644
--- a/core/modules/field/tests/src/Unit/Plugin/migrate/process/d6/FieldTypeDefaultsTest.php
+++ b/core/modules/field/tests/src/Unit/Plugin/migrate/process/d6/FieldTypeDefaultsTest.php
@@ -29,7 +29,7 @@ protected function setUp(): void {
    *
    * @covers ::transform
    */
-  public function testDefaults() {
+  public function testDefaults(): void {
     $this->row->expects($this->once())
       ->method('getSourceProperty')
       ->willReturn('date');
@@ -48,7 +48,7 @@ public function testDefaults() {
    *
    * @covers ::transform
    */
-  public function testDefaultsException() {
+  public function testDefaultsException(): void {
     $this->expectException(MigrateException::class);
     $this->expectExceptionMessage(sprintf('Failed to lookup field type %s in the static map.', var_export([], TRUE)));
     $this->plugin->transform([], $this->migrateExecutable, $this->row, 'property');
diff --git a/core/modules/field/tests/src/Unit/Plugin/migrate/process/d7/FieldInstanceSettingsTest.php b/core/modules/field/tests/src/Unit/Plugin/migrate/process/d7/FieldInstanceSettingsTest.php
index c7c61905970b..616735ed767e 100644
--- a/core/modules/field/tests/src/Unit/Plugin/migrate/process/d7/FieldInstanceSettingsTest.php
+++ b/core/modules/field/tests/src/Unit/Plugin/migrate/process/d7/FieldInstanceSettingsTest.php
@@ -21,7 +21,7 @@ class FieldInstanceSettingsTest extends MigrateTestCase {
    *
    * @covers ::transform
    */
-  public function testTransformImageSettings() {
+  public function testTransformImageSettings(): void {
     $migration = $this->createMock(MigrationInterface::class);
     $plugin = new FieldInstanceSettings([], 'd7_field_instance_settings', []);
 
diff --git a/core/modules/field/tests/src/Unit/Plugin/migrate/process/d7/FieldSettingsTest.php b/core/modules/field/tests/src/Unit/Plugin/migrate/process/d7/FieldSettingsTest.php
index f7d53f61e09b..86ab851cc8ae 100644
--- a/core/modules/field/tests/src/Unit/Plugin/migrate/process/d7/FieldSettingsTest.php
+++ b/core/modules/field/tests/src/Unit/Plugin/migrate/process/d7/FieldSettingsTest.php
@@ -21,7 +21,7 @@ class FieldSettingsTest extends MigrateTestCase {
    *
    * @covers ::transform
    */
-  public function testTransformImageSettings() {
+  public function testTransformImageSettings(): void {
     $migration = $this->createMock(MigrationInterface::class);
     $plugin = new FieldSettings([], 'd7_field_settings', []);
 
diff --git a/core/modules/field/tests/src/Unit/Plugin/migrate/process/d7/FieldTypeDefaultsTest.php b/core/modules/field/tests/src/Unit/Plugin/migrate/process/d7/FieldTypeDefaultsTest.php
index eef26b0c4e05..b7199367d81a 100644
--- a/core/modules/field/tests/src/Unit/Plugin/migrate/process/d7/FieldTypeDefaultsTest.php
+++ b/core/modules/field/tests/src/Unit/Plugin/migrate/process/d7/FieldTypeDefaultsTest.php
@@ -28,7 +28,7 @@ protected function setUp(): void {
    *
    * @covers ::transform
    */
-  public function testDefaults() {
+  public function testDefaults(): void {
     // Assert common values are passed through without modification.
     $this->assertNull($this->plugin->transform(NULL, $this->migrateExecutable, $this->row, 'property'));
     $this->assertEquals('string', $this->plugin->transform('string', $this->migrateExecutable, $this->row, 'property'));
diff --git a/core/modules/field_layout/tests/src/Functional/FieldLayoutTest.php b/core/modules/field_layout/tests/src/Functional/FieldLayoutTest.php
index f1fbc3c8e771..ad0eea1df505 100644
--- a/core/modules/field_layout/tests/src/Functional/FieldLayoutTest.php
+++ b/core/modules/field_layout/tests/src/Functional/FieldLayoutTest.php
@@ -58,7 +58,7 @@ protected function setUp(): void {
   /**
    * Tests an entity type that has fields shown by default.
    */
-  public function testNodeView() {
+  public function testNodeView(): void {
     // By default, the one-column layout is used.
     $this->drupalGet('node/1');
     $this->assertSession()->elementExists('css', '.layout--onecol');
@@ -72,7 +72,7 @@ public function testNodeView() {
   /**
    * Tests that changes to the regions still leave the fields visible.
    */
-  public function testRegionChanges() {
+  public function testRegionChanges(): void {
     $this->drupalGet('admin/structure/types/manage/article/display');
     $this->assertEquals(['Content', 'Disabled'], $this->getRegionTitles());
     $this->assertSession()->optionExists('fields[body][region]', 'content');
diff --git a/core/modules/field_layout/tests/src/FunctionalJavascript/FieldLayoutTest.php b/core/modules/field_layout/tests/src/FunctionalJavascript/FieldLayoutTest.php
index b00bced862a3..485e0375d103 100644
--- a/core/modules/field_layout/tests/src/FunctionalJavascript/FieldLayoutTest.php
+++ b/core/modules/field_layout/tests/src/FunctionalJavascript/FieldLayoutTest.php
@@ -56,7 +56,7 @@ protected function setUp(): void {
   /**
    * Tests that layouts are unique per view mode.
    */
-  public function testEntityViewModes() {
+  public function testEntityViewModes(): void {
     // By default, the field is not visible.
     $this->drupalGet('entity_test/1/test');
     $this->assertSession()->elementNotExists('css', '.layout__region--content ');
@@ -84,7 +84,7 @@ public function testEntityViewModes() {
   /**
    * Tests the use of field layout for entity form displays.
    */
-  public function testEntityForm() {
+  public function testEntityForm(): void {
     // By default, the one-column layout is used.
     $this->drupalGet('entity_test/manage/1/edit');
     $this->assertFieldInRegion('field_test_text[0][value]', 'content');
@@ -153,7 +153,7 @@ public function testEntityForm() {
   /**
    * Tests the use of field layout for entity view displays.
    */
-  public function testEntityView() {
+  public function testEntityView(): void {
     // The one-column layout is in use.
     $this->drupalGet('entity_test/structure/entity_test/display');
     $this->assertEquals(['Content', 'Disabled'], $this->getRegionTitles());
@@ -216,7 +216,7 @@ public function testEntityView() {
   /**
    * Tests layout plugins with forms.
    */
-  public function testLayoutForms() {
+  public function testLayoutForms(): void {
     $this->drupalGet('entity_test/structure/entity_test/display');
     // Switch to a field layout with settings.
     $this->click('#edit-field-layouts');
@@ -255,7 +255,7 @@ public function testLayoutForms() {
   /**
    * Tests changing the formatter and region at the same time.
    */
-  public function testChangingFormatterAndRegion() {
+  public function testChangingFormatterAndRegion(): void {
     $assert_session = $this->assertSession();
     $page = $this->getSession()->getPage();
 
diff --git a/core/modules/field_layout/tests/src/Kernel/FieldLayoutEntityDisplayTest.php b/core/modules/field_layout/tests/src/Kernel/FieldLayoutEntityDisplayTest.php
index 3d555629dbb7..eeab5c8a640a 100644
--- a/core/modules/field_layout/tests/src/Kernel/FieldLayoutEntityDisplayTest.php
+++ b/core/modules/field_layout/tests/src/Kernel/FieldLayoutEntityDisplayTest.php
@@ -29,7 +29,7 @@ class FieldLayoutEntityDisplayTest extends KernelTestBase {
    * @covers ::preSave
    * @covers ::calculateDependencies
    */
-  public function testPreSave() {
+  public function testPreSave(): void {
     // Create an entity display with one hidden and one visible field.
     $entity_display = FieldLayoutEntityViewDisplay::create([
       'targetEntityType' => 'entity_test',
diff --git a/core/modules/field_layout/tests/src/Kernel/FieldLayoutUninstallTest.php b/core/modules/field_layout/tests/src/Kernel/FieldLayoutUninstallTest.php
index 3998c0babbbe..bf743bb5dbcd 100644
--- a/core/modules/field_layout/tests/src/Kernel/FieldLayoutUninstallTest.php
+++ b/core/modules/field_layout/tests/src/Kernel/FieldLayoutUninstallTest.php
@@ -14,7 +14,7 @@ class FieldLayoutUninstallTest extends LayoutBuilderCompatibilityTestBase {
   /**
    * Ensures field layout can be uninstalled with layout builder enabled.
    */
-  public function testFieldLayoutUninstall() {
+  public function testFieldLayoutUninstall(): void {
     // Setup user schema so user hook uninstall hook doesn't break.
     $this->installSchema('user', 'users_data');
 
diff --git a/core/modules/field_layout/tests/src/Unit/FieldLayoutBuilderTest.php b/core/modules/field_layout/tests/src/Unit/FieldLayoutBuilderTest.php
index fca15bb05c06..34d78abdba19 100644
--- a/core/modules/field_layout/tests/src/Unit/FieldLayoutBuilderTest.php
+++ b/core/modules/field_layout/tests/src/Unit/FieldLayoutBuilderTest.php
@@ -78,7 +78,7 @@ protected function setUp(): void {
    * @covers ::buildView
    * @covers ::getFields
    */
-  public function testBuildView() {
+  public function testBuildView(): void {
     $definitions = [];
     $non_configurable_field_definition = $this->prophesize(FieldDefinitionInterface::class);
     $non_configurable_field_definition->isDisplayConfigurable('view')->willReturn(FALSE);
@@ -167,7 +167,7 @@ public function testBuildView() {
    * @covers ::buildForm
    * @covers ::getFields
    */
-  public function testBuildForm() {
+  public function testBuildForm(): void {
     $definitions = [];
     $non_configurable_field_definition = $this->prophesize(FieldDefinitionInterface::class);
     $non_configurable_field_definition->isDisplayConfigurable('form')->willReturn(FALSE);
@@ -267,7 +267,7 @@ public function testBuildForm() {
   /**
    * @covers ::buildForm
    */
-  public function testBuildFormEmpty() {
+  public function testBuildFormEmpty(): void {
     $definitions = [];
     $non_configurable_field_definition = $this->prophesize(FieldDefinitionInterface::class);
     $non_configurable_field_definition->isDisplayConfigurable('form')->willReturn(FALSE);
@@ -308,7 +308,7 @@ public function testBuildFormEmpty() {
   /**
    * @covers ::buildForm
    */
-  public function testBuildFormNoLayout() {
+  public function testBuildFormNoLayout(): void {
     $this->entityFieldManager->getFieldDefinitions(Argument::any(), Argument::any())->shouldNotBeCalled();
 
     $build = [
diff --git a/core/modules/field_ui/tests/src/Functional/EntityDisplayModeTest.php b/core/modules/field_ui/tests/src/Functional/EntityDisplayModeTest.php
index 896d9ff4b866..a1fda50c8bb1 100644
--- a/core/modules/field_ui/tests/src/Functional/EntityDisplayModeTest.php
+++ b/core/modules/field_ui/tests/src/Functional/EntityDisplayModeTest.php
@@ -47,7 +47,7 @@ protected function setUp(): void {
   /**
    * Tests the EntityViewMode user interface.
    */
-  public function testEntityViewModeUI() {
+  public function testEntityViewModeUI(): void {
     // Test the listing page.
     $this->drupalGet('admin/structure/display-modes/view');
     $this->assertSession()->statusCodeEquals(403);
@@ -104,7 +104,7 @@ public function testEntityViewModeUI() {
   /**
    * Tests the EntityFormMode user interface.
    */
-  public function testEntityFormModeUI() {
+  public function testEntityFormModeUI(): void {
     // Test the listing page.
     $this->drupalGet('admin/structure/display-modes/form');
     $this->assertSession()->statusCodeEquals(403);
@@ -164,7 +164,7 @@ public function testEntityFormModeUI() {
    *
    * @see https://www.drupal.org/node/2858569
    */
-  public function testAlphabeticalDisplaySettings() {
+  public function testAlphabeticalDisplaySettings(): void {
     $this->drupalLogin($this->drupalCreateUser([
       'access administration pages',
       'administer content types',
diff --git a/core/modules/field_ui/tests/src/Functional/EntityDisplayTest.php b/core/modules/field_ui/tests/src/Functional/EntityDisplayTest.php
index 51c6e625595b..3e6655cae906 100644
--- a/core/modules/field_ui/tests/src/Functional/EntityDisplayTest.php
+++ b/core/modules/field_ui/tests/src/Functional/EntityDisplayTest.php
@@ -37,7 +37,7 @@ protected function setUp(): void {
   /**
    * Tests the use of regions for entity view displays.
    */
-  public function testEntityView() {
+  public function testEntityView(): void {
     $this->drupalGet('entity_test/structure/entity_test/display');
     $this->assertSession()->elementExists('css', '.region-content-message.region-empty');
     $this->assertTrue($this->assertSession()->optionExists('fields[field_test_text][region]', 'hidden')->isSelected());
diff --git a/core/modules/field_ui/tests/src/Functional/FieldTypeCategoriesIntegrationTest.php b/core/modules/field_ui/tests/src/Functional/FieldTypeCategoriesIntegrationTest.php
index 72d5e4c1438a..bfe52b35de3f 100644
--- a/core/modules/field_ui/tests/src/Functional/FieldTypeCategoriesIntegrationTest.php
+++ b/core/modules/field_ui/tests/src/Functional/FieldTypeCategoriesIntegrationTest.php
@@ -43,7 +43,7 @@ protected function setUp(): void {
   /**
    * Tests if the libraries are loaded on FieldStorageAddForm.
    */
-  public function testLibrariesLoaded() {
+  public function testLibrariesLoaded(): void {
     $this->drupalGet('admin/structure/types/manage/' . $this->drupalCreateContentType()->id() . '/fields/add-field');
     $settings = $this->getDrupalSettings();
     $css_libraries = [
diff --git a/core/modules/field_ui/tests/src/Functional/FieldUIDeleteTest.php b/core/modules/field_ui/tests/src/Functional/FieldUIDeleteTest.php
index 834b4fd7e654..e412f8dc77d1 100644
--- a/core/modules/field_ui/tests/src/Functional/FieldUIDeleteTest.php
+++ b/core/modules/field_ui/tests/src/Functional/FieldUIDeleteTest.php
@@ -74,7 +74,7 @@ protected function setUp(): void {
   /**
    * Tests that deletion removes field storages and fields as expected.
    */
-  public function testDeleteField() {
+  public function testDeleteField(): void {
     $field_label = $this->randomMachineName();
     $field_name_input = 'test';
     $field_name = 'field_test';
diff --git a/core/modules/field_ui/tests/src/Functional/FieldUIIndentationTest.php b/core/modules/field_ui/tests/src/Functional/FieldUIIndentationTest.php
index e7aa52a41cfd..5d95563b69be 100644
--- a/core/modules/field_ui/tests/src/Functional/FieldUIIndentationTest.php
+++ b/core/modules/field_ui/tests/src/Functional/FieldUIIndentationTest.php
@@ -44,7 +44,7 @@ protected function setUp(): void {
 
   }
 
-  public function testIndentation() {
+  public function testIndentation(): void {
     $this->drupalGet('admin/structure/types/manage/page/display');
     $this->assertSession()->responseContains('js-indentation indentation');
   }
diff --git a/core/modules/field_ui/tests/src/Functional/FieldUIRouteTest.php b/core/modules/field_ui/tests/src/Functional/FieldUIRouteTest.php
index 963143ea2b89..a720046ad331 100644
--- a/core/modules/field_ui/tests/src/Functional/FieldUIRouteTest.php
+++ b/core/modules/field_ui/tests/src/Functional/FieldUIRouteTest.php
@@ -48,7 +48,7 @@ protected function setUp(): void {
   /**
    * Ensures that entity types with bundles do not break following entity types.
    */
-  public function testFieldUIRoutes() {
+  public function testFieldUIRoutes(): void {
     $this->drupalGet('entity_test_no_id/structure/entity_test/fields');
     $this->assertSession()->pageTextContains('No fields are present yet.');
 
@@ -131,7 +131,7 @@ public function assertLocalTasks(): void {
   /**
    * Asserts that admin routes are correctly marked as such.
    */
-  public function testAdminRoute() {
+  public function testAdminRoute(): void {
     $route = \Drupal::service('router.route_provider')->getRouteByName('entity.entity_test.field_ui_fields');
     $is_admin = \Drupal::service('router.admin_context')->isAdminRoute($route);
     $this->assertTrue($is_admin, 'Admin route correctly marked for "Manage fields" page.');
diff --git a/core/modules/field_ui/tests/src/Functional/ManageDisplayTest.php b/core/modules/field_ui/tests/src/Functional/ManageDisplayTest.php
index b5cac2934d80..b70b7639cbd9 100644
--- a/core/modules/field_ui/tests/src/Functional/ManageDisplayTest.php
+++ b/core/modules/field_ui/tests/src/Functional/ManageDisplayTest.php
@@ -104,7 +104,7 @@ protected function setUp(): void {
   /**
    * Tests switching view modes to use custom or 'default' settings'.
    */
-  public function testViewModeCustom() {
+  public function testViewModeCustom(): void {
     // Create a field, and a node with some data for the field.
     $this->fieldUIAddNewField('admin/structure/types/manage/' . $this->type, 'test', 'Test field');
     \Drupal::service('entity_field.manager')->clearCachedFieldDefinitions();
@@ -181,7 +181,7 @@ public function testViewModeCustom() {
   /**
    * Tests the local tasks are displayed correctly for view modes.
    */
-  public function testViewModeLocalTasks() {
+  public function testViewModeLocalTasks(): void {
     $manage_display = 'admin/structure/types/manage/' . $this->type . '/display';
     $this->drupalGet($manage_display);
     $this->assertSession()->linkNotExists('Full content');
@@ -195,7 +195,7 @@ public function testViewModeLocalTasks() {
   /**
    * Tests that fields with no explicit display settings do not break.
    */
-  public function testNonInitializedFields() {
+  public function testNonInitializedFields(): void {
     // Create a test field.
     $this->fieldUIAddNewField('admin/structure/types/manage/' . $this->type, 'test', 'Test');
 
@@ -227,7 +227,7 @@ public function testViewModeUi(): void {
   /**
    * Tests that a message is shown when there are no fields.
    */
-  public function testNoFieldsDisplayOverview() {
+  public function testNoFieldsDisplayOverview(): void {
     // Create a fresh content type without any fields.
     NodeType::create([
       'type' => 'no_fields',
@@ -242,7 +242,7 @@ public function testNoFieldsDisplayOverview() {
   /**
    * Tests if display mode local tasks appear in alphabetical order by label.
    */
-  public function testViewModeLocalTasksOrder() {
+  public function testViewModeLocalTasksOrder(): void {
     $manage_display = 'admin/structure/types/manage/' . $this->type . '/display';
 
     // Specify the 'rss' mode, check that the field is displayed the same.
@@ -267,7 +267,7 @@ public function testViewModeLocalTasksOrder() {
   /**
    * Tests if form mode local tasks appear in alphabetical order by label.
    */
-  public function testFormModeLocalTasksOrder() {
+  public function testFormModeLocalTasksOrder(): void {
     EntityFormMode::create([
       'id' => 'node.big',
       'label' => 'Big Form',
diff --git a/core/modules/field_ui/tests/src/Functional/ManageFieldsFunctionalTest.php b/core/modules/field_ui/tests/src/Functional/ManageFieldsFunctionalTest.php
index fcf9fd50ded0..b17646d2e9ab 100644
--- a/core/modules/field_ui/tests/src/Functional/ManageFieldsFunctionalTest.php
+++ b/core/modules/field_ui/tests/src/Functional/ManageFieldsFunctionalTest.php
@@ -20,7 +20,7 @@ class ManageFieldsFunctionalTest extends ManageFieldsFunctionalTestBase {
   /**
    * Tests that default value is correctly validated and saved.
    */
-  public function testDefaultValue() {
+  public function testDefaultValue(): void {
     // Create a test field storage and field.
     $field_name = 'test';
     FieldStorageConfig::create([
@@ -112,7 +112,7 @@ public function testDefaultValue() {
   /**
    * Tests that Field UI respects disallowed field names.
    */
-  public function testDisallowedFieldNames() {
+  public function testDisallowedFieldNames(): void {
     // Reset the field prefix so we can test properly.
     $this->config('field_ui.settings')->set('field_prefix', '')->save();
 
@@ -144,7 +144,7 @@ public function testDisallowedFieldNames() {
   /**
    * Tests that Field UI respects locked fields.
    */
-  public function testLockedField() {
+  public function testLockedField(): void {
     // Create a locked field and attach it to a bundle. We need to do this
     // programmatically as there's no way to create a locked field through UI.
     $field_name = $this->randomMachineName(8);
@@ -178,7 +178,7 @@ public function testLockedField() {
   /**
    * Tests that Field UI respects the 'no_ui' flag in the field type definition.
    */
-  public function testHiddenFields() {
+  public function testHiddenFields(): void {
     // Check that the field type is not available in the 'add new field' row.
     $this->drupalGet('admin/structure/types/manage/' . $this->contentType . '/fields/add-field');
     $this->assertSession()->elementNotExists('css', "[name='new_storage_type'][value='hidden_test_field']");
@@ -244,7 +244,7 @@ public function testHiddenFields() {
   /**
    * Tests that a duplicate field name is caught by validation.
    */
-  public function testDuplicateFieldName() {
+  public function testDuplicateFieldName(): void {
     // field_tags already exists, so we're expecting an error when trying to
     // create a new field with the same name.
     $url = 'admin/structure/types/manage/' . $this->contentType . '/fields/add-field';
@@ -266,7 +266,7 @@ public function testDuplicateFieldName() {
   /**
    * Tests that external URLs in the 'destinations' query parameter are blocked.
    */
-  public function testExternalDestinations() {
+  public function testExternalDestinations(): void {
     $options = [
       'query' => ['destinations' => ['http://example.com']],
     ];
@@ -281,7 +281,7 @@ public function testExternalDestinations() {
   /**
    * Tests that deletion removes field storages and fields as expected for a term.
    */
-  public function testDeleteTaxonomyField() {
+  public function testDeleteTaxonomyField(): void {
     // Create a new field.
     $bundle_path = 'admin/structure/taxonomy/manage/tags/overview';
 
@@ -299,7 +299,7 @@ public function testDeleteTaxonomyField() {
   /**
    * Tests that help descriptions render valid HTML.
    */
-  public function testHelpDescriptions() {
+  public function testHelpDescriptions(): void {
     // Create an image field.
     FieldStorageConfig::create([
       'field_name' => 'field_image',
@@ -346,7 +346,7 @@ public function testHelpDescriptions() {
    *
    * @see \Drupal\Core\Field\PreconfiguredFieldUiOptionsInterface
    */
-  public function testPreconfiguredFields() {
+  public function testPreconfiguredFields(): void {
     $this->drupalGet('admin/structure/types/manage/article/fields/add-field');
 
     // Check that the preconfigured field option exist alongside the regular
@@ -377,7 +377,7 @@ public function testPreconfiguredFields() {
   /**
    * Tests the access to non-existent field URLs.
    */
-  public function testNonExistentFieldUrls() {
+  public function testNonExistentFieldUrls(): void {
     $field_id = 'node.foo.bar';
 
     $this->drupalGet('admin/structure/types/manage/' . $this->contentType . '/fields/' . $field_id);
@@ -387,7 +387,7 @@ public function testNonExistentFieldUrls() {
   /**
    * Tests that the 'field_prefix' setting works on Field UI.
    */
-  public function testFieldPrefix() {
+  public function testFieldPrefix(): void {
     // Change default field prefix.
     $field_prefix = $this->randomMachineName(10);
     $this->config('field_ui.settings')->set('field_prefix', $field_prefix)->save();
@@ -418,7 +418,7 @@ public function testFieldPrefix() {
   /**
    * Test translation defaults.
    */
-  public function testTranslationDefaults() {
+  public function testTranslationDefaults(): void {
     $this->fieldUIAddNewField('admin/structure/types/manage/' . $this->contentType, $this->fieldNameInput, $this->fieldLabel);
     $field_storage = FieldStorageConfig::loadByName('node', 'field_' . $this->fieldNameInput);
     $this->assertTrue($field_storage->isTranslatable(), 'Field storage translatable.');
diff --git a/core/modules/field_ui/tests/src/Functional/ManageFieldsLifecycleTest.php b/core/modules/field_ui/tests/src/Functional/ManageFieldsLifecycleTest.php
index 79964e418217..606fd72d3474 100644
--- a/core/modules/field_ui/tests/src/Functional/ManageFieldsLifecycleTest.php
+++ b/core/modules/field_ui/tests/src/Functional/ManageFieldsLifecycleTest.php
@@ -22,7 +22,7 @@ class ManageFieldsLifecycleTest extends ManageFieldsFunctionalTestBase {
    * In order to act on the same fields, and not create the fields over and over
    * again the following tests create, update and delete the same fields.
    */
-  public function testCRUDFields() {
+  public function testCRUDFields(): void {
     $this->manageFieldsPage();
     $this->createField();
     $this->updateField();
diff --git a/core/modules/field_ui/tests/src/Functional/ManageFieldsMultipleTypesTest.php b/core/modules/field_ui/tests/src/Functional/ManageFieldsMultipleTypesTest.php
index 677d56da5e8d..ff73c7902f27 100644
--- a/core/modules/field_ui/tests/src/Functional/ManageFieldsMultipleTypesTest.php
+++ b/core/modules/field_ui/tests/src/Functional/ManageFieldsMultipleTypesTest.php
@@ -23,7 +23,7 @@ class ManageFieldsMultipleTypesTest extends ManageFieldsFunctionalTestBase {
    *
    * @dataProvider entityTypesProvider
    */
-  public function testReuseField($entity_type, $bundle1, $bundle2) {
+  public function testReuseField($entity_type, $bundle1, $bundle2): void {
     $field_name = 'test_reuse';
     $label = $this->randomMachineName();
 
@@ -52,7 +52,7 @@ public function testReuseField($entity_type, $bundle1, $bundle2) {
    *
    * @dataProvider entityTypesProvider
    */
-  public function testReuseFieldMultipleDisplay($entity_type, $bundle1, $bundle2) {
+  public function testReuseFieldMultipleDisplay($entity_type, $bundle1, $bundle2): void {
     // Create additional form mode and enable it on both bundles.
     EntityFormMode::create([
       'id' => "{$entity_type}.little",
diff --git a/core/modules/field_ui/tests/src/Functional/ManageFieldsTest.php b/core/modules/field_ui/tests/src/Functional/ManageFieldsTest.php
index eb5846533209..3f49acb6379d 100644
--- a/core/modules/field_ui/tests/src/Functional/ManageFieldsTest.php
+++ b/core/modules/field_ui/tests/src/Functional/ManageFieldsTest.php
@@ -59,7 +59,7 @@ protected function setUp(): void {
   /**
    * Tests drop button operations on the manage fields page.
    */
-  public function testFieldDropButtonOperations() {
+  public function testFieldDropButtonOperations(): void {
     $assert_session = $this->assertSession();
 
     $node_type = $this->drupalCreateContentType();
@@ -131,7 +131,7 @@ public function testFieldDropButtonOperations() {
   /**
    * Tests adding a field.
    */
-  public function testAddField() {
+  public function testAddField(): void {
     $page = $this->getSession()->getPage();
     $type = $this->drupalCreateContentType([
       'name' => 'Article',
@@ -199,7 +199,7 @@ public function testAddField() {
   /**
    * Tests multiple users adding a field with the same name.
    */
-  public function testAddFieldWithMultipleUsers() {
+  public function testAddFieldWithMultipleUsers(): void {
     $page = $this->getSession()->getPage();
     // Create two users.
     $user1 = $this->drupalCreateUser(['administer node fields']);
@@ -261,7 +261,7 @@ public function testAddFieldWithMultipleUsers() {
   /**
    * Tests editing field when the field exists in temp store.
    */
-  public function testEditFieldWithLeftOverFieldInTempStore() {
+  public function testEditFieldWithLeftOverFieldInTempStore(): void {
     $user = $this->drupalCreateUser(['administer node fields']);
 
     $node_type = $this->drupalCreateContentType();
@@ -307,7 +307,7 @@ public function testEditFieldWithLeftOverFieldInTempStore() {
   /**
    * Tests creating entity reference field to non-bundleable entity type.
    */
-  public function testEntityReferenceToNonBundleableEntity() {
+  public function testEntityReferenceToNonBundleableEntity(): void {
     $type = $this->drupalCreateContentType([
       'name' => 'kittens',
       'type' => 'kittens',
@@ -329,7 +329,7 @@ public function testEntityReferenceToNonBundleableEntity() {
    *
    * @group legacy
    */
-  public function testFieldTypeCardinalityAlter() {
+  public function testFieldTypeCardinalityAlter(): void {
     $node_type = $this->drupalCreateContentType();
     $bundle = $node_type->id();
 
@@ -359,7 +359,7 @@ public function testFieldTypeCardinalityAlter() {
   /**
    * Tests hook_field_info_entity_type_ui_definitions_alter().
    */
-  public function testFieldUiDefinitionsAlter() {
+  public function testFieldUiDefinitionsAlter(): void {
     $user = $this->drupalCreateUser(['administer node fields']);
     $node_type = $this->drupalCreateContentType();
     $this->drupalLogin($user);
@@ -370,7 +370,7 @@ public function testFieldUiDefinitionsAlter() {
   /**
    * Ensure field category fallback works for field types without a description.
    */
-  public function testFieldCategoryFallbackWithoutDescription() {
+  public function testFieldCategoryFallbackWithoutDescription(): void {
     $user = $this->drupalCreateUser(['administer node fields']);
     $node_type = $this->drupalCreateContentType();
     $this->drupalLogin($user);
diff --git a/core/modules/field_ui/tests/src/FunctionalJavascript/DefaultValueWidgetTest.php b/core/modules/field_ui/tests/src/FunctionalJavascript/DefaultValueWidgetTest.php
index b6a12332baef..4db4b2cbb130 100644
--- a/core/modules/field_ui/tests/src/FunctionalJavascript/DefaultValueWidgetTest.php
+++ b/core/modules/field_ui/tests/src/FunctionalJavascript/DefaultValueWidgetTest.php
@@ -52,7 +52,7 @@ protected function setUp(): void {
   /**
    * Tests default value options on field config change.
    */
-  public function testDefaultValueOptionsForChangingBundles() {
+  public function testDefaultValueOptionsForChangingBundles(): void {
     $vocab_1 = $this->createVocabulary(['name' => 'Colors']);
     $this->createTerm($vocab_1, ['name' => 'red']);
     $this->createTerm($vocab_1, ['name' => 'green']);
diff --git a/core/modules/field_ui/tests/src/FunctionalJavascript/DisplayModeBundleSelectionTest.php b/core/modules/field_ui/tests/src/FunctionalJavascript/DisplayModeBundleSelectionTest.php
index 0c640f1215cf..7908418d3fb3 100644
--- a/core/modules/field_ui/tests/src/FunctionalJavascript/DisplayModeBundleSelectionTest.php
+++ b/core/modules/field_ui/tests/src/FunctionalJavascript/DisplayModeBundleSelectionTest.php
@@ -69,7 +69,7 @@ protected function setUp(): void {
    *
    * @dataProvider providerBundleSelection
    */
-  public function testBundleSelection($display_mode, $path, $custom_mode) {
+  public function testBundleSelection($display_mode, $path, $custom_mode): void {
     $page = $this->getSession()->getPage();
     $assert_session = $this->assertSession();
 
diff --git a/core/modules/field_ui/tests/src/FunctionalJavascript/EntityDisplayTest.php b/core/modules/field_ui/tests/src/FunctionalJavascript/EntityDisplayTest.php
index ff0f5db89d86..0ef7b33165c6 100644
--- a/core/modules/field_ui/tests/src/FunctionalJavascript/EntityDisplayTest.php
+++ b/core/modules/field_ui/tests/src/FunctionalJavascript/EntityDisplayTest.php
@@ -51,7 +51,7 @@ protected function setUp(): void {
   /**
    * Tests the use of regions for entity form displays.
    */
-  public function testEntityForm() {
+  public function testEntityForm(): void {
     $this->drupalGet('entity_test/manage/1/edit');
     $this->assertSession()->fieldExists('field_test_text[0][value]');
 
@@ -73,7 +73,7 @@ public function testEntityForm() {
   /**
    * Tests the use of regions for entity view displays.
    */
-  public function testEntityView() {
+  public function testEntityView(): void {
     $this->drupalGet('entity_test/1');
     $this->assertSession()->pageTextNotContains('The field test text value');
 
@@ -97,7 +97,7 @@ public function testEntityView() {
   /**
    * Tests extra fields.
    */
-  public function testExtraFields() {
+  public function testExtraFields(): void {
     entity_test_create_bundle('bundle_with_extra_fields');
     $this->drupalGet('entity_test/structure/bundle_with_extra_fields/display');
     $this->assertSession()->waitForElement('css', '.tabledrag-handle');
diff --git a/core/modules/field_ui/tests/src/FunctionalJavascript/ManageDisplayTest.php b/core/modules/field_ui/tests/src/FunctionalJavascript/ManageDisplayTest.php
index 8efeab9183d0..dd545533891b 100644
--- a/core/modules/field_ui/tests/src/FunctionalJavascript/ManageDisplayTest.php
+++ b/core/modules/field_ui/tests/src/FunctionalJavascript/ManageDisplayTest.php
@@ -83,7 +83,7 @@ protected function setUp(): void {
   /**
    * Tests formatter settings.
    */
-  public function testFormatterUI() {
+  public function testFormatterUI(): void {
     $manage_fields = 'admin/structure/types/manage/' . $this->type;
     $manage_display = $manage_fields . '/display';
 
@@ -254,7 +254,7 @@ public function testFormatterUI() {
   /**
    * Tests widget settings.
    */
-  public function testWidgetUI() {
+  public function testWidgetUI(): void {
     // Admin Manage Fields page.
     $manage_fields = 'admin/structure/types/manage/' . $this->type;
     // Admin Manage Display page.
@@ -424,7 +424,7 @@ protected function assertFieldSelectOptions(NodeElement $field, array $expected_
   /**
    * Confirms that notifications to save appear when necessary.
    */
-  public function testNotAppliedUntilSavedWarning() {
+  public function testNotAppliedUntilSavedWarning(): void {
     $assert_session = $this->assertSession();
     $page = $this->getSession()->getPage();
 
diff --git a/core/modules/field_ui/tests/src/FunctionalJavascript/ManageFieldsTest.php b/core/modules/field_ui/tests/src/FunctionalJavascript/ManageFieldsTest.php
index 53dc85e03eb4..ace40dbe30e5 100644
--- a/core/modules/field_ui/tests/src/FunctionalJavascript/ManageFieldsTest.php
+++ b/core/modules/field_ui/tests/src/FunctionalJavascript/ManageFieldsTest.php
@@ -87,7 +87,7 @@ protected function setUp(): void {
   /**
    * Tests re-using an existing field and the visibility of the re-use button.
    */
-  public function testReuseExistingField() {
+  public function testReuseExistingField(): void {
     $path = 'admin/structure/types/manage/article';
     $path2 = 'admin/structure/types/manage/page';
     $this->drupalGet($path2 . '/fields');
@@ -105,7 +105,7 @@ public function testReuseExistingField() {
   /**
    * Tests filter results in the re-use form.
    */
-  public function testFilterInReuseForm() {
+  public function testFilterInReuseForm(): void {
     $session = $this->getSession();
     $page = $session->getPage();
     $path = 'admin/structure/types/manage/article';
@@ -156,7 +156,7 @@ public function testFilterInReuseForm() {
   /**
    * Tests that field delete operation opens in modal.
    */
-  public function testFieldDelete() {
+  public function testFieldDelete(): void {
     $page = $this->getSession()->getPage();
     $assert_session = $this->assertSession();
 
@@ -175,7 +175,7 @@ public function testFieldDelete() {
   /**
    * Tests field add.
    */
-  public function testAddField() {
+  public function testAddField(): void {
     $page = $this->getSession()->getPage();
     $assert_session = $this->assertSession();
 
@@ -298,7 +298,7 @@ public function testAddField() {
   /**
    * Tests the order in which the field types appear in the form.
    */
-  public function testFieldTypeOrder() {
+  public function testFieldTypeOrder(): void {
     $this->drupalGet('admin/structure/types/manage/article/fields/add-field');
     $page = $this->getSession()->getPage();
     $field_type_categories = [
@@ -337,7 +337,7 @@ public function testFieldTypeOrder() {
   /**
    * Tests the form validation for allowed values field.
    */
-  public function testAllowedValuesFormValidation() {
+  public function testAllowedValuesFormValidation(): void {
     FieldStorageConfig::create([
       'field_name' => 'field_text',
       'entity_type' => 'node',
@@ -359,7 +359,7 @@ public function testAllowedValuesFormValidation() {
   /**
    * Tests the form validation for label field.
    */
-  public function testLabelFieldFormValidation() {
+  public function testLabelFieldFormValidation(): void {
     $this->drupalGet('/admin/structure/types/manage/article/fields/add-field');
     $page = $this->getSession()->getPage();
 
diff --git a/core/modules/field_ui/tests/src/Kernel/EntityDisplayTest.php b/core/modules/field_ui/tests/src/Kernel/EntityDisplayTest.php
index f51339190e88..ae8472ac7902 100644
--- a/core/modules/field_ui/tests/src/Kernel/EntityDisplayTest.php
+++ b/core/modules/field_ui/tests/src/Kernel/EntityDisplayTest.php
@@ -54,7 +54,7 @@ protected function setUp(): void {
   /**
    * Tests basic CRUD operations on entity display objects.
    */
-  public function testEntityDisplayCRUD() {
+  public function testEntityDisplayCRUD(): void {
     $display = EntityViewDisplay::create([
       'targetEntityType' => 'entity_test',
       'bundle' => 'entity_test',
@@ -134,7 +134,7 @@ public function testEntityDisplayCRUD() {
   /**
    * Tests sorting of components by name on basic CRUD operations.
    */
-  public function testEntityDisplayCRUDSort() {
+  public function testEntityDisplayCRUDSort(): void {
     $display = EntityViewDisplay::create([
       'targetEntityType' => 'entity_test',
       'bundle' => 'entity_test',
@@ -153,7 +153,7 @@ public function testEntityDisplayCRUDSort() {
   /**
    * @covers \Drupal\Core\Entity\EntityDisplayRepository::getViewDisplay
    */
-  public function testEntityGetDisplay() {
+  public function testEntityGetDisplay(): void {
     $display_repository = $this->container->get('entity_display.repository');
 
     // Check that getViewDisplay() returns a fresh object when no configuration
@@ -175,7 +175,7 @@ public function testEntityGetDisplay() {
   /**
    * Tests the behavior of a field component within an entity display object.
    */
-  public function testExtraFieldComponent() {
+  public function testExtraFieldComponent(): void {
     entity_test_create_bundle('bundle_with_extra_fields');
     $display = EntityViewDisplay::create([
       'targetEntityType' => 'entity_test',
@@ -198,7 +198,7 @@ public function testExtraFieldComponent() {
   /**
    * Tests the behavior of an extra field component with initial invalid values.
    */
-  public function testExtraFieldComponentInitialInvalidConfig() {
+  public function testExtraFieldComponentInitialInvalidConfig(): void {
     entity_test_create_bundle('bundle_with_extra_fields');
     $display = EntityViewDisplay::create([
       'targetEntityType' => 'entity_test',
@@ -227,7 +227,7 @@ public function testExtraFieldComponentInitialInvalidConfig() {
   /**
    * Tests the behavior of a field component within an entity display object.
    */
-  public function testFieldComponent() {
+  public function testFieldComponent(): void {
     $field_name = 'test_field';
     // Create a field storage and a field.
     $field_storage = FieldStorageConfig::create([
@@ -287,7 +287,7 @@ public function testFieldComponent() {
   /**
    * Tests the behavior of a field component for a base field.
    */
-  public function testBaseFieldComponent() {
+  public function testBaseFieldComponent(): void {
     $display = EntityViewDisplay::create([
       'targetEntityType' => 'entity_test_base_field_display',
       'bundle' => 'entity_test_base_field_display',
@@ -350,7 +350,7 @@ public function testBaseFieldComponent() {
   /**
    * Tests deleting a bundle.
    */
-  public function testDeleteBundle() {
+  public function testDeleteBundle(): void {
     // Create a node bundle, display and form display object.
     $type = NodeType::create([
       'type' => 'article',
@@ -374,7 +374,7 @@ public function testDeleteBundle() {
   /**
    * Tests deleting field.
    */
-  public function testDeleteField() {
+  public function testDeleteField(): void {
     $field_name = 'test_field';
     // Create a field storage and a field.
     $field_storage = FieldStorageConfig::create([
@@ -428,7 +428,7 @@ public function testDeleteField() {
   /**
    * Tests \Drupal\Core\Entity\EntityDisplayBase::onDependencyRemoval().
    */
-  public function testOnDependencyRemoval() {
+  public function testOnDependencyRemoval(): void {
     $this->enableModules(['field_plugins_test']);
 
     $field_name = 'test_field';
@@ -473,7 +473,7 @@ public function testOnDependencyRemoval() {
   /**
    * Ensure that entity view display changes invalidates cache tags.
    */
-  public function testEntityDisplayInvalidateCacheTags() {
+  public function testEntityDisplayInvalidateCacheTags(): void {
     $cache = \Drupal::cache();
     $cache->set('cid', 'kittens', Cache::PERMANENT, ['config:entity_view_display_list']);
     $display = EntityViewDisplay::create([
@@ -489,7 +489,7 @@ public function testEntityDisplayInvalidateCacheTags() {
   /**
    * Tests getDisplayModeOptions().
    */
-  public function testGetDisplayModeOptions() {
+  public function testGetDisplayModeOptions(): void {
     NodeType::create([
       'type' => 'article',
       'name' => 'Article',
@@ -539,7 +539,7 @@ public function testGetDisplayModeOptions() {
   /**
    * Tests components dependencies additions.
    */
-  public function testComponentDependencies() {
+  public function testComponentDependencies(): void {
     $this->enableModules(['dblog', 'help']);
     $this->installSchema('dblog', ['watchdog']);
     $this->installEntitySchema('user');
diff --git a/core/modules/field_ui/tests/src/Kernel/EntityFormDisplayTest.php b/core/modules/field_ui/tests/src/Kernel/EntityFormDisplayTest.php
index edfdfef1af0e..4b88fd5ab614 100644
--- a/core/modules/field_ui/tests/src/Kernel/EntityFormDisplayTest.php
+++ b/core/modules/field_ui/tests/src/Kernel/EntityFormDisplayTest.php
@@ -45,7 +45,7 @@ protected function setUp(): void {
   /**
    * @covers \Drupal\Core\Entity\EntityDisplayRepository::getFormDisplay
    */
-  public function testEntityGetFromDisplay() {
+  public function testEntityGetFromDisplay(): void {
     /** @var \Drupal\Core\Entity\EntityDisplayRepositoryInterface $display_repository */
     $display_repository = \Drupal::service('entity_display.repository');
 
@@ -69,7 +69,7 @@ public function testEntityGetFromDisplay() {
   /**
    * Tests the behavior of a field component within an EntityFormDisplay object.
    */
-  public function testFieldComponent() {
+  public function testFieldComponent(): void {
     // Create a field storage and a field.
     $field_name = 'test_field';
     $field_storage = FieldStorageConfig::create([
@@ -134,7 +134,7 @@ public function testFieldComponent() {
   /**
    * Tests the behavior of a field component for a base field.
    */
-  public function testBaseFieldComponent() {
+  public function testBaseFieldComponent(): void {
     $display = EntityFormDisplay::create([
       'targetEntityType' => 'entity_test_base_field_display',
       'bundle' => 'entity_test_base_field_display',
@@ -195,7 +195,7 @@ public function testBaseFieldComponent() {
   /**
    * Tests deleting field.
    */
-  public function testDeleteField() {
+  public function testDeleteField(): void {
     $field_name = 'test_field';
     // Create a field storage and a field.
     $field_storage = FieldStorageConfig::create([
@@ -249,7 +249,7 @@ public function testDeleteField() {
   /**
    * Tests \Drupal\Core\Entity\EntityDisplayBase::onDependencyRemoval().
    */
-  public function testOnDependencyRemoval() {
+  public function testOnDependencyRemoval(): void {
     $this->enableModules(['field_plugins_test']);
 
     $field_name = 'test_field';
@@ -294,7 +294,7 @@ public function testOnDependencyRemoval() {
   /**
    * Tests the serialization and unserialization of the class.
    */
-  public function testSerialization() {
+  public function testSerialization(): void {
     /** @var \Drupal\Core\Entity\EntityDisplayRepositoryInterface $display_repository */
     $display_repository = \Drupal::service('entity_display.repository');
 
diff --git a/core/modules/field_ui/tests/src/Unit/FieldConfigEditFormTest.php b/core/modules/field_ui/tests/src/Unit/FieldConfigEditFormTest.php
index caef52e96180..20c12c7179e2 100644
--- a/core/modules/field_ui/tests/src/Unit/FieldConfigEditFormTest.php
+++ b/core/modules/field_ui/tests/src/Unit/FieldConfigEditFormTest.php
@@ -43,7 +43,7 @@ protected function setUp(): void {
    *
    * @dataProvider providerRequired
    */
-  public function testHasAnyRequired(array $element, bool $result) {
+  public function testHasAnyRequired(array $element, bool $result): void {
     $reflection = new \ReflectionClass('\Drupal\field_ui\Form\FieldConfigEditForm');
     $method = $reflection->getMethod('hasAnyRequired');
     $this->assertEquals($result, $method->invoke($this->fieldConfigEditForm, $element));
diff --git a/core/modules/field_ui/tests/src/Unit/FieldUiTableTest.php b/core/modules/field_ui/tests/src/Unit/FieldUiTableTest.php
index 88b4c4da2fa8..512aef171756 100644
--- a/core/modules/field_ui/tests/src/Unit/FieldUiTableTest.php
+++ b/core/modules/field_ui/tests/src/Unit/FieldUiTableTest.php
@@ -18,7 +18,7 @@ class FieldUiTableTest extends UnitTestCase {
    *
    * @dataProvider providerTestReduceOrder
    */
-  public function testReduceOrder($array, $expected) {
+  public function testReduceOrder($array, $expected): void {
     $this->assertSame($expected, array_reduce($array, ['Drupal\field_ui\Element\FieldUiTable', 'reduceOrder']));
   }
 
diff --git a/core/modules/field_ui/tests/src/Unit/FieldUiTest.php b/core/modules/field_ui/tests/src/Unit/FieldUiTest.php
index 1130714566ae..812ca8e42210 100644
--- a/core/modules/field_ui/tests/src/Unit/FieldUiTest.php
+++ b/core/modules/field_ui/tests/src/Unit/FieldUiTest.php
@@ -37,7 +37,7 @@ protected function setUp(): void {
   /**
    * @covers ::getNextDestination
    */
-  public function testGetNextDestination() {
+  public function testGetNextDestination(): void {
     $destinations = ['admin', 'admin/content'];
     $expected_uri = 'base:admin';
     $expected_query = [
@@ -51,7 +51,7 @@ public function testGetNextDestination() {
   /**
    * @covers ::getNextDestination
    */
-  public function testGetNextDestinationEmpty() {
+  public function testGetNextDestinationEmpty(): void {
     $destinations = [];
     $actual = FieldUI::getNextDestination($destinations);
     $this->assertNull($actual);
@@ -60,7 +60,7 @@ public function testGetNextDestinationEmpty() {
   /**
    * @covers ::getNextDestination
    */
-  public function testGetNextDestinationRouteName() {
+  public function testGetNextDestinationRouteName(): void {
     $destinations = [['route_name' => 'system.admin'], ['route_name' => 'system.admin_content']];
     $expected_route_name = 'system.admin';
     $expected_query = [
diff --git a/core/modules/file/tests/src/Functional/DownloadTest.php b/core/modules/file/tests/src/Functional/DownloadTest.php
index 713b5a69402e..1a86c184b74a 100644
--- a/core/modules/file/tests/src/Functional/DownloadTest.php
+++ b/core/modules/file/tests/src/Functional/DownloadTest.php
@@ -48,7 +48,7 @@ protected function setUp(): void {
   /**
    * Tests the public file transfer system.
    */
-  public function testPublicFileTransfer() {
+  public function testPublicFileTransfer(): void {
     // Test generating a URL to a created file.
     $file = $this->createFile();
     $url = $this->fileUrlGenerator->generateAbsoluteString($file->getFileUri());
@@ -72,7 +72,7 @@ public function testPublicFileTransfer() {
   /**
    * Tests the private file transfer system.
    */
-  public function testPrivateFileTransferWithoutPageCache() {
+  public function testPrivateFileTransferWithoutPageCache(): void {
     $this->doPrivateFileTransferTest();
   }
 
@@ -148,7 +148,7 @@ protected function doPrivateFileTransferTest() {
   /**
    * Test FileUrlGeneratorInterface::generateString()
    */
-  public function testFileCreateUrl() {
+  public function testFileCreateUrl(): void {
     // "Special" ASCII characters.
     $basename = " -._~!$'\"()*@[]?&+%#,;=:\n\x00" .
       // Characters that look like a percent-escaped string.
diff --git a/core/modules/file/tests/src/Functional/FileFieldAnonymousSubmissionTest.php b/core/modules/file/tests/src/Functional/FileFieldAnonymousSubmissionTest.php
index eb8fd6200977..d1c2455d204d 100644
--- a/core/modules/file/tests/src/Functional/FileFieldAnonymousSubmissionTest.php
+++ b/core/modules/file/tests/src/Functional/FileFieldAnonymousSubmissionTest.php
@@ -35,7 +35,7 @@ protected function setUp(): void {
   /**
    * Tests the basic node submission for an anonymous visitor.
    */
-  public function testAnonymousNode() {
+  public function testAnonymousNode(): void {
     $type = 'Article';
     $title = 'test page';
 
@@ -64,7 +64,7 @@ public function testAnonymousNode() {
   /**
    * Tests file submission for an anonymous visitor.
    */
-  public function testAnonymousNodeWithFile() {
+  public function testAnonymousNodeWithFile(): void {
     $type = 'Article';
     $title = 'Test page';
     $this->createFileField('field_image', 'node', 'article', [], ['file_extensions' => 'txt png']);
@@ -100,7 +100,7 @@ public function testAnonymousNodeWithFile() {
   /**
    * Tests file submission for an anonymous visitor with a missing node title.
    */
-  public function testAnonymousNodeWithFileWithoutTitle() {
+  public function testAnonymousNodeWithFileWithoutTitle(): void {
     $this->drupalLogout();
     $this->doTestNodeWithFileWithoutTitle();
   }
@@ -108,7 +108,7 @@ public function testAnonymousNodeWithFileWithoutTitle() {
   /**
    * Tests file submission for an authenticated user with a missing node title.
    */
-  public function testAuthenticatedNodeWithFileWithoutTitle() {
+  public function testAuthenticatedNodeWithFileWithoutTitle(): void {
     $admin_user = $this->drupalCreateUser([
       'bypass node access',
       'access content overview',
diff --git a/core/modules/file/tests/src/Functional/FileFieldDisplayTest.php b/core/modules/file/tests/src/Functional/FileFieldDisplayTest.php
index 6f0a4d6b8fe4..7566930e379a 100644
--- a/core/modules/file/tests/src/Functional/FileFieldDisplayTest.php
+++ b/core/modules/file/tests/src/Functional/FileFieldDisplayTest.php
@@ -26,7 +26,7 @@ class FileFieldDisplayTest extends FileFieldTestBase {
   /**
    * Tests normal formatter display on node display.
    */
-  public function testNodeDisplay() {
+  public function testNodeDisplay(): void {
     $field_name = $this->randomMachineName();
     $type_name = 'article';
     $field_storage_settings = [
@@ -132,7 +132,7 @@ public function testNodeDisplay() {
   /**
    * Tests default display of File Field.
    */
-  public function testDefaultFileFieldDisplay() {
+  public function testDefaultFileFieldDisplay(): void {
     $field_name = $this->randomMachineName();
     $type_name = 'article';
     $field_storage_settings = [
@@ -159,7 +159,7 @@ public function testDefaultFileFieldDisplay() {
   /**
    * Tests description toggle for field instance configuration.
    */
-  public function testDescToggle() {
+  public function testDescToggle(): void {
     $type_name = 'test';
     $field_type = 'file';
     $field_name = $this->randomMachineName();
@@ -191,7 +191,7 @@ public function testDescToggle() {
   /**
    * Tests description display of File Field.
    */
-  public function testDescriptionDefaultFileFieldDisplay() {
+  public function testDescriptionDefaultFileFieldDisplay(): void {
     $field_name = $this->randomMachineName();
     $type_name = 'article';
     $field_storage_settings = [
diff --git a/core/modules/file/tests/src/Functional/FileFieldFormatterAccessTest.php b/core/modules/file/tests/src/Functional/FileFieldFormatterAccessTest.php
index 058e41f53f1f..243c75823d44 100644
--- a/core/modules/file/tests/src/Functional/FileFieldFormatterAccessTest.php
+++ b/core/modules/file/tests/src/Functional/FileFieldFormatterAccessTest.php
@@ -25,7 +25,7 @@ class FileFieldFormatterAccessTest extends FileFieldTestBase {
   /**
    * Tests the custom access handler is invoked.
    */
-  public function testFileAccessHandler() {
+  public function testFileAccessHandler(): void {
     $type_name = 'article';
     $field_name = $this->randomMachineName();
     $this->createFileField($field_name, 'node', $type_name);
diff --git a/core/modules/file/tests/src/Functional/FileFieldPathTest.php b/core/modules/file/tests/src/Functional/FileFieldPathTest.php
index 195cfe02064e..0f4879afb54c 100644
--- a/core/modules/file/tests/src/Functional/FileFieldPathTest.php
+++ b/core/modules/file/tests/src/Functional/FileFieldPathTest.php
@@ -21,7 +21,7 @@ class FileFieldPathTest extends FileFieldTestBase {
   /**
    * Tests the normal formatter display on node display.
    */
-  public function testUploadPath() {
+  public function testUploadPath(): void {
     /** @var \Drupal\node\NodeStorageInterface $node_storage */
     $node_storage = $this->container->get('entity_type.manager')->getStorage('node');
     $field_name = $this->randomMachineName();
diff --git a/core/modules/file/tests/src/Functional/FileFieldRSSContentTest.php b/core/modules/file/tests/src/Functional/FileFieldRSSContentTest.php
index 6f4084822a8a..798a2dc085d9 100644
--- a/core/modules/file/tests/src/Functional/FileFieldRSSContentTest.php
+++ b/core/modules/file/tests/src/Functional/FileFieldRSSContentTest.php
@@ -28,7 +28,7 @@ class FileFieldRSSContentTest extends FileFieldTestBase {
   /**
    * Tests RSS enclosure formatter display for RSS feeds.
    */
-  public function testFileFieldRSSContent() {
+  public function testFileFieldRSSContent(): void {
     $node_storage = $this->container->get('entity_type.manager')->getStorage('node');
     $field_name = $this->randomMachineName();
     $type_name = 'article';
diff --git a/core/modules/file/tests/src/Functional/FileFieldRevisionTest.php b/core/modules/file/tests/src/Functional/FileFieldRevisionTest.php
index 15183e118fcf..9ccd57ac2dfb 100644
--- a/core/modules/file/tests/src/Functional/FileFieldRevisionTest.php
+++ b/core/modules/file/tests/src/Functional/FileFieldRevisionTest.php
@@ -30,7 +30,7 @@ class FileFieldRevisionTest extends FileFieldTestBase {
    *  - When the last revision that uses a file is deleted, the original file
    *    should be deleted also.
    */
-  public function testRevisions() {
+  public function testRevisions(): void {
     // This test expects unused managed files to be marked as a temporary file
     // and then deleted up by file_cron().
     $this->config('file.settings')
diff --git a/core/modules/file/tests/src/Functional/FileFieldValidateTest.php b/core/modules/file/tests/src/Functional/FileFieldValidateTest.php
index bd839ca08cbc..651230da4591 100644
--- a/core/modules/file/tests/src/Functional/FileFieldValidateTest.php
+++ b/core/modules/file/tests/src/Functional/FileFieldValidateTest.php
@@ -27,7 +27,7 @@ class FileFieldValidateTest extends FileFieldTestBase {
   /**
    * Tests the required property on file fields.
    */
-  public function testRequired() {
+  public function testRequired(): void {
     $node_storage = $this->container->get('entity_type.manager')->getStorage('node');
     $type_name = 'article';
     $field_name = $this->randomMachineName();
@@ -77,7 +77,7 @@ public function testRequired() {
   /**
    * Tests the max file size validator.
    */
-  public function testFileMaxSize() {
+  public function testFileMaxSize(): void {
     $node_storage = $this->container->get('entity_type.manager')->getStorage('node');
     $type_name = 'article';
     $field_name = $this->randomMachineName();
@@ -129,7 +129,7 @@ public function testFileMaxSize() {
   /**
    * Tests file extension checking.
    */
-  public function testFileExtension() {
+  public function testFileExtension(): void {
     $node_storage = $this->container->get('entity_type.manager')->getStorage('node');
     $type_name = 'article';
     $field_name = $this->randomMachineName();
@@ -171,7 +171,7 @@ public function testFileExtension() {
   /**
    * Checks that a file can always be removed if it does not pass validation.
    */
-  public function testFileRemoval() {
+  public function testFileRemoval(): void {
     $node_storage = $this->container->get('entity_type.manager')->getStorage('node');
     $type_name = 'article';
     $field_name = 'file_test';
diff --git a/core/modules/file/tests/src/Functional/FileFieldWidgetTest.php b/core/modules/file/tests/src/Functional/FileFieldWidgetTest.php
index a548d3ed53d1..13400de6c815 100644
--- a/core/modules/file/tests/src/Functional/FileFieldWidgetTest.php
+++ b/core/modules/file/tests/src/Functional/FileFieldWidgetTest.php
@@ -80,7 +80,7 @@ protected function createTemporaryFile($data, ?UserInterface $user = NULL) {
   /**
    * Tests upload and remove buttons for a single-valued File field.
    */
-  public function testSingleValuedWidget() {
+  public function testSingleValuedWidget(): void {
     $node_storage = $this->container->get('entity_type.manager')->getStorage('node');
     $type_name = 'article';
     $field_name = $this->randomMachineName();
@@ -121,7 +121,7 @@ public function testSingleValuedWidget() {
   /**
    * Tests upload and remove buttons for multiple multi-valued File fields.
    */
-  public function testMultiValuedWidget() {
+  public function testMultiValuedWidget(): void {
     $node_storage = $this->container->get('entity_type.manager')->getStorage('node');
     $type_name = 'article';
     // Use explicit names instead of random names for those fields, because of a
@@ -246,7 +246,7 @@ public function testMultiValuedWidget() {
   /**
    * Tests a file field with a "Private files" upload destination setting.
    */
-  public function testPrivateFileSetting() {
+  public function testPrivateFileSetting(): void {
     $node_storage = $this->container->get('entity_type.manager')->getStorage('node');
     // Grant the admin user required permissions.
     user_role_grant_permissions($this->adminUser->roles[0]->target_id, ['administer node fields']);
@@ -286,7 +286,7 @@ public function testPrivateFileSetting() {
   /**
    * Tests that download restrictions on private files work on comments.
    */
-  public function testPrivateFileComment() {
+  public function testPrivateFileComment(): void {
     $user = $this->drupalCreateUser(['access comments']);
 
     // Grant the admin user required comment permissions.
@@ -362,7 +362,7 @@ public function testPrivateFileComment() {
   /**
    * Tests validation with the Upload button.
    */
-  public function testWidgetValidation() {
+  public function testWidgetValidation(): void {
     $type_name = 'article';
     $field_name = $this->randomMachineName();
     $this->createFileField($field_name, 'node', $type_name);
@@ -392,7 +392,7 @@ public function testWidgetValidation() {
   /**
    * Tests file widget element.
    */
-  public function testWidgetElement() {
+  public function testWidgetElement(): void {
     $field_name = $this->randomMachineName();
     $html_name = str_replace('_', '-', $field_name);
     $this->createFileField($field_name, 'node', 'article', ['cardinality' => FieldStorageConfig::CARDINALITY_UNLIMITED]);
@@ -429,7 +429,7 @@ public function testWidgetElement() {
   /**
    * Tests exploiting the temporary file removal of another user using fid.
    */
-  public function testTemporaryFileRemovalExploit() {
+  public function testTemporaryFileRemovalExploit(): void {
     // Create a victim user.
     $victim_user = $this->drupalCreateUser();
 
@@ -450,7 +450,7 @@ public function testTemporaryFileRemovalExploit() {
   /**
    * Tests exploiting the temporary file removal for anonymous users using fid.
    */
-  public function testTemporaryFileRemovalExploitAnonymous() {
+  public function testTemporaryFileRemovalExploitAnonymous(): void {
     // Set up an anonymous victim user.
     $victim_user = User::getAnonymousUser();
 
@@ -474,7 +474,7 @@ public function testTemporaryFileRemovalExploitAnonymous() {
   /**
    * Tests maximum upload file size validation.
    */
-  public function testMaximumUploadFileSizeValidation() {
+  public function testMaximumUploadFileSizeValidation(): void {
     // Grant the admin user required permissions.
     user_role_grant_permissions($this->adminUser->roles[0]->target_id, ['administer node fields']);
 
@@ -501,7 +501,7 @@ public function testMaximumUploadFileSizeValidation() {
   /**
    * Tests configuring file field's allowed file extensions setting.
    */
-  public function testFileExtensionsSetting() {
+  public function testFileExtensionsSetting(): void {
     // Grant the admin user required permissions.
     user_role_grant_permissions($this->adminUser->roles[0]->target_id, ['administer node fields']);
 
diff --git a/core/modules/file/tests/src/Functional/FileListingTest.php b/core/modules/file/tests/src/Functional/FileListingTest.php
index 532e6f0d6bed..332a9c3bce44 100644
--- a/core/modules/file/tests/src/Functional/FileListingTest.php
+++ b/core/modules/file/tests/src/Functional/FileListingTest.php
@@ -80,7 +80,7 @@ protected function sumUsages($usage) {
   /**
    * Tests file overview with different user permissions.
    */
-  public function testFileListingPages() {
+  public function testFileListingPages(): void {
     $file_usage = $this->container->get('file.usage');
     // Users without sufficient permissions should not see file listing.
     $this->drupalLogin($this->baseUser);
@@ -210,7 +210,7 @@ public function testFileListingPages() {
   /**
    * Tests file listing usage page for entities with no canonical link template.
    */
-  public function testFileListingUsageNoLink() {
+  public function testFileListingUsageNoLink(): void {
     // Login with user with right permissions and test listing.
     $this->drupalLogin($this->adminUser);
 
diff --git a/core/modules/file/tests/src/Functional/FileManagedFileElementTest.php b/core/modules/file/tests/src/Functional/FileManagedFileElementTest.php
index 29a354c681c2..2d02bc486370 100644
--- a/core/modules/file/tests/src/Functional/FileManagedFileElementTest.php
+++ b/core/modules/file/tests/src/Functional/FileManagedFileElementTest.php
@@ -24,7 +24,7 @@ class FileManagedFileElementTest extends FileFieldTestBase {
   /**
    * Tests the managed_file element type.
    */
-  public function testManagedFile() {
+  public function testManagedFile(): void {
     // Check that $element['#size'] is passed to the child upload element.
     $this->drupalGet('file/test');
     $field = $this->assertSession()->fieldExists("files[nested_file]");
@@ -149,7 +149,7 @@ public function testManagedFile() {
   /**
    * Ensure that warning is shown if file on the field has been removed.
    */
-  public function testManagedFileRemoved() {
+  public function testManagedFileRemoved(): void {
     $this->drupalGet('file/test/1/0/1');
     $test_file = $this->getTestFile('text');
     $file_field_name = 'files[nested_file][]';
@@ -170,7 +170,7 @@ public function testManagedFileRemoved() {
   /**
    * Tests file names have leading . removed.
    */
-  public function testFileNameTrim() {
+  public function testFileNameTrim(): void {
     file_put_contents('public://.leading-period.txt', $this->randomString(32));
     $last_fid_prior = $this->getLastFileId();
     $this->drupalGet('file/test/0/0/0');
@@ -184,7 +184,7 @@ public function testFileNameTrim() {
   /**
    * Ensure a file entity can be saved when the file does not exist on disk.
    */
-  public function testFileRemovedFromDisk() {
+  public function testFileRemovedFromDisk(): void {
     $this->drupalGet('file/test/1/0/1');
     $test_file = $this->getTestFile('text');
     $file_field_name = 'files[nested_file][]';
@@ -207,7 +207,7 @@ public function testFileRemovedFromDisk() {
   /**
    * Verify that unused permanent files can be used.
    */
-  public function testUnusedPermanentFileValidation() {
+  public function testUnusedPermanentFileValidation(): void {
 
     // Create a permanent file without usages.
     $file = $this->getTestFile('image');
diff --git a/core/modules/file/tests/src/Functional/FileOnTranslatedEntityTest.php b/core/modules/file/tests/src/Functional/FileOnTranslatedEntityTest.php
index 7b40b5cca10d..bc97169642b3 100644
--- a/core/modules/file/tests/src/Functional/FileOnTranslatedEntityTest.php
+++ b/core/modules/file/tests/src/Functional/FileOnTranslatedEntityTest.php
@@ -82,7 +82,7 @@ protected function setUp(): void {
   /**
    * Tests synced file fields on translated nodes.
    */
-  public function testSyncedFiles() {
+  public function testSyncedFiles(): void {
     // Verify that the file field on the "Basic page" node type is translatable.
     $definitions = \Drupal::service('entity_field.manager')->getFieldDefinitions('node', 'page');
     $this->assertTrue($definitions[$this->fieldName]->isTranslatable(), 'Node file field is translatable.');
@@ -213,7 +213,7 @@ public function testSyncedFiles() {
   /**
    * Tests if file field tracks file usages correctly on translated nodes.
    */
-  public function testFileUsage() {
+  public function testFileUsage(): void {
     /** @var \Drupal\file\FileUsage\FileUsageInterface $file_usage */
     $file_usage = \Drupal::service('file.usage');
 
diff --git a/core/modules/file/tests/src/Functional/FilePrivateTest.php b/core/modules/file/tests/src/Functional/FilePrivateTest.php
index 84e4b125962a..17175ad99d01 100644
--- a/core/modules/file/tests/src/Functional/FilePrivateTest.php
+++ b/core/modules/file/tests/src/Functional/FilePrivateTest.php
@@ -44,7 +44,7 @@ protected function setUp(): void {
   /**
    * Tests file access for file uploaded to a private node.
    */
-  public function testPrivateFile() {
+  public function testPrivateFile(): void {
     $node_storage = $this->container->get('entity_type.manager')->getStorage('node');
     /** @var \Drupal\Core\File\FileSystemInterface $file_system */
     $file_system = \Drupal::service('file_system');
diff --git a/core/modules/file/tests/src/Functional/FileTokenReplaceTest.php b/core/modules/file/tests/src/Functional/FileTokenReplaceTest.php
index 761a37cf3275..4a68d7314902 100644
--- a/core/modules/file/tests/src/Functional/FileTokenReplaceTest.php
+++ b/core/modules/file/tests/src/Functional/FileTokenReplaceTest.php
@@ -24,7 +24,7 @@ class FileTokenReplaceTest extends FileFieldTestBase {
   /**
    * Creates a file, then tests the tokens generated from it.
    */
-  public function testFileTokenReplacement() {
+  public function testFileTokenReplacement(): void {
     $node_storage = $this->container->get('entity_type.manager')->getStorage('node');
     $token_service = \Drupal::token();
     $language_interface = \Drupal::languageManager()->getCurrentLanguage();
diff --git a/core/modules/file/tests/src/Functional/Formatter/FileAudioFormatterTest.php b/core/modules/file/tests/src/Functional/Formatter/FileAudioFormatterTest.php
index 4c17b2d86b85..a4591ed353c9 100644
--- a/core/modules/file/tests/src/Functional/Formatter/FileAudioFormatterTest.php
+++ b/core/modules/file/tests/src/Functional/Formatter/FileAudioFormatterTest.php
@@ -23,7 +23,7 @@ class FileAudioFormatterTest extends FileMediaFormatterTestBase {
    *
    * @dataProvider dataProvider
    */
-  public function testRender($tag_count, $formatter_settings) {
+  public function testRender($tag_count, $formatter_settings): void {
     $field_config = $this->createMediaField('file_audio', 'mp3', $formatter_settings);
 
     file_put_contents('public://file.mp3', str_repeat('t', 10));
diff --git a/core/modules/file/tests/src/Functional/Formatter/FileVideoFormatterTest.php b/core/modules/file/tests/src/Functional/Formatter/FileVideoFormatterTest.php
index fd4fe6899fa7..651fefdff9c9 100644
--- a/core/modules/file/tests/src/Functional/Formatter/FileVideoFormatterTest.php
+++ b/core/modules/file/tests/src/Functional/Formatter/FileVideoFormatterTest.php
@@ -23,7 +23,7 @@ class FileVideoFormatterTest extends FileMediaFormatterTestBase {
    *
    * @dataProvider dataProvider
    */
-  public function testRender($tag_count, $formatter_settings) {
+  public function testRender($tag_count, $formatter_settings): void {
     $field_config = $this->createMediaField('file_video', 'mp4', $formatter_settings);
 
     file_put_contents('public://file.mp4', str_repeat('t', 10));
@@ -65,7 +65,7 @@ public function testRender($tag_count, $formatter_settings) {
   /**
    * Tests that the attributes added to the formatter are applied on render.
    */
-  public function testAttributes() {
+  public function testAttributes(): void {
     $field_config = $this->createMediaField(
       'file_video',
       'mp4',
diff --git a/core/modules/file/tests/src/Functional/MultipleFileUploadTest.php b/core/modules/file/tests/src/Functional/MultipleFileUploadTest.php
index 1d3a10ad9d8a..f2aa592111d5 100644
--- a/core/modules/file/tests/src/Functional/MultipleFileUploadTest.php
+++ b/core/modules/file/tests/src/Functional/MultipleFileUploadTest.php
@@ -36,7 +36,7 @@ protected function setUp(): void {
   /**
    * Tests multiple file field with all file extensions.
    */
-  public function testMultipleFileFieldWithAllFileExtensions() {
+  public function testMultipleFileFieldWithAllFileExtensions(): void {
     $theme = 'test_theme_settings';
     \Drupal::service('theme_installer')->install([$theme]);
     $this->drupalGet("admin/appearance/settings/$theme");
diff --git a/core/modules/file/tests/src/Functional/PrivateFileOnTranslatedEntityTest.php b/core/modules/file/tests/src/Functional/PrivateFileOnTranslatedEntityTest.php
index 2ffa36180ea4..41c1b19fa206 100644
--- a/core/modules/file/tests/src/Functional/PrivateFileOnTranslatedEntityTest.php
+++ b/core/modules/file/tests/src/Functional/PrivateFileOnTranslatedEntityTest.php
@@ -72,7 +72,7 @@ protected function setUp(): void {
   /**
    * Tests private file fields on translated nodes.
    */
-  public function testPrivateLanguageFile() {
+  public function testPrivateLanguageFile(): void {
     // Verify that the file field on the "Basic page" node type is translatable.
     $definitions = \Drupal::service('entity_field.manager')->getFieldDefinitions('node', 'page');
     $this->assertTrue($definitions[$this->fieldName]->isTranslatable(), 'Node file field is translatable.');
diff --git a/core/modules/file/tests/src/Functional/Rest/FileResourceTestBase.php b/core/modules/file/tests/src/Functional/Rest/FileResourceTestBase.php
index 1383673df3c0..b8f448d16549 100644
--- a/core/modules/file/tests/src/Functional/Rest/FileResourceTestBase.php
+++ b/core/modules/file/tests/src/Functional/Rest/FileResourceTestBase.php
@@ -200,7 +200,7 @@ protected function getExpectedCacheContexts() {
   /**
    * {@inheritdoc}
    */
-  public function testPost() {
+  public function testPost(): void {
     // Drupal does not allow creating file entities independently. It allows you
     // to create file entities that are referenced from another entity (e.g. an
     // image for a node's image field).
diff --git a/core/modules/file/tests/src/Functional/SaveUploadFormTest.php b/core/modules/file/tests/src/Functional/SaveUploadFormTest.php
index 30971e76fcde..e13b69d5c483 100644
--- a/core/modules/file/tests/src/Functional/SaveUploadFormTest.php
+++ b/core/modules/file/tests/src/Functional/SaveUploadFormTest.php
@@ -105,7 +105,7 @@ protected function setUp(): void {
   /**
    * Tests the _file_save_upload_from_form() function.
    */
-  public function testNormal() {
+  public function testNormal(): void {
     $max_fid_after = (int) \Drupal::entityQueryAggregate('file')
       ->accessCheck(FALSE)
       ->aggregate('fid', 'max')
@@ -165,7 +165,7 @@ public function testNormal() {
   /**
    * Tests extension handling.
    */
-  public function testHandleExtension() {
+  public function testHandleExtension(): void {
     /** @var \Drupal\Core\File\FileSystemInterface $file_system */
     $file_system = \Drupal::service('file_system');
     // The file being tested is a .gif which is in the default safe list
@@ -230,7 +230,7 @@ public function testHandleExtension() {
   /**
    * Tests dangerous file handling.
    */
-  public function testHandleDangerousFile() {
+  public function testHandleDangerousFile(): void {
     $config = $this->config('system.file');
     /** @var \Drupal\Core\File\FileSystemInterface $file_system */
     $file_system = \Drupal::service('file_system');
@@ -295,7 +295,7 @@ public function testHandleDangerousFile() {
   /**
    * Tests file munge handling.
    */
-  public function testHandleFileMunge() {
+  public function testHandleFileMunge(): void {
     /** @var \Drupal\Core\File\FileSystemInterface $file_system */
     $file_system = \Drupal::service('file_system');
     // Ensure insecure uploads are disabled for this test.
@@ -395,7 +395,7 @@ public function testHandleFileMunge() {
   /**
    * Tests renaming when uploading over a file that already exists.
    */
-  public function testExistingRename() {
+  public function testExistingRename(): void {
     /** @var \Drupal\Core\File\FileSystemInterface $file_system */
     $file_system = \Drupal::service('file_system');
     $edit = [
@@ -414,7 +414,7 @@ public function testExistingRename() {
   /**
    * Tests replacement when uploading over a file that already exists.
    */
-  public function testExistingReplace() {
+  public function testExistingReplace(): void {
     /** @var \Drupal\Core\File\FileSystemInterface $file_system */
     $file_system = \Drupal::service('file_system');
     $edit = [
@@ -433,7 +433,7 @@ public function testExistingReplace() {
   /**
    * Tests for failure when uploading over a file that already exists.
    */
-  public function testExistingError() {
+  public function testExistingError(): void {
     /** @var \Drupal\Core\File\FileSystemInterface $file_system */
     $file_system = \Drupal::service('file_system');
     $edit = [
@@ -452,7 +452,7 @@ public function testExistingError() {
   /**
    * Tests for no failures when not uploading a file.
    */
-  public function testNoUpload() {
+  public function testNoUpload(): void {
     $this->drupalGet('file-test/save_upload_from_form_test');
     $this->submitForm([], 'Submit');
     $this->assertSession()->pageTextNotContains("Epic upload FAIL!");
@@ -461,7 +461,7 @@ public function testNoUpload() {
   /**
    * Tests for log entry on failing destination.
    */
-  public function testDrupalMovingUploadedFileError() {
+  public function testDrupalMovingUploadedFileError(): void {
     // Create a directory and make it not writable.
     $test_directory = 'test_drupal_move_uploaded_file_fail';
     \Drupal::service('file_system')->mkdir('temporary://' . $test_directory, 0000);
@@ -493,7 +493,7 @@ public function testDrupalMovingUploadedFileError() {
   /**
    * Tests that form validation does not change error messages.
    */
-  public function testErrorMessagesAreNotChanged() {
+  public function testErrorMessagesAreNotChanged(): void {
     $error = 'An error message set before _file_save_upload_from_form()';
 
     /** @var \Drupal\Core\File\FileSystemInterface $file_system */
@@ -549,7 +549,7 @@ public function testErrorMessagesAreNotChanged() {
   /**
    * Tests that multiple validation errors are combined in one message.
    */
-  public function testCombinedErrorMessages() {
+  public function testCombinedErrorMessages(): void {
     $text_file = current($this->drupalGetTestFiles('text'));
     $this->assertFileExists($text_file->uri);
 
@@ -579,7 +579,7 @@ public function testCombinedErrorMessages() {
   /**
    * Tests highlighting of file upload field when it has an error.
    */
-  public function testUploadFieldIsHighlighted() {
+  public function testUploadFieldIsHighlighted(): void {
     $this->assertCount(0, $this->cssSelect('input[name="files[file_test_upload][]"].error'), 'Successful file upload has no error.');
 
     /** @var \Drupal\Core\File\FileSystemInterface $file_system */
diff --git a/core/modules/file/tests/src/Functional/SaveUploadTest.php b/core/modules/file/tests/src/Functional/SaveUploadTest.php
index 8d71b1f38dab..17f6fb678e6a 100644
--- a/core/modules/file/tests/src/Functional/SaveUploadTest.php
+++ b/core/modules/file/tests/src/Functional/SaveUploadTest.php
@@ -113,7 +113,7 @@ protected function setUp(): void {
   /**
    * Tests the file_save_upload() function.
    */
-  public function testNormal() {
+  public function testNormal(): void {
     $max_fid_after = (int) \Drupal::entityQueryAggregate('file')
       ->accessCheck(FALSE)
       ->aggregate('fid', 'max')
@@ -171,7 +171,7 @@ public function testNormal() {
   /**
    * Tests uploading a duplicate file.
    */
-  public function testDuplicate() {
+  public function testDuplicate(): void {
     // It should not be possible to create two managed files with the same URI.
     $image1 = current($this->drupalGetTestFiles('image'));
     $edit = ['files[file_test_upload]' => \Drupal::service('file_system')->realpath($image1->uri)];
@@ -207,7 +207,7 @@ public function testDuplicate() {
   /**
    * Tests extension handling.
    */
-  public function testHandleExtension() {
+  public function testHandleExtension(): void {
     // The file being tested is a .gif which is in the default safe list
     // of extensions to allow when the extension validator isn't used. This is
     // implicitly tested at the testNormal() test. Here we tell
@@ -291,7 +291,7 @@ public function testHandleExtension() {
   /**
    * Tests dangerous file handling.
    */
-  public function testHandleDangerousFile() {
+  public function testHandleDangerousFile(): void {
     $config = $this->config('system.file');
     // Allow the .php extension and make sure it gets munged and given a .txt
     // extension for safety. Also check to make sure its MIME type was changed.
@@ -385,7 +385,7 @@ public function testHandleDangerousFile() {
   /**
    * Test dangerous file handling.
    */
-  public function testHandleDotFile() {
+  public function testHandleDotFile(): void {
     $dot_file = $this->siteDirectory . '/.test';
     file_put_contents($dot_file, 'This is a test');
     $config = $this->config('system.file');
@@ -442,7 +442,7 @@ public function testHandleDotFile() {
   /**
    * Tests file munge handling.
    */
-  public function testHandleFileMunge() {
+  public function testHandleFileMunge(): void {
     // Ensure insecure uploads are disabled for this test.
     $this->config('system.file')->set('allow_insecure_uploads', 0)->save();
     $original_image_uri = $this->image->getFileUri();
@@ -599,7 +599,7 @@ public function testHandleFileMunge() {
   /**
    * Tests renaming when uploading over a file that already exists.
    */
-  public function testExistingRename() {
+  public function testExistingRename(): void {
     $edit = [
       'file_test_replace' => FileExists::Rename->name,
       'files[file_test_upload]' => \Drupal::service('file_system')->realpath($this->image->getFileUri()),
@@ -617,7 +617,7 @@ public function testExistingRename() {
   /**
    * Tests replacement when uploading over a file that already exists.
    */
-  public function testExistingReplace() {
+  public function testExistingReplace(): void {
     $edit = [
       'file_test_replace' => FileExists::Replace->name,
       'files[file_test_upload]' => \Drupal::service('file_system')->realpath($this->image->getFileUri()),
@@ -635,7 +635,7 @@ public function testExistingReplace() {
   /**
    * Tests for failure when uploading over a file that already exists.
    */
-  public function testExistingError() {
+  public function testExistingError(): void {
     $edit = [
       'file_test_replace' => FileExists::Error->name,
       'files[file_test_upload]' => \Drupal::service('file_system')->realpath($this->image->getFileUri()),
@@ -652,7 +652,7 @@ public function testExistingError() {
   /**
    * Tests for no failures when not uploading a file.
    */
-  public function testNoUpload() {
+  public function testNoUpload(): void {
     $this->drupalGet('file-test/upload');
     $this->submitForm([], 'Submit');
     $this->assertSession()->pageTextNotContains("Epic upload FAIL!");
@@ -661,7 +661,7 @@ public function testNoUpload() {
   /**
    * Tests for log entry on failing destination.
    */
-  public function testDrupalMovingUploadedFileError() {
+  public function testDrupalMovingUploadedFileError(): void {
     // Create a directory and make it not writable.
     $test_directory = 'test_drupal_move_uploaded_file_fail';
     /** @var \Drupal\Core\File\FileSystemInterface $file_system */
@@ -693,7 +693,7 @@ public function testDrupalMovingUploadedFileError() {
   /**
    * Tests that filenames containing invalid UTF-8 are rejected.
    */
-  public function testInvalidUtf8FilenameUpload() {
+  public function testInvalidUtf8FilenameUpload(): void {
     $this->drupalGet('file-test/upload');
 
     // Filename containing invalid UTF-8.
@@ -749,7 +749,7 @@ public function testInvalidUtf8FilenameUpload() {
   /**
    * Tests the file_save_upload() function when the field is required.
    */
-  public function testRequired() {
+  public function testRequired(): void {
     // Reset the hook counters to get rid of the 'load' we just called.
     file_test_reset();
 
@@ -771,7 +771,7 @@ public function testRequired() {
   /**
    * Tests filename sanitization.
    */
-  public function testSanitization() {
+  public function testSanitization(): void {
     $file = $this->generateFile('TÉXT-œ', 64, 5, 'text');
 
     $this->drupalGet('file-test/upload');
diff --git a/core/modules/file/tests/src/FunctionalJavascript/AjaxFileManagedMultipleTest.php b/core/modules/file/tests/src/FunctionalJavascript/AjaxFileManagedMultipleTest.php
index 311706489940..e7fb4e3e7016 100644
--- a/core/modules/file/tests/src/FunctionalJavascript/AjaxFileManagedMultipleTest.php
+++ b/core/modules/file/tests/src/FunctionalJavascript/AjaxFileManagedMultipleTest.php
@@ -32,7 +32,7 @@ class AjaxFileManagedMultipleTest extends WebDriverTestBase {
   /**
    * Tests if managed file form element works well with multiple files upload.
    */
-  public function testMultipleFilesUpload() {
+  public function testMultipleFilesUpload(): void {
     $file_system = \Drupal::service('file_system');
     $file_storage = \Drupal::entityTypeManager()->getStorage('file');
     $page = $this->getSession()->getPage();
diff --git a/core/modules/file/tests/src/FunctionalJavascript/FileFieldValidateTest.php b/core/modules/file/tests/src/FunctionalJavascript/FileFieldValidateTest.php
index 315d7983bda6..724b80db8e33 100644
--- a/core/modules/file/tests/src/FunctionalJavascript/FileFieldValidateTest.php
+++ b/core/modules/file/tests/src/FunctionalJavascript/FileFieldValidateTest.php
@@ -34,7 +34,7 @@ class FileFieldValidateTest extends WebDriverTestBase {
   /**
    * Tests the validation message is displayed only once for ajax uploads.
    */
-  public function testAjaxValidationMessage() {
+  public function testAjaxValidationMessage(): void {
     $field_name = $this->randomMachineName();
     $this->drupalCreateContentType(['type' => 'article', 'name' => 'Article']);
     $this->createFileField($field_name, 'node', 'article', [], ['file_extensions' => 'txt']);
diff --git a/core/modules/file/tests/src/FunctionalJavascript/FileFieldWidgetTest.php b/core/modules/file/tests/src/FunctionalJavascript/FileFieldWidgetTest.php
index a73482afe36f..d73603b34416 100644
--- a/core/modules/file/tests/src/FunctionalJavascript/FileFieldWidgetTest.php
+++ b/core/modules/file/tests/src/FunctionalJavascript/FileFieldWidgetTest.php
@@ -62,7 +62,7 @@ protected function setUp(): void {
   /**
    * Tests upload and remove buttons for multiple multi-valued File fields.
    */
-  public function testMultiValuedWidget() {
+  public function testMultiValuedWidget(): void {
     $type_name = 'article';
     $field_name = 'test_file_field_1';
     $field_name2 = 'test_file_field_2';
@@ -137,7 +137,7 @@ public function testMultiValuedWidget() {
   /**
    * Tests uploading and remove buttons for a single-valued File field.
    */
-  public function testSingleValuedWidget() {
+  public function testSingleValuedWidget(): void {
     $type_name = 'article';
     $field_name = 'test_file_field_1';
     $cardinality = 1;
@@ -187,7 +187,7 @@ public function testSingleValuedWidget() {
   /**
    * Tests uploading more files than allowed at once.
    */
-  public function testUploadingMoreFilesThanAllowed() {
+  public function testUploadingMoreFilesThanAllowed(): void {
     $type_name = 'article';
     $field_name = 'test_file_field_1';
     $cardinality = 2;
diff --git a/core/modules/file/tests/src/FunctionalJavascript/FileManagedFileElementTest.php b/core/modules/file/tests/src/FunctionalJavascript/FileManagedFileElementTest.php
index 67efd3eab910..8924703c8fd6 100644
--- a/core/modules/file/tests/src/FunctionalJavascript/FileManagedFileElementTest.php
+++ b/core/modules/file/tests/src/FunctionalJavascript/FileManagedFileElementTest.php
@@ -54,7 +54,7 @@ protected function setUp(): void {
   /**
    * Tests the managed_file element type.
    */
-  public function testManagedFile() {
+  public function testManagedFile(): void {
     // Perform the tests with all permutations of $form['#tree'],
     // $element['#extended'], and $element['#multiple'].
     $filename = \Drupal::service('file_system')->tempnam('temporary://', "testManagedFile") . '.txt';
diff --git a/core/modules/file/tests/src/FunctionalJavascript/MaximumFileSizeExceededUploadTest.php b/core/modules/file/tests/src/FunctionalJavascript/MaximumFileSizeExceededUploadTest.php
index 7f6d0685f82e..57e01039ee3c 100644
--- a/core/modules/file/tests/src/FunctionalJavascript/MaximumFileSizeExceededUploadTest.php
+++ b/core/modules/file/tests/src/FunctionalJavascript/MaximumFileSizeExceededUploadTest.php
@@ -97,7 +97,7 @@ protected function tearDown(): void {
   /**
    * Tests that uploading files exceeding maximum size are handled correctly.
    */
-  public function testUploadFileExceedingMaximumFileSize() {
+  public function testUploadFileExceedingMaximumFileSize(): void {
     $session = $this->getSession();
 
     // Create a test file that exceeds the maximum POST size with 1 kilobyte.
diff --git a/core/modules/file/tests/src/Kernel/AccessTest.php b/core/modules/file/tests/src/Kernel/AccessTest.php
index a3a1e2551a2b..7f9005bcc15f 100644
--- a/core/modules/file/tests/src/Kernel/AccessTest.php
+++ b/core/modules/file/tests/src/Kernel/AccessTest.php
@@ -41,7 +41,7 @@ protected function setUp(): void {
   /**
    * Tests 'update' and 'delete' access to file entities.
    */
-  public function testFileAccess() {
+  public function testFileAccess(): void {
     // Create a user so the tested users do not have the magic ID of user 1.
     $this->createUser();
 
@@ -120,7 +120,7 @@ public function testFileAccess() {
    *
    * @see \Drupal\file\FileAccessControlHandler::checkFieldAccess()
    */
-  public function testCheckFieldAccess() {
+  public function testCheckFieldAccess(): void {
     $this->setUpCurrentUser();
     /** @var \Drupal\file\FileInterface $file */
     $file = File::create([
@@ -147,7 +147,7 @@ public function testCheckFieldAccess() {
    *
    * @see \Drupal\file\FileAccessControlHandler::checkCreateAccess()
    */
-  public function testCreateAccess() {
+  public function testCreateAccess(): void {
     $user1 = $this->createUser([
       'delete own files',
     ]);
@@ -168,7 +168,7 @@ public function testCreateAccess() {
   /**
    * Tests cacheability metadata.
    */
-  public function testFileCacheability() {
+  public function testFileCacheability(): void {
     $file = File::create([
       'filename' => 'green-scarf',
       'uri' => 'private://green-scarf',
diff --git a/core/modules/file/tests/src/Kernel/ComputedFileUrlTest.php b/core/modules/file/tests/src/Kernel/ComputedFileUrlTest.php
index 7c38ce360919..46a37bdafc50 100644
--- a/core/modules/file/tests/src/Kernel/ComputedFileUrlTest.php
+++ b/core/modules/file/tests/src/Kernel/ComputedFileUrlTest.php
@@ -27,7 +27,7 @@ class ComputedFileUrlTest extends KernelTestBase {
   /**
    * @covers ::getValue
    */
-  public function testGetValue() {
+  public function testGetValue(): void {
     $entity = $this->prophesize(FileInterface::class);
     $entity->getFileUri()
       ->willReturn($this->testUrl);
@@ -52,7 +52,7 @@ public function testGetValue() {
   /**
    * @covers ::setValue
    */
-  public function testSetValue() {
+  public function testSetValue(): void {
     $name = $this->randomMachineName();
     $parent = $this->prophesize(FieldItemInterface::class);
     $parent->onChange($name)
@@ -74,7 +74,7 @@ public function testSetValue() {
   /**
    * @covers ::setValue
    */
-  public function testSetValueNoNotify() {
+  public function testSetValueNoNotify(): void {
     $name = $this->randomMachineName();
     $parent = $this->prophesize(FieldItemInterface::class);
     $parent->onChange($name)
diff --git a/core/modules/file/tests/src/Kernel/CopyTest.php b/core/modules/file/tests/src/Kernel/CopyTest.php
index 512f360b53e4..7f3f70b759df 100644
--- a/core/modules/file/tests/src/Kernel/CopyTest.php
+++ b/core/modules/file/tests/src/Kernel/CopyTest.php
@@ -40,7 +40,7 @@ protected function setUp(): void {
    *
    * @covers ::copy
    */
-  public function testNormal() {
+  public function testNormal(): void {
     $contents = $this->randomMachineName(10);
     $source = $this->createFile(NULL, $contents);
     $desired_uri = 'public://' . $this->randomMachineName();
@@ -71,7 +71,7 @@ public function testNormal() {
    *
    * @covers ::copy
    */
-  public function testExistingRename() {
+  public function testExistingRename(): void {
     // Setup a file to overwrite.
     $contents = $this->randomMachineName(10);
     $source = $this->createFile(NULL, $contents);
@@ -113,7 +113,7 @@ public function testExistingRename() {
    *
    * @covers ::copy
    */
-  public function testExistingReplace() {
+  public function testExistingReplace(): void {
     // Setup a file to overwrite.
     $contents = $this->randomMachineName(10);
     $source = $this->createFile(NULL, $contents);
@@ -153,7 +153,7 @@ public function testExistingReplace() {
    *
    * @covers ::copy
    */
-  public function testExistingError() {
+  public function testExistingError(): void {
     $contents = $this->randomMachineName(10);
     $source = $this->createFile();
     $target = $this->createFile(NULL, $contents);
@@ -185,7 +185,7 @@ public function testExistingError() {
    *
    * @covers ::copy
    */
-  public function testInvalidStreamWrapper() {
+  public function testInvalidStreamWrapper(): void {
     $this->expectException(InvalidStreamWrapperException::class);
     $this->expectExceptionMessage('Invalid stream wrapper: foo://');
     $source = $this->createFile();
@@ -197,7 +197,7 @@ public function testInvalidStreamWrapper() {
    *
    * @covers ::copy
    */
-  public function testEntityStorageException() {
+  public function testEntityStorageException(): void {
     /** @var \Drupal\Core\Entity\EntityTypeManager $entityTypeManager */
     $entityTypeManager = $this->prophesize(EntityTypeManager::class);
     $entityTypeManager->getStorage('file')
diff --git a/core/modules/file/tests/src/Kernel/DeleteTest.php b/core/modules/file/tests/src/Kernel/DeleteTest.php
index 2024f39f6652..e7e9a90a537a 100644
--- a/core/modules/file/tests/src/Kernel/DeleteTest.php
+++ b/core/modules/file/tests/src/Kernel/DeleteTest.php
@@ -17,7 +17,7 @@ class DeleteTest extends FileManagedUnitTestBase {
   /**
    * Tries deleting a normal file (as opposed to a directory, symlink, etc).
    */
-  public function testUnused() {
+  public function testUnused(): void {
     $file = $this->createFile();
 
     // Check that deletion removes the file and database record.
@@ -31,7 +31,7 @@ public function testUnused() {
   /**
    * Tries deleting a file that is in use.
    */
-  public function testInUse() {
+  public function testInUse(): void {
     // This test expects unused managed files to be marked as a temporary file
     // and then deleted up by file_cron().
     $this->config('file.settings')
@@ -82,7 +82,7 @@ public function testInUse() {
   /**
    * Tries to run cron deletion on file deleted from the file-system.
    */
-  public function testCronDeleteNonExistingTemporary() {
+  public function testCronDeleteNonExistingTemporary(): void {
     $file = $this->createFile();
     // Delete the file, but leave it in the file_managed table.
     \Drupal::service('file_system')->delete($file->getFileUri());
diff --git a/core/modules/file/tests/src/Kernel/FileItemTest.php b/core/modules/file/tests/src/Kernel/FileItemTest.php
index db196eba8bb0..9a00dace1cbc 100644
--- a/core/modules/file/tests/src/Kernel/FileItemTest.php
+++ b/core/modules/file/tests/src/Kernel/FileItemTest.php
@@ -82,7 +82,7 @@ protected function setUp(): void {
   /**
    * Tests using entity fields of the file field type.
    */
-  public function testFileItem() {
+  public function testFileItem(): void {
     // Check that the selection handler was automatically assigned to
     // 'default:file'.
     $field_definition = FieldConfig::load('entity_test.entity_test.file_test');
diff --git a/core/modules/file/tests/src/Kernel/FileItemValidationTest.php b/core/modules/file/tests/src/Kernel/FileItemValidationTest.php
index f92e3e7643e5..6358163c8663 100644
--- a/core/modules/file/tests/src/Kernel/FileItemValidationTest.php
+++ b/core/modules/file/tests/src/Kernel/FileItemValidationTest.php
@@ -62,7 +62,7 @@ protected function setUp(): void {
    * @covers \Drupal\file\Plugin\Validation\Constraint\FileValidationConstraintValidator
    * @dataProvider getFileTypes
    */
-  public function testFileValidationConstraint($file_type) {
+  public function testFileValidationConstraint($file_type): void {
     $field_storage = FieldStorageConfig::create([
       'field_name' => 'field_test_file',
       'entity_type' => 'entity_test',
diff --git a/core/modules/file/tests/src/Kernel/FileManagedAccessTest.php b/core/modules/file/tests/src/Kernel/FileManagedAccessTest.php
index bf31abfc1bf8..e986a5a8d484 100644
--- a/core/modules/file/tests/src/Kernel/FileManagedAccessTest.php
+++ b/core/modules/file/tests/src/Kernel/FileManagedAccessTest.php
@@ -32,7 +32,7 @@ class FileManagedAccessTest extends KernelTestBase {
   /**
    * Tests if public file is always accessible.
    */
-  public function testFileAccess() {
+  public function testFileAccess(): void {
     $this->installEntitySchema('user');
     $this->installEntitySchema('file');
     $this->installSchema('file', ['file_usage']);
diff --git a/core/modules/file/tests/src/Kernel/FileRepositoryTest.php b/core/modules/file/tests/src/Kernel/FileRepositoryTest.php
index fc3e41a204bb..fc5283c620c2 100644
--- a/core/modules/file/tests/src/Kernel/FileRepositoryTest.php
+++ b/core/modules/file/tests/src/Kernel/FileRepositoryTest.php
@@ -49,7 +49,7 @@ protected function setUp(): void {
    *
    * @covers ::writeData
    */
-  public function testWithFilename() {
+  public function testWithFilename(): void {
     $contents = $this->randomMachineName();
 
     // Using filename with non-latin characters.
@@ -79,7 +79,7 @@ public function testWithFilename() {
    *
    * @covers ::writeData
    */
-  public function testExistingRename() {
+  public function testExistingRename(): void {
     // Setup a file to overwrite.
     $existing = $this->createFile();
     $contents = $this->randomMachineName();
@@ -111,7 +111,7 @@ public function testExistingRename() {
    *
    * @covers ::writeData
    */
-  public function testExistingReplace() {
+  public function testExistingReplace(): void {
     // Setup a file to overwrite.
     $existing = $this->createFile();
     $contents = $this->randomMachineName();
@@ -142,7 +142,7 @@ public function testExistingReplace() {
    *
    * @covers ::writeData
    */
-  public function testExistingError() {
+  public function testExistingError(): void {
     $contents = $this->randomMachineName();
     $existing = $this->createFile(NULL, $contents);
 
@@ -170,7 +170,7 @@ public function testExistingError() {
    *
    * @covers ::writeData
    */
-  public function testInvalidStreamWrapper() {
+  public function testInvalidStreamWrapper(): void {
     $this->expectException(InvalidStreamWrapperException::class);
     $this->expectExceptionMessage('Invalid stream wrapper: foo://');
     $this->fileRepository->writeData('asdf', 'foo://');
@@ -181,7 +181,7 @@ public function testInvalidStreamWrapper() {
    *
    * @covers ::writeData
    */
-  public function testEntityStorageException() {
+  public function testEntityStorageException(): void {
     /** @var \Drupal\Core\Entity\EntityTypeManager $entityTypeManager */
     $entityTypeManager = $this->prophesize(EntityTypeManager::class);
     $entityTypeManager->getStorage('file')
@@ -206,7 +206,7 @@ public function testEntityStorageException() {
    *
    * @covers ::loadByUri
    */
-  public function testLoadByUri() {
+  public function testLoadByUri(): void {
     $source = $this->createFile();
     $result = $this->fileRepository->loadByUri($source->getFileUri());
     $this->assertSameFile($source, $result);
@@ -217,7 +217,7 @@ public function testLoadByUri() {
    *
    * @covers ::loadByUri
    */
-  public function testLoadByUriCaseSensitive() {
+  public function testLoadByUriCaseSensitive(): void {
     $source = $this->createFile('FooBar.txt');
     $result = $this->fileRepository->loadByUri('public://FooBar.txt');
     $this->assertSameFile($source, $result);
diff --git a/core/modules/file/tests/src/Kernel/FileUriItemTest.php b/core/modules/file/tests/src/Kernel/FileUriItemTest.php
index 245f54b241f6..529048316771 100644
--- a/core/modules/file/tests/src/Kernel/FileUriItemTest.php
+++ b/core/modules/file/tests/src/Kernel/FileUriItemTest.php
@@ -19,7 +19,7 @@ class FileUriItemTest extends FileManagedUnitTestBase {
   /**
    * Tests the file entity override of the URI field.
    */
-  public function testCustomFileUriField() {
+  public function testCustomFileUriField(): void {
     $uri = 'public://druplicon.txt';
 
     // Create a new file entity.
diff --git a/core/modules/file/tests/src/Kernel/FileUrlTest.php b/core/modules/file/tests/src/Kernel/FileUrlTest.php
index 6672d2f59615..aca3a93a8f9c 100644
--- a/core/modules/file/tests/src/Kernel/FileUrlTest.php
+++ b/core/modules/file/tests/src/Kernel/FileUrlTest.php
@@ -16,7 +16,7 @@ class FileUrlTest extends FileManagedUnitTestBase {
   /**
    * Tests public files with a different host name from settings.
    */
-  public function testFilesUrlWithDifferentHostName() {
+  public function testFilesUrlWithDifferentHostName(): void {
     $test_base_url = 'http://www.example.com/cdn';
     $this->setSetting('file_public_base_url', $test_base_url);
     $filepath = \Drupal::service('file_system')->createFilename('test.txt', '');
diff --git a/core/modules/file/tests/src/Kernel/Formatter/FileEntityFormatterTest.php b/core/modules/file/tests/src/Kernel/Formatter/FileEntityFormatterTest.php
index 9f6da0eddc00..ea5adfe6b114 100644
--- a/core/modules/file/tests/src/Kernel/Formatter/FileEntityFormatterTest.php
+++ b/core/modules/file/tests/src/Kernel/Formatter/FileEntityFormatterTest.php
@@ -79,7 +79,7 @@ protected function setUp(): void {
   /**
    * Tests the file_link field formatter.
    */
-  public function testFormatterFileLink() {
+  public function testFormatterFileLink(): void {
     $entity_display = EntityViewDisplay::create([
       'targetEntityType' => 'file',
       'bundle' => 'file',
@@ -94,7 +94,7 @@ public function testFormatterFileLink() {
   /**
    * Tests the file_link field formatter.
    */
-  public function testFormatterFileUri() {
+  public function testFormatterFileUri(): void {
     $entity_display = EntityViewDisplay::create([
       'targetEntityType' => 'file',
       'bundle' => 'file',
@@ -117,7 +117,7 @@ public function testFormatterFileUri() {
   /**
    * Tests the file_extension field formatter.
    */
-  public function testFormatterFileExtension() {
+  public function testFormatterFileExtension(): void {
     $entity_display = EntityViewDisplay::create([
       'targetEntityType' => 'file',
       'bundle' => 'file',
@@ -142,7 +142,7 @@ public function testFormatterFileExtension() {
   /**
    * Tests the file_extension field formatter.
    */
-  public function testFormatterFileMime() {
+  public function testFormatterFileMime(): void {
     $entity_display = EntityViewDisplay::create([
       'targetEntityType' => 'file',
       'bundle' => 'file',
@@ -159,7 +159,7 @@ public function testFormatterFileMime() {
   /**
    * Tests the file_size field formatter.
    */
-  public function testFormatterFileSize() {
+  public function testFormatterFileSize(): void {
     $entity_display = EntityViewDisplay::create([
       'targetEntityType' => 'file',
       'bundle' => 'file',
@@ -176,7 +176,7 @@ public function testFormatterFileSize() {
   /**
    * Tests the file_link field formatter using a query string.
    */
-  public function testFormatterFileLinkWithQueryString() {
+  public function testFormatterFileLinkWithQueryString(): void {
     $file = File::create([
       'uri' => 'dummy-external-readonly://file-query-string?foo=bar',
       'filename' => 'file-query-string',
diff --git a/core/modules/file/tests/src/Kernel/LoadTest.php b/core/modules/file/tests/src/Kernel/LoadTest.php
index 89fc87313f46..38ab5a69a6f8 100644
--- a/core/modules/file/tests/src/Kernel/LoadTest.php
+++ b/core/modules/file/tests/src/Kernel/LoadTest.php
@@ -17,7 +17,7 @@ class LoadTest extends FileManagedUnitTestBase {
   /**
    * Try to load a non-existent file by fid.
    */
-  public function testLoadMissingFid() {
+  public function testLoadMissingFid(): void {
     $this->assertNull(File::load(-1), 'Try to load an invalid fid fails.');
     $this->assertFileHooksCalled([]);
   }
@@ -25,7 +25,7 @@ public function testLoadMissingFid() {
   /**
    * Try to load a non-existent file by URI.
    */
-  public function testLoadMissingFilepath() {
+  public function testLoadMissingFilepath(): void {
     $files = \Drupal::entityTypeManager()->getStorage('file')->loadByProperties(['uri' => 'foobar://misc/druplicon.png']);
     $this->assertFalse(reset($files), "Try to load a file that doesn't exist in the database fails.");
     $this->assertFileHooksCalled([]);
@@ -34,7 +34,7 @@ public function testLoadMissingFilepath() {
   /**
    * Try to load a non-existent file by status.
    */
-  public function testLoadInvalidStatus() {
+  public function testLoadInvalidStatus(): void {
     $files = \Drupal::entityTypeManager()->getStorage('file')->loadByProperties(['status' => -99]);
     $this->assertFalse(reset($files), 'Trying to load a file with an invalid status fails.');
     $this->assertFileHooksCalled([]);
@@ -43,7 +43,7 @@ public function testLoadInvalidStatus() {
   /**
    * Load a single file and ensure that the correct values are returned.
    */
-  public function testSingleValues() {
+  public function testSingleValues(): void {
     // Create a new file entity from scratch so we know the values.
     $file = $this->createFile('druplicon.txt', NULL, 'public');
     $by_fid_file = File::load($file->id());
@@ -60,7 +60,7 @@ public function testSingleValues() {
   /**
    * This will test loading file data from the database.
    */
-  public function testMultiple() {
+  public function testMultiple(): void {
     // Create a new file entity.
     $file = $this->createFile('druplicon.txt', NULL, 'public');
 
@@ -86,7 +86,7 @@ public function testMultiple() {
   /**
    * Loads a single file and ensure that the correct values are returned.
    */
-  public function testUuidValues() {
+  public function testUuidValues(): void {
     // Create a new file entity from scratch so we know the values.
     $file = $this->createFile('druplicon.txt', NULL, 'public');
     $file->save();
diff --git a/core/modules/file/tests/src/Kernel/ManagedFileTest.php b/core/modules/file/tests/src/Kernel/ManagedFileTest.php
index 6a0b4476bf25..d91c17e556d8 100644
--- a/core/modules/file/tests/src/Kernel/ManagedFileTest.php
+++ b/core/modules/file/tests/src/Kernel/ManagedFileTest.php
@@ -47,7 +47,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) {}
   /**
    * Tests that managed file elements can be programmatically submitted.
    */
-  public function testManagedFileElement() {
+  public function testManagedFileElement(): void {
     $form_state = new FormState();
     $values['managed_file'] = NULL;
     $form_state->setValues($values);
diff --git a/core/modules/file/tests/src/Kernel/Migrate/MigrateFileStubTest.php b/core/modules/file/tests/src/Kernel/Migrate/MigrateFileStubTest.php
index 03d573e9577b..ec38ffa8d134 100644
--- a/core/modules/file/tests/src/Kernel/Migrate/MigrateFileStubTest.php
+++ b/core/modules/file/tests/src/Kernel/Migrate/MigrateFileStubTest.php
@@ -32,7 +32,7 @@ protected function setUp(): void {
   /**
    * Tests creation of file stubs.
    */
-  public function testStub() {
+  public function testStub(): void {
     $this->performStubTest('file');
   }
 
diff --git a/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateFileConfigsTest.php b/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateFileConfigsTest.php
index fc2f8087012c..0f5e82489776 100644
--- a/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateFileConfigsTest.php
+++ b/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateFileConfigsTest.php
@@ -27,7 +27,7 @@ protected function setUp(): void {
   /**
    * Tests migration of file variables to file.settings.yml.
    */
-  public function testFileSettings() {
+  public function testFileSettings(): void {
     $config = $this->config('file.settings');
     $this->assertSame('textfield', $config->get('description.type'));
     $this->assertSame(128, $config->get('description.length'));
diff --git a/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateFileTest.php b/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateFileTest.php
index 5cd53790803d..e2a1ab3ccfee 100644
--- a/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateFileTest.php
+++ b/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateFileTest.php
@@ -75,7 +75,7 @@ protected function assertEntity(int $fid, string $name, int $size, string $uri,
   /**
    * Tests the Drupal 6 files to Drupal 8 migration.
    */
-  public function testFiles() {
+  public function testFiles(): void {
     $this->assertEntity(1, 'Image1.png', 39325, 'public://image-1.png', 'image/png', 1);
     $this->assertEntity(2, 'Image2.jpg', 1831, 'public://image-2.jpg', 'image/jpeg', 1);
     $this->assertEntity(3, 'image-3.jpg', 1831, 'public://image-3.jpg', 'image/jpeg', 1);
diff --git a/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadEntityDisplayTest.php b/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadEntityDisplayTest.php
index 7e4284a9e013..d6a071ecaad2 100644
--- a/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadEntityDisplayTest.php
+++ b/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadEntityDisplayTest.php
@@ -30,7 +30,7 @@ protected function setUp(): void {
   /**
    * Tests Drupal 6 upload settings to Drupal 8 entity display migration.
    */
-  public function testUploadEntityDisplay() {
+  public function testUploadEntityDisplay(): void {
     $this->executeMigration('d6_upload_entity_display');
 
     $display = EntityViewDisplay::load('node.page.default');
@@ -55,7 +55,7 @@ public function testUploadEntityDisplay() {
    * Entity displays should be ignored when they belong to node types which
    * were not migrated.
    */
-  public function testSkipNonExistentNodeType() {
+  public function testSkipNonExistentNodeType(): void {
     // The "story" node type is migrated by d6_node_type but we need to pretend
     // that it didn't occur, so record that in the map table.
     $this->mockFailure('d6_node_type', ['type' => 'story']);
diff --git a/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadEntityFormDisplayTest.php b/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadEntityFormDisplayTest.php
index 9ae623d9da4c..481658d167ab 100644
--- a/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadEntityFormDisplayTest.php
+++ b/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadEntityFormDisplayTest.php
@@ -30,7 +30,7 @@ protected function setUp(): void {
   /**
    * Tests Drupal 6 upload settings to Drupal 8 entity form display migration.
    */
-  public function testUploadEntityFormDisplay() {
+  public function testUploadEntityFormDisplay(): void {
     $this->executeMigration('d6_upload_entity_form_display');
 
     $display = EntityFormDisplay::load('node.page.default');
@@ -55,7 +55,7 @@ public function testUploadEntityFormDisplay() {
    * Entity displays should be ignored when they belong to node types which
    * were not migrated.
    */
-  public function testSkipNonExistentNodeType() {
+  public function testSkipNonExistentNodeType(): void {
     // The "story" node type is migrated by d6_node_type but we need to pretend
     // that it didn't occur, so record that in the map table.
     $this->mockFailure('d6_node_type', ['type' => 'story']);
diff --git a/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadFieldTest.php b/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadFieldTest.php
index b46b4bf70a0b..981711e6f8b9 100644
--- a/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadFieldTest.php
+++ b/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadFieldTest.php
@@ -30,7 +30,7 @@ protected function setUp(): void {
   /**
    * Tests the Drupal 6 upload settings to Drupal 8 field migration.
    */
-  public function testUpload() {
+  public function testUpload(): void {
     $field_storage = FieldStorageConfig::load('node.upload');
     $this->assertSame('node.upload', $field_storage->id());
     $this->assertSame([['node', 'upload']], $this->getMigration('d6_upload_field')->getIdMap()->lookupDestinationIds(['']));
diff --git a/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadInstanceTest.php b/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadInstanceTest.php
index 4722d14dd72b..041689e0b344 100644
--- a/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadInstanceTest.php
+++ b/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadInstanceTest.php
@@ -30,7 +30,7 @@ protected function setUp(): void {
   /**
    * Tests the Drupal 6 upload settings to Drupal 8 field instance migration.
    */
-  public function testUploadFieldInstance() {
+  public function testUploadFieldInstance(): void {
     $field = FieldConfig::load('node.page.upload');
     $settings = $field->getSettings();
     $this->assertSame('node.page.upload', $field->id());
diff --git a/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadTest.php b/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadTest.php
index ba5ff07e57aa..53dbba91926b 100644
--- a/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadTest.php
+++ b/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadTest.php
@@ -68,7 +68,7 @@ protected function setUp(): void {
   /**
    * Tests upload migration from Drupal 6 to Drupal 8.
    */
-  public function testUpload() {
+  public function testUpload(): void {
     $this->container->get('entity_type.manager')
       ->getStorage('node')
       ->resetCache([1, 2, 12]);
diff --git a/core/modules/file/tests/src/Kernel/Migrate/d7/MigrateFileConfigsTest.php b/core/modules/file/tests/src/Kernel/Migrate/d7/MigrateFileConfigsTest.php
index 4e34e1b546fd..8082aa9bcd79 100644
--- a/core/modules/file/tests/src/Kernel/Migrate/d7/MigrateFileConfigsTest.php
+++ b/core/modules/file/tests/src/Kernel/Migrate/d7/MigrateFileConfigsTest.php
@@ -27,7 +27,7 @@ protected function setUp(): void {
   /**
    * Tests migration of file variables to file.settings.yml.
    */
-  public function testFileSettings() {
+  public function testFileSettings(): void {
     $config = $this->config('file.settings');
     $this->assertSame('textfield', $config->get('description.type'));
     $this->assertSame(256, $config->get('description.length'));
diff --git a/core/modules/file/tests/src/Kernel/Migrate/d7/MigrateFileTest.php b/core/modules/file/tests/src/Kernel/Migrate/d7/MigrateFileTest.php
index abd22af75498..0bd4363247d7 100644
--- a/core/modules/file/tests/src/Kernel/Migrate/d7/MigrateFileTest.php
+++ b/core/modules/file/tests/src/Kernel/Migrate/d7/MigrateFileTest.php
@@ -44,7 +44,7 @@ protected function getFileMigrationInfo() {
   /**
    * Tests that all expected files are migrated.
    */
-  public function testFileMigration() {
+  public function testFileMigration(): void {
     $this->assertEntity(1, 'cube.jpeg', 'public://cube.jpeg', 'image/jpeg', 3620, 1421727515, 1421727515, '1');
     // Ensure temporary file was not migrated.
     $this->assertNull(File::load(4));
diff --git a/core/modules/file/tests/src/Kernel/Migrate/d7/MigratePrivateFileTest.php b/core/modules/file/tests/src/Kernel/Migrate/d7/MigratePrivateFileTest.php
index 1b16a168c74b..259c2e171e6a 100644
--- a/core/modules/file/tests/src/Kernel/Migrate/d7/MigratePrivateFileTest.php
+++ b/core/modules/file/tests/src/Kernel/Migrate/d7/MigratePrivateFileTest.php
@@ -54,7 +54,7 @@ public function register(ContainerBuilder $container) {
   /**
    * Tests that all expected files are migrated.
    */
-  public function testFileMigration() {
+  public function testFileMigration(): void {
     $this->assertEntity(3, 'Babylon5.txt', 'private://Babylon5.txt', 'text/plain', 3, 1486104045, 1486104045, '1');
   }
 
diff --git a/core/modules/file/tests/src/Kernel/MoveTest.php b/core/modules/file/tests/src/Kernel/MoveTest.php
index fbe70c77cb8a..e82626c1f211 100644
--- a/core/modules/file/tests/src/Kernel/MoveTest.php
+++ b/core/modules/file/tests/src/Kernel/MoveTest.php
@@ -40,7 +40,7 @@ protected function setUp(): void {
    *
    * @covers ::move
    */
-  public function testNormal() {
+  public function testNormal(): void {
     $contents = $this->randomMachineName(10);
     $source = $this->createFile(NULL, $contents);
     $desired_filepath = 'public://' . $this->randomMachineName();
@@ -72,7 +72,7 @@ public function testNormal() {
    *
    * @covers ::move
    */
-  public function testExistingRename() {
+  public function testExistingRename(): void {
     // Setup a file to overwrite.
     $contents = $this->randomMachineName(10);
     $source = $this->createFile(NULL, $contents);
@@ -109,7 +109,7 @@ public function testExistingRename() {
    *
    * @covers ::move
    */
-  public function testExistingReplace() {
+  public function testExistingReplace(): void {
     // Setup a file to overwrite.
     $contents = $this->randomMachineName(10);
     $source = $this->createFile(NULL, $contents);
@@ -143,7 +143,7 @@ public function testExistingReplace() {
    *
    * @covers ::move
    */
-  public function testExistingReplaceSelf() {
+  public function testExistingReplaceSelf(): void {
     // Setup a file to overwrite.
     $contents = $this->randomMachineName(10);
     $source = $this->createFile(NULL, $contents);
@@ -173,7 +173,7 @@ public function testExistingReplaceSelf() {
    *
    * @covers ::move
    */
-  public function testExistingError() {
+  public function testExistingError(): void {
     $contents = $this->randomMachineName(10);
     $source = $this->createFile();
     $target = $this->createFile(NULL, $contents);
@@ -208,7 +208,7 @@ public function testExistingError() {
    *
    * @covers ::move
    */
-  public function testInvalidStreamWrapper() {
+  public function testInvalidStreamWrapper(): void {
     $this->expectException(InvalidStreamWrapperException::class);
     $this->expectExceptionMessage('Invalid stream wrapper: foo://');
     $source = $this->createFile();
@@ -220,7 +220,7 @@ public function testInvalidStreamWrapper() {
    *
    * @covers ::move
    */
-  public function testEntityStorageException() {
+  public function testEntityStorageException(): void {
     /** @var \Drupal\Core\Entity\EntityTypeManager $entityTypeManager */
     $entityTypeManager = $this->prophesize(EntityTypeManager::class);
     $entityTypeManager->getStorage('file')
diff --git a/core/modules/file/tests/src/Kernel/Plugin/Validation/Constraint/FileExtensionConstraintValidatorTest.php b/core/modules/file/tests/src/Kernel/Plugin/Validation/Constraint/FileExtensionConstraintValidatorTest.php
index ac035d783d4e..c4f58956a015 100644
--- a/core/modules/file/tests/src/Kernel/Plugin/Validation/Constraint/FileExtensionConstraintValidatorTest.php
+++ b/core/modules/file/tests/src/Kernel/Plugin/Validation/Constraint/FileExtensionConstraintValidatorTest.php
@@ -28,7 +28,7 @@ class FileExtensionConstraintValidatorTest extends FileValidatorTestBase {
    * @dataProvider providerTestFileValidateExtensionsOnUri
    * @covers ::validate
    */
-  public function testFileExtensionOnUri(array $file_properties, array $extensions, array $expected_errors) {
+  public function testFileExtensionOnUri(array $file_properties, array $extensions, array $expected_errors): void {
     $file = File::create($file_properties);
     // Test for failure.
     $validators = [
diff --git a/core/modules/file/tests/src/Kernel/Plugin/Validation/Constraint/FileImageDimensionsConstraintValidatorTest.php b/core/modules/file/tests/src/Kernel/Plugin/Validation/Constraint/FileImageDimensionsConstraintValidatorTest.php
index 049c222eb018..a42aa8c25f87 100644
--- a/core/modules/file/tests/src/Kernel/Plugin/Validation/Constraint/FileImageDimensionsConstraintValidatorTest.php
+++ b/core/modules/file/tests/src/Kernel/Plugin/Validation/Constraint/FileImageDimensionsConstraintValidatorTest.php
@@ -54,7 +54,7 @@ protected function setUp(): void {
    *
    * @covers ::validate
    */
-  public function testFileValidateImageResolution() {
+  public function testFileValidateImageResolution(): void {
     // Non-images.
     $validators = ['FileImageDimensions' => []];
     $violations = $this->validator->validate($this->nonImage, $validators);
diff --git a/core/modules/file/tests/src/Kernel/Plugin/Validation/Constraint/FileIsImageConstraintValidatorTest.php b/core/modules/file/tests/src/Kernel/Plugin/Validation/Constraint/FileIsImageConstraintValidatorTest.php
index 99531303cb90..c98b0997220b 100644
--- a/core/modules/file/tests/src/Kernel/Plugin/Validation/Constraint/FileIsImageConstraintValidatorTest.php
+++ b/core/modules/file/tests/src/Kernel/Plugin/Validation/Constraint/FileIsImageConstraintValidatorTest.php
@@ -52,7 +52,7 @@ protected function setUp(): void {
    *
    * @covers ::validate
    */
-  public function testFileIsImage() {
+  public function testFileIsImage(): void {
     $this->assertFileExists($this->image->getFileUri());
     $validators = [
       'FileIsImage' => [],
diff --git a/core/modules/file/tests/src/Kernel/Plugin/Validation/Constraint/FileNameLengthConstraintValidatorTest.php b/core/modules/file/tests/src/Kernel/Plugin/Validation/Constraint/FileNameLengthConstraintValidatorTest.php
index 12de4da09dd0..cab7a5ae7198 100644
--- a/core/modules/file/tests/src/Kernel/Plugin/Validation/Constraint/FileNameLengthConstraintValidatorTest.php
+++ b/core/modules/file/tests/src/Kernel/Plugin/Validation/Constraint/FileNameLengthConstraintValidatorTest.php
@@ -20,7 +20,7 @@ class FileNameLengthConstraintValidatorTest extends FileValidatorTestBase {
    *
    * @covers ::validate
    */
-  public function testFileValidateNameLength() {
+  public function testFileValidateNameLength(): void {
     // Create a new file entity.
     $file = File::create();
 
diff --git a/core/modules/file/tests/src/Kernel/Plugin/Validation/Constraint/FileSizeLimitConstraintValidatorTest.php b/core/modules/file/tests/src/Kernel/Plugin/Validation/Constraint/FileSizeLimitConstraintValidatorTest.php
index d1d938b94d4a..74d2ee2912af 100644
--- a/core/modules/file/tests/src/Kernel/Plugin/Validation/Constraint/FileSizeLimitConstraintValidatorTest.php
+++ b/core/modules/file/tests/src/Kernel/Plugin/Validation/Constraint/FileSizeLimitConstraintValidatorTest.php
@@ -17,7 +17,7 @@ class FileSizeLimitConstraintValidatorTest extends FileValidatorTestBase {
   /**
    * @covers ::validate
    */
-  public function testFileValidateSize() {
+  public function testFileValidateSize(): void {
     $validators = ['FileSizeLimit' => []];
     $violations = $this->validator->validate($this->file, $validators);
     $this->assertCount(0, $violations, 'No limits means no errors.');
diff --git a/core/modules/file/tests/src/Kernel/SaveTest.php b/core/modules/file/tests/src/Kernel/SaveTest.php
index 341177ec5e0b..82113681aded 100644
--- a/core/modules/file/tests/src/Kernel/SaveTest.php
+++ b/core/modules/file/tests/src/Kernel/SaveTest.php
@@ -21,7 +21,7 @@ class SaveTest extends FileManagedUnitTestBase {
    */
   protected bool $usesSuperUserAccessPolicy = TRUE;
 
-  public function testFileSave() {
+  public function testFileSave(): void {
     // Create a new file entity.
     $file = File::create([
       'uid' => 1,
diff --git a/core/modules/file/tests/src/Kernel/SpaceUsedTest.php b/core/modules/file/tests/src/Kernel/SpaceUsedTest.php
index 8bbba2f860af..d8792a28147a 100644
--- a/core/modules/file/tests/src/Kernel/SpaceUsedTest.php
+++ b/core/modules/file/tests/src/Kernel/SpaceUsedTest.php
@@ -60,7 +60,7 @@ protected function createFileWithSize($uri, $size, $uid, $status = FileInterface
   /**
    * Tests different users with the default status.
    */
-  public function testFileSpaceUsed() {
+  public function testFileSpaceUsed(): void {
     $file = $this->container->get('entity_type.manager')->getStorage('file');
     // Test different users with default status.
     $this->assertEquals(70, $file->spaceUsed(2));
diff --git a/core/modules/file/tests/src/Kernel/UsageTest.php b/core/modules/file/tests/src/Kernel/UsageTest.php
index a4d04dc9339b..8a17e7fa556c 100644
--- a/core/modules/file/tests/src/Kernel/UsageTest.php
+++ b/core/modules/file/tests/src/Kernel/UsageTest.php
@@ -22,7 +22,7 @@ class UsageTest extends FileManagedUnitTestBase {
   /**
    * Tests \Drupal\file\FileUsage\DatabaseFileUsageBackend::listUsage().
    */
-  public function testGetUsage() {
+  public function testGetUsage(): void {
     $file = $this->createFile();
     $connection = Database::getConnection();
     $connection->insert('file_usage')
@@ -56,7 +56,7 @@ public function testGetUsage() {
   /**
    * Tests \Drupal\file\FileUsage\DatabaseFileUsageBackend::add().
    */
-  public function testAddUsage() {
+  public function testAddUsage(): void {
     $file = $this->createFile();
     $file_usage = $this->container->get('file.usage');
     $file_usage->add($file, 'testing', 'foo', 1);
@@ -82,7 +82,7 @@ public function testAddUsage() {
   /**
    * Tests file usage deletion when files are made temporary.
    */
-  public function testRemoveUsageTemporary() {
+  public function testRemoveUsageTemporary(): void {
     $this->config('file.settings')
       ->set('make_unused_managed_files_temporary', TRUE)
       ->save();
@@ -93,7 +93,7 @@ public function testRemoveUsageTemporary() {
   /**
    * Tests file usage deletion when files are made temporary.
    */
-  public function testRemoveUsageNonTemporary() {
+  public function testRemoveUsageNonTemporary(): void {
     $this->config('file.settings')
       ->set('make_unused_managed_files_temporary', FALSE)
       ->save();
@@ -196,7 +196,7 @@ public function createTempFiles() {
   /**
    * Ensure that temporary files are removed by default.
    */
-  public function testTempFileCleanupDefault() {
+  public function testTempFileCleanupDefault(): void {
     [$temp_old, $temp_new, $perm_old, $perm_new] = $this->createTempFiles();
 
     // Run cron and then ensure that only the old, temp file was deleted.
@@ -210,7 +210,7 @@ public function testTempFileCleanupDefault() {
   /**
    * Ensure that temporary files are kept as configured.
    */
-  public function testTempFileNoCleanup() {
+  public function testTempFileNoCleanup(): void {
     [$temp_old, $temp_new, $perm_old, $perm_new] = $this->createTempFiles();
 
     // Set the max age to 0, meaning no temporary files will be deleted.
@@ -229,7 +229,7 @@ public function testTempFileNoCleanup() {
   /**
    * Ensure that temporary files are kept as configured.
    */
-  public function testTempFileCustomCleanup() {
+  public function testTempFileCustomCleanup(): void {
     [$temp_old, $temp_new, $perm_old, $perm_new] = $this->createTempFiles();
 
     // Set the max age to older than default.
@@ -248,7 +248,7 @@ public function testTempFileCustomCleanup() {
   /**
    * Tests file usage with translated entities.
    */
-  public function testFileUsageWithEntityTranslation() {
+  public function testFileUsageWithEntityTranslation(): void {
     /** @var \Drupal\file\FileUsage\FileUsageInterface $file_usage */
     $file_usage = $this->container->get('file.usage');
 
diff --git a/core/modules/file/tests/src/Kernel/Views/ExtensionViewsFieldTest.php b/core/modules/file/tests/src/Kernel/Views/ExtensionViewsFieldTest.php
index d0344df2eea4..32b07cd0d43f 100644
--- a/core/modules/file/tests/src/Kernel/Views/ExtensionViewsFieldTest.php
+++ b/core/modules/file/tests/src/Kernel/Views/ExtensionViewsFieldTest.php
@@ -66,7 +66,7 @@ protected function setUp($import_test_views = TRUE): void {
   /**
    * Tests file extension views field handler extension_detect_tar option.
    */
-  public function testFileExtensionTarOption() {
+  public function testFileExtensionTarOption(): void {
     /** @var \Drupal\Core\Render\RendererInterface $renderer */
     $renderer = \Drupal::service('renderer');
 
diff --git a/core/modules/file/tests/src/Kernel/Views/FileViewsFieldAccessTest.php b/core/modules/file/tests/src/Kernel/Views/FileViewsFieldAccessTest.php
index e6ae3adc5665..34e27896ed77 100644
--- a/core/modules/file/tests/src/Kernel/Views/FileViewsFieldAccessTest.php
+++ b/core/modules/file/tests/src/Kernel/Views/FileViewsFieldAccessTest.php
@@ -33,7 +33,7 @@ protected function setUp($import_test_views = TRUE): void {
   /**
    * Check access for file fields.
    */
-  public function testFileFields() {
+  public function testFileFields(): void {
     ConfigurableLanguage::create([
       'id' => 'fr',
       'label' => 'French',
diff --git a/core/modules/file/tests/src/Unit/Plugin/migrate/field/d6/FileFieldTest.php b/core/modules/file/tests/src/Unit/Plugin/migrate/field/d6/FileFieldTest.php
index 0e9017cab235..c1fd7f58c2a7 100644
--- a/core/modules/file/tests/src/Unit/Plugin/migrate/field/d6/FileFieldTest.php
+++ b/core/modules/file/tests/src/Unit/Plugin/migrate/field/d6/FileFieldTest.php
@@ -52,7 +52,7 @@ protected function setUp(): void {
   /**
    * @covers ::defineValueProcessPipeline
    */
-  public function testDefineValueProcessPipeline($method = 'defineValueProcessPipeline') {
+  public function testDefineValueProcessPipeline($method = 'defineValueProcessPipeline'): void {
     $this->plugin->$method($this->migration, 'field_name', []);
 
     $expected = [
@@ -77,7 +77,7 @@ public static function getFieldTypeProvider() {
    * @covers ::getFieldType
    * @dataProvider getFieldTypeProvider
    */
-  public function testGetFieldType($expected_type, $widget_type, array $settings = []) {
+  public function testGetFieldType($expected_type, $widget_type, array $settings = []): void {
     $row = new Row();
     $row->setSourceProperty('widget_type', $widget_type);
     $row->setSourceProperty('global_settings', $settings);
diff --git a/core/modules/file/tests/src/Unit/Plugin/migrate/field/d7/FileFieldTest.php b/core/modules/file/tests/src/Unit/Plugin/migrate/field/d7/FileFieldTest.php
index df8fc52a13c5..b5517b4cd82a 100644
--- a/core/modules/file/tests/src/Unit/Plugin/migrate/field/d7/FileFieldTest.php
+++ b/core/modules/file/tests/src/Unit/Plugin/migrate/field/d7/FileFieldTest.php
@@ -52,7 +52,7 @@ protected function setUp(): void {
   /**
    * @covers ::defineValueProcessPipeline
    */
-  public function testDefineValueProcessPipeline($method = 'defineValueProcessPipeline') {
+  public function testDefineValueProcessPipeline($method = 'defineValueProcessPipeline'): void {
     $this->plugin->$method($this->migration, 'field_name', []);
 
     $expected = [
@@ -82,7 +82,7 @@ public static function getFieldTypeProvider() {
    * @covers ::getFieldType
    * @dataProvider getFieldTypeProvider
    */
-  public function testGetFieldType($expected_type, $widget_type, array $settings = []) {
+  public function testGetFieldType($expected_type, $widget_type, array $settings = []): void {
     $row = new Row();
     $row->setSourceProperty('widget_type', $widget_type);
     $row->setSourceProperty('global_settings', $settings);
diff --git a/core/modules/file/tests/src/Unit/Plugin/migrate/process/d6/FieldFileTest.php b/core/modules/file/tests/src/Unit/Plugin/migrate/process/d6/FieldFileTest.php
index be96d280e92d..37c1c008b971 100644
--- a/core/modules/file/tests/src/Unit/Plugin/migrate/process/d6/FieldFileTest.php
+++ b/core/modules/file/tests/src/Unit/Plugin/migrate/process/d6/FieldFileTest.php
@@ -19,7 +19,7 @@ class FieldFileTest extends UnitTestCase {
   /**
    * Tests that alt and title attributes are included in transformed values.
    */
-  public function testTransformAltTitle() {
+  public function testTransformAltTitle(): void {
     $executable = $this->prophesize(MigrateExecutableInterface::class)->reveal();
     $row = $this->prophesize(Row::class)->reveal();
     $migration = $this->prophesize(MigrationInterface::class)->reveal();
diff --git a/core/modules/file/tests/src/Unit/Plugin/migrate/process/d6/FileUriTest.php b/core/modules/file/tests/src/Unit/Plugin/migrate/process/d6/FileUriTest.php
index a984e42424c1..157633388831 100644
--- a/core/modules/file/tests/src/Unit/Plugin/migrate/process/d6/FileUriTest.php
+++ b/core/modules/file/tests/src/Unit/Plugin/migrate/process/d6/FileUriTest.php
@@ -19,7 +19,7 @@ class FileUriTest extends MigrateTestCase {
     'id' => 'test',
   ];
 
-  public function testPublic() {
+  public function testPublic(): void {
     $value = [
       'sites/default/files/foo.jpg',
       'sites/default/files',
@@ -29,7 +29,7 @@ public function testPublic() {
     $this->assertEquals('public://foo.jpg', $this->doTransform($value));
   }
 
-  public function testPublicUnknownBasePath() {
+  public function testPublicUnknownBasePath(): void {
     $value = [
       '/path/to/public/files/foo.jpg',
       'sites/default/files',
@@ -39,7 +39,7 @@ public function testPublicUnknownBasePath() {
     $this->assertEquals('public://path/to/public/files/foo.jpg', $this->doTransform($value));
   }
 
-  public function testPrivate() {
+  public function testPrivate(): void {
     $value = [
       'sites/default/files/baz.gif',
       'sites/default/files',
@@ -49,7 +49,7 @@ public function testPrivate() {
     $this->assertEquals('private://baz.gif', $this->doTransform($value));
   }
 
-  public function testPrivateUnknownBasePath() {
+  public function testPrivateUnknownBasePath(): void {
     $value = [
       '/path/to/private/files/baz.gif',
       'sites/default/files',
@@ -59,7 +59,7 @@ public function testPrivateUnknownBasePath() {
     $this->assertEquals('private://path/to/private/files/baz.gif', $this->doTransform($value));
   }
 
-  public function testTemporary() {
+  public function testTemporary(): void {
     $value = [
       '/tmp/bar.png',
       'sites/default/files',
diff --git a/core/modules/file/tests/src/Unit/SanitizeNameTest.php b/core/modules/file/tests/src/Unit/SanitizeNameTest.php
index a2c4d7e55da3..cf2b5f17c6e3 100644
--- a/core/modules/file/tests/src/Unit/SanitizeNameTest.php
+++ b/core/modules/file/tests/src/Unit/SanitizeNameTest.php
@@ -43,7 +43,7 @@ class SanitizeNameTest extends UnitTestCase {
    * @covers \Drupal\file\EventSubscriber\FileEventSubscriber::sanitizeFilename
    * @covers \Drupal\Core\File\Event\FileUploadSanitizeNameEvent::__construct
    */
-  public function testFileNameTransliteration($original, $expected, array $options, $language_id = 'en') {
+  public function testFileNameTransliteration($original, $expected, array $options, $language_id = 'en'): void {
     $sanitization_options = [
       'transliterate' => $options[0],
       'replacement_character' => $options[1],
diff --git a/core/modules/filter/tests/src/Functional/FilterAdminTest.php b/core/modules/filter/tests/src/Functional/FilterAdminTest.php
index 9029ee313c1c..e35db530f0c3 100644
--- a/core/modules/filter/tests/src/Functional/FilterAdminTest.php
+++ b/core/modules/filter/tests/src/Functional/FilterAdminTest.php
@@ -128,7 +128,7 @@ protected function setUp(): void {
   /**
    * Tests the format administration functionality.
    */
-  public function testFormatAdmin() {
+  public function testFormatAdmin(): void {
     // Add text format.
     $this->drupalGet('admin/config/content/formats');
     $this->clickLink('Add text format');
@@ -197,7 +197,7 @@ public function testFormatAdmin() {
   /**
    * Tests filter administration functionality.
    */
-  public function testFilterAdmin() {
+  public function testFilterAdmin(): void {
     $first_filter = 'filter_autop';
     $second_filter = 'filter_url';
 
@@ -375,7 +375,7 @@ public function testFilterAdmin() {
   /**
    * Tests the URL filter settings form is properly validated.
    */
-  public function testUrlFilterAdmin() {
+  public function testUrlFilterAdmin(): void {
     // The form does not save with an invalid filter URL length.
     $edit = [
       'filters[filter_url][settings][filter_url_length]' => $this->randomMachineName(4),
@@ -388,7 +388,7 @@ public function testUrlFilterAdmin() {
   /**
    * Tests whether filter tips page is not HTML escaped.
    */
-  public function testFilterTipHtmlEscape() {
+  public function testFilterTipHtmlEscape(): void {
     $this->drupalLogin($this->adminUser);
     global $base_url;
 
@@ -413,7 +413,7 @@ public function testFilterTipHtmlEscape() {
   /**
    * Tests whether a field using a disabled format is rendered.
    */
-  public function testDisabledFormat() {
+  public function testDisabledFormat(): void {
     // Create a node type and add a standard body field.
     $node_type = NodeType::create([
       'type' => $this->randomMachineName(),
diff --git a/core/modules/filter/tests/src/Functional/FilterDefaultFormatTest.php b/core/modules/filter/tests/src/Functional/FilterDefaultFormatTest.php
index cd8f3432e274..7d55563b04ec 100644
--- a/core/modules/filter/tests/src/Functional/FilterDefaultFormatTest.php
+++ b/core/modules/filter/tests/src/Functional/FilterDefaultFormatTest.php
@@ -29,7 +29,7 @@ class FilterDefaultFormatTest extends BrowserTestBase {
   /**
    * Tests if the default text format is accessible to users.
    */
-  public function testDefaultTextFormats() {
+  public function testDefaultTextFormats(): void {
     // Create two text formats, and two users. The first user has access to
     // both formats, but the second user only has access to the second one.
     $admin_user = $this->drupalCreateUser(['administer filters']);
diff --git a/core/modules/filter/tests/src/Functional/FilterFormTest.php b/core/modules/filter/tests/src/Functional/FilterFormTest.php
index 1ca8a35cf9a7..051cb828d327 100644
--- a/core/modules/filter/tests/src/Functional/FilterFormTest.php
+++ b/core/modules/filter/tests/src/Functional/FilterFormTest.php
@@ -70,7 +70,7 @@ protected function setUp(): void {
   /**
    * Tests various different configurations of the 'text_format' element.
    */
-  public function testFilterForm() {
+  public function testFilterForm(): void {
     $this->doFilterFormTestAsAdmin();
     $this->doFilterFormTestAsNonAdmin();
     // Ensure that enabling modules which provide filter plugins behaves
diff --git a/core/modules/filter/tests/src/Functional/FilterFormatAccessTest.php b/core/modules/filter/tests/src/Functional/FilterFormatAccessTest.php
index c1a307606609..7b69235cfcdd 100644
--- a/core/modules/filter/tests/src/Functional/FilterFormatAccessTest.php
+++ b/core/modules/filter/tests/src/Functional/FilterFormatAccessTest.php
@@ -130,7 +130,7 @@ protected function setUp(): void {
   /**
    * Tests the Filter format access permissions functionality.
    */
-  public function testFormatPermissions() {
+  public function testFormatPermissions(): void {
     // Make sure that a regular user only has access to the text formats for
     // which they were granted access.
     $fallback_format = FilterFormat::load(filter_fallback_format());
@@ -186,7 +186,7 @@ public function testFormatPermissions() {
   /**
    * Tests if text format is available to a role.
    */
-  public function testFormatRoles() {
+  public function testFormatRoles(): void {
     // Get the role ID assigned to the regular user.
     $roles = $this->webUser->getRoles(TRUE);
     $rid = $roles[0];
@@ -218,7 +218,7 @@ public function testFormatRoles() {
    * be edited by administrators only, but that the administrator is forced to
    * choose a new format before saving the page.
    */
-  public function testFormatWidgetPermissions() {
+  public function testFormatWidgetPermissions(): void {
     $body_value_key = 'body[0][value]';
     $body_format_key = 'body[0][format]';
 
diff --git a/core/modules/filter/tests/src/Functional/FilterHooksTest.php b/core/modules/filter/tests/src/Functional/FilterHooksTest.php
index 7c64b13e7a16..85a64efcf5d4 100644
--- a/core/modules/filter/tests/src/Functional/FilterHooksTest.php
+++ b/core/modules/filter/tests/src/Functional/FilterHooksTest.php
@@ -32,7 +32,7 @@ class FilterHooksTest extends BrowserTestBase {
    * Tests that hooks run correctly on creating, editing, and deleting a text
    * format.
    */
-  public function testFilterHooks() {
+  public function testFilterHooks(): void {
     // Create content type, with underscores.
     $type_name = 'test_' . $this->randomMachineName();
     $type = $this->drupalCreateContentType(['name' => $type_name, 'type' => $type_name]);
diff --git a/core/modules/filter/tests/src/Functional/FilterHtmlImageSecureTest.php b/core/modules/filter/tests/src/Functional/FilterHtmlImageSecureTest.php
index 75011a108ccf..d62be2f78603 100644
--- a/core/modules/filter/tests/src/Functional/FilterHtmlImageSecureTest.php
+++ b/core/modules/filter/tests/src/Functional/FilterHtmlImageSecureTest.php
@@ -78,7 +78,7 @@ protected function setUp(): void {
   /**
    * Tests removal of images having a non-local source.
    */
-  public function testImageSource() {
+  public function testImageSource(): void {
     global $base_url;
 
     $node = $this->drupalCreateNode();
diff --git a/core/modules/filter/tests/src/Functional/FilterSecurityTest.php b/core/modules/filter/tests/src/Functional/FilterSecurityTest.php
index 6832912ade53..74cc2872df7f 100644
--- a/core/modules/filter/tests/src/Functional/FilterSecurityTest.php
+++ b/core/modules/filter/tests/src/Functional/FilterSecurityTest.php
@@ -63,7 +63,7 @@ protected function setUp(): void {
    * Tests that filtered content is emptied when an actively used filter module
    * is disabled.
    */
-  public function testDisableFilterModule() {
+  public function testDisableFilterModule(): void {
     // Create a new node.
     $node = $this->drupalCreateNode(['promote' => 1]);
     $body_raw = $node->body->value;
@@ -95,7 +95,7 @@ public function testDisableFilterModule() {
   /**
    * Tests that security filters are enforced even when marked to be skipped.
    */
-  public function testSkipSecurityFilters() {
+  public function testSkipSecurityFilters(): void {
     $text = "Text with some disallowed tags: <script />, <p><object>unicorn</object></p>, <i><table></i>.";
     $expected_filtered_text = "Text with some disallowed tags: , <p>unicorn</p>, .";
     $this->assertSame($expected_filtered_text, (string) check_markup($text, 'filtered_html', '', []), 'Expected filter result.');
diff --git a/core/modules/filter/tests/src/Kernel/FilterAPITest.php b/core/modules/filter/tests/src/Kernel/FilterAPITest.php
index bbde9ae5682e..6dde2022fd93 100644
--- a/core/modules/filter/tests/src/Kernel/FilterAPITest.php
+++ b/core/modules/filter/tests/src/Kernel/FilterAPITest.php
@@ -35,7 +35,7 @@ protected function setUp(): void {
   /**
    * Tests that the filter order is respected.
    */
-  public function testCheckMarkupFilterOrder() {
+  public function testCheckMarkupFilterOrder(): void {
     // Create crazy HTML format.
     $crazy_format = FilterFormat::create([
       'format' => 'crazy',
@@ -66,7 +66,7 @@ public function testCheckMarkupFilterOrder() {
   /**
    * Tests the ability to apply only a subset of filters.
    */
-  public function testCheckMarkupFilterSubset() {
+  public function testCheckMarkupFilterSubset(): void {
     $text = "Text with <marquee>evil content and</marquee> a URL: https://www.drupal.org!";
     $expected_filtered_text = "Text with evil content and a URL: <a href=\"https://www.drupal.org\">https://www.drupal.org</a>!";
     $expected_filter_text_without_html_generators = "Text with evil content and a URL: https://www.drupal.org!";
@@ -89,7 +89,7 @@ public function testCheckMarkupFilterSubset() {
    * @covers \Drupal\filter\Entity\FilterFormat::getHtmlRestrictions
    * @covers \Drupal\filter\Entity\FilterFormat::getFilterTypes
    */
-  public function testFilterFormatAPI() {
+  public function testFilterFormatAPI(): void {
     // Test on filtered_html.
     $filtered_html_format = FilterFormat::load('filtered_html');
     $this->assertSame(
@@ -247,7 +247,7 @@ public function testFilterFormatAPI() {
    * #lazy_builder callbacks.
    * This test focuses solely on those advanced features.
    */
-  public function testProcessedTextElement() {
+  public function testProcessedTextElement(): void {
     FilterFormat::create([
       'format' => 'element_test',
       'name' => 'processed_text element test format',
@@ -325,7 +325,7 @@ public function testProcessedTextElement() {
   /**
    * Tests the function of the typed data type.
    */
-  public function testTypedDataAPI() {
+  public function testTypedDataAPI(): void {
     $definition = DataDefinition::create('filter_format');
     $data = \Drupal::typedDataManager()->create($definition);
 
@@ -396,7 +396,7 @@ public function testTypedDataAPI() {
   /**
    * Tests that FilterFormat::preSave() only saves customized plugins.
    */
-  public function testFilterFormatPreSave() {
+  public function testFilterFormatPreSave(): void {
     /** @var \Drupal\filter\FilterFormatInterface $crazy_format */
     $crazy_format = FilterFormat::create([
       'format' => 'crazy',
@@ -469,7 +469,7 @@ public function assertFilterFormatViolation(ConstraintViolationListInterface $vi
    * @see \Drupal\filter\Entity\FilterFormat::onDependencyRemoval()
    * @see filter_system_info_alter()
    */
-  public function testDependencyRemoval() {
+  public function testDependencyRemoval(): void {
     $this->installSchema('user', ['users_data']);
     $filter_format = FilterFormat::load('filtered_html');
 
@@ -512,7 +512,7 @@ public function testDependencyRemoval() {
   /**
    * Tests that format entities are serialized without their plugin collection.
    */
-  public function testSleep() {
+  public function testSleep(): void {
     $filter_format = FilterFormat::load('filtered_html');
 
     $this->assertNull($filter_format->get('filterCollection'));
diff --git a/core/modules/filter/tests/src/Kernel/FilterCaptionTwigDebugTest.php b/core/modules/filter/tests/src/Kernel/FilterCaptionTwigDebugTest.php
index ed8874fe1293..4bdce6be7620 100644
--- a/core/modules/filter/tests/src/Kernel/FilterCaptionTwigDebugTest.php
+++ b/core/modules/filter/tests/src/Kernel/FilterCaptionTwigDebugTest.php
@@ -35,7 +35,7 @@ public function register(ContainerBuilder $container) {
   /**
    * Tests the caption filter with Twig debugging on.
    */
-  public function testCaptionFilter() {
+  public function testCaptionFilter(): void {
     $manager = $this->container->get('plugin.manager.filter');
     $bag = new FilterPluginCollection($manager, []);
     $filter = $bag->get('filter_caption');
diff --git a/core/modules/filter/tests/src/Kernel/FilterCrudTest.php b/core/modules/filter/tests/src/Kernel/FilterCrudTest.php
index 12042e97bbb6..67a91100b06f 100644
--- a/core/modules/filter/tests/src/Kernel/FilterCrudTest.php
+++ b/core/modules/filter/tests/src/Kernel/FilterCrudTest.php
@@ -24,7 +24,7 @@ class FilterCrudTest extends KernelTestBase {
   /**
    * Tests CRUD operations for text formats and filters.
    */
-  public function testTextFormatCrud() {
+  public function testTextFormatCrud(): void {
     // Add a text format with minimum data only.
     $format = FilterFormat::create([
       'format' => 'empty_format',
@@ -75,7 +75,7 @@ public function testTextFormatCrud() {
   /**
    * Tests disabling the fallback text format.
    */
-  public function testDisableFallbackFormat() {
+  public function testDisableFallbackFormat(): void {
     $this->installConfig(['filter']);
     $message = '\LogicException with message "The fallback text format \'plain_text\' cannot be disabled." was thrown.';
     try {
diff --git a/core/modules/filter/tests/src/Kernel/FilterDefaultConfigTest.php b/core/modules/filter/tests/src/Kernel/FilterDefaultConfigTest.php
index 8423747fcdab..6ef4a3307ef7 100644
--- a/core/modules/filter/tests/src/Kernel/FilterDefaultConfigTest.php
+++ b/core/modules/filter/tests/src/Kernel/FilterDefaultConfigTest.php
@@ -35,7 +35,7 @@ protected function setUp(): void {
   /**
    * Tests installation of default formats.
    */
-  public function testInstallation() {
+  public function testInstallation(): void {
     // Verify that the format was installed correctly.
     $format = FilterFormat::load('filter_test');
     $this->assertTrue((bool) $format);
@@ -70,7 +70,7 @@ public function testInstallation() {
   /**
    * Tests that changes to FilterFormat::$roles do not have an effect.
    */
-  public function testUpdateRoles() {
+  public function testUpdateRoles(): void {
     // Verify role permissions declared in default config.
     $format = FilterFormat::load('filter_test');
     $this->assertEquals([RoleInterface::ANONYMOUS_ID, RoleInterface::AUTHENTICATED_ID], array_keys(filter_get_roles_by_format($format)));
diff --git a/core/modules/filter/tests/src/Kernel/FilterKernelTest.php b/core/modules/filter/tests/src/Kernel/FilterKernelTest.php
index 619952a9f757..7aa392426992 100644
--- a/core/modules/filter/tests/src/Kernel/FilterKernelTest.php
+++ b/core/modules/filter/tests/src/Kernel/FilterKernelTest.php
@@ -47,7 +47,7 @@ protected function setUp(): void {
   /**
    * Tests the align filter.
    */
-  public function testAlignFilter() {
+  public function testAlignFilter(): void {
     $filter = $this->filters['filter_align'];
 
     $test = function ($input) use ($filter) {
@@ -102,7 +102,7 @@ public function testAlignFilter() {
   /**
    * Tests the caption filter.
    */
-  public function testCaptionFilter() {
+  public function testCaptionFilter(): void {
     /** @var \Drupal\Core\Render\RendererInterface $renderer */
     $renderer = \Drupal::service('renderer');
     $filter = $this->filters['filter_caption'];
@@ -330,7 +330,7 @@ public function testCaptionFilter() {
   /**
    * Tests the combination of the align and caption filters.
    */
-  public function testAlignAndCaptionFilters() {
+  public function testAlignAndCaptionFilters(): void {
     /** @var \Drupal\Core\Render\RendererInterface $renderer */
     $renderer = \Drupal::service('renderer');
     $align_filter = $this->filters['filter_align'];
@@ -405,7 +405,7 @@ public function testAlignAndCaptionFilters() {
   /**
    * Tests the line break filter.
    */
-  public function testLineBreakFilter() {
+  public function testLineBreakFilter(): void {
     // Get FilterAutoP object.
     $filter = $this->filters['filter_autop'];
 
@@ -548,7 +548,7 @@ public function testLineBreakFilterTwigDebug(): void {
    * @todo Class, id, name and xmlns should be added to the list of forbidden
    *   attributes, or, better yet, use an allowed attribute list.
    */
-  public function testHtmlFilter() {
+  public function testHtmlFilter(): void {
     // Get FilterHtml object.
     $filter = $this->filters['filter_html'];
     $filter->setConfiguration([
@@ -648,7 +648,7 @@ public function testHtmlFilter() {
   /**
    * Tests the spam deterrent.
    */
-  public function testNoFollowFilter() {
+  public function testNoFollowFilter(): void {
     // Get FilterHtml object.
     $filter = $this->filters['filter_html'];
     $filter->setConfiguration([
@@ -681,7 +681,7 @@ public function testNoFollowFilter() {
   /**
    * Tests the HTML escaping filter.
    */
-  public function testHtmlEscapeFilter() {
+  public function testHtmlEscapeFilter(): void {
     // Get FilterHtmlEscape object.
     $filter = $this->filters['filter_html_escape'];
 
@@ -698,7 +698,7 @@ public function testHtmlEscapeFilter() {
   /**
    * Tests the URL filter.
    */
-  public function testUrlFilter() {
+  public function testUrlFilter(): void {
     // Get FilterUrl object.
     $filter = $this->filters['filter_url'];
     $filter->setConfiguration([
@@ -1028,7 +1028,7 @@ public function assertFilteredString(FilterInterface $filter, array $tests): voi
    * - Mix of absolute and partial URLs, and email addresses in one content.
    * - Input that exceeds PCRE backtracking limit.
    */
-  public function testUrlFilterContent() {
+  public function testUrlFilterContent(): void {
     // Get FilterUrl object.
     $filter = $this->filters['filter_url'];
     $filter->setConfiguration([
@@ -1067,7 +1067,7 @@ public function testUrlFilterContent() {
    *
    * @todo This test could really use some validity checking function.
    */
-  public function testHtmlCorrectorFilter() {
+  public function testHtmlCorrectorFilter(): void {
     // Tag closing.
     $f = Html::normalize('<p>text');
     $this->assertEquals('<p>text</p>', $f, 'HTML corrector -- tag closing at the end of input.');
diff --git a/core/modules/filter/tests/src/Kernel/FilterNoFormatTest.php b/core/modules/filter/tests/src/Kernel/FilterNoFormatTest.php
index 4d9ceb675702..164fe056ce26 100644
--- a/core/modules/filter/tests/src/Kernel/FilterNoFormatTest.php
+++ b/core/modules/filter/tests/src/Kernel/FilterNoFormatTest.php
@@ -24,7 +24,7 @@ class FilterNoFormatTest extends KernelTestBase {
    * Tests if text with no format is filtered the same way as text in the
    * fallback format.
    */
-  public function testCheckMarkupNoFormat() {
+  public function testCheckMarkupNoFormat(): void {
     $this->installConfig(['filter']);
 
     // Create some text. Include some HTML and line breaks, so we get a good
diff --git a/core/modules/filter/tests/src/Kernel/Migrate/d6/FilterFormatPermissionTest.php b/core/modules/filter/tests/src/Kernel/Migrate/d6/FilterFormatPermissionTest.php
index 160ed43c5665..2deeed64cd3b 100644
--- a/core/modules/filter/tests/src/Kernel/Migrate/d6/FilterFormatPermissionTest.php
+++ b/core/modules/filter/tests/src/Kernel/Migrate/d6/FilterFormatPermissionTest.php
@@ -22,7 +22,7 @@ class FilterFormatPermissionTest extends MigrateDrupalTestBase {
    *
    * @covers ::__construct
    */
-  public function testConfigurableFilterFormat() {
+  public function testConfigurableFilterFormat(): void {
     $migration = Migration::create($this->container, [], 'custom_migration', []);
     $filterFormatPermissionMigration = FilterFormatPermission::create($this->container, ['migration' => 'custom_filter_format'], 'custom_filter_format', [], $migration);
     $reflected_config = new \ReflectionProperty($filterFormatPermissionMigration, 'configuration');
diff --git a/core/modules/filter/tests/src/Kernel/Migrate/d6/MigrateFilterFormatTest.php b/core/modules/filter/tests/src/Kernel/Migrate/d6/MigrateFilterFormatTest.php
index 211a6b27be04..89e5702e114c 100644
--- a/core/modules/filter/tests/src/Kernel/Migrate/d6/MigrateFilterFormatTest.php
+++ b/core/modules/filter/tests/src/Kernel/Migrate/d6/MigrateFilterFormatTest.php
@@ -26,7 +26,7 @@ protected function setUp(): void {
   /**
    * Tests the Drupal 6 filter format to Drupal 8 migration.
    */
-  public function testFilterFormat() {
+  public function testFilterFormat(): void {
     $filter_format = FilterFormat::load('filtered_html');
 
     // Check filter status.
diff --git a/core/modules/filter/tests/src/Kernel/Migrate/d7/MigrateFilterFormatTest.php b/core/modules/filter/tests/src/Kernel/Migrate/d7/MigrateFilterFormatTest.php
index d9d78ea92584..40a17534982f 100644
--- a/core/modules/filter/tests/src/Kernel/Migrate/d7/MigrateFilterFormatTest.php
+++ b/core/modules/filter/tests/src/Kernel/Migrate/d7/MigrateFilterFormatTest.php
@@ -89,7 +89,7 @@ protected function assertEntity(string $id, string $label, array $enabled_filter
   /**
    * Tests the Drupal 7 filter format to Drupal 8 migration.
    */
-  public function testFilterFormat() {
+  public function testFilterFormat(): void {
     $this->assertEntity('custom_text_format', 'Custom Text format', ['filter_autop' => 0, 'filter_html' => -10], 0, TRUE);
     $this->assertEntity('filtered_html', 'Filtered HTML', ['filter_autop' => 2, 'filter_html' => 1, 'filter_htmlcorrector' => 10, 'filter_url' => 0], 0, TRUE);
     $this->assertEntity('full_html', 'Full HTML', ['filter_autop' => 1, 'filter_htmlcorrector' => 10, 'filter_url' => 0], 1, TRUE);
diff --git a/core/modules/filter/tests/src/Kernel/Migrate/d7/MigrateFilterSettingsTest.php b/core/modules/filter/tests/src/Kernel/Migrate/d7/MigrateFilterSettingsTest.php
index 89d7107b1936..3a7c17cf6140 100644
--- a/core/modules/filter/tests/src/Kernel/Migrate/d7/MigrateFilterSettingsTest.php
+++ b/core/modules/filter/tests/src/Kernel/Migrate/d7/MigrateFilterSettingsTest.php
@@ -27,7 +27,7 @@ protected function setUp(): void {
   /**
    * Tests migration of Filter variables to configuration.
    */
-  public function testFilterSettings() {
+  public function testFilterSettings(): void {
     $this->assertSame('plain_text', $this->config('filter.settings')->get('fallback_format'));
   }
 
diff --git a/core/modules/filter/tests/src/Kernel/Plugin/migrate/process/FilterIdTest.php b/core/modules/filter/tests/src/Kernel/Plugin/migrate/process/FilterIdTest.php
index fadad6b883c9..9c18b7ce7c07 100644
--- a/core/modules/filter/tests/src/Kernel/Plugin/migrate/process/FilterIdTest.php
+++ b/core/modules/filter/tests/src/Kernel/Plugin/migrate/process/FilterIdTest.php
@@ -56,7 +56,7 @@ protected function setUp(): void {
    *
    * @covers ::transform
    */
-  public function testTransform($value, $expected_value, $invalid_id = NULL, $stop_pipeline = FALSE) {
+  public function testTransform($value, $expected_value, $invalid_id = NULL, $stop_pipeline = FALSE): void {
     $configuration = [
       'bypass' => TRUE,
       'map' => [
diff --git a/core/modules/filter/tests/src/Kernel/Plugin/migrate/process/FilterSettingsTest.php b/core/modules/filter/tests/src/Kernel/Plugin/migrate/process/FilterSettingsTest.php
index 131583693ae1..cda81aa5335d 100644
--- a/core/modules/filter/tests/src/Kernel/Plugin/migrate/process/FilterSettingsTest.php
+++ b/core/modules/filter/tests/src/Kernel/Plugin/migrate/process/FilterSettingsTest.php
@@ -24,7 +24,7 @@ class FilterSettingsTest extends MigrateTestCase {
    * @dataProvider dataProvider
    * @covers ::transform
    */
-  public function testTransform($value, $destination_id, $expected_value) {
+  public function testTransform($value, $destination_id, $expected_value): void {
     $migration = $this->createMock(MigrationInterface::class);
     $plugin = new FilterSettings([], 'filter_settings', []);
 
diff --git a/core/modules/filter/tests/src/Kernel/TextFormatElementFormTest.php b/core/modules/filter/tests/src/Kernel/TextFormatElementFormTest.php
index 3f412606c3ab..43f6105a578c 100644
--- a/core/modules/filter/tests/src/Kernel/TextFormatElementFormTest.php
+++ b/core/modules/filter/tests/src/Kernel/TextFormatElementFormTest.php
@@ -119,7 +119,7 @@ public function validateForm(array &$form, FormStateInterface $form_state) {}
   /**
    * Tests that values are returned.
    */
-  public function testTextFormatElement() {
+  public function testTextFormatElement(): void {
     /** @var \Drupal\Core\Form\FormBuilder $form_builder */
     $form_builder = $this->container->get('form_builder');
     $form = $form_builder->getForm($this);
diff --git a/core/modules/filter/tests/src/Unit/FilterHtmlTest.php b/core/modules/filter/tests/src/Unit/FilterHtmlTest.php
index 7733948534cf..5566b3d683bb 100644
--- a/core/modules/filter/tests/src/Unit/FilterHtmlTest.php
+++ b/core/modules/filter/tests/src/Unit/FilterHtmlTest.php
@@ -42,7 +42,7 @@ protected function setUp(): void {
    * @param string $expected
    *   The expected output string.
    */
-  public function testFilterAttributes($html, $expected) {
+  public function testFilterAttributes($html, $expected): void {
     $this->assertSame($expected, $this->filter->filterAttributes($html));
   }
 
@@ -82,7 +82,7 @@ public static function providerFilterAttributes() {
   /**
    * @covers ::setConfiguration
    */
-  public function testSetConfiguration() {
+  public function testSetConfiguration(): void {
     $configuration['settings'] = [
       // New lines and spaces are replaced with a single space.
       'allowed_html' => "<a>  <br>\r\n  <p>",
diff --git a/core/modules/filter/tests/src/Unit/FilterUninstallValidatorTest.php b/core/modules/filter/tests/src/Unit/FilterUninstallValidatorTest.php
index 85fcbe318486..e79c6d23b1bc 100644
--- a/core/modules/filter/tests/src/Unit/FilterUninstallValidatorTest.php
+++ b/core/modules/filter/tests/src/Unit/FilterUninstallValidatorTest.php
@@ -34,7 +34,7 @@ protected function setUp(): void {
   /**
    * @covers ::validate
    */
-  public function testValidateNoPlugins() {
+  public function testValidateNoPlugins(): void {
     $this->filterUninstallValidator->expects($this->once())
       ->method('getFilterDefinitionsByProvider')
       ->willReturn([]);
@@ -50,7 +50,7 @@ public function testValidateNoPlugins() {
   /**
    * @covers ::validate
    */
-  public function testValidateNoFormats() {
+  public function testValidateNoFormats(): void {
     $this->filterUninstallValidator->expects($this->once())
       ->method('getFilterDefinitionsByProvider')
       ->willReturn([
@@ -72,7 +72,7 @@ public function testValidateNoFormats() {
   /**
    * @covers ::validate
    */
-  public function testValidateNoMatchingFormats() {
+  public function testValidateNoMatchingFormats(): void {
     $this->filterUninstallValidator->expects($this->once())
       ->method('getFilterDefinitionsByProvider')
       ->willReturn([
diff --git a/core/modules/help/tests/src/Functional/ExperimentalHelpTest.php b/core/modules/help/tests/src/Functional/ExperimentalHelpTest.php
index 40436b0915c8..ff47b5aa7516 100644
--- a/core/modules/help/tests/src/Functional/ExperimentalHelpTest.php
+++ b/core/modules/help/tests/src/Functional/ExperimentalHelpTest.php
@@ -50,7 +50,7 @@ protected function setUp(): void {
   /**
    * Verifies that a warning message is displayed for experimental modules.
    */
-  public function testExperimentalHelp() {
+  public function testExperimentalHelp(): void {
     $this->drupalLogin($this->adminUser);
     $this->drupalGet('admin/help/experimental_module_test');
     $this->assertSession()->statusMessageContains('This module is experimental.', 'warning');
diff --git a/core/modules/help/tests/src/Functional/HelpBlockTest.php b/core/modules/help/tests/src/Functional/HelpBlockTest.php
index 8ab495d1c048..074629593ce8 100644
--- a/core/modules/help/tests/src/Functional/HelpBlockTest.php
+++ b/core/modules/help/tests/src/Functional/HelpBlockTest.php
@@ -46,7 +46,7 @@ protected function setUp(): void {
   /**
    * Logs in users, tests help pages.
    */
-  public function testHelp() {
+  public function testHelp(): void {
     $this->drupalGet('help_page_test/has_help');
     $this->assertSession()->pageTextContains('I have help!');
     $this->assertSession()->pageTextContains($this->helpBlock->label());
diff --git a/core/modules/help/tests/src/Functional/HelpPageOrderTest.php b/core/modules/help/tests/src/Functional/HelpPageOrderTest.php
index 972428c2e3a3..3013d5671c13 100644
--- a/core/modules/help/tests/src/Functional/HelpPageOrderTest.php
+++ b/core/modules/help/tests/src/Functional/HelpPageOrderTest.php
@@ -51,7 +51,7 @@ protected function setUp(): void {
   /**
    * Tests the order of the help page.
    */
-  public function testHelp() {
+  public function testHelp(): void {
     $pos = 0;
     $this->drupalGet('admin/help');
     $page_text = $this->getTextContent();
diff --git a/core/modules/help/tests/src/Functional/HelpTest.php b/core/modules/help/tests/src/Functional/HelpTest.php
index e617c860bf2d..152ccc94b31a 100644
--- a/core/modules/help/tests/src/Functional/HelpTest.php
+++ b/core/modules/help/tests/src/Functional/HelpTest.php
@@ -66,7 +66,7 @@ protected function setUp(): void {
   /**
    * Logs in users, tests help pages.
    */
-  public function testHelp() {
+  public function testHelp(): void {
     // Log in the root user to ensure as many admin links appear as possible on
     // the module overview pages.
     $this->drupalLogin($this->drupalCreateUser([
diff --git a/core/modules/help/tests/src/Functional/HelpTopicSearchTest.php b/core/modules/help/tests/src/Functional/HelpTopicSearchTest.php
index 8b6936442069..6ea8a997891b 100644
--- a/core/modules/help/tests/src/Functional/HelpTopicSearchTest.php
+++ b/core/modules/help/tests/src/Functional/HelpTopicSearchTest.php
@@ -97,7 +97,7 @@ protected function setUp(): void {
   /**
    * Tests help topic search.
    */
-  public function testHelpSearch() {
+  public function testHelpSearch(): void {
     $german = \Drupal::languageManager()->getLanguage('de');
     $session = $this->assertSession();
 
@@ -254,7 +254,7 @@ public function testHelpSearch() {
   /**
    * Tests uninstalling the help_topics module.
    */
-  public function testUninstall() {
+  public function testUninstall(): void {
     \Drupal::service('module_installer')->uninstall(['help_topics_test']);
     // Ensure we can uninstall help_topics and use the help system without
     // breaking.
@@ -275,7 +275,7 @@ public function testUninstall() {
   /**
    * Tests uninstalling the search module.
    */
-  public function testUninstallSearch() {
+  public function testUninstallSearch(): void {
     // Ensure we can uninstall search and use the help system without
     // breaking.
     $this->drupalLogin($this->createUser([
diff --git a/core/modules/help/tests/src/Functional/HelpTopicTest.php b/core/modules/help/tests/src/Functional/HelpTopicTest.php
index 8f2e25baf9bf..d11550558242 100644
--- a/core/modules/help/tests/src/Functional/HelpTopicTest.php
+++ b/core/modules/help/tests/src/Functional/HelpTopicTest.php
@@ -96,7 +96,7 @@ protected function setUp(): void {
   /**
    * Tests the main help page and individual pages for topics.
    */
-  public function testHelp() {
+  public function testHelp(): void {
     $session = $this->assertSession();
 
     // Log in the regular user.
@@ -185,7 +185,7 @@ protected function verifyHelp($response = 200) {
   /**
    * Verifies links on various topic pages.
    */
-  public function testHelpLinks() {
+  public function testHelpLinks(): void {
     $session = $this->assertSession();
     $this->drupalLogin($this->adminUser);
 
diff --git a/core/modules/help/tests/src/Functional/HelpTopicTranslationTest.php b/core/modules/help/tests/src/Functional/HelpTopicTranslationTest.php
index 38c10e396f86..082eba8c3489 100644
--- a/core/modules/help/tests/src/Functional/HelpTopicTranslationTest.php
+++ b/core/modules/help/tests/src/Functional/HelpTopicTranslationTest.php
@@ -35,7 +35,7 @@ protected function setUp(): void {
   /**
    * Tests help topic translations.
    */
-  public function testHelpTopicTranslations() {
+  public function testHelpTopicTranslations(): void {
     $session = $this->assertSession();
 
     // Verify that help topic link is translated on admin/help.
diff --git a/core/modules/help/tests/src/Functional/HelpTopicsSyntaxTest.php b/core/modules/help/tests/src/Functional/HelpTopicsSyntaxTest.php
index dda97aeb9f0d..53a42d82628c 100644
--- a/core/modules/help/tests/src/Functional/HelpTopicsSyntaxTest.php
+++ b/core/modules/help/tests/src/Functional/HelpTopicsSyntaxTest.php
@@ -37,7 +37,7 @@ class HelpTopicsSyntaxTest extends BrowserTestBase {
   /**
    * Tests that all Core help topics can be rendered and have good syntax.
    */
-  public function testHelpTopics() {
+  public function testHelpTopics(): void {
     $this->drupalLogin($this->createUser([
       'administer modules',
       'access help pages',
diff --git a/core/modules/help/tests/src/Functional/NoHelpTest.php b/core/modules/help/tests/src/Functional/NoHelpTest.php
index 8252583f182d..17ebecb8ba08 100644
--- a/core/modules/help/tests/src/Functional/NoHelpTest.php
+++ b/core/modules/help/tests/src/Functional/NoHelpTest.php
@@ -43,7 +43,7 @@ protected function setUp(): void {
   /**
    * Ensures modules not implementing help do not appear on admin/help.
    */
-  public function testMainPageNoHelp() {
+  public function testMainPageNoHelp(): void {
     $this->drupalLogin($this->adminUser);
 
     $this->drupalGet('admin/help');
diff --git a/core/modules/help/tests/src/Kernel/HelpEmptyPageTest.php b/core/modules/help/tests/src/Kernel/HelpEmptyPageTest.php
index 7d1ba0007331..ea469b3f5749 100644
--- a/core/modules/help/tests/src/Kernel/HelpEmptyPageTest.php
+++ b/core/modules/help/tests/src/Kernel/HelpEmptyPageTest.php
@@ -33,7 +33,7 @@ public function register(ContainerBuilder $container) {
   /**
    * Ensures that no URL generator is called on a page without hook_help().
    */
-  public function testEmptyHookHelp() {
+  public function testEmptyHookHelp(): void {
     $all_modules = \Drupal::service('extension.list.module')->getList();
     $all_modules = array_filter($all_modules, function ($module) {
       // Filter contrib, hidden, already enabled modules and modules in the
diff --git a/core/modules/help/tests/src/Kernel/HelpSearchPluginTest.php b/core/modules/help/tests/src/Kernel/HelpSearchPluginTest.php
index 6da0b4a9d1fc..6a94762f42e2 100644
--- a/core/modules/help/tests/src/Kernel/HelpSearchPluginTest.php
+++ b/core/modules/help/tests/src/Kernel/HelpSearchPluginTest.php
@@ -25,7 +25,7 @@ class HelpSearchPluginTest extends KernelTestBase {
   /**
    * Tests search plugin annotation and interfaces.
    */
-  public function testAnnotation() {
+  public function testAnnotation(): void {
     /** @var \Drupal\search\SearchPluginManager $manager */
     $manager = \Drupal::service('plugin.manager.search');
     /** @var \Drupal\help\Plugin\Search\HelpSearch $plugin */
diff --git a/core/modules/help/tests/src/Unit/HelpTopicDiscoveryTest.php b/core/modules/help/tests/src/Unit/HelpTopicDiscoveryTest.php
index 7ee16b4b40a8..a9737f7d2866 100644
--- a/core/modules/help/tests/src/Unit/HelpTopicDiscoveryTest.php
+++ b/core/modules/help/tests/src/Unit/HelpTopicDiscoveryTest.php
@@ -21,7 +21,7 @@ class HelpTopicDiscoveryTest extends UnitTestCase {
   /**
    * @covers ::findAll
    */
-  public function testDiscoveryExceptionMissingLabel() {
+  public function testDiscoveryExceptionMissingLabel(): void {
     vfsStream::setup('root');
 
     vfsStream::create([
@@ -44,7 +44,7 @@ public function testDiscoveryExceptionMissingLabel() {
   /**
    * @covers ::findAll
    */
-  public function testDiscoveryExceptionInvalidYamlKey() {
+  public function testDiscoveryExceptionInvalidYamlKey(): void {
     vfsStream::setup('root');
     $topic_content = <<<EOF
 ---
@@ -72,7 +72,7 @@ public function testDiscoveryExceptionInvalidYamlKey() {
   /**
    * @covers ::findAll
    */
-  public function testDiscoveryExceptionInvalidTopLevel() {
+  public function testDiscoveryExceptionInvalidTopLevel(): void {
     vfsStream::setup('root');
     $topic_content = <<<EOF
 ---
@@ -100,7 +100,7 @@ public function testDiscoveryExceptionInvalidTopLevel() {
   /**
    * @covers ::findAll
    */
-  public function testDiscoveryExceptionInvalidRelated() {
+  public function testDiscoveryExceptionInvalidRelated(): void {
     vfsStream::setup('root');
     $topic_content = <<<EOF
 ---
@@ -128,7 +128,7 @@ public function testDiscoveryExceptionInvalidRelated() {
   /**
    * @covers ::findAll
    */
-  public function testHelpTopicsExtensionProviderSpecialCase() {
+  public function testHelpTopicsExtensionProviderSpecialCase(): void {
     vfsStream::setup('root');
     $topic_content = <<<EOF
 ---
@@ -153,7 +153,7 @@ public function testHelpTopicsExtensionProviderSpecialCase() {
   /**
    * @covers ::findAll
    */
-  public function testHelpTopicsInCore() {
+  public function testHelpTopicsInCore(): void {
     vfsStream::setup('root');
     $topic_content = <<<EOF
 ---
@@ -176,7 +176,7 @@ public function testHelpTopicsInCore() {
   /**
    * @covers ::findAll
    */
-  public function testHelpTopicsBrokenYaml() {
+  public function testHelpTopicsBrokenYaml(): void {
     vfsStream::setup('root');
     $topic_content = <<<EOF
 ---
@@ -203,7 +203,7 @@ public function testHelpTopicsBrokenYaml() {
   /**
    * @covers ::findAll
    */
-  public function testHelpTopicsDefinition() {
+  public function testHelpTopicsDefinition(): void {
     $container = new ContainerBuilder();
     $container->set('string_translation', $this->getStringTranslationStub());
     \Drupal::setContainer($container);
diff --git a/core/modules/help/tests/src/Unit/HelpTopicTwigLoaderTest.php b/core/modules/help/tests/src/Unit/HelpTopicTwigLoaderTest.php
index df47e13b930a..a271daf60560 100644
--- a/core/modules/help/tests/src/Unit/HelpTopicTwigLoaderTest.php
+++ b/core/modules/help/tests/src/Unit/HelpTopicTwigLoaderTest.php
@@ -58,7 +58,7 @@ protected function setUp(): void {
   /**
    * @covers ::__construct
    */
-  public function testConstructor() {
+  public function testConstructor(): void {
     // Verify that the module/theme directories were added in the constructor,
     // and non-existent directories were omitted.
     $paths = $this->helpLoader->getPaths(HelpTopicTwigLoader::MAIN_NAMESPACE);
@@ -70,7 +70,7 @@ public function testConstructor() {
   /**
    * @covers ::getSourceContext
    */
-  public function testGetSourceContext() {
+  public function testGetSourceContext(): void {
     $source = $this->helpLoader->getSourceContext('@' . HelpTopicTwigLoader::MAIN_NAMESPACE . '/test.topic.html.twig');
     $this->assertEquals('{% line 4 %}<h2>Test</h2>', $source->getCode());
   }
@@ -78,7 +78,7 @@ public function testGetSourceContext() {
   /**
    * @covers ::getSourceContext
    */
-  public function testGetSourceContextException() {
+  public function testGetSourceContextException(): void {
     $this->expectException(LoaderError::class);
     $this->expectExceptionMessage("Malformed YAML in help topic \"vfs://root/modules/test/help_topics/test.invalid_yaml.html.twig\":");
 
diff --git a/core/modules/help/tests/src/Unit/HelpTopicTwigTest.php b/core/modules/help/tests/src/Unit/HelpTopicTwigTest.php
index 01fef4ec5b81..7c9fd9751622 100644
--- a/core/modules/help/tests/src/Unit/HelpTopicTwigTest.php
+++ b/core/modules/help/tests/src/Unit/HelpTopicTwigTest.php
@@ -59,7 +59,7 @@ protected function setUp(): void {
    * @covers ::getBody
    * @covers ::getLabel
    */
-  public function testText() {
+  public function testText(): void {
     $this->assertEquals($this->helpTopic->getBody(),
       ['#markup' => self::PLUGIN_INFORMATION['body']]);
     $this->assertEquals($this->helpTopic->getLabel(),
@@ -71,7 +71,7 @@ public function testText() {
    * @covers ::isTopLevel
    * @covers ::getRelated
    */
-  public function testDefinition() {
+  public function testDefinition(): void {
     $this->assertEquals($this->helpTopic->getProvider(),
       self::PLUGIN_INFORMATION['provider']);
     $this->assertEquals($this->helpTopic->isTopLevel(),
@@ -85,7 +85,7 @@ public function testDefinition() {
    * @covers ::getCacheTags
    * @covers ::getCacheMaxAge
    */
-  public function testCacheInfo() {
+  public function testCacheInfo(): void {
     $this->assertEquals([], $this->helpTopic->getCacheContexts());
     $this->assertEquals(['core.extension'], $this->helpTopic->getCacheTags());
     $this->assertEquals(Cache::PERMANENT, $this->helpTopic->getCacheMaxAge());
diff --git a/core/modules/history/tests/src/Functional/HistoryTest.php b/core/modules/history/tests/src/Functional/HistoryTest.php
index e5e7a5283ef7..8a7c50ab5b71 100644
--- a/core/modules/history/tests/src/Functional/HistoryTest.php
+++ b/core/modules/history/tests/src/Functional/HistoryTest.php
@@ -106,7 +106,7 @@ protected function markNodeAsRead($node_id) {
   /**
    * Verifies that the history endpoints work.
    */
-  public function testHistory() {
+  public function testHistory(): void {
     $nid = $this->testNode->id();
 
     // Verify that previews of new entities do not create the history.
diff --git a/core/modules/history/tests/src/Kernel/Views/HistoryTimestampTest.php b/core/modules/history/tests/src/Kernel/Views/HistoryTimestampTest.php
index a6e6b1c7856c..f8af02a31bad 100644
--- a/core/modules/history/tests/src/Kernel/Views/HistoryTimestampTest.php
+++ b/core/modules/history/tests/src/Kernel/Views/HistoryTimestampTest.php
@@ -51,7 +51,7 @@ protected function setUp($import_test_views = TRUE): void {
   /**
    * Tests the handlers.
    */
-  public function testHandlers() {
+  public function testHandlers(): void {
     $nodes = [];
     $node = Node::create([
       'title' => 'n1',
diff --git a/core/modules/image/tests/src/Functional/ImageAdminStylesTest.php b/core/modules/image/tests/src/Functional/ImageAdminStylesTest.php
index 5233bc888caa..bddf7ef0634a 100644
--- a/core/modules/image/tests/src/Functional/ImageAdminStylesTest.php
+++ b/core/modules/image/tests/src/Functional/ImageAdminStylesTest.php
@@ -61,7 +61,7 @@ public function getImageCount(ImageStyleInterface $style) {
   /**
    * Tests creating an image style with a numeric name.
    */
-  public function testNumericStyleName() {
+  public function testNumericStyleName(): void {
     $style_name = rand();
     $style_label = $this->randomString();
     $edit = [
@@ -78,7 +78,7 @@ public function testNumericStyleName() {
   /**
    * General test to add a style, add/remove/edit effects to it, then delete it.
    */
-  public function testStyle() {
+  public function testStyle(): void {
     $admin_path = 'admin/config/media/image-styles';
 
     // Setup a style to be created and effects to add to it.
@@ -307,7 +307,7 @@ public function testStyle() {
   /**
    * Tests deleting a style and choosing a replacement style.
    */
-  public function testStyleReplacement() {
+  public function testStyleReplacement(): void {
     // Create a new style.
     $style_name = $this->randomMachineName(10);
     $style_label = $this->randomString();
@@ -374,7 +374,7 @@ public function testStyleReplacement() {
   /**
    * Verifies that editing an image effect does not cause it to be duplicated.
    */
-  public function testEditEffect() {
+  public function testEditEffect(): void {
     // Add a scale effect.
     $style_name = 'test_style_effect_edit';
     $this->drupalGet('admin/config/media/image-styles/add');
@@ -429,7 +429,7 @@ public function testEditEffect() {
   /**
    * Tests flush user interface.
    */
-  public function testFlushUserInterface() {
+  public function testFlushUserInterface(): void {
     $admin_path = 'admin/config/media/image-styles';
 
     // Create a new style.
@@ -461,7 +461,7 @@ public function testFlushUserInterface() {
   /**
    * Tests image style configuration import that does a delete.
    */
-  public function testConfigImport() {
+  public function testConfigImport(): void {
     // Create a new style.
     $style_name = $this->randomMachineName(10);
     $style_label = $this->randomString();
@@ -511,7 +511,7 @@ public function testConfigImport() {
   /**
    * Tests access for the image style listing.
    */
-  public function testImageStyleAccess() {
+  public function testImageStyleAccess(): void {
     $style = ImageStyle::create(['name' => 'style_foo', 'label' => $this->randomString()]);
     $style->save();
 
diff --git a/core/modules/image/tests/src/Functional/ImageDimensionsTest.php b/core/modules/image/tests/src/Functional/ImageDimensionsTest.php
index e1a58aa96b01..dbf6ee77aa20 100644
--- a/core/modules/image/tests/src/Functional/ImageDimensionsTest.php
+++ b/core/modules/image/tests/src/Functional/ImageDimensionsTest.php
@@ -38,7 +38,7 @@ class ImageDimensionsTest extends BrowserTestBase {
   /**
    * Tests styled image dimensions cumulatively.
    */
-  public function testImageDimensions() {
+  public function testImageDimensions(): void {
     $image_factory = $this->container->get('image.factory');
     // Create a working copy of the file.
     $files = $this->drupalGetTestFiles('image');
diff --git a/core/modules/image/tests/src/Functional/ImageEffect/ConvertTest.php b/core/modules/image/tests/src/Functional/ImageEffect/ConvertTest.php
index 6ca7b06955e9..ff61902c1520 100644
--- a/core/modules/image/tests/src/Functional/ImageEffect/ConvertTest.php
+++ b/core/modules/image/tests/src/Functional/ImageEffect/ConvertTest.php
@@ -28,7 +28,7 @@ class ConvertTest extends BrowserTestBase {
   /**
    * Tests that files stored in the root folder are converted properly.
    */
-  public function testConvertFileInRoot() {
+  public function testConvertFileInRoot(): void {
     // Create the test image style with a Convert effect.
     $image_style = ImageStyle::create([
       'name' => 'image_effect_test',
diff --git a/core/modules/image/tests/src/Functional/ImageFieldDefaultImagesTest.php b/core/modules/image/tests/src/Functional/ImageFieldDefaultImagesTest.php
index 6da021fdcc7b..242bb31d72fe 100644
--- a/core/modules/image/tests/src/Functional/ImageFieldDefaultImagesTest.php
+++ b/core/modules/image/tests/src/Functional/ImageFieldDefaultImagesTest.php
@@ -42,7 +42,7 @@ class ImageFieldDefaultImagesTest extends ImageFieldTestBase {
   /**
    * Tests CRUD for fields and field storages with default images.
    */
-  public function testDefaultImages() {
+  public function testDefaultImages(): void {
     $node_storage = $this->container->get('entity_type.manager')->getStorage('node');
     // Create files to use as the default images.
     $files = $this->drupalGetTestFiles('image');
@@ -260,7 +260,7 @@ public function testDefaultImages() {
   /**
    * Tests image field and field storage having an invalid default image.
    */
-  public function testInvalidDefaultImage() {
+  public function testInvalidDefaultImage(): void {
     $field_storage = FieldStorageConfig::create([
       'field_name' => $this->randomMachineName(),
       'entity_type' => 'node',
diff --git a/core/modules/image/tests/src/Functional/ImageFieldDisplayTest.php b/core/modules/image/tests/src/Functional/ImageFieldDisplayTest.php
index 78dacd79a702..e37aa3b36ae8 100644
--- a/core/modules/image/tests/src/Functional/ImageFieldDisplayTest.php
+++ b/core/modules/image/tests/src/Functional/ImageFieldDisplayTest.php
@@ -42,14 +42,14 @@ class ImageFieldDisplayTest extends ImageFieldTestBase {
   /**
    * Tests image formatters on node display for public files.
    */
-  public function testImageFieldFormattersPublic() {
+  public function testImageFieldFormattersPublic(): void {
     $this->_testImageFieldFormatters('public');
   }
 
   /**
    * Tests image formatters on node display for private files.
    */
-  public function testImageFieldFormattersPrivate() {
+  public function testImageFieldFormattersPrivate(): void {
     // Remove access content permission from anonymous users.
     user_role_change_permissions(RoleInterface::ANONYMOUS_ID, ['access content' => FALSE]);
     $this->_testImageFieldFormatters('private');
@@ -243,7 +243,7 @@ public function _testImageFieldFormatters($scheme) {
   /**
    * Tests for image field settings.
    */
-  public function testImageFieldSettings() {
+  public function testImageFieldSettings(): void {
     /** @var \Drupal\Core\Render\RendererInterface $renderer */
     $renderer = $this->container->get('renderer');
     $node_storage = $this->container->get('entity_type.manager')->getStorage('node');
@@ -477,7 +477,7 @@ public function testImageLoadingAttribute(): void {
   /**
    * Tests use of a default image with an image field.
    */
-  public function testImageFieldDefaultImage() {
+  public function testImageFieldDefaultImage(): void {
     /** @var \Drupal\Core\Render\RendererInterface $renderer */
     $renderer = $this->container->get('renderer');
 
diff --git a/core/modules/image/tests/src/Functional/ImageFieldValidateTest.php b/core/modules/image/tests/src/Functional/ImageFieldValidateTest.php
index b7f567cff4d6..32c97382d5f2 100644
--- a/core/modules/image/tests/src/Functional/ImageFieldValidateTest.php
+++ b/core/modules/image/tests/src/Functional/ImageFieldValidateTest.php
@@ -28,7 +28,7 @@ class ImageFieldValidateTest extends ImageFieldTestBase {
   /**
    * Tests image validity.
    */
-  public function testValid() {
+  public function testValid(): void {
     $file_system = $this->container->get('file_system');
     $image_files = $this->drupalGetTestFiles('image');
 
@@ -90,7 +90,7 @@ public function testValid() {
   /**
    * Tests min/max dimensions settings.
    */
-  public function testResolution() {
+  public function testResolution(): void {
     $field_names = [
       0 => $this->randomMachineName(),
       1 => $this->randomMachineName(),
@@ -165,7 +165,7 @@ public function testResolution() {
   /**
    * Tests that required alt/title fields gets validated right.
    */
-  public function testRequiredAttributes() {
+  public function testRequiredAttributes(): void {
     $field_name = $this->randomMachineName();
     $field_settings = [
       'alt_field' => 1,
@@ -222,7 +222,7 @@ public function testRequiredAttributes() {
    *
    * @dataProvider providerTestEmpty
    */
-  public function testEmpty($field_name, $required, $cardinality, $form_element_name, $expected_page_text_when_edit_access_allowed, $expected_page_text_when_edit_access_forbidden) {
+  public function testEmpty($field_name, $required, $cardinality, $form_element_name, $expected_page_text_when_edit_access_allowed, $expected_page_text_when_edit_access_forbidden): void {
     $this->createImageField($field_name, 'node', 'article', ['cardinality' => $cardinality], ['required' => $required]);
 
     // Test with field edit access allowed.
diff --git a/core/modules/image/tests/src/Functional/ImageFieldWidgetTest.php b/core/modules/image/tests/src/Functional/ImageFieldWidgetTest.php
index 976e77cde772..2bf7c652ea49 100644
--- a/core/modules/image/tests/src/Functional/ImageFieldWidgetTest.php
+++ b/core/modules/image/tests/src/Functional/ImageFieldWidgetTest.php
@@ -21,7 +21,7 @@ class ImageFieldWidgetTest extends ImageFieldTestBase {
   /**
    * Tests file widget element.
    */
-  public function testWidgetElement() {
+  public function testWidgetElement(): void {
     // Check for image widget in add/node/article page
     $field_name = $this->randomMachineName();
     $min_resolution = 50;
diff --git a/core/modules/image/tests/src/Functional/ImageOnTranslatedEntityTest.php b/core/modules/image/tests/src/Functional/ImageOnTranslatedEntityTest.php
index 52a78e2138de..407956270177 100644
--- a/core/modules/image/tests/src/Functional/ImageOnTranslatedEntityTest.php
+++ b/core/modules/image/tests/src/Functional/ImageOnTranslatedEntityTest.php
@@ -82,7 +82,7 @@ protected function setUp(): void {
   /**
    * Tests synced file fields on translated nodes.
    */
-  public function testSyncedImages() {
+  public function testSyncedImages(): void {
     // Enable translation for "Basic page" nodes.
     $this->enableContentTranslation('node', 'basic_page');
     static::setFieldTranslatable('node', 'basic_page', $this->fieldName, TRUE);
diff --git a/core/modules/image/tests/src/Functional/ImageStyleDeleteTest.php b/core/modules/image/tests/src/Functional/ImageStyleDeleteTest.php
index 4d8bbf15583e..bb23675bd0fa 100644
--- a/core/modules/image/tests/src/Functional/ImageStyleDeleteTest.php
+++ b/core/modules/image/tests/src/Functional/ImageStyleDeleteTest.php
@@ -32,7 +32,7 @@ protected function setUp(): void {
   /**
    * Tests image style deletion.
    */
-  public function testDelete() {
+  public function testDelete(): void {
     $this->drupalGet('admin/config/media/image-styles/manage/medium/delete');
     // Checks that the 'replacement' select element is displayed.
     $this->assertSession()->fieldExists('replacement');
diff --git a/core/modules/image/tests/src/Functional/ImageStyleDownloadAccessControlTest.php b/core/modules/image/tests/src/Functional/ImageStyleDownloadAccessControlTest.php
index 430a16c60516..0e37e81883ac 100644
--- a/core/modules/image/tests/src/Functional/ImageStyleDownloadAccessControlTest.php
+++ b/core/modules/image/tests/src/Functional/ImageStyleDownloadAccessControlTest.php
@@ -75,7 +75,7 @@ protected function setUp(): void {
   /**
    * Ensures that private:// access is forbidden through image.style_public.
    */
-  public function testPrivateThroughPublicRoute() {
+  public function testPrivateThroughPublicRoute(): void {
     $this->fileSystem->copy(\Drupal::root() . '/core/tests/fixtures/files/image-1.png', 'private://image.png');
 
     // Manually create the file record for the private:// file as we want it
@@ -114,7 +114,7 @@ public function testPrivateThroughPublicRoute() {
   /**
    * Ensures that public:// access is forbidden through image.style.private.
    */
-  public function testPublicThroughPrivateRoute() {
+  public function testPublicThroughPrivateRoute(): void {
     $this->fileSystem->copy(\Drupal::root() . '/core/tests/fixtures/files/image-1.png', 'public://image.png');
     $token = $this->style->getPathToken('public://image.png');
     $private_route_public_scheme = Url::fromRoute(
diff --git a/core/modules/image/tests/src/Functional/ImageStyleFlushTest.php b/core/modules/image/tests/src/Functional/ImageStyleFlushTest.php
index 9d8af312145f..40da3985df30 100644
--- a/core/modules/image/tests/src/Functional/ImageStyleFlushTest.php
+++ b/core/modules/image/tests/src/Functional/ImageStyleFlushTest.php
@@ -58,7 +58,7 @@ public function getImageCount($style, $wrapper) {
   /**
    * General test to flush a style.
    */
-  public function testFlush() {
+  public function testFlush(): void {
 
     // Setup a style to be created and effects to add to it.
     $style_name = $this->randomMachineName(10);
diff --git a/core/modules/image/tests/src/Functional/ImageStylesPathAndUrlTest.php b/core/modules/image/tests/src/Functional/ImageStylesPathAndUrlTest.php
index f82e52e39608..11ce965a7616 100644
--- a/core/modules/image/tests/src/Functional/ImageStylesPathAndUrlTest.php
+++ b/core/modules/image/tests/src/Functional/ImageStylesPathAndUrlTest.php
@@ -62,7 +62,7 @@ protected function setUp(): void {
   /**
    * Tests \Drupal\image\ImageStyleInterface::buildUri().
    */
-  public function testImageStylePath() {
+  public function testImageStylePath(): void {
     $scheme = 'public';
     $actual = $this->style->buildUri("$scheme://foo/bar.gif");
     $expected = "$scheme://styles/" . $this->style->id() . "/$scheme/foo/bar.gif";
@@ -76,49 +76,49 @@ public function testImageStylePath() {
   /**
    * Tests an image style URL using the "public://" scheme.
    */
-  public function testImageStyleUrlAndPathPublic() {
+  public function testImageStyleUrlAndPathPublic(): void {
     $this->doImageStyleUrlAndPathTests('public');
   }
 
   /**
    * Tests an image style URL using the "private://" scheme.
    */
-  public function testImageStyleUrlAndPathPrivate() {
+  public function testImageStyleUrlAndPathPrivate(): void {
     $this->doImageStyleUrlAndPathTests('private');
   }
 
   /**
    * Tests an image style URL with the "public://" scheme and unclean URLs.
    */
-  public function testImageStyleUrlAndPathPublicUnclean() {
+  public function testImageStyleUrlAndPathPublicUnclean(): void {
     $this->doImageStyleUrlAndPathTests('public', FALSE);
   }
 
   /**
    * Tests an image style URL with the "private://" schema and unclean URLs.
    */
-  public function testImageStyleUrlAndPathPrivateUnclean() {
+  public function testImageStyleUrlAndPathPrivateUnclean(): void {
     $this->doImageStyleUrlAndPathTests('private', FALSE);
   }
 
   /**
    * Tests an image style URL with the "public://" schema and language prefix.
    */
-  public function testImageStyleUrlAndPathPublicLanguage() {
+  public function testImageStyleUrlAndPathPublicLanguage(): void {
     $this->doImageStyleUrlAndPathTests('public', TRUE, TRUE, 'fr');
   }
 
   /**
    * Tests an image style URL with the "private://" schema and language prefix.
    */
-  public function testImageStyleUrlAndPathPrivateLanguage() {
+  public function testImageStyleUrlAndPathPrivateLanguage(): void {
     $this->doImageStyleUrlAndPathTests('private', TRUE, TRUE, 'fr');
   }
 
   /**
    * Tests an image style URL with a file URL that has an extra slash in it.
    */
-  public function testImageStyleUrlExtraSlash() {
+  public function testImageStyleUrlExtraSlash(): void {
     $this->doImageStyleUrlAndPathTests('public', TRUE, TRUE);
   }
 
@@ -141,7 +141,7 @@ public function testImageStylePrivateWithConversion(): void {
   /**
    * Tests that an invalid source image returns a 404.
    */
-  public function testImageStyleUrlForMissingSourceImage() {
+  public function testImageStyleUrlForMissingSourceImage(): void {
     $non_existent_uri = 'public://foo.png';
     $generated_url = $this->style->buildUrl($non_existent_uri);
     $this->drupalGet($generated_url);
diff --git a/core/modules/image/tests/src/Functional/Rest/ImageStyleXmlAnonTest.php b/core/modules/image/tests/src/Functional/Rest/ImageStyleXmlAnonTest.php
index a508fc7a2b2a..d7e43ab03a1f 100644
--- a/core/modules/image/tests/src/Functional/Rest/ImageStyleXmlAnonTest.php
+++ b/core/modules/image/tests/src/Functional/Rest/ImageStyleXmlAnonTest.php
@@ -33,7 +33,7 @@ class ImageStyleXmlAnonTest extends ImageStyleResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public function testGet() {
+  public function testGet(): void {
     // @todo Remove this method override in https://www.drupal.org/node/2905655
     $this->markTestSkipped();
   }
diff --git a/core/modules/image/tests/src/Functional/Rest/ImageStyleXmlBasicAuthTest.php b/core/modules/image/tests/src/Functional/Rest/ImageStyleXmlBasicAuthTest.php
index f0bfdbf8dbf7..269b32aafa8c 100644
--- a/core/modules/image/tests/src/Functional/Rest/ImageStyleXmlBasicAuthTest.php
+++ b/core/modules/image/tests/src/Functional/Rest/ImageStyleXmlBasicAuthTest.php
@@ -43,7 +43,7 @@ class ImageStyleXmlBasicAuthTest extends ImageStyleResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public function testGet() {
+  public function testGet(): void {
     // @todo Remove this method override in https://www.drupal.org/node/2905655
     $this->markTestSkipped();
   }
diff --git a/core/modules/image/tests/src/Functional/Rest/ImageStyleXmlCookieTest.php b/core/modules/image/tests/src/Functional/Rest/ImageStyleXmlCookieTest.php
index b802543f66a7..b3e9c820e881 100644
--- a/core/modules/image/tests/src/Functional/Rest/ImageStyleXmlCookieTest.php
+++ b/core/modules/image/tests/src/Functional/Rest/ImageStyleXmlCookieTest.php
@@ -38,7 +38,7 @@ class ImageStyleXmlCookieTest extends ImageStyleResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public function testGet() {
+  public function testGet(): void {
     // @todo Remove this method override in https://www.drupal.org/node/2905655
     $this->markTestSkipped();
   }
diff --git a/core/modules/image/tests/src/FunctionalJavascript/ImageAdminStylesTest.php b/core/modules/image/tests/src/FunctionalJavascript/ImageAdminStylesTest.php
index 9bf24b6a33e8..faea9dd8d4b3 100644
--- a/core/modules/image/tests/src/FunctionalJavascript/ImageAdminStylesTest.php
+++ b/core/modules/image/tests/src/FunctionalJavascript/ImageAdminStylesTest.php
@@ -21,7 +21,7 @@ class ImageAdminStylesTest extends ImageFieldTestBase {
   /**
    * Tests editing Ajax-enabled image effect forms.
    */
-  public function testAjaxEnabledEffectForm() {
+  public function testAjaxEnabledEffectForm(): void {
     $admin_path = 'admin/config/media/image-styles';
 
     // Setup a style to be created and effects to add to it.
diff --git a/core/modules/image/tests/src/FunctionalJavascript/ImageFieldValidateTest.php b/core/modules/image/tests/src/FunctionalJavascript/ImageFieldValidateTest.php
index 51920aefed73..9c9839b15c67 100644
--- a/core/modules/image/tests/src/FunctionalJavascript/ImageFieldValidateTest.php
+++ b/core/modules/image/tests/src/FunctionalJavascript/ImageFieldValidateTest.php
@@ -22,7 +22,7 @@ class ImageFieldValidateTest extends ImageFieldTestBase {
   /**
    * Tests the validation message is displayed only once for ajax uploads.
    */
-  public function testAJAXValidationMessage() {
+  public function testAJAXValidationMessage(): void {
     $field_name = $this->randomMachineName();
     $this->createImageField($field_name, 'node', 'article', ['cardinality' => -1]);
 
@@ -42,7 +42,7 @@ public function testAJAXValidationMessage() {
   /**
    * Tests that image field validation works with other form submit handlers.
    */
-  public function testFriendlyAjaxValidation() {
+  public function testFriendlyAjaxValidation(): void {
     // Add a custom field to the Article content type that contains an AJAX
     // handler on a select field.
     $field_storage = FieldStorageConfig::create([
diff --git a/core/modules/image/tests/src/Kernel/ImageEffectsTest.php b/core/modules/image/tests/src/Kernel/ImageEffectsTest.php
index 9d02930e097c..6b7662e33e43 100644
--- a/core/modules/image/tests/src/Kernel/ImageEffectsTest.php
+++ b/core/modules/image/tests/src/Kernel/ImageEffectsTest.php
@@ -47,7 +47,7 @@ protected function setUp(): void {
   /**
    * Tests the 'image_resize' effect.
    */
-  public function testResizeEffect() {
+  public function testResizeEffect(): void {
     $this->assertImageEffect(['resize'], 'image_resize', [
       'width' => 1,
       'height' => 2,
@@ -64,7 +64,7 @@ public function testResizeEffect() {
   /**
    * Tests the 'image_scale' effect.
    */
-  public function testScaleEffect() {
+  public function testScaleEffect(): void {
     // @todo Test also image upscaling in #3040887.
     // @see https://www.drupal.org/project/drupal/issues/3040887
     $this->assertImageEffect(['scale'], 'image_scale', [
@@ -83,7 +83,7 @@ public function testScaleEffect() {
   /**
    * Tests the 'image_crop' effect.
    */
-  public function testCropEffect() {
+  public function testCropEffect(): void {
     // @todo Test also keyword offsets in #3040887.
     // @see https://www.drupal.org/project/drupal/issues/3040887
     $this->assertImageEffect(['crop'], 'image_crop', [
@@ -107,7 +107,7 @@ public function testCropEffect() {
   /**
    * Tests the 'image_convert' effect.
    */
-  public function testConvertEffect() {
+  public function testConvertEffect(): void {
     // Test jpeg.
     $this->assertImageEffect(['convert'], 'image_convert', [
       'extension' => 'jpeg',
@@ -122,7 +122,7 @@ public function testConvertEffect() {
   /**
    * Tests the 'image_scale_and_crop' effect.
    */
-  public function testScaleAndCropEffect() {
+  public function testScaleAndCropEffect(): void {
     $this->assertImageEffect(['scale_and_crop'], 'image_scale_and_crop', [
       'width' => 5,
       'height' => 10,
@@ -143,7 +143,7 @@ public function testScaleAndCropEffect() {
   /**
    * Tests the 'image_scale_and_crop' effect with an anchor.
    */
-  public function testScaleAndCropEffectWithAnchor() {
+  public function testScaleAndCropEffectWithAnchor(): void {
     $this->assertImageEffect(['scale_and_crop'], 'image_scale_and_crop', [
       'anchor' => 'top-1',
       'width' => 5,
@@ -165,7 +165,7 @@ public function testScaleAndCropEffectWithAnchor() {
   /**
    * Tests the 'image_desaturate' effect.
    */
-  public function testDesaturateEffect() {
+  public function testDesaturateEffect(): void {
     $this->assertImageEffect(['desaturate'], 'image_desaturate', []);
 
     // Check the parameters.
@@ -177,7 +177,7 @@ public function testDesaturateEffect() {
   /**
    * Tests the image_rotate_effect() function.
    */
-  public function testRotateEffect() {
+  public function testRotateEffect(): void {
     // @todo Test also with 'random' === TRUE in #3040887.
     // @see https://www.drupal.org/project/drupal/issues/3040887
     $this->assertImageEffect(['rotate'], 'image_rotate', [
@@ -196,7 +196,7 @@ public function testRotateEffect() {
   /**
    * Tests image effect caching.
    */
-  public function testImageEffectsCaching() {
+  public function testImageEffectsCaching(): void {
     $state = $this->container->get('state');
 
     // The 'image_module_test.counter' state variable value is incremented in
@@ -221,7 +221,7 @@ public function testImageEffectsCaching() {
   /**
    * Tests that validation errors are passed from the plugin to the parent form.
    */
-  public function testEffectFormValidationErrors() {
+  public function testEffectFormValidationErrors(): void {
     $form_builder = $this->container->get('form_builder');
 
     /** @var \Drupal\image\ImageStyleInterface $image_style */
diff --git a/core/modules/image/tests/src/Kernel/ImageFormatterTest.php b/core/modules/image/tests/src/Kernel/ImageFormatterTest.php
index 4cc1b795ac25..ac84e6a80e72 100644
--- a/core/modules/image/tests/src/Kernel/ImageFormatterTest.php
+++ b/core/modules/image/tests/src/Kernel/ImageFormatterTest.php
@@ -89,7 +89,7 @@ protected function setUp(): void {
   /**
    * Tests the cache tags from image formatters.
    */
-  public function testImageFormatterCacheTags() {
+  public function testImageFormatterCacheTags(): void {
     // Create a test entity with the image field set.
     $entity = EntityTest::create([
       'name' => $this->randomMachineName(),
@@ -109,7 +109,7 @@ public function testImageFormatterCacheTags() {
    *
    * @requires extension gd
    */
-  public function testImageFormatterSvg() {
+  public function testImageFormatterSvg(): void {
     // Install the default image styles.
     $this->installConfig(['image']);
 
@@ -179,7 +179,7 @@ public function testImageFormatterSvg() {
   /**
    * Tests Image Formatter URL options handling.
    */
-  public function testImageFormatterUrlOptions() {
+  public function testImageFormatterUrlOptions(): void {
     $this->display->setComponent($this->fieldName, ['settings' => ['image_link' => 'content']]);
 
     // Create a test entity with the image field set.
diff --git a/core/modules/image/tests/src/Kernel/ImageImportTest.php b/core/modules/image/tests/src/Kernel/ImageImportTest.php
index 1f945f605b4a..0797627b1987 100644
--- a/core/modules/image/tests/src/Kernel/ImageImportTest.php
+++ b/core/modules/image/tests/src/Kernel/ImageImportTest.php
@@ -22,7 +22,7 @@ class ImageImportTest extends KernelTestBase {
   /**
    * Tests importing image styles.
    */
-  public function testImport() {
+  public function testImport(): void {
     $style = ImageStyle::create([
       'name' => 'test',
       'label' => 'Test',
diff --git a/core/modules/image/tests/src/Kernel/ImageItemTest.php b/core/modules/image/tests/src/Kernel/ImageItemTest.php
index b96805627d83..28561deb384e 100644
--- a/core/modules/image/tests/src/Kernel/ImageItemTest.php
+++ b/core/modules/image/tests/src/Kernel/ImageItemTest.php
@@ -99,7 +99,7 @@ protected function setUp(): void {
   /**
    * Tests using entity fields of the image field type.
    */
-  public function testImageItem() {
+  public function testImageItem(): void {
     // Create a test entity with the image field set.
     $entity = EntityTest::create();
     $entity->image_test->target_id = $this->image->id();
@@ -158,7 +158,7 @@ public function testImageItem() {
   /**
    * Tests generateSampleItems() method under different dimensions.
    */
-  public function testImageItemSampleValueGeneration() {
+  public function testImageItemSampleValueGeneration(): void {
 
     // Default behavior. No dimensions configuration.
     $entity = EntityTest::create();
@@ -177,7 +177,7 @@ public function testImageItemSampleValueGeneration() {
   /**
    * Tests a malformed image.
    */
-  public function testImageItemMalformed() {
+  public function testImageItemMalformed(): void {
     \Drupal::service('module_installer')->install(['dblog']);
 
     // Validate entity is an image and don't gather dimensions if it is not.
diff --git a/core/modules/image/tests/src/Kernel/ImageStyleCustomStreamWrappersTest.php b/core/modules/image/tests/src/Kernel/ImageStyleCustomStreamWrappersTest.php
index e1a8718266cd..1132d97296ae 100644
--- a/core/modules/image/tests/src/Kernel/ImageStyleCustomStreamWrappersTest.php
+++ b/core/modules/image/tests/src/Kernel/ImageStyleCustomStreamWrappersTest.php
@@ -79,7 +79,7 @@ public function register(ContainerBuilder $container) {
    * @param string $expected_scheme
    *   The derivative expected stream wrapper scheme.
    */
-  public function testCustomStreamWrappers($source_scheme, $expected_scheme) {
+  public function testCustomStreamWrappers($source_scheme, $expected_scheme): void {
     $derivative_uri = $this->imageStyle->buildUri("$source_scheme://some/path/image.png");
     $derivative_scheme = StreamWrapperManager::getScheme($derivative_uri);
 
diff --git a/core/modules/image/tests/src/Kernel/ImageStyleIntegrationTest.php b/core/modules/image/tests/src/Kernel/ImageStyleIntegrationTest.php
index d8b58055be8d..1c25ab7fe44c 100644
--- a/core/modules/image/tests/src/Kernel/ImageStyleIntegrationTest.php
+++ b/core/modules/image/tests/src/Kernel/ImageStyleIntegrationTest.php
@@ -42,7 +42,7 @@ protected function setUp(): void {
   /**
    * Tests the dependency between ImageStyle and entity display components.
    */
-  public function testEntityDisplayDependency() {
+  public function testEntityDisplayDependency(): void {
     // Create two image styles.
     /** @var \Drupal\image\ImageStyleInterface $style */
     $style = ImageStyle::create([
@@ -136,7 +136,7 @@ public function testEntityDisplayDependency() {
   /**
    * Tests renaming the ImageStyle.
    */
-  public function testEntityDisplayDependencyRename() {
+  public function testEntityDisplayDependencyRename(): void {
     // Create an image style.
     /** @var \Drupal\image\ImageStyleInterface $style */
     $style = ImageStyle::create([
diff --git a/core/modules/image/tests/src/Kernel/ImageThemeFunctionTest.php b/core/modules/image/tests/src/Kernel/ImageThemeFunctionTest.php
index e5a55644c21b..cb846983acde 100644
--- a/core/modules/image/tests/src/Kernel/ImageThemeFunctionTest.php
+++ b/core/modules/image/tests/src/Kernel/ImageThemeFunctionTest.php
@@ -86,7 +86,7 @@ protected function setUp(): void {
   /**
    * Tests usage of the image field formatters.
    */
-  public function testImageFormatterTheme() {
+  public function testImageFormatterTheme(): void {
     /** @var \Drupal\Core\Render\RendererInterface $renderer */
     $renderer = $this->container->get('renderer');
 
@@ -148,7 +148,7 @@ public function testImageFormatterTheme() {
   /**
    * Tests usage of the image style theme function.
    */
-  public function testImageStyleTheme() {
+  public function testImageStyleTheme(): void {
     /** @var \Drupal\Core\Render\RendererInterface $renderer */
     $renderer = $this->container->get('renderer');
 
@@ -185,7 +185,7 @@ public function testImageStyleTheme() {
   /**
    * Tests image alt attribute functionality.
    */
-  public function testImageAltFunctionality() {
+  public function testImageAltFunctionality(): void {
     /** @var \Drupal\Core\Render\RendererInterface $renderer */
     $renderer = $this->container->get('renderer');
 
diff --git a/core/modules/image/tests/src/Kernel/Migrate/d6/MigrateImageCacheTest.php b/core/modules/image/tests/src/Kernel/Migrate/d6/MigrateImageCacheTest.php
index ed2caf36ca72..9b3615b99e6a 100644
--- a/core/modules/image/tests/src/Kernel/Migrate/d6/MigrateImageCacheTest.php
+++ b/core/modules/image/tests/src/Kernel/Migrate/d6/MigrateImageCacheTest.php
@@ -29,7 +29,7 @@ protected function setUp(): void {
   /**
    * Tests that an exception is thrown when ImageCache is not installed.
    */
-  public function testMissingTable() {
+  public function testMissingTable(): void {
     $this->sourceDatabase->update('system')
       ->fields([
         'status' => 0,
@@ -47,7 +47,7 @@ public function testMissingTable() {
   /**
    * Tests basic passing migrations.
    */
-  public function testPassingMigration() {
+  public function testPassingMigration(): void {
     $this->executeMigration('d6_imagecache_presets');
 
     /** @var \Drupal\image\Entity\ImageStyle $style */
@@ -84,7 +84,7 @@ public function testPassingMigration() {
   /**
    * Tests that missing actions causes failures.
    */
-  public function testMissingEffectPlugin() {
+  public function testMissingEffectPlugin(): void {
     Database::getConnection('default', 'migrate')->insert("imagecache_action")
       ->fields([
         'presetid',
@@ -112,7 +112,7 @@ public function testMissingEffectPlugin() {
   /**
    * Tests that missing action's causes failures.
    */
-  public function testInvalidCropValues() {
+  public function testInvalidCropValues(): void {
     Database::getConnection('default', 'migrate')->insert("imagecache_action")
       ->fields([
         'presetid',
diff --git a/core/modules/image/tests/src/Kernel/Migrate/d6/MigrateImageTest.php b/core/modules/image/tests/src/Kernel/Migrate/d6/MigrateImageTest.php
index 0d5218a65e1f..4f0b99b4f3de 100644
--- a/core/modules/image/tests/src/Kernel/Migrate/d6/MigrateImageTest.php
+++ b/core/modules/image/tests/src/Kernel/Migrate/d6/MigrateImageTest.php
@@ -40,7 +40,7 @@ protected function setUp(): void {
   /**
    * Tests image migration from Drupal 6 to 8.
    */
-  public function testNode() {
+  public function testNode(): void {
     $node = Node::load(9);
     // Test the image field sub fields.
     $this->assertSame('2', $node->field_test_imagefield->target_id);
diff --git a/core/modules/image/tests/src/Kernel/Migrate/d7/MigrateImageSettingsTest.php b/core/modules/image/tests/src/Kernel/Migrate/d7/MigrateImageSettingsTest.php
index 1e8a23c7130b..e8ce5a8ddbe3 100644
--- a/core/modules/image/tests/src/Kernel/Migrate/d7/MigrateImageSettingsTest.php
+++ b/core/modules/image/tests/src/Kernel/Migrate/d7/MigrateImageSettingsTest.php
@@ -26,7 +26,7 @@ protected function setUp(): void {
   /**
    * Tests the migration.
    */
-  public function testMigration() {
+  public function testMigration(): void {
     $config = $this->config('image.settings');
     // These settings are not recommended...
     $this->assertTrue($config->get('allow_insecure_derivatives'));
diff --git a/core/modules/image/tests/src/Kernel/Migrate/d7/MigrateImageStylesTest.php b/core/modules/image/tests/src/Kernel/Migrate/d7/MigrateImageStylesTest.php
index d9d10fe1cfb8..006653f7acfb 100644
--- a/core/modules/image/tests/src/Kernel/Migrate/d7/MigrateImageStylesTest.php
+++ b/core/modules/image/tests/src/Kernel/Migrate/d7/MigrateImageStylesTest.php
@@ -33,7 +33,7 @@ protected function setUp(): void {
   /**
    * Tests the image styles migration.
    */
-  public function testImageStylesMigration() {
+  public function testImageStylesMigration(): void {
     $this->assertEntity('custom_image_style_1', "Custom image style 1", ['image_scale_and_crop', 'image_desaturate'], [['width' => 55, 'height' => 55, 'anchor' => 'center-center'], []]);
     $this->assertEntity('custom_image_style_2', "Custom image style 2", ['image_resize', 'image_rotate'], [['width' => 55, 'height' => 100], ['degrees' => 45, 'bgcolor' => '#FFFFFF', 'random' => FALSE]]);
     $this->assertEntity('custom_image_style_3', "Custom image style 3", ['image_scale', 'image_crop'], [['width' => 150, 'height' => NULL, 'upscale' => FALSE], ['width' => 50, 'height' => 50, 'anchor' => 'left-top']]);
diff --git a/core/modules/image/tests/src/Kernel/Views/ImageViewsDataTest.php b/core/modules/image/tests/src/Kernel/Views/ImageViewsDataTest.php
index 31cdeb6a6536..a8e0883b4c3e 100644
--- a/core/modules/image/tests/src/Kernel/Views/ImageViewsDataTest.php
+++ b/core/modules/image/tests/src/Kernel/Views/ImageViewsDataTest.php
@@ -45,7 +45,7 @@ protected function setUp($import_test_views = TRUE): void {
    * @see image_field_views_data()
    * @see image_field_views_data_views_data_alter()
    */
-  public function testRelationshipViewsData() {
+  public function testRelationshipViewsData(): void {
     // Create image field to entity_test.
     FieldStorageConfig::create([
       'entity_type' => 'entity_test',
diff --git a/core/modules/image/tests/src/Kernel/Views/RelationshipUserImageDataTest.php b/core/modules/image/tests/src/Kernel/Views/RelationshipUserImageDataTest.php
index 5f9612ee4b7e..49223494000c 100644
--- a/core/modules/image/tests/src/Kernel/Views/RelationshipUserImageDataTest.php
+++ b/core/modules/image/tests/src/Kernel/Views/RelationshipUserImageDataTest.php
@@ -72,7 +72,7 @@ protected function setUp($import_test_views = TRUE): void {
   /**
    * Tests using the views image relationship.
    */
-  public function testViewsHandlerRelationshipUserImageData() {
+  public function testViewsHandlerRelationshipUserImageData(): void {
     $file = File::create([
       'fid' => 2,
       'uid' => 2,
diff --git a/core/modules/image/tests/src/Unit/ImageStyleTest.php b/core/modules/image/tests/src/Unit/ImageStyleTest.php
index 6b4685148fc0..d247642b3cd4 100644
--- a/core/modules/image/tests/src/Unit/ImageStyleTest.php
+++ b/core/modules/image/tests/src/Unit/ImageStyleTest.php
@@ -98,7 +98,7 @@ protected function setUp(): void {
   /**
    * @covers ::getDerivativeExtension
    */
-  public function testGetDerivativeExtension() {
+  public function testGetDerivativeExtension(): void {
     $image_effect_id = $this->randomMachineName();
     $logger = $this->getMockBuilder('\Psr\Log\LoggerInterface')->getMock();
     $image_effect = $this->getMockBuilder('\Drupal\image\ImageEffectBase')
@@ -120,7 +120,7 @@ public function testGetDerivativeExtension() {
   /**
    * @covers ::buildUri
    */
-  public function testBuildUri() {
+  public function testBuildUri(): void {
     // Image style that changes the extension.
     $image_effect_id = $this->randomMachineName();
     $logger = $this->getMockBuilder('\Psr\Log\LoggerInterface')->getMock();
@@ -150,7 +150,7 @@ public function testBuildUri() {
   /**
    * @covers ::getPathToken
    */
-  public function testGetPathToken() {
+  public function testGetPathToken(): void {
     $logger = $this->getMockBuilder('\Psr\Log\LoggerInterface')->getMock();
     $private_key = $this->randomMachineName();
     $hash_salt = $this->randomMachineName();
@@ -202,7 +202,7 @@ public function testGetPathToken() {
   /**
    * @covers ::flush
    */
-  public function testFlush() {
+  public function testFlush(): void {
     $cache_tag_invalidator = $this->createMock('\Drupal\Core\Cache\CacheTagsInvalidator');
     $file_system = $this->createMock('\Drupal\Core\File\FileSystemInterface');
     $module_handler = $this->createMock('\Drupal\Core\Extension\ModuleHandlerInterface');
diff --git a/core/modules/image/tests/src/Unit/PageCache/DenyPrivateImageStyleDownloadTest.php b/core/modules/image/tests/src/Unit/PageCache/DenyPrivateImageStyleDownloadTest.php
index eb6866f17384..e98965ce4f26 100644
--- a/core/modules/image/tests/src/Unit/PageCache/DenyPrivateImageStyleDownloadTest.php
+++ b/core/modules/image/tests/src/Unit/PageCache/DenyPrivateImageStyleDownloadTest.php
@@ -62,7 +62,7 @@ protected function setUp(): void {
    * @dataProvider providerPrivateImageStyleDownloadPolicy
    * @covers ::check
    */
-  public function testPrivateImageStyleDownloadPolicy($expected_result, $route_name) {
+  public function testPrivateImageStyleDownloadPolicy($expected_result, $route_name): void {
     $this->routeMatch->expects($this->once())
       ->method('getRouteName')
       ->willReturn($route_name);
diff --git a/core/modules/inline_form_errors/tests/src/Functional/FormErrorHandlerFileUploadTest.php b/core/modules/inline_form_errors/tests/src/Functional/FormErrorHandlerFileUploadTest.php
index bcb1bf981cbf..54d3f482f6ef 100644
--- a/core/modules/inline_form_errors/tests/src/Functional/FormErrorHandlerFileUploadTest.php
+++ b/core/modules/inline_form_errors/tests/src/Functional/FormErrorHandlerFileUploadTest.php
@@ -91,7 +91,7 @@ protected function setUp(): void {
   /**
    * Tests that the required field error is displayed as inline error message.
    */
-  public function testFileUploadErrors() {
+  public function testFileUploadErrors(): void {
     $this->drupalGet('node/add/page');
     $edit = [
       'edit-title-0-value' => $this->randomString(),
diff --git a/core/modules/inline_form_errors/tests/src/FunctionalJavascript/FormErrorHandlerCKEditor5Test.php b/core/modules/inline_form_errors/tests/src/FunctionalJavascript/FormErrorHandlerCKEditor5Test.php
index 0cbd8ae38aeb..c0b50328ed12 100644
--- a/core/modules/inline_form_errors/tests/src/FunctionalJavascript/FormErrorHandlerCKEditor5Test.php
+++ b/core/modules/inline_form_errors/tests/src/FunctionalJavascript/FormErrorHandlerCKEditor5Test.php
@@ -87,7 +87,7 @@ protected function setUp(): void {
   /**
    * Tests if the fragment link to a textarea works with CKEditor 5 enabled.
    */
-  public function testFragmentLink() {
+  public function testFragmentLink(): void {
     $session = $this->getSession();
     $web_assert = $this->assertSession();
     $ckeditor_class = '.ck-editor';
diff --git a/core/modules/inline_form_errors/tests/src/Kernel/FormElementInlineErrorTest.php b/core/modules/inline_form_errors/tests/src/Kernel/FormElementInlineErrorTest.php
index 012a4c0ee5c4..288230dcf4a9 100644
--- a/core/modules/inline_form_errors/tests/src/Kernel/FormElementInlineErrorTest.php
+++ b/core/modules/inline_form_errors/tests/src/Kernel/FormElementInlineErrorTest.php
@@ -22,7 +22,7 @@ class FormElementInlineErrorTest extends KernelTestBase {
   /**
    * Tests that no inline form errors are shown when disabled for a form.
    */
-  public function testDisplayErrorMessagesNotInline() {
+  public function testDisplayErrorMessagesNotInline(): void {
     $form_id = 'test';
 
     $form = [
diff --git a/core/modules/inline_form_errors/tests/src/Unit/FormErrorHandlerTest.php b/core/modules/inline_form_errors/tests/src/Unit/FormErrorHandlerTest.php
index d40f4190c831..2d4f07ff3120 100644
--- a/core/modules/inline_form_errors/tests/src/Unit/FormErrorHandlerTest.php
+++ b/core/modules/inline_form_errors/tests/src/Unit/FormErrorHandlerTest.php
@@ -119,7 +119,7 @@ protected function setUp(): void {
    * @covers ::displayErrorMessages
    * @covers ::setElementErrorsFromFormState
    */
-  public function testErrorMessagesInline() {
+  public function testErrorMessagesInline(): void {
     $messages = [
       'no title given',
       'element is invisible',
@@ -169,7 +169,7 @@ public function testErrorMessagesInline() {
   /**
    * Tests that opting out of Inline Form Errors works.
    */
-  public function testErrorMessagesNotInline() {
+  public function testErrorMessagesNotInline(): void {
     // Asserts all messages are summarized.
     $messages = [
       'invalid',
diff --git a/core/modules/jsonapi/tests/src/Functional/BlockContentTest.php b/core/modules/jsonapi/tests/src/Functional/BlockContentTest.php
index 0b9347d7c899..7d35326abc63 100644
--- a/core/modules/jsonapi/tests/src/Functional/BlockContentTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/BlockContentTest.php
@@ -260,7 +260,7 @@ protected function getExpectedCacheContexts(?array $sparse_fieldset = NULL) {
   /**
    * {@inheritdoc}
    */
-  public function testCollectionFilterAccess() {
+  public function testCollectionFilterAccess(): void {
     $this->entity->setPublished()->save();
     $this->doTestCollectionFilterAccessForPublishableEntities('info', NULL, 'administer block content');
   }
diff --git a/core/modules/jsonapi/tests/src/Functional/CommentTest.php b/core/modules/jsonapi/tests/src/Functional/CommentTest.php
index a5f85fe90a00..da7d6a7d8224 100644
--- a/core/modules/jsonapi/tests/src/Functional/CommentTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/CommentTest.php
@@ -322,7 +322,7 @@ protected function getExpectedUnauthorizedAccessMessage($method) {
    * - base fields that are marked as required, but yet can still result in
    *   validation errors other than "missing required field".
    */
-  public function testPostIndividualDxWithoutCriticalBaseFields() {
+  public function testPostIndividualDxWithoutCriticalBaseFields(): void {
     $this->setUpAuthorization('POST');
     $this->config('jsonapi.settings')->set('read_only', FALSE)->save(TRUE);
 
@@ -362,7 +362,7 @@ public function testPostIndividualDxWithoutCriticalBaseFields() {
   /**
    * Tests POSTing a comment with and without 'skip comment approval'.
    */
-  public function testPostIndividualSkipCommentApproval() {
+  public function testPostIndividualSkipCommentApproval(): void {
     $this->setUpAuthorization('POST');
     $this->config('jsonapi.settings')->set('read_only', FALSE)->save(TRUE);
 
@@ -425,7 +425,7 @@ protected static function getIncludePermissions() {
   /**
    * {@inheritdoc}
    */
-  public function testCollectionFilterAccess() {
+  public function testCollectionFilterAccess(): void {
     // Verify the expected behavior in the common case.
     $this->doTestCollectionFilterAccessForPublishableEntities('subject', 'access comments', 'administer comments');
 
@@ -468,7 +468,7 @@ protected static function getExpectedCollectionCacheability(AccountInterface $ac
   /**
    * {@inheritdoc}
    */
-  public function testPatchIndividual() {
+  public function testPatchIndividual(): void {
     // Ensure ::getModifiedEntityForPatchTesting() can pick an alternative value
     // for the 'entity_id' field.
     EntityTest::create([
@@ -476,7 +476,7 @@ public function testPatchIndividual() {
       'type' => 'bar',
     ])->save();
 
-    return parent::testPatchIndividual();
+    parent::testPatchIndividual();
   }
 
 }
diff --git a/core/modules/jsonapi/tests/src/Functional/ConfigurableLanguageTest.php b/core/modules/jsonapi/tests/src/Functional/ConfigurableLanguageTest.php
index d5a6586125a9..9e170ba2c5be 100644
--- a/core/modules/jsonapi/tests/src/Functional/ConfigurableLanguageTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/ConfigurableLanguageTest.php
@@ -122,7 +122,7 @@ protected function getExpectedCacheContexts(?array $sparse_fieldset = NULL) {
    *
    * @see https://www.drupal.org/project/drupal/issues/2915539
    */
-  public function testGetIndividualDefaultConfig() {
+  public function testGetIndividualDefaultConfig(): void {
     // @todo Remove line below in favor of commented line in https://www.drupal.org/project/drupal/issues/2878463.
     $url = Url::fromRoute('jsonapi.configurable_language--configurable_language.individual', ['entity' => ConfigurableLanguage::load('en')->uuid()]);
     /* $url = ConfigurableLanguage::load('en')->toUrl('jsonapi'); */
diff --git a/core/modules/jsonapi/tests/src/Functional/EntryPointTest.php b/core/modules/jsonapi/tests/src/Functional/EntryPointTest.php
index b43340850353..d6fc9884175a 100644
--- a/core/modules/jsonapi/tests/src/Functional/EntryPointTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/EntryPointTest.php
@@ -40,7 +40,7 @@ class EntryPointTest extends BrowserTestBase {
   /**
    * Test GET to the entry point.
    */
-  public function testEntryPoint() {
+  public function testEntryPoint(): void {
     $request_options = [];
     $request_options[RequestOptions::HEADERS]['Accept'] = 'application/vnd.api+json';
     $response = $this->request('GET', Url::fromUri('base://jsonapi'), $request_options);
diff --git a/core/modules/jsonapi/tests/src/Functional/ExternalNormalizersTest.php b/core/modules/jsonapi/tests/src/Functional/ExternalNormalizersTest.php
index c0b9131aff66..dfdadeedc973 100644
--- a/core/modules/jsonapi/tests/src/Functional/ExternalNormalizersTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/ExternalNormalizersTest.php
@@ -113,7 +113,7 @@ protected function setUp(): void {
    *
    * @dataProvider providerTestFormatAgnosticNormalizers
    */
-  public function testFormatAgnosticNormalizers($test_module, $expected_value_jsonapi_normalization, $expected_value_jsonapi_denormalization) {
+  public function testFormatAgnosticNormalizers($test_module, $expected_value_jsonapi_normalization, $expected_value_jsonapi_denormalization): void {
     assert(in_array($expected_value_jsonapi_normalization, [static::VALUE_ORIGINAL, static::VALUE_OVERRIDDEN], TRUE));
     assert(in_array($expected_value_jsonapi_denormalization, [static::VALUE_ORIGINAL, static::VALUE_OVERRIDDEN], TRUE));
 
diff --git a/core/modules/jsonapi/tests/src/Functional/FileTest.php b/core/modules/jsonapi/tests/src/Functional/FileTest.php
index b4a7b71676fe..899bcbdc78fe 100644
--- a/core/modules/jsonapi/tests/src/Functional/FileTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/FileTest.php
@@ -203,7 +203,7 @@ protected function getPostDocument() {
   /**
    * {@inheritdoc}
    */
-  public function testPostIndividual() {
+  public function testPostIndividual(): void {
     // @todo https://www.drupal.org/node/1927648
     $this->markTestSkipped();
   }
@@ -223,7 +223,7 @@ protected function getExpectedUnauthorizedAccessMessage($method) {
   /**
    * {@inheritdoc}
    */
-  public function testCollectionFilterAccess() {
+  public function testCollectionFilterAccess(): void {
     $label_field_name = 'filename';
     // Verify the expected behavior in the common case: when the file is public.
     $this->doTestCollectionFilterAccessBasedOnPermissions($label_field_name, 'access content');
diff --git a/core/modules/jsonapi/tests/src/Functional/FileUploadTest.php b/core/modules/jsonapi/tests/src/Functional/FileUploadTest.php
index dba03609038b..354904df3898 100644
--- a/core/modules/jsonapi/tests/src/Functional/FileUploadTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/FileUploadTest.php
@@ -150,42 +150,42 @@ protected function setUp(): void {
   /**
    * {@inheritdoc}
    */
-  public function testGetIndividual() {
+  public function testGetIndividual(): void {
     $this->markTestSkipped('Irrelevant for this test');
   }
 
   /**
    * {@inheritdoc}
    */
-  public function testPostIndividual() {
+  public function testPostIndividual(): void {
     $this->markTestSkipped('Irrelevant for this test');
   }
 
   /**
    * {@inheritdoc}
    */
-  public function testPatchIndividual() {
+  public function testPatchIndividual(): void {
     $this->markTestSkipped('Irrelevant for this test');
   }
 
   /**
    * {@inheritdoc}
    */
-  public function testDeleteIndividual() {
+  public function testDeleteIndividual(): void {
     $this->markTestSkipped('Irrelevant for this test');
   }
 
   /**
    * {@inheritdoc}
    */
-  public function testCollection() {
+  public function testCollection(): void {
     $this->markTestSkipped('Irrelevant for this test');
   }
 
   /**
    * {@inheritdoc}
    */
-  public function testRelationships() {
+  public function testRelationships(): void {
     $this->markTestSkipped('Irrelevant for this test');
   }
 
@@ -207,7 +207,7 @@ protected function createEntity() {
   /**
    * {@inheritdoc}
    */
-  public function testRelated() {
+  public function testRelated(): void {
     \Drupal::service('router.builder')->rebuild();
     parent::testRelated();
   }
@@ -215,7 +215,7 @@ public function testRelated() {
   /**
    * Tests using the file upload POST route; needs second request to "use" file.
    */
-  public function testPostFileUpload() {
+  public function testPostFileUpload(): void {
     \Drupal::service('router.builder')->rebuild();
     $uri = Url::fromUri('base:' . static::$postUri);
 
@@ -280,7 +280,7 @@ public function testPostFileUpload() {
   /**
    * Tests using the 'file upload and "use" file in single request" POST route.
    */
-  public function testPostFileUploadAndUseInSingleRequest() {
+  public function testPostFileUploadAndUseInSingleRequest(): void {
     \Drupal::service('router.builder')->rebuild();
     // Update the test entity so it already has a file. This allows verifying
     // that this route appends files, and does not replace them.
@@ -431,7 +431,7 @@ protected function testPostFileUploadInvalidHeaders() {
    *
    * A new file should be created with a suffixed name.
    */
-  public function testPostFileUploadDuplicateFile() {
+  public function testPostFileUploadDuplicateFile(): void {
     \Drupal::service('router.builder')->rebuild();
     $this->setUpAuthorization('POST');
     $this->config('jsonapi.settings')->set('read_only', FALSE)->save(TRUE);
@@ -472,7 +472,7 @@ public function testPostFileUploadDuplicateFile() {
    *
    * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition#Directives
    */
-  public function testFileUploadStrippedFilePath() {
+  public function testFileUploadStrippedFilePath(): void {
     \Drupal::service('router.builder')->rebuild();
     $this->setUpAuthorization('POST');
     $this->config('jsonapi.settings')->set('read_only', FALSE)->save(TRUE);
@@ -519,7 +519,7 @@ public function testFileUploadStrippedFilePath() {
   /**
    * Tests invalid file uploads.
    */
-  public function testInvalidFileUploads() {
+  public function testInvalidFileUploads(): void {
     \Drupal::service('router.builder')->rebuild();
     $this->setUpAuthorization('POST');
     $this->config('jsonapi.settings')->set('read_only', FALSE)->save(TRUE);
@@ -532,7 +532,7 @@ public function testInvalidFileUploads() {
   /**
    * Tests using the file upload route with a unicode file name.
    */
-  public function testFileUploadUnicodeFilename() {
+  public function testFileUploadUnicodeFilename(): void {
     \Drupal::service('router.builder')->rebuild();
     $this->setUpAuthorization('POST');
     $this->config('jsonapi.settings')->set('read_only', FALSE)->save(TRUE);
@@ -551,7 +551,7 @@ public function testFileUploadUnicodeFilename() {
   /**
    * Tests using the file upload route with a zero byte file.
    */
-  public function testFileUploadZeroByteFile() {
+  public function testFileUploadZeroByteFile(): void {
     \Drupal::service('router.builder')->rebuild();
     $this->setUpAuthorization('POST');
     $this->config('jsonapi.settings')->set('read_only', FALSE)->save(TRUE);
@@ -723,7 +723,7 @@ protected function testFileUploadMaliciousExtension() {
   /**
    * Tests using the file upload POST route no configuration.
    */
-  public function testFileUploadNoConfiguration() {
+  public function testFileUploadNoConfiguration(): void {
     $this->setUpAuthorization('POST');
     $this->config('jsonapi.settings')->set('read_only', FALSE)->save(TRUE);
 
diff --git a/core/modules/jsonapi/tests/src/Functional/InternalEntitiesTest.php b/core/modules/jsonapi/tests/src/Functional/InternalEntitiesTest.php
index 09b9a18d6d53..e2e1481617cc 100644
--- a/core/modules/jsonapi/tests/src/Functional/InternalEntitiesTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/InternalEntitiesTest.php
@@ -91,7 +91,7 @@ protected function setUp(): void {
   /**
    * Ensures that internal resources types aren't present in the entry point.
    */
-  public function testEntryPoint() {
+  public function testEntryPoint(): void {
     $document = $this->jsonapiGet('/jsonapi');
     $this->assertArrayNotHasKey(
       "{$this->internalEntity->getEntityTypeId()}--{$this->internalEntity->bundle()}",
@@ -103,7 +103,7 @@ public function testEntryPoint() {
   /**
    * Ensures that internal resources types aren't present in the routes.
    */
-  public function testRoutes() {
+  public function testRoutes(): void {
     // This cannot be in a data provider because it needs values created by the
     // setUp method.
     $paths = [
@@ -121,7 +121,7 @@ public function testRoutes() {
   /**
    * Asserts that internal entities are not included in compound documents.
    */
-  public function testIncludes() {
+  public function testIncludes(): void {
     $document = $this->getIndividual($this->referencingEntity, [
       'query' => ['include' => 'field_internal'],
     ]);
@@ -135,7 +135,7 @@ public function testIncludes() {
   /**
    * Asserts that links to internal relationships aren't generated.
    */
-  public function testLinks() {
+  public function testLinks(): void {
     $document = $this->getIndividual($this->referencingEntity);
     $this->assertArrayNotHasKey(
       'related',
diff --git a/core/modules/jsonapi/tests/src/Functional/JsonApiFilterRegressionTest.php b/core/modules/jsonapi/tests/src/Functional/JsonApiFilterRegressionTest.php
index b715e1198343..4b6af8d4d6a6 100644
--- a/core/modules/jsonapi/tests/src/Functional/JsonApiFilterRegressionTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/JsonApiFilterRegressionTest.php
@@ -45,7 +45,7 @@ class JsonApiFilterRegressionTest extends JsonApiFunctionalTestBase {
    *
    * @see https://www.drupal.org/project/drupal/issues/2953207
    */
-  public function testBundleSpecificTargetEntityTypeFromIssue2953207() {
+  public function testBundleSpecificTargetEntityTypeFromIssue2953207(): void {
     // Set up data model.
     $this->assertTrue($this->container->get('module_installer')->install(['comment'], TRUE), 'Installed modules.');
     $this->addDefaultCommentField('taxonomy_term', 'tags', 'comment', CommentItemInterface::OPEN, 'tcomment');
@@ -81,7 +81,7 @@ public function testBundleSpecificTargetEntityTypeFromIssue2953207() {
    *
    * @see https://www.drupal.org/project/drupal/issues/3015759
    */
-  public function testFilterByIdFromIssue3015759() {
+  public function testFilterByIdFromIssue3015759(): void {
     // Set up data model.
     $this->assertTrue($this->container->get('module_installer')->install(['shortcut'], TRUE), 'Installed modules.');
     $this->rebuildAll();
@@ -121,7 +121,7 @@ public function testFilterByIdFromIssue3015759() {
    *
    * @see https://www.drupal.org/project/jsonapi/issues/3025372
    */
-  public function testEmptyRelationshipFilteringFromIssue3025372() {
+  public function testEmptyRelationshipFilteringFromIssue3025372(): void {
     // Set up data model.
     $this->drupalCreateContentType(['type' => 'folder']);
     $this->createEntityReferenceField(
@@ -181,7 +181,7 @@ public function testEmptyRelationshipFilteringFromIssue3025372() {
    *
    * @see https://www.drupal.org/project/drupal/issues/3036593
    */
-  public function testFilteringEntitiesByEntityReferenceTargetId() {
+  public function testFilteringEntitiesByEntityReferenceTargetId(): void {
     // Create two config entities to be the config targets of an entity
     // reference. In this case, the `roles` field.
     $role_llamalovers = $this->drupalCreateRole([], 'llamalovers', 'Llama Lovers');
diff --git a/core/modules/jsonapi/tests/src/Functional/JsonApiFunctionalDateFieldTest.php b/core/modules/jsonapi/tests/src/Functional/JsonApiFunctionalDateFieldTest.php
index 8301d8a9fbdf..eebd9388af0c 100644
--- a/core/modules/jsonapi/tests/src/Functional/JsonApiFunctionalDateFieldTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/JsonApiFunctionalDateFieldTest.php
@@ -55,7 +55,7 @@ protected function setUp(): void {
   /**
    * Tests the GET method.
    */
-  public function testRead() {
+  public function testRead(): void {
     /** @var \Drupal\Core\Datetime\DateFormatterInterface $date_formatter */
     $date_formatter = $this->container->get('date.formatter');
 
diff --git a/core/modules/jsonapi/tests/src/Functional/JsonApiFunctionalMultilingualTest.php b/core/modules/jsonapi/tests/src/Functional/JsonApiFunctionalMultilingualTest.php
index d60a0e3df154..2b1992fb189d 100644
--- a/core/modules/jsonapi/tests/src/Functional/JsonApiFunctionalMultilingualTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/JsonApiFunctionalMultilingualTest.php
@@ -66,7 +66,7 @@ protected function setUp(): void {
   /**
    * Tests reading multilingual content.
    */
-  public function testReadMultilingual() {
+  public function testReadMultilingual(): void {
     // Different databases have different sort orders, so a sort is required so
     // test expectations do not need to vary per database.
     $default_sort = ['sort' => 'drupal_internal__nid'];
@@ -99,7 +99,7 @@ public function testReadMultilingual() {
   /**
    * Tests updating a translation.
    */
-  public function testPatchTranslation() {
+  public function testPatchTranslation(): void {
     $this->config('jsonapi.settings')->set('read_only', FALSE)->save(TRUE);
     $node = $this->nodes[0];
     $uuid = $node->uuid();
@@ -198,7 +198,7 @@ public function testPatchTranslation() {
   /**
    * Tests updating a translation fallback.
    */
-  public function testPatchTranslationFallback() {
+  public function testPatchTranslationFallback(): void {
     $this->config('jsonapi.settings')->set('read_only', FALSE)->save(TRUE);
     $node = $this->nodes[0];
     $uuid = $node->uuid();
@@ -239,7 +239,7 @@ public function testPatchTranslationFallback() {
   /**
    * Tests creating a translation.
    */
-  public function testPostTranslation() {
+  public function testPostTranslation(): void {
     $this->config('jsonapi.settings')->set('read_only', FALSE)->save(TRUE);
     $this->grantPermissions(Role::load(RoleInterface::ANONYMOUS_ID), [
       'bypass node access',
@@ -303,7 +303,7 @@ public function testPostTranslation() {
   /**
    * Tests deleting multilingual content.
    */
-  public function testDeleteMultilingual() {
+  public function testDeleteMultilingual(): void {
     $this->config('jsonapi.settings')->set('read_only', FALSE)->save(TRUE);
     $this->grantPermissions(Role::load(RoleInterface::ANONYMOUS_ID), [
       'bypass node access',
diff --git a/core/modules/jsonapi/tests/src/Functional/JsonApiFunctionalTest.php b/core/modules/jsonapi/tests/src/Functional/JsonApiFunctionalTest.php
index 211eae283778..59908f19ac30 100644
--- a/core/modules/jsonapi/tests/src/Functional/JsonApiFunctionalTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/JsonApiFunctionalTest.php
@@ -33,7 +33,7 @@ class JsonApiFunctionalTest extends JsonApiFunctionalTestBase {
   /**
    * Tests the GET method.
    */
-  public function testRead() {
+  public function testRead(): void {
     $this->createDefaultContent(61, 5, TRUE, TRUE, static::IS_NOT_MULTILINGUAL, FALSE);
     // Unpublish the last entity, so we can check access.
     $this->nodes[60]->setUnpublished()->save();
@@ -554,7 +554,7 @@ public function testRead() {
   /**
    * Tests the GET method on articles referencing the same tag twice.
    */
-  public function testReferencingTwiceRead() {
+  public function testReferencingTwiceRead(): void {
     $this->createDefaultContent(1, 1, FALSE, FALSE, static::IS_NOT_MULTILINGUAL, TRUE);
 
     // 1. Load all articles (1st page).
@@ -568,7 +568,7 @@ public function testReferencingTwiceRead() {
   /**
    * Tests POST, PATCH and DELETE.
    */
-  public function testWrite() {
+  public function testWrite(): void {
     $this->config('jsonapi.settings')->set('read_only', FALSE)->save(TRUE);
 
     $this->createDefaultContent(0, 3, FALSE, FALSE, static::IS_NOT_MULTILINGUAL, FALSE);
diff --git a/core/modules/jsonapi/tests/src/Functional/JsonApiPatchRegressionTest.php b/core/modules/jsonapi/tests/src/Functional/JsonApiPatchRegressionTest.php
index c2cd0d9e6cf7..b36cb8ce8aef 100644
--- a/core/modules/jsonapi/tests/src/Functional/JsonApiPatchRegressionTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/JsonApiPatchRegressionTest.php
@@ -48,7 +48,7 @@ class JsonApiPatchRegressionTest extends JsonApiFunctionalTestBase {
    *
    * @see https://www.drupal.org/project/drupal/issues/2953207
    */
-  public function testBundleSpecificTargetEntityTypeFromIssue2953207() {
+  public function testBundleSpecificTargetEntityTypeFromIssue2953207(): void {
     // Set up data model.
     $this->assertTrue($this->container->get('module_installer')->install(['comment'], TRUE), 'Installed modules.');
     $this->addDefaultCommentField('taxonomy_term', 'tags', 'comment', CommentItemInterface::OPEN, 'tcomment');
@@ -84,7 +84,7 @@ public function testBundleSpecificTargetEntityTypeFromIssue2953207() {
    *
    * @see https://www.drupal.org/project/drupal/issues/2976371
    */
-  public function testBundlelessRelationshipMutationFromIssue2973681() {
+  public function testBundlelessRelationshipMutationFromIssue2973681(): void {
     $this->config('jsonapi.settings')->set('read_only', FALSE)->save(TRUE);
 
     // Set up data model.
@@ -135,7 +135,7 @@ public function testBundlelessRelationshipMutationFromIssue2973681() {
    *
    * @see https://www.drupal.org/project/drupal/issues/2968972
    */
-  public function testDanglingReferencesInAnEntityReferenceFieldFromIssue2968972() {
+  public function testDanglingReferencesInAnEntityReferenceFieldFromIssue2968972(): void {
     $this->config('jsonapi.settings')->set('read_only', FALSE)->save(TRUE);
 
     // Set up data model.
@@ -206,7 +206,7 @@ public function testDanglingReferencesInAnEntityReferenceFieldFromIssue2968972()
    *
    * @see https://www.drupal.org/project/drupal/issues/3021194
    */
-  public function testPatchingDateTimeFieldsFromIssue3021194() {
+  public function testPatchingDateTimeFieldsFromIssue3021194(): void {
     $this->config('jsonapi.settings')->set('read_only', FALSE)->save(TRUE);
 
     // Set up data model.
@@ -289,7 +289,7 @@ public function testPatchingDateTimeFieldsFromIssue3021194() {
    *
    * @see https://www.drupal.org/project/drupal/issues/3026030
    */
-  public function testPatchToIncludeUrlDoesNotReturnIncludeFromIssue3026030() {
+  public function testPatchToIncludeUrlDoesNotReturnIncludeFromIssue3026030(): void {
     $this->config('jsonapi.settings')->set('read_only', FALSE)->save(TRUE);
 
     // Set up data model.
@@ -335,7 +335,7 @@ public function testPatchToIncludeUrlDoesNotReturnIncludeFromIssue3026030() {
    *
    * @see https://www.drupal.org/project/drupal/issues/3043168
    */
-  public function testNonTranslatableEntityUpdatesFromIssue3043168() {
+  public function testNonTranslatableEntityUpdatesFromIssue3043168(): void {
     // Enable write-mode.
     $this->config('jsonapi.settings')->set('read_only', FALSE)->save(TRUE);
     // Set the site language to Russian.
@@ -399,7 +399,7 @@ public function testNonTranslatableEntityUpdatesFromIssue3043168() {
    *
    * @see https://www.drupal.org/project/drupal/issues/3127883
    */
-  public function testPatchInvalidFieldPropertyFromIssue3127883() {
+  public function testPatchInvalidFieldPropertyFromIssue3127883(): void {
     $this->config('jsonapi.settings')->set('read_only', FALSE)->save(TRUE);
 
     // Set up data model.
diff --git a/core/modules/jsonapi/tests/src/Functional/JsonApiRegressionTest.php b/core/modules/jsonapi/tests/src/Functional/JsonApiRegressionTest.php
index d40774144c35..81bbf299067c 100644
--- a/core/modules/jsonapi/tests/src/Functional/JsonApiRegressionTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/JsonApiRegressionTest.php
@@ -52,7 +52,7 @@ class JsonApiRegressionTest extends JsonApiFunctionalTestBase {
    *
    * @see https://www.drupal.org/project/drupal/issues/2973681
    */
-  public function testDeepNestedIncludeMultiTargetEntityTypeFieldFromIssue2973681() {
+  public function testDeepNestedIncludeMultiTargetEntityTypeFieldFromIssue2973681(): void {
     // Set up data model.
     $this->assertTrue($this->container->get('module_installer')->install(['comment'], TRUE), 'Installed modules.');
     $this->addDefaultCommentField('node', 'article');
@@ -116,7 +116,7 @@ public function testDeepNestedIncludeMultiTargetEntityTypeFieldFromIssue2973681(
    *
    * @see https://www.drupal.org/project/drupal/issues/2977879
    */
-  public function testGetTermWhenMultipleVocabulariesExistFromIssue2977879() {
+  public function testGetTermWhenMultipleVocabulariesExistFromIssue2977879(): void {
     // Set up data model.
     $this->assertTrue($this->container->get('module_installer')->install(['taxonomy'], TRUE), 'Installed modules.');
     Vocabulary::create([
@@ -152,7 +152,7 @@ public function testGetTermWhenMultipleVocabulariesExistFromIssue2977879() {
    *
    * @see https://www.drupal.org/project/drupal/issues/2984964
    */
-  public function testGetNodeCollectionWithHookNodeGrantsImplementationsFromIssue2984964() {
+  public function testGetNodeCollectionWithHookNodeGrantsImplementationsFromIssue2984964(): void {
     // Set up data model.
     $this->assertTrue($this->container->get('module_installer')->install(['node_access_test'], TRUE), 'Installed modules.');
     node_access_rebuild();
@@ -183,7 +183,7 @@ public function testGetNodeCollectionWithHookNodeGrantsImplementationsFromIssue2
    *
    * @see https://www.drupal.org/project/drupal/issues/2984647
    */
-  public function testDanglingReferencesInAnEntityReferenceFieldFromIssue2984647() {
+  public function testDanglingReferencesInAnEntityReferenceFieldFromIssue2984647(): void {
     // Set up data model.
     $this->drupalCreateContentType(['type' => 'journal_issue']);
     $this->drupalCreateContentType(['type' => 'journal_conference']);
@@ -317,7 +317,7 @@ public function testDanglingReferencesInAnEntityReferenceFieldFromIssue2984647()
    *
    * @see https://www.drupal.org/project/drupal/issues/2984886
    */
-  public function testThatRoutesAreRebuiltAfterDataModelChangesFromIssue2984886() {
+  public function testThatRoutesAreRebuiltAfterDataModelChangesFromIssue2984886(): void {
     $user = $this->drupalCreateUser(['access content']);
     $request_options = [
       RequestOptions::AUTH => [
@@ -380,7 +380,7 @@ public function testThatRoutesAreRebuiltAfterDataModelChangesFromIssue2984886()
    * @see https://www.drupal.org/project/drupal/issues/3007113
    * @see https://www.drupal.org/project/jsonapi_extras/issues/3004582#comment-12817261
    */
-  public function testDenormalizeAliasedRelationshipFromIssue2953207() {
+  public function testDenormalizeAliasedRelationshipFromIssue2953207(): void {
     $this->config('jsonapi.settings')->set('read_only', FALSE)->save(TRUE);
 
     // Since the JSON:API module does not have an explicit mechanism to set up
@@ -437,7 +437,7 @@ public function testDenormalizeAliasedRelationshipFromIssue2953207() {
    *
    * @see https://www.drupal.org/project/drupal/issues/3009596
    */
-  public function testPageCacheFromIssue3009596() {
+  public function testPageCacheFromIssue3009596(): void {
     $anonymous_role = Role::load(RoleInterface::ANONYMOUS_ID);
     $anonymous_role->grantPermission('access content');
     $anonymous_role->trustData()->save();
@@ -475,7 +475,7 @@ public function testPageCacheFromIssue3009596() {
    *
    * @see https://www.drupal.org/project/drupal/issues/2999438
    */
-  public function testPatchingDateTimeNormalizedWrongTimeZoneIssue3021194() {
+  public function testPatchingDateTimeNormalizedWrongTimeZoneIssue3021194(): void {
     // Set up data model.
     $this->assertTrue($this->container->get('module_installer')->install(['datetime'], TRUE), 'Installed modules.');
     $this->drupalCreateContentType(['type' => 'page']);
@@ -524,7 +524,7 @@ public function testPatchingDateTimeNormalizedWrongTimeZoneIssue3021194() {
    *
    * @see https://www.drupal.org/project/drupal/issues/3026030
    */
-  public function testPostToIncludeUrlDoesNotReturnIncludeFromIssue3026030() {
+  public function testPostToIncludeUrlDoesNotReturnIncludeFromIssue3026030(): void {
     $this->config('jsonapi.settings')->set('read_only', FALSE)->save(TRUE);
 
     // Set up data model.
@@ -561,7 +561,7 @@ public function testPostToIncludeUrlDoesNotReturnIncludeFromIssue3026030() {
    *
    * @see https://www.drupal.org/project/drupal/issues/3040590
    */
-  public function testMapFieldTypeNormalizationFromIssue3040590() {
+  public function testMapFieldTypeNormalizationFromIssue3040590(): void {
     $this->assertTrue($this->container->get('module_installer')->install(['entity_test'], TRUE), 'Installed modules.');
 
     // Create data.
@@ -606,7 +606,7 @@ public function testMapFieldTypeNormalizationFromIssue3040590() {
   /**
    * Tests that the response still has meaningful error messages.
    */
-  public function testRecursionDetectedWhenResponseContainsViolationsFrom3042124() {
+  public function testRecursionDetectedWhenResponseContainsViolationsFrom3042124(): void {
     $this->config('jsonapi.settings')->set('read_only', FALSE)->save(TRUE);
 
     // Set up default request.
@@ -656,7 +656,7 @@ public function testRecursionDetectedWhenResponseContainsViolationsFrom3042124()
    *
    * @see https://www.drupal.org/project/drupal/issues/3052954
    */
-  public function testInvalidDataTriggersUnprocessableEntityErrorFromIssue3052954() {
+  public function testInvalidDataTriggersUnprocessableEntityErrorFromIssue3052954(): void {
     $this->config('jsonapi.settings')->set('read_only', FALSE)->save(TRUE);
 
     // Set up data model.
@@ -686,7 +686,7 @@ public function testInvalidDataTriggersUnprocessableEntityErrorFromIssue3052954(
   /**
    * Ensure optional `@FieldType=map` fields are denormalized correctly.
    */
-  public function testEmptyMapFieldTypeDenormalization() {
+  public function testEmptyMapFieldTypeDenormalization(): void {
     $this->config('jsonapi.settings')->set('read_only', FALSE)->save(TRUE);
 
     // Set up data model.
@@ -727,7 +727,7 @@ public function testEmptyMapFieldTypeDenormalization() {
   /**
    * Ensure EntityAccessDeniedHttpException cacheability is taken into account.
    */
-  public function testLeakCacheMetadataInOmitted() {
+  public function testLeakCacheMetadataInOmitted(): void {
     $term = Term::create([
       'name' => 'Llama term',
       'vid' => 'tags',
@@ -787,7 +787,7 @@ public function testLeakCacheMetadataInOmitted() {
    * @see https://www.drupal.org/project/drupal/issues/3034786
    * @see https://www.drupal.org/project/drupal/issues/3035544
    */
-  public function testAliasedFieldsWithVirtualRelationships() {
+  public function testAliasedFieldsWithVirtualRelationships(): void {
     // Set up the data model.
     $this->assertTrue($this->container->get('module_installer')->install([
       'taxonomy',
@@ -834,7 +834,7 @@ public function testAliasedFieldsWithVirtualRelationships() {
    *
    * @see https://www.drupal.org/project/drupal/issues/3072076
    */
-  public function testNonCacheableMethods() {
+  public function testNonCacheableMethods(): void {
     $this->container->get('module_installer')->install([
       'jsonapi_test_non_cacheable_methods',
     ], TRUE);
diff --git a/core/modules/jsonapi/tests/src/Functional/MediaTest.php b/core/modules/jsonapi/tests/src/Functional/MediaTest.php
index 055bc9319469..e733e773bc4e 100644
--- a/core/modules/jsonapi/tests/src/Functional/MediaTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/MediaTest.php
@@ -360,7 +360,7 @@ protected function getExpectedUnauthorizedAccessCacheability() {
   /**
    * {@inheritdoc}
    */
-  public function testPostIndividual() {
+  public function testPostIndividual(): void {
     // @todo Mimic \Drupal\Tests\rest\Functional\EntityResource\Media\MediaResourceTestBase::testPost()
     // @todo Later, use https://www.drupal.org/project/drupal/issues/2958554 to upload files rather than the REST module.
     parent::testPostIndividual();
@@ -406,7 +406,7 @@ protected function doTestRelationshipMutation(array $request_options) {
   /**
    * {@inheritdoc}
    */
-  public function testCollectionFilterAccess() {
+  public function testCollectionFilterAccess(): void {
     $this->doTestCollectionFilterAccessForPublishableEntities('name', 'view media', 'administer media');
   }
 
diff --git a/core/modules/jsonapi/tests/src/Functional/MenuLinkContentTest.php b/core/modules/jsonapi/tests/src/Functional/MenuLinkContentTest.php
index b11309512638..93b3d8306800 100644
--- a/core/modules/jsonapi/tests/src/Functional/MenuLinkContentTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/MenuLinkContentTest.php
@@ -187,7 +187,7 @@ protected function getExpectedUnauthorizedAccessMessage($method) {
   /**
    * {@inheritdoc}
    */
-  public function testCollectionFilterAccess() {
+  public function testCollectionFilterAccess(): void {
     $this->doTestCollectionFilterAccessBasedOnPermissions('title', 'administer menu');
   }
 
@@ -196,7 +196,7 @@ public function testCollectionFilterAccess() {
    *
    * @see https://security.drupal.org/node/161923
    */
-  public function testLinkOptionsSerialization() {
+  public function testLinkOptionsSerialization(): void {
     $this->config('jsonapi.settings')->set('read_only', FALSE)->save(TRUE);
 
     $document = $this->getPostDocument();
diff --git a/core/modules/jsonapi/tests/src/Functional/MessageTest.php b/core/modules/jsonapi/tests/src/Functional/MessageTest.php
index d1ab23e2043c..ed23715b0735 100644
--- a/core/modules/jsonapi/tests/src/Functional/MessageTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/MessageTest.php
@@ -121,7 +121,7 @@ protected function getExpectedUnauthorizedAccessMessage($method) {
   /**
    * {@inheritdoc}
    */
-  public function testGetIndividual() {
+  public function testGetIndividual(): void {
     // Contact Message entities are not stored, so they cannot be retrieved.
     $this->expectException(RouteNotFoundException::class);
     $this->expectExceptionMessage('Route "jsonapi.contact_message--camelids.individual" does not exist.');
@@ -132,7 +132,7 @@ public function testGetIndividual() {
   /**
    * {@inheritdoc}
    */
-  public function testPatchIndividual() {
+  public function testPatchIndividual(): void {
     // Contact Message entities are not stored, so they cannot be modified.
     $this->expectException(RouteNotFoundException::class);
     $this->expectExceptionMessage('Route "jsonapi.contact_message--camelids.individual" does not exist.');
@@ -143,7 +143,7 @@ public function testPatchIndividual() {
   /**
    * {@inheritdoc}
    */
-  public function testDeleteIndividual() {
+  public function testDeleteIndividual(): void {
     // Contact Message entities are not stored, so they cannot be deleted.
     $this->expectException(RouteNotFoundException::class);
     $this->expectExceptionMessage('Route "jsonapi.contact_message--camelids.individual" does not exist.');
@@ -154,7 +154,7 @@ public function testDeleteIndividual() {
   /**
    * {@inheritdoc}
    */
-  public function testRelated() {
+  public function testRelated(): void {
     // Contact Message entities are not stored, so they cannot be retrieved.
     $this->expectException(RouteNotFoundException::class);
     $this->expectExceptionMessage('Route "jsonapi.contact_message--camelids.related" does not exist.');
@@ -165,7 +165,7 @@ public function testRelated() {
   /**
    * {@inheritdoc}
    */
-  public function testRelationships() {
+  public function testRelationships(): void {
     // Contact Message entities are not stored, so they cannot be retrieved.
     $this->expectException(RouteNotFoundException::class);
     $this->expectExceptionMessage('Route "jsonapi.contact_message--camelids.relationship.get" does not exist.');
@@ -176,7 +176,7 @@ public function testRelationships() {
   /**
    * {@inheritdoc}
    */
-  public function testCollection() {
+  public function testCollection(): void {
     $collection_url = Url::fromRoute('jsonapi.contact_message--camelids.collection.post')->setAbsolute(TRUE);
     $request_options = [];
     $request_options[RequestOptions::HEADERS]['Accept'] = 'application/vnd.api+json';
@@ -192,7 +192,7 @@ public function testCollection() {
   /**
    * {@inheritdoc}
    */
-  public function testRevisions() {
+  public function testRevisions(): void {
     // Contact Message entities are not stored, so they cannot be retrieved.
     $this->expectException(RouteNotFoundException::class);
     $this->expectExceptionMessage('Route "jsonapi.contact_message--camelids.individual" does not exist.');
diff --git a/core/modules/jsonapi/tests/src/Functional/NodeTest.php b/core/modules/jsonapi/tests/src/Functional/NodeTest.php
index d684c5833135..710fa6577f44 100644
--- a/core/modules/jsonapi/tests/src/Functional/NodeTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/NodeTest.php
@@ -281,7 +281,7 @@ protected function getExpectedUnauthorizedAccessMessage($method) {
    * @see \Drupal\Tests\jsonapi\Functional\TermTest::testPatchPath()
    * @see \Drupal\Tests\rest\Functional\EntityResource\Term\TermResourceTestBase::testPatchPath()
    */
-  public function testPatchPath() {
+  public function testPatchPath(): void {
     $this->setUpAuthorization('GET');
     $this->setUpAuthorization('PATCH');
     $this->config('jsonapi.settings')->set('read_only', FALSE)->save(TRUE);
@@ -319,7 +319,7 @@ public function testPatchPath() {
   /**
    * {@inheritdoc}
    */
-  public function testGetIndividual() {
+  public function testGetIndividual(): void {
     // Cacheable normalizations are written after the response is flushed to
     // the client. We use WaitTerminateTestTrait to wait for Drupal to perform
     // its termination work before continuing.
@@ -429,7 +429,7 @@ protected static function getIncludePermissions() {
    *
    * @see https://github.com/json-api/json-api/issues/1033
    */
-  public function testPostNonExistingAuthor() {
+  public function testPostNonExistingAuthor(): void {
     $this->setUpAuthorization('POST');
     $this->config('jsonapi.settings')->set('read_only', FALSE)->save(TRUE);
     $this->grantPermissionsToTestedRole(['administer nodes']);
@@ -470,7 +470,7 @@ public function testPostNonExistingAuthor() {
   /**
    * {@inheritdoc}
    */
-  public function testCollectionFilterAccess() {
+  public function testCollectionFilterAccess(): void {
     $label_field_name = 'title';
     $this->doTestCollectionFilterAccessForPublishableEntities($label_field_name, 'access content', 'bypass node access');
 
diff --git a/core/modules/jsonapi/tests/src/Functional/ResourceTestBase.php b/core/modules/jsonapi/tests/src/Functional/ResourceTestBase.php
index f54943a9b9dc..f95f4a4c1c39 100644
--- a/core/modules/jsonapi/tests/src/Functional/ResourceTestBase.php
+++ b/core/modules/jsonapi/tests/src/Functional/ResourceTestBase.php
@@ -930,7 +930,7 @@ protected function makeNormalizationInvalid(array $document, $entity_key) {
   /**
    * Tests GETting an individual resource, plus edge cases to ensure good DX.
    */
-  public function testGetIndividual() {
+  public function testGetIndividual(): void {
     // The URL and Guzzle request options that will be used in this test. The
     // request options will be modified/expanded throughout this test:
     // - to first test all mistakes a developer might make, and assert that the
@@ -1088,7 +1088,7 @@ public function testGetIndividual() {
   /**
    * Tests GETting a collection of resources.
    */
-  public function testCollection() {
+  public function testCollection(): void {
     $entity_collection = $this->getData();
     assert(count($entity_collection) > 1, 'A collection must have more that one entity in it.');
 
@@ -1318,7 +1318,7 @@ protected function getExpectedCollectionResponse(array $collection, $self_link,
    * single expected ResourceResponse. This is repeated for every relationship
    * field of the resource type under test.
    */
-  public function testRelated() {
+  public function testRelated(): void {
     $request_options = [];
     $request_options[RequestOptions::HEADERS]['Accept'] = 'application/vnd.api+json';
     $request_options = NestedArray::mergeDeep($request_options, $this->getAuthenticationRequestOptions());
@@ -1337,7 +1337,7 @@ public function testRelated() {
    * targeted resource and the target resource IDs. These type+ID combos are
    * referred to as "resource identifiers."
    */
-  public function testRelationships() {
+  public function testRelationships(): void {
     if ($this->entity instanceof ConfigEntityInterface) {
       $this->markTestSkipped('Configuration entities cannot have relationships.');
     }
@@ -1984,7 +1984,7 @@ protected function getExpectedRelatedResponse($relationship_field_name, array $r
   /**
    * Tests POSTing an individual resource, plus edge cases to ensure good DX.
    */
-  public function testPostIndividual() {
+  public function testPostIndividual(): void {
     // @todo Remove this in https://www.drupal.org/node/2300677.
     if ($this->entity instanceof ConfigEntityInterface) {
       $this->markTestSkipped('POSTing config entities is not yet supported.');
@@ -2199,7 +2199,7 @@ public function testPostIndividual() {
   /**
    * Tests PATCHing an individual resource, plus edge cases to ensure good DX.
    */
-  public function testPatchIndividual() {
+  public function testPatchIndividual(): void {
     // @todo Remove this in https://www.drupal.org/node/2300677.
     if ($this->entity instanceof ConfigEntityInterface) {
       $this->markTestSkipped('PATCHing config entities is not yet supported.');
@@ -2527,7 +2527,7 @@ public function testPatchIndividual() {
   /**
    * Tests DELETEing an individual resource, plus edge cases to ensure good DX.
    */
-  public function testDeleteIndividual() {
+  public function testDeleteIndividual(): void {
     // @todo Remove this in https://www.drupal.org/node/2300677.
     if ($this->entity instanceof ConfigEntityInterface) {
       $this->markTestSkipped('DELETEing config entities is not yet supported.');
@@ -2804,7 +2804,7 @@ protected function doTestIncluded(Url $url, array $request_options) {
   /**
    * Tests individual and collection revisions.
    */
-  public function testRevisions() {
+  public function testRevisions(): void {
     if (!$this->entity->getEntityType()->isRevisionable() || !$this->entity instanceof FieldableEntityInterface) {
       return;
     }
diff --git a/core/modules/jsonapi/tests/src/Functional/RestExportJsonApiUnsupported.php b/core/modules/jsonapi/tests/src/Functional/RestExportJsonApiUnsupported.php
index 35b2d039affc..8d71894b92f9 100644
--- a/core/modules/jsonapi/tests/src/Functional/RestExportJsonApiUnsupported.php
+++ b/core/modules/jsonapi/tests/src/Functional/RestExportJsonApiUnsupported.php
@@ -42,7 +42,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['rest_test_views
   /**
    * Tests that 'api_json' is not a RestExport format option.
    */
-  public function testFormatOptions() {
+  public function testFormatOptions(): void {
     $this->assertSame(['json' => 'serialization', 'xml' => 'serialization'], $this->container->getParameter('serializer.format_providers'));
 
     $this->drupalGet('admin/structure/views/nojs/display/test_serializer_display_entity/rest_export_1/style_options');
diff --git a/core/modules/jsonapi/tests/src/Functional/RestJsonApiUnsupported.php b/core/modules/jsonapi/tests/src/Functional/RestJsonApiUnsupported.php
index 22f5ff77b4f7..ade4cf3b6903 100644
--- a/core/modules/jsonapi/tests/src/Functional/RestJsonApiUnsupported.php
+++ b/core/modules/jsonapi/tests/src/Functional/RestJsonApiUnsupported.php
@@ -88,7 +88,7 @@ protected function setUp(): void {
    *
    * @see \Drupal\jsonapi\EventSubscriber\JsonApiRequestValidator::validateQueryParams()
    */
-  public function testApiJsonNotSupportedInRest() {
+  public function testApiJsonNotSupportedInRest(): void {
     $this->assertSame(['json', 'xml'], $this->container->getParameter('serializer.formats'));
 
     $this->provisionResource(['api_json'], []);
diff --git a/core/modules/jsonapi/tests/src/Functional/ShortcutTest.php b/core/modules/jsonapi/tests/src/Functional/ShortcutTest.php
index 54f2ce2cef85..adaff9b9eba7 100644
--- a/core/modules/jsonapi/tests/src/Functional/ShortcutTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/ShortcutTest.php
@@ -159,7 +159,7 @@ protected function getExpectedUnauthorizedAccessMessage($method) {
   /**
    * {@inheritdoc}
    */
-  public function testCollectionFilterAccess() {
+  public function testCollectionFilterAccess(): void {
     $label_field_name = 'title';
     // Verify the expected behavior in the common case: default shortcut set.
     $this->grantPermissionsToTestedRole(['customize shortcut links']);
diff --git a/core/modules/jsonapi/tests/src/Functional/TermTest.php b/core/modules/jsonapi/tests/src/Functional/TermTest.php
index 3488320df324..2e8348f21567 100644
--- a/core/modules/jsonapi/tests/src/Functional/TermTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/TermTest.php
@@ -401,7 +401,7 @@ protected function getExpectedUnauthorizedAccessCacheability() {
    * @see \Drupal\Tests\jsonapi\Functional\NodeTest::testPatchPath()
    * @see \Drupal\Tests\rest\Functional\EntityResource\Node\NodeResourceTestBase::testPatchPath()
    */
-  public function testPatchPath() {
+  public function testPatchPath(): void {
     $this->setUpAuthorization('GET');
     $this->setUpAuthorization('PATCH');
     $this->config('jsonapi.settings')->set('read_only', FALSE)->save(TRUE);
@@ -460,7 +460,7 @@ protected function getExpectedCacheContexts(?array $sparse_fieldset = NULL) {
    *
    * @dataProvider providerTestGetIndividualTermWithParent
    */
-  public function testGetIndividualTermWithParent(array $parent_term_ids) {
+  public function testGetIndividualTermWithParent(array $parent_term_ids): void {
     // Create all possible parent terms.
     Term::create(['vid' => Vocabulary::load('camelids')->id()])
       ->setName('Lamoids')
@@ -506,7 +506,7 @@ public static function providerTestGetIndividualTermWithParent() {
   /**
    * {@inheritdoc}
    */
-  public function testCollectionFilterAccess() {
+  public function testCollectionFilterAccess(): void {
     $this->doTestCollectionFilterAccessBasedOnPermissions('name', 'access content');
   }
 
diff --git a/core/modules/jsonapi/tests/src/Functional/UserTest.php b/core/modules/jsonapi/tests/src/Functional/UserTest.php
index 2aa931dae097..a7db8bd9aa5f 100644
--- a/core/modules/jsonapi/tests/src/Functional/UserTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/UserTest.php
@@ -128,7 +128,7 @@ protected function createAnotherEntity($key) {
   /**
    * {@inheritdoc}
    */
-  public function testDeleteIndividual() {
+  public function testDeleteIndividual(): void {
     $this->config('user.settings')->set('cancel_method', 'user_cancel_delete')->save(TRUE);
 
     parent::testDeleteIndividual();
@@ -217,7 +217,7 @@ protected function getExpectedUnauthorizedAccessMessage($method) {
   /**
    * Tests PATCHing security-sensitive base fields of the logged in account.
    */
-  public function testPatchDxForSecuritySensitiveBaseFields() {
+  public function testPatchDxForSecuritySensitiveBaseFields(): void {
     // @todo Remove line below in favor of commented line in https://www.drupal.org/project/drupal/issues/2878463.
     $url = Url::fromRoute(sprintf('jsonapi.user--user.individual'), ['entity' => $this->account->uuid()]);
     /* $url = $this->account->toUrl('jsonapi'); */
@@ -337,7 +337,7 @@ protected function assertRpcLogin(string $username, string $password): void {
   /**
    * Tests PATCHing security-sensitive base fields to change other users.
    */
-  public function testPatchSecurityOtherUser() {
+  public function testPatchSecurityOtherUser(): void {
     // @todo Remove line below in favor of commented line in https://www.drupal.org/project/drupal/issues/2878463.
     $url = Url::fromRoute(sprintf('jsonapi.user--user.individual'), ['entity' => $this->account->uuid()]);
     /* $url = $this->account->toUrl('jsonapi'); */
@@ -378,7 +378,7 @@ public function testPatchSecurityOtherUser() {
   /**
    * Tests GETting privacy-sensitive base fields.
    */
-  public function testGetMailFieldOnlyVisibleToOwner() {
+  public function testGetMailFieldOnlyVisibleToOwner(): void {
     // Create user B, with the same roles (and hence permissions) as user A.
     $user_a = $this->account;
     $pass = \Drupal::service('password_generator')->generate();
@@ -446,7 +446,7 @@ public function testGetMailFieldOnlyVisibleToOwner() {
   /**
    * Tests good error DX when trying to filter users by role.
    */
-  public function testQueryInvolvingRoles() {
+  public function testQueryInvolvingRoles(): void {
     $this->setUpAuthorization('GET');
 
     $collection_url = Url::fromRoute('jsonapi.user--user.collection', [], ['query' => ['filter[roles.id][value]' => 'e9b1de3f-9517-4c27-bef0-0301229de792']]);
@@ -465,7 +465,7 @@ public function testQueryInvolvingRoles() {
   /**
    * Tests that the collection contains the anonymous user.
    */
-  public function testCollectionContainsAnonymousUser() {
+  public function testCollectionContainsAnonymousUser(): void {
     $url = Url::fromRoute('jsonapi.user--user.collection', [], ['query' => ['sort' => 'drupal_internal__uid']]);
     $request_options = [];
     $request_options[RequestOptions::HEADERS]['Accept'] = 'application/vnd.api+json';
@@ -482,7 +482,7 @@ public function testCollectionContainsAnonymousUser() {
   /**
    * {@inheritdoc}
    */
-  public function testCollectionFilterAccess() {
+  public function testCollectionFilterAccess(): void {
     // Set up data model.
     $this->assertTrue($this->container->get('module_installer')->install(['node'], TRUE), 'Installed modules.');
     FieldStorageConfig::create([
@@ -589,7 +589,7 @@ public function testCollectionFilterAccess() {
   /**
    * Tests users with altered display names.
    */
-  public function testResaveAccountName() {
+  public function testResaveAccountName(): void {
     $this->config('jsonapi.settings')->set('read_only', FALSE)->save(TRUE);
     $this->setUpAuthorization('PATCH');
 
@@ -617,7 +617,7 @@ public function testResaveAccountName() {
   /**
    * Tests if JSON:API respects user.settings.cancel_method: user_cancel_block.
    */
-  public function testDeleteRespectsUserCancelBlock() {
+  public function testDeleteRespectsUserCancelBlock(): void {
     $cancel_method = 'user_cancel_block';
     $this->config('jsonapi.settings')->set('read_only', FALSE)->save(TRUE);
     $this->config('user.settings')->set('cancel_method', $cancel_method)->save(TRUE);
@@ -647,7 +647,7 @@ public function testDeleteRespectsUserCancelBlock() {
   /**
    * Tests if JSON:API respects user.settings.cancel_method: user_cancel_block_unpublish.
    */
-  public function testDeleteRespectsUserCancelBlockUnpublish() {
+  public function testDeleteRespectsUserCancelBlockUnpublish(): void {
     $cancel_method = 'user_cancel_block_unpublish';
     $this->config('jsonapi.settings')->set('read_only', FALSE)->save(TRUE);
     $this->config('user.settings')->set('cancel_method', $cancel_method)->save(TRUE);
@@ -678,7 +678,7 @@ public function testDeleteRespectsUserCancelBlockUnpublish() {
    * Tests if JSON:API respects user.settings.cancel_method: user_cancel_block_unpublish.
    * @group jsonapi
    */
-  public function testDeleteRespectsUserCancelBlockUnpublishAndProcessesBatches() {
+  public function testDeleteRespectsUserCancelBlockUnpublishAndProcessesBatches(): void {
     $cancel_method = 'user_cancel_block_unpublish';
     $this->config('jsonapi.settings')->set('read_only', FALSE)->save(TRUE);
     $this->config('user.settings')->set('cancel_method', $cancel_method)->save(TRUE);
@@ -724,7 +724,7 @@ public function testDeleteRespectsUserCancelBlockUnpublishAndProcessesBatches()
   /**
    * Tests if JSON:API respects user.settings.cancel_method: user_cancel_reassign.
    */
-  public function testDeleteRespectsUserCancelReassign() {
+  public function testDeleteRespectsUserCancelReassign(): void {
     $cancel_method = 'user_cancel_reassign';
     $this->config('jsonapi.settings')->set('read_only', FALSE)->save(TRUE);
     $this->config('user.settings')->set('cancel_method', $cancel_method)->save(TRUE);
@@ -755,7 +755,7 @@ public function testDeleteRespectsUserCancelReassign() {
   /**
    * Tests if JSON:API respects user.settings.cancel_method: user_cancel_delete.
    */
-  public function testDeleteRespectsUserCancelDelete() {
+  public function testDeleteRespectsUserCancelDelete(): void {
     $cancel_method = 'user_cancel_delete';
     $this->config('jsonapi.settings')->set('read_only', FALSE)->save(TRUE);
     $this->config('user.settings')->set('cancel_method', $cancel_method)->save(TRUE);
diff --git a/core/modules/jsonapi/tests/src/Kernel/Context/FieldResolverTest.php b/core/modules/jsonapi/tests/src/Kernel/Context/FieldResolverTest.php
index 14c610f48b01..de7aed89105b 100644
--- a/core/modules/jsonapi/tests/src/Kernel/Context/FieldResolverTest.php
+++ b/core/modules/jsonapi/tests/src/Kernel/Context/FieldResolverTest.php
@@ -89,7 +89,7 @@ protected function setUp(): void {
    * @covers ::resolveInternalEntityQueryPath
    * @dataProvider resolveInternalIncludePathProvider
    */
-  public function testResolveInternalIncludePath($expect, $external_path, $entity_type_id = 'entity_test_with_bundle', $bundle = 'bundle1') {
+  public function testResolveInternalIncludePath($expect, $external_path, $entity_type_id = 'entity_test_with_bundle', $bundle = 'bundle1'): void {
     $path_parts = explode('.', $external_path);
     $resource_type = $this->resourceTypeRepository->get($entity_type_id, $bundle);
     $this->assertEquals($expect, $this->sut->resolveInternalIncludePath($resource_type, $path_parts));
@@ -131,7 +131,7 @@ public static function resolveInternalIncludePathProvider() {
    * @covers ::resolveInternalIncludePath
    * @dataProvider resolveInternalIncludePathErrorProvider
    */
-  public function testResolveInternalIncludePathError($entity_type, $bundle, $external_path, $expected_message = '') {
+  public function testResolveInternalIncludePathError($entity_type, $bundle, $external_path, $expected_message = ''): void {
     $path_parts = explode('.', $external_path);
     $this->expectException(CacheableBadRequestHttpException::class);
     if (!empty($expected_message)) {
@@ -174,7 +174,7 @@ public static function resolveInternalIncludePathErrorProvider() {
    * @covers ::resolveInternalEntityQueryPath
    * @dataProvider resolveInternalEntityQueryPathProvider
    */
-  public function testResolveInternalEntityQueryPath($expect, $external_path, $entity_type_id = 'entity_test_with_bundle', $bundle = 'bundle1') {
+  public function testResolveInternalEntityQueryPath($expect, $external_path, $entity_type_id = 'entity_test_with_bundle', $bundle = 'bundle1'): void {
     $resource_type = $this->resourceTypeRepository->get($entity_type_id, $bundle);
     $this->assertEquals($expect, $this->sut->resolveInternalEntityQueryPath($resource_type, $external_path));
   }
@@ -255,7 +255,7 @@ public static function resolveInternalEntityQueryPathProvider() {
    * @covers ::resolveInternalEntityQueryPath
    * @dataProvider resolveInternalEntityQueryPathErrorProvider
    */
-  public function testResolveInternalEntityQueryPathError($entity_type, $bundle, $external_path, $expected_message = '') {
+  public function testResolveInternalEntityQueryPathError($entity_type, $bundle, $external_path, $expected_message = ''): void {
     $this->expectException(CacheableBadRequestHttpException::class);
     if (!empty($expected_message)) {
       $this->expectExceptionMessage($expected_message);
diff --git a/core/modules/jsonapi/tests/src/Kernel/Controller/EntityResourceTest.php b/core/modules/jsonapi/tests/src/Kernel/Controller/EntityResourceTest.php
index 0c330e56a2ba..4c5291eb1d94 100644
--- a/core/modules/jsonapi/tests/src/Kernel/Controller/EntityResourceTest.php
+++ b/core/modules/jsonapi/tests/src/Kernel/Controller/EntityResourceTest.php
@@ -195,7 +195,7 @@ protected function createEntityResource() {
   /**
    * @covers ::getCollection
    */
-  public function testGetPagedCollection() {
+  public function testGetPagedCollection(): void {
     $request = Request::create('/jsonapi/node/article');
     $request->query = new InputBag([
       'sort' => 'nid',
@@ -224,7 +224,7 @@ public function testGetPagedCollection() {
   /**
    * @covers ::getCollection
    */
-  public function testGetEmptyCollection() {
+  public function testGetEmptyCollection(): void {
     $request = Request::create('/jsonapi/node/article');
     $request->query = new InputBag(['filter' => ['id' => 'invalid']]);
 
diff --git a/core/modules/jsonapi/tests/src/Kernel/Controller/FileUploadTest.php b/core/modules/jsonapi/tests/src/Kernel/Controller/FileUploadTest.php
index a4ceba719cb0..14f4b8f2df45 100644
--- a/core/modules/jsonapi/tests/src/Kernel/Controller/FileUploadTest.php
+++ b/core/modules/jsonapi/tests/src/Kernel/Controller/FileUploadTest.php
@@ -89,7 +89,7 @@ protected function setUp(): void {
   /**
    * @covers ::checkFileUploadAccess
    */
-  public function testCheckFileUploadAccessWithBaseField() {
+  public function testCheckFileUploadAccessWithBaseField(): void {
     // Create a set of users for access testing.
     $article_editor = User::create([
       'name' => 'article editor',
diff --git a/core/modules/jsonapi/tests/src/Kernel/EventSubscriber/ResourceObjectNormalizerCacherTest.php b/core/modules/jsonapi/tests/src/Kernel/EventSubscriber/ResourceObjectNormalizerCacherTest.php
index d3ad196bbb17..93ed8c7ddba2 100644
--- a/core/modules/jsonapi/tests/src/Kernel/EventSubscriber/ResourceObjectNormalizerCacherTest.php
+++ b/core/modules/jsonapi/tests/src/Kernel/EventSubscriber/ResourceObjectNormalizerCacherTest.php
@@ -75,7 +75,7 @@ protected function setUp(): void {
    *
    * @see https://www.drupal.org/project/drupal/issues/3077287
    */
-  public function testLinkNormalizationCacheability() {
+  public function testLinkNormalizationCacheability(): void {
     $user = User::create([
       'name' => $this->randomMachineName(),
       'pass' => $this->randomString(),
diff --git a/core/modules/jsonapi/tests/src/Kernel/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php b/core/modules/jsonapi/tests/src/Kernel/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php
index 9c6e07cb98a0..20a8ac792d75 100644
--- a/core/modules/jsonapi/tests/src/Kernel/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php
+++ b/core/modules/jsonapi/tests/src/Kernel/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php
@@ -261,7 +261,7 @@ protected function tearDown(): void {
   /**
    * @covers ::normalize
    */
-  public function testNormalize() {
+  public function testNormalize(): void {
     $resource_type = $this->container->get('jsonapi.resource_type.repository')->get('node', 'article');
 
     $resource_object = ResourceObject::createFromEntity($resource_type, $this->node);
@@ -362,7 +362,7 @@ public function testNormalize() {
   /**
    * @covers ::normalize
    */
-  public function testNormalizeUuid() {
+  public function testNormalizeUuid(): void {
     $resource_type = $this->container->get('jsonapi.resource_type.repository')->get('node', 'article');
     $resource_object = ResourceObject::createFromEntity($resource_type, $this->node);
     $include_param = 'uid,field_tags';
@@ -403,7 +403,7 @@ public function testNormalizeUuid() {
   /**
    * @covers ::normalize
    */
-  public function testNormalizeException() {
+  public function testNormalizeException(): void {
     $normalized = $this
       ->container
       ->get('jsonapi.serializer')
@@ -427,7 +427,7 @@ public function testNormalizeException() {
   /**
    * Tests the message and exceptions when requesting a Label only resource.
    */
-  public function testAliasFieldRouteException() {
+  public function testAliasFieldRouteException(): void {
     $this->assertSame('uid', $this->resourceTypeRepository->getByTypeName('node--article')->getPublicName('uid'));
     $this->assertSame('roles', $this->resourceTypeRepository->getByTypeName('user--user')->getPublicName('roles'));
     $resource_type_field_aliases = [
@@ -491,7 +491,7 @@ public function testAliasFieldRouteException() {
   /**
    * @covers ::normalize
    */
-  public function testNormalizeConfig() {
+  public function testNormalizeConfig(): void {
     $resource_type = $this->container->get('jsonapi.resource_type.repository')->get('node_type', 'node_type');
     $resource_object = ResourceObject::createFromEntity($resource_type, $this->nodeType);
     $document_wrapper = new JsonApiDocumentTopLevel(new ResourceObjectData([$resource_object], 1), new NullIncludedData(), new LinkCollection([]));
@@ -522,7 +522,7 @@ public function testNormalizeConfig() {
    *
    * @covers ::denormalize
    */
-  public function testDenormalize() {
+  public function testDenormalize(): void {
     $payload = '{"data":{"type":"article","attributes":{"title":"Testing article"}}}';
 
     $resource_type = $this->container->get('jsonapi.resource_type.repository')->get('node', 'article');
@@ -540,7 +540,7 @@ public function testDenormalize() {
    *
    * @covers ::denormalize
    */
-  public function testDenormalizeUuid() {
+  public function testDenormalizeUuid(): void {
     $configurations = [
       // Good data.
       [
@@ -634,7 +634,7 @@ public function testDenormalizeUuid() {
   /**
    * Tests denormalization for related resources with missing or invalid types.
    */
-  public function testDenormalizeInvalidTypeAndNoType() {
+  public function testDenormalizeInvalidTypeAndNoType(): void {
     $payload_data = [
       'data' => [
         'type' => 'node--article',
@@ -758,7 +758,7 @@ protected function denormalizeUuidProviderBuilder(array $options) {
    *
    * @dataProvider testCacheableMetadataProvider
    */
-  public function testCacheableMetadata(CacheableMetadata $expected_metadata) {
+  public function testCacheableMetadata(CacheableMetadata $expected_metadata): void {
     $resource_type = $this->container->get('jsonapi.resource_type.repository')->get('node', 'article');
     $resource_object = ResourceObject::createFromEntity($resource_type, $this->node);
     $context = [
diff --git a/core/modules/jsonapi/tests/src/Kernel/Normalizer/LinkCollectionNormalizerTest.php b/core/modules/jsonapi/tests/src/Kernel/Normalizer/LinkCollectionNormalizerTest.php
index 5f3dbb78b4b0..a4cdb4f5444c 100644
--- a/core/modules/jsonapi/tests/src/Kernel/Normalizer/LinkCollectionNormalizerTest.php
+++ b/core/modules/jsonapi/tests/src/Kernel/Normalizer/LinkCollectionNormalizerTest.php
@@ -77,7 +77,7 @@ protected function setUp(): void {
   /**
    * Tests the link collection normalizer.
    */
-  public function testNormalize() {
+  public function testNormalize(): void {
     $link_context = new ResourceObject(new CacheableMetadata(), new ResourceType('n/a', 'n/a', 'n/a'), 'n/a', NULL, [], new LinkCollection([]));
     $link_collection = (new LinkCollection([]))
       ->withLink('related', new Link(new CacheableMetadata(), Url::fromUri('http://example.com/post/42'), 'related', ['title' => 'Most viewed']))
@@ -110,7 +110,7 @@ public function testNormalize() {
    *
    * @dataProvider linkAccessTestData
    */
-  public function testLinkAccess($current_user_id, $edit_form_uid, $expected_link_keys, $expected_cache_contexts) {
+  public function testLinkAccess($current_user_id, $edit_form_uid, $expected_link_keys, $expected_cache_contexts): void {
     // Get the current user and an edit-form URL.
     foreach ($this->testUsers as $user) {
       $uid = (int) $user->id();
diff --git a/core/modules/jsonapi/tests/src/Kernel/Normalizer/RelationshipNormalizerTest.php b/core/modules/jsonapi/tests/src/Kernel/Normalizer/RelationshipNormalizerTest.php
index 54dd005f68a4..86ca587adc17 100644
--- a/core/modules/jsonapi/tests/src/Kernel/Normalizer/RelationshipNormalizerTest.php
+++ b/core/modules/jsonapi/tests/src/Kernel/Normalizer/RelationshipNormalizerTest.php
@@ -224,7 +224,7 @@ protected function setUp(): void {
    * @covers ::normalize
    * @dataProvider normalizeProvider
    */
-  public function testNormalize($entity_property_names, $field_name, $expected) {
+  public function testNormalize($entity_property_names, $field_name, $expected): void {
     // Links cannot be generated in the test provider because the container
     // has not yet been set.
     $expected['links'] = [
diff --git a/core/modules/jsonapi/tests/src/Kernel/Query/FilterTest.php b/core/modules/jsonapi/tests/src/Kernel/Query/FilterTest.php
index 5de336554e0a..099b30ccc03c 100644
--- a/core/modules/jsonapi/tests/src/Kernel/Query/FilterTest.php
+++ b/core/modules/jsonapi/tests/src/Kernel/Query/FilterTest.php
@@ -89,7 +89,7 @@ protected function setUp(): void {
   /**
    * @covers ::queryCondition
    */
-  public function testInvalidFilterPathDueToMissingPropertyName() {
+  public function testInvalidFilterPathDueToMissingPropertyName(): void {
     $this->expectException(CacheableBadRequestHttpException::class);
     $this->expectExceptionMessage('Invalid nested filtering. The field `colors`, given in the path `colors` is incomplete, it must end with one of the following specifiers: `value`, `format`, `processed`.');
     $resource_type = $this->resourceTypeRepository->get('node', 'painting');
@@ -99,7 +99,7 @@ public function testInvalidFilterPathDueToMissingPropertyName() {
   /**
    * @covers ::queryCondition
    */
-  public function testInvalidFilterPathDueToMissingPropertyNameReferenceFieldWithMetaProperties() {
+  public function testInvalidFilterPathDueToMissingPropertyNameReferenceFieldWithMetaProperties(): void {
     $this->expectException(CacheableBadRequestHttpException::class);
     $this->expectExceptionMessage('Invalid nested filtering. The field `photo`, given in the path `photo` is incomplete, it must end with one of the following specifiers: `id`, `meta.drupal_internal__target_id`, `meta.alt`, `meta.title`, `meta.width`, `meta.height`.');
     $resource_type = $this->resourceTypeRepository->get('node', 'painting');
@@ -109,7 +109,7 @@ public function testInvalidFilterPathDueToMissingPropertyNameReferenceFieldWithM
   /**
    * @covers ::queryCondition
    */
-  public function testInvalidFilterPathDueMissingMetaPrefixReferenceFieldWithMetaProperties() {
+  public function testInvalidFilterPathDueMissingMetaPrefixReferenceFieldWithMetaProperties(): void {
     $this->expectException(CacheableBadRequestHttpException::class);
     $this->expectExceptionMessage('Invalid nested filtering. The property `alt`, given in the path `photo.alt` belongs to the meta object of a relationship and must be preceded by `meta`.');
     $resource_type = $this->resourceTypeRepository->get('node', 'painting');
@@ -119,7 +119,7 @@ public function testInvalidFilterPathDueMissingMetaPrefixReferenceFieldWithMetaP
   /**
    * @covers ::queryCondition
    */
-  public function testInvalidFilterPathDueToMissingPropertyNameReferenceFieldWithoutMetaProperties() {
+  public function testInvalidFilterPathDueToMissingPropertyNameReferenceFieldWithoutMetaProperties(): void {
     $this->expectException(CacheableBadRequestHttpException::class);
     $this->expectExceptionMessage('Invalid nested filtering. The field `uid`, given in the path `uid` is incomplete, it must end with one of the following specifiers: `id`, `meta.drupal_internal__target_id`.');
     $resource_type = $this->resourceTypeRepository->get('node', 'painting');
@@ -129,7 +129,7 @@ public function testInvalidFilterPathDueToMissingPropertyNameReferenceFieldWitho
   /**
    * @covers ::queryCondition
    */
-  public function testInvalidFilterPathDueToNonexistentProperty() {
+  public function testInvalidFilterPathDueToNonexistentProperty(): void {
     $this->expectException(CacheableBadRequestHttpException::class);
     $this->expectExceptionMessage('Invalid nested filtering. The property `foobar`, given in the path `colors.foobar`, does not exist. Must be one of the following property names: `value`, `format`, `processed`.');
     $resource_type = $this->resourceTypeRepository->get('node', 'painting');
@@ -139,7 +139,7 @@ public function testInvalidFilterPathDueToNonexistentProperty() {
   /**
    * @covers ::queryCondition
    */
-  public function testInvalidFilterPathDueToElidedSoleProperty() {
+  public function testInvalidFilterPathDueToElidedSoleProperty(): void {
     $this->expectException(CacheableBadRequestHttpException::class);
     $this->expectExceptionMessage('Invalid nested filtering. The property `value`, given in the path `promote.value`, does not exist. Filter by `promote`, not `promote.value` (the JSON:API module elides property names from single-property fields).');
     $resource_type = $this->resourceTypeRepository->get('node', 'painting');
@@ -149,7 +149,7 @@ public function testInvalidFilterPathDueToElidedSoleProperty() {
   /**
    * @covers ::queryCondition
    */
-  public function testQueryCondition() {
+  public function testQueryCondition(): void {
     // Can't use a data provider because we need access to the container.
     $data = $this->queryConditionData();
 
@@ -315,7 +315,7 @@ protected function savePaintings($paintings) {
    * @covers ::createFromQueryParameter
    * @dataProvider parameterProvider
    */
-  public function testCreateFromQueryParameter($case, $expected) {
+  public function testCreateFromQueryParameter($case, $expected): void {
     $resource_type = new ResourceType('foo', 'bar', NULL);
     $actual = Filter::createFromQueryParameter($case, $resource_type, $this->getFieldResolverMock($resource_type));
     $conditions = $actual->root()->members();
@@ -345,7 +345,7 @@ public static function parameterProvider() {
   /**
    * @covers ::createFromQueryParameter
    */
-  public function testCreateFromQueryParameterNested() {
+  public function testCreateFromQueryParameterNested(): void {
     $parameter = [
       'or-group' => ['group' => ['conjunction' => 'OR']],
       'nested-or-group' => [
diff --git a/core/modules/jsonapi/tests/src/Kernel/ResourceType/RelatedResourceTypesTest.php b/core/modules/jsonapi/tests/src/Kernel/ResourceType/RelatedResourceTypesTest.php
index 2d4277426888..5341b489cddf 100644
--- a/core/modules/jsonapi/tests/src/Kernel/ResourceType/RelatedResourceTypesTest.php
+++ b/core/modules/jsonapi/tests/src/Kernel/ResourceType/RelatedResourceTypesTest.php
@@ -115,7 +115,7 @@ protected function setUp(): void {
    * @covers ::getRelatableResourceTypes
    * @dataProvider getRelatableResourceTypesProvider
    */
-  public function testGetRelatableResourceTypes($resource_type_name, $relatable_type_names) {
+  public function testGetRelatableResourceTypes($resource_type_name, $relatable_type_names): void {
     // We're only testing the fields that we set up.
     $test_fields = [
       'field_ref_foo',
@@ -166,7 +166,7 @@ public static function getRelatableResourceTypesProvider() {
    * @covers ::getRelatableResourceTypesByField
    * @dataProvider getRelatableResourceTypesByFieldProvider
    */
-  public function testGetRelatableResourceTypesByField($entity_type_id, $bundle, $field) {
+  public function testGetRelatableResourceTypesByField($entity_type_id, $bundle, $field): void {
     $resource_type = $this->resourceTypeRepository->get($entity_type_id, $bundle);
     $relatable_types = $resource_type->getRelatableResourceTypes();
     $this->assertSame(
@@ -195,7 +195,7 @@ public static function getRelatableResourceTypesByFieldProvider() {
    *
    * @link https://www.drupal.org/project/drupal/issues/2996114
    */
-  public function testGetRelatableResourceTypesFromFieldDefinition() {
+  public function testGetRelatableResourceTypesFromFieldDefinition(): void {
     $field_config_storage = $this->container->get('entity_type.manager')->getStorage('field_config');
 
     static::assertCount(0, $this->resourceTypeRepository->get('node', 'foo')->getRelatableResourceTypesByField('field_relationship'));
diff --git a/core/modules/jsonapi/tests/src/Kernel/ResourceType/ResourceTypeRepositoryTest.php b/core/modules/jsonapi/tests/src/Kernel/ResourceType/ResourceTypeRepositoryTest.php
index 969ac85e9c66..de52302e039d 100644
--- a/core/modules/jsonapi/tests/src/Kernel/ResourceType/ResourceTypeRepositoryTest.php
+++ b/core/modules/jsonapi/tests/src/Kernel/ResourceType/ResourceTypeRepositoryTest.php
@@ -68,7 +68,7 @@ protected function setUp(): void {
   /**
    * @covers ::all
    */
-  public function testAll() {
+  public function testAll(): void {
     // Make sure that there are resources being created.
     $all = $this->resourceTypeRepository->all();
     $this->assertNotEmpty($all);
@@ -83,7 +83,7 @@ public function testAll() {
    * @covers ::get
    * @dataProvider getProvider
    */
-  public function testGet($entity_type_id, $bundle, $entity_class) {
+  public function testGet($entity_type_id, $bundle, $entity_class): void {
     // Make sure that there are resources being created.
     $resource_type = $this->resourceTypeRepository->get($entity_type_id, $bundle);
     $this->assertInstanceOf(ResourceType::class, $resource_type);
@@ -111,7 +111,7 @@ public static function getProvider() {
   /**
    * Ensures that the ResourceTypeRepository's cache does not become stale.
    */
-  public function testCaching() {
+  public function testCaching(): void {
     $this->assertEmpty($this->resourceTypeRepository->get('node', 'article')->getRelatableResourceTypesByField('field_relationship'));
     $this->createEntityReferenceField('node', 'article', 'field_relationship', 'Related entity', 'node');
     $this->assertCount(3, $this->resourceTypeRepository->get('node', 'article')->getRelatableResourceTypesByField('field_relationship'));
@@ -128,7 +128,7 @@ public function testCaching() {
    * @covers ::getFields
    * @dataProvider getFieldsProvider
    */
-  public function testMappingNameConflictCheck($field_name_list) {
+  public function testMappingNameConflictCheck($field_name_list): void {
     $entity_type = \Drupal::entityTypeManager()->getDefinition('node');
     $bundle = 'article';
     $reflection_class = new \ReflectionClass($this->resourceTypeRepository);
@@ -159,7 +159,7 @@ public static function getFieldsProvider() {
   /**
    * Tests that resource types can be disabled by a build subscriber.
    */
-  public function testResourceTypeDisabling() {
+  public function testResourceTypeDisabling(): void {
     $this->assertFalse($this->resourceTypeRepository->getByTypeName('node--article')->isInternal());
     $this->assertFalse($this->resourceTypeRepository->getByTypeName('node--page')->isInternal());
     $this->assertFalse($this->resourceTypeRepository->getByTypeName('user--user')->isInternal());
@@ -177,7 +177,7 @@ public function testResourceTypeDisabling() {
   /**
    * Tests that resource type fields can be aliased per resource type.
    */
-  public function testResourceTypeFieldAliasing() {
+  public function testResourceTypeFieldAliasing(): void {
     $this->assertSame($this->resourceTypeRepository->getByTypeName('node--article')->getPublicName('uid'), 'uid');
     $this->assertSame($this->resourceTypeRepository->getByTypeName('node--page')->getPublicName('uid'), 'uid');
     $resource_type_field_aliases = [
@@ -197,7 +197,7 @@ public function testResourceTypeFieldAliasing() {
   /**
    * Tests that resource type fields can be disabled per resource type.
    */
-  public function testResourceTypeFieldDisabling() {
+  public function testResourceTypeFieldDisabling(): void {
     $this->assertTrue($this->resourceTypeRepository->getByTypeName('node--article')->isFieldEnabled('uid'));
     $this->assertTrue($this->resourceTypeRepository->getByTypeName('node--page')->isFieldEnabled('uid'));
     $disabled_resource_type_fields = [
@@ -217,7 +217,7 @@ public function testResourceTypeFieldDisabling() {
   /**
    * Tests that resource types can be renamed.
    */
-  public function testResourceTypeRenaming() {
+  public function testResourceTypeRenaming(): void {
     \Drupal::state()->set('jsonapi_test_resource_type_builder.renamed_resource_types', [
       'node--article' => 'articles',
       'node--page' => 'pages',
diff --git a/core/modules/jsonapi/tests/src/Kernel/Revisions/VersionNegotiatorTest.php b/core/modules/jsonapi/tests/src/Kernel/Revisions/VersionNegotiatorTest.php
index fd3370ad2ac8..11a2a1e00f2d 100644
--- a/core/modules/jsonapi/tests/src/Kernel/Revisions/VersionNegotiatorTest.php
+++ b/core/modules/jsonapi/tests/src/Kernel/Revisions/VersionNegotiatorTest.php
@@ -128,7 +128,7 @@ protected function setUp(): void {
   /**
    * @covers \Drupal\jsonapi\Revisions\VersionById::getRevision
    */
-  public function testOldRevision() {
+  public function testOldRevision(): void {
     $revision = $this->versionNegotiator->getRevision($this->node, 'id:' . $this->nodePreviousRevisionId);
     $this->assertEquals($this->node->id(), $revision->id());
     $this->assertEquals($this->nodePreviousRevisionId, $revision->getRevisionId());
@@ -137,7 +137,7 @@ public function testOldRevision() {
   /**
    * @covers \Drupal\jsonapi\Revisions\VersionById::getRevision
    */
-  public function testInvalidRevisionId() {
+  public function testInvalidRevisionId(): void {
     $this->expectException(CacheableNotFoundHttpException::class);
     $this->expectExceptionMessage(sprintf('The requested version, identified by `id:%s`, could not be found.', $this->node2->getRevisionId()));
     $this->versionNegotiator->getRevision($this->node, 'id:' . $this->node2->getRevisionId());
@@ -146,7 +146,7 @@ public function testInvalidRevisionId() {
   /**
    * @covers \Drupal\jsonapi\Revisions\VersionByRel::getRevision
    */
-  public function testLatestVersion() {
+  public function testLatestVersion(): void {
     $revision = $this->versionNegotiator->getRevision($this->node, 'rel:' . VersionByRel::LATEST_VERSION);
     $this->assertEquals($this->node->id(), $revision->id());
     $this->assertEquals($this->node->getRevisionId(), $revision->getRevisionId());
@@ -155,7 +155,7 @@ public function testLatestVersion() {
   /**
    * @covers \Drupal\jsonapi\Revisions\VersionByRel::getRevision
    */
-  public function testCurrentVersion() {
+  public function testCurrentVersion(): void {
     $revision = $this->versionNegotiator->getRevision($this->node, 'rel:' . VersionByRel::WORKING_COPY);
     $this->assertEquals($this->node->id(), $revision->id());
     $this->assertEquals($this->node->id(), $revision->id());
@@ -165,7 +165,7 @@ public function testCurrentVersion() {
   /**
    * @covers \Drupal\jsonapi\Revisions\VersionByRel::getRevision
    */
-  public function testInvalidRevisionRel() {
+  public function testInvalidRevisionRel(): void {
     $this->expectException(CacheableBadRequestHttpException::class);
     $this->expectExceptionMessage('An invalid resource version identifier, `rel:erroneous-revision-name`, was provided.');
     $this->versionNegotiator->getRevision($this->node, 'rel:erroneous-revision-name');
diff --git a/core/modules/jsonapi/tests/src/Kernel/Serializer/SerializerTest.php b/core/modules/jsonapi/tests/src/Kernel/Serializer/SerializerTest.php
index 61fb19e204e1..cba346114568 100644
--- a/core/modules/jsonapi/tests/src/Kernel/Serializer/SerializerTest.php
+++ b/core/modules/jsonapi/tests/src/Kernel/Serializer/SerializerTest.php
@@ -105,7 +105,7 @@ protected function setUp(): void {
   /**
    * @covers \Drupal\jsonapi\Serializer\Serializer::normalize
    */
-  public function testFallbackNormalizer() {
+  public function testFallbackNormalizer(): void {
     $context = [
       'account' => $this->user,
       'resource_object' => ResourceObject::createFromEntity($this->resourceType, $this->node),
diff --git a/core/modules/jsonapi/tests/src/Kernel/TestCoverageTest.php b/core/modules/jsonapi/tests/src/Kernel/TestCoverageTest.php
index b3c47abf213d..7fbfd6b32452 100644
--- a/core/modules/jsonapi/tests/src/Kernel/TestCoverageTest.php
+++ b/core/modules/jsonapi/tests/src/Kernel/TestCoverageTest.php
@@ -62,7 +62,7 @@ protected function setUp(): void {
   /**
    * Tests that all core entity types have JSON:API test coverage.
    */
-  public function testEntityTypeRestTestCoverage() {
+  public function testEntityTypeRestTestCoverage(): void {
     $problems = [];
     foreach ($this->definitions as $entity_type_id => $info) {
       $class_name_full = $info->getClass();
diff --git a/core/modules/jsonapi/tests/src/Unit/EventSubscriber/ResourceResponseValidatorTest.php b/core/modules/jsonapi/tests/src/Unit/EventSubscriber/ResourceResponseValidatorTest.php
index 7ca219a3e417..5caf741ac014 100644
--- a/core/modules/jsonapi/tests/src/Unit/EventSubscriber/ResourceResponseValidatorTest.php
+++ b/core/modules/jsonapi/tests/src/Unit/EventSubscriber/ResourceResponseValidatorTest.php
@@ -58,7 +58,7 @@ protected function setUp(): void {
    * @covers ::validateResponse
    * @dataProvider validateResponseProvider
    */
-  public function testValidateResponse($request, $response, $expected, $description) {
+  public function testValidateResponse($request, $response, $expected, $description): void {
     // Expose protected ResourceResponseSubscriber::validateResponse() method.
     $object = new \ReflectionObject($this->subscriber);
     $method = $object->getMethod('validateResponse');
diff --git a/core/modules/jsonapi/tests/src/Unit/JsonApiResource/LinkTest.php b/core/modules/jsonapi/tests/src/Unit/JsonApiResource/LinkTest.php
index 6c5916bb4d2e..16154b64c637 100644
--- a/core/modules/jsonapi/tests/src/Unit/JsonApiResource/LinkTest.php
+++ b/core/modules/jsonapi/tests/src/Unit/JsonApiResource/LinkTest.php
@@ -122,7 +122,7 @@ public static function linkMergeProvider(): \Generator {
   /**
    * @covers ::getLinkRelationType
    */
-  public function testGetLinkRelationType() {
+  public function testGetLinkRelationType(): void {
     $this->mockUrlAssembler();
     $link = new Link((new CacheableMetadata())->addCacheTags(['foo']), Url::fromUri('https://jsonapi.org/foo'), 'self');
     $this->assertSame('self', $link->getLinkRelationType());
diff --git a/core/modules/jsonapi/tests/src/Unit/JsonApiSpecTest.php b/core/modules/jsonapi/tests/src/Unit/JsonApiSpecTest.php
index a761b5fb989b..f7dc9f64517b 100644
--- a/core/modules/jsonapi/tests/src/Unit/JsonApiSpecTest.php
+++ b/core/modules/jsonapi/tests/src/Unit/JsonApiSpecTest.php
@@ -23,7 +23,7 @@ class JsonApiSpecTest extends UnitTestCase {
    * @dataProvider providerTestIsValidMemberName
    * @covers ::isValidMemberName
    */
-  public function testIsValidMemberName($member_name, $expected) {
+  public function testIsValidMemberName($member_name, $expected): void {
     $this->assertSame($expected, JsonApiSpec::isValidMemberName($member_name));
   }
 
@@ -104,7 +104,7 @@ public static function providerTestIsValidMemberName() {
    * @covers ::isValidCustomQueryParameter
    * @covers ::isValidMemberName
    */
-  public function testIsValidCustomQueryParameter($custom_query_parameter, $expected) {
+  public function testIsValidCustomQueryParameter($custom_query_parameter, $expected): void {
     $this->assertSame($expected, JsonApiSpec::isValidCustomQueryParameter($custom_query_parameter));
   }
 
diff --git a/core/modules/jsonapi/tests/src/Unit/Normalizer/HttpExceptionNormalizerTest.php b/core/modules/jsonapi/tests/src/Unit/Normalizer/HttpExceptionNormalizerTest.php
index 30eddf58a10f..be112fb9e0e2 100644
--- a/core/modules/jsonapi/tests/src/Unit/Normalizer/HttpExceptionNormalizerTest.php
+++ b/core/modules/jsonapi/tests/src/Unit/Normalizer/HttpExceptionNormalizerTest.php
@@ -25,7 +25,7 @@ class HttpExceptionNormalizerTest extends UnitTestCase {
   /**
    * @covers ::normalize
    */
-  public function testNormalize() {
+  public function testNormalize(): void {
     $request_stack = $this->prophesize(RequestStack::class);
     $request_stack->getCurrentRequest()->willReturn(Request::create('http://localhost/'));
     $container = $this->prophesize(ContainerInterface::class);
diff --git a/core/modules/jsonapi/tests/src/Unit/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php b/core/modules/jsonapi/tests/src/Unit/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php
index da5d2aeb44d7..55c6a1ef0b99 100644
--- a/core/modules/jsonapi/tests/src/Unit/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php
+++ b/core/modules/jsonapi/tests/src/Unit/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php
@@ -89,7 +89,7 @@ protected function setUp(): void {
    * @covers ::denormalize
    * @dataProvider denormalizeProvider
    */
-  public function testDenormalize($input, $expected) {
+  public function testDenormalize($input, $expected): void {
     $resource_type = new ResourceType('node', 'article', FieldableEntityInterface::class);
     $resource_type->setRelatableResourceTypes([]);
     $context = ['resource_type' => $resource_type];
@@ -211,7 +211,7 @@ public static function denormalizeProvider() {
    * @covers ::denormalize
    * @dataProvider denormalizeUuidProvider
    */
-  public function testDenormalizeUuid($id, $expect_exception) {
+  public function testDenormalizeUuid($id, $expect_exception): void {
     $data['data'] = (isset($id)) ?
       ['type' => 'node--article', 'id' => $id] :
       ['type' => 'node--article'];
diff --git a/core/modules/jsonapi/tests/src/Unit/Normalizer/ResourceIdentifierNormalizerTest.php b/core/modules/jsonapi/tests/src/Unit/Normalizer/ResourceIdentifierNormalizerTest.php
index fc78271bf3b3..63d005be306e 100644
--- a/core/modules/jsonapi/tests/src/Unit/Normalizer/ResourceIdentifierNormalizerTest.php
+++ b/core/modules/jsonapi/tests/src/Unit/Normalizer/ResourceIdentifierNormalizerTest.php
@@ -111,7 +111,7 @@ protected function setUp(): void {
    * @covers ::denormalize
    * @dataProvider denormalizeProvider
    */
-  public function testDenormalize($input, $field_name, $expected) {
+  public function testDenormalize($input, $field_name, $expected): void {
     $entity = $this->prophesize(FieldableEntityInterface::class);
     $context = [
       'resource_type' => $this->resourceType,
@@ -152,7 +152,7 @@ public static function denormalizeProvider() {
    * @covers ::denormalize
    * @dataProvider denormalizeInvalidResourceProvider
    */
-  public function testDenormalizeInvalidResource($data, $field_name) {
+  public function testDenormalizeInvalidResource($data, $field_name): void {
     $context = [
       'resource_type' => $this->resourceType,
       'related' => $field_name,
diff --git a/core/modules/jsonapi/tests/src/Unit/Query/EntityConditionGroupTest.php b/core/modules/jsonapi/tests/src/Unit/Query/EntityConditionGroupTest.php
index 5544e70012e0..8f3a4e5670e8 100644
--- a/core/modules/jsonapi/tests/src/Unit/Query/EntityConditionGroupTest.php
+++ b/core/modules/jsonapi/tests/src/Unit/Query/EntityConditionGroupTest.php
@@ -19,7 +19,7 @@ class EntityConditionGroupTest extends UnitTestCase {
    * @covers ::__construct
    * @dataProvider constructProvider
    */
-  public function testConstruct($case) {
+  public function testConstruct($case): void {
     $group = new EntityConditionGroup($case['conjunction'], $case['members']);
 
     $this->assertEquals($case['conjunction'], $group->conjunction());
@@ -33,7 +33,7 @@ public function testConstruct($case) {
   /**
    * @covers ::__construct
    */
-  public function testConstructException() {
+  public function testConstructException(): void {
     $this->expectException(\InvalidArgumentException::class);
     new EntityConditionGroup('NOT_ALLOWED', []);
   }
diff --git a/core/modules/jsonapi/tests/src/Unit/Query/EntityConditionTest.php b/core/modules/jsonapi/tests/src/Unit/Query/EntityConditionTest.php
index adea6af9f0de..78aa37d8d13f 100644
--- a/core/modules/jsonapi/tests/src/Unit/Query/EntityConditionTest.php
+++ b/core/modules/jsonapi/tests/src/Unit/Query/EntityConditionTest.php
@@ -37,7 +37,7 @@ protected function setUp(): void {
    * @covers ::createFromQueryParameter
    * @dataProvider queryParameterProvider
    */
-  public function testCreateFromQueryParameter($case) {
+  public function testCreateFromQueryParameter($case): void {
     $condition = EntityCondition::createFromQueryParameter($case);
     $this->assertEquals($case['path'], $condition->field());
     $this->assertEquals($case['value'], $condition->value());
@@ -75,7 +75,7 @@ public static function queryParameterProvider() {
    * @covers ::validate
    * @dataProvider validationProvider
    */
-  public function testValidation($input, $exception) {
+  public function testValidation($input, $exception): void {
     if ($exception) {
       $this->expectException(get_class($exception));
       $this->expectExceptionMessage($exception->getMessage());
diff --git a/core/modules/jsonapi/tests/src/Unit/Query/OffsetPageTest.php b/core/modules/jsonapi/tests/src/Unit/Query/OffsetPageTest.php
index 264d3bd7f615..e360fb65fe08 100644
--- a/core/modules/jsonapi/tests/src/Unit/Query/OffsetPageTest.php
+++ b/core/modules/jsonapi/tests/src/Unit/Query/OffsetPageTest.php
@@ -37,7 +37,7 @@ protected function setUp(): void {
    * @covers ::createFromQueryParameter
    * @dataProvider parameterProvider
    */
-  public function testCreateFromQueryParameter($original, $expected) {
+  public function testCreateFromQueryParameter($original, $expected): void {
     $actual = OffsetPage::createFromQueryParameter($original);
     $this->assertEquals($expected['offset'], $actual->getOffset());
     $this->assertEquals($expected['limit'], $actual->getSize());
@@ -59,7 +59,7 @@ public static function parameterProvider() {
   /**
    * @covers ::createFromQueryParameter
    */
-  public function testCreateFromQueryParameterFail() {
+  public function testCreateFromQueryParameterFail(): void {
     $this->expectException(BadRequestHttpException::class);
     OffsetPage::createFromQueryParameter('lorem');
   }
diff --git a/core/modules/jsonapi/tests/src/Unit/Query/SortTest.php b/core/modules/jsonapi/tests/src/Unit/Query/SortTest.php
index 14b3faa9f52b..352ba46d619c 100644
--- a/core/modules/jsonapi/tests/src/Unit/Query/SortTest.php
+++ b/core/modules/jsonapi/tests/src/Unit/Query/SortTest.php
@@ -37,7 +37,7 @@ protected function setUp(): void {
    * @covers ::createFromQueryParameter
    * @dataProvider parameterProvider
    */
-  public function testCreateFromQueryParameter($input, $expected) {
+  public function testCreateFromQueryParameter($input, $expected): void {
     $sort = Sort::createFromQueryParameter($input);
     foreach ($sort->fields() as $index => $sort_field) {
       $this->assertEquals($expected[$index]['path'], $sort_field['path']);
@@ -85,7 +85,7 @@ public static function parameterProvider() {
    * @covers ::createFromQueryParameter
    * @dataProvider badParameterProvider
    */
-  public function testCreateFromQueryParameterFail($input) {
+  public function testCreateFromQueryParameterFail($input): void {
     $this->expectException(BadRequestHttpException::class);
     Sort::createFromQueryParameter($input);
   }
diff --git a/core/modules/jsonapi/tests/src/Unit/Routing/RoutesTest.php b/core/modules/jsonapi/tests/src/Unit/Routing/RoutesTest.php
index 59000936c3ef..80f38d545c79 100644
--- a/core/modules/jsonapi/tests/src/Unit/Routing/RoutesTest.php
+++ b/core/modules/jsonapi/tests/src/Unit/Routing/RoutesTest.php
@@ -68,7 +68,7 @@ protected function setUp(): void {
   /**
    * @covers ::routes
    */
-  public function testRoutesCollection() {
+  public function testRoutesCollection(): void {
     // Get the route collection and start making assertions.
     $routes = $this->routes['ok']->routes();
 
@@ -104,7 +104,7 @@ public function testRoutesCollection() {
   /**
    * @covers ::routes
    */
-  public function testRoutesIndividual() {
+  public function testRoutesIndividual(): void {
     // Get the route collection and start making assertions.
     $iterator = $this->routes['ok']->routes()->getIterator();
 
@@ -147,7 +147,7 @@ public function testRoutesIndividual() {
   /**
    * @covers ::routes
    */
-  public function testRoutesRelated() {
+  public function testRoutesRelated(): void {
     // Get the route collection and start making assertions.
     $iterator = $this->routes['ok']->routes()->getIterator();
 
@@ -168,7 +168,7 @@ public function testRoutesRelated() {
   /**
    * @covers ::routes
    */
-  public function testRoutesRelationships() {
+  public function testRoutesRelationships(): void {
     // Get the route collection and start making assertions.
     $iterator = $this->routes['ok']->routes()->getIterator();
 
@@ -191,7 +191,7 @@ public function testRoutesRelationships() {
    *
    * @dataProvider expectedRoutes
    */
-  public function testRoutes($route) {
+  public function testRoutes($route): void {
     $this->assertArrayHasKey($route, $this->routes['ok']->routes()->all());
   }
 
@@ -225,7 +225,7 @@ public static function expectedRoutes() {
    *
    * @dataProvider notExpectedRoutes
    */
-  public function testInternalRoutes($route) {
+  public function testInternalRoutes($route): void {
     $this->assertArrayNotHasKey($route, $this->routes['ok']->routes()->all());
   }
 
diff --git a/core/modules/language/tests/src/Functional/AdminPathEntityConverterLanguageTest.php b/core/modules/language/tests/src/Functional/AdminPathEntityConverterLanguageTest.php
index f188628d0443..1096c75419f8 100644
--- a/core/modules/language/tests/src/Functional/AdminPathEntityConverterLanguageTest.php
+++ b/core/modules/language/tests/src/Functional/AdminPathEntityConverterLanguageTest.php
@@ -37,7 +37,7 @@ protected function setUp(): void {
   /**
    * Tests the translated and untranslated config entities are loaded properly.
    */
-  public function testConfigUsingCurrentLanguage() {
+  public function testConfigUsingCurrentLanguage(): void {
     \Drupal::languageManager()
       ->getLanguageConfigOverride('es', 'language.entity.es')
       ->set('label', 'Español')
diff --git a/core/modules/language/tests/src/Functional/ConfigurableLanguageManagerTest.php b/core/modules/language/tests/src/Functional/ConfigurableLanguageManagerTest.php
index 487fbdb87805..c480e0d83892 100644
--- a/core/modules/language/tests/src/Functional/ConfigurableLanguageManagerTest.php
+++ b/core/modules/language/tests/src/Functional/ConfigurableLanguageManagerTest.php
@@ -120,7 +120,7 @@ protected function setUp(): void {
    * The interface language uses the preferred language for admin pages of the
    * user and after that the URL. The Content uses just the URL.
    */
-  public function testUrlContentTranslationWithPreferredAdminLanguage() {
+  public function testUrlContentTranslationWithPreferredAdminLanguage(): void {
     $assert_session = $this->assertSession();
     // Set the interface language to use the preferred administration language
     // and then the URL.
@@ -161,7 +161,7 @@ public function testUrlContentTranslationWithPreferredAdminLanguage() {
   /**
    * Tests translation with URL and Session Language Negotiators.
    */
-  public function testUrlContentTranslationWithSessionLanguage() {
+  public function testUrlContentTranslationWithSessionLanguage(): void {
     $assert_session = $this->assertSession();
     /** @var \Drupal\language\LanguageNegotiatorInterface $language_negotiator */
     $language_negotiator = \Drupal::getContainer()->get('language_negotiator');
@@ -213,7 +213,7 @@ public function testUrlContentTranslationWithSessionLanguage() {
    * admin language negotiator because of the recursive way that the negotiator
    * is called.
    */
-  public function testUserProfileTranslationWithPreferredAdminLanguage() {
+  public function testUserProfileTranslationWithPreferredAdminLanguage(): void {
     $assert_session = $this->assertSession();
     // Set the interface language to use the preferred administration language.
     /** @var \Drupal\language\LanguageNegotiatorInterface $language_negotiator */
diff --git a/core/modules/language/tests/src/Functional/EntityTypeWithoutLanguageFormTest.php b/core/modules/language/tests/src/Functional/EntityTypeWithoutLanguageFormTest.php
index b02fe739da21..c12871e7ae2c 100644
--- a/core/modules/language/tests/src/Functional/EntityTypeWithoutLanguageFormTest.php
+++ b/core/modules/language/tests/src/Functional/EntityTypeWithoutLanguageFormTest.php
@@ -48,7 +48,7 @@ protected function setUp(): void {
   /**
    * Tests configuration options with an entity without language definition.
    */
-  public function testEmptyLangcode() {
+  public function testEmptyLangcode(): void {
     // Assert that we can not enable language select from
     // content language settings page.
     $this->drupalGet('admin/config/regional/content-language');
diff --git a/core/modules/language/tests/src/Functional/LanguageBlockSettingsVisibilityTest.php b/core/modules/language/tests/src/Functional/LanguageBlockSettingsVisibilityTest.php
index 4617e684e66f..ffaf49d6829f 100644
--- a/core/modules/language/tests/src/Functional/LanguageBlockSettingsVisibilityTest.php
+++ b/core/modules/language/tests/src/Functional/LanguageBlockSettingsVisibilityTest.php
@@ -20,7 +20,7 @@ class LanguageBlockSettingsVisibilityTest extends BrowserTestBase {
    */
   protected $defaultTheme = 'stark';
 
-  public function testUnnecessaryLanguageSettingsVisibility() {
+  public function testUnnecessaryLanguageSettingsVisibility(): void {
     $admin_user = $this->drupalCreateUser([
       'administer languages',
       'access administration pages',
diff --git a/core/modules/language/tests/src/Functional/LanguageBreadcrumbTest.php b/core/modules/language/tests/src/Functional/LanguageBreadcrumbTest.php
index 4723c99d3b80..da89dfd29d1a 100644
--- a/core/modules/language/tests/src/Functional/LanguageBreadcrumbTest.php
+++ b/core/modules/language/tests/src/Functional/LanguageBreadcrumbTest.php
@@ -42,7 +42,7 @@ protected function setUp(): void {
   /**
    * Tests breadcrumbs with URL prefixes.
    */
-  public function testBreadCrumbs() {
+  public function testBreadCrumbs(): void {
     // /user/login is the default frontpage which only works for an anonymous
     // user. Access the frontpage in different languages, ensure that no
     // breadcrumb is displayed.
diff --git a/core/modules/language/tests/src/Functional/LanguageBrowserDetectionAcceptLanguageTest.php b/core/modules/language/tests/src/Functional/LanguageBrowserDetectionAcceptLanguageTest.php
index 31ec8ac47fd8..25ea1a105424 100644
--- a/core/modules/language/tests/src/Functional/LanguageBrowserDetectionAcceptLanguageTest.php
+++ b/core/modules/language/tests/src/Functional/LanguageBrowserDetectionAcceptLanguageTest.php
@@ -76,7 +76,7 @@ protected function setUp(): void {
   /**
    * Tests with browsers with and without Accept-Language header.
    */
-  public function testAcceptLanguageEmptyDefault() {
+  public function testAcceptLanguageEmptyDefault(): void {
 
     // Check correct headers.
     $this->drupalGet('/en/system-test/echo/language test', [], ['Accept-Language' => 'en']);
diff --git a/core/modules/language/tests/src/Functional/LanguageBrowserDetectionTest.php b/core/modules/language/tests/src/Functional/LanguageBrowserDetectionTest.php
index ec0331471b9a..92e843e0e5a4 100644
--- a/core/modules/language/tests/src/Functional/LanguageBrowserDetectionTest.php
+++ b/core/modules/language/tests/src/Functional/LanguageBrowserDetectionTest.php
@@ -24,7 +24,7 @@ class LanguageBrowserDetectionTest extends BrowserTestBase {
   /**
    * Tests mappings between browser language codes and Drupal language codes.
    */
-  public function testUIBrowserLanguageMappings() {
+  public function testUIBrowserLanguageMappings(): void {
     // User to manage languages.
     $admin_user = $this->drupalCreateUser([
       'administer languages',
diff --git a/core/modules/language/tests/src/Functional/LanguageConfigInstallOverrideExistingTest.php b/core/modules/language/tests/src/Functional/LanguageConfigInstallOverrideExistingTest.php
index dda12c90f296..5dfd86ebd7f1 100644
--- a/core/modules/language/tests/src/Functional/LanguageConfigInstallOverrideExistingTest.php
+++ b/core/modules/language/tests/src/Functional/LanguageConfigInstallOverrideExistingTest.php
@@ -26,7 +26,7 @@ class LanguageConfigInstallOverrideExistingTest extends BrowserTestBase {
   /**
    * Tests when language config is installed existing config is not overridden.
    */
-  public function testLanguageConfigInstallOverrideExisting() {
+  public function testLanguageConfigInstallOverrideExisting(): void {
     /** @var \Drupal\Core\Config\StorageInterface $storage */
     $storage = $this->container->get('config.storage');
     $config = $this->config('language.types');
diff --git a/core/modules/language/tests/src/Functional/LanguageConfigOverrideImportTest.php b/core/modules/language/tests/src/Functional/LanguageConfigOverrideImportTest.php
index 629f7d7acdf8..b2184159a7e4 100644
--- a/core/modules/language/tests/src/Functional/LanguageConfigOverrideImportTest.php
+++ b/core/modules/language/tests/src/Functional/LanguageConfigOverrideImportTest.php
@@ -35,7 +35,7 @@ class LanguageConfigOverrideImportTest extends BrowserTestBase {
   /**
    * Tests that language can be enabled and overrides are created during a sync.
    */
-  public function testConfigOverrideImport() {
+  public function testConfigOverrideImport(): void {
     ConfigurableLanguage::createFromLangcode('fr')->save();
     /** @var \Drupal\Core\Config\StorageInterface $sync */
     $sync = \Drupal::service('config.storage.sync');
@@ -72,7 +72,7 @@ public function testConfigOverrideImport() {
   /**
    * Tests that configuration events are not fired during a sync of overrides.
    */
-  public function testConfigOverrideImportEvents() {
+  public function testConfigOverrideImportEvents(): void {
     // Enable the config_events_test module so we can record events occurring.
     \Drupal::service('module_installer')->install(['config_events_test']);
     $this->rebuildContainer();
diff --git a/core/modules/language/tests/src/Functional/LanguageConfigSchemaTest.php b/core/modules/language/tests/src/Functional/LanguageConfigSchemaTest.php
index fa09ec5592e3..0d7ba23733a9 100644
--- a/core/modules/language/tests/src/Functional/LanguageConfigSchemaTest.php
+++ b/core/modules/language/tests/src/Functional/LanguageConfigSchemaTest.php
@@ -49,7 +49,7 @@ protected function setUp(): void {
   /**
    * Tests whether the language config schema is valid.
    */
-  public function testValidLanguageConfigSchema() {
+  public function testValidLanguageConfigSchema(): void {
     // Make sure no language configuration available by default.
     $config_data = $this->config('language.settings')->get();
     $this->assertEmpty($config_data);
diff --git a/core/modules/language/tests/src/Functional/LanguageConfigurationElementTest.php b/core/modules/language/tests/src/Functional/LanguageConfigurationElementTest.php
index 78d7d9213872..92ed2b533501 100644
--- a/core/modules/language/tests/src/Functional/LanguageConfigurationElementTest.php
+++ b/core/modules/language/tests/src/Functional/LanguageConfigurationElementTest.php
@@ -51,7 +51,7 @@ protected function setUp(): void {
   /**
    * Tests the language settings have been saved.
    */
-  public function testLanguageConfigurationElement() {
+  public function testLanguageConfigurationElement(): void {
     $this->drupalGet('language-tests/language_configuration_element');
     $edit['lang_configuration[langcode]'] = 'current_interface';
     $edit['lang_configuration[language_alterable]'] = FALSE;
@@ -99,7 +99,7 @@ public function testLanguageConfigurationElement() {
   /**
    * Tests that the language_get_default_langcode() returns the correct values.
    */
-  public function testDefaultLangcode() {
+  public function testDefaultLangcode(): void {
     // Add some custom languages.
     foreach (['aa', 'bb', 'cc'] as $language_code) {
       ConfigurableLanguage::create([
@@ -175,7 +175,7 @@ public function testDefaultLangcode() {
   /**
    * Tests that the configuration is retained when the node type is updated.
    */
-  public function testNodeTypeUpdate() {
+  public function testNodeTypeUpdate(): void {
     // Create the article content type first if the profile used is not the
     // standard one.
     if ($this->profile != 'standard') {
@@ -210,7 +210,7 @@ public function testNodeTypeUpdate() {
   /**
    * Tests the language settings are deleted on bundle delete.
    */
-  public function testNodeTypeDelete() {
+  public function testNodeTypeDelete(): void {
     // Create the article content type first if the profile used is not the
     // standard one.
     if ($this->profile != 'standard') {
@@ -247,7 +247,7 @@ public function testNodeTypeDelete() {
   /**
    * Tests that the configuration is retained when a vocabulary is updated.
    */
-  public function testTaxonomyVocabularyUpdate() {
+  public function testTaxonomyVocabularyUpdate(): void {
     $vocabulary = Vocabulary::create([
       'name' => 'Country',
       'vid' => 'country',
diff --git a/core/modules/language/tests/src/Functional/LanguageConfigurationTest.php b/core/modules/language/tests/src/Functional/LanguageConfigurationTest.php
index c7d1cf7232cb..7cc01976c13a 100644
--- a/core/modules/language/tests/src/Functional/LanguageConfigurationTest.php
+++ b/core/modules/language/tests/src/Functional/LanguageConfigurationTest.php
@@ -31,7 +31,7 @@ class LanguageConfigurationTest extends BrowserTestBase {
   /**
    * Functional tests for adding, editing and deleting languages.
    */
-  public function testLanguageConfiguration() {
+  public function testLanguageConfiguration(): void {
     // Ensure the after installing the language module the weight of the English
     // language is still 0.
     $this->assertEquals(0, ConfigurableLanguage::load('en')->getWeight(), 'The English language has a weight of 0.');
@@ -162,7 +162,7 @@ public function testLanguageConfiguration() {
   /**
    * Functional tests for setting system language weight on adding, editing and deleting languages.
    */
-  public function testLanguageConfigurationWeight() {
+  public function testLanguageConfigurationWeight(): void {
     // User to add and remove language.
     $admin_user = $this->drupalCreateUser([
       'administer languages',
diff --git a/core/modules/language/tests/src/Functional/LanguageCustomLanguageConfigurationTest.php b/core/modules/language/tests/src/Functional/LanguageCustomLanguageConfigurationTest.php
index ad051dcf2cc9..4bdc7692a502 100644
--- a/core/modules/language/tests/src/Functional/LanguageCustomLanguageConfigurationTest.php
+++ b/core/modules/language/tests/src/Functional/LanguageCustomLanguageConfigurationTest.php
@@ -31,7 +31,7 @@ class LanguageCustomLanguageConfigurationTest extends BrowserTestBase {
   /**
    * Functional tests for adding, editing and deleting languages.
    */
-  public function testLanguageConfiguration() {
+  public function testLanguageConfiguration(): void {
 
     // Create user with permissions to add and remove languages.
     $admin_user = $this->drupalCreateUser([
diff --git a/core/modules/language/tests/src/Functional/LanguageEntityFieldAccessHookTest.php b/core/modules/language/tests/src/Functional/LanguageEntityFieldAccessHookTest.php
index 63d026ef6106..264bd79b6ea8 100644
--- a/core/modules/language/tests/src/Functional/LanguageEntityFieldAccessHookTest.php
+++ b/core/modules/language/tests/src/Functional/LanguageEntityFieldAccessHookTest.php
@@ -35,7 +35,7 @@ class LanguageEntityFieldAccessHookTest extends BrowserTestBase {
   /**
    * Tests compatibility with hook_entity_field_access().
    */
-  public function testHookEntityFieldAccess() {
+  public function testHookEntityFieldAccess(): void {
     // Create an admin user and do the login.
     $user = $this->drupalCreateUser([], NULL, TRUE);
     $this->drupalLogin($user);
diff --git a/core/modules/language/tests/src/Functional/LanguageListModuleInstallTest.php b/core/modules/language/tests/src/Functional/LanguageListModuleInstallTest.php
index c66e11715b5c..fdce3d13051f 100644
--- a/core/modules/language/tests/src/Functional/LanguageListModuleInstallTest.php
+++ b/core/modules/language/tests/src/Functional/LanguageListModuleInstallTest.php
@@ -28,7 +28,7 @@ class LanguageListModuleInstallTest extends BrowserTestBase {
   /**
    * Tests enabling Language.
    */
-  public function testModuleInstallLanguageList() {
+  public function testModuleInstallLanguageList(): void {
     // Since LanguageManager::getLanguages() uses static caches we need to do
     // this by enabling the module using the UI.
     $admin_user = $this->drupalCreateUser([
diff --git a/core/modules/language/tests/src/Functional/LanguageListTest.php b/core/modules/language/tests/src/Functional/LanguageListTest.php
index 7e1f6b38d78c..f8602173c8ce 100644
--- a/core/modules/language/tests/src/Functional/LanguageListTest.php
+++ b/core/modules/language/tests/src/Functional/LanguageListTest.php
@@ -32,7 +32,7 @@ class LanguageListTest extends BrowserTestBase {
   /**
    * Functional tests for adding, editing and deleting languages.
    */
-  public function testLanguageList() {
+  public function testLanguageList(): void {
 
     // User to add and remove language.
     $admin_user = $this->drupalCreateUser([
@@ -211,7 +211,7 @@ public function testLanguageList() {
   /**
    * Functional tests for the language states (locked or configurable).
    */
-  public function testLanguageStates() {
+  public function testLanguageStates(): void {
     // Add some languages, and also lock some of them.
     ConfigurableLanguage::create(['label' => $this->randomMachineName(), 'id' => 'l1'])->save();
     ConfigurableLanguage::create(['label' => $this->randomMachineName(), 'id' => 'l2', 'locked' => TRUE])->save();
diff --git a/core/modules/language/tests/src/Functional/LanguageLocaleListTest.php b/core/modules/language/tests/src/Functional/LanguageLocaleListTest.php
index 7da3df26067d..a1a7db8141ff 100644
--- a/core/modules/language/tests/src/Functional/LanguageLocaleListTest.php
+++ b/core/modules/language/tests/src/Functional/LanguageLocaleListTest.php
@@ -46,7 +46,7 @@ protected function setUp(): void {
   /**
    * Tests adding, editing, and deleting languages.
    */
-  public function testLanguageLocaleList() {
+  public function testLanguageLocaleList(): void {
     // User to add and remove language.
     $admin_user = $this->drupalCreateUser([
       'administer languages',
diff --git a/core/modules/language/tests/src/Functional/LanguageNegotiationContentEntityTest.php b/core/modules/language/tests/src/Functional/LanguageNegotiationContentEntityTest.php
index 65aeb557c592..02e0539a33a8 100644
--- a/core/modules/language/tests/src/Functional/LanguageNegotiationContentEntityTest.php
+++ b/core/modules/language/tests/src/Functional/LanguageNegotiationContentEntityTest.php
@@ -69,7 +69,7 @@ protected function setUp(): void {
   /**
    * Tests default with content language remaining same as interface language.
    */
-  public function testDefaultConfiguration() {
+  public function testDefaultConfiguration(): void {
     $translation = $this->entity;
     $this->drupalGet($translation->toUrl());
     $last = \Drupal::keyValue('language_test')->get('language_negotiation_last');
@@ -98,7 +98,7 @@ public function testDefaultConfiguration() {
   /**
    * Tests enabling the language negotiator language_content_entity.
    */
-  public function testEnabledLanguageContentNegotiator() {
+  public function testEnabledLanguageContentNegotiator(): void {
     // Define the method language-url with a higher priority than
     // language-content-entity. This configuration should match the default one,
     // where the language-content-entity is turned off.
diff --git a/core/modules/language/tests/src/Functional/LanguageNegotiationInfoTest.php b/core/modules/language/tests/src/Functional/LanguageNegotiationInfoTest.php
index 2cde3eafb259..e2640da9926f 100644
--- a/core/modules/language/tests/src/Functional/LanguageNegotiationInfoTest.php
+++ b/core/modules/language/tests/src/Functional/LanguageNegotiationInfoTest.php
@@ -74,7 +74,7 @@ protected function stateSet(array $values) {
   /**
    * Tests alterations to language types/negotiation info.
    */
-  public function testInfoAlterations() {
+  public function testInfoAlterations(): void {
     $this->stateSet([
       // Enable language_test type info.
       'language_test.language_types' => TRUE,
@@ -184,7 +184,7 @@ protected function checkFixedLanguageTypes() {
   /**
    * Tests altering config of configurable language types.
    */
-  public function testConfigLangTypeAlterations() {
+  public function testConfigLangTypeAlterations(): void {
     // Default of config.
     $test_type = LanguageInterface::TYPE_CONTENT;
     $this->assertFalse($this->isLanguageTypeConfigurable($test_type), 'Language type is not configurable.');
diff --git a/core/modules/language/tests/src/Functional/LanguageNegotiationSessionTest.php b/core/modules/language/tests/src/Functional/LanguageNegotiationSessionTest.php
index 2ead53a516eb..46514b95ae13 100644
--- a/core/modules/language/tests/src/Functional/LanguageNegotiationSessionTest.php
+++ b/core/modules/language/tests/src/Functional/LanguageNegotiationSessionTest.php
@@ -47,7 +47,7 @@ protected function setUp(): void {
   /**
    * Tests language negotiation via query/session parameters.
    */
-  public function testSessionLanguageNegotiationMethod() {
+  public function testSessionLanguageNegotiationMethod(): void {
     // Enable Session and Selected language for interface language detection.
     $this->drupalGet('admin/config/regional/language/detection');
     $edit = [
diff --git a/core/modules/language/tests/src/Functional/LanguageNegotiationUrlTest.php b/core/modules/language/tests/src/Functional/LanguageNegotiationUrlTest.php
index 163e7125bdb4..49101adbdc4d 100644
--- a/core/modules/language/tests/src/Functional/LanguageNegotiationUrlTest.php
+++ b/core/modules/language/tests/src/Functional/LanguageNegotiationUrlTest.php
@@ -59,7 +59,7 @@ protected function setUp(): void {
   /**
    * @covers ::processInbound
    */
-  public function testDomain() {
+  public function testDomain(): void {
     // Check if paths that contain language prefixes can be reached when
     // language is taken from the domain.
     $edit = [
diff --git a/core/modules/language/tests/src/Functional/LanguagePathMonolingualTest.php b/core/modules/language/tests/src/Functional/LanguagePathMonolingualTest.php
index aab8dbf7f00f..9bae27b53b53 100644
--- a/core/modules/language/tests/src/Functional/LanguagePathMonolingualTest.php
+++ b/core/modules/language/tests/src/Functional/LanguagePathMonolingualTest.php
@@ -75,7 +75,7 @@ protected function setUp(): void {
   /**
    * Verifies that links do not have language prefixes in them.
    */
-  public function testPageLinks() {
+  public function testPageLinks(): void {
     // Navigate to 'admin/config' path.
     $this->drupalGet('admin/config');
 
diff --git a/core/modules/language/tests/src/Functional/LanguageSelectorTranslatableTest.php b/core/modules/language/tests/src/Functional/LanguageSelectorTranslatableTest.php
index 792052ff38b2..73dfb120124f 100644
--- a/core/modules/language/tests/src/Functional/LanguageSelectorTranslatableTest.php
+++ b/core/modules/language/tests/src/Functional/LanguageSelectorTranslatableTest.php
@@ -73,7 +73,7 @@ protected function getAdministratorPermissions() {
   /**
    * Tests content translation language selectors are correctly translated.
    */
-  public function testLanguageStringSelector() {
+  public function testLanguageStringSelector(): void {
     // Add another language.
     static::createLanguageFromLangcode('es');
 
@@ -98,7 +98,7 @@ public function testLanguageStringSelector() {
   /**
    * Tests that correct title is displayed for content translation page.
    */
-  public function testContentTranslationPageTitle() {
+  public function testContentTranslationPageTitle(): void {
     $this->drupalGet('admin/config/regional/content-language');
     $this->assertSession()->pageTextContains('Content language and translation');
     $this->assertSession()->pageTextNotMatches('#Content language$#');
diff --git a/core/modules/language/tests/src/Functional/LanguageSwitchingTest.php b/core/modules/language/tests/src/Functional/LanguageSwitchingTest.php
index b0fb5d0ef4bd..5dfb11be2b5a 100644
--- a/core/modules/language/tests/src/Functional/LanguageSwitchingTest.php
+++ b/core/modules/language/tests/src/Functional/LanguageSwitchingTest.php
@@ -62,7 +62,7 @@ protected function setUp(): void {
   /**
    * Functional tests for the language switcher block.
    */
-  public function testLanguageBlock() {
+  public function testLanguageBlock(): void {
     // Add language.
     $edit = [
       'predefined_langcode' => 'fr',
@@ -313,7 +313,7 @@ protected function doTestLanguageBlock404(string $block_label, string $system_pa
   /**
    * Tests language switcher links for domain based negotiation.
    */
-  public function testLanguageBlockWithDomain() {
+  public function testLanguageBlockWithDomain(): void {
     // Add the Italian language.
     ConfigurableLanguage::createFromLangcode('it')->save();
 
@@ -370,7 +370,7 @@ public function testLanguageBlockWithDomain() {
   /**
    * Tests active class on links when switching languages.
    */
-  public function testLanguageLinkActiveClass() {
+  public function testLanguageLinkActiveClass(): void {
     // Add language.
     $edit = [
       'predefined_langcode' => 'fr',
@@ -390,7 +390,7 @@ public function testLanguageLinkActiveClass() {
   /**
    * Check the path-admin class, as same as on default language.
    */
-  public function testLanguageBodyClass() {
+  public function testLanguageBodyClass(): void {
     // Add language.
     $edit = [
       'predefined_langcode' => 'fr',
@@ -517,7 +517,7 @@ protected function doTestLanguageLinkActiveClassAnonymous() {
   /**
    * Tests language switcher links for session based negotiation.
    */
-  public function testLanguageSessionSwitchLinks() {
+  public function testLanguageSessionSwitchLinks(): void {
     // Add language.
     $edit = [
       'predefined_langcode' => 'fr',
diff --git a/core/modules/language/tests/src/Functional/LanguageUILanguageNegotiationTest.php b/core/modules/language/tests/src/Functional/LanguageUILanguageNegotiationTest.php
index c1885b47d0da..47c61d06f247 100644
--- a/core/modules/language/tests/src/Functional/LanguageUILanguageNegotiationTest.php
+++ b/core/modules/language/tests/src/Functional/LanguageUILanguageNegotiationTest.php
@@ -101,7 +101,7 @@ protected function setUp(): void {
   /**
    * Tests for language switching by URL path.
    */
-  public function testUILanguageNegotiation() {
+  public function testUILanguageNegotiation(): void {
     // A few languages to switch to.
     // This one is unknown, should get the default lang version.
     $langcode_unknown = 'blah-blah';
@@ -444,7 +444,7 @@ protected function doRunTest($test) {
   /**
    * Tests URL language detection when the requested URL has no language.
    */
-  public function testUrlLanguageFallback() {
+  public function testUrlLanguageFallback(): void {
     // Add the Italian language.
     $langcode_browser_fallback = 'it';
     ConfigurableLanguage::createFromLangcode($langcode_browser_fallback)->save();
@@ -499,7 +499,7 @@ public function testUrlLanguageFallback() {
   /**
    * Tests URL handling when separate domains are used for multiple languages.
    */
-  public function testLanguageDomain() {
+  public function testLanguageDomain(): void {
     global $base_url;
 
     // Get the current host URI we're running on.
@@ -577,7 +577,7 @@ public function testLanguageDomain() {
   /**
    * Tests persistence of negotiation settings for the content language type.
    */
-  public function testContentCustomization() {
+  public function testContentCustomization(): void {
     // Customize content language settings from their defaults.
     $edit = [
       'language_content[configurable]' => TRUE,
@@ -600,7 +600,7 @@ public function testContentCustomization() {
   /**
    * Tests if the language switcher block gets deleted when a language type has been made not configurable.
    */
-  public function testDisableLanguageSwitcher() {
+  public function testDisableLanguageSwitcher(): void {
     $block_id = 'test_language_block';
 
     // Enable the language switcher block.
diff --git a/core/modules/language/tests/src/Functional/LanguageUrlRewritingTest.php b/core/modules/language/tests/src/Functional/LanguageUrlRewritingTest.php
index 444aa27abdd5..a3279c403075 100644
--- a/core/modules/language/tests/src/Functional/LanguageUrlRewritingTest.php
+++ b/core/modules/language/tests/src/Functional/LanguageUrlRewritingTest.php
@@ -69,7 +69,7 @@ protected function setUp(): void {
   /**
    * Check that non-installed languages are not considered.
    */
-  public function testUrlRewritingEdgeCases() {
+  public function testUrlRewritingEdgeCases(): void {
     // Check URL rewriting with a non-installed language.
     $non_existing = new Language(['id' => $this->randomMachineName()]);
     $this->checkUrl($non_existing, 'Path language is ignored if language is not installed.');
@@ -113,7 +113,7 @@ private function checkUrl(LanguageInterface $language, $message) {
   /**
    * Check URL rewriting when using a domain name and a non-standard port.
    */
-  public function testDomainNameNegotiationPort() {
+  public function testDomainNameNegotiationPort(): void {
     global $base_url;
     $language_domain = 'example.fr';
     // Get the current host URI we're running on.
diff --git a/core/modules/language/tests/src/Functional/Rest/ConfigurableLanguageResourceTestBase.php b/core/modules/language/tests/src/Functional/Rest/ConfigurableLanguageResourceTestBase.php
index ff4f5feef790..b26cf43b90a0 100644
--- a/core/modules/language/tests/src/Functional/Rest/ConfigurableLanguageResourceTestBase.php
+++ b/core/modules/language/tests/src/Functional/Rest/ConfigurableLanguageResourceTestBase.php
@@ -83,7 +83,7 @@ protected function getNormalizedPostEntity() {
    *
    * @see https://www.drupal.org/node/2915414
    */
-  public function testGetDefaultConfig() {
+  public function testGetDefaultConfig(): void {
     $this->initAuthentication();
     $url = Url::fromUri('base:/entity/configurable_language/en')->setOption('query', ['_format' => static::$format]);
     $request_options = $this->getAuthenticationRequestOptions('GET');
diff --git a/core/modules/language/tests/src/Kernel/Condition/LanguageConditionTest.php b/core/modules/language/tests/src/Kernel/Condition/LanguageConditionTest.php
index ef067f0ac06b..742c18312a4f 100644
--- a/core/modules/language/tests/src/Kernel/Condition/LanguageConditionTest.php
+++ b/core/modules/language/tests/src/Kernel/Condition/LanguageConditionTest.php
@@ -51,7 +51,7 @@ protected function setUp(): void {
   /**
    * Tests the language condition.
    */
-  public function testConditions() {
+  public function testConditions(): void {
     // Grab the language condition and configure it to check the content
     // language.
     $language = \Drupal::languageManager()->getLanguage('en');
diff --git a/core/modules/language/tests/src/Kernel/ConfigurableLanguageManagerTest.php b/core/modules/language/tests/src/Kernel/ConfigurableLanguageManagerTest.php
index 231eeed233de..4fd94ce3d92f 100644
--- a/core/modules/language/tests/src/Kernel/ConfigurableLanguageManagerTest.php
+++ b/core/modules/language/tests/src/Kernel/ConfigurableLanguageManagerTest.php
@@ -49,7 +49,7 @@ protected function setUp(): void {
   /**
    * @covers ::getLanguageSwitchLinks
    */
-  public function testLanguageSwitchLinks() {
+  public function testLanguageSwitchLinks(): void {
     $this->languageNegotiator->setCurrentUser($this->prophesize('Drupal\Core\Session\AccountInterface')->reveal());
     $this->languageManager->getLanguageSwitchLinks(LanguageInterface::TYPE_INTERFACE, new Url('<current>'));
   }
diff --git a/core/modules/language/tests/src/Kernel/ConfigurableLanguageTest.php b/core/modules/language/tests/src/Kernel/ConfigurableLanguageTest.php
index 80c73f2a7baf..0225d023160e 100644
--- a/core/modules/language/tests/src/Kernel/ConfigurableLanguageTest.php
+++ b/core/modules/language/tests/src/Kernel/ConfigurableLanguageTest.php
@@ -25,7 +25,7 @@ class ConfigurableLanguageTest extends KernelTestBase {
   /**
    * Tests configurable language name methods.
    */
-  public function testName() {
+  public function testName(): void {
     $name = $this->randomMachineName();
     $language_code = $this->randomMachineName(2);
     $configurableLanguage = new ConfigurableLanguage(['label' => $name, 'id' => $language_code], 'configurable_language');
diff --git a/core/modules/language/tests/src/Kernel/EntityDefaultLanguageTest.php b/core/modules/language/tests/src/Kernel/EntityDefaultLanguageTest.php
index 11ca0ca8fc95..fb38f751732d 100644
--- a/core/modules/language/tests/src/Kernel/EntityDefaultLanguageTest.php
+++ b/core/modules/language/tests/src/Kernel/EntityDefaultLanguageTest.php
@@ -53,7 +53,7 @@ protected function setUp(): void {
   /**
    * Tests that default language code is properly set for new nodes.
    */
-  public function testEntityTranslationDefaultLanguageViaCode() {
+  public function testEntityTranslationDefaultLanguageViaCode(): void {
     // With language module activated, and a content type that is configured to
     // have no language by default, a new node of this content type will have
     // "und" language code when language is not specified.
diff --git a/core/modules/language/tests/src/Kernel/EntityUrlLanguageTest.php b/core/modules/language/tests/src/Kernel/EntityUrlLanguageTest.php
index d7984991067c..1c261916a9b7 100644
--- a/core/modules/language/tests/src/Kernel/EntityUrlLanguageTest.php
+++ b/core/modules/language/tests/src/Kernel/EntityUrlLanguageTest.php
@@ -61,7 +61,7 @@ protected function setUp(): void {
   /**
    * Ensures that entity URLs in a language have the right language prefix.
    */
-  public function testEntityUrlLanguage() {
+  public function testEntityUrlLanguage(): void {
     $this->assertStringContainsString('/en/entity_test/' . $this->entity->id(), $this->entity->toUrl()->toString());
     $this->assertStringContainsString('/es/entity_test/' . $this->entity->id(), $this->entity->getTranslation('es')->toUrl()->toString());
     $this->assertStringContainsString('/fr/entity_test/' . $this->entity->id(), $this->entity->getTranslation('fr')->toUrl()->toString());
@@ -73,7 +73,7 @@ public function testEntityUrlLanguage() {
    * Test case with the method language-content-entity enabled and configured
    * with higher and also with lower priority than the method language-url.
    */
-  public function testEntityUrlLanguageWithLanguageContentEnabled() {
+  public function testEntityUrlLanguageWithLanguageContentEnabled(): void {
     // Define the method language-content-entity with a higher priority than
     // language-url.
     $config = $this->config('language.types');
diff --git a/core/modules/language/tests/src/Kernel/LanguageConfigFactoryOverrideTest.php b/core/modules/language/tests/src/Kernel/LanguageConfigFactoryOverrideTest.php
index cc34d090c892..48def5629dff 100644
--- a/core/modules/language/tests/src/Kernel/LanguageConfigFactoryOverrideTest.php
+++ b/core/modules/language/tests/src/Kernel/LanguageConfigFactoryOverrideTest.php
@@ -24,7 +24,7 @@ class LanguageConfigFactoryOverrideTest extends KernelTestBase {
   /**
    * Tests language.config_factory_override service has the default language.
    */
-  public function testLanguageConfigFactoryOverride() {
+  public function testLanguageConfigFactoryOverride(): void {
     $this->installConfig('system');
     $this->installConfig('language');
 
diff --git a/core/modules/language/tests/src/Kernel/LanguageConfigOverrideInstallTest.php b/core/modules/language/tests/src/Kernel/LanguageConfigOverrideInstallTest.php
index aa4499f4b8eb..0b4ccda1d6c5 100644
--- a/core/modules/language/tests/src/Kernel/LanguageConfigOverrideInstallTest.php
+++ b/core/modules/language/tests/src/Kernel/LanguageConfigOverrideInstallTest.php
@@ -28,7 +28,7 @@ class LanguageConfigOverrideInstallTest extends KernelTestBase {
   /**
    * Tests the configuration events are not fired during install of overrides.
    */
-  public function testLanguageConfigOverrideInstall() {
+  public function testLanguageConfigOverrideInstall(): void {
     $this->installConfig(['language']);
     ConfigurableLanguage::createFromLangcode('de')->save();
     // Need to enable test module after creating the language otherwise saving
diff --git a/core/modules/language/tests/src/Kernel/LanguageDependencyInjectionTest.php b/core/modules/language/tests/src/Kernel/LanguageDependencyInjectionTest.php
index dc0388394b52..155075ce5093 100644
--- a/core/modules/language/tests/src/Kernel/LanguageDependencyInjectionTest.php
+++ b/core/modules/language/tests/src/Kernel/LanguageDependencyInjectionTest.php
@@ -19,7 +19,7 @@ class LanguageDependencyInjectionTest extends LanguageTestBase {
    *
    * @see \Drupal\Core\Language\LanguageInterface
    */
-  public function testDependencyInjectedNewLanguage() {
+  public function testDependencyInjectedNewLanguage(): void {
     $expected = $this->languageManager->getDefaultLanguage();
     $result = $this->languageManager->getCurrentLanguage();
     $this->assertSame($expected, $result);
@@ -30,7 +30,7 @@ public function testDependencyInjectedNewLanguage() {
    *
    * @see \Drupal\Core\Language\Language
    */
-  public function testDependencyInjectedNewDefaultLanguage() {
+  public function testDependencyInjectedNewDefaultLanguage(): void {
     $default_language = ConfigurableLanguage::load(\Drupal::languageManager()->getDefaultLanguage()->getId());
     // Change the language default object to different values.
     $fr = ConfigurableLanguage::createFromLangcode('fr');
diff --git a/core/modules/language/tests/src/Kernel/LanguageFallbackTest.php b/core/modules/language/tests/src/Kernel/LanguageFallbackTest.php
index f635389eeb68..b272ed35d4ed 100644
--- a/core/modules/language/tests/src/Kernel/LanguageFallbackTest.php
+++ b/core/modules/language/tests/src/Kernel/LanguageFallbackTest.php
@@ -31,7 +31,7 @@ protected function setUp(): void {
   /**
    * Tests language fallback candidates.
    */
-  public function testCandidates() {
+  public function testCandidates(): void {
     $language_list = $this->languageManager->getLanguages();
     $expected = array_keys($language_list + [LanguageInterface::LANGCODE_NOT_SPECIFIED => NULL]);
 
diff --git a/core/modules/language/tests/src/Kernel/LanguageNegotiatorPluginTest.php b/core/modules/language/tests/src/Kernel/LanguageNegotiatorPluginTest.php
index e1bc47fee62e..9673ec3ab92f 100644
--- a/core/modules/language/tests/src/Kernel/LanguageNegotiatorPluginTest.php
+++ b/core/modules/language/tests/src/Kernel/LanguageNegotiatorPluginTest.php
@@ -25,7 +25,7 @@ class LanguageNegotiatorPluginTest extends KernelTestBase {
   /**
    * Tests for PluginNotFoundException.
    */
-  public function testLanguageNegotiatorNoPlugin() {
+  public function testLanguageNegotiatorNoPlugin(): void {
     $logger = new BufferingLogger();
     $logger_factory = $this->createMock(LoggerChannelFactory::class);
     $logger_factory->expects($this->once())
diff --git a/core/modules/language/tests/src/Kernel/LanguageSelectWidgetTest.php b/core/modules/language/tests/src/Kernel/LanguageSelectWidgetTest.php
index a34d37c81ced..0f76bfe69993 100644
--- a/core/modules/language/tests/src/Kernel/LanguageSelectWidgetTest.php
+++ b/core/modules/language/tests/src/Kernel/LanguageSelectWidgetTest.php
@@ -52,7 +52,7 @@ protected function setUp(): void {
   /**
    * Tests the widget with the locked languages.
    */
-  public function testWithIncludedLockedLanguage() {
+  public function testWithIncludedLockedLanguage(): void {
     $this->entityFormDisplay->setComponent('langcode', [
       'type' => 'language_select',
     ])->save();
@@ -65,7 +65,7 @@ public function testWithIncludedLockedLanguage() {
   /**
    * Tests the widget without the locked languages.
    */
-  public function testWithoutIncludedLockedLanguage() {
+  public function testWithoutIncludedLockedLanguage(): void {
     $this->entityFormDisplay->setComponent('langcode', [
       'type' => 'language_select',
       'settings' => ['include_locked' => FALSE],
diff --git a/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateDefaultLanguageTest.php b/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateDefaultLanguageTest.php
index 63bdd6c30c68..ce5167947ff3 100644
--- a/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateDefaultLanguageTest.php
+++ b/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateDefaultLanguageTest.php
@@ -23,7 +23,7 @@ class MigrateDefaultLanguageTest extends MigrateDrupal6TestBase {
   /**
    * Tests language_default migration with an existing language.
    */
-  public function testMigrationWithExistingLanguage() {
+  public function testMigrationWithExistingLanguage(): void {
     $this->setDefaultLanguage('fr');
     $this->startCollectingMessages();
     $this->executeMigrations(['language', 'default_language']);
@@ -37,7 +37,7 @@ public function testMigrationWithExistingLanguage() {
   /**
    * Tests language_default migration with a non-existing language.
    */
-  public function testMigrationWithNonExistentLanguage() {
+  public function testMigrationWithNonExistentLanguage(): void {
     $this->setDefaultLanguage('tv');
     $this->startCollectingMessages();
     $this->executeMigrations(['language', 'default_language']);
@@ -56,7 +56,7 @@ public function testMigrationWithNonExistentLanguage() {
   /**
    * Tests language_default migration with unset default language variable.
    */
-  public function testMigrationWithUnsetVariable() {
+  public function testMigrationWithUnsetVariable(): void {
     // Delete the language_default variable.
     $this->sourceDatabase->delete('variable')
       ->condition('name', 'language_default')
diff --git a/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateLanguageContentCommentSettingsTest.php b/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateLanguageContentCommentSettingsTest.php
index 96a83fa2db8a..853bc3c7c567 100644
--- a/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateLanguageContentCommentSettingsTest.php
+++ b/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateLanguageContentCommentSettingsTest.php
@@ -39,7 +39,7 @@ protected function setUp(): void {
   /**
    * Tests migration of comment content language settings.
    */
-  public function testLanguageCommentSettings() {
+  public function testLanguageCommentSettings(): void {
     // Article and Employee content type have multilingual settings of 'Enabled,
     // with Translation'. Assert that comments are not translatable and the
     // default language is 'current_interface'.
diff --git a/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateLanguageContentMenuSettingsTest.php b/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateLanguageContentMenuSettingsTest.php
index af0cb726c3cb..edcb5b9a496b 100644
--- a/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateLanguageContentMenuSettingsTest.php
+++ b/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateLanguageContentMenuSettingsTest.php
@@ -42,7 +42,7 @@ protected function setUp(): void {
   /**
    * Tests migration of menu translation ability.
    */
-  public function testLanguageMenuContent() {
+  public function testLanguageMenuContent(): void {
     $config = ContentLanguageSettings::load('menu_link_content.menu_link_content');
     $this->assertInstanceOf(ContentLanguageSettings::class, $config);
     $this->assertSame('menu_link_content', $config->getTargetEntityTypeId());
diff --git a/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateLanguageContentSettingsTest.php b/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateLanguageContentSettingsTest.php
index 7cf9ab3f0aaa..971d89f52759 100644
--- a/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateLanguageContentSettingsTest.php
+++ b/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateLanguageContentSettingsTest.php
@@ -46,7 +46,7 @@ protected function setUp(): void {
   /**
    * Tests migration of content language settings.
    */
-  public function testLanguageContent() {
+  public function testLanguageContent(): void {
     // Assert that a translatable content is still translatable.
     $config = $this->config('language.content_settings.node.article');
     $this->assertSame($config->get('target_entity_type_id'), 'node');
diff --git a/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateLanguageContentTaxonomyVocabularySettingsTest.php b/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateLanguageContentTaxonomyVocabularySettingsTest.php
index 918922d1b3b4..6aeeb1a91e76 100644
--- a/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateLanguageContentTaxonomyVocabularySettingsTest.php
+++ b/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateLanguageContentTaxonomyVocabularySettingsTest.php
@@ -40,7 +40,7 @@ protected function setUp(): void {
   /**
    * Tests migration of 18ntaxonomy vocabulary settings.
    */
-  public function testLanguageContentTaxonomy() {
+  public function testLanguageContentTaxonomy(): void {
     $target_entity = 'taxonomy_term';
     // Per Language.
     $this->assertLanguageContentSettings($target_entity, 'vocabulary_1_i_0_', LanguageInterface::LANGCODE_SITE_DEFAULT, TRUE, ['enabled' => FALSE]);
diff --git a/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateLanguageNegotiationSettingsTest.php b/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateLanguageNegotiationSettingsTest.php
index 8d1dc93f5061..aa7ea398fa53 100644
--- a/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateLanguageNegotiationSettingsTest.php
+++ b/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateLanguageNegotiationSettingsTest.php
@@ -22,7 +22,7 @@ class MigrateLanguageNegotiationSettingsTest extends MigrateDrupal6TestBase {
   /**
    * Tests the migration with LANGUAGE_NEGOTIATION_PATH_DEFAULT.
    */
-  public function testLanguageNegotiationWithDefaultPathPrefix() {
+  public function testLanguageNegotiationWithDefaultPathPrefix(): void {
     $this->executeMigrations([
       'language',
       'd6_language_negotiation_settings',
@@ -56,7 +56,7 @@ public function testLanguageNegotiationWithDefaultPathPrefix() {
   /**
    * Tests the migration with LANGUAGE_NEGOTIATION_NONE.
    */
-  public function testLanguageNegotiationWithNoNegotiation() {
+  public function testLanguageNegotiationWithNoNegotiation(): void {
     $this->sourceDatabase->update('variable')
       ->fields(['value' => serialize(0)])
       ->condition('name', 'language_negotiation')
@@ -88,7 +88,7 @@ public function testLanguageNegotiationWithNoNegotiation() {
   /**
    * Tests the migration with LANGUAGE_NEGOTIATION_PATH.
    */
-  public function testLanguageNegotiationWithPathPrefix() {
+  public function testLanguageNegotiationWithPathPrefix(): void {
     $this->sourceDatabase->update('variable')
       ->fields(['value' => serialize(2)])
       ->condition('name', 'language_negotiation')
@@ -129,7 +129,7 @@ public function testLanguageNegotiationWithPathPrefix() {
   /**
    * Tests the migration with LANGUAGE_NEGOTIATION_DOMAIN.
    */
-  public function testLanguageNegotiationWithDomain() {
+  public function testLanguageNegotiationWithDomain(): void {
     $this->sourceDatabase->update('variable')
       ->fields(['value' => serialize(3)])
       ->condition('name', 'language_negotiation')
diff --git a/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateLanguageTest.php b/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateLanguageTest.php
index 0ed0caf78b76..21afd6464d89 100644
--- a/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateLanguageTest.php
+++ b/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateLanguageTest.php
@@ -46,7 +46,7 @@ protected function assertLanguage(string $id, string $label, string $direction =
   /**
    * Tests migration of Drupal 6 languages to configurable language entities.
    */
-  public function testLanguageMigration() {
+  public function testLanguageMigration(): void {
     $this->executeMigration('language');
     $this->assertLanguage('en', 'English');
     $this->assertLanguage('fr', 'French');
diff --git a/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateDefaultLanguageTest.php b/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateDefaultLanguageTest.php
index 08cc3ebc37b8..cbcb91b390b5 100644
--- a/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateDefaultLanguageTest.php
+++ b/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateDefaultLanguageTest.php
@@ -23,7 +23,7 @@ class MigrateDefaultLanguageTest extends MigrateDrupal7TestBase {
   /**
    * Tests language_default migration with a non-existing language.
    */
-  public function testMigrationWithExistingLanguage() {
+  public function testMigrationWithExistingLanguage(): void {
     $this->setDefaultLanguage('is');
     $this->startCollectingMessages();
     $this->executeMigrations(['language', 'default_language']);
@@ -37,7 +37,7 @@ public function testMigrationWithExistingLanguage() {
   /**
    * Tests language_default migration with a non-existing language.
    */
-  public function testMigrationWithNonExistentLanguage() {
+  public function testMigrationWithNonExistentLanguage(): void {
     $this->setDefaultLanguage('tv');
     $this->startCollectingMessages();
     $this->executeMigrations(['language', 'default_language']);
@@ -56,7 +56,7 @@ public function testMigrationWithNonExistentLanguage() {
   /**
    * Tests language_default migration with unset default language variable.
    */
-  public function testMigrationWithUnsetVariable() {
+  public function testMigrationWithUnsetVariable(): void {
     // Delete the language_default variable.
     $this->sourceDatabase->delete('variable')
       ->condition('name', 'language_default')
diff --git a/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateLanguageContentCommentSettingsNoEntityTranslationTest.php b/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateLanguageContentCommentSettingsNoEntityTranslationTest.php
index 0c4872a8d2fa..9cf007a8593f 100644
--- a/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateLanguageContentCommentSettingsNoEntityTranslationTest.php
+++ b/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateLanguageContentCommentSettingsNoEntityTranslationTest.php
@@ -59,7 +59,7 @@ public static function migrateDumpAlter(KernelTestBase $test) {
   /**
    * Tests migration of content language settings.
    */
-  public function testLanguageCommentSettings() {
+  public function testLanguageCommentSettings(): void {
     // Confirm there is no message about a missing bundle.
     $this->assertEmpty($this->migrateMessages, $this->migrateMessages['error'][0] ?? '');
 
diff --git a/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateLanguageContentCommentSettingsTest.php b/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateLanguageContentCommentSettingsTest.php
index 9ea1c17624b8..16923949a2e1 100644
--- a/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateLanguageContentCommentSettingsTest.php
+++ b/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateLanguageContentCommentSettingsTest.php
@@ -41,7 +41,7 @@ protected function setUp(): void {
   /**
    * Tests migration of content language settings.
    */
-  public function testLanguageCommentSettings() {
+  public function testLanguageCommentSettings(): void {
     // Confirm there is no message about a missing bundle.
     $this->assertEmpty($this->migrateMessages, $this->migrateMessages['error'][0] ?? '');
 
diff --git a/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateLanguageContentMenuSettingsTest.php b/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateLanguageContentMenuSettingsTest.php
index 9899525eac68..1a98209ed50f 100644
--- a/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateLanguageContentMenuSettingsTest.php
+++ b/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateLanguageContentMenuSettingsTest.php
@@ -41,7 +41,7 @@ protected function setUp(): void {
   /**
    * Tests migration of menu translation ability.
    */
-  public function testLanguageContentMenu() {
+  public function testLanguageContentMenu(): void {
     $config = ContentLanguageSettings::load('menu_link_content.menu_link_content');
     $this->assertInstanceOf(ContentLanguageSettings::class, $config);
     $this->assertSame('menu_link_content', $config->getTargetEntityTypeId());
diff --git a/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateLanguageContentSettingsTest.php b/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateLanguageContentSettingsTest.php
index 10366453d8c7..28da2b802494 100644
--- a/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateLanguageContentSettingsTest.php
+++ b/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateLanguageContentSettingsTest.php
@@ -44,7 +44,7 @@ protected function setUp(): void {
   /**
    * Tests migration of content language settings.
    */
-  public function testLanguageContent() {
+  public function testLanguageContent(): void {
     // Assert that a translatable content is still translatable.
     $config = $this->config('language.content_settings.node.blog');
     $this->assertSame($config->get('target_entity_type_id'), 'node');
diff --git a/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateLanguageContentTaxonomyVocabularySettingsTest.php b/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateLanguageContentTaxonomyVocabularySettingsTest.php
index 91146631bd18..801d68b44f84 100644
--- a/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateLanguageContentTaxonomyVocabularySettingsTest.php
+++ b/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateLanguageContentTaxonomyVocabularySettingsTest.php
@@ -41,7 +41,7 @@ protected function setUp(): void {
   /**
    * Tests migration of 18ntaxonomy vocabulary settings.
    */
-  public function testLanguageContentTaxonomy() {
+  public function testLanguageContentTaxonomy(): void {
     $target_entity = 'taxonomy_term';
     // No multilingual options for terms, i18n_mode = 0.
     $this->assertLanguageContentSettings($target_entity, 'tags', LanguageInterface::LANGCODE_NOT_SPECIFIED, FALSE, ['enabled' => FALSE]);
diff --git a/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateLanguageNegotiationSettingsTest.php b/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateLanguageNegotiationSettingsTest.php
index b42a3728d905..54fdf4b0d21d 100644
--- a/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateLanguageNegotiationSettingsTest.php
+++ b/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateLanguageNegotiationSettingsTest.php
@@ -22,7 +22,7 @@ class MigrateLanguageNegotiationSettingsTest extends MigrateDrupal7TestBase {
   /**
    * Tests migration of language types variables to language.types.yml.
    */
-  public function testLanguageTypes() {
+  public function testLanguageTypes(): void {
     $this->executeMigrations([
       'language',
       'd7_language_negotiation_settings',
@@ -54,7 +54,7 @@ public function testLanguageTypes() {
   /**
    * Tests the migration with prefix negotiation.
    */
-  public function testLanguageNegotiationWithPrefix() {
+  public function testLanguageNegotiationWithPrefix(): void {
     $this->sourceDatabase->update('languages')
       ->fields(['domain' => ''])
       ->execute();
@@ -90,7 +90,7 @@ public function testLanguageNegotiationWithPrefix() {
   /**
    * Tests the migration with domain negotiation.
    */
-  public function testLanguageNegotiationWithDomain() {
+  public function testLanguageNegotiationWithDomain(): void {
     $this->sourceDatabase->update('variable')
       ->fields(['value' => serialize(1)])
       ->condition('name', 'locale_language_negotiation_url_part')
@@ -118,7 +118,7 @@ public function testLanguageNegotiationWithDomain() {
   /**
    * Tests the migration with non-existent variables.
    */
-  public function testLanguageNegotiationWithNonExistentVariables() {
+  public function testLanguageNegotiationWithNonExistentVariables(): void {
     $this->sourceDatabase->delete('variable')
       ->condition('name', ['local_language_negotiation_url_part', 'local_language_negotiation_session_param'], 'IN')
       ->execute();
diff --git a/core/modules/language/tests/src/Kernel/OverriddenConfigImportTest.php b/core/modules/language/tests/src/Kernel/OverriddenConfigImportTest.php
index 051cbaf106ed..90a8f982155e 100644
--- a/core/modules/language/tests/src/Kernel/OverriddenConfigImportTest.php
+++ b/core/modules/language/tests/src/Kernel/OverriddenConfigImportTest.php
@@ -59,7 +59,7 @@ protected function setUp(): void {
   /**
    * Tests importing overridden config alongside config in the default language.
    */
-  public function testConfigImportUpdates() {
+  public function testConfigImportUpdates(): void {
     $storage = $this->container->get('config.storage');
     $sync = $this->container->get('config.storage.sync');
     /** @var \Drupal\language\ConfigurableLanguageManagerInterface $language_manager */
diff --git a/core/modules/language/tests/src/Kernel/Views/ArgumentLanguageTest.php b/core/modules/language/tests/src/Kernel/Views/ArgumentLanguageTest.php
index 8653988b470f..282a3e5b4428 100644
--- a/core/modules/language/tests/src/Kernel/Views/ArgumentLanguageTest.php
+++ b/core/modules/language/tests/src/Kernel/Views/ArgumentLanguageTest.php
@@ -24,7 +24,7 @@ class ArgumentLanguageTest extends LanguageTestBase {
   /**
    * Tests the language argument.
    */
-  public function testArgument() {
+  public function testArgument(): void {
     $view = Views::getView('test_view');
     foreach (['en' => 'John', 'xx-lolspeak' => 'George'] as $langcode => $name) {
       $view->setDisplay();
diff --git a/core/modules/language/tests/src/Kernel/Views/FieldLanguageTest.php b/core/modules/language/tests/src/Kernel/Views/FieldLanguageTest.php
index ae4247cb5aac..d3d0a375297e 100644
--- a/core/modules/language/tests/src/Kernel/Views/FieldLanguageTest.php
+++ b/core/modules/language/tests/src/Kernel/Views/FieldLanguageTest.php
@@ -24,7 +24,7 @@ class FieldLanguageTest extends LanguageTestBase {
   /**
    * Tests the language field.
    */
-  public function testField() {
+  public function testField(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
     $view->displayHandlers->get('default')->overrideOption('fields', [
diff --git a/core/modules/language/tests/src/Kernel/Views/FilterLanguageTest.php b/core/modules/language/tests/src/Kernel/Views/FilterLanguageTest.php
index b5e2bfaf2290..ccfad272df12 100644
--- a/core/modules/language/tests/src/Kernel/Views/FilterLanguageTest.php
+++ b/core/modules/language/tests/src/Kernel/Views/FilterLanguageTest.php
@@ -24,7 +24,7 @@ class FilterLanguageTest extends LanguageTestBase {
   /**
    * Tests the language filter.
    */
-  public function testFilter() {
+  public function testFilter(): void {
     $view = Views::getView('test_view');
     foreach (['en' => 'John', 'xx-lolspeak' => 'George'] as $langcode => $name) {
       $view->setDisplay();
diff --git a/core/modules/language/tests/src/Unit/Config/LanguageConfigOverrideTest.php b/core/modules/language/tests/src/Unit/Config/LanguageConfigOverrideTest.php
index 8f8725b8d733..e898a80bf739 100644
--- a/core/modules/language/tests/src/Unit/Config/LanguageConfigOverrideTest.php
+++ b/core/modules/language/tests/src/Unit/Config/LanguageConfigOverrideTest.php
@@ -70,7 +70,7 @@ protected function setUp(): void {
   /**
    * @covers ::save
    */
-  public function testSaveNew() {
+  public function testSaveNew(): void {
     $this->cacheTagsInvalidator->expects($this->once())
       ->method('invalidateTags')
       ->with(['config:config.test']);
@@ -81,7 +81,7 @@ public function testSaveNew() {
   /**
    * @covers ::save
    */
-  public function testSaveExisting() {
+  public function testSaveExisting(): void {
     $this->cacheTagsInvalidator->expects($this->once())
       ->method('invalidateTags')
       ->with(['config:config.test']);
@@ -92,7 +92,7 @@ public function testSaveExisting() {
   /**
    * @covers ::delete
    */
-  public function testDelete() {
+  public function testDelete(): void {
     $this->cacheTagsInvalidator->expects($this->once())
       ->method('invalidateTags')
       ->with(['config:config.test']);
diff --git a/core/modules/language/tests/src/Unit/ConfigurableLanguageUnitTest.php b/core/modules/language/tests/src/Unit/ConfigurableLanguageUnitTest.php
index 02c35d10bb76..2c4156cf9041 100644
--- a/core/modules/language/tests/src/Unit/ConfigurableLanguageUnitTest.php
+++ b/core/modules/language/tests/src/Unit/ConfigurableLanguageUnitTest.php
@@ -19,7 +19,7 @@ class ConfigurableLanguageUnitTest extends UnitTestCase {
   /**
    * @covers ::getDirection
    */
-  public function testDirection() {
+  public function testDirection(): void {
     // Direction of language writing, an integer. Usually either
     // ConfigurableLanguage::DIRECTION_LTR or
     // ConfigurableLanguage::DIRECTION_RTL.
@@ -35,7 +35,7 @@ public function testDirection() {
    * @covers ::getWeight
    * @covers ::setWeight
    */
-  public function testWeight() {
+  public function testWeight(): void {
     // The weight, an integer. Used to order languages with larger positive
     // weights sinking items toward the bottom of lists.
     $configurableLanguage = new ConfigurableLanguage(['weight' => -5], 'configurable_language');
diff --git a/core/modules/language/tests/src/Unit/ContentLanguageSettingsUnitTest.php b/core/modules/language/tests/src/Unit/ContentLanguageSettingsUnitTest.php
index 471648cb92ba..cf7388e7dccf 100644
--- a/core/modules/language/tests/src/Unit/ContentLanguageSettingsUnitTest.php
+++ b/core/modules/language/tests/src/Unit/ContentLanguageSettingsUnitTest.php
@@ -88,7 +88,7 @@ protected function setUp(): void {
   /**
    * @covers ::calculateDependencies
    */
-  public function testCalculateDependencies() {
+  public function testCalculateDependencies(): void {
     // Mock the interfaces necessary to create a dependency on a bundle entity.
     $target_entity_type = $this->createMock('\Drupal\Core\Entity\EntityTypeInterface');
     $target_entity_type->expects($this->any())
@@ -111,7 +111,7 @@ public function testCalculateDependencies() {
   /**
    * @covers ::id
    */
-  public function testId() {
+  public function testId(): void {
     $config = new ContentLanguageSettings([
       'target_entity_type_id' => 'test_entity_type',
       'target_bundle' => 'test_bundle',
@@ -122,7 +122,7 @@ public function testId() {
   /**
    * @covers ::getTargetEntityTypeId
    */
-  public function testTargetEntityTypeId() {
+  public function testTargetEntityTypeId(): void {
     $config = new ContentLanguageSettings([
       'target_entity_type_id' => 'test_entity_type',
       'target_bundle' => 'test_bundle',
@@ -133,7 +133,7 @@ public function testTargetEntityTypeId() {
   /**
    * @covers ::getTargetBundle
    */
-  public function testTargetBundle() {
+  public function testTargetBundle(): void {
     $config = new ContentLanguageSettings([
       'target_entity_type_id' => 'test_entity_type',
       'target_bundle' => 'test_bundle',
@@ -147,7 +147,7 @@ public function testTargetBundle() {
    *
    * @dataProvider providerDefaultLangcode
    */
-  public function testDefaultLangcode(ContentLanguageSettings $config, $expected) {
+  public function testDefaultLangcode(ContentLanguageSettings $config, $expected): void {
     $this->assertSame($expected, $config->getDefaultLangcode());
   }
 
@@ -176,7 +176,7 @@ public static function providerDefaultLangcode() {
    *
    * @dataProvider providerLanguageAlterable
    */
-  public function testLanguageAlterable(ContentLanguageSettings $config, $expected) {
+  public function testLanguageAlterable(ContentLanguageSettings $config, $expected): void {
     $this->assertSame($expected, $config->isLanguageAlterable());
   }
 
@@ -210,7 +210,7 @@ public static function providerLanguageAlterable() {
    *
    * @dataProvider providerIsDefaultConfiguration
    */
-  public function testIsDefaultConfiguration(ContentLanguageSettings $config, $expected) {
+  public function testIsDefaultConfiguration(ContentLanguageSettings $config, $expected): void {
     $this->assertSame($expected, $config->isDefaultConfiguration());
   }
 
@@ -244,7 +244,7 @@ public static function providerIsDefaultConfiguration() {
    *
    * @dataProvider providerLoadByEntityTypeBundle
    */
-  public function testLoadByEntityTypeBundle($config_id, ?ContentLanguageSettings $existing_config, $expected_langcode, $expected_language_alterable) {
+  public function testLoadByEntityTypeBundle($config_id, ?ContentLanguageSettings $existing_config, $expected_langcode, $expected_language_alterable): void {
     [$type, $bundle] = explode('.', $config_id);
 
     $nullConfig = new ContentLanguageSettings([
diff --git a/core/modules/language/tests/src/Unit/LanguageNegotiationUrlTest.php b/core/modules/language/tests/src/Unit/LanguageNegotiationUrlTest.php
index 5cea18f24ed6..c08b0b970570 100644
--- a/core/modules/language/tests/src/Unit/LanguageNegotiationUrlTest.php
+++ b/core/modules/language/tests/src/Unit/LanguageNegotiationUrlTest.php
@@ -69,7 +69,7 @@ protected function setUp(): void {
    *
    * @dataProvider providerTestPathPrefix
    */
-  public function testPathPrefix($prefix, $prefixes, $expected_langcode) {
+  public function testPathPrefix($prefix, $prefixes, $expected_langcode): void {
     $this->languageManager->expects($this->any())
       ->method('getCurrentLanguage')
       ->willReturn($this->languages[(in_array($expected_langcode, [
@@ -161,7 +161,7 @@ public static function providerTestPathPrefix() {
    *
    * @dataProvider providerNeutralLanguages
    */
-  public function testNeutralLanguages($langcode, $expected_langcode) {
+  public function testNeutralLanguages($langcode, $expected_langcode): void {
     if ($expected_langcode) {
       $this->languageManager->expects($this->once())
         ->method('getCurrentLanguage')
@@ -226,7 +226,7 @@ public static function providerNeutralLanguages() {
    *
    * @dataProvider providerTestDomain
    */
-  public function testDomain($http_host, $domains, $expected_langcode) {
+  public function testDomain($http_host, $domains, $expected_langcode): void {
     $this->languageManager->expects($this->any())
       ->method('getCurrentLanguage')
       ->willReturn($this->languages['en']);
diff --git a/core/modules/language/tests/src/Unit/Menu/LanguageLocalTasksTest.php b/core/modules/language/tests/src/Unit/Menu/LanguageLocalTasksTest.php
index f69026f7f984..2f242e198cb3 100644
--- a/core/modules/language/tests/src/Unit/Menu/LanguageLocalTasksTest.php
+++ b/core/modules/language/tests/src/Unit/Menu/LanguageLocalTasksTest.php
@@ -28,7 +28,7 @@ protected function setUp(): void {
    *
    * @dataProvider getLanguageAdminOverviewRoutes
    */
-  public function testLanguageAdminLocalTasks($route, $expected) {
+  public function testLanguageAdminLocalTasks($route, $expected): void {
     $this->assertLocalTasks($route, $expected);
   }
 
@@ -45,7 +45,7 @@ public static function getLanguageAdminOverviewRoutes() {
   /**
    * Tests language edit local tasks existence.
    */
-  public function testLanguageEditLocalTasks() {
+  public function testLanguageEditLocalTasks(): void {
     $this->assertLocalTasks('entity.configurable_language.edit_form', [
       0 => ['entity.configurable_language.edit_form'],
     ]);
diff --git a/core/modules/language/tests/src/Unit/Plugin/LanguageNegotiation/LanguageNegotiationContentEntityTest.php b/core/modules/language/tests/src/Unit/Plugin/LanguageNegotiation/LanguageNegotiationContentEntityTest.php
index e62321169462..4ae5949a71a3 100644
--- a/core/modules/language/tests/src/Unit/Plugin/LanguageNegotiation/LanguageNegotiationContentEntityTest.php
+++ b/core/modules/language/tests/src/Unit/Plugin/LanguageNegotiation/LanguageNegotiationContentEntityTest.php
@@ -97,7 +97,7 @@ protected function setUp(): void {
   /**
    * @covers ::getLangcode
    */
-  public function testGetLangcode() {
+  public function testGetLangcode(): void {
     $languageNegotiationContentEntity = $this->createLanguageNegotiationPlugin();
 
     // Case 1: Empty request.
@@ -131,7 +131,7 @@ public function testGetLangcode() {
   /**
    * @covers ::processOutbound
    */
-  public function testProcessOutbound() {
+  public function testProcessOutbound(): void {
 
     // Case 1: Not all processing conditions are met.
     $languageNegotiationContentEntityMock = $this->createPartialMock($this->getPluginClass(),
@@ -208,7 +208,7 @@ public function testProcessOutbound() {
   /**
    * @covers ::getLanguageSwitchLinks
    */
-  public function testGetLanguageSwitchLinks() {
+  public function testGetLanguageSwitchLinks(): void {
     $languageNegotiationContentEntity = $this->createLanguageNegotiationPlugin();
     $languageNegotiationContentEntity->setLanguageManager($this->languageManager);
 
diff --git a/core/modules/language/tests/src/Unit/process/LanguageDomainsTest.php b/core/modules/language/tests/src/Unit/process/LanguageDomainsTest.php
index 87f69db62352..29f803d34db3 100644
--- a/core/modules/language/tests/src/Unit/process/LanguageDomainsTest.php
+++ b/core/modules/language/tests/src/Unit/process/LanguageDomainsTest.php
@@ -39,7 +39,7 @@ protected function setUp(): void {
   /**
    * @covers ::transform
    */
-  public function testTransform() {
+  public function testTransform(): void {
     $source = [
       ['language' => 'en', 'domain' => ''],
       ['language' => 'fr', 'domain' => 'fr.example.com'],
diff --git a/core/modules/language/tests/src/Unit/process/LanguageNegotiationTest.php b/core/modules/language/tests/src/Unit/process/LanguageNegotiationTest.php
index ef5d2921bea1..3b96ea68aa0d 100644
--- a/core/modules/language/tests/src/Unit/process/LanguageNegotiationTest.php
+++ b/core/modules/language/tests/src/Unit/process/LanguageNegotiationTest.php
@@ -25,7 +25,7 @@ protected function setUp(): void {
   /**
    * Tests successful transformation without weights.
    */
-  public function testTransformWithWeights() {
+  public function testTransformWithWeights(): void {
     $source = [
       [
         'locale-url' => [],
@@ -59,7 +59,7 @@ public function testTransformWithWeights() {
   /**
    * Tests successful transformation without weights.
    */
-  public function testTransformWithoutWeights() {
+  public function testTransformWithoutWeights(): void {
     $source = [
       [
         'locale-url' => [],
@@ -79,7 +79,7 @@ public function testTransformWithoutWeights() {
   /**
    * Tests string input.
    */
-  public function testStringInput() {
+  public function testStringInput(): void {
     $this->plugin = new LanguageNegotiation([], 'map', []);
     $this->expectException(MigrateException::class);
     $this->expectExceptionMessage('The input should be an array');
diff --git a/core/modules/language/tests/src/Unit/process/LanguageTypesTest.php b/core/modules/language/tests/src/Unit/process/LanguageTypesTest.php
index 5be238b35295..21b9cdd1a97b 100644
--- a/core/modules/language/tests/src/Unit/process/LanguageTypesTest.php
+++ b/core/modules/language/tests/src/Unit/process/LanguageTypesTest.php
@@ -17,7 +17,7 @@ class LanguageTypesTest extends MigrateProcessTestCase {
   /**
    * Tests successful transformation of all language types.
    */
-  public function testTransformAll() {
+  public function testTransformAll(): void {
     $this->plugin = new LanguageTypes([], 'map', []);
     $source = [
       'language' => TRUE,
@@ -36,7 +36,7 @@ public function testTransformAll() {
   /**
    * Tests successful transformation of configurable language types.
    */
-  public function testTransformConfigurable() {
+  public function testTransformConfigurable(): void {
     $this->plugin = new LanguageTypes(['filter_configurable' => TRUE], 'map', []);
     $source = [
       'language' => TRUE,
@@ -53,7 +53,7 @@ public function testTransformConfigurable() {
   /**
    * Tests string input.
    */
-  public function testStringInput() {
+  public function testStringInput(): void {
     $this->plugin = new LanguageTypes([], 'map', []);
     $this->expectException(MigrateException::class);
     $this->expectExceptionMessage('The input should be an array');
diff --git a/core/modules/layout_builder/tests/src/Functional/LayoutBuilderAccessTest.php b/core/modules/layout_builder/tests/src/Functional/LayoutBuilderAccessTest.php
index 6acfda1cb8bd..ba088036bfd2 100644
--- a/core/modules/layout_builder/tests/src/Functional/LayoutBuilderAccessTest.php
+++ b/core/modules/layout_builder/tests/src/Functional/LayoutBuilderAccessTest.php
@@ -72,7 +72,7 @@ protected function setUp(): void {
    * @param array $permission_dependencies
    *   An array of expected permission dependencies.
    */
-  public function testAccessWithBundles(array $permissions, $default_access, $non_editable_access, $editable_access, array $permission_dependencies) {
+  public function testAccessWithBundles(array $permissions, $default_access, $non_editable_access, $editable_access, array $permission_dependencies): void {
     $permissions[] = 'edit own bundle_with_section_field content';
     $permissions[] = 'access content';
     $user = $this->drupalCreateUser($permissions);
@@ -187,7 +187,7 @@ public static function providerTestAccessWithBundles() {
    *
    * @dataProvider providerTestAccessWithoutBundles
    */
-  public function testAccessWithoutBundles(array $permissions, $default_access, $non_editable_access, $editable_access, array $permission_dependencies) {
+  public function testAccessWithoutBundles(array $permissions, $default_access, $non_editable_access, $editable_access, array $permission_dependencies): void {
     $permissions[] = 'access user profiles';
     $user = $this->drupalCreateUser($permissions);
     $this->drupalLogin($user);
diff --git a/core/modules/layout_builder/tests/src/Functional/LayoutBuilderBlocksTest.php b/core/modules/layout_builder/tests/src/Functional/LayoutBuilderBlocksTest.php
index 1c150d3ea990..89395413a821 100644
--- a/core/modules/layout_builder/tests/src/Functional/LayoutBuilderBlocksTest.php
+++ b/core/modules/layout_builder/tests/src/Functional/LayoutBuilderBlocksTest.php
@@ -18,7 +18,7 @@ class LayoutBuilderBlocksTest extends LayoutBuilderTestBase {
   /**
    * Tests that block plugins can define custom attributes and contextual links.
    */
-  public function testPluginsProvidingCustomAttributesAndContextualLinks() {
+  public function testPluginsProvidingCustomAttributesAndContextualLinks(): void {
     $assert_session = $this->assertSession();
     $page = $this->getSession()->getPage();
 
@@ -49,7 +49,7 @@ public function testPluginsProvidingCustomAttributesAndContextualLinks() {
   /**
    * Tests preview-aware layout & block plugins.
    */
-  public function testPreviewAwarePlugins() {
+  public function testPreviewAwarePlugins(): void {
     $assert_session = $this->assertSession();
     $page = $this->getSession()->getPage();
 
@@ -83,7 +83,7 @@ public function testPreviewAwarePlugins() {
   /**
    * {@inheritdoc}
    */
-  public function testLayoutBuilderChooseBlocksAlter() {
+  public function testLayoutBuilderChooseBlocksAlter(): void {
     // See layout_builder_test_plugin_filter_block__layout_builder_alter().
     $assert_session = $this->assertSession();
 
@@ -139,7 +139,7 @@ public function testLayoutBuilderChooseBlocksAlter() {
   /**
    * Tests that deleting a View block used in Layout Builder works.
    */
-  public function testDeletedView() {
+  public function testDeletedView(): void {
     $assert_session = $this->assertSession();
     $page = $this->getSession()->getPage();
 
@@ -181,7 +181,7 @@ public function testDeletedView() {
    * @see \Drupal\Core\Render\PreviewFallbackInterface::getPreviewFallbackString()
    * @see \Drupal\layout_builder\EventSubscriber\BlockComponentRenderArray::onBuildRender()
    */
-  public function testBlockPlaceholder() {
+  public function testBlockPlaceholder(): void {
     $assert_session = $this->assertSession();
     $page = $this->getSession()->getPage();
 
@@ -222,7 +222,7 @@ public function testBlockPlaceholder() {
   /**
    * Tests the ability to use a specified block label for field blocks.
    */
-  public function testFieldBlockLabel() {
+  public function testFieldBlockLabel(): void {
     $assert_session = $this->assertSession();
     $page = $this->getSession()->getPage();
 
@@ -262,7 +262,7 @@ public function testFieldBlockLabel() {
   /**
    * Tests the Block UI when Layout Builder is installed.
    */
-  public function testBlockUiListing() {
+  public function testBlockUiListing(): void {
     $assert_session = $this->assertSession();
     $page = $this->getSession()->getPage();
 
diff --git a/core/modules/layout_builder/tests/src/Functional/LayoutBuilderDefaultValuesTest.php b/core/modules/layout_builder/tests/src/Functional/LayoutBuilderDefaultValuesTest.php
index fe7210c6081a..9d099dfe9c32 100644
--- a/core/modules/layout_builder/tests/src/Functional/LayoutBuilderDefaultValuesTest.php
+++ b/core/modules/layout_builder/tests/src/Functional/LayoutBuilderDefaultValuesTest.php
@@ -99,7 +99,7 @@ protected function setUp(): void {
   /**
    * Tests display of default field values.
    */
-  public function testDefaultValues() {
+  public function testDefaultValues(): void {
     // Begin by viewing nodes with Layout Builder disabled.
     $this->assertNodeWithValues();
     $this->assertNodeWithDefaultValues();
diff --git a/core/modules/layout_builder/tests/src/Functional/LayoutBuilderFieldBlockEntityReferenceCacheTagsTest.php b/core/modules/layout_builder/tests/src/Functional/LayoutBuilderFieldBlockEntityReferenceCacheTagsTest.php
index 1bb93b2793a6..0599f0f1d55f 100644
--- a/core/modules/layout_builder/tests/src/Functional/LayoutBuilderFieldBlockEntityReferenceCacheTagsTest.php
+++ b/core/modules/layout_builder/tests/src/Functional/LayoutBuilderFieldBlockEntityReferenceCacheTagsTest.php
@@ -72,7 +72,7 @@ protected function setUp(): void {
   /**
    * Tests cache tags on field block for entity reference field.
    */
-  public function testEntityReferenceFieldBlockCaching() {
+  public function testEntityReferenceFieldBlockCaching(): void {
     $assert_session = $this->assertSession();
 
     // Create two nodes, one of the referenced content type and one of the
diff --git a/core/modules/layout_builder/tests/src/Functional/LayoutBuilderFormModeTest.php b/core/modules/layout_builder/tests/src/Functional/LayoutBuilderFormModeTest.php
index 246b7c5b65b9..4226d275e967 100644
--- a/core/modules/layout_builder/tests/src/Functional/LayoutBuilderFormModeTest.php
+++ b/core/modules/layout_builder/tests/src/Functional/LayoutBuilderFormModeTest.php
@@ -95,7 +95,7 @@ protected function setUp(): void {
   /**
    * Tests that the 'Discard changes' button skips validation and ignores input.
    */
-  public function testDiscardValidation() {
+  public function testDiscardValidation(): void {
     $page = $this->getSession()->getPage();
     $assert_session = $this->assertSession();
 
diff --git a/core/modules/layout_builder/tests/src/Functional/LayoutBuilderLocalTaskTest.php b/core/modules/layout_builder/tests/src/Functional/LayoutBuilderLocalTaskTest.php
index 546c602ac99b..fe5bcbaaba10 100644
--- a/core/modules/layout_builder/tests/src/Functional/LayoutBuilderLocalTaskTest.php
+++ b/core/modules/layout_builder/tests/src/Functional/LayoutBuilderLocalTaskTest.php
@@ -40,7 +40,7 @@ protected function setUp(): void {
   /**
    * Tests the cacheability of local tasks with Layout Builder module installed.
    */
-  public function testLocalTaskLayoutBuilderInstalledCacheability() {
+  public function testLocalTaskLayoutBuilderInstalledCacheability(): void {
     // Create only one bundle and do not enable layout builder on its display.
     $this->drupalCreateContentType([
       'type' => 'bundle_no_lb_display',
@@ -68,7 +68,7 @@ public function testLocalTaskLayoutBuilderInstalledCacheability() {
   /**
    * Tests the cacheability of local tasks with multiple content types.
    */
-  public function testLocalTaskMultipleContentTypesCacheability() {
+  public function testLocalTaskMultipleContentTypesCacheability(): void {
     // Test when there are two content types, one with a display having Layout
     // Builder enabled with overrides, and another with display not having
     // Layout Builder enabled.
diff --git a/core/modules/layout_builder/tests/src/Functional/LayoutBuilderOverridesTest.php b/core/modules/layout_builder/tests/src/Functional/LayoutBuilderOverridesTest.php
index 13966bc3a807..31bd551edf3e 100644
--- a/core/modules/layout_builder/tests/src/Functional/LayoutBuilderOverridesTest.php
+++ b/core/modules/layout_builder/tests/src/Functional/LayoutBuilderOverridesTest.php
@@ -18,7 +18,7 @@ class LayoutBuilderOverridesTest extends LayoutBuilderTestBase {
   /**
    * Tests deleting a field in-use by an overridden layout.
    */
-  public function testDeleteField() {
+  public function testDeleteField(): void {
     $assert_session = $this->assertSession();
     $page = $this->getSession()->getPage();
 
@@ -51,7 +51,7 @@ public function testDeleteField() {
   /**
    * Tests Layout Builder overrides without access to edit the default layout.
    */
-  public function testOverridesWithoutDefaultsAccess() {
+  public function testOverridesWithoutDefaultsAccess(): void {
     $assert_session = $this->assertSession();
     $page = $this->getSession()->getPage();
 
@@ -71,7 +71,7 @@ public function testOverridesWithoutDefaultsAccess() {
   /**
    * Tests Layout Builder overrides without Field UI installed.
    */
-  public function testOverridesWithoutFieldUi() {
+  public function testOverridesWithoutFieldUi(): void {
     $this->container->get('module_installer')->uninstall(['field_ui']);
 
     $assert_session = $this->assertSession();
@@ -95,7 +95,7 @@ public function testOverridesWithoutFieldUi() {
   /**
    * Tests functionality of Layout Builder for overrides.
    */
-  public function testOverrides() {
+  public function testOverrides(): void {
     $assert_session = $this->assertSession();
     $page = $this->getSession()->getPage();
 
@@ -142,7 +142,7 @@ public function testOverrides() {
   /**
    * Tests a custom alter of the overrides form.
    */
-  public function testOverridesFormAlter() {
+  public function testOverridesFormAlter(): void {
     $assert_session = $this->assertSession();
     $page = $this->getSession()->getPage();
 
@@ -177,7 +177,7 @@ public function testOverridesFormAlter() {
   /**
    * Tests removing all sections from overrides and defaults.
    */
-  public function testRemovingAllSections() {
+  public function testRemovingAllSections(): void {
     $assert_session = $this->assertSession();
     $page = $this->getSession()->getPage();
 
diff --git a/core/modules/layout_builder/tests/src/Functional/LayoutBuilderPrepareLayoutTest.php b/core/modules/layout_builder/tests/src/Functional/LayoutBuilderPrepareLayoutTest.php
index 2974304ae9ed..bd47f0218fca 100644
--- a/core/modules/layout_builder/tests/src/Functional/LayoutBuilderPrepareLayoutTest.php
+++ b/core/modules/layout_builder/tests/src/Functional/LayoutBuilderPrepareLayoutTest.php
@@ -75,7 +75,7 @@ protected function setUp(): void {
    *
    * @see \Drupal\layout_builder_element_test\EventSubscriber\TestPrepareLayout;
    */
-  public function testAlterPrepareLayout() {
+  public function testAlterPrepareLayout(): void {
     $assert_session = $this->assertSession();
     $page = $this->getSession()->getPage();
 
diff --git a/core/modules/layout_builder/tests/src/Functional/LayoutBuilderSectionStorageTest.php b/core/modules/layout_builder/tests/src/Functional/LayoutBuilderSectionStorageTest.php
index e65a14fab70d..4f8dda899cac 100644
--- a/core/modules/layout_builder/tests/src/Functional/LayoutBuilderSectionStorageTest.php
+++ b/core/modules/layout_builder/tests/src/Functional/LayoutBuilderSectionStorageTest.php
@@ -51,7 +51,7 @@ protected function setUp(): void {
    *
    * @see \Drupal\layout_builder_test\Plugin\SectionStorage\TestStateBasedSectionStorage
    */
-  public function testRenderByContextAwarePluginDelegate() {
+  public function testRenderByContextAwarePluginDelegate(): void {
     $assert_session = $this->assertSession();
     $page = $this->getSession()->getPage();
 
diff --git a/core/modules/layout_builder/tests/src/Functional/LayoutBuilderTest.php b/core/modules/layout_builder/tests/src/Functional/LayoutBuilderTest.php
index e9608bff6c52..1f62f0a38bb5 100644
--- a/core/modules/layout_builder/tests/src/Functional/LayoutBuilderTest.php
+++ b/core/modules/layout_builder/tests/src/Functional/LayoutBuilderTest.php
@@ -22,7 +22,7 @@ class LayoutBuilderTest extends LayoutBuilderTestBase {
   /**
    * Tests the Layout Builder UI for an entity type without a bundle.
    */
-  public function testNonBundleEntityType() {
+  public function testNonBundleEntityType(): void {
     $assert_session = $this->assertSession();
     $page = $this->getSession()->getPage();
 
@@ -56,7 +56,7 @@ public function testNonBundleEntityType() {
   /**
    * Tests that the Layout Builder preserves entity values.
    */
-  public function testPreserverEntityValues() {
+  public function testPreserverEntityValues(): void {
     $assert_session = $this->assertSession();
     $page = $this->getSession()->getPage();
 
@@ -103,7 +103,7 @@ public function testPreserverEntityValues() {
   /**
    * {@inheritdoc}
    */
-  public function testLayoutBuilderUi() {
+  public function testLayoutBuilderUi(): void {
     $assert_session = $this->assertSession();
     $page = $this->getSession()->getPage();
 
@@ -302,7 +302,7 @@ public function testLayoutBuilderUi() {
   /**
    * Test decorating controller.entity_form while layout_builder is installed.
    */
-  public function testHtmlEntityFormControllerDecoration() {
+  public function testHtmlEntityFormControllerDecoration(): void {
     $assert_session = $this->assertSession();
 
     $this->drupalLogin($this->drupalCreateUser([
@@ -319,7 +319,7 @@ public function testHtmlEntityFormControllerDecoration() {
   /**
    * Tests that layout builder checks entity view access.
    */
-  public function testAccess() {
+  public function testAccess(): void {
     $assert_session = $this->assertSession();
 
     $this->drupalLogin($this->drupalCreateUser([
@@ -353,7 +353,7 @@ public function testAccess() {
   /**
    * Tests that component's dependencies are respected during removal.
    */
-  public function testPluginDependencies() {
+  public function testPluginDependencies(): void {
     $assert_session = $this->assertSession();
     $page = $this->getSession()->getPage();
 
@@ -431,7 +431,7 @@ public function testPluginDependencies() {
   /**
    * Tests preview-aware templates.
    */
-  public function testPreviewAwareTemplates() {
+  public function testPreviewAwareTemplates(): void {
     $assert_session = $this->assertSession();
     $page = $this->getSession()->getPage();
 
@@ -461,7 +461,7 @@ public function testPreviewAwareTemplates() {
   /**
    * Tests that extra fields work before and after enabling Layout Builder.
    */
-  public function testExtraFields() {
+  public function testExtraFields(): void {
     $assert_session = $this->assertSession();
 
     $this->drupalLogin($this->drupalCreateUser([
@@ -505,7 +505,7 @@ public function testExtraFields() {
   /**
    * Tests loading a pending revision in the Layout Builder UI.
    */
-  public function testPendingRevision() {
+  public function testPendingRevision(): void {
     $assert_session = $this->assertSession();
     $page = $this->getSession()->getPage();
 
@@ -540,7 +540,7 @@ public function testPendingRevision() {
   /**
    * Tests that hook_form_alter() has access to the Layout Builder info.
    */
-  public function testFormAlter() {
+  public function testFormAlter(): void {
     $assert_session = $this->assertSession();
     $page = $this->getSession()->getPage();
 
@@ -574,7 +574,7 @@ public function testFormAlter() {
   /**
    * Tests the functionality of custom section labels.
    */
-  public function testSectionLabels() {
+  public function testSectionLabels(): void {
     $assert_session = $this->assertSession();
     $page = $this->getSession()->getPage();
 
@@ -599,7 +599,7 @@ public function testSectionLabels() {
   /**
    * Tests that layouts can be context-aware.
    */
-  public function testContextAwareLayouts() {
+  public function testContextAwareLayouts(): void {
     $assert_session = $this->assertSession();
     $page = $this->getSession()->getPage();
 
@@ -633,7 +633,7 @@ public function testContextAwareLayouts() {
   /**
    * Tests that sections can provide custom attributes.
    */
-  public function testCustomSectionAttributes() {
+  public function testCustomSectionAttributes(): void {
     $assert_session = $this->assertSession();
     $page = $this->getSession()->getPage();
 
@@ -655,7 +655,7 @@ public function testCustomSectionAttributes() {
   /**
    * Tests the expected breadcrumbs of the Layout Builder UI.
    */
-  public function testBreadcrumb() {
+  public function testBreadcrumb(): void {
     $page = $this->getSession()->getPage();
 
     $this->drupalPlaceBlock('system_breadcrumb_block');
@@ -695,7 +695,7 @@ public function testBreadcrumb() {
    *
    * @see \Drupal\layout_builder_test\Plugin\SectionStorage\SimpleConfigSectionStorage
    */
-  public function testSimpleConfigBasedLayout() {
+  public function testSimpleConfigBasedLayout(): void {
     $assert_session = $this->assertSession();
 
     $this->drupalLogin($this->createUser(['configure any layout']));
@@ -722,7 +722,7 @@ public function testSimpleConfigBasedLayout() {
   /**
    * Tests removing section without layout label configuration.
    */
-  public function testRemovingSectionWithoutLayoutLabel() {
+  public function testRemovingSectionWithoutLayoutLabel(): void {
     $assert_session = $this->assertSession();
     $page = $this->getSession()->getPage();
 
@@ -786,7 +786,7 @@ protected function assertCorrectLayouts(): void {
   /**
    * Tests the Layout Builder UI with a context defined at runtime.
    */
-  public function testLayoutBuilderContexts() {
+  public function testLayoutBuilderContexts(): void {
     $node_url = 'node/1';
 
     $assert_session = $this->assertSession();
diff --git a/core/modules/layout_builder/tests/src/Functional/LayoutBuilderThemeSuggestionsTest.php b/core/modules/layout_builder/tests/src/Functional/LayoutBuilderThemeSuggestionsTest.php
index 3662f6dbdfec..b107ec4f9b41 100644
--- a/core/modules/layout_builder/tests/src/Functional/LayoutBuilderThemeSuggestionsTest.php
+++ b/core/modules/layout_builder/tests/src/Functional/LayoutBuilderThemeSuggestionsTest.php
@@ -60,7 +60,7 @@ protected function setUp(): void {
   /**
    * Tests alterations of the layout list via preprocess functions.
    */
-  public function testLayoutListSuggestion() {
+  public function testLayoutListSuggestion(): void {
     $page = $this->getSession()->getPage();
     $assert_session = $this->assertSession();
 
@@ -72,7 +72,7 @@ public function testLayoutListSuggestion() {
   /**
    * Tests that of view mode specific field templates are suggested.
    */
-  public function testFieldBlockViewModeTemplates() {
+  public function testFieldBlockViewModeTemplates(): void {
     $assert_session = $this->assertSession();
 
     $this->drupalGet('node/1');
diff --git a/core/modules/layout_builder/tests/src/Functional/LayoutBuilderTranslationTest.php b/core/modules/layout_builder/tests/src/Functional/LayoutBuilderTranslationTest.php
index 2b93ef08df69..a64dd16ac5bd 100644
--- a/core/modules/layout_builder/tests/src/Functional/LayoutBuilderTranslationTest.php
+++ b/core/modules/layout_builder/tests/src/Functional/LayoutBuilderTranslationTest.php
@@ -51,7 +51,7 @@ protected function setUp(): void {
   /**
    * Tests that layout overrides work when created after a translation.
    */
-  public function testTranslationBeforeLayoutOverride() {
+  public function testTranslationBeforeLayoutOverride(): void {
     $assert_session = $this->assertSession();
 
     $this->addEntityTranslation();
@@ -91,7 +91,7 @@ public function testTranslationBeforeLayoutOverride() {
   /**
    * Tests that layout overrides work when created before a translation.
    */
-  public function testLayoutOverrideBeforeTranslation() {
+  public function testLayoutOverrideBeforeTranslation(): void {
     $assert_session = $this->assertSession();
 
     $entity_url = $this->entity->toUrl()->toString();
diff --git a/core/modules/layout_builder/tests/src/Functional/LayoutBuilderViewModeTest.php b/core/modules/layout_builder/tests/src/Functional/LayoutBuilderViewModeTest.php
index 95ac92066e72..68f7d83f6225 100644
--- a/core/modules/layout_builder/tests/src/Functional/LayoutBuilderViewModeTest.php
+++ b/core/modules/layout_builder/tests/src/Functional/LayoutBuilderViewModeTest.php
@@ -20,7 +20,7 @@ class LayoutBuilderViewModeTest extends LayoutBuilderTestBase {
   /**
    * Tests that a non-default view mode works as expected.
    */
-  public function testNonDefaultViewMode() {
+  public function testNonDefaultViewMode(): void {
     $assert_session = $this->assertSession();
     $page = $this->getSession()->getPage();
 
@@ -77,7 +77,7 @@ public function testNonDefaultViewMode() {
    *
    * @see \Drupal\layout_builder\Plugin\SectionStorage\OverridesSectionStorage::getDefaultSectionStorage()
    */
-  public function testLayoutBuilderUiFullViewMode() {
+  public function testLayoutBuilderUiFullViewMode(): void {
     $assert_session = $this->assertSession();
     $page = $this->getSession()->getPage();
 
@@ -253,7 +253,7 @@ public function testLayoutBuilderUiFullViewMode() {
   /**
    * Ensures that one bundle doesn't interfere with another bundle.
    */
-  public function testFullViewModeMultipleBundles() {
+  public function testFullViewModeMultipleBundles(): void {
     $assert_session = $this->assertSession();
     $page = $this->getSession()->getPage();
 
diff --git a/core/modules/layout_builder/tests/src/Functional/LayoutDisplayTest.php b/core/modules/layout_builder/tests/src/Functional/LayoutDisplayTest.php
index 1a2291821b7e..085f08af4bc8 100644
--- a/core/modules/layout_builder/tests/src/Functional/LayoutDisplayTest.php
+++ b/core/modules/layout_builder/tests/src/Functional/LayoutDisplayTest.php
@@ -48,7 +48,7 @@ protected function setUp(): void {
   /**
    * Tests the interaction between multiple view modes.
    */
-  public function testMultipleViewModes() {
+  public function testMultipleViewModes(): void {
     $assert_session = $this->assertSession();
     $page = $this->getSession()->getPage();
     $field_ui_prefix = 'admin/structure/types/manage/bundle_with_section_field/display';
diff --git a/core/modules/layout_builder/tests/src/Functional/LayoutSectionTest.php b/core/modules/layout_builder/tests/src/Functional/LayoutSectionTest.php
index bb32a834388e..3988454611cc 100644
--- a/core/modules/layout_builder/tests/src/Functional/LayoutSectionTest.php
+++ b/core/modules/layout_builder/tests/src/Functional/LayoutSectionTest.php
@@ -171,7 +171,7 @@ public static function providerTestLayoutSectionFormatter() {
    *
    * @dataProvider providerTestLayoutSectionFormatter
    */
-  public function testLayoutSectionFormatter($layout_data, $expected_selector, $expected_content, $expected_cache_contexts, $expected_cache_tags, $expected_dynamic_cache) {
+  public function testLayoutSectionFormatter($layout_data, $expected_selector, $expected_content, $expected_cache_contexts, $expected_cache_tags, $expected_dynamic_cache): void {
     $node = $this->createSectionNode($layout_data);
 
     $canonical_url = $node->toUrl('canonical');
@@ -185,7 +185,7 @@ public function testLayoutSectionFormatter($layout_data, $expected_selector, $ex
   /**
    * Tests the access checking of the section formatter.
    */
-  public function testLayoutSectionFormatterAccess() {
+  public function testLayoutSectionFormatterAccess(): void {
     $node = $this->createSectionNode([
       [
         'section' => new Section('layout_onecol', [], [
@@ -213,7 +213,7 @@ public function testLayoutSectionFormatterAccess() {
   /**
    * Ensures that the entity title is displayed.
    */
-  public function testLayoutPageTitle() {
+  public function testLayoutPageTitle(): void {
     $this->drupalPlaceBlock('page_title_block');
     $node = $this->createSectionNode([]);
 
@@ -225,7 +225,7 @@ public function testLayoutPageTitle() {
   /**
    * Tests that no Layout link shows without a section field.
    */
-  public function testLayoutUrlNoSectionField() {
+  public function testLayoutUrlNoSectionField(): void {
     $node = $this->createNode([
       'type' => 'bundle_without_section_field',
       'title' => 'The node title',
@@ -244,7 +244,7 @@ public function testLayoutUrlNoSectionField() {
   /**
    * Tests that deleting a field removes it from the layout.
    */
-  public function testLayoutDeletingField() {
+  public function testLayoutDeletingField(): void {
     $assert_session = $this->assertSession();
 
     $this->drupalGet('/admin/structure/types/manage/bundle_with_section_field/display/default/layout');
@@ -268,7 +268,7 @@ public function testLayoutDeletingField() {
   /**
    * Tests that deleting a bundle removes the layout.
    */
-  public function testLayoutDeletingBundle() {
+  public function testLayoutDeletingBundle(): void {
     $assert_session = $this->assertSession();
 
     $display = LayoutBuilderEntityViewDisplay::load('node.bundle_with_section_field.default');
diff --git a/core/modules/layout_builder/tests/src/Functional/Rest/OverrideSectionsTest.php b/core/modules/layout_builder/tests/src/Functional/Rest/OverrideSectionsTest.php
index 79df58753b86..de7257379b20 100644
--- a/core/modules/layout_builder/tests/src/Functional/Rest/OverrideSectionsTest.php
+++ b/core/modules/layout_builder/tests/src/Functional/Rest/OverrideSectionsTest.php
@@ -40,7 +40,7 @@ protected function setUp(): void {
   /**
    * Tests that the layout override field is not normalized.
    */
-  public function testOverrideField() {
+  public function testOverrideField(): void {
     $this->assertCount(1, $this->node->get(OverridesSectionStorage::FIELD_NAME));
 
     // Make a GET request and ensure override field is not included.
diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/AjaxBlockTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/AjaxBlockTest.php
index 199ee239dfec..6e72c8b572cc 100644
--- a/core/modules/layout_builder/tests/src/FunctionalJavascript/AjaxBlockTest.php
+++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/AjaxBlockTest.php
@@ -58,7 +58,7 @@ protected function setUp(): void {
   /**
    * Tests configuring a field block for a user field.
    */
-  public function testAddAjaxBlock() {
+  public function testAddAjaxBlock(): void {
     $assert_session = $this->assertSession();
     $page = $this->getSession()->getPage();
 
diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/BlockFilterTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/BlockFilterTest.php
index 0921ce8384b4..c80d34226107 100644
--- a/core/modules/layout_builder/tests/src/FunctionalJavascript/BlockFilterTest.php
+++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/BlockFilterTest.php
@@ -53,7 +53,7 @@ protected function setUp(): void {
   /**
    * Tests block filter.
    */
-  public function testBlockFilter() {
+  public function testBlockFilter(): void {
     $assert_session = $this->assertSession();
     $session = $this->getSession();
     $page = $session->getPage();
diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/BlockFormMessagesTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/BlockFormMessagesTest.php
index 1fd7fe80e791..c07b69de1efe 100644
--- a/core/modules/layout_builder/tests/src/FunctionalJavascript/BlockFormMessagesTest.php
+++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/BlockFormMessagesTest.php
@@ -48,7 +48,7 @@ protected function setUp(): void {
   /**
    * Tests that validation messages are shown on the block form.
    */
-  public function testValidationMessage() {
+  public function testValidationMessage(): void {
     $assert_session = $this->assertSession();
     $page = $this->getSession()->getPage();
 
diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/ContentPreviewToggleTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/ContentPreviewToggleTest.php
index 6e9cc44793fb..b1bb5c8706eb 100644
--- a/core/modules/layout_builder/tests/src/FunctionalJavascript/ContentPreviewToggleTest.php
+++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/ContentPreviewToggleTest.php
@@ -56,7 +56,7 @@ protected function setUp(): void {
   /**
    * Tests the content preview toggle.
    */
-  public function testContentPreviewToggle() {
+  public function testContentPreviewToggle(): void {
     $assert_session = $this->assertSession();
     $page = $this->getSession()->getPage();
     $links_field_placeholder_label = '"Links" field';
diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/ContextualLinksTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/ContextualLinksTest.php
index 335af57ede2d..3c6619b7480a 100644
--- a/core/modules/layout_builder/tests/src/FunctionalJavascript/ContextualLinksTest.php
+++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/ContextualLinksTest.php
@@ -71,7 +71,7 @@ protected function setUp(): void {
   /**
    * Tests that the contextual links inside Layout Builder are removed.
    */
-  public function testContextualLinks() {
+  public function testContextualLinks(): void {
     $page = $this->getSession()->getPage();
 
     $this->drupalGet('node/1/layout');
@@ -99,7 +99,7 @@ public function testContextualLinks() {
   /**
    * Tests that contextual links outside the layout are removed.
    */
-  public function testContextualLinksOutsideLayout() {
+  public function testContextualLinksOutsideLayout(): void {
     $assert_session = $this->assertSession();
     $this->drupalPlaceBlock('system_powered_by_block', ['id' => 'global_block']);
 
diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/FieldBlockTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/FieldBlockTest.php
index d4a574d4b334..888c97274b64 100644
--- a/core/modules/layout_builder/tests/src/FunctionalJavascript/FieldBlockTest.php
+++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/FieldBlockTest.php
@@ -67,7 +67,7 @@ protected function setUp(): void {
   /**
    * Tests configuring a field block for a user field.
    */
-  public function testUserFieldBlock() {
+  public function testUserFieldBlock(): void {
     $page = $this->getSession()->getPage();
     $assert_session = $this->assertSession();
 
@@ -143,7 +143,7 @@ public function testUserFieldBlock() {
   /**
    * Tests configuring a field block that uses #states.
    */
-  public function testStatesFieldBlock() {
+  public function testStatesFieldBlock(): void {
     $page = $this->getSession()->getPage();
 
     $timestamp_field_storage = FieldStorageConfig::create([
diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockPrivateFilesTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockPrivateFilesTest.php
index f0d64fbf3b23..a006aa29d6a9 100644
--- a/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockPrivateFilesTest.php
+++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockPrivateFilesTest.php
@@ -63,7 +63,7 @@ protected function setUp(): void {
   /**
    * Tests access to private files added to inline blocks in the layout builder.
    */
-  public function testPrivateFiles() {
+  public function testPrivateFiles(): void {
     $assert_session = $this->assertSession();
     LayoutBuilderEntityViewDisplay::load('node.bundle_with_section_field.default')
       ->enableLayoutBuilder()
diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTest.php
index 60310e0a959c..c146e6bc955e 100644
--- a/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTest.php
+++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTest.php
@@ -30,7 +30,7 @@ class InlineBlockTest extends InlineBlockTestBase {
   /**
    * Tests adding and editing of inline blocks.
    */
-  public function testInlineBlocks() {
+  public function testInlineBlocks(): void {
     $assert_session = $this->assertSession();
     $page = $this->getSession()->getPage();
 
@@ -115,7 +115,7 @@ public function testInlineBlocks() {
    *
    * @dataProvider layoutNoSaveProvider
    */
-  public function testNoLayoutSave($operation, $no_save_button_text, $confirm_button_text) {
+  public function testNoLayoutSave($operation, $no_save_button_text, $confirm_button_text): void {
     $this->drupalLogin($this->drupalCreateUser([
       'access contextual links',
       'configure any layout',
@@ -204,7 +204,7 @@ public static function layoutNoSaveProvider() {
   /**
    * Tests entity blocks revisioning.
    */
-  public function testInlineBlocksRevisioning() {
+  public function testInlineBlocksRevisioning(): void {
     $assert_session = $this->assertSession();
     $page = $this->getSession()->getPage();
 
@@ -271,7 +271,7 @@ public function testInlineBlocksRevisioning() {
   /**
    * Tests entity blocks revisioning.
    */
-  public function testInlineBlocksRevisioningIntegrity() {
+  public function testInlineBlocksRevisioningIntegrity(): void {
     $this->drupalLogin($this->drupalCreateUser([
       'access contextual links',
       'configure any layout',
@@ -359,7 +359,7 @@ protected function assertBlockRevisionCountByTitle(string $block_title, int $exp
   /**
    * Tests that entity blocks deleted correctly.
    */
-  public function testDeletion() {
+  public function testDeletion(): void {
     /** @var \Drupal\Core\Cron $cron */
     $cron = \Drupal::service('cron');
     /** @var \Drupal\layout_builder\InlineBlockUsageInterface $usage */
@@ -488,7 +488,7 @@ public function testDeletion() {
    *
    * @see layout_builder_block_content_access()
    */
-  public function testAccess() {
+  public function testAccess(): void {
     $this->drupalLogin($this->drupalCreateUser([
       'access contextual links',
       'configure any layout',
@@ -532,7 +532,7 @@ public function testAccess() {
    * @throws \Behat\Mink\Exception\ElementNotFoundException
    * @throws \Behat\Mink\Exception\ExpectationException
    */
-  public function testAddWorkFlow() {
+  public function testAddWorkFlow(): void {
     $assert_session = $this->assertSession();
     $page = $this->getSession()->getPage();
     $type_storage = $this->container->get('entity_type.manager')->getStorage('block_content_type');
@@ -597,7 +597,7 @@ public function testAddWorkFlow() {
   /**
    * Tests the 'create and edit content blocks' permission to add a new block.
    */
-  public function testAddInlineBlocksPermission() {
+  public function testAddInlineBlocksPermission(): void {
     LayoutBuilderEntityViewDisplay::load('node.bundle_with_section_field.default')
       ->enableLayoutBuilder()
       ->setOverridable()
@@ -631,7 +631,7 @@ public function testAddInlineBlocksPermission() {
   /**
    * Tests 'create and edit custom blocks' permission to edit an existing block.
    */
-  public function testEditInlineBlocksPermission() {
+  public function testEditInlineBlocksPermission(): void {
 
     LayoutBuilderEntityViewDisplay::load('node.bundle_with_section_field.default')
       ->enableLayoutBuilder()
@@ -675,7 +675,7 @@ public function testEditInlineBlocksPermission() {
   /**
    * Test editing inline blocks when the parent has been reverted.
    */
-  public function testInlineBlockParentRevert() {
+  public function testInlineBlockParentRevert(): void {
     $this->drupalLogin($this->drupalCreateUser([
       'access contextual links',
       'configure any layout',
diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/ItemLayoutFieldBlockTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/ItemLayoutFieldBlockTest.php
index 31b719df935c..4bb6313816f1 100644
--- a/core/modules/layout_builder/tests/src/FunctionalJavascript/ItemLayoutFieldBlockTest.php
+++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/ItemLayoutFieldBlockTest.php
@@ -49,7 +49,7 @@ protected function setUp(): void {
   /**
    * Tests configuring a field block for a user field.
    */
-  public function testAddAjaxBlock() {
+  public function testAddAjaxBlock(): void {
     $assert_session = $this->assertSession();
     $page = $this->getSession()->getPage();
 
diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderDisableInteractionsTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderDisableInteractionsTest.php
index 82447cc665d8..2ed6f0f2a1f8 100644
--- a/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderDisableInteractionsTest.php
+++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderDisableInteractionsTest.php
@@ -93,7 +93,7 @@ protected function setUp(): void {
   /**
    * Tests that forms and links are disabled in the Layout Builder preview.
    */
-  public function testFormsLinksDisabled() {
+  public function testFormsLinksDisabled(): void {
     // Resize window due to bug in Chromedriver when clicking on overlays over
     // iFrames.
     // @see https://bugs.chromium.org/p/chromedriver/issues/detail?id=2758
diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderNestedFormUiTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderNestedFormUiTest.php
index 742548d5fcda..4c402fa013a2 100644
--- a/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderNestedFormUiTest.php
+++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderNestedFormUiTest.php
@@ -67,7 +67,7 @@ protected function setUp(): void {
   /**
    * Tests blocks containing forms can be successfully saved editing defaults.
    */
-  public function testAddingFormBlocksToDefaults() {
+  public function testAddingFormBlocksToDefaults(): void {
     $this->drupalLogin($this->drupalCreateUser([
       'configure any layout',
       'administer node display',
@@ -101,7 +101,7 @@ public function testAddingFormBlocksToDefaults() {
   /**
    * Tests blocks containing forms can be successfully saved editing overrides.
    */
-  public function testAddingFormBlocksToOverrides() {
+  public function testAddingFormBlocksToOverrides(): void {
     $this->drupalLogin($this->drupalCreateUser([
       'configure any layout',
       'administer node display',
diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderOptInTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderOptInTest.php
index d8a30accc29a..e0664917c554 100644
--- a/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderOptInTest.php
+++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderOptInTest.php
@@ -51,7 +51,7 @@ protected function setUp(): void {
   /**
    * Tests the interaction between the two layout checkboxes.
    */
-  public function testCheckboxLogic() {
+  public function testCheckboxLogic(): void {
     $assert_session = $this->assertSession();
     $page = $this->getSession()->getPage();
 
@@ -92,7 +92,7 @@ public function testCheckboxLogic() {
   /**
    * Tests the expected default values for enabling Layout Builder.
    */
-  public function testDefaultValues() {
+  public function testDefaultValues(): void {
     $assert_session = $this->assertSession();
     $page = $this->getSession()->getPage();
 
diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderTest.php
index 2c1f033522c9..e5b81f7ddbd5 100644
--- a/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderTest.php
+++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderTest.php
@@ -101,7 +101,7 @@ protected function setUp(): void {
   /**
    * Tests the Layout Builder UI.
    */
-  public function testLayoutBuilderUi() {
+  public function testLayoutBuilderUi(): void {
     $layout_url = 'node/1/layout';
     $node_url = 'node/1';
 
@@ -265,7 +265,7 @@ public function testLayoutBuilderUi() {
   /**
    * Tests configurable layouts.
    */
-  public function testConfigurableLayoutSections() {
+  public function testConfigurableLayoutSections(): void {
     $layout_url = 'node/1/layout';
 
     \Drupal::entityTypeManager()
@@ -344,7 +344,7 @@ public function testConfigurableLayoutSections() {
   /**
    * Tests bypassing the off-canvas dialog.
    */
-  public function testLayoutNoDialog() {
+  public function testLayoutNoDialog(): void {
     $layout_url = 'node/1/layout';
 
     \Drupal::entityTypeManager()
diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderToolbarTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderToolbarTest.php
index c55485cba79e..5e0155ae06d7 100644
--- a/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderToolbarTest.php
+++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderToolbarTest.php
@@ -59,7 +59,7 @@ protected function setUp(): void {
   /**
    * Tests the 'Back to site' link behaves with manage layout as admin page.
    */
-  public function testBackToSiteLink() {
+  public function testBackToSiteLink(): void {
     $assert_session = $this->assertSession();
     $page = $this->getSession()->getPage();
 
diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderUiTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderUiTest.php
index 7b6e8cb1e4fb..5a11de6bdbdb 100644
--- a/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderUiTest.php
+++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderUiTest.php
@@ -66,7 +66,7 @@ protected function setUp(): void {
   /**
    * Tests that after removing sections reloading the page does not re-add them.
    */
-  public function testReloadWithNoSections() {
+  public function testReloadWithNoSections(): void {
     $assert_session = $this->assertSession();
     $page = $this->getSession()->getPage();
 
@@ -90,7 +90,7 @@ public function testReloadWithNoSections() {
   /**
    * Tests the message indicating unsaved changes.
    */
-  public function testUnsavedChangesMessage() {
+  public function testUnsavedChangesMessage(): void {
     $assert_session = $this->assertSession();
     $page = $this->getSession()->getPage();
 
@@ -143,7 +143,7 @@ protected function assertModifiedLayout(string $path): void {
   /**
    * Tests that elements that open the dialog are properly highlighted.
    */
-  public function testAddHighlights() {
+  public function testAddHighlights(): void {
     $assert_session = $this->assertSession();
     $page = $this->getSession()->getPage();
 
@@ -255,7 +255,7 @@ public function testAddHighlights() {
   /**
    * Tests removing newly added extra field.
    */
-  public function testNewExtraField() {
+  public function testNewExtraField(): void {
     $assert_session = $this->assertSession();
     $page = $this->getSession()->getPage();
 
diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/MoveBlockFormTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/MoveBlockFormTest.php
index 88288c90fa5e..716ac3fa0668 100644
--- a/core/modules/layout_builder/tests/src/FunctionalJavascript/MoveBlockFormTest.php
+++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/MoveBlockFormTest.php
@@ -96,7 +96,7 @@ protected function setUp(): void {
   /**
    * Tests moving a block.
    */
-  public function testMoveBlock() {
+  public function testMoveBlock(): void {
     $page = $this->getSession()->getPage();
     $assert_session = $this->assertSession();
 
diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/TestMultiWidthLayoutsTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/TestMultiWidthLayoutsTest.php
index d6570a9eae11..c7037f99391f 100644
--- a/core/modules/layout_builder/tests/src/FunctionalJavascript/TestMultiWidthLayoutsTest.php
+++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/TestMultiWidthLayoutsTest.php
@@ -51,7 +51,7 @@ protected function setUp(): void {
   /**
    * Tests changing the columns widths of a multi-width section.
    */
-  public function testWidthChange() {
+  public function testWidthChange(): void {
     $assert_session = $this->assertSession();
     $page = $this->getSession()->getPage();
 
diff --git a/core/modules/layout_builder/tests/src/Kernel/DefaultsSectionStorageTest.php b/core/modules/layout_builder/tests/src/Kernel/DefaultsSectionStorageTest.php
index cf90f89f0004..00055e4080b0 100644
--- a/core/modules/layout_builder/tests/src/Kernel/DefaultsSectionStorageTest.php
+++ b/core/modules/layout_builder/tests/src/Kernel/DefaultsSectionStorageTest.php
@@ -64,7 +64,7 @@ protected function setUp(): void {
   /**
    * Tests installing defaults via config install.
    */
-  public function testConfigInstall() {
+  public function testConfigInstall(): void {
     /** @var \Drupal\layout_builder\Entity\LayoutEntityDisplayInterface $display */
     $display = LayoutBuilderEntityViewDisplay::load('entity_test.bundle_with_extra_fields.default');
     $section = $display->getSection(0);
@@ -89,7 +89,7 @@ public function testConfigInstall() {
    * @param array $section_data
    *   Data to store as the sections value for Layout Builder.
    */
-  public function testAccess($expected, $operation, $is_enabled, array $section_data) {
+  public function testAccess($expected, $operation, $is_enabled, array $section_data): void {
     $display = LayoutBuilderEntityViewDisplay::create([
       'targetEntityType' => 'entity_test',
       'bundle' => 'entity_test',
@@ -139,7 +139,7 @@ public static function providerTestAccess() {
   /**
    * @covers ::getContexts
    */
-  public function testGetContexts() {
+  public function testGetContexts(): void {
     $display = LayoutBuilderEntityViewDisplay::create([
       'targetEntityType' => 'entity_test',
       'bundle' => 'entity_test',
@@ -159,7 +159,7 @@ public function testGetContexts() {
   /**
    * @covers ::getContextsDuringPreview
    */
-  public function testGetContextsDuringPreview() {
+  public function testGetContextsDuringPreview(): void {
     $display = LayoutBuilderEntityViewDisplay::create([
       'targetEntityType' => 'entity_test',
       'bundle' => 'entity_test',
@@ -189,7 +189,7 @@ public function testGetContextsDuringPreview() {
   /**
    * @covers ::getTempstoreKey
    */
-  public function testGetTempstoreKey() {
+  public function testGetTempstoreKey(): void {
     $display = LayoutBuilderEntityViewDisplay::create([
       'targetEntityType' => 'entity_test',
       'bundle' => 'entity_test',
@@ -208,7 +208,7 @@ public function testGetTempstoreKey() {
   /**
    * Tests loading given a display.
    */
-  public function testLoadFromDisplay() {
+  public function testLoadFromDisplay(): void {
     $display = LayoutBuilderEntityViewDisplay::create([
       'targetEntityType' => 'entity_test',
       'bundle' => 'entity_test',
diff --git a/core/modules/layout_builder/tests/src/Kernel/FieldBlockTest.php b/core/modules/layout_builder/tests/src/Kernel/FieldBlockTest.php
index 22b1ffa203e6..77c772f2014c 100644
--- a/core/modules/layout_builder/tests/src/Kernel/FieldBlockTest.php
+++ b/core/modules/layout_builder/tests/src/Kernel/FieldBlockTest.php
@@ -62,7 +62,7 @@ protected function setUp(): void {
    * @covers ::blockAccess
    * @dataProvider providerTestBlockAccessNotAllowed
    */
-  public function testBlockAccessEntityNotAllowed($expected, $entity_access) {
+  public function testBlockAccessEntityNotAllowed($expected, $entity_access): void {
     $entity = $this->prophesize(FieldableEntityInterface::class);
     $block = $this->getTestBlock($entity);
 
@@ -95,7 +95,7 @@ public static function providerTestBlockAccessNotAllowed() {
    *
    * @covers ::blockAccess
    */
-  public function testBlockAccessEntityAllowedNotFieldable() {
+  public function testBlockAccessEntityAllowedNotFieldable(): void {
     $entity = $this->prophesize(EntityInterface::class);
     $block = $this->getTestBlock($entity);
 
@@ -111,7 +111,7 @@ public function testBlockAccessEntityAllowedNotFieldable() {
    *
    * @covers ::blockAccess
    */
-  public function testBlockAccessEntityAllowedNoField() {
+  public function testBlockAccessEntityAllowedNoField(): void {
     $entity = $this->prophesize(FieldableEntityInterface::class);
     $block = $this->getTestBlock($entity);
 
@@ -130,7 +130,7 @@ public function testBlockAccessEntityAllowedNoField() {
    * @covers ::blockAccess
    * @dataProvider providerTestBlockAccessNotAllowed
    */
-  public function testBlockAccessEntityAllowedFieldNotAllowed($expected, $field_access) {
+  public function testBlockAccessEntityAllowedFieldNotAllowed($expected, $field_access): void {
     $entity = $this->prophesize(FieldableEntityInterface::class);
     $block = $this->getTestBlock($entity);
 
@@ -154,7 +154,7 @@ public function testBlockAccessEntityAllowedFieldNotAllowed($expected, $field_ac
    * @covers ::build
    * @dataProvider providerTestBlockAccessEntityAllowedFieldHasValue
    */
-  public function testBlockAccessEntityAllowedFieldHasValue($expected, $is_empty, $default_value) {
+  public function testBlockAccessEntityAllowedFieldHasValue($expected, $is_empty, $default_value): void {
     $entity = $this->prophesize(FieldableEntityInterface::class);
     $block = $this->getTestBlock($entity);
 
@@ -248,7 +248,7 @@ protected function getTestBlock(ProphecyInterface $entity_prophecy, array $confi
    * @covers ::build
    * @dataProvider providerTestBuild
    */
-  public function testBuild(PromiseInterface $promise, $expected_markup, $log_message = '', $log_arguments = []) {
+  public function testBuild(PromiseInterface $promise, $expected_markup, $log_message = '', $log_arguments = []): void {
     $entity = $this->prophesize(FieldableEntityInterface::class);
     $field = $this->prophesize(FieldItemListInterface::class);
     $entity->get('the_field_name')->willReturn($field->reveal());
@@ -300,7 +300,7 @@ public static function providerTestBuild() {
   /**
    * @covers ::build
    */
-  public function testBuildException() {
+  public function testBuildException(): void {
     // In PHP 7.4 ReflectionClass cannot be serialized so this cannot be part of
     // providerTestBuild().
     $promise = new ThrowPromise(new \Exception('The exception message'));
@@ -317,7 +317,7 @@ public function testBuildException() {
    *
    * @todo Remove in https://www.drupal.org/project/drupal/issues/2367555.
    */
-  public function testBuildWithFormException() {
+  public function testBuildWithFormException(): void {
     $field = $this->prophesize(FieldItemListInterface::class);
     $field->view(Argument::type('array'))->willThrow(new EnforcedResponseException(new Response()));
 
diff --git a/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderBreadcrumbAlterTest.php b/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderBreadcrumbAlterTest.php
index e9f00be59e85..8fc56da03228 100644
--- a/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderBreadcrumbAlterTest.php
+++ b/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderBreadcrumbAlterTest.php
@@ -26,7 +26,7 @@ class LayoutBuilderBreadcrumbAlterTest extends EntityKernelTestBase {
   /**
    * Check that there are no errors when alter called with null route match.
    */
-  public function testBreadcrumbAlterNullRouteMatch() {
+  public function testBreadcrumbAlterNullRouteMatch(): void {
     $breadcrumb = new Breadcrumb();
     $route_match = new NullRouteMatch();
     layout_builder_system_breadcrumb_alter($breadcrumb, $route_match, []);
diff --git a/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderEntityViewDisplayTest.php b/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderEntityViewDisplayTest.php
index 49bf7e860a5f..8e421a35ed30 100644
--- a/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderEntityViewDisplayTest.php
+++ b/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderEntityViewDisplayTest.php
@@ -38,7 +38,7 @@ protected function getSectionList(array $section_data) {
   /**
    * Tests that configuration schema enforces valid values.
    */
-  public function testInvalidConfiguration() {
+  public function testInvalidConfiguration(): void {
     $this->expectException(SchemaIncompleteException::class);
     $this->sectionList->getSection(0)->getComponent('10000000-0000-1000-a000-000000000000')->setConfiguration(['id' => 'foo', 'bar' => 'baz']);
     $this->sectionList->save();
@@ -47,7 +47,7 @@ public function testInvalidConfiguration() {
   /**
    * @dataProvider providerTestIsLayoutBuilderEnabled
    */
-  public function testIsLayoutBuilderEnabled($expected, $view_mode, $enabled) {
+  public function testIsLayoutBuilderEnabled($expected, $view_mode, $enabled): void {
     $display = LayoutBuilderEntityViewDisplay::create([
       'targetEntityType' => 'entity_test',
       'bundle' => 'entity_test',
@@ -80,7 +80,7 @@ public static function providerTestIsLayoutBuilderEnabled() {
   /**
    * Tests that setting overridable enables Layout Builder only when TRUE.
    */
-  public function testSetOverridable() {
+  public function testSetOverridable(): void {
     // Disable Layout Builder.
     $this->sectionList->disableLayoutBuilder();
 
diff --git a/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderFieldLayoutCompatibilityTest.php b/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderFieldLayoutCompatibilityTest.php
index 60be029b2040..613d76acbd42 100644
--- a/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderFieldLayoutCompatibilityTest.php
+++ b/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderFieldLayoutCompatibilityTest.php
@@ -35,7 +35,7 @@ protected function setUp(): void {
   /**
    * Tests the compatibility of Layout Builder and Field Layout.
    */
-  public function testCompatibility() {
+  public function testCompatibility(): void {
     // Ensure that the configurable field is shown in the correct region and
     // that the non-configurable field is shown outside the layout.
     $expected_fields = [
diff --git a/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderInstallTest.php b/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderInstallTest.php
index d44056f28ba8..6baa0f769d6a 100644
--- a/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderInstallTest.php
+++ b/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderInstallTest.php
@@ -19,7 +19,7 @@ class LayoutBuilderInstallTest extends LayoutBuilderCompatibilityTestBase {
   /**
    * Tests the compatibility of Layout Builder with existing entity displays.
    */
-  public function testCompatibility() {
+  public function testCompatibility(): void {
     // Ensure that the fields are shown.
     $expected_fields = [
       'field field--name-name field--type-string field--label-hidden field__item',
diff --git a/core/modules/layout_builder/tests/src/Kernel/LayoutEntityHelperTraitTest.php b/core/modules/layout_builder/tests/src/Kernel/LayoutEntityHelperTraitTest.php
index d6da92d8e281..0c15a8c9a9fe 100644
--- a/core/modules/layout_builder/tests/src/Kernel/LayoutEntityHelperTraitTest.php
+++ b/core/modules/layout_builder/tests/src/Kernel/LayoutEntityHelperTraitTest.php
@@ -81,7 +81,7 @@ public static function providerTestGetSectionStorageForEntity() {
    *
    * @dataProvider providerTestGetSectionStorageForEntity
    */
-  public function testGetSectionStorageForEntity($entity_type_id, $values, $expected_context_keys) {
+  public function testGetSectionStorageForEntity($entity_type_id, $values, $expected_context_keys): void {
     $section_storage_manager = $this->prophesize(SectionStorageManagerInterface::class);
     $section_storage_manager->load('')->willReturn(NULL);
     $section_storage_manager->findByContext(Argument::cetera())->will(function ($arguments) {
@@ -185,7 +185,7 @@ public static function providerTestOriginalEntityUsesDefaultStorage() {
    *
    * @dataProvider providerTestOriginalEntityUsesDefaultStorage
    */
-  public function testOriginalEntityUsesDefaultStorage($entity_storages, $is_new, $has_original, $expected) {
+  public function testOriginalEntityUsesDefaultStorage($entity_storages, $is_new, $has_original, $expected): void {
     $this->assertFalse($is_new && $has_original);
     $entity = EntityTest::create(['name' => 'updated']);
     if (!$is_new) {
@@ -221,7 +221,7 @@ public function testOriginalEntityUsesDefaultStorage($entity_storages, $is_new,
   /**
    * @covers ::getEntitySections
    */
-  public function testGetEntitySections() {
+  public function testGetEntitySections(): void {
     $entity = EntityTest::create(['name' => 'updated']);
     $section_storage_manager = $this->prophesize(SectionStorageManagerInterface::class);
     $section_storage_manager->load('')->willReturn(NULL);
diff --git a/core/modules/layout_builder/tests/src/Kernel/LayoutSectionItemListTest.php b/core/modules/layout_builder/tests/src/Kernel/LayoutSectionItemListTest.php
index 6f0ea17f9dd5..cc25a327cd7a 100644
--- a/core/modules/layout_builder/tests/src/Kernel/LayoutSectionItemListTest.php
+++ b/core/modules/layout_builder/tests/src/Kernel/LayoutSectionItemListTest.php
@@ -56,7 +56,7 @@ protected function getSectionList(array $section_data) {
   /**
    * @covers ::equals
    */
-  public function testEquals() {
+  public function testEquals(): void {
     $this->sectionList->getSection(0)->setLayoutSettings(['foo' => 1]);
 
     $second_section_storage = clone $this->sectionList;
@@ -69,7 +69,7 @@ public function testEquals() {
   /**
    * @covers ::equals
    */
-  public function testEqualsNonSection() {
+  public function testEqualsNonSection(): void {
     $list = $this->prophesize(FieldItemListInterface::class);
     $this->assertFalse($this->sectionList->equals($list->reveal()));
   }
diff --git a/core/modules/layout_builder/tests/src/Kernel/OverridesSectionStorageTest.php b/core/modules/layout_builder/tests/src/Kernel/OverridesSectionStorageTest.php
index 660137e60c4c..d8d773134dc5 100644
--- a/core/modules/layout_builder/tests/src/Kernel/OverridesSectionStorageTest.php
+++ b/core/modules/layout_builder/tests/src/Kernel/OverridesSectionStorageTest.php
@@ -73,7 +73,7 @@ protected function setUp(): void {
    * @param string[] $permissions
    *   An array of permissions to grant to the user.
    */
-  public function testAccess($expected, $is_enabled, array $section_data, array $permissions) {
+  public function testAccess($expected, $is_enabled, array $section_data, array $permissions): void {
     $display = LayoutBuilderEntityViewDisplay::create([
       'targetEntityType' => 'entity_test',
       'bundle' => 'entity_test',
@@ -174,7 +174,7 @@ public static function providerTestAccess() {
   /**
    * @covers ::getContexts
    */
-  public function testGetContexts() {
+  public function testGetContexts(): void {
     $entity = EntityTest::create();
     $entity->save();
 
@@ -193,7 +193,7 @@ public function testGetContexts() {
   /**
    * @covers ::getContextsDuringPreview
    */
-  public function testGetContextsDuringPreview() {
+  public function testGetContextsDuringPreview(): void {
     $entity = EntityTest::create();
     $entity->save();
 
@@ -212,7 +212,7 @@ public function testGetContextsDuringPreview() {
   /**
    * @covers ::getDefaultSectionStorage
    */
-  public function testGetDefaultSectionStorage() {
+  public function testGetDefaultSectionStorage(): void {
     $entity = EntityTest::create();
     $entity->save();
     $this->plugin->setContext('entity', EntityContext::fromEntity($entity));
@@ -223,7 +223,7 @@ public function testGetDefaultSectionStorage() {
   /**
    * @covers ::getTempstoreKey
    */
-  public function testGetTempstoreKey() {
+  public function testGetTempstoreKey(): void {
     $entity = EntityTest::create();
     $entity->save();
     $this->plugin->setContext('entity', EntityContext::fromEntity($entity));
@@ -236,7 +236,7 @@ public function testGetTempstoreKey() {
   /**
    * @covers ::deriveContextsFromRoute
    */
-  public function testDeriveContextsFromRoute() {
+  public function testDeriveContextsFromRoute(): void {
     $display = LayoutBuilderEntityViewDisplay::create([
       'targetEntityType' => 'entity_test',
       'bundle' => 'entity_test',
@@ -261,7 +261,7 @@ public function testDeriveContextsFromRoute() {
   /**
    * @covers ::isOverridden
    */
-  public function testIsOverridden() {
+  public function testIsOverridden(): void {
     $display = LayoutBuilderEntityViewDisplay::create([
       'targetEntityType' => 'entity_test',
       'bundle' => 'entity_test',
diff --git a/core/modules/layout_builder/tests/src/Kernel/SectionListTestBase.php b/core/modules/layout_builder/tests/src/Kernel/SectionListTestBase.php
index 5c13d9b59f51..f94e27d784fd 100644
--- a/core/modules/layout_builder/tests/src/Kernel/SectionListTestBase.php
+++ b/core/modules/layout_builder/tests/src/Kernel/SectionListTestBase.php
@@ -62,7 +62,7 @@ abstract protected function getSectionList(array $section_data);
   /**
    * Tests ::getSections().
    */
-  public function testGetSections() {
+  public function testGetSections(): void {
     $expected = [
       new Section('layout_test_plugin', ['setting_1' => 'Default'], [
         '10000000-0000-1000-a000-000000000000' => new SectionComponent('10000000-0000-1000-a000-000000000000', 'content', ['id' => 'foo']),
@@ -77,14 +77,14 @@ public function testGetSections() {
   /**
    * @covers ::getSection
    */
-  public function testGetSection() {
+  public function testGetSection(): void {
     $this->assertInstanceOf(Section::class, $this->sectionList->getSection(0));
   }
 
   /**
    * @covers ::getSection
    */
-  public function testGetSectionInvalidDelta() {
+  public function testGetSectionInvalidDelta(): void {
     $this->expectException(\OutOfBoundsException::class);
     $this->expectExceptionMessage('Invalid delta "2"');
     $this->sectionList->getSection(2);
@@ -93,7 +93,7 @@ public function testGetSectionInvalidDelta() {
   /**
    * @covers ::insertSection
    */
-  public function testInsertSection() {
+  public function testInsertSection(): void {
     $expected = [
       new Section('layout_test_plugin', ['setting_1' => 'Default'], [
         '10000000-0000-1000-a000-000000000000' => new SectionComponent('10000000-0000-1000-a000-000000000000', 'content', ['id' => 'foo']),
@@ -111,7 +111,7 @@ public function testInsertSection() {
   /**
    * @covers ::appendSection
    */
-  public function testAppendSection() {
+  public function testAppendSection(): void {
     $expected = [
       new Section('layout_test_plugin', ['setting_1' => 'Default'], [
         '10000000-0000-1000-a000-000000000000' => new SectionComponent('10000000-0000-1000-a000-000000000000', 'content', ['id' => 'foo']),
@@ -131,7 +131,7 @@ public function testAppendSection() {
    *
    * @dataProvider providerTestRemoveAllSections
    */
-  public function testRemoveAllSections($set_blank, $expected) {
+  public function testRemoveAllSections($set_blank, $expected): void {
     if ($set_blank === NULL) {
       $this->sectionList->removeAllSections();
     }
@@ -155,7 +155,7 @@ public static function providerTestRemoveAllSections() {
   /**
    * @covers ::removeSection
    */
-  public function testRemoveSection() {
+  public function testRemoveSection(): void {
     $expected = [
       new Section('layout_test_plugin', ['setting_1' => 'bar'], [
         '20000000-0000-1000-a000-000000000000' => new SectionComponent('20000000-0000-1000-a000-000000000000', 'content', ['id' => 'foo']),
@@ -169,7 +169,7 @@ public function testRemoveSection() {
   /**
    * @covers ::removeSection
    */
-  public function testRemoveMultipleSections() {
+  public function testRemoveMultipleSections(): void {
     $expected = [
       new Section('layout_builder_blank'),
     ];
@@ -182,7 +182,7 @@ public function testRemoveMultipleSections() {
   /**
    * Tests __clone().
    */
-  public function testClone() {
+  public function testClone(): void {
     $this->assertSame(['setting_1' => 'Default'], $this->sectionList->getSection(0)->getLayoutSettings());
 
     $new_section_storage = clone $this->sectionList;
diff --git a/core/modules/layout_builder/tests/src/Kernel/SectionListTraitTest.php b/core/modules/layout_builder/tests/src/Kernel/SectionListTraitTest.php
index fc472b510d73..fcaa4c688707 100644
--- a/core/modules/layout_builder/tests/src/Kernel/SectionListTraitTest.php
+++ b/core/modules/layout_builder/tests/src/Kernel/SectionListTraitTest.php
@@ -26,7 +26,7 @@ protected function getSectionList(array $section_data) {
   /**
    * @covers ::addBlankSection
    */
-  public function testAddBlankSection() {
+  public function testAddBlankSection(): void {
     $this->expectException(\Exception::class);
     $this->expectExceptionMessage('A blank section must only be added to an empty list');
     $this->sectionList->addBlankSection();
diff --git a/core/modules/layout_builder/tests/src/Kernel/TranslatableFieldTest.php b/core/modules/layout_builder/tests/src/Kernel/TranslatableFieldTest.php
index b372447cbbd6..87d3ee0a2d17 100644
--- a/core/modules/layout_builder/tests/src/Kernel/TranslatableFieldTest.php
+++ b/core/modules/layout_builder/tests/src/Kernel/TranslatableFieldTest.php
@@ -66,7 +66,7 @@ protected function setUp(): void {
   /**
    * Tests that sections on cleared when creating a new translation.
    */
-  public function testSectionsClearedOnCreateTranslation() {
+  public function testSectionsClearedOnCreateTranslation(): void {
     $section_data = [
       new Section('layout_onecol', [], [
         '10000000-0000-1000-a000-000000000000' => new SectionComponent('10000000-0000-1000-a000-000000000000', 'content', ['id' => 'foo']),
diff --git a/core/modules/layout_builder/tests/src/Unit/BlockComponentRenderArrayTest.php b/core/modules/layout_builder/tests/src/Unit/BlockComponentRenderArrayTest.php
index 10787a76cb55..464880254b10 100644
--- a/core/modules/layout_builder/tests/src/Unit/BlockComponentRenderArrayTest.php
+++ b/core/modules/layout_builder/tests/src/Unit/BlockComponentRenderArrayTest.php
@@ -74,7 +74,7 @@ protected function setUp(): void {
    *
    * @dataProvider providerBlockTypes
    */
-  public function testOnBuildRender($refinable_dependent_access) {
+  public function testOnBuildRender($refinable_dependent_access): void {
     $contexts = [];
     if ($refinable_dependent_access) {
       $block = $this->prophesize(TestBlockPluginWithRefinableDependentAccessInterface::class)->willImplement(PreviewFallbackInterface::class);
@@ -148,7 +148,7 @@ public function testOnBuildRender($refinable_dependent_access) {
    *
    * @dataProvider providerBlockTypes
    */
-  public function testOnBuildRenderWithoutPreviewFallbackString($refinable_dependent_access) {
+  public function testOnBuildRenderWithoutPreviewFallbackString($refinable_dependent_access): void {
     $contexts = [];
     if ($refinable_dependent_access) {
       $block = $this->prophesize(TestBlockPluginWithRefinableDependentAccessInterface::class);
@@ -221,7 +221,7 @@ public function testOnBuildRenderWithoutPreviewFallbackString($refinable_depende
    *
    * @dataProvider providerBlockTypes
    */
-  public function testOnBuildRenderDenied($refinable_dependent_access) {
+  public function testOnBuildRenderDenied($refinable_dependent_access): void {
     $contexts = [];
     if ($refinable_dependent_access) {
       $block = $this->prophesize(TestBlockPluginWithRefinableDependentAccessInterface::class);
@@ -279,7 +279,7 @@ public function testOnBuildRenderDenied($refinable_dependent_access) {
    *
    * @dataProvider providerBlockTypes
    */
-  public function testOnBuildRenderInPreview($refinable_dependent_access) {
+  public function testOnBuildRenderInPreview($refinable_dependent_access): void {
     $contexts = [];
     if ($refinable_dependent_access) {
       $block = $this->prophesize(TestBlockPluginWithRefinableDependentAccessInterface::class)->willImplement(PreviewFallbackInterface::class);
@@ -350,7 +350,7 @@ public function testOnBuildRenderInPreview($refinable_dependent_access) {
   /**
    * @covers ::onBuildRender
    */
-  public function testOnBuildRenderInPreviewEmptyBuild() {
+  public function testOnBuildRenderInPreviewEmptyBuild(): void {
     $block = $this->prophesize(BlockPluginInterface::class)->willImplement(PreviewFallbackInterface::class);
 
     $block->access($this->account->reveal(), TRUE)->shouldNotBeCalled();
@@ -412,7 +412,7 @@ public function testOnBuildRenderInPreviewEmptyBuild() {
   /**
    * @covers ::onBuildRender
    */
-  public function testOnBuildRenderEmptyBuild() {
+  public function testOnBuildRenderEmptyBuild(): void {
     $block = $this->prophesize(BlockPluginInterface::class);
     $access_result = AccessResult::allowed();
     $block->access($this->account->reveal(), TRUE)->willReturn($access_result)->shouldBeCalled();
@@ -457,7 +457,7 @@ public function testOnBuildRenderEmptyBuild() {
   /**
    * @covers ::onBuildRender
    */
-  public function testOnBuildRenderEmptyBuildWithCacheTags() {
+  public function testOnBuildRenderEmptyBuildWithCacheTags(): void {
     $block = $this->prophesize(BlockPluginInterface::class);
     $access_result = AccessResult::allowed();
     $block->access($this->account->reveal(), TRUE)->willReturn($access_result)->shouldBeCalled();
@@ -502,7 +502,7 @@ public function testOnBuildRenderEmptyBuildWithCacheTags() {
   /**
    * @covers ::onBuildRender
    */
-  public function testOnBuildRenderNoBlock() {
+  public function testOnBuildRenderNoBlock(): void {
     $this->blockManager->createInstance('some_block_id', ['id' => 'some_block_id'])->willReturn(NULL);
 
     $component = new SectionComponent('some-uuid', 'some-region', ['id' => 'some_block_id']);
diff --git a/core/modules/layout_builder/tests/src/Unit/DefaultsSectionStorageTest.php b/core/modules/layout_builder/tests/src/Unit/DefaultsSectionStorageTest.php
index 190110cda711..46b8de007a42 100644
--- a/core/modules/layout_builder/tests/src/Unit/DefaultsSectionStorageTest.php
+++ b/core/modules/layout_builder/tests/src/Unit/DefaultsSectionStorageTest.php
@@ -73,7 +73,7 @@ protected function setUp(): void {
    * @covers ::getThirdPartySetting
    * @covers ::setThirdPartySetting
    */
-  public function testThirdPartySettings() {
+  public function testThirdPartySettings(): void {
     $this->entityTypeManager->getDefinition('entity_view_display')->willReturn(new EntityType(['id' => 'entity_view_display']));
 
     $container = new ContainerBuilder();
@@ -122,7 +122,7 @@ public function testThirdPartySettings() {
    * @param array $defaults
    *   The defaults to pass to ::extractEntityFromRoute().
    */
-  public function testExtractEntityFromRoute($success, $expected_entity_id, $value, array $defaults) {
+  public function testExtractEntityFromRoute($success, $expected_entity_id, $value, array $defaults): void {
     if ($expected_entity_id) {
       $entity_storage = $this->prophesize(EntityStorageInterface::class);
       $entity_storage->load($expected_entity_id)->willReturn('the_return_value');
@@ -194,7 +194,7 @@ public static function providerTestExtractEntityFromRoute() {
   /**
    * @covers ::extractEntityFromRoute
    */
-  public function testExtractEntityFromRouteCreate() {
+  public function testExtractEntityFromRouteCreate(): void {
     $expected = 'the_return_value';
     $value = 'foo.bar.baz';
     $expected_create_values = [
@@ -220,7 +220,7 @@ public function testExtractEntityFromRouteCreate() {
    * @covers ::getEntityTypes
    * @covers \Drupal\layout_builder\Routing\LayoutBuilderRoutesTrait::buildLayoutRoutes
    */
-  public function testBuildRoutes() {
+  public function testBuildRoutes(): void {
     $module_handler = $this->prophesize(ModuleHandlerInterface::class);
     $module_handler->moduleExists('field_ui')->willReturn(TRUE);
     $container = new ContainerBuilder();
@@ -415,7 +415,7 @@ public function testBuildRoutes() {
   /**
    * @covers ::buildRoutes
    */
-  public function testBuildRoutesNoFieldUi() {
+  public function testBuildRoutesNoFieldUi(): void {
     $module_handler = $this->prophesize(ModuleHandlerInterface::class);
     $module_handler->moduleExists('field_ui')->willReturn(FALSE);
     $container = new ContainerBuilder();
diff --git a/core/modules/layout_builder/tests/src/Unit/InlineBlockUsageTest.php b/core/modules/layout_builder/tests/src/Unit/InlineBlockUsageTest.php
index 1806219066bb..77ebe9c1017c 100644
--- a/core/modules/layout_builder/tests/src/Unit/InlineBlockUsageTest.php
+++ b/core/modules/layout_builder/tests/src/Unit/InlineBlockUsageTest.php
@@ -20,7 +20,7 @@ class InlineBlockUsageTest extends UnitTestCase {
    *
    * @covers ::deleteUsage
    */
-  public function testEmptyDeleteUsageCall() {
+  public function testEmptyDeleteUsageCall(): void {
     $connection = $this->prophesize(Connection::class);
     $connection->delete('inline_block_usage')->shouldNotBeCalled();
 
diff --git a/core/modules/layout_builder/tests/src/Unit/LayoutBuilderIsActiveCacheContextTest.php b/core/modules/layout_builder/tests/src/Unit/LayoutBuilderIsActiveCacheContextTest.php
index b81f9b2ff61a..74d6f7ca9027 100644
--- a/core/modules/layout_builder/tests/src/Unit/LayoutBuilderIsActiveCacheContextTest.php
+++ b/core/modules/layout_builder/tests/src/Unit/LayoutBuilderIsActiveCacheContextTest.php
@@ -26,7 +26,7 @@ class LayoutBuilderIsActiveCacheContextTest extends UnitTestCase {
   /**
    * @covers ::getContext
    */
-  public function testGetContextMissingEntityTypeId() {
+  public function testGetContextMissingEntityTypeId(): void {
     $route_match = $this->prophesize(RouteMatchInterface::class);
     $cache_context = new LayoutBuilderIsActiveCacheContext($route_match->reveal());
     $this->expectException(\LogicException::class);
@@ -38,7 +38,7 @@ public function testGetContextMissingEntityTypeId() {
    * @covers ::getContext
    * @covers ::getDisplay
    */
-  public function testGetContextNonFieldableEntity() {
+  public function testGetContextNonFieldableEntity(): void {
     $route_match = $this->prophesize(RouteMatchInterface::class);
     $route_match->getParameter('not_a_fieldable_entity')->willReturn('something that is not a fieldable entity');
 
@@ -54,7 +54,7 @@ public function testGetContextNonFieldableEntity() {
    *
    * @dataProvider providerTestGetContext
    */
-  public function testGetContext($is_overridden, $expected) {
+  public function testGetContext($is_overridden, $expected): void {
     $entity_display = $this->prophesize(LayoutEntityDisplayInterface::class);
     $entity_display->isOverridable()->willReturn($is_overridden);
 
diff --git a/core/modules/layout_builder/tests/src/Unit/LayoutBuilderRoutesTest.php b/core/modules/layout_builder/tests/src/Unit/LayoutBuilderRoutesTest.php
index 8bb67e92aa96..0afd41e13337 100644
--- a/core/modules/layout_builder/tests/src/Unit/LayoutBuilderRoutesTest.php
+++ b/core/modules/layout_builder/tests/src/Unit/LayoutBuilderRoutesTest.php
@@ -48,7 +48,7 @@ protected function setUp(): void {
   /**
    * @covers ::onAlterRoutes
    */
-  public function testOnAlterRoutes() {
+  public function testOnAlterRoutes(): void {
     $expected = [
       'test_route1' => new Route('/test/path1'),
       'test_route_shared' => new Route('/test/path/shared2'),
diff --git a/core/modules/layout_builder/tests/src/Unit/LayoutEntityHelperTraitTest.php b/core/modules/layout_builder/tests/src/Unit/LayoutEntityHelperTraitTest.php
index d1c9978f2d32..b2cbb35ac1cb 100644
--- a/core/modules/layout_builder/tests/src/Unit/LayoutEntityHelperTraitTest.php
+++ b/core/modules/layout_builder/tests/src/Unit/LayoutEntityHelperTraitTest.php
@@ -94,7 +94,7 @@ public static function providerSectionsWithInlineComponents() {
    *
    * @dataProvider providerSectionsWithInlineComponents
    */
-  public function testGetInlineBlockComponents($sections, $expected_components) {
+  public function testGetInlineBlockComponents($sections, $expected_components): void {
     $test_class = new TestClass();
     $this->assertSame($expected_components, $test_class->getInlineBlockComponents($sections));
   }
@@ -104,7 +104,7 @@ public function testGetInlineBlockComponents($sections, $expected_components) {
    *
    * @dataProvider providerSectionsWithInlineComponents
    */
-  public function testGetInlineBlockRevisionIdsInSections($sections, $components, $expected_revision_ids) {
+  public function testGetInlineBlockRevisionIdsInSections($sections, $components, $expected_revision_ids): void {
     $test_class = new TestClass();
     $this->assertSame($expected_revision_ids, $test_class->getInlineBlockRevisionIdsInSections($sections));
   }
diff --git a/core/modules/layout_builder/tests/src/Unit/LayoutSectionStorageParamConverterTest.php b/core/modules/layout_builder/tests/src/Unit/LayoutSectionStorageParamConverterTest.php
index e4bf73efbf1a..9a79a0804350 100644
--- a/core/modules/layout_builder/tests/src/Unit/LayoutSectionStorageParamConverterTest.php
+++ b/core/modules/layout_builder/tests/src/Unit/LayoutSectionStorageParamConverterTest.php
@@ -19,7 +19,7 @@ class LayoutSectionStorageParamConverterTest extends UnitTestCase {
   /**
    * @covers ::convert
    */
-  public function testConvert() {
+  public function testConvert(): void {
     $section_storage_manager = $this->prophesize(SectionStorageManagerInterface::class);
     $converter = new LayoutSectionStorageParamConverter($section_storage_manager->reveal());
 
@@ -42,7 +42,7 @@ public function testConvert() {
   /**
    * @covers ::convert
    */
-  public function testConvertNoType() {
+  public function testConvertNoType(): void {
     $section_storage_manager = $this->prophesize(SectionStorageManagerInterface::class);
     $converter = new LayoutSectionStorageParamConverter($section_storage_manager->reveal());
 
@@ -61,7 +61,7 @@ public function testConvertNoType() {
   /**
    * @covers ::convert
    */
-  public function testConvertInvalidConverter() {
+  public function testConvertInvalidConverter(): void {
     $section_storage_manager = $this->prophesize(SectionStorageManagerInterface::class);
     $converter = new LayoutSectionStorageParamConverter($section_storage_manager->reveal());
 
diff --git a/core/modules/layout_builder/tests/src/Unit/LayoutTempstoreRepositoryTest.php b/core/modules/layout_builder/tests/src/Unit/LayoutTempstoreRepositoryTest.php
index 694e2db22659..b0fdde1e9e79 100644
--- a/core/modules/layout_builder/tests/src/Unit/LayoutTempstoreRepositoryTest.php
+++ b/core/modules/layout_builder/tests/src/Unit/LayoutTempstoreRepositoryTest.php
@@ -20,7 +20,7 @@ class LayoutTempstoreRepositoryTest extends UnitTestCase {
    * @covers ::get
    * @covers ::has
    */
-  public function testGetEmptyTempstore() {
+  public function testGetEmptyTempstore(): void {
     $section_storage = $this->prophesize(SectionStorageInterface::class);
     $section_storage->getStorageType()->willReturn('my_storage_type');
     $section_storage->getStorageId()->willReturn('my_storage_id');
@@ -43,7 +43,7 @@ public function testGetEmptyTempstore() {
    * @covers ::get
    * @covers ::has
    */
-  public function testGetLoadedTempstore() {
+  public function testGetLoadedTempstore(): void {
     $section_storage = $this->prophesize(SectionStorageInterface::class);
     $section_storage->getStorageType()->willReturn('my_storage_type');
     $section_storage->getStorageId()->willReturn('my_storage_id');
@@ -66,7 +66,7 @@ public function testGetLoadedTempstore() {
   /**
    * @covers ::get
    */
-  public function testGetInvalidEntry() {
+  public function testGetInvalidEntry(): void {
     $section_storage = $this->prophesize(SectionStorageInterface::class);
     $section_storage->getStorageType()->willReturn('my_storage_type');
     $section_storage->getStorageId()->willReturn('my_storage_id');
diff --git a/core/modules/layout_builder/tests/src/Unit/LayoutTempstoreRouteEnhancerTest.php b/core/modules/layout_builder/tests/src/Unit/LayoutTempstoreRouteEnhancerTest.php
index 98e8d3eef6b1..cae00582fee2 100644
--- a/core/modules/layout_builder/tests/src/Unit/LayoutTempstoreRouteEnhancerTest.php
+++ b/core/modules/layout_builder/tests/src/Unit/LayoutTempstoreRouteEnhancerTest.php
@@ -22,7 +22,7 @@ class LayoutTempstoreRouteEnhancerTest extends UnitTestCase {
   /**
    * @covers ::enhance
    */
-  public function testEnhance() {
+  public function testEnhance(): void {
     $section_storage = $this->prophesize(SectionStorageInterface::class);
     $layout_tempstore_repository = $this->prophesize(LayoutTempstoreRepositoryInterface::class);
     $layout_tempstore_repository->get($section_storage->reveal())->willReturn('the_return_value');
diff --git a/core/modules/layout_builder/tests/src/Unit/OverridesSectionStorageTest.php b/core/modules/layout_builder/tests/src/Unit/OverridesSectionStorageTest.php
index fbafb7eef13b..8b05201660a1 100644
--- a/core/modules/layout_builder/tests/src/Unit/OverridesSectionStorageTest.php
+++ b/core/modules/layout_builder/tests/src/Unit/OverridesSectionStorageTest.php
@@ -88,7 +88,7 @@ protected function setUp(): void {
    * @param array $defaults
    *   The defaults to pass to ::extractEntityFromRoute().
    */
-  public function testExtractEntityFromRoute($success, $expected_entity_type_id, $value, array $defaults) {
+  public function testExtractEntityFromRoute($success, $expected_entity_type_id, $value, array $defaults): void {
     if ($expected_entity_type_id) {
       $entity_without_layout = $this->prophesize(FieldableEntityInterface::class);
       $entity_without_layout->hasField(OverridesSectionStorage::FIELD_NAME)->willReturn(FALSE);
@@ -163,7 +163,7 @@ public static function providerTestExtractEntityFromRoute() {
    * @covers ::getEntityTypes
    * @covers \Drupal\layout_builder\Routing\LayoutBuilderRoutesTrait::buildLayoutRoutes
    */
-  public function testBuildRoutes() {
+  public function testBuildRoutes(): void {
     $entity_types = [];
 
     $not_fieldable = $this->prophesize(EntityTypeInterface::class);
diff --git a/core/modules/layout_builder/tests/src/Unit/SectionComponentTest.php b/core/modules/layout_builder/tests/src/Unit/SectionComponentTest.php
index c3dc9732430c..0561034479ec 100644
--- a/core/modules/layout_builder/tests/src/Unit/SectionComponentTest.php
+++ b/core/modules/layout_builder/tests/src/Unit/SectionComponentTest.php
@@ -25,7 +25,7 @@ class SectionComponentTest extends UnitTestCase {
   /**
    * @covers ::toRenderArray
    */
-  public function testToRenderArray() {
+  public function testToRenderArray(): void {
     $existing_block = $this->prophesize(BlockPluginInterface::class);
     $existing_block->getPluginId()->willReturn('block_plugin_id');
 
diff --git a/core/modules/layout_builder/tests/src/Unit/SectionRenderTest.php b/core/modules/layout_builder/tests/src/Unit/SectionRenderTest.php
index 63c52f408c25..d0f3950d106d 100644
--- a/core/modules/layout_builder/tests/src/Unit/SectionRenderTest.php
+++ b/core/modules/layout_builder/tests/src/Unit/SectionRenderTest.php
@@ -101,7 +101,7 @@ protected function setUp(): void {
   /**
    * @covers ::toRenderArray
    */
-  public function testToRenderArray() {
+  public function testToRenderArray(): void {
     $block_content = ['#markup' => 'The block content.'];
     $placeholder_label = 'Placeholder Label';
     $render_array = [
@@ -150,7 +150,7 @@ public function testToRenderArray() {
   /**
    * @covers ::toRenderArray
    */
-  public function testToRenderArrayAccessDenied() {
+  public function testToRenderArrayAccessDenied(): void {
     $block = $this->prophesize(BlockPluginInterface::class);
     $this->blockManager->createInstance('block_plugin_id', ['id' => 'block_plugin_id'])->willReturn($block->reveal());
 
@@ -182,7 +182,7 @@ public function testToRenderArrayAccessDenied() {
   /**
    * @covers ::toRenderArray
    */
-  public function testToRenderArrayPreview() {
+  public function testToRenderArrayPreview(): void {
     $block_content = ['#markup' => 'The block content.'];
     $placeholder_label = 'Placeholder Label';
     $render_array = [
@@ -232,7 +232,7 @@ public function testToRenderArrayPreview() {
   /**
    * @covers ::toRenderArray
    */
-  public function testToRenderArrayEmpty() {
+  public function testToRenderArrayEmpty(): void {
     $section = [];
     $expected = [];
     $result = (new Section('layout_onecol', [], $section))->toRenderArray();
@@ -242,7 +242,7 @@ public function testToRenderArrayEmpty() {
   /**
    * @covers ::toRenderArray
    */
-  public function testContextAwareBlock() {
+  public function testContextAwareBlock(): void {
     $block_content = ['#markup' => 'The block content.'];
     $placeholder_label = 'Placeholder Label';
     $render_array = [
@@ -294,7 +294,7 @@ public function testContextAwareBlock() {
   /**
    * @covers ::toRenderArray
    */
-  public function testToRenderArrayMissingPluginId() {
+  public function testToRenderArrayMissingPluginId(): void {
     $this->expectException(PluginException::class);
     $this->expectExceptionMessage('No plugin ID specified for component with "some_uuid" UUID');
     (new Section('layout_onecol', [], [new SectionComponent('some_uuid', 'content')]))->toRenderArray();
diff --git a/core/modules/layout_builder/tests/src/Unit/SectionStorageManagerTest.php b/core/modules/layout_builder/tests/src/Unit/SectionStorageManagerTest.php
index 0f3f8f0cc4ca..7acbae29c36b 100644
--- a/core/modules/layout_builder/tests/src/Unit/SectionStorageManagerTest.php
+++ b/core/modules/layout_builder/tests/src/Unit/SectionStorageManagerTest.php
@@ -87,7 +87,7 @@ protected function setUp(): void {
   /**
    * @covers ::loadEmpty
    */
-  public function testLoadEmpty() {
+  public function testLoadEmpty(): void {
     $result = $this->manager->loadEmpty('the_plugin_id');
     $this->assertInstanceOf(SectionStorageInterface::class, $result);
     $this->assertSame($this->plugin->reveal(), $result);
@@ -96,7 +96,7 @@ public function testLoadEmpty() {
   /**
    * @covers ::load
    */
-  public function testLoad() {
+  public function testLoad(): void {
     $contexts = [
       'the_context' => $this->prophesize(ContextInterface::class)->reveal(),
     ];
@@ -110,7 +110,7 @@ public function testLoad() {
   /**
    * @covers ::load
    */
-  public function testLoadNull() {
+  public function testLoadNull(): void {
     $contexts = [
       'the_context' => $this->prophesize(ContextInterface::class)->reveal(),
     ];
@@ -124,7 +124,7 @@ public function testLoadNull() {
   /**
    * @covers ::findDefinitions
    */
-  public function testFindDefinitions() {
+  public function testFindDefinitions(): void {
     $this->discovery->getDefinitions()->willReturn([
       'plugin1' => (new SectionStorageDefinition())->setClass(SectionStorageInterface::class),
       'plugin2' => (new SectionStorageDefinition(['weight' => -5]))->setClass(SectionStorageInterface::class),
@@ -150,7 +150,7 @@ public function testFindDefinitions() {
    * @param bool $plugin_is_applicable
    *   The result for the plugin's isApplicable() method to return.
    */
-  public function testFindByContext($plugin_is_applicable) {
+  public function testFindByContext($plugin_is_applicable): void {
     $cacheability = new CacheableMetadata();
     $contexts = [
       'foo' => new Context(new ContextDefinition('foo')),
@@ -204,7 +204,7 @@ public static function providerTestFindByContext() {
   /**
    * @covers ::findByContext
    */
-  public function testFindByContextCacheableSectionStorage() {
+  public function testFindByContextCacheableSectionStorage(): void {
     $cacheability = new CacheableMetadata();
     $contexts = [
       'foo' => new Context(new ContextDefinition('foo')),
diff --git a/core/modules/layout_builder/tests/src/Unit/SectionTest.php b/core/modules/layout_builder/tests/src/Unit/SectionTest.php
index c4813f26f042..d9960d0519d1 100644
--- a/core/modules/layout_builder/tests/src/Unit/SectionTest.php
+++ b/core/modules/layout_builder/tests/src/Unit/SectionTest.php
@@ -51,7 +51,7 @@ protected function setUp(): void {
    * @covers ::setComponent
    * @covers ::getComponents
    */
-  public function testGetComponents() {
+  public function testGetComponents(): void {
     $expected = [
       'existing-uuid' => (new SectionComponent('existing-uuid', 'some-region', ['id' => 'existing-block-id']))->setWeight(0),
       '20000000-0000-1000-a000-000000000000' => (new SectionComponent('20000000-0000-1000-a000-000000000000', 'ordered-region', ['id' => 'second-block-id']))->setWeight(3),
@@ -64,7 +64,7 @@ public function testGetComponents() {
   /**
    * @covers ::getComponent
    */
-  public function testGetComponentInvalidUuid() {
+  public function testGetComponentInvalidUuid(): void {
     $this->expectException(\InvalidArgumentException::class);
     $this->expectExceptionMessage('Invalid UUID "invalid-uuid"');
     $this->section->getComponent('invalid-uuid');
@@ -73,7 +73,7 @@ public function testGetComponentInvalidUuid() {
   /**
    * @covers ::getComponent
    */
-  public function testGetComponent() {
+  public function testGetComponent(): void {
     $expected = new SectionComponent('existing-uuid', 'some-region', ['id' => 'existing-block-id']);
 
     $this->assertEquals($expected, $this->section->getComponent('existing-uuid'));
@@ -83,7 +83,7 @@ public function testGetComponent() {
    * @covers ::removeComponent
    * @covers ::getComponentsByRegion
    */
-  public function testRemoveComponent() {
+  public function testRemoveComponent(): void {
     $expected = [
       'existing-uuid' => (new SectionComponent('existing-uuid', 'some-region', ['id' => 'existing-block-id']))->setWeight(0),
       '20000000-0000-1000-a000-000000000000' => (new SectionComponent('20000000-0000-1000-a000-000000000000', 'ordered-region', ['id' => 'second-block-id']))->setWeight(3),
@@ -98,7 +98,7 @@ public function testRemoveComponent() {
    * @covers ::getNextHighestWeight
    * @covers ::getComponentsByRegion
    */
-  public function testAppendComponent() {
+  public function testAppendComponent(): void {
     $expected = [
       'existing-uuid' => (new SectionComponent('existing-uuid', 'some-region', ['id' => 'existing-block-id']))->setWeight(0),
       '20000000-0000-1000-a000-000000000000' => (new SectionComponent('20000000-0000-1000-a000-000000000000', 'ordered-region', ['id' => 'second-block-id']))->setWeight(3),
@@ -113,7 +113,7 @@ public function testAppendComponent() {
   /**
    * @covers ::insertAfterComponent
    */
-  public function testInsertAfterComponent() {
+  public function testInsertAfterComponent(): void {
     $expected = [
       'existing-uuid' => (new SectionComponent('existing-uuid', 'some-region', ['id' => 'existing-block-id']))->setWeight(0),
       '20000000-0000-1000-a000-000000000000' => (new SectionComponent('20000000-0000-1000-a000-000000000000', 'ordered-region', ['id' => 'second-block-id']))->setWeight(4),
@@ -128,7 +128,7 @@ public function testInsertAfterComponent() {
   /**
    * @covers ::insertAfterComponent
    */
-  public function testInsertAfterComponentValidUuidRegionMismatch() {
+  public function testInsertAfterComponentValidUuidRegionMismatch(): void {
     $this->expectException(\InvalidArgumentException::class);
     $this->expectExceptionMessage('Invalid preceding UUID "existing-uuid"');
     $this->section->insertAfterComponent('existing-uuid', new SectionComponent('new-uuid', 'ordered-region'));
@@ -137,7 +137,7 @@ public function testInsertAfterComponentValidUuidRegionMismatch() {
   /**
    * @covers ::insertAfterComponent
    */
-  public function testInsertAfterComponentInvalidUuid() {
+  public function testInsertAfterComponentInvalidUuid(): void {
     $this->expectException(\InvalidArgumentException::class);
     $this->expectExceptionMessage('Invalid preceding UUID "invalid-uuid"');
     $this->section->insertAfterComponent('invalid-uuid', new SectionComponent('new-uuid', 'ordered-region'));
@@ -147,7 +147,7 @@ public function testInsertAfterComponentInvalidUuid() {
    * @covers ::insertComponent
    * @covers ::getComponentsByRegion
    */
-  public function testInsertComponent() {
+  public function testInsertComponent(): void {
     $expected = [
       'existing-uuid' => (new SectionComponent('existing-uuid', 'some-region', ['id' => 'existing-block-id']))->setWeight(0),
       '20000000-0000-1000-a000-000000000000' => (new SectionComponent('20000000-0000-1000-a000-000000000000', 'ordered-region', ['id' => 'second-block-id']))->setWeight(4),
@@ -162,7 +162,7 @@ public function testInsertComponent() {
   /**
    * @covers ::insertComponent
    */
-  public function testInsertComponentAppend() {
+  public function testInsertComponentAppend(): void {
     $expected = [
       'existing-uuid' => (new SectionComponent('existing-uuid', 'some-region', ['id' => 'existing-block-id']))->setWeight(0),
       '20000000-0000-1000-a000-000000000000' => (new SectionComponent('20000000-0000-1000-a000-000000000000', 'ordered-region', ['id' => 'second-block-id']))->setWeight(3),
@@ -177,7 +177,7 @@ public function testInsertComponentAppend() {
   /**
    * @covers ::insertComponent
    */
-  public function testInsertComponentInvalidDelta() {
+  public function testInsertComponentInvalidDelta(): void {
     $this->expectException(\OutOfBoundsException::class);
     $this->expectExceptionMessage('Invalid delta "7" for the "new-uuid" component');
     $this->section->insertComponent(7, new SectionComponent('new-uuid', 'ordered-region'));
@@ -203,7 +203,7 @@ protected function assertComponents(array $expected, Section $section): void {
    * @covers ::getThirdPartySettings
    * @dataProvider providerTestGetThirdPartySettings
    */
-  public function testGetThirdPartySettings($provider, $expected) {
+  public function testGetThirdPartySettings($provider, $expected): void {
     $this->assertSame($expected, $this->section->getThirdPartySettings($provider));
   }
 
@@ -278,7 +278,7 @@ public static function providerTestGetThirdPartySetting(): array {
    * @covers ::setThirdPartySetting
    * @dataProvider providerTestSetThirdPartySetting
    */
-  public function testSetThirdPartySetting($provider, $key, $value, $expected) {
+  public function testSetThirdPartySetting($provider, $key, $value, $expected): void {
     $this->section->setThirdPartySetting($provider, $key, $value);
     $this->assertSame($expected, $this->section->getThirdPartySettings($provider));
   }
@@ -322,7 +322,7 @@ public static function providerTestSetThirdPartySetting() {
    * @covers ::unsetThirdPartySetting
    * @dataProvider providerTestUnsetThirdPartySetting
    */
-  public function testUnsetThirdPartySetting($provider, $key, $expected) {
+  public function testUnsetThirdPartySetting($provider, $key, $expected): void {
     $this->section->unsetThirdPartySetting($provider, $key);
     $this->assertSame($expected, $this->section->getThirdPartySettings($provider));
   }
@@ -364,7 +364,7 @@ public static function providerTestUnsetThirdPartySetting() {
   /**
    * @covers ::getThirdPartyProviders
    */
-  public function testGetThirdPartyProviders() {
+  public function testGetThirdPartyProviders(): void {
     $this->assertSame(['bad_judgement', 'hunt_and_peck'], $this->section->getThirdPartyProviders());
     $this->section->unsetThirdPartySetting('hunt_and_peck', 'delay');
     $this->assertSame(['bad_judgement'], $this->section->getThirdPartyProviders());
@@ -374,7 +374,7 @@ public function testGetThirdPartyProviders() {
    * @covers ::getLayout
    * @dataProvider providerTestGetLayout
    */
-  public function testGetLayout(array $contexts, bool $should_context_apply) {
+  public function testGetLayout(array $contexts, bool $should_context_apply): void {
     $layout = $this->prophesize(LayoutInterface::class);
     $layout_plugin_manager = $this->prophesize(LayoutPluginManagerInterface::class);
     $layout_plugin_manager->createInstance('layout_onecol', [])->willReturn($layout->reveal());
diff --git a/core/modules/layout_discovery/tests/src/Kernel/LayoutTest.php b/core/modules/layout_discovery/tests/src/Kernel/LayoutTest.php
index 0e6d1c6146d4..f27f70982005 100644
--- a/core/modules/layout_discovery/tests/src/Kernel/LayoutTest.php
+++ b/core/modules/layout_discovery/tests/src/Kernel/LayoutTest.php
@@ -39,7 +39,7 @@ protected function setUp(): void {
   /**
    * Tests that a layout provided by a theme has the preprocess function set.
    */
-  public function testThemeProvidedLayout() {
+  public function testThemeProvidedLayout(): void {
     $this->container->get('theme_installer')->install(['test_layout_theme']);
     $this->config('system.theme')->set('default', 'test_layout_theme')->save();
 
@@ -52,7 +52,7 @@ public function testThemeProvidedLayout() {
    *
    * @dataProvider renderLayoutData
    */
-  public function testRenderLayout($layout_id, $config, $regions, array $html) {
+  public function testRenderLayout($layout_id, $config, $regions, array $html): void {
     $layout = $this->layoutPluginManager->createInstance($layout_id, $config);
     $built['layout'] = $layout->build($regions);
     $built['layout']['#prefix'] = 'Test prefix' . "\n";
diff --git a/core/modules/link/tests/src/Functional/LinkFieldTest.php b/core/modules/link/tests/src/Functional/LinkFieldTest.php
index c9028836c7cc..c619a772ad4e 100644
--- a/core/modules/link/tests/src/Functional/LinkFieldTest.php
+++ b/core/modules/link/tests/src/Functional/LinkFieldTest.php
@@ -75,7 +75,7 @@ protected function setUp(): void {
    *
    * This is being as one to avoid multiple Drupal install.
    */
-  public function testLinkField() {
+  public function testLinkField(): void {
     $this->doTestURLValidation();
     $this->doTestLinkTitle();
     $this->doTestLinkFormatter();
@@ -962,7 +962,7 @@ protected function doTestEditNonNodeEntityLink() {
   /**
    * Tests <nolink> and <none> as link uri.
    */
-  public function testNoLinkUri() {
+  public function testNoLinkUri(): void {
     $field_name = $this->randomMachineName();
     $this->fieldStorage = FieldStorageConfig::create([
       'field_name' => $field_name,
diff --git a/core/modules/link/tests/src/Functional/LinkFieldUITest.php b/core/modules/link/tests/src/Functional/LinkFieldUITest.php
index ac8d37f5b2fe..332ebe0a059c 100644
--- a/core/modules/link/tests/src/Functional/LinkFieldUITest.php
+++ b/core/modules/link/tests/src/Functional/LinkFieldUITest.php
@@ -74,7 +74,7 @@ protected function setUp(): void {
   /**
    * Tests the link field UI.
    */
-  public function testFieldUI() {
+  public function testFieldUI(): void {
     foreach ($this->providerTestFieldUI() as $item) {
       [$cardinality, $link_type, $title, $label, $field_name, $default_uri] = $item;
       $this->runFieldUIItem($cardinality, $link_type, $title, $label, $field_name, $default_uri);
diff --git a/core/modules/link/tests/src/Functional/Views/LinkViewsTokensTest.php b/core/modules/link/tests/src/Functional/Views/LinkViewsTokensTest.php
index 01dcc01953f3..434fe23fdf4e 100644
--- a/core/modules/link/tests/src/Functional/Views/LinkViewsTokensTest.php
+++ b/core/modules/link/tests/src/Functional/Views/LinkViewsTokensTest.php
@@ -69,7 +69,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['link_test_views
 
   }
 
-  public function testLinkViewsTokens() {
+  public function testLinkViewsTokens(): void {
     // Array of URI's to test.
     $uris = [
       'http://www.example.com' => 'example.com',
diff --git a/core/modules/link/tests/src/FunctionalJavascript/LinkFieldFormStatesTest.php b/core/modules/link/tests/src/FunctionalJavascript/LinkFieldFormStatesTest.php
index bc76b1e78a1f..9bafa0db957c 100644
--- a/core/modules/link/tests/src/FunctionalJavascript/LinkFieldFormStatesTest.php
+++ b/core/modules/link/tests/src/FunctionalJavascript/LinkFieldFormStatesTest.php
@@ -41,7 +41,7 @@ protected function setUp(): void {
   /**
    * @dataProvider linkFieldFormStatesData
    */
-  public function testLinkFieldFormStates(string $uri, string $title) {
+  public function testLinkFieldFormStates(string $uri, string $title): void {
     $this->drupalGet('entity_test/add');
     $session = $this->assertSession();
     $session->elementNotExists('css', '#edit-links-0-uri[required]');
diff --git a/core/modules/link/tests/src/Kernel/LinkItemSerializationTest.php b/core/modules/link/tests/src/Kernel/LinkItemSerializationTest.php
index 8d812ed95318..fe0767d178a2 100644
--- a/core/modules/link/tests/src/Kernel/LinkItemSerializationTest.php
+++ b/core/modules/link/tests/src/Kernel/LinkItemSerializationTest.php
@@ -57,7 +57,7 @@ protected function setUp(): void {
   /**
    * Tests the serialization.
    */
-  public function testLinkSerialization() {
+  public function testLinkSerialization(): void {
     // Create entity.
     $entity = EntityTest::create();
     $url = 'https://www.drupal.org?test_param=test_value';
@@ -85,7 +85,7 @@ public function testLinkSerialization() {
   /**
    * Tests the deserialization.
    */
-  public function testLinkDeserialization() {
+  public function testLinkDeserialization(): void {
     // Create entity.
     $entity = EntityTest::create();
     $url = 'https://www.drupal.org?test_param=test_value';
diff --git a/core/modules/link/tests/src/Kernel/LinkItemTest.php b/core/modules/link/tests/src/Kernel/LinkItemTest.php
index 93470c5c88f2..0ce867a1df82 100644
--- a/core/modules/link/tests/src/Kernel/LinkItemTest.php
+++ b/core/modules/link/tests/src/Kernel/LinkItemTest.php
@@ -73,7 +73,7 @@ protected function setUp(): void {
   /**
    * Tests using entity fields of the link field type.
    */
-  public function testLinkItem() {
+  public function testLinkItem(): void {
     // Create entity.
     $entity = EntityTest::create();
     $url = 'https://www.drupal.org?test_param=test_value';
diff --git a/core/modules/link/tests/src/Kernel/LinkItemUrlValidationTest.php b/core/modules/link/tests/src/Kernel/LinkItemUrlValidationTest.php
index a1f15a9cb779..2b7f0da2b22b 100644
--- a/core/modules/link/tests/src/Kernel/LinkItemUrlValidationTest.php
+++ b/core/modules/link/tests/src/Kernel/LinkItemUrlValidationTest.php
@@ -21,7 +21,7 @@ class LinkItemUrlValidationTest extends FieldKernelTestBase {
   /**
    * Tests link validation.
    */
-  public function testExternalLinkValidation() {
+  public function testExternalLinkValidation(): void {
     $definition = \Drupal::typedDataManager()
       ->createDataDefinition('field_item:link');
     $link_item = \Drupal::typedDataManager()->create($definition);
diff --git a/core/modules/link/tests/src/Kernel/Plugin/migrate/field/d7/LinkFieldTest.php b/core/modules/link/tests/src/Kernel/Plugin/migrate/field/d7/LinkFieldTest.php
index 4acfdd5313cd..202b2d04fe6f 100644
--- a/core/modules/link/tests/src/Kernel/Plugin/migrate/field/d7/LinkFieldTest.php
+++ b/core/modules/link/tests/src/Kernel/Plugin/migrate/field/d7/LinkFieldTest.php
@@ -55,7 +55,7 @@ protected function setUp(): void {
   /**
    * @covers ::alterFieldInstanceMigration
    */
-  public function testAlterFieldInstanceMigration($method = 'alterFieldInstanceMigration') {
+  public function testAlterFieldInstanceMigration($method = 'alterFieldInstanceMigration'): void {
     $this->plugin->$method($this->migration);
 
     $expected = [
diff --git a/core/modules/link/tests/src/Unit/LinkFormatterTest.php b/core/modules/link/tests/src/Unit/LinkFormatterTest.php
index c4867bff3a78..658fe29d9b7b 100644
--- a/core/modules/link/tests/src/Unit/LinkFormatterTest.php
+++ b/core/modules/link/tests/src/Unit/LinkFormatterTest.php
@@ -28,7 +28,7 @@ class LinkFormatterTest extends UnitTestCase {
    *
    * LinkItem::getUrl will throw \InvalidArgumentException.
    */
-  public function testFormatterLinkItemUrlMalformed() {
+  public function testFormatterLinkItemUrlMalformed(): void {
     $entity = $this->createMock(EntityInterface::class);
 
     $linkItem = $this->createMock(LinkItemInterface::class);
@@ -70,7 +70,7 @@ public function testFormatterLinkItemUrlMalformed() {
   /**
    * Tests when LinkItem::getUrl throws an unexpected exception.
    */
-  public function testFormatterLinkItemUrlUnexpectedException() {
+  public function testFormatterLinkItemUrlUnexpectedException(): void {
     $exception = new \Exception('Unexpected!!!');
 
     $linkItem = $this->createMock(LinkItemInterface::class);
@@ -107,7 +107,7 @@ public function testFormatterLinkItemUrlUnexpectedException() {
   /**
    * Tests when LinkItem::getUrl returns a functional URL.
    */
-  public function testFormatterLinkItem() {
+  public function testFormatterLinkItem(): void {
     $expectedUrl = Url::fromUri('route:<front>');
 
     $linkItem = $this->createMock(LinkItemInterface::class);
diff --git a/core/modules/link/tests/src/Unit/Plugin/Validation/Constraint/LinkExternalProtocolsConstraintValidatorTest.php b/core/modules/link/tests/src/Unit/Plugin/Validation/Constraint/LinkExternalProtocolsConstraintValidatorTest.php
index e88b63296726..b02a44b23f22 100644
--- a/core/modules/link/tests/src/Unit/Plugin/Validation/Constraint/LinkExternalProtocolsConstraintValidatorTest.php
+++ b/core/modules/link/tests/src/Unit/Plugin/Validation/Constraint/LinkExternalProtocolsConstraintValidatorTest.php
@@ -22,7 +22,7 @@ class LinkExternalProtocolsConstraintValidatorTest extends UnitTestCase {
    * @dataProvider providerValidate
    * @runInSeparateProcess
    */
-  public function testValidate($url, $valid) {
+  public function testValidate($url, $valid): void {
     $link = $this->createMock('Drupal\link\LinkItemInterface');
     $link->expects($this->any())
       ->method('getUrl')
@@ -71,7 +71,7 @@ public static function providerValidate() {
    *
    * @see \Drupal\Core\Url::fromUri
    */
-  public function testValidateWithMalformedUri() {
+  public function testValidateWithMalformedUri(): void {
     $link = $this->createMock('Drupal\link\LinkItemInterface');
     $link->expects($this->any())
       ->method('getUrl')
@@ -91,7 +91,7 @@ public function testValidateWithMalformedUri() {
   /**
    * @covers ::validate
    */
-  public function testValidateIgnoresInternalUrls() {
+  public function testValidateIgnoresInternalUrls(): void {
     $link = $this->createMock('Drupal\link\LinkItemInterface');
     $link->expects($this->any())
       ->method('getUrl')
diff --git a/core/modules/link/tests/src/Unit/Plugin/migrate/field/d6/LinkFieldTest.php b/core/modules/link/tests/src/Unit/Plugin/migrate/field/d6/LinkFieldTest.php
index b3996a7330b8..bdb0dcbedd88 100644
--- a/core/modules/link/tests/src/Unit/Plugin/migrate/field/d6/LinkFieldTest.php
+++ b/core/modules/link/tests/src/Unit/Plugin/migrate/field/d6/LinkFieldTest.php
@@ -50,7 +50,7 @@ protected function setUp(): void {
   /**
    * @covers ::defineValueProcessPipeline
    */
-  public function testDefineValueProcessPipeline($method = 'defineValueProcessPipeline') {
+  public function testDefineValueProcessPipeline($method = 'defineValueProcessPipeline'): void {
     $this->plugin->$method($this->migration, 'field_name', []);
 
     $expected = [
diff --git a/core/modules/link/tests/src/Unit/Plugin/migrate/process/FieldLinkTest.php b/core/modules/link/tests/src/Unit/Plugin/migrate/process/FieldLinkTest.php
index fb09c54c68e6..693505db949c 100644
--- a/core/modules/link/tests/src/Unit/Plugin/migrate/process/FieldLinkTest.php
+++ b/core/modules/link/tests/src/Unit/Plugin/migrate/process/FieldLinkTest.php
@@ -20,7 +20,7 @@ class FieldLinkTest extends UnitTestCase {
    *
    * @dataProvider canonicalizeUriDataProvider
    */
-  public function testCanonicalizeUri($url, $expected, $configuration = []) {
+  public function testCanonicalizeUri($url, $expected, $configuration = []): void {
     $link_plugin = new FieldLink($configuration, '', [], $this->createMock(MigrationInterface::class));
     $transformed = $link_plugin->transform([
       'url' => $url,
@@ -110,7 +110,7 @@ public static function canonicalizeUriDataProvider() {
   /**
    * Tests the attributes that are deeply serialized are discarded.
    */
-  public function testCanonicalizeUriSerialized() {
+  public function testCanonicalizeUriSerialized(): void {
     $link_plugin = new FieldLink([], '', [], $this->createMock(MigrationInterface::class));
     $migrate_executable = $this->createMock(MigrateExecutableInterface::class);
     $row = new Row();
diff --git a/core/modules/locale/tests/src/Functional/LocaleConfigTranslationImportTest.php b/core/modules/locale/tests/src/Functional/LocaleConfigTranslationImportTest.php
index b88261d7e868..fc518b12f161 100644
--- a/core/modules/locale/tests/src/Functional/LocaleConfigTranslationImportTest.php
+++ b/core/modules/locale/tests/src/Functional/LocaleConfigTranslationImportTest.php
@@ -36,7 +36,7 @@ protected function setUp(): void {
   /**
    * Tests update changes configuration translations if enabled after language.
    */
-  public function testConfigTranslationImport() {
+  public function testConfigTranslationImport(): void {
     $admin_user = $this->drupalCreateUser([
       'administer modules',
       'administer site configuration',
@@ -120,7 +120,7 @@ public function testConfigTranslationImport() {
   /**
    * Tests update changes configuration translations if enabled after language.
    */
-  public function testConfigTranslationModuleInstall() {
+  public function testConfigTranslationModuleInstall(): void {
 
     // Enable locale, block and config_translation modules.
     $this->container->get('module_installer')->install(['block', 'config_translation']);
@@ -197,7 +197,7 @@ public function testConfigTranslationModuleInstall() {
   /**
    * Tests removing a string from Locale deletes configuration translations.
    */
-  public function testLocaleRemovalAndConfigOverrideDelete() {
+  public function testLocaleRemovalAndConfigOverrideDelete(): void {
     // Enable the locale module.
     $this->container->get('module_installer')->install(['locale']);
     $this->resetAll();
@@ -243,7 +243,7 @@ public function testLocaleRemovalAndConfigOverrideDelete() {
   /**
    * Tests removing a string from Locale changes configuration translations.
    */
-  public function testLocaleRemovalAndConfigOverridePreserve() {
+  public function testLocaleRemovalAndConfigOverridePreserve(): void {
     // Enable the locale module.
     $this->container->get('module_installer')->install(['locale']);
     $this->resetAll();
@@ -309,7 +309,7 @@ public function testLocaleRemovalAndConfigOverridePreserve() {
   /**
    * Tests setting a non-English language as default and importing configuration.
    */
-  public function testConfigTranslationWithNonEnglishLanguageDefault() {
+  public function testConfigTranslationWithNonEnglishLanguageDefault(): void {
     /** @var \Drupal\Core\Extension\ModuleInstallerInterface $module_installer */
     $module_installer = $this->container->get('module_installer');
     ConfigurableLanguage::createFromLangcode('af')->save();
diff --git a/core/modules/locale/tests/src/Functional/LocaleConfigTranslationTest.php b/core/modules/locale/tests/src/Functional/LocaleConfigTranslationTest.php
index 419037ea276b..92aa33d3b2b4 100644
--- a/core/modules/locale/tests/src/Functional/LocaleConfigTranslationTest.php
+++ b/core/modules/locale/tests/src/Functional/LocaleConfigTranslationTest.php
@@ -84,7 +84,7 @@ protected function setUp(): void {
   /**
    * Tests basic configuration translation.
    */
-  public function testConfigTranslation() {
+  public function testConfigTranslation(): void {
     // Check that the maintenance message exists and create translation for it.
     $source = '@site is currently under maintenance. We should be back shortly. Thank you for your patience.';
     $string = $this->storage->findString(['source' => $source, 'context' => '', 'type' => 'configuration']);
@@ -231,7 +231,7 @@ public function testConfigTranslation() {
   /**
    * Tests translatability of optional configuration in locale.
    */
-  public function testOptionalConfiguration() {
+  public function testOptionalConfiguration(): void {
     $this->assertNodeConfig(FALSE, FALSE);
     // Enable the node module.
     $this->drupalGet('admin/modules');
diff --git a/core/modules/locale/tests/src/Functional/LocaleContentTest.php b/core/modules/locale/tests/src/Functional/LocaleContentTest.php
index 1f4d1a27e009..9a26be4c0f31 100644
--- a/core/modules/locale/tests/src/Functional/LocaleContentTest.php
+++ b/core/modules/locale/tests/src/Functional/LocaleContentTest.php
@@ -30,7 +30,7 @@ class LocaleContentTest extends BrowserTestBase {
   /**
    * Verifies that machine name fields are always LTR.
    */
-  public function testMachineNameLTR() {
+  public function testMachineNameLTR(): void {
     // User to add and remove language.
     $admin_user = $this->drupalCreateUser([
       'administer languages',
@@ -68,7 +68,7 @@ public function testMachineNameLTR() {
   /**
    * Tests if a content type can be set to multilingual and language is present.
    */
-  public function testContentTypeLanguageConfiguration() {
+  public function testContentTypeLanguageConfiguration(): void {
     $type1 = $this->drupalCreateContentType();
     $type2 = $this->drupalCreateContentType();
 
@@ -159,7 +159,7 @@ public function testContentTypeLanguageConfiguration() {
   /**
    * Tests if a dir and lang tags exist in node's attributes.
    */
-  public function testContentTypeDirLang() {
+  public function testContentTypeDirLang(): void {
     $type = $this->drupalCreateContentType();
 
     // User to add and remove language.
diff --git a/core/modules/locale/tests/src/Functional/LocaleExportTest.php b/core/modules/locale/tests/src/Functional/LocaleExportTest.php
index 947ae8a8fe6b..d64563686bd2 100644
--- a/core/modules/locale/tests/src/Functional/LocaleExportTest.php
+++ b/core/modules/locale/tests/src/Functional/LocaleExportTest.php
@@ -54,7 +54,7 @@ protected function setUp(): void {
   /**
    * Tests exportation of translations.
    */
-  public function testExportTranslation() {
+  public function testExportTranslation(): void {
     $file_system = \Drupal::service('file_system');
     // First import some known translations.
     // This will also automatically add the 'fr' language.
@@ -130,7 +130,7 @@ public function testExportTranslation() {
   /**
    * Tests exportation of translation template file.
    */
-  public function testExportTranslationTemplateFile() {
+  public function testExportTranslationTemplateFile(): void {
     // Load an admin page with JavaScript so _drupal_add_library() fires at
     // least once and _locale_parse_js_file() gets to run at least once so that
     // the locales_source table gets populated with something.
diff --git a/core/modules/locale/tests/src/Functional/LocaleFileSystemFormTest.php b/core/modules/locale/tests/src/Functional/LocaleFileSystemFormTest.php
index e1e3b6318be7..62970c8e93cd 100644
--- a/core/modules/locale/tests/src/Functional/LocaleFileSystemFormTest.php
+++ b/core/modules/locale/tests/src/Functional/LocaleFileSystemFormTest.php
@@ -37,7 +37,7 @@ protected function setUp(): void {
   /**
    * Tests translation directory settings on the file settings form.
    */
-  public function testFileConfigurationPage() {
+  public function testFileConfigurationPage(): void {
     // By default there should be no setting for the translation directory.
     $this->drupalGet('admin/config/media/file-system');
     $this->assertSession()->fieldNotExists('translation_path');
diff --git a/core/modules/locale/tests/src/Functional/LocaleImportFunctionalTest.php b/core/modules/locale/tests/src/Functional/LocaleImportFunctionalTest.php
index 92dda41b44bb..caa931fb8ecb 100644
--- a/core/modules/locale/tests/src/Functional/LocaleImportFunctionalTest.php
+++ b/core/modules/locale/tests/src/Functional/LocaleImportFunctionalTest.php
@@ -81,7 +81,7 @@ protected function setUp(): void {
   /**
    * Tests import of standalone .po files.
    */
-  public function testStandalonePoFile() {
+  public function testStandalonePoFile(): void {
     // Try importing a .po file.
     $this->importPoFile($this->getPoFile(), [
       'langcode' => 'fr',
@@ -256,7 +256,7 @@ public function testStandalonePoFile() {
   /**
    * Tests msgctxt context support.
    */
-  public function testLanguageContext() {
+  public function testLanguageContext(): void {
     // Try importing a .po file.
     $this->importPoFile($this->getPoFileWithContext(), [
       'langcode' => 'hr',
@@ -271,7 +271,7 @@ public function testLanguageContext() {
   /**
    * Tests empty msgstr at end of .po file see #611786.
    */
-  public function testEmptyMsgstr() {
+  public function testEmptyMsgstr(): void {
     $langcode = 'hu';
 
     // Try importing a .po file.
@@ -304,7 +304,7 @@ public function testEmptyMsgstr() {
   /**
    * Tests .po file import with configuration translation.
    */
-  public function testConfigPoFile() {
+  public function testConfigPoFile(): void {
     // Values for translations to assert. Config key, original string,
     // translation and config property name.
     $config_strings = [
@@ -370,7 +370,7 @@ public function testConfigPoFile() {
   /**
    * Tests .po file import with user.settings configuration.
    */
-  public function testConfigTranslationImportingPoFile() {
+  public function testConfigTranslationImportingPoFile(): void {
     // Set the language code.
     $langcode = 'de';
 
@@ -387,7 +387,7 @@ public function testConfigTranslationImportingPoFile() {
   /**
    * Tests the translation are imported when a new language is created.
    */
-  public function testCreatedLanguageTranslation() {
+  public function testCreatedLanguageTranslation(): void {
     // Import a .po file to add de language.
     $this->importPoFile($this->getPoFileWithConfigDe(), ['langcode' => 'de']);
 
diff --git a/core/modules/locale/tests/src/Functional/LocaleJavascriptTranslationTest.php b/core/modules/locale/tests/src/Functional/LocaleJavascriptTranslationTest.php
index 7a3879a6aef0..157c16cbaf75 100644
--- a/core/modules/locale/tests/src/Functional/LocaleJavascriptTranslationTest.php
+++ b/core/modules/locale/tests/src/Functional/LocaleJavascriptTranslationTest.php
@@ -29,7 +29,7 @@ class LocaleJavascriptTranslationTest extends BrowserTestBase {
    */
   protected $defaultTheme = 'stark';
 
-  public function testFileParsing() {
+  public function testFileParsing(): void {
 
     // This test is for ensuring that the regular expression in
     // _locale_parse_js_file() finds translatable source strings in all valid
@@ -112,7 +112,7 @@ public function testFileParsing() {
   /**
    * Assert translations JS is added before drupal.js, because it depends on it.
    */
-  public function testLocaleTranslationJsDependencies() {
+  public function testLocaleTranslationJsDependencies(): void {
     // User to add and remove language.
     $admin_user = $this->drupalCreateUser([
       'administer languages',
diff --git a/core/modules/locale/tests/src/Functional/LocaleLocaleLookupTest.php b/core/modules/locale/tests/src/Functional/LocaleLocaleLookupTest.php
index daae180c0012..1a121099dbe5 100644
--- a/core/modules/locale/tests/src/Functional/LocaleLocaleLookupTest.php
+++ b/core/modules/locale/tests/src/Functional/LocaleLocaleLookupTest.php
@@ -54,7 +54,7 @@ protected function setUp(): void {
   /**
    * Tests that there are no circular dependencies.
    */
-  public function testCircularDependency() {
+  public function testCircularDependency(): void {
     // Ensure that we can enable early_translation_test on a non-english site.
     $this->drupalGet('admin/modules');
     $this->submitForm(['modules[early_translation_test][enable]' => TRUE], 'Install');
@@ -64,7 +64,7 @@ public function testCircularDependency() {
   /**
    * Tests language fallback defaults.
    */
-  public function testLanguageFallbackDefaults() {
+  public function testLanguageFallbackDefaults(): void {
     $this->drupalGet('');
     // Ensure state of fallback languages persisted by
     // locale_test_language_fallback_candidates_locale_lookup_alter() is empty.
@@ -80,7 +80,7 @@ public function testLanguageFallbackDefaults() {
    *
    * @dataProvider providerTestFixOldPluralStyle
    */
-  public function testFixOldPluralStyle($translation_value, $expected) {
+  public function testFixOldPluralStyle($translation_value, $expected): void {
     $string_storage = \Drupal::service('locale.storage');
     $string = $string_storage->findString(['source' => 'Member for', 'context' => '']);
     $lid = $string->getId();
diff --git a/core/modules/locale/tests/src/Functional/LocaleNonInteractiveInstallTest.php b/core/modules/locale/tests/src/Functional/LocaleNonInteractiveInstallTest.php
index dd63cbf3f43a..43761ced2626 100644
--- a/core/modules/locale/tests/src/Functional/LocaleNonInteractiveInstallTest.php
+++ b/core/modules/locale/tests/src/Functional/LocaleNonInteractiveInstallTest.php
@@ -64,7 +64,7 @@ protected function installParameters() {
   /**
    * Tests that the expected translated text appears on the login screen.
    */
-  public function testInstallerTranslations() {
+  public function testInstallerTranslations(): void {
     $this->drupalGet('user/login');
     // cSpell:disable-next-line
     $this->assertSession()->responseContains('Geben sie das Passwort für ihren Benutzernamen ein.');
diff --git a/core/modules/locale/tests/src/Functional/LocalePathTest.php b/core/modules/locale/tests/src/Functional/LocalePathTest.php
index 1b390d92f781..505252865f3c 100644
--- a/core/modules/locale/tests/src/Functional/LocalePathTest.php
+++ b/core/modules/locale/tests/src/Functional/LocalePathTest.php
@@ -44,7 +44,7 @@ protected function setUp(): void {
   /**
    * Tests if a language can be associated with a path alias.
    */
-  public function testPathLanguageConfiguration() {
+  public function testPathLanguageConfiguration(): void {
     // User to add and remove language.
     $admin_user = $this->drupalCreateUser([
       'administer languages',
diff --git a/core/modules/locale/tests/src/Functional/LocalePluralFormatTest.php b/core/modules/locale/tests/src/Functional/LocalePluralFormatTest.php
index a5f3fc73f137..52ab8f7da856 100644
--- a/core/modules/locale/tests/src/Functional/LocalePluralFormatTest.php
+++ b/core/modules/locale/tests/src/Functional/LocalePluralFormatTest.php
@@ -54,7 +54,7 @@ protected function setUp(): void {
   /**
    * Tests locale_get_plural() and \Drupal::translation()->formatPlural().
    */
-  public function testGetPluralFormat() {
+  public function testGetPluralFormat(): void {
     // Import some .po files with formulas to set up the environment.
     // These will also add the languages to the system.
     $this->importPoFile($this->getPoFileWithSimplePlural(), [
@@ -163,7 +163,7 @@ public function testGetPluralFormat() {
   /**
    * Tests plural editing of DateFormatter strings.
    */
-  public function testPluralEditDateFormatter() {
+  public function testPluralEditDateFormatter(): void {
 
     // Import some .po files with formulas to set up the environment.
     // These will also add the languages to the system.
@@ -237,7 +237,7 @@ public function testPluralEditDateFormatter() {
   /**
    * Tests plural editing and export functionality.
    */
-  public function testPluralEditExport() {
+  public function testPluralEditExport(): void {
     // Import some .po files with formulas to set up the environment.
     // These will also add the languages to the system.
     $this->importPoFile($this->getPoFileWithSimplePlural(), [
diff --git a/core/modules/locale/tests/src/Functional/LocaleTranslatedSchemaDefinitionTest.php b/core/modules/locale/tests/src/Functional/LocaleTranslatedSchemaDefinitionTest.php
index 5d6d41cb92ed..1c3941b1d061 100644
--- a/core/modules/locale/tests/src/Functional/LocaleTranslatedSchemaDefinitionTest.php
+++ b/core/modules/locale/tests/src/Functional/LocaleTranslatedSchemaDefinitionTest.php
@@ -46,7 +46,7 @@ protected function setUp(): void {
   /**
    * Tests that translated field descriptions do not affect the update system.
    */
-  public function testTranslatedSchemaDefinition() {
+  public function testTranslatedSchemaDefinition(): void {
     /** @var \Drupal\locale\StringDatabaseStorage $stringStorage */
     $stringStorage = \Drupal::service('locale.storage');
 
@@ -70,7 +70,7 @@ public function testTranslatedSchemaDefinition() {
   /**
    * Tests that translations do not affect the update system.
    */
-  public function testTranslatedUpdate() {
+  public function testTranslatedUpdate(): void {
     // Visit the update page to collect any strings that may be translatable.
     $user = $this->drupalCreateUser(['administer software updates']);
     $this->drupalLogin($user);
diff --git a/core/modules/locale/tests/src/Functional/LocaleTranslationChangeProjectVersionTest.php b/core/modules/locale/tests/src/Functional/LocaleTranslationChangeProjectVersionTest.php
index 1e2101347886..98f69bf059e3 100644
--- a/core/modules/locale/tests/src/Functional/LocaleTranslationChangeProjectVersionTest.php
+++ b/core/modules/locale/tests/src/Functional/LocaleTranslationChangeProjectVersionTest.php
@@ -59,7 +59,7 @@ protected function setUp(): void {
   /**
    * Tests update translations when project version changes.
    */
-  public function testUpdateImportSourceRemote() {
+  public function testUpdateImportSourceRemote(): void {
 
     // Verify that the project status has the old version.
     $status = locale_translation_get_status(['contrib_module_one']);
diff --git a/core/modules/locale/tests/src/Functional/LocaleTranslationDownloadTest.php b/core/modules/locale/tests/src/Functional/LocaleTranslationDownloadTest.php
index 598026a11fc2..80112d06aa52 100644
--- a/core/modules/locale/tests/src/Functional/LocaleTranslationDownloadTest.php
+++ b/core/modules/locale/tests/src/Functional/LocaleTranslationDownloadTest.php
@@ -47,7 +47,7 @@ protected function setUp(): void {
   /**
    * Tests translation download from remote sources.
    */
-  public function testUpdateImportSourceRemote() {
+  public function testUpdateImportSourceRemote(): void {
 
     // Provide remote and 'previously' downloaded translation file.
     $this->setTranslationFiles();
diff --git a/core/modules/locale/tests/src/Functional/LocaleTranslationUiTest.php b/core/modules/locale/tests/src/Functional/LocaleTranslationUiTest.php
index 77d0d57d2b03..c339dfb98d0f 100644
--- a/core/modules/locale/tests/src/Functional/LocaleTranslationUiTest.php
+++ b/core/modules/locale/tests/src/Functional/LocaleTranslationUiTest.php
@@ -34,7 +34,7 @@ class LocaleTranslationUiTest extends BrowserTestBase {
   /**
    * Enable interface translation to English.
    */
-  public function testEnglishTranslation() {
+  public function testEnglishTranslation(): void {
     $admin_user = $this->drupalCreateUser([
       'administer languages',
       'access administration pages',
@@ -49,7 +49,7 @@ public function testEnglishTranslation() {
   /**
    * Adds a language and tests string translation by users with the appropriate permissions.
    */
-  public function testStringTranslation() {
+  public function testStringTranslation(): void {
     // User to add and remove language.
     $admin_user = $this->drupalCreateUser([
       'administer languages',
@@ -250,7 +250,7 @@ public function testStringTranslation() {
   /**
    * Tests the rebuilding of JavaScript translation files on deletion.
    */
-  public function testJavaScriptTranslation() {
+  public function testJavaScriptTranslation(): void {
     $user = $this->drupalCreateUser([
       'translate interface',
       'administer languages',
@@ -331,7 +331,7 @@ public function testJavaScriptTranslation() {
   /**
    * Tests the validation of the translation input.
    */
-  public function testStringValidation() {
+  public function testStringValidation(): void {
     // User to add language and strings.
     $admin_user = $this->drupalCreateUser([
       'administer languages',
@@ -392,7 +392,7 @@ public function testStringValidation() {
   /**
    * Tests translation search form.
    */
-  public function testStringSearch() {
+  public function testStringSearch(): void {
     // User to add and remove language.
     $admin_user = $this->drupalCreateUser([
       'administer languages',
@@ -552,7 +552,7 @@ public function testStringSearch() {
   /**
    * Tests that only changed strings are saved customized when edited.
    */
-  public function testUICustomizedStrings() {
+  public function testUICustomizedStrings(): void {
     $user = $this->drupalCreateUser([
       'translate interface',
       'administer languages',
diff --git a/core/modules/locale/tests/src/Functional/LocaleUpdateCronTest.php b/core/modules/locale/tests/src/Functional/LocaleUpdateCronTest.php
index 7c0b88f606e4..2950ab3937fd 100644
--- a/core/modules/locale/tests/src/Functional/LocaleUpdateCronTest.php
+++ b/core/modules/locale/tests/src/Functional/LocaleUpdateCronTest.php
@@ -42,7 +42,7 @@ protected function setUp(): void {
   /**
    * Tests interface translation update using cron.
    */
-  public function testUpdateCron() {
+  public function testUpdateCron(): void {
     // Set a flag to let the locale_test module replace the project data with a
     // set of test projects.
     \Drupal::state()->set('locale.test_projects_alter', TRUE);
diff --git a/core/modules/locale/tests/src/Functional/LocaleUpdateDevelopmentReleaseTest.php b/core/modules/locale/tests/src/Functional/LocaleUpdateDevelopmentReleaseTest.php
index d87706236a51..67476923dbc2 100644
--- a/core/modules/locale/tests/src/Functional/LocaleUpdateDevelopmentReleaseTest.php
+++ b/core/modules/locale/tests/src/Functional/LocaleUpdateDevelopmentReleaseTest.php
@@ -37,7 +37,7 @@ protected function setUp(): void {
     $this->submitForm(['predefined_langcode' => 'hu'], 'Add language');
   }
 
-  public function testLocaleUpdateDevelopmentRelease() {
+  public function testLocaleUpdateDevelopmentRelease(): void {
     $projects = locale_translation_build_projects();
     $this->assertEquals('8.0.x', $projects['drupal']->info['version'], 'The branch of the core dev release.');
     $this->assertEquals('12.x-10.x', $projects['contrib']->info['version'], 'The branch of the contrib module dev release.');
diff --git a/core/modules/locale/tests/src/Functional/LocaleUpdateInterfaceTest.php b/core/modules/locale/tests/src/Functional/LocaleUpdateInterfaceTest.php
index e80287c7c74d..12b0a0ae75f9 100644
--- a/core/modules/locale/tests/src/Functional/LocaleUpdateInterfaceTest.php
+++ b/core/modules/locale/tests/src/Functional/LocaleUpdateInterfaceTest.php
@@ -46,7 +46,7 @@ protected function setUp(): void {
    * Testing the Available updates summary on the side wide status page and the
    * Available translation updates page.
    */
-  public function testInterface() {
+  public function testInterface(): void {
     // No language added.
     // Check status page and Available translation updates page.
     $this->drupalGet('admin/reports/status');
diff --git a/core/modules/locale/tests/src/Functional/LocaleUpdateTest.php b/core/modules/locale/tests/src/Functional/LocaleUpdateTest.php
index 0a727854037e..b5ffc3fa473b 100644
--- a/core/modules/locale/tests/src/Functional/LocaleUpdateTest.php
+++ b/core/modules/locale/tests/src/Functional/LocaleUpdateTest.php
@@ -58,7 +58,7 @@ protected function setUp(): void {
    * the most recent files are selected in the different check scenarios: check
    * for local files only, check for both local and remote files.
    */
-  public function testUpdateCheckStatus() {
+  public function testUpdateCheckStatus(): void {
     // Case when contributed modules are absent.
     $this->drupalGet('admin/reports/translations');
     $this->assertSession()->pageTextContains('Missing translations for one project');
@@ -116,7 +116,7 @@ public function testUpdateCheckStatus() {
    *  - Source: remote and local files
    *  - Import overwrite: all existing translations
    */
-  public function testUpdateImportSourceRemote() {
+  public function testUpdateImportSourceRemote(): void {
     $config = $this->config('locale.settings');
 
     // Build the test environment.
@@ -187,7 +187,7 @@ public function testUpdateImportSourceRemote() {
    *  - Source: local files only
    *  - Import overwrite: all existing translations
    */
-  public function testUpdateImportSourceLocal() {
+  public function testUpdateImportSourceLocal(): void {
     $config = $this->config('locale.settings');
 
     // Build the test environment.
@@ -247,7 +247,7 @@ public function testUpdateImportSourceLocal() {
    *  - Source: remote and local files
    *  - Import overwrite: only overwrite non-customized translations
    */
-  public function testUpdateImportModeNonCustomized() {
+  public function testUpdateImportModeNonCustomized(): void {
     $config = $this->config('locale.settings');
 
     // Build the test environment.
@@ -287,7 +287,7 @@ public function testUpdateImportModeNonCustomized() {
    *  - Source: remote and local files
    *  - Import overwrite: don't overwrite any existing translation
    */
-  public function testUpdateImportModeNone() {
+  public function testUpdateImportModeNone(): void {
     $config = $this->config('locale.settings');
 
     // Build the test environment.
@@ -323,7 +323,7 @@ public function testUpdateImportModeNone() {
   /**
    * Tests automatic translation import when a module is enabled.
    */
-  public function testEnableUninstallModule() {
+  public function testEnableUninstallModule(): void {
     // Make the hidden test modules look like a normal custom module.
     \Drupal::state()->set('locale.test_system_info_alter', TRUE);
 
@@ -363,7 +363,7 @@ public function testEnableUninstallModule() {
    * enabled modules and will import them. When a language is removed the system
    * will remove all translations of that language from the database.
    */
-  public function testEnableLanguage() {
+  public function testEnableLanguage(): void {
     // Make the hidden test modules look like a normal custom module.
     \Drupal::state()->set('locale.test_system_info_alter', TRUE);
 
@@ -421,7 +421,7 @@ public function testEnableLanguage() {
   /**
    * Tests automatic translation import when a custom language is added.
    */
-  public function testEnableCustomLanguage() {
+  public function testEnableCustomLanguage(): void {
     // Make the hidden test modules look like a normal custom module.
     \Drupal::state()->set('locale.test_system_info_alter', TRUE);
 
diff --git a/core/modules/locale/tests/src/Kernel/LocaleBuildTest.php b/core/modules/locale/tests/src/Kernel/LocaleBuildTest.php
index 9b85c5673a12..b2ab15fcd9a6 100644
--- a/core/modules/locale/tests/src/Kernel/LocaleBuildTest.php
+++ b/core/modules/locale/tests/src/Kernel/LocaleBuildTest.php
@@ -25,7 +25,7 @@ class LocaleBuildTest extends KernelTestBase {
   /**
    * Checks if a list of translatable projects gets built.
    */
-  public function testBuildProjects() {
+  public function testBuildProjects(): void {
     $this->container->get('module_handler')->loadInclude('locale', 'compare.inc');
     /** @var \Drupal\Core\Extension\ExtensionList $module_list */
     $module_list = \Drupal::service('extension.list.module');
diff --git a/core/modules/locale/tests/src/Kernel/LocaleConfigManagerTest.php b/core/modules/locale/tests/src/Kernel/LocaleConfigManagerTest.php
index 76415a566292..e50984dd4af0 100644
--- a/core/modules/locale/tests/src/Kernel/LocaleConfigManagerTest.php
+++ b/core/modules/locale/tests/src/Kernel/LocaleConfigManagerTest.php
@@ -38,7 +38,7 @@ class LocaleConfigManagerTest extends KernelTestBase {
   /**
    * Tests hasTranslation().
    */
-  public function testHasTranslation() {
+  public function testHasTranslation(): void {
     $this->installSchema('locale', ['locales_location', 'locales_source', 'locales_target']);
     $this->installConfig(['locale_test']);
     $locale_config_manager = \Drupal::service('locale.config_manager');
@@ -55,7 +55,7 @@ public function testHasTranslation() {
   /**
    * Tests getStringTranslation().
    */
-  public function testGetStringTranslation() {
+  public function testGetStringTranslation(): void {
     $this->installSchema('locale', ['locales_location', 'locales_source', 'locales_target']);
     $this->installConfig(['locale_test']);
 
@@ -76,7 +76,7 @@ public function testGetStringTranslation() {
   /**
    * Tests getDefaultConfigLangcode().
    */
-  public function testGetDefaultConfigLangcode() {
+  public function testGetDefaultConfigLangcode(): void {
     // Install the Language module's configuration so we can use the
     // module_installer service.
     $this->installConfig(['language']);
diff --git a/core/modules/locale/tests/src/Kernel/LocaleConfigSubscriberForeignTest.php b/core/modules/locale/tests/src/Kernel/LocaleConfigSubscriberForeignTest.php
index 2389a8aca1a7..8648ca59f707 100644
--- a/core/modules/locale/tests/src/Kernel/LocaleConfigSubscriberForeignTest.php
+++ b/core/modules/locale/tests/src/Kernel/LocaleConfigSubscriberForeignTest.php
@@ -46,7 +46,7 @@ protected function setUpLocale() {
   /**
    * Tests that the language of default configuration was updated.
    */
-  public function testDefaultConfigLanguage() {
+  public function testDefaultConfigLanguage(): void {
     $this->assertEquals('hu', $this->configFactory->getEditable('locale_test.no_translation')->get('langcode'));
     $this->assertEquals('hu', $this->configFactory->getEditable('locale_test.translation')->get('langcode'));
     $this->assertEquals('Hungarian test', $this->configFactory->getEditable('locale_test.translation')->get('test'));
@@ -55,7 +55,7 @@ public function testDefaultConfigLanguage() {
   /**
    * Tests creating translations of shipped configuration.
    */
-  public function testCreateActiveTranslation() {
+  public function testCreateActiveTranslation(): void {
     $config_name = 'locale_test.no_translation';
     $this->saveLanguageActive($config_name, 'test', 'Test (Hungarian)', 'hu');
     $this->assertTranslation($config_name, 'Test (Hungarian)', 'hu');
@@ -64,7 +64,7 @@ public function testCreateActiveTranslation() {
   /**
    * Tests importing community translations of shipped configuration.
    */
-  public function testLocaleCreateActiveTranslation() {
+  public function testLocaleCreateActiveTranslation(): void {
     $config_name = 'locale_test.no_translation';
     $this->saveLocaleTranslationData($config_name, 'test', 'Test', 'Test (Hungarian)', 'hu', TRUE);
     $this->assertTranslation($config_name, 'Test (Hungarian)', 'hu', FALSE);
@@ -73,7 +73,7 @@ public function testLocaleCreateActiveTranslation() {
   /**
    * Tests updating translations of shipped configuration.
    */
-  public function testUpdateActiveTranslation() {
+  public function testUpdateActiveTranslation(): void {
     $config_name = 'locale_test.translation';
     $this->saveLanguageActive($config_name, 'test', 'Updated Hungarian test', 'hu');
     $this->assertTranslation($config_name, 'Updated Hungarian test', 'hu');
@@ -82,7 +82,7 @@ public function testUpdateActiveTranslation() {
   /**
    * Tests updating community translations of shipped configuration.
    */
-  public function testLocaleUpdateActiveTranslation() {
+  public function testLocaleUpdateActiveTranslation(): void {
     $config_name = 'locale_test.translation';
     $this->saveLocaleTranslationData($config_name, 'test', 'English test', 'Updated Hungarian test', 'hu', TRUE);
     $this->assertTranslation($config_name, 'Updated Hungarian test', 'hu', FALSE);
@@ -91,7 +91,7 @@ public function testLocaleUpdateActiveTranslation() {
   /**
    * Tests deleting a translation override.
    */
-  public function testDeleteTranslation() {
+  public function testDeleteTranslation(): void {
     $config_name = 'locale_test.translation';
     $this->deleteLanguageOverride($config_name, 'test', 'English test', 'de');
     // The German translation in this case will be forced to the Hungarian
@@ -102,7 +102,7 @@ public function testDeleteTranslation() {
   /**
    * Tests deleting translations of shipped configuration.
    */
-  public function testDeleteActiveTranslation() {
+  public function testDeleteActiveTranslation(): void {
     $config_name = 'locale_test.translation';
     $this->configFactory->getEditable($config_name)->delete();
     // Deleting active configuration should not change the locale translation.
@@ -112,7 +112,7 @@ public function testDeleteActiveTranslation() {
   /**
    * Tests deleting community translations of shipped configuration.
    */
-  public function testLocaleDeleteActiveTranslation() {
+  public function testLocaleDeleteActiveTranslation(): void {
     $config_name = 'locale_test.translation';
     $this->deleteLocaleTranslationData($config_name, 'test', 'English test', 'hu');
     // Deleting the locale translation should not change active config.
@@ -122,7 +122,7 @@ public function testLocaleDeleteActiveTranslation() {
   /**
    * Tests that adding English creates a translation override.
    */
-  public function testEnglish() {
+  public function testEnglish(): void {
     $config_name = 'locale_test.translation';
     ConfigurableLanguage::createFromLangcode('en')->save();
     // Adding a language on the UI would normally call updateConfigTranslations.
diff --git a/core/modules/locale/tests/src/Kernel/LocaleConfigSubscriberTest.php b/core/modules/locale/tests/src/Kernel/LocaleConfigSubscriberTest.php
index 844e353175c2..e0dd50c9396b 100644
--- a/core/modules/locale/tests/src/Kernel/LocaleConfigSubscriberTest.php
+++ b/core/modules/locale/tests/src/Kernel/LocaleConfigSubscriberTest.php
@@ -107,7 +107,7 @@ protected function setUpLocale() {
   /**
    * Tests creating translations of shipped configuration.
    */
-  public function testCreateTranslation() {
+  public function testCreateTranslation(): void {
     $config_name = 'locale_test.no_translation';
 
     $this->saveLanguageOverride($config_name, 'test', 'Test (German)', 'de');
@@ -117,7 +117,7 @@ public function testCreateTranslation() {
   /**
    * Tests creating translations configuration with multi value settings.
    */
-  public function testCreateTranslationMultiValue() {
+  public function testCreateTranslationMultiValue(): void {
     $config_name = 'locale_test.translation_multiple';
 
     $this->saveLanguageOverride($config_name, 'test_multiple', ['string' => 'String (German)', 'another_string' => 'Another string (German)'], 'de');
@@ -134,7 +134,7 @@ public function testCreateTranslationMultiValue() {
   /**
    * Tests importing community translations of shipped configuration.
    */
-  public function testLocaleCreateTranslation() {
+  public function testLocaleCreateTranslation(): void {
     $config_name = 'locale_test.no_translation';
 
     $this->saveLocaleTranslationData($config_name, 'test', 'Test', 'Test (German)', 'de');
@@ -144,7 +144,7 @@ public function testLocaleCreateTranslation() {
   /**
    * Tests updating translations of shipped configuration.
    */
-  public function testUpdateTranslation() {
+  public function testUpdateTranslation(): void {
     $config_name = 'locale_test.translation';
 
     $this->saveLanguageOverride($config_name, 'test', 'Updated German test', 'de');
@@ -154,7 +154,7 @@ public function testUpdateTranslation() {
   /**
    * Tests updating community translations of shipped configuration.
    */
-  public function testLocaleUpdateTranslation() {
+  public function testLocaleUpdateTranslation(): void {
     $config_name = 'locale_test.translation';
 
     $this->saveLocaleTranslationData($config_name, 'test', 'English test', 'Updated German test', 'de');
@@ -164,7 +164,7 @@ public function testLocaleUpdateTranslation() {
   /**
    * Tests deleting translations of shipped configuration.
    */
-  public function testDeleteTranslation() {
+  public function testDeleteTranslation(): void {
     $config_name = 'locale_test.translation';
 
     $this->deleteLanguageOverride($config_name, 'test', 'English test', 'de');
@@ -177,7 +177,7 @@ public function testDeleteTranslation() {
   /**
    * Tests deleting community translations of shipped configuration.
    */
-  public function testLocaleDeleteTranslation() {
+  public function testLocaleDeleteTranslation(): void {
     $config_name = 'locale_test.translation';
 
     $this->deleteLocaleTranslationData($config_name, 'test', 'English test', 'de');
diff --git a/core/modules/locale/tests/src/Kernel/LocaleConfigurableLanguageManagerTest.php b/core/modules/locale/tests/src/Kernel/LocaleConfigurableLanguageManagerTest.php
index 584bd5b4eeae..49c598596f6d 100644
--- a/core/modules/locale/tests/src/Kernel/LocaleConfigurableLanguageManagerTest.php
+++ b/core/modules/locale/tests/src/Kernel/LocaleConfigurableLanguageManagerTest.php
@@ -22,7 +22,7 @@ class LocaleConfigurableLanguageManagerTest extends KernelTestBase {
    */
   protected static $modules = ['language', 'locale'];
 
-  public function testGetLanguages() {
+  public function testGetLanguages(): void {
     $this->installSchema('locale', ['locales_source', 'locales_target', 'locales_location']);
     $default_language = ConfigurableLanguage::create(['label' => $this->randomMachineName(), 'id' => 'default', 'weight' => 0]);
     $default_language->save();
diff --git a/core/modules/locale/tests/src/Kernel/LocaleStringIsSafeTest.php b/core/modules/locale/tests/src/Kernel/LocaleStringIsSafeTest.php
index 731c4986abc7..7bf7e1767b97 100644
--- a/core/modules/locale/tests/src/Kernel/LocaleStringIsSafeTest.php
+++ b/core/modules/locale/tests/src/Kernel/LocaleStringIsSafeTest.php
@@ -23,7 +23,7 @@ class LocaleStringIsSafeTest extends KernelTestBase {
   /**
    * Tests for locale_string_is_safe().
    */
-  public function testLocaleStringIsSafe() {
+  public function testLocaleStringIsSafe(): void {
     // Check a translatable string without HTML.
     $string = 'Hello world!';
     $result = locale_string_is_safe($string);
@@ -52,7 +52,7 @@ public function testLocaleStringIsSafe() {
    * In each assert* call we add a new line at the expected result to match the
    * newline at the end of the template file.
    */
-  public function testLocalizedTokenizedString() {
+  public function testLocalizedTokenizedString(): void {
     $tests_to_do = [
       1 => [
         'original' => 'Go to the <a href="[locale_test:security_test1]">frontpage</a>',
diff --git a/core/modules/locale/tests/src/Kernel/LocaleStringTest.php b/core/modules/locale/tests/src/Kernel/LocaleStringTest.php
index 5feb8854561e..0c26efa016ef 100644
--- a/core/modules/locale/tests/src/Kernel/LocaleStringTest.php
+++ b/core/modules/locale/tests/src/Kernel/LocaleStringTest.php
@@ -52,7 +52,7 @@ protected function setUp(): void {
   /**
    * Tests CRUD API.
    */
-  public function testStringCrudApi() {
+  public function testStringCrudApi(): void {
     // Create source string.
     $source = $this->buildSourceString()->save();
     $this->assertNotEmpty($source->lid);
@@ -123,7 +123,7 @@ public function testStringCrudApi() {
   /**
    * Tests Search API loading multiple objects.
    */
-  public function testStringSearchApi() {
+  public function testStringSearchApi(): void {
     $language_count = 3;
     // Strings 1 and 2 will have some common prefix.
     // Source 1 will have all translations, not customized.
diff --git a/core/modules/locale/tests/src/Kernel/LocaleTranslationProjectsTest.php b/core/modules/locale/tests/src/Kernel/LocaleTranslationProjectsTest.php
index b48a9407f91a..a63aadd57341 100644
--- a/core/modules/locale/tests/src/Kernel/LocaleTranslationProjectsTest.php
+++ b/core/modules/locale/tests/src/Kernel/LocaleTranslationProjectsTest.php
@@ -46,7 +46,7 @@ protected function setUp(): void {
   /**
    * Tests locale_translation_clear_cache_projects().
    */
-  public function testLocaleTranslationClearCacheProjects() {
+  public function testLocaleTranslationClearCacheProjects(): void {
     $this->moduleHandler->loadInclude('locale', 'inc', 'locale.translation');
 
     $expected = [];
diff --git a/core/modules/locale/tests/src/Kernel/LocaleTranslationTest.php b/core/modules/locale/tests/src/Kernel/LocaleTranslationTest.php
index b716b58e7c77..316384330f8b 100644
--- a/core/modules/locale/tests/src/Kernel/LocaleTranslationTest.php
+++ b/core/modules/locale/tests/src/Kernel/LocaleTranslationTest.php
@@ -23,7 +23,7 @@ class LocaleTranslationTest extends KernelTestBase {
   /**
    * Tests that \Drupal\locale\LocaleTranslation is serializable.
    */
-  public function testSerializable() {
+  public function testSerializable(): void {
     $translation = $this->container->get('string_translator.locale.lookup');
     $this->assertInstanceOf(LocaleTranslation::class, $translation);
 
diff --git a/core/modules/locale/tests/src/Kernel/LocaleUpdateTest.php b/core/modules/locale/tests/src/Kernel/LocaleUpdateTest.php
index b8e643159c64..3c04dc0f8eef 100644
--- a/core/modules/locale/tests/src/Kernel/LocaleUpdateTest.php
+++ b/core/modules/locale/tests/src/Kernel/LocaleUpdateTest.php
@@ -25,7 +25,7 @@ class LocaleUpdateTest extends KernelTestBase {
   /**
    * Checks if a list of translatable projects gets build.
    */
-  public function testUpdateProjects() {
+  public function testUpdateProjects(): void {
     $this->container->get('module_handler')->loadInclude('locale', 'compare.inc');
 
     // Make the test modules look like a normal custom module. I.e. make the
diff --git a/core/modules/locale/tests/src/Kernel/Migrate/MigrateLocaleConfigsTest.php b/core/modules/locale/tests/src/Kernel/Migrate/MigrateLocaleConfigsTest.php
index 411da9032b7f..c5d74904dbe0 100644
--- a/core/modules/locale/tests/src/Kernel/Migrate/MigrateLocaleConfigsTest.php
+++ b/core/modules/locale/tests/src/Kernel/Migrate/MigrateLocaleConfigsTest.php
@@ -32,7 +32,7 @@ protected function setUp(): void {
   /**
    * Tests migration of locale variables to locale.settings.yml.
    */
-  public function testLocaleSettings() {
+  public function testLocaleSettings(): void {
     $config = $this->config('locale.settings');
     $this->assertTrue($config->get('cache_strings'));
     $this->assertSame('languages', $config->get('javascript.directory'));
diff --git a/core/modules/locale/tests/src/Unit/LocaleLookupTest.php b/core/modules/locale/tests/src/Unit/LocaleLookupTest.php
index 9095f3664ea6..6e10c231b903 100644
--- a/core/modules/locale/tests/src/Unit/LocaleLookupTest.php
+++ b/core/modules/locale/tests/src/Unit/LocaleLookupTest.php
@@ -98,7 +98,7 @@ protected function setUp(): void {
    *
    * @covers ::resolveCacheMiss
    */
-  public function testResolveCacheMissWithoutFallback() {
+  public function testResolveCacheMissWithoutFallback(): void {
     $args = [
       'language' => 'en',
       'source' => 'test',
@@ -136,7 +136,7 @@ public function testResolveCacheMissWithoutFallback() {
    *
    * @dataProvider resolveCacheMissWithFallbackProvider
    */
-  public function testResolveCacheMissWithFallback($langcode, $string, $context, $expected) {
+  public function testResolveCacheMissWithFallback($langcode, $string, $context, $expected): void {
     // These are fake words!
     // cSpell:disable
     $translations = [
@@ -219,7 +219,7 @@ public static function resolveCacheMissWithFallbackProvider() {
    *
    * @covers ::resolveCacheMiss
    */
-  public function testResolveCacheMissWithPersist() {
+  public function testResolveCacheMissWithPersist(): void {
     $args = [
       'language' => 'en',
       'source' => 'test',
@@ -251,7 +251,7 @@ public function testResolveCacheMissWithPersist() {
    *
    * @covers ::resolveCacheMiss
    */
-  public function testResolveCacheMissNoTranslation() {
+  public function testResolveCacheMissNoTranslation(): void {
     $string = $this->createMock('Drupal\locale\StringInterface');
     $string->expects($this->once())
       ->method('addLocation')
@@ -291,7 +291,7 @@ public function testResolveCacheMissNoTranslation() {
    * @covers ::resolveCacheMiss
    * @dataProvider providerFixOldPluralTranslationProvider
    */
-  public function testFixOldPluralStyleTranslations($translations, $langcode, $string, $is_fix) {
+  public function testFixOldPluralStyleTranslations($translations, $langcode, $string, $is_fix): void {
     $this->storage->expects($this->any())
       ->method('findTranslation')
       ->willReturnCallback(function ($argument) use ($translations) {
@@ -349,7 +349,7 @@ public static function providerFixOldPluralTranslationProvider() {
    *
    * @dataProvider getCidProvider
    */
-  public function testGetCid(array $roles, $expected) {
+  public function testGetCid(array $roles, $expected): void {
     $this->user = $this->createMock('Drupal\Core\Session\AccountInterface');
     $this->user->expects($this->any())
       ->method('getRoles')
diff --git a/core/modules/locale/tests/src/Unit/LocaleTranslationTest.php b/core/modules/locale/tests/src/Unit/LocaleTranslationTest.php
index d146fceb6384..a890b81106c4 100644
--- a/core/modules/locale/tests/src/Unit/LocaleTranslationTest.php
+++ b/core/modules/locale/tests/src/Unit/LocaleTranslationTest.php
@@ -67,7 +67,7 @@ protected function setUp(): void {
   /**
    * Tests for \Drupal\locale\LocaleTranslation::destruct().
    */
-  public function testDestruct() {
+  public function testDestruct(): void {
     $translation = new LocaleTranslation($this->storage, $this->cache, $this->lock, $this->getConfigFactoryStub(), $this->languageManager, $this->requestStack);
     // Prove that destruction works without errors when translations are empty.
     $this->assertNull($translation->destruct());
diff --git a/core/modules/locale/tests/src/Unit/Menu/LocaleLocalTasksTest.php b/core/modules/locale/tests/src/Unit/Menu/LocaleLocalTasksTest.php
index f56b021476bf..34c29ed504e8 100644
--- a/core/modules/locale/tests/src/Unit/Menu/LocaleLocalTasksTest.php
+++ b/core/modules/locale/tests/src/Unit/Menu/LocaleLocalTasksTest.php
@@ -28,7 +28,7 @@ protected function setUp(): void {
    *
    * @dataProvider getLocalePageRoutes
    */
-  public function testLocalePageLocalTasks($route) {
+  public function testLocalePageLocalTasks($route): void {
     $tasks = [
       0 => ['locale.translate_page', 'locale.translate_import', 'locale.translate_export', 'locale.settings'],
     ];
diff --git a/core/modules/locale/tests/src/Unit/StringBaseTest.php b/core/modules/locale/tests/src/Unit/StringBaseTest.php
index e05a069a5b15..42598a6189ff 100644
--- a/core/modules/locale/tests/src/Unit/StringBaseTest.php
+++ b/core/modules/locale/tests/src/Unit/StringBaseTest.php
@@ -17,7 +17,7 @@ class StringBaseTest extends UnitTestCase {
   /**
    * @covers ::save
    */
-  public function testSaveWithoutStorage() {
+  public function testSaveWithoutStorage(): void {
     $string = new SourceString(['source' => 'test']);
     $this->expectException(StringStorageException::class);
     $this->expectExceptionMessage('The string cannot be saved because its not bound to a storage: test');
@@ -27,7 +27,7 @@ public function testSaveWithoutStorage() {
   /**
    * @covers ::delete
    */
-  public function testDeleteWithoutStorage() {
+  public function testDeleteWithoutStorage(): void {
     $string = new SourceString(['lid' => 1, 'source' => 'test']);
     $this->expectException(StringStorageException::class);
     $this->expectExceptionMessage('The string cannot be deleted because its not bound to a storage: test');
diff --git a/core/modules/media/tests/src/Functional/FieldFormatter/MediaThumbnailFormatterTest.php b/core/modules/media/tests/src/Functional/FieldFormatter/MediaThumbnailFormatterTest.php
index 6fcebc7422f0..435dc275da77 100644
--- a/core/modules/media/tests/src/Functional/FieldFormatter/MediaThumbnailFormatterTest.php
+++ b/core/modules/media/tests/src/Functional/FieldFormatter/MediaThumbnailFormatterTest.php
@@ -28,7 +28,7 @@ class MediaThumbnailFormatterTest extends MediaFunctionalTestBase {
   /**
    * Tests the media thumbnail field formatter.
    */
-  public function testRender() {
+  public function testRender(): void {
     $this->drupalLogin($this->adminUser);
 
     /** @var \Drupal\node\NodeStorage $node_storage */
diff --git a/core/modules/media/tests/src/Functional/FieldFormatter/OEmbedFormatterTest.php b/core/modules/media/tests/src/Functional/FieldFormatter/OEmbedFormatterTest.php
index c5426291dabf..88c2cbf8e01d 100644
--- a/core/modules/media/tests/src/Functional/FieldFormatter/OEmbedFormatterTest.php
+++ b/core/modules/media/tests/src/Functional/FieldFormatter/OEmbedFormatterTest.php
@@ -160,7 +160,7 @@ public static function providerRender() {
   /**
    * Tests that oEmbed media types' display can be configured correctly.
    */
-  public function testDisplayConfiguration() {
+  public function testDisplayConfiguration(): void {
     $account = $this->drupalCreateUser(['administer media display']);
     $this->drupalLogin($account);
 
@@ -192,7 +192,7 @@ public function testDisplayConfiguration() {
    *
    * @dataProvider providerRender
    */
-  public function testRender($url, $resource_url, array $formatter_settings, array $selectors, bool $self_closing) {
+  public function testRender($url, $resource_url, array $formatter_settings, array $selectors, bool $self_closing): void {
     $account = $this->drupalCreateUser(['view media']);
     $this->drupalLogin($account);
 
diff --git a/core/modules/media/tests/src/Functional/FieldWidget/OEmbedFieldWidgetTest.php b/core/modules/media/tests/src/Functional/FieldWidget/OEmbedFieldWidgetTest.php
index 417c4652ffdf..7b624617d36c 100644
--- a/core/modules/media/tests/src/Functional/FieldWidget/OEmbedFieldWidgetTest.php
+++ b/core/modules/media/tests/src/Functional/FieldWidget/OEmbedFieldWidgetTest.php
@@ -22,7 +22,7 @@ class OEmbedFieldWidgetTest extends MediaFunctionalTestBase {
   /**
    * Tests that the oEmbed field widget shows the configured help text.
    */
-  public function testFieldWidgetHelpText() {
+  public function testFieldWidgetHelpText(): void {
     $account = $this->drupalCreateUser(['create media']);
     $this->drupalLogin($account);
 
diff --git a/core/modules/media/tests/src/Functional/MediaAccessTest.php b/core/modules/media/tests/src/Functional/MediaAccessTest.php
index 4410a70a6278..36a07513a8d1 100644
--- a/core/modules/media/tests/src/Functional/MediaAccessTest.php
+++ b/core/modules/media/tests/src/Functional/MediaAccessTest.php
@@ -46,7 +46,7 @@ protected function setUp(): void {
   /**
    * Tests some access control functionality.
    */
-  public function testMediaAccess() {
+  public function testMediaAccess(): void {
     $assert_session = $this->assertSession();
     $media_type = $this->createMediaType('test');
 
@@ -238,7 +238,7 @@ public function testMediaAccess() {
   /**
    * Tests view access control on the canonical page.
    */
-  public function testCanonicalMediaAccess() {
+  public function testCanonicalMediaAccess(): void {
     $media_type = $this->createMediaType('test');
     $assert_session = $this->assertSession();
 
@@ -282,7 +282,7 @@ public function testCanonicalMediaAccess() {
   /**
    * Tests unpublished media access.
    */
-  public function testUnpublishedMediaUserAccess() {
+  public function testUnpublishedMediaUserAccess(): void {
     \Drupal::configFactory()
       ->getEditable('media.settings')
       ->set('standalone_url', TRUE)
@@ -324,7 +324,7 @@ public function testUnpublishedMediaUserAccess() {
   /**
    * Tests media access of anonymous user.
    */
-  public function testMediaAnonymousUserAccess() {
+  public function testMediaAnonymousUserAccess(): void {
     \Drupal::configFactory()
       ->getEditable('media.settings')
       ->set('standalone_url', TRUE)
@@ -363,7 +363,7 @@ public function testMediaAnonymousUserAccess() {
   /**
    * Tests access for embedded medias.
    */
-  public function testReferencedRendering() {
+  public function testReferencedRendering(): void {
     \Drupal::configFactory()
       ->getEditable('media.settings')
       ->set('standalone_url', TRUE)
diff --git a/core/modules/media/tests/src/Functional/MediaBulkFormTest.php b/core/modules/media/tests/src/Functional/MediaBulkFormTest.php
index 3b2c9193ab8e..85c1d59eb15d 100644
--- a/core/modules/media/tests/src/Functional/MediaBulkFormTest.php
+++ b/core/modules/media/tests/src/Functional/MediaBulkFormTest.php
@@ -62,7 +62,7 @@ protected function setUp(): void {
   /**
    * Tests the media bulk form.
    */
-  public function testBulkForm() {
+  public function testBulkForm(): void {
     $session = $this->getSession();
     $page = $session->getPage();
     $assert_session = $this->assertSession();
diff --git a/core/modules/media/tests/src/Functional/MediaContextualLinksTest.php b/core/modules/media/tests/src/Functional/MediaContextualLinksTest.php
index a556126c05c2..c9325a9fe69b 100644
--- a/core/modules/media/tests/src/Functional/MediaContextualLinksTest.php
+++ b/core/modules/media/tests/src/Functional/MediaContextualLinksTest.php
@@ -28,7 +28,7 @@ class MediaContextualLinksTest extends MediaFunctionalTestBase {
   /**
    * Tests contextual links.
    */
-  public function testMediaContextualLinks() {
+  public function testMediaContextualLinks(): void {
     \Drupal::configFactory()
       ->getEditable('media.settings')
       ->set('standalone_url', TRUE)
diff --git a/core/modules/media/tests/src/Functional/MediaInstallTest.php b/core/modules/media/tests/src/Functional/MediaInstallTest.php
index 9af1cf25bf85..af2736c13b62 100644
--- a/core/modules/media/tests/src/Functional/MediaInstallTest.php
+++ b/core/modules/media/tests/src/Functional/MediaInstallTest.php
@@ -34,7 +34,7 @@ protected function setUp(): void {
   /**
    * Tests reinstalling after being uninstalled.
    */
-  public function testReinstallAfterUninstall() {
+  public function testReinstallAfterUninstall(): void {
     $page = $this->getSession()->getPage();
     $assert_session = $this->assertSession();
 
diff --git a/core/modules/media/tests/src/Functional/MediaOverviewPageTest.php b/core/modules/media/tests/src/Functional/MediaOverviewPageTest.php
index 7d1f63e38c1f..9328ef04c267 100644
--- a/core/modules/media/tests/src/Functional/MediaOverviewPageTest.php
+++ b/core/modules/media/tests/src/Functional/MediaOverviewPageTest.php
@@ -39,7 +39,7 @@ protected function setUp(): void {
   /**
    * Tests that the Media overview page (/admin/content/media).
    */
-  public function testMediaOverviewPage() {
+  public function testMediaOverviewPage(): void {
     $assert_session = $this->assertSession();
 
     // Check the view exists, is access-restricted, and some defaults are there.
diff --git a/core/modules/media/tests/src/Functional/MediaRequirementsTest.php b/core/modules/media/tests/src/Functional/MediaRequirementsTest.php
index 26cf3c8b6f69..119c147ee95f 100644
--- a/core/modules/media/tests/src/Functional/MediaRequirementsTest.php
+++ b/core/modules/media/tests/src/Functional/MediaRequirementsTest.php
@@ -27,7 +27,7 @@ class MediaRequirementsTest extends MediaFunctionalTestBase {
   /**
    * Tests that the requirements check can handle a missing source field.
    */
-  public function testMissingSourceFieldDefinition() {
+  public function testMissingSourceFieldDefinition(): void {
     $media_type = $this->createMediaType('test');
     /** @var \Drupal\field\FieldConfigInterface $field_definition */
     $field_definition = $media_type->getSource()
diff --git a/core/modules/media/tests/src/Functional/MediaRevisionTest.php b/core/modules/media/tests/src/Functional/MediaRevisionTest.php
index 2125945a9253..0ba502c4406e 100644
--- a/core/modules/media/tests/src/Functional/MediaRevisionTest.php
+++ b/core/modules/media/tests/src/Functional/MediaRevisionTest.php
@@ -54,7 +54,7 @@ protected function createMedia(string $title): Media {
   /**
    * Checks media revision operations.
    */
-  public function testRevisions() {
+  public function testRevisions(): void {
     $assert = $this->assertSession();
 
     $media = $this->createMedia('Sample media');
@@ -105,7 +105,7 @@ public function testRevisions() {
   /**
    * Tests creating revisions of a File media item.
    */
-  public function testFileMediaRevision() {
+  public function testFileMediaRevision(): void {
     $assert = $this->assertSession();
 
     $uri = 'temporary://foo.txt';
@@ -147,7 +147,7 @@ public function testFileMediaRevision() {
   /**
    * Tests creating revisions of an Image media item.
    */
-  public function testImageMediaRevision() {
+  public function testImageMediaRevision(): void {
     $assert = $this->assertSession();
 
     $this->createMediaType('image', ['id' => 'image', 'new_revision' => TRUE]);
diff --git a/core/modules/media/tests/src/Functional/MediaSettingsTest.php b/core/modules/media/tests/src/Functional/MediaSettingsTest.php
index 9dd0eae02fa4..eacfd11ec213 100644
--- a/core/modules/media/tests/src/Functional/MediaSettingsTest.php
+++ b/core/modules/media/tests/src/Functional/MediaSettingsTest.php
@@ -32,7 +32,7 @@ protected function setUp(): void {
   /**
    * Tests that media warning appears if oEmbed media types exists.
    */
-  public function testStatusPage() {
+  public function testStatusPage(): void {
     $assert_session = $this->assertSession();
 
     $this->drupalGet('admin/reports/status');
diff --git a/core/modules/media/tests/src/Functional/MediaSourceFileTest.php b/core/modules/media/tests/src/Functional/MediaSourceFileTest.php
index 0fd7ee1619db..dc0d5ff1fd9e 100644
--- a/core/modules/media/tests/src/Functional/MediaSourceFileTest.php
+++ b/core/modules/media/tests/src/Functional/MediaSourceFileTest.php
@@ -21,7 +21,7 @@ class MediaSourceFileTest extends MediaFunctionalTestBase {
   /**
    * Tests that it's possible to change the allowed file extensions.
    */
-  public function testSourceFieldSettingsEditing() {
+  public function testSourceFieldSettingsEditing(): void {
     $session = $this->getSession();
     $page = $session->getPage();
     $assert_session = $this->assertSession();
@@ -49,7 +49,7 @@ public function testSourceFieldSettingsEditing() {
   /**
    * Ensure source field deletion is not possible.
    */
-  public function testPreventSourceFieldDeletion() {
+  public function testPreventSourceFieldDeletion(): void {
     $media_type = $this->createMediaType('file');
     $media_type_id = $media_type->id();
 
diff --git a/core/modules/media/tests/src/Functional/MediaSourceImageTest.php b/core/modules/media/tests/src/Functional/MediaSourceImageTest.php
index 9c42f342bb7b..6b03a3555ba5 100644
--- a/core/modules/media/tests/src/Functional/MediaSourceImageTest.php
+++ b/core/modules/media/tests/src/Functional/MediaSourceImageTest.php
@@ -26,7 +26,7 @@ class MediaSourceImageTest extends MediaFunctionalTestBase {
   /**
    * Test that non-main properties do not trigger source field value change.
    */
-  public function testOnlyMainPropertiesTriggerSourceFieldChanged() {
+  public function testOnlyMainPropertiesTriggerSourceFieldChanged(): void {
     $assert_session = $this->assertSession();
     $page = $this->getSession()->getPage();
 
diff --git a/core/modules/media/tests/src/Functional/MediaTemplateSuggestionsTest.php b/core/modules/media/tests/src/Functional/MediaTemplateSuggestionsTest.php
index 3bd0e15485f5..10a9bb03be92 100644
--- a/core/modules/media/tests/src/Functional/MediaTemplateSuggestionsTest.php
+++ b/core/modules/media/tests/src/Functional/MediaTemplateSuggestionsTest.php
@@ -28,7 +28,7 @@ class MediaTemplateSuggestionsTest extends MediaFunctionalTestBase {
   /**
    * Tests template suggestions from media_theme_suggestions_media().
    */
-  public function testMediaThemeHookSuggestions() {
+  public function testMediaThemeHookSuggestions(): void {
     $media_type = $this->createMediaType('test', [
       'queue_thumbnail_downloads' => FALSE,
     ]);
diff --git a/core/modules/media/tests/src/Functional/MediaTypeCreationTest.php b/core/modules/media/tests/src/Functional/MediaTypeCreationTest.php
index ed68216a57fe..647da9e993b8 100644
--- a/core/modules/media/tests/src/Functional/MediaTypeCreationTest.php
+++ b/core/modules/media/tests/src/Functional/MediaTypeCreationTest.php
@@ -31,7 +31,7 @@ class MediaTypeCreationTest extends MediaFunctionalTestBase {
    *
    * @dataProvider providerMediaTypeCreationForm
    */
-  public function testMediaTypeCreationForm($button_label, $address, $machine_name) {
+  public function testMediaTypeCreationForm($button_label, $address, $machine_name): void {
     $this->drupalGet('/admin/structure/media/add');
     $this->assertSession()->statusCodeEquals(200);
     $this->assertSession()->fieldExists('label')->setValue($this->randomString());
diff --git a/core/modules/media/tests/src/Functional/MediaUiFunctionalTest.php b/core/modules/media/tests/src/Functional/MediaUiFunctionalTest.php
index d308711405a2..c22f17616e09 100644
--- a/core/modules/media/tests/src/Functional/MediaUiFunctionalTest.php
+++ b/core/modules/media/tests/src/Functional/MediaUiFunctionalTest.php
@@ -44,7 +44,7 @@ protected function setUp(): void {
   /**
    * Tests the media actions (add/edit/delete).
    */
-  public function testMediaWithOnlyOneMediaType() {
+  public function testMediaWithOnlyOneMediaType(): void {
     $session = $this->getSession();
     $page = $session->getPage();
     $assert_session = $this->assertSession();
@@ -167,7 +167,7 @@ public function testMediaWithOnlyOneMediaType() {
    * Tests if the "media/add" page gives you a selecting option if there are
    * multiple media types available.
    */
-  public function testMediaWithMultipleMediaTypes() {
+  public function testMediaWithMultipleMediaTypes(): void {
     $assert_session = $this->assertSession();
 
     // Tests and creates the first media type.
@@ -190,7 +190,7 @@ public function testMediaWithMultipleMediaTypes() {
   /**
    * Tests that media in ER fields use the Rendered Entity formatter by default.
    */
-  public function testRenderedEntityReferencedMedia() {
+  public function testRenderedEntityReferencedMedia(): void {
     $assert_session = $this->assertSession();
 
     $this->drupalCreateContentType(['type' => 'page', 'name' => 'Page']);
@@ -203,7 +203,7 @@ public function testRenderedEntityReferencedMedia() {
   /**
    * Tests the redirect URL after creating a media item.
    */
-  public function testMediaCreateRedirect() {
+  public function testMediaCreateRedirect(): void {
     $session = $this->getSession();
     $page = $session->getPage();
     $assert_session = $this->assertSession();
@@ -247,7 +247,7 @@ public function testMediaCreateRedirect() {
   /**
    * Tests the media collection route.
    */
-  public function testMediaCollectionRoute() {
+  public function testMediaCollectionRoute(): void {
     /** @var \Drupal\Core\Entity\EntityStorageInterface $media_storage */
     $media_storage = $this->container->get('entity_type.manager')->getStorage('media');
 
diff --git a/core/modules/media/tests/src/Functional/MediaUiReferenceWidgetTest.php b/core/modules/media/tests/src/Functional/MediaUiReferenceWidgetTest.php
index 189049615cb7..d43f3c51b0c2 100644
--- a/core/modules/media/tests/src/Functional/MediaUiReferenceWidgetTest.php
+++ b/core/modules/media/tests/src/Functional/MediaUiReferenceWidgetTest.php
@@ -115,7 +115,7 @@ public static function providerTestMediaReferenceWidget() {
    *
    * @dataProvider providerTestMediaReferenceWidget
    */
-  public function testMediaReferenceWidget($cardinality, array $media_type_create_access, $list_access, $widget_id = 'entity_reference_autocomplete') {
+  public function testMediaReferenceWidget($cardinality, array $media_type_create_access, $list_access, $widget_id = 'entity_reference_autocomplete'): void {
     $assert_session = $this->assertSession();
 
     // Create two content types.
diff --git a/core/modules/media/tests/src/Functional/ProviderRepositoryTest.php b/core/modules/media/tests/src/Functional/ProviderRepositoryTest.php
index 1e7001bd75ca..0beacd89167a 100644
--- a/core/modules/media/tests/src/Functional/ProviderRepositoryTest.php
+++ b/core/modules/media/tests/src/Functional/ProviderRepositoryTest.php
@@ -32,7 +32,7 @@ class ProviderRepositoryTest extends MediaFunctionalTestBase {
    *
    * @dataProvider providerEmptyProviderList
    */
-  public function testEmptyProviderList($content) {
+  public function testEmptyProviderList($content): void {
     $response = $this->prophesize('\GuzzleHttp\Psr7\Response');
     $response->getBody()->willReturn(Utils::streamFor($content));
 
@@ -69,7 +69,7 @@ public static function providerEmptyProviderList() {
    *
    * @dataProvider providerNonExistingProviderDatabase
    */
-  public function testNonExistingProviderDatabase($providers_url, $exception_message) {
+  public function testNonExistingProviderDatabase($providers_url, $exception_message): void {
     $this->config('media.settings')
       ->set('oembed_providers_url', $providers_url)
       ->save();
diff --git a/core/modules/media/tests/src/Functional/ResourceFetcherTest.php b/core/modules/media/tests/src/Functional/ResourceFetcherTest.php
index 62632e2222f2..ec327a73ac73 100644
--- a/core/modules/media/tests/src/Functional/ResourceFetcherTest.php
+++ b/core/modules/media/tests/src/Functional/ResourceFetcherTest.php
@@ -68,7 +68,7 @@ public static function providerFetchResource() {
    *
    * @dataProvider providerFetchResource
    */
-  public function testFetchResource($resource_url, $provider_name, $title) {
+  public function testFetchResource($resource_url, $provider_name, $title): void {
     /** @var \Drupal\media\OEmbed\Resource $resource */
     $resource = $this->container->get('media.oembed.resource_fetcher')
       ->fetchResource($resource_url);
diff --git a/core/modules/media/tests/src/Functional/Rest/MediaResourceTestBase.php b/core/modules/media/tests/src/Functional/Rest/MediaResourceTestBase.php
index 619856bfad90..a0bab34bd445 100644
--- a/core/modules/media/tests/src/Functional/Rest/MediaResourceTestBase.php
+++ b/core/modules/media/tests/src/Functional/Rest/MediaResourceTestBase.php
@@ -312,7 +312,7 @@ protected function getExpectedUnauthorizedAccessMessage($method) {
   /**
    * {@inheritdoc}
    */
-  public function testPost() {
+  public function testPost(): void {
     $file_storage = $this->container->get('entity_type.manager')->getStorage('file');
 
     // Step 1: upload file, results in File entity marked temporary.
diff --git a/core/modules/media/tests/src/Functional/UrlResolverTest.php b/core/modules/media/tests/src/Functional/UrlResolverTest.php
index 201a73e8f922..8c849f9ce3ba 100644
--- a/core/modules/media/tests/src/Functional/UrlResolverTest.php
+++ b/core/modules/media/tests/src/Functional/UrlResolverTest.php
@@ -75,7 +75,7 @@ public static function providerEndpointMatching() {
    *
    * @dataProvider providerEndpointMatching
    */
-  public function testEndpointMatching($url, $resource_url) {
+  public function testEndpointMatching($url, $resource_url): void {
     $this->assertSame(
       $resource_url,
       $this->container->get('media.oembed.url_resolver')->getResourceUrl($url)
@@ -87,7 +87,7 @@ public function testEndpointMatching($url, $resource_url) {
    *
    * @depends testEndpointMatching
    */
-  public function testResourceUrlAlterHook() {
+  public function testResourceUrlAlterHook(): void {
     $this->container->get('module_installer')->install(['media_test_oembed']);
 
     $resource_url = $this->container->get('media.oembed.url_resolver')
@@ -130,7 +130,7 @@ public static function providerUrlDiscovery() {
    *
    * @dataProvider providerUrlDiscovery
    */
-  public function testUrlDiscovery($url, $resource_url) {
+  public function testUrlDiscovery($url, $resource_url): void {
     $this->assertSame(
       $this->container->get('media.oembed.url_resolver')->getResourceUrl($url),
       $resource_url
diff --git a/core/modules/media/tests/src/FunctionalJavascript/MediaDisplayTest.php b/core/modules/media/tests/src/FunctionalJavascript/MediaDisplayTest.php
index 60b50ac72e66..fdc8884e3fd1 100644
--- a/core/modules/media/tests/src/FunctionalJavascript/MediaDisplayTest.php
+++ b/core/modules/media/tests/src/FunctionalJavascript/MediaDisplayTest.php
@@ -50,7 +50,7 @@ protected function setUp(): void {
   /**
    * Tests basic media display.
    */
-  public function testMediaDisplay() {
+  public function testMediaDisplay(): void {
     $assert_session = $this->assertSession();
     $page = $this->getSession()->getPage();
 
diff --git a/core/modules/media/tests/src/FunctionalJavascript/MediaEmbedFilterConfigurationUiAddTest.php b/core/modules/media/tests/src/FunctionalJavascript/MediaEmbedFilterConfigurationUiAddTest.php
index 9f44ef781912..259f0831ed68 100644
--- a/core/modules/media/tests/src/FunctionalJavascript/MediaEmbedFilterConfigurationUiAddTest.php
+++ b/core/modules/media/tests/src/FunctionalJavascript/MediaEmbedFilterConfigurationUiAddTest.php
@@ -15,7 +15,7 @@ class MediaEmbedFilterConfigurationUiAddTest extends MediaEmbedFilterTestBase {
    * @covers ::media_form_filter_format_add_form_alter
    * @dataProvider providerTestValidations
    */
-  public function testValidationWhenAdding($filter_html_status, $filter_align_status, $filter_caption_status, $filter_html_image_secure_status, $media_embed, $allowed_html, $expected_error_message) {
+  public function testValidationWhenAdding($filter_html_status, $filter_align_status, $filter_caption_status, $filter_html_image_secure_status, $media_embed, $allowed_html, $expected_error_message): void {
     $this->drupalGet('admin/config/content/formats/add');
 
     // Enable the `filter_html` and `media_embed` filters.
diff --git a/core/modules/media/tests/src/FunctionalJavascript/MediaEmbedFilterConfigurationUiEditTest.php b/core/modules/media/tests/src/FunctionalJavascript/MediaEmbedFilterConfigurationUiEditTest.php
index 498bf7585527..0b798f855330 100644
--- a/core/modules/media/tests/src/FunctionalJavascript/MediaEmbedFilterConfigurationUiEditTest.php
+++ b/core/modules/media/tests/src/FunctionalJavascript/MediaEmbedFilterConfigurationUiEditTest.php
@@ -15,7 +15,7 @@ class MediaEmbedFilterConfigurationUiEditTest extends MediaEmbedFilterTestBase {
    * @covers ::media_form_filter_format_edit_form_alter
    * @dataProvider providerTestValidations
    */
-  public function testValidationWhenEditing($filter_html_status, $filter_align_status, $filter_caption_status, $filter_html_image_secure_status, $media_embed, $allowed_html, $expected_error_message) {
+  public function testValidationWhenEditing($filter_html_status, $filter_align_status, $filter_caption_status, $filter_html_image_secure_status, $media_embed, $allowed_html, $expected_error_message): void {
     $this->drupalGet('admin/config/content/formats/manage/media_embed_test');
 
     // Enable the `filter_html` and `media_embed` filters.
diff --git a/core/modules/media/tests/src/FunctionalJavascript/MediaReferenceFieldHelpTest.php b/core/modules/media/tests/src/FunctionalJavascript/MediaReferenceFieldHelpTest.php
index 4f1cf6d2bf5a..be1e173d6d28 100644
--- a/core/modules/media/tests/src/FunctionalJavascript/MediaReferenceFieldHelpTest.php
+++ b/core/modules/media/tests/src/FunctionalJavascript/MediaReferenceFieldHelpTest.php
@@ -29,7 +29,7 @@ class MediaReferenceFieldHelpTest extends MediaJavascriptTestBase {
    *
    * @see media_form_field_ui_field_storage_add_form_alter()
    */
-  public function testFieldCreationHelpText() {
+  public function testFieldCreationHelpText(): void {
     $assert_session = $this->assertSession();
     $page = $this->getSession()->getPage();
 
diff --git a/core/modules/media/tests/src/FunctionalJavascript/MediaSourceAudioVideoTest.php b/core/modules/media/tests/src/FunctionalJavascript/MediaSourceAudioVideoTest.php
index 05ff322ecb39..24c071a501ca 100644
--- a/core/modules/media/tests/src/FunctionalJavascript/MediaSourceAudioVideoTest.php
+++ b/core/modules/media/tests/src/FunctionalJavascript/MediaSourceAudioVideoTest.php
@@ -24,7 +24,7 @@ class MediaSourceAudioVideoTest extends MediaSourceTestBase {
   /**
    * Check the Audio source functionality.
    */
-  public function testAudioTypeCreation() {
+  public function testAudioTypeCreation(): void {
     $assert_session = $this->assertSession();
     $page = $this->getSession()->getPage();
 
@@ -73,7 +73,7 @@ public function testAudioTypeCreation() {
   /**
    * Check the Video source functionality.
    */
-  public function testVideoTypeCreation() {
+  public function testVideoTypeCreation(): void {
     $assert_session = $this->assertSession();
     $page = $this->getSession()->getPage();
 
diff --git a/core/modules/media/tests/src/FunctionalJavascript/MediaSourceFileTest.php b/core/modules/media/tests/src/FunctionalJavascript/MediaSourceFileTest.php
index c0662b5a2b2f..d2733594e3f8 100644
--- a/core/modules/media/tests/src/FunctionalJavascript/MediaSourceFileTest.php
+++ b/core/modules/media/tests/src/FunctionalJavascript/MediaSourceFileTest.php
@@ -22,7 +22,7 @@ class MediaSourceFileTest extends MediaSourceTestBase {
   /**
    * Tests the file media source.
    */
-  public function testMediaFileSource() {
+  public function testMediaFileSource(): void {
     // Skipped due to frequent random test failures.
     $this->markTestSkipped();
     $media_type_id = 'test_media_file_type';
diff --git a/core/modules/media/tests/src/FunctionalJavascript/MediaSourceImageTest.php b/core/modules/media/tests/src/FunctionalJavascript/MediaSourceImageTest.php
index 0707eebad23b..caeaf909fff9 100644
--- a/core/modules/media/tests/src/FunctionalJavascript/MediaSourceImageTest.php
+++ b/core/modules/media/tests/src/FunctionalJavascript/MediaSourceImageTest.php
@@ -28,7 +28,7 @@ class MediaSourceImageTest extends MediaSourceTestBase {
   /**
    * Tests the image media source.
    */
-  public function testMediaImageSource() {
+  public function testMediaImageSource(): void {
     $media_type_id = 'test_media_image_type';
     $source_field_id = 'field_media_image';
     $provided_fields = [
diff --git a/core/modules/media/tests/src/FunctionalJavascript/MediaSourceOEmbedVideoTest.php b/core/modules/media/tests/src/FunctionalJavascript/MediaSourceOEmbedVideoTest.php
index 5f7d268fb05c..2397324680c5 100644
--- a/core/modules/media/tests/src/FunctionalJavascript/MediaSourceOEmbedVideoTest.php
+++ b/core/modules/media/tests/src/FunctionalJavascript/MediaSourceOEmbedVideoTest.php
@@ -58,7 +58,7 @@ protected function initConfig(ContainerInterface $container) {
   /**
    * Tests the oembed media source.
    */
-  public function testMediaOEmbedVideoSource() {
+  public function testMediaOEmbedVideoSource(): void {
     $media_type_id = 'test_media_oembed_type';
     $provided_fields = [
       'type',
@@ -238,7 +238,7 @@ public function testMediaOEmbedVideoSource() {
   /**
    * Tests that a security warning appears if iFrame domain is not set.
    */
-  public function testOEmbedSecurityWarning() {
+  public function testOEmbedSecurityWarning(): void {
     $media_type_id = 'test_media_oembed_type';
     $source_id = 'oembed:video';
 
diff --git a/core/modules/media/tests/src/FunctionalJavascript/MediaStandardProfileTest.php b/core/modules/media/tests/src/FunctionalJavascript/MediaStandardProfileTest.php
index 5fedf7ff3f6a..2038495a8f4c 100644
--- a/core/modules/media/tests/src/FunctionalJavascript/MediaStandardProfileTest.php
+++ b/core/modules/media/tests/src/FunctionalJavascript/MediaStandardProfileTest.php
@@ -48,7 +48,7 @@ protected function setUp(): void {
    * This prevents installing the standard profile for every test case and
    * increases the performance of this test.
    */
-  public function testMediaSources() {
+  public function testMediaSources(): void {
     // This test currently frequently causes the SQLite database to lock, so
     // skip the test on SQLite until the issue can be resolved.
     // @todo https://www.drupal.org/project/drupal/issues/3273626
diff --git a/core/modules/media/tests/src/FunctionalJavascript/MediaTypeCreationTest.php b/core/modules/media/tests/src/FunctionalJavascript/MediaTypeCreationTest.php
index 29495c9b3675..699d97e9a181 100644
--- a/core/modules/media/tests/src/FunctionalJavascript/MediaTypeCreationTest.php
+++ b/core/modules/media/tests/src/FunctionalJavascript/MediaTypeCreationTest.php
@@ -23,7 +23,7 @@ class MediaTypeCreationTest extends MediaJavascriptTestBase {
   /**
    * Tests the source field behavior on the add media type form.
    */
-  public function testSourceChangeOnMediaTypeCreationForm() {
+  public function testSourceChangeOnMediaTypeCreationForm(): void {
     $session = $this->getSession();
     $page = $session->getPage();
     $assert_session = $this->assertSession();
@@ -62,7 +62,7 @@ public function testSourceChangeOnMediaTypeCreationForm() {
   /**
    * Tests the media type creation form.
    */
-  public function testMediaTypeCreationFormWithDefaultField() {
+  public function testMediaTypeCreationFormWithDefaultField(): void {
     $session = $this->getSession();
     $page = $session->getPage();
     $assert_session = $this->assertSession();
@@ -149,7 +149,7 @@ public function testMediaTypeCreationFormWithDefaultField() {
   /**
    * Tests creation of media type, reusing an existing source field.
    */
-  public function testMediaTypeCreationReuseSourceField() {
+  public function testMediaTypeCreationReuseSourceField(): void {
     $session = $this->getSession();
     $page = $session->getPage();
     $assert_session = $this->assertSession();
diff --git a/core/modules/media/tests/src/FunctionalJavascript/MediaUiJavascriptTest.php b/core/modules/media/tests/src/FunctionalJavascript/MediaUiJavascriptTest.php
index 6b98436161fd..2fe4586bd57a 100644
--- a/core/modules/media/tests/src/FunctionalJavascript/MediaUiJavascriptTest.php
+++ b/core/modules/media/tests/src/FunctionalJavascript/MediaUiJavascriptTest.php
@@ -50,7 +50,7 @@ protected function setUp(): void {
   /**
    * Tests a media type administration.
    */
-  public function testMediaTypes() {
+  public function testMediaTypes(): void {
     $session = $this->getSession();
     $page = $session->getPage();
     $assert_session = $this->assertSession();
diff --git a/core/modules/media/tests/src/FunctionalJavascript/MediaViewsWizardTest.php b/core/modules/media/tests/src/FunctionalJavascript/MediaViewsWizardTest.php
index 1bdad51ef1ba..1654f5879b2d 100644
--- a/core/modules/media/tests/src/FunctionalJavascript/MediaViewsWizardTest.php
+++ b/core/modules/media/tests/src/FunctionalJavascript/MediaViewsWizardTest.php
@@ -24,7 +24,7 @@ class MediaViewsWizardTest extends MediaJavascriptTestBase {
   /**
    * Tests adding a view of media.
    */
-  public function testMediaWizard() {
+  public function testMediaWizard(): void {
     $session = $this->getSession();
     $page = $session->getPage();
     $assert_session = $this->assertSession();
@@ -60,7 +60,7 @@ public function testMediaWizard() {
   /**
    * Tests adding a view of media revisions.
    */
-  public function testMediaRevisionWizard() {
+  public function testMediaRevisionWizard(): void {
     $session = $this->getSession();
     $page = $session->getPage();
     $assert_session = $this->assertSession();
diff --git a/core/modules/media/tests/src/Kernel/MediaAccessControlHandlerTest.php b/core/modules/media/tests/src/Kernel/MediaAccessControlHandlerTest.php
index 09522ba1bd3c..f4b7ec987a51 100644
--- a/core/modules/media/tests/src/Kernel/MediaAccessControlHandlerTest.php
+++ b/core/modules/media/tests/src/Kernel/MediaAccessControlHandlerTest.php
@@ -42,7 +42,7 @@ class MediaAccessControlHandlerTest extends MediaKernelTestBase {
    * @covers ::checkAccess
    * @dataProvider providerAccess
    */
-  public function testAccess(array $permissions, array $entity_values, string $operation, AccessResultInterface $expected_result, array $expected_cache_contexts, array $expected_cache_tags, bool $is_latest_revision) {
+  public function testAccess(array $permissions, array $entity_values, string $operation, AccessResultInterface $expected_result, array $expected_cache_contexts, array $expected_cache_tags, bool $is_latest_revision): void {
     /** @var \Drupal\Core\Entity\RevisionableStorageInterface $entityStorage $entity_storage */
     $entity_storage = $this->container->get('entity_type.manager')->getStorage('media');
 
@@ -91,7 +91,7 @@ public function testAccess(array $permissions, array $entity_values, string $ope
    * @covers ::checkCreateAccess
    * @dataProvider providerCreateAccess
    */
-  public function testCreateAccess(array $permissions, AccessResultInterface $expected_result, array $expected_cache_contexts, array $expected_cache_tags) {
+  public function testCreateAccess(array $permissions, AccessResultInterface $expected_result, array $expected_cache_contexts, array $expected_cache_tags): void {
     $user = $this->createUser($permissions);
 
     /** @var \Drupal\Core\Entity\EntityAccessControlHandlerInterface $access_handler */
diff --git a/core/modules/media/tests/src/Kernel/MediaCreationTest.php b/core/modules/media/tests/src/Kernel/MediaCreationTest.php
index ff30f523e13a..9034c3f5a3eb 100644
--- a/core/modules/media/tests/src/Kernel/MediaCreationTest.php
+++ b/core/modules/media/tests/src/Kernel/MediaCreationTest.php
@@ -21,7 +21,7 @@ class MediaCreationTest extends MediaKernelTestBase {
   /**
    * Tests creating a media type programmatically.
    */
-  public function testMediaTypeCreation() {
+  public function testMediaTypeCreation(): void {
     $media_type_storage = $this->container->get('entity_type.manager')->getStorage('media_type');
 
     $this->assertInstanceOf(MediaTypeInterface::class, MediaType::load($this->testMediaType->id()));
@@ -63,7 +63,7 @@ public function testMediaTypeCreation() {
   /**
    * Tests creating a media item programmatically.
    */
-  public function testMediaEntityCreation() {
+  public function testMediaEntityCreation(): void {
     $media = Media::create([
       'bundle' => $this->testMediaType->id(),
       'name' => 'Unnamed',
diff --git a/core/modules/media/tests/src/Kernel/MediaEmbedFilterDisabledIntegrationsTest.php b/core/modules/media/tests/src/Kernel/MediaEmbedFilterDisabledIntegrationsTest.php
index 2118c9bcfee4..ed81c85ccb7f 100644
--- a/core/modules/media/tests/src/Kernel/MediaEmbedFilterDisabledIntegrationsTest.php
+++ b/core/modules/media/tests/src/Kernel/MediaEmbedFilterDisabledIntegrationsTest.php
@@ -38,7 +38,7 @@ protected function setUp(): void {
    * @covers ::renderMedia
    * @covers ::disableContextualLinks
    */
-  public function testDisabledIntegrations() {
+  public function testDisabledIntegrations(): void {
     $text = $this->createEmbedCode([
       'data-entity-type' => 'media',
       'data-entity-uuid' => static::EMBEDDED_ENTITY_UUID,
diff --git a/core/modules/media/tests/src/Kernel/MediaEmbedFilterTest.php b/core/modules/media/tests/src/Kernel/MediaEmbedFilterTest.php
index eb2d1d3bdcaa..e283aae92bb1 100644
--- a/core/modules/media/tests/src/Kernel/MediaEmbedFilterTest.php
+++ b/core/modules/media/tests/src/Kernel/MediaEmbedFilterTest.php
@@ -29,7 +29,7 @@ class MediaEmbedFilterTest extends MediaEmbedFilterTestBase {
    *
    * @dataProvider providerTestBasics
    */
-  public function testBasics(array $embed_attributes, $expected_view_mode, array $expected_attributes, CacheableMetadata $expected_cacheability) {
+  public function testBasics(array $embed_attributes, $expected_view_mode, array $expected_attributes, CacheableMetadata $expected_cacheability): void {
     $content = $this->createEmbedCode($embed_attributes);
 
     $result = $this->applyFilter($content);
@@ -131,7 +131,7 @@ public static function providerTestBasics() {
    *
    * @dataProvider providerAccessUnpublished
    */
-  public function testAccessUnpublished($allowed_to_view_unpublished, $expected_rendered, CacheableMetadata $expected_cacheability, array $expected_attachments) {
+  public function testAccessUnpublished($allowed_to_view_unpublished, $expected_rendered, CacheableMetadata $expected_cacheability, array $expected_attachments): void {
     // Unpublish the embedded entity so we can test variations in behavior.
     $this->embeddedEntity->setUnpublished()->save();
 
@@ -203,7 +203,7 @@ public static function providerAccessUnpublished() {
    * @covers ::applyPerEmbedMediaOverrides
    * @dataProvider providerOverridesAltAndTitle
    */
-  public function testOverridesAltAndTitle($title_field_property_enabled, array $expected_title_attributes) {
+  public function testOverridesAltAndTitle($title_field_property_enabled, array $expected_title_attributes): void {
     // The `alt` field property is enabled by default, the `title` one is not.
     if ($title_field_property_enabled) {
       $source_field = FieldConfig::load('media.image.field_media_image');
@@ -280,7 +280,7 @@ public static function providerOverridesAltAndTitle() {
    *
    * @dataProvider providerMissingEntityIndicator
    */
-  public function testMissingEntityIndicator($uuid, array $filter_ids, array $additional_attributes) {
+  public function testMissingEntityIndicator($uuid, array $filter_ids, array $additional_attributes): void {
     $content = $this->createEmbedCode([
       'data-entity-type' => 'media',
       'data-entity-uuid' => $uuid,
@@ -360,7 +360,7 @@ public static function providerMissingEntityIndicator() {
   /**
    * Tests that only <drupal-media> tags are processed.
    */
-  public function testOnlyDrupalMediaTagProcessed() {
+  public function testOnlyDrupalMediaTagProcessed(): void {
     $content = $this->createEmbedCode([
       'data-entity-type' => 'media',
       'data-entity-uuid' => $this->embeddedEntity->uuid(),
@@ -375,7 +375,7 @@ public function testOnlyDrupalMediaTagProcessed() {
   /**
    * Tests recursive rendering protection.
    */
-  public function testRecursionProtection() {
+  public function testRecursionProtection(): void {
     $text = $this->createEmbedCode([
       'data-entity-type' => 'media',
       'data-entity-uuid' => static::EMBEDDED_ENTITY_UUID,
@@ -398,7 +398,7 @@ public function testRecursionProtection() {
    * @covers \Drupal\filter\Plugin\Filter\FilterCaption
    * @dataProvider providerFilterIntegration
    */
-  public function testFilterIntegration(array $filter_ids, array $additional_attributes, $verification_selector, $expected_verification_success, array $expected_asset_libraries = [], $prefix = '', $suffix = '') {
+  public function testFilterIntegration(array $filter_ids, array $additional_attributes, $verification_selector, $expected_verification_success, array $expected_asset_libraries = [], $prefix = '', $suffix = ''): void {
     $content = $this->createEmbedCode([
       'data-entity-type' => 'media',
       'data-entity-uuid' => static::EMBEDDED_ENTITY_UUID,
diff --git a/core/modules/media/tests/src/Kernel/MediaEmbedFilterTranslationTest.php b/core/modules/media/tests/src/Kernel/MediaEmbedFilterTranslationTest.php
index 87ef07995b98..e5c9079c1311 100644
--- a/core/modules/media/tests/src/Kernel/MediaEmbedFilterTranslationTest.php
+++ b/core/modules/media/tests/src/Kernel/MediaEmbedFilterTranslationTest.php
@@ -46,7 +46,7 @@ protected function setUp(): void {
    *
    * @dataProvider providerTranslationSituations
    */
-  public function testTranslationSelection($text_langcode, $expected_title_langcode) {
+  public function testTranslationSelection($text_langcode, $expected_title_langcode): void {
     $text = $this->createEmbedCode([
       'data-entity-type' => 'media',
       'data-entity-uuid' => static::EMBEDDED_ENTITY_UUID,
diff --git a/core/modules/media/tests/src/Kernel/MediaLinkRelationsTest.php b/core/modules/media/tests/src/Kernel/MediaLinkRelationsTest.php
index a31a1970420a..cc5077988bdd 100644
--- a/core/modules/media/tests/src/Kernel/MediaLinkRelationsTest.php
+++ b/core/modules/media/tests/src/Kernel/MediaLinkRelationsTest.php
@@ -16,7 +16,7 @@ class MediaLinkRelationsTest extends MediaKernelTestBase {
   /**
    * Tests that all link relationships for Media exist.
    */
-  public function testExistLinkRelationships() {
+  public function testExistLinkRelationships(): void {
     /** @var \Drupal\Core\Http\LinkRelationTypeManager $link_relation_type_manager */
     $link_relation_type_manager = $this->container->get('plugin.manager.link_relation_type');
     $media = Media::create(['bundle' => $this->testMediaType->id()]);
diff --git a/core/modules/media/tests/src/Kernel/MediaMappingsConstraintValidatorTest.php b/core/modules/media/tests/src/Kernel/MediaMappingsConstraintValidatorTest.php
index f3c144030474..907e879bf392 100644
--- a/core/modules/media/tests/src/Kernel/MediaMappingsConstraintValidatorTest.php
+++ b/core/modules/media/tests/src/Kernel/MediaMappingsConstraintValidatorTest.php
@@ -35,7 +35,7 @@ protected function setUp(): void {
   /**
    * @covers ::validate
    */
-  public function testMediaMappingSource() {
+  public function testMediaMappingSource(): void {
     $media_type = $this->createMediaType('image', [
       'id' => 'test',
     ]);
diff --git a/core/modules/media/tests/src/Kernel/MediaSourceFileTest.php b/core/modules/media/tests/src/Kernel/MediaSourceFileTest.php
index e5514efd4cfa..971b9ccf6dee 100644
--- a/core/modules/media/tests/src/Kernel/MediaSourceFileTest.php
+++ b/core/modules/media/tests/src/Kernel/MediaSourceFileTest.php
@@ -14,7 +14,7 @@ class MediaSourceFileTest extends MediaKernelTestBase {
   /**
    * Tests the file extension constraint.
    */
-  public function testFileExtensionConstraint() {
+  public function testFileExtensionConstraint(): void {
     $mediaType = $this->createMediaType('file');
     // Create a random file that should fail.
     $media = $this->generateMedia('test.patch', $mediaType);
@@ -32,7 +32,7 @@ public function testFileExtensionConstraint() {
   /**
    * Tests a media file can be deleted.
    */
-  public function testFileDeletion() {
+  public function testFileDeletion(): void {
     $mediaType = $this->createMediaType('file');
     $media = $this->generateMedia('test.txt', $mediaType);
     $media->save();
diff --git a/core/modules/media/tests/src/Kernel/MediaSourceTest.php b/core/modules/media/tests/src/Kernel/MediaSourceTest.php
index 5e7b28eeec26..04310f18c5f3 100644
--- a/core/modules/media/tests/src/Kernel/MediaSourceTest.php
+++ b/core/modules/media/tests/src/Kernel/MediaSourceTest.php
@@ -25,7 +25,7 @@ class MediaSourceTest extends MediaKernelTestBase {
   /**
    * Tests that metadata is correctly mapped irrespective of how media is saved.
    */
-  public function testSave() {
+  public function testSave(): void {
     $field_storage = FieldStorageConfig::create([
       'entity_type' => 'media',
       'field_name' => 'field_to_map_to',
@@ -91,7 +91,7 @@ public function testSave() {
   /**
    * Tests default media name functionality.
    */
-  public function testDefaultName() {
+  public function testDefaultName(): void {
     // Make sure that the default name is set if not provided by the user.
     /** @var \Drupal\media\MediaInterface $media */
     $media = Media::create(['bundle' => $this->testMediaType->id()]);
@@ -135,7 +135,7 @@ public function testDefaultName() {
   /**
    * Tests metadata mapping functionality.
    */
-  public function testMetadataMapping() {
+  public function testMetadataMapping(): void {
     $field_name = 'field_to_map_to';
     $attribute_name = 'attribute_to_map';
     $storage = FieldStorageConfig::create([
@@ -216,7 +216,7 @@ public function testMetadataMapping() {
   /**
    * Tests the getSourceFieldValue() method.
    */
-  public function testGetSourceFieldValue() {
+  public function testGetSourceFieldValue(): void {
     /** @var \Drupal\media\MediaInterface $media */
     $media = Media::create([
       'bundle' => $this->testMediaType->id(),
@@ -234,7 +234,7 @@ public function testGetSourceFieldValue() {
   /**
    * Tests the thumbnail functionality.
    */
-  public function testThumbnail() {
+  public function testThumbnail(): void {
     file_put_contents('public://thumbnail1.jpg', '');
     file_put_contents('public://thumbnail2.jpg', '');
 
@@ -384,7 +384,7 @@ public function testThumbnail() {
   /**
    * Tests the media item constraints functionality.
    */
-  public function testConstraints() {
+  public function testConstraints(): void {
     // Test entity constraints.
     \Drupal::state()->set('media_source_test_entity_constraints', [
       'MediaTestConstraint' => [],
@@ -451,7 +451,7 @@ public function testConstraints() {
   /**
    * Tests logic related to the automated source field creation.
    */
-  public function testSourceFieldCreation() {
+  public function testSourceFieldCreation(): void {
     /** @var \Drupal\media\MediaTypeInterface $type */
     $type = MediaType::create([
       'id' => 'test_type',
@@ -536,7 +536,7 @@ public function testSourceFieldCreation() {
   /**
    * Tests configuration form submit handler on the base media source plugin.
    */
-  public function testSourceConfigurationSubmit() {
+  public function testSourceConfigurationSubmit(): void {
     /** @var \Drupal\media\MediaSourceManager $manager */
     $manager = $this->container->get('plugin.manager.media.source');
     $form = [];
@@ -571,7 +571,7 @@ public function testSourceConfigurationSubmit() {
   /**
    * Tests different display options for the source field.
    */
-  public function testDifferentSourceFieldDisplays() {
+  public function testDifferentSourceFieldDisplays(): void {
     $id = 'test_different_displays';
     $field_name = 'field_media_different_display';
 
@@ -592,7 +592,7 @@ public function testDifferentSourceFieldDisplays() {
   /**
    * Tests hidden source field in media type.
    */
-  public function testHiddenSourceField() {
+  public function testHiddenSourceField(): void {
     $id = 'test_hidden_source_field';
     $field_name = 'field_media_hidden';
 
diff --git a/core/modules/media/tests/src/Kernel/MediaTest.php b/core/modules/media/tests/src/Kernel/MediaTest.php
index c932fb906c78..9fe65a2cd536 100644
--- a/core/modules/media/tests/src/Kernel/MediaTest.php
+++ b/core/modules/media/tests/src/Kernel/MediaTest.php
@@ -16,7 +16,7 @@ class MediaTest extends MediaKernelTestBase {
   /**
    * Tests various aspects of a media item.
    */
-  public function testEntity() {
+  public function testEntity(): void {
     $media = Media::create(['bundle' => $this->testMediaType->id()]);
 
     $this->assertSame($media, $media->setOwnerId($this->user->id()), 'setOwnerId() method returns its own entity.');
@@ -25,7 +25,7 @@ public function testEntity() {
   /**
    * Tests the Media "name" base field behavior.
    */
-  public function testNameBaseField() {
+  public function testNameBaseField(): void {
     /** @var \Drupal\Core\Field\BaseFieldDefinition[] $field_definitions */
     $field_definitions = $this->container->get('entity_field.manager')
       ->getBaseFieldDefinitions('media');
@@ -39,7 +39,7 @@ public function testNameBaseField() {
   /**
    * Tests permissions based on a media type have the correct permissions.
    */
-  public function testPermissions() {
+  public function testPermissions(): void {
     $permissions = $this->container->get('user.permissions')->getPermissions();
     $name = "create {$this->testMediaType->id()} media";
     $this->assertArrayHasKey($name, $permissions);
diff --git a/core/modules/media/tests/src/Kernel/MediaTranslationTest.php b/core/modules/media/tests/src/Kernel/MediaTranslationTest.php
index 5161b7950014..198a22e50e41 100644
--- a/core/modules/media/tests/src/Kernel/MediaTranslationTest.php
+++ b/core/modules/media/tests/src/Kernel/MediaTranslationTest.php
@@ -52,7 +52,7 @@ protected function setUp(): void {
   /**
    * Tests translatable fields storage/retrieval.
    */
-  public function testTranslatableFieldSaveLoad() {
+  public function testTranslatableFieldSaveLoad(): void {
     /** @var \Drupal\Core\Entity\EntityTypeInterface $entity_type */
     $entity_type = $this->container->get('entity_type.manager')->getDefinition('media');
     $this->assertTrue($entity_type->isTranslatable(), 'Media is translatable.');
diff --git a/core/modules/media/tests/src/Kernel/OEmbedIframeControllerTest.php b/core/modules/media/tests/src/Kernel/OEmbedIframeControllerTest.php
index cabb585a5248..050050004713 100644
--- a/core/modules/media/tests/src/Kernel/OEmbedIframeControllerTest.php
+++ b/core/modules/media/tests/src/Kernel/OEmbedIframeControllerTest.php
@@ -50,7 +50,7 @@ public static function providerBadHashParameter() {
    *
    * @covers ::render
    */
-  public function testBadHashParameter($hash) {
+  public function testBadHashParameter($hash): void {
     /** @var callable $controller */
     $controller = $this->container
       ->get('controller_resolver')
@@ -74,7 +74,7 @@ public function testBadHashParameter($hash) {
    *
    * @covers ::render
    */
-  public function testResourcePassedToPreprocess() {
+  public function testResourcePassedToPreprocess(): void {
     $hash = $this->container->get('media.oembed.iframe_url_helper')
       ->getHash('', 0, 0);
 
diff --git a/core/modules/media/tests/src/Kernel/OEmbedResourceConstraintValidatorTest.php b/core/modules/media/tests/src/Kernel/OEmbedResourceConstraintValidatorTest.php
index c069c05ac9ed..8b6bc1282e56 100644
--- a/core/modules/media/tests/src/Kernel/OEmbedResourceConstraintValidatorTest.php
+++ b/core/modules/media/tests/src/Kernel/OEmbedResourceConstraintValidatorTest.php
@@ -41,7 +41,7 @@ protected function setUp(): void {
   /**
    * @covers ::validate
    */
-  public function testValidateEmptySource() {
+  public function testValidateEmptySource(): void {
     $media = Media::create([
       'bundle' => $this->createMediaType('oembed:video')->id(),
     ]);
@@ -68,7 +68,7 @@ public function testValidateEmptySource() {
   /**
    * @covers ::validate
    */
-  public function testValidateUrlResolverInvoked() {
+  public function testValidateUrlResolverInvoked(): void {
     $media = Media::create([
       'bundle' => $this->createMediaType('oembed:video')->id(),
       'field_media_oembed_video' => 'source value',
diff --git a/core/modules/media/tests/src/Kernel/OEmbedSourceTest.php b/core/modules/media/tests/src/Kernel/OEmbedSourceTest.php
index 8385d35e66e1..38664c1b157d 100644
--- a/core/modules/media/tests/src/Kernel/OEmbedSourceTest.php
+++ b/core/modules/media/tests/src/Kernel/OEmbedSourceTest.php
@@ -34,7 +34,7 @@ class OEmbedSourceTest extends MediaKernelTestBase {
   /**
    * @covers ::getMetadata
    */
-  public function testGetMetadata() {
+  public function testGetMetadata(): void {
     $configuration = [
       'source_field' => 'field_test_oembed',
     ];
diff --git a/core/modules/media/tests/src/Kernel/Views/RevisionUserTest.php b/core/modules/media/tests/src/Kernel/Views/RevisionUserTest.php
index a374baa95d7d..907ad9a151cb 100644
--- a/core/modules/media/tests/src/Kernel/Views/RevisionUserTest.php
+++ b/core/modules/media/tests/src/Kernel/Views/RevisionUserTest.php
@@ -86,7 +86,7 @@ protected function setUp($import_test_views = TRUE): void {
   /**
    * Tests the media_revision_user relationship.
    */
-  public function testRevisionUser() {
+  public function testRevisionUser(): void {
     $primary_author = $this->createUser();
     $secondary_author = $this->createUser();
 
diff --git a/core/modules/media/tests/src/Unit/IFrameUrlHelperTest.php b/core/modules/media/tests/src/Unit/IFrameUrlHelperTest.php
index c4eb068ffcc4..cd384efb2b4d 100644
--- a/core/modules/media/tests/src/Unit/IFrameUrlHelperTest.php
+++ b/core/modules/media/tests/src/Unit/IFrameUrlHelperTest.php
@@ -77,7 +77,7 @@ public static function providerIsSecure() {
    *
    * @dataProvider providerIsSecure
    */
-  public function testIsSecure($url, $base_url, $secure) {
+  public function testIsSecure($url, $base_url, $secure): void {
     $request_context = $this->createMock(RequestContext::class);
     $request_context->expects($this->any())
       ->method('getCompleteBaseUrl')
diff --git a/core/modules/media/tests/src/Unit/ResourceTest.php b/core/modules/media/tests/src/Unit/ResourceTest.php
index cff1d3ab5bbd..2c5904763ea3 100644
--- a/core/modules/media/tests/src/Unit/ResourceTest.php
+++ b/core/modules/media/tests/src/Unit/ResourceTest.php
@@ -77,7 +77,7 @@ public static function setDimensionsTestCases() {
    * @covers ::setDimensions
    * @dataProvider setDimensionsTestCases
    */
-  public function testSetDimensions($factory, $width, $height, $exception = NULL, $expected_width = NULL, $expected_height = NULL) {
+  public function testSetDimensions($factory, $width, $height, $exception = NULL, $expected_width = NULL, $expected_height = NULL): void {
     if ($exception) {
       $this->expectException(\InvalidArgumentException::class);
       $this->expectExceptionMessage($exception);
diff --git a/core/modules/media_library/tests/src/Functional/MediaLibraryDisplayModeTest.php b/core/modules/media_library/tests/src/Functional/MediaLibraryDisplayModeTest.php
index 53fb0b9996c5..f00a57e42ea0 100644
--- a/core/modules/media_library/tests/src/Functional/MediaLibraryDisplayModeTest.php
+++ b/core/modules/media_library/tests/src/Functional/MediaLibraryDisplayModeTest.php
@@ -55,7 +55,7 @@ protected function setUp(): void {
   /**
    * Tests that the Media Library can automatically configure display modes.
    */
-  public function testDisplayModes() {
+  public function testDisplayModes(): void {
     $this->createMediaType('file', [
       'id' => 'type_one',
     ]);
diff --git a/core/modules/media_library/tests/src/Functional/SettingsFormTest.php b/core/modules/media_library/tests/src/Functional/SettingsFormTest.php
index 52a5af04f41d..02cb854ae35b 100644
--- a/core/modules/media_library/tests/src/Functional/SettingsFormTest.php
+++ b/core/modules/media_library/tests/src/Functional/SettingsFormTest.php
@@ -27,7 +27,7 @@ class SettingsFormTest extends BrowserTestBase {
   /**
    * Tests the Media Library settings form.
    */
-  public function testSettingsForm() {
+  public function testSettingsForm(): void {
     $account = $this->drupalCreateUser([
       'access administration pages',
       'administer media',
diff --git a/core/modules/media_library/tests/src/FunctionalJavascript/ContentModerationTest.php b/core/modules/media_library/tests/src/FunctionalJavascript/ContentModerationTest.php
index a892fb05ea2e..2d0460b0b297 100644
--- a/core/modules/media_library/tests/src/FunctionalJavascript/ContentModerationTest.php
+++ b/core/modules/media_library/tests/src/FunctionalJavascript/ContentModerationTest.php
@@ -188,7 +188,7 @@ protected function setUp(): void {
   /**
    * Tests the media library widget only shows published media.
    */
-  public function testAdministrationPage() {
+  public function testAdministrationPage(): void {
     // User 1 should be able to see all media items.
     $this->drupalLogin($this->rootUser);
     $this->drupalGet('admin/content/media');
@@ -258,7 +258,7 @@ public function testAdministrationPage() {
   /**
    * Tests the media library widget only shows published media.
    */
-  public function testWidget() {
+  public function testWidget(): void {
     $assert_session = $this->assertSession();
 
     // All users should only be able to see published media items.
diff --git a/core/modules/media_library/tests/src/FunctionalJavascript/EmbeddedFormWidgetTest.php b/core/modules/media_library/tests/src/FunctionalJavascript/EmbeddedFormWidgetTest.php
index dfe78f741952..1fb1b9a93528 100644
--- a/core/modules/media_library/tests/src/FunctionalJavascript/EmbeddedFormWidgetTest.php
+++ b/core/modules/media_library/tests/src/FunctionalJavascript/EmbeddedFormWidgetTest.php
@@ -97,7 +97,7 @@ protected function setUp(): void {
    *
    * @dataProvider insertionReselectionProvider
    */
-  public function testInsertionAndReselection($widget) {
+  public function testInsertionAndReselection($widget): void {
     $this->container
       ->get('entity_display.repository')
       ->getFormDisplay('node', 'basic_page')
diff --git a/core/modules/media_library/tests/src/FunctionalJavascript/EntityReferenceWidgetTest.php b/core/modules/media_library/tests/src/FunctionalJavascript/EntityReferenceWidgetTest.php
index 9af1d593440d..d432e0313797 100644
--- a/core/modules/media_library/tests/src/FunctionalJavascript/EntityReferenceWidgetTest.php
+++ b/core/modules/media_library/tests/src/FunctionalJavascript/EntityReferenceWidgetTest.php
@@ -74,7 +74,7 @@ protected function setUp(): void {
   /**
    * Tests that disabled media items don't capture focus on page load.
    */
-  public function testFocusNotAppliedWithoutSelectionChange() {
+  public function testFocusNotAppliedWithoutSelectionChange(): void {
     // Create a node with the maximum number of values for the field_twin_media
     // field.
     $node = $this->drupalCreateNode([
@@ -99,7 +99,7 @@ public function testFocusNotAppliedWithoutSelectionChange() {
   /**
    * Tests that the Media library's widget works as expected.
    */
-  public function testWidget() {
+  public function testWidget(): void {
     $assert_session = $this->assertSession();
     $page = $this->getSession()->getPage();
 
@@ -474,7 +474,7 @@ public function testWidget() {
   /**
    * Tests saving a required media library field.
    */
-  public function testRequiredMediaField() {
+  public function testRequiredMediaField(): void {
     $assert_session = $this->assertSession();
     $page = $this->getSession()->getPage();
 
@@ -599,7 +599,7 @@ protected function sortableUpdate($item, $from, $to = NULL) {
   /**
    * Tests the preview displayed by the field widget.
    */
-  public function testWidgetPreview() {
+  public function testWidgetPreview(): void {
     $assert_session = $this->assertSession();
     $page = $this->getSession()->getPage();
 
diff --git a/core/modules/media_library/tests/src/FunctionalJavascript/FieldUiIntegrationTest.php b/core/modules/media_library/tests/src/FunctionalJavascript/FieldUiIntegrationTest.php
index 4f27f165f1b1..f30393116782 100644
--- a/core/modules/media_library/tests/src/FunctionalJavascript/FieldUiIntegrationTest.php
+++ b/core/modules/media_library/tests/src/FunctionalJavascript/FieldUiIntegrationTest.php
@@ -57,7 +57,7 @@ protected function setUp(): void {
   /**
    * Tests field UI integration for media library widget.
    */
-  public function testFieldUiIntegration() {
+  public function testFieldUiIntegration(): void {
     $page = $this->getSession()->getPage();
     $assert_session = $this->assertSession();
     $user = $this->drupalCreateUser([
diff --git a/core/modules/media_library/tests/src/FunctionalJavascript/MediaOverviewTest.php b/core/modules/media_library/tests/src/FunctionalJavascript/MediaOverviewTest.php
index a79a8ccfdbb0..a88502c65961 100644
--- a/core/modules/media_library/tests/src/FunctionalJavascript/MediaOverviewTest.php
+++ b/core/modules/media_library/tests/src/FunctionalJavascript/MediaOverviewTest.php
@@ -58,7 +58,7 @@ protected function setUp(): void {
   /**
    * Tests that the Media Library's administration page works as expected.
    */
-  public function testAdministrationPage() {
+  public function testAdministrationPage(): void {
     $session = $this->getSession();
     $page = $session->getPage();
     $assert_session = $this->assertSession();
diff --git a/core/modules/media_library/tests/src/FunctionalJavascript/TranslationsTest.php b/core/modules/media_library/tests/src/FunctionalJavascript/TranslationsTest.php
index 4285aebff4fb..f3dbb33ad1bd 100644
--- a/core/modules/media_library/tests/src/FunctionalJavascript/TranslationsTest.php
+++ b/core/modules/media_library/tests/src/FunctionalJavascript/TranslationsTest.php
@@ -121,7 +121,7 @@ protected function setUp(): void {
   /**
    * Tests the media library widget shows all media only once.
    */
-  public function testMediaLibraryTranslations() {
+  public function testMediaLibraryTranslations(): void {
     $assert_session = $this->assertSession();
     $page = $this->getSession()->getPage();
 
diff --git a/core/modules/media_library/tests/src/FunctionalJavascript/ViewsUiIntegrationTest.php b/core/modules/media_library/tests/src/FunctionalJavascript/ViewsUiIntegrationTest.php
index f47635b7726b..73df14ec6fc1 100644
--- a/core/modules/media_library/tests/src/FunctionalJavascript/ViewsUiIntegrationTest.php
+++ b/core/modules/media_library/tests/src/FunctionalJavascript/ViewsUiIntegrationTest.php
@@ -50,7 +50,7 @@ protected function setUp(): void {
   /**
    * Tests that the integration with Views works correctly.
    */
-  public function testViewsAdmin() {
+  public function testViewsAdmin(): void {
     $page = $this->getSession()->getPage();
 
     // Assert that the widget can be seen and that there are 8 items.
diff --git a/core/modules/media_library/tests/src/FunctionalJavascript/WidgetAccessTest.php b/core/modules/media_library/tests/src/FunctionalJavascript/WidgetAccessTest.php
index 7e27d0d09beb..78f4d6acf008 100644
--- a/core/modules/media_library/tests/src/FunctionalJavascript/WidgetAccessTest.php
+++ b/core/modules/media_library/tests/src/FunctionalJavascript/WidgetAccessTest.php
@@ -25,7 +25,7 @@ class WidgetAccessTest extends MediaLibraryTestBase {
   /**
    * Tests that the widget access works as expected.
    */
-  public function testWidgetAccess() {
+  public function testWidgetAccess(): void {
     $assert_session = $this->assertSession();
     $session = $this->getSession();
 
@@ -142,7 +142,7 @@ public function testWidgetAccess() {
   /**
    * Tests the widget with a required field that the user can't access.
    */
-  public function testRequiredFieldNoAccess() {
+  public function testRequiredFieldNoAccess(): void {
     // Make field_single_media_type required.
     $fieldConfig = FieldConfig::loadByName('node', 'basic_page', 'field_single_media_type');
     assert($fieldConfig instanceof FieldConfig);
diff --git a/core/modules/media_library/tests/src/FunctionalJavascript/WidgetAnonymousTest.php b/core/modules/media_library/tests/src/FunctionalJavascript/WidgetAnonymousTest.php
index b54393b440f8..d7efb311cda3 100644
--- a/core/modules/media_library/tests/src/FunctionalJavascript/WidgetAnonymousTest.php
+++ b/core/modules/media_library/tests/src/FunctionalJavascript/WidgetAnonymousTest.php
@@ -45,7 +45,7 @@ protected function setUp(): void {
   /**
    * Tests that the widget works as expected for anonymous users.
    */
-  public function testWidgetAnonymous() {
+  public function testWidgetAnonymous(): void {
     $assert_session = $this->assertSession();
 
     // Allow the anonymous user to create pages and view media.
diff --git a/core/modules/media_library/tests/src/FunctionalJavascript/WidgetOEmbedTest.php b/core/modules/media_library/tests/src/FunctionalJavascript/WidgetOEmbedTest.php
index 42cb0595121d..46277c473e6f 100644
--- a/core/modules/media_library/tests/src/FunctionalJavascript/WidgetOEmbedTest.php
+++ b/core/modules/media_library/tests/src/FunctionalJavascript/WidgetOEmbedTest.php
@@ -51,7 +51,7 @@ protected function setUp(): void {
   /**
    * Tests that oEmbed media can be added in the Media library's widget.
    */
-  public function testWidgetOEmbed() {
+  public function testWidgetOEmbed(): void {
     $this->hijackProviderEndpoints();
     $assert_session = $this->assertSession();
     $page = $this->getSession()->getPage();
@@ -238,7 +238,7 @@ public function testWidgetOEmbed() {
    * @todo Merge this with testWidgetOEmbed() in
    *   https://www.drupal.org/project/drupal/issues/3087227
    */
-  public function testWidgetOEmbedAdvancedUi() {
+  public function testWidgetOEmbedAdvancedUi(): void {
     $this->config('media_library.settings')->set('advanced_ui', TRUE)->save();
 
     $this->hijackProviderEndpoints();
diff --git a/core/modules/media_library/tests/src/FunctionalJavascript/WidgetUploadTest.php b/core/modules/media_library/tests/src/FunctionalJavascript/WidgetUploadTest.php
index 483638746b1d..40a1f70c987e 100644
--- a/core/modules/media_library/tests/src/FunctionalJavascript/WidgetUploadTest.php
+++ b/core/modules/media_library/tests/src/FunctionalJavascript/WidgetUploadTest.php
@@ -27,7 +27,7 @@ class WidgetUploadTest extends MediaLibraryTestBase {
   /**
    * Tests that uploads in the 'media_library_widget' works as expected.
    */
-  public function testWidgetUpload() {
+  public function testWidgetUpload(): void {
     $assert_session = $this->assertSession();
     $page = $this->getSession()->getPage();
     $driver = $this->getSession()->getDriver();
@@ -371,7 +371,7 @@ public function testWidgetUpload() {
    * @todo Merge this with testWidgetUpload() in
    *   https://www.drupal.org/project/drupal/issues/3087227
    */
-  public function testWidgetUploadAdvancedUi() {
+  public function testWidgetUploadAdvancedUi(): void {
     $this->config('media_library.settings')->set('advanced_ui', TRUE)->save();
 
     $assert_session = $this->assertSession();
diff --git a/core/modules/media_library/tests/src/FunctionalJavascript/WidgetViewsTest.php b/core/modules/media_library/tests/src/FunctionalJavascript/WidgetViewsTest.php
index dd8e58a2a9ad..09933c865a77 100644
--- a/core/modules/media_library/tests/src/FunctionalJavascript/WidgetViewsTest.php
+++ b/core/modules/media_library/tests/src/FunctionalJavascript/WidgetViewsTest.php
@@ -72,7 +72,7 @@ protected function setUp(): void {
   /**
    * Tests that the views in the Media library's widget work as expected.
    */
-  public function testWidgetViews() {
+  public function testWidgetViews(): void {
     $assert_session = $this->assertSession();
     $page = $this->getSession()->getPage();
 
diff --git a/core/modules/media_library/tests/src/FunctionalJavascript/WidgetWithoutTypesTest.php b/core/modules/media_library/tests/src/FunctionalJavascript/WidgetWithoutTypesTest.php
index e4b03b1acb7c..87eaea2af68b 100644
--- a/core/modules/media_library/tests/src/FunctionalJavascript/WidgetWithoutTypesTest.php
+++ b/core/modules/media_library/tests/src/FunctionalJavascript/WidgetWithoutTypesTest.php
@@ -27,7 +27,7 @@ class WidgetWithoutTypesTest extends MediaLibraryTestBase {
   /**
    * Tests that the widget works as expected when media types are deleted.
    */
-  public function testWidgetWithoutMediaTypes() {
+  public function testWidgetWithoutMediaTypes(): void {
     $assert_session = $this->assertSession();
 
     $user = $this->drupalCreateUser([
diff --git a/core/modules/media_library/tests/src/Kernel/MediaLibraryAccessTest.php b/core/modules/media_library/tests/src/Kernel/MediaLibraryAccessTest.php
index dcfb5e60f8bb..31dba044ae90 100644
--- a/core/modules/media_library/tests/src/Kernel/MediaLibraryAccessTest.php
+++ b/core/modules/media_library/tests/src/Kernel/MediaLibraryAccessTest.php
@@ -88,7 +88,7 @@ protected function setUp(): void {
   /**
    * Tests that the field widget opener respects entity creation permissions.
    */
-  public function testFieldWidgetEntityCreateAccess() {
+  public function testFieldWidgetEntityCreateAccess(): void {
     /** @var \Drupal\media_library\MediaLibraryUiBuilder $ui_builder */
     $ui_builder = $this->container->get('media_library.ui_builder');
 
@@ -122,7 +122,7 @@ public function testFieldWidgetEntityCreateAccess() {
    *
    * @dataProvider editorOpenerAccessProvider
    */
-  public function testEditorOpenerAccess($media_embed_enabled, $can_use_format) {
+  public function testEditorOpenerAccess($media_embed_enabled, $can_use_format): void {
     $format = $this->container
       ->get('entity_type.manager')
       ->getStorage('filter_format')->create([
@@ -185,7 +185,7 @@ public static function editorOpenerAccessProvider() {
   /**
    * Tests that the field widget opener respects entity-specific access.
    */
-  public function testFieldWidgetEntityEditAccess() {
+  public function testFieldWidgetEntityEditAccess(): void {
     /** @var \Drupal\media_library\MediaLibraryUiBuilder $ui_builder */
     $ui_builder = $this->container->get('media_library.ui_builder');
 
@@ -261,7 +261,7 @@ public static function providerFieldWidgetEntityFieldAccess(): array {
    *
    * @dataProvider providerFieldWidgetEntityFieldAccess
    */
-  public function testFieldWidgetEntityFieldAccess(string $field_type) {
+  public function testFieldWidgetEntityFieldAccess(string $field_type): void {
     $field_storage = FieldStorageConfig::create([
       'type' => $field_type,
       'entity_type' => 'entity_test_with_bundle',
@@ -319,7 +319,7 @@ public function testFieldWidgetEntityFieldAccess(string $field_type) {
   /**
    * Tests that media library access respects the media_library view.
    */
-  public function testViewAccess() {
+  public function testViewAccess(): void {
     /** @var \Drupal\media_library\MediaLibraryUiBuilder $ui_builder */
     $ui_builder = $this->container->get('media_library.ui_builder');
 
diff --git a/core/modules/media_library/tests/src/Kernel/MediaLibraryAddFormTest.php b/core/modules/media_library/tests/src/Kernel/MediaLibraryAddFormTest.php
index defdd2ad7d02..1ff7738f516f 100644
--- a/core/modules/media_library/tests/src/Kernel/MediaLibraryAddFormTest.php
+++ b/core/modules/media_library/tests/src/Kernel/MediaLibraryAddFormTest.php
@@ -67,7 +67,7 @@ protected function setUp(): void {
   /**
    * Tests the media library add form.
    */
-  public function testMediaTypeAddForm() {
+  public function testMediaTypeAddForm(): void {
     $entity_type_manager = \Drupal::entityTypeManager();
     $image = $entity_type_manager->getStorage('media_type')->load('image');
     $remote_video = $entity_type_manager->getStorage('media_type')->load('remote_video');
@@ -121,7 +121,7 @@ protected function buildLibraryUi($selected_type_id) {
   /**
    * Tests the validation of the library state in the media library add form.
    */
-  public function testFormStateValidation() {
+  public function testFormStateValidation(): void {
     $form_state = new FormState();
     $this->expectException(\InvalidArgumentException::class);
     $this->expectExceptionMessage('The media library state is not present in the form state.');
@@ -131,7 +131,7 @@ public function testFormStateValidation() {
   /**
    * Tests the validation of the selected type in the media library add form.
    */
-  public function testSelectedTypeValidation() {
+  public function testSelectedTypeValidation(): void {
     $state = MediaLibraryState::create('test', ['image', 'remote_video', 'header_image'], 'header_image', -1);
     $form_state = new FormState();
     $form_state->set('media_library_state', $state);
@@ -143,7 +143,7 @@ public function testSelectedTypeValidation() {
   /**
    * Tests overwriting of the add form.
    */
-  public function testDifferentAddForm() {
+  public function testDifferentAddForm(): void {
     $this->enableModules(['media_library_form_overwrite_test']);
 
     $entity_type_manager = \Drupal::entityTypeManager();
diff --git a/core/modules/media_library/tests/src/Kernel/MediaLibraryStateTest.php b/core/modules/media_library/tests/src/Kernel/MediaLibraryStateTest.php
index 84839b820ee8..a861d5348924 100644
--- a/core/modules/media_library/tests/src/Kernel/MediaLibraryStateTest.php
+++ b/core/modules/media_library/tests/src/Kernel/MediaLibraryStateTest.php
@@ -65,7 +65,7 @@ protected function setUp(): void {
   /**
    * Tests the media library state methods.
    */
-  public function testMethods() {
+  public function testMethods(): void {
     $opener_id = 'test';
     $allowed_media_type_ids = ['document', 'image'];
     $selected_media_type_id = 'image';
@@ -100,7 +100,7 @@ public function testMethods() {
    * @covers ::create
    * @dataProvider providerCreate
    */
-  public function testCreate($opener_id, array $allowed_media_type_ids, $selected_type_id, $remaining_slots, $exception_message = '') {
+  public function testCreate($opener_id, array $allowed_media_type_ids, $selected_type_id, $remaining_slots, $exception_message = ''): void {
     if ($exception_message) {
       $this->expectException(\InvalidArgumentException::class);
       $this->expectExceptionMessage($exception_message);
@@ -278,7 +278,7 @@ public static function providerCreate() {
    * @covers ::fromRequest
    * @dataProvider providerFromRequest
    */
-  public function testFromRequest(array $query_overrides, $exception_expected) {
+  public function testFromRequest(array $query_overrides, $exception_expected): void {
     // Override the query parameters and verify an exception is thrown when
     // required state parameters are changed.
     $query = MediaLibraryState::create('test', ['file', 'image'], 'image', 2)->all();
@@ -295,7 +295,7 @@ public function testFromRequest(array $query_overrides, $exception_expected) {
   /**
    * @covers ::fromRequest
    */
-  public function testFromRequestQueryLess() {
+  public function testFromRequestQueryLess(): void {
     $this->expectException(\InvalidArgumentException::class);
     $this->expectExceptionMessage('The opener ID parameter is required and must be a string.');
     $state = MediaLibraryState::fromRequest(new Request());
@@ -366,7 +366,7 @@ public static function providerFromRequest() {
   /**
    * @covers ::getOpenerParameters
    */
-  public function testOpenerParameters() {
+  public function testOpenerParameters(): void {
     $state = MediaLibraryState::create('test', ['file'], 'file', -1, [
       'foo' => 'baz',
     ]);
@@ -376,7 +376,7 @@ public function testOpenerParameters() {
   /**
    * Tests that hash is unaffected by allowed media type order.
    */
-  public function testHashUnaffectedByMediaTypeOrder() {
+  public function testHashUnaffectedByMediaTypeOrder(): void {
     $state1 = MediaLibraryState::create('test', ['file', 'image'], 'image', 2);
     $state2 = MediaLibraryState::create('test', ['image', 'file'], 'image', 2);
     $this->assertSame($state1->getHash(), $state2->getHash());
@@ -385,7 +385,7 @@ public function testHashUnaffectedByMediaTypeOrder() {
   /**
    * Tests that hash is unaffected by opener parameter order.
    */
-  public function testHashUnaffectedByOpenerParamOrder() {
+  public function testHashUnaffectedByOpenerParamOrder(): void {
     $state1 = MediaLibraryState::create('test', ['file'], 'file', -1, [
       'foo' => 'baz',
       'baz' => 'foo',
diff --git a/core/modules/media_library/tests/src/Kernel/MediaLibraryWidgetTest.php b/core/modules/media_library/tests/src/Kernel/MediaLibraryWidgetTest.php
index dc32bcfd4963..744d8776b417 100644
--- a/core/modules/media_library/tests/src/Kernel/MediaLibraryWidgetTest.php
+++ b/core/modules/media_library/tests/src/Kernel/MediaLibraryWidgetTest.php
@@ -98,7 +98,7 @@ protected function setUp(): void {
   /**
    * Test the media library widget access.
    */
-  public function testWidgetAccess() {
+  public function testWidgetAccess(): void {
     $entity = EntityTest::create([
       'name' => 'sample entity',
     ]);
@@ -110,7 +110,7 @@ public function testWidgetAccess() {
   /**
    * Test the media library widget access with a revisionable entity type.
    */
-  public function testRevisionableWidgetAccess() {
+  public function testRevisionableWidgetAccess(): void {
     $allowed_revision = EntityTestRev::create([
       'name' => 'allowed_access',
     ]);
diff --git a/core/modules/menu_link_content/tests/src/Functional/MenuLinkContentDeleteFormTest.php b/core/modules/menu_link_content/tests/src/Functional/MenuLinkContentDeleteFormTest.php
index b490b8d3f9f6..afe1cc34aa6d 100644
--- a/core/modules/menu_link_content/tests/src/Functional/MenuLinkContentDeleteFormTest.php
+++ b/core/modules/menu_link_content/tests/src/Functional/MenuLinkContentDeleteFormTest.php
@@ -39,7 +39,7 @@ protected function setUp(): void {
   /**
    * Tests the MenuLinkContentDeleteForm class.
    */
-  public function testMenuLinkContentDeleteForm() {
+  public function testMenuLinkContentDeleteForm(): void {
     // Add new menu item.
     $this->drupalGet('admin/structure/menu/manage/admin/add');
     $this->submitForm([
diff --git a/core/modules/menu_link_content/tests/src/Functional/MenuLinkContentFormTest.php b/core/modules/menu_link_content/tests/src/Functional/MenuLinkContentFormTest.php
index 412f40d8b94e..10f523d8f4a5 100644
--- a/core/modules/menu_link_content/tests/src/Functional/MenuLinkContentFormTest.php
+++ b/core/modules/menu_link_content/tests/src/Functional/MenuLinkContentFormTest.php
@@ -60,7 +60,7 @@ protected function setUp(): void {
   /**
    * Tests the 'link to any page' permission for a restricted page.
    */
-  public function testMenuLinkContentFormLinkToAnyPage() {
+  public function testMenuLinkContentFormLinkToAnyPage(): void {
     $menu_link = MenuLinkContent::create([
       'title' => 'Menu link test',
       'provider' => 'menu_link_content',
@@ -86,7 +86,7 @@ public function testMenuLinkContentFormLinkToAnyPage() {
   /**
    * Tests the MenuLinkContentForm class.
    */
-  public function testMenuLinkContentForm() {
+  public function testMenuLinkContentForm(): void {
     $this->drupalGet('admin/structure/menu/manage/admin/add');
     // Test that other menus are not available when creating a new menu link.
     $this->assertSession()->optionNotExists('edit-menu-parent', 'main:');
@@ -105,7 +105,7 @@ public function testMenuLinkContentForm() {
   /**
    * Tests validation for the MenuLinkContentForm class.
    */
-  public function testMenuLinkContentFormValidation() {
+  public function testMenuLinkContentFormValidation(): void {
     $this->drupalGet('admin/structure/menu/manage/admin/add');
     $this->submitForm([
       'title[0][value]' => 'Test page',
@@ -117,7 +117,7 @@ public function testMenuLinkContentFormValidation() {
   /**
    * Tests the operations links alter related functional for menu_link_content.
    */
-  public function testMenuLinkContentOperationsLink() {
+  public function testMenuLinkContentOperationsLink(): void {
     \Drupal::service('module_installer')->install(['menu_operations_link_test']);
     $menu_link = MenuLinkContent::create([
       'title' => 'Menu link test',
diff --git a/core/modules/menu_link_content/tests/src/Functional/MenuLinkContentTranslationUITest.php b/core/modules/menu_link_content/tests/src/Functional/MenuLinkContentTranslationUITest.php
index 91313eed2751..fd2f3ff9429f 100644
--- a/core/modules/menu_link_content/tests/src/Functional/MenuLinkContentTranslationUITest.php
+++ b/core/modules/menu_link_content/tests/src/Functional/MenuLinkContentTranslationUITest.php
@@ -74,7 +74,7 @@ protected function createEntity($values, $langcode, $bundle_name = NULL) {
   /**
    * Ensure that a translate link can be found on the menu edit form.
    */
-  public function testTranslationLinkOnMenuEditForm() {
+  public function testTranslationLinkOnMenuEditForm(): void {
     $this->drupalGet('admin/structure/menu/manage/tools');
     $this->assertSession()->linkNotExists('Translate');
 
@@ -91,7 +91,7 @@ public function testTranslationLinkOnMenuEditForm() {
   /**
    * Tests that translation page inherits admin status of edit page.
    */
-  public function testTranslationLinkTheme() {
+  public function testTranslationLinkTheme(): void {
     $this->drupalLogin($this->administrator);
     $entityId = $this->createEntity([], 'en');
 
diff --git a/core/modules/menu_link_content/tests/src/Kernel/MenuLinkContentCacheabilityBubblingTest.php b/core/modules/menu_link_content/tests/src/Kernel/MenuLinkContentCacheabilityBubblingTest.php
index f5d7e7f804c3..7bfd96a34ae3 100644
--- a/core/modules/menu_link_content/tests/src/Kernel/MenuLinkContentCacheabilityBubblingTest.php
+++ b/core/modules/menu_link_content/tests/src/Kernel/MenuLinkContentCacheabilityBubblingTest.php
@@ -58,7 +58,7 @@ protected function setUp(): void {
   /**
    * Tests bubbleable metadata of menu links' outbound route/path processing.
    */
-  public function testOutboundPathAndRouteProcessing() {
+  public function testOutboundPathAndRouteProcessing(): void {
     $request_stack = \Drupal::requestStack();
     /** @var \Symfony\Component\Routing\RequestContext $request_context */
     $request_context = \Drupal::service('router.request_context');
diff --git a/core/modules/menu_link_content/tests/src/Kernel/MenuLinkContentDeriverTest.php b/core/modules/menu_link_content/tests/src/Kernel/MenuLinkContentDeriverTest.php
index 581bcdb5688b..8bc185f00e7d 100644
--- a/core/modules/menu_link_content/tests/src/Kernel/MenuLinkContentDeriverTest.php
+++ b/core/modules/menu_link_content/tests/src/Kernel/MenuLinkContentDeriverTest.php
@@ -41,7 +41,7 @@ protected function setUp(): void {
   /**
    * Tests the rediscovering.
    */
-  public function testRediscover() {
+  public function testRediscover(): void {
     \Drupal::state()->set('menu_link_content_dynamic_route.routes', [
       'route_name_1' => new Route('/example-path'),
     ]);
diff --git a/core/modules/menu_link_content/tests/src/Kernel/MenuLinksTest.php b/core/modules/menu_link_content/tests/src/Kernel/MenuLinksTest.php
index 015a8ff86f9e..0c296462639e 100644
--- a/core/modules/menu_link_content/tests/src/Kernel/MenuLinksTest.php
+++ b/core/modules/menu_link_content/tests/src/Kernel/MenuLinksTest.php
@@ -138,7 +138,7 @@ public function assertMenuLinkParents(array $links, array $expected_hierarchy):
   /**
    * Assert that a link entity's created timestamp is set.
    */
-  public function testCreateLink() {
+  public function testCreateLink(): void {
     $options = [
       'menu_name' => 'menu-test',
       'bundle' => 'menu_link_content',
@@ -162,7 +162,7 @@ public function testCreateLink() {
   /**
    * Tests that menu link pointing to entities get removed on entity remove.
    */
-  public function testMenuLinkOnEntityDelete() {
+  public function testMenuLinkOnEntityDelete(): void {
 
     // Create user.
     $user = User::create(['name' => 'username']);
@@ -211,7 +211,7 @@ public function testMenuLinkOnEntityDelete() {
   /**
    * Tests automatic reparenting of menu links.
    */
-  public function testMenuLinkReparenting($module = 'menu_test') {
+  public function testMenuLinkReparenting($module = 'menu_test'): void {
     // Check the initial hierarchy.
     $links = $this->createLinkHierarchy($module);
 
@@ -277,7 +277,7 @@ public function testMenuLinkReparenting($module = 'menu_test') {
   /**
    * Tests the MenuLinkContent::preDelete function.
    */
-  public function testMenuLinkContentReparenting() {
+  public function testMenuLinkContentReparenting(): void {
     // Add new menu items in a hierarchy.
     $parent = MenuLinkContent::create([
       'title' => $this->randomMachineName(8),
@@ -311,7 +311,7 @@ public function testMenuLinkContentReparenting() {
   /**
    * Tests uninstalling a module providing default links.
    */
-  public function testModuleUninstalledMenuLinks() {
+  public function testModuleUninstalledMenuLinks(): void {
     \Drupal::service('module_installer')->install(['menu_test']);
     \Drupal::service('plugin.manager.menu.link')->rebuild();
     $menu_links = $this->menuLinkManager->loadLinksByRoute('menu_test.menu_test');
@@ -331,7 +331,7 @@ public function testModuleUninstalledMenuLinks() {
    *
    * @covers \Drupal\menu_link_content\Plugin\Validation\Constraint\MenuTreeHierarchyConstraintValidator::validate
    */
-  public function testPendingRevisions() {
+  public function testPendingRevisions(): void {
     /** @var \Drupal\Core\Entity\RevisionableStorageInterface $storage */
     $storage = \Drupal::entityTypeManager()->getStorage('menu_link_content');
 
diff --git a/core/modules/menu_link_content/tests/src/Kernel/Migrate/MigrateMenuLinkContentStubTest.php b/core/modules/menu_link_content/tests/src/Kernel/Migrate/MigrateMenuLinkContentStubTest.php
index 446bf7bf9556..27ec1a7c148b 100644
--- a/core/modules/menu_link_content/tests/src/Kernel/Migrate/MigrateMenuLinkContentStubTest.php
+++ b/core/modules/menu_link_content/tests/src/Kernel/Migrate/MigrateMenuLinkContentStubTest.php
@@ -32,7 +32,7 @@ protected function setUp(): void {
   /**
    * Tests creation of menu link content stubs.
    */
-  public function testStub() {
+  public function testStub(): void {
     $this->performStubTest('menu_link_content');
   }
 
diff --git a/core/modules/menu_link_content/tests/src/Kernel/Migrate/d6/MigrateMenuLinkLocalizedTest.php b/core/modules/menu_link_content/tests/src/Kernel/Migrate/d6/MigrateMenuLinkLocalizedTest.php
index 90cbc597370c..69726693722d 100644
--- a/core/modules/menu_link_content/tests/src/Kernel/Migrate/d6/MigrateMenuLinkLocalizedTest.php
+++ b/core/modules/menu_link_content/tests/src/Kernel/Migrate/d6/MigrateMenuLinkLocalizedTest.php
@@ -49,7 +49,7 @@ protected function setUp(): void {
   /**
    * Tests migration of menu link localized translations.
    */
-  public function testMenuLinkLocalized() {
+  public function testMenuLinkLocalized(): void {
     // A localized menu link.
     $this->assertEntity('463', 'fr', 'fr - Test 1', 'secondary-links', 'fr - Test menu link 1', TRUE, FALSE, [
       'attributes' => ['title' => 'fr - Test menu link 1'],
diff --git a/core/modules/menu_link_content/tests/src/Kernel/Migrate/d6/MigrateMenuLinkTest.php b/core/modules/menu_link_content/tests/src/Kernel/Migrate/d6/MigrateMenuLinkTest.php
index 95433e265c4c..81cbcdcbdb3a 100644
--- a/core/modules/menu_link_content/tests/src/Kernel/Migrate/d6/MigrateMenuLinkTest.php
+++ b/core/modules/menu_link_content/tests/src/Kernel/Migrate/d6/MigrateMenuLinkTest.php
@@ -87,7 +87,7 @@ protected function assertEntity(string $id, string $title, string $menu, ?string
   /**
    * Tests migration of menu links.
    */
-  public function testMenuLinks() {
+  public function testMenuLinks(): void {
     $this->assertEntity('138', 'Test 1', 'secondary-links', 'Test menu link 1', TRUE, FALSE, ['attributes' => ['title' => 'Test menu link 1'], 'langcode' => 'en'], 'internal:/user/login', -50);
     $this->assertEntity('139', 'Test 2', 'secondary-links', 'Test menu link 2', TRUE, TRUE, ['query' => ['foo' => 'bar'], 'attributes' => ['title' => 'Test menu link 2']], 'internal:/admin', -49);
     $this->assertEntity('140', 'Drupal.org', 'secondary-links', NULL, TRUE, FALSE, ['attributes' => ['title' => '']], 'https://www.drupal.org', -50);
diff --git a/core/modules/menu_link_content/tests/src/Kernel/Migrate/d6/MigrateMenuLinkTranslationTest.php b/core/modules/menu_link_content/tests/src/Kernel/Migrate/d6/MigrateMenuLinkTranslationTest.php
index 786c8348f1a2..3156baf14cf5 100644
--- a/core/modules/menu_link_content/tests/src/Kernel/Migrate/d6/MigrateMenuLinkTranslationTest.php
+++ b/core/modules/menu_link_content/tests/src/Kernel/Migrate/d6/MigrateMenuLinkTranslationTest.php
@@ -46,7 +46,7 @@ protected function setUp(): void {
   /**
    * Tests migration of menu links.
    */
-  public function testMenuLinks() {
+  public function testMenuLinks(): void {
     /** @var \Drupal\menu_link_content\Entity\MenuLinkContent $menu_link */
     $menu_link = MenuLinkContent::load(139)->getTranslation('fr');
     $this->assertInstanceOf(MenuLinkContent::class, $menu_link);
diff --git a/core/modules/menu_link_content/tests/src/Kernel/Migrate/d7/MigrateMenuLinkLocalizedTest.php b/core/modules/menu_link_content/tests/src/Kernel/Migrate/d7/MigrateMenuLinkLocalizedTest.php
index b85984a95d97..45f47c24a94f 100644
--- a/core/modules/menu_link_content/tests/src/Kernel/Migrate/d7/MigrateMenuLinkLocalizedTest.php
+++ b/core/modules/menu_link_content/tests/src/Kernel/Migrate/d7/MigrateMenuLinkLocalizedTest.php
@@ -46,7 +46,7 @@ protected function setUp(): void {
   /**
    * Tests migration of menu link localized translations.
    */
-  public function testMenuLinkLocalized() {
+  public function testMenuLinkLocalized(): void {
     // A translate and localize menu, menu-test-menu.
     $this->assertEntity(468, 'en', 'Yahoo', 'menu-test-menu', 'english description', TRUE, FALSE, ['attributes' => ['title' => 'english description'], 'alter' => TRUE], 'http://yahoo.com', 0);
     $this->assertEntity(468, 'fr', 'fr - Yahoo', 'menu-test-menu', 'fr - description', TRUE, FALSE, ['attributes' => ['title' => 'english description'], 'alter' => TRUE], 'http://yahoo.com', 0);
diff --git a/core/modules/menu_link_content/tests/src/Kernel/Migrate/d7/MigrateMenuLinkTest.php b/core/modules/menu_link_content/tests/src/Kernel/Migrate/d7/MigrateMenuLinkTest.php
index c7eb0bfd3d72..fa6575736891 100644
--- a/core/modules/menu_link_content/tests/src/Kernel/Migrate/d7/MigrateMenuLinkTest.php
+++ b/core/modules/menu_link_content/tests/src/Kernel/Migrate/d7/MigrateMenuLinkTest.php
@@ -60,7 +60,7 @@ protected function setUp(): void {
   /**
    * Tests migration of menu links.
    */
-  public function testMenuLinks() {
+  public function testMenuLinks(): void {
     $this->assertEntity(469, 'und', 'Bing', static::MENU_NAME, 'Bing', TRUE, FALSE, ['attributes' => ['title' => 'Bing']], 'http://bing.com', 0);
     // This link has an i18n translation so the language is changed to the
     // default language of the source site.
diff --git a/core/modules/menu_link_content/tests/src/Kernel/Migrate/d7/MigrateMenuLinkTranslationTest.php b/core/modules/menu_link_content/tests/src/Kernel/Migrate/d7/MigrateMenuLinkTranslationTest.php
index bdc27f5c296e..855a5bdeda35 100644
--- a/core/modules/menu_link_content/tests/src/Kernel/Migrate/d7/MigrateMenuLinkTranslationTest.php
+++ b/core/modules/menu_link_content/tests/src/Kernel/Migrate/d7/MigrateMenuLinkTranslationTest.php
@@ -46,7 +46,7 @@ protected function setUp(): void {
   /**
    * Tests migration of menu link translations.
    */
-  public function testMenuLinkTranslation() {
+  public function testMenuLinkTranslation(): void {
     $this->assertEntity(467, 'fr', 'fr - Google', 'menu-test-menu', 'fr - Google description', TRUE, FALSE, ['attributes' => ['title' => 'Google']], 'http://google.com', 0);
   }
 
diff --git a/core/modules/menu_link_content/tests/src/Kernel/PathAliasMenuLinkContentTest.php b/core/modules/menu_link_content/tests/src/Kernel/PathAliasMenuLinkContentTest.php
index 6ea6d2d922df..3c52968e4c73 100644
--- a/core/modules/menu_link_content/tests/src/Kernel/PathAliasMenuLinkContentTest.php
+++ b/core/modules/menu_link_content/tests/src/Kernel/PathAliasMenuLinkContentTest.php
@@ -49,7 +49,7 @@ protected function setUp(): void {
   /**
    * Tests the path aliasing changing.
    */
-  public function testPathAliasChange() {
+  public function testPathAliasChange(): void {
     $path_alias = $this->createPathAlias('/test-page', '/my-blog');
     $menu_link_content = MenuLinkContent::create([
       'title' => 'Menu title',
diff --git a/core/modules/menu_link_content/tests/src/Kernel/Plugin/migrate/process/LinkUriTest.php b/core/modules/menu_link_content/tests/src/Kernel/Plugin/migrate/process/LinkUriTest.php
index 89b04e1412ef..ad32b4211b8e 100644
--- a/core/modules/menu_link_content/tests/src/Kernel/Plugin/migrate/process/LinkUriTest.php
+++ b/core/modules/menu_link_content/tests/src/Kernel/Plugin/migrate/process/LinkUriTest.php
@@ -51,7 +51,7 @@ protected function setUp(): void {
    *
    * @covers ::transform
    */
-  public function testRouted($value, $expected) {
+  public function testRouted($value, $expected): void {
     $actual = $this->doTransform($value);
     $this->assertSame($expected, $actual);
   }
@@ -92,7 +92,7 @@ public static function providerTestRouted() {
    *
    * @dataProvider providerTestNotRouted
    */
-  public function testNotRouted($value, $exception_message) {
+  public function testNotRouted($value, $exception_message): void {
     $this->expectException(MigrateException::class);
     $this->expectExceptionMessage($exception_message);
     $this->doTransform($value);
@@ -137,7 +137,7 @@ public static function providerTestNotRouted() {
    *
    * @covers ::transform
    */
-  public function testDisablingRouteValidation($value, $expected) {
+  public function testDisablingRouteValidation($value, $expected): void {
     // Create a node so we have a valid route.
     Node::create([
       'nid' => 1,
diff --git a/core/modules/menu_link_content/tests/src/Unit/MenuLinkContentEntityAccessTest.php b/core/modules/menu_link_content/tests/src/Unit/MenuLinkContentEntityAccessTest.php
index 0c718a0ff048..5aaf8e8059b6 100644
--- a/core/modules/menu_link_content/tests/src/Unit/MenuLinkContentEntityAccessTest.php
+++ b/core/modules/menu_link_content/tests/src/Unit/MenuLinkContentEntityAccessTest.php
@@ -27,7 +27,7 @@ class MenuLinkContentEntityAccessTest extends UnitTestCase {
    *
    * @covers ::checkAccess
    */
-  public function testUnrecognizedOperation() {
+  public function testUnrecognizedOperation(): void {
     $entityType = $this->createMock(EntityTypeInterface::class);
     $accessManager = $this->createMock(AccessManagerInterface::class);
     $moduleHandler = $this->createMock(ModuleHandlerInterface::class);
diff --git a/core/modules/menu_link_content/tests/src/Unit/MenuLinkPluginTest.php b/core/modules/menu_link_content/tests/src/Unit/MenuLinkPluginTest.php
index 871214664c1b..e9f8b4ff61e0 100644
--- a/core/modules/menu_link_content/tests/src/Unit/MenuLinkPluginTest.php
+++ b/core/modules/menu_link_content/tests/src/Unit/MenuLinkPluginTest.php
@@ -17,7 +17,7 @@ class MenuLinkPluginTest extends UnitTestCase {
   /**
    * @covers ::getUuid
    */
-  public function testGetInstanceReflection() {
+  public function testGetInstanceReflection(): void {
     /** @var \Drupal\menu_link_content\Plugin\Menu\MenuLinkContent $menu_link_content_plugin */
     $menu_link_content_plugin = $this->prophesize(MenuLinkContent::class);
     $menu_link_content_plugin->getDerivativeId()->willReturn('test_id');
diff --git a/core/modules/menu_ui/tests/src/Functional/MenuCacheTagsTest.php b/core/modules/menu_ui/tests/src/Functional/MenuCacheTagsTest.php
index c20df4062d10..216b68ef6801 100644
--- a/core/modules/menu_ui/tests/src/Functional/MenuCacheTagsTest.php
+++ b/core/modules/menu_ui/tests/src/Functional/MenuCacheTagsTest.php
@@ -32,7 +32,7 @@ class MenuCacheTagsTest extends PageCacheTagsTestBase {
    * Tests the following cache tags:
    * - "menu:<menu ID>"
    */
-  public function testMenuBlock() {
+  public function testMenuBlock(): void {
     $url = Url::fromRoute('test_page_test.test_page');
 
     // Create a Llama menu, add a link to it and place the corresponding block.
diff --git a/core/modules/menu_ui/tests/src/Functional/MenuLinkReorderTest.php b/core/modules/menu_ui/tests/src/Functional/MenuLinkReorderTest.php
index 6dbfea266455..bb4e239f66ed 100644
--- a/core/modules/menu_ui/tests/src/Functional/MenuLinkReorderTest.php
+++ b/core/modules/menu_ui/tests/src/Functional/MenuLinkReorderTest.php
@@ -35,7 +35,7 @@ class MenuLinkReorderTest extends BrowserTestBase {
   /**
    * Tests creating, editing, deleting menu links via node form widget.
    */
-  public function testDefaultMenuLinkReorder() {
+  public function testDefaultMenuLinkReorder(): void {
 
     // Add the main menu block.
     $this->drupalPlaceBlock('system_menu_block:main');
diff --git a/core/modules/menu_ui/tests/src/Functional/MenuUiContentModerationTest.php b/core/modules/menu_ui/tests/src/Functional/MenuUiContentModerationTest.php
index cc80401f27c7..4b9d8a6217e5 100644
--- a/core/modules/menu_ui/tests/src/Functional/MenuUiContentModerationTest.php
+++ b/core/modules/menu_ui/tests/src/Functional/MenuUiContentModerationTest.php
@@ -58,7 +58,7 @@ protected function setUp(): void {
   /**
    * Tests that node drafts can not modify the menu settings.
    */
-  public function testMenuUiWithPendingRevisions() {
+  public function testMenuUiWithPendingRevisions(): void {
     $editor = $this->drupalCreateUser([
       'administer nodes',
       'administer menu',
@@ -194,7 +194,7 @@ public function testMenuUiWithPendingRevisions() {
   /**
    * Tests that unpublished content can be selected through the menu UI.
    */
-  public function testMenuUiWithUnpublishedContent() {
+  public function testMenuUiWithUnpublishedContent(): void {
     $editor_with_unpublished_content_access = $this->drupalCreateUser([
       'administer nodes',
       'administer menu',
diff --git a/core/modules/menu_ui/tests/src/Functional/MenuUiContentTranslationTest.php b/core/modules/menu_ui/tests/src/Functional/MenuUiContentTranslationTest.php
index b280f8c0e134..cd619295b7c7 100644
--- a/core/modules/menu_ui/tests/src/Functional/MenuUiContentTranslationTest.php
+++ b/core/modules/menu_ui/tests/src/Functional/MenuUiContentTranslationTest.php
@@ -120,7 +120,7 @@ public static function provideChangeContentToPseudoLanguageData() {
    *
    * @dataProvider provideChangeContentToPseudoLanguageData
    */
-  public function testChangeContentToPseudoLanguage($langcode) {
+  public function testChangeContentToPseudoLanguage($langcode): void {
     $node_title = 'Test node';
     $menu_link_title_en = 'Test menu link EN';
     $menu_link_title_pseudo = 'Test menu link PSEUDO';
diff --git a/core/modules/menu_ui/tests/src/Functional/MenuUiLanguageTest.php b/core/modules/menu_ui/tests/src/Functional/MenuUiLanguageTest.php
index 626ea46215d8..d7e66741bf2c 100644
--- a/core/modules/menu_ui/tests/src/Functional/MenuUiLanguageTest.php
+++ b/core/modules/menu_ui/tests/src/Functional/MenuUiLanguageTest.php
@@ -60,7 +60,7 @@ protected function setUp(): void {
   /**
    * Tests menu language settings and the defaults for menu link items.
    */
-  public function testMenuLanguage() {
+  public function testMenuLanguage(): void {
     // Create a test menu to test the various language-related settings.
     // Machine name has to be lowercase.
     $menu_name = $this->randomMachineName(16);
diff --git a/core/modules/menu_ui/tests/src/Functional/MenuUiNodeTest.php b/core/modules/menu_ui/tests/src/Functional/MenuUiNodeTest.php
index bbebee16c31a..b880c6049c34 100644
--- a/core/modules/menu_ui/tests/src/Functional/MenuUiNodeTest.php
+++ b/core/modules/menu_ui/tests/src/Functional/MenuUiNodeTest.php
@@ -77,7 +77,7 @@ protected function setUp(): void {
   /**
    * Tests creating, editing, deleting menu links via node form widget.
    */
-  public function testMenuNodeFormWidget() {
+  public function testMenuNodeFormWidget(): void {
     // Verify that cacheability metadata is bubbled from the menu link tree
     // access checking that is performed when determining the "default parent
     // item" options in menu_ui_form_node_type_form_alter(). The "log out" link
@@ -286,7 +286,7 @@ public function testMenuNodeFormWidget() {
   /**
    * Testing correct loading and saving of menu links via node form widget in a multilingual environment.
    */
-  public function testMultilingualMenuNodeFormWidget() {
+  public function testMultilingualMenuNodeFormWidget(): void {
     // Setup languages.
     $langcodes = ['de'];
     foreach ($langcodes as $langcode) {
@@ -376,7 +376,7 @@ public function testMultilingualMenuNodeFormWidget() {
   /**
    * Tests creating menu links via node form widget for nodes with grants.
    */
-  public function testMenuNodeWithGrantsFormWidget() {
+  public function testMenuNodeWithGrantsFormWidget(): void {
     \Drupal::service('module_installer')->install(['node_access_test']);
     node_access_rebuild();
     $this->assertTrue(\Drupal::moduleHandler()->hasImplementations('node_grants'));
diff --git a/core/modules/menu_ui/tests/src/Functional/MenuUiTest.php b/core/modules/menu_ui/tests/src/Functional/MenuUiTest.php
index 4e7393391192..c7cca3ed5d5f 100644
--- a/core/modules/menu_ui/tests/src/Functional/MenuUiTest.php
+++ b/core/modules/menu_ui/tests/src/Functional/MenuUiTest.php
@@ -113,7 +113,7 @@ protected function setUp(): void {
   /**
    * Tests menu functionality using the admin and user interfaces.
    */
-  public function testMenuAdministration() {
+  public function testMenuAdministration(): void {
     // Log in the user.
     $this->drupalLogin($this->adminUser);
     $this->items = [];
@@ -615,7 +615,7 @@ public function doMenuTests() {
   /**
    * Test logout link isn't displayed when the user is logged out.
    */
-  public function testLogoutLinkVisibility() {
+  public function testLogoutLinkVisibility(): void {
     $adminUserWithLinkAnyPage = $this->drupalCreateUser([
       'access administration pages',
       'administer blocks',
@@ -654,7 +654,7 @@ protected function doMenuLinkFormDefaultsTest() {
   /**
    * Adds and removes a menu link with a query string and fragment.
    */
-  public function testMenuQueryAndFragment() {
+  public function testMenuQueryAndFragment(): void {
     $this->drupalLogin($this->adminUser);
 
     // Make a path with query and fragment on.
@@ -689,7 +689,7 @@ public function testMenuQueryAndFragment() {
   /**
    * Tests renaming the built-in menu.
    */
-  public function testSystemMenuRename() {
+  public function testSystemMenuRename(): void {
     $this->drupalLogin($this->adminUser);
     $edit = [
       'label' => $this->randomMachineName(16),
@@ -707,7 +707,7 @@ public function testSystemMenuRename() {
   /**
    * Tests that menu items pointing to unpublished nodes are editable.
    */
-  public function testUnpublishedNodeMenuItem() {
+  public function testUnpublishedNodeMenuItem(): void {
     $this->drupalLogin($this->drupalCreateUser([
       'access administration pages',
       'administer blocks',
@@ -1056,7 +1056,7 @@ public function enableMenuLink(MenuLinkContent $item) {
   /**
    * Tests if admin users, other than UID1, can access parents AJAX callback.
    */
-  public function testMenuParentsJsAccess() {
+  public function testMenuParentsJsAccess(): void {
     $this->drupalLogin($this->drupalCreateUser(['administer menu']));
     // Just check access to the callback overall, the POST data is irrelevant.
     $this->drupalGet('admin/structure/menu/parents', ['query' => [MainContentViewSubscriber::WRAPPER_FORMAT => 'drupal_ajax']], ['X-Requested-With: XMLHttpRequest']);
@@ -1072,7 +1072,7 @@ public function testMenuParentsJsAccess() {
   /**
    * Tests the "expand all items" feature.
    */
-  public function testExpandAllItems() {
+  public function testExpandAllItems(): void {
     $this->drupalLogin($this->adminUser);
     $menu = $this->addCustomMenu();
     $node = $this->drupalCreateNode(['type' => 'article']);
@@ -1195,7 +1195,7 @@ protected function doTestMenuBlock() {
   /**
    * Tests that menu links with pending revisions can not be re-parented.
    */
-  public function testMenuUiWithPendingRevisions() {
+  public function testMenuUiWithPendingRevisions(): void {
     $this->drupalLogin($this->adminUser);
     $assert_session = $this->assertSession();
 
@@ -1239,7 +1239,7 @@ public function testMenuUiWithPendingRevisions() {
   /**
    * Tests the user login/logout links.
    */
-  public function testUserLoginUserLogoutLinks() {
+  public function testUserLoginUserLogoutLinks(): void {
     MenuLinkContent::create([
       'menu' => 'tools',
       'link' => [
diff --git a/core/modules/menu_ui/tests/src/Functional/MenuUninstallTest.php b/core/modules/menu_ui/tests/src/Functional/MenuUninstallTest.php
index 2e37dd7c78b2..f7193dd08861 100644
--- a/core/modules/menu_ui/tests/src/Functional/MenuUninstallTest.php
+++ b/core/modules/menu_ui/tests/src/Functional/MenuUninstallTest.php
@@ -29,7 +29,7 @@ class MenuUninstallTest extends BrowserTestBase {
   /**
    * Tests Menu uninstall.
    */
-  public function testMenuUninstall() {
+  public function testMenuUninstall(): void {
     \Drupal::service('module_installer')->uninstall(['menu_ui']);
 
     \Drupal::entityTypeManager()->getStorage('menu')->resetCache(['admin']);
diff --git a/core/modules/menu_ui/tests/src/FunctionalJavascript/MenuUiJavascriptTest.php b/core/modules/menu_ui/tests/src/FunctionalJavascript/MenuUiJavascriptTest.php
index 547161c321eb..a174b7a33c1f 100644
--- a/core/modules/menu_ui/tests/src/FunctionalJavascript/MenuUiJavascriptTest.php
+++ b/core/modules/menu_ui/tests/src/FunctionalJavascript/MenuUiJavascriptTest.php
@@ -39,7 +39,7 @@ class MenuUiJavascriptTest extends WebDriverTestBase {
   /**
    * Tests the contextual links on a menu block.
    */
-  public function testBlockContextualLinks() {
+  public function testBlockContextualLinks(): void {
     $this->drupalLogin($this->drupalCreateUser([
       'administer menu',
       'access contextual links',
diff --git a/core/modules/menu_ui/tests/src/Kernel/Migrate/MigrateMenuSettingsTest.php b/core/modules/menu_ui/tests/src/Kernel/Migrate/MigrateMenuSettingsTest.php
index e6c09084f93e..f999699a0319 100644
--- a/core/modules/menu_ui/tests/src/Kernel/Migrate/MigrateMenuSettingsTest.php
+++ b/core/modules/menu_ui/tests/src/Kernel/Migrate/MigrateMenuSettingsTest.php
@@ -24,7 +24,7 @@ protected function setUp(): void {
     $this->executeMigration('menu_settings');
   }
 
-  public function testMigration() {
+  public function testMigration(): void {
     $this->assertTrue(\Drupal::config('menu_ui.settings')->get('override_parent_selector'));
   }
 
diff --git a/core/modules/migrate/tests/src/Functional/MigrateNoMigrateDrupalTest.php b/core/modules/migrate/tests/src/Functional/MigrateNoMigrateDrupalTest.php
index 5c725d4f607d..926337cca38f 100644
--- a/core/modules/migrate/tests/src/Functional/MigrateNoMigrateDrupalTest.php
+++ b/core/modules/migrate/tests/src/Functional/MigrateNoMigrateDrupalTest.php
@@ -45,7 +45,7 @@ protected function setUp(): void {
   /**
    * Tests execution of a migration.
    */
-  public function testExecutionNoMigrateDrupal() {
+  public function testExecutionNoMigrateDrupal(): void {
     $this->drupalGet('/migrate_no_migrate_drupal_test/execute');
     $this->assertSession()->pageTextContains('Migration was successful.');
     $node_1 = Node::load(1);
diff --git a/core/modules/migrate/tests/src/Functional/process/DownloadFunctionalTest.php b/core/modules/migrate/tests/src/Functional/process/DownloadFunctionalTest.php
index fd805e9a4448..e3da55e64a3d 100644
--- a/core/modules/migrate/tests/src/Functional/process/DownloadFunctionalTest.php
+++ b/core/modules/migrate/tests/src/Functional/process/DownloadFunctionalTest.php
@@ -31,7 +31,7 @@ class DownloadFunctionalTest extends BrowserTestBase {
   /**
    * Tests that an exception is thrown bu migration continues with the next row.
    */
-  public function testExceptionThrow() {
+  public function testExceptionThrow(): void {
     $invalid_url = "{$this->baseUrl}/not-existent-404";
     $valid_url = "{$this->baseUrl}/core/misc/favicon.ico";
 
diff --git a/core/modules/migrate/tests/src/Kernel/HighWaterTest.php b/core/modules/migrate/tests/src/Kernel/HighWaterTest.php
index c2b92150ca5b..35fdf14d6d93 100644
--- a/core/modules/migrate/tests/src/Kernel/HighWaterTest.php
+++ b/core/modules/migrate/tests/src/Kernel/HighWaterTest.php
@@ -88,7 +88,7 @@ protected function setUp(): void {
   /**
    * Tests high water property of SqlBase.
    */
-  public function testHighWater() {
+  public function testHighWater(): void {
     // Assert all of the nodes have been imported.
     $this->assertNodeExists('Item 1');
     $this->assertNodeExists('Item 2');
@@ -143,7 +143,7 @@ public function testHighWater() {
   /**
    * Tests that the high water value can be 0.
    */
-  public function testZeroHighwater() {
+  public function testZeroHighwater(): void {
     // Assert all of the nodes have been imported.
     $this->assertNodeExists('Item 1');
     $this->assertNodeExists('Item 2');
@@ -176,7 +176,7 @@ public function testZeroHighwater() {
   /**
    * Tests that deleting the high water value causes all rows to be reimported.
    */
-  public function testNullHighwater() {
+  public function testNullHighwater(): void {
     // Assert all of the nodes have been imported.
     $this->assertNodeExists('Item 1');
     $this->assertNodeExists('Item 2');
@@ -209,7 +209,7 @@ public function testNullHighwater() {
   /**
    * Tests high water property of SqlBase when rows marked for update.
    */
-  public function testHighWaterUpdate() {
+  public function testHighWaterUpdate(): void {
     // Assert all of the nodes have been imported.
     $this->assertNodeExists('Item 1');
     $this->assertNodeExists('Item 2');
diff --git a/core/modules/migrate/tests/src/Kernel/MigrateBundleTest.php b/core/modules/migrate/tests/src/Kernel/MigrateBundleTest.php
index 23444fad3765..2e336c933a1f 100644
--- a/core/modules/migrate/tests/src/Kernel/MigrateBundleTest.php
+++ b/core/modules/migrate/tests/src/Kernel/MigrateBundleTest.php
@@ -38,7 +38,7 @@ protected function setUp(): void {
   /**
    * Tests setting the bundle in the destination.
    */
-  public function testDestinationBundle() {
+  public function testDestinationBundle(): void {
     $term_data_rows = [
       ['id' => 1, 'name' => 'Category 1'],
     ];
@@ -75,7 +75,7 @@ public function testDestinationBundle() {
   /**
    * Tests setting the bundle in the process pipeline.
    */
-  public function testProcessBundle() {
+  public function testProcessBundle(): void {
     $term_data_rows = [
       ['id' => 1, 'vocab' => 'categories', 'name' => 'Category 1'],
       ['id' => 2, 'vocab' => 'tags', 'name' => 'Tag 1'],
@@ -115,7 +115,7 @@ public function testProcessBundle() {
   /**
    * Tests setting bundles both in process and destination.
    */
-  public function testMixedBundles() {
+  public function testMixedBundles(): void {
     $term_data_rows = [
       ['id' => 1, 'vocab' => 'categories', 'name' => 'Category 1'],
       ['id' => 2, 'name' => 'Tag 1'],
diff --git a/core/modules/migrate/tests/src/Kernel/MigrateConfigRollbackTest.php b/core/modules/migrate/tests/src/Kernel/MigrateConfigRollbackTest.php
index 77519c38606d..ad535fb20125 100644
--- a/core/modules/migrate/tests/src/Kernel/MigrateConfigRollbackTest.php
+++ b/core/modules/migrate/tests/src/Kernel/MigrateConfigRollbackTest.php
@@ -23,7 +23,7 @@ class MigrateConfigRollbackTest extends MigrateTestBase {
   /**
    * Tests rolling back configuration.
    */
-  public function testConfigRollback() {
+  public function testConfigRollback(): void {
     // Use system.site configuration to demonstrate importing and rolling back
     // configuration.
     $variable = [
diff --git a/core/modules/migrate/tests/src/Kernel/MigrateEmbeddedDataTest.php b/core/modules/migrate/tests/src/Kernel/MigrateEmbeddedDataTest.php
index ff4a49e9e697..3a07a281d99a 100644
--- a/core/modules/migrate/tests/src/Kernel/MigrateEmbeddedDataTest.php
+++ b/core/modules/migrate/tests/src/Kernel/MigrateEmbeddedDataTest.php
@@ -23,7 +23,7 @@ class MigrateEmbeddedDataTest extends KernelTestBase {
   /**
    * Tests the embedded_data source plugin.
    */
-  public function testEmbeddedData() {
+  public function testEmbeddedData(): void {
     $data_rows = [
       ['key' => '1', 'field1' => 'f1value1', 'field2' => 'f2value1'],
       ['key' => '2', 'field1' => 'f1value2', 'field2' => 'f2value2'],
diff --git a/core/modules/migrate/tests/src/Kernel/MigrateEntityContentBaseTest.php b/core/modules/migrate/tests/src/Kernel/MigrateEntityContentBaseTest.php
index ebba72f8180a..aec71c6fbb7a 100644
--- a/core/modules/migrate/tests/src/Kernel/MigrateEntityContentBaseTest.php
+++ b/core/modules/migrate/tests/src/Kernel/MigrateEntityContentBaseTest.php
@@ -109,7 +109,7 @@ protected function createDestination(array $configuration) {
   /**
    * Tests importing and rolling back translated entities.
    */
-  public function testTranslated() {
+  public function testTranslated(): void {
     // Create a destination.
     $this->createDestination(['translations' => TRUE]);
 
@@ -176,7 +176,7 @@ public function testTranslated() {
   /**
    * Tests creation of ID columns table with definitions taken from entity type.
    */
-  public function testEntityWithStringId() {
+  public function testEntityWithStringId(): void {
     $this->enableModules(['migrate_entity_test']);
     $this->installEntitySchema('migrate_string_id_entity_test');
 
@@ -222,7 +222,7 @@ public function testEntityWithStringId() {
   /**
    * Tests empty destinations.
    */
-  public function testEmptyDestinations() {
+  public function testEmptyDestinations(): void {
     $this->enableModules(['migrate_entity_test']);
     $this->installEntitySchema('migrate_string_id_entity_test');
 
@@ -283,7 +283,7 @@ public function testEmptyDestinations() {
   /**
    * Tests stub rows.
    */
-  public function testStubRows() {
+  public function testStubRows(): void {
     // Create a destination.
     $this->createDestination([]);
 
diff --git a/core/modules/migrate/tests/src/Kernel/MigrateEntityContentValidationTest.php b/core/modules/migrate/tests/src/Kernel/MigrateEntityContentValidationTest.php
index 8759491ceebe..719f9bf8d1d1 100644
--- a/core/modules/migrate/tests/src/Kernel/MigrateEntityContentValidationTest.php
+++ b/core/modules/migrate/tests/src/Kernel/MigrateEntityContentValidationTest.php
@@ -64,7 +64,7 @@ protected function setUp(): void {
   /**
    * Tests an import with invalid data and checks error messages.
    */
-  public function test1() {
+  public function test1(): void {
     // Make sure that a user with uid 2 exists.
     $this->container
       ->get('entity_type.manager')
@@ -119,7 +119,7 @@ public function test1() {
   /**
    * Tests an import with invalid data and checks error messages.
    */
-  public function test2() {
+  public function test2(): void {
     $long_username = $this->randomString(61);
     $username_constraint = new UserNameConstraint();
 
@@ -162,7 +162,7 @@ public function test2() {
   /**
    * Tests validation for entities that are instances of EntityOwnerInterface.
    */
-  public function testEntityOwnerValidation() {
+  public function testEntityOwnerValidation(): void {
     // Text format access is impacted by user permissions.
     $filter_test_format = FilterFormat::load('filter_test');
     assert($filter_test_format instanceof FilterFormatInterface);
diff --git a/core/modules/migrate/tests/src/Kernel/MigrateEventsTest.php b/core/modules/migrate/tests/src/Kernel/MigrateEventsTest.php
index b60bbfb935ef..ee758359047b 100644
--- a/core/modules/migrate/tests/src/Kernel/MigrateEventsTest.php
+++ b/core/modules/migrate/tests/src/Kernel/MigrateEventsTest.php
@@ -57,7 +57,7 @@ protected function setUp(): void {
   /**
    * Tests migration events.
    */
-  public function testMigrateEvents() {
+  public function testMigrateEvents(): void {
     // Run a simple little migration, which should trigger one of each event
     // other than map_delete.
     $definition = [
diff --git a/core/modules/migrate/tests/src/Kernel/MigrateExecutableTest.php b/core/modules/migrate/tests/src/Kernel/MigrateExecutableTest.php
index 4fbcb9550edc..c42db1e98091 100644
--- a/core/modules/migrate/tests/src/Kernel/MigrateExecutableTest.php
+++ b/core/modules/migrate/tests/src/Kernel/MigrateExecutableTest.php
@@ -30,7 +30,7 @@ protected function setUp(): void {
   /**
    * Tests the MigrateExecutable class.
    */
-  public function testMigrateExecutable() {
+  public function testMigrateExecutable(): void {
     $data_rows = [
       ['key' => '1', 'field1' => 'f1value1', 'field2' => 'f2value1'],
       ['key' => '2', 'field1' => 'f1value2', 'field2' => 'f2value2'],
diff --git a/core/modules/migrate/tests/src/Kernel/MigrateExternalTranslatedTest.php b/core/modules/migrate/tests/src/Kernel/MigrateExternalTranslatedTest.php
index cc9c2aa4564b..9a8cb82563af 100644
--- a/core/modules/migrate/tests/src/Kernel/MigrateExternalTranslatedTest.php
+++ b/core/modules/migrate/tests/src/Kernel/MigrateExternalTranslatedTest.php
@@ -54,7 +54,7 @@ protected function setUp(): void {
   /**
    * Tests importing and rolling back our data.
    */
-  public function testMigrations() {
+  public function testMigrations(): void {
     /** @var \Drupal\Core\Entity\ContentEntityStorageInterface $storage */
     $storage = $this->container->get('entity_type.manager')->getStorage('node');
     $this->assertCount(0, $storage->loadMultiple());
diff --git a/core/modules/migrate/tests/src/Kernel/MigrateInterruptionTest.php b/core/modules/migrate/tests/src/Kernel/MigrateInterruptionTest.php
index f1453020b79f..a501470e4fcd 100644
--- a/core/modules/migrate/tests/src/Kernel/MigrateInterruptionTest.php
+++ b/core/modules/migrate/tests/src/Kernel/MigrateInterruptionTest.php
@@ -36,7 +36,7 @@ protected function setUp(): void {
   /**
    * Tests migration interruptions.
    */
-  public function testMigrateEvents() {
+  public function testMigrateEvents(): void {
     // Run a simple little migration, which should trigger one of each event
     // other than map_delete.
     $definition = [
diff --git a/core/modules/migrate/tests/src/Kernel/MigrateLookupTest.php b/core/modules/migrate/tests/src/Kernel/MigrateLookupTest.php
index cbc58e4159fa..cc38eb55212e 100644
--- a/core/modules/migrate/tests/src/Kernel/MigrateLookupTest.php
+++ b/core/modules/migrate/tests/src/Kernel/MigrateLookupTest.php
@@ -51,7 +51,7 @@ protected function setUp(): void {
   /**
    * Tests scenarios around single id lookups.
    */
-  public function testSingleLookup() {
+  public function testSingleLookup(): void {
     $this->executeMigration('sample_lookup_migration');
 
     // Test numerically indexed source id.
@@ -70,7 +70,7 @@ public function testSingleLookup() {
   /**
    * Tests an invalid lookup.
    */
-  public function testInvalidIdLookup() {
+  public function testInvalidIdLookup(): void {
     $this->executeMigration('sample_lookup_migration');
     $this->expectException(MigrateException::class);
     $this->expectExceptionMessage("Extra unknown items for map migrate_map_sample_lookup_migration in source IDs: array (\n  'invalid_id' => 25,\n)");
@@ -82,7 +82,7 @@ public function testInvalidIdLookup() {
   /**
    * Tests lookups with multiple source ids.
    */
-  public function testMultipleSourceIds() {
+  public function testMultipleSourceIds(): void {
     $this->executeMigration('sample_lookup_migration_multiple_source_ids');
 
     // Test with full set of numerically indexed source ids.
@@ -128,7 +128,7 @@ public function testMultipleSourceIds() {
    * @throws \Drupal\Component\Plugin\Exception\PluginException
    * @throws \Drupal\migrate\MigrateException
    */
-  public function testMultipleMigrationLookup() {
+  public function testMultipleMigrationLookup(): void {
     $migrations = [
       'sample_lookup_migration',
       'sample_lookup_migration_2',
@@ -153,7 +153,7 @@ public function testMultipleMigrationLookup() {
   /**
    * Tests a lookup with string source ids.
    */
-  public function testLookupWithStringIds() {
+  public function testLookupWithStringIds(): void {
     $this->executeMigration('sample_lookup_migration_string_ids');
 
     // Test numerically indexed source id.
diff --git a/core/modules/migrate/tests/src/Kernel/MigrateMessageTest.php b/core/modules/migrate/tests/src/Kernel/MigrateMessageTest.php
index 603df93fa843..26b89ecda804 100644
--- a/core/modules/migrate/tests/src/Kernel/MigrateMessageTest.php
+++ b/core/modules/migrate/tests/src/Kernel/MigrateMessageTest.php
@@ -79,7 +79,7 @@ protected function setUp(): void {
   /**
    * Tests migration interruptions.
    */
-  public function testMessagesNotTeed() {
+  public function testMessagesNotTeed(): void {
     // We don't ask for messages to be teed, so don't expect any.
     $executable = new MigrateExecutable($this->migration, $this);
     $executable->import();
@@ -89,7 +89,7 @@ public function testMessagesNotTeed() {
   /**
    * Tests migration interruptions.
    */
-  public function testMessagesTeed() {
+  public function testMessagesTeed(): void {
     // Ask to receive any messages sent to the idmap.
     \Drupal::service('event_dispatcher')->addListener(MigrateEvents::IDMAP_MESSAGE,
       [$this, 'mapMessageRecorder']);
@@ -106,7 +106,7 @@ public function testMessagesTeed() {
    * This method returns an iterator of StdClass objects. Check that these
    * objects have the expected keys.
    */
-  public function testGetMessages() {
+  public function testGetMessages(): void {
     $id = $this->migration->getPluginId();
     $expected_message = (object) [
       'src_name' => 'source_message',
diff --git a/core/modules/migrate/tests/src/Kernel/MigrateProcessErrorMessagesTest.php b/core/modules/migrate/tests/src/Kernel/MigrateProcessErrorMessagesTest.php
index e4ff4bc1d480..53717f98be2f 100644
--- a/core/modules/migrate/tests/src/Kernel/MigrateProcessErrorMessagesTest.php
+++ b/core/modules/migrate/tests/src/Kernel/MigrateProcessErrorMessagesTest.php
@@ -99,7 +99,7 @@ protected function setUp(): void {
   /**
    * Tests format of map messages saved from plugin exceptions.
    */
-  public function testProcessErrorMessage() {
+  public function testProcessErrorMessage(): void {
     $this->definition['process']['error']['plugin'] = 'test_error';
 
     $this->idMap->saveMessage(['id' => 1], "process_errors_migration:error:test_error: Process exception.", MigrationInterface::MESSAGE_ERROR)->shouldBeCalled();
@@ -119,7 +119,7 @@ public function testProcessErrorMessage() {
    * plugins while being executed inside a sub_process pipeline as they
    * bubble up to the main migration.
    */
-  public function testSubProcessErrorMessage() {
+  public function testSubProcessErrorMessage(): void {
     $this->definition['process']['subprocess_error'] = [
       'plugin' => 'sub_process',
       'source' => 'my_property',
diff --git a/core/modules/migrate/tests/src/Kernel/MigrateRollbackEntityConfigTest.php b/core/modules/migrate/tests/src/Kernel/MigrateRollbackEntityConfigTest.php
index 000561f902c5..2bf89c3fe379 100644
--- a/core/modules/migrate/tests/src/Kernel/MigrateRollbackEntityConfigTest.php
+++ b/core/modules/migrate/tests/src/Kernel/MigrateRollbackEntityConfigTest.php
@@ -42,7 +42,7 @@ protected function setUp(): void {
   /**
    * Tests rolling back configuration entity translations.
    */
-  public function testConfigEntityRollback() {
+  public function testConfigEntityRollback(): void {
     // We use vocabularies to demonstrate importing and rolling back
     // configuration entities with translations. First, import vocabularies.
     $vocabulary_data_rows = [
diff --git a/core/modules/migrate/tests/src/Kernel/MigrateRollbackTest.php b/core/modules/migrate/tests/src/Kernel/MigrateRollbackTest.php
index f9f2523f917d..21739cc9eae8 100644
--- a/core/modules/migrate/tests/src/Kernel/MigrateRollbackTest.php
+++ b/core/modules/migrate/tests/src/Kernel/MigrateRollbackTest.php
@@ -37,7 +37,7 @@ protected function setUp(): void {
   /**
    * Tests rolling back configuration and content entities.
    */
-  public function testRollback() {
+  public function testRollback(): void {
     // We use vocabularies to demonstrate importing and rolling back
     // configuration entities.
     $vocabulary_data_rows = [
diff --git a/core/modules/migrate/tests/src/Kernel/MigrateSkipRowTest.php b/core/modules/migrate/tests/src/Kernel/MigrateSkipRowTest.php
index 01c57be9fb5b..50a8d555b282 100644
--- a/core/modules/migrate/tests/src/Kernel/MigrateSkipRowTest.php
+++ b/core/modules/migrate/tests/src/Kernel/MigrateSkipRowTest.php
@@ -26,7 +26,7 @@ class MigrateSkipRowTest extends KernelTestBase {
   /**
    * Tests migration interruptions.
    */
-  public function testPrepareRowSkip() {
+  public function testPrepareRowSkip(): void {
     // Run a simple little migration with two data rows which should be skipped
     // in different ways.
     $definition = [
diff --git a/core/modules/migrate/tests/src/Kernel/MigrateSourceTestBase.php b/core/modules/migrate/tests/src/Kernel/MigrateSourceTestBase.php
index 5c74d6e582d6..95d62ce50d49 100644
--- a/core/modules/migrate/tests/src/Kernel/MigrateSourceTestBase.php
+++ b/core/modules/migrate/tests/src/Kernel/MigrateSourceTestBase.php
@@ -146,7 +146,7 @@ protected function getPlugin(array $configuration) {
    *
    * @dataProvider providerSource
    */
-  public function testSource(array $source_data, array $expected_data, $expected_count = NULL, array $configuration = [], $high_water = NULL) {
+  public function testSource(array $source_data, array $expected_data, $expected_count = NULL, array $configuration = [], $high_water = NULL): void {
     $plugin = $this->getPlugin($configuration);
     $clone_plugin = clone $plugin;
 
diff --git a/core/modules/migrate/tests/src/Kernel/MigrateSqlSourceTestBase.php b/core/modules/migrate/tests/src/Kernel/MigrateSqlSourceTestBase.php
index f8191e642abb..68330c078d7b 100644
--- a/core/modules/migrate/tests/src/Kernel/MigrateSqlSourceTestBase.php
+++ b/core/modules/migrate/tests/src/Kernel/MigrateSqlSourceTestBase.php
@@ -88,7 +88,7 @@ protected function getDatabase(array $source_data) {
    *
    * @requires extension pdo_sqlite
    */
-  public function testSource(array $source_data, array $expected_data, $expected_count = NULL, array $configuration = [], $high_water = NULL, $expected_cache_key = NULL) {
+  public function testSource(array $source_data, array $expected_data, $expected_count = NULL, array $configuration = [], $high_water = NULL, $expected_cache_key = NULL): void {
     $plugin = $this->getPlugin($configuration);
 
     // Since we don't yet inject the database connection, we need to use a
diff --git a/core/modules/migrate/tests/src/Kernel/MigrateStatusTest.php b/core/modules/migrate/tests/src/Kernel/MigrateStatusTest.php
index 862b6630dbbe..9c37c91bbbb3 100644
--- a/core/modules/migrate/tests/src/Kernel/MigrateStatusTest.php
+++ b/core/modules/migrate/tests/src/Kernel/MigrateStatusTest.php
@@ -16,7 +16,7 @@ class MigrateStatusTest extends MigrateTestBase {
   /**
    * Tests different connection types.
    */
-  public function testStatus() {
+  public function testStatus(): void {
     // Create a minimally valid migration.
     $definition = [
       'id' => 'migrate_status_test',
diff --git a/core/modules/migrate/tests/src/Kernel/MigrateStubTest.php b/core/modules/migrate/tests/src/Kernel/MigrateStubTest.php
index e2544533b0ba..ec313786788d 100644
--- a/core/modules/migrate/tests/src/Kernel/MigrateStubTest.php
+++ b/core/modules/migrate/tests/src/Kernel/MigrateStubTest.php
@@ -68,7 +68,7 @@ protected function setUp(): void {
   /**
    * Tests stub creation.
    */
-  public function testCreateStub() {
+  public function testCreateStub(): void {
     $this->assertSame([], $this->migrateLookup->lookup('sample_stubbing_migration', [17]));
     $ids = $this->migrateStub->createStub('sample_stubbing_migration', [17]);
     $this->assertSame([$ids], $this->migrateLookup->lookup('sample_stubbing_migration', [17]));
@@ -78,7 +78,7 @@ public function testCreateStub() {
   /**
    * Tests raw stub creation.
    */
-  public function testCreateStubRawReturn() {
+  public function testCreateStubRawReturn(): void {
     $this->assertSame([], $this->migrateLookup->lookup('sample_stubbing_migration', [17]));
     $ids = $this->migrateStub->createStub('sample_stubbing_migration', [17], [], FALSE);
     $this->assertSame($ids, [$this->migrateLookup->lookup('sample_stubbing_migration', [17])[0]['nid']]);
@@ -88,7 +88,7 @@ public function testCreateStubRawReturn() {
   /**
    * Tests stub creation with default values.
    */
-  public function testStubWithDefaultValues() {
+  public function testStubWithDefaultValues(): void {
     $this->assertSame([], $this->migrateLookup->lookup('sample_stubbing_migration', [17]));
     $ids = $this->migrateStub->createStub('sample_stubbing_migration', [17], ['title' => "Placeholder for source id 17"]);
     $this->assertSame([$ids], $this->migrateLookup->lookup('sample_stubbing_migration', [17]));
@@ -106,7 +106,7 @@ public function testStubWithDefaultValues() {
   /**
    * Tests stub creation with bundle fields.
    */
-  public function testStubWithBundleFields() {
+  public function testStubWithBundleFields(): void {
     $this->createContentType(['type' => 'node_stub']);
     // Make "Body" field required to make stubbing populate field value.
     $body_field = FieldConfig::loadByName('node', 'node_stub', 'body');
@@ -124,7 +124,7 @@ public function testStubWithBundleFields() {
   /**
    * Tests invalid source id count.
    */
-  public function testInvalidSourceIdCount() {
+  public function testInvalidSourceIdCount(): void {
     $this->expectException(\InvalidArgumentException::class);
     $this->expectExceptionMessage('Expected and provided source id counts do not match.');
     $this->migrateStub->createStub('sample_stubbing_migration_with_multiple_source_ids', [17]);
@@ -133,7 +133,7 @@ public function testInvalidSourceIdCount() {
   /**
    * Tests invalid source ids keys.
    */
-  public function testInvalidSourceIdKeys() {
+  public function testInvalidSourceIdKeys(): void {
     $this->expectException(\InvalidArgumentException::class);
     $this->expectExceptionMessage("'version_id' is defined as a source ID but has no value.");
     $this->migrateStub->createStub('sample_stubbing_migration_with_multiple_source_ids', ['id' => 17, 'not_a_key' => 17]);
diff --git a/core/modules/migrate/tests/src/Kernel/MigrationPluginManagerTest.php b/core/modules/migrate/tests/src/Kernel/MigrationPluginManagerTest.php
index f6b702ed0562..ce8e85a13786 100644
--- a/core/modules/migrate/tests/src/Kernel/MigrationPluginManagerTest.php
+++ b/core/modules/migrate/tests/src/Kernel/MigrationPluginManagerTest.php
@@ -40,7 +40,7 @@ protected function setUp(): void {
    *
    * @dataProvider providerCreateInstanceByTag
    */
-  public function testCreateInstancesByTag($tags, $expected) {
+  public function testCreateInstancesByTag($tags, $expected): void {
     // The test module includes a migration that does not use the migration_tags
     // property. It is there to confirm that it is not included in the results.
     // We create it to ensure it is a valid migration.
diff --git a/core/modules/migrate/tests/src/Kernel/MigrationTest.php b/core/modules/migrate/tests/src/Kernel/MigrationTest.php
index a6d147d891e7..45987063194a 100644
--- a/core/modules/migrate/tests/src/Kernel/MigrationTest.php
+++ b/core/modules/migrate/tests/src/Kernel/MigrationTest.php
@@ -27,7 +27,7 @@ class MigrationTest extends KernelTestBase {
    *
    * @covers ::set
    */
-  public function testSetInvalidation() {
+  public function testSetInvalidation(): void {
     $migration = \Drupal::service('plugin.manager.migration')->createStubMigration([
       'source' => ['plugin' => 'empty'],
       'destination' => ['plugin' => 'entity:entity_view_mode'],
diff --git a/core/modules/migrate/tests/src/Kernel/Plugin/EntityExistsTest.php b/core/modules/migrate/tests/src/Kernel/Plugin/EntityExistsTest.php
index ee124adffc61..9614b7adc3ff 100644
--- a/core/modules/migrate/tests/src/Kernel/Plugin/EntityExistsTest.php
+++ b/core/modules/migrate/tests/src/Kernel/Plugin/EntityExistsTest.php
@@ -32,7 +32,7 @@ protected function setUp(): void {
   /**
    * Tests the EntityExists plugin.
    */
-  public function testEntityExists() {
+  public function testEntityExists(): void {
     $user = User::create([
       'name' => $this->randomString(),
     ]);
diff --git a/core/modules/migrate/tests/src/Kernel/Plugin/EntityRevisionTest.php b/core/modules/migrate/tests/src/Kernel/Plugin/EntityRevisionTest.php
index 67f706fd0498..af01b70ef872 100644
--- a/core/modules/migrate/tests/src/Kernel/Plugin/EntityRevisionTest.php
+++ b/core/modules/migrate/tests/src/Kernel/Plugin/EntityRevisionTest.php
@@ -48,7 +48,7 @@ protected function setUp(): void {
   /**
    * Tests that EntityRevision correctly handles revision translations.
    */
-  public function testRevisionTranslation() {
+  public function testRevisionTranslation(): void {
     ConfigurableLanguage::createFromLangcode('fr')->save();
 
     /** @var \Drupal\node\NodeInterface $node */
diff --git a/core/modules/migrate/tests/src/Kernel/Plugin/LogTest.php b/core/modules/migrate/tests/src/Kernel/Plugin/LogTest.php
index 043a5fa3ba39..2462874287f1 100644
--- a/core/modules/migrate/tests/src/Kernel/Plugin/LogTest.php
+++ b/core/modules/migrate/tests/src/Kernel/Plugin/LogTest.php
@@ -69,7 +69,7 @@ protected function setUp(): void {
   /**
    * Tests the Log plugin.
    */
-  public function testLog() {
+  public function testLog(): void {
     $values = [
       'nid' => 2,
       'type' => 'page',
diff --git a/core/modules/migrate/tests/src/Kernel/Plugin/MigrationPluginConfigurationTest.php b/core/modules/migrate/tests/src/Kernel/Plugin/MigrationPluginConfigurationTest.php
index e53a72a5715f..489684a48e85 100644
--- a/core/modules/migrate/tests/src/Kernel/Plugin/MigrationPluginConfigurationTest.php
+++ b/core/modules/migrate/tests/src/Kernel/Plugin/MigrationPluginConfigurationTest.php
@@ -30,7 +30,7 @@ class MigrationPluginConfigurationTest extends KernelTestBase {
    *
    * @dataProvider mergeProvider
    */
-  public function testConfigurationMerge($id, $configuration, $expected) {
+  public function testConfigurationMerge($id, $configuration, $expected): void {
     /** @var \Drupal\migrate\Plugin\MigrationInterface $migration */
     $migration = $this->container->get('plugin.manager.migration')
       ->createInstance($id, $configuration);
diff --git a/core/modules/migrate/tests/src/Kernel/Plugin/MigrationPluginListTest.php b/core/modules/migrate/tests/src/Kernel/Plugin/MigrationPluginListTest.php
index 5b3c2199e2e5..cd318fdd23d3 100644
--- a/core/modules/migrate/tests/src/Kernel/Plugin/MigrationPluginListTest.php
+++ b/core/modules/migrate/tests/src/Kernel/Plugin/MigrationPluginListTest.php
@@ -67,7 +67,7 @@ protected function setUp(): void {
   /**
    * @covers ::getDefinitions
    */
-  public function testGetDefinitions() {
+  public function testGetDefinitions(): void {
     // Create an entity reference field to make sure that migrations derived by
     // EntityReferenceTranslationDeriver do not get discovered without
     // migrate_drupal enabled.
diff --git a/core/modules/migrate/tests/src/Kernel/Plugin/MigrationProvidersExistTest.php b/core/modules/migrate/tests/src/Kernel/Plugin/MigrationProvidersExistTest.php
index 6aba47f61f9c..151931e8f3ef 100644
--- a/core/modules/migrate/tests/src/Kernel/Plugin/MigrationProvidersExistTest.php
+++ b/core/modules/migrate/tests/src/Kernel/Plugin/MigrationProvidersExistTest.php
@@ -24,7 +24,7 @@ class MigrationProvidersExistTest extends MigrateDrupalTestBase {
   /**
    * Tests that a missing source_module property raises an exception.
    */
-  public function testSourceProvider() {
+  public function testSourceProvider(): void {
     $this->enableModules(['migration_provider_test']);
     $this->expectException(BadPluginDefinitionException::class);
     $this->expectExceptionMessage('The no_source_module plugin must define the source_module property.');
@@ -34,7 +34,7 @@ public function testSourceProvider() {
   /**
    * Tests that modules exist for all source plugins.
    */
-  public function testProvidersExist() {
+  public function testProvidersExist(): void {
     $this->enableAllModules();
 
     /** @var \Drupal\migrate\Plugin\MigrateSourcePluginManager $plugin_manager */
@@ -61,7 +61,7 @@ protected function enableAllModules() {
   /**
    * Tests that modules exist for all field plugins.
    */
-  public function testFieldProvidersExist() {
+  public function testFieldProvidersExist(): void {
     $expected_mappings = [
       'userreference' => [
         'source_module' => 'userreference',
@@ -176,7 +176,7 @@ public function testFieldProvidersExist() {
    *
    * @dataProvider fieldPluginDefinitionsProvider
    */
-  public function testFieldProviderMissingRequiredProperty(array $definitions, $missing_property) {
+  public function testFieldProviderMissingRequiredProperty(array $definitions, $missing_property): void {
     $discovery = $this->getMockBuilder(MigrateFieldPluginManager::class)
       ->disableOriginalConstructor()
       ->onlyMethods(['getDefinitions'])
diff --git a/core/modules/migrate/tests/src/Kernel/Plugin/MigrationTest.php b/core/modules/migrate/tests/src/Kernel/Plugin/MigrationTest.php
index 4d38ee6a0c4c..6724b8196c4b 100644
--- a/core/modules/migrate/tests/src/Kernel/Plugin/MigrationTest.php
+++ b/core/modules/migrate/tests/src/Kernel/Plugin/MigrationTest.php
@@ -26,7 +26,7 @@ class MigrationTest extends KernelTestBase {
    *
    * @covers ::getProcessPlugins
    */
-  public function testGetProcessPlugins() {
+  public function testGetProcessPlugins(): void {
     $migration = \Drupal::service('plugin.manager.migration')->createStubMigration([]);
     $this->assertEquals([], $migration->getProcessPlugins([]));
   }
@@ -36,7 +36,7 @@ public function testGetProcessPlugins() {
    *
    * @covers ::getProcessPlugins
    */
-  public function testGetProcessPluginsException() {
+  public function testGetProcessPluginsException(): void {
     $migration = \Drupal::service('plugin.manager.migration')->createStubMigration([]);
     $this->expectException(MigrateException::class);
     $this->expectExceptionMessage('Invalid process configuration for foobar');
@@ -83,7 +83,7 @@ public static function getProcessPluginsExceptionMessageProvider(): \Generator {
    *
    * @covers ::getMigrationDependencies
    */
-  public function testGetMigrationDependencies() {
+  public function testGetMigrationDependencies(): void {
     $plugin_manager = \Drupal::service('plugin.manager.migration');
     $plugin_definition = [
       'id' => 'foo',
@@ -140,7 +140,7 @@ public function testGetMigrationDependencies() {
    *
    * @covers ::getDestinationIds
    */
-  public function testGetDestinationIds() {
+  public function testGetDestinationIds(): void {
     $migration = \Drupal::service('plugin.manager.migration')->createStubMigration(['destinationIds' => ['foo' => 'bar']]);
     $destination_ids = $migration->getDestinationIds();
     $this->assertNotEmpty($destination_ids, 'Destination ids are not empty');
@@ -152,7 +152,7 @@ public function testGetDestinationIds() {
    *
    * @covers ::getDestinationPlugin
    */
-  public function testGetDestinationPlugin() {
+  public function testGetDestinationPlugin(): void {
     $migration = \Drupal::service('plugin.manager.migration')->createStubMigration(['destination' => ['no_stub' => TRUE]]);
     $this->expectException(MigrateSkipRowException::class);
     $this->expectExceptionMessage("Stub requested but not made because no_stub configuration is set.");
diff --git a/core/modules/migrate/tests/src/Kernel/Plugin/id_map/SqlTest.php b/core/modules/migrate/tests/src/Kernel/Plugin/id_map/SqlTest.php
index b195b1586d77..88d681747896 100644
--- a/core/modules/migrate/tests/src/Kernel/Plugin/id_map/SqlTest.php
+++ b/core/modules/migrate/tests/src/Kernel/Plugin/id_map/SqlTest.php
@@ -83,7 +83,7 @@ protected function setUp(): void {
    *
    * @dataProvider providerTestEnsureTables
    */
-  public function testEnsureTables($ids) {
+  public function testEnsureTables($ids): void {
     $this->migrationDefinition['source']['ids'] = $ids;
     $migration = $this->migrationPluginManager->createStubMigration($this->migrationDefinition);
 
@@ -137,7 +137,7 @@ public static function providerTestEnsureTables() {
    *
    * @dataProvider providerTestFailEnsureTables
    */
-  public function testFailEnsureTables($ids) {
+  public function testFailEnsureTables($ids): void {
     // This just tests mysql, as other PDO integrations allow longer indexes.
     if (Database::getConnection()->databaseType() !== 'mysql') {
       $this->markTestSkipped("This test only runs for MySQL");
diff --git a/core/modules/migrate/tests/src/Kernel/Plugin/source/MigrationSourceCacheTest.php b/core/modules/migrate/tests/src/Kernel/Plugin/source/MigrationSourceCacheTest.php
index 8cf3e2124530..436c181c00d2 100644
--- a/core/modules/migrate/tests/src/Kernel/Plugin/source/MigrationSourceCacheTest.php
+++ b/core/modules/migrate/tests/src/Kernel/Plugin/source/MigrationSourceCacheTest.php
@@ -37,7 +37,7 @@ protected function setUp(): void {
   /**
    * Tests that counts for the same plugin_id are not crossed.
    */
-  public function testCacheCountsNotContaminated() {
+  public function testCacheCountsNotContaminated(): void {
     $migration_1_definition = [
       'source' => [
         'plugin' => 'cacheable_embedded_data',
@@ -91,7 +91,7 @@ public function testCacheCountsNotContaminated() {
   /**
    * Test that values are pulled from the cache when appropriate.
    */
-  public function testCacheCountsUsed() {
+  public function testCacheCountsUsed(): void {
     $migration_definition = [
       'source' => [
         'plugin' => 'cacheable_embedded_data',
diff --git a/core/modules/migrate/tests/src/Kernel/QueryBatchTest.php b/core/modules/migrate/tests/src/Kernel/QueryBatchTest.php
index 9d5d35abff97..9c3d04ffffe9 100644
--- a/core/modules/migrate/tests/src/Kernel/QueryBatchTest.php
+++ b/core/modules/migrate/tests/src/Kernel/QueryBatchTest.php
@@ -59,7 +59,7 @@ protected function setUp(): void {
   /**
    * Tests a negative batch size throws an exception.
    */
-  public function testBatchSizeNegative() {
+  public function testBatchSizeNegative(): void {
     $this->expectException(MigrateException::class);
     $this->expectExceptionMessage('batch_size must be greater than or equal to zero');
     $plugin = $this->getPlugin(['batch_size' => -1]);
@@ -69,7 +69,7 @@ public function testBatchSizeNegative() {
   /**
    * Tests a non integer batch size throws an exception.
    */
-  public function testBatchSizeNonInteger() {
+  public function testBatchSizeNonInteger(): void {
     $this->expectException(MigrateException::class);
     $this->expectExceptionMessage('batch_size must be greater than or equal to zero');
     $plugin = $this->getPlugin(['batch_size' => '1']);
@@ -151,7 +151,7 @@ public static function queryDataProvider() {
    *
    * @dataProvider queryDataProvider
    */
-  public function testQueryBatch($source_data, $expected_data, $num_rows, $configuration, $expected_batch_size, $expected_batch_count) {
+  public function testQueryBatch($source_data, $expected_data, $num_rows, $configuration, $expected_batch_size, $expected_batch_count): void {
     $plugin = $this->getPlugin($configuration);
 
     // Since we don't yet inject the database connection, we need to use a
diff --git a/core/modules/migrate/tests/src/Kernel/SqlBaseTest.php b/core/modules/migrate/tests/src/Kernel/SqlBaseTest.php
index 958bfc1320e9..24cf0e760f3d 100644
--- a/core/modules/migrate/tests/src/Kernel/SqlBaseTest.php
+++ b/core/modules/migrate/tests/src/Kernel/SqlBaseTest.php
@@ -39,7 +39,7 @@ protected function setUp(): void {
   /**
    * Tests different connection types.
    */
-  public function testConnectionTypes() {
+  public function testConnectionTypes(): void {
     $sql_base = new TestSqlBase([], $this->migration);
 
     // Verify that falling back to the default 'migrate' connection (defined in
@@ -160,7 +160,7 @@ public function testBrokenConnection(): void {
    *
    * @dataProvider highWaterDataProvider
    */
-  public function testHighWater($high_water = NULL, array $query_result = []) {
+  public function testHighWater($high_water = NULL, array $query_result = []): void {
     $configuration = [
       'high_water_property' => [
         'name' => 'order',
diff --git a/core/modules/migrate/tests/src/Kernel/TrackChangesTest.php b/core/modules/migrate/tests/src/Kernel/TrackChangesTest.php
index 8618db5d1ecb..0cd0d18f4d6b 100644
--- a/core/modules/migrate/tests/src/Kernel/TrackChangesTest.php
+++ b/core/modules/migrate/tests/src/Kernel/TrackChangesTest.php
@@ -91,7 +91,7 @@ protected function setUp(): void {
   /**
    * Tests track changes property of SqlBase.
    */
-  public function testTrackChanges() {
+  public function testTrackChanges(): void {
     // Assert all of the terms have been imported.
     $this->assertTermExists('name', 'Item 1');
     $this->assertTermExists('name', 'Item 2');
diff --git a/core/modules/migrate/tests/src/Kernel/process/DownloadTest.php b/core/modules/migrate/tests/src/Kernel/process/DownloadTest.php
index e16d7c01b72e..b11e3c43a6e0 100644
--- a/core/modules/migrate/tests/src/Kernel/process/DownloadTest.php
+++ b/core/modules/migrate/tests/src/Kernel/process/DownloadTest.php
@@ -35,7 +35,7 @@ protected function setUp(): void {
   /**
    * Tests a download that overwrites an existing local file.
    */
-  public function testOverwritingDownload() {
+  public function testOverwritingDownload(): void {
     // Create a pre-existing file at the destination.
     $destination_uri = $this->createUri('existing_file.txt');
 
@@ -48,7 +48,7 @@ public function testOverwritingDownload() {
   /**
    * Tests a download that renames the downloaded file if there's a collision.
    */
-  public function testNonDestructiveDownload() {
+  public function testNonDestructiveDownload(): void {
     // Create a pre-existing file at the destination.
     $destination_uri = $this->createUri('another_existing_file.txt');
 
@@ -61,7 +61,7 @@ public function testNonDestructiveDownload() {
   /**
    * Tests that an exception is thrown if the destination URI is not writable.
    */
-  public function testWriteProtectedDestination() {
+  public function testWriteProtectedDestination(): void {
     // Create a pre-existing file at the destination.
     $destination_uri = $this->createUri('not-writable.txt');
 
diff --git a/core/modules/migrate/tests/src/Kernel/process/ExtractTest.php b/core/modules/migrate/tests/src/Kernel/process/ExtractTest.php
index da857278af04..d59696fb1e6c 100644
--- a/core/modules/migrate/tests/src/Kernel/process/ExtractTest.php
+++ b/core/modules/migrate/tests/src/Kernel/process/ExtractTest.php
@@ -63,7 +63,7 @@ public function getDefinition() {
    * @param array $expected_data
    *   The expected results.
    */
-  public function testMultipleValueExplode(array $source_data, array $expected_data) {
+  public function testMultipleValueExplode(array $source_data, array $expected_data): void {
     $definition = $this->getDefinition();
     $definition['source']['data_rows'] = [$source_data];
 
diff --git a/core/modules/migrate/tests/src/Kernel/process/FileCopyTest.php b/core/modules/migrate/tests/src/Kernel/process/FileCopyTest.php
index 87cb1ee87290..5cb1067f0030 100644
--- a/core/modules/migrate/tests/src/Kernel/process/FileCopyTest.php
+++ b/core/modules/migrate/tests/src/Kernel/process/FileCopyTest.php
@@ -46,7 +46,7 @@ protected function setUp(): void {
   /**
    * Tests successful imports/copies.
    */
-  public function testSuccessfulCopies() {
+  public function testSuccessfulCopies(): void {
     $file = $this->createUri(NULL, NULL, 'temporary');
     $file_absolute = $this->fileSystem->realpath($file);
     $data_sets = [
@@ -86,7 +86,7 @@ public function testSuccessfulCopies() {
    * @param string $destination_path
    *   The destination path to copy to.
    */
-  public function testSuccessfulReuse($source_path, $destination_path) {
+  public function testSuccessfulReuse($source_path, $destination_path): void {
     $file_reuse = $this->doTransform($source_path, $destination_path);
     clearstatcache(TRUE, $destination_path);
 
@@ -127,7 +127,7 @@ public static function providerSuccessfulReuse() {
   /**
    * Tests successful moves.
    */
-  public function testSuccessfulMoves() {
+  public function testSuccessfulMoves(): void {
     $file_1 = $this->createUri(NULL, NULL, 'temporary');
     $file_1_absolute = $this->fileSystem->realpath($file_1);
     $file_2 = $this->createUri(NULL, NULL, 'temporary');
@@ -162,7 +162,7 @@ public function testSuccessfulMoves() {
   /**
    * Tests that non-existent files throw an exception.
    */
-  public function testNonExistentSourceFile() {
+  public function testNonExistentSourceFile(): void {
     $source = '/non/existent/file';
     $this->expectException(MigrateException::class);
     $this->expectExceptionMessage("File '/non/existent/file' does not exist");
@@ -174,7 +174,7 @@ public function testNonExistentSourceFile() {
    *
    * @covers ::transform
    */
-  public function testNonWritableDestination() {
+  public function testNonWritableDestination(): void {
     $source = $this->createUri('file.txt', NULL, 'temporary');
 
     // Create the parent location.
@@ -199,7 +199,7 @@ public function testNonWritableDestination() {
   /**
    * Tests the 'rename' overwrite mode.
    */
-  public function testRenameFile() {
+  public function testRenameFile(): void {
     $source = $this->createUri(NULL, NULL, 'temporary');
     $destination = $this->createUri('foo.txt', NULL, 'public');
     $expected_destination = 'public://foo_0.txt';
@@ -211,7 +211,7 @@ public function testRenameFile() {
   /**
    * Tests that remote URIs are delegated to the download plugin.
    */
-  public function testDownloadRemoteUri() {
+  public function testDownloadRemoteUri(): void {
     $download_plugin = $this->createMock(MigrateProcessInterface::class);
     $download_plugin->expects($this->once())->method('transform');
 
diff --git a/core/modules/migrate/tests/src/Kernel/process/HandleMultiplesTest.php b/core/modules/migrate/tests/src/Kernel/process/HandleMultiplesTest.php
index 4b48da6e4c4a..83344881e9de 100644
--- a/core/modules/migrate/tests/src/Kernel/process/HandleMultiplesTest.php
+++ b/core/modules/migrate/tests/src/Kernel/process/HandleMultiplesTest.php
@@ -117,7 +117,7 @@ public function getDefinition() {
    * @param array $expected_data
    *   The expected results.
    */
-  public function testScalarAndMultipleValues(array $source_data, array $expected_data) {
+  public function testScalarAndMultipleValues(array $source_data, array $expected_data): void {
     $definition = $this->getDefinition();
     $definition['source']['data_rows'] = [$source_data];
 
diff --git a/core/modules/migrate/tests/src/Kernel/process/RouteTest.php b/core/modules/migrate/tests/src/Kernel/process/RouteTest.php
index 1c0227313811..9e043af333fa 100644
--- a/core/modules/migrate/tests/src/Kernel/process/RouteTest.php
+++ b/core/modules/migrate/tests/src/Kernel/process/RouteTest.php
@@ -39,7 +39,7 @@ class RouteTest extends KernelTestBase {
    *
    * @dataProvider providerTestRoute
    */
-  public function testRoute($value, $expected) {
+  public function testRoute($value, $expected): void {
     $actual = $this->doTransform($value);
     $this->assertSame($expected, $actual);
   }
@@ -200,7 +200,7 @@ public static function providerTestRoute() {
    *
    * @dataProvider providerTestRouteWithParamQuery
    */
-  public function testRouteWithParamQuery($value, $expected) {
+  public function testRouteWithParamQuery($value, $expected): void {
     // Create a user so that user/1/edit is a valid path.
     $this->setUpCurrentUser();
     $this->installConfig(['user']);
diff --git a/core/modules/migrate/tests/src/Unit/Event/EventBaseTest.php b/core/modules/migrate/tests/src/Unit/Event/EventBaseTest.php
index 06632b51c55c..7e3e48b92cbf 100644
--- a/core/modules/migrate/tests/src/Unit/Event/EventBaseTest.php
+++ b/core/modules/migrate/tests/src/Unit/Event/EventBaseTest.php
@@ -19,7 +19,7 @@ class EventBaseTest extends UnitTestCase {
    * @covers ::__construct
    * @covers ::getMigration
    */
-  public function testGetMigration() {
+  public function testGetMigration(): void {
     $migration = $this->prophesize('\Drupal\migrate\Plugin\MigrationInterface')->reveal();
     $message_service = $this->prophesize('\Drupal\migrate\MigrateMessageInterface')->reveal();
     $event = new EventBase($migration, $message_service);
@@ -32,7 +32,7 @@ public function testGetMigration() {
    * @covers ::__construct
    * @covers ::logMessage
    */
-  public function testLogMessage() {
+  public function testLogMessage(): void {
     $migration = $this->prophesize('\Drupal\migrate\Plugin\MigrationInterface')->reveal();
     $message_service = $this->prophesize('\Drupal\migrate\MigrateMessageInterface');
     $event = new EventBase($migration, $message_service->reveal());
diff --git a/core/modules/migrate/tests/src/Unit/Event/MigrateImportEventTest.php b/core/modules/migrate/tests/src/Unit/Event/MigrateImportEventTest.php
index 7a900c883186..d02554744c7a 100644
--- a/core/modules/migrate/tests/src/Unit/Event/MigrateImportEventTest.php
+++ b/core/modules/migrate/tests/src/Unit/Event/MigrateImportEventTest.php
@@ -19,7 +19,7 @@ class MigrateImportEventTest extends UnitTestCase {
    * @covers ::__construct
    * @covers ::getMigration
    */
-  public function testGetMigration() {
+  public function testGetMigration(): void {
     $migration = $this->prophesize('\Drupal\migrate\Plugin\MigrationInterface')->reveal();
     $message_service = $this->prophesize('\Drupal\migrate\MigrateMessageInterface')->reveal();
     $event = new MigrateImportEvent($migration, $message_service);
@@ -32,7 +32,7 @@ public function testGetMigration() {
    * @covers ::__construct
    * @covers ::logMessage
    */
-  public function testLogMessage() {
+  public function testLogMessage(): void {
     $migration = $this->prophesize('\Drupal\migrate\Plugin\MigrationInterface');
     $message_service = $this->prophesize('\Drupal\migrate\MigrateMessageInterface');
     $event = new MigrateImportEvent($migration->reveal(), $message_service->reveal());
diff --git a/core/modules/migrate/tests/src/Unit/Event/MigratePostRowSaveEventTest.php b/core/modules/migrate/tests/src/Unit/Event/MigratePostRowSaveEventTest.php
index 5939bafe53aa..81a8f5a5166d 100644
--- a/core/modules/migrate/tests/src/Unit/Event/MigratePostRowSaveEventTest.php
+++ b/core/modules/migrate/tests/src/Unit/Event/MigratePostRowSaveEventTest.php
@@ -18,7 +18,7 @@ class MigratePostRowSaveEventTest extends EventBaseTest {
    * @covers ::__construct
    * @covers ::getDestinationIdValues
    */
-  public function testGetDestinationIdValues() {
+  public function testGetDestinationIdValues(): void {
     $migration = $this->prophesize('\Drupal\migrate\Plugin\MigrationInterface')->reveal();
     $message_service = $this->prophesize('\Drupal\migrate\MigrateMessageInterface')->reveal();
     $row = $this->prophesize('\Drupal\migrate\Row')->reveal();
@@ -32,7 +32,7 @@ public function testGetDestinationIdValues() {
    * @covers ::__construct
    * @covers ::getRow
    */
-  public function testGetRow() {
+  public function testGetRow(): void {
     $migration = $this->prophesize('\Drupal\migrate\Plugin\MigrationInterface')->reveal();
     $message_service = $this->prophesize('\Drupal\migrate\MigrateMessageInterface');
     $row = $this->prophesize('\Drupal\migrate\Row')->reveal();
diff --git a/core/modules/migrate/tests/src/Unit/Event/MigratePreRowSaveEventTest.php b/core/modules/migrate/tests/src/Unit/Event/MigratePreRowSaveEventTest.php
index b021cca20965..dc3b0671d90d 100644
--- a/core/modules/migrate/tests/src/Unit/Event/MigratePreRowSaveEventTest.php
+++ b/core/modules/migrate/tests/src/Unit/Event/MigratePreRowSaveEventTest.php
@@ -18,7 +18,7 @@ class MigratePreRowSaveEventTest extends EventBaseTest {
    * @covers ::__construct
    * @covers ::getRow
    */
-  public function testGetRow() {
+  public function testGetRow(): void {
     $migration = $this->prophesize('\Drupal\migrate\Plugin\MigrationInterface')->reveal();
     $message_service = $this->prophesize('\Drupal\migrate\MigrateMessageInterface')->reveal();
     $row = $this->prophesize('\Drupal\migrate\Row')->reveal();
diff --git a/core/modules/migrate/tests/src/Unit/Exception/RequirementsExceptionTest.php b/core/modules/migrate/tests/src/Unit/Exception/RequirementsExceptionTest.php
index c68752cfb0a6..6c7043c3f337 100644
--- a/core/modules/migrate/tests/src/Unit/Exception/RequirementsExceptionTest.php
+++ b/core/modules/migrate/tests/src/Unit/Exception/RequirementsExceptionTest.php
@@ -18,7 +18,7 @@ class RequirementsExceptionTest extends UnitTestCase {
   /**
    * @covers ::getRequirements
    */
-  public function testGetRequirements() {
+  public function testGetRequirements(): void {
     $exception = new RequirementsException('Missing requirements ', ['requirements' => static::MISSING_REQUIREMENTS]);
     $this->assertEquals(['requirements' => static::MISSING_REQUIREMENTS], $exception->getRequirements());
   }
@@ -27,7 +27,7 @@ public function testGetRequirements() {
    * @covers ::getRequirementsString
    * @dataProvider getRequirementsProvider
    */
-  public function testGetExceptionString($expected, $message, $requirements) {
+  public function testGetExceptionString($expected, $message, $requirements): void {
     $exception = new RequirementsException($message, $requirements);
     $this->assertEquals($expected, $exception->getRequirementsString());
   }
diff --git a/core/modules/migrate/tests/src/Unit/MigrateExecutableMemoryExceededTest.php b/core/modules/migrate/tests/src/Unit/MigrateExecutableMemoryExceededTest.php
index 85085fed2256..57e1622fadb0 100644
--- a/core/modules/migrate/tests/src/Unit/MigrateExecutableMemoryExceededTest.php
+++ b/core/modules/migrate/tests/src/Unit/MigrateExecutableMemoryExceededTest.php
@@ -98,7 +98,7 @@ protected function runMemoryExceededTest($message, $memory_exceeded, $memory_usa
   /**
    * Tests memoryExceeded method when a new batch is needed.
    */
-  public function testMemoryExceededNewBatch() {
+  public function testMemoryExceededNewBatch(): void {
     // First case try reset and then start new batch.
     $this->runMemoryExceededTest('starting new batch', TRUE);
   }
@@ -106,14 +106,14 @@ public function testMemoryExceededNewBatch() {
   /**
    * Tests memoryExceeded method when enough is cleared.
    */
-  public function testMemoryExceededClearedEnough() {
+  public function testMemoryExceededClearedEnough(): void {
     $this->runMemoryExceededTest('reclaimed enough', FALSE, $this->memoryLimit, $this->memoryLimit * 0.75);
   }
 
   /**
    * Tests memoryExceeded when memory usage is not exceeded.
    */
-  public function testMemoryNotExceeded() {
+  public function testMemoryNotExceeded(): void {
     $this->runMemoryExceededTest('', FALSE, floor($this->memoryLimit * 0.85) - 1);
   }
 
diff --git a/core/modules/migrate/tests/src/Unit/MigrateExecutableTest.php b/core/modules/migrate/tests/src/Unit/MigrateExecutableTest.php
index fdd500aad361..05114d778b5f 100644
--- a/core/modules/migrate/tests/src/Unit/MigrateExecutableTest.php
+++ b/core/modules/migrate/tests/src/Unit/MigrateExecutableTest.php
@@ -79,7 +79,7 @@ protected function setUp(): void {
   /**
    * Tests an import with an incomplete rewinding.
    */
-  public function testImportWithFailingRewind() {
+  public function testImportWithFailingRewind(): void {
     $exception_message = $this->getRandomGenerator()->string();
     $source = $this->createMock('Drupal\migrate\Plugin\MigrateSourceInterface');
     $source->expects($this->once())
@@ -106,7 +106,7 @@ public function testImportWithFailingRewind() {
   /**
    * Tests the import method with a valid row.
    */
-  public function testImportWithValidRow() {
+  public function testImportWithValidRow(): void {
     $source = $this->getMockSource();
 
     $row = $this->getMockBuilder('Drupal\migrate\Row')
@@ -131,7 +131,7 @@ public function testImportWithValidRow() {
   /**
    * Tests the import method with a valid row.
    */
-  public function testImportWithValidRowWithoutDestinationId() {
+  public function testImportWithValidRowWithoutDestinationId(): void {
     $source = $this->getMockSource();
 
     $row = $this->getMockBuilder('Drupal\migrate\Row')
@@ -159,7 +159,7 @@ public function testImportWithValidRowWithoutDestinationId() {
   /**
    * Tests the import method with a valid row.
    */
-  public function testImportWithValidRowNoDestinationValues() {
+  public function testImportWithValidRowNoDestinationValues(): void {
     $source = $this->getMockSource();
 
     $row = $this->getMockBuilder('Drupal\migrate\Row')
@@ -186,7 +186,7 @@ public function testImportWithValidRowNoDestinationValues() {
    *
    * The MigrationException in this case is being thrown from the destination.
    */
-  public function testImportWithValidRowWithDestinationMigrateException() {
+  public function testImportWithValidRowWithDestinationMigrateException(): void {
     $exception_message = $this->getRandomGenerator()->string();
     $source = $this->getMockSource();
 
@@ -214,7 +214,7 @@ public function testImportWithValidRowWithDestinationMigrateException() {
    *
    * The MigrationException in this case is being thrown from a process plugin.
    */
-  public function testImportWithValidRowWithProcesMigrateException() {
+  public function testImportWithValidRowWithProcesMigrateException(): void {
     $exception_message = $this->getRandomGenerator()->string();
     $source = $this->getMockSource();
 
@@ -260,7 +260,7 @@ public function testImportWithValidRowWithProcesMigrateException() {
   /**
    * Tests the import method with a regular Exception being thrown.
    */
-  public function testImportWithValidRowWithException() {
+  public function testImportWithValidRowWithException(): void {
     $exception_message = $this->getRandomGenerator()->string();
     $source = $this->getMockSource();
 
@@ -286,7 +286,7 @@ public function testImportWithValidRowWithException() {
   /**
    * Tests the processRow method.
    */
-  public function testProcessRow() {
+  public function testProcessRow(): void {
     $expected = [
       'test' => 'test destination',
       'test1' => 'test1 destination',
@@ -315,7 +315,7 @@ public function testProcessRow() {
   /**
    * Tests the processRow method with an empty pipeline.
    */
-  public function testProcessRowEmptyPipeline() {
+  public function testProcessRowEmptyPipeline(): void {
     $this->migration->expects($this->once())
       ->method('getProcessPlugins')
       ->with(NULL)
@@ -328,7 +328,7 @@ public function testProcessRowEmptyPipeline() {
   /**
    * Tests the processRow pipeline exception.
    */
-  public function testProcessRowPipelineException() {
+  public function testProcessRowPipelineException(): void {
     $row = new Row();
     $plugin = $this->prophesize(MigrateProcessInterface::class);
     $plugin->getPluginDefinition()->willReturn(['handle_multiples' => FALSE]);
@@ -350,7 +350,7 @@ public function testProcessRowPipelineException() {
   /**
    * Tests a plugin which stops the pipeline.
    */
-  public function testStopPipeline() {
+  public function testStopPipeline(): void {
     $row = new Row();
     // Prophesize a plugin that stops the pipeline and returns 'first_plugin'.
     $stop_plugin = $this->prophesize(MigrateProcessInterface::class);
@@ -377,7 +377,7 @@ public function testStopPipeline() {
   /**
    * Tests a plugin which does not stop the pipeline.
    */
-  public function testContinuePipeline() {
+  public function testContinuePipeline(): void {
     $row = new Row();
     // Prophesize a plugin that does not stop the pipeline.
     $continue_plugin = $this->prophesize(MigrateProcessInterface::class);
@@ -407,7 +407,7 @@ public function testContinuePipeline() {
   /**
    * Tests the processRow method.
    */
-  public function testProcessRowEmptyDestination() {
+  public function testProcessRowEmptyDestination(): void {
     $expected = [
       'test' => 'test destination',
       'test1' => 'test1 destination',
@@ -481,7 +481,7 @@ protected function getMockSource() {
    *
    * @covers ::rollback
    */
-  public function testRollback(array $id_map_records, bool $rollback_called = TRUE, array $source_id_keys = ['source'], array $destination_id_keys = ['destination'], int $expected_result = MigrationInterface::RESULT_COMPLETED) {
+  public function testRollback(array $id_map_records, bool $rollback_called = TRUE, array $source_id_keys = ['source'], array $destination_id_keys = ['destination'], int $expected_result = MigrationInterface::RESULT_COMPLETED): void {
     $id_map = $this
       ->getTestRollbackIdMap($id_map_records, $source_id_keys, $destination_id_keys)
       ->reveal();
diff --git a/core/modules/migrate/tests/src/Unit/MigrateLookupTest.php b/core/modules/migrate/tests/src/Unit/MigrateLookupTest.php
index 7aa4eeeca54e..e5db23be68f0 100644
--- a/core/modules/migrate/tests/src/Unit/MigrateLookupTest.php
+++ b/core/modules/migrate/tests/src/Unit/MigrateLookupTest.php
@@ -26,7 +26,7 @@ class MigrateLookupTest extends MigrateTestCase {
    *
    * @covers ::lookup
    */
-  public function testLookup() {
+  public function testLookup(): void {
     $source_ids = ['id' => '1'];
 
     $destination_ids = [[2]];
@@ -54,7 +54,7 @@ public function testLookup() {
    *
    * @dataProvider providerExceptionOnMigrationNotFound
    */
-  public function testExceptionOnMigrationNotFound($migrations, $message) {
+  public function testExceptionOnMigrationNotFound($migrations, $message): void {
     $migration_plugin_manager = $this->prophesize(MigrationPluginManagerInterface::class);
     $migration_plugin_manager->createInstances($migrations)->willReturn([]);
     $this->expectException(PluginNotFoundException::class);
@@ -84,7 +84,7 @@ public static function providerExceptionOnMigrationNotFound() {
    *
    * @dataProvider providerExceptionOnMultipleMigrationsNotFound
    */
-  public function testExceptionOnMultipleMigrationsNotFound($migrations, $message) {
+  public function testExceptionOnMultipleMigrationsNotFound($migrations, $message): void {
     $migration_plugin_manager = $this->prophesize(MigrationPluginManagerInterface::class);
     $migration_plugin_manager->createInstances($migrations)->willReturn([]);
     $this->expectException(PluginException::class);
diff --git a/core/modules/migrate/tests/src/Unit/MigrateSourceTest.php b/core/modules/migrate/tests/src/Unit/MigrateSourceTest.php
index f8c42d46510d..e853f974203c 100644
--- a/core/modules/migrate/tests/src/Unit/MigrateSourceTest.php
+++ b/core/modules/migrate/tests/src/Unit/MigrateSourceTest.php
@@ -154,7 +154,7 @@ protected function getSource($configuration = [], $migrate_config = [], $status
   /**
    * @covers ::__construct
    */
-  public function testHighwaterTrackChangesIncompatible() {
+  public function testHighwaterTrackChangesIncompatible(): void {
     $source_config = ['track_changes' => TRUE, 'high_water_property' => ['name' => 'something']];
     $this->expectException(MigrateException::class);
     $this->getSource($source_config);
@@ -165,7 +165,7 @@ public function testHighwaterTrackChangesIncompatible() {
    *
    * @covers ::count
    */
-  public function testCount() {
+  public function testCount(): void {
     // Mock the cache to validate set() receives appropriate arguments.
     $container = new ContainerBuilder();
     $cache = $this->createMock(CacheBackendInterface::class);
@@ -203,7 +203,7 @@ public function testCount() {
    *
    * @covers ::count
    */
-  public function testCountCacheKey() {
+  public function testCountCacheKey(): void {
     // Mock the cache to validate set() receives appropriate arguments.
     $container = new ContainerBuilder();
     $cache = $this->createMock(CacheBackendInterface::class);
@@ -220,7 +220,7 @@ public function testCountCacheKey() {
   /**
    * Tests that we don't get a row if prepareRow() is false.
    */
-  public function testPrepareRowFalse() {
+  public function testPrepareRowFalse(): void {
     $source = $this->getSource([], ['prepare_row_false' => TRUE]);
 
     $source->rewind();
@@ -230,7 +230,7 @@ public function testPrepareRowFalse() {
   /**
    * Tests that $row->needsUpdate() works as expected.
    */
-  public function testNextNeedsUpdate() {
+  public function testNextNeedsUpdate(): void {
     $source = $this->getSource();
 
     // $row->needsUpdate() === TRUE so we get a row.
@@ -246,7 +246,7 @@ public function testNextNeedsUpdate() {
   /**
    * Tests that an outdated highwater mark does not cause a row to be imported.
    */
-  public function testOutdatedHighwater() {
+  public function testOutdatedHighwater(): void {
     $configuration = [
       'high_water_property' => [
         'name' => 'timestamp',
@@ -265,7 +265,7 @@ public function testOutdatedHighwater() {
    *
    * @throws \Exception
    */
-  public function testNewHighwater() {
+  public function testNewHighwater(): void {
     $configuration = [
       'high_water_property' => [
         'name' => 'timestamp',
@@ -284,7 +284,7 @@ public function testNewHighwater() {
    *
    * @covers ::prepareRow
    */
-  public function testPrepareRow() {
+  public function testPrepareRow(): void {
     $this->migrationConfiguration['id'] = 'test_migration';
 
     // Get a new migration with an id.
@@ -327,7 +327,7 @@ public function testPrepareRow() {
    *
    * @covers ::prepareRow
    */
-  public function testPrepareRowGlobalPrepareSkip() {
+  public function testPrepareRowGlobalPrepareSkip(): void {
     $this->migrationConfiguration['id'] = 'test_migration';
 
     $migration = $this->getMigration();
@@ -356,7 +356,7 @@ public function testPrepareRowGlobalPrepareSkip() {
    *
    * @covers ::prepareRow
    */
-  public function testPrepareRowMigratePrepareSkip() {
+  public function testPrepareRowMigratePrepareSkip(): void {
     $this->migrationConfiguration['id'] = 'test_migration';
 
     $migration = $this->getMigration();
@@ -385,7 +385,7 @@ public function testPrepareRowMigratePrepareSkip() {
    *
    * @covers ::prepareRow
    */
-  public function testPrepareRowPrepareException() {
+  public function testPrepareRowPrepareException(): void {
     $this->migrationConfiguration['id'] = 'test_migration';
 
     $migration = $this->getMigration();
@@ -420,7 +420,7 @@ public function testPrepareRowPrepareException() {
   /**
    * Tests that default values are preserved for several source methods.
    */
-  public function testDefaultPropertiesValues() {
+  public function testDefaultPropertiesValues(): void {
     $this->migrationConfiguration['id'] = 'test_migration';
     $migration = $this->getMigration();
     $source = new StubSourceGeneratorPlugin([], '', [], $migration);
diff --git a/core/modules/migrate/tests/src/Unit/MigrateSqlIdMapEnsureTablesTest.php b/core/modules/migrate/tests/src/Unit/MigrateSqlIdMapEnsureTablesTest.php
index d6873999b559..ded0535364e6 100644
--- a/core/modules/migrate/tests/src/Unit/MigrateSqlIdMapEnsureTablesTest.php
+++ b/core/modules/migrate/tests/src/Unit/MigrateSqlIdMapEnsureTablesTest.php
@@ -25,7 +25,7 @@ class MigrateSqlIdMapEnsureTablesTest extends MigrateTestCase {
   /**
    * Tests the ensureTables method when the tables do not exist.
    */
-  public function testEnsureTablesNotExist() {
+  public function testEnsureTablesNotExist(): void {
     $fields['source_ids_hash'] = [
       'type' => 'varchar',
       'length' => 64,
@@ -128,7 +128,7 @@ public function testEnsureTablesNotExist() {
   /**
    * Tests the ensureTables method when the tables exist.
    */
-  public function testEnsureTablesExist() {
+  public function testEnsureTablesExist(): void {
     $schema = $this->prophesize('Drupal\Core\Database\Schema');
     $schema->tableExists('migrate_map_sql_idmap_test')->willReturn(TRUE);
     $schema->fieldExists('migrate_map_sql_idmap_test', 'rollback_action')->willReturn(FALSE);
diff --git a/core/modules/migrate/tests/src/Unit/MigrateSqlIdMapTest.php b/core/modules/migrate/tests/src/Unit/MigrateSqlIdMapTest.php
index 166eb27746f6..67e979bd1169 100644
--- a/core/modules/migrate/tests/src/Unit/MigrateSqlIdMapTest.php
+++ b/core/modules/migrate/tests/src/Unit/MigrateSqlIdMapTest.php
@@ -161,7 +161,7 @@ protected function idMapDefaults() {
    * - saving new to nonempty tables work.
    * - updating work.
    */
-  public function testSaveIdMapping() {
+  public function testSaveIdMapping(): void {
     $source = [
       'source_id_property' => 'source_value',
     ];
@@ -195,7 +195,7 @@ public function testSaveIdMapping() {
   /**
    * Tests the SQL ID map set message method.
    */
-  public function testSetMessage() {
+  public function testSetMessage(): void {
     $message = $this->createMock('Drupal\migrate\MigrateMessageInterface');
     $id_map = $this->getIdMap();
     $id_map->setMessage($message);
@@ -205,7 +205,7 @@ public function testSetMessage() {
   /**
    * Tests the clear messages method.
    */
-  public function testClearMessages() {
+  public function testClearMessages(): void {
     $message = 'Hello world.';
     $expected_results = [0, 1, 2, 3];
     $id_map = $this->getIdMap();
@@ -225,7 +225,7 @@ public function testClearMessages() {
   /**
    * Tests the getRowsNeedingUpdate method for rows that need an update.
    */
-  public function testGetRowsNeedingUpdate() {
+  public function testGetRowsNeedingUpdate(): void {
     $id_map = $this->getIdMap();
     $row_statuses = [
       MigrateIdMapInterface::STATUS_IMPORTED,
@@ -281,7 +281,7 @@ public function testGetRowsNeedingUpdate() {
   /**
    * Tests the SQL ID map message count method by counting and saving messages.
    */
-  public function testMessageCount() {
+  public function testMessageCount(): void {
     $message = 'Hello world.';
     $expected_results = [0, 1, 2, 3];
     $id_map = $this->getIdMap();
@@ -297,7 +297,7 @@ public function testMessageCount() {
   /**
    * Tests the SQL ID map save message method.
    */
-  public function testMessageSave() {
+  public function testMessageSave(): void {
     $message = 'Hello world.';
     $original_values = [
       1 => ['message' => $message, 'level' => MigrationInterface::MESSAGE_ERROR],
@@ -348,7 +348,7 @@ public function testMessageSave() {
   /**
    * Tests the getRowBySource method.
    */
-  public function testGetRowBySource() {
+  public function testGetRowBySource(): void {
     $this->getDatabase([]);
     $row = [
       'sourceid1' => 'source_id_value_1',
@@ -404,7 +404,7 @@ public static function lookupDestinationIdMappingDataProvider() {
    *
    * @dataProvider lookupDestinationIdMappingDataProvider
    */
-  public function testLookupDestinationIdMapping($num_source_fields, $num_destination_fields) {
+  public function testLookupDestinationIdMapping($num_source_fields, $num_destination_fields): void {
     // Adjust the migration configuration according to the number of source and
     // destination fields.
     $this->sourceIds = [];
@@ -473,7 +473,7 @@ protected function setupRows($source_keys, $dest_keys, $rows) {
   /**
    * Tests lookupDestinationIds().
    */
-  public function testLookupDestinationIds() {
+  public function testLookupDestinationIds(): void {
     // Simple map with one source and one destination ID.
     $id_map = $this->setupRows(['nid'], ['nid'], [
       [1, 101],
@@ -557,7 +557,7 @@ public function testLookupDestinationIds() {
   /**
    * Tests the getRowByDestination method.
    */
-  public function testGetRowByDestination() {
+  public function testGetRowByDestination(): void {
     $row = [
       'sourceid1' => 'source_id_value_1',
       'sourceid2' => 'source_id_value_2',
@@ -622,7 +622,7 @@ public static function lookupSourceIdMappingDataProvider() {
    *
    * @dataProvider lookupSourceIdMappingDataProvider
    */
-  public function testLookupSourceIdMapping($num_source_fields, $num_destination_fields) {
+  public function testLookupSourceIdMapping($num_source_fields, $num_destination_fields): void {
     $source_id_property_prefix = 'source_id_property_';
     $this->doTestLookupSourceIdMapping($num_source_fields, $num_destination_fields, $source_id_property_prefix);
   }
@@ -641,7 +641,7 @@ public function testLookupSourceIdMapping($num_source_fields, $num_destination_f
    *
    * @dataProvider lookupSourceIdMappingDataProvider
    */
-  public function testLookupSourceIdMappingNonSqlCharacters($num_source_fields, $num_destination_fields) {
+  public function testLookupSourceIdMappingNonSqlCharacters($num_source_fields, $num_destination_fields): void {
     $source_id_property_prefix = '$ource id property * ';
     $this->doTestLookupSourceIdMapping($num_source_fields, $num_destination_fields, $source_id_property_prefix);
   }
@@ -694,7 +694,7 @@ public function doTestLookupSourceIdMapping(int $num_source_fields, int $num_des
   /**
    * Tests currentDestination() and currentSource().
    */
-  public function testCurrentDestinationAndSource() {
+  public function testCurrentDestinationAndSource(): void {
     // Simple map with one source and one destination ID.
     $id_map = $this->setupRows(['nid'], ['nid'], [
       [1, 101],
@@ -728,7 +728,7 @@ public function testCurrentDestinationAndSource() {
    * - One import.
    * - Multiple imports.
    */
-  public function testImportedCount() {
+  public function testImportedCount(): void {
     $id_map = $this->getIdMap();
     // Add a single failed row and assert zero imported rows.
     $source = ['source_id_property' => 'source_value_failed'];
@@ -760,7 +760,7 @@ public function testImportedCount() {
    * - One processed row.
    * - Multiple processed rows.
    */
-  public function testProcessedCount() {
+  public function testProcessedCount(): void {
     $id_map = $this->getIdMap();
     // Assert zero rows have been processed before adding rows.
     $this->assertSame(0, $id_map->processedCount());
@@ -812,7 +812,7 @@ public static function updateCountDataProvider() {
    *
    * @dataProvider updateCountDataProvider
    */
-  public function testUpdateCount($num_update_rows) {
+  public function testUpdateCount($num_update_rows): void {
     for ($i = 0; $i < 5; $i++) {
       $row = $this->idMapDefaults();
       $row['sourceid1'] = "source_id_value_$i";
@@ -860,7 +860,7 @@ public static function errorCountDataProvider() {
    *
    * @dataProvider errorCountDataProvider
    */
-  public function testErrorCount($num_error_rows) {
+  public function testErrorCount($num_error_rows): void {
     for ($i = 0; $i < 5; $i++) {
       $row = $this->idMapDefaults();
       $row['sourceid1'] = "source_id_value_$i";
@@ -884,7 +884,7 @@ public function testErrorCount($num_error_rows) {
   /**
    * Tests setting a row source_row_status to STATUS_NEEDS_UPDATE.
    */
-  public function testSetUpdate() {
+  public function testSetUpdate(): void {
     $id_map = $this->getIdMap();
     $row_statuses = [
       MigrateIdMapInterface::STATUS_IMPORTED,
@@ -932,7 +932,7 @@ public function testSetUpdate() {
   /**
    * Tests prepareUpdate().
    */
-  public function testPrepareUpdate() {
+  public function testPrepareUpdate(): void {
     $id_map = $this->getIdMap();
     $row_statuses = [
       MigrateIdMapInterface::STATUS_IMPORTED,
@@ -978,7 +978,7 @@ public function testPrepareUpdate() {
    * - One error.
    * - Multiple errors.
    */
-  public function testDestroy() {
+  public function testDestroy(): void {
     $id_map = $this->getIdMap();
     // Initialize the ID map.
     $id_map->getDatabase();
@@ -1001,7 +1001,7 @@ public function testDestroy() {
   /**
    * Tests the getQualifiedMapTable method with a prefixed database.
    */
-  public function testGetQualifiedMapTablePrefix() {
+  public function testGetQualifiedMapTablePrefix(): void {
     $connection_options = [
       'database' => ':memory:',
       'prefix' => 'prefix',
@@ -1025,7 +1025,7 @@ public function testGetQualifiedMapTablePrefix() {
    * - Sql::key()
    * - Sql::current()
    */
-  public function testIterators() {
+  public function testIterators(): void {
     for ($i = 0; $i < 3; $i++) {
       $row = $this->idMapDefaults();
       $row['sourceid1'] = "source_id_value_$i";
@@ -1064,7 +1064,7 @@ private function getIdMapContents() {
   /**
    * Tests the delayed creation of the "map" and "message" migrate tables.
    */
-  public function testMapTableCreation() {
+  public function testMapTableCreation(): void {
     $id_map = $this->getIdMap();
     $map_table_name = $id_map->mapTableName();
     $message_table_name = $id_map->messageTableName();
@@ -1096,7 +1096,7 @@ public function testMapTableCreation() {
    *
    * @dataProvider getHighestIdDataProvider
    */
-  public function testGetHighestId(array $destination_ids, array $rows, $expected) {
+  public function testGetHighestId(array $destination_ids, array $rows, $expected): void {
     $this->database = $this->getDatabase([]);
     $this->sourceIds = $destination_ids;
     $this->destinationIds = $destination_ids;
@@ -1177,7 +1177,7 @@ public static function getHighestIdDataProvider() {
    *
    * @dataProvider getHighestIdInvalidDataProvider
    */
-  public function testGetHighestIdInvalid(array $destination_ids) {
+  public function testGetHighestIdInvalid(array $destination_ids): void {
     $this->expectException(\LogicException::class);
     $this->expectExceptionMessage('To determine the highest migrated ID the first ID must be an integer');
     $this->destinationIds = $destination_ids;
diff --git a/core/modules/migrate/tests/src/Unit/MigrateStubTest.php b/core/modules/migrate/tests/src/Unit/MigrateStubTest.php
index 0494f4c18ef2..99cf93c0a044 100644
--- a/core/modules/migrate/tests/src/Unit/MigrateStubTest.php
+++ b/core/modules/migrate/tests/src/Unit/MigrateStubTest.php
@@ -44,7 +44,7 @@ protected function setUp(): void {
    *
    * @covers ::createStub
    */
-  public function testCreateStub() {
+  public function testCreateStub(): void {
     $destination_plugin = $this->prophesize(MigrateDestinationInterface::class);
     $destination_plugin->import(Argument::type(Row::class))->willReturn(['id' => 2]);
 
@@ -71,7 +71,7 @@ public function testCreateStub() {
   /**
    * Tests that an error is logged if the plugin manager throws an exception.
    */
-  public function testExceptionOnPluginNotFound() {
+  public function testExceptionOnPluginNotFound(): void {
     $this->migrationPluginManager->createInstances(['test_migration'])->willReturn([]);
     $this->expectException(PluginNotFoundException::class);
     $this->expectExceptionMessage("Plugin ID 'test_migration' was not found.");
@@ -82,7 +82,7 @@ public function testExceptionOnPluginNotFound() {
   /**
    * Tests that an error is logged on derived migrations.
    */
-  public function testExceptionOnDerivedMigration() {
+  public function testExceptionOnDerivedMigration(): void {
     $this->migrationPluginManager->createInstances(['test_migration'])->willReturn([
       'test_migration:d1' => $this->prophesize(MigrationInterface::class)->reveal(),
       'test_migration:d2' => $this->prophesize(MigrationInterface::class)->reveal(),
diff --git a/core/modules/migrate/tests/src/Unit/MigrationPluginManagerTest.php b/core/modules/migrate/tests/src/Unit/MigrationPluginManagerTest.php
index 795fbfcacc6d..fae8849d8c79 100644
--- a/core/modules/migrate/tests/src/Unit/MigrationPluginManagerTest.php
+++ b/core/modules/migrate/tests/src/Unit/MigrationPluginManagerTest.php
@@ -40,7 +40,7 @@ protected function setUp(): void {
    *
    * @dataProvider dependencyProvider
    */
-  public function testDependencyBuilding($migrations_data, $result_ids) {
+  public function testDependencyBuilding($migrations_data, $result_ids): void {
     $migrations = [];
     foreach ($migrations_data as $migration_id => $migration_data) {
       $migrations[$migration_id] = new TestMigrationMock($migration_id, $migration_data['migration_dependencies']);
@@ -71,7 +71,7 @@ public function testDependencyBuilding($migrations_data, $result_ids) {
   /**
    * Tests that expandPluginIds returns all derivatives.
    */
-  public function testExpandPluginIds() {
+  public function testExpandPluginIds(): void {
     $backend = $this->prophesize(CacheBackendInterface::class);
     $cache = new \stdClass();
     $cache->data = [
diff --git a/core/modules/migrate/tests/src/Unit/MigrationTest.php b/core/modules/migrate/tests/src/Unit/MigrationTest.php
index df4bc41657f7..700986fe87dc 100644
--- a/core/modules/migrate/tests/src/Unit/MigrationTest.php
+++ b/core/modules/migrate/tests/src/Unit/MigrationTest.php
@@ -31,7 +31,7 @@ class MigrationTest extends UnitTestCase {
    *
    * @dataProvider getInvalidMigrationDependenciesProvider
    */
-  public function testMigrationDependenciesInConstructor(array $dependencies) {
+  public function testMigrationDependenciesInConstructor(array $dependencies): void {
 
     $configuration = ['migration_dependencies' => $dependencies];
     $plugin_id = 'test_migration';
@@ -51,7 +51,7 @@ public function testMigrationDependenciesInConstructor(array $dependencies) {
    *
    * @covers ::checkRequirements
    */
-  public function testRequirementsForSourcePlugin() {
+  public function testRequirementsForSourcePlugin(): void {
     $migration = new TestMigration();
 
     $source_plugin = $this->createMock('Drupal\Tests\migrate\Unit\RequirementsAwareSourceInterface');
@@ -73,7 +73,7 @@ public function testRequirementsForSourcePlugin() {
    *
    * @covers ::checkRequirements
    */
-  public function testRequirementsForDestinationPlugin() {
+  public function testRequirementsForDestinationPlugin(): void {
     $migration = new TestMigration();
 
     $source_plugin = $this->createMock('Drupal\migrate\Plugin\MigrateSourceInterface');
@@ -95,7 +95,7 @@ public function testRequirementsForDestinationPlugin() {
    *
    * @covers ::checkRequirements
    */
-  public function testRequirementsForMigrations() {
+  public function testRequirementsForMigrations(): void {
     $migration = new TestMigration();
 
     // Setup source and destination plugins without any requirements.
@@ -140,7 +140,7 @@ public function testRequirementsForMigrations() {
    *
    * @covers ::getRequirements
    */
-  public function testGetMigrations() {
+  public function testGetMigrations(): void {
     $migration = new TestMigration();
 
     $requirements = ['test_a', 'test_b', 'test_c', 'test_d'];
@@ -161,7 +161,7 @@ public function testGetMigrations() {
    *
    * @throws \Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
    */
-  public function testMigrationDependenciesWithValidConfig($source, array $expected_value) {
+  public function testMigrationDependenciesWithValidConfig($source, array $expected_value): void {
     $migration = new TestMigration();
 
     // Set the plugin manager to support getMigrationDependencies().
@@ -189,7 +189,7 @@ public function testMigrationDependenciesWithValidConfig($source, array $expecte
    *
    * @group legacy
    */
-  public function testMigrationDependenciesWithInvalidConfig(array $dependencies) {
+  public function testMigrationDependenciesWithInvalidConfig(array $dependencies): void {
     $migration = new TestMigration();
 
     // Set the plugin ID to test the returned message.
diff --git a/core/modules/migrate/tests/src/Unit/Plugin/migrate/destination/CheckRequirementsTest.php b/core/modules/migrate/tests/src/Unit/Plugin/migrate/destination/CheckRequirementsTest.php
index ac5c1023c735..b23f75dc4a82 100644
--- a/core/modules/migrate/tests/src/Unit/Plugin/migrate/destination/CheckRequirementsTest.php
+++ b/core/modules/migrate/tests/src/Unit/Plugin/migrate/destination/CheckRequirementsTest.php
@@ -22,7 +22,7 @@ class CheckRequirementsTest extends UnitTestCase {
   /**
    * Tests the check requirements exception message.
    */
-  public function testException() {
+  public function testException(): void {
     $destination = new Config(
       ['config_name' => 'test'],
       'test',
diff --git a/core/modules/migrate/tests/src/Unit/Plugin/migrate/destination/EntityContentBaseTest.php b/core/modules/migrate/tests/src/Unit/Plugin/migrate/destination/EntityContentBaseTest.php
index 17f4a2fae1a1..8d98c309b682 100644
--- a/core/modules/migrate/tests/src/Unit/Plugin/migrate/destination/EntityContentBaseTest.php
+++ b/core/modules/migrate/tests/src/Unit/Plugin/migrate/destination/EntityContentBaseTest.php
@@ -26,7 +26,7 @@ class EntityContentBaseTest extends EntityTestBase {
    *
    * @covers ::import
    */
-  public function testImport() {
+  public function testImport(): void {
     $bundles = [];
     $destination = new EntityTestDestination([], '', [],
       $this->migration->reveal(),
@@ -60,7 +60,7 @@ public function testImport() {
    *
    * @covers ::import
    */
-  public function testImportEntityLoadFailure() {
+  public function testImportEntityLoadFailure(): void {
     $bundles = [];
     $destination = new EntityTestDestination([], '', [],
       $this->migration->reveal(),
@@ -79,7 +79,7 @@ public function testImportEntityLoadFailure() {
   /**
    * Tests that translation destination fails for untranslatable entities.
    */
-  public function testUntranslatable() {
+  public function testUntranslatable(): void {
     // An entity type without a language.
     $this->entityType->getKey('langcode')->willReturn('');
     $this->entityType->getKey('id')->willReturn('id');
diff --git a/core/modules/migrate/tests/src/Unit/Plugin/migrate/destination/EntityRevisionTest.php b/core/modules/migrate/tests/src/Unit/Plugin/migrate/destination/EntityRevisionTest.php
index e2a223256ddd..3b721eb6f67f 100644
--- a/core/modules/migrate/tests/src/Unit/Plugin/migrate/destination/EntityRevisionTest.php
+++ b/core/modules/migrate/tests/src/Unit/Plugin/migrate/destination/EntityRevisionTest.php
@@ -40,7 +40,7 @@ protected function setUp(): void {
   /**
    * Tests that revision destination fails for unrevisionable entities.
    */
-  public function testUnrevisionable() {
+  public function testUnrevisionable(): void {
     $this->entityType->getKey('id')->willReturn('id');
     $this->entityType->getKey('revision')->willReturn('');
     $this->entityFieldManager->getBaseFieldDefinitions('foo')
@@ -67,7 +67,7 @@ public function testUnrevisionable() {
   /**
    * Tests that translation destination fails for untranslatable entities.
    */
-  public function testUntranslatable() {
+  public function testUntranslatable(): void {
     $this->entityType->getKey('id')->willReturn('id');
     $this->entityType->getKey('revision')->willReturn('vid');
     $this->entityType->getKey('langcode')->willReturn('');
diff --git a/core/modules/migrate/tests/src/Unit/RowTest.php b/core/modules/migrate/tests/src/Unit/RowTest.php
index 2a779b0490f2..69fce6f78607 100644
--- a/core/modules/migrate/tests/src/Unit/RowTest.php
+++ b/core/modules/migrate/tests/src/Unit/RowTest.php
@@ -87,7 +87,7 @@ class RowTest extends UnitTestCase {
   /**
    * Tests object creation: empty.
    */
-  public function testRowWithoutData() {
+  public function testRowWithoutData(): void {
     $row = new Row();
     $this->assertSame([], $row->getSource(), 'Empty row');
   }
@@ -95,7 +95,7 @@ public function testRowWithoutData() {
   /**
    * Tests object creation: basic.
    */
-  public function testRowWithBasicData() {
+  public function testRowWithBasicData(): void {
     $row = new Row($this->testValues, $this->testSourceIds);
     $this->assertSame($this->testValues, $row->getSource(), 'Row with data, simple id.');
   }
@@ -103,7 +103,7 @@ public function testRowWithBasicData() {
   /**
    * Tests object creation: multiple source IDs.
    */
-  public function testRowWithMultipleSourceIds() {
+  public function testRowWithMultipleSourceIds(): void {
     $multi_source_ids = $this->testSourceIds + ['vid' => 'Node revision'];
     $multi_source_ids_values = $this->testValues + ['vid' => 1];
     $row = new Row($multi_source_ids_values, $multi_source_ids);
@@ -113,7 +113,7 @@ public function testRowWithMultipleSourceIds() {
   /**
    * Tests object creation: invalid values.
    */
-  public function testRowWithInvalidData() {
+  public function testRowWithInvalidData(): void {
     $invalid_values = [
       'title' => 'node X',
     ];
@@ -124,7 +124,7 @@ public function testRowWithInvalidData() {
   /**
    * Tests source immutability after freeze.
    */
-  public function testSourceFreeze() {
+  public function testSourceFreeze(): void {
     $row = new Row($this->testValues, $this->testSourceIds);
     $row->rehash();
     $this->assertSame($this->testHash, $row->getHash(), 'Correct hash.');
@@ -139,7 +139,7 @@ public function testSourceFreeze() {
   /**
    * Tests setting on a frozen row.
    */
-  public function testSetFrozenRow() {
+  public function testSetFrozenRow(): void {
     $row = new Row($this->testValues, $this->testSourceIds);
     $row->freezeSource();
     $this->expectException(\Exception::class);
@@ -150,7 +150,7 @@ public function testSetFrozenRow() {
   /**
    * Tests hashing.
    */
-  public function testHashing() {
+  public function testHashing(): void {
     $row = new Row($this->testValues, $this->testSourceIds);
     $this->assertSame('', $row->getHash(), 'No hash at creation');
     $row->rehash();
@@ -213,7 +213,7 @@ public function testHashing() {
    * @covers ::setIdMap
    * @covers ::getIdMap
    */
-  public function testGetSetIdMap() {
+  public function testGetSetIdMap(): void {
     $row = new Row($this->testValues, $this->testSourceIds);
     $test_id_map = [
       'original_hash' => '',
@@ -227,7 +227,7 @@ public function testGetSetIdMap() {
   /**
    * Tests the source ID.
    */
-  public function testSourceIdValues() {
+  public function testSourceIdValues(): void {
     $row = new Row($this->testValues, $this->testSourceIds);
     $this->assertSame(['nid' => $this->testValues['nid']], $row->getSourceIdValues());
   }
@@ -235,7 +235,7 @@ public function testSourceIdValues() {
   /**
    * Tests the multiple source IDs.
    */
-  public function testMultipleSourceIdValues() {
+  public function testMultipleSourceIdValues(): void {
     // Set values in same order as ids.
     $multi_source_ids = $this->testSourceIds + [
       'vid' => 'Node revision',
@@ -270,7 +270,7 @@ public function testMultipleSourceIdValues() {
    *
    * @covers ::getSourceProperty
    */
-  public function testGetSourceProperty() {
+  public function testGetSourceProperty(): void {
     $row = new Row($this->testValues, $this->testSourceIds);
     $this->assertSame($this->testValues['nid'], $row->getSourceProperty('nid'));
     $this->assertSame($this->testValues['title'], $row->getSourceProperty('title'));
@@ -280,7 +280,7 @@ public function testGetSourceProperty() {
   /**
    * Tests setting and getting the destination.
    */
-  public function testDestination() {
+  public function testDestination(): void {
     $row = new Row($this->testValues, $this->testSourceIds);
     $this->assertEmpty($row->getDestination());
     $this->assertFalse($row->hasDestinationProperty('nid'));
@@ -294,7 +294,7 @@ public function testDestination() {
   /**
    * Tests setting/getting multiple destination IDs.
    */
-  public function testMultipleDestination() {
+  public function testMultipleDestination(): void {
     $row = new Row($this->testValues, $this->testSourceIds);
     // Set some deep nested values.
     $row->setDestinationProperty('image/alt', 'alt text');
@@ -322,7 +322,7 @@ public function testMultipleDestination() {
    * @dataProvider getDataProvider
    * @covers ::get
    */
-  public function testGet($key, $expected_value) {
+  public function testGet($key, $expected_value): void {
     $row = $this->createRowWithDestinationProperties($this->testGetSourceProperties, $this->testGetSourceIds, $this->testGetDestinationProperties);
     $this->assertSame($expected_value, $row->get($key));
   }
@@ -366,7 +366,7 @@ public static function getDataProvider() {
    * @covers ::getMultiple
    * @dataProvider getMultipleDataProvider
    */
-  public function testGetMultiple(array $keys, array $expected_values) {
+  public function testGetMultiple(array $keys, array $expected_values): void {
     $row = $this->createRowWithDestinationProperties($this->testGetSourceProperties, $this->testGetSourceIds, $this->testGetDestinationProperties);
     $this->assertEquals(array_combine($keys, $expected_values), $row->getMultiple($keys));
   }
diff --git a/core/modules/migrate/tests/src/Unit/SqlBaseTest.php b/core/modules/migrate/tests/src/Unit/SqlBaseTest.php
index 064e64343da8..814566e98543 100644
--- a/core/modules/migrate/tests/src/Unit/SqlBaseTest.php
+++ b/core/modules/migrate/tests/src/Unit/SqlBaseTest.php
@@ -33,7 +33,7 @@ class SqlBaseTest extends UnitTestCase {
    *
    * @dataProvider sqlBaseTestProvider
    */
-  public function testMapJoinable($expected_result, $id_map_is_sql, $with_id_map, $source_options = [], $id_map_options = []) {
+  public function testMapJoinable($expected_result, $id_map_is_sql, $with_id_map, $source_options = [], $id_map_options = []): void {
     // Setup a connection object.
     $source_connection = $this->getMockBuilder('Drupal\Core\Database\Connection')
       ->disableOriginalConstructor()
diff --git a/core/modules/migrate/tests/src/Unit/destination/ConfigTest.php b/core/modules/migrate/tests/src/Unit/destination/ConfigTest.php
index b4da80b4fd5f..d7531ee90a88 100644
--- a/core/modules/migrate/tests/src/Unit/destination/ConfigTest.php
+++ b/core/modules/migrate/tests/src/Unit/destination/ConfigTest.php
@@ -18,7 +18,7 @@ class ConfigTest extends UnitTestCase {
   /**
    * Tests the import method.
    */
-  public function testImport() {
+  public function testImport(): void {
     $source = [
       'test' => 'x',
     ];
@@ -65,7 +65,7 @@ public function testImport() {
   /**
    * Tests the import method.
    */
-  public function testLanguageImport() {
+  public function testLanguageImport(): void {
     $source = [
       'langcode' => 'mi',
     ];
diff --git a/core/modules/migrate/tests/src/Unit/destination/EntityRevisionTest.php b/core/modules/migrate/tests/src/Unit/destination/EntityRevisionTest.php
index 98647c5d594b..a2fc0bc4b855 100644
--- a/core/modules/migrate/tests/src/Unit/destination/EntityRevisionTest.php
+++ b/core/modules/migrate/tests/src/Unit/destination/EntityRevisionTest.php
@@ -74,7 +74,7 @@ protected function setUp(): void {
    *
    * @covers ::getEntity
    */
-  public function testGetEntityDestinationValues() {
+  public function testGetEntityDestinationValues(): void {
     $destination = $this->getEntityRevisionDestination([]);
     // Return a dummy because we don't care what gets called.
     $entity = $this->prophesize('\Drupal\Core\Entity\RevisionableInterface');
@@ -92,7 +92,7 @@ public function testGetEntityDestinationValues() {
    *
    * @covers ::getEntity
    */
-  public function testGetEntityUpdateRevision() {
+  public function testGetEntityUpdateRevision(): void {
     $destination = $this->getEntityRevisionDestination([]);
     $entity = $this->prophesize('\Drupal\Core\Entity\RevisionableInterface');
 
@@ -119,7 +119,7 @@ public function testGetEntityUpdateRevision() {
    *
    * @covers ::getEntity
    */
-  public function testGetEntityNewRevision() {
+  public function testGetEntityNewRevision(): void {
     $destination = $this->getEntityRevisionDestination([]);
     $entity = $this->prophesize('\Drupal\Core\Entity\RevisionableInterface');
 
@@ -149,7 +149,7 @@ public function testGetEntityNewRevision() {
    *
    * @covers ::getEntity
    */
-  public function testGetEntityLoadFailure() {
+  public function testGetEntityLoadFailure(): void {
     $destination = $this->getEntityRevisionDestination([]);
 
     $entity_type = $this->prophesize('\Drupal\Core\Entity\EntityTypeInterface');
@@ -172,7 +172,7 @@ public function testGetEntityLoadFailure() {
    *
    * @covers ::save
    */
-  public function testSave() {
+  public function testSave(): void {
     $entity = $this->prophesize('\Drupal\Core\Entity\ContentEntityInterface');
     $entity->save()
       ->shouldBeCalled();
diff --git a/core/modules/migrate/tests/src/Unit/destination/PerComponentEntityDisplayTest.php b/core/modules/migrate/tests/src/Unit/destination/PerComponentEntityDisplayTest.php
index 159a6d41d93e..db25c5c5d738 100644
--- a/core/modules/migrate/tests/src/Unit/destination/PerComponentEntityDisplayTest.php
+++ b/core/modules/migrate/tests/src/Unit/destination/PerComponentEntityDisplayTest.php
@@ -18,7 +18,7 @@ class PerComponentEntityDisplayTest extends MigrateTestCase {
   /**
    * Tests the entity display import method.
    */
-  public function testImport() {
+  public function testImport(): void {
     $values = [
       'entity_type' => 'entity_type_test',
       'bundle' => 'bundle_test',
diff --git a/core/modules/migrate/tests/src/Unit/destination/PerComponentEntityFormDisplayTest.php b/core/modules/migrate/tests/src/Unit/destination/PerComponentEntityFormDisplayTest.php
index b93500261b23..9ccf8ea8c582 100644
--- a/core/modules/migrate/tests/src/Unit/destination/PerComponentEntityFormDisplayTest.php
+++ b/core/modules/migrate/tests/src/Unit/destination/PerComponentEntityFormDisplayTest.php
@@ -18,7 +18,7 @@ class PerComponentEntityFormDisplayTest extends MigrateTestCase {
   /**
    * Tests the entity display import method.
    */
-  public function testImport() {
+  public function testImport(): void {
     $values = [
       'entity_type' => 'entity_type_test',
       'bundle' => 'bundle_test',
diff --git a/core/modules/migrate/tests/src/Unit/process/ArrayBuildTest.php b/core/modules/migrate/tests/src/Unit/process/ArrayBuildTest.php
index 0cf92f27eac3..633602417000 100644
--- a/core/modules/migrate/tests/src/Unit/process/ArrayBuildTest.php
+++ b/core/modules/migrate/tests/src/Unit/process/ArrayBuildTest.php
@@ -28,7 +28,7 @@ protected function setUp(): void {
   /**
    * Tests successful transformation.
    */
-  public function testTransform() {
+  public function testTransform(): void {
     $source = [
       ['foo' => 'Foo', 'bar' => 'Bar'],
       ['foo' => 'foo bar', 'bar' => 'bar foo'],
@@ -44,7 +44,7 @@ public function testTransform() {
   /**
    * Tests non-existent key for the key configuration.
    */
-  public function testNonExistentKey() {
+  public function testNonExistentKey(): void {
     $source = [
       ['bar' => 'foo'],
     ];
@@ -56,7 +56,7 @@ public function testNonExistentKey() {
   /**
    * Tests non-existent key for the value configuration.
    */
-  public function testNonExistentValue() {
+  public function testNonExistentValue(): void {
     $source = [
       ['foo' => 'bar'],
     ];
@@ -68,7 +68,7 @@ public function testNonExistentValue() {
   /**
    * Tests one-dimensional array input.
    */
-  public function testOneDimensionalArrayInput() {
+  public function testOneDimensionalArrayInput(): void {
     $source = ['foo' => 'bar'];
     $this->expectException(MigrateException::class);
     $this->expectExceptionMessage('The input should be an array of arrays');
@@ -78,7 +78,7 @@ public function testOneDimensionalArrayInput() {
   /**
    * Tests string input.
    */
-  public function testStringInput() {
+  public function testStringInput(): void {
     $source = 'foo';
     $this->expectException(MigrateException::class);
     $this->expectExceptionMessage('The input should be an array of arrays');
diff --git a/core/modules/migrate/tests/src/Unit/process/CallbackTest.php b/core/modules/migrate/tests/src/Unit/process/CallbackTest.php
index 485c4eb669bb..a93ba2f75227 100644
--- a/core/modules/migrate/tests/src/Unit/process/CallbackTest.php
+++ b/core/modules/migrate/tests/src/Unit/process/CallbackTest.php
@@ -19,7 +19,7 @@ class CallbackTest extends MigrateProcessTestCase {
    *
    * @dataProvider providerCallback
    */
-  public function testCallback($callable) {
+  public function testCallback($callable): void {
     $configuration = ['callable' => $callable];
     $this->plugin = new Callback($configuration, 'map', []);
     $value = $this->plugin->transform('FooBar', $this->migrateExecutable, $this->row, 'destination_property');
@@ -41,7 +41,7 @@ public static function providerCallback() {
    *
    * @dataProvider providerCallbackArray
    */
-  public function testCallbackArray($callable, $args, $result) {
+  public function testCallbackArray($callable, $args, $result): void {
     $configuration = ['callable' => $callable, 'unpack_source' => TRUE];
     $this->plugin = new Callback($configuration, 'map', []);
     $value = $this->plugin->transform($args, $this->migrateExecutable, $this->row, 'destination_property');
@@ -90,7 +90,7 @@ public static function providerCallbackArray() {
    *
    * @dataProvider providerCallbackExceptions
    */
-  public function testCallbackExceptions($message, array $configuration, $class = 'InvalidArgumentException', $args = NULL) {
+  public function testCallbackExceptions($message, array $configuration, $class = 'InvalidArgumentException', $args = NULL): void {
     $this->expectException($class);
     $this->expectExceptionMessage($message);
     $this->plugin = new Callback($configuration, 'map', []);
diff --git a/core/modules/migrate/tests/src/Unit/process/ConcatTest.php b/core/modules/migrate/tests/src/Unit/process/ConcatTest.php
index 049e1e21d313..b4afe33f9e10 100644
--- a/core/modules/migrate/tests/src/Unit/process/ConcatTest.php
+++ b/core/modules/migrate/tests/src/Unit/process/ConcatTest.php
@@ -25,7 +25,7 @@ protected function setUp(): void {
   /**
    * Tests concat works without a delimiter.
    */
-  public function testConcatWithoutDelimiter() {
+  public function testConcatWithoutDelimiter(): void {
     $value = $this->plugin->transform(['foo', 'bar'], $this->migrateExecutable, $this->row, 'destination_property');
     $this->assertSame('foobar', $value);
   }
@@ -33,7 +33,7 @@ public function testConcatWithoutDelimiter() {
   /**
    * Tests concat fails properly on non-arrays.
    */
-  public function testConcatWithNonArray() {
+  public function testConcatWithNonArray(): void {
     $this->expectException(MigrateException::class);
     $this->plugin->transform('foo', $this->migrateExecutable, $this->row, 'destination_property');
   }
@@ -41,7 +41,7 @@ public function testConcatWithNonArray() {
   /**
    * Tests concat works without a delimiter.
    */
-  public function testConcatWithDelimiter() {
+  public function testConcatWithDelimiter(): void {
     $this->plugin->setDelimiter('_');
     $value = $this->plugin->transform(['foo', 'bar'], $this->migrateExecutable, $this->row, 'destination_property');
     $this->assertSame('foo_bar', $value);
diff --git a/core/modules/migrate/tests/src/Unit/process/DefaultValueTest.php b/core/modules/migrate/tests/src/Unit/process/DefaultValueTest.php
index d2872b7877b6..1f09bca84297 100644
--- a/core/modules/migrate/tests/src/Unit/process/DefaultValueTest.php
+++ b/core/modules/migrate/tests/src/Unit/process/DefaultValueTest.php
@@ -21,7 +21,7 @@ class DefaultValueTest extends MigrateProcessTestCase {
    *
    * @dataProvider defaultValueDataProvider
    */
-  public function testDefaultValue($configuration, $expected_value, $value) {
+  public function testDefaultValue($configuration, $expected_value, $value): void {
     $process = new DefaultValue($configuration, 'default_value', []);
     $value = $process->transform($value, $this->migrateExecutable, $this->row, 'destination_property');
     $this->assertSame($expected_value, $value);
diff --git a/core/modules/migrate/tests/src/Unit/process/ExplodeTest.php b/core/modules/migrate/tests/src/Unit/process/ExplodeTest.php
index 0a7904735076..ba005f2e458a 100644
--- a/core/modules/migrate/tests/src/Unit/process/ExplodeTest.php
+++ b/core/modules/migrate/tests/src/Unit/process/ExplodeTest.php
@@ -29,7 +29,7 @@ protected function setUp(): void {
   /**
    * Tests explode transform process works.
    */
-  public function testTransform() {
+  public function testTransform(): void {
     $value = $this->plugin->transform('foo,bar,tik', $this->migrateExecutable, $this->row, 'destination_property');
     $this->assertSame(['foo', 'bar', 'tik'], $value);
   }
@@ -37,7 +37,7 @@ public function testTransform() {
   /**
    * Tests explode transform process works with a limit.
    */
-  public function testTransformLimit() {
+  public function testTransformLimit(): void {
     $plugin = new Explode(['delimiter' => '_', 'limit' => 2], 'map', []);
     $value = $plugin->transform('foo_bar_tik', $this->migrateExecutable, $this->row, 'destination_property');
     $this->assertSame(['foo', 'bar_tik'], $value);
@@ -46,7 +46,7 @@ public function testTransformLimit() {
   /**
    * Tests if the explode process can be chained with handles_multiple process.
    */
-  public function testChainedTransform() {
+  public function testChainedTransform(): void {
     $exploded = $this->plugin->transform('One,Two,Three', $this->migrateExecutable, $this->row, 'destination_property');
 
     $concat = new Concat([], 'map', []);
@@ -57,7 +57,7 @@ public function testChainedTransform() {
   /**
    * Tests explode fails properly on non-strings.
    */
-  public function testExplodeWithNonString() {
+  public function testExplodeWithNonString(): void {
     $this->expectException(MigrateException::class);
     $this->expectExceptionMessage('is not a string');
     $this->plugin->transform(['foo'], $this->migrateExecutable, $this->row, 'destination_property');
@@ -68,7 +68,7 @@ public function testExplodeWithNonString() {
    *
    * @dataProvider providerExplodeWithNonStrictAndEmptySource
    */
-  public function testExplodeWithNonStrictAndEmptySource($value, $expected) {
+  public function testExplodeWithNonStrictAndEmptySource($value, $expected): void {
     $plugin = new Explode(['delimiter' => '|', 'strict' => FALSE], 'map', []);
 
     $processed = $plugin->transform($value, $this->migrateExecutable, $this->row, 'destination_property');
@@ -93,7 +93,7 @@ public static function providerExplodeWithNonStrictAndEmptySource() {
   /**
    * Tests Explode exception handling when string-cast fails.
    */
-  public function testExplodeWithNonStrictAndNonCastable() {
+  public function testExplodeWithNonStrictAndNonCastable(): void {
     $plugin = new Explode(['delimiter' => '|', 'strict' => FALSE], 'map', []);
     $this->expectException(MigrateException::class);
     $this->expectExceptionMessage('cannot be casted to a string');
@@ -104,7 +104,7 @@ public function testExplodeWithNonStrictAndNonCastable() {
   /**
    * Tests Explode return values with an empty string and strict check.
    */
-  public function testExplodeWithStrictAndEmptyString() {
+  public function testExplodeWithStrictAndEmptyString(): void {
     $plugin = new Explode(['delimiter' => '|'], 'map', []);
     $processed = $plugin->transform('', $this->migrateExecutable, $this->row, 'destination_property');
     $this->assertSame([''], $processed);
@@ -113,7 +113,7 @@ public function testExplodeWithStrictAndEmptyString() {
   /**
    * Tests explode fails with empty delimiter.
    */
-  public function testExplodeWithEmptyDelimiter() {
+  public function testExplodeWithEmptyDelimiter(): void {
     $this->expectException(MigrateException::class);
     $this->expectExceptionMessage('delimiter is empty');
     $plugin = new Explode(['delimiter' => ''], 'map', []);
diff --git a/core/modules/migrate/tests/src/Unit/process/ExtractTest.php b/core/modules/migrate/tests/src/Unit/process/ExtractTest.php
index 4c44f848c64b..15e19c6c693b 100644
--- a/core/modules/migrate/tests/src/Unit/process/ExtractTest.php
+++ b/core/modules/migrate/tests/src/Unit/process/ExtractTest.php
@@ -25,7 +25,7 @@ protected function setUp(): void {
   /**
    * Tests successful extraction.
    */
-  public function testExtract() {
+  public function testExtract(): void {
     $value = $this->plugin->transform(['foo' => 'bar'], $this->migrateExecutable, $this->row, 'destination_property');
     $this->assertSame('bar', $value);
   }
@@ -35,7 +35,7 @@ public function testExtract() {
    *
    * @dataProvider providerTestExtractInvalid
    */
-  public function testExtractInvalid($value) {
+  public function testExtractInvalid($value): void {
     $this->expectException(MigrateException::class);
     $type = gettype($value);
     $this->expectExceptionMessage(sprintf("Input should be an array, instead it was of type '%s'", $type));
@@ -45,7 +45,7 @@ public function testExtractInvalid($value) {
   /**
    * Tests unsuccessful extraction.
    */
-  public function testExtractFail() {
+  public function testExtractFail(): void {
     $this->expectException(MigrateException::class);
     $this->expectExceptionMessage("Array index missing, extraction failed for 'array(\n  'bar' => 'foo',\n)'. Consider adding a `default` key to the configuration.");
     $this->plugin->transform(['bar' => 'foo'], $this->migrateExecutable, $this->row, 'destination_property');
@@ -54,7 +54,7 @@ public function testExtractFail() {
   /**
    * Tests unsuccessful extraction.
    */
-  public function testExtractFailDefault() {
+  public function testExtractFailDefault(): void {
     $plugin = new Extract(['index' => ['foo'], 'default' => 'test'], 'map', []);
     $value = $plugin->transform(['bar' => 'foo'], $this->migrateExecutable, $this->row, 'destination_property');
     $this->assertSame('test', $value, '');
@@ -74,7 +74,7 @@ public function testExtractFailDefault() {
    *
    * @dataProvider providerExtractDefault
    */
-  public function testExtractDefault(array $value, array $configuration, $expected) {
+  public function testExtractDefault(array $value, array $configuration, $expected): void {
     $this->plugin = new Extract($configuration, 'map', []);
 
     $value = $this->plugin->transform($value, $this->migrateExecutable, $this->row, 'destination_property');
diff --git a/core/modules/migrate/tests/src/Unit/process/FileCopyTest.php b/core/modules/migrate/tests/src/Unit/process/FileCopyTest.php
index 9b3a610273dc..b23b6026b692 100644
--- a/core/modules/migrate/tests/src/Unit/process/FileCopyTest.php
+++ b/core/modules/migrate/tests/src/Unit/process/FileCopyTest.php
@@ -29,7 +29,7 @@ class FileCopyTest extends MigrateProcessTestCase {
    * @param $expected
    *   The expected value of the plugin configuration.
    */
-  public function testFileProcessBaseConstructor($configuration, $expected) {
+  public function testFileProcessBaseConstructor($configuration, $expected): void {
     $this->assertPlugin($configuration, $expected);
   }
 
diff --git a/core/modules/migrate/tests/src/Unit/process/FlattenTest.php b/core/modules/migrate/tests/src/Unit/process/FlattenTest.php
index 571b568d61b2..afd8e6d129ba 100644
--- a/core/modules/migrate/tests/src/Unit/process/FlattenTest.php
+++ b/core/modules/migrate/tests/src/Unit/process/FlattenTest.php
@@ -27,7 +27,7 @@ protected function setUp(): void {
    *
    * @dataProvider providerTestFlatten
    */
-  public function testFlatten($value, $expected) {
+  public function testFlatten($value, $expected): void {
     $flattened = $this->plugin->transform($value, $this->migrateExecutable, $this->row, 'destination_property');
     $this->assertSame($expected, $flattened);
   }
@@ -58,7 +58,7 @@ public static function providerTestFlatten() {
    *
    * @dataProvider providerTestFlattenInvalid
    */
-  public function testFlattenInvalid($value) {
+  public function testFlattenInvalid($value): void {
     $this->expectException(MigrateException::class);
     $type = gettype($value);
     $this->expectExceptionMessage(sprintf("Input should be an array or an object, instead it was of type '%s'", $type));
diff --git a/core/modules/migrate/tests/src/Unit/process/FormatDateTest.php b/core/modules/migrate/tests/src/Unit/process/FormatDateTest.php
index 67c917ce9432..0f0408aaa50d 100644
--- a/core/modules/migrate/tests/src/Unit/process/FormatDateTest.php
+++ b/core/modules/migrate/tests/src/Unit/process/FormatDateTest.php
@@ -19,7 +19,7 @@ class FormatDateTest extends MigrateProcessTestCase {
   /**
    * Tests that missing configuration will throw an exception.
    */
-  public function testMigrateExceptionMissingFromFormat() {
+  public function testMigrateExceptionMissingFromFormat(): void {
     $configuration = [
       'from_format' => '',
       'to_format' => 'Y-m-d',
@@ -34,7 +34,7 @@ public function testMigrateExceptionMissingFromFormat() {
   /**
    * Tests that missing configuration will throw an exception.
    */
-  public function testMigrateExceptionMissingToFormat() {
+  public function testMigrateExceptionMissingToFormat(): void {
     $configuration = [
       'from_format' => 'm/d/Y',
       'to_format' => '',
@@ -49,7 +49,7 @@ public function testMigrateExceptionMissingToFormat() {
   /**
    * Tests that date format mismatches will throw an exception.
    */
-  public function testMigrateExceptionBadFormat() {
+  public function testMigrateExceptionBadFormat(): void {
     $configuration = [
       'from_format' => 'm/d/Y',
       'to_format' => 'Y-m-d',
@@ -64,7 +64,7 @@ public function testMigrateExceptionBadFormat() {
   /**
    * Tests that an unexpected date value will throw an exception.
    */
-  public function testMigrateExceptionUnexpectedValue() {
+  public function testMigrateExceptionUnexpectedValue(): void {
     $configuration = [
       'from_format' => 'm/d/Y',
       'to_format' => 'Y-m-d',
@@ -90,7 +90,7 @@ public function testMigrateExceptionUnexpectedValue() {
    * @param $expected
    *   The expected value of the migration process plugin.
    */
-  public function testTransform($configuration, $value, $expected) {
+  public function testTransform($configuration, $value, $expected): void {
     $this->plugin = new FormatDate($configuration, 'test_format_date', []);
     $actual = $this->plugin->transform($value, $this->migrateExecutable, $this->row, 'field_date');
 
diff --git a/core/modules/migrate/tests/src/Unit/process/GetTest.php b/core/modules/migrate/tests/src/Unit/process/GetTest.php
index a1e4b9769476..fd3374e2ccf3 100644
--- a/core/modules/migrate/tests/src/Unit/process/GetTest.php
+++ b/core/modules/migrate/tests/src/Unit/process/GetTest.php
@@ -16,7 +16,7 @@ class GetTest extends MigrateProcessTestCase {
   /**
    * Tests the Get plugin when source is a string.
    */
-  public function testTransformSourceString() {
+  public function testTransformSourceString(): void {
     $this->row->expects($this->once())
       ->method('get')
       ->with('test')
@@ -29,7 +29,7 @@ public function testTransformSourceString() {
   /**
    * Tests the Get plugin when source is an array.
    */
-  public function testTransformSourceArray() {
+  public function testTransformSourceArray(): void {
     $map = [
       'test1' => 'source_value1',
       'test2' => 'source_value2',
@@ -47,7 +47,7 @@ public function testTransformSourceArray() {
   /**
    * Tests the Get plugin when source is a string pointing to destination.
    */
-  public function testTransformSourceStringAt() {
+  public function testTransformSourceStringAt(): void {
     $this->row->expects($this->once())
       ->method('get')
       ->with('@@test')
@@ -60,7 +60,7 @@ public function testTransformSourceStringAt() {
   /**
    * Tests the Get plugin when source is an array pointing to destination.
    */
-  public function testTransformSourceArrayAt() {
+  public function testTransformSourceArrayAt(): void {
     $map = [
       'test1' => 'source_value1',
       '@@test2' => 'source_value2',
@@ -82,7 +82,7 @@ public function testTransformSourceArrayAt() {
    *
    * @dataProvider integerValuesDataProvider
    */
-  public function testIntegerValues($source, $expected_value) {
+  public function testIntegerValues($source, $expected_value): void {
     $this->row->expects($this->atMost(2))
       ->method('get')
       ->willReturnOnConsecutiveCalls('val1', 'val2');
@@ -119,7 +119,7 @@ public static function integerValuesDataProvider() {
    *
    * An example of a syntax error is "Invalid tag_line detected".
    */
-  public function testPluginSyntax() {
+  public function testPluginSyntax(): void {
     $this->assertNotNull($this->prophesize(Get::class));
   }
 
diff --git a/core/modules/migrate/tests/src/Unit/process/LogTest.php b/core/modules/migrate/tests/src/Unit/process/LogTest.php
index fa3abf6b3eb0..949c5efc2a30 100644
--- a/core/modules/migrate/tests/src/Unit/process/LogTest.php
+++ b/core/modules/migrate/tests/src/Unit/process/LogTest.php
@@ -19,7 +19,7 @@ class LogTest extends MigrateProcessTestCase {
    *
    * @dataProvider providerTestLog
    */
-  public function testLog($value, $expected_message) {
+  public function testLog($value, $expected_message): void {
     // Test the expected log message.
     $this->migrateExecutable->expects($this->once())
       ->method('saveMessage')
diff --git a/core/modules/migrate/tests/src/Unit/process/MakeUniqueEntityFieldTest.php b/core/modules/migrate/tests/src/Unit/process/MakeUniqueEntityFieldTest.php
index 47f03d2aaa85..831e5474eef8 100644
--- a/core/modules/migrate/tests/src/Unit/process/MakeUniqueEntityFieldTest.php
+++ b/core/modules/migrate/tests/src/Unit/process/MakeUniqueEntityFieldTest.php
@@ -66,7 +66,7 @@ protected function setUp(): void {
    *
    * @dataProvider providerTestMakeUniqueEntityField
    */
-  public function testMakeUniqueEntityField($count, $postfix = '', $start = NULL, $length = NULL) {
+  public function testMakeUniqueEntityField($count, $postfix = '', $start = NULL, $length = NULL): void {
     $configuration = [
       'entity_type' => 'test_entity_type',
       'field' => 'test_field',
@@ -88,7 +88,7 @@ public function testMakeUniqueEntityField($count, $postfix = '', $start = NULL,
   /**
    * Tests that invalid start position throws an exception.
    */
-  public function testMakeUniqueEntityFieldEntityInvalidStart() {
+  public function testMakeUniqueEntityFieldEntityInvalidStart(): void {
     $configuration = [
       'entity_type' => 'test_entity_type',
       'field' => 'test_field',
@@ -103,7 +103,7 @@ public function testMakeUniqueEntityFieldEntityInvalidStart() {
   /**
    * Tests that invalid length option throws an exception.
    */
-  public function testMakeUniqueEntityFieldEntityInvalidLength() {
+  public function testMakeUniqueEntityFieldEntityInvalidLength(): void {
     $configuration = [
       'entity_type' => 'test_entity_type',
       'field' => 'test_field',
@@ -178,7 +178,7 @@ protected function entityQueryExpects($count) {
   /**
    * Tests making an entity field value unique only for migrated entities.
    */
-  public function testMakeUniqueEntityFieldMigrated() {
+  public function testMakeUniqueEntityFieldMigrated(): void {
     $configuration = [
       'entity_type' => 'test_entity_type',
       'field' => 'test_field',
diff --git a/core/modules/migrate/tests/src/Unit/process/MenuLinkParentTest.php b/core/modules/migrate/tests/src/Unit/process/MenuLinkParentTest.php
index b0c53007c54f..bc77d09ce8f3 100644
--- a/core/modules/migrate/tests/src/Unit/process/MenuLinkParentTest.php
+++ b/core/modules/migrate/tests/src/Unit/process/MenuLinkParentTest.php
@@ -91,7 +91,7 @@ protected function setUp(): void {
    *
    * @dataProvider providerTransformException
    */
-  public function testTransformException(array $source_value) {
+  public function testTransformException(array $source_value): void {
     [$parent_id, $menu_name] = $source_value;
     $this->migrateLookup->lookup(NULL, [1])->willReturn([]);
     $plugin = new MenuLinkParent([], 'map', [], $this->migrateLookup->reveal(), $this->menuLinkManager->reveal(), $this->menuLinkStorage->reveal(), $this->migration->reveal());
@@ -138,7 +138,7 @@ public static function providerTransformException() {
    *
    * @dataProvider providerMenuLinkParent
    */
-  public function testMenuLinkParent(array $source_value, $lookup_result, $plugin_id, $route_name, $expected_result) {
+  public function testMenuLinkParent(array $source_value, $lookup_result, $plugin_id, $route_name, $expected_result): void {
     [$parent_id, $menu_name, $parent_link_path] = $source_value;
     $this->migrateLookup->lookup(NULL, [$parent_id])
       ->willReturn([['id' => $lookup_result]]);
diff --git a/core/modules/migrate/tests/src/Unit/process/MigrationLookupTest.php b/core/modules/migrate/tests/src/Unit/process/MigrationLookupTest.php
index a849aedb41cb..7700c06c430e 100644
--- a/core/modules/migrate/tests/src/Unit/process/MigrationLookupTest.php
+++ b/core/modules/migrate/tests/src/Unit/process/MigrationLookupTest.php
@@ -20,7 +20,7 @@ class MigrationLookupTest extends MigrationLookupTestCase {
   /**
    * @covers ::transform
    */
-  public function testTransformWithStubSkipping() {
+  public function testTransformWithStubSkipping(): void {
     $migration_plugin = $this->prophesize(MigrationInterface::class);
     $migration_plugin_manager = $this->prophesize(MigrationPluginManagerInterface::class);
 
@@ -104,7 +104,7 @@ public static function providerTestTransformWithStubbing(): array {
    *
    * @dataProvider skipInvalidDataProvider
    */
-  public function testSkipInvalid($value) {
+  public function testSkipInvalid($value): void {
     $migration_plugin = $this->prophesize(MigrationInterface::class);
     $migration_plugin_manager = $this->prophesize(MigrationPluginManagerInterface::class);
 
@@ -143,7 +143,7 @@ public static function skipInvalidDataProvider() {
    *
    * @dataProvider noSkipValidDataProvider
    */
-  public function testNoSkipValid($value) {
+  public function testNoSkipValid($value): void {
     $migration_plugin = $this->prophesize(MigrationInterface::class);
     $migration_plugin_manager = $this->prophesize(MigrationPluginManagerInterface::class);
     $id_map = $this->prophesize(MigrateIdMapInterface::class);
@@ -195,7 +195,7 @@ public static function noSkipValidDataProvider() {
    *
    * @dataProvider successfulLookupDataProvider
    */
-  public function testSuccessfulLookup(array $source_id_values, array $destination_id_values, $source_value, $expected_value) {
+  public function testSuccessfulLookup(array $source_id_values, array $destination_id_values, $source_value, $expected_value): void {
     $migration_plugin = $this->prophesize(MigrationInterface::class);
     $this->migrateLookup->lookup('foo', $source_id_values)->willReturn([$destination_id_values]);
 
@@ -276,7 +276,7 @@ public static function successfulLookupDataProvider() {
   /**
    * Tests processing multiple source IDs.
    */
-  public function testMultipleSourceIds() {
+  public function testMultipleSourceIds(): void {
     $migration_plugin = $this->prophesize(MigrationInterface::class);
     $this->migrateLookup->lookup('foo', ['id', 6])->willReturn([[2]]);
     $configuration = [
@@ -290,7 +290,7 @@ public function testMultipleSourceIds() {
   /**
    * Tests processing multiple migrations and source IDs.
    */
-  public function testMultipleMigrations() {
+  public function testMultipleMigrations(): void {
     $migration_plugin = $this->prophesize(MigrationInterface::class);
     $this->migrateLookup->lookup('example', [1])->willReturn([[2]]);
     $this->migrateLookup->lookup('example', [2])->willReturn([]);
diff --git a/core/modules/migrate/tests/src/Unit/process/NullCoalesceTest.php b/core/modules/migrate/tests/src/Unit/process/NullCoalesceTest.php
index 765f19f7e425..d165c0bc09f4 100644
--- a/core/modules/migrate/tests/src/Unit/process/NullCoalesceTest.php
+++ b/core/modules/migrate/tests/src/Unit/process/NullCoalesceTest.php
@@ -21,7 +21,7 @@ class NullCoalesceTest extends MigrateProcessTestCase {
    *
    * @covers ::transform
    */
-  public function testExceptionOnInvalidValue() {
+  public function testExceptionOnInvalidValue(): void {
     $this->expectException(MigrateException::class);
     (new NullCoalesce([], 'null_coalesce', []))->transform('invalid', $this->migrateExecutable, $this->row, 'destination_property');
   }
@@ -40,7 +40,7 @@ public function testExceptionOnInvalidValue() {
    *
    * @throws \Drupal\migrate\MigrateException
    */
-  public function testTransform(array $source, $expected_result) {
+  public function testTransform(array $source, $expected_result): void {
     $plugin = new NullCoalesce([], 'null_coalesce', []);
     $result = $plugin->transform($source, $this->migrateExecutable, $this->row, 'destination_property');
     $this->assertSame($expected_result, $result);
@@ -94,7 +94,7 @@ public static function transformDataProvider() {
    *
    * @throws \Drupal\migrate\MigrateException
    */
-  public function testTransformWithDefault(array $source, $default_value, $expected_result) {
+  public function testTransformWithDefault(array $source, $default_value, $expected_result): void {
     $plugin = new NullCoalesce(['default_value' => $default_value], 'null_coalesce', []);
     $result = $plugin->transform($source, $this->migrateExecutable, $this->row, 'destination_property');
     $this->assertSame($expected_result, $result);
diff --git a/core/modules/migrate/tests/src/Unit/process/ProcessPluginBaseTest.php b/core/modules/migrate/tests/src/Unit/process/ProcessPluginBaseTest.php
index 1b53569e92a3..73af347e4064 100644
--- a/core/modules/migrate/tests/src/Unit/process/ProcessPluginBaseTest.php
+++ b/core/modules/migrate/tests/src/Unit/process/ProcessPluginBaseTest.php
@@ -23,7 +23,7 @@ class ProcessPluginBaseTest extends UnitTestCase {
    * @covers ::stopPipeline
    * @covers ::reset
    */
-  public function testStopPipeline() {
+  public function testStopPipeline(): void {
     $plugin = new ProcessPluginBase([], 'plugin_id', []);
     $this->assertFalse($plugin->isPipelineStopped());
     $stopPipeline = (new \ReflectionClass($plugin))->getMethod('stopPipeline');
diff --git a/core/modules/migrate/tests/src/Unit/process/SkipOnEmptyTest.php b/core/modules/migrate/tests/src/Unit/process/SkipOnEmptyTest.php
index 9b2236fef334..33e630977f6a 100644
--- a/core/modules/migrate/tests/src/Unit/process/SkipOnEmptyTest.php
+++ b/core/modules/migrate/tests/src/Unit/process/SkipOnEmptyTest.php
@@ -18,7 +18,7 @@ class SkipOnEmptyTest extends MigrateProcessTestCase {
   /**
    * @covers ::process
    */
-  public function testProcessSkipsOnEmpty() {
+  public function testProcessSkipsOnEmpty(): void {
     $configuration['method'] = 'process';
     $plugin = new SkipOnEmpty($configuration, 'skip_on_empty', []);
     $this->assertFalse($plugin->isPipelineStopped());
@@ -29,7 +29,7 @@ public function testProcessSkipsOnEmpty() {
   /**
    * @covers ::process
    */
-  public function testProcessBypassesOnNonEmpty() {
+  public function testProcessBypassesOnNonEmpty(): void {
     $configuration['method'] = 'process';
     $plugin = new SkipOnEmpty($configuration, 'skip_on_empty', []);
     $value = $plugin
@@ -41,7 +41,7 @@ public function testProcessBypassesOnNonEmpty() {
   /**
    * @covers ::row
    */
-  public function testRowSkipsOnEmpty() {
+  public function testRowSkipsOnEmpty(): void {
     $configuration['method'] = 'row';
     $this->expectException(MigrateSkipRowException::class);
     (new SkipOnEmpty($configuration, 'skip_on_empty', []))
@@ -51,7 +51,7 @@ public function testRowSkipsOnEmpty() {
   /**
    * @covers ::row
    */
-  public function testRowBypassesOnNonEmpty() {
+  public function testRowBypassesOnNonEmpty(): void {
     $configuration['method'] = 'row';
     $value = (new SkipOnEmpty($configuration, 'skip_on_empty', []))
       ->transform(' ', $this->migrateExecutable, $this->row, 'destination_property');
@@ -63,7 +63,7 @@ public function testRowBypassesOnNonEmpty() {
    *
    * @covers ::row
    */
-  public function testRowSkipWithoutMessage() {
+  public function testRowSkipWithoutMessage(): void {
     $configuration = [
       'method' => 'row',
     ];
@@ -77,7 +77,7 @@ public function testRowSkipWithoutMessage() {
    *
    * @covers ::row
    */
-  public function testRowSkipWithMessage() {
+  public function testRowSkipWithMessage(): void {
     $configuration = [
       'method' => 'row',
       'message' => 'The value is empty',
@@ -91,7 +91,7 @@ public function testRowSkipWithMessage() {
   /**
    * Tests repeated execution of a process plugin can reset the pipeline stoppage correctly.
    */
-  public function testMultipleTransforms() {
+  public function testMultipleTransforms(): void {
     $configuration['method'] = 'process';
     $plugin = new SkipOnEmpty($configuration, 'skip_on_empty', []);
 
diff --git a/core/modules/migrate/tests/src/Unit/process/SkipRowIfNotSetTest.php b/core/modules/migrate/tests/src/Unit/process/SkipRowIfNotSetTest.php
index e299df149832..554b7d210593 100644
--- a/core/modules/migrate/tests/src/Unit/process/SkipRowIfNotSetTest.php
+++ b/core/modules/migrate/tests/src/Unit/process/SkipRowIfNotSetTest.php
@@ -20,7 +20,7 @@ class SkipRowIfNotSetTest extends MigrateProcessTestCase {
    *
    * @covers ::transform
    */
-  public function testRowSkipWithoutMessage() {
+  public function testRowSkipWithoutMessage(): void {
     $configuration = [
       'index' => 'some_key',
     ];
@@ -34,7 +34,7 @@ public function testRowSkipWithoutMessage() {
    *
    * @covers ::transform
    */
-  public function testRowSkipWithMessage() {
+  public function testRowSkipWithMessage(): void {
     $configuration = [
       'index' => 'some_key',
       'message' => "The 'some_key' key is not set",
diff --git a/core/modules/migrate/tests/src/Unit/process/StaticMapTest.php b/core/modules/migrate/tests/src/Unit/process/StaticMapTest.php
index ed2fd7377ac7..04053a64fbc7 100644
--- a/core/modules/migrate/tests/src/Unit/process/StaticMapTest.php
+++ b/core/modules/migrate/tests/src/Unit/process/StaticMapTest.php
@@ -28,7 +28,7 @@ protected function setUp(): void {
   /**
    * Tests map when the source is a string.
    */
-  public function testMapWithSourceString() {
+  public function testMapWithSourceString(): void {
     $value = $this->plugin->transform('foo', $this->migrateExecutable, $this->row, 'destination_property');
     $this->assertSame(['bar' => 'baz'], $value);
   }
@@ -36,7 +36,7 @@ public function testMapWithSourceString() {
   /**
    * Tests map when the source is a list.
    */
-  public function testMapWithSourceList() {
+  public function testMapWithSourceList(): void {
     $value = $this->plugin->transform(['foo', 'bar'], $this->migrateExecutable, $this->row, 'destination_property');
     $this->assertSame('baz', $value);
   }
@@ -44,7 +44,7 @@ public function testMapWithSourceList() {
   /**
    * Tests when the source is empty.
    */
-  public function testMapWithEmptySource() {
+  public function testMapWithEmptySource(): void {
     $this->expectException(MigrateException::class);
     $this->plugin->transform([], $this->migrateExecutable, $this->row, 'destination_property');
   }
@@ -52,7 +52,7 @@ public function testMapWithEmptySource() {
   /**
    * Tests when the source is invalid.
    */
-  public function testMapWithInvalidSource() {
+  public function testMapWithInvalidSource(): void {
     $this->expectException(MigrateSkipRowException::class);
     $this->expectExceptionMessage(sprintf("No static mapping found for '%s' and no default value provided for destination '%s'.", Variable::export(['bar']), 'destination_property'));
     $this->plugin->transform(['bar'], $this->migrateExecutable, $this->row, 'destination_property');
@@ -61,7 +61,7 @@ public function testMapWithInvalidSource() {
   /**
    * Tests when the source is invalid but there's a default.
    */
-  public function testMapWithInvalidSourceWithADefaultValue() {
+  public function testMapWithInvalidSourceWithADefaultValue(): void {
     $configuration['map']['foo']['bar'] = 'baz';
     $configuration['default_value'] = 'test';
     $this->plugin = new StaticMap($configuration, 'map', []);
@@ -72,7 +72,7 @@ public function testMapWithInvalidSourceWithADefaultValue() {
   /**
    * Tests when the source is invalid but there's a default value of NULL.
    */
-  public function testMapWithInvalidSourceWithANullDefaultValue() {
+  public function testMapWithInvalidSourceWithANullDefaultValue(): void {
     $configuration['map']['foo']['bar'] = 'baz';
     $configuration['default_value'] = NULL;
     $this->plugin = new StaticMap($configuration, 'map', []);
@@ -83,7 +83,7 @@ public function testMapWithInvalidSourceWithANullDefaultValue() {
   /**
    * Tests when the source is invalid and bypass is enabled.
    */
-  public function testMapWithInvalidSourceAndBypass() {
+  public function testMapWithInvalidSourceAndBypass(): void {
     $configuration['map']['foo']['bar'] = 'baz';
     $configuration['default_value'] = 'test';
     $configuration['bypass'] = TRUE;
@@ -96,7 +96,7 @@ public function testMapWithInvalidSourceAndBypass() {
   /**
    * Tests when the source is NULL.
    */
-  public function testWithNullSourceNotInMap() {
+  public function testWithNullSourceNotInMap(): void {
     $this->expectException(MigrateSkipRowException::class);
     $this->expectExceptionMessage("No static mapping found for 'NULL' and no default value provided for destination 'destination_property'");
     $this->plugin->transform(NULL, $this->migrateExecutable, $this->row, 'destination_property');
@@ -105,7 +105,7 @@ public function testWithNullSourceNotInMap() {
   /**
    * Tests when the source is invalid but there's a default.
    */
-  public function testWithNullSource() {
+  public function testWithNullSource(): void {
     $configuration['map']['foo']['bar'] = 'baz';
     $configuration['map'][NULL] = 'mapped NULL';
     $this->plugin = new StaticMap($configuration, 'map', []);
diff --git a/core/modules/migrate/tests/src/Unit/process/SubProcessTest.php b/core/modules/migrate/tests/src/Unit/process/SubProcessTest.php
index 6fa1c8d801be..d8ba9cbac002 100644
--- a/core/modules/migrate/tests/src/Unit/process/SubProcessTest.php
+++ b/core/modules/migrate/tests/src/Unit/process/SubProcessTest.php
@@ -40,7 +40,7 @@ class SubProcessTest extends MigrateProcessTestCase {
    *
    * @dataProvider providerTestSubProcess
    */
-  public function testSubProcess($process_configuration, $source_values = []) {
+  public function testSubProcess($process_configuration, $source_values = []): void {
     $migration = $this->getMigration();
     // Set up the properties for the sub_process.
     $plugin = new SubProcess($process_configuration, 'sub_process', []);
@@ -134,7 +134,7 @@ public static function providerTestSubProcess() {
    *
    * @dataProvider providerTestNotFoundSubProcess
    */
-  public function testNotFoundSubProcess($process_configuration, $source_values = []) {
+  public function testNotFoundSubProcess($process_configuration, $source_values = []): void {
     $migration = $this->getMigration();
     // Set up the properties for the sub_process.
     $plugin = new SubProcess($process_configuration, 'sub_process', []);
@@ -200,7 +200,7 @@ public static function providerTestNotFoundSubProcess() {
    *
    * @dataProvider providerTestSourceNotArray
    */
-  public function testSourceNotArray($source_values, $type) {
+  public function testSourceNotArray($source_values, $type): void {
     $process = new SubProcess(['process' => ['foo' => 'source_foo']], 'sub_process', []);
     $this->expectException(MigrateException::class);
     $this->expectExceptionMessage("Input array should hold elements of type array, instead element was of type '$type'");
diff --git a/core/modules/migrate/tests/src/Unit/process/SubstrTest.php b/core/modules/migrate/tests/src/Unit/process/SubstrTest.php
index 6ce82d60e3a3..a40e9186b001 100644
--- a/core/modules/migrate/tests/src/Unit/process/SubstrTest.php
+++ b/core/modules/migrate/tests/src/Unit/process/SubstrTest.php
@@ -30,7 +30,7 @@ protected function setUp(): void {
    *
    * @dataProvider providerTestSubstr
    */
-  public function testSubstr($start = NULL, $length = NULL, $expected = NULL) {
+  public function testSubstr($start = NULL, $length = NULL, $expected = NULL): void {
     $configuration['start'] = $start;
     $configuration['length'] = $length;
     $this->plugin = new Substr($configuration, 'map', []);
@@ -61,7 +61,7 @@ public static function providerTestSubstr() {
   /**
    * Tests invalid input type.
    */
-  public function testSubstrFail() {
+  public function testSubstrFail(): void {
     $configuration = [];
     $this->plugin = new Substr($configuration, 'map', []);
     $this->expectException(MigrateException::class);
@@ -72,7 +72,7 @@ public function testSubstrFail() {
   /**
    * Tests that the start parameter is an integer.
    */
-  public function testStartIsString() {
+  public function testStartIsString(): void {
     $configuration['start'] = '2';
     $this->plugin = new Substr($configuration, 'map', []);
     $this->expectException(MigrateException::class);
@@ -83,7 +83,7 @@ public function testStartIsString() {
   /**
    * Tests that the length parameter is an integer.
    */
-  public function testLengthIsString() {
+  public function testLengthIsString(): void {
     $configuration['length'] = '1';
     $this->plugin = new Substr($configuration, 'map', []);
     $this->expectException(MigrateException::class);
diff --git a/core/modules/migrate/tests/src/Unit/process/UrlEncodeTest.php b/core/modules/migrate/tests/src/Unit/process/UrlEncodeTest.php
index 41d00eef0e27..c54ff69065cc 100644
--- a/core/modules/migrate/tests/src/Unit/process/UrlEncodeTest.php
+++ b/core/modules/migrate/tests/src/Unit/process/UrlEncodeTest.php
@@ -43,7 +43,7 @@ public static function urlDataProvider() {
    * Cover various encoding scenarios.
    * @dataProvider urlDataProvider
    */
-  public function testUrls($input, $output) {
+  public function testUrls($input, $output): void {
     $this->assertEquals($output, $this->doTransform($input));
   }
 
diff --git a/core/modules/migrate_drupal/tests/src/Kernel/IdMapTableNoDummyTest.php b/core/modules/migrate_drupal/tests/src/Kernel/IdMapTableNoDummyTest.php
index e0273f964db2..ce9b5a3f9efe 100644
--- a/core/modules/migrate_drupal/tests/src/Kernel/IdMapTableNoDummyTest.php
+++ b/core/modules/migrate_drupal/tests/src/Kernel/IdMapTableNoDummyTest.php
@@ -32,7 +32,7 @@ protected function setUp(): void {
   /**
    * Tests that dummy map tables do not exist.
    */
-  public function testNoDummyTables() {
+  public function testNoDummyTables(): void {
     $database = \Drupal::database();
     $tables = $database->schema()->findTables('%migrate_map%');
     $dummy_tables = preg_grep("/.*migrate_map_([0-9a-fA-F]){13}/", $tables);
diff --git a/core/modules/migrate_drupal/tests/src/Kernel/MigrateFieldPluginManagerTest.php b/core/modules/migrate_drupal/tests/src/Kernel/MigrateFieldPluginManagerTest.php
index 4a225068326a..34c933c6f38f 100644
--- a/core/modules/migrate_drupal/tests/src/Kernel/MigrateFieldPluginManagerTest.php
+++ b/core/modules/migrate_drupal/tests/src/Kernel/MigrateFieldPluginManagerTest.php
@@ -51,7 +51,7 @@ protected function setUp(): void {
    *
    * @covers ::getPluginIdFromFieldType
    */
-  public function testPluginSelection() {
+  public function testPluginSelection(): void {
     $this->assertSame('link', $this->pluginManager->getPluginIdFromFieldType('link', ['core' => 6]));
     $this->assertSame('link_field', $this->pluginManager->getPluginIdFromFieldType('link_field', ['core' => 7]));
     $this->assertSame('image', $this->pluginManager->getPluginIdFromFieldType('image', ['core' => 7]));
@@ -73,7 +73,7 @@ public function testPluginSelection() {
    * @covers ::getPluginIdFromFieldType
    * @dataProvider nonExistentPluginExceptionsData
    */
-  public function testNonExistentPluginExceptions($core, $field_type) {
+  public function testNonExistentPluginExceptions($core, $field_type): void {
     $this->expectException(PluginNotFoundException::class);
     $this->expectExceptionMessage(sprintf("Plugin ID '%s' was not found.", $field_type));
     $this->pluginManager->getPluginIdFromFieldType($field_type, ['core' => $core]);
@@ -109,7 +109,7 @@ public static function nonExistentPluginExceptionsData() {
   /**
    * Tests that plugins with no explicit weight are given a weight of 0.
    */
-  public function testDefaultWeight() {
+  public function testDefaultWeight(): void {
     $definitions = $this->pluginManager->getDefinitions();
     $deprecated_plugins = [
       'date',
diff --git a/core/modules/migrate_drupal/tests/src/Kernel/NodeMigrationTypePluginAlterTest.php b/core/modules/migrate_drupal/tests/src/Kernel/NodeMigrationTypePluginAlterTest.php
index 935a7212ab40..ceba413d05b1 100644
--- a/core/modules/migrate_drupal/tests/src/Kernel/NodeMigrationTypePluginAlterTest.php
+++ b/core/modules/migrate_drupal/tests/src/Kernel/NodeMigrationTypePluginAlterTest.php
@@ -44,7 +44,7 @@ protected function setUp(): void {
    *
    * @throws \Exception
    */
-  public function testMigrationPluginAlter($type, array $migration_definitions, array $expected) {
+  public function testMigrationPluginAlter($type, array $migration_definitions, array $expected): void {
     $this->makeNodeMigrateMapTable($type, '7');
     migrate_drupal_migration_plugins_alter($migration_definitions);
     $this->assertSame($expected, $migration_definitions);
diff --git a/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/DestinationCategoryTest.php b/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/DestinationCategoryTest.php
index e422156c3339..b1f6d9e8af99 100644
--- a/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/DestinationCategoryTest.php
+++ b/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/DestinationCategoryTest.php
@@ -46,7 +46,7 @@ protected function setUp(): void {
   /**
    * Tests that all D6 migrations are tagged as either Configuration or Content.
    */
-  public function testD6Categories() {
+  public function testD6Categories(): void {
     $migrations = $this->drupal6Migrations();
     $this->assertArrayHasKey('d6_node:page', $migrations);
     $this->assertCategories($migrations);
@@ -55,7 +55,7 @@ public function testD6Categories() {
   /**
    * Tests that all D7 migrations are tagged as either Configuration or Content.
    */
-  public function testD7Categories() {
+  public function testD7Categories(): void {
     $migrations = $this->drupal7Migrations();
     $this->assertArrayHasKey('d7_node:page', $migrations);
     $this->assertCategories($migrations);
diff --git a/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/ContentEntityConstructorTest.php b/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/ContentEntityConstructorTest.php
index 3de02ecbef30..7e7b2d6d92de 100644
--- a/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/ContentEntityConstructorTest.php
+++ b/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/ContentEntityConstructorTest.php
@@ -32,7 +32,7 @@ class ContentEntityConstructorTest extends KernelTestBase {
    *
    * @dataProvider providerTestConstructor
    */
-  public function testConstructor($configuration, $plugin_definition, $exception_class, $expected) {
+  public function testConstructor($configuration, $plugin_definition, $exception_class, $expected): void {
     $migration = $this->prophesize(MigrationInterface::class)->reveal();
     $this->expectException($exception_class);
     $this->expectExceptionMessage($expected);
diff --git a/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/ContentEntityTest.php b/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/ContentEntityTest.php
index 5417aaa200be..c4cdaa3596b6 100644
--- a/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/ContentEntityTest.php
+++ b/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/ContentEntityTest.php
@@ -215,7 +215,7 @@ protected function assertIds(MigrateSourceInterface $source, array $configuratio
    *
    * @dataProvider migrationConfigurationProvider
    */
-  public function testUserSource(array $configuration) {
+  public function testUserSource(array $configuration): void {
     $migration = $this->migrationPluginManager
       ->createStubMigration($this->migrationDefinition('content_entity:user', $configuration));
     $user_source = $migration->getSourcePlugin();
@@ -246,7 +246,7 @@ public function testUserSource(array $configuration) {
    *
    * @dataProvider migrationConfigurationProvider
    */
-  public function testFileSource(array $configuration) {
+  public function testFileSource(array $configuration): void {
     $file = File::create([
       'filename' => 'foo.txt',
       'uid' => $this->user->id(),
@@ -281,7 +281,7 @@ public function testFileSource(array $configuration) {
    *
    * @dataProvider migrationConfigurationProvider
    */
-  public function testNodeSource(array $configuration) {
+  public function testNodeSource(array $configuration): void {
     $configuration += ['bundle' => $this->bundle];
     $migration = $this->migrationPluginManager
       ->createStubMigration($this->migrationDefinition('content_entity:node', $configuration));
@@ -333,7 +333,7 @@ public function testNodeSource(array $configuration) {
    *
    * @dataProvider migrationConfigurationProvider
    */
-  public function testMediaSource(array $configuration) {
+  public function testMediaSource(array $configuration): void {
     $values = [
       'id' => 'image',
       'label' => 'Image',
@@ -385,7 +385,7 @@ public function testMediaSource(array $configuration) {
    *
    * @dataProvider migrationConfigurationProvider
    */
-  public function testTermSource(array $configuration) {
+  public function testTermSource(array $configuration): void {
     $term2 = Term::create([
       'vid' => $this->vocabulary,
       'name' => 'Granny Smith',
diff --git a/core/modules/migrate_drupal/tests/src/Kernel/StateFileExistsTest.php b/core/modules/migrate_drupal/tests/src/Kernel/StateFileExistsTest.php
index 209d686a81a9..318b2674b086 100644
--- a/core/modules/migrate_drupal/tests/src/Kernel/StateFileExistsTest.php
+++ b/core/modules/migrate_drupal/tests/src/Kernel/StateFileExistsTest.php
@@ -77,7 +77,7 @@ class StateFileExistsTest extends MigrateDrupalTestBase {
   /**
    * Tests that the migrate_drupal.yml files exist as needed.
    */
-  public function testMigrationState() {
+  public function testMigrationState(): void {
     // Install all available modules.
     $module_handler = $this->container->get('module_handler');
     $all_modules = $this->coreModuleListDataProvider();
diff --git a/core/modules/migrate_drupal/tests/src/Kernel/d6/EntityContentBaseTest.php b/core/modules/migrate_drupal/tests/src/Kernel/d6/EntityContentBaseTest.php
index 7805a02fb2bc..5923841e6a6b 100644
--- a/core/modules/migrate_drupal/tests/src/Kernel/d6/EntityContentBaseTest.php
+++ b/core/modules/migrate_drupal/tests/src/Kernel/d6/EntityContentBaseTest.php
@@ -63,7 +63,7 @@ protected function setUp(): void {
    *
    * This is the default behavior.
    */
-  public function testOverwriteAllMappedProperties() {
+  public function testOverwriteAllMappedProperties(): void {
     $this->executeMigration('d6_user');
     /** @var \Drupal\user\UserInterface $account */
     $account = User::load(2);
@@ -77,7 +77,7 @@ public function testOverwriteAllMappedProperties() {
    *
    * The selected properties are specified in the destination configuration.
    */
-  public function testOverwriteProperties() {
+  public function testOverwriteProperties(): void {
     // Execute the migration in migrate_overwrite_test, which documents how
     // property overwrites work.
     $this->executeMigration('users');
@@ -95,7 +95,7 @@ public function testOverwriteProperties() {
   /**
    * Tests that translation destination fails for untranslatable entities.
    */
-  public function testUntranslatable() {
+  public function testUntranslatable(): void {
     $this->enableModules(['language_test']);
     $this->installEntitySchema('no_language_entity_test');
 
diff --git a/core/modules/migrate_drupal/tests/src/Kernel/d6/FieldDiscoveryTest.php b/core/modules/migrate_drupal/tests/src/Kernel/d6/FieldDiscoveryTest.php
index 05aac26fb9f8..0dc1bfe1819e 100644
--- a/core/modules/migrate_drupal/tests/src/Kernel/d6/FieldDiscoveryTest.php
+++ b/core/modules/migrate_drupal/tests/src/Kernel/d6/FieldDiscoveryTest.php
@@ -86,7 +86,7 @@ protected function setUp(): void {
    *
    * @covers ::addAllFieldProcesses
    */
-  public function testAddAllFieldProcesses() {
+  public function testAddAllFieldProcesses(): void {
     $expected_process_keys = [
       'field_commander',
       'field_company',
@@ -128,7 +128,7 @@ public function testAddAllFieldProcesses() {
    * @covers ::addAllFieldProcesses
    * @dataProvider addAllFieldProcessesAltersData
    */
-  public function testAddAllFieldProcessesAlters($field_plugin_method, $expected_process) {
+  public function testAddAllFieldProcessesAlters($field_plugin_method, $expected_process): void {
     $this->assertFieldProcess($this->fieldDiscovery, $this->migrationPluginManager, FieldDiscoveryInterface::DRUPAL_6, $field_plugin_method, $expected_process);
   }
 
@@ -221,7 +221,7 @@ public static function addAllFieldProcessesAltersData() {
    *
    * @covers ::addAllFieldProcesses
    */
-  public function testAddFields() {
+  public function testAddFields(): void {
     $this->migrateFields();
     $field_discovery = $this->container->get('migrate_drupal.field_discovery');
     $migration_plugin_manager = $this->container->get('plugin.manager.migration');
@@ -278,7 +278,7 @@ public function testAddFields() {
    *
    * @covers ::getAllFields
    */
-  public function testGetAllFields() {
+  public function testGetAllFields(): void {
     $field_discovery_test = new FieldDiscoveryTestClass($this->fieldPluginManager, $this->migrationPluginManager, $this->logger);
     $actual_fields = $field_discovery_test->getAllFields('6');
     $actual_node_types = array_keys($actual_fields['node']);
@@ -300,7 +300,7 @@ public function testGetAllFields() {
    *
    * @covers ::getSourcePlugin
    */
-  public function testGetSourcePlugin() {
+  public function testGetSourcePlugin(): void {
     $this->assertSourcePlugin('6', FieldInstance::class, [
       'requirements_met' => TRUE,
       'id' => 'd6_field_instance',
diff --git a/core/modules/migrate_drupal/tests/src/Kernel/d6/FollowUpMigrationsTest.php b/core/modules/migrate_drupal/tests/src/Kernel/d6/FollowUpMigrationsTest.php
index e9ae850dd5e0..503c75770284 100644
--- a/core/modules/migrate_drupal/tests/src/Kernel/d6/FollowUpMigrationsTest.php
+++ b/core/modules/migrate_drupal/tests/src/Kernel/d6/FollowUpMigrationsTest.php
@@ -39,7 +39,7 @@ protected function setUp(): void {
   /**
    * Tests entity reference translations.
    */
-  public function testEntityReferenceTranslations() {
+  public function testEntityReferenceTranslations(): void {
     // Test the entity reference field before the follow-up migrations.
     $node = Node::load(10);
     $this->assertSame('13', $node->get('field_reference')->target_id);
diff --git a/core/modules/migrate_drupal/tests/src/Kernel/d6/MigrateDrupal6AuditIdsTest.php b/core/modules/migrate_drupal/tests/src/Kernel/d6/MigrateDrupal6AuditIdsTest.php
index 10c8b051c13c..5a97d323ea17 100644
--- a/core/modules/migrate_drupal/tests/src/Kernel/d6/MigrateDrupal6AuditIdsTest.php
+++ b/core/modules/migrate_drupal/tests/src/Kernel/d6/MigrateDrupal6AuditIdsTest.php
@@ -56,7 +56,7 @@ protected function setUp(): void {
   /**
    * Tests multiple migrations to the same destination with no ID conflicts.
    */
-  public function testMultipleMigrationWithoutIdConflicts() {
+  public function testMultipleMigrationWithoutIdConflicts(): void {
     // Create a node of type page.
     $node = Node::create(['type' => 'page', 'title' => 'foo']);
     $node->moderation_state->value = 'published';
@@ -94,7 +94,7 @@ public function testMultipleMigrationWithoutIdConflicts() {
   /**
    * Tests all migrations with no ID conflicts.
    */
-  public function testAllMigrationsWithNoIdConflicts() {
+  public function testAllMigrationsWithNoIdConflicts(): void {
     $migrations = $this->container
       ->get('plugin.manager.migration')
       ->createInstancesByTag('Drupal 6');
@@ -112,7 +112,7 @@ public function testAllMigrationsWithNoIdConflicts() {
   /**
    * Tests all migrations with ID conflicts.
    */
-  public function testAllMigrationsWithIdConflicts() {
+  public function testAllMigrationsWithIdConflicts(): void {
     // Get all Drupal 6 migrations.
     $migrations = $this->container
       ->get('plugin.manager.migration')
@@ -149,7 +149,7 @@ function (AuditResult $result) {
   /**
    * Tests draft revisions ID conflicts.
    */
-  public function testDraftRevisionIdConflicts() {
+  public function testDraftRevisionIdConflicts(): void {
     // Create a published node of type page.
     $node = Node::create(['type' => 'page', 'title' => 'foo']);
     $node->moderation_state->value = 'published';
@@ -183,7 +183,7 @@ public function testDraftRevisionIdConflicts() {
   /**
    * Tests ID conflicts for inaccessible nodes.
    */
-  public function testNodeGrantsIdConflicts() {
+  public function testNodeGrantsIdConflicts(): void {
     // Enable the node_test module to restrict access to page nodes.
     $this->enableModules(['node_test']);
 
diff --git a/core/modules/migrate_drupal/tests/src/Kernel/d6/MigrationProcessTest.php b/core/modules/migrate_drupal/tests/src/Kernel/d6/MigrationProcessTest.php
index bab20406ab0d..ace3933fec76 100644
--- a/core/modules/migrate_drupal/tests/src/Kernel/d6/MigrationProcessTest.php
+++ b/core/modules/migrate_drupal/tests/src/Kernel/d6/MigrationProcessTest.php
@@ -28,7 +28,7 @@ protected function setUp(): void {
    *
    * @throws \Exception
    */
-  public function testGetProcess() {
+  public function testGetProcess(): void {
     /** @var \Drupal\migrate\Plugin\MigrationPluginManagerInterface $plugin_manager */
     $plugin_manager = $this->container->get('plugin.manager.migration');
     $migrations = $plugin_manager->createInstancesByTag('Drupal 6');
diff --git a/core/modules/migrate_drupal/tests/src/Kernel/d6/VariableTranslationCheckRequirementsTest.php b/core/modules/migrate_drupal/tests/src/Kernel/d6/VariableTranslationCheckRequirementsTest.php
index c586dcc9346a..1f4811127b6d 100644
--- a/core/modules/migrate_drupal/tests/src/Kernel/d6/VariableTranslationCheckRequirementsTest.php
+++ b/core/modules/migrate_drupal/tests/src/Kernel/d6/VariableTranslationCheckRequirementsTest.php
@@ -29,7 +29,7 @@ protected function setUp(): void {
   /**
    * Tests exception in thrown when the i18n_variable table does not exist.
    */
-  public function testCheckRequirements() {
+  public function testCheckRequirements(): void {
     $this->expectException(RequirementsException::class);
     $this->expectExceptionMessage("Source database table 'i18n_variable' does not exist");
     $this->getMigration('d6_system_maintenance_translation')
diff --git a/core/modules/migrate_drupal/tests/src/Kernel/d7/FieldDiscoveryTest.php b/core/modules/migrate_drupal/tests/src/Kernel/d7/FieldDiscoveryTest.php
index cdff846a1867..dfd50dbf6d48 100644
--- a/core/modules/migrate_drupal/tests/src/Kernel/d7/FieldDiscoveryTest.php
+++ b/core/modules/migrate_drupal/tests/src/Kernel/d7/FieldDiscoveryTest.php
@@ -117,7 +117,7 @@ protected function setUp(): void {
    *
    * @covers ::addAllFieldProcesses
    */
-  public function testAddAllFieldProcesses() {
+  public function testAddAllFieldProcesses(): void {
     $expected_process_keys = [
       'comment_body',
       'field_integer',
@@ -172,7 +172,7 @@ public function testAddAllFieldProcesses() {
    * @covers ::addAllFieldProcesses
    * @dataProvider addAllFieldProcessesAltersData
    */
-  public function testAddAllFieldProcessesAlters($field_plugin_method, $expected_process) {
+  public function testAddAllFieldProcessesAlters($field_plugin_method, $expected_process): void {
     $this->assertFieldProcess($this->fieldDiscovery, $this->migrationPluginManager, FieldDiscoveryInterface::DRUPAL_7, $field_plugin_method, $expected_process);
   }
 
@@ -322,7 +322,7 @@ public static function addAllFieldProcessesAltersData() {
    *
    * @covers ::getAllFields
    */
-  public function testGetAllFields() {
+  public function testGetAllFields(): void {
     $field_discovery_test = new FieldDiscoveryTestClass($this->fieldPluginManager, $this->migrationPluginManager, $this->logger);
     $actual_fields = $field_discovery_test->getAllFields('7');
     $this->assertSame(['comment', 'node', 'user', 'taxonomy_term'], array_keys($actual_fields));
@@ -348,7 +348,7 @@ public function testGetAllFields() {
    *
    * @covers ::getSourcePlugin
    */
-  public function testGetSourcePlugin() {
+  public function testGetSourcePlugin(): void {
     $this->assertSourcePlugin('7', FieldInstance::class, [
       'requirements_met' => TRUE,
       'id' => 'd7_field_instance',
diff --git a/core/modules/migrate_drupal/tests/src/Kernel/d7/FollowUpMigrationsTest.php b/core/modules/migrate_drupal/tests/src/Kernel/d7/FollowUpMigrationsTest.php
index 2daa074ebef2..9494cb640235 100644
--- a/core/modules/migrate_drupal/tests/src/Kernel/d7/FollowUpMigrationsTest.php
+++ b/core/modules/migrate_drupal/tests/src/Kernel/d7/FollowUpMigrationsTest.php
@@ -72,7 +72,7 @@ protected function getFileMigrationInfo() {
    *
    * @dataProvider providerTestEntityReferenceTranslations
    */
-  public function testEntityReferenceTranslations($node_migrations) {
+  public function testEntityReferenceTranslations($node_migrations): void {
     $this->executeMigrations($node_migrations);
 
     // Test the entity reference field before the follow-up migrations.
diff --git a/core/modules/migrate_drupal/tests/src/Kernel/d7/MigrateDrupal7AuditIdsTest.php b/core/modules/migrate_drupal/tests/src/Kernel/d7/MigrateDrupal7AuditIdsTest.php
index 41e1d7589b7b..a0adb83a9beb 100644
--- a/core/modules/migrate_drupal/tests/src/Kernel/d7/MigrateDrupal7AuditIdsTest.php
+++ b/core/modules/migrate_drupal/tests/src/Kernel/d7/MigrateDrupal7AuditIdsTest.php
@@ -54,7 +54,7 @@ protected function setUp(): void {
   /**
    * Tests multiple migrations to the same destination with no ID conflicts.
    */
-  public function testMultipleMigrationWithoutIdConflicts() {
+  public function testMultipleMigrationWithoutIdConflicts(): void {
     // Create a node of type page.
     $node = Node::create(['type' => 'page', 'title' => 'foo']);
     $node->moderation_state->value = 'published';
@@ -92,7 +92,7 @@ public function testMultipleMigrationWithoutIdConflicts() {
   /**
    * Tests all migrations with no ID conflicts.
    */
-  public function testAllMigrationsWithNoIdConflicts() {
+  public function testAllMigrationsWithNoIdConflicts(): void {
     $migrations = $this->container
       ->get('plugin.manager.migration')
       ->createInstancesByTag('Drupal 7');
@@ -110,7 +110,7 @@ public function testAllMigrationsWithNoIdConflicts() {
   /**
    * Tests all migrations with ID conflicts.
    */
-  public function testAllMigrationsWithIdConflicts() {
+  public function testAllMigrationsWithIdConflicts(): void {
     $migrations = $this->container
       ->get('plugin.manager.migration')
       ->createInstancesByTag('Drupal 7');
@@ -146,7 +146,7 @@ function (AuditResult $result) {
   /**
    * Tests draft revisions ID conflicts.
    */
-  public function testDraftRevisionIdConflicts() {
+  public function testDraftRevisionIdConflicts(): void {
     // Create a published node of type page.
     $node = Node::create(['type' => 'page', 'title' => 'foo']);
     $node->moderation_state->value = 'published';
@@ -180,7 +180,7 @@ public function testDraftRevisionIdConflicts() {
   /**
    * Tests ID conflicts for inaccessible nodes.
    */
-  public function testNodeGrantsIdConflicts() {
+  public function testNodeGrantsIdConflicts(): void {
     // Enable the node_test module to restrict access to page nodes.
     $this->enableModules(['node_test']);
 
diff --git a/core/modules/migrate_drupal/tests/src/Kernel/d7/MigrationProcessTest.php b/core/modules/migrate_drupal/tests/src/Kernel/d7/MigrationProcessTest.php
index 86e039838b6e..f523b24e9870 100644
--- a/core/modules/migrate_drupal/tests/src/Kernel/d7/MigrationProcessTest.php
+++ b/core/modules/migrate_drupal/tests/src/Kernel/d7/MigrationProcessTest.php
@@ -28,7 +28,7 @@ protected function setUp(): void {
    *
    * @throws \Exception
    */
-  public function testGetProcess() {
+  public function testGetProcess(): void {
     /** @var \Drupal\migrate\Plugin\MigrationPluginManagerInterface $plugin_manager */
     $plugin_manager = $this->container->get('plugin.manager.migration');
     $migrations = $plugin_manager->createInstancesByTag('Drupal 7');
diff --git a/core/modules/migrate_drupal/tests/src/Kernel/dependencies/MigrateDependenciesTest.php b/core/modules/migrate_drupal/tests/src/Kernel/dependencies/MigrateDependenciesTest.php
index b71679252026..92351d30a354 100644
--- a/core/modules/migrate_drupal/tests/src/Kernel/dependencies/MigrateDependenciesTest.php
+++ b/core/modules/migrate_drupal/tests/src/Kernel/dependencies/MigrateDependenciesTest.php
@@ -22,7 +22,7 @@ class MigrateDependenciesTest extends MigrateDrupal6TestBase {
   /**
    * Tests that the order is correct when loading several migrations.
    */
-  public function testMigrationDependenciesOrder() {
+  public function testMigrationDependenciesOrder(): void {
     $migration_items = ['d6_comment', 'd6_filter_format', 'd6_node:page'];
     /** @var \Drupal\migrate\Plugin\RequirementsInterface[] $migrations */
     $migrations = $this->container->get('plugin.manager.migration')->createInstances($migration_items);
diff --git a/core/modules/migrate_drupal/tests/src/Traits/ValidateMigrationStateTestTrait.php b/core/modules/migrate_drupal/tests/src/Traits/ValidateMigrationStateTestTrait.php
index a7378e5a7e72..56367c808ee5 100644
--- a/core/modules/migrate_drupal/tests/src/Traits/ValidateMigrationStateTestTrait.php
+++ b/core/modules/migrate_drupal/tests/src/Traits/ValidateMigrationStateTestTrait.php
@@ -32,7 +32,7 @@ trait ValidateMigrationStateTestTrait {
    * made for the two cases where migrations are yet to be written and where
    * migrations are not needed.
    */
-  public function testMigrationState() {
+  public function testMigrationState(): void {
 
     // Level separator of destination and source properties.
     $separator = ',';
diff --git a/core/modules/migrate_drupal/tests/src/Unit/FieldDiscoveryTest.php b/core/modules/migrate_drupal/tests/src/Unit/FieldDiscoveryTest.php
index 22187e8767f2..a51b8a03cbf3 100644
--- a/core/modules/migrate_drupal/tests/src/Unit/FieldDiscoveryTest.php
+++ b/core/modules/migrate_drupal/tests/src/Unit/FieldDiscoveryTest.php
@@ -62,7 +62,7 @@ protected function setUp(): void {
    * @covers ::getEntityFields
    * @dataProvider getEntityFieldsData
    */
-  public function testGetEntityFields($entity_type_id, array $expected_fields) {
+  public function testGetEntityFields($entity_type_id, array $expected_fields): void {
     $test_data = [
       'getAllFields' => [
         '7' => $this->getAllFieldData(),
@@ -139,7 +139,7 @@ public static function getEntityFieldsData() {
    * @covers ::getBundleFields
    * @dataProvider getBundleFieldsData
    */
-  public function testGetBundleFields($entity_type_id, $bundle, array $expected_fields) {
+  public function testGetBundleFields($entity_type_id, $bundle, array $expected_fields): void {
     $test_data = [
       'getAllFields' => [
         '7' => $this->getAllFieldData(),
@@ -225,7 +225,7 @@ public static function getBundleFieldsData() {
    * @covers ::getCoreVersion
    * @dataProvider getCoreVersionData
    */
-  public function testGetCoreVersion(array $tags, $expected_result) {
+  public function testGetCoreVersion(array $tags, $expected_result): void {
     $migration = $this->prophesize(MigrationInterface::class);
     $migration->getMigrationTags()->willReturn($tags);
     $field_discovery = new FieldDiscoveryTestClass($this->fieldPluginManager->reveal(), $this->migrationPluginManager->reveal(), $this->logger->reveal());
@@ -315,7 +315,7 @@ protected function getAllFieldData() {
    * @covers ::getFieldInstanceStubMigrationDefinition
    * @dataProvider getFieldInstanceStubMigrationDefinition
    */
-  public function testGetFieldInstanceStubMigrationDefinition($core, $expected_definition) {
+  public function testGetFieldInstanceStubMigrationDefinition($core, $expected_definition): void {
     $field_discovery = new FieldDiscoveryTestClass($this->fieldPluginManager->reveal(), $this->migrationPluginManager->reveal(), $this->logger->reveal());
     if (!$expected_definition) {
       $this->expectException(\InvalidArgumentException::class);
diff --git a/core/modules/migrate_drupal/tests/src/Unit/MigrateFieldPluginManagerTest.php b/core/modules/migrate_drupal/tests/src/Unit/MigrateFieldPluginManagerTest.php
index a5b1dd0ed887..30cdf4134f5e 100644
--- a/core/modules/migrate_drupal/tests/src/Unit/MigrateFieldPluginManagerTest.php
+++ b/core/modules/migrate_drupal/tests/src/Unit/MigrateFieldPluginManagerTest.php
@@ -28,7 +28,7 @@ class MigrateFieldPluginManagerTest extends UnitTestCase {
    * @covers ::findDefinitions
    * @dataProvider weightsData
    */
-  public function testWeights($field_type, $core, $expected_plugin_id) {
+  public function testWeights($field_type, $core, $expected_plugin_id): void {
     /** @var \Drupal\Core\Cache\CacheBackendInterface $cache */
     $cache = $this->prophesize(CacheBackendInterface::class)->reveal();
     /** @var \Drupal\Core\Extension\ModuleHandlerInterfaceModuleHandlerInterface $module_handler */
diff --git a/core/modules/migrate_drupal/tests/src/Unit/MigrationConfigurationTraitTest.php b/core/modules/migrate_drupal/tests/src/Unit/MigrationConfigurationTraitTest.php
index 2ce3b23ca326..08a69bd166fc 100644
--- a/core/modules/migrate_drupal/tests/src/Unit/MigrationConfigurationTraitTest.php
+++ b/core/modules/migrate_drupal/tests/src/Unit/MigrationConfigurationTraitTest.php
@@ -18,7 +18,7 @@ class MigrationConfigurationTraitTest extends UnitTestCase {
    * @covers ::getLegacyDrupalVersion
    * @dataProvider providerTestGetLegacyDrupalVersion
    */
-  public function testGetLegacyDrupalVersion($expected_version_string, $schema_version, $exception, $system_table_exists) {
+  public function testGetLegacyDrupalVersion($expected_version_string, $schema_version, $exception, $system_table_exists): void {
     if ($schema_version) {
       $statement = $this->createMock('\Drupal\Core\Database\StatementInterface');
       $statement->expects($this->any())
diff --git a/core/modules/migrate_drupal/tests/src/Unit/MigrationStateUnitTest.php b/core/modules/migrate_drupal/tests/src/Unit/MigrationStateUnitTest.php
index 52d5a1209beb..2231f1ca9540 100644
--- a/core/modules/migrate_drupal/tests/src/Unit/MigrationStateUnitTest.php
+++ b/core/modules/migrate_drupal/tests/src/Unit/MigrationStateUnitTest.php
@@ -38,7 +38,7 @@ class MigrationStateUnitTest extends UnitTestCase {
    * @covers ::getSourceState
    * @covers ::getDestinationsForSource
    */
-  public function testGetUpgradeStates($modules_to_enable, $files, $field_plugins, $migrations, $source_system_data, $expected_7, $expected_6) {
+  public function testGetUpgradeStates($modules_to_enable, $files, $field_plugins, $migrations, $source_system_data, $expected_7, $expected_6): void {
     $fieldPluginManager = $this->prophesize(MigrateFieldPluginManagerInterface::class);
     $fieldPluginManager->getDefinitions()->willReturn($field_plugins);
     $moduleHandler = $this->prophesize(ModuleHandlerInterface::class);
diff --git a/core/modules/migrate_drupal/tests/src/Unit/source/DrupalSqlBaseTest.php b/core/modules/migrate_drupal/tests/src/Unit/source/DrupalSqlBaseTest.php
index e18e8fbfe508..5ec777cbc7da 100644
--- a/core/modules/migrate_drupal/tests/src/Unit/source/DrupalSqlBaseTest.php
+++ b/core/modules/migrate_drupal/tests/src/Unit/source/DrupalSqlBaseTest.php
@@ -77,7 +77,7 @@ protected function setUp(): void {
   /**
    * @covers ::checkRequirements
    */
-  public function testSourceProviderNotActive() {
+  public function testSourceProviderNotActive(): void {
     $plugin = new TestDrupalSqlBase([], 'placeholder_id', $this->pluginDefinition, $this->getMigration(), $this->state, $this->entityTypeManager);
     $plugin->setDatabase($this->getDatabase($this->databaseContents));
     $this->expectException(RequirementsException::class);
@@ -96,7 +96,7 @@ public function testSourceProviderNotActive() {
   /**
    * @covers ::checkRequirements
    */
-  public function testSourceDatabaseError() {
+  public function testSourceDatabaseError(): void {
     $plugin = new TestDrupalSqlBase([], 'test', $this->pluginDefinition, $this->getMigration(), $this->state, $this->entityTypeManager);
     $this->expectException(RequirementsException::class);
     $this->expectExceptionMessage('No database connection configured for source plugin test');
@@ -115,7 +115,7 @@ public function testSourceDatabaseError() {
    *
    * @dataProvider providerMinimumVersion
    */
-  public function testMinimumVersion($success, $minimum_version, $schema_version) {
+  public function testMinimumVersion($success, $minimum_version, $schema_version): void {
     $this->pluginDefinition['minimum_version'] = $minimum_version;
     $this->databaseContents['system'][0]['status'] = 1;
     $this->databaseContents['system'][0]['schema_version'] = $schema_version;
diff --git a/core/modules/migrate_drupal/tests/src/Unit/source/d6/Drupal6SqlBaseTest.php b/core/modules/migrate_drupal/tests/src/Unit/source/d6/Drupal6SqlBaseTest.php
index f4dde78af2b7..90b7574236bd 100644
--- a/core/modules/migrate_drupal/tests/src/Unit/source/d6/Drupal6SqlBaseTest.php
+++ b/core/modules/migrate_drupal/tests/src/Unit/source/d6/Drupal6SqlBaseTest.php
@@ -80,7 +80,7 @@ protected function setUp(): void {
   /**
    * Tests for Drupal6SqlBase::getSystemData().
    */
-  public function testGetSystemData() {
+  public function testGetSystemData(): void {
     $system_data = $this->base->getSystemData();
     // Should be 1 theme and 2 modules.
     $this->assertCount(1, $system_data['theme']);
@@ -93,7 +93,7 @@ public function testGetSystemData() {
   /**
    * Tests for Drupal6SqlBase::moduleExists().
    */
-  public function testDrupal6ModuleExists() {
+  public function testDrupal6ModuleExists(): void {
     // This module should exist.
     $this->assertTrue($this->base->moduleExistsWrapper('module1'));
 
@@ -105,7 +105,7 @@ public function testDrupal6ModuleExists() {
   /**
    * Tests for Drupal6SqlBase::getModuleSchemaVersion().
    */
-  public function testGetModuleSchemaVersion() {
+  public function testGetModuleSchemaVersion(): void {
     // Non-existent module.
     $this->assertFalse($this->base->getModuleSchemaVersionWrapper('module3'));
 
@@ -119,7 +119,7 @@ public function testGetModuleSchemaVersion() {
   /**
    * Tests for Drupal6SqlBase::variableGet().
    */
-  public function testVariableGet() {
+  public function testVariableGet(): void {
     // Test default value.
     $this->assertEquals('my_default', $this->base->variableGetWrapper('non_existent_variable', 'my_default'));
 
diff --git a/core/modules/migrate_drupal_ui/tests/src/Functional/CredentialFormTest.php b/core/modules/migrate_drupal_ui/tests/src/Functional/CredentialFormTest.php
index 598e3d71ed44..7d7950911b90 100644
--- a/core/modules/migrate_drupal_ui/tests/src/Functional/CredentialFormTest.php
+++ b/core/modules/migrate_drupal_ui/tests/src/Functional/CredentialFormTest.php
@@ -31,7 +31,7 @@ class CredentialFormTest extends MigrateUpgradeTestBase {
    *
    * @dataProvider providerCredentialForm
    */
-  public function testCredentialFrom($path_to_database) {
+  public function testCredentialFrom($path_to_database): void {
     $this->loadFixture($this->getModulePath('migrate_drupal') . $path_to_database);
     $session = $this->assertSession();
 
diff --git a/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateAccessTest.php b/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateAccessTest.php
index 555643666a8c..b20f7647ab7b 100644
--- a/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateAccessTest.php
+++ b/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateAccessTest.php
@@ -28,7 +28,7 @@ class MigrateAccessTest extends BrowserTestBase {
   /**
    * Tests that only user 1 can access the migrate UI.
    */
-  public function testAccess() {
+  public function testAccess(): void {
     $this->drupalLogin($this->rootUser);
     $this->drupalGet('upgrade');
     $this->assertSession()->statusCodeEquals(200);
diff --git a/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateControllerTest.php b/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateControllerTest.php
index 952768053b7e..68071daba559 100644
--- a/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateControllerTest.php
+++ b/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateControllerTest.php
@@ -53,7 +53,7 @@ protected function setUp(): void {
   /**
    * Tests the upgrade report with the view enabled, disabled and uninstalled.
    */
-  public function testUpgradeReport() {
+  public function testUpgradeReport(): void {
     $session = $this->assertSession();
 
     $this->assertTrue(View::load('watchdog')->status(), 'Watchdog view is enabled');
diff --git a/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeFormStepsTest.php b/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeFormStepsTest.php
index 06605bc5a0d5..2dfab8159c78 100644
--- a/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeFormStepsTest.php
+++ b/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeFormStepsTest.php
@@ -54,7 +54,7 @@ protected function getSourceBasePath() {
    * this order; Overview or Incremental, if a migration has already been run
    * then Credential, Id conflict, if conflicts are detected, and lastly Review.
    */
-  public function testMigrateUpgradeReviewPage() {
+  public function testMigrateUpgradeReviewPage(): void {
     /** @var \Drupal\Core\TempStore\PrivateTempStore  $store */
     $store = \Drupal::service('tempstore.private')->get('migrate_drupal_ui');
     $state = \Drupal::service('state');
diff --git a/core/modules/migrate_drupal_ui/tests/src/Functional/MultilingualReviewPageTestBase.php b/core/modules/migrate_drupal_ui/tests/src/Functional/MultilingualReviewPageTestBase.php
index 8d8df57c015e..6d43a5339d84 100644
--- a/core/modules/migrate_drupal_ui/tests/src/Functional/MultilingualReviewPageTestBase.php
+++ b/core/modules/migrate_drupal_ui/tests/src/Functional/MultilingualReviewPageTestBase.php
@@ -42,7 +42,7 @@ abstract class MultilingualReviewPageTestBase extends MigrateUpgradeTestBase {
    *
    * @see \Drupal\Tests\migrate_drupal_ui\Functional\MigrateUpgradeExecuteTestBase
    */
-  public function testMigrateUpgradeReviewPage() {
+  public function testMigrateUpgradeReviewPage(): void {
     $this->prepare();
     // Start the upgrade process.
     $this->submitCredentialForm();
diff --git a/core/modules/migrate_drupal_ui/tests/src/Functional/NoMultilingualReviewPageTestBase.php b/core/modules/migrate_drupal_ui/tests/src/Functional/NoMultilingualReviewPageTestBase.php
index cc8339e7d597..51aed92c5a61 100644
--- a/core/modules/migrate_drupal_ui/tests/src/Functional/NoMultilingualReviewPageTestBase.php
+++ b/core/modules/migrate_drupal_ui/tests/src/Functional/NoMultilingualReviewPageTestBase.php
@@ -12,7 +12,7 @@ abstract class NoMultilingualReviewPageTestBase extends MultilingualReviewPageTe
   /**
    * Tests the review page when content_translation is enabled.
    */
-  public function testMigrateUpgradeReviewPage() {
+  public function testMigrateUpgradeReviewPage(): void {
     $this->prepare();
     // Start the upgrade process.
     $this->submitCredentialForm();
diff --git a/core/modules/migrate_drupal_ui/tests/src/Functional/SourceProviderTest.php b/core/modules/migrate_drupal_ui/tests/src/Functional/SourceProviderTest.php
index 8027de897206..b82af20b89fd 100644
--- a/core/modules/migrate_drupal_ui/tests/src/Functional/SourceProviderTest.php
+++ b/core/modules/migrate_drupal_ui/tests/src/Functional/SourceProviderTest.php
@@ -26,7 +26,7 @@ class SourceProviderTest extends MigrateUpgradeTestBase {
    *
    * @dataProvider providerSourceProvider
    */
-  public function testSourceProvider($path_to_database) {
+  public function testSourceProvider($path_to_database): void {
     $this->loadFixture($this->getModulePath('migrate_drupal') . $path_to_database);
 
     $session = $this->assertSession();
diff --git a/core/modules/migrate_drupal_ui/tests/src/Functional/d6/IdConflictTest.php b/core/modules/migrate_drupal_ui/tests/src/Functional/d6/IdConflictTest.php
index 020531ac2366..8904bc3e1d05 100644
--- a/core/modules/migrate_drupal_ui/tests/src/Functional/d6/IdConflictTest.php
+++ b/core/modules/migrate_drupal_ui/tests/src/Functional/d6/IdConflictTest.php
@@ -70,7 +70,7 @@ protected function getMissingPaths() {
   /**
    * Tests ID Conflict form.
    */
-  public function testIdConflictForm() {
+  public function testIdConflictForm(): void {
     // Start the upgrade process.
     $this->submitCredentialForm();
 
diff --git a/core/modules/migrate_drupal_ui/tests/src/Functional/d6/NodeClassicTest.php b/core/modules/migrate_drupal_ui/tests/src/Functional/d6/NodeClassicTest.php
index d81318589d93..1e2284a242a6 100644
--- a/core/modules/migrate_drupal_ui/tests/src/Functional/d6/NodeClassicTest.php
+++ b/core/modules/migrate_drupal_ui/tests/src/Functional/d6/NodeClassicTest.php
@@ -77,7 +77,7 @@ protected function getMissingPaths() {
   /**
    * Tests node classic migration via the UI.
    */
-  public function testNodeClassicUpgrade() {
+  public function testNodeClassicUpgrade(): void {
     // Add a node classic migrate table to d8.
     $this->makeNodeMigrateMapTable(NodeMigrateType::NODE_MIGRATE_TYPE_CLASSIC, '6');
 
diff --git a/core/modules/migrate_drupal_ui/tests/src/Functional/d6/Upgrade6Test.php b/core/modules/migrate_drupal_ui/tests/src/Functional/d6/Upgrade6Test.php
index 060f7c32d279..c2cabe175d0f 100644
--- a/core/modules/migrate_drupal_ui/tests/src/Functional/d6/Upgrade6Test.php
+++ b/core/modules/migrate_drupal_ui/tests/src/Functional/d6/Upgrade6Test.php
@@ -198,7 +198,7 @@ protected function getMissingPaths() {
   /**
    * Executes all steps of migrations upgrade.
    */
-  public function testUpgradeAndIncremental() {
+  public function testUpgradeAndIncremental(): void {
     // Perform upgrade followed by an incremental upgrade.
     $this->doUpgradeAndIncremental();
 
diff --git a/core/modules/migrate_drupal_ui/tests/src/Functional/d7/DoubleSlashTest.php b/core/modules/migrate_drupal_ui/tests/src/Functional/d7/DoubleSlashTest.php
index 92e20e00f2c0..940869b3aecb 100644
--- a/core/modules/migrate_drupal_ui/tests/src/Functional/d7/DoubleSlashTest.php
+++ b/core/modules/migrate_drupal_ui/tests/src/Functional/d7/DoubleSlashTest.php
@@ -44,7 +44,7 @@ protected function setUp(): void {
   /**
    * Executes all steps of migrations upgrade.
    */
-  public function testMigrateUpgradeExecute() {
+  public function testMigrateUpgradeExecute(): void {
     // Change fid 1 to a filename that does not exist.
     $this->sourceDatabase
       ->update('file_managed')
diff --git a/core/modules/migrate_drupal_ui/tests/src/Functional/d7/FilePathTest.php b/core/modules/migrate_drupal_ui/tests/src/Functional/d7/FilePathTest.php
index 5ad0a0ffb04b..b00490702e14 100644
--- a/core/modules/migrate_drupal_ui/tests/src/Functional/d7/FilePathTest.php
+++ b/core/modules/migrate_drupal_ui/tests/src/Functional/d7/FilePathTest.php
@@ -94,7 +94,7 @@ protected function setUp(): void {
    *
    * @dataProvider providerTestFilePath
    */
-  public function testFilePath(string $file_private_path, string $file_public_path, string $file_temporary_path, string $private, string $public, string $temporary) {
+  public function testFilePath(string $file_private_path, string $file_public_path, string $file_temporary_path, string $private, string $public, string $temporary): void {
     $this->sourceFileScheme['private'] = $file_private_path;
     $this->sourceFileScheme['public'] = $file_public_path;
     $this->sourceFileScheme['temporary'] = $file_temporary_path;
diff --git a/core/modules/migrate_drupal_ui/tests/src/Functional/d7/IdConflictTest.php b/core/modules/migrate_drupal_ui/tests/src/Functional/d7/IdConflictTest.php
index 0975977ff7e5..38bd909f9928 100644
--- a/core/modules/migrate_drupal_ui/tests/src/Functional/d7/IdConflictTest.php
+++ b/core/modules/migrate_drupal_ui/tests/src/Functional/d7/IdConflictTest.php
@@ -70,7 +70,7 @@ protected function getMissingPaths() {
   /**
    * Tests ID Conflict form.
    */
-  public function testIdConflictForm() {
+  public function testIdConflictForm(): void {
     // Start the upgrade process.
     $this->submitCredentialForm();
 
diff --git a/core/modules/migrate_drupal_ui/tests/src/Functional/d7/Upgrade7Test.php b/core/modules/migrate_drupal_ui/tests/src/Functional/d7/Upgrade7Test.php
index 990af208a51b..fb81cd8e3e29 100644
--- a/core/modules/migrate_drupal_ui/tests/src/Functional/d7/Upgrade7Test.php
+++ b/core/modules/migrate_drupal_ui/tests/src/Functional/d7/Upgrade7Test.php
@@ -224,7 +224,7 @@ protected function getMissingPaths() {
   /**
    * Executes all steps of migrations upgrade.
    */
-  public function testUpgradeAndIncremental() {
+  public function testUpgradeAndIncremental(): void {
     // Perform upgrade followed by an incremental upgrade.
     $this->doUpgradeAndIncremental();
 
diff --git a/core/modules/migrate_drupal_ui/tests/src/FunctionalJavascript/SettingsTest.php b/core/modules/migrate_drupal_ui/tests/src/FunctionalJavascript/SettingsTest.php
index 796de8ce1591..f85771b52b63 100644
--- a/core/modules/migrate_drupal_ui/tests/src/FunctionalJavascript/SettingsTest.php
+++ b/core/modules/migrate_drupal_ui/tests/src/FunctionalJavascript/SettingsTest.php
@@ -58,7 +58,7 @@ protected function setUp(): void {
    *
    * @dataProvider providerTestCredentialForm
    */
-  public function testCredentialForm($source_connection, $version, array $manual, array $databases, $expected_source_connection) {
+  public function testCredentialForm($source_connection, $version, array $manual, array $databases, $expected_source_connection): void {
     // Write settings.
     $migrate_file_public_path = '/var/www/drupal7/sites/default/files';
     $migrate_file_private_path = '/var/www/drupal7/sites/default/files/private';
diff --git a/core/modules/migrate_drupal_ui/tests/src/Kernel/MigrationLabelExistTest.php b/core/modules/migrate_drupal_ui/tests/src/Kernel/MigrationLabelExistTest.php
index e79cfa196c24..70741c025e99 100644
--- a/core/modules/migrate_drupal_ui/tests/src/Kernel/MigrationLabelExistTest.php
+++ b/core/modules/migrate_drupal_ui/tests/src/Kernel/MigrationLabelExistTest.php
@@ -19,7 +19,7 @@ class MigrationLabelExistTest extends MigrateDrupalTestBase {
   /**
    * Tests that labels exist for all migrations.
    */
-  public function testLabelExist() {
+  public function testLabelExist(): void {
     // Install all available modules.
     $module_handler = $this->container->get('module_handler');
     $modules = $this->coreModuleListDataProvider();
diff --git a/core/modules/mysql/tests/src/Functional/InstallerIsolationLevelExistingSettingsTest.php b/core/modules/mysql/tests/src/Functional/InstallerIsolationLevelExistingSettingsTest.php
index 4eae070981e7..c69477688cef 100644
--- a/core/modules/mysql/tests/src/Functional/InstallerIsolationLevelExistingSettingsTest.php
+++ b/core/modules/mysql/tests/src/Functional/InstallerIsolationLevelExistingSettingsTest.php
@@ -30,7 +30,7 @@ protected function prepareEnvironment() {
   /**
    * Verifies that isolation_level is not set in the database settings.
    */
-  public function testInstaller() {
+  public function testInstaller(): void {
     $contents = file_get_contents($this->container->getParameter('app.root') . '/' . $this->siteDirectory . '/settings.php');
 
     // Test that isolation_level was not set.
diff --git a/core/modules/mysql/tests/src/Functional/InstallerIsolationLevelNoDatabaseSettingsTest.php b/core/modules/mysql/tests/src/Functional/InstallerIsolationLevelNoDatabaseSettingsTest.php
index 28809d55b1ef..274833e3970d 100644
--- a/core/modules/mysql/tests/src/Functional/InstallerIsolationLevelNoDatabaseSettingsTest.php
+++ b/core/modules/mysql/tests/src/Functional/InstallerIsolationLevelNoDatabaseSettingsTest.php
@@ -35,7 +35,7 @@ protected function prepareEnvironment() {
   /**
    * Verifies that the isolation_level was added to the database settings.
    */
-  public function testInstaller() {
+  public function testInstaller(): void {
     $contents = file_get_contents($this->container->getParameter('app.root') . '/' . $this->siteDirectory . '/settings.php');
 
     // Test that isolation_level was set to "READ COMMITTED".
diff --git a/core/modules/mysql/tests/src/Functional/RequirementsTest.php b/core/modules/mysql/tests/src/Functional/RequirementsTest.php
index a1a07d785cae..00cb54351cba 100644
--- a/core/modules/mysql/tests/src/Functional/RequirementsTest.php
+++ b/core/modules/mysql/tests/src/Functional/RequirementsTest.php
@@ -40,7 +40,7 @@ protected function setUp(): void {
   /**
    * Test the isolation level warning message on status page.
    */
-  public function testIsolationLevelWarningNotDisplaying() {
+  public function testIsolationLevelWarningNotDisplaying(): void {
     $admin_user = $this->drupalCreateUser([
       'administer site configuration',
       'access site reports',
diff --git a/core/modules/mysql/tests/src/Kernel/mysql/Console/DbDumpCommandTest.php b/core/modules/mysql/tests/src/Kernel/mysql/Console/DbDumpCommandTest.php
index c50710c36a80..a2a5814db965 100644
--- a/core/modules/mysql/tests/src/Kernel/mysql/Console/DbDumpCommandTest.php
+++ b/core/modules/mysql/tests/src/Kernel/mysql/Console/DbDumpCommandTest.php
@@ -43,7 +43,7 @@ protected function setUp(): void {
   /**
    * Tests the command directly.
    */
-  public function testDbDumpCommand() {
+  public function testDbDumpCommand(): void {
     $command = new DbDumpCommand();
     $command_tester = new CommandTester($command);
     $command_tester->execute([]);
@@ -63,7 +63,7 @@ public function testDbDumpCommand() {
   /**
    * Tests schema only option.
    */
-  public function testSchemaOnly() {
+  public function testSchemaOnly(): void {
     $command = new DbDumpCommand();
     $command_tester = new CommandTester($command);
     $command_tester->execute(['--schema-only' => 'router']);
@@ -89,7 +89,7 @@ public function testSchemaOnly() {
   /**
    * Tests insert count option.
    */
-  public function testInsertCount() {
+  public function testInsertCount(): void {
     $command = new DbDumpCommand();
     $command_tester = new CommandTester($command);
     $command_tester->execute(['--insert-count' => '1']);
diff --git a/core/modules/mysql/tests/src/Kernel/mysql/DatabaseExceptionWrapperTest.php b/core/modules/mysql/tests/src/Kernel/mysql/DatabaseExceptionWrapperTest.php
index b29a9a39670e..a94d9bd32679 100644
--- a/core/modules/mysql/tests/src/Kernel/mysql/DatabaseExceptionWrapperTest.php
+++ b/core/modules/mysql/tests/src/Kernel/mysql/DatabaseExceptionWrapperTest.php
@@ -24,7 +24,7 @@ class DatabaseExceptionWrapperTest extends DriverSpecificKernelTestBase {
    * connection not to emulate statement preparation. Still, this is only valid
    * for the MySql driver.
    */
-  public function testPrepareStatementFailOnPreparation() {
+  public function testPrepareStatementFailOnPreparation(): void {
     $connection_info = Database::getConnectionInfo('default');
     $connection_info['default']['pdo'][\PDO::ATTR_EMULATE_PREPARES] = FALSE;
     Database::addConnectionInfo('default', 'foo', $connection_info['default']);
@@ -36,7 +36,7 @@ public function testPrepareStatementFailOnPreparation() {
   /**
    * Tests Connection::prepareStatement exception on execution.
    */
-  public function testPrepareStatementFailOnExecution() {
+  public function testPrepareStatementFailOnExecution(): void {
     $this->expectException(\PDOException::class);
     $stmt = $this->connection->prepareStatement('bananas', []);
     $stmt->execute();
diff --git a/core/modules/mysql/tests/src/Kernel/mysql/DbDumpTest.php b/core/modules/mysql/tests/src/Kernel/mysql/DbDumpTest.php
index 1fa439dc54b9..5ce39f6aa635 100644
--- a/core/modules/mysql/tests/src/Kernel/mysql/DbDumpTest.php
+++ b/core/modules/mysql/tests/src/Kernel/mysql/DbDumpTest.php
@@ -146,7 +146,7 @@ protected function setUp(): void {
   /**
    * Tests the command directly.
    */
-  public function testDbDumpCommand() {
+  public function testDbDumpCommand(): void {
     $application = new DbDumpApplication();
     $command = $application->find('dump-database-d8-mysql');
     $command_tester = new CommandTester($command);
@@ -175,7 +175,7 @@ public function testDbDumpCommand() {
   /**
    * Tests loading the script back into the database.
    */
-  public function testScriptLoad() {
+  public function testScriptLoad(): void {
     // Generate the script.
     $application = new DbDumpApplication();
     $command = $application->find('dump-database-d8-mysql');
diff --git a/core/modules/mysql/tests/src/Kernel/mysql/MysqlDriverTest.php b/core/modules/mysql/tests/src/Kernel/mysql/MysqlDriverTest.php
index a620aa1a7348..4fcb75b60aa0 100644
--- a/core/modules/mysql/tests/src/Kernel/mysql/MysqlDriverTest.php
+++ b/core/modules/mysql/tests/src/Kernel/mysql/MysqlDriverTest.php
@@ -18,7 +18,7 @@ class MysqlDriverTest extends DriverSpecificKernelTestBase {
   /**
    * @covers \Drupal\mysql\Driver\Database\mysql\Connection
    */
-  public function testConnection() {
+  public function testConnection(): void {
     $connection = new Connection($this->createMock(StubPDO::class), []);
     $this->assertInstanceOf(Connection::class, $connection);
   }
diff --git a/core/modules/mysql/tests/src/Kernel/mysql/PrefixInfoTest.php b/core/modules/mysql/tests/src/Kernel/mysql/PrefixInfoTest.php
index 7c4a9e3e656f..d36cba80eddc 100644
--- a/core/modules/mysql/tests/src/Kernel/mysql/PrefixInfoTest.php
+++ b/core/modules/mysql/tests/src/Kernel/mysql/PrefixInfoTest.php
@@ -23,7 +23,7 @@ class PrefixInfoTest extends DriverSpecificKernelTestBase {
    * The other two by Drupal core supported databases do not have this variable
    * set in the return array.
    */
-  public function testGetPrefixInfo() {
+  public function testGetPrefixInfo(): void {
     $connection_info = Database::getConnectionInfo('default');
 
     // Copy the default connection info to the 'extra' key.
diff --git a/core/modules/mysql/tests/src/Kernel/mysql/TemporaryQueryTest.php b/core/modules/mysql/tests/src/Kernel/mysql/TemporaryQueryTest.php
index e2457f91b8ef..1bf811b104ab 100644
--- a/core/modules/mysql/tests/src/Kernel/mysql/TemporaryQueryTest.php
+++ b/core/modules/mysql/tests/src/Kernel/mysql/TemporaryQueryTest.php
@@ -16,7 +16,7 @@ class TemporaryQueryTest extends TemporaryQueryTestBase {
   /**
    * Confirms that temporary tables work.
    */
-  public function testTemporaryQuery() {
+  public function testTemporaryQuery(): void {
     parent::testTemporaryQuery();
 
     $connection = $this->getConnection();
diff --git a/core/modules/mysql/tests/src/Unit/InstallTasksTest.php b/core/modules/mysql/tests/src/Unit/InstallTasksTest.php
index 552c7240ae41..cd5447eee399 100644
--- a/core/modules/mysql/tests/src/Unit/InstallTasksTest.php
+++ b/core/modules/mysql/tests/src/Unit/InstallTasksTest.php
@@ -130,7 +130,7 @@ public static function providerNameAndMinimumVersion(): array {
   /**
    * @covers ::name
    */
-  public function testNameWithNoConnection() {
+  public function testNameWithNoConnection(): void {
     $tasks = $this->createTasksNoConnection();
     $this->assertSame('MySQL, MariaDB, Percona Server, or equivalent', $tasks->name());
   }
diff --git a/core/modules/navigation/tests/src/Functional/NavigationLogoTest.php b/core/modules/navigation/tests/src/Functional/NavigationLogoTest.php
index 4bba206c353a..6e88c1ea7024 100644
--- a/core/modules/navigation/tests/src/Functional/NavigationLogoTest.php
+++ b/core/modules/navigation/tests/src/Functional/NavigationLogoTest.php
@@ -71,7 +71,7 @@ protected function setUp(): void {
   /**
    * Tests Navigation logo configuration base options.
    */
-  public function testSettingsLogoOptionsForm() {
+  public function testSettingsLogoOptionsForm(): void {
     // Navigate to the settings form.
     $this->drupalGet('/admin/config/user-interface/navigation/settings');
     $this->assertSession()->statusCodeEquals(200);
diff --git a/core/modules/navigation/tests/src/Functional/NavigationShortcutsBlockTest.php b/core/modules/navigation/tests/src/Functional/NavigationShortcutsBlockTest.php
index 7f917ac765d3..3dadbce4f60d 100644
--- a/core/modules/navigation/tests/src/Functional/NavigationShortcutsBlockTest.php
+++ b/core/modules/navigation/tests/src/Functional/NavigationShortcutsBlockTest.php
@@ -34,7 +34,7 @@ class NavigationShortcutsBlockTest extends PageCacheTagsTestBase {
   /**
    * Tests visibility and cacheability of shortcuts in the navigation bar.
    */
-  public function testNavigationBlock() {
+  public function testNavigationBlock(): void {
     $this->drupalPlaceBlock('page_title_block', ['id' => 'title']);
 
     $test_page_url = Url::fromRoute('test_page_test.test_page');
diff --git a/core/modules/navigation/tests/src/Functional/NavigationTopBarTest.php b/core/modules/navigation/tests/src/Functional/NavigationTopBarTest.php
index f12426c90879..84fc5a0acdc1 100644
--- a/core/modules/navigation/tests/src/Functional/NavigationTopBarTest.php
+++ b/core/modules/navigation/tests/src/Functional/NavigationTopBarTest.php
@@ -75,7 +75,7 @@ protected function setUp(): void {
   /**
    * Tests the top bar visibility.
    */
-  public function testTopBarVisibility() {
+  public function testTopBarVisibility(): void {
     $this->drupalGet($this->node->toUrl());
 
     // Top Bar is not visible if the feature flag module is disabled.
diff --git a/core/modules/navigation/tests/src/Functional/NavigationUserBlockTest.php b/core/modules/navigation/tests/src/Functional/NavigationUserBlockTest.php
index 80553ce174ed..0c4ba264fd14 100644
--- a/core/modules/navigation/tests/src/Functional/NavigationUserBlockTest.php
+++ b/core/modules/navigation/tests/src/Functional/NavigationUserBlockTest.php
@@ -64,7 +64,7 @@ protected function setUp(): void {
   /**
    * Test output of user navigation block with regards to caching and contents.
    */
-  public function testNavigationUserBlock() {
+  public function testNavigationUserBlock(): void {
     // Verify some basic cacheability metadata. Ensures that we're not doing
     // anything so egregious as to upset expected caching behavior. In this
     // case, as an anonymous user, we should have zero effect on the page.
diff --git a/core/modules/navigation/tests/src/Kernel/SystemMenuNavigationBlockTest.php b/core/modules/navigation/tests/src/Kernel/SystemMenuNavigationBlockTest.php
index ecd606ac13d4..ff8ff5240047 100644
--- a/core/modules/navigation/tests/src/Kernel/SystemMenuNavigationBlockTest.php
+++ b/core/modules/navigation/tests/src/Kernel/SystemMenuNavigationBlockTest.php
@@ -160,7 +160,7 @@ protected function setUp(): void {
   /**
    * Tests calculation of a system navigation menu block's config dependencies.
    */
-  public function testSystemMenuBlockConfigDependencies() {
+  public function testSystemMenuBlockConfigDependencies(): void {
     $block = Block::create([
       'plugin' => 'navigation_menu:' . $this->menu->id(),
       'region' => 'content',
@@ -187,7 +187,7 @@ public function testSystemMenuBlockConfigDependencies() {
   /**
    * Tests the config start level and depth.
    */
-  public function testConfigLevelDepth() {
+  public function testConfigLevelDepth(): void {
     // Helper function to generate a configured navigation block instance.
     $place_block = function ($level, $depth) {
       return $this->blockManager->createInstance('navigation_menu:' . $this->menu->id(), [
diff --git a/core/modules/node/tests/src/Functional/MultiStepNodeFormBasicOptionsTest.php b/core/modules/node/tests/src/Functional/MultiStepNodeFormBasicOptionsTest.php
index 7191ec33fd98..1e319d6f0c7e 100644
--- a/core/modules/node/tests/src/Functional/MultiStepNodeFormBasicOptionsTest.php
+++ b/core/modules/node/tests/src/Functional/MultiStepNodeFormBasicOptionsTest.php
@@ -29,7 +29,7 @@ class MultiStepNodeFormBasicOptionsTest extends NodeTestBase {
   /**
    * Tests changing the default values of basic options to ensure they persist.
    */
-  public function testMultiStepNodeFormBasicOptions() {
+  public function testMultiStepNodeFormBasicOptions(): void {
     // Prepare a user to create the node.
     $web_user = $this->drupalCreateUser([
       'administer nodes',
diff --git a/core/modules/node/tests/src/Functional/NodeAccessBaseTableTest.php b/core/modules/node/tests/src/Functional/NodeAccessBaseTableTest.php
index 7b0542c1c269..996f176d4e70 100644
--- a/core/modules/node/tests/src/Functional/NodeAccessBaseTableTest.php
+++ b/core/modules/node/tests/src/Functional/NodeAccessBaseTableTest.php
@@ -122,7 +122,7 @@ protected function setUp(): void {
    * - Test that user 4 can view all content created above.
    * - Test that user 4 can view all content on taxonomy listing.
    */
-  public function testNodeAccessBasic() {
+  public function testNodeAccessBasic(): void {
     $num_simple_users = 2;
     $simple_users = [];
 
diff --git a/core/modules/node/tests/src/Functional/NodeAccessCacheabilityTest.php b/core/modules/node/tests/src/Functional/NodeAccessCacheabilityTest.php
index 3f74d9c63d78..f7bd6518a68e 100644
--- a/core/modules/node/tests/src/Functional/NodeAccessCacheabilityTest.php
+++ b/core/modules/node/tests/src/Functional/NodeAccessCacheabilityTest.php
@@ -61,7 +61,7 @@ protected function setUp(): void {
    *
    * @see node_query_node_access_alter()
    */
-  public function testNodeAccessCacheabilitySafeguard() {
+  public function testNodeAccessCacheabilitySafeguard(): void {
     // The node grants cache context should be added automatically.
     $this->drupalGet(new Url('node_access_test_auto_bubbling'));
     $this->assertCacheContext('user.node_grants:view');
@@ -86,7 +86,7 @@ public function testNodeAccessCacheabilitySafeguard() {
   /**
    * Tests that the user cache contexts are correctly set.
    */
-  public function testNodeAccessCacheContext() {
+  public function testNodeAccessCacheContext(): void {
     // Create a user, with edit/delete own content permission.
     $test_user1 = $this->drupalCreateUser([
       'access content',
diff --git a/core/modules/node/tests/src/Functional/NodeAccessCacheabilityWithNodeGrants.php b/core/modules/node/tests/src/Functional/NodeAccessCacheabilityWithNodeGrants.php
index 0e07f770f57a..da08430a93fa 100644
--- a/core/modules/node/tests/src/Functional/NodeAccessCacheabilityWithNodeGrants.php
+++ b/core/modules/node/tests/src/Functional/NodeAccessCacheabilityWithNodeGrants.php
@@ -31,7 +31,7 @@ class NodeAccessCacheabilityWithNodeGrants extends BrowserTestBase {
   /**
    * Tests node view access cacheability with node grants.
    */
-  public function testAccessCacheabilityWithNodeGrants() {
+  public function testAccessCacheabilityWithNodeGrants(): void {
     NodeType::create(['type' => 'page', 'name' => 'Page'])->save();
     $this->createEntityReferenceField('node', 'page', 'ref', 'Ref', 'node');
     EntityViewDisplay::create([
diff --git a/core/modules/node/tests/src/Functional/NodeAccessFieldTest.php b/core/modules/node/tests/src/Functional/NodeAccessFieldTest.php
index 464cd0fafe13..295196ac434a 100644
--- a/core/modules/node/tests/src/Functional/NodeAccessFieldTest.php
+++ b/core/modules/node/tests/src/Functional/NodeAccessFieldTest.php
@@ -91,7 +91,7 @@ protected function setUp(): void {
   /**
    * Tests administering fields when node access is restricted.
    */
-  public function testNodeAccessAdministerField() {
+  public function testNodeAccessAdministerField(): void {
     // Create a page node.
     $fieldData = [];
     $value = $fieldData[0]['value'] = $this->randomMachineName();
diff --git a/core/modules/node/tests/src/Functional/NodeAccessGrantsCacheContextTest.php b/core/modules/node/tests/src/Functional/NodeAccessGrantsCacheContextTest.php
index e89972e5cbac..a5190f0ed22c 100644
--- a/core/modules/node/tests/src/Functional/NodeAccessGrantsCacheContextTest.php
+++ b/core/modules/node/tests/src/Functional/NodeAccessGrantsCacheContextTest.php
@@ -115,7 +115,7 @@ protected function assertUserCacheContext(array $expected): void {
   /**
    * Tests NodeAccessGrantsCacheContext::getContext().
    */
-  public function testCacheContext() {
+  public function testCacheContext(): void {
     $this->assertUserCacheContext([
       0 => 'view.all:0;node_access_test_author:0;node_access_all:0',
       1 => 'all',
diff --git a/core/modules/node/tests/src/Functional/NodeAccessLanguageFallbackTest.php b/core/modules/node/tests/src/Functional/NodeAccessLanguageFallbackTest.php
index c419b95772e4..4266eb94139e 100644
--- a/core/modules/node/tests/src/Functional/NodeAccessLanguageFallbackTest.php
+++ b/core/modules/node/tests/src/Functional/NodeAccessLanguageFallbackTest.php
@@ -51,7 +51,7 @@ protected function setUp(): void {
   /**
    * Tests node access fallback handling with multiple node languages.
    */
-  public function testNodeAccessLanguageFallback() {
+  public function testNodeAccessLanguageFallback(): void {
     // The node_access_test module allows nodes to be marked private. We need to
     // ensure that system honors the fallback system of node access properly.
     // Note that node_access_test_language is language-sensitive and does not
diff --git a/core/modules/node/tests/src/Functional/NodeAccessMenuLinkTest.php b/core/modules/node/tests/src/Functional/NodeAccessMenuLinkTest.php
index 8fc6ab0ebd33..260c6d69e7f5 100644
--- a/core/modules/node/tests/src/Functional/NodeAccessMenuLinkTest.php
+++ b/core/modules/node/tests/src/Functional/NodeAccessMenuLinkTest.php
@@ -53,7 +53,7 @@ protected function setUp(): void {
   /**
    * SA-CORE-2015-003: Tests menu links to nodes when node access is restricted.
    */
-  public function testNodeAccessMenuLink() {
+  public function testNodeAccessMenuLink(): void {
 
     $menu_link_title = $this->randomString();
 
diff --git a/core/modules/node/tests/src/Functional/NodeAccessPagerTest.php b/core/modules/node/tests/src/Functional/NodeAccessPagerTest.php
index c151eeff5a91..dd835dc4508f 100644
--- a/core/modules/node/tests/src/Functional/NodeAccessPagerTest.php
+++ b/core/modules/node/tests/src/Functional/NodeAccessPagerTest.php
@@ -57,7 +57,7 @@ protected function setUp(): void {
   /**
    * Tests the comment pager for nodes with multiple grants per realm.
    */
-  public function testCommentPager() {
+  public function testCommentPager(): void {
     // Create a node.
     $node = $this->drupalCreateNode();
 
diff --git a/core/modules/node/tests/src/Functional/NodeAccessRebuildNodeGrantsTest.php b/core/modules/node/tests/src/Functional/NodeAccessRebuildNodeGrantsTest.php
index 110476ec20dc..5d8a68a37b02 100644
--- a/core/modules/node/tests/src/Functional/NodeAccessRebuildNodeGrantsTest.php
+++ b/core/modules/node/tests/src/Functional/NodeAccessRebuildNodeGrantsTest.php
@@ -52,7 +52,7 @@ protected function setUp(): void {
   /**
    * Tests rebuilding the node access permissions table with content.
    */
-  public function testNodeAccessRebuildNodeGrants() {
+  public function testNodeAccessRebuildNodeGrants(): void {
     \Drupal::service('module_installer')->install(['node_access_test']);
     \Drupal::state()->set('node_access_test.private', TRUE);
     node_access_test_add_field(NodeType::load('page'));
@@ -108,7 +108,7 @@ public function testNodeAccessRebuildNodeGrants() {
   /**
    * Tests rebuilding the node access permissions table with no content.
    */
-  public function testNodeAccessRebuildNoAccessModules() {
+  public function testNodeAccessRebuildNoAccessModules(): void {
     // Default realm access is present.
     $this->assertEquals(1, \Drupal::service('node.grant_storage')->count(), 'There is an all realm access record');
 
diff --git a/core/modules/node/tests/src/Functional/NodeAdminTest.php b/core/modules/node/tests/src/Functional/NodeAdminTest.php
index f0e4c5bca546..d7480271918c 100644
--- a/core/modules/node/tests/src/Functional/NodeAdminTest.php
+++ b/core/modules/node/tests/src/Functional/NodeAdminTest.php
@@ -86,7 +86,7 @@ protected function setUp(): void {
   /**
    * Tests that the table sorting works on the content admin pages.
    */
-  public function testContentAdminSort() {
+  public function testContentAdminSort(): void {
     $this->drupalLogin($this->adminUser);
 
     $changed = \Drupal::time()->getRequestTime();
@@ -141,7 +141,7 @@ public function testContentAdminSort() {
    *
    * @see TaxonomyNodeFilterTestCase
    */
-  public function testContentAdminPages() {
+  public function testContentAdminPages(): void {
     $this->drupalLogin($this->adminUser);
 
     // Use an explicit changed time to ensure the expected order in the content
@@ -240,7 +240,7 @@ public function testContentAdminPages() {
   /**
    * Tests content overview for a multilingual site.
    */
-  public function testContentAdminPageMultilingual() {
+  public function testContentAdminPageMultilingual(): void {
     $this->drupalLogin($this->adminUser);
 
     \Drupal::service('module_installer')->install(['language']);
diff --git a/core/modules/node/tests/src/Functional/NodeBlockFunctionalTest.php b/core/modules/node/tests/src/Functional/NodeBlockFunctionalTest.php
index 05912e35cc12..27ebb5cb2c21 100644
--- a/core/modules/node/tests/src/Functional/NodeBlockFunctionalTest.php
+++ b/core/modules/node/tests/src/Functional/NodeBlockFunctionalTest.php
@@ -69,7 +69,7 @@ protected function setUp(): void {
   /**
    * Tests the recent comments block.
    */
-  public function testRecentNodeBlock() {
+  public function testRecentNodeBlock(): void {
     $this->drupalLogin($this->adminUser);
 
     // Disallow anonymous users to view content.
diff --git a/core/modules/node/tests/src/Functional/NodeContextualLinksTest.php b/core/modules/node/tests/src/Functional/NodeContextualLinksTest.php
index 201f88c4242a..bc0273833f0a 100644
--- a/core/modules/node/tests/src/Functional/NodeContextualLinksTest.php
+++ b/core/modules/node/tests/src/Functional/NodeContextualLinksTest.php
@@ -28,7 +28,7 @@ class NodeContextualLinksTest extends NodeTestBase {
   /**
    * Tests contextual links.
    */
-  public function testNodeContextualLinks() {
+  public function testNodeContextualLinks(): void {
     // Create a node item.
     $node = Node::create([
       'type' => 'article',
diff --git a/core/modules/node/tests/src/Functional/NodeCreationTest.php b/core/modules/node/tests/src/Functional/NodeCreationTest.php
index 332c25488efb..5b68c2f62181 100644
--- a/core/modules/node/tests/src/Functional/NodeCreationTest.php
+++ b/core/modules/node/tests/src/Functional/NodeCreationTest.php
@@ -54,7 +54,7 @@ protected function setUp(): void {
   /**
    * Tests the order of the node types on the add page.
    */
-  public function testNodeAddPageOrder() {
+  public function testNodeAddPageOrder(): void {
     $this->createContentType(['type' => 'bundle_1', 'name' => 'Bundle 1']);
     $this->createContentType(['type' => 'bundle_2', 'name' => 'Aaa Bundle 2']);
     $admin_content_types = $this->drupalCreateUser(['bypass node access']);
@@ -66,7 +66,7 @@ public function testNodeAddPageOrder() {
   /**
    * Creates a "Basic page" node and verifies its consistency in the database.
    */
-  public function testNodeCreation() {
+  public function testNodeCreation(): void {
     $node_type_storage = \Drupal::entityTypeManager()->getStorage('node_type');
 
     // Test /node/add page with only one content type.
@@ -126,7 +126,7 @@ public function testNodeCreation() {
   /**
    * Verifies that a transaction rolls back the failed creation.
    */
-  public function testFailedPageCreation() {
+  public function testFailedPageCreation(): void {
     // Create a node.
     $edit = [
       'uid'      => $this->loggedInUser->id(),
@@ -159,7 +159,7 @@ public function testFailedPageCreation() {
   /**
    * Creates an unpublished node and confirms correct redirect behavior.
    */
-  public function testUnpublishedNodeCreation() {
+  public function testUnpublishedNodeCreation(): void {
     // Set the front page to the test page.
     $this->config('system.site')->set('page.front', '/test-page')->save();
 
@@ -190,7 +190,7 @@ public function testUnpublishedNodeCreation() {
   /**
    * Creates nodes with different authored dates.
    */
-  public function testAuthoredDate() {
+  public function testAuthoredDate(): void {
     $now = \Drupal::time()->getRequestTime();
     $admin = $this->drupalCreateUser([], NULL, TRUE);
     $this->drupalLogin($admin);
@@ -259,7 +259,7 @@ public function testAuthoredDate() {
   /**
    * Tests the author autocompletion textfield.
    */
-  public function testAuthorAutocomplete() {
+  public function testAuthorAutocomplete(): void {
     $admin_user = $this->drupalCreateUser([
       'administer nodes',
       'create page content',
@@ -287,7 +287,7 @@ public function testAuthorAutocomplete() {
   /**
    * Check node/add when no node types exist.
    */
-  public function testNodeAddWithoutContentTypes() {
+  public function testNodeAddWithoutContentTypes(): void {
     $this->drupalGet('node/add');
     $this->assertSession()->statusCodeEquals(200);
     $this->assertSession()->linkByHrefNotExists('/admin/structure/types/add');
diff --git a/core/modules/node/tests/src/Functional/NodeEditFormTest.php b/core/modules/node/tests/src/Functional/NodeEditFormTest.php
index b4e49e2975a3..d46066c7e762 100644
--- a/core/modules/node/tests/src/Functional/NodeEditFormTest.php
+++ b/core/modules/node/tests/src/Functional/NodeEditFormTest.php
@@ -69,7 +69,7 @@ protected function setUp(): void {
   /**
    * Checks node edit functionality.
    */
-  public function testNodeEdit() {
+  public function testNodeEdit(): void {
     $this->drupalLogin($this->webUser);
 
     $title_key = 'title[0][value]';
@@ -165,7 +165,7 @@ public function testNodeEdit() {
   /**
    * Tests changing a node's "authored by" field.
    */
-  public function testNodeEditAuthoredBy() {
+  public function testNodeEditAuthoredBy(): void {
     $this->drupalLogin($this->adminUser);
 
     // Create node to edit.
@@ -226,7 +226,7 @@ public function testNodeEditAuthoredBy() {
   /**
    * Tests the node meta information.
    */
-  public function testNodeMetaInformation() {
+  public function testNodeMetaInformation(): void {
     // Check that regular users (i.e. without the 'administer nodes' permission)
     // can not see the meta information.
     $this->drupalLogin($this->webUser);
diff --git a/core/modules/node/tests/src/Functional/NodeEntityViewModeAlterTest.php b/core/modules/node/tests/src/Functional/NodeEntityViewModeAlterTest.php
index e7da9b66118c..ec7473488c99 100644
--- a/core/modules/node/tests/src/Functional/NodeEntityViewModeAlterTest.php
+++ b/core/modules/node/tests/src/Functional/NodeEntityViewModeAlterTest.php
@@ -29,7 +29,7 @@ class NodeEntityViewModeAlterTest extends NodeTestBase {
   /**
    * Create a "Basic page" node and verify its consistency in the database.
    */
-  public function testNodeViewModeChange() {
+  public function testNodeViewModeChange(): void {
     $web_user = $this->drupalCreateUser([
       'create page content',
       'edit own page content',
diff --git a/core/modules/node/tests/src/Functional/NodeFieldMultilingualTest.php b/core/modules/node/tests/src/Functional/NodeFieldMultilingualTest.php
index bd909ddf96e4..84d7c390d1e0 100644
--- a/core/modules/node/tests/src/Functional/NodeFieldMultilingualTest.php
+++ b/core/modules/node/tests/src/Functional/NodeFieldMultilingualTest.php
@@ -73,7 +73,7 @@ protected function setUp(): void {
   /**
    * Tests whether field languages are correctly set through the node form.
    */
-  public function testMultilingualNodeForm() {
+  public function testMultilingualNodeForm(): void {
     // Create "Basic page" content.
     $langcode = language_get_default_langcode('node', 'page');
     $title_key = 'title[0][value]';
@@ -125,7 +125,7 @@ public function testMultilingualNodeForm() {
   /**
    * Tests multilingual field display settings.
    */
-  public function testMultilingualDisplaySettings() {
+  public function testMultilingualDisplaySettings(): void {
     // Create "Basic page" content.
     $title_key = 'title[0][value]';
     $title_value = $this->randomMachineName(8);
diff --git a/core/modules/node/tests/src/Functional/NodeFormSaveChangedTimeTest.php b/core/modules/node/tests/src/Functional/NodeFormSaveChangedTimeTest.php
index 86cbea3be513..56c995e94711 100644
--- a/core/modules/node/tests/src/Functional/NodeFormSaveChangedTimeTest.php
+++ b/core/modules/node/tests/src/Functional/NodeFormSaveChangedTimeTest.php
@@ -62,7 +62,7 @@ protected function setUp(): void {
   /**
    * Tests the changed time after API and FORM save without changes.
    */
-  public function testChangedTimeAfterSaveWithoutChanges() {
+  public function testChangedTimeAfterSaveWithoutChanges(): void {
     $storage = $this->container->get('entity_type.manager')->getStorage('node');
     $storage->resetCache([1]);
     $node = $storage->load(1);
diff --git a/core/modules/node/tests/src/Functional/NodeHelpTest.php b/core/modules/node/tests/src/Functional/NodeHelpTest.php
index 7062c663955d..83a5d17d307f 100644
--- a/core/modules/node/tests/src/Functional/NodeHelpTest.php
+++ b/core/modules/node/tests/src/Functional/NodeHelpTest.php
@@ -68,7 +68,7 @@ protected function setUp(): void {
   /**
    * Verifies that help text appears on node add/edit forms.
    */
-  public function testNodeShowHelpText() {
+  public function testNodeShowHelpText(): void {
     // Check the node add form.
     $this->drupalGet('node/add/' . $this->testType);
     $this->assertSession()->statusCodeEquals(200);
diff --git a/core/modules/node/tests/src/Functional/NodeLinksTest.php b/core/modules/node/tests/src/Functional/NodeLinksTest.php
index 28458361f243..479eea2f6733 100644
--- a/core/modules/node/tests/src/Functional/NodeLinksTest.php
+++ b/core/modules/node/tests/src/Functional/NodeLinksTest.php
@@ -28,7 +28,7 @@ class NodeLinksTest extends NodeTestBase {
   /**
    * Tests that the links can be hidden in the view display settings.
    */
-  public function testHideLinks() {
+  public function testHideLinks(): void {
     $node = $this->drupalCreateNode([
       'type' => 'article',
       'promote' => NodeInterface::PROMOTED,
diff --git a/core/modules/node/tests/src/Functional/NodePostSettingsTest.php b/core/modules/node/tests/src/Functional/NodePostSettingsTest.php
index abc1c244b656..e0a1b0813e55 100644
--- a/core/modules/node/tests/src/Functional/NodePostSettingsTest.php
+++ b/core/modules/node/tests/src/Functional/NodePostSettingsTest.php
@@ -33,7 +33,7 @@ protected function setUp(): void {
   /**
    * Confirms "Basic page" content type and post information is on a new node.
    */
-  public function testPagePostInfo() {
+  public function testPagePostInfo(): void {
 
     // Set "Basic page" content type to display post information.
     $edit = [];
diff --git a/core/modules/node/tests/src/Functional/NodePreviewAnonymousTest.php b/core/modules/node/tests/src/Functional/NodePreviewAnonymousTest.php
index 8899d4c93957..a62ef8f2c3fd 100644
--- a/core/modules/node/tests/src/Functional/NodePreviewAnonymousTest.php
+++ b/core/modules/node/tests/src/Functional/NodePreviewAnonymousTest.php
@@ -48,7 +48,7 @@ protected function setUp(): void {
   /**
    * Checks the node preview functionality for anonymous users.
    */
-  public function testAnonymousPagePreview() {
+  public function testAnonymousPagePreview(): void {
 
     $title_key = 'title[0][value]';
     $body_key = 'body[0][value]';
diff --git a/core/modules/node/tests/src/Functional/NodeQueryAlterTest.php b/core/modules/node/tests/src/Functional/NodeQueryAlterTest.php
index 350c7da2b864..eedf8e81d432 100644
--- a/core/modules/node/tests/src/Functional/NodeQueryAlterTest.php
+++ b/core/modules/node/tests/src/Functional/NodeQueryAlterTest.php
@@ -81,7 +81,7 @@ protected function setUp(): void {
    * Verifies that a non-standard table alias can be used, and that a user with
    * node access can view the nodes.
    */
-  public function testNodeQueryAlterLowLevelWithAccess() {
+  public function testNodeQueryAlterLowLevelWithAccess(): void {
     // User with access should be able to view 4 nodes.
     try {
       $query = Database::getConnection()->select('node', 'n')
@@ -101,7 +101,7 @@ public function testNodeQueryAlterLowLevelWithAccess() {
   /**
    * Tests 'node_access' query alter with revision-enabled nodes.
    */
-  public function testNodeQueryAlterWithRevisions() {
+  public function testNodeQueryAlterWithRevisions(): void {
     // Execute a query that only deals with the 'node_revision' table.
     try {
       $query = \Drupal::entityTypeManager()->getStorage('node')->getQuery();
@@ -123,7 +123,7 @@ public function testNodeQueryAlterWithRevisions() {
    * Verifies that a non-standard table alias can be used, and that a user
    * without node access cannot view the nodes.
    */
-  public function testNodeQueryAlterLowLevelNoAccess() {
+  public function testNodeQueryAlterLowLevelNoAccess(): void {
     // User without access should be able to view 0 nodes.
     try {
       $query = Database::getConnection()->select('node', 'n')
@@ -146,7 +146,7 @@ public function testNodeQueryAlterLowLevelNoAccess() {
    * Verifies that a non-standard table alias can be used, and that a user with
    * view-only node access cannot edit the nodes.
    */
-  public function testNodeQueryAlterLowLevelEditAccess() {
+  public function testNodeQueryAlterLowLevelEditAccess(): void {
     // User with view-only access should not be able to edit nodes.
     try {
       $query = Database::getConnection()->select('node', 'n')
@@ -174,7 +174,7 @@ public function testNodeQueryAlterLowLevelEditAccess() {
    * add a record to {node_access} paired with a corresponding privilege in
    * hook_node_grants().
    */
-  public function testNodeQueryAlterOverride() {
+  public function testNodeQueryAlterOverride(): void {
     $record = [
       'nid' => 0,
       'gid' => 0,
diff --git a/core/modules/node/tests/src/Functional/NodeRSSContentTest.php b/core/modules/node/tests/src/Functional/NodeRSSContentTest.php
index f4eed6763251..861c8c555776 100644
--- a/core/modules/node/tests/src/Functional/NodeRSSContentTest.php
+++ b/core/modules/node/tests/src/Functional/NodeRSSContentTest.php
@@ -49,7 +49,7 @@ protected function setUp(): void {
   /**
    * Ensures that a new node includes the custom data when added to an RSS feed.
    */
-  public function testNodeRSSContent() {
+  public function testNodeRSSContent(): void {
     // Create a node.
     $node = $this->drupalCreateNode(['type' => 'article', 'promote' => 1]);
 
@@ -79,7 +79,7 @@ public function testNodeRSSContent() {
   /**
    * Tests relative, root-relative, protocol-relative and absolute URLs.
    */
-  public function testUrlHandling() {
+  public function testUrlHandling(): void {
     // Only the plain_text text format is available by default, which escapes
     // all HTML.
     FilterFormat::create([
diff --git a/core/modules/node/tests/src/Functional/NodeRevisionsAllTest.php b/core/modules/node/tests/src/Functional/NodeRevisionsAllTest.php
index a6d80e146036..6b5c4c02c22c 100644
--- a/core/modules/node/tests/src/Functional/NodeRevisionsAllTest.php
+++ b/core/modules/node/tests/src/Functional/NodeRevisionsAllTest.php
@@ -111,7 +111,7 @@ protected function createNodeRevision(NodeInterface $node) {
   /**
    * Checks node revision operations.
    */
-  public function testRevisions() {
+  public function testRevisions(): void {
     $node_storage = $this->container->get('entity_type.manager')->getStorage('node');
     $nodes = $this->nodes;
     $logs = $this->revisionLogs;
diff --git a/core/modules/node/tests/src/Functional/NodeRevisionsTest.php b/core/modules/node/tests/src/Functional/NodeRevisionsTest.php
index 2cf8a475def4..dcd52e7ff0c6 100644
--- a/core/modules/node/tests/src/Functional/NodeRevisionsTest.php
+++ b/core/modules/node/tests/src/Functional/NodeRevisionsTest.php
@@ -141,7 +141,7 @@ protected function setUp(): void {
   /**
    * Checks node revision related operations.
    */
-  public function testRevisions() {
+  public function testRevisions(): void {
     // Access to the revision page for a node with 1 revision is allowed.
     $node = $this->drupalCreateNode();
     $this->drupalGet("node/" . $node->id() . "/revisions/" . $node->getRevisionId() . "/view");
@@ -337,7 +337,7 @@ public function testRevisions() {
   /**
    * Checks that revisions are correctly saved without log messages.
    */
-  public function testNodeRevisionWithoutLogMessage() {
+  public function testNodeRevisionWithoutLogMessage(): void {
     $node_storage = $this->container->get('entity_type.manager')->getStorage('node');
     // Create a node with an initial log message.
     $revision_log = $this->randomMachineName(10);
@@ -384,7 +384,7 @@ public function testNodeRevisionWithoutLogMessage() {
   /**
    * Tests the revision translations are correctly reverted.
    */
-  public function testRevisionTranslationRevert() {
+  public function testRevisionTranslationRevert(): void {
     // Create a node and a few revisions.
     $node = $this->drupalCreateNode(['langcode' => 'en']);
 
diff --git a/core/modules/node/tests/src/Functional/NodeRevisionsUiBypassAccessTest.php b/core/modules/node/tests/src/Functional/NodeRevisionsUiBypassAccessTest.php
index d88e780ed670..4b48e2fb7337 100644
--- a/core/modules/node/tests/src/Functional/NodeRevisionsUiBypassAccessTest.php
+++ b/core/modules/node/tests/src/Functional/NodeRevisionsUiBypassAccessTest.php
@@ -53,7 +53,7 @@ protected function setUp(): void {
   /**
    * Checks that the Revision tab is displayed correctly.
    */
-  public function testDisplayRevisionTab() {
+  public function testDisplayRevisionTab(): void {
     $this->drupalPlaceBlock('local_tasks_block');
 
     $this->drupalLogin($this->editor);
diff --git a/core/modules/node/tests/src/Functional/NodeRevisionsUiTest.php b/core/modules/node/tests/src/Functional/NodeRevisionsUiTest.php
index f6972c2d9915..6afd5099422c 100644
--- a/core/modules/node/tests/src/Functional/NodeRevisionsUiTest.php
+++ b/core/modules/node/tests/src/Functional/NodeRevisionsUiTest.php
@@ -49,7 +49,7 @@ protected function setUp(): void {
   /**
    * Checks that unchecking 'Create new revision' works when editing a node.
    */
-  public function testNodeFormSaveWithoutRevision() {
+  public function testNodeFormSaveWithoutRevision(): void {
     $this->drupalLogin($this->editor);
     $node_storage = $this->container->get('entity_type.manager')->getStorage('node');
 
@@ -94,7 +94,7 @@ public function testNodeFormSaveWithoutRevision() {
   /**
    * Checks HTML double escaping of revision logs.
    */
-  public function testNodeRevisionDoubleEscapeFix() {
+  public function testNodeRevisionDoubleEscapeFix(): void {
     $this->drupalLogin($this->editor);
     $nodes = [];
 
@@ -139,7 +139,7 @@ public function testNodeRevisionDoubleEscapeFix() {
   /**
    * Checks the Revisions tab.
    */
-  public function testNodeRevisionsTabWithDefaultRevision() {
+  public function testNodeRevisionsTabWithDefaultRevision(): void {
     $this->drupalLogin($this->editor);
 
     // Create the node.
diff --git a/core/modules/node/tests/src/Functional/NodeRssCacheTest.php b/core/modules/node/tests/src/Functional/NodeRssCacheTest.php
index d25a98bcfa67..152db78d4b9b 100644
--- a/core/modules/node/tests/src/Functional/NodeRssCacheTest.php
+++ b/core/modules/node/tests/src/Functional/NodeRssCacheTest.php
@@ -54,7 +54,7 @@ protected function setUp(): void {
   /**
    * Ensure the RSS teaser render does not interfere with default theme cache.
    */
-  public function testNodeRssCacheContent() {
+  public function testNodeRssCacheContent(): void {
     // Only the plain_text text format is available by default, which escapes
     // all HTML.
     FilterFormat::create([
diff --git a/core/modules/node/tests/src/Functional/NodeSaveTest.php b/core/modules/node/tests/src/Functional/NodeSaveTest.php
index e851907608a5..47cae0f2dcb7 100644
--- a/core/modules/node/tests/src/Functional/NodeSaveTest.php
+++ b/core/modules/node/tests/src/Functional/NodeSaveTest.php
@@ -52,7 +52,7 @@ protected function setUp(): void {
    *  - save the content
    *  - check if node exists
    */
-  public function testImport() {
+  public function testImport(): void {
     // Node ID must be a number that is not in the database.
     $nids = \Drupal::entityTypeManager()->getStorage('node')->getQuery()
       ->accessCheck(FALSE)
@@ -87,7 +87,7 @@ public function testImport() {
   /**
    * Verifies accuracy of the "created" and "changed" timestamp functionality.
    */
-  public function testTimestamps() {
+  public function testTimestamps(): void {
     // Use the default timestamps.
     $edit = [
       'uid' => $this->webUser->id(),
@@ -150,7 +150,7 @@ public function testTimestamps() {
    * This test determines changes in hook_ENTITY_TYPE_presave() and verifies
    * that the static node load cache is cleared upon save.
    */
-  public function testDeterminingChanges() {
+  public function testDeterminingChanges(): void {
     // Initial creation.
     $node = Node::create([
       'uid' => $this->webUser->id(),
@@ -185,7 +185,7 @@ public function testDeterminingChanges() {
    *
    * @see node_test_node_insert()
    */
-  public function testNodeSaveOnInsert() {
+  public function testNodeSaveOnInsert(): void {
     // node_test_node_insert() triggers a save on insert if the title equals
     // 'new'.
     $node = $this->drupalCreateNode(['title' => 'new']);
diff --git a/core/modules/node/tests/src/Functional/NodeSyndicateBlockTest.php b/core/modules/node/tests/src/Functional/NodeSyndicateBlockTest.php
index bcf143b57beb..3d85099d0d49 100644
--- a/core/modules/node/tests/src/Functional/NodeSyndicateBlockTest.php
+++ b/core/modules/node/tests/src/Functional/NodeSyndicateBlockTest.php
@@ -37,7 +37,7 @@ protected function setUp(): void {
   /**
    * Tests that the "Syndicate" block is shown when enabled.
    */
-  public function testSyndicateBlock() {
+  public function testSyndicateBlock(): void {
     // Place the "Syndicate" block and confirm that it is rendered.
     $this->drupalPlaceBlock('node_syndicate_block', ['id' => 'test_syndicate_block', 'label' => 'Subscribe to RSS Feed']);
     $this->drupalGet('');
diff --git a/core/modules/node/tests/src/Functional/NodeTitleTest.php b/core/modules/node/tests/src/Functional/NodeTitleTest.php
index 6f3890c6858a..b2157a5e799a 100644
--- a/core/modules/node/tests/src/Functional/NodeTitleTest.php
+++ b/core/modules/node/tests/src/Functional/NodeTitleTest.php
@@ -58,7 +58,7 @@ protected function setUp(): void {
   /**
    * Creates one node and tests if the node title has the correct value.
    */
-  public function testNodeTitle() {
+  public function testNodeTitle(): void {
     // Create "Basic page" content with title.
     // Add the node to the frontpage so we can test if teaser links are
     // clickable.
diff --git a/core/modules/node/tests/src/Functional/NodeTitleXSSTest.php b/core/modules/node/tests/src/Functional/NodeTitleXSSTest.php
index 8d8772c81b26..800c82bf5074 100644
--- a/core/modules/node/tests/src/Functional/NodeTitleXSSTest.php
+++ b/core/modules/node/tests/src/Functional/NodeTitleXSSTest.php
@@ -21,7 +21,7 @@ class NodeTitleXSSTest extends NodeTestBase {
   /**
    * Tests XSS functionality with a node entity.
    */
-  public function testNodeTitleXSS() {
+  public function testNodeTitleXSS(): void {
     // Prepare a user to do the stuff.
     $web_user = $this->drupalCreateUser([
       'create page content',
diff --git a/core/modules/node/tests/src/Functional/NodeTranslationUITest.php b/core/modules/node/tests/src/Functional/NodeTranslationUITest.php
index 33fd1e33f9ae..a0ebfa7ba75b 100644
--- a/core/modules/node/tests/src/Functional/NodeTranslationUITest.php
+++ b/core/modules/node/tests/src/Functional/NodeTranslationUITest.php
@@ -81,7 +81,7 @@ protected function setUp(): void {
   /**
    * Tests the basic translation UI.
    */
-  public function testTranslationUI() {
+  public function testTranslationUI(): void {
     parent::testTranslationUI();
     $this->doUninstallTest();
   }
@@ -89,7 +89,7 @@ public function testTranslationUI() {
   /**
    * Tests changing the published status on a node without fields.
    */
-  public function testPublishedStatusNoFields() {
+  public function testPublishedStatusNoFields(): void {
     // Test changing the published status of an article without fields.
     $this->drupalLogin($this->administrator);
     // Delete all fields.
@@ -245,7 +245,7 @@ protected function doTestAuthoringInfo() {
   /**
    * Tests that translation page inherits admin status of edit page.
    */
-  public function testTranslationLinkTheme() {
+  public function testTranslationLinkTheme(): void {
     $this->drupalLogin($this->administrator);
     $article = $this->drupalCreateNode(['type' => 'article', 'langcode' => $this->langcodes[0]]);
 
@@ -275,7 +275,7 @@ public function testTranslationLinkTheme() {
   /**
    * Tests that no metadata is stored for a disabled bundle.
    */
-  public function testDisabledBundle() {
+  public function testDisabledBundle(): void {
     // Create a bundle that does not have translation enabled.
     $disabledBundle = $this->randomMachineName();
     $this->drupalCreateContentType(['type' => $disabledBundle, 'name' => $disabledBundle]);
@@ -304,7 +304,7 @@ public function testDisabledBundle() {
   /**
    * Tests that translations are rendered properly.
    */
-  public function testTranslationRendering() {
+  public function testTranslationRendering(): void {
     // Add a comment field to the article content type.
     \Drupal::service('module_installer')->install(['comment']);
     $this->addDefaultCommentField('node', 'article');
@@ -507,7 +507,7 @@ protected function doTestTranslationEdit() {
   /**
    * Tests that revision translations are rendered properly.
    */
-  public function testRevisionTranslationRendering() {
+  public function testRevisionTranslationRendering(): void {
     $storage = \Drupal::entityTypeManager()->getStorage('node');
 
     // Create a node.
@@ -556,7 +556,7 @@ public function testRevisionTranslationRendering() {
   /**
    * Tests title is not escaped (but XSS-filtered) for details form element.
    */
-  public function testDetailsTitleIsNotEscaped() {
+  public function testDetailsTitleIsNotEscaped(): void {
     // Create an image field.
     \Drupal::service('module_installer')->install(['image']);
     FieldStorageConfig::create([
@@ -601,7 +601,7 @@ public function testDetailsTitleIsNotEscaped() {
    * When language neutral content is displayed on interface language, it should
    * consider the interface language for creating the content link.
    */
-  public function testUrlPrefixOnLanguageNeutralContent() {
+  public function testUrlPrefixOnLanguageNeutralContent(): void {
     $this->drupalLogin($this->administrator);
     $neutral_langcodes = [
       LanguageInterface::LANGCODE_NOT_SPECIFIED,
diff --git a/core/modules/node/tests/src/Functional/NodeTypeInitialLanguageTest.php b/core/modules/node/tests/src/Functional/NodeTypeInitialLanguageTest.php
index 0461876c81d4..d2dcc13b7f00 100644
--- a/core/modules/node/tests/src/Functional/NodeTypeInitialLanguageTest.php
+++ b/core/modules/node/tests/src/Functional/NodeTypeInitialLanguageTest.php
@@ -48,7 +48,7 @@ protected function setUp(): void {
    * The default initial language must be the site's default, and the language
    * locked option must be on.
    */
-  public function testNodeTypeInitialLanguageDefaults() {
+  public function testNodeTypeInitialLanguageDefaults(): void {
     $this->drupalGet('admin/structure/types/manage/article');
     $this->assertTrue($this->assertSession()->optionExists('edit-language-configuration-langcode', LanguageInterface::LANGCODE_SITE_DEFAULT)->isSelected());
     $this->assertSession()->checkboxNotChecked('edit-language-configuration-language-alterable');
@@ -111,7 +111,7 @@ public function testNodeTypeInitialLanguageDefaults() {
   /**
    * Tests language field visibility features.
    */
-  public function testLanguageFieldVisibility() {
+  public function testLanguageFieldVisibility(): void {
     // Creates a node to test Language field visibility feature.
     $edit = [
       'title[0][value]' => $this->randomMachineName(8),
diff --git a/core/modules/node/tests/src/Functional/NodeTypeTest.php b/core/modules/node/tests/src/Functional/NodeTypeTest.php
index a33a18f7ca46..d8ff8e338f19 100644
--- a/core/modules/node/tests/src/Functional/NodeTypeTest.php
+++ b/core/modules/node/tests/src/Functional/NodeTypeTest.php
@@ -38,7 +38,7 @@ class NodeTypeTest extends NodeTestBase {
    *
    * Load available node types and validate the returned data.
    */
-  public function testNodeTypeGetFunctions() {
+  public function testNodeTypeGetFunctions(): void {
     $node_types = NodeType::loadMultiple();
     $node_names = node_type_get_names();
 
@@ -55,7 +55,7 @@ public function testNodeTypeGetFunctions() {
   /**
    * Tests creating a content type programmatically and via a form.
    */
-  public function testNodeTypeCreation() {
+  public function testNodeTypeCreation(): void {
     // Create a content type programmatically.
     $type = $this->drupalCreateContentType();
 
@@ -106,7 +106,7 @@ public function testNodeTypeCreation() {
   /**
    * Tests editing a node type using the UI.
    */
-  public function testNodeTypeEditing() {
+  public function testNodeTypeEditing(): void {
     $assert = $this->assertSession();
     $this->drupalPlaceBlock('system_breadcrumb_block');
     $web_user = $this->drupalCreateUser([
@@ -181,7 +181,7 @@ public function testNodeTypeEditing() {
   /**
    * Tests deleting a content type that still has content.
    */
-  public function testNodeTypeDeletion() {
+  public function testNodeTypeDeletion(): void {
     $this->drupalPlaceBlock('page_title_block');
     // Create a content type programmatically.
     $type = $this->drupalCreateContentType();
@@ -234,7 +234,7 @@ public function testNodeTypeDeletion() {
   /**
    * Tests operations from Field UI and User modules for content types.
    */
-  public function testNodeTypeOperations() {
+  public function testNodeTypeOperations(): void {
     // Create an admin user who can only manage node fields.
     $admin_user_1 = $this->drupalCreateUser([
       'administer content types',
@@ -266,7 +266,7 @@ public function testNodeTypeOperations() {
   /**
    * Tests for when there are no content types defined.
    */
-  public function testNodeTypeNoContentType() {
+  public function testNodeTypeNoContentType(): void {
     /** @var \Drupal\Core\Entity\EntityTypeBundleInfoInterface $bundle_info */
     $bundle_info = \Drupal::service('entity_type.bundle.info');
     $this->assertCount(2, $bundle_info->getBundleInfo('node'), 'The bundle information service has 2 bundles for the Node entity type.');
diff --git a/core/modules/node/tests/src/Functional/NodeTypeTranslationTest.php b/core/modules/node/tests/src/Functional/NodeTypeTranslationTest.php
index 0066864056c0..2167a0802b45 100644
--- a/core/modules/node/tests/src/Functional/NodeTypeTranslationTest.php
+++ b/core/modules/node/tests/src/Functional/NodeTypeTranslationTest.php
@@ -104,7 +104,7 @@ protected function installParameters() {
   /**
    * Tests the node type translation.
    */
-  public function testNodeTypeTranslation() {
+  public function testNodeTypeTranslation(): void {
     $type = $this->randomMachineName(16);
     $name = $this->randomString();
     $this->drupalLogin($this->adminUser);
@@ -141,7 +141,7 @@ public function testNodeTypeTranslation() {
   /**
    * Tests the node type title label translation.
    */
-  public function testNodeTypeTitleLabelTranslation() {
+  public function testNodeTypeTitleLabelTranslation(): void {
     $type = $this->randomMachineName(16);
     $name = $this->randomString();
     $this->drupalLogin($this->adminUser);
diff --git a/core/modules/node/tests/src/Functional/NodeViewLanguageTest.php b/core/modules/node/tests/src/Functional/NodeViewLanguageTest.php
index 68e0ec6ca5fd..c0d9a22d9668 100644
--- a/core/modules/node/tests/src/Functional/NodeViewLanguageTest.php
+++ b/core/modules/node/tests/src/Functional/NodeViewLanguageTest.php
@@ -28,7 +28,7 @@ class NodeViewLanguageTest extends NodeTestBase {
   /**
    * Tests the language extra field display.
    */
-  public function testViewLanguage() {
+  public function testViewLanguage(): void {
     // Add Spanish language.
     ConfigurableLanguage::createFromLangcode('es')->save();
 
diff --git a/core/modules/node/tests/src/Functional/NodeViewTest.php b/core/modules/node/tests/src/Functional/NodeViewTest.php
index 2b6b85f07a64..c8b28123213c 100644
--- a/core/modules/node/tests/src/Functional/NodeViewTest.php
+++ b/core/modules/node/tests/src/Functional/NodeViewTest.php
@@ -20,7 +20,7 @@ class NodeViewTest extends NodeTestBase {
   /**
    * Tests the html head links.
    */
-  public function testHtmlHeadLinks() {
+  public function testHtmlHeadLinks(): void {
     $node = $this->drupalCreateNode();
 
     $this->drupalGet($node->toUrl());
@@ -35,7 +35,7 @@ public function testHtmlHeadLinks() {
   /**
    * Tests the Link header.
    */
-  public function testLinkHeader() {
+  public function testLinkHeader(): void {
     $node = $this->drupalCreateNode();
     $this->drupalGet($node->toUrl());
     $this->assertArrayNotHasKey('Link', $this->getSession()->getResponseHeaders());
@@ -44,7 +44,7 @@ public function testLinkHeader() {
   /**
    * Tests that we store and retrieve multi-byte UTF-8 characters correctly.
    */
-  public function testMultiByteUtf8() {
+  public function testMultiByteUtf8(): void {
     $title = '🐝';
     // To ensure that the title has multi-byte characters, we compare the byte
     // length to the character length.
diff --git a/core/modules/node/tests/src/Functional/PagePreviewTest.php b/core/modules/node/tests/src/Functional/PagePreviewTest.php
index 9f86a2d3fff2..5caa943e084b 100644
--- a/core/modules/node/tests/src/Functional/PagePreviewTest.php
+++ b/core/modules/node/tests/src/Functional/PagePreviewTest.php
@@ -195,7 +195,7 @@ protected function setUp(): void {
   /**
    * Checks the node preview functionality.
    */
-  public function testPagePreview() {
+  public function testPagePreview(): void {
     $title_key = 'title[0][value]';
     $body_key = 'body[0][value]';
     $term_key = $this->fieldName . '[target_id]';
@@ -449,7 +449,7 @@ public function testPagePreview() {
   /**
    * Checks the node preview functionality, when using revisions.
    */
-  public function testPagePreviewWithRevisions() {
+  public function testPagePreviewWithRevisions(): void {
     $title_key = 'title[0][value]';
     $body_key = 'body[0][value]';
     $term_key = $this->fieldName . '[target_id]';
@@ -505,7 +505,7 @@ public function testPagePreviewWithRevisions() {
   /**
    * Checks the node preview accessible for simultaneous node editing.
    */
-  public function testSimultaneousPreview() {
+  public function testSimultaneousPreview(): void {
     $title_key = 'title[0][value]';
     $node = $this->drupalCreateNode([]);
 
@@ -529,7 +529,7 @@ public function testSimultaneousPreview() {
   /**
    * Tests node preview with dynamic_page_cache and anonymous users.
    */
-  public function testPagePreviewCache() {
+  public function testPagePreviewCache(): void {
     \Drupal::service('module_installer')->uninstall(['node_test']);
     $this->drupalLogout();
     $title_key = 'title[0][value]';
diff --git a/core/modules/node/tests/src/Functional/PageViewTest.php b/core/modules/node/tests/src/Functional/PageViewTest.php
index c395bf1ece40..caa93a5c5fef 100644
--- a/core/modules/node/tests/src/Functional/PageViewTest.php
+++ b/core/modules/node/tests/src/Functional/PageViewTest.php
@@ -21,7 +21,7 @@ class PageViewTest extends NodeTestBase {
   /**
    * Tests editing a node by users with various access permissions.
    */
-  public function testPageView() {
+  public function testPageView(): void {
     // Create a node to view.
     $node = $this->drupalCreateNode();
     $this->assertNotEmpty(Node::load($node->id()), 'Node created.');
diff --git a/core/modules/node/tests/src/Functional/Rest/NodeResourceTestBase.php b/core/modules/node/tests/src/Functional/Rest/NodeResourceTestBase.php
index 3820281dc60f..484f73791cf2 100644
--- a/core/modules/node/tests/src/Functional/Rest/NodeResourceTestBase.php
+++ b/core/modules/node/tests/src/Functional/Rest/NodeResourceTestBase.php
@@ -229,7 +229,7 @@ protected function getExpectedUnauthorizedAccessMessage($method) {
    *
    * @see \Drupal\Tests\rest\Functional\EntityResource\Term\TermResourceTestBase::testPatchPath()
    */
-  public function testPatchPath() {
+  public function testPatchPath(): void {
     $this->initAuthentication();
     $this->provisionEntityResource();
     $this->setUpAuthorization('GET');
diff --git a/core/modules/node/tests/src/Functional/Rest/NodeXmlAnonTest.php b/core/modules/node/tests/src/Functional/Rest/NodeXmlAnonTest.php
index cfc875e052ef..68faeeb20d15 100644
--- a/core/modules/node/tests/src/Functional/Rest/NodeXmlAnonTest.php
+++ b/core/modules/node/tests/src/Functional/Rest/NodeXmlAnonTest.php
@@ -33,7 +33,7 @@ class NodeXmlAnonTest extends NodeResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public function testPatchPath() {
+  public function testPatchPath(): void {
     // Deserialization of the XML format is not supported.
     $this->markTestSkipped();
   }
diff --git a/core/modules/node/tests/src/Functional/Rest/NodeXmlBasicAuthTest.php b/core/modules/node/tests/src/Functional/Rest/NodeXmlBasicAuthTest.php
index 550d3e9a7467..b12d2969f24e 100644
--- a/core/modules/node/tests/src/Functional/Rest/NodeXmlBasicAuthTest.php
+++ b/core/modules/node/tests/src/Functional/Rest/NodeXmlBasicAuthTest.php
@@ -43,7 +43,7 @@ class NodeXmlBasicAuthTest extends NodeResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public function testPatchPath() {
+  public function testPatchPath(): void {
     // Deserialization of the XML format is not supported.
     $this->markTestSkipped();
   }
diff --git a/core/modules/node/tests/src/Functional/Rest/NodeXmlCookieTest.php b/core/modules/node/tests/src/Functional/Rest/NodeXmlCookieTest.php
index 568e6cb621da..53785df4e6c8 100644
--- a/core/modules/node/tests/src/Functional/Rest/NodeXmlCookieTest.php
+++ b/core/modules/node/tests/src/Functional/Rest/NodeXmlCookieTest.php
@@ -38,7 +38,7 @@ class NodeXmlCookieTest extends NodeResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public function testPatchPath() {
+  public function testPatchPath(): void {
     // Deserialization of the XML format is not supported.
     $this->markTestSkipped();
   }
diff --git a/core/modules/node/tests/src/Functional/Views/BulkFormAccessTest.php b/core/modules/node/tests/src/Functional/Views/BulkFormAccessTest.php
index abbd2bda0645..056e9511f06c 100644
--- a/core/modules/node/tests/src/Functional/Views/BulkFormAccessTest.php
+++ b/core/modules/node/tests/src/Functional/Views/BulkFormAccessTest.php
@@ -67,7 +67,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['node_test_views
   /**
    * Tests if nodes that may not be edited, can not be edited in bulk.
    */
-  public function testNodeEditAccess() {
+  public function testNodeEditAccess(): void {
     // Create an account who will be the author of a private node.
     $author = $this->drupalCreateUser();
     // Create a private node (author may view, edit and delete, others may not).
@@ -143,7 +143,7 @@ public function testNodeEditAccess() {
   /**
    * Tests if nodes that may not be deleted, can not be deleted in bulk.
    */
-  public function testNodeDeleteAccess() {
+  public function testNodeDeleteAccess(): void {
     // Create an account who will be the author of a private node.
     $author = $this->drupalCreateUser();
     // Create a private node (author may view, edit and delete, others may not).
diff --git a/core/modules/node/tests/src/Functional/Views/BulkFormTest.php b/core/modules/node/tests/src/Functional/Views/BulkFormTest.php
index ca6445ade1f3..83d21c4d965b 100644
--- a/core/modules/node/tests/src/Functional/Views/BulkFormTest.php
+++ b/core/modules/node/tests/src/Functional/Views/BulkFormTest.php
@@ -102,7 +102,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['node_test_views
   /**
    * Tests the node bulk form.
    */
-  public function testBulkForm() {
+  public function testBulkForm(): void {
     // Unpublish a node using the bulk form.
     $node = reset($this->nodes);
     $this->assertTrue($node->isPublished(), 'Node is initially published');
@@ -223,7 +223,7 @@ public function testBulkForm() {
   /**
    * Tests multiple deletion.
    */
-  public function testBulkDeletion() {
+  public function testBulkDeletion(): void {
     // Select a bunch of translated and untranslated nodes and check that
     // nodes and individual translations are properly deleted.
     $edit = [
diff --git a/core/modules/node/tests/src/Functional/Views/FilterNodeAccessTest.php b/core/modules/node/tests/src/Functional/Views/FilterNodeAccessTest.php
index 5b7c04534fef..2587f69f6fab 100644
--- a/core/modules/node/tests/src/Functional/Views/FilterNodeAccessTest.php
+++ b/core/modules/node/tests/src/Functional/Views/FilterNodeAccessTest.php
@@ -85,7 +85,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['node_test_views
   /**
    * Tests the node access filter.
    */
-  public function testFilterNodeAccess() {
+  public function testFilterNodeAccess(): void {
     $this->drupalLogin($this->users[0]);
     $this->drupalGet('test_filter_node_access');
     // Test that the private node of the current user is shown.
diff --git a/core/modules/node/tests/src/Functional/Views/FrontPageTest.php b/core/modules/node/tests/src/Functional/Views/FrontPageTest.php
index 70acac958a15..b21aba3e70bd 100644
--- a/core/modules/node/tests/src/Functional/Views/FrontPageTest.php
+++ b/core/modules/node/tests/src/Functional/Views/FrontPageTest.php
@@ -56,7 +56,7 @@ protected function setUp($import_test_views = TRUE, $modules = []): void {
   /**
    * Tests the frontpage.
    */
-  public function testFrontPage() {
+  public function testFrontPage(): void {
     $site_name = $this->randomMachineName();
     $this->config('system.site')
       ->set('name', $site_name)
@@ -177,7 +177,7 @@ protected function assertNotInResultSet(ViewExecutable $view, array $not_expecte
   /**
    * Tests the cache tags when using the "none" cache plugin.
    */
-  public function testCacheTagsWithCachePluginNone() {
+  public function testCacheTagsWithCachePluginNone(): void {
     $this->enablePageCaching();
     $this->doTestFrontPageViewCacheTags(FALSE);
   }
@@ -185,7 +185,7 @@ public function testCacheTagsWithCachePluginNone() {
   /**
    * Tests the cache tags when using the "tag" cache plugin.
    */
-  public function testCacheTagsWithCachePluginTag() {
+  public function testCacheTagsWithCachePluginTag(): void {
     $this->enablePageCaching();
 
     $view = Views::getView('frontpage');
@@ -201,7 +201,7 @@ public function testCacheTagsWithCachePluginTag() {
   /**
    * Tests the cache tags when using the "time" cache plugin.
    */
-  public function testCacheTagsWithCachePluginTime() {
+  public function testCacheTagsWithCachePluginTime(): void {
     $this->enablePageCaching();
 
     $view = Views::getView('frontpage');
diff --git a/core/modules/node/tests/src/Functional/Views/NodeContextualLinksTest.php b/core/modules/node/tests/src/Functional/Views/NodeContextualLinksTest.php
index 19fe5b932bc6..4f8de11b36a4 100644
--- a/core/modules/node/tests/src/Functional/Views/NodeContextualLinksTest.php
+++ b/core/modules/node/tests/src/Functional/Views/NodeContextualLinksTest.php
@@ -34,7 +34,7 @@ class NodeContextualLinksTest extends NodeTestBase {
    *
    * @see https://www.drupal.org/node/2379811
    */
-  public function testPageWithDisabledContextualModule() {
+  public function testPageWithDisabledContextualModule(): void {
     \Drupal::service('module_installer')->uninstall(['contextual']);
     \Drupal::service('module_installer')->install(['views_ui']);
 
diff --git a/core/modules/node/tests/src/Functional/Views/NodeFieldFilterTest.php b/core/modules/node/tests/src/Functional/Views/NodeFieldFilterTest.php
index 18ab3b14ccde..c33d932ead0a 100644
--- a/core/modules/node/tests/src/Functional/Views/NodeFieldFilterTest.php
+++ b/core/modules/node/tests/src/Functional/Views/NodeFieldFilterTest.php
@@ -71,7 +71,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['node_test_views
   /**
    * Tests body and title filters.
    */
-  public function testFilters() {
+  public function testFilters(): void {
     // Test the title filter page, which filters for title contains 'Comida'.
     // Should show just the Spanish translation, once.
     $this->assertPageCounts('test-title-filter', ['es' => 1, 'fr' => 0, 'en' => 0], 'Comida title filter');
diff --git a/core/modules/node/tests/src/Functional/Views/NodeFieldTokensTest.php b/core/modules/node/tests/src/Functional/Views/NodeFieldTokensTest.php
index 0340c1fe7faa..e7f060fe3d49 100644
--- a/core/modules/node/tests/src/Functional/Views/NodeFieldTokensTest.php
+++ b/core/modules/node/tests/src/Functional/Views/NodeFieldTokensTest.php
@@ -30,7 +30,7 @@ class NodeFieldTokensTest extends NodeTestBase {
   /**
    * Tests token replacement for Views tokens supplied by the Node module.
    */
-  public function testViewsTokenReplacement() {
+  public function testViewsTokenReplacement(): void {
     // Create the Article content type with a standard body field.
     /** @var \Drupal\node\NodeTypeInterface $node_type */
     $node_type = NodeType::create(['type' => 'article', 'name' => 'Article']);
diff --git a/core/modules/node/tests/src/Functional/Views/NodeIntegrationTest.php b/core/modules/node/tests/src/Functional/Views/NodeIntegrationTest.php
index 0868dfa8aca6..41e24f110e17 100644
--- a/core/modules/node/tests/src/Functional/Views/NodeIntegrationTest.php
+++ b/core/modules/node/tests/src/Functional/Views/NodeIntegrationTest.php
@@ -26,7 +26,7 @@ class NodeIntegrationTest extends NodeTestBase {
   /**
    * Tests basic node view with a node type argument.
    */
-  public function testNodeViewTypeArgument() {
+  public function testNodeViewTypeArgument(): void {
     // Create two content types with three nodes each.
     $types = [];
     $all_nids = [];
diff --git a/core/modules/node/tests/src/Functional/Views/NodeLanguageTest.php b/core/modules/node/tests/src/Functional/Views/NodeLanguageTest.php
index 5863710fc93a..745ace0c0bb3 100644
--- a/core/modules/node/tests/src/Functional/Views/NodeLanguageTest.php
+++ b/core/modules/node/tests/src/Functional/Views/NodeLanguageTest.php
@@ -115,7 +115,7 @@ protected function setUp($import_test_views = TRUE, $modules = []): void {
   /**
    * Tests translation language filter, field, and sort.
    */
-  public function testLanguages() {
+  public function testLanguages(): void {
     // Test the page with no arguments. It is filtered to Spanish and French.
     // The page shows node titles and languages.
     $this->drupalGet('test-language');
@@ -255,7 +255,7 @@ public function testLanguages() {
   /**
    * Tests native name display in language field.
    */
-  public function testNativeLanguageField() {
+  public function testNativeLanguageField(): void {
     $this->assertLanguageNames();
 
     // Modify test view to display native language names and set translations.
diff --git a/core/modules/node/tests/src/Functional/Views/NodeViewsAnalyzeTest.php b/core/modules/node/tests/src/Functional/Views/NodeViewsAnalyzeTest.php
index bf44158b123c..402e70bec765 100644
--- a/core/modules/node/tests/src/Functional/Views/NodeViewsAnalyzeTest.php
+++ b/core/modules/node/tests/src/Functional/Views/NodeViewsAnalyzeTest.php
@@ -31,7 +31,7 @@ class NodeViewsAnalyzeTest extends NodeTestBase {
   /**
    * Tests the implementation of node_views_analyze().
    */
-  public function testNodeViewsAnalyze() {
+  public function testNodeViewsAnalyze(): void {
     // Create user with permission to view analyze message on views_ui.
     $admin_user = $this->createUser(['administer views']);
 
diff --git a/core/modules/node/tests/src/Functional/Views/RevisionLinkTest.php b/core/modules/node/tests/src/Functional/Views/RevisionLinkTest.php
index 82bdc32bef10..fe03b67cf6bd 100644
--- a/core/modules/node/tests/src/Functional/Views/RevisionLinkTest.php
+++ b/core/modules/node/tests/src/Functional/Views/RevisionLinkTest.php
@@ -30,7 +30,7 @@ class RevisionLinkTest extends NodeTestBase {
   /**
    * Tests revision links.
    */
-  public function testRevisionLinks() {
+  public function testRevisionLinks(): void {
     // Create one user which can view/revert and delete and one which can only
     // do one of them.
     $this->drupalCreateContentType(['name' => 'page', 'type' => 'page']);
diff --git a/core/modules/node/tests/src/Functional/Views/StatusExtraTest.php b/core/modules/node/tests/src/Functional/Views/StatusExtraTest.php
index e3ba3b26efc6..649af1c322b3 100644
--- a/core/modules/node/tests/src/Functional/Views/StatusExtraTest.php
+++ b/core/modules/node/tests/src/Functional/Views/StatusExtraTest.php
@@ -34,7 +34,7 @@ class StatusExtraTest extends NodeTestBase {
   /**
    * Tests the status extra filter.
    */
-  public function testStatusExtra() {
+  public function testStatusExtra(): void {
     $node_author = $this->drupalCreateUser(['view own unpublished content']);
     $node_author_not_unpublished = $this->drupalCreateUser();
     $normal_user = $this->drupalCreateUser();
diff --git a/core/modules/node/tests/src/Functional/Views/Wizard/HiddenTaxonomyTermReferenceFieldWizardTest.php b/core/modules/node/tests/src/Functional/Views/Wizard/HiddenTaxonomyTermReferenceFieldWizardTest.php
index 0ad26d615081..48d2a994d620 100644
--- a/core/modules/node/tests/src/Functional/Views/Wizard/HiddenTaxonomyTermReferenceFieldWizardTest.php
+++ b/core/modules/node/tests/src/Functional/Views/Wizard/HiddenTaxonomyTermReferenceFieldWizardTest.php
@@ -32,7 +32,7 @@ class HiddenTaxonomyTermReferenceFieldWizardTest extends WizardTestBase {
   /**
    * Tests content type with a hidden Taxonomy Term Reference field.
    */
-  public function testHiddenTaxonomyTermReferenceField() {
+  public function testHiddenTaxonomyTermReferenceField(): void {
     // Create Article node type.
     $this->drupalCreateContentType(['type' => 'article', 'name' => 'Article']);
 
diff --git a/core/modules/node/tests/src/Functional/Views/Wizard/NodeRevisionWizardTest.php b/core/modules/node/tests/src/Functional/Views/Wizard/NodeRevisionWizardTest.php
index 1fc7e3a287f9..139800853761 100644
--- a/core/modules/node/tests/src/Functional/Views/Wizard/NodeRevisionWizardTest.php
+++ b/core/modules/node/tests/src/Functional/Views/Wizard/NodeRevisionWizardTest.php
@@ -23,7 +23,7 @@ class NodeRevisionWizardTest extends WizardTestBase {
   /**
    * Tests creating a node revision view.
    */
-  public function testViewAdd() {
+  public function testViewAdd(): void {
     $this->drupalCreateContentType(['type' => 'article']);
     // Create two nodes with two revision.
     $node_storage = \Drupal::entityTypeManager()->getStorage('node');
diff --git a/core/modules/node/tests/src/FunctionalJavascript/CollapsedSummariesTest.php b/core/modules/node/tests/src/FunctionalJavascript/CollapsedSummariesTest.php
index 73d15194a553..84f4a376af97 100644
--- a/core/modules/node/tests/src/FunctionalJavascript/CollapsedSummariesTest.php
+++ b/core/modules/node/tests/src/FunctionalJavascript/CollapsedSummariesTest.php
@@ -45,7 +45,7 @@ protected function setUp(): void {
   /**
    * Confirm that summaries are provided for node meta at all widths.
    */
-  public function testSummaries() {
+  public function testSummaries(): void {
     $page = $this->getSession()->getPage();
     $assert_session = $this->assertSession();
 
diff --git a/core/modules/node/tests/src/FunctionalJavascript/ContextualLinksTest.php b/core/modules/node/tests/src/FunctionalJavascript/ContextualLinksTest.php
index a390401c70ce..4c499c01a862 100644
--- a/core/modules/node/tests/src/FunctionalJavascript/ContextualLinksTest.php
+++ b/core/modules/node/tests/src/FunctionalJavascript/ContextualLinksTest.php
@@ -92,7 +92,7 @@ protected function setUp(): void {
   /**
    * Tests the contextual links on revisions.
    */
-  public function testRevisionContextualLinks() {
+  public function testRevisionContextualLinks(): void {
     // Confirm that the "Edit" and "Delete" contextual links appear for the
     // default revision.
     $this->drupalGet('node/' . $this->nodes[0]->id());
diff --git a/core/modules/node/tests/src/FunctionalJavascript/NodeDeleteConfirmTest.php b/core/modules/node/tests/src/FunctionalJavascript/NodeDeleteConfirmTest.php
index 782e3fc65fe8..2e040fee4c79 100644
--- a/core/modules/node/tests/src/FunctionalJavascript/NodeDeleteConfirmTest.php
+++ b/core/modules/node/tests/src/FunctionalJavascript/NodeDeleteConfirmTest.php
@@ -45,7 +45,7 @@ protected function setUp(): void {
   /**
    * Tests that the node delete operation opens in a modal.
    */
-  public function testNodeDelete() {
+  public function testNodeDelete(): void {
     $page = $this->getSession()->getPage();
     $assert_session = $this->assertSession();
 
@@ -92,7 +92,7 @@ public function testNodeDelete() {
   /**
    * Tests that the node type delete operation opens in a modal.
    */
-  public function testNodeTypeDelete() {
+  public function testNodeTypeDelete(): void {
     $page = $this->getSession()->getPage();
 
     // Delete node type using link on the content type list.
diff --git a/core/modules/node/tests/src/FunctionalJavascript/NodePreviewLinkTest.php b/core/modules/node/tests/src/FunctionalJavascript/NodePreviewLinkTest.php
index c557006ffa24..2a80ebe41452 100644
--- a/core/modules/node/tests/src/FunctionalJavascript/NodePreviewLinkTest.php
+++ b/core/modules/node/tests/src/FunctionalJavascript/NodePreviewLinkTest.php
@@ -50,7 +50,7 @@ protected function setUp(): void {
   /**
    * Tests the behavior of clicking preview links.
    */
-  public function testPreviewLinks() {
+  public function testPreviewLinks(): void {
     $assertSession = $this->assertSession();
     $this->drupalGet('node/add/test');
     $this->submitForm([
diff --git a/core/modules/node/tests/src/FunctionalJavascript/SettingSummariesContentTypeTest.php b/core/modules/node/tests/src/FunctionalJavascript/SettingSummariesContentTypeTest.php
index 35dbfb9767e9..d5a9787b7206 100644
--- a/core/modules/node/tests/src/FunctionalJavascript/SettingSummariesContentTypeTest.php
+++ b/core/modules/node/tests/src/FunctionalJavascript/SettingSummariesContentTypeTest.php
@@ -37,7 +37,7 @@ protected function setUp(): void {
   /**
    * Tests a vertical tab 'Workflow' summary.
    */
-  public function testWorkflowSummary() {
+  public function testWorkflowSummary(): void {
     $this->drupalGet('admin/structure/types/manage/test');
     $page = $this->getSession()->getPage();
     $page->find('css', 'a[href="#edit-workflow"]')->click();
diff --git a/core/modules/node/tests/src/Kernel/Config/NodeImportChangeTest.php b/core/modules/node/tests/src/Kernel/Config/NodeImportChangeTest.php
index 32c95537c2ee..14903396c279 100644
--- a/core/modules/node/tests/src/Kernel/Config/NodeImportChangeTest.php
+++ b/core/modules/node/tests/src/Kernel/Config/NodeImportChangeTest.php
@@ -41,7 +41,7 @@ protected function setUp(): void {
   /**
    * Tests importing an updated content type.
    */
-  public function testImportChange() {
+  public function testImportChange(): void {
     $node_type_id = 'default';
     $node_type_config_name = "node.type.$node_type_id";
 
diff --git a/core/modules/node/tests/src/Kernel/Config/NodeImportCreateTest.php b/core/modules/node/tests/src/Kernel/Config/NodeImportCreateTest.php
index 31ab0b4549f0..50fa90bb682c 100644
--- a/core/modules/node/tests/src/Kernel/Config/NodeImportCreateTest.php
+++ b/core/modules/node/tests/src/Kernel/Config/NodeImportCreateTest.php
@@ -37,7 +37,7 @@ protected function setUp(): void {
   /**
    * Tests creating a content type during default config import.
    */
-  public function testImportCreateDefault() {
+  public function testImportCreateDefault(): void {
     $node_type_id = 'default';
 
     // Check that the content type does not exist yet.
@@ -53,7 +53,7 @@ public function testImportCreateDefault() {
   /**
    * Tests creating a content type during config import.
    */
-  public function testImportCreate() {
+  public function testImportCreate(): void {
     $node_type_id = 'import';
     $node_type_config_name = "node.type.$node_type_id";
 
diff --git a/core/modules/node/tests/src/Kernel/Migrate/MigrateNodeStubTest.php b/core/modules/node/tests/src/Kernel/Migrate/MigrateNodeStubTest.php
index 07ef5c59b6b9..54b13c82142b 100644
--- a/core/modules/node/tests/src/Kernel/Migrate/MigrateNodeStubTest.php
+++ b/core/modules/node/tests/src/Kernel/Migrate/MigrateNodeStubTest.php
@@ -38,7 +38,7 @@ protected function setUp(): void {
   /**
    * Tests creation of node stubs.
    */
-  public function testStub() {
+  public function testStub(): void {
     $this->performStubTest('node');
   }
 
diff --git a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeBundleSettingsTest.php b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeBundleSettingsTest.php
index 66895fdd2cb5..5896c230fe18 100644
--- a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeBundleSettingsTest.php
+++ b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeBundleSettingsTest.php
@@ -46,7 +46,7 @@ protected function setUp(): void {
   /**
    * Tests Drupal 6 node type settings to Drupal 8 migration.
    */
-  public function testNodeBundleSettings() {
+  public function testNodeBundleSettings(): void {
     // Test settings on test_page bundle.
     $node = Node::create(['type' => 'test_page']);
     $this->assertSame(1, $node->status->value);
diff --git a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeCompleteTest.php b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeCompleteTest.php
index 8f2e74562d27..de19dbd782f5 100644
--- a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeCompleteTest.php
+++ b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeCompleteTest.php
@@ -58,7 +58,7 @@ protected function setUp(): void {
   /**
    * Tests the complete node migration.
    */
-  public function testNodeCompleteMigration() {
+  public function testNodeCompleteMigration(): void {
     $db = \Drupal::database();
     $this->assertEquals($this->expectedNodeFieldRevisionTable(), $db->select('node_field_revision', 'nr')
       ->fields('nr')
diff --git a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeConfigsTest.php b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeConfigsTest.php
index 3c8fcb0cb904..cada0043bb55 100644
--- a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeConfigsTest.php
+++ b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeConfigsTest.php
@@ -27,7 +27,7 @@ protected function setUp(): void {
   /**
    * Tests Drupal 6 node settings to Drupal 8 migration.
    */
-  public function testNodeSettings() {
+  public function testNodeSettings(): void {
     $config = $this->config('node.settings');
     $this->assertFalse($config->get('use_admin_theme'));
     $this->assertConfigSchema(\Drupal::service('config.typed'), 'node.settings', $config->get());
diff --git a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeDeriverTest.php b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeDeriverTest.php
index fa2287eb65a2..5ecaf4fa81c1 100644
--- a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeDeriverTest.php
+++ b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeDeriverTest.php
@@ -30,7 +30,7 @@ protected function setUp(): void {
   /**
    * Tests node translation migrations with translation disabled.
    */
-  public function testNoTranslations() {
+  public function testNoTranslations(): void {
     // Without content_translation, there should be no translation migrations.
     $migrations = $this->pluginManager->createInstances('d6_node_translation');
     $this->assertSame([], $migrations,
@@ -40,7 +40,7 @@ public function testNoTranslations() {
   /**
    * Tests node translation migrations with translation enabled.
    */
-  public function testTranslations() {
+  public function testTranslations(): void {
     // With content_translation, there should be translation migrations for
     // each content type.
     $this->enableModules(['language', 'content_translation']);
diff --git a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeRevisionTest.php b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeRevisionTest.php
index 1e97db90bdf5..e9e8d19750cb 100644
--- a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeRevisionTest.php
+++ b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeRevisionTest.php
@@ -64,7 +64,7 @@ protected function assertRevision(int $id, string $langcode, string $title, ?str
   /**
    * Tests node revisions migration from Drupal 6 to 8.
    */
-  public function testNodeRevision() {
+  public function testNodeRevision(): void {
     $node = \Drupal::entityTypeManager()->getStorage('node')->loadRevision(2001);
     /** @var \Drupal\node\NodeInterface $node */
     $this->assertSame('1', $node->id());
diff --git a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeSettingPromoteTest.php b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeSettingPromoteTest.php
index ad1475824777..ee3c3571327b 100644
--- a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeSettingPromoteTest.php
+++ b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeSettingPromoteTest.php
@@ -27,7 +27,7 @@ protected function setUp(): void {
   /**
    * Tests migration of the promote checkbox's settings.
    */
-  public function testMigration() {
+  public function testMigration(): void {
     $this->assertSame('Promoted to front page', BaseFieldOverride::load('node.article.promote')->label());
   }
 
diff --git a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeSettingStatusTest.php b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeSettingStatusTest.php
index 867ef372e21e..d96f6b4f0c9f 100644
--- a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeSettingStatusTest.php
+++ b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeSettingStatusTest.php
@@ -27,7 +27,7 @@ protected function setUp(): void {
   /**
    * Tests migration of the publishing status checkbox's settings.
    */
-  public function testMigration() {
+  public function testMigration(): void {
     $this->assertSame('Publishing status', BaseFieldOverride::load('node.article.status')->label());
   }
 
diff --git a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeSettingStickyTest.php b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeSettingStickyTest.php
index 929f5d8f7691..5e017b2be182 100644
--- a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeSettingStickyTest.php
+++ b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeSettingStickyTest.php
@@ -27,7 +27,7 @@ protected function setUp(): void {
   /**
    * Tests migration of the sticky checkbox's settings.
    */
-  public function testMigration() {
+  public function testMigration(): void {
     $this->assertSame('Sticky at the top of lists', BaseFieldOverride::load('node.article.sticky')->label());
   }
 
diff --git a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeTest.php b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeTest.php
index 37061a889ac0..f954fd6b233e 100644
--- a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeTest.php
+++ b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeTest.php
@@ -45,7 +45,7 @@ protected function setUp(): void {
   /**
    * Tests node migration from Drupal 6 to 8.
    */
-  public function testNode() {
+  public function testNode(): void {
     // Confirm there are only classic node migration map tables. This shows
     // that only the classic migration ran.
     $results = $this->nodeMigrateMapTableCount('6');
diff --git a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeTypeTest.php b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeTypeTest.php
index ebb809cdaf9a..af5cb11aa109 100644
--- a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeTypeTest.php
+++ b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeTypeTest.php
@@ -32,7 +32,7 @@ protected function setUp(): void {
   /**
    * Tests Drupal 6 node type to Drupal 8 migration.
    */
-  public function testNodeType() {
+  public function testNodeType(): void {
     $id_map = $this->getMigration('d6_node_type')->getIdMap();
     // Test the test_page content type.
     $node_type_page = NodeType::load('test_page');
diff --git a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateViewModesTest.php b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateViewModesTest.php
index 53e5bdbb1805..4fc77447818d 100644
--- a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateViewModesTest.php
+++ b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateViewModesTest.php
@@ -25,7 +25,7 @@ protected function setUp(): void {
   /**
    * Tests Drupal 6 view modes to Drupal 8 migration.
    */
-  public function testViewModes() {
+  public function testViewModes(): void {
     // Test a new view mode.
     $view_mode = EntityViewMode::load('node.preview');
     $this->assertNotNull($view_mode);
diff --git a/core/modules/node/tests/src/Kernel/Migrate/d6/NodeTranslationRedirectTest.php b/core/modules/node/tests/src/Kernel/Migrate/d6/NodeTranslationRedirectTest.php
index 1e4d7684eabc..ab2d421b6f6e 100644
--- a/core/modules/node/tests/src/Kernel/Migrate/d6/NodeTranslationRedirectTest.php
+++ b/core/modules/node/tests/src/Kernel/Migrate/d6/NodeTranslationRedirectTest.php
@@ -54,7 +54,7 @@ protected function setUp(): void {
   /**
    * Tests that not found node translations are redirected.
    */
-  public function testNodeTranslationRedirect() {
+  public function testNodeTranslationRedirect(): void {
     $kernel = $this->container->get('http_kernel');
     $request = Request::create('/node/11');
     $response = $kernel->handle($request);
diff --git a/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeCompleteTest.php b/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeCompleteTest.php
index 2a35da3a0b07..22e0d43bd85b 100644
--- a/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeCompleteTest.php
+++ b/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeCompleteTest.php
@@ -99,7 +99,7 @@ protected function getFileMigrationInfo() {
   /**
    * Tests the complete node migration.
    */
-  public function testNodeCompleteMigration() {
+  public function testNodeCompleteMigration(): void {
     // Confirm there are only complete node migration map tables. This shows
     // that only the complete migration ran.
     $results = $this->nodeMigrateMapTableCount('7');
@@ -161,7 +161,7 @@ public function testNodeCompleteMigration() {
   /**
    * Tests rollback of the complete node migration.
    */
-  public function testRollbackNodeComplete() {
+  public function testRollbackNodeComplete(): void {
     $db = \Drupal::database();
     $node_types = [
       'article',
diff --git a/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeDeriverTest.php b/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeDeriverTest.php
index 53d28823cb63..e9f152fcd72f 100644
--- a/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeDeriverTest.php
+++ b/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeDeriverTest.php
@@ -21,7 +21,7 @@ class MigrateNodeDeriverTest extends MigrateDrupal7TestBase {
   /**
    * Tests node translation migrations with translation disabled.
    */
-  public function testNoTranslations() {
+  public function testNoTranslations(): void {
     // Without content_translation, there should be no translation migrations.
     $migrations = $this->container->get('plugin.manager.migration')->createInstances('d7_node_translation');
     $this->assertEmpty($migrations);
@@ -30,7 +30,7 @@ public function testNoTranslations() {
   /**
    * Tests node translation migrations with translation enabled.
    */
-  public function testTranslations() {
+  public function testTranslations(): void {
     // With content_translation, there should be translation migrations for
     // each content type.
     $this->enableModules(['language', 'content_translation', 'filter']);
@@ -42,7 +42,7 @@ public function testTranslations() {
    *
    * @group node
    */
-  public function testBuilder() {
+  public function testBuilder(): void {
     $process = $this->getMigration('d7_node:test_content_type')->getProcess();
     $this->assertSame('field_boolean', $process['field_boolean'][0]['source']);
     $this->assertSame('field_email', $process['field_email'][0]['source']);
diff --git a/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeRevisionTest.php b/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeRevisionTest.php
index b8d0634b7008..dbc7cda1e209 100644
--- a/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeRevisionTest.php
+++ b/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeRevisionTest.php
@@ -113,7 +113,7 @@ protected function assertRevision(int $id, string $langcode, string $title, ?str
   /**
    * Tests the migration of node revisions with translated nodes.
    */
-  public function testNodeRevisions() {
+  public function testNodeRevisions(): void {
     $this->assertRevision(1, 'en', 'An English Node', NULL, 1441032132);
     $this->assertRevision(2, 'en', 'The thing about Deep Space 9 (1st rev)', 'DS9 1st rev', 1564543588);
     $this->assertRevision(4, 'is', 'is - The thing about Firefly (1st rev)', 'is - Firefly 1st rev', 1478755274);
diff --git a/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeSettingsTest.php b/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeSettingsTest.php
index b015f84ab395..e8fb178c4a01 100644
--- a/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeSettingsTest.php
+++ b/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeSettingsTest.php
@@ -34,7 +34,7 @@ protected function setUp(): void {
   /**
    * Tests migration of node variables to node.settings config object.
    */
-  public function testAggregatorSettings() {
+  public function testAggregatorSettings(): void {
     $config = $this->config('node.settings');
     $this->assertEquals(1, $config->get('use_admin_theme'));
   }
diff --git a/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeTest.php b/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeTest.php
index 35812b11e111..08ee83d79f96 100644
--- a/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeTest.php
+++ b/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeTest.php
@@ -153,7 +153,7 @@ protected function assertRevision(int $id, string $title, int $uid, ?string $log
   /**
    * Tests node migration from Drupal 7 to 8.
    */
-  public function testNode() {
+  public function testNode(): void {
     // Confirm there are only classic node migration map tables. This shows
     // that only the classic migration ran.
     $results = $this->nodeMigrateMapTableCount('7');
diff --git a/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeTitleLabelTest.php b/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeTitleLabelTest.php
index 0a40f6991ae3..e1a2069d7065 100644
--- a/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeTitleLabelTest.php
+++ b/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeTitleLabelTest.php
@@ -45,7 +45,7 @@ protected function assertEntity(string $id, string $label): void {
   /**
    * Tests migration of node title field overrides.
    */
-  public function testMigration() {
+  public function testMigration(): void {
     // Forum title labels are overridden to 'Subject'.
     $this->assertEntity('node.forum.title', 'Subject');
     // Other content types use the default of 'Title' and are not overridden.
diff --git a/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeTypeTest.php b/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeTypeTest.php
index 5cf09dd33f96..271f7bb608f1 100644
--- a/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeTypeTest.php
+++ b/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeTypeTest.php
@@ -82,7 +82,7 @@ protected function assertEntity(string $id, string $label, string $description,
   /**
    * Tests Drupal 7 node type to Drupal 8 migration.
    */
-  public function testNodeType() {
+  public function testNodeType(): void {
     $expected_available_menus = ['main'];
     $expected_parent = 'main:';
 
diff --git a/core/modules/node/tests/src/Kernel/Migrate/d7/NodeTranslationRedirectTest.php b/core/modules/node/tests/src/Kernel/Migrate/d7/NodeTranslationRedirectTest.php
index c8b83ad4fa2f..19af9c5e738d 100644
--- a/core/modules/node/tests/src/Kernel/Migrate/d7/NodeTranslationRedirectTest.php
+++ b/core/modules/node/tests/src/Kernel/Migrate/d7/NodeTranslationRedirectTest.php
@@ -54,7 +54,7 @@ protected function setUp(): void {
   /**
    * Tests that not found node translations are redirected.
    */
-  public function testNodeTranslationRedirect() {
+  public function testNodeTranslationRedirect(): void {
     $kernel = $this->container->get('http_kernel');
     $request = Request::create('/node/3');
     $response = $kernel->handle($request);
diff --git a/core/modules/node/tests/src/Kernel/NodeAccessLanguageAwareCombinationTest.php b/core/modules/node/tests/src/Kernel/NodeAccessLanguageAwareCombinationTest.php
index e17ddb6164d4..e63e0b42d584 100644
--- a/core/modules/node/tests/src/Kernel/NodeAccessLanguageAwareCombinationTest.php
+++ b/core/modules/node/tests/src/Kernel/NodeAccessLanguageAwareCombinationTest.php
@@ -209,7 +209,7 @@ protected function setUp(): void {
   /**
    * Tests node access and node access queries with multiple node languages.
    */
-  public function testNodeAccessLanguageAwareCombination() {
+  public function testNodeAccessLanguageAwareCombination(): void {
 
     $expected_node_access = ['view' => TRUE, 'update' => FALSE, 'delete' => FALSE];
     $expected_node_access_no_access = ['view' => FALSE, 'update' => FALSE, 'delete' => FALSE];
diff --git a/core/modules/node/tests/src/Kernel/NodeAccessLanguageAwareTest.php b/core/modules/node/tests/src/Kernel/NodeAccessLanguageAwareTest.php
index ffd9117da17d..b61904165a71 100644
--- a/core/modules/node/tests/src/Kernel/NodeAccessLanguageAwareTest.php
+++ b/core/modules/node/tests/src/Kernel/NodeAccessLanguageAwareTest.php
@@ -161,7 +161,7 @@ protected function setUp(): void {
   /**
    * Tests node access and node access queries with multiple node languages.
    */
-  public function testNodeAccessLanguageAware() {
+  public function testNodeAccessLanguageAware(): void {
     // The node_access_test_language module only grants view access.
     $expected_node_access = ['view' => TRUE, 'update' => FALSE, 'delete' => FALSE];
     $expected_node_access_no_access = ['view' => FALSE, 'update' => FALSE, 'delete' => FALSE];
diff --git a/core/modules/node/tests/src/Kernel/NodeAccessLanguageTest.php b/core/modules/node/tests/src/Kernel/NodeAccessLanguageTest.php
index 410f6e2b15ad..5f8212d0d8fa 100644
--- a/core/modules/node/tests/src/Kernel/NodeAccessLanguageTest.php
+++ b/core/modules/node/tests/src/Kernel/NodeAccessLanguageTest.php
@@ -53,7 +53,7 @@ protected function setUp(): void {
   /**
    * Tests node access with multiple node languages and no private nodes.
    */
-  public function testNodeAccess() {
+  public function testNodeAccess(): void {
     $web_user = $this->drupalCreateUser(['access content']);
 
     $expected_node_access = ['view' => TRUE, 'update' => FALSE, 'delete' => FALSE];
@@ -123,7 +123,7 @@ public function testNodeAccess() {
   /**
    * Tests node access with multiple node languages and private nodes.
    */
-  public function testNodeAccessPrivate() {
+  public function testNodeAccessPrivate(): void {
     $web_user = $this->drupalCreateUser(['access content']);
     $expected_node_access = ['view' => TRUE, 'update' => FALSE, 'delete' => FALSE];
     $expected_node_access_no_access = ['view' => FALSE, 'update' => FALSE, 'delete' => FALSE];
@@ -189,7 +189,7 @@ public function testNodeAccessPrivate() {
   /**
    * Tests select queries with a 'node_access' tag and langcode metadata.
    */
-  public function testNodeAccessQueryTag() {
+  public function testNodeAccessQueryTag(): void {
     // Create a normal authenticated user.
     $web_user = $this->drupalCreateUser(['access content']);
 
diff --git a/core/modules/node/tests/src/Kernel/NodeAccessRecordsTest.php b/core/modules/node/tests/src/Kernel/NodeAccessRecordsTest.php
index 6bb64dd4c4b5..c2375cccdd5c 100644
--- a/core/modules/node/tests/src/Kernel/NodeAccessRecordsTest.php
+++ b/core/modules/node/tests/src/Kernel/NodeAccessRecordsTest.php
@@ -24,7 +24,7 @@ class NodeAccessRecordsTest extends NodeAccessTestBase {
   /**
    * Creates a node and tests the creation of node access rules.
    */
-  public function testNodeAccessRecords() {
+  public function testNodeAccessRecords(): void {
     // Create an article node.
     $node1 = $this->drupalCreateNode(['type' => 'article']);
     $this->assertNotEmpty(Node::load($node1->id()), 'Article node created.');
diff --git a/core/modules/node/tests/src/Kernel/NodeAccessTest.php b/core/modules/node/tests/src/Kernel/NodeAccessTest.php
index 6916657b2d69..741c4c20c61f 100644
--- a/core/modules/node/tests/src/Kernel/NodeAccessTest.php
+++ b/core/modules/node/tests/src/Kernel/NodeAccessTest.php
@@ -14,7 +14,7 @@ class NodeAccessTest extends NodeAccessTestBase {
   /**
    * Runs basic tests for node_access function.
    */
-  public function testNodeAccess() {
+  public function testNodeAccess(): void {
     // Ensures user without 'access content' permission can do nothing.
     $web_user1 = $this->drupalCreateUser([
       'create page content',
@@ -118,7 +118,7 @@ public function testNodeAccess() {
   /**
    * Tests operations not supported by node grants.
    */
-  public function testUnsupportedOperation() {
+  public function testUnsupportedOperation(): void {
     $this->enableModules(['node_access_test_empty']);
     $web_user = $this->drupalCreateUser(['access content']);
     $node = $this->drupalCreateNode();
diff --git a/core/modules/node/tests/src/Kernel/NodeBodyFieldStorageTest.php b/core/modules/node/tests/src/Kernel/NodeBodyFieldStorageTest.php
index 883d1ccddb5b..1f120fdc8d7e 100644
--- a/core/modules/node/tests/src/Kernel/NodeBodyFieldStorageTest.php
+++ b/core/modules/node/tests/src/Kernel/NodeBodyFieldStorageTest.php
@@ -45,7 +45,7 @@ protected function setUp(): void {
   /**
    * Tests node body field storage persistence even if there are no instances.
    */
-  public function testFieldOverrides() {
+  public function testFieldOverrides(): void {
     $field_storage = FieldStorageConfig::loadByName('node', 'body');
     $this->assertNotEmpty($field_storage, 'Node body field storage exists.');
     $type = NodeType::create(['name' => 'Ponies', 'type' => 'ponies']);
diff --git a/core/modules/node/tests/src/Kernel/NodeFieldAccessTest.php b/core/modules/node/tests/src/Kernel/NodeFieldAccessTest.php
index 875d00c4ec95..b5ab7850e002 100644
--- a/core/modules/node/tests/src/Kernel/NodeFieldAccessTest.php
+++ b/core/modules/node/tests/src/Kernel/NodeFieldAccessTest.php
@@ -45,7 +45,7 @@ class NodeFieldAccessTest extends EntityKernelTestBase {
   /**
    * Tests permissions on nodes status field.
    */
-  public function testAccessToAdministrativeFields() {
+  public function testAccessToAdministrativeFields(): void {
 
     // Create the page node type with revisions disabled.
     $page = NodeType::create([
diff --git a/core/modules/node/tests/src/Kernel/NodeFieldOverridesTest.php b/core/modules/node/tests/src/Kernel/NodeFieldOverridesTest.php
index 8921a1e0a614..f727c846c8b6 100644
--- a/core/modules/node/tests/src/Kernel/NodeFieldOverridesTest.php
+++ b/core/modules/node/tests/src/Kernel/NodeFieldOverridesTest.php
@@ -44,7 +44,7 @@ protected function setUp(): void {
   /**
    * Tests that field overrides work as expected.
    */
-  public function testFieldOverrides() {
+  public function testFieldOverrides(): void {
     if (!NodeType::load('ponies')) {
       NodeType::create(['name' => 'Ponies', 'type' => 'ponies'])->save();
     }
diff --git a/core/modules/node/tests/src/Kernel/NodeListBuilderTest.php b/core/modules/node/tests/src/Kernel/NodeListBuilderTest.php
index 732106f8f751..82303fe1df5b 100644
--- a/core/modules/node/tests/src/Kernel/NodeListBuilderTest.php
+++ b/core/modules/node/tests/src/Kernel/NodeListBuilderTest.php
@@ -31,7 +31,7 @@ protected function setUp(): void {
   /**
    * Tests that the correct cache contexts are set.
    */
-  public function testCacheContexts() {
+  public function testCacheContexts(): void {
     /** @var \Drupal\Core\Entity\EntityListBuilderInterface $list_builder */
     $list_builder = $this->container->get('entity_type.manager')->getListBuilder('node');
 
diff --git a/core/modules/node/tests/src/Kernel/NodeLoadMultipleTest.php b/core/modules/node/tests/src/Kernel/NodeLoadMultipleTest.php
index 314399ec543a..d68e83c99761 100644
--- a/core/modules/node/tests/src/Kernel/NodeLoadMultipleTest.php
+++ b/core/modules/node/tests/src/Kernel/NodeLoadMultipleTest.php
@@ -32,7 +32,7 @@ protected function setUp(): void {
   /**
    * Creates four nodes and ensures that they are loaded correctly.
    */
-  public function testNodeMultipleLoad() {
+  public function testNodeMultipleLoad(): void {
     $node1 = $this->drupalCreateNode(['type' => 'article', 'promote' => 1]);
     $node2 = $this->drupalCreateNode(['type' => 'article', 'promote' => 1]);
     $node3 = $this->drupalCreateNode(['type' => 'article', 'promote' => 0]);
@@ -59,7 +59,7 @@ public function testNodeMultipleLoad() {
   /**
    * Creates four nodes with not case sensitive fields and load them.
    */
-  public function testNodeMultipleLoadCaseSensitiveFalse() {
+  public function testNodeMultipleLoadCaseSensitiveFalse(): void {
     $field_first_storage = FieldStorageConfig::create([
       'field_name' => 'field_first',
       'entity_type' => 'node',
diff --git a/core/modules/node/tests/src/Kernel/NodeOwnerTest.php b/core/modules/node/tests/src/Kernel/NodeOwnerTest.php
index 9bf39b19c20d..9bf8f9d2c963 100644
--- a/core/modules/node/tests/src/Kernel/NodeOwnerTest.php
+++ b/core/modules/node/tests/src/Kernel/NodeOwnerTest.php
@@ -47,7 +47,7 @@ protected function setUp(): void {
   /**
    * Tests node owner functionality.
    */
-  public function testOwner() {
+  public function testOwner(): void {
     $user = $this->createUser();
 
     $container = \Drupal::getContainer();
@@ -84,7 +84,7 @@ public function testOwner() {
   /**
    * Tests an unsaved node owner.
    */
-  public function testUnsavedNodeOwner() {
+  public function testUnsavedNodeOwner(): void {
     $user = User::create([
       'name' => 'foo',
     ]);
diff --git a/core/modules/node/tests/src/Kernel/NodeTokenReplaceTest.php b/core/modules/node/tests/src/Kernel/NodeTokenReplaceTest.php
index 0a5380ec6106..de91601f6268 100644
--- a/core/modules/node/tests/src/Kernel/NodeTokenReplaceTest.php
+++ b/core/modules/node/tests/src/Kernel/NodeTokenReplaceTest.php
@@ -39,7 +39,7 @@ protected function setUp(): void {
   /**
    * Creates a node, then tests the tokens generated from it.
    */
-  public function testNodeTokenReplacement() {
+  public function testNodeTokenReplacement(): void {
     $url_options = [
       'absolute' => TRUE,
       'language' => $this->interfaceLanguage,
diff --git a/core/modules/node/tests/src/Kernel/NodeValidationTest.php b/core/modules/node/tests/src/Kernel/NodeValidationTest.php
index 8394f06221ec..634d692169cf 100644
--- a/core/modules/node/tests/src/Kernel/NodeValidationTest.php
+++ b/core/modules/node/tests/src/Kernel/NodeValidationTest.php
@@ -36,7 +36,7 @@ protected function setUp(): void {
   /**
    * Tests the node validation constraints.
    */
-  public function testValidation() {
+  public function testValidation(): void {
     $this->createUser();
     $node = Node::create(['type' => 'page', 'title' => 'test', 'uid' => 1]);
     $violations = $node->validate();
diff --git a/core/modules/node/tests/src/Kernel/NodeViewBuilderTest.php b/core/modules/node/tests/src/Kernel/NodeViewBuilderTest.php
index fffbf98c3245..b149880bf03f 100644
--- a/core/modules/node/tests/src/Kernel/NodeViewBuilderTest.php
+++ b/core/modules/node/tests/src/Kernel/NodeViewBuilderTest.php
@@ -71,7 +71,7 @@ protected function setUp(): void {
    * @covers ::renderLinks
    * @covers ::buildLinks
    */
-  public function testPendingRevisionLinks() {
+  public function testPendingRevisionLinks(): void {
     $account = User::create([
       'name' => $this->randomString(),
     ]);
diff --git a/core/modules/node/tests/src/Kernel/SummaryLengthTest.php b/core/modules/node/tests/src/Kernel/SummaryLengthTest.php
index 423d1ebd87d8..7ea6c8029cd3 100644
--- a/core/modules/node/tests/src/Kernel/SummaryLengthTest.php
+++ b/core/modules/node/tests/src/Kernel/SummaryLengthTest.php
@@ -76,7 +76,7 @@ protected function setUp(): void {
   /**
    * Tests the node summary length functionality.
    */
-  public function testSummaryLength() {
+  public function testSummaryLength(): void {
     /** @var \Drupal\Core\Render\RendererInterface $renderer */
     $renderer = $this->container->get('renderer');
 
diff --git a/core/modules/node/tests/src/Kernel/Views/ArgumentNodeRevisionIdTest.php b/core/modules/node/tests/src/Kernel/Views/ArgumentNodeRevisionIdTest.php
index fcac6ca2091c..3be3da3e2dcf 100644
--- a/core/modules/node/tests/src/Kernel/Views/ArgumentNodeRevisionIdTest.php
+++ b/core/modules/node/tests/src/Kernel/Views/ArgumentNodeRevisionIdTest.php
@@ -43,7 +43,7 @@ protected function setUp($import_test_views = TRUE): void {
   /**
    * Tests the node revision id argument via the node_vid handler.
    */
-  public function testNodeRevisionRelationship() {
+  public function testNodeRevisionRelationship(): void {
     NodeType::create(['type' => 'page', 'name' => 'page'])->save();
     $node = Node::create(['type' => 'page', 'title' => 'test1', 'uid' => 1]);
     $node->save();
diff --git a/core/modules/node/tests/src/Kernel/Views/ArgumentUidRevisionTest.php b/core/modules/node/tests/src/Kernel/Views/ArgumentUidRevisionTest.php
index 1a697482a0b4..4cb435dd1bb2 100644
--- a/core/modules/node/tests/src/Kernel/Views/ArgumentUidRevisionTest.php
+++ b/core/modules/node/tests/src/Kernel/Views/ArgumentUidRevisionTest.php
@@ -51,7 +51,7 @@ protected function setUp($import_test_views = TRUE): void {
   /**
    * Tests the node_uid_revision argument.
    */
-  public function testArgument() {
+  public function testArgument(): void {
     $expected_result = [];
 
     $author = $this->createUser();
diff --git a/core/modules/node/tests/src/Kernel/Views/FilterUidRevisionTest.php b/core/modules/node/tests/src/Kernel/Views/FilterUidRevisionTest.php
index 8dc714302915..364c9c9bb76d 100644
--- a/core/modules/node/tests/src/Kernel/Views/FilterUidRevisionTest.php
+++ b/core/modules/node/tests/src/Kernel/Views/FilterUidRevisionTest.php
@@ -44,7 +44,7 @@ class FilterUidRevisionTest extends KernelTestBase {
   /**
    * Tests the node_uid_revision filter.
    */
-  public function testFilter() {
+  public function testFilter(): void {
     $this->installEntitySchema('user');
     $this->installEntitySchema('node');
     $this->installSchema('node', ['node_access']);
diff --git a/core/modules/node/tests/src/Kernel/Views/NidArgumentTest.php b/core/modules/node/tests/src/Kernel/Views/NidArgumentTest.php
index 5f541ae6fa1a..a421341ffc50 100644
--- a/core/modules/node/tests/src/Kernel/Views/NidArgumentTest.php
+++ b/core/modules/node/tests/src/Kernel/Views/NidArgumentTest.php
@@ -52,7 +52,7 @@ protected function setUp($import_test_views = TRUE): void {
   /**
    * Tests the nid argument.
    */
-  public function testNidArgument() {
+  public function testNidArgument(): void {
     $view = Views::getView('test_nid_argument');
     $view->setDisplay();
 
diff --git a/core/modules/node/tests/src/Kernel/Views/NodeViewsFieldAccessTest.php b/core/modules/node/tests/src/Kernel/Views/NodeViewsFieldAccessTest.php
index 376ec4897eb3..9852db8ccb05 100644
--- a/core/modules/node/tests/src/Kernel/Views/NodeViewsFieldAccessTest.php
+++ b/core/modules/node/tests/src/Kernel/Views/NodeViewsFieldAccessTest.php
@@ -44,7 +44,7 @@ protected function setUp($import_test_views = TRUE): void {
   /**
    * Check access for node fields.
    */
-  public function testNodeFields() {
+  public function testNodeFields(): void {
     $user = User::create([
       'name' => 'test user',
     ]);
diff --git a/core/modules/node/tests/src/Kernel/Views/RevisionCreateTimestampTest.php b/core/modules/node/tests/src/Kernel/Views/RevisionCreateTimestampTest.php
index a622e951020b..b9004855b57f 100644
--- a/core/modules/node/tests/src/Kernel/Views/RevisionCreateTimestampTest.php
+++ b/core/modules/node/tests/src/Kernel/Views/RevisionCreateTimestampTest.php
@@ -42,7 +42,7 @@ protected function setUp($import_test_views = TRUE): void {
     }
   }
 
-  public function testRevisionCreateTimestampView() {
+  public function testRevisionCreateTimestampView(): void {
     $node_type = NodeType::create([
       'type' => 'article',
       'name' => 'Article',
diff --git a/core/modules/node/tests/src/Kernel/Views/RevisionRelationshipsTest.php b/core/modules/node/tests/src/Kernel/Views/RevisionRelationshipsTest.php
index e4f42346e96c..4f2610eba212 100644
--- a/core/modules/node/tests/src/Kernel/Views/RevisionRelationshipsTest.php
+++ b/core/modules/node/tests/src/Kernel/Views/RevisionRelationshipsTest.php
@@ -56,7 +56,7 @@ protected function setUp($import_test_views = TRUE): void {
   /**
    * Create a node with revision and rest result count for both views.
    */
-  public function testNodeRevisionRelationship() {
+  public function testNodeRevisionRelationship(): void {
     $type = NodeType::create(['type' => 'page', 'name' => 'page']);
     $type->save();
     $node = Node::create(['type' => 'page', 'title' => 'test', 'uid' => 1]);
diff --git a/core/modules/node/tests/src/Kernel/Views/RevisionUidTest.php b/core/modules/node/tests/src/Kernel/Views/RevisionUidTest.php
index fd8d97a693a5..806b90b9f107 100644
--- a/core/modules/node/tests/src/Kernel/Views/RevisionUidTest.php
+++ b/core/modules/node/tests/src/Kernel/Views/RevisionUidTest.php
@@ -70,7 +70,7 @@ protected function setUp($import_test_views = TRUE): void {
   /**
    * Tests the node_revision_uid relationship.
    */
-  public function testRevisionUid() {
+  public function testRevisionUid(): void {
     $primary_author = $this->createUser();
     $secondary_author = $this->createUser();
 
diff --git a/core/modules/node/tests/src/Unit/NodeOperationAccessTest.php b/core/modules/node/tests/src/Unit/NodeOperationAccessTest.php
index 6e094dfa505a..1b7f526fe2e1 100644
--- a/core/modules/node/tests/src/Unit/NodeOperationAccessTest.php
+++ b/core/modules/node/tests/src/Unit/NodeOperationAccessTest.php
@@ -57,7 +57,7 @@ protected function setUp(): void {
    *
    * @dataProvider providerTestRevisionOperations
    */
-  public function testRevisionOperations($operation, array $hasPermissionMap, $assertAccess, $isDefaultRevision = NULL) {
+  public function testRevisionOperations($operation, array $hasPermissionMap, $assertAccess, $isDefaultRevision = NULL): void {
     $account = $this->createMock(AccountInterface::class);
     $account->method('hasPermission')
       ->willReturnMap($hasPermissionMap);
diff --git a/core/modules/node/tests/src/Unit/PageCache/DenyNodePreviewTest.php b/core/modules/node/tests/src/Unit/PageCache/DenyNodePreviewTest.php
index 9234489298ee..8ac5bd16cc57 100644
--- a/core/modules/node/tests/src/Unit/PageCache/DenyNodePreviewTest.php
+++ b/core/modules/node/tests/src/Unit/PageCache/DenyNodePreviewTest.php
@@ -62,7 +62,7 @@ protected function setUp(): void {
    * @dataProvider providerPrivateImageStyleDownloadPolicy
    * @covers ::check
    */
-  public function testPrivateImageStyleDownloadPolicy($expected_result, $route_name) {
+  public function testPrivateImageStyleDownloadPolicy($expected_result, $route_name): void {
     $this->routeMatch->expects($this->once())
       ->method('getRouteName')
       ->willReturn($route_name);
diff --git a/core/modules/node/tests/src/Unit/Plugin/views/field/NodeBulkFormTest.php b/core/modules/node/tests/src/Unit/Plugin/views/field/NodeBulkFormTest.php
index 517013ad8b5f..7697ac4c56b3 100644
--- a/core/modules/node/tests/src/Unit/Plugin/views/field/NodeBulkFormTest.php
+++ b/core/modules/node/tests/src/Unit/Plugin/views/field/NodeBulkFormTest.php
@@ -29,7 +29,7 @@ protected function tearDown(): void {
   /**
    * Tests the constructor assignment of actions.
    */
-  public function testConstructor() {
+  public function testConstructor(): void {
     $actions = [];
 
     for ($i = 1; $i <= 2; $i++) {
diff --git a/core/modules/options/tests/src/Functional/OptionsFieldUITest.php b/core/modules/options/tests/src/Functional/OptionsFieldUITest.php
index d4c3c834c40f..c351b77f82c1 100644
--- a/core/modules/options/tests/src/Functional/OptionsFieldUITest.php
+++ b/core/modules/options/tests/src/Functional/OptionsFieldUITest.php
@@ -91,7 +91,7 @@ protected function setUp(): void {
   /**
    * Options (integer) : test 'allowed values' input.
    */
-  public function testOptionsAllowedValuesInteger() {
+  public function testOptionsAllowedValuesInteger(): void {
     $this->fieldName = 'field_options_integer';
     $this->createOptionsField('list_integer');
     $page = $this->getSession()->getPage();
@@ -163,7 +163,7 @@ public function testOptionsAllowedValuesInteger() {
   /**
    * Options (float) : test 'allowed values' input.
    */
-  public function testOptionsAllowedValuesFloat() {
+  public function testOptionsAllowedValuesFloat(): void {
     $this->fieldName = 'field_options_float';
     $this->createOptionsField('list_float');
     $page = $this->getSession()->getPage();
@@ -252,7 +252,7 @@ public function testOptionsAllowedValuesFloat() {
   /**
    * Options (text) : test 'allowed values' input.
    */
-  public function testOptionsAllowedValuesText() {
+  public function testOptionsAllowedValuesText(): void {
     $this->fieldName = 'field_options_text';
     $this->createOptionsField('list_string');
     $page = $this->getSession()->getPage();
@@ -393,7 +393,7 @@ public function assertAllowedValuesInput(array $input, $result, string $message)
   /**
    * Tests normal and key formatter display on node display.
    */
-  public function testNodeDisplay() {
+  public function testNodeDisplay(): void {
     $this->fieldName = $this->randomMachineName();
     $this->createOptionsField('list_integer');
     $node = $this->drupalCreateNode(['type' => $this->type]);
@@ -445,7 +445,7 @@ public function testNodeDisplay() {
   /**
    * Confirms the allowed value list is a required field.
    */
-  public function testRequiredPropertyForAllowedValuesList() {
+  public function testRequiredPropertyForAllowedValuesList(): void {
     $field_types = [
       'list_float',
       'list_string',
diff --git a/core/modules/options/tests/src/Functional/OptionsFloatFieldImportTest.php b/core/modules/options/tests/src/Functional/OptionsFloatFieldImportTest.php
index d4485b3670f0..4d77d65f9c50 100644
--- a/core/modules/options/tests/src/Functional/OptionsFloatFieldImportTest.php
+++ b/core/modules/options/tests/src/Functional/OptionsFloatFieldImportTest.php
@@ -57,7 +57,7 @@ protected function setUp(): void {
   /**
    * Tests that importing list_float fields works.
    */
-  public function testImport() {
+  public function testImport(): void {
     $field_name = 'field_options_float';
     $type = 'options_install_test';
 
diff --git a/core/modules/options/tests/src/Functional/OptionsSelectDynamicValuesTest.php b/core/modules/options/tests/src/Functional/OptionsSelectDynamicValuesTest.php
index 93c35c773420..e27e6075bb09 100644
--- a/core/modules/options/tests/src/Functional/OptionsSelectDynamicValuesTest.php
+++ b/core/modules/options/tests/src/Functional/OptionsSelectDynamicValuesTest.php
@@ -19,7 +19,7 @@ class OptionsSelectDynamicValuesTest extends OptionsDynamicValuesTestBase {
   /**
    * Tests the 'options_select' widget (single select).
    */
-  public function testSelectListDynamic() {
+  public function testSelectListDynamic(): void {
     // Create an entity.
     $this->entity->save();
 
diff --git a/core/modules/options/tests/src/Functional/OptionsWidgetsTest.php b/core/modules/options/tests/src/Functional/OptionsWidgetsTest.php
index 32caa069a3cc..d5daf17c248c 100644
--- a/core/modules/options/tests/src/Functional/OptionsWidgetsTest.php
+++ b/core/modules/options/tests/src/Functional/OptionsWidgetsTest.php
@@ -127,7 +127,7 @@ protected function setUp(): void {
   /**
    * Tests the 'options_buttons' widget (single select).
    */
-  public function testRadioButtons() {
+  public function testRadioButtons(): void {
     // Create an instance of the 'single value' field.
     $field = FieldConfig::create([
       'field_storage' => $this->card1,
@@ -185,7 +185,7 @@ public function testRadioButtons() {
   /**
    * Tests the 'options_buttons' widget (multiple select).
    */
-  public function testCheckBoxes() {
+  public function testCheckBoxes(): void {
     // Create an instance of the 'multiple values' field.
     $field = FieldConfig::create([
       'field_storage' => $this->card2,
@@ -275,7 +275,7 @@ public function testCheckBoxes() {
   /**
    * Tests the 'options_select' widget (single select).
    */
-  public function testSelectListSingle() {
+  public function testSelectListSingle(): void {
     // Create an instance of the 'single value' field.
     $field = FieldConfig::create([
       'field_storage' => $this->card1,
@@ -380,7 +380,7 @@ public function testSelectListSingle() {
   /**
    * Tests the '#required_error' attribute for the select list.
    */
-  public function testSelectListRequiredErrorAttribute() {
+  public function testSelectListRequiredErrorAttribute(): void {
     // Enable form alter hook.
     \Drupal::state()->set('options_test.form_alter_enable', TRUE);
     // Create an instance of the 'single value' field.
@@ -418,7 +418,7 @@ public function testSelectListRequiredErrorAttribute() {
   /**
    * Tests the 'options_select' widget (multiple select).
    */
-  public function testSelectListMultiple() {
+  public function testSelectListMultiple(): void {
     // Create an instance of the 'multiple values' field.
     $field = FieldConfig::create([
       'field_storage' => $this->card2,
@@ -543,7 +543,7 @@ public function testSelectListMultiple() {
   /**
    * Tests the 'options_select' widget (float values).
    */
-  public function testSelectListFloat() {
+  public function testSelectListFloat(): void {
 
     // Create an instance of the 'float value' field.
     $field = FieldConfig::create([
@@ -590,7 +590,7 @@ public function testSelectListFloat() {
   /**
    * Tests the 'options_select' and 'options_button' widget for empty value.
    */
-  public function testEmptyValue() {
+  public function testEmptyValue(): void {
     // Create an instance of the 'single value' field.
     $field = FieldConfig::create([
       'field_storage' => $this->card1,
@@ -642,7 +642,7 @@ public function testEmptyValue() {
    *
    * @see options_test_options_list_alter()
    */
-  public function testOptionsListAlter() {
+  public function testOptionsListAlter(): void {
     $field1 = FieldConfig::create([
       'field_storage' => $this->card1,
       'bundle' => 'entity_test',
diff --git a/core/modules/options/tests/src/FunctionalJavascript/OptionsFieldUITest.php b/core/modules/options/tests/src/FunctionalJavascript/OptionsFieldUITest.php
index 0e09410257ef..0e452344c44f 100644
--- a/core/modules/options/tests/src/FunctionalJavascript/OptionsFieldUITest.php
+++ b/core/modules/options/tests/src/FunctionalJavascript/OptionsFieldUITest.php
@@ -85,7 +85,7 @@ protected function setUp(): void {
    *
    * @dataProvider providerTestOptionsAllowedValues
    */
-  public function testOptionsAllowedValues($option_type, $options, $is_string_option, string $add_row_method) {
+  public function testOptionsAllowedValues($option_type, $options, $is_string_option, string $add_row_method): void {
     $assert = $this->assertSession();
     $this->fieldName = 'field_options_text';
     $this->createOptionsField($option_type);
@@ -213,7 +213,7 @@ public function testOptionsAllowedValues($option_type, $options, $is_string_opti
   /**
    * Tests that the allowed options are available to the default value widget.
    */
-  public function testDefaultValueOptions() {
+  public function testDefaultValueOptions(): void {
     $page = $this->getSession()->getPage();
     $assert_session = $this->assertSession();
     $bundle_path = 'admin/structure/types/manage/' . $this->type;
@@ -378,7 +378,7 @@ public static function providerTestOptionsAllowedValues() {
   /**
    * Tests `list_string` machine name with special characters.
    */
-  public function testMachineNameSpecialCharacters() {
+  public function testMachineNameSpecialCharacters(): void {
     $this->fieldName = 'field_options_text';
     $this->createOptionsField('list_string');
     $this->drupalGet($this->adminPath);
diff --git a/core/modules/options/tests/src/Kernel/OptionsFieldTest.php b/core/modules/options/tests/src/Kernel/OptionsFieldTest.php
index 49124334dbfe..ad7eee65fbf9 100644
--- a/core/modules/options/tests/src/Kernel/OptionsFieldTest.php
+++ b/core/modules/options/tests/src/Kernel/OptionsFieldTest.php
@@ -26,7 +26,7 @@ class OptionsFieldTest extends OptionsFieldUnitTestBase {
   /**
    * Tests that allowed values can be updated.
    */
-  public function testUpdateAllowedValues() {
+  public function testUpdateAllowedValues(): void {
     // All three options appear.
     $entity = EntityTest::create();
     $form = \Drupal::service('entity.form_builder')->getForm($entity);
@@ -103,7 +103,7 @@ public function testUpdateAllowedValues() {
   /**
    * Tests that ::generateSampleItems does not fail with empty allowed values.
    */
-  public function testGenerateSampleItemsWithNoAllowedValues() {
+  public function testGenerateSampleItemsWithNoAllowedValues(): void {
     $this->fieldStorage->setSetting('allowed_values', [])->save();
     $entity = EntityTest::create();
     $value = $entity->{$this->fieldName}->generateSampleItems();
diff --git a/core/modules/options/tests/src/Kernel/OptionsFormattersTest.php b/core/modules/options/tests/src/Kernel/OptionsFormattersTest.php
index 7953c9906251..d6517ae40566 100644
--- a/core/modules/options/tests/src/Kernel/OptionsFormattersTest.php
+++ b/core/modules/options/tests/src/Kernel/OptionsFormattersTest.php
@@ -25,7 +25,7 @@ protected function setUp(): void {
   /**
    * Tests the formatters.
    */
-  public function testFormatter() {
+  public function testFormatter(): void {
     $entity = EntityTest::create();
     $entity->{$this->fieldName}->value = 1;
 
diff --git a/core/modules/options/tests/src/Kernel/Views/FileViewsDataTest.php b/core/modules/options/tests/src/Kernel/Views/FileViewsDataTest.php
index 558266223354..2cb7f4906f0b 100644
--- a/core/modules/options/tests/src/Kernel/Views/FileViewsDataTest.php
+++ b/core/modules/options/tests/src/Kernel/Views/FileViewsDataTest.php
@@ -44,7 +44,7 @@ protected function setUp($import_test_views = TRUE): void {
    * @see file_field_views_data()
    * @see file_field_views_data_views_data_alter()
    */
-  public function testRelationshipViewsData() {
+  public function testRelationshipViewsData(): void {
     // Create file field to entity_test.
     FieldStorageConfig::create([
       'entity_type' => 'entity_test',
diff --git a/core/modules/options/tests/src/Kernel/Views/OptionsListArgumentTest.php b/core/modules/options/tests/src/Kernel/Views/OptionsListArgumentTest.php
index 44c5e85f2ec5..88e7d88cbf12 100644
--- a/core/modules/options/tests/src/Kernel/Views/OptionsListArgumentTest.php
+++ b/core/modules/options/tests/src/Kernel/Views/OptionsListArgumentTest.php
@@ -24,7 +24,7 @@ class OptionsListArgumentTest extends OptionsTestBase {
   /**
    * Tests the options field argument.
    */
-  public function testViewsTestOptionsListArgument() {
+  public function testViewsTestOptionsListArgument(): void {
     $view = Views::getView('test_options_list_argument_numeric');
     $this->executeView($view, [1]);
 
diff --git a/core/modules/options/tests/src/Kernel/Views/OptionsListFilterTest.php b/core/modules/options/tests/src/Kernel/Views/OptionsListFilterTest.php
index 45053b0b6fee..2bbbddb74029 100644
--- a/core/modules/options/tests/src/Kernel/Views/OptionsListFilterTest.php
+++ b/core/modules/options/tests/src/Kernel/Views/OptionsListFilterTest.php
@@ -24,7 +24,7 @@ class OptionsListFilterTest extends OptionsTestBase {
   /**
    * Tests options list field filter.
    */
-  public function testViewsTestOptionsListFilter() {
+  public function testViewsTestOptionsListFilter(): void {
     $view = Views::getView('test_options_list_filter');
     $this->executeView($view);
 
@@ -40,7 +40,7 @@ public function testViewsTestOptionsListFilter() {
   /**
    * Tests options list field filter when grouped.
    */
-  public function testViewsTestOptionsListGroupedFilter() {
+  public function testViewsTestOptionsListGroupedFilter(): void {
     $view = Views::getView('test_options_list_filter');
 
     $filters = [
diff --git a/core/modules/options/tests/src/Kernel/Views/ViewsDataTest.php b/core/modules/options/tests/src/Kernel/Views/ViewsDataTest.php
index 6036d83cff61..f1eb578fe33d 100644
--- a/core/modules/options/tests/src/Kernel/Views/ViewsDataTest.php
+++ b/core/modules/options/tests/src/Kernel/Views/ViewsDataTest.php
@@ -66,7 +66,7 @@ protected function setUp($import_test_views = TRUE): void {
   /**
    * Tests the option module's implementation of hook_field_views_data().
    */
-  public function testOptionsFieldViewsData() {
+  public function testOptionsFieldViewsData(): void {
     $field_data = \Drupal::service('views.views_data')->get('entity_test__test_options');
 
     // Check that the options module has properly overridden default views data.
diff --git a/core/modules/page_cache/tests/src/Functional/PageCacheTagsIntegrationTest.php b/core/modules/page_cache/tests/src/Functional/PageCacheTagsIntegrationTest.php
index fdc7fe194679..de0ca9f2f061 100644
--- a/core/modules/page_cache/tests/src/Functional/PageCacheTagsIntegrationTest.php
+++ b/core/modules/page_cache/tests/src/Functional/PageCacheTagsIntegrationTest.php
@@ -62,7 +62,7 @@ protected function setUp(): void {
   /**
    * Tests that cache tags are properly bubbled up to the page level.
    */
-  public function testPageCacheTags() {
+  public function testPageCacheTags(): void {
     $config = $this->config('language.types');
     $config->set('configurable', [LanguageInterface::TYPE_INTERFACE, LanguageInterface::TYPE_CONTENT]);
     $config->set('negotiation.language_content.enabled', [
diff --git a/core/modules/page_cache/tests/src/Functional/PageCacheTest.php b/core/modules/page_cache/tests/src/Functional/PageCacheTest.php
index f37c91af975f..c26b5d76012c 100644
--- a/core/modules/page_cache/tests/src/Functional/PageCacheTest.php
+++ b/core/modules/page_cache/tests/src/Functional/PageCacheTest.php
@@ -53,7 +53,7 @@ protected function setUp(): void {
    * Since tag based invalidation works, we know that our tag properly
    * persisted.
    */
-  public function testPageCacheTags() {
+  public function testPageCacheTags(): void {
     $this->enablePageCaching();
 
     $path = 'system-test/cache_tags_page';
@@ -85,7 +85,7 @@ public function testPageCacheTags() {
   /**
    * Tests that the page cache doesn't depend on cacheability headers.
    */
-  public function testPageCacheTagsIndependentFromCacheabilityHeaders() {
+  public function testPageCacheTagsIndependentFromCacheabilityHeaders(): void {
     // Disable the cacheability headers.
     $this->setContainerParameter('http.response.debug_cacheability_headers', FALSE);
     $this->rebuildContainer();
@@ -122,7 +122,7 @@ public function testPageCacheTagsIndependentFromCacheabilityHeaders() {
    *
    * The request formats are specified via a query parameter.
    */
-  public function testQueryParameterFormatRequests() {
+  public function testQueryParameterFormatRequests(): void {
     $this->enablePageCaching();
 
     $accept_header_cache_url = Url::fromRoute('system_test.page_cache_accept_header');
@@ -160,7 +160,7 @@ public function testQueryParameterFormatRequests() {
   /**
    * Tests support of requests with If-Modified-Since and If-None-Match headers.
    */
-  public function testConditionalRequests() {
+  public function testConditionalRequests(): void {
     $this->enablePageCaching();
 
     // Fill the cache.
@@ -221,7 +221,7 @@ public function testConditionalRequests() {
   /**
    * Tests cache headers.
    */
-  public function testPageCache() {
+  public function testPageCache(): void {
     $this->enablePageCaching();
 
     // Fill the cache.
@@ -279,7 +279,7 @@ public function testPageCache() {
    * This test verifies that, and it verifies that it does not happen for other
    * roles.
    */
-  public function testPageCacheAnonymousRolePermissions() {
+  public function testPageCacheAnonymousRolePermissions(): void {
     $this->enablePageCaching();
 
     $content_url = Url::fromRoute('system_test.permission_dependent_content');
@@ -329,7 +329,7 @@ public function testPageCacheAnonymousRolePermissions() {
   /**
    * Tests the 4xx-response cache tag is added and invalidated.
    */
-  public function testPageCacheAnonymous403404() {
+  public function testPageCacheAnonymous403404(): void {
     $admin_url = Url::fromRoute('system.admin');
     $invalid_url = 'foo/does_not_exist';
     $tests = [
@@ -405,7 +405,7 @@ public function testPageCacheAnonymous403404() {
   /**
    * Tests the omit_vary_cookie setting.
    */
-  public function testPageCacheWithoutVaryCookie() {
+  public function testPageCacheWithoutVaryCookie(): void {
     $this->enablePageCaching();
 
     $settings['settings']['omit_vary_cookie'] = (object) [
@@ -430,7 +430,7 @@ public function testPageCacheWithoutVaryCookie() {
   /**
    * Tests the setting of forms to be immutable.
    */
-  public function testFormImmutability() {
+  public function testFormImmutability(): void {
     // Install the module that provides the test form.
     $this->container->get('module_installer')
       ->install(['page_cache_form_test']);
@@ -461,7 +461,7 @@ public function testFormImmutability() {
    * Response object versus returning a Response object that implements the
    * CacheableResponseInterface.
    */
-  public function testCacheableResponseResponses() {
+  public function testCacheableResponseResponses(): void {
     $this->enablePageCaching();
 
     // GET a URL, which would be marked as a cache miss if it were cacheable.
@@ -507,7 +507,7 @@ public function testCacheableResponseResponses() {
   /**
    * Tests that HEAD requests are treated the same as GET requests.
    */
-  public function testHead() {
+  public function testHead(): void {
     /** @var \GuzzleHttp\ClientInterface $client */
     $client = $this->getSession()->getDriver()->getClient()->getClient();
 
@@ -537,7 +537,7 @@ public function testHead() {
   /**
    * Tests a cacheable response with custom cache control.
    */
-  public function testCacheableWithCustomCacheControl() {
+  public function testCacheableWithCustomCacheControl(): void {
     $this->enablePageCaching();
 
     $this->drupalGet('/system-test/custom-cache-control');
@@ -566,7 +566,7 @@ public function testCacheabilityOfRedirectResponses(): void {
   /**
    * Tests that URLs are cached in a not normalized form.
    */
-  public function testNoUrlNormalization() {
+  public function testNoUrlNormalization(): void {
     // Use absolute URLs to avoid any processing.
     $url = Url::fromRoute('<front>')->setAbsolute()->toString();
 
diff --git a/core/modules/path/tests/src/Functional/PathAdminTest.php b/core/modules/path/tests/src/Functional/PathAdminTest.php
index dc2305fc1b95..119c67034879 100644
--- a/core/modules/path/tests/src/Functional/PathAdminTest.php
+++ b/core/modules/path/tests/src/Functional/PathAdminTest.php
@@ -42,7 +42,7 @@ protected function setUp(): void {
   /**
    * Tests the filtering aspect of the Path UI.
    */
-  public function testPathFiltering() {
+  public function testPathFiltering(): void {
     // Create test nodes.
     $node1 = $this->drupalCreateNode();
     $node2 = $this->drupalCreateNode();
diff --git a/core/modules/path/tests/src/Functional/PathAliasTest.php b/core/modules/path/tests/src/Functional/PathAliasTest.php
index 393b6ea5dd30..57f2c09a61a5 100644
--- a/core/modules/path/tests/src/Functional/PathAliasTest.php
+++ b/core/modules/path/tests/src/Functional/PathAliasTest.php
@@ -55,7 +55,7 @@ protected function setUp(): void {
   /**
    * Tests the path cache.
    */
-  public function testPathCache() {
+  public function testPathCache(): void {
     // Create test node.
     $node1 = $this->drupalCreateNode();
 
@@ -89,7 +89,7 @@ public function testPathCache() {
   /**
    * Tests alias functionality through the admin interfaces.
    */
-  public function testAdminAlias() {
+  public function testAdminAlias(): void {
     // Create test node.
     $node1 = $this->drupalCreateNode();
 
@@ -258,7 +258,7 @@ public function testAdminAlias() {
   /**
    * Tests alias functionality through the node interfaces.
    */
-  public function testNodeAlias() {
+  public function testNodeAlias(): void {
     // Create test node.
     $node1 = $this->drupalCreateNode();
 
@@ -422,7 +422,7 @@ public function getPID($alias) {
   /**
    * Tests that duplicate aliases fail validation.
    */
-  public function testDuplicateNodeAlias() {
+  public function testDuplicateNodeAlias(): void {
     // Create one node with a random alias.
     $node_one = $this->drupalCreateNode();
     $edit = [];
diff --git a/core/modules/path/tests/src/Functional/PathContentModerationTest.php b/core/modules/path/tests/src/Functional/PathContentModerationTest.php
index 7627592b78f9..5c33a44a76dc 100644
--- a/core/modules/path/tests/src/Functional/PathContentModerationTest.php
+++ b/core/modules/path/tests/src/Functional/PathContentModerationTest.php
@@ -92,7 +92,7 @@ protected function setUp(): void {
   /**
    * Tests node path aliases on a moderated content type.
    */
-  public function testNodePathAlias() {
+  public function testNodePathAlias(): void {
     // Create some moderated content with a path alias.
     $this->drupalGet('node/add/moderated');
     $this->assertSession()->fieldValueEquals('path[0][alias]', '');
@@ -157,7 +157,7 @@ public function testNodePathAlias() {
   /**
    * Tests that translated and moderated node can get new draft revision.
    */
-  public function testTranslatedModeratedNodeAlias() {
+  public function testTranslatedModeratedNodeAlias(): void {
     // Create one node with a random alias.
     $default_node = $this->drupalCreateNode([
       'type' => 'moderated',
diff --git a/core/modules/path/tests/src/Functional/PathLanguageTest.php b/core/modules/path/tests/src/Functional/PathLanguageTest.php
index 259f14b0f2eb..eaeb08a834f9 100644
--- a/core/modules/path/tests/src/Functional/PathLanguageTest.php
+++ b/core/modules/path/tests/src/Functional/PathLanguageTest.php
@@ -81,7 +81,7 @@ protected function setUp(): void {
   /**
    * Tests alias functionality through the admin interfaces.
    */
-  public function testAliasTranslation() {
+  public function testAliasTranslation(): void {
     $node_storage = $this->container->get('entity_type.manager')->getStorage('node');
     $english_node = $this->drupalCreateNode(['type' => 'page', 'langcode' => 'en']);
     $english_alias = $this->randomMachineName();
diff --git a/core/modules/path/tests/src/Functional/PathLanguageUiTest.php b/core/modules/path/tests/src/Functional/PathLanguageUiTest.php
index 9a2d8040aa23..2310a71c401c 100644
--- a/core/modules/path/tests/src/Functional/PathLanguageUiTest.php
+++ b/core/modules/path/tests/src/Functional/PathLanguageUiTest.php
@@ -58,7 +58,7 @@ protected function setUp(): void {
   /**
    * Tests that a language-neutral URL alias works.
    */
-  public function testLanguageNeutralUrl() {
+  public function testLanguageNeutralUrl(): void {
     $name = $this->randomMachineName(8);
     $edit = [];
     $edit['path[0][value]'] = '/admin/config/search/path';
@@ -73,7 +73,7 @@ public function testLanguageNeutralUrl() {
   /**
    * Tests that a default language URL alias works.
    */
-  public function testDefaultLanguageUrl() {
+  public function testDefaultLanguageUrl(): void {
     $name = $this->randomMachineName(8);
     $edit = [];
     $edit['path[0][value]'] = '/admin/config/search/path';
@@ -89,7 +89,7 @@ public function testDefaultLanguageUrl() {
   /**
    * Tests that a non-default language URL alias works.
    */
-  public function testNonDefaultUrl() {
+  public function testNonDefaultUrl(): void {
     $name = $this->randomMachineName(8);
     $edit = [];
     $edit['path[0][value]'] = '/admin/config/search/path';
@@ -105,7 +105,7 @@ public function testNonDefaultUrl() {
   /**
    * Tests language unspecific aliases are shown and saved in the node form.
    */
-  public function testNotSpecifiedNode() {
+  public function testNotSpecifiedNode(): void {
     // Create test node.
     $node = $this->drupalCreateNode();
 
diff --git a/core/modules/path/tests/src/Functional/PathMediaFormTest.php b/core/modules/path/tests/src/Functional/PathMediaFormTest.php
index f19700c769d6..e86ca9c86225 100644
--- a/core/modules/path/tests/src/Functional/PathMediaFormTest.php
+++ b/core/modules/path/tests/src/Functional/PathMediaFormTest.php
@@ -37,7 +37,7 @@ protected function setUp(): void {
   /**
    * Tests the media form UI.
    */
-  public function testMediaForm() {
+  public function testMediaForm(): void {
     $assert_session = $this->assertSession();
 
     // Create media type.
diff --git a/core/modules/path/tests/src/Functional/PathNodeFormTest.php b/core/modules/path/tests/src/Functional/PathNodeFormTest.php
index 6436a31daa40..895cf4b8251e 100644
--- a/core/modules/path/tests/src/Functional/PathNodeFormTest.php
+++ b/core/modules/path/tests/src/Functional/PathNodeFormTest.php
@@ -40,7 +40,7 @@ protected function setUp(): void {
   /**
    * Tests the node form ui.
    */
-  public function testNodeForm() {
+  public function testNodeForm(): void {
     $assert_session = $this->assertSession();
 
     $this->drupalGet('node/add/page');
diff --git a/core/modules/path/tests/src/Functional/PathTaxonomyTermTest.php b/core/modules/path/tests/src/Functional/PathTaxonomyTermTest.php
index 1b902b37829a..3d2a4e22e8fb 100644
--- a/core/modules/path/tests/src/Functional/PathTaxonomyTermTest.php
+++ b/core/modules/path/tests/src/Functional/PathTaxonomyTermTest.php
@@ -50,7 +50,7 @@ protected function setUp(): void {
   /**
    * Tests alias functionality through the admin interfaces.
    */
-  public function testTermAlias() {
+  public function testTermAlias(): void {
     // Create a term in the default 'Tags' vocabulary with URL alias.
     $vocabulary = Vocabulary::load('tags');
     $description = $this->randomMachineName();
diff --git a/core/modules/path/tests/src/Kernel/Migrate/d6/MigrateUrlAliasTest.php b/core/modules/path/tests/src/Kernel/Migrate/d6/MigrateUrlAliasTest.php
index 142558d15431..eefb3839b91c 100644
--- a/core/modules/path/tests/src/Kernel/Migrate/d6/MigrateUrlAliasTest.php
+++ b/core/modules/path/tests/src/Kernel/Migrate/d6/MigrateUrlAliasTest.php
@@ -70,7 +70,7 @@ private function assertPath(int $pid, array $conditions, PathAliasInterface $pat
   /**
    * Tests the URL alias migration.
    */
-  public function testUrlAlias() {
+  public function testUrlAlias(): void {
     $this->executeMigrations([
       'd6_node',
       'd6_node_translation',
@@ -82,7 +82,7 @@ public function testUrlAlias() {
   /**
    * Tests the URL alias migration using the node complete migration.
    */
-  public function testNodeCompleteUrlAlias() {
+  public function testNodeCompleteUrlAlias(): void {
     $this->executeMigrations([
       'd6_node_complete',
       'd6_url_alias',
diff --git a/core/modules/path/tests/src/Kernel/Migrate/d7/MigrateUrlAliasTest.php b/core/modules/path/tests/src/Kernel/Migrate/d7/MigrateUrlAliasTest.php
index a176bad099c3..9db686ad1762 100644
--- a/core/modules/path/tests/src/Kernel/Migrate/d7/MigrateUrlAliasTest.php
+++ b/core/modules/path/tests/src/Kernel/Migrate/d7/MigrateUrlAliasTest.php
@@ -33,7 +33,7 @@ protected function setUp(): void {
   /**
    * Tests the URL alias migration with translated nodes.
    */
-  public function testUrlAliasWithTranslatedNodes() {
+  public function testUrlAliasWithTranslatedNodes(): void {
     // Alias for the 'The thing about Deep Space 9' node in English.
     $path_alias = $this->loadPathAliasByConditions(['alias' => '/deep-space-9']);
     $this->assertSame('/node/2', $path_alias->getPath());
diff --git a/core/modules/path/tests/src/Kernel/Migrate/d7/MigrateUrlAliasTestBase.php b/core/modules/path/tests/src/Kernel/Migrate/d7/MigrateUrlAliasTestBase.php
index 521aaaacd97e..dd7e7716d7d2 100644
--- a/core/modules/path/tests/src/Kernel/Migrate/d7/MigrateUrlAliasTestBase.php
+++ b/core/modules/path/tests/src/Kernel/Migrate/d7/MigrateUrlAliasTestBase.php
@@ -50,7 +50,7 @@ protected function setUp(): void {
   /**
    * Tests the URL alias migration.
    */
-  public function testUrlAlias() {
+  public function testUrlAlias(): void {
     $path_alias = $this->loadPathAliasByConditions([
       'path' => '/taxonomy/term/4',
       'alias' => '/term33',
diff --git a/core/modules/path/tests/src/Kernel/PathItemTest.php b/core/modules/path/tests/src/Kernel/PathItemTest.php
index ee96c56772c9..97648aabaef8 100644
--- a/core/modules/path/tests/src/Kernel/PathItemTest.php
+++ b/core/modules/path/tests/src/Kernel/PathItemTest.php
@@ -57,7 +57,7 @@ protected function setUp(): void {
   /**
    * Tests creating, loading, updating and deleting aliases through PathItem.
    */
-  public function testPathItem() {
+  public function testPathItem(): void {
     /** @var \Drupal\path_alias\AliasRepositoryInterface $alias_repository */
     $alias_repository = \Drupal::service('path_alias.repository');
 
diff --git a/core/modules/path/tests/src/Kernel/PathNoCanonicalLinkTest.php b/core/modules/path/tests/src/Kernel/PathNoCanonicalLinkTest.php
index cfb78e9a9e44..e2fd58c8ca39 100644
--- a/core/modules/path/tests/src/Kernel/PathNoCanonicalLinkTest.php
+++ b/core/modules/path/tests/src/Kernel/PathNoCanonicalLinkTest.php
@@ -50,7 +50,7 @@ protected function setUp(): void {
   /**
    * Tests for no canonical link templates.
    */
-  public function testNoCanonicalLinkTemplate() {
+  public function testNoCanonicalLinkTemplate(): void {
     $entity_type = EntityTestTranslatableUISkip::create([
       'name' => 'name english',
       'language' => 'en',
diff --git a/core/modules/path/tests/src/Unit/Field/PathFieldDefinitionTest.php b/core/modules/path/tests/src/Unit/Field/PathFieldDefinitionTest.php
index 6858ef56965e..9b4c3f61d2c4 100644
--- a/core/modules/path/tests/src/Unit/Field/PathFieldDefinitionTest.php
+++ b/core/modules/path/tests/src/Unit/Field/PathFieldDefinitionTest.php
@@ -30,7 +30,7 @@ protected function getModuleAndPath() {
    * @covers ::getColumns
    * @covers ::getSchema
    */
-  public function testGetColumns() {
+  public function testGetColumns(): void {
     $this->assertSame([], $this->definition->getColumns());
   }
 
diff --git a/core/modules/path/tests/src/Unit/migrate/process/PathSetTranslatedTest.php b/core/modules/path/tests/src/Unit/migrate/process/PathSetTranslatedTest.php
index 03ece19d9d84..bb95375d9720 100644
--- a/core/modules/path/tests/src/Unit/migrate/process/PathSetTranslatedTest.php
+++ b/core/modules/path/tests/src/Unit/migrate/process/PathSetTranslatedTest.php
@@ -29,7 +29,7 @@ class PathSetTranslatedTest extends MigrateProcessTestCase {
    *
    * @dataProvider transformDataProvider
    */
-  public function testTransform($path, $node_translation, $expected_result) {
+  public function testTransform($path, $node_translation, $expected_result): void {
     $plugin = new PathSetTranslated([], 'path_set_translated', []);
     $this->assertSame($expected_result, $plugin->transform([$path, $node_translation], $this->migrateExecutable, $this->row, 'destination_property'));
   }
diff --git a/core/modules/path_alias/tests/src/Functional/UrlAlterFunctionalTest.php b/core/modules/path_alias/tests/src/Functional/UrlAlterFunctionalTest.php
index d929616598e7..87db7e56e63e 100644
--- a/core/modules/path_alias/tests/src/Functional/UrlAlterFunctionalTest.php
+++ b/core/modules/path_alias/tests/src/Functional/UrlAlterFunctionalTest.php
@@ -33,7 +33,7 @@ class UrlAlterFunctionalTest extends BrowserTestBase {
   /**
    * Tests that URL altering works and that it occurs in the correct order.
    */
-  public function testUrlAlter() {
+  public function testUrlAlter(): void {
     // Ensure that the path_alias table exists after Drupal installation.
     $this->assertTrue(Database::getConnection()->schema()->tableExists('path_alias'), 'The path_alias table exists after Drupal installation.');
 
diff --git a/core/modules/path_alias/tests/src/Kernel/AliasTest.php b/core/modules/path_alias/tests/src/Kernel/AliasTest.php
index 92f1aee1d9fe..4cf3e2536cd9 100644
--- a/core/modules/path_alias/tests/src/Kernel/AliasTest.php
+++ b/core/modules/path_alias/tests/src/Kernel/AliasTest.php
@@ -44,7 +44,7 @@ protected function setUp(): void {
   /**
    * @covers ::preloadPathAlias
    */
-  public function testPreloadPathAlias() {
+  public function testPreloadPathAlias(): void {
     $path_alias_repository = $this->container->get('path_alias.repository');
 
     // Every interesting language combination:
@@ -288,7 +288,7 @@ public function testPreloadPathAlias() {
   /**
    * @covers ::lookupBySystemPath
    */
-  public function testLookupBySystemPath() {
+  public function testLookupBySystemPath(): void {
     $this->createPathAlias('/test-source-Case', '/test-alias');
 
     $path_alias_repository = $this->container->get('path_alias.repository');
@@ -299,7 +299,7 @@ public function testLookupBySystemPath() {
   /**
    * @covers ::lookupByAlias
    */
-  public function testLookupByAlias() {
+  public function testLookupByAlias(): void {
     $this->createPathAlias('/test-source', '/test-alias-Case');
 
     $path_alias_repository = $this->container->get('path_alias.repository');
@@ -311,7 +311,7 @@ public function testLookupByAlias() {
    * @covers \Drupal\path_alias\AliasManager::getPathByAlias
    * @covers \Drupal\path_alias\AliasManager::getAliasByPath
    */
-  public function testLookupPath() {
+  public function testLookupPath(): void {
     // Create AliasManager and Path object.
     $aliasManager = $this->container->get('path_alias.manager');
 
@@ -360,7 +360,7 @@ public function testLookupPath() {
   /**
    * Tests the alias whitelist.
    */
-  public function testWhitelist() {
+  public function testWhitelist(): void {
     $memoryCounterBackend = new MemoryCounterBackend(\Drupal::service(TimeInterface::class));
 
     // Create AliasManager and Path object.
@@ -421,7 +421,7 @@ public function testWhitelist() {
   /**
    * Tests situation where the whitelist cache is deleted mid-request.
    */
-  public function testWhitelistCacheDeletionMidRequest() {
+  public function testWhitelistCacheDeletionMidRequest(): void {
     $memoryCounterBackend = new MemoryCounterBackend(\Drupal::service(TimeInterface::class));
 
     // Create AliasManager and Path object.
diff --git a/core/modules/path_alias/tests/src/Kernel/PathHooksTest.php b/core/modules/path_alias/tests/src/Kernel/PathHooksTest.php
index c5cfee3814e9..377c6c86e20c 100644
--- a/core/modules/path_alias/tests/src/Kernel/PathHooksTest.php
+++ b/core/modules/path_alias/tests/src/Kernel/PathHooksTest.php
@@ -36,7 +36,7 @@ protected function setUp(): void {
    * @covers ::postSave
    * @covers ::postDelete
    */
-  public function testPathHooks() {
+  public function testPathHooks(): void {
     $path_alias = PathAlias::create([
       'path' => '/' . $this->randomMachineName(),
       'alias' => '/' . $this->randomMachineName(),
diff --git a/core/modules/path_alias/tests/src/Unit/AliasManagerTest.php b/core/modules/path_alias/tests/src/Unit/AliasManagerTest.php
index fd9234cf551a..f5e1be108d34 100644
--- a/core/modules/path_alias/tests/src/Unit/AliasManagerTest.php
+++ b/core/modules/path_alias/tests/src/Unit/AliasManagerTest.php
@@ -86,7 +86,7 @@ protected function setUp(): void {
    *
    * @covers ::getPathByAlias
    */
-  public function testGetPathByAliasNoMatch() {
+  public function testGetPathByAliasNoMatch(): void {
     $alias = '/' . $this->randomMachineName();
 
     $language = new Language(['id' => 'en']);
@@ -111,7 +111,7 @@ public function testGetPathByAliasNoMatch() {
    *
    * @covers ::getPathByAlias
    */
-  public function testGetPathByAliasMatch() {
+  public function testGetPathByAliasMatch(): void {
     $alias = $this->randomMachineName();
     $path = $this->randomMachineName();
 
@@ -132,7 +132,7 @@ public function testGetPathByAliasMatch() {
    *
    * @covers ::getPathByAlias
    */
-  public function testGetPathByAliasLangcode() {
+  public function testGetPathByAliasLangcode(): void {
     $alias = $this->randomMachineName();
     $path = $this->randomMachineName();
 
@@ -154,7 +154,7 @@ public function testGetPathByAliasLangcode() {
    *
    * @covers ::getAliasByPath
    */
-  public function testGetAliasByPathWhitelist() {
+  public function testGetAliasByPathWhitelist(): void {
     $path_part1 = $this->randomMachineName();
     $path_part2 = $this->randomMachineName();
     $path = '/' . $path_part1 . '/' . $path_part2;
@@ -179,7 +179,7 @@ public function testGetAliasByPathWhitelist() {
    *
    * @covers ::getAliasByPath
    */
-  public function testGetAliasByPathNoMatch() {
+  public function testGetAliasByPathNoMatch(): void {
     $path_part1 = $this->randomMachineName();
     $path_part2 = $this->randomMachineName();
     $path = '/' . $path_part1 . '/' . $path_part2;
@@ -226,7 +226,7 @@ public function testGetAliasByPathException(): void {
    * @covers ::getAliasByPath
    * @covers ::writeCache
    */
-  public function testGetAliasByPathMatch() {
+  public function testGetAliasByPathMatch(): void {
     $path_part1 = $this->randomMachineName();
     $path_part2 = $this->randomMachineName();
     $path = '/' . $path_part1 . '/' . $path_part2;
@@ -264,7 +264,7 @@ public function testGetAliasByPathMatch() {
    * @covers ::getAliasByPath
    * @covers ::writeCache
    */
-  public function testGetAliasByPathCachedMatch() {
+  public function testGetAliasByPathCachedMatch(): void {
     $path_part1 = $this->randomMachineName();
     $path_part2 = $this->randomMachineName();
     $path = '/' . $path_part1 . '/' . $path_part2;
@@ -318,7 +318,7 @@ public function testGetAliasByPathCachedMatch() {
    * @covers ::getAliasByPath
    * @covers ::writeCache
    */
-  public function testGetAliasByPathCachedMissLanguage() {
+  public function testGetAliasByPathCachedMissLanguage(): void {
     $path_part1 = $this->randomMachineName();
     $path_part2 = $this->randomMachineName();
     $path = '/' . $path_part1 . '/' . $path_part2;
@@ -367,7 +367,7 @@ public function testGetAliasByPathCachedMissLanguage() {
    * @covers ::getAliasByPath
    * @covers ::writeCache
    */
-  public function testGetAliasByPathCachedMissNoAlias() {
+  public function testGetAliasByPathCachedMissNoAlias(): void {
     $path_part1 = $this->randomMachineName();
     $path_part2 = $this->randomMachineName();
     $path = '/' . $path_part1 . '/' . $path_part2;
@@ -415,7 +415,7 @@ public function testGetAliasByPathCachedMissNoAlias() {
    * @covers ::getAliasByPath
    * @covers ::writeCache
    */
-  public function testGetAliasByPathUncachedMissNoAlias() {
+  public function testGetAliasByPathUncachedMissNoAlias(): void {
     $path_part1 = $this->randomMachineName();
     $path_part2 = $this->randomMachineName();
     $path = '/' . $path_part1 . '/' . $path_part2;
@@ -462,7 +462,7 @@ public function testGetAliasByPathUncachedMissNoAlias() {
   /**
    * @covers ::cacheClear
    */
-  public function testCacheClear() {
+  public function testCacheClear(): void {
     $path = '/path';
     $alias = '/alias';
     $language = $this->setUpCurrentLanguage();
@@ -499,7 +499,7 @@ public function testCacheClear() {
    * @covers ::getAliasByPath
    * @covers ::writeCache
    */
-  public function testGetAliasByPathUncachedMissWithAlias() {
+  public function testGetAliasByPathUncachedMissWithAlias(): void {
     $path_part1 = $this->randomMachineName();
     $path_part2 = $this->randomMachineName();
     $path = '/' . $path_part1 . '/' . $path_part2;
diff --git a/core/modules/path_alias/tests/src/Unit/PathProcessor/AliasPathProcessorTest.php b/core/modules/path_alias/tests/src/Unit/PathProcessor/AliasPathProcessorTest.php
index 12ab0711dc50..b3a0ea3971c7 100644
--- a/core/modules/path_alias/tests/src/Unit/PathProcessor/AliasPathProcessorTest.php
+++ b/core/modules/path_alias/tests/src/Unit/PathProcessor/AliasPathProcessorTest.php
@@ -46,7 +46,7 @@ protected function setUp(): void {
    *
    * @see \Drupal\path_alias\PathProcessor\AliasPathProcessor::processInbound
    */
-  public function testProcessInbound() {
+  public function testProcessInbound(): void {
     $this->aliasManager->expects($this->exactly(2))
       ->method('getPathByAlias')
       ->willReturnMap([
@@ -65,7 +65,7 @@ public function testProcessInbound() {
    *
    * @dataProvider providerTestProcessOutbound
    */
-  public function testProcessOutbound($path, array $options, $expected_path) {
+  public function testProcessOutbound($path, array $options, $expected_path): void {
     $this->aliasManager->expects($this->any())
       ->method('getAliasByPath')
       ->willReturnMap([
diff --git a/core/modules/pgsql/tests/src/Kernel/pgsql/DatabaseExceptionWrapperTest.php b/core/modules/pgsql/tests/src/Kernel/pgsql/DatabaseExceptionWrapperTest.php
index c2749b75e300..e0e623927bf2 100644
--- a/core/modules/pgsql/tests/src/Kernel/pgsql/DatabaseExceptionWrapperTest.php
+++ b/core/modules/pgsql/tests/src/Kernel/pgsql/DatabaseExceptionWrapperTest.php
@@ -16,7 +16,7 @@ class DatabaseExceptionWrapperTest extends DriverSpecificKernelTestBase {
   /**
    * Tests Connection::prepareStatement exception on execution.
    */
-  public function testPrepareStatementFailOnExecution() {
+  public function testPrepareStatementFailOnExecution(): void {
     $this->expectException(\PDOException::class);
     $stmt = $this->connection->prepareStatement('bananas', []);
     $stmt->execute();
diff --git a/core/modules/pgsql/tests/src/Kernel/pgsql/KernelTestBaseTest.php b/core/modules/pgsql/tests/src/Kernel/pgsql/KernelTestBaseTest.php
index 0530fe20015b..41b00c9296b4 100644
--- a/core/modules/pgsql/tests/src/Kernel/pgsql/KernelTestBaseTest.php
+++ b/core/modules/pgsql/tests/src/Kernel/pgsql/KernelTestBaseTest.php
@@ -17,7 +17,7 @@ class KernelTestBaseTest extends DriverSpecificKernelTestBase {
   /**
    * @covers ::setUp
    */
-  public function testSetUp() {
+  public function testSetUp(): void {
     // Ensure that the database tasks have been run during set up.
     $this->assertSame('on', $this->connection->query("SHOW standard_conforming_strings")->fetchField());
     $this->assertSame('escape', $this->connection->query("SHOW bytea_output")->fetchField());
diff --git a/core/modules/pgsql/tests/src/Kernel/pgsql/SchemaTest.php b/core/modules/pgsql/tests/src/Kernel/pgsql/SchemaTest.php
index 0b4cf94a0d40..9b4ad1f5f0e4 100644
--- a/core/modules/pgsql/tests/src/Kernel/pgsql/SchemaTest.php
+++ b/core/modules/pgsql/tests/src/Kernel/pgsql/SchemaTest.php
@@ -312,7 +312,7 @@ public function testPgsqlSequences(): void {
   /**
    * Tests the method tableExists().
    */
-  public function testTableExists() {
+  public function testTableExists(): void {
     $table_name = 'test_table';
     $table_specification = [
       'fields' => [
@@ -341,7 +341,7 @@ public function testTableExists() {
   /**
    * Tests renaming a table where the new index name is equal to the table name.
    */
-  public function testRenameTableWithNewIndexNameEqualsTableName() {
+  public function testRenameTableWithNewIndexNameEqualsTableName(): void {
     // Special table names for colliding with the PostgreSQL new index name.
     $table_name_old = 'some_new_table_name__id__idx';
     $table_name_new = 'some_new_table_name';
diff --git a/core/modules/pgsql/tests/src/Kernel/pgsql/TemporaryQueryTest.php b/core/modules/pgsql/tests/src/Kernel/pgsql/TemporaryQueryTest.php
index a352360f5d55..e3c48441e148 100644
--- a/core/modules/pgsql/tests/src/Kernel/pgsql/TemporaryQueryTest.php
+++ b/core/modules/pgsql/tests/src/Kernel/pgsql/TemporaryQueryTest.php
@@ -16,7 +16,7 @@ class TemporaryQueryTest extends TemporaryQueryTestBase {
   /**
    * Confirms that temporary tables work.
    */
-  public function testTemporaryQuery() {
+  public function testTemporaryQuery(): void {
     parent::testTemporaryQuery();
 
     $connection = $this->getConnection();
diff --git a/core/modules/pgsql/tests/src/Unit/SchemaTest.php b/core/modules/pgsql/tests/src/Unit/SchemaTest.php
index 1514d1a14ad9..9880bdbb4fb6 100644
--- a/core/modules/pgsql/tests/src/Unit/SchemaTest.php
+++ b/core/modules/pgsql/tests/src/Unit/SchemaTest.php
@@ -27,7 +27,7 @@ class SchemaTest extends UnitTestCase {
    * @covers ::constraintExists
    * @dataProvider providerComputedConstraintName
    */
-  public function testComputedConstraintName($table_name, $name, $expected) {
+  public function testComputedConstraintName($table_name, $name, $expected): void {
     $max_identifier_length = 63;
 
     $connection = $this->prophesize('\Drupal\pgsql\Driver\Database\pgsql\Connection');
diff --git a/core/modules/phpass/tests/src/Unit/PasswordVerifyTest.php b/core/modules/phpass/tests/src/Unit/PasswordVerifyTest.php
index 3bb25198750d..dd897c00a0fd 100644
--- a/core/modules/phpass/tests/src/Unit/PasswordVerifyTest.php
+++ b/core/modules/phpass/tests/src/Unit/PasswordVerifyTest.php
@@ -22,7 +22,7 @@ class PasswordVerifyTest extends UnitTestCase {
    *
    * @covers ::hash
    */
-  public function testPasswordHash() {
+  public function testPasswordHash(): void {
     $samplePassword = $this->randomMachineName();
     $sampleHash = $this->randomMachineName();
 
@@ -40,7 +40,7 @@ public function testPasswordHash() {
    *
    * @covers ::needsRehash
    */
-  public function testPasswordNeedsRehash() {
+  public function testPasswordNeedsRehash(): void {
     $sampleHash = $this->randomMachineName();
 
     $corePassword = $this->prophesize(PasswordInterface::class);
@@ -56,7 +56,7 @@ public function testPasswordNeedsRehash() {
    *
    * @covers ::check
    */
-  public function testPasswordCheckUnknownHash() {
+  public function testPasswordCheckUnknownHash(): void {
     $samplePassword = $this->randomMachineName();
     $sampleHash = $this->randomMachineName();
 
@@ -77,7 +77,7 @@ public function testPasswordCheckUnknownHash() {
    * @covers ::enforceLog2Boundaries
    * @covers ::base64Encode
    */
-  public function testPasswordCheckSupported() {
+  public function testPasswordCheckSupported(): void {
     $validPassword = 'valid password';
 
     // cspell:disable
@@ -108,7 +108,7 @@ public function testPasswordCheckSupported() {
    *
    * @covers ::enforceLog2Boundaries
    */
-  public function testWithinBounds() {
+  public function testWithinBounds(): void {
     $hasher = new PhpassHashedPasswordLog2BoundariesDouble();
     $this->assertEquals(PhpassHashedPassword::MIN_HASH_COUNT, $hasher->enforceLog2Boundaries(1), "Min hash count enforced");
     $this->assertEquals(PhpassHashedPassword::MAX_HASH_COUNT, $hasher->enforceLog2Boundaries(100), "Max hash count enforced");
@@ -121,7 +121,7 @@ public function testWithinBounds() {
    *
    * @dataProvider providerLongPasswords
    */
-  public function testLongPassword($password, $allowed) {
+  public function testLongPassword($password, $allowed): void {
     // cspell:disable
     $bogusHash = '$S$5TOxWPdvJRs0P/xZBdrrPlGgzViOS0drHu3jaIjitesfttrp18bk';
     // cspell:enable
diff --git a/core/modules/responsive_image/tests/src/Functional/ResponsiveImageAdminUITest.php b/core/modules/responsive_image/tests/src/Functional/ResponsiveImageAdminUITest.php
index 760279f9a495..4cf107e67777 100644
--- a/core/modules/responsive_image/tests/src/Functional/ResponsiveImageAdminUITest.php
+++ b/core/modules/responsive_image/tests/src/Functional/ResponsiveImageAdminUITest.php
@@ -43,7 +43,7 @@ protected function setUp(): void {
   /**
    * Tests responsive image administration functionality.
    */
-  public function testResponsiveImageAdmin() {
+  public function testResponsiveImageAdmin(): void {
     // We start without any default styles.
     $this->drupalGet('admin/config/media/responsive-image-style');
     $this->assertSession()->pageTextContains('There are no responsive image styles yet.');
diff --git a/core/modules/responsive_image/tests/src/Functional/ResponsiveImageFieldDisplayTest.php b/core/modules/responsive_image/tests/src/Functional/ResponsiveImageFieldDisplayTest.php
index 5347a1f34a4f..3f2c1a2b83d3 100644
--- a/core/modules/responsive_image/tests/src/Functional/ResponsiveImageFieldDisplayTest.php
+++ b/core/modules/responsive_image/tests/src/Functional/ResponsiveImageFieldDisplayTest.php
@@ -90,7 +90,7 @@ protected function setUp(): void {
   /**
    * Tests responsive image formatters on node display for public files.
    */
-  public function testResponsiveImageFieldFormattersPublic() {
+  public function testResponsiveImageFieldFormattersPublic(): void {
     $this->addTestImageStyleMappings();
     $this->doTestResponsiveImageFieldFormatters('public');
   }
@@ -98,7 +98,7 @@ public function testResponsiveImageFieldFormattersPublic() {
   /**
    * Tests responsive image formatters on node display for private files.
    */
-  public function testResponsiveImageFieldFormattersPrivate() {
+  public function testResponsiveImageFieldFormattersPrivate(): void {
     $this->addTestImageStyleMappings();
     // Remove access content permission from anonymous users.
     user_role_change_permissions(RoleInterface::ANONYMOUS_ID, ['access content' => FALSE]);
@@ -108,7 +108,7 @@ public function testResponsiveImageFieldFormattersPrivate() {
   /**
    * Tests responsive image formatters when image style is empty.
    */
-  public function testResponsiveImageFieldFormattersEmptyStyle() {
+  public function testResponsiveImageFieldFormattersEmptyStyle(): void {
     $this->addTestImageStyleMappings(TRUE);
     $this->doTestResponsiveImageFieldFormatters('public', TRUE);
   }
@@ -358,7 +358,7 @@ protected function doTestResponsiveImageFieldFormatters($scheme, $empty_styles =
   /**
    * Tests responsive image formatters on node display linked to the file.
    */
-  public function testResponsiveImageFieldFormattersLinkToFile() {
+  public function testResponsiveImageFieldFormattersLinkToFile(): void {
     $this->addTestImageStyleMappings();
     $this->assertResponsiveImageFieldFormattersLink('file');
   }
@@ -366,7 +366,7 @@ public function testResponsiveImageFieldFormattersLinkToFile() {
   /**
    * Tests responsive image formatters on node display linked to the node.
    */
-  public function testResponsiveImageFieldFormattersLinkToNode() {
+  public function testResponsiveImageFieldFormattersLinkToNode(): void {
     $this->addTestImageStyleMappings();
     $this->assertResponsiveImageFieldFormattersLink('content');
   }
@@ -374,7 +374,7 @@ public function testResponsiveImageFieldFormattersLinkToNode() {
   /**
    * Tests responsive image formatter on node display with an empty media query.
    */
-  public function testResponsiveImageFieldFormattersEmptyMediaQuery() {
+  public function testResponsiveImageFieldFormattersEmptyMediaQuery(): void {
     $this->responsiveImgStyle
       // Test the output of an empty media query.
       ->addImageStyleMapping('responsive_image_test_module.empty', '1x', [
@@ -424,7 +424,7 @@ public function testResponsiveImageFieldFormattersEmptyMediaQuery() {
   /**
    * Tests responsive image formatter on node display with one and two sources.
    */
-  public function testResponsiveImageFieldFormattersMultipleSources() {
+  public function testResponsiveImageFieldFormattersMultipleSources(): void {
     // Setup known image style sizes so the test can assert on known sizes.
     $large_style = ImageStyle::load('large');
     assert($large_style instanceof ImageStyleInterface);
diff --git a/core/modules/responsive_image/tests/src/Functional/ViewsIntegrationTest.php b/core/modules/responsive_image/tests/src/Functional/ViewsIntegrationTest.php
index 71c3f192149f..0fc468107c70 100644
--- a/core/modules/responsive_image/tests/src/Functional/ViewsIntegrationTest.php
+++ b/core/modules/responsive_image/tests/src/Functional/ViewsIntegrationTest.php
@@ -95,7 +95,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['views_test_conf
   /**
    * Tests integration with Views.
    */
-  public function testViewsAddResponsiveImageField() {
+  public function testViewsAddResponsiveImageField(): void {
     // Add the image field to the View.
     $this->drupalGet('admin/structure/views/nojs/add-handler/entity_test_row/default/field');
     $this->drupalGet('admin/structure/views/nojs/add-handler/entity_test_row/default/field');
diff --git a/core/modules/responsive_image/tests/src/FunctionalJavascript/ResponsiveImageFieldUiTest.php b/core/modules/responsive_image/tests/src/FunctionalJavascript/ResponsiveImageFieldUiTest.php
index 23d6ffe908fa..6fe0829c4733 100644
--- a/core/modules/responsive_image/tests/src/FunctionalJavascript/ResponsiveImageFieldUiTest.php
+++ b/core/modules/responsive_image/tests/src/FunctionalJavascript/ResponsiveImageFieldUiTest.php
@@ -72,7 +72,7 @@ protected function setUp(): void {
   /**
    * Tests formatter settings.
    */
-  public function testResponsiveImageFormatterUi() {
+  public function testResponsiveImageFormatterUi(): void {
     $manage = 'admin/structure/types/manage/' . $this->type;
     $manage_display = $manage . '/display';
     /** @var \Drupal\FunctionalJavascriptTests\JSWebAssert $assert_session */
diff --git a/core/modules/responsive_image/tests/src/Kernel/Migrate/d7/MigrateResponsiveImageStylesTest.php b/core/modules/responsive_image/tests/src/Kernel/Migrate/d7/MigrateResponsiveImageStylesTest.php
index 488a94b370da..77bec068f7ff 100644
--- a/core/modules/responsive_image/tests/src/Kernel/Migrate/d7/MigrateResponsiveImageStylesTest.php
+++ b/core/modules/responsive_image/tests/src/Kernel/Migrate/d7/MigrateResponsiveImageStylesTest.php
@@ -35,7 +35,7 @@ protected function setUp(): void {
   /**
    * Tests the Drupal 7 to Drupal 8 responsive image styles migration.
    */
-  public function testResponsiveImageStyles() {
+  public function testResponsiveImageStyles(): void {
     $expected_image_style_mappings = [
       [
         'image_mapping_type' => 'image_style',
diff --git a/core/modules/responsive_image/tests/src/Kernel/ResponsiveImageIntegrationTest.php b/core/modules/responsive_image/tests/src/Kernel/ResponsiveImageIntegrationTest.php
index 850add91e6cd..fd453f79b00a 100644
--- a/core/modules/responsive_image/tests/src/Kernel/ResponsiveImageIntegrationTest.php
+++ b/core/modules/responsive_image/tests/src/Kernel/ResponsiveImageIntegrationTest.php
@@ -42,7 +42,7 @@ protected function setUp(): void {
   /**
    * Tests integration with entity view display.
    */
-  public function testEntityViewDisplayDependency() {
+  public function testEntityViewDisplayDependency(): void {
     // Create a responsive image style.
     ResponsiveImageStyle::create([
       'id' => 'foo',
diff --git a/core/modules/responsive_image/tests/src/Unit/ResponsiveImageStyleConfigEntityUnitTest.php b/core/modules/responsive_image/tests/src/Unit/ResponsiveImageStyleConfigEntityUnitTest.php
index 5eaea98aacc6..86537ed3f582 100644
--- a/core/modules/responsive_image/tests/src/Unit/ResponsiveImageStyleConfigEntityUnitTest.php
+++ b/core/modules/responsive_image/tests/src/Unit/ResponsiveImageStyleConfigEntityUnitTest.php
@@ -65,7 +65,7 @@ protected function setUp(): void {
   /**
    * @covers ::calculateDependencies
    */
-  public function testCalculateDependencies() {
+  public function testCalculateDependencies(): void {
     // Set up image style loading mock.
     $styles = [];
     foreach (['fallback', 'small', 'medium', 'large'] as $style) {
@@ -124,7 +124,7 @@ public function testCalculateDependencies() {
    * @covers ::addImageStyleMapping
    * @covers ::hasImageStyleMappings
    */
-  public function testHasImageStyleMappings() {
+  public function testHasImageStyleMappings(): void {
     $entity = new ResponsiveImageStyle([]);
     $this->assertFalse($entity->hasImageStyleMappings());
     $entity->addImageStyleMapping('test_breakpoint', '1x', [
@@ -175,7 +175,7 @@ public function testHasImageStyleMappings() {
    * @covers ::addImageStyleMapping
    * @covers ::getImageStyleMapping
    */
-  public function testGetImageStyleMapping() {
+  public function testGetImageStyleMapping(): void {
     $entity = new ResponsiveImageStyle(['']);
     $entity->addImageStyleMapping('test_breakpoint', '1x', [
       'image_mapping_type' => 'image_style',
@@ -195,7 +195,7 @@ public function testGetImageStyleMapping() {
    * @covers ::addImageStyleMapping
    * @covers ::getKeyedImageStyleMappings
    */
-  public function testGetKeyedImageStyleMappings() {
+  public function testGetKeyedImageStyleMappings(): void {
     $entity = new ResponsiveImageStyle(['']);
     $entity->addImageStyleMapping('test_breakpoint', '1x', [
       'image_mapping_type' => 'image_style',
@@ -287,7 +287,7 @@ public function testGetKeyedImageStyleMappings() {
    * @covers ::addImageStyleMapping
    * @covers ::getImageStyleMappings
    */
-  public function testGetImageStyleMappings() {
+  public function testGetImageStyleMappings(): void {
     $entity = new ResponsiveImageStyle(['']);
     $entity->addImageStyleMapping('test_breakpoint', '1x', [
       'image_mapping_type' => 'image_style',
@@ -339,7 +339,7 @@ public function testGetImageStyleMappings() {
    * @covers ::addImageStyleMapping
    * @covers ::removeImageStyleMappings
    */
-  public function testRemoveImageStyleMappings() {
+  public function testRemoveImageStyleMappings(): void {
     $entity = new ResponsiveImageStyle(['']);
     $entity->addImageStyleMapping('test_breakpoint', '1x', [
       'image_mapping_type' => 'image_style',
@@ -370,7 +370,7 @@ public function testRemoveImageStyleMappings() {
    * @covers ::setBreakpointGroup
    * @covers ::getBreakpointGroup
    */
-  public function testSetBreakpointGroup() {
+  public function testSetBreakpointGroup(): void {
     $entity = new ResponsiveImageStyle(['breakpoint_group' => 'test_group']);
     $entity->addImageStyleMapping('test_breakpoint', '1x', [
       'image_mapping_type' => 'image_style',
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php
index cf8c3f38ee48..9ef8b61a4536 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php
@@ -408,7 +408,7 @@ protected function getExpectedCacheContexts() {
   /**
    * Tests a GET request for an entity, plus edge cases to ensure good DX.
    */
-  public function testGet() {
+  public function testGet(): void {
     $this->initAuthentication();
     $has_canonical_url = $this->entity->hasLinkTemplate('canonical');
 
@@ -696,7 +696,7 @@ protected static function castToString(array $normalization) {
   /**
    * Tests a POST request for an entity, plus edge cases to ensure good DX.
    */
-  public function testPost() {
+  public function testPost(): void {
     // @todo Remove this in https://www.drupal.org/node/2300677.
     if ($this->entity instanceof ConfigEntityInterface) {
       $this->markTestSkipped('POSTing config entities is not yet supported.');
@@ -870,7 +870,7 @@ public function testPost() {
   /**
    * Tests a PATCH request for an entity, plus edge cases to ensure good DX.
    */
-  public function testPatch() {
+  public function testPatch(): void {
     // @todo Remove this in https://www.drupal.org/node/2300677.
     if ($this->entity instanceof ConfigEntityInterface) {
       $this->markTestSkipped('PATCHing config entities is not yet supported.');
@@ -1108,7 +1108,7 @@ public function testPatch() {
   /**
    * Tests a DELETE request for an entity, plus edge cases to ensure good DX.
    */
-  public function testDelete() {
+  public function testDelete(): void {
     // @todo Remove this in https://www.drupal.org/node/2300677.
     if ($this->entity instanceof ConfigEntityInterface) {
       $this->markTestSkipped('DELETEing config entities is not yet supported.');
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/ModeratedNode/ModeratedNodeXmlAnonTest.php b/core/modules/rest/tests/src/Functional/EntityResource/ModeratedNode/ModeratedNodeXmlAnonTest.php
index 7c13ad60aa04..71a2db986d98 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/ModeratedNode/ModeratedNodeXmlAnonTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/ModeratedNode/ModeratedNodeXmlAnonTest.php
@@ -33,7 +33,7 @@ class ModeratedNodeXmlAnonTest extends ModeratedNodeResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public function testPatchPath() {
+  public function testPatchPath(): void {
     // Deserialization of the XML format is not supported.
     $this->markTestSkipped();
   }
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/ModeratedNode/ModeratedNodeXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/ModeratedNode/ModeratedNodeXmlBasicAuthTest.php
index 90700a076d1b..823bf23ad177 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/ModeratedNode/ModeratedNodeXmlBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/ModeratedNode/ModeratedNodeXmlBasicAuthTest.php
@@ -43,7 +43,7 @@ class ModeratedNodeXmlBasicAuthTest extends ModeratedNodeResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public function testPatchPath() {
+  public function testPatchPath(): void {
     // Deserialization of the XML format is not supported.
     $this->markTestSkipped();
   }
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/ModeratedNode/ModeratedNodeXmlCookieTest.php b/core/modules/rest/tests/src/Functional/EntityResource/ModeratedNode/ModeratedNodeXmlCookieTest.php
index 821fe065b781..b8f0db39ac02 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/ModeratedNode/ModeratedNodeXmlCookieTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/ModeratedNode/ModeratedNodeXmlCookieTest.php
@@ -38,7 +38,7 @@ class ModeratedNodeXmlCookieTest extends ModeratedNodeResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public function testPatchPath() {
+  public function testPatchPath(): void {
     // Deserialization of the XML format is not supported.
     $this->markTestSkipped();
   }
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/XmlEntityNormalizationQuirksTrait.php b/core/modules/rest/tests/src/Functional/EntityResource/XmlEntityNormalizationQuirksTrait.php
index 5769d7a5e745..9698e5d1c1e6 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/XmlEntityNormalizationQuirksTrait.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/XmlEntityNormalizationQuirksTrait.php
@@ -151,7 +151,7 @@ protected function applyXmlConfigEntityDecodingQuirks(array $normalization) {
   /**
    * {@inheritdoc}
    */
-  public function testPost() {
+  public function testPost(): void {
     // Deserialization of the XML format is not supported.
     $this->markTestSkipped();
   }
@@ -159,7 +159,7 @@ public function testPost() {
   /**
    * {@inheritdoc}
    */
-  public function testPatch() {
+  public function testPatch(): void {
     // Deserialization of the XML format is not supported.
     $this->markTestSkipped();
   }
diff --git a/core/modules/rest/tests/src/Functional/FileUploadResourceTestBase.php b/core/modules/rest/tests/src/Functional/FileUploadResourceTestBase.php
index 965ef778a51d..1dfe440577c5 100644
--- a/core/modules/rest/tests/src/Functional/FileUploadResourceTestBase.php
+++ b/core/modules/rest/tests/src/Functional/FileUploadResourceTestBase.php
@@ -166,7 +166,7 @@ protected function setUp(): void {
   /**
    * Tests using the file upload POST route.
    */
-  public function testPostFileUpload() {
+  public function testPostFileUpload(): void {
     $this->initAuthentication();
 
     $this->provisionResource([static::$format], static::$auth ? [static::$auth] : [], ['POST']);
@@ -257,7 +257,7 @@ protected function getNormalizedPostEntity() {
   /**
    * Tests using the file upload POST route with invalid headers.
    */
-  public function testPostFileUploadInvalidHeaders() {
+  public function testPostFileUploadInvalidHeaders(): void {
     $this->initAuthentication();
 
     $this->provisionResource([static::$format], static::$auth ? [static::$auth] : [], ['POST']);
@@ -299,7 +299,7 @@ public function testPostFileUploadInvalidHeaders() {
    *
    * A new file should be created with a suffixed name.
    */
-  public function testPostFileUploadDuplicateFile() {
+  public function testPostFileUploadDuplicateFile(): void {
     $this->initAuthentication();
 
     $this->provisionResource([static::$format], static::$auth ? [static::$auth] : [], ['POST']);
@@ -332,7 +332,7 @@ public function testPostFileUploadDuplicateFile() {
    *
    * A validation error should occur when the filenames are not unique.
    */
-  public function testPostFileUploadDuplicateFileRaceCondition() {
+  public function testPostFileUploadDuplicateFileRaceCondition(): void {
     $this->initAuthentication();
 
     $this->provisionResource([static::$format], static::$auth ? [static::$auth] : [], ['POST']);
@@ -363,7 +363,7 @@ public function testPostFileUploadDuplicateFileRaceCondition() {
    *
    * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition#Directives
    */
-  public function testFileUploadStrippedFilePath() {
+  public function testFileUploadStrippedFilePath(): void {
     $this->initAuthentication();
 
     $this->provisionResource([static::$format], static::$auth ? [static::$auth] : [], ['POST']);
@@ -412,7 +412,7 @@ public function testFileUploadStrippedFilePath() {
   /**
    * Tests using the file upload route with a unicode file name.
    */
-  public function testFileUploadUnicodeFilename() {
+  public function testFileUploadUnicodeFilename(): void {
     $this->initAuthentication();
 
     $this->provisionResource([static::$format], static::$auth ? [static::$auth] : [], ['POST']);
@@ -433,7 +433,7 @@ public function testFileUploadUnicodeFilename() {
   /**
    * Tests using the file upload route with a zero byte file.
    */
-  public function testFileUploadZeroByteFile() {
+  public function testFileUploadZeroByteFile(): void {
     $this->initAuthentication();
 
     $this->provisionResource([static::$format], static::$auth ? [static::$auth] : [], ['POST']);
@@ -457,7 +457,7 @@ public function testFileUploadZeroByteFile() {
   /**
    * Tests using the file upload route with an invalid file type.
    */
-  public function testFileUploadInvalidFileType() {
+  public function testFileUploadInvalidFileType(): void {
     $this->initAuthentication();
 
     $this->provisionResource([static::$format], static::$auth ? [static::$auth] : [], ['POST']);
@@ -478,7 +478,7 @@ public function testFileUploadInvalidFileType() {
   /**
    * Tests using the file upload route with a file size larger than allowed.
    */
-  public function testFileUploadLargerFileSize() {
+  public function testFileUploadLargerFileSize(): void {
     // Set a limit of 50 bytes.
     $this->field->setSetting('max_filesize', 50)
       ->save();
@@ -504,7 +504,7 @@ public function testFileUploadLargerFileSize() {
   /**
    * Tests using the file upload POST route with malicious extensions.
    */
-  public function testFileUploadMaliciousExtension() {
+  public function testFileUploadMaliciousExtension(): void {
     $this->initAuthentication();
 
     $this->provisionResource([static::$format], static::$auth ? [static::$auth] : [], ['POST']);
@@ -632,7 +632,7 @@ public function testFileUploadMaliciousExtension() {
   /**
    * Tests using the file upload POST route no extension configured.
    */
-  public function testFileUploadNoExtensionSetting() {
+  public function testFileUploadNoExtensionSetting(): void {
     $this->initAuthentication();
 
     $this->provisionResource([static::$format], static::$auth ? [static::$auth] : [], ['POST']);
diff --git a/core/modules/rest/tests/src/Functional/ResourceTest.php b/core/modules/rest/tests/src/Functional/ResourceTest.php
index 0d48efc6325a..995ad4094672 100644
--- a/core/modules/rest/tests/src/Functional/ResourceTest.php
+++ b/core/modules/rest/tests/src/Functional/ResourceTest.php
@@ -66,7 +66,7 @@ protected function setUp(): void {
   /**
    * Tests that a resource without formats cannot be enabled.
    */
-  public function testFormats() {
+  public function testFormats(): void {
     RestResourceConfig::create([
       'id' => 'entity.entity_test',
       'granularity' => RestResourceConfigInterface::METHOD_GRANULARITY,
@@ -92,7 +92,7 @@ public function testFormats() {
   /**
    * Tests that a resource without authentication cannot be enabled.
    */
-  public function testAuthentication() {
+  public function testAuthentication(): void {
     RestResourceConfig::create([
       'id' => 'entity.entity_test',
       'granularity' => RestResourceConfigInterface::METHOD_GRANULARITY,
@@ -118,7 +118,7 @@ public function testAuthentication() {
   /**
    * Tests that serialization_class is optional.
    */
-  public function testSerializationClassIsOptional() {
+  public function testSerializationClassIsOptional(): void {
     RestResourceConfig::create([
       'id' => 'serialization_test',
       'granularity' => RestResourceConfigInterface::METHOD_GRANULARITY,
@@ -154,7 +154,7 @@ public function testSerializationClassIsOptional() {
   /**
    * Tests that resource URI paths are formatted properly.
    */
-  public function testUriPaths() {
+  public function testUriPaths(): void {
     /** @var \Drupal\rest\Plugin\Type\ResourcePluginManager $manager */
     $manager = \Drupal::service('plugin.manager.rest');
 
diff --git a/core/modules/rest/tests/src/Functional/Views/ExcludedFieldTokenTest.php b/core/modules/rest/tests/src/Functional/Views/ExcludedFieldTokenTest.php
index 36e214544f3a..fb95cd8b2037 100644
--- a/core/modules/rest/tests/src/Functional/Views/ExcludedFieldTokenTest.php
+++ b/core/modules/rest/tests/src/Functional/Views/ExcludedFieldTokenTest.php
@@ -69,7 +69,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['rest_test_views
   /**
    * Tests the display of an excluded title field when used as a token.
    */
-  public function testExcludedTitleTokenDisplay() {
+  public function testExcludedTitleTokenDisplay(): void {
     $actual_json = $this->drupalGet($this->view->getPath(), ['query' => ['_format' => 'json']]);
     $this->assertSession()->statusCodeEquals(200);
 
diff --git a/core/modules/rest/tests/src/Functional/Views/FieldCounterTest.php b/core/modules/rest/tests/src/Functional/Views/FieldCounterTest.php
index b27171ff04d3..8c1e6781e49d 100644
--- a/core/modules/rest/tests/src/Functional/Views/FieldCounterTest.php
+++ b/core/modules/rest/tests/src/Functional/Views/FieldCounterTest.php
@@ -69,7 +69,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['rest_test_views
   /**
    * Tests the display of an excluded title field when used as a token.
    */
-  public function testExcludedTitleTokenDisplay() {
+  public function testExcludedTitleTokenDisplay(): void {
     $actual_json = $this->drupalGet($this->view->getPath(), ['query' => ['_format' => 'json']]);
     $this->assertSession()->statusCodeEquals(200);
 
diff --git a/core/modules/rest/tests/src/Functional/Views/RestExportAuthTest.php b/core/modules/rest/tests/src/Functional/Views/RestExportAuthTest.php
index 17ce69c425b5..4e1ef2bd0dca 100644
--- a/core/modules/rest/tests/src/Functional/Views/RestExportAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/Views/RestExportAuthTest.php
@@ -38,7 +38,7 @@ protected function setUp($import_test_views = TRUE, $modules = []): void {
    *
    * @link https://www.drupal.org/node/2825204
    */
-  public function testAuthProvidersOptions() {
+  public function testAuthProvidersOptions(): void {
     $view_id = 'test_view_rest_export';
     $view_label = 'Test view (REST export)';
     $view_display = 'rest_export_1';
diff --git a/core/modules/rest/tests/src/Functional/Views/StyleSerializerEntityTest.php b/core/modules/rest/tests/src/Functional/Views/StyleSerializerEntityTest.php
index 8013d9c00408..2a4005a510b5 100644
--- a/core/modules/rest/tests/src/Functional/Views/StyleSerializerEntityTest.php
+++ b/core/modules/rest/tests/src/Functional/Views/StyleSerializerEntityTest.php
@@ -95,7 +95,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['rest_test_views
   /**
    * Checks the behavior of the Serializer callback paths and row plugins.
    */
-  public function testSerializerResponses() {
+  public function testSerializerResponses(): void {
     // Test the serialize callback.
     $view = Views::getView('test_serializer_display_field');
     $view->initDisplay();
@@ -217,7 +217,7 @@ protected function addRequestWithFormat($format) {
   /**
    * Tests REST export with views render caching enabled.
    */
-  public function testRestRenderCaching() {
+  public function testRestRenderCaching(): void {
     $this->drupalLogin($this->adminUser);
     /** @var \Drupal\Core\Render\RenderCacheInterface $render_cache */
     $render_cache = \Drupal::service('render_cache');
@@ -308,7 +308,7 @@ public function testRestRenderCaching() {
   /**
    * Tests the response format configuration.
    */
-  public function testResponseFormatConfiguration() {
+  public function testResponseFormatConfiguration(): void {
     $this->drupalLogin($this->adminUser);
 
     $style_options = 'admin/structure/views/nojs/display/test_serializer_display_field/rest_export_1/style_options';
@@ -383,7 +383,7 @@ public function testResponseFormatConfiguration() {
   /**
    * Tests the field ID alias functionality of the DataFieldRow plugin.
    */
-  public function testUIFieldAlias() {
+  public function testUIFieldAlias(): void {
     $this->drupalLogin($this->adminUser);
 
     // Test the UI settings for adding field ID aliases.
@@ -453,7 +453,7 @@ public function testUIFieldAlias() {
   /**
    * Tests the raw output options for row field rendering.
    */
-  public function testFieldRawOutput() {
+  public function testFieldRawOutput(): void {
     $this->drupalLogin($this->adminUser);
 
     // Test the UI settings for adding field ID aliases.
@@ -520,7 +520,7 @@ public function testFieldRawOutput() {
   /**
    * Tests the live preview output for json output.
    */
-  public function testLivePreview() {
+  public function testLivePreview(): void {
     // We set up a request so it looks like a request in the live preview.
     $request = new Request();
     $request->query->add([MainContentViewSubscriber::WRAPPER_FORMAT => 'drupal_ajax']);
@@ -574,7 +574,7 @@ public function testLivePreview() {
   /**
    * Tests the views interface for REST export displays.
    */
-  public function testSerializerViewsUI() {
+  public function testSerializerViewsUI(): void {
     $this->drupalLogin($this->adminUser);
     // Click the "Update preview button".
     $this->drupalGet('admin/structure/views/view/test_serializer_display_field/edit/rest_export_1');
diff --git a/core/modules/rest/tests/src/Functional/Views/StyleSerializerTest.php b/core/modules/rest/tests/src/Functional/Views/StyleSerializerTest.php
index 4fdbce90d98d..ef0f22372f46 100644
--- a/core/modules/rest/tests/src/Functional/Views/StyleSerializerTest.php
+++ b/core/modules/rest/tests/src/Functional/Views/StyleSerializerTest.php
@@ -87,7 +87,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['rest_test_views
   /**
    * Checks that the auth options restricts access to a REST views display.
    */
-  public function testRestViewsAuthentication() {
+  public function testRestViewsAuthentication(): void {
     // Assume the view is hidden behind a permission.
     $this->drupalGet('test/serialize/auth_with_perm', ['query' => ['_format' => 'json']]);
     $this->assertSession()->statusCodeEquals(401);
@@ -118,7 +118,7 @@ public function testRestViewsAuthentication() {
   /**
    * Verifies REST export views work on the same path as a page display.
    */
-  public function testSharedPagePath() {
+  public function testSharedPagePath(): void {
     // Test with no format as well as html explicitly.
     $this->drupalGet('test/serialize/shared');
     $this->assertSession()->statusCodeEquals(200);
@@ -140,7 +140,7 @@ public function testSharedPagePath() {
   /**
    * Verifies site maintenance mode functionality.
    */
-  public function testSiteMaintenance() {
+  public function testSiteMaintenance(): void {
     $view = Views::getView('test_serializer_display_field');
     $view->initDisplay();
     $this->executeView($view);
@@ -170,7 +170,7 @@ protected function addRequestWithFormat($format) {
   /**
    * Tests the "Grouped rows" functionality.
    */
-  public function testGroupRows() {
+  public function testGroupRows(): void {
     $this->drupalCreateContentType(['type' => 'page']);
     // Create a text field with cardinality set to unlimited.
     $field_name = 'field_group_rows';
@@ -235,7 +235,7 @@ public function testGroupRows() {
    * parameter. This is set to filter nodes by those whose title starts with
    * the value provided.
    */
-  public function testRestViewExposedFilter() {
+  public function testRestViewExposedFilter(): void {
     $this->drupalCreateContentType(['type' => 'page']);
     $node0 = $this->drupalCreateNode(['title' => 'Node 1']);
     $node1 = $this->drupalCreateNode(['title' => 'Node 11']);
@@ -291,7 +291,7 @@ public function testRestViewExposedFilter() {
   /**
    * Tests multilingual entity rows.
    */
-  public function testMulEntityRows() {
+  public function testMulEntityRows(): void {
     // Create some languages.
     ConfigurableLanguage::createFromLangcode('l1')->save();
     ConfigurableLanguage::createFromLangcode('l2')->save();
diff --git a/core/modules/rest/tests/src/Kernel/Entity/ConfigDependenciesTest.php b/core/modules/rest/tests/src/Kernel/Entity/ConfigDependenciesTest.php
index f5c4c2e32fe1..57ec99bd49b5 100644
--- a/core/modules/rest/tests/src/Kernel/Entity/ConfigDependenciesTest.php
+++ b/core/modules/rest/tests/src/Kernel/Entity/ConfigDependenciesTest.php
@@ -26,7 +26,7 @@ class ConfigDependenciesTest extends KernelTestBase {
    *
    * @dataProvider providerBasicDependencies
    */
-  public function testCalculateDependencies(array $configuration) {
+  public function testCalculateDependencies(array $configuration): void {
     $config_dependencies = new ConfigDependencies(['json' => 'serialization'], ['basic_auth' => 'basic_auth']);
 
     $rest_config = RestResourceConfig::create($configuration);
@@ -44,7 +44,7 @@ public function testCalculateDependencies(array $configuration) {
    *
    * @dataProvider providerBasicDependencies
    */
-  public function testOnDependencyRemovalRemoveUnrelatedDependency(array $configuration) {
+  public function testOnDependencyRemovalRemoveUnrelatedDependency(array $configuration): void {
     $config_dependencies = new ConfigDependencies(['json' => 'serialization'], ['basic_auth' => 'basic_auth']);
 
     $rest_config = RestResourceConfig::create($configuration);
@@ -94,7 +94,7 @@ public static function providerBasicDependencies() {
    * @covers ::onDependencyRemoval
    * @covers ::onDependencyRemovalForMethodGranularity
    */
-  public function testOnDependencyRemovalRemoveAuth() {
+  public function testOnDependencyRemovalRemoveAuth(): void {
     $config_dependencies = new ConfigDependencies(['json' => 'serialization'], ['basic_auth' => 'basic_auth']);
 
     $rest_config = RestResourceConfig::create([
@@ -132,7 +132,7 @@ public function testOnDependencyRemovalRemoveAuth() {
    *
    * @dataProvider providerOnDependencyRemovalForResourceGranularity
    */
-  public function testOnDependencyRemovalForResourceGranularity(array $configuration, $module, $expected_configuration) {
+  public function testOnDependencyRemovalForResourceGranularity(array $configuration, $module, $expected_configuration): void {
     assert(is_string($module));
     assert($expected_configuration === FALSE || is_array($expected_configuration));
 
diff --git a/core/modules/rest/tests/src/Kernel/Entity/RestPermissionsTest.php b/core/modules/rest/tests/src/Kernel/Entity/RestPermissionsTest.php
index 44a6599ed129..47278149d899 100644
--- a/core/modules/rest/tests/src/Kernel/Entity/RestPermissionsTest.php
+++ b/core/modules/rest/tests/src/Kernel/Entity/RestPermissionsTest.php
@@ -29,7 +29,7 @@ class RestPermissionsTest extends KernelTestBase {
   /**
    * @covers ::permissions
    */
-  public function testPermissions() {
+  public function testPermissions(): void {
     RestResourceConfig::create([
       'id' => 'dblog',
       'plugin_id' => 'dblog',
diff --git a/core/modules/rest/tests/src/Kernel/Entity/RestResourceConfigTest.php b/core/modules/rest/tests/src/Kernel/Entity/RestResourceConfigTest.php
index 92c649e0cdc0..d5d7d2a77274 100644
--- a/core/modules/rest/tests/src/Kernel/Entity/RestResourceConfigTest.php
+++ b/core/modules/rest/tests/src/Kernel/Entity/RestResourceConfigTest.php
@@ -29,7 +29,7 @@ class RestResourceConfigTest extends KernelTestBase {
   /**
    * @covers ::calculateDependencies
    */
-  public function testCalculateDependencies() {
+  public function testCalculateDependencies(): void {
     $rest_config = RestResourceConfig::create([
       'plugin_id' => 'entity:entity_test',
       'granularity' => RestResourceConfigInterface::METHOD_GRANULARITY,
diff --git a/core/modules/rest/tests/src/Kernel/EntityResource/EntityResourceRestTestCoverageTest.php b/core/modules/rest/tests/src/Kernel/EntityResource/EntityResourceRestTestCoverageTest.php
index 7a93905a1406..60f65f990a51 100644
--- a/core/modules/rest/tests/src/Kernel/EntityResource/EntityResourceRestTestCoverageTest.php
+++ b/core/modules/rest/tests/src/Kernel/EntityResource/EntityResourceRestTestCoverageTest.php
@@ -67,7 +67,7 @@ protected function setUp(): void {
   /**
    * Tests that all core content/config entity types have REST test coverage.
    */
-  public function testEntityTypeRestTestCoverage() {
+  public function testEntityTypeRestTestCoverage(): void {
     $tests = [
       // Test coverage for formats provided by the 'serialization' module.
       'serialization' => [
diff --git a/core/modules/rest/tests/src/Kernel/RequestHandlerTest.php b/core/modules/rest/tests/src/Kernel/RequestHandlerTest.php
index e142e6eaffb2..81b9aba8817f 100644
--- a/core/modules/rest/tests/src/Kernel/RequestHandlerTest.php
+++ b/core/modules/rest/tests/src/Kernel/RequestHandlerTest.php
@@ -54,7 +54,7 @@ protected function setUp(): void {
   /**
    * @covers ::handle
    */
-  public function testHandle() {
+  public function testHandle(): void {
     $request = new Request([], [], [], [], [], ['CONTENT_TYPE' => 'application/json'], Json::encode(['this is an array']));
     $route_match = new RouteMatch('test', (new Route('/rest/test', ['_rest_resource_config' => 'rest_plugin', 'example' => ''], ['_format' => 'json']))->setMethods(['GET']));
 
diff --git a/core/modules/rest/tests/src/Kernel/Views/RestExportTest.php b/core/modules/rest/tests/src/Kernel/Views/RestExportTest.php
index 11f301855352..0222baf5765d 100644
--- a/core/modules/rest/tests/src/Kernel/Views/RestExportTest.php
+++ b/core/modules/rest/tests/src/Kernel/Views/RestExportTest.php
@@ -46,7 +46,7 @@ protected function setUp($import_test_views = TRUE): void {
   /**
    * @covers ::buildResponse
    */
-  public function testBuildResponse() {
+  public function testBuildResponse(): void {
     /** @var \Drupal\views\Entity\View $view */
     $view = View::load('test_serializer_display_entity');
     $display = &$view->getDisplay('rest_export_1');
diff --git a/core/modules/rest/tests/src/Kernel/Views/StyleSerializerKernelTest.php b/core/modules/rest/tests/src/Kernel/Views/StyleSerializerKernelTest.php
index db0499a7563c..83c9a010dddb 100644
--- a/core/modules/rest/tests/src/Kernel/Views/StyleSerializerKernelTest.php
+++ b/core/modules/rest/tests/src/Kernel/Views/StyleSerializerKernelTest.php
@@ -36,7 +36,7 @@ protected function setUp($import_test_views = TRUE): void {
   /**
    * @covers ::calculateDependencies
    */
-  public function testCalculateDependencies() {
+  public function testCalculateDependencies(): void {
     /** @var \Drupal\views\Entity\View $view */
     $view = View::load('test_serializer_display_entity');
     $display = &$view->getDisplay('rest_export_1');
diff --git a/core/modules/rest/tests/src/Unit/CollectRoutesTest.php b/core/modules/rest/tests/src/Unit/CollectRoutesTest.php
index 7ef03be11164..a6c0e88f3b25 100644
--- a/core/modules/rest/tests/src/Unit/CollectRoutesTest.php
+++ b/core/modules/rest/tests/src/Unit/CollectRoutesTest.php
@@ -143,7 +143,7 @@ protected function setUp(): void {
   /**
    * Tests if adding a requirement to a route only modify one route.
    */
-  public function testRoutesRequirements() {
+  public function testRoutesRequirements(): void {
     $this->restExport->collectRoutes($this->routes);
 
     $requirements_1 = $this->routes->get('test_1')->getRequirements();
diff --git a/core/modules/rest/tests/src/Unit/Entity/RestResourceConfigTest.php b/core/modules/rest/tests/src/Unit/Entity/RestResourceConfigTest.php
index 50ad05eb9c82..e02339fa2db8 100644
--- a/core/modules/rest/tests/src/Unit/Entity/RestResourceConfigTest.php
+++ b/core/modules/rest/tests/src/Unit/Entity/RestResourceConfigTest.php
@@ -21,7 +21,7 @@ class RestResourceConfigTest extends UnitTestCase {
    * This also tests that no exceptions are thrown during that method so that
    * alternate methods such as OPTIONS and PUT are supported.
    */
-  public function testNormalizeRestMethod() {
+  public function testNormalizeRestMethod(): void {
     $expected = ['GET', 'PUT', 'POST', 'PATCH', 'DELETE', 'OPTIONS', 'FOO'];
     $methods = ['get', 'put', 'post', 'patch', 'delete', 'options', 'foo'];
     $configuration = [];
diff --git a/core/modules/rest/tests/src/Unit/EntityResourceValidationTraitTest.php b/core/modules/rest/tests/src/Unit/EntityResourceValidationTraitTest.php
index e809f8eba00d..8833ae22163e 100644
--- a/core/modules/rest/tests/src/Unit/EntityResourceValidationTraitTest.php
+++ b/core/modules/rest/tests/src/Unit/EntityResourceValidationTraitTest.php
@@ -21,7 +21,7 @@ class EntityResourceValidationTraitTest extends UnitTestCase {
   /**
    * @covers ::validate
    */
-  public function testValidate() {
+  public function testValidate(): void {
     $trait = new EntityResourceValidationTraitTestClass();
 
     $method = new \ReflectionMethod($trait, 'validate');
@@ -39,7 +39,7 @@ public function testValidate() {
   /**
    * @covers ::validate
    */
-  public function testFailedValidate() {
+  public function testFailedValidate(): void {
     $violation1 = $this->prophesize(ConstraintViolationInterface::class);
     $violation1->getPropertyPath()->willReturn('property_path');
     $violation1->getMessage()->willReturn('message');
diff --git a/core/modules/rest/tests/src/Unit/EventSubscriber/ResourceResponseSubscriberTest.php b/core/modules/rest/tests/src/Unit/EventSubscriber/ResourceResponseSubscriberTest.php
index 85eb1820f580..fd7abd2198cd 100644
--- a/core/modules/rest/tests/src/Unit/EventSubscriber/ResourceResponseSubscriberTest.php
+++ b/core/modules/rest/tests/src/Unit/EventSubscriber/ResourceResponseSubscriberTest.php
@@ -35,7 +35,7 @@ class ResourceResponseSubscriberTest extends UnitTestCase {
    * @covers ::onResponse
    * @dataProvider providerTestSerialization
    */
-  public function testSerialization($data, $expected_response = FALSE) {
+  public function testSerialization($data, $expected_response = FALSE): void {
     $request = new Request();
     $route_match = new RouteMatch('test', new Route('/rest/test', ['_rest_resource_config' => 'rest_plugin'], ['_format' => 'json']));
 
@@ -79,7 +79,7 @@ public static function providerTestSerialization() {
    * @covers ::getResponseFormat
    * @dataProvider providerTestResponseFormat
    */
-  public function testResponseFormat($methods, array $supported_response_formats, array $supported_request_formats, $request_format, array $request_headers, $request_body, $expected_response_format, $expected_response_content_type, $expected_response_content) {
+  public function testResponseFormat($methods, array $supported_response_formats, array $supported_request_formats, $request_format, array $request_headers, $request_body, $expected_response_format, $expected_response_content_type, $expected_response_content): void {
     foreach ($request_headers as $key => $value) {
       unset($request_headers[$key]);
       $key = strtoupper(str_replace('-', '_', $key));
@@ -116,7 +116,7 @@ public function testResponseFormat($methods, array $supported_response_formats,
    *
    * @dataProvider providerTestResponseFormat
    */
-  public function testOnResponseWithCacheableResponse($methods, array $supported_response_formats, array $supported_request_formats, $request_format, array $request_headers, $request_body, $expected_response_format, $expected_response_content_type, $expected_response_content) {
+  public function testOnResponseWithCacheableResponse($methods, array $supported_response_formats, array $supported_request_formats, $request_format, array $request_headers, $request_body, $expected_response_format, $expected_response_content_type, $expected_response_content): void {
     foreach ($request_headers as $key => $value) {
       unset($request_headers[$key]);
       $key = strtoupper(str_replace('-', '_', $key));
@@ -166,7 +166,7 @@ public function testOnResponseWithCacheableResponse($methods, array $supported_r
    *
    * @dataProvider providerTestResponseFormat
    */
-  public function testOnResponseWithUncacheableResponse($methods, array $supported_response_formats, array $supported_request_formats, $request_format, array $request_headers, $request_body, $expected_response_format, $expected_response_content_type, $expected_response_content) {
+  public function testOnResponseWithUncacheableResponse($methods, array $supported_response_formats, array $supported_request_formats, $request_format, array $request_headers, $request_body, $expected_response_format, $expected_response_content_type, $expected_response_content): void {
     foreach ($request_headers as $key => $value) {
       unset($request_headers[$key]);
       $key = strtoupper(str_replace('-', '_', $key));
diff --git a/core/modules/rest/tests/src/Unit/Plugin/views/style/SerializerTest.php b/core/modules/rest/tests/src/Unit/Plugin/views/style/SerializerTest.php
index 0f3eee1a3a7d..d01df6eb2d82 100644
--- a/core/modules/rest/tests/src/Unit/Plugin/views/style/SerializerTest.php
+++ b/core/modules/rest/tests/src/Unit/Plugin/views/style/SerializerTest.php
@@ -59,7 +59,7 @@ protected function setUp(): void {
    *
    * @covers ::render
    */
-  public function testSerializerReceivesOptions() {
+  public function testSerializerReceivesOptions(): void {
     $mock_serializer = $this->prophesize(SerializerInterface::class);
 
     // This is the main expectation of the test. We want to make sure the
diff --git a/core/modules/search/tests/src/Functional/SearchAdminThemeTest.php b/core/modules/search/tests/src/Functional/SearchAdminThemeTest.php
index 177d1ecae32d..8460274298c8 100644
--- a/core/modules/search/tests/src/Functional/SearchAdminThemeTest.php
+++ b/core/modules/search/tests/src/Functional/SearchAdminThemeTest.php
@@ -71,7 +71,7 @@ protected function setUp(): void {
    * @see \Drupal\search_extra_type\Plugin\Search\SearchExtraTypeSearch
    * @see \Drupal\user\Plugin\Search\UserSearch
    */
-  public function testSearchUsingAdminTheme() {
+  public function testSearchUsingAdminTheme(): void {
     /** @var \Drupal\search\SearchPageRepositoryInterface $repository */
     $repository = \Drupal::service('search.search_page_repository');
     $pages = $repository->getActiveSearchPages();
diff --git a/core/modules/search/tests/src/Functional/SearchAdvancedSearchFormTest.php b/core/modules/search/tests/src/Functional/SearchAdvancedSearchFormTest.php
index d8d1cd7fd1f5..f8fb12383290 100644
--- a/core/modules/search/tests/src/Functional/SearchAdvancedSearchFormTest.php
+++ b/core/modules/search/tests/src/Functional/SearchAdvancedSearchFormTest.php
@@ -58,7 +58,7 @@ protected function setUp(): void {
   /**
    * Tests advanced search by node type.
    */
-  public function testNodeType() {
+  public function testNodeType(): void {
     // Verify some properties of the node that was created.
     $this->assertSame('page', $this->node->getType(), 'Node type is Basic page.');
     $dummy_title = 'Lorem ipsum';
@@ -91,7 +91,7 @@ public function testNodeType() {
   /**
    * Tests that after submitting the advanced search form, the form is refilled.
    */
-  public function testFormRefill() {
+  public function testFormRefill(): void {
     $edit = [
       'keys' => 'cat',
       'or' => 'dog gerbil',
diff --git a/core/modules/search/tests/src/Functional/SearchBlockTest.php b/core/modules/search/tests/src/Functional/SearchBlockTest.php
index 1fbda4bb7eeb..44bd0783960e 100644
--- a/core/modules/search/tests/src/Functional/SearchBlockTest.php
+++ b/core/modules/search/tests/src/Functional/SearchBlockTest.php
@@ -50,7 +50,7 @@ protected function setUp(): void {
   /**
    * Tests that the search form block can be placed and works.
    */
-  public function testSearchFormBlock() {
+  public function testSearchFormBlock(): void {
 
     // Test availability of the search block in the admin "Place blocks" list.
     $this->drupalGet('admin/structure/block');
diff --git a/core/modules/search/tests/src/Functional/SearchCommentCountToggleTest.php b/core/modules/search/tests/src/Functional/SearchCommentCountToggleTest.php
index 2312b33edee2..261df5bafeab 100644
--- a/core/modules/search/tests/src/Functional/SearchCommentCountToggleTest.php
+++ b/core/modules/search/tests/src/Functional/SearchCommentCountToggleTest.php
@@ -92,7 +92,7 @@ protected function setUp(): void {
   /**
    * Verify that comment count display toggles properly on comment status of node.
    */
-  public function testSearchCommentCountToggle() {
+  public function testSearchCommentCountToggle(): void {
     // Search for the nodes by string in the node body.
     $edit = [
       'keys' => "'SearchCommentToggleTestCase'",
diff --git a/core/modules/search/tests/src/Functional/SearchCommentTest.php b/core/modules/search/tests/src/Functional/SearchCommentTest.php
index 89928169ed58..60acdbb94116 100644
--- a/core/modules/search/tests/src/Functional/SearchCommentTest.php
+++ b/core/modules/search/tests/src/Functional/SearchCommentTest.php
@@ -98,7 +98,7 @@ protected function setUp(): void {
   /**
    * Verify that comments are rendered using proper format in search results.
    */
-  public function testSearchResultsComment() {
+  public function testSearchResultsComment(): void {
     $node_storage = $this->container->get('entity_type.manager')->getStorage('node');
     // Create basic_html format that escapes all HTML.
     $basic_html_format = FilterFormat::create([
@@ -240,7 +240,7 @@ public function testSearchResultsComment() {
   /**
    * Verify access rules for comment indexing with different permissions.
    */
-  public function testSearchResultsCommentAccess() {
+  public function testSearchResultsCommentAccess(): void {
     $comment_body = 'Test comment body';
     $this->commentSubject = 'Test comment subject';
     $roles = $this->adminUser->getRoles(TRUE);
@@ -344,7 +344,7 @@ public function assertCommentAccess(bool $assume_access, string $message): void
   /**
    * Verify that 'add new comment' does not appear in search results or index.
    */
-  public function testAddNewComment() {
+  public function testAddNewComment(): void {
     // Create a node with a short body.
     $settings = [
       'type' => 'article',
diff --git a/core/modules/search/tests/src/Functional/SearchConfigSettingsFormTest.php b/core/modules/search/tests/src/Functional/SearchConfigSettingsFormTest.php
index 76d15dd12b79..13f03b95ed44 100644
--- a/core/modules/search/tests/src/Functional/SearchConfigSettingsFormTest.php
+++ b/core/modules/search/tests/src/Functional/SearchConfigSettingsFormTest.php
@@ -90,7 +90,7 @@ protected function setUp(): void {
   /**
    * Verifies the search settings form.
    */
-  public function testSearchSettingsPage() {
+  public function testSearchSettingsPage(): void {
 
     // Test that the settings form displays the correct count of items left to index.
     $this->drupalGet('admin/config/search/pages');
@@ -142,7 +142,7 @@ public function testSearchSettingsPage() {
   /**
    * Verifies plugin-supplied settings form.
    */
-  public function testSearchModuleSettingsPage() {
+  public function testSearchModuleSettingsPage(): void {
     $this->drupalGet('admin/config/search/pages');
     $this->clickLink('Edit', 1);
 
@@ -164,7 +164,7 @@ public function testSearchModuleSettingsPage() {
   /**
    * Verifies that you can disable individual search plugins.
    */
-  public function testSearchModuleDisabling() {
+  public function testSearchModuleDisabling(): void {
     // Array of search plugins to test: 'keys' are the keywords to search for,
     // and 'text' is the text to assert is on the results page.
     $plugin_info = [
@@ -253,7 +253,7 @@ public function testSearchModuleDisabling() {
   /**
    * Tests the ordering of search pages on a clean install.
    */
-  public function testDefaultSearchPageOrdering() {
+  public function testDefaultSearchPageOrdering(): void {
     $this->drupalGet('search');
     $elements = $this->xpath('//div[@id="block-local-tasks"]//a');
     $this->assertSame(Url::fromRoute('search.view_node_search')->toString(), $elements[0]->getAttribute('href'));
@@ -264,7 +264,7 @@ public function testDefaultSearchPageOrdering() {
   /**
    * Tests multiple search pages of the same type.
    */
-  public function testMultipleSearchPages() {
+  public function testMultipleSearchPages(): void {
     $this->assertDefaultSearch('node_search', 'The default page is set to the installer default.');
     $search_storage = \Drupal::entityTypeManager()->getStorage('search_page');
     $entities = $search_storage->loadMultiple();
@@ -361,7 +361,7 @@ public function testMultipleSearchPages() {
   /**
    * Tests that the enable/disable/default routes are protected from CSRF.
    */
-  public function testRouteProtection() {
+  public function testRouteProtection(): void {
     // Ensure that the enable and disable routes are protected.
     $this->drupalGet('admin/config/search/pages/manage/node_search/enable');
     $this->assertSession()->statusCodeEquals(403);
diff --git a/core/modules/search/tests/src/Functional/SearchDateIntervalTest.php b/core/modules/search/tests/src/Functional/SearchDateIntervalTest.php
index 8d0b7fb29441..8e16f5efc6ca 100644
--- a/core/modules/search/tests/src/Functional/SearchDateIntervalTest.php
+++ b/core/modules/search/tests/src/Functional/SearchDateIntervalTest.php
@@ -84,7 +84,7 @@ protected function setUp(): void {
   /**
    * Tests searching with date filters that exclude some translations.
    */
-  public function testDateIntervalQueryAlter() {
+  public function testDateIntervalQueryAlter(): void {
     // Search for keyword node.
     $edit = ['keys' => 'node'];
     $this->drupalGet('search/node');
diff --git a/core/modules/search/tests/src/Functional/SearchEmbedFormTest.php b/core/modules/search/tests/src/Functional/SearchEmbedFormTest.php
index ed39c4281431..7052475e7fc7 100644
--- a/core/modules/search/tests/src/Functional/SearchEmbedFormTest.php
+++ b/core/modules/search/tests/src/Functional/SearchEmbedFormTest.php
@@ -65,7 +65,7 @@ protected function setUp(): void {
   /**
    * Tests that the embedded form appears and can be submitted.
    */
-  public function testEmbeddedForm() {
+  public function testEmbeddedForm(): void {
     // First verify we can submit the form from the module's page.
     $this->drupalGet('search_embedded_form');
     $this->submitForm(['name' => 'John'], 'Send away');
diff --git a/core/modules/search/tests/src/Functional/SearchExactTest.php b/core/modules/search/tests/src/Functional/SearchExactTest.php
index 32eda7ae1aa6..33b6b8a72efb 100644
--- a/core/modules/search/tests/src/Functional/SearchExactTest.php
+++ b/core/modules/search/tests/src/Functional/SearchExactTest.php
@@ -26,7 +26,7 @@ class SearchExactTest extends BrowserTestBase {
   /**
    * Tests that the correct number of pager links are found for both keywords and phrases.
    */
-  public function testExactQuery() {
+  public function testExactQuery(): void {
     $this->drupalCreateContentType(['type' => 'page', 'name' => 'Basic page']);
 
     // Log in with sufficient privileges.
diff --git a/core/modules/search/tests/src/Functional/SearchKeywordsConditionsTest.php b/core/modules/search/tests/src/Functional/SearchKeywordsConditionsTest.php
index be371c5ac7bc..5f9895da1abb 100644
--- a/core/modules/search/tests/src/Functional/SearchKeywordsConditionsTest.php
+++ b/core/modules/search/tests/src/Functional/SearchKeywordsConditionsTest.php
@@ -60,7 +60,7 @@ protected function setUp(): void {
   /**
    * Verify the keywords are captured and conditions respected.
    */
-  public function testSearchKeywordsConditions() {
+  public function testSearchKeywordsConditions(): void {
     // No keys, not conditions - no results.
     $this->drupalGet('search/dummy_path');
     $this->assertSession()->pageTextNotContains('Dummy search snippet to display');
diff --git a/core/modules/search/tests/src/Functional/SearchLanguageTest.php b/core/modules/search/tests/src/Functional/SearchLanguageTest.php
index 448a2d2257c0..784a953eb143 100644
--- a/core/modules/search/tests/src/Functional/SearchLanguageTest.php
+++ b/core/modules/search/tests/src/Functional/SearchLanguageTest.php
@@ -105,7 +105,7 @@ protected function setUp(): void {
     $plugin->updateIndex();
   }
 
-  public function testLanguages() {
+  public function testLanguages(): void {
     // Add predefined language.
     $edit = ['predefined_langcode' => 'fr'];
     $this->drupalGet('admin/config/regional/language/add');
@@ -162,7 +162,7 @@ public function testLanguages() {
   /**
    * Test language attribute "lang" for the search results.
    */
-  public function testLanguageAttributes() {
+  public function testLanguageAttributes(): void {
     $this->drupalGet('search/node');
     $this->submitForm(['keys' => 'the Spanish title'], 'Search');
 
diff --git a/core/modules/search/tests/src/Functional/SearchMultilingualEntityTest.php b/core/modules/search/tests/src/Functional/SearchMultilingualEntityTest.php
index 38d1e62aa772..9830e614953b 100644
--- a/core/modules/search/tests/src/Functional/SearchMultilingualEntityTest.php
+++ b/core/modules/search/tests/src/Functional/SearchMultilingualEntityTest.php
@@ -140,7 +140,7 @@ protected function setUp(): void {
   /**
    * Tests the indexing throttle and search results with multilingual nodes.
    */
-  public function testMultilingualSearch() {
+  public function testMultilingualSearch(): void {
     // Index only 2 nodes per cron run. We cannot do this setting in the UI,
     // because it doesn't go this low.
     $this->config('search.settings')->set('index.cron_limit', 2)->save();
diff --git a/core/modules/search/tests/src/Functional/SearchNodeDiacriticsTest.php b/core/modules/search/tests/src/Functional/SearchNodeDiacriticsTest.php
index 1712d43962ba..972f47b6887c 100644
--- a/core/modules/search/tests/src/Functional/SearchNodeDiacriticsTest.php
+++ b/core/modules/search/tests/src/Functional/SearchNodeDiacriticsTest.php
@@ -53,7 +53,7 @@ protected function setUp(): void {
   /**
    * Tests that search returns results with diacritics in the search phrase.
    */
-  public function testPhraseSearchPunctuation() {
+  public function testPhraseSearchPunctuation(): void {
     // cSpell:disable
     $body_text = 'The Enricþment Center is cómmīŦŧęđ to the well BɆĬŇĜ of æll påŔťıçȉpǎǹţș. ';
     $body_text .= 'Also meklēt (see #731298)';
diff --git a/core/modules/search/tests/src/Functional/SearchNodePunctuationTest.php b/core/modules/search/tests/src/Functional/SearchNodePunctuationTest.php
index 0b0848c612ae..e56dd26c42ea 100644
--- a/core/modules/search/tests/src/Functional/SearchNodePunctuationTest.php
+++ b/core/modules/search/tests/src/Functional/SearchNodePunctuationTest.php
@@ -52,7 +52,7 @@ protected function setUp(): void {
   /**
    * Tests that search works with punctuation and HTML entities.
    */
-  public function testPhraseSearchPunctuation() {
+  public function testPhraseSearchPunctuation(): void {
     $node = $this->drupalCreateNode(['body' => [['value' => "The bunny's ears were fluffy."]]]);
     // cSpell:disable-next-line
     $this->drupalCreateNode(['body' => [['value' => 'Dignissim Aliquam &amp; Quieligo meus natu quae quia te. Damnum&copy; erat&mdash; neo pneum. Facilisi feugiat ibidem ratis.']]]);
diff --git a/core/modules/search/tests/src/Functional/SearchNodeUpdateAndDeletionTest.php b/core/modules/search/tests/src/Functional/SearchNodeUpdateAndDeletionTest.php
index dec5ba938600..94a3b86850b1 100644
--- a/core/modules/search/tests/src/Functional/SearchNodeUpdateAndDeletionTest.php
+++ b/core/modules/search/tests/src/Functional/SearchNodeUpdateAndDeletionTest.php
@@ -51,7 +51,7 @@ protected function setUp(): void {
   /**
    * Tests that the search index info is properly updated when a node changes.
    */
-  public function testSearchIndexUpdateOnNodeChange() {
+  public function testSearchIndexUpdateOnNodeChange(): void {
     // Create a node.
     $node = $this->drupalCreateNode([
       'title' => 'Someone who says Ni!',
@@ -88,7 +88,7 @@ public function testSearchIndexUpdateOnNodeChange() {
   /**
    * Tests that the search index info is updated when a node is deleted.
    */
-  public function testSearchIndexUpdateOnNodeDeletion() {
+  public function testSearchIndexUpdateOnNodeDeletion(): void {
     // Create a node.
     $node = $this->drupalCreateNode([
       'title' => 'No dragons here',
diff --git a/core/modules/search/tests/src/Functional/SearchNumberMatchingTest.php b/core/modules/search/tests/src/Functional/SearchNumberMatchingTest.php
index 8fc92c53777b..8b4fcbcc40c8 100644
--- a/core/modules/search/tests/src/Functional/SearchNumberMatchingTest.php
+++ b/core/modules/search/tests/src/Functional/SearchNumberMatchingTest.php
@@ -95,7 +95,7 @@ protected function setUp(): void {
   /**
    * Tests that all the numbers can be searched.
    */
-  public function testNumberSearching() {
+  public function testNumberSearching(): void {
     for ($i = 0; $i < count($this->numbers); $i++) {
       $node = $this->nodes[$i];
 
diff --git a/core/modules/search/tests/src/Functional/SearchNumbersTest.php b/core/modules/search/tests/src/Functional/SearchNumbersTest.php
index 12882a98deb0..7903a988518d 100644
--- a/core/modules/search/tests/src/Functional/SearchNumbersTest.php
+++ b/core/modules/search/tests/src/Functional/SearchNumbersTest.php
@@ -102,7 +102,7 @@ protected function setUp(): void {
   /**
    * Tests that all the numbers can be searched.
    */
-  public function testNumberSearching() {
+  public function testNumberSearching(): void {
     $types = array_keys($this->numbers);
 
     foreach ($types as $type) {
diff --git a/core/modules/search/tests/src/Functional/SearchPageCacheTagsTest.php b/core/modules/search/tests/src/Functional/SearchPageCacheTagsTest.php
index 747d4a1741cd..b977480dc894 100644
--- a/core/modules/search/tests/src/Functional/SearchPageCacheTagsTest.php
+++ b/core/modules/search/tests/src/Functional/SearchPageCacheTagsTest.php
@@ -67,7 +67,7 @@ protected function setUp(): void {
   /**
    * Tests the presence of the expected cache tag in various situations.
    */
-  public function testSearchText() {
+  public function testSearchText(): void {
     $this->drupalLogin($this->searchingUser);
 
     // Initial page for searching nodes.
@@ -137,7 +137,7 @@ public function testSearchText() {
   /**
    * Tests the presence of expected cache tags with referenced entities.
    */
-  public function testSearchTagsBubbling() {
+  public function testSearchTagsBubbling(): void {
 
     // Install field UI module.
     $this->container->get('module_installer')->install(['field_ui']);
diff --git a/core/modules/search/tests/src/Functional/SearchPageOverrideTest.php b/core/modules/search/tests/src/Functional/SearchPageOverrideTest.php
index 238020fccd59..425874448a65 100644
--- a/core/modules/search/tests/src/Functional/SearchPageOverrideTest.php
+++ b/core/modules/search/tests/src/Functional/SearchPageOverrideTest.php
@@ -47,7 +47,7 @@ protected function setUp(): void {
     $this->drupalLogin($this->searchUser);
   }
 
-  public function testSearchPageHook() {
+  public function testSearchPageHook(): void {
     $keys = 'bike shed ' . $this->randomMachineName();
     $this->drupalGet("search/dummy_path", ['query' => ['keys' => $keys]]);
     $this->assertSession()->pageTextContains('Dummy search snippet');
diff --git a/core/modules/search/tests/src/Functional/SearchPageTextTest.php b/core/modules/search/tests/src/Functional/SearchPageTextTest.php
index 66c41620732e..f00dc4757e74 100644
--- a/core/modules/search/tests/src/Functional/SearchPageTextTest.php
+++ b/core/modules/search/tests/src/Functional/SearchPageTextTest.php
@@ -54,7 +54,7 @@ protected function setUp(): void {
    *
    * This is a regression test for https://www.drupal.org/node/2338081
    */
-  public function testSearchLabelXSS() {
+  public function testSearchLabelXSS(): void {
     $this->drupalLogin($this->drupalCreateUser(['administer search']));
 
     $keys['label'] = '<script>alert("Don\'t Panic");</script>';
@@ -69,7 +69,7 @@ public function testSearchLabelXSS() {
   /**
    * Tests the failed search text, and various other text on the search page.
    */
-  public function testSearchText() {
+  public function testSearchText(): void {
     $this->drupalLogin($this->searchingUser);
     $this->drupalGet('search/node');
     $this->assertSession()->pageTextContains('Enter your keywords');
diff --git a/core/modules/search/tests/src/Functional/SearchPreprocessLangcodeTest.php b/core/modules/search/tests/src/Functional/SearchPreprocessLangcodeTest.php
index 1eedced62722..5362e8709b33 100644
--- a/core/modules/search/tests/src/Functional/SearchPreprocessLangcodeTest.php
+++ b/core/modules/search/tests/src/Functional/SearchPreprocessLangcodeTest.php
@@ -50,7 +50,7 @@ protected function setUp(): void {
   /**
    * Tests that hook_search_preprocess() returns the correct langcode.
    */
-  public function testPreprocessLangcode() {
+  public function testPreprocessLangcode(): void {
     // Create a node.
     $this->node = $this->drupalCreateNode(['body' => [[]], 'langcode' => 'en']);
 
@@ -71,7 +71,7 @@ public function testPreprocessLangcode() {
   /**
    * Tests stemming for hook_search_preprocess().
    */
-  public function testPreprocessStemming() {
+  public function testPreprocessStemming(): void {
     // Create a node.
     $this->node = $this->drupalCreateNode([
       'title' => 'we are testing',
diff --git a/core/modules/search/tests/src/Functional/SearchQueryAlterTest.php b/core/modules/search/tests/src/Functional/SearchQueryAlterTest.php
index c27624fbccbe..95a76fef97ee 100644
--- a/core/modules/search/tests/src/Functional/SearchQueryAlterTest.php
+++ b/core/modules/search/tests/src/Functional/SearchQueryAlterTest.php
@@ -26,7 +26,7 @@ class SearchQueryAlterTest extends BrowserTestBase {
   /**
    * Tests that the query alter works.
    */
-  public function testQueryAlter() {
+  public function testQueryAlter(): void {
     $this->drupalCreateContentType(['type' => 'page', 'name' => 'Basic page']);
     $this->drupalCreateContentType(['type' => 'article', 'name' => 'Article']);
 
diff --git a/core/modules/search/tests/src/Functional/SearchRankingTest.php b/core/modules/search/tests/src/Functional/SearchRankingTest.php
index c7f34dc7355a..767129dd0d8a 100644
--- a/core/modules/search/tests/src/Functional/SearchRankingTest.php
+++ b/core/modules/search/tests/src/Functional/SearchRankingTest.php
@@ -61,7 +61,7 @@ protected function setUp(): void {
     ]));
   }
 
-  public function testRankings() {
+  public function testRankings(): void {
     // Add a comment field.
     $this->addDefaultCommentField('node', 'page');
 
@@ -211,7 +211,7 @@ public function testRankings() {
   /**
    * Tests rankings of HTML tags.
    */
-  public function testHTMLRankings() {
+  public function testHTMLRankings(): void {
     $full_html_format = FilterFormat::create([
       'format' => 'full_html',
       'name' => 'Full HTML',
diff --git a/core/modules/search/tests/src/Kernel/Migrate/d6/MigrateSearchPageTest.php b/core/modules/search/tests/src/Kernel/Migrate/d6/MigrateSearchPageTest.php
index 6f2f4265b92b..9bbcd47353bc 100644
--- a/core/modules/search/tests/src/Kernel/Migrate/d6/MigrateSearchPageTest.php
+++ b/core/modules/search/tests/src/Kernel/Migrate/d6/MigrateSearchPageTest.php
@@ -31,7 +31,7 @@ protected function setUp(): void {
   /**
    * Tests Drupal 6 search settings to Drupal 8 search page entity migration.
    */
-  public function testSearchPage() {
+  public function testSearchPage(): void {
     $id = 'node_search';
     /** @var \Drupal\search\Entity\SearchPage $search_page */
     $search_page = SearchPage::load($id);
diff --git a/core/modules/search/tests/src/Kernel/Migrate/d6/MigrateSearchSettingsTest.php b/core/modules/search/tests/src/Kernel/Migrate/d6/MigrateSearchSettingsTest.php
index 6e2eea99150d..291a9f6b7e34 100644
--- a/core/modules/search/tests/src/Kernel/Migrate/d6/MigrateSearchSettingsTest.php
+++ b/core/modules/search/tests/src/Kernel/Migrate/d6/MigrateSearchSettingsTest.php
@@ -33,7 +33,7 @@ protected function setUp(): void {
   /**
    * Tests migration of search variables to search.settings.yml.
    */
-  public function testSearchSettings() {
+  public function testSearchSettings(): void {
     $config = $this->config('search.settings');
     $this->assertSame(3, $config->get('index.minimum_word_size'));
     $this->assertTrue($config->get('index.overlap_cjk'));
diff --git a/core/modules/search/tests/src/Kernel/Migrate/d7/MigrateSearchPageTest.php b/core/modules/search/tests/src/Kernel/Migrate/d7/MigrateSearchPageTest.php
index c5d4d5af3d2f..033d03c425a2 100644
--- a/core/modules/search/tests/src/Kernel/Migrate/d7/MigrateSearchPageTest.php
+++ b/core/modules/search/tests/src/Kernel/Migrate/d7/MigrateSearchPageTest.php
@@ -51,7 +51,7 @@ protected function assertEntity(string $id, string $path, bool $status = FALSE,
   /**
    * Tests migration of search status and settings to search page entity.
    */
-  public function testSearchPage() {
+  public function testSearchPage(): void {
     $this->enableModules(['node']);
     $this->installConfig(['search']);
     $this->executeMigration('d7_search_page');
@@ -99,7 +99,7 @@ public function testSearchPage() {
   /**
    * Tests that search page is only migrated for modules enabled on D8 site.
    */
-  public function testModuleExists() {
+  public function testModuleExists(): void {
     $this->installConfig(['search']);
     $this->executeMigration('d7_search_page');
 
@@ -110,7 +110,7 @@ public function testModuleExists() {
   /**
    * Tests that a search page will be created if it does not exist.
    */
-  public function testUserSearchCreate() {
+  public function testUserSearchCreate(): void {
     $this->enableModules(['node']);
     $this->installConfig(['search']);
     /** @var \Drupal\search\Entity\SearchPage $search_page */
diff --git a/core/modules/search/tests/src/Kernel/Migrate/d7/MigrateSearchSettingsTest.php b/core/modules/search/tests/src/Kernel/Migrate/d7/MigrateSearchSettingsTest.php
index c1fcc0b54b6c..4b065fd11af9 100644
--- a/core/modules/search/tests/src/Kernel/Migrate/d7/MigrateSearchSettingsTest.php
+++ b/core/modules/search/tests/src/Kernel/Migrate/d7/MigrateSearchSettingsTest.php
@@ -26,7 +26,7 @@ protected function setUp(): void {
   /**
    * Tests the migration of Search's variables to configuration.
    */
-  public function testSearchSettings() {
+  public function testSearchSettings(): void {
     $config = $this->config('search.settings');
     $this->assertSame('node_search', $config->get('default_page'));
     $this->assertSame(4, $config->get('index.minimum_word_size'));
diff --git a/core/modules/search/tests/src/Kernel/SearchExcerptTest.php b/core/modules/search/tests/src/Kernel/SearchExcerptTest.php
index 7a3a782c5afd..03ae44f4c9cc 100644
--- a/core/modules/search/tests/src/Kernel/SearchExcerptTest.php
+++ b/core/modules/search/tests/src/Kernel/SearchExcerptTest.php
@@ -29,7 +29,7 @@ class SearchExcerptTest extends KernelTestBase {
    * contains either highlighted keywords or the original marked
    * up string if no keywords matched the string.
    */
-  public function testSearchExcerpt() {
+  public function testSearchExcerpt(): void {
     // Make some text with entities and tags.
     $text = 'The <strong>quick</strong> <a href="#">brown</a> fox &amp; jumps <h2>over</h2> the lazy dog';
     $expected = 'The quick brown fox &amp; jumps over the lazy dog';
@@ -77,7 +77,7 @@ public function testSearchExcerpt() {
    * and compares them with strings that contain the original un-simplified
    * word.
    */
-  public function testSearchExcerptSimplified() {
+  public function testSearchExcerptSimplified(): void {
     $start_time = microtime(TRUE);
 
     // cSpell:disable
diff --git a/core/modules/search/tests/src/Kernel/SearchIndexTest.php b/core/modules/search/tests/src/Kernel/SearchIndexTest.php
index b015fc922ea4..5656ef23cc7e 100644
--- a/core/modules/search/tests/src/Kernel/SearchIndexTest.php
+++ b/core/modules/search/tests/src/Kernel/SearchIndexTest.php
@@ -23,7 +23,7 @@ class SearchIndexTest extends KernelTestBase {
   /**
    * Test that the service "search.index" is backend overridable.
    */
-  public function testSearchIndexServiceIsBackendOverridable() {
+  public function testSearchIndexServiceIsBackendOverridable(): void {
     $definition = $this->container->getDefinition('search.index');
     $this->assertTrue($definition->hasTag('backend_overridable'));
   }
diff --git a/core/modules/search/tests/src/Kernel/SearchMatchTest.php b/core/modules/search/tests/src/Kernel/SearchMatchTest.php
index 260b9f817671..b1558b10432c 100644
--- a/core/modules/search/tests/src/Kernel/SearchMatchTest.php
+++ b/core/modules/search/tests/src/Kernel/SearchMatchTest.php
@@ -44,7 +44,7 @@ protected function setUp(): void {
   /**
    * Tests search indexing.
    */
-  public function testMatching() {
+  public function testMatching(): void {
     $this->_setup();
     $this->_testQueries();
   }
diff --git a/core/modules/search/tests/src/Kernel/SearchTextProcessorTest.php b/core/modules/search/tests/src/Kernel/SearchTextProcessorTest.php
index 1efc816f5e4f..fb51dd406b91 100644
--- a/core/modules/search/tests/src/Kernel/SearchTextProcessorTest.php
+++ b/core/modules/search/tests/src/Kernel/SearchTextProcessorTest.php
@@ -24,7 +24,7 @@ class SearchTextProcessorTest extends KernelTestBase {
   /**
    * Tests that text processing handles Unicode characters correctly.
    */
-  public function testSearchTextProcessorUnicode() {
+  public function testSearchTextProcessorUnicode(): void {
     // This test uses a file that was constructed so that the even lines are
     // boundary characters, and the odd lines are valid word characters. (It
     // was generated as a sequence of all the Unicode characters, and then the
@@ -79,7 +79,7 @@ public function testSearchTextProcessorUnicode() {
   /**
    * Tests that text analysis does the right thing with punctuation.
    */
-  public function testSearchTextProcessorPunctuation() {
+  public function testSearchTextProcessorPunctuation(): void {
     $cases = [
       ['20.03/94-28,876', '20039428876', 'Punctuation removed from numbers'],
       ['great...drupal--module', 'great drupal module', 'Multiple dot and dashes are word boundaries'],
diff --git a/core/modules/search/tests/src/Kernel/SearchTokenizerTest.php b/core/modules/search/tests/src/Kernel/SearchTokenizerTest.php
index 622653e20894..06fdf4cccf3d 100644
--- a/core/modules/search/tests/src/Kernel/SearchTokenizerTest.php
+++ b/core/modules/search/tests/src/Kernel/SearchTokenizerTest.php
@@ -37,7 +37,7 @@ protected function setUp(): void {
    * character classes are tokenized properly. See PREG_CLASS_CKJ for more
    * information.
    */
-  public function testTokenizer() {
+  public function testTokenizer(): void {
     // Set the minimum word size to 1 (to split all CJK characters) and make
     // sure CJK tokenizing is turned on.
     $this->config('search.settings')
@@ -122,7 +122,7 @@ public function testTokenizer() {
    * This is just a sanity check - it verifies that strings of letters are
    * not tokenized.
    */
-  public function testNoTokenizer() {
+  public function testNoTokenizer(): void {
     // Set the minimum word size to 1 (to split all CJK characters) and make
     // sure CJK tokenizing is turned on.
     $this->config('search.settings')
diff --git a/core/modules/search/tests/src/Unit/SearchPageRepositoryTest.php b/core/modules/search/tests/src/Unit/SearchPageRepositoryTest.php
index 4baecec35ccc..df793281c4c6 100644
--- a/core/modules/search/tests/src/Unit/SearchPageRepositoryTest.php
+++ b/core/modules/search/tests/src/Unit/SearchPageRepositoryTest.php
@@ -70,7 +70,7 @@ protected function setUp(): void {
   /**
    * Tests the getActiveSearchPages() method.
    */
-  public function testGetActiveSearchPages() {
+  public function testGetActiveSearchPages(): void {
     $this->query->expects($this->once())
       ->method('condition')
       ->with('status', TRUE)
@@ -94,7 +94,7 @@ public function testGetActiveSearchPages() {
   /**
    * Tests the isSearchActive() method.
    */
-  public function testIsSearchActive() {
+  public function testIsSearchActive(): void {
     $this->query->expects($this->once())
       ->method('condition')
       ->with('status', TRUE)
@@ -113,7 +113,7 @@ public function testIsSearchActive() {
   /**
    * Tests the getIndexableSearchPages() method.
    */
-  public function testGetIndexableSearchPages() {
+  public function testGetIndexableSearchPages(): void {
     $this->query->expects($this->once())
       ->method('condition')
       ->with('status', TRUE)
@@ -144,7 +144,7 @@ public function testGetIndexableSearchPages() {
   /**
    * Tests the clearDefaultSearchPage() method.
    */
-  public function testClearDefaultSearchPage() {
+  public function testClearDefaultSearchPage(): void {
     $config = $this->getMockBuilder('Drupal\Core\Config\Config')
       ->disableOriginalConstructor()
       ->getMock();
@@ -162,7 +162,7 @@ public function testClearDefaultSearchPage() {
   /**
    * Tests the getDefaultSearchPage() method when the default is active.
    */
-  public function testGetDefaultSearchPageWithActiveDefault() {
+  public function testGetDefaultSearchPageWithActiveDefault(): void {
     $this->query->expects($this->once())
       ->method('condition')
       ->with('status', TRUE)
@@ -189,7 +189,7 @@ public function testGetDefaultSearchPageWithActiveDefault() {
   /**
    * Tests the getDefaultSearchPage() method when the default is inactive.
    */
-  public function testGetDefaultSearchPageWithInactiveDefault() {
+  public function testGetDefaultSearchPageWithInactiveDefault(): void {
     $this->query->expects($this->once())
       ->method('condition')
       ->with('status', TRUE)
@@ -216,7 +216,7 @@ public function testGetDefaultSearchPageWithInactiveDefault() {
   /**
    * Tests the setDefaultSearchPage() method.
    */
-  public function testSetDefaultSearchPage() {
+  public function testSetDefaultSearchPage(): void {
     $id = 'bananas';
     $config = $this->getMockBuilder('Drupal\Core\Config\Config')
       ->disableOriginalConstructor()
@@ -249,7 +249,7 @@ public function testSetDefaultSearchPage() {
   /**
    * Tests the sortSearchPages() method.
    */
-  public function testSortSearchPages() {
+  public function testSortSearchPages(): void {
     $entity_type = $this->createMock(EntityTypeInterface::class);
     $entity_type
       ->method('getClass')
diff --git a/core/modules/search/tests/src/Unit/SearchPluginCollectionTest.php b/core/modules/search/tests/src/Unit/SearchPluginCollectionTest.php
index df643317630f..80b043ea5168 100644
--- a/core/modules/search/tests/src/Unit/SearchPluginCollectionTest.php
+++ b/core/modules/search/tests/src/Unit/SearchPluginCollectionTest.php
@@ -47,7 +47,7 @@ protected function setUp(): void {
   /**
    * Tests the get() method.
    */
-  public function testGet() {
+  public function testGet(): void {
     $plugin = $this->createMock('Drupal\search\Plugin\SearchInterface');
     $this->pluginManager->expects($this->once())
       ->method('createInstance')
@@ -58,7 +58,7 @@ public function testGet() {
   /**
    * Tests the get() method with a configurable plugin.
    */
-  public function testGetWithConfigurablePlugin() {
+  public function testGetWithConfigurablePlugin(): void {
     $plugin = $this->createMock('Drupal\search\Plugin\ConfigurableSearchPluginInterface');
     $plugin->expects($this->once())
       ->method('setSearchPageId')
diff --git a/core/modules/serialization/tests/src/Kernel/EntitySerializationTest.php b/core/modules/serialization/tests/src/Kernel/EntitySerializationTest.php
index 20f13bf47e23..b3658bffb2df 100644
--- a/core/modules/serialization/tests/src/Kernel/EntitySerializationTest.php
+++ b/core/modules/serialization/tests/src/Kernel/EntitySerializationTest.php
@@ -128,7 +128,7 @@ protected function setUp(): void {
   /**
    * Tests the normalize function.
    */
-  public function testNormalize() {
+  public function testNormalize(): void {
     $expected = [
       'id' => [
         ['value' => 1],
@@ -193,7 +193,7 @@ public function testNormalize() {
    *
    * @see entity_serialization_test.module
    */
-  public function testUserNormalize() {
+  public function testUserNormalize(): void {
     // Test password isn't available.
     $normalized = $this->serializer->normalize($this->user);
 
@@ -212,7 +212,7 @@ public function testUserNormalize() {
   /**
    * Tests entity serialization for core's formats by a registered Serializer.
    */
-  public function testSerialize() {
+  public function testSerialize(): void {
     // Test that Serializer responds using the ComplexDataNormalizer and
     // JsonEncoder. The output of ComplexDataNormalizer::normalize() is tested
     // elsewhere, so we can just assume that it works properly here.
@@ -268,7 +268,7 @@ public function testSerialize() {
   /**
    * Tests denormalization of an entity.
    */
-  public function testDenormalize() {
+  public function testDenormalize(): void {
     $normalized = $this->serializer->normalize($this->entity);
 
     foreach (['json', 'xml'] as $type) {
@@ -283,7 +283,7 @@ public function testDenormalize() {
   /**
    * Tests denormalizing serialized columns.
    */
-  public function testDenormalizeSerializedItem() {
+  public function testDenormalizeSerializedItem(): void {
     $this->expectException(\LogicException::class);
     $this->expectExceptionMessage('The generic FieldItemNormalizer cannot denormalize string values for "value" properties of the "serialized" field (field item class: Drupal\entity_test\Plugin\Field\FieldType\SerializedItem).');
     $this->serializer->denormalize([
@@ -299,7 +299,7 @@ public function testDenormalizeSerializedItem() {
   /**
    * Tests normalizing/denormalizing custom serialized columns.
    */
-  public function testDenormalizeCustomSerializedItem() {
+  public function testDenormalizeCustomSerializedItem(): void {
     $entity = EntitySerializedField::create(['serialized_text' => serialize(['Hello world!'])]);
     $normalized = $this->serializer->normalize($entity);
     $this->assertEquals(['Hello world!'], $normalized['serialized_text'][0]['value']);
@@ -318,7 +318,7 @@ public function testDenormalizeCustomSerializedItem() {
   /**
    * Tests normalizing/denormalizing invalid custom serialized fields.
    */
-  public function testDenormalizeInvalidCustomSerializedField() {
+  public function testDenormalizeInvalidCustomSerializedField(): void {
     $entity = EntitySerializedField::create(['serialized_long' => serialize(['Hello world!'])]);
     $normalized = $this->serializer->normalize($entity);
     $this->assertEquals(['Hello world!'], $normalized['serialized_long'][0]['value']);
@@ -337,7 +337,7 @@ public function testDenormalizeInvalidCustomSerializedField() {
   /**
    * Tests normalizing/denormalizing empty custom serialized fields.
    */
-  public function testDenormalizeEmptyCustomSerializedField() {
+  public function testDenormalizeEmptyCustomSerializedField(): void {
     $entity = EntitySerializedField::create(['serialized_long' => serialize([])]);
     $normalized = $this->serializer->normalize($entity);
     $this->assertEquals([], $normalized['serialized_long'][0]['value']);
@@ -350,7 +350,7 @@ public function testDenormalizeEmptyCustomSerializedField() {
   /**
    * Tests normalizing/denormalizing valid custom serialized fields.
    */
-  public function testDenormalizeValidCustomSerializedField() {
+  public function testDenormalizeValidCustomSerializedField(): void {
     $entity = EntitySerializedField::create(['serialized_long' => serialize(['key' => 'value'])]);
     $normalized = $this->serializer->normalize($entity);
     $this->assertEquals(['key' => 'value'], $normalized['serialized_long'][0]['value']);
@@ -363,7 +363,7 @@ public function testDenormalizeValidCustomSerializedField() {
   /**
    * Tests normalizing/denormalizing using string values.
    */
-  public function testDenormalizeStringValue() {
+  public function testDenormalizeStringValue(): void {
     $this->expectException(\LogicException::class);
     $this->expectExceptionMessage('The generic FieldItemNormalizer cannot denormalize string values for "value" properties of the "serialized_long" field (field item class: Drupal\Core\Field\Plugin\Field\FieldType\StringLongItem).');
     $this->serializer->denormalize([
@@ -375,7 +375,7 @@ public function testDenormalizeStringValue() {
   /**
    * Tests normalizing cacheable computed field.
    */
-  public function testCacheableComputedField() {
+  public function testCacheableComputedField(): void {
     $context[CacheableNormalizerInterface::SERIALIZATION_CONTEXT_CACHEABILITY] = new CacheableMetadata();
     $entity = EntityTestComputedField::create();
     $normalized = $this->serializer->normalize($entity, NULL, $context);
diff --git a/core/modules/serialization/tests/src/Kernel/FieldItemSerializationTest.php b/core/modules/serialization/tests/src/Kernel/FieldItemSerializationTest.php
index 16d44f937c18..2f5a958054b0 100644
--- a/core/modules/serialization/tests/src/Kernel/FieldItemSerializationTest.php
+++ b/core/modules/serialization/tests/src/Kernel/FieldItemSerializationTest.php
@@ -124,7 +124,7 @@ protected function setUp(): void {
   /**
    * Tests normalizing and denormalizing an entity with field item normalizer.
    */
-  public function testFieldNormalizeDenormalize() {
+  public function testFieldNormalizeDenormalize(): void {
     $normalized = $this->serializer->normalize($this->entity, 'json');
 
     $expected_field_value = $this->entity->field_test_text[0]->getValue()['value'] . '::silly_suffix';
@@ -148,7 +148,7 @@ public function testFieldNormalizeDenormalize() {
   /**
    * Tests denormalizing using a scalar field value.
    */
-  public function testFieldDenormalizeWithScalarValue() {
+  public function testFieldDenormalizeWithScalarValue(): void {
     $this->expectException(UnexpectedValueException::class);
     $this->expectExceptionMessage('Field values for "uuid" must use an array structure');
 
@@ -170,7 +170,7 @@ public function testFieldDenormalizeWithScalarValue() {
    *
    * @dataProvider providerTestCustomBooleanNormalization
    */
-  public function testCustomBooleanNormalization(array $test_modules, $format) {
+  public function testCustomBooleanNormalization(array $test_modules, $format): void {
     // Asserts the entity contains the value we set.
     $this->assertFalse($this->entity->field_test_boolean->value);
 
diff --git a/core/modules/serialization/tests/src/Kernel/MapDataNormalizerTest.php b/core/modules/serialization/tests/src/Kernel/MapDataNormalizerTest.php
index 516cc3b45c10..fed6e2ab0810 100644
--- a/core/modules/serialization/tests/src/Kernel/MapDataNormalizerTest.php
+++ b/core/modules/serialization/tests/src/Kernel/MapDataNormalizerTest.php
@@ -44,7 +44,7 @@ protected function setUp(): void {
   /**
    * Tests whether map data can be normalized.
    */
-  public function testMapNormalize() {
+  public function testMapNormalize(): void {
     $typed_data = $this->buildExampleTypedData();
     $data = $this->serializer->normalize($typed_data, 'json');
     $expect_value = [
@@ -63,7 +63,7 @@ public function testMapNormalize() {
   /**
    * Tests whether map data with properties can be normalized.
    */
-  public function testMapWithPropertiesNormalize() {
+  public function testMapWithPropertiesNormalize(): void {
     $typed_data = $this->buildExampleTypedDataWithProperties();
     $data = $this->serializer->normalize($typed_data, 'json');
     $expect_value = [
diff --git a/core/modules/serialization/tests/src/Kernel/SerializationTest.php b/core/modules/serialization/tests/src/Kernel/SerializationTest.php
index 9b43853ad565..8d85786495ab 100644
--- a/core/modules/serialization/tests/src/Kernel/SerializationTest.php
+++ b/core/modules/serialization/tests/src/Kernel/SerializationTest.php
@@ -39,7 +39,7 @@ protected function setUp(): void {
   /**
    * Confirms that modules can register normalizers and encoders.
    */
-  public function testSerializerComponentRegistration() {
+  public function testSerializerComponentRegistration(): void {
     $object = new \stdClass();
     $format = 'serialization_test';
     $expected = 'Normalized by SerializationTestNormalizer, Encoded by SerializationTestEncoder';
diff --git a/core/modules/serialization/tests/src/Unit/CompilerPass/RegisterSerializationClassesCompilerPassTest.php b/core/modules/serialization/tests/src/Unit/CompilerPass/RegisterSerializationClassesCompilerPassTest.php
index 99bd8da87f00..873b6ee658ed 100644
--- a/core/modules/serialization/tests/src/Unit/CompilerPass/RegisterSerializationClassesCompilerPassTest.php
+++ b/core/modules/serialization/tests/src/Unit/CompilerPass/RegisterSerializationClassesCompilerPassTest.php
@@ -19,7 +19,7 @@ class RegisterSerializationClassesCompilerPassTest extends UnitTestCase {
   /**
    * @covers ::process
    */
-  public function testEncoders() {
+  public function testEncoders(): void {
     $container = new ContainerBuilder();
 
     $serializer_definition = new Definition(Serializer::class, [[], []]);
diff --git a/core/modules/serialization/tests/src/Unit/Encoder/JsonEncoderTest.php b/core/modules/serialization/tests/src/Unit/Encoder/JsonEncoderTest.php
index 82cb1768e9cd..9f06fd07af6e 100644
--- a/core/modules/serialization/tests/src/Unit/Encoder/JsonEncoderTest.php
+++ b/core/modules/serialization/tests/src/Unit/Encoder/JsonEncoderTest.php
@@ -16,7 +16,7 @@ class JsonEncoderTest extends UnitTestCase {
   /**
    * Tests the supportsEncoding() method.
    */
-  public function testSupportsEncoding() {
+  public function testSupportsEncoding(): void {
     $encoder = new JsonEncoder();
 
     $this->assertTrue($encoder->supportsEncoding('json'));
diff --git a/core/modules/serialization/tests/src/Unit/Encoder/XmlEncoderTest.php b/core/modules/serialization/tests/src/Unit/Encoder/XmlEncoderTest.php
index 151413de3e01..37c8326d511f 100644
--- a/core/modules/serialization/tests/src/Unit/Encoder/XmlEncoderTest.php
+++ b/core/modules/serialization/tests/src/Unit/Encoder/XmlEncoderTest.php
@@ -49,7 +49,7 @@ protected function setUp(): void {
   /**
    * Tests the supportsEncoding() method.
    */
-  public function testSupportsEncoding() {
+  public function testSupportsEncoding(): void {
     $this->assertTrue($this->encoder->supportsEncoding('xml'));
     $this->assertFalse($this->encoder->supportsEncoding('json'));
   }
@@ -57,7 +57,7 @@ public function testSupportsEncoding() {
   /**
    * Tests the supportsDecoding() method.
    */
-  public function testSupportsDecoding() {
+  public function testSupportsDecoding(): void {
     $this->assertTrue($this->encoder->supportsDecoding('xml'));
     $this->assertFalse($this->encoder->supportsDecoding('json'));
   }
@@ -65,7 +65,7 @@ public function testSupportsDecoding() {
   /**
    * Tests the encode() method.
    */
-  public function testEncode() {
+  public function testEncode(): void {
     $this->baseEncoder->expects($this->once())
       ->method('encode')
       ->with($this->testArray, 'test', [])
@@ -77,7 +77,7 @@ public function testEncode() {
   /**
    * Tests the decode() method.
    */
-  public function testDecode() {
+  public function testDecode(): void {
     $this->baseEncoder->expects($this->once())
       ->method('decode')
       ->with('test', 'test', [])
@@ -89,7 +89,7 @@ public function testDecode() {
   /**
    * @covers ::getBaseEncoder
    */
-  public function testDefaultEncoderHasSerializer() {
+  public function testDefaultEncoderHasSerializer(): void {
     // The serializer should be set on the Drupal encoder, which should then
     // set it on our default encoder.
     $encoder = new XmlEncoder();
diff --git a/core/modules/serialization/tests/src/Unit/EntityResolver/ChainEntityResolverTest.php b/core/modules/serialization/tests/src/Unit/EntityResolver/ChainEntityResolverTest.php
index 7e0c50c20f7f..7889d4ad15b6 100644
--- a/core/modules/serialization/tests/src/Unit/EntityResolver/ChainEntityResolverTest.php
+++ b/core/modules/serialization/tests/src/Unit/EntityResolver/ChainEntityResolverTest.php
@@ -50,7 +50,7 @@ protected function setUp(): void {
    * @covers ::__construct
    * @covers ::resolve
    */
-  public function testResolverWithNoneResolved() {
+  public function testResolverWithNoneResolved(): void {
     $resolvers = [
       $this->createEntityResolverMock(),
       $this->createEntityResolverMock(),
@@ -67,7 +67,7 @@ public function testResolverWithNoneResolved() {
    * @covers ::addResolver
    * @covers ::resolve
    */
-  public function testResolverWithNoneResolvedUsingAddResolver() {
+  public function testResolverWithNoneResolvedUsingAddResolver(): void {
     $resolver = new ChainEntityResolver();
     $resolver->addResolver($this->createEntityResolverMock());
     $resolver->addResolver($this->createEntityResolverMock());
@@ -81,7 +81,7 @@ public function testResolverWithNoneResolvedUsingAddResolver() {
    * @covers ::__construct
    * @covers ::resolve
    */
-  public function testResolverWithFirstResolved() {
+  public function testResolverWithFirstResolved(): void {
     $resolvers = [
       $this->createEntityResolverMock(10),
       $this->createEntityResolverMock(NULL, FALSE),
@@ -98,7 +98,7 @@ public function testResolverWithFirstResolved() {
    * @covers ::__construct
    * @covers ::resolve
    */
-  public function testResolverWithLastResolved() {
+  public function testResolverWithLastResolved(): void {
     $resolvers = [
       $this->createEntityResolverMock(),
       $this->createEntityResolverMock(10),
@@ -115,7 +115,7 @@ public function testResolverWithLastResolved() {
    * @covers ::__construct
    * @covers ::resolve
    */
-  public function testResolverWithResolvedToZero() {
+  public function testResolverWithResolvedToZero(): void {
     $resolvers = [
       $this->createEntityResolverMock(0),
       $this->createEntityResolverMock(NULL, FALSE),
diff --git a/core/modules/serialization/tests/src/Unit/EntityResolver/UuidResolverTest.php b/core/modules/serialization/tests/src/Unit/EntityResolver/UuidResolverTest.php
index 545c41c47d47..edec9d695f3a 100644
--- a/core/modules/serialization/tests/src/Unit/EntityResolver/UuidResolverTest.php
+++ b/core/modules/serialization/tests/src/Unit/EntityResolver/UuidResolverTest.php
@@ -42,7 +42,7 @@ protected function setUp(): void {
   /**
    * Tests resolve() with a class using the incorrect interface.
    */
-  public function testResolveNotInInterface() {
+  public function testResolveNotInInterface(): void {
     $this->entityRepository->expects($this->never())
       ->method('loadEntityByUuid');
 
@@ -53,7 +53,7 @@ public function testResolveNotInInterface() {
   /**
    * Tests resolve() with a class using the correct interface but no UUID.
    */
-  public function testResolveNoUuid() {
+  public function testResolveNoUuid(): void {
     $this->entityRepository->expects($this->never())
       ->method('loadEntityByUuid');
 
@@ -68,7 +68,7 @@ public function testResolveNoUuid() {
   /**
    * Tests resolve() with correct interface but no matching entity for the UUID.
    */
-  public function testResolveNoEntity() {
+  public function testResolveNoEntity(): void {
     $uuid = '392eab92-35c2-4625-872d-a9dab4da008e';
 
     $this->entityRepository->expects($this->once())
@@ -88,7 +88,7 @@ public function testResolveNoEntity() {
   /**
    * Tests resolve() when a UUID corresponds to an entity.
    */
-  public function testResolveWithEntity() {
+  public function testResolveWithEntity(): void {
     $uuid = '392eab92-35c2-4625-872d-a9dab4da008e';
 
     $entity = $this->createMock('Drupal\Core\Entity\EntityInterface');
diff --git a/core/modules/serialization/tests/src/Unit/EventSubscriber/DefaultExceptionSubscriberTest.php b/core/modules/serialization/tests/src/Unit/EventSubscriber/DefaultExceptionSubscriberTest.php
index 59732c4b9b4f..c3add6f17902 100644
--- a/core/modules/serialization/tests/src/Unit/EventSubscriber/DefaultExceptionSubscriberTest.php
+++ b/core/modules/serialization/tests/src/Unit/EventSubscriber/DefaultExceptionSubscriberTest.php
@@ -23,7 +23,7 @@ class DefaultExceptionSubscriberTest extends UnitTestCase {
   /**
    * @covers ::on4xx
    */
-  public function testOn4xx() {
+  public function testOn4xx(): void {
     $kernel = $this->prophesize(HttpKernelInterface::class);
     $request = Request::create('/test');
     $request->setRequestFormat('json');
diff --git a/core/modules/serialization/tests/src/Unit/Normalizer/ComplexDataNormalizerTest.php b/core/modules/serialization/tests/src/Unit/Normalizer/ComplexDataNormalizerTest.php
index 608fb3693551..31ecaa4a37f1 100644
--- a/core/modules/serialization/tests/src/Unit/Normalizer/ComplexDataNormalizerTest.php
+++ b/core/modules/serialization/tests/src/Unit/Normalizer/ComplexDataNormalizerTest.php
@@ -43,7 +43,7 @@ protected function setUp(): void {
   /**
    * @covers ::supportsNormalization
    */
-  public function testSupportsNormalization() {
+  public function testSupportsNormalization(): void {
     $complex_data = $this->prophesize(ComplexDataInterface::class)->reveal();
     $this->assertTrue($this->normalizer->supportsNormalization($complex_data));
     // Also test that an object not implementing ComplexDataInterface fails.
@@ -55,7 +55,7 @@ public function testSupportsNormalization() {
    *
    * @covers ::normalize
    */
-  public function testNormalizeComplexData() {
+  public function testNormalizeComplexData(): void {
     $serializer_prophecy = $this->prophesize(Serializer::class);
 
     $non_internal_property = $this->getTypedDataProperty(FALSE);
@@ -86,7 +86,7 @@ public function testNormalizeComplexData() {
    *
    * @covers ::normalize
    */
-  public function testNormalizeNonComplex() {
+  public function testNormalizeNonComplex(): void {
     $normalizer = new TestExtendedNormalizer();
     $serialization_context = ['test' => 'test'];
 
diff --git a/core/modules/serialization/tests/src/Unit/Normalizer/ConfigEntityNormalizerTest.php b/core/modules/serialization/tests/src/Unit/Normalizer/ConfigEntityNormalizerTest.php
index 65fc0c35e610..f8c4d11d3a8f 100644
--- a/core/modules/serialization/tests/src/Unit/Normalizer/ConfigEntityNormalizerTest.php
+++ b/core/modules/serialization/tests/src/Unit/Normalizer/ConfigEntityNormalizerTest.php
@@ -23,7 +23,7 @@ class ConfigEntityNormalizerTest extends UnitTestCase {
    *
    * @covers ::normalize
    */
-  public function testNormalize() {
+  public function testNormalize(): void {
     $test_export_properties = [
       'test' => 'test',
       '_core' => [
@@ -52,7 +52,7 @@ public function testNormalize() {
   /**
    * @covers ::denormalize
    */
-  public function testDenormalize() {
+  public function testDenormalize(): void {
     $test_value = $this->randomMachineName();
     $data = [
       'test' => $test_value,
diff --git a/core/modules/serialization/tests/src/Unit/Normalizer/ContentEntityNormalizerTest.php b/core/modules/serialization/tests/src/Unit/Normalizer/ContentEntityNormalizerTest.php
index ee6e9463436d..819d91383beb 100644
--- a/core/modules/serialization/tests/src/Unit/Normalizer/ContentEntityNormalizerTest.php
+++ b/core/modules/serialization/tests/src/Unit/Normalizer/ContentEntityNormalizerTest.php
@@ -56,7 +56,7 @@ protected function setUp(): void {
   /**
    * @covers ::supportsNormalization
    */
-  public function testSupportsNormalization() {
+  public function testSupportsNormalization(): void {
     $content_mock = $this->createMock('Drupal\Core\Entity\ContentEntityInterface');
     $config_mock = $this->createMock('Drupal\Core\Config\Entity\ConfigEntityInterface');
     $this->assertTrue($this->contentEntityNormalizer->supportsNormalization($content_mock));
@@ -68,7 +68,7 @@ public function testSupportsNormalization() {
    *
    * @covers ::normalize
    */
-  public function testNormalize() {
+  public function testNormalize(): void {
     $this->serializer->normalize(Argument::type(FieldItemListInterface::class),
       'test_format', ['account' => NULL])->willReturn('test');
 
@@ -94,7 +94,7 @@ public function testNormalize() {
    *
    * @covers ::normalize
    */
-  public function testNormalizeWithAccountContext() {
+  public function testNormalizeWithAccountContext(): void {
     $mock_account = $this->createMock('Drupal\Core\Session\AccountInterface');
 
     $context = [
diff --git a/core/modules/serialization/tests/src/Unit/Normalizer/DateTimeIso8601NormalizerTest.php b/core/modules/serialization/tests/src/Unit/Normalizer/DateTimeIso8601NormalizerTest.php
index a3e41b71a0f9..a6089b3a31a6 100644
--- a/core/modules/serialization/tests/src/Unit/Normalizer/DateTimeIso8601NormalizerTest.php
+++ b/core/modules/serialization/tests/src/Unit/Normalizer/DateTimeIso8601NormalizerTest.php
@@ -64,7 +64,7 @@ protected function setUp(): void {
   /**
    * @covers ::supportsNormalization
    */
-  public function testSupportsNormalization() {
+  public function testSupportsNormalization(): void {
     $this->assertTrue($this->normalizer->supportsNormalization($this->data->reveal()));
 
     $datetime = $this->prophesize(DateTimeInterface::class);
@@ -77,7 +77,7 @@ public function testSupportsNormalization() {
   /**
    * @covers ::supportsDenormalization
    */
-  public function testSupportsDenormalization() {
+  public function testSupportsDenormalization(): void {
     $this->assertTrue($this->normalizer->supportsDenormalization($this->data->reveal(), DateTimeIso8601::class));
   }
 
@@ -85,7 +85,7 @@ public function testSupportsDenormalization() {
    * @covers ::normalize
    * @dataProvider providerTestNormalize
    */
-  public function testNormalize($parent_field_item_class, $datetime_type, $expected_format) {
+  public function testNormalize($parent_field_item_class, $datetime_type, $expected_format): void {
     $formatted_string = $this->randomMachineName();
 
     $field_item = $this->prophesize($parent_field_item_class);
@@ -122,7 +122,7 @@ public function testNormalize($parent_field_item_class, $datetime_type, $expecte
    * @covers ::normalize
    * @dataProvider providerTestNormalize
    */
-  public function testNormalizeWhenNull($parent_field_item_class, $datetime_type, $expected_format) {
+  public function testNormalizeWhenNull($parent_field_item_class, $datetime_type, $expected_format): void {
     $field_item = $this->prophesize($parent_field_item_class);
     if ($parent_field_item_class === DateTimeItem::class) {
       $field_storage_definition = $this->prophesize(FieldStorageDefinitionInterface::class);
@@ -183,7 +183,7 @@ public static function providerTestNormalize() {
    * @covers ::denormalize
    * @dataProvider providerTestDenormalizeValidFormats
    */
-  public function testDenormalizeValidFormats($type, $normalized, $expected) {
+  public function testDenormalizeValidFormats($type, $normalized, $expected): void {
     $field_definition = $this->prophesize(FieldDefinitionInterface::class);
     $field_definition->getSetting('datetime_type')->willReturn($type === 'date-only' ? DateTimeItem::DATETIME_TYPE_DATE : DateTimeItem::DATETIME_TYPE_DATETIME);
     $denormalized = $this->normalizer->denormalize($normalized, DateTimeIso8601::class, NULL, [
@@ -217,7 +217,7 @@ public static function providerTestDenormalizeValidFormats() {
    *
    * @covers ::denormalize
    */
-  public function testDenormalizeDateOnlyException() {
+  public function testDenormalizeDateOnlyException(): void {
     $this->expectException(UnexpectedValueException::class);
     $this->expectExceptionMessage('The specified date "2016/11/06" is not in an accepted format: "Y-m-d" (date-only).');
 
@@ -233,7 +233,7 @@ public function testDenormalizeDateOnlyException() {
    *
    * @covers ::denormalize
    */
-  public function testDenormalizeDateAndTimeException() {
+  public function testDenormalizeDateAndTimeException(): void {
     $this->expectException(UnexpectedValueException::class);
     $this->expectExceptionMessage('The specified date "on a rainy day" is not in an accepted format: "Y-m-d\TH:i:sP" (RFC 3339), "Y-m-d\TH:i:sO" (ISO 8601).');
 
@@ -249,7 +249,7 @@ public function testDenormalizeDateAndTimeException() {
    *
    * @covers ::denormalize
    */
-  public function testDenormalizeNoTargetInstanceOrFieldDefinitionException() {
+  public function testDenormalizeNoTargetInstanceOrFieldDefinitionException(): void {
     $this->expectException(InvalidArgumentException::class);
     $this->expectExceptionMessage('$context[\'target_instance\'] or $context[\'field_definition\'] must be set to denormalize with the DateTimeIso8601Normalizer');
     $this->normalizer->denormalize('', DateTimeIso8601::class, NULL, []);
diff --git a/core/modules/serialization/tests/src/Unit/Normalizer/DateTimeNormalizerTest.php b/core/modules/serialization/tests/src/Unit/Normalizer/DateTimeNormalizerTest.php
index 72cbcf1928bb..2091f0279b6f 100644
--- a/core/modules/serialization/tests/src/Unit/Normalizer/DateTimeNormalizerTest.php
+++ b/core/modules/serialization/tests/src/Unit/Normalizer/DateTimeNormalizerTest.php
@@ -57,7 +57,7 @@ protected function setUp(): void {
   /**
    * @covers ::supportsNormalization
    */
-  public function testSupportsNormalization() {
+  public function testSupportsNormalization(): void {
     $this->assertTrue($this->normalizer->supportsNormalization($this->data->reveal()));
 
     $datetimeiso8601 = $this->prophesize(DateTimeIso8601::class);
@@ -70,14 +70,14 @@ public function testSupportsNormalization() {
   /**
    * @covers ::supportsDenormalization
    */
-  public function testSupportsDenormalization() {
+  public function testSupportsDenormalization(): void {
     $this->assertTrue($this->normalizer->supportsDenormalization($this->data->reveal(), DateTimeInterface::class));
   }
 
   /**
    * @covers ::normalize
    */
-  public function testNormalize() {
+  public function testNormalize(): void {
     $random_rfc_3339_string = $this->randomMachineName();
 
     $drupal_date_time = $this->prophesize(DateTimeNormalizerTestDrupalDateTime::class);
@@ -96,7 +96,7 @@ public function testNormalize() {
   /**
    * @covers ::normalize
    */
-  public function testNormalizeWhenNull() {
+  public function testNormalizeWhenNull(): void {
     $this->data->getDateTime()
       ->willReturn(NULL);
 
@@ -110,7 +110,7 @@ public function testNormalizeWhenNull() {
    * @covers ::denormalize
    * @dataProvider providerTestDenormalizeValidFormats
    */
-  public function testDenormalizeValidFormats($normalized, $expected) {
+  public function testDenormalizeValidFormats($normalized, $expected): void {
     $denormalized = $this->normalizer->denormalize($normalized, DateTimeInterface::class, NULL, []);
     $this->assertSame(0, $denormalized->getTimestamp() - $expected->getTimestamp());
     $this->assertEquals($expected, $denormalized);
@@ -141,7 +141,7 @@ public static function providerTestDenormalizeValidFormats() {
    * @covers ::denormalize
    * @dataProvider providerTestDenormalizeUserFormats
    */
-  public function testDenormalizeUserFormats($normalized, $format, $expected) {
+  public function testDenormalizeUserFormats($normalized, $format, $expected): void {
     $denormalized = $this->normalizer->denormalize($normalized, DateTimeInterface::class, NULL, ['datetime_allowed_formats' => [$format]]);
     $this->assertSame(0, $denormalized->getTimestamp() - $expected->getTimestamp());
     $this->assertEquals($expected, $denormalized);
@@ -167,7 +167,7 @@ public static function providerTestDenormalizeUserFormats() {
    *
    * @covers ::denormalize
    */
-  public function testDenormalizeException() {
+  public function testDenormalizeException(): void {
     $this->expectException(UnexpectedValueException::class);
     $this->expectExceptionMessage('The specified date "2016/11/06 09:02am GMT" is not in an accepted format: "Y-m-d\TH:i:sP" (RFC 3339), "Y-m-d\TH:i:sO" (ISO 8601).');
 
diff --git a/core/modules/serialization/tests/src/Unit/Normalizer/EntityNormalizerTest.php b/core/modules/serialization/tests/src/Unit/Normalizer/EntityNormalizerTest.php
index cd79efaff996..1db10b224d99 100644
--- a/core/modules/serialization/tests/src/Unit/Normalizer/EntityNormalizerTest.php
+++ b/core/modules/serialization/tests/src/Unit/Normalizer/EntityNormalizerTest.php
@@ -77,7 +77,7 @@ protected function setUp(): void {
    *
    * @covers ::normalize
    */
-  public function testNormalize() {
+  public function testNormalize(): void {
     $list_item_1 = $this->createMock('Drupal\Core\TypedData\TypedDataInterface');
     $list_item_2 = $this->createMock('Drupal\Core\TypedData\TypedDataInterface');
 
@@ -108,7 +108,7 @@ public function testNormalize() {
    *
    * @covers ::denormalize
    */
-  public function testDenormalizeWithNoEntityType() {
+  public function testDenormalizeWithNoEntityType(): void {
     $this->expectException(UnexpectedValueException::class);
     $this->entityNormalizer->denormalize([], ContentEntityBaseMockableClass::class);
   }
@@ -118,7 +118,7 @@ public function testDenormalizeWithNoEntityType() {
    *
    * @covers ::denormalize
    */
-  public function testDenormalizeWithValidBundle() {
+  public function testDenormalizeWithValidBundle(): void {
     $test_data = [
       'key_1' => 'value_1',
       'key_2' => 'value_2',
@@ -235,7 +235,7 @@ public function testDenormalizeWithValidBundle() {
    *
    * @covers ::denormalize
    */
-  public function testDenormalizeWithInvalidBundle() {
+  public function testDenormalizeWithInvalidBundle(): void {
     $test_data = [
       'key_1' => 'value_1',
       'key_2' => 'value_2',
@@ -317,7 +317,7 @@ public function testDenormalizeWithInvalidBundle() {
    *
    * @covers ::denormalize
    */
-  public function testDenormalizeWithNoBundle() {
+  public function testDenormalizeWithNoBundle(): void {
     $test_data = [
       'key_1' => 'value_1',
       'key_2' => 'value_2',
@@ -385,7 +385,7 @@ public function testDenormalizeWithNoBundle() {
    *
    * @covers ::denormalize
    */
-  public function testDenormalizeWithNoFieldableEntityType() {
+  public function testDenormalizeWithNoFieldableEntityType(): void {
     $test_data = [
       'key_1' => 'value_1',
       'key_2' => 'value_2',
diff --git a/core/modules/serialization/tests/src/Unit/Normalizer/EntityReferenceFieldItemNormalizerTest.php b/core/modules/serialization/tests/src/Unit/Normalizer/EntityReferenceFieldItemNormalizerTest.php
index f48fe477d8c0..905598fea786 100644
--- a/core/modules/serialization/tests/src/Unit/Normalizer/EntityReferenceFieldItemNormalizerTest.php
+++ b/core/modules/serialization/tests/src/Unit/Normalizer/EntityReferenceFieldItemNormalizerTest.php
@@ -97,7 +97,7 @@ protected function setUp(): void {
   /**
    * @covers ::supportsNormalization
    */
-  public function testSupportsNormalization() {
+  public function testSupportsNormalization(): void {
     $this->assertTrue($this->normalizer->supportsNormalization($this->fieldItem->reveal()));
     $this->assertFalse($this->normalizer->supportsNormalization(new \stdClass()));
   }
@@ -105,7 +105,7 @@ public function testSupportsNormalization() {
   /**
    * @covers ::supportsDenormalization
    */
-  public function testSupportsDenormalization() {
+  public function testSupportsDenormalization(): void {
     $this->assertTrue($this->normalizer->supportsDenormalization([], EntityReferenceItem::class));
     $this->assertFalse($this->normalizer->supportsDenormalization([], FieldItemInterface::class));
   }
@@ -113,7 +113,7 @@ public function testSupportsDenormalization() {
   /**
    * @covers ::normalize
    */
-  public function testNormalize() {
+  public function testNormalize(): void {
     $test_url = '/test/100';
 
     $generated_url = (new GeneratedUrl())->setGeneratedUrl($test_url);
@@ -169,7 +169,7 @@ public function testNormalize() {
     $this->assertSame($expected, $normalized);
   }
 
-  public function testNormalizeWithNewEntityReference() {
+  public function testNormalizeWithNewEntityReference(): void {
     $test_url = '/test/100';
 
     $generated_url = (new GeneratedUrl())->setGeneratedUrl($test_url);
@@ -227,7 +227,7 @@ public function testNormalizeWithNewEntityReference() {
   /**
    * @covers ::normalize
    */
-  public function testNormalizeWithEmptyTaxonomyTermReference() {
+  public function testNormalizeWithEmptyTaxonomyTermReference(): void {
     // Override the serializer prophecy from setUp() to return a zero value.
     $this->serializer = $this->prophesize(Serializer::class);
     // Set up the serializer to return an entity property.
@@ -267,7 +267,7 @@ public function testNormalizeWithEmptyTaxonomyTermReference() {
   /**
    * @covers ::normalize
    */
-  public function testNormalizeWithNoEntity() {
+  public function testNormalizeWithNoEntity(): void {
     $entity_reference = $this->prophesize(TypedDataInterface::class);
     $entity_reference->getValue()
       ->willReturn(NULL)
@@ -299,7 +299,7 @@ public function testNormalizeWithNoEntity() {
   /**
    * @covers ::denormalize
    */
-  public function testDenormalizeWithTypeAndUuid() {
+  public function testDenormalizeWithTypeAndUuid(): void {
     $data = [
       'target_id' => 'test',
       'target_type' => 'test_type',
@@ -326,7 +326,7 @@ public function testDenormalizeWithTypeAndUuid() {
   /**
    * @covers ::denormalize
    */
-  public function testDenormalizeWithUuidWithoutType() {
+  public function testDenormalizeWithUuidWithoutType(): void {
     $data = [
       'target_id' => 'test',
       'target_uuid' => '080e3add-f9d5-41ac-9821-eea55b7b42fb',
@@ -352,7 +352,7 @@ public function testDenormalizeWithUuidWithoutType() {
   /**
    * @covers ::denormalize
    */
-  public function testDenormalizeWithUuidWithIncorrectType() {
+  public function testDenormalizeWithUuidWithIncorrectType(): void {
     $this->expectException(UnexpectedValueException::class);
     $this->expectExceptionMessage('The field "field_reference" property "target_type" must be set to "test_type" or omitted.');
 
@@ -373,7 +373,7 @@ public function testDenormalizeWithUuidWithIncorrectType() {
   /**
    * @covers ::denormalize
    */
-  public function testDenormalizeWithTypeWithIncorrectUuid() {
+  public function testDenormalizeWithTypeWithIncorrectUuid(): void {
     $this->expectException(InvalidArgumentException::class);
     $this->expectExceptionMessage('No "test_type" entity found with UUID "unique-but-none-non-existent" for field "field_reference"');
 
@@ -397,7 +397,7 @@ public function testDenormalizeWithTypeWithIncorrectUuid() {
   /**
    * @covers ::denormalize
    */
-  public function testDenormalizeWithEmptyUuid() {
+  public function testDenormalizeWithEmptyUuid(): void {
     $this->expectException(InvalidArgumentException::class);
     $this->expectExceptionMessage('If provided "target_uuid" cannot be empty for field "field_reference".');
 
@@ -417,7 +417,7 @@ public function testDenormalizeWithEmptyUuid() {
   /**
    * @covers ::denormalize
    */
-  public function testDenormalizeWithId() {
+  public function testDenormalizeWithId(): void {
     $data = [
       'target_id' => 'test',
     ];
@@ -480,7 +480,7 @@ protected function assertDenormalize(array $data): void {
   /**
    * @covers ::constructValue
    */
-  public function testConstructValueProperties() {
+  public function testConstructValueProperties(): void {
     $data = [
       'target_id' => 'test',
       'target_type' => 'test_type',
diff --git a/core/modules/serialization/tests/src/Unit/Normalizer/ListNormalizerTest.php b/core/modules/serialization/tests/src/Unit/Normalizer/ListNormalizerTest.php
index 823f4166311f..749cb7859166 100644
--- a/core/modules/serialization/tests/src/Unit/Normalizer/ListNormalizerTest.php
+++ b/core/modules/serialization/tests/src/Unit/Normalizer/ListNormalizerTest.php
@@ -79,7 +79,7 @@ protected function setUp(): void {
   /**
    * Tests the supportsNormalization() method.
    */
-  public function testSupportsNormalization() {
+  public function testSupportsNormalization(): void {
     $this->assertTrue($this->normalizer->supportsNormalization($this->list));
     $this->assertFalse($this->normalizer->supportsNormalization(new \stdClass()));
   }
@@ -87,7 +87,7 @@ public function testSupportsNormalization() {
   /**
    * Tests the normalize() method.
    */
-  public function testNormalize() {
+  public function testNormalize(): void {
     $serializer = $this->prophesize(Serializer::class);
     $serializer->normalize($this->typedData, 'json', ['mu' => 'nu'])
       ->shouldBeCalledTimes(3)
diff --git a/core/modules/serialization/tests/src/Unit/Normalizer/NormalizerBaseTest.php b/core/modules/serialization/tests/src/Unit/Normalizer/NormalizerBaseTest.php
index f4ed459598c2..8fe665113e22 100644
--- a/core/modules/serialization/tests/src/Unit/Normalizer/NormalizerBaseTest.php
+++ b/core/modules/serialization/tests/src/Unit/Normalizer/NormalizerBaseTest.php
@@ -25,7 +25,7 @@ class NormalizerBaseTest extends UnitTestCase {
    * @param string $supported_types
    *   (optional) The supported interface or class to set on the normalizer.
    */
-  public function testSupportsNormalization($expected_return, $data, $supported_types = NULL) {
+  public function testSupportsNormalization($expected_return, $data, $supported_types = NULL): void {
     $normalizer_base = $this->getMockForAbstractClass('Drupal\Tests\serialization\Unit\Normalizer\TestNormalizerBase');
 
     if (isset($supported_types)) {
diff --git a/core/modules/serialization/tests/src/Unit/Normalizer/NullNormalizerTest.php b/core/modules/serialization/tests/src/Unit/Normalizer/NullNormalizerTest.php
index c26417520e63..288a49354578 100644
--- a/core/modules/serialization/tests/src/Unit/Normalizer/NullNormalizerTest.php
+++ b/core/modules/serialization/tests/src/Unit/Normalizer/NullNormalizerTest.php
@@ -40,7 +40,7 @@ protected function setUp(): void {
    * @covers ::__construct
    * @covers ::supportsNormalization
    */
-  public function testSupportsNormalization() {
+  public function testSupportsNormalization(): void {
     $mock = $this->createMock('Drupal\Core\TypedData\TypedDataInterface');
     $this->assertTrue($this->normalizer->supportsNormalization($mock));
     // Also test that an object not implementing TypedDataInterface fails.
@@ -50,7 +50,7 @@ public function testSupportsNormalization() {
   /**
    * @covers ::normalize
    */
-  public function testNormalize() {
+  public function testNormalize(): void {
     $mock = $this->createMock('Drupal\Core\TypedData\TypedDataInterface');
     $this->assertNull($this->normalizer->normalize($mock));
   }
diff --git a/core/modules/serialization/tests/src/Unit/Normalizer/PrimitiveDataNormalizerTest.php b/core/modules/serialization/tests/src/Unit/Normalizer/PrimitiveDataNormalizerTest.php
index f7107fecfcf7..3d55447e823c 100644
--- a/core/modules/serialization/tests/src/Unit/Normalizer/PrimitiveDataNormalizerTest.php
+++ b/core/modules/serialization/tests/src/Unit/Normalizer/PrimitiveDataNormalizerTest.php
@@ -37,14 +37,14 @@ protected function setUp(): void {
    * @covers ::supportsNormalization
    * @dataProvider dataProviderPrimitiveData
    */
-  public function testSupportsNormalization($primitive_data, $expected) {
+  public function testSupportsNormalization($primitive_data, $expected): void {
     $this->assertTrue($this->normalizer->supportsNormalization($primitive_data));
   }
 
   /**
    * @covers ::supportsNormalization
    */
-  public function testSupportsNormalizationFail() {
+  public function testSupportsNormalizationFail(): void {
     // Test that an object not implementing PrimitiveInterface fails.
     $this->assertFalse($this->normalizer->supportsNormalization(new \stdClass()));
   }
@@ -53,7 +53,7 @@ public function testSupportsNormalizationFail() {
    * @covers ::normalize
    * @dataProvider dataProviderPrimitiveData
    */
-  public function testNormalize($primitive_data, $expected) {
+  public function testNormalize($primitive_data, $expected): void {
     $this->assertSame($expected, $this->normalizer->normalize($primitive_data));
   }
 
diff --git a/core/modules/serialization/tests/src/Unit/Normalizer/TimestampItemNormalizerTest.php b/core/modules/serialization/tests/src/Unit/Normalizer/TimestampItemNormalizerTest.php
index 0bc9e6b3de41..931fbe1aa012 100644
--- a/core/modules/serialization/tests/src/Unit/Normalizer/TimestampItemNormalizerTest.php
+++ b/core/modules/serialization/tests/src/Unit/Normalizer/TimestampItemNormalizerTest.php
@@ -49,7 +49,7 @@ protected function setUp(): void {
   /**
    * @covers ::supportsNormalization
    */
-  public function testSupportsNormalization() {
+  public function testSupportsNormalization(): void {
     $timestamp_item = $this->createTimestampItemProphecy();
     $this->assertTrue($this->normalizer->supportsNormalization($timestamp_item->reveal()));
 
@@ -60,7 +60,7 @@ public function testSupportsNormalization() {
   /**
    * @covers ::supportsDenormalization
    */
-  public function testSupportsDenormalization() {
+  public function testSupportsDenormalization(): void {
     $timestamp_item = $this->createTimestampItemProphecy();
     $this->assertTrue($this->normalizer->supportsDenormalization($timestamp_item->reveal(), TimestampItem::class));
 
@@ -76,7 +76,7 @@ public function testSupportsDenormalization() {
    * @covers ::normalize
    * @see \Drupal\Tests\serialization\Unit\Normalizer\TimestampNormalizerTest
    */
-  public function testNormalize() {
+  public function testNormalize(): void {
     // Mock TimestampItem @FieldType, which contains a Timestamp @DataType,
     // which has a DataDefinition.
     $data_definition = $this->prophesize(DataDefinitionInterface::class);
@@ -112,7 +112,7 @@ public function testNormalize() {
   /**
    * @covers ::denormalize
    */
-  public function testDenormalize() {
+  public function testDenormalize(): void {
     $timestamp_item_normalization = [
       'value' => $this->randomMachineName(),
       'format' => \DateTime::RFC3339,
diff --git a/core/modules/serialization/tests/src/Unit/Normalizer/TimestampNormalizerTest.php b/core/modules/serialization/tests/src/Unit/Normalizer/TimestampNormalizerTest.php
index f64f9c8e0101..f5a172096ddc 100644
--- a/core/modules/serialization/tests/src/Unit/Normalizer/TimestampNormalizerTest.php
+++ b/core/modules/serialization/tests/src/Unit/Normalizer/TimestampNormalizerTest.php
@@ -49,7 +49,7 @@ protected function setUp(): void {
   /**
    * @covers ::supportsNormalization
    */
-  public function testSupportsNormalization() {
+  public function testSupportsNormalization(): void {
     $this->assertTrue($this->normalizer->supportsNormalization($this->data->reveal()));
 
     $integer = $this->prophesize(IntegerData::class);
@@ -62,14 +62,14 @@ public function testSupportsNormalization() {
   /**
    * @covers ::supportsDenormalization
    */
-  public function testSupportsDenormalization() {
+  public function testSupportsDenormalization(): void {
     $this->assertTrue($this->normalizer->supportsDenormalization($this->data->reveal(), Timestamp::class));
   }
 
   /**
    * @covers ::normalize
    */
-  public function testNormalize() {
+  public function testNormalize(): void {
     $random_rfc_3339_string = $this->randomMachineName();
 
     $drupal_date_time = $this->prophesize(TimestampNormalizerTestDrupalDateTime::class);
@@ -91,7 +91,7 @@ public function testNormalize() {
    * @covers ::denormalize
    * @dataProvider providerTestDenormalizeValidFormats
    */
-  public function testDenormalizeValidFormats($normalized, $expected) {
+  public function testDenormalizeValidFormats($normalized, $expected): void {
     $denormalized = $this->normalizer->denormalize($normalized, Timestamp::class, NULL, []);
     $this->assertSame($expected, $denormalized);
   }
@@ -123,7 +123,7 @@ public static function providerTestDenormalizeValidFormats() {
    *
    * @covers ::denormalize
    */
-  public function testDenormalizeException() {
+  public function testDenormalizeException(): void {
     $this->expectException(UnexpectedValueException::class);
     $this->expectExceptionMessage('The specified date "2016/11/06 09:02am GMT" is not in an accepted format: "U" (UNIX timestamp), "Y-m-d\TH:i:sO" (ISO 8601), "Y-m-d\TH:i:sP" (RFC 3339).');
 
diff --git a/core/modules/serialization/tests/src/Unit/Normalizer/TypedDataNormalizerTest.php b/core/modules/serialization/tests/src/Unit/Normalizer/TypedDataNormalizerTest.php
index 4bd2140ead63..004d70d03799 100644
--- a/core/modules/serialization/tests/src/Unit/Normalizer/TypedDataNormalizerTest.php
+++ b/core/modules/serialization/tests/src/Unit/Normalizer/TypedDataNormalizerTest.php
@@ -40,7 +40,7 @@ protected function setUp(): void {
   /**
    * Tests the supportsNormalization() method.
    */
-  public function testSupportsNormalization() {
+  public function testSupportsNormalization(): void {
     $this->assertTrue($this->normalizer->supportsNormalization($this->typedData));
     // Also test that an object not implementing TypedDataInterface fails.
     $this->assertFalse($this->normalizer->supportsNormalization(new \stdClass()));
@@ -49,7 +49,7 @@ public function testSupportsNormalization() {
   /**
    * Tests the normalize() method.
    */
-  public function testNormalize() {
+  public function testNormalize(): void {
     $this->typedData->expects($this->once())
       ->method('getValue')
       ->willReturn('test');
diff --git a/core/modules/settings_tray/tests/src/Functional/SettingsTrayTest.php b/core/modules/settings_tray/tests/src/Functional/SettingsTrayTest.php
index 510afa6ff1b4..d759696e9ea7 100644
--- a/core/modules/settings_tray/tests/src/Functional/SettingsTrayTest.php
+++ b/core/modules/settings_tray/tests/src/Functional/SettingsTrayTest.php
@@ -49,7 +49,7 @@ protected function getBlockSelector(Block $block) {
    *
    * @see SettingsTrayBlockFormTest::testBlocks()
    */
-  public function testPossibleAnnotations() {
+  public function testPossibleAnnotations(): void {
     $test_block_plugin_ids = [
       // Block that explicitly provides an "settings_tray" form class.
       'settings_tray_test_class',
@@ -87,7 +87,7 @@ public function testPossibleAnnotations() {
   /**
    * Tests that certain blocks opt out from Settings Tray.
    */
-  public function testOptOut() {
+  public function testOptOut(): void {
     $web_assert = $this->assertSession();
 
     $non_excluded_block = $this->placeBlock('system_powered_by_block');
diff --git a/core/modules/settings_tray/tests/src/FunctionalJavascript/ConfigAccessTest.php b/core/modules/settings_tray/tests/src/FunctionalJavascript/ConfigAccessTest.php
index 47d35f3ec1d7..023d3f3a3676 100644
--- a/core/modules/settings_tray/tests/src/FunctionalJavascript/ConfigAccessTest.php
+++ b/core/modules/settings_tray/tests/src/FunctionalJavascript/ConfigAccessTest.php
@@ -44,7 +44,7 @@ protected function setUp(): void {
   /**
    * Tests access to block forms with related configuration is correct.
    */
-  public function testBlockConfigAccess() {
+  public function testBlockConfigAccess(): void {
     $page = $this->getSession()->getPage();
     $web_assert = $this->assertSession();
 
diff --git a/core/modules/settings_tray/tests/src/FunctionalJavascript/OverriddenConfigurationTest.php b/core/modules/settings_tray/tests/src/FunctionalJavascript/OverriddenConfigurationTest.php
index 86d4a25f07bd..085b9d6def19 100644
--- a/core/modules/settings_tray/tests/src/FunctionalJavascript/OverriddenConfigurationTest.php
+++ b/core/modules/settings_tray/tests/src/FunctionalJavascript/OverriddenConfigurationTest.php
@@ -46,7 +46,7 @@ protected function setUp(): void {
   /**
    * Tests blocks with overridden related configuration removed when overridden.
    */
-  public function testOverriddenConfigurationRemoved() {
+  public function testOverriddenConfigurationRemoved(): void {
     $web_assert = $this->assertSession();
     $page = $this->getSession()->getPage();
     $this->grantPermissions(Role::load(Role::AUTHENTICATED_ID), ['administer site configuration', 'administer menu']);
@@ -119,7 +119,7 @@ public function testOverriddenConfigurationRemoved() {
   /**
    * Tests that blocks with configuration overrides are disabled.
    */
-  public function testOverriddenBlock() {
+  public function testOverriddenBlock(): void {
     $web_assert = $this->assertSession();
     $page = $this->getSession()->getPage();
     $overridden_block = $this->placeBlock('system_powered_by_block', [
diff --git a/core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayBlockFormTest.php b/core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayBlockFormTest.php
index 68f29bb8de68..cecace7ee323 100644
--- a/core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayBlockFormTest.php
+++ b/core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayBlockFormTest.php
@@ -50,7 +50,7 @@ protected function setUp(): void {
   /**
    * Tests opening off-canvas dialog by click blocks and elements in the blocks.
    */
-  public function testBlocks() {
+  public function testBlocks(): void {
     foreach ($this->getBlockTests() as $test) {
       call_user_func_array([$this, 'doTestBlocks'], array_values($test));
     }
@@ -231,7 +231,7 @@ public function getBlockTests() {
   /**
    * Tests enabling and disabling Edit Mode.
    */
-  public function testEditModeEnableDisable() {
+  public function testEditModeEnableDisable(): void {
     $this->markTestSkipped("Skipped due to frequent random test failures. See https://www.drupal.org/project/drupal/issues/3317520");
     foreach (static::getTestThemes() as $theme) {
       $this->enableTheme($theme);
@@ -267,7 +267,7 @@ public function testEditModeEnableDisable() {
   /**
    * Tests that validation errors appear in the off-canvas dialog.
    */
-  public function testValidationMessages() {
+  public function testValidationMessages(): void {
     $page = $this->getSession()->getPage();
     $web_assert = $this->assertSession();
     foreach (static::getTestThemes() as $theme) {
diff --git a/core/modules/settings_tray/tests/src/Unit/Access/BlockPluginHasSettingsTrayFormAccessCheckTest.php b/core/modules/settings_tray/tests/src/Unit/Access/BlockPluginHasSettingsTrayFormAccessCheckTest.php
index 3c9e1903106c..7228eec0da6c 100644
--- a/core/modules/settings_tray/tests/src/Unit/Access/BlockPluginHasSettingsTrayFormAccessCheckTest.php
+++ b/core/modules/settings_tray/tests/src/Unit/Access/BlockPluginHasSettingsTrayFormAccessCheckTest.php
@@ -26,7 +26,7 @@ class BlockPluginHasSettingsTrayFormAccessCheckTest extends UnitTestCase {
    * @covers ::accessBlockPlugin
    * @dataProvider providerTestAccess
    */
-  public function testAccess($with_forms, array $plugin_definition, AccessResultInterface $expected_access_result) {
+  public function testAccess($with_forms, array $plugin_definition, AccessResultInterface $expected_access_result): void {
     $block_plugin = $this->prophesize()->willImplement(BlockPluginInterface::class);
 
     if ($with_forms) {
diff --git a/core/modules/shortcut/tests/src/Functional/ShortcutCacheTagsTest.php b/core/modules/shortcut/tests/src/Functional/ShortcutCacheTagsTest.php
index b343215fd07f..cb7c30968a2f 100644
--- a/core/modules/shortcut/tests/src/Functional/ShortcutCacheTagsTest.php
+++ b/core/modules/shortcut/tests/src/Functional/ShortcutCacheTagsTest.php
@@ -85,7 +85,7 @@ protected function createEntity() {
   /**
    * Tests that when creating a shortcut, the shortcut set tag is invalidated.
    */
-  public function testEntityCreation() {
+  public function testEntityCreation(): void {
     $cache_bin = $this->getRenderCacheBackend();
 
     // Create a cache entry that is tagged with a shortcut set cache tag.
@@ -108,7 +108,7 @@ public function testEntityCreation() {
   /**
    * Tests visibility and cacheability of shortcuts in the toolbar.
    */
-  public function testToolbar() {
+  public function testToolbar(): void {
     $this->drupalPlaceBlock('page_title_block', ['id' => 'title']);
 
     $test_page_url = Url::fromRoute('test_page_test.test_page');
diff --git a/core/modules/shortcut/tests/src/Functional/ShortcutLinksTest.php b/core/modules/shortcut/tests/src/Functional/ShortcutLinksTest.php
index dc9f9909296f..ebdd545db098 100644
--- a/core/modules/shortcut/tests/src/Functional/ShortcutLinksTest.php
+++ b/core/modules/shortcut/tests/src/Functional/ShortcutLinksTest.php
@@ -69,7 +69,7 @@ protected function setUp(): void {
   /**
    * Tests that creating a shortcut works properly.
    */
-  public function testShortcutLinkAdd() {
+  public function testShortcutLinkAdd(): void {
     $set = $this->set;
 
     // Create an alias for the node so we can test aliases.
@@ -171,7 +171,7 @@ public function testShortcutLinkAdd() {
   /**
    * Tests that the "add to shortcut" and "remove from shortcut" links work.
    */
-  public function testShortcutQuickLink() {
+  public function testShortcutQuickLink(): void {
     \Drupal::service('theme_installer')->install(['claro']);
     $this->config('system.theme')->set('admin', 'claro')->save();
     $this->config('node.settings')->set('use_admin_theme', '1')->save();
@@ -255,7 +255,7 @@ public function testShortcutQuickLink() {
   /**
    * Tests that shortcut links can be renamed.
    */
-  public function testShortcutLinkRename() {
+  public function testShortcutLinkRename(): void {
     $set = $this->set;
 
     // Attempt to rename shortcut link.
@@ -275,7 +275,7 @@ public function testShortcutLinkRename() {
   /**
    * Tests that changing the path of a shortcut link works.
    */
-  public function testShortcutLinkChangePath() {
+  public function testShortcutLinkChangePath(): void {
     $set = $this->set;
 
     // Tests changing a shortcut path.
@@ -298,7 +298,7 @@ public function testShortcutLinkChangePath() {
   /**
    * Tests that changing the route of a shortcut link works.
    */
-  public function testShortcutLinkChangeRoute() {
+  public function testShortcutLinkChangeRoute(): void {
     $this->drupalLogin($this->adminUser);
     $this->drupalGet('admin/content');
     $this->assertSession()->statusCodeEquals(200);
@@ -314,7 +314,7 @@ public function testShortcutLinkChangeRoute() {
   /**
    * Tests deleting a shortcut link.
    */
-  public function testShortcutLinkDelete() {
+  public function testShortcutLinkDelete(): void {
     $set = $this->set;
 
     $shortcuts = $set->getShortcuts();
@@ -339,7 +339,7 @@ public function testShortcutLinkDelete() {
    * Tests that the "Add to shortcuts" link is not displayed on a page not
    * found or a page the user does not have access to.
    */
-  public function testNoShortcutLink() {
+  public function testNoShortcutLink(): void {
     // Change to a theme that displays shortcuts.
     \Drupal::service('theme_installer')->install(['claro']);
     $this->config('system.theme')
@@ -367,7 +367,7 @@ public function testNoShortcutLink() {
   /**
    * Tests that the 'access shortcuts' permissions works properly.
    */
-  public function testAccessShortcutsPermission() {
+  public function testAccessShortcutsPermission(): void {
     // Change to a theme that displays shortcuts.
     \Drupal::service('theme_installer')->install(['claro']);
     $this->config('system.theme')
@@ -407,7 +407,7 @@ public function testAccessShortcutsPermission() {
   /**
    * Tests the shortcuts are correctly ordered by weight in the toolbar.
    */
-  public function testShortcutLinkOrder() {
+  public function testShortcutLinkOrder(): void {
     // Ensure to give permissions to access the shortcuts.
     $this->drupalLogin($this->drupalCreateUser([
       'access toolbar',
@@ -454,7 +454,7 @@ private function verifyAccessShortcutsPermissionForEditPages() {
   /**
    * Tests the 'access shortcuts' permission with the shortcut block.
    */
-  public function testShortcutBlockAccess() {
+  public function testShortcutBlockAccess(): void {
     // Creates a block instance and place in a region through api.
     $block = $this->drupalPlaceBlock('shortcuts');
 
diff --git a/core/modules/shortcut/tests/src/Functional/ShortcutSetsTest.php b/core/modules/shortcut/tests/src/Functional/ShortcutSetsTest.php
index cf6e2893a484..e426d8fffbe9 100644
--- a/core/modules/shortcut/tests/src/Functional/ShortcutSetsTest.php
+++ b/core/modules/shortcut/tests/src/Functional/ShortcutSetsTest.php
@@ -37,7 +37,7 @@ protected function setUp(): void {
   /**
    * Tests creating a shortcut set.
    */
-  public function testShortcutSetAdd() {
+  public function testShortcutSetAdd(): void {
     $this->drupalGet('admin/config/user-interface/shortcut');
     $this->clickLink('Add shortcut set');
     $edit = [
@@ -56,7 +56,7 @@ public function testShortcutSetAdd() {
   /**
    * Tests editing a shortcut set.
    */
-  public function testShortcutSetEdit() {
+  public function testShortcutSetEdit(): void {
     $set = $this->set;
     $shortcuts = $set->getShortcuts();
 
@@ -106,7 +106,7 @@ public function testShortcutSetEdit() {
   /**
    * Tests switching a user's own shortcut set.
    */
-  public function testShortcutSetSwitchOwn() {
+  public function testShortcutSetSwitchOwn(): void {
     $new_set = $this->generateShortcutSet($this->randomMachineName());
 
     // Attempt to switch the default shortcut set to the newly created shortcut
@@ -122,7 +122,7 @@ public function testShortcutSetSwitchOwn() {
   /**
    * Tests switching another user's shortcut set.
    */
-  public function testShortcutSetAssign() {
+  public function testShortcutSetAssign(): void {
     $new_set = $this->generateShortcutSet($this->randomMachineName());
 
     $shortcut_set_storage = \Drupal::entityTypeManager()->getStorage('shortcut_set');
@@ -134,7 +134,7 @@ public function testShortcutSetAssign() {
   /**
    * Tests switching a user's shortcut set and creating one at the same time.
    */
-  public function testShortcutSetSwitchCreate() {
+  public function testShortcutSetSwitchCreate(): void {
     $edit = [
       'set' => 'new',
       'id' => $this->randomMachineName(),
@@ -151,7 +151,7 @@ public function testShortcutSetSwitchCreate() {
   /**
    * Tests switching a user's shortcut set without providing a new set name.
    */
-  public function testShortcutSetSwitchNoSetName() {
+  public function testShortcutSetSwitchNoSetName(): void {
     $edit = ['set' => 'new'];
     $this->drupalGet('user/' . $this->adminUser->id() . '/shortcuts');
     $this->submitForm($edit, 'Change set');
@@ -166,7 +166,7 @@ public function testShortcutSetSwitchNoSetName() {
   /**
    * Tests renaming a shortcut set.
    */
-  public function testShortcutSetRename() {
+  public function testShortcutSetRename(): void {
     $set = $this->set;
 
     $new_label = $this->randomMachineName();
@@ -180,7 +180,7 @@ public function testShortcutSetRename() {
   /**
    * Tests un-assigning a shortcut set.
    */
-  public function testShortcutSetUnassign() {
+  public function testShortcutSetUnassign(): void {
     $new_set = $this->generateShortcutSet($this->randomMachineName());
 
     $shortcut_set_storage = \Drupal::entityTypeManager()->getStorage('shortcut_set');
@@ -194,7 +194,7 @@ public function testShortcutSetUnassign() {
   /**
    * Tests assign clearing on user removal.
    */
-  public function testShortcutSetUnassignOnUserRemoval() {
+  public function testShortcutSetUnassignOnUserRemoval(): void {
     $new_set = $this->generateShortcutSet($this->randomMachineName());
 
     $shortcut_set_storage = \Drupal::entityTypeManager()->getStorage('shortcut_set');
@@ -208,7 +208,7 @@ public function testShortcutSetUnassignOnUserRemoval() {
   /**
    * Tests deleting a shortcut set.
    */
-  public function testShortcutSetDelete() {
+  public function testShortcutSetDelete(): void {
     $new_set = $this->generateShortcutSet($this->randomMachineName());
 
     $this->drupalGet('admin/config/user-interface/shortcut/manage/' . $new_set->id() . '/delete');
@@ -220,7 +220,7 @@ public function testShortcutSetDelete() {
   /**
    * Tests deleting the default shortcut set.
    */
-  public function testShortcutSetDeleteDefault() {
+  public function testShortcutSetDeleteDefault(): void {
     $this->drupalGet('admin/config/user-interface/shortcut/manage/default/delete');
     $this->assertSession()->statusCodeEquals(403);
   }
@@ -228,7 +228,7 @@ public function testShortcutSetDeleteDefault() {
   /**
    * Tests creating a new shortcut set with a defined set name.
    */
-  public function testShortcutSetCreateWithSetName() {
+  public function testShortcutSetCreateWithSetName(): void {
     $random_name = $this->randomMachineName();
     $new_set = $this->generateShortcutSet($random_name, $random_name);
     $sets = ShortcutSet::loadMultiple();
diff --git a/core/modules/shortcut/tests/src/Kernel/Migrate/MigrateShortcutStubTest.php b/core/modules/shortcut/tests/src/Kernel/Migrate/MigrateShortcutStubTest.php
index 794c07a6d91b..9bdf7005e2a9 100644
--- a/core/modules/shortcut/tests/src/Kernel/Migrate/MigrateShortcutStubTest.php
+++ b/core/modules/shortcut/tests/src/Kernel/Migrate/MigrateShortcutStubTest.php
@@ -34,7 +34,7 @@ protected function setUp(): void {
   /**
    * Tests creation of shortcut stubs.
    */
-  public function testStub() {
+  public function testStub(): void {
     $this->performStubTest('shortcut');
   }
 
diff --git a/core/modules/shortcut/tests/src/Kernel/Migrate/d7/MigrateShortcutSetTest.php b/core/modules/shortcut/tests/src/Kernel/Migrate/d7/MigrateShortcutSetTest.php
index ee77154bf7dd..a889c853a8d5 100644
--- a/core/modules/shortcut/tests/src/Kernel/Migrate/d7/MigrateShortcutSetTest.php
+++ b/core/modules/shortcut/tests/src/Kernel/Migrate/d7/MigrateShortcutSetTest.php
@@ -42,7 +42,7 @@ protected function setUp(): void {
   /**
    * Tests the shortcut set migration.
    */
-  public function testShortcutSetMigration() {
+  public function testShortcutSetMigration(): void {
     $this->assertEntity('default', 'Default', 2);
     $this->assertEntity('shortcut-set-2', 'Alternative shortcut set', 2);
   }
diff --git a/core/modules/shortcut/tests/src/Kernel/Migrate/d7/MigrateShortcutSetUsersTest.php b/core/modules/shortcut/tests/src/Kernel/Migrate/d7/MigrateShortcutSetUsersTest.php
index 284d100cacef..8a9d1209b9bd 100644
--- a/core/modules/shortcut/tests/src/Kernel/Migrate/d7/MigrateShortcutSetUsersTest.php
+++ b/core/modules/shortcut/tests/src/Kernel/Migrate/d7/MigrateShortcutSetUsersTest.php
@@ -44,7 +44,7 @@ protected function setUp(): void {
   /**
    * Tests the shortcut set migration.
    */
-  public function testShortcutSetUsersMigration() {
+  public function testShortcutSetUsersMigration(): void {
     // Check if migrated user has correct migrated shortcut set assigned.
     $account = User::load(2);
     $shortcut_set_storage = \Drupal::entityTypeManager()->getStorage('shortcut_set');
diff --git a/core/modules/shortcut/tests/src/Kernel/Migrate/d7/MigrateShortcutTest.php b/core/modules/shortcut/tests/src/Kernel/Migrate/d7/MigrateShortcutTest.php
index bf659112cb10..65294fc2b6b9 100644
--- a/core/modules/shortcut/tests/src/Kernel/Migrate/d7/MigrateShortcutTest.php
+++ b/core/modules/shortcut/tests/src/Kernel/Migrate/d7/MigrateShortcutTest.php
@@ -65,7 +65,7 @@ protected function assertEntity(int $id, string $title, int $weight, string $url
   /**
    * Tests the shortcut migration.
    */
-  public function testShortcutMigration() {
+  public function testShortcutMigration(): void {
     // Check if the 4 shortcuts were migrated correctly.
     $this->assertEntity(1, 'Add content', -20, '/node/add');
     $this->assertEntity(2, 'Find content', -19, '/admin/content');
diff --git a/core/modules/shortcut/tests/src/Kernel/ShortcutClaroIntegrationTest.php b/core/modules/shortcut/tests/src/Kernel/ShortcutClaroIntegrationTest.php
index 0f0246044637..086f464b8d9d 100644
--- a/core/modules/shortcut/tests/src/Kernel/ShortcutClaroIntegrationTest.php
+++ b/core/modules/shortcut/tests/src/Kernel/ShortcutClaroIntegrationTest.php
@@ -18,7 +18,7 @@ class ShortcutClaroIntegrationTest extends KernelTestBase {
   /**
    * Tests shortcut_install() and shortcut_uninstall().
    */
-  public function testInstallUninstall() {
+  public function testInstallUninstall(): void {
     // Install claro.
     \Drupal::service('theme_installer')->install(['claro']);
     $this->assertNull($this->config('claro.settings')->get('third_party_settings.shortcut'), 'There are no shortcut settings in claro.settings.');
diff --git a/core/modules/shortcut/tests/src/Unit/Menu/ShortcutLocalTasksTest.php b/core/modules/shortcut/tests/src/Unit/Menu/ShortcutLocalTasksTest.php
index a95d723f7985..79f15dffda62 100644
--- a/core/modules/shortcut/tests/src/Unit/Menu/ShortcutLocalTasksTest.php
+++ b/core/modules/shortcut/tests/src/Unit/Menu/ShortcutLocalTasksTest.php
@@ -38,7 +38,7 @@ protected function setUp(): void {
    *
    * @dataProvider getShortcutPageRoutes
    */
-  public function testShortcutPageLocalTasks($route) {
+  public function testShortcutPageLocalTasks($route): void {
     $tasks = [
       0 => ['shortcut.set_switch', 'entity.user.canonical', 'entity.user.edit_form'],
     ];
diff --git a/core/modules/sqlite/tests/src/Kernel/sqlite/DatabaseExceptionWrapperTest.php b/core/modules/sqlite/tests/src/Kernel/sqlite/DatabaseExceptionWrapperTest.php
index 57afccbf2f6a..110efc13941f 100644
--- a/core/modules/sqlite/tests/src/Kernel/sqlite/DatabaseExceptionWrapperTest.php
+++ b/core/modules/sqlite/tests/src/Kernel/sqlite/DatabaseExceptionWrapperTest.php
@@ -16,7 +16,7 @@ class DatabaseExceptionWrapperTest extends DriverSpecificKernelTestBase {
   /**
    * Tests Connection::prepareStatement exception on execution.
    */
-  public function testPrepareStatementFailOnExecution() {
+  public function testPrepareStatementFailOnExecution(): void {
     $this->expectException(\PDOException::class);
     $stmt = $this->connection->prepareStatement('bananas', []);
     $stmt->execute();
diff --git a/core/modules/sqlite/tests/src/Kernel/sqlite/TemporaryQueryTest.php b/core/modules/sqlite/tests/src/Kernel/sqlite/TemporaryQueryTest.php
index 6a6a0d0f1000..bd9eb97b28c1 100644
--- a/core/modules/sqlite/tests/src/Kernel/sqlite/TemporaryQueryTest.php
+++ b/core/modules/sqlite/tests/src/Kernel/sqlite/TemporaryQueryTest.php
@@ -16,7 +16,7 @@ class TemporaryQueryTest extends TemporaryQueryTestBase {
   /**
    * Confirms that temporary tables work.
    */
-  public function testTemporaryQuery() {
+  public function testTemporaryQuery(): void {
     parent::testTemporaryQuery();
 
     $connection = $this->getConnection();
diff --git a/core/modules/sqlite/tests/src/Unit/ConnectionTest.php b/core/modules/sqlite/tests/src/Unit/ConnectionTest.php
index 28ae34ab925f..b1f1290a98e4 100644
--- a/core/modules/sqlite/tests/src/Unit/ConnectionTest.php
+++ b/core/modules/sqlite/tests/src/Unit/ConnectionTest.php
@@ -23,7 +23,7 @@ class ConnectionTest extends UnitTestCase {
    * @param string $expected
    *   Expected connection option.
    */
-  public function testCreateConnectionOptionsFromUrl(string $url, string $expected) {
+  public function testCreateConnectionOptionsFromUrl(string $url, string $expected): void {
     $root = dirname(__DIR__, 8);
     $sqlite_connection = new Connection($this->createMock(StubPDO::class), []);
     $database = $sqlite_connection->createConnectionOptionsFromUrl($url, $root);
diff --git a/core/modules/syslog/tests/src/Functional/SyslogTest.php b/core/modules/syslog/tests/src/Functional/SyslogTest.php
index 4ae5e4d4ed12..875de498b68c 100644
--- a/core/modules/syslog/tests/src/Functional/SyslogTest.php
+++ b/core/modules/syslog/tests/src/Functional/SyslogTest.php
@@ -28,7 +28,7 @@ class SyslogTest extends BrowserTestBase {
   /**
    * Tests the syslog settings page.
    */
-  public function testSettings() {
+  public function testSettings(): void {
     $admin_user = $this->drupalCreateUser(['administer site configuration']);
     $this->drupalLogin($admin_user);
 
diff --git a/core/modules/syslog/tests/src/Kernel/Migrate/d6/MigrateSyslogConfigsTest.php b/core/modules/syslog/tests/src/Kernel/Migrate/d6/MigrateSyslogConfigsTest.php
index 0047c3674d35..2d596182fe02 100644
--- a/core/modules/syslog/tests/src/Kernel/Migrate/d6/MigrateSyslogConfigsTest.php
+++ b/core/modules/syslog/tests/src/Kernel/Migrate/d6/MigrateSyslogConfigsTest.php
@@ -37,7 +37,7 @@ protected function setUp(): void {
   /**
    * Tests migration of syslog variables to syslog.settings.yml.
    */
-  public function testSyslogSettings() {
+  public function testSyslogSettings(): void {
     $config = $this->config('syslog.settings');
     $this->assertSame('drupal', $config->get('identity'));
     $this->assertSame(128, $config->get('facility'));
diff --git a/core/modules/syslog/tests/src/Kernel/Migrate/d7/MigrateSyslogConfigsTest.php b/core/modules/syslog/tests/src/Kernel/Migrate/d7/MigrateSyslogConfigsTest.php
index ea016ab0b212..8e02ebca750a 100644
--- a/core/modules/syslog/tests/src/Kernel/Migrate/d7/MigrateSyslogConfigsTest.php
+++ b/core/modules/syslog/tests/src/Kernel/Migrate/d7/MigrateSyslogConfigsTest.php
@@ -35,7 +35,7 @@ protected function setUp(): void {
   /**
    * Tests migration of syslog variables to syslog.settings.yml.
    */
-  public function testSyslogSettings() {
+  public function testSyslogSettings(): void {
     $config = $this->config('syslog.settings');
     // 8 == LOG_USER
     $this->assertSame(8, $config->get('facility'));
diff --git a/core/modules/syslog/tests/src/Kernel/SyslogTest.php b/core/modules/syslog/tests/src/Kernel/SyslogTest.php
index 0dad129c6a10..15ff370d96e1 100644
--- a/core/modules/syslog/tests/src/Kernel/SyslogTest.php
+++ b/core/modules/syslog/tests/src/Kernel/SyslogTest.php
@@ -30,7 +30,7 @@ protected function setUp(): void {
   /**
    * @covers ::log
    */
-  public function testSyslogWriting() {
+  public function testSyslogWriting(): void {
 
     $request = Request::create('/page-not-found', 'GET', [], [], [], ['REMOTE_ADDR' => '1.2.3.4']);
     $request->headers->set('Referer', 'other-site');
@@ -72,7 +72,7 @@ public function testSyslogWriting() {
    *
    * @covers ::openConnection
    */
-  public function testSyslogMissingFacility() {
+  public function testSyslogMissingFacility(): void {
     $config = $this->container->get('config.factory')->getEditable('syslog.settings');
     $config->clear('facility');
     $config->save();
@@ -86,7 +86,7 @@ public function testSyslogMissingFacility() {
    *
    * @covers ::log
    */
-  public function testSyslogSeverity() {
+  public function testSyslogSeverity(): void {
     /** @var \Drupal\Core\Config\Config $config */
     $config = $this->container->get('config.factory')->getEditable('syslog.settings');
     $config->set('format', '!type|!message|!severity');
diff --git a/core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestComputedFieldNormalizerTest.php b/core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestComputedFieldNormalizerTest.php
index bfc2d25386d3..8b854c3befb5 100644
--- a/core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestComputedFieldNormalizerTest.php
+++ b/core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestComputedFieldNormalizerTest.php
@@ -91,7 +91,7 @@ protected function getExpectedCacheTags() {
   /**
    * {@inheritdoc}
    */
-  public function testPost() {
+  public function testPost(): void {
     // Post test not required.
     $this->markTestSkipped();
   }
@@ -99,7 +99,7 @@ public function testPost() {
   /**
    * {@inheritdoc}
    */
-  public function testPatch() {
+  public function testPatch(): void {
     // Patch test not required.
     $this->markTestSkipped();
   }
@@ -107,7 +107,7 @@ public function testPatch() {
   /**
    * {@inheritdoc}
    */
-  public function testDelete() {
+  public function testDelete(): void {
     // Delete test not required.
     $this->markTestSkipped();
   }
diff --git a/core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestTextItemNormalizerTest.php b/core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestTextItemNormalizerTest.php
index 130649f03217..49f48c009b1f 100644
--- a/core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestTextItemNormalizerTest.php
+++ b/core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestTextItemNormalizerTest.php
@@ -157,7 +157,7 @@ protected function getExpectedCacheContexts() {
    *
    * @dataProvider providerTestGetWithFormat
    */
-  public function testGetWithFormat($text_format_id, array $expected_cache_tags) {
+  public function testGetWithFormat($text_format_id, array $expected_cache_tags): void {
     FilterFormat::create([
       'name' => 'Pablo Picasso',
       'format' => 'pablo',
diff --git a/core/modules/system/tests/src/Functional/Ajax/FrameworkTest.php b/core/modules/system/tests/src/Functional/Ajax/FrameworkTest.php
index c8d68ad0ef1a..037e0de5115b 100644
--- a/core/modules/system/tests/src/Functional/Ajax/FrameworkTest.php
+++ b/core/modules/system/tests/src/Functional/Ajax/FrameworkTest.php
@@ -34,7 +34,7 @@ class FrameworkTest extends BrowserTestBase {
   /**
    * Verifies the Ajax rendering of a command in the settings.
    */
-  public function testAJAXRender() {
+  public function testAJAXRender(): void {
     // Verify that settings command is generated if JavaScript settings exist.
     $commands = $this->drupalGetAjax('ajax-test/render');
     $expected = new SettingsCommand(['ajax' => 'test'], TRUE);
@@ -44,7 +44,7 @@ public function testAJAXRender() {
   /**
    * Tests AjaxResponse::prepare() AJAX commands ordering.
    */
-  public function testOrder() {
+  public function testOrder(): void {
     $expected_commands = [];
 
     // Expected commands, in a very specific order.
@@ -81,7 +81,7 @@ public function testOrder() {
   /**
    * Tests the behavior of an error alert command.
    */
-  public function testAJAXRenderError() {
+  public function testAJAXRenderError(): void {
     // Verify custom error message.
     $edit = [
       'message' => 'Custom error message.',
diff --git a/core/modules/system/tests/src/Functional/Ajax/OffCanvasDialogTest.php b/core/modules/system/tests/src/Functional/Ajax/OffCanvasDialogTest.php
index 5b20009d2c42..217576602e24 100644
--- a/core/modules/system/tests/src/Functional/Ajax/OffCanvasDialogTest.php
+++ b/core/modules/system/tests/src/Functional/Ajax/OffCanvasDialogTest.php
@@ -33,7 +33,7 @@ class OffCanvasDialogTest extends BrowserTestBase {
    *
    * @dataProvider dialogPosition
    */
-  public function testDialog($position) {
+  public function testDialog($position): void {
     // Ensure the elements render without notices or exceptions.
     $this->drupalGet('ajax-test/dialog');
 
diff --git a/core/modules/system/tests/src/Functional/Batch/PageTest.php b/core/modules/system/tests/src/Functional/Batch/PageTest.php
index 052b2cd124d3..f6fa8e68968e 100644
--- a/core/modules/system/tests/src/Functional/Batch/PageTest.php
+++ b/core/modules/system/tests/src/Functional/Batch/PageTest.php
@@ -28,7 +28,7 @@ class PageTest extends BrowserTestBase {
   /**
    * Tests that the batch API progress page uses the correct theme.
    */
-  public function testBatchProgressPageTheme() {
+  public function testBatchProgressPageTheme(): void {
     // Make sure that the page which starts the batch (an administrative page)
     // is using a different theme than would normally be used by the batch API.
     $this->container->get('theme_installer')->install(['claro', 'olivero']);
@@ -53,7 +53,7 @@ public function testBatchProgressPageTheme() {
   /**
    * Tests that the batch API progress page shows the title correctly.
    */
-  public function testBatchProgressPageTitle() {
+  public function testBatchProgressPageTitle(): void {
     // Visit an administrative page that runs a test batch, and check that the
     // title shown during batch execution (which the batch callback function
     // saved as a variable) matches the theme used on the administrative page.
@@ -74,7 +74,7 @@ public function testBatchProgressPageTitle() {
   /**
    * Tests that the progress messages are correct.
    */
-  public function testBatchProgressMessages() {
+  public function testBatchProgressMessages(): void {
     // Go to the initial step only.
     $this->maximumMetaRefreshCount = 0;
     $this->drupalGet('batch-test/test-title');
diff --git a/core/modules/system/tests/src/Functional/Batch/ProcessingTest.php b/core/modules/system/tests/src/Functional/Batch/ProcessingTest.php
index d510548d34b7..29786931d925 100644
--- a/core/modules/system/tests/src/Functional/Batch/ProcessingTest.php
+++ b/core/modules/system/tests/src/Functional/Batch/ProcessingTest.php
@@ -29,7 +29,7 @@ class ProcessingTest extends BrowserTestBase {
   /**
    * Tests batches triggered outside of form submission.
    */
-  public function testBatchNoForm() {
+  public function testBatchNoForm(): void {
     // Displaying the page triggers batch 1.
     $this->drupalGet('batch-test/no-form');
     $this->assertBatchMessages($this->_resultMessages('batch_1'));
@@ -40,7 +40,7 @@ public function testBatchNoForm() {
   /**
    * Tests batches that redirect in the batch finished callback.
    */
-  public function testBatchRedirectFinishedCallback() {
+  public function testBatchRedirectFinishedCallback(): void {
     // Displaying the page triggers batch 1.
     $this->drupalGet('batch-test/finish-redirect');
     $this->assertBatchMessages($this->_resultMessages('batch_1'));
@@ -54,7 +54,7 @@ public function testBatchRedirectFinishedCallback() {
   /**
    * Tests batches defined in a form submit handler.
    */
-  public function testBatchForm() {
+  public function testBatchForm(): void {
     // Batch 0: no operation.
     $edit = ['batch' => 'batch_0'];
     $this->drupalGet('batch-test');
@@ -132,7 +132,7 @@ public function testBatchForm() {
   /**
    * Tests batches defined in a multistep form.
    */
-  public function testBatchFormMultistep() {
+  public function testBatchFormMultistep(): void {
     $this->drupalGet('batch-test/multistep');
     $this->assertSession()->assertNoEscaped('<');
     $this->assertSession()->pageTextContains('step 1');
@@ -162,7 +162,7 @@ public function testBatchFormMultistep() {
   /**
    * Tests batches defined in different submit handlers on the same form.
    */
-  public function testBatchFormMultipleBatches() {
+  public function testBatchFormMultipleBatches(): void {
     // Batches 1, 2 and 3 are triggered in sequence by different submit
     // handlers. Each submit handler modify the submitted 'value'.
     $value = rand(0, 255);
@@ -182,7 +182,7 @@ public function testBatchFormMultipleBatches() {
    *
    * Same as above, but the form is submitted through drupal_form_execute().
    */
-  public function testBatchFormProgrammatic() {
+  public function testBatchFormProgrammatic(): void {
     // Batches 1, 2 and 3 are triggered in sequence by different submit
     // handlers. Each submit handler modify the submitted 'value'.
     $value = rand(0, 255);
@@ -198,7 +198,7 @@ public function testBatchFormProgrammatic() {
   /**
    * Tests form submission during a batch operation.
    */
-  public function testDrupalFormSubmitInBatch() {
+  public function testDrupalFormSubmitInBatch(): void {
     // Displaying the page triggers a batch that programmatically submits a
     // form.
     $value = rand(0, 255);
@@ -211,7 +211,7 @@ public function testDrupalFormSubmitInBatch() {
    *
    * @see https://www.drupal.org/node/600836
    */
-  public function testBatchLargePercentage() {
+  public function testBatchLargePercentage(): void {
     // Displaying the page triggers batch 5.
     $this->drupalGet('batch-test/large-percentage');
     $this->assertBatchMessages($this->_resultMessages('batch_5'));
diff --git a/core/modules/system/tests/src/Functional/Bootstrap/DrupalMessengerServiceTest.php b/core/modules/system/tests/src/Functional/Bootstrap/DrupalMessengerServiceTest.php
index 8fdc4500a32a..d27a70185042 100644
--- a/core/modules/system/tests/src/Functional/Bootstrap/DrupalMessengerServiceTest.php
+++ b/core/modules/system/tests/src/Functional/Bootstrap/DrupalMessengerServiceTest.php
@@ -30,7 +30,7 @@ class DrupalMessengerServiceTest extends BrowserTestBase {
   /**
    * Tests Messenger service.
    */
-  public function testDrupalMessengerService() {
+  public function testDrupalMessengerService(): void {
     // The page at system_test.messenger_service route sets two messages and
     // then removes the first before it is displayed.
     $this->drupalGet(Url::fromRoute('system_test.messenger_service'));
diff --git a/core/modules/system/tests/src/Functional/Cache/ClearTest.php b/core/modules/system/tests/src/Functional/Cache/ClearTest.php
index dc82558d7c5d..3466bba07889 100644
--- a/core/modules/system/tests/src/Functional/Cache/ClearTest.php
+++ b/core/modules/system/tests/src/Functional/Cache/ClearTest.php
@@ -31,7 +31,7 @@ protected function setUp(): void {
   /**
    * Tests drupal_flush_all_caches().
    */
-  public function testFlushAllCaches() {
+  public function testFlushAllCaches(): void {
     // Create cache entries for each flushed cache bin.
     $bins = Cache::getBins();
     $this->assertNotEmpty($bins, 'Cache::getBins() returned bins to flush.');
diff --git a/core/modules/system/tests/src/Functional/Cache/SessionExistsCacheContextTest.php b/core/modules/system/tests/src/Functional/Cache/SessionExistsCacheContextTest.php
index a762788fded5..0e1ce27af49a 100644
--- a/core/modules/system/tests/src/Functional/Cache/SessionExistsCacheContextTest.php
+++ b/core/modules/system/tests/src/Functional/Cache/SessionExistsCacheContextTest.php
@@ -29,7 +29,7 @@ class SessionExistsCacheContextTest extends BrowserTestBase {
   /**
    * Tests \Drupal\Core\Cache\Context\SessionExistsCacheContext::getContext().
    */
-  public function testCacheContext() {
+  public function testCacheContext(): void {
     // 1. No session (anonymous).
     $this->assertSessionCookieOnClient(FALSE);
     $this->drupalGet(Url::fromRoute('<front>'));
diff --git a/core/modules/system/tests/src/Functional/Common/EarlyRenderingControllerTest.php b/core/modules/system/tests/src/Functional/Common/EarlyRenderingControllerTest.php
index f55453e288ed..ad7e5903001e 100644
--- a/core/modules/system/tests/src/Functional/Common/EarlyRenderingControllerTest.php
+++ b/core/modules/system/tests/src/Functional/Common/EarlyRenderingControllerTest.php
@@ -27,7 +27,7 @@ class EarlyRenderingControllerTest extends BrowserTestBase {
   /**
    * Tests theme preprocess functions being able to attach assets.
    */
-  public function testEarlyRendering() {
+  public function testEarlyRendering(): void {
     // Render array: non-early & early.
     $this->drupalGet(Url::fromRoute('early_rendering_controller_test.render_array'));
     $this->assertSession()->statusCodeEquals(200);
diff --git a/core/modules/system/tests/src/Functional/Common/FormatDateTest.php b/core/modules/system/tests/src/Functional/Common/FormatDateTest.php
index 1664a8822c0f..79978e2adb59 100644
--- a/core/modules/system/tests/src/Functional/Common/FormatDateTest.php
+++ b/core/modules/system/tests/src/Functional/Common/FormatDateTest.php
@@ -21,7 +21,7 @@ class FormatDateTest extends BrowserTestBase {
   /**
    * Tests admin-defined formats in DateFormatterInterface::format().
    */
-  public function testAdminDefinedFormatDate() {
+  public function testAdminDefinedFormatDate(): void {
     // Create and log in an admin user.
     $this->drupalLogin($this->drupalCreateUser([
       'administer site configuration',
diff --git a/core/modules/system/tests/src/Functional/Common/RenderWebTest.php b/core/modules/system/tests/src/Functional/Common/RenderWebTest.php
index 7abc21328061..e130023142a1 100644
--- a/core/modules/system/tests/src/Functional/Common/RenderWebTest.php
+++ b/core/modules/system/tests/src/Functional/Common/RenderWebTest.php
@@ -33,7 +33,7 @@ class RenderWebTest extends BrowserTestBase {
   /**
    * Asserts the cache context for the wrapper format is always present.
    */
-  public function testWrapperFormatCacheContext() {
+  public function testWrapperFormatCacheContext(): void {
     $this->drupalGet('common-test/type-link-active-class');
     $this->assertStringStartsWith("<!DOCTYPE html>\n<html", $this->getSession()->getPage()->getContent());
     $this->assertSession()->responseHeaderEquals('Content-Type', 'text/html; charset=UTF-8');
diff --git a/core/modules/system/tests/src/Functional/Common/UrlTest.php b/core/modules/system/tests/src/Functional/Common/UrlTest.php
index 506236bf85b6..8e22d2a03bd8 100644
--- a/core/modules/system/tests/src/Functional/Common/UrlTest.php
+++ b/core/modules/system/tests/src/Functional/Common/UrlTest.php
@@ -24,7 +24,7 @@ class UrlTest extends BrowserTestBase {
   /**
    * Tests the active class in links.
    */
-  public function testActiveLinkAttributes() {
+  public function testActiveLinkAttributes(): void {
     $options_no_query = [];
     $options_query = [
       'query' => [
diff --git a/core/modules/system/tests/src/Functional/Condition/ConditionFormTest.php b/core/modules/system/tests/src/Functional/Condition/ConditionFormTest.php
index b4e1e229ee68..932f4d5fd7cf 100644
--- a/core/modules/system/tests/src/Functional/Condition/ConditionFormTest.php
+++ b/core/modules/system/tests/src/Functional/Condition/ConditionFormTest.php
@@ -28,7 +28,7 @@ class ConditionFormTest extends BrowserTestBase {
   /**
    * Submit the condition_node_type_test_form to test condition forms.
    */
-  public function testConfigForm() {
+  public function testConfigForm(): void {
     $this->drupalCreateContentType(['type' => 'page', 'name' => 'Page']);
     $this->drupalCreateContentType(['type' => 'article', 'name' => 'Article']);
 
diff --git a/core/modules/system/tests/src/Functional/CsrfRequestHeaderTest.php b/core/modules/system/tests/src/Functional/CsrfRequestHeaderTest.php
index 9947b556ac66..89da05c6fa6d 100644
--- a/core/modules/system/tests/src/Functional/CsrfRequestHeaderTest.php
+++ b/core/modules/system/tests/src/Functional/CsrfRequestHeaderTest.php
@@ -31,7 +31,7 @@ class CsrfRequestHeaderTest extends BrowserTestBase {
    *
    * This checks one route that uses _csrf_request_header_token.
    */
-  public function testRouteAccess() {
+  public function testRouteAccess(): void {
     $client = $this->getHttpClient();
     $csrf_token_path = 'session/token';
     // Test using the current path.
diff --git a/core/modules/system/tests/src/Functional/Database/SelectPagerDefaultTest.php b/core/modules/system/tests/src/Functional/Database/SelectPagerDefaultTest.php
index d229200e76df..eb28f684c8d2 100644
--- a/core/modules/system/tests/src/Functional/Database/SelectPagerDefaultTest.php
+++ b/core/modules/system/tests/src/Functional/Database/SelectPagerDefaultTest.php
@@ -28,7 +28,7 @@ class SelectPagerDefaultTest extends DatabaseTestBase {
    * Note that we have to make an HTTP request to a test page handler
    * because the pager depends on GET parameters.
    */
-  public function testEvenPagerQuery() {
+  public function testEvenPagerQuery(): void {
     // To keep the test from being too brittle, we determine up front
     // what the page count should be dynamically, and pass the control
     // information forward to the actual query on the other side of the
@@ -62,7 +62,7 @@ public function testEvenPagerQuery() {
    * Note that we have to make an HTTP request to a test page handler
    * because the pager depends on GET parameters.
    */
-  public function testOddPagerQuery() {
+  public function testOddPagerQuery(): void {
     // To keep the test from being too brittle, we determine up front
     // what the page count should be dynamically, and pass the control
     // information forward to the actual query on the other side of the
@@ -95,7 +95,7 @@ public function testOddPagerQuery() {
    *
    * This is a regression test for #467984.
    */
-  public function testInnerPagerQuery() {
+  public function testInnerPagerQuery(): void {
     $connection = Database::getConnection();
     $query = $connection->select('test', 't')
       ->extend(PagerSelectExtender::class);
@@ -119,7 +119,7 @@ public function testInnerPagerQuery() {
    *
    * This is a regression test for #467984.
    */
-  public function testHavingPagerQuery() {
+  public function testHavingPagerQuery(): void {
     $query = Database::getConnection()->select('test', 't')
       ->extend(PagerSelectExtender::class);
     $query
@@ -138,7 +138,7 @@ public function testHavingPagerQuery() {
   /**
    * Confirms that every pager gets a valid, non-overlapping element ID.
    */
-  public function testElementNumbers() {
+  public function testElementNumbers(): void {
 
     $request = Request::createFromGlobals();
     $request->query->replace([
diff --git a/core/modules/system/tests/src/Functional/Database/SelectTableSortDefaultTest.php b/core/modules/system/tests/src/Functional/Database/SelectTableSortDefaultTest.php
index edf2a0734fed..e720eafbfae7 100644
--- a/core/modules/system/tests/src/Functional/Database/SelectTableSortDefaultTest.php
+++ b/core/modules/system/tests/src/Functional/Database/SelectTableSortDefaultTest.php
@@ -22,7 +22,7 @@ class SelectTableSortDefaultTest extends DatabaseTestBase {
    * Note that we have to make an HTTP request to a test page handler
    * because the pager depends on GET parameters.
    */
-  public function testTableSortQuery() {
+  public function testTableSortQuery(): void {
     $sorts = [
       ['field' => 'Task ID', 'sort' => 'desc', 'first' => 'perform at superbowl', 'last' => 'eat'],
       ['field' => 'Task ID', 'sort' => 'asc', 'first' => 'eat', 'last' => 'perform at superbowl'],
@@ -50,7 +50,7 @@ public function testTableSortQuery() {
    * If a tablesort's orderByHeader is called before another orderBy, then its
    * header happens first.
    */
-  public function testTableSortQueryFirst() {
+  public function testTableSortQueryFirst(): void {
     $sorts = [
       ['field' => 'Task ID', 'sort' => 'desc', 'first' => 'perform at superbowl', 'last' => 'eat'],
       ['field' => 'Task ID', 'sort' => 'asc', 'first' => 'eat', 'last' => 'perform at superbowl'],
@@ -78,7 +78,7 @@ public function testTableSortQueryFirst() {
    * Specifically that no sort is set in a tableselect, and that header links
    * are correct.
    */
-  public function testTableSortDefaultSort() {
+  public function testTableSortDefaultSort(): void {
     $assert = $this->assertSession();
 
     $this->drupalGet('database_test/tablesort_default_sort');
diff --git a/core/modules/system/tests/src/Functional/Datetime/DrupalDateTimeTest.php b/core/modules/system/tests/src/Functional/Datetime/DrupalDateTimeTest.php
index 87349b74fe12..52d57eacee6f 100644
--- a/core/modules/system/tests/src/Functional/Datetime/DrupalDateTimeTest.php
+++ b/core/modules/system/tests/src/Functional/Datetime/DrupalDateTimeTest.php
@@ -40,7 +40,7 @@ protected function setUp(): void {
    * help ensure that the system timezone will be different than the
    * stated timezones.
    */
-  public function testDateTimezone() {
+  public function testDateTimezone(): void {
     $date_string = '2007-01-31 21:00:00';
 
     // Make sure no site timezone has been set.
@@ -96,7 +96,7 @@ public function testDateTimezone() {
   /**
    * Tests the ability to override the time zone in the format method.
    */
-  public function testTimezoneFormat() {
+  public function testTimezoneFormat(): void {
     // Create a date in UTC
     $date = DrupalDateTime::createFromTimestamp(87654321, 'UTC');
 
diff --git a/core/modules/system/tests/src/Functional/Datetime/TimeZoneAbbreviationRouteTest.php b/core/modules/system/tests/src/Functional/Datetime/TimeZoneAbbreviationRouteTest.php
index 01e25e33f039..acd7a9449206 100644
--- a/core/modules/system/tests/src/Functional/Datetime/TimeZoneAbbreviationRouteTest.php
+++ b/core/modules/system/tests/src/Functional/Datetime/TimeZoneAbbreviationRouteTest.php
@@ -29,7 +29,7 @@ class TimeZoneAbbreviationRouteTest extends BrowserTestBase {
   /**
    * Test that the AJAX Timezone Callback can deal with various formats.
    */
-  public function testSystemTimezone() {
+  public function testSystemTimezone(): void {
     $options = [
       'query' => [
         'date' => 'Tue+Sep+17+2013+21%3A35%3A31+GMT%2B0100+(BST)#',
@@ -52,7 +52,7 @@ public function testSystemTimezone() {
    *
    * @dataProvider providerAbbreviationConversion
    */
-  public function testAbbreviationConversion($path, $expectedResponse = NULL, $expectInvalidRequest = FALSE) {
+  public function testAbbreviationConversion($path, $expectedResponse = NULL, $expectInvalidRequest = FALSE): void {
     $response = $this->drupalGet('system/timezone/' . $path);
     if (isset($expectedResponse)) {
       $this->assertEquals($response, $expectedResponse);
diff --git a/core/modules/system/tests/src/Functional/DrupalKernel/ContainerRebuildWebTest.php b/core/modules/system/tests/src/Functional/DrupalKernel/ContainerRebuildWebTest.php
index 52786de6afb2..b1a80ff56289 100644
--- a/core/modules/system/tests/src/Functional/DrupalKernel/ContainerRebuildWebTest.php
+++ b/core/modules/system/tests/src/Functional/DrupalKernel/ContainerRebuildWebTest.php
@@ -26,7 +26,7 @@ class ContainerRebuildWebTest extends BrowserTestBase {
   /**
    * Sets a different deployment identifier.
    */
-  public function testSetContainerRebuildWithDifferentDeploymentIdentifier() {
+  public function testSetContainerRebuildWithDifferentDeploymentIdentifier(): void {
     $assert = $this->assertSession();
 
     // Ensure the parameter is not set.
@@ -43,7 +43,7 @@ public function testSetContainerRebuildWithDifferentDeploymentIdentifier() {
   /**
    * Tests container invalidation.
    */
-  public function testContainerInvalidation() {
+  public function testContainerInvalidation(): void {
     $assert = $this->assertSession();
 
     // Ensure that parameter is not set.
diff --git a/core/modules/system/tests/src/Functional/DrupalKernel/ContainerResetWebTest.php b/core/modules/system/tests/src/Functional/DrupalKernel/ContainerResetWebTest.php
index 575e5edc74a6..6c6bd5eb5f0b 100644
--- a/core/modules/system/tests/src/Functional/DrupalKernel/ContainerResetWebTest.php
+++ b/core/modules/system/tests/src/Functional/DrupalKernel/ContainerResetWebTest.php
@@ -49,7 +49,7 @@ protected function setUp(): void {
   /**
    * Sets a different deployment identifier.
    */
-  public function testContainerRebuild() {
+  public function testContainerRebuild(): void {
     $this->drupalLogin($this->drupalCreateUser());
 
     $this->drupalGet('container_rebuild_test/container_reset');
diff --git a/core/modules/system/tests/src/Functional/DrupalKernel/ContentNegotiationTest.php b/core/modules/system/tests/src/Functional/DrupalKernel/ContentNegotiationTest.php
index 84db05197d81..3e49149c53f0 100644
--- a/core/modules/system/tests/src/Functional/DrupalKernel/ContentNegotiationTest.php
+++ b/core/modules/system/tests/src/Functional/DrupalKernel/ContentNegotiationTest.php
@@ -28,7 +28,7 @@ class ContentNegotiationTest extends BrowserTestBase {
    *
    * @see https://www.drupal.org/node/1716790
    */
-  public function testBogusAcceptHeader() {
+  public function testBogusAcceptHeader(): void {
     $tests = [
       // See https://bugs.webkit.org/show_bug.cgi?id=27267.
       'Firefox 3.5 (2009)' => 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
diff --git a/core/modules/system/tests/src/Functional/Entity/EntityAddUITest.php b/core/modules/system/tests/src/Functional/Entity/EntityAddUITest.php
index eb880a492080..0728dc112d07 100644
--- a/core/modules/system/tests/src/Functional/Entity/EntityAddUITest.php
+++ b/core/modules/system/tests/src/Functional/Entity/EntityAddUITest.php
@@ -29,7 +29,7 @@ class EntityAddUITest extends BrowserTestBase {
   /**
    * Tests the add page for an entity type using bundle entities.
    */
-  public function testAddPageWithBundleEntities() {
+  public function testAddPageWithBundleEntities(): void {
     $admin_user = $this->drupalCreateUser([
       'administer entity_test_with_bundle content',
     ]);
@@ -136,7 +136,7 @@ public function testAddPageWithBundleEntities() {
   /**
    * Tests the add page for an entity type not using bundle entities.
    */
-  public function testAddPageWithoutBundleEntities() {
+  public function testAddPageWithoutBundleEntities(): void {
     $admin_user = $this->drupalCreateUser([
       'administer entity_test content',
     ]);
diff --git a/core/modules/system/tests/src/Functional/Entity/EntityCacheTagsTestBase.php b/core/modules/system/tests/src/Functional/Entity/EntityCacheTagsTestBase.php
index 2d4a5bdb85e1..941f047a0f86 100644
--- a/core/modules/system/tests/src/Functional/Entity/EntityCacheTagsTestBase.php
+++ b/core/modules/system/tests/src/Functional/Entity/EntityCacheTagsTestBase.php
@@ -309,7 +309,7 @@ protected function createReferenceTestEntities($referenced_entity) {
    * - referencing entity type view cache tag: "<referencing entity type>_view"
    * - referencing entity type cache tag: "<referencing entity type>:<referencing entity ID>"
    */
-  public function testReferencedEntity() {
+  public function testReferencedEntity(): void {
     $entity_type = $this->entity->getEntityTypeId();
     $referencing_entity_url = $this->referencingEntity->toUrl('canonical');
     $non_referencing_entity_url = $this->nonReferencingEntity->toUrl('canonical');
diff --git a/core/modules/system/tests/src/Functional/Entity/EntityComputedFieldTest.php b/core/modules/system/tests/src/Functional/Entity/EntityComputedFieldTest.php
index ec2b1cb516c3..f94945636a98 100644
--- a/core/modules/system/tests/src/Functional/Entity/EntityComputedFieldTest.php
+++ b/core/modules/system/tests/src/Functional/Entity/EntityComputedFieldTest.php
@@ -44,7 +44,7 @@ protected function setUp(): void {
   /**
    * Tests that formatters bubble the cacheable metadata of computed fields.
    */
-  public function testFormatterComputedFieldCacheableMetadata() {
+  public function testFormatterComputedFieldCacheableMetadata(): void {
     $this->drupalLogin($this->drupalCreateUser(['administer entity_test content']));
 
     $entity = EntityTestComputedField::create([
diff --git a/core/modules/system/tests/src/Functional/Entity/EntityFormTest.php b/core/modules/system/tests/src/Functional/Entity/EntityFormTest.php
index 04dd2a5f36ca..f2cb1c13ef40 100644
--- a/core/modules/system/tests/src/Functional/Entity/EntityFormTest.php
+++ b/core/modules/system/tests/src/Functional/Entity/EntityFormTest.php
@@ -55,7 +55,7 @@ protected function setUp(): void {
   /**
    * Tests basic form CRUD functionality.
    */
-  public function testFormCRUD() {
+  public function testFormCRUD(): void {
     // All entity variations have to have the same results.
     foreach (entity_test_entity_types() as $entity_type) {
       $this->doTestFormCRUD($entity_type);
@@ -65,7 +65,7 @@ public function testFormCRUD() {
   /**
    * Tests basic multilingual form CRUD functionality.
    */
-  public function testMultilingualFormCRUD() {
+  public function testMultilingualFormCRUD(): void {
     // All entity variations have to have the same results.
     foreach (entity_test_entity_types(ENTITY_TEST_TYPES_MULTILINGUAL) as $entity_type) {
       $this->doTestMultilingualFormCRUD($entity_type);
@@ -78,7 +78,7 @@ public function testMultilingualFormCRUD() {
    * @see entity_test_entity_form_mode_alter()
    * @see entity_test_entity_test_form_mode_alter()
    */
-  public function testEntityFormModeAlter() {
+  public function testEntityFormModeAlter(): void {
     // Create compact entity display.
     EntityFormMode::create([
       'id' => 'entity_test.compact',
@@ -124,7 +124,7 @@ public function testEntityFormModeAlter() {
    *
    * @see entity_test_entity_form_display_alter()
    */
-  public function testEntityFormDisplayAlter() {
+  public function testEntityFormDisplayAlter(): void {
     $this->drupalGet('entity_test/add');
     $altered_field = $this->assertSession()->fieldExists('field_test_text[0][value]');
     $this->assertEquals(42, $altered_field->getAttribute('size'));
@@ -223,7 +223,7 @@ protected function loadEntityByName($entity_type, $name) {
   /**
    * Checks that validation handlers works as expected.
    */
-  public function testValidationHandlers() {
+  public function testValidationHandlers(): void {
     /** @var \Drupal\Core\State\StateInterface $state */
     $state = $this->container->get('state');
 
diff --git a/core/modules/system/tests/src/Functional/Entity/EntityListBuilderTest.php b/core/modules/system/tests/src/Functional/Entity/EntityListBuilderTest.php
index f63b7f8f5719..5dfc7d040ea8 100644
--- a/core/modules/system/tests/src/Functional/Entity/EntityListBuilderTest.php
+++ b/core/modules/system/tests/src/Functional/Entity/EntityListBuilderTest.php
@@ -40,7 +40,7 @@ protected function setUp(): void {
   /**
    * Tests paging.
    */
-  public function testPager() {
+  public function testPager(): void {
     // Create 51 test entities.
     for ($i = 1; $i < 52; $i++) {
       EntityTest::create(['name' => 'Test entity ' . $i])->save();
@@ -62,7 +62,7 @@ public function testPager() {
   /**
    * Tests that the correct cache contexts are set.
    */
-  public function testCacheContexts() {
+  public function testCacheContexts(): void {
     /** @var \Drupal\Core\Entity\EntityListBuilderInterface $list_builder */
     $list_builder = $this->container->get('entity_type.manager')->getListBuilder('entity_test');
 
@@ -75,7 +75,7 @@ public function testCacheContexts() {
   /**
    * Tests if the list cache tags are set.
    */
-  public function testCacheTags() {
+  public function testCacheTags(): void {
     $this->drupalGet('entity_test/list');
     $this->assertSession()->responseHeaderContains('X-Drupal-Cache-Tags', 'entity_test_list');
   }
diff --git a/core/modules/system/tests/src/Functional/Entity/EntityOperationsTest.php b/core/modules/system/tests/src/Functional/Entity/EntityOperationsTest.php
index 39edb19b87f2..a9835a25fccc 100644
--- a/core/modules/system/tests/src/Functional/Entity/EntityOperationsTest.php
+++ b/core/modules/system/tests/src/Functional/Entity/EntityOperationsTest.php
@@ -42,7 +42,7 @@ protected function setUp(): void {
    *
    * @see entity_test_entity_operation_alter()
    */
-  public function testEntityOperationAlter() {
+  public function testEntityOperationAlter(): void {
     // Check that role listing contain our test_operation operation.
     $this->drupalGet('admin/people/roles');
     $roles = Role::loadMultiple();
diff --git a/core/modules/system/tests/src/Functional/Entity/EntityReferenceFieldCreationTest.php b/core/modules/system/tests/src/Functional/Entity/EntityReferenceFieldCreationTest.php
index c2fb6ccc96e2..9ab928528877 100644
--- a/core/modules/system/tests/src/Functional/Entity/EntityReferenceFieldCreationTest.php
+++ b/core/modules/system/tests/src/Functional/Entity/EntityReferenceFieldCreationTest.php
@@ -31,7 +31,7 @@ class EntityReferenceFieldCreationTest extends BrowserTestBase {
   /**
    * Tests that entity reference fields cannot target entity types without IDs.
    */
-  public function testAddReferenceFieldTargetingEntityTypeWithoutId() {
+  public function testAddReferenceFieldTargetingEntityTypeWithoutId(): void {
 
     $node_type = $this->drupalCreateContentType()->id();
     $this->drupalLogin($this->drupalCreateUser([
diff --git a/core/modules/system/tests/src/Functional/Entity/EntityRevisionsTest.php b/core/modules/system/tests/src/Functional/Entity/EntityRevisionsTest.php
index 4f4c18b46c34..08506632db36 100644
--- a/core/modules/system/tests/src/Functional/Entity/EntityRevisionsTest.php
+++ b/core/modules/system/tests/src/Functional/Entity/EntityRevisionsTest.php
@@ -56,7 +56,7 @@ protected function setUp(): void {
   /**
    * Check node revision related operations.
    */
-  public function testRevisions() {
+  public function testRevisions(): void {
 
     // All revisable entity variations have to have the same results.
     foreach (entity_test_entity_types(ENTITY_TEST_TYPES_REVISABLE) as $entity_type) {
@@ -188,7 +188,7 @@ protected function runRevisionsTests($entity_type) {
   /**
    * Tests that an entity revision is upcasted in the correct language.
    */
-  public function testEntityRevisionParamConverter() {
+  public function testEntityRevisionParamConverter(): void {
     // Create a test entity with multiple revisions and translations for them.
     $entity = EntityTestMulRev::create([
       'name' => 'default revision - en',
@@ -230,7 +230,7 @@ public function testEntityRevisionParamConverter() {
    * @covers \Drupal\Core\Entity\ContentEntityBase::setNewRevision
    * @covers \Drupal\Core\Entity\ContentEntityBase::isNewRevision
    */
-  public function testNewRevisionRevert() {
+  public function testNewRevisionRevert(): void {
     $entity = EntityTestMulRev::create(['name' => 'EntityLoadedRevisionTest']);
     $entity->save();
 
diff --git a/core/modules/system/tests/src/Functional/Entity/EntityTranslationFormTest.php b/core/modules/system/tests/src/Functional/Entity/EntityTranslationFormTest.php
index cb595f2d2625..adbda2869726 100644
--- a/core/modules/system/tests/src/Functional/Entity/EntityTranslationFormTest.php
+++ b/core/modules/system/tests/src/Functional/Entity/EntityTranslationFormTest.php
@@ -54,7 +54,7 @@ protected function setUp(): void {
   /**
    * Tests entity form language.
    */
-  public function testEntityFormLanguage() {
+  public function testEntityFormLanguage(): void {
     $this->drupalCreateContentType(['type' => 'page', 'name' => 'Basic page']);
 
     $web_user = $this->drupalCreateUser([
diff --git a/core/modules/system/tests/src/Functional/Entity/EntityViewControllerTest.php b/core/modules/system/tests/src/Functional/Entity/EntityViewControllerTest.php
index 82a51f35ea1a..608cdd9ceaab 100644
--- a/core/modules/system/tests/src/Functional/Entity/EntityViewControllerTest.php
+++ b/core/modules/system/tests/src/Functional/Entity/EntityViewControllerTest.php
@@ -51,7 +51,7 @@ protected function setUp(): void {
   /**
    * Tests EntityViewController.
    */
-  public function testEntityViewController() {
+  public function testEntityViewController(): void {
     $get_label_markup = function ($label) {
       return '<h1 class="page-title">
             <div class="field field--name-name field--type-string field--label-hidden field__item">' . $label . '</div>
@@ -93,7 +93,7 @@ public function testEntityViewController() {
   /**
    * Tests field item attributes.
    */
-  public function testFieldItemAttributes() {
+  public function testFieldItemAttributes(): void {
     // Make sure the test field will be rendered.
     \Drupal::service('entity_display.repository')
       ->getViewDisplay('entity_test', 'entity_test')
@@ -115,7 +115,7 @@ public function testFieldItemAttributes() {
   /**
    * Tests that a view builder can successfully override the view builder.
    */
-  public function testEntityViewControllerViewBuilder() {
+  public function testEntityViewControllerViewBuilder(): void {
     $entity_test = $this->createTestEntity('entity_test_view_builder');
     $entity_test->save();
     $this->drupalGet('entity_test_view_builder/' . $entity_test->id());
diff --git a/core/modules/system/tests/src/Functional/Entity/EntityWithUriCacheTagsTestBase.php b/core/modules/system/tests/src/Functional/Entity/EntityWithUriCacheTagsTestBase.php
index 39d87dc889ed..04e21dac178c 100644
--- a/core/modules/system/tests/src/Functional/Entity/EntityWithUriCacheTagsTestBase.php
+++ b/core/modules/system/tests/src/Functional/Entity/EntityWithUriCacheTagsTestBase.php
@@ -22,7 +22,7 @@ abstract class EntityWithUriCacheTagsTestBase extends EntityCacheTagsTestBase {
    * - "<entity type>_view"
    * - "<entity_type>:<entity ID>"
    */
-  public function testEntityUri() {
+  public function testEntityUri(): void {
     $entity_url = $this->entity->toUrl();
     $entity_type = $this->entity->getEntityTypeId();
 
diff --git a/core/modules/system/tests/src/Functional/File/ConfigTest.php b/core/modules/system/tests/src/Functional/File/ConfigTest.php
index ab086c31d4f8..7202cc90970a 100644
--- a/core/modules/system/tests/src/Functional/File/ConfigTest.php
+++ b/core/modules/system/tests/src/Functional/File/ConfigTest.php
@@ -31,7 +31,7 @@ protected function setUp(): void {
   /**
    * Tests file configuration page.
    */
-  public function testFileConfigurationPage() {
+  public function testFileConfigurationPage(): void {
     $this->drupalGet('admin/config/media/file-system');
 
     // Set the file paths to non-default values.
diff --git a/core/modules/system/tests/src/Functional/File/FileSaveHtaccessLoggingTest.php b/core/modules/system/tests/src/Functional/File/FileSaveHtaccessLoggingTest.php
index 41a105e96137..d901a7701cbd 100644
--- a/core/modules/system/tests/src/Functional/File/FileSaveHtaccessLoggingTest.php
+++ b/core/modules/system/tests/src/Functional/File/FileSaveHtaccessLoggingTest.php
@@ -27,7 +27,7 @@ class FileSaveHtaccessLoggingTest extends BrowserTestBase {
   /**
    * Tests file_save_htaccess().
    */
-  public function testHtaccessSave() {
+  public function testHtaccessSave(): void {
     // Prepare test directories.
     $private = $this->publicFilesDirectory . '/test/private';
 
diff --git a/core/modules/system/tests/src/Functional/FileTransfer/FileTransferTest.php b/core/modules/system/tests/src/Functional/FileTransfer/FileTransferTest.php
index a1315a0fea3c..5fe28a2e8077 100644
--- a/core/modules/system/tests/src/Functional/FileTransfer/FileTransferTest.php
+++ b/core/modules/system/tests/src/Functional/FileTransfer/FileTransferTest.php
@@ -76,7 +76,7 @@ public function _writeDirectory($base, $files = []) {
     }
   }
 
-  public function testJail() {
+  public function testJail(): void {
     $source = $this->_buildFakeModule();
 
     // This convoluted piece of code is here because our testing framework does
diff --git a/core/modules/system/tests/src/Functional/Form/AlterTest.php b/core/modules/system/tests/src/Functional/Form/AlterTest.php
index 4233d3633f98..3371821a2e24 100644
--- a/core/modules/system/tests/src/Functional/Form/AlterTest.php
+++ b/core/modules/system/tests/src/Functional/Form/AlterTest.php
@@ -29,7 +29,7 @@ class AlterTest extends BrowserTestBase {
   /**
    * Tests execution order of hook_form_alter() and hook_form_FORM_ID_alter().
    */
-  public function testExecutionOrder() {
+  public function testExecutionOrder(): void {
     $this->drupalGet('form-test/alter');
     // Ensure that the order is first by module, then for a given module, the
     // id-specific one after the generic one.
diff --git a/core/modules/system/tests/src/Functional/Form/ArbitraryRebuildTest.php b/core/modules/system/tests/src/Functional/Form/ArbitraryRebuildTest.php
index 20a28a25d5e4..d20665c3d3e2 100644
--- a/core/modules/system/tests/src/Functional/Form/ArbitraryRebuildTest.php
+++ b/core/modules/system/tests/src/Functional/Form/ArbitraryRebuildTest.php
@@ -59,7 +59,7 @@ protected function setUp(): void {
   /**
    * Tests a basic rebuild with the user registration form.
    */
-  public function testUserRegistrationRebuild() {
+  public function testUserRegistrationRebuild(): void {
     $edit = [
       'name' => 'foo',
       'mail' => 'bar@example.com',
@@ -74,7 +74,7 @@ public function testUserRegistrationRebuild() {
   /**
    * Tests a rebuild caused by a multiple value field.
    */
-  public function testUserRegistrationMultipleField() {
+  public function testUserRegistrationMultipleField(): void {
     $edit = [
       'name' => 'foo',
       'mail' => 'bar@example.com',
diff --git a/core/modules/system/tests/src/Functional/Form/CheckboxTest.php b/core/modules/system/tests/src/Functional/Form/CheckboxTest.php
index aaaba68ba982..c202588c7859 100644
--- a/core/modules/system/tests/src/Functional/Form/CheckboxTest.php
+++ b/core/modules/system/tests/src/Functional/Form/CheckboxTest.php
@@ -27,7 +27,7 @@ class CheckboxTest extends BrowserTestBase {
    */
   protected $defaultTheme = 'stark';
 
-  public function testFormCheckbox() {
+  public function testFormCheckbox(): void {
     // Ensure that the checked state is determined and rendered correctly for
     // tricky combinations of default and return values.
     foreach ([FALSE, NULL, TRUE, 0, '0', '', 1, '1', 'foobar', '1foobar'] as $default_value) {
diff --git a/core/modules/system/tests/src/Functional/Form/ConfirmFormTest.php b/core/modules/system/tests/src/Functional/Form/ConfirmFormTest.php
index 65cb8c3ce7db..c1d7cc220d26 100644
--- a/core/modules/system/tests/src/Functional/Form/ConfirmFormTest.php
+++ b/core/modules/system/tests/src/Functional/Form/ConfirmFormTest.php
@@ -26,7 +26,7 @@ class ConfirmFormTest extends BrowserTestBase {
    */
   protected $defaultTheme = 'stark';
 
-  public function testConfirmForm() {
+  public function testConfirmForm(): void {
     // Test the building of the form.
     $this->drupalGet('form-test/confirm-form');
     $site_name = $this->config('system.site')->get('name');
@@ -59,7 +59,7 @@ public function testConfirmForm() {
   /**
    * Tests that the confirm form does not use external destinations.
    */
-  public function testConfirmFormWithExternalDestination() {
+  public function testConfirmFormWithExternalDestination(): void {
     $this->drupalGet('form-test/confirm-form');
     $this->assertSession()->linkByHrefExists(Url::fromRoute('form_test.route8')->toString());
     $this->drupalGet('form-test/confirm-form', ['query' => ['destination' => 'node']]);
diff --git a/core/modules/system/tests/src/Functional/Form/ElementTest.php b/core/modules/system/tests/src/Functional/Form/ElementTest.php
index cbeb84b3e370..613cf6dfe05f 100644
--- a/core/modules/system/tests/src/Functional/Form/ElementTest.php
+++ b/core/modules/system/tests/src/Functional/Form/ElementTest.php
@@ -29,7 +29,7 @@ class ElementTest extends BrowserTestBase {
   /**
    * Tests placeholder text for elements that support placeholders.
    */
-  public function testPlaceHolderText() {
+  public function testPlaceHolderText(): void {
     $this->drupalGet('form-test/placeholder-text');
     foreach (['textfield', 'tel', 'url', 'password', 'email', 'number', 'textarea'] as $type) {
       $field = $this->assertSession()->fieldExists("edit-$type");
@@ -40,7 +40,7 @@ public function testPlaceHolderText() {
   /**
    * Tests expansion of #options for #type checkboxes and radios.
    */
-  public function testOptions() {
+  public function testOptions(): void {
     $this->drupalGet('form-test/checkboxes-radios');
 
     // Verify that all options appear in their defined order.
@@ -81,7 +81,7 @@ public function testOptions() {
   /**
    * Tests correct checked attribute for radios element.
    */
-  public function testRadiosChecked() {
+  public function testRadiosChecked(): void {
     // Verify that there is only one radio option checked.
     $this->drupalGet('form-test/radios-checked');
     $this->assertSession()->elementsCount('xpath', '//input[@name="radios" and @checked]', 1);
@@ -110,7 +110,7 @@ public function testRadiosChecked() {
   /**
    * Tests wrapper ids for checkboxes and radios.
    */
-  public function testWrapperIds() {
+  public function testWrapperIds(): void {
     $this->drupalGet('form-test/checkboxes-radios');
 
     // Verify that wrapper id is different from element id.
@@ -124,7 +124,7 @@ public function testWrapperIds() {
   /**
    * Tests button classes.
    */
-  public function testButtonClasses() {
+  public function testButtonClasses(): void {
     $this->drupalGet('form-test/button-class');
     // Just contains(@class, "button") won't do because then
     // "button--foo" would contain "button". Instead, check
@@ -138,7 +138,7 @@ public function testButtonClasses() {
   /**
    * Tests the #group property.
    */
-  public function testGroupElements() {
+  public function testGroupElements(): void {
     $this->drupalGet('form-test/group-details');
     $this->assertSession()->elementsCount('xpath', '//div[@class="details-wrapper"]//div[@class="details-wrapper"]//label', 1);
     $this->drupalGet('form-test/group-container');
@@ -154,7 +154,7 @@ public function testGroupElements() {
   /**
    * Tests the #required property on details and fieldset elements.
    */
-  public function testRequiredFieldsetsAndDetails() {
+  public function testRequiredFieldsetsAndDetails(): void {
     $this->drupalGet('form-test/group-details');
     $this->assertEmpty($this->cssSelect('summary.form-required'));
     $this->drupalGet('form-test/group-details/1');
@@ -168,7 +168,7 @@ public function testRequiredFieldsetsAndDetails() {
   /**
    * Tests a form with an autocomplete setting..
    */
-  public function testFormAutocomplete() {
+  public function testFormAutocomplete(): void {
     $this->drupalGet('form-test/autocomplete');
 
     // Ensure that the user does not have access to the autocompletion.
@@ -190,7 +190,7 @@ public function testFormAutocomplete() {
   /**
    * Tests form element error messages.
    */
-  public function testFormElementErrors() {
+  public function testFormElementErrors(): void {
     $this->drupalGet('form_test/details-form');
     $this->submitForm([], 'Submit');
     $this->assertSession()->pageTextContains('I am an error on the details element.');
@@ -199,7 +199,7 @@ public function testFormElementErrors() {
   /**
    * Tests summary attributes of details.
    */
-  public function testDetailsSummaryAttributes() {
+  public function testDetailsSummaryAttributes(): void {
     $this->drupalGet('form-test/group-details');
     $this->assertSession()->elementExists('css', 'summary[data-summary-attribute="test"]');
   }
diff --git a/core/modules/system/tests/src/Functional/Form/ElementsAccessTest.php b/core/modules/system/tests/src/Functional/Form/ElementsAccessTest.php
index 2103ba80afc0..7a49b2bea97d 100644
--- a/core/modules/system/tests/src/Functional/Form/ElementsAccessTest.php
+++ b/core/modules/system/tests/src/Functional/Form/ElementsAccessTest.php
@@ -28,7 +28,7 @@ class ElementsAccessTest extends BrowserTestBase {
   /**
    * Ensures that child values are still processed when #access = FALSE.
    */
-  public function testAccessFalse() {
+  public function testAccessFalse(): void {
     $this->drupalGet('form_test/vertical-tabs-access');
     $this->submitForm([], 'Submit');
     $this->assertSession()->pageTextNotContains('This checkbox inside a vertical tab does not have its default value.');
diff --git a/core/modules/system/tests/src/Functional/Form/ElementsContainerTest.php b/core/modules/system/tests/src/Functional/Form/ElementsContainerTest.php
index 7d26b78aa56f..561295eeba01 100644
--- a/core/modules/system/tests/src/Functional/Form/ElementsContainerTest.php
+++ b/core/modules/system/tests/src/Functional/Form/ElementsContainerTest.php
@@ -28,7 +28,7 @@ class ElementsContainerTest extends BrowserTestBase {
   /**
    * Tests the #optional container property.
    */
-  public function testOptionalContainerElements() {
+  public function testOptionalContainerElements(): void {
     $this->drupalGet('form-test/optional-container');
     $assertSession = $this->assertSession();
     $assertSession->elementNotExists('css', 'div.empty_optional');
diff --git a/core/modules/system/tests/src/Functional/Form/ElementsLabelsTest.php b/core/modules/system/tests/src/Functional/Form/ElementsLabelsTest.php
index 663e69b67a44..c63a03050d1d 100644
--- a/core/modules/system/tests/src/Functional/Form/ElementsLabelsTest.php
+++ b/core/modules/system/tests/src/Functional/Form/ElementsLabelsTest.php
@@ -35,7 +35,7 @@ class ElementsLabelsTest extends BrowserTestBase {
    * - Prefix and suffix render element placement.
    * - Form element title attributes.
    */
-  public function testFormLabels() {
+  public function testFormLabels(): void {
     $this->drupalGet('form_test/form-labels');
 
     // Check that the checkbox/radio processing is not interfering with
@@ -104,7 +104,7 @@ public function testFormLabels() {
   /**
    * Tests XSS-protection of element labels.
    */
-  public function testTitleEscaping() {
+  public function testTitleEscaping(): void {
     $this->drupalGet('form_test/form-labels');
     foreach (FormTestLabelForm::$typesWithTitle as $type) {
       $this->assertSession()->responseContains("$type alert('XSS') is XSS filtered!");
@@ -115,7 +115,7 @@ public function testTitleEscaping() {
   /**
    * Tests different display options for form element descriptions.
    */
-  public function testFormDescriptions() {
+  public function testFormDescriptions(): void {
     $this->drupalGet('form_test/form-descriptions');
 
     // Check #description placement with #description_display='after'.
@@ -142,7 +142,7 @@ public function testFormDescriptions() {
   /**
    * Tests forms in theme-less environments.
    */
-  public function testFormsInThemeLessEnvironments() {
+  public function testFormsInThemeLessEnvironments(): void {
     $form = $this->getFormWithLimitedProperties();
     $render_service = $this->container->get('renderer');
     // This should not throw any notices.
diff --git a/core/modules/system/tests/src/Functional/Form/ElementsTableSelectTest.php b/core/modules/system/tests/src/Functional/Form/ElementsTableSelectTest.php
index f021029450ed..864183d0ab70 100644
--- a/core/modules/system/tests/src/Functional/Form/ElementsTableSelectTest.php
+++ b/core/modules/system/tests/src/Functional/Form/ElementsTableSelectTest.php
@@ -30,7 +30,7 @@ class ElementsTableSelectTest extends BrowserTestBase {
   /**
    * Tests the display of checkboxes when #multiple is TRUE.
    */
-  public function testMultipleTrue() {
+  public function testMultipleTrue(): void {
 
     $this->drupalGet('form_test/tableselect/multiple-true');
 
@@ -48,7 +48,7 @@ public function testMultipleTrue() {
   /**
    * Tests the display of radios when #multiple is FALSE.
    */
-  public function testMultipleFalse() {
+  public function testMultipleFalse(): void {
     $this->drupalGet('form_test/tableselect/multiple-false');
 
     $this->assertSession()->pageTextNotContains('Empty text.');
@@ -65,7 +65,7 @@ public function testMultipleFalse() {
   /**
    * Tests the display when #colspan is set.
    */
-  public function testTableSelectColSpan() {
+  public function testTableSelectColSpan(): void {
     $this->drupalGet('form_test/tableselect/colspan');
 
     // Verify presence of column three and absence of column four.
@@ -89,7 +89,7 @@ public function testTableSelectColSpan() {
   /**
    * Tests the display of the #empty text when #options is an empty array.
    */
-  public function testEmptyText() {
+  public function testEmptyText(): void {
     $this->drupalGet('form_test/tableselect/empty-text');
     $this->assertSession()->pageTextContains('Empty text.');
   }
@@ -97,7 +97,7 @@ public function testEmptyText() {
   /**
    * Tests the submission of single and multiple values when #multiple is TRUE.
    */
-  public function testMultipleTrueSubmit() {
+  public function testMultipleTrueSubmit(): void {
 
     // Test a submission with one checkbox checked.
     $edit = [];
@@ -125,7 +125,7 @@ public function testMultipleTrueSubmit() {
   /**
    * Tests submission of values when #multiple is FALSE.
    */
-  public function testMultipleFalseSubmit() {
+  public function testMultipleFalseSubmit(): void {
     $edit['tableselect'] = 'row1';
     $this->drupalGet('form_test/tableselect/multiple-false');
     $this->submitForm($edit, 'Submit');
@@ -135,7 +135,7 @@ public function testMultipleFalseSubmit() {
   /**
    * Tests the #js_select property.
    */
-  public function testAdvancedSelect() {
+  public function testAdvancedSelect(): void {
     // When #multiple = TRUE a Select all checkbox should be displayed by default.
     $this->drupalGet('form_test/tableselect/advanced-select/multiple-true-default');
     $this->assertSession()->elementExists('xpath', '//th[@class="select-all"]');
@@ -155,7 +155,7 @@ public function testAdvancedSelect() {
   /**
    * Tests error handling for invalid tableselect values with checkboxes.
    */
-  public function testMultipleTrueOptionChecker() {
+  public function testMultipleTrueOptionChecker(): void {
 
     [$header, $options] = _form_test_tableselect_get_data();
 
@@ -178,7 +178,7 @@ public function testMultipleTrueOptionChecker() {
   /**
    * Tests error handling for invalid tableselect values with radio buttons.
    */
-  public function testMultipleFalseOptionChecker() {
+  public function testMultipleFalseOptionChecker(): void {
 
     [$header, $options] = _form_test_tableselect_get_data();
 
diff --git a/core/modules/system/tests/src/Functional/Form/ElementsVerticalTabsTest.php b/core/modules/system/tests/src/Functional/Form/ElementsVerticalTabsTest.php
index 7ab935952af3..c11fad1b6ca0 100644
--- a/core/modules/system/tests/src/Functional/Form/ElementsVerticalTabsTest.php
+++ b/core/modules/system/tests/src/Functional/Form/ElementsVerticalTabsTest.php
@@ -56,7 +56,7 @@ protected function setUp(): void {
   /**
    * Ensures that vertical tab markup is not shown if user has no tab access.
    */
-  public function testWrapperNotShownWhenEmpty() {
+  public function testWrapperNotShownWhenEmpty(): void {
     // Test admin user can see vertical tabs and wrapper.
     $this->drupalGet('form_test/vertical-tabs');
     $this->assertSession()->elementExists('xpath', "//div[@data-vertical-tabs-panes]");
@@ -70,7 +70,7 @@ public function testWrapperNotShownWhenEmpty() {
   /**
    * Ensures that default vertical tab is correctly selected.
    */
-  public function testDefaultTab() {
+  public function testDefaultTab(): void {
     $this->drupalGet('form_test/vertical-tabs');
     $this->assertSession()->elementAttributeContains('css', 'input[name="vertical_tabs__active_tab"]', 'value', 'edit-tab3');
   }
@@ -78,7 +78,7 @@ public function testDefaultTab() {
   /**
    * Ensures that vertical tab form values are cleaned.
    */
-  public function testDefaultTabCleaned() {
+  public function testDefaultTabCleaned(): void {
     $this->drupalGet('form_test/form-state-values-clean');
     $this->submitForm([], 'Submit');
     $values = Json::decode($this->getSession()->getPage()->getContent());
diff --git a/core/modules/system/tests/src/Functional/Form/EmailTest.php b/core/modules/system/tests/src/Functional/Form/EmailTest.php
index 169abf432032..a2b24b0170ed 100644
--- a/core/modules/system/tests/src/Functional/Form/EmailTest.php
+++ b/core/modules/system/tests/src/Functional/Form/EmailTest.php
@@ -29,7 +29,7 @@ class EmailTest extends BrowserTestBase {
   /**
    * Tests that #type 'email' fields are properly validated.
    */
-  public function testFormEmail() {
+  public function testFormEmail(): void {
     $edit = [];
     $edit['email'] = 'invalid';
     $edit['email_required'] = ' ';
diff --git a/core/modules/system/tests/src/Functional/Form/FormObjectTest.php b/core/modules/system/tests/src/Functional/Form/FormObjectTest.php
index 3b8a2e343d81..b6487d2ae424 100644
--- a/core/modules/system/tests/src/Functional/Form/FormObjectTest.php
+++ b/core/modules/system/tests/src/Functional/Form/FormObjectTest.php
@@ -30,7 +30,7 @@ class FormObjectTest extends BrowserTestBase {
    *
    * @see \Drupal\form_test\EventSubscriber\FormTestEventSubscriber::onKernelRequest()
    */
-  public function testObjectFormCallback() {
+  public function testObjectFormCallback(): void {
     $config_factory = $this->container->get('config.factory');
 
     $this->drupalGet('form-test/object-builder');
diff --git a/core/modules/system/tests/src/Functional/Form/FormStoragePageCacheTest.php b/core/modules/system/tests/src/Functional/Form/FormStoragePageCacheTest.php
index 708f1aed884e..c3d617976ef6 100644
--- a/core/modules/system/tests/src/Functional/Form/FormStoragePageCacheTest.php
+++ b/core/modules/system/tests/src/Functional/Form/FormStoragePageCacheTest.php
@@ -46,7 +46,7 @@ protected function getFormBuildId() {
   /**
    * Build-id is regenerated when validating cached form.
    */
-  public function testValidateFormStorageOnCachedPage() {
+  public function testValidateFormStorageOnCachedPage(): void {
     $this->drupalGet('form-test/form-storage-page-cache');
     $this->assertSession()->responseHeaderEquals('X-Drupal-Cache', 'MISS');
     $this->assertSession()->pageTextContains('No old build id');
@@ -92,7 +92,7 @@ public function testValidateFormStorageOnCachedPage() {
   /**
    * Build-id is regenerated when rebuilding cached form.
    */
-  public function testRebuildFormStorageOnCachedPage() {
+  public function testRebuildFormStorageOnCachedPage(): void {
     $this->drupalGet('form-test/form-storage-page-cache');
     $this->assertSession()->responseHeaderEquals('X-Drupal-Cache', 'MISS');
     $this->assertSession()->pageTextContains('No old build id');
diff --git a/core/modules/system/tests/src/Functional/Form/FormTest.php b/core/modules/system/tests/src/Functional/Form/FormTest.php
index 89834a28a52c..e827620c7083 100644
--- a/core/modules/system/tests/src/Functional/Form/FormTest.php
+++ b/core/modules/system/tests/src/Functional/Form/FormTest.php
@@ -60,7 +60,7 @@ protected function setUp(): void {
    *
    * If the form field is found in $form_state->getErrors() then the test pass.
    */
-  public function testRequiredFields() {
+  public function testRequiredFields(): void {
     // Originates from https://www.drupal.org/node/117748.
     // Sets of empty strings and arrays.
     $empty_strings = ['""' => "", '"\n"' => "\n", '" "' => " ", '"\t"' => "\t", '" \n\t "' => " \n\t ", '"\n\n\n\n\n"' => "\n\n\n\n\n"];
@@ -172,7 +172,7 @@ public function testRequiredFields() {
    *
    * @see \Drupal\form_test\Form\FormTestValidateRequiredForm
    */
-  public function testRequiredCheckboxesRadio() {
+  public function testRequiredCheckboxesRadio(): void {
     $form = \Drupal::formBuilder()->getForm('\Drupal\form_test\Form\FormTestValidateRequiredForm');
 
     // Attempt to submit the form with no required fields set.
@@ -246,7 +246,7 @@ public function testRequiredCheckboxesRadio() {
    *
    * Submits a test form containing several types of form elements.
    */
-  public function testInputWithInvalidToken() {
+  public function testInputWithInvalidToken(): void {
     // We need to be logged in to have CSRF tokens.
     $account = $this->createUser();
     $this->drupalLogin($account);
@@ -333,7 +333,7 @@ public function testInputWithInvalidToken() {
   /**
    * CSRF tokens for GET forms should not be added by default.
    */
-  public function testGetFormsCsrfToken() {
+  public function testGetFormsCsrfToken(): void {
     // We need to be logged in to have CSRF tokens.
     $account = $this->createUser();
     $this->drupalLogin($account);
@@ -352,7 +352,7 @@ public function testGetFormsCsrfToken() {
    *
    * @see \Drupal\form_test\Form\FormTestValidateRequiredNoTitleForm
    */
-  public function testRequiredTextfieldNoTitle() {
+  public function testRequiredTextfieldNoTitle(): void {
     // Attempt to submit the form with no required field set.
     $edit = [];
     $this->drupalGet('form-test/validate-required-no-title');
@@ -381,7 +381,7 @@ public function testRequiredTextfieldNoTitle() {
    *
    * @see _form_test_checkbox()
    */
-  public function testCheckboxProcessing() {
+  public function testCheckboxProcessing(): void {
     // First, try to submit without the required checkbox.
     $edit = [];
     $this->drupalGet('form-test/checkbox');
@@ -407,7 +407,7 @@ public function testCheckboxProcessing() {
   /**
    * Tests validation of #type 'select' elements.
    */
-  public function testSelect() {
+  public function testSelect(): void {
     $form = \Drupal::formBuilder()->getForm('Drupal\form_test\Form\FormTestSelectForm');
     $this->drupalGet('form-test/select');
 
@@ -480,7 +480,7 @@ public function testSelect() {
   /**
    * Tests a select element when #options is not set.
    */
-  public function testEmptySelect() {
+  public function testEmptySelect(): void {
     $this->drupalGet('form-test/empty-select');
     $this->assertSession()->elementExists('xpath', "//select[1]");
     $this->assertSession()->elementNotExists('xpath', "//select[1]/option");
@@ -489,7 +489,7 @@ public function testEmptySelect() {
   /**
    * Tests sorting and not sorting of options in a select element.
    */
-  public function testSelectSorting() {
+  public function testSelectSorting(): void {
     $this->drupalGet('form-test/select');
 
     // Verify the order of the select options.
@@ -609,7 +609,7 @@ protected function validateSelectSorting($select, array $order) {
   /**
    * Tests validation of #type 'number' and 'range' elements.
    */
-  public function testNumber() {
+  public function testNumber(): void {
     $form = \Drupal::formBuilder()->getForm('\Drupal\form_test\Form\FormTestNumberForm');
 
     // Array with all the error messages to be checked.
@@ -674,7 +674,7 @@ public function testNumber() {
   /**
    * Tests default value handling of #type 'range' elements.
    */
-  public function testRange() {
+  public function testRange(): void {
     $this->drupalGet('form-test/range');
     $this->submitForm([], 'Submit');
     $values = json_decode($this->getSession()->getPage()->getContent());
@@ -692,7 +692,7 @@ public function testRange() {
   /**
    * Tests validation of #type 'color' elements.
    */
-  public function testColorValidation() {
+  public function testColorValidation(): void {
     // Keys are inputs, values are expected results.
     $values = [
       '' => '#000000',
@@ -733,7 +733,7 @@ public function testColorValidation() {
    *
    * @see _form_test_disabled_elements()
    */
-  public function testDisabledElements() {
+  public function testDisabledElements(): void {
     // Get the raw form in its original state.
     $form_state = new FormState();
     $form = (new FormTestDisabledElementsForm())->buildForm([], $form_state);
@@ -823,7 +823,7 @@ public function assertFormValuesDefault(array $values, array $form): void {
    *
    * @see _form_test_disabled_elements()
    */
-  public function testDisabledMarkup() {
+  public function testDisabledMarkup(): void {
     $this->drupalGet('form-test/disabled-elements');
     $form = \Drupal::formBuilder()->getForm('\Drupal\form_test\Form\FormTestDisabledElementsForm');
     $type_map = [
@@ -879,7 +879,7 @@ public function testDisabledMarkup() {
    *
    * @see \Drupal\form_test\Form\FormTestInputForgeryForm
    */
-  public function testInputForgery() {
+  public function testInputForgery(): void {
     $this->drupalGet('form-test/input-forgery');
     // The value for checkboxes[two] was changed using post render to simulate
     // an input forgery.
@@ -891,7 +891,7 @@ public function testInputForgery() {
   /**
    * Tests required attribute.
    */
-  public function testRequiredAttribute() {
+  public function testRequiredAttribute(): void {
     $this->drupalGet('form-test/required-attribute');
     foreach (['textfield', 'password', 'textarea'] as $type) {
       $field = $this->assertSession()->fieldExists("edit-$type");
diff --git a/core/modules/system/tests/src/Functional/Form/LanguageSelectElementTest.php b/core/modules/system/tests/src/Functional/Form/LanguageSelectElementTest.php
index df04caac9c97..ae530b534847 100644
--- a/core/modules/system/tests/src/Functional/Form/LanguageSelectElementTest.php
+++ b/core/modules/system/tests/src/Functional/Form/LanguageSelectElementTest.php
@@ -31,7 +31,7 @@ class LanguageSelectElementTest extends BrowserTestBase {
   /**
    * Tests that the options printed by the language select element are correct.
    */
-  public function testLanguageSelectElementOptions() {
+  public function testLanguageSelectElementOptions(): void {
     // Add some languages.
     ConfigurableLanguage::create([
       'id' => 'aaa',
@@ -74,7 +74,7 @@ public function testLanguageSelectElementOptions() {
    *
    * This happens when the language module is disabled.
    */
-  public function testHiddenLanguageSelectElement() {
+  public function testHiddenLanguageSelectElement(): void {
     // Disable the language module, so that the language select field will not
     // be rendered.
     $this->container->get('module_installer')->uninstall(['language']);
diff --git a/core/modules/system/tests/src/Functional/Form/MenuLinksetSettingsFormTest.php b/core/modules/system/tests/src/Functional/Form/MenuLinksetSettingsFormTest.php
index 46f7106c9f08..b34a59664910 100644
--- a/core/modules/system/tests/src/Functional/Form/MenuLinksetSettingsFormTest.php
+++ b/core/modules/system/tests/src/Functional/Form/MenuLinksetSettingsFormTest.php
@@ -40,7 +40,7 @@ class MenuLinksetSettingsFormTest extends BrowserTestBase {
   /**
    * Tests the menu_linkset_settings form.
    */
-  public function testMenuLinksetSettingsForm() {
+  public function testMenuLinksetSettingsForm(): void {
     // Users without the appropriate permissions should not be able to access.
     $this->drupalGet('admin/config/services/linkset');
     $this->assertSession()->pageTextContains('Access denied');
diff --git a/core/modules/system/tests/src/Functional/Form/ModulesListFormWebTest.php b/core/modules/system/tests/src/Functional/Form/ModulesListFormWebTest.php
index c64a6c74e64d..dd1c438babd1 100644
--- a/core/modules/system/tests/src/Functional/Form/ModulesListFormWebTest.php
+++ b/core/modules/system/tests/src/Functional/Form/ModulesListFormWebTest.php
@@ -41,7 +41,7 @@ protected function setUp(): void {
   /**
    * Tests the module list form.
    */
-  public function testModuleListForm() {
+  public function testModuleListForm(): void {
     $this->drupalGet('admin/modules');
 
     // Check that system_test's configure link was rendered correctly.
@@ -69,7 +69,7 @@ public function testModuleListForm() {
   /**
    * Tests the status message when enabling one or more modules.
    */
-  public function testModulesListFormStatusMessage() {
+  public function testModulesListFormStatusMessage(): void {
     $this->drupalGet('admin/modules');
 
     // Enable a module that does not define permissions.
@@ -95,7 +95,7 @@ public function testModulesListFormStatusMessage() {
   /**
    * Tests the module form with a module with an invalid info.yml file.
    */
-  public function testModulesListFormWithInvalidInfoFile() {
+  public function testModulesListFormWithInvalidInfoFile(): void {
     $path = \Drupal::getContainer()->getParameter('site.path') . "/modules/broken";
     mkdir($path, 0777, TRUE);
     $file_path = "$path/broken.info.yml";
@@ -128,7 +128,7 @@ public function testModulesListFormWithInvalidInfoFile() {
   /**
    * Tests the module form with a module with an empty description in info.yml.
    */
-  public function testModulesListFormWithEmptyDescriptionInfoFile() {
+  public function testModulesListFormWithEmptyDescriptionInfoFile(): void {
     $path = \Drupal::getContainer()
       ->getParameter('site.path') . "/modules/missing_description";
     mkdir($path, 0777, TRUE);
@@ -156,7 +156,7 @@ public function testModulesListFormWithEmptyDescriptionInfoFile() {
   /**
    * Confirm that module 'Required By' descriptions include dependent themes.
    */
-  public function testRequiredByThemeMessage() {
+  public function testRequiredByThemeMessage(): void {
     $this->drupalGet('admin/modules');
     $module_theme_depends_on_description = $this->getSession()->getPage()->findAll('css', '#edit-modules-test-module-required-by-theme-enable-description .admin-requirements li:contains("Test Theme Depending on Modules (theme) (disabled)")');
     // Confirm that 'Test Theme Depending on Modules' is listed as being
@@ -169,7 +169,7 @@ public function testRequiredByThemeMessage() {
   /**
    * Tests that incompatible modules message is shown.
    */
-  public function testInstalledIncompatibleModule() {
+  public function testInstalledIncompatibleModule(): void {
     $incompatible_modules_message = 'There are errors with some installed modules. Visit the status report page for more information.';
     $path = \Drupal::getContainer()->getParameter('site.path') . "/modules/changing_module";
     mkdir($path, 0777, TRUE);
diff --git a/core/modules/system/tests/src/Functional/Form/RebuildTest.php b/core/modules/system/tests/src/Functional/Form/RebuildTest.php
index fcf71093679f..39a47edf9beb 100644
--- a/core/modules/system/tests/src/Functional/Form/RebuildTest.php
+++ b/core/modules/system/tests/src/Functional/Form/RebuildTest.php
@@ -47,7 +47,7 @@ protected function setUp(): void {
   /**
    * Tests preservation of values.
    */
-  public function testRebuildPreservesValues() {
+  public function testRebuildPreservesValues(): void {
     $edit = [
       'checkbox_1_default_off' => TRUE,
       'checkbox_1_default_on' => FALSE,
diff --git a/core/modules/system/tests/src/Functional/Form/RedirectTest.php b/core/modules/system/tests/src/Functional/Form/RedirectTest.php
index 5ad762ede0e7..ddcf7b86e7ee 100644
--- a/core/modules/system/tests/src/Functional/Form/RedirectTest.php
+++ b/core/modules/system/tests/src/Functional/Form/RedirectTest.php
@@ -29,7 +29,7 @@ class RedirectTest extends BrowserTestBase {
   /**
    * Tests form redirection.
    */
-  public function testRedirect() {
+  public function testRedirect(): void {
     $path = 'form-test/redirect';
     $options = ['query' => ['foo' => 'bar']];
     $options['absolute'] = TRUE;
@@ -113,7 +113,7 @@ public function testRedirect() {
   /**
    * Tests form redirection from 404/403 pages with the Block form.
    */
-  public function testRedirectFromErrorPages() {
+  public function testRedirectFromErrorPages(): void {
     // Make sure the block containing the redirect form is placed.
     $this->drupalPlaceBlock('redirect_form_block');
 
diff --git a/core/modules/system/tests/src/Functional/Form/ResponseTest.php b/core/modules/system/tests/src/Functional/Form/ResponseTest.php
index 6546b2454363..11fdaa575da8 100644
--- a/core/modules/system/tests/src/Functional/Form/ResponseTest.php
+++ b/core/modules/system/tests/src/Functional/Form/ResponseTest.php
@@ -29,7 +29,7 @@ class ResponseTest extends BrowserTestBase {
   /**
    * Tests that enforced responses propagate through subscribers and middleware.
    */
-  public function testFormResponse() {
+  public function testFormResponse(): void {
     $edit = [
       'content' => $this->randomString(),
       'status' => 200,
diff --git a/core/modules/system/tests/src/Functional/Form/StateValuesCleanAdvancedTest.php b/core/modules/system/tests/src/Functional/Form/StateValuesCleanAdvancedTest.php
index 4f1cad0c1eaf..2b7d21dd4451 100644
--- a/core/modules/system/tests/src/Functional/Form/StateValuesCleanAdvancedTest.php
+++ b/core/modules/system/tests/src/Functional/Form/StateValuesCleanAdvancedTest.php
@@ -40,7 +40,7 @@ class StateValuesCleanAdvancedTest extends BrowserTestBase {
   /**
    * Tests \Drupal\Core\Form\FormState::cleanValues().
    */
-  public function testFormStateValuesCleanAdvanced() {
+  public function testFormStateValuesCleanAdvanced(): void {
 
     // Get an image for uploading.
     $image_files = $this->drupalGetTestFiles('image');
diff --git a/core/modules/system/tests/src/Functional/Form/StateValuesCleanTest.php b/core/modules/system/tests/src/Functional/Form/StateValuesCleanTest.php
index 85dc104ee9ac..2c13643c7f9d 100644
--- a/core/modules/system/tests/src/Functional/Form/StateValuesCleanTest.php
+++ b/core/modules/system/tests/src/Functional/Form/StateValuesCleanTest.php
@@ -31,7 +31,7 @@ class StateValuesCleanTest extends BrowserTestBase {
   /**
    * Tests \Drupal\Core\Form\FormState::cleanValues().
    */
-  public function testFormStateValuesClean() {
+  public function testFormStateValuesClean(): void {
     $this->drupalGet('form_test/form-state-values-clean');
     $this->submitForm([], 'Submit');
     $values = Json::decode($this->getSession()->getPage()->getContent());
diff --git a/core/modules/system/tests/src/Functional/Form/StorageTest.php b/core/modules/system/tests/src/Functional/Form/StorageTest.php
index d023aa9c1f09..9b3997c2b23c 100644
--- a/core/modules/system/tests/src/Functional/Form/StorageTest.php
+++ b/core/modules/system/tests/src/Functional/Form/StorageTest.php
@@ -46,7 +46,7 @@ protected function setUp(): void {
   /**
    * Tests using the form in a usual way.
    */
-  public function testForm() {
+  public function testForm(): void {
     $this->drupalGet('form_test/form-storage');
 
     $assert_session = $this->assertSession();
@@ -75,7 +75,7 @@ public function testForm() {
   /**
    * Tests using the form after calling $form_state->setCached().
    */
-  public function testFormCached() {
+  public function testFormCached(): void {
     $this->drupalGet('form_test/form-storage', ['query' => ['cache' => 1]]);
     $this->assertSession()->pageTextContains('Form constructions: 1');
 
@@ -103,7 +103,7 @@ public function testFormCached() {
   /**
    * Tests validation when form storage is used.
    */
-  public function testValidation() {
+  public function testValidation(): void {
     $this->drupalGet('form_test/form-storage');
     $this->submitForm([
       'title' => '',
@@ -123,7 +123,7 @@ public function testValidation() {
    * during form validation, while another, required element in the form
    * triggers a form validation error.
    */
-  public function testCachedFormStorageValidation() {
+  public function testCachedFormStorageValidation(): void {
     // Request the form with 'cache' query parameter to enable form caching.
     $this->drupalGet('form_test/form-storage', ['query' => ['cache' => 1]]);
 
@@ -151,7 +151,7 @@ public function testCachedFormStorageValidation() {
   /**
    * Tests form build ID regeneration when loading a cached immutable form.
    */
-  public function testImmutableForm() {
+  public function testImmutableForm(): void {
     // Request the form with 'cache' query parameter to enable form caching.
     $this->drupalGet('form_test/form-storage', ['query' => ['cache' => 1, 'immutable' => 1]]);
 
@@ -184,7 +184,7 @@ public function testImmutableForm() {
   /**
    * Verify that existing contrib code cannot overwrite immutable form state.
    */
-  public function testImmutableFormLegacyProtection() {
+  public function testImmutableFormLegacyProtection(): void {
     $this->drupalGet('form_test/form-storage', ['query' => ['cache' => 1, 'immutable' => 1]]);
     // Ensure the hidden 'form_build_id' field is unique.
     $this->assertSession()->elementsCount('xpath', '//input[@name="form_build_id"]', 1);
diff --git a/core/modules/system/tests/src/Functional/Form/SystemConfigFormTest.php b/core/modules/system/tests/src/Functional/Form/SystemConfigFormTest.php
index 7c8707e19a64..411bc53b1d76 100644
--- a/core/modules/system/tests/src/Functional/Form/SystemConfigFormTest.php
+++ b/core/modules/system/tests/src/Functional/Form/SystemConfigFormTest.php
@@ -28,7 +28,7 @@ class SystemConfigFormTest extends BrowserTestBase {
   /**
    * Tests the SystemConfigFormTestBase class.
    */
-  public function testSystemConfigForm() {
+  public function testSystemConfigForm(): void {
     $this->drupalGet('form-test/system-config-form');
     // Verify the primary action submit button is found.
     $this->assertSession()->elementExists('xpath', "//div[@id = 'edit-actions']/input[contains(@class, 'button--primary')]");
diff --git a/core/modules/system/tests/src/Functional/Form/UrlTest.php b/core/modules/system/tests/src/Functional/Form/UrlTest.php
index dae96f16c992..cf3e9fe69772 100644
--- a/core/modules/system/tests/src/Functional/Form/UrlTest.php
+++ b/core/modules/system/tests/src/Functional/Form/UrlTest.php
@@ -31,7 +31,7 @@ class UrlTest extends BrowserTestBase {
   /**
    * Tests that #type 'url' fields are properly validated and trimmed.
    */
-  public function testFormUrl() {
+  public function testFormUrl(): void {
     $edit = [];
     $edit['url'] = 'http://';
     $edit['url_required'] = ' ';
diff --git a/core/modules/system/tests/src/Functional/Form/ValidationTest.php b/core/modules/system/tests/src/Functional/Form/ValidationTest.php
index 6f959f05206c..66f590c6b0b4 100644
--- a/core/modules/system/tests/src/Functional/Form/ValidationTest.php
+++ b/core/modules/system/tests/src/Functional/Form/ValidationTest.php
@@ -30,7 +30,7 @@ class ValidationTest extends BrowserTestBase {
   /**
    * Tests #element_validate and #validate.
    */
-  public function testValidate() {
+  public function testValidate(): void {
     $this->drupalGet('form-test/validate');
     // Verify that #element_validate handlers can alter the form and submitted
     // form values.
@@ -82,7 +82,7 @@ public function testValidate() {
   /**
    * Tests that a form with a disabled CSRF token can be validated.
    */
-  public function testDisabledToken() {
+  public function testDisabledToken(): void {
     $this->drupalGet('form-test/validate-no-token');
     $this->submitForm([], 'Save');
     $this->assertSession()->pageTextContains('The form_test_validate_no_token form has been submitted successfully.');
@@ -91,7 +91,7 @@ public function testDisabledToken() {
   /**
    * Tests partial form validation through #limit_validation_errors.
    */
-  public function testValidateLimitErrors() {
+  public function testValidateLimitErrors(): void {
     $edit = [
       'test' => 'invalid',
       'test_numeric_index[0]' => 'invalid',
@@ -154,7 +154,7 @@ public function testValidateLimitErrors() {
   /**
    * Tests #pattern validation.
    */
-  public function testPatternValidation() {
+  public function testPatternValidation(): void {
     $textfield_error = 'One digit followed by lowercase letters field is not in the right format.';
     $tel_error = 'Everything except numbers field is not in the right format.';
     $password_error = 'Password field is not in the right format.';
@@ -220,7 +220,7 @@ public function testPatternValidation() {
    *
    * @see \Drupal\form_test\Form\FormTestValidateRequiredForm
    */
-  public function testCustomRequiredError() {
+  public function testCustomRequiredError(): void {
     $form = \Drupal::formBuilder()->getForm('\Drupal\form_test\Form\FormTestValidateRequiredForm');
 
     // Verify that a custom #required error can be set.
diff --git a/core/modules/system/tests/src/Functional/Lock/LockFunctionalTest.php b/core/modules/system/tests/src/Functional/Lock/LockFunctionalTest.php
index 2277421e4396..1c63d1f256cf 100644
--- a/core/modules/system/tests/src/Functional/Lock/LockFunctionalTest.php
+++ b/core/modules/system/tests/src/Functional/Lock/LockFunctionalTest.php
@@ -28,7 +28,7 @@ class LockFunctionalTest extends BrowserTestBase {
   /**
    * Confirms that we can acquire and release locks in two parallel requests.
    */
-  public function testLockAcquire() {
+  public function testLockAcquire(): void {
     $lock = $this->container->get('lock');
     $lock_acquired = 'TRUE: Lock successfully acquired in \Drupal\system_test\Controller\SystemTestController::lockAcquire()';
     $lock_not_acquired = 'FALSE: Lock not acquired in \Drupal\system_test\Controller\SystemTestController::lockAcquire()';
@@ -65,7 +65,7 @@ public function testLockAcquire() {
   /**
    * Tests that the persistent lock is persisted between requests.
    */
-  public function testPersistentLock() {
+  public function testPersistentLock(): void {
     $persistent_lock = $this->container->get('lock.persistent');
     // Get a persistent lock.
     $this->drupalGet('system-test/lock-persist/lock1');
diff --git a/core/modules/system/tests/src/Functional/Menu/BreadcrumbFrontCacheContextsTest.php b/core/modules/system/tests/src/Functional/Menu/BreadcrumbFrontCacheContextsTest.php
index 0ec184f2a614..b0eba62a9438 100644
--- a/core/modules/system/tests/src/Functional/Menu/BreadcrumbFrontCacheContextsTest.php
+++ b/core/modules/system/tests/src/Functional/Menu/BreadcrumbFrontCacheContextsTest.php
@@ -79,7 +79,7 @@ protected function setUp(): void {
    * Checking that the breadcrumb will be printed on node canonical routes even
    * if it was rendered for the <front> page first.
    */
-  public function testBreadcrumbsFrontPageCache() {
+  public function testBreadcrumbsFrontPageCache(): void {
     // Hit front page first as anonymous user with 'cold' render cache.
     $this->drupalGet('<front>');
     $web_assert = $this->assertSession();
diff --git a/core/modules/system/tests/src/Functional/Menu/BreadcrumbTest.php b/core/modules/system/tests/src/Functional/Menu/BreadcrumbTest.php
index 9eee2022ecba..c2a2d60a1f90 100644
--- a/core/modules/system/tests/src/Functional/Menu/BreadcrumbTest.php
+++ b/core/modules/system/tests/src/Functional/Menu/BreadcrumbTest.php
@@ -84,7 +84,7 @@ protected function setUp(): void {
   /**
    * Tests breadcrumbs on node and administrative paths.
    */
-  public function testBreadCrumbs() {
+  public function testBreadCrumbs(): void {
     // Prepare common base breadcrumb elements.
     $home = ['' => 'Home'];
     $admin = $home + ['admin' => 'Administration'];
@@ -395,7 +395,7 @@ public function testBreadCrumbs() {
   /**
    * Tests AssertBreadcrumbTrait works as expected.
    */
-  public function testAssertBreadcrumbTrait() {
+  public function testAssertBreadcrumbTrait(): void {
     // Ensure the test trait works as expected using menu_test routes.
     $home = ['' => 'Home'];
     $trail = $home + ['menu-test' => 'Menu test root'];
diff --git a/core/modules/system/tests/src/Functional/Menu/LinksetControllerMultiLingualTest.php b/core/modules/system/tests/src/Functional/Menu/LinksetControllerMultiLingualTest.php
index af765efb7a11..d6b44d4bb9d9 100644
--- a/core/modules/system/tests/src/Functional/Menu/LinksetControllerMultiLingualTest.php
+++ b/core/modules/system/tests/src/Functional/Menu/LinksetControllerMultiLingualTest.php
@@ -201,7 +201,7 @@ public function setUp(): void {
    *
    * @throws \Exception
    */
-  public function testBasicMultilingualFunctions() {
+  public function testBasicMultilingualFunctions(): void {
     foreach (['aa', 'bb', 'cc', 'dd'] as $language_code) {
       $expected_linkset = $this->getReferenceLinksetDataFromFile(__DIR__ . '/../../../fixtures/linkset/linkset-menu-main-multilingual-' . $language_code . '.json');
       $response = $this->doRequest('GET', Url::fromUri('base:/' . $language_code . '/system/menu/main/linkset'));
@@ -214,7 +214,7 @@ public function testBasicMultilingualFunctions() {
    *
    * @throws \Exception
    */
-  public function testDefaultMultilingualFunctions() {
+  public function testDefaultMultilingualFunctions(): void {
     $expected_linkset = $this->getReferenceLinksetDataFromFile(__DIR__ . '/../../../fixtures/linkset/linkset-menu-main-multilingual-default.json');
     $response = $this->doRequest('GET', Url::fromUri('base:/system/menu/main/linkset'));
     $this->assertSame($expected_linkset, Json::decode((string) $response->getBody()));
diff --git a/core/modules/system/tests/src/Functional/Menu/LinksetControllerTest.php b/core/modules/system/tests/src/Functional/Menu/LinksetControllerTest.php
index 05a1bc4e1a0e..52ce7ad6ce73 100644
--- a/core/modules/system/tests/src/Functional/Menu/LinksetControllerTest.php
+++ b/core/modules/system/tests/src/Functional/Menu/LinksetControllerTest.php
@@ -157,7 +157,7 @@ public function setUp(): void {
    *
    * @throws \Exception
    */
-  public function testBasicFunctions() {
+  public function testBasicFunctions(): void {
     $this->enableEndpoint(TRUE);
     $expected_linkset = $this->getReferenceLinksetDataFromFile(__DIR__ . '/../../../fixtures/linkset/linkset-menu-main.json');
     $response = $this->doRequest('GET', Url::fromUri('base:/system/menu/main/linkset'));
@@ -175,7 +175,7 @@ public function testBasicFunctions() {
    * assert a cache hit. Finally, a new menu item is created to ensure that the
    * cached response is properly invalidated.
    */
-  public function testCacheability() {
+  public function testCacheability(): void {
     $this->enableEndpoint(TRUE);
     $expected_cacheability = new CacheableMetadata();
     $expected_cacheability->addCacheContexts([
@@ -219,7 +219,7 @@ public function testCacheability() {
    * access controls. E.g. it does not output links to which the current user
    * does not have access (if it can be determined).
    */
-  public function testAccess() {
+  public function testAccess(): void {
     $this->enableEndpoint(TRUE);
     $expected_cacheability = new CacheableMetadata();
     $expected_cacheability->addCacheContexts(['user.permissions']);
@@ -276,7 +276,7 @@ public function testAccess() {
    * YAML-defined link ("My account") and a dynamic code-defined link
    * ("Log in/out")
    */
-  public function testUserAccountMenu() {
+  public function testUserAccountMenu(): void {
     $this->enableEndpoint(TRUE);
     $expected_cacheability = new CacheableMetadata();
     $expected_cacheability->addCacheContexts([
@@ -313,7 +313,7 @@ public function testUserAccountMenu() {
   /**
    * Tests that menu items can use a custom link relation.
    */
-  public function testCustomLinkRelation() {
+  public function testCustomLinkRelation(): void {
     $this->enableEndpoint(TRUE);
     $this->assertTrue($this->container->get('module_installer')->install(['decoupled_menus_test'], TRUE), 'Installed modules.');
     $response = $this->doRequest('GET', Url::fromUri('base:/system/menu/account/linkset'), 200, $this->authorAccount);
@@ -326,7 +326,7 @@ public function testCustomLinkRelation() {
   /**
    * Test that api route does not exist if the config option is disabled.
    */
-  public function testDisabledEndpoint() {
+  public function testDisabledEndpoint(): void {
     $this->doRequest('GET', Url::fromUri('base:/system/menu/main/linkset'), 404);
   }
 
diff --git a/core/modules/system/tests/src/Functional/Menu/LocalActionTest.php b/core/modules/system/tests/src/Functional/Menu/LocalActionTest.php
index 5ab8a2964337..5e51524dd92d 100644
--- a/core/modules/system/tests/src/Functional/Menu/LocalActionTest.php
+++ b/core/modules/system/tests/src/Functional/Menu/LocalActionTest.php
@@ -39,7 +39,7 @@ protected function setUp(): void {
   /**
    * Tests appearance of local actions.
    */
-  public function testLocalAction() {
+  public function testLocalAction(): void {
     $this->drupalGet('menu-test-local-action');
     // Ensure that both menu and route based actions are shown.
     $this->assertLocalAction([
diff --git a/core/modules/system/tests/src/Functional/Menu/LocalTasksTest.php b/core/modules/system/tests/src/Functional/Menu/LocalTasksTest.php
index 5883788edbc4..965872e921d2 100644
--- a/core/modules/system/tests/src/Functional/Menu/LocalTasksTest.php
+++ b/core/modules/system/tests/src/Functional/Menu/LocalTasksTest.php
@@ -106,7 +106,7 @@ protected function assertNoLocalTasks(int $level = 0): void {
   /**
    * Tests the plugin based local tasks.
    */
-  public function testPluginLocalTask() {
+  public function testPluginLocalTask(): void {
     // Verify local tasks defined in the hook.
     $this->drupalGet(Url::fromRoute('menu_test.tasks_default'));
     $this->assertLocalTasks([
@@ -213,7 +213,7 @@ public function testPluginLocalTask() {
   /**
    * Tests that local task blocks are configurable to show a specific level.
    */
-  public function testLocalTaskBlock() {
+  public function testLocalTaskBlock(): void {
     // Remove the default block and create a new one.
     $this->sut->delete();
 
@@ -262,7 +262,7 @@ public function testLocalTaskBlock() {
   /**
    * Tests that local tasks blocks cache is invalidated correctly.
    */
-  public function testLocalTaskBlockCache() {
+  public function testLocalTaskBlockCache(): void {
     $this->drupalLogin($this->drupalCreateUser([
       'administer content types',
       'administer permissions',
diff --git a/core/modules/system/tests/src/Functional/Menu/MenuAccessTest.php b/core/modules/system/tests/src/Functional/Menu/MenuAccessTest.php
index 7706b354f46e..9c094e7277fc 100644
--- a/core/modules/system/tests/src/Functional/Menu/MenuAccessTest.php
+++ b/core/modules/system/tests/src/Functional/Menu/MenuAccessTest.php
@@ -41,7 +41,7 @@ protected function setUp(): void {
    *
    * @see \Drupal\menu_test\Access\AccessCheck::access()
    */
-  public function testMenuBlockLinksAccessCheck() {
+  public function testMenuBlockLinksAccessCheck(): void {
     $this->container->get('module_installer')->install(['menu_test']);
     $this->drupalPlaceBlock('system_menu_block:account');
     // Test that there's link rendered on the route.
diff --git a/core/modules/system/tests/src/Functional/Menu/MenuLinkSecurityTest.php b/core/modules/system/tests/src/Functional/Menu/MenuLinkSecurityTest.php
index 76b2e4c0482f..c1701cf78fa1 100644
--- a/core/modules/system/tests/src/Functional/Menu/MenuLinkSecurityTest.php
+++ b/core/modules/system/tests/src/Functional/Menu/MenuLinkSecurityTest.php
@@ -27,7 +27,7 @@ class MenuLinkSecurityTest extends BrowserTestBase {
   /**
    * Ensures that a menu link does not cause an XSS issue.
    */
-  public function testMenuLink() {
+  public function testMenuLink(): void {
     $menu_link_content = MenuLinkContent::create([
       'title' => '<script>alert("Wild animals")</script>',
       'menu_name' => 'tools',
diff --git a/core/modules/system/tests/src/Functional/Menu/MenuRouterTest.php b/core/modules/system/tests/src/Functional/Menu/MenuRouterTest.php
index fb8352c90448..a6db84535645 100644
--- a/core/modules/system/tests/src/Functional/Menu/MenuRouterTest.php
+++ b/core/modules/system/tests/src/Functional/Menu/MenuRouterTest.php
@@ -48,7 +48,7 @@ protected function setUp(): void {
   /**
    * Tests menu integration.
    */
-  public function testMenuIntegration() {
+  public function testMenuIntegration(): void {
     $this->doTestTitleMenuCallback();
     $this->doTestMenuOptionalPlaceholders();
     $this->doTestMenuHierarchy();
@@ -213,7 +213,7 @@ protected function doTestExoticPath() {
    *
    * @see \Drupal\menu_test\EventSubscriber\MaintenanceModeSubscriber::onKernelRequestMaintenance()
    */
-  public function testMaintenanceModeLoginPaths() {
+  public function testMaintenanceModeLoginPaths(): void {
     $this->container->get('state')->set('system.maintenance_mode', TRUE);
 
     $offline_message = $this->config('system.site')->get('name') . ' is currently under maintenance. We should be back shortly. Thank you for your patience.';
@@ -231,7 +231,7 @@ public function testMaintenanceModeLoginPaths() {
    * An authenticated user hitting 'user/login' should be redirected to 'user',
    * and 'user/register' should be redirected to the user edit page.
    */
-  public function testAuthUserUserLogin() {
+  public function testAuthUserUserLogin(): void {
     $web_user = $this->drupalCreateUser([]);
     $this->drupalLogin($web_user);
 
@@ -247,7 +247,7 @@ public function testAuthUserUserLogin() {
   /**
    * Tests theme integration.
    */
-  public function testThemeIntegration() {
+  public function testThemeIntegration(): void {
     $this->defaultTheme = 'olivero';
     $this->adminTheme = 'claro';
 
diff --git a/core/modules/system/tests/src/Functional/Module/ClassLoaderTest.php b/core/modules/system/tests/src/Functional/Module/ClassLoaderTest.php
index 122bbc1598dc..a0d2d2fe801f 100644
--- a/core/modules/system/tests/src/Functional/Module/ClassLoaderTest.php
+++ b/core/modules/system/tests/src/Functional/Module/ClassLoaderTest.php
@@ -36,7 +36,7 @@ class ClassLoaderTest extends BrowserTestBase {
    *
    * @see \Drupal\module_autoload_test\SomeClass
    */
-  public function testClassLoading() {
+  public function testClassLoading(): void {
     // Enable the module_test and module_autoload_test modules.
     \Drupal::service('module_installer')->install(['module_test', 'module_autoload_test'], FALSE);
     $this->resetAll();
@@ -53,7 +53,7 @@ public function testClassLoading() {
    *
    * @see \Drupal\module_autoload_test\SomeClass
    */
-  public function testClassLoadingNotInstalledModules() {
+  public function testClassLoadingNotInstalledModules(): void {
     // Enable the module_test module.
     \Drupal::service('module_installer')->install(['module_test'], FALSE);
     $this->resetAll();
@@ -70,7 +70,7 @@ public function testClassLoadingNotInstalledModules() {
    *
    * @see \Drupal\module_autoload_test\SomeClass
    */
-  public function testClassLoadingDisabledModules() {
+  public function testClassLoadingDisabledModules(): void {
     // Enable the module_test and module_autoload_test modules.
     \Drupal::service('module_installer')->install(['module_test', 'module_autoload_test'], FALSE);
     $this->resetAll();
@@ -88,7 +88,7 @@ public function testClassLoadingDisabledModules() {
   /**
    * Ensures the negative caches in the class loader don't result in crashes.
    */
-  public function testMultipleModules() {
+  public function testMultipleModules(): void {
     $this->drupalLogin($this->drupalCreateUser(['administer modules']));
 
     $edit = [
@@ -104,7 +104,7 @@ public function testMultipleModules() {
   /**
    * Tests that .module files can use class constants in main section.
    */
-  public function testAutoloadFromModuleFile() {
+  public function testAutoloadFromModuleFile(): void {
     $this->assertFalse(defined('MODULE_AUTOLOAD_TEST_CONSTANT'));
     // Create use with required permissions.
     $this->drupalLogin($this->drupalCreateUser(['administer modules']));
diff --git a/core/modules/system/tests/src/Functional/Module/DependencyTest.php b/core/modules/system/tests/src/Functional/Module/DependencyTest.php
index e176855055d4..70bcabb9121f 100644
--- a/core/modules/system/tests/src/Functional/Module/DependencyTest.php
+++ b/core/modules/system/tests/src/Functional/Module/DependencyTest.php
@@ -23,7 +23,7 @@ class DependencyTest extends ModuleTestBase {
   /**
    * Checks functionality of project namespaces for dependencies.
    */
-  public function testProjectNamespaceForDependencies() {
+  public function testProjectNamespaceForDependencies(): void {
     $edit = [
       'modules[filter][enable]' => TRUE,
     ];
@@ -41,7 +41,7 @@ public function testProjectNamespaceForDependencies() {
   /**
    * Attempts to enable the Content Translation module without Language enabled.
    */
-  public function testEnableWithoutDependency() {
+  public function testEnableWithoutDependency(): void {
     // Attempt to enable Content Translation without Language enabled.
     $edit = [];
     $edit['modules[content_translation][enable]'] = 'content_translation';
@@ -66,7 +66,7 @@ public function testEnableWithoutDependency() {
   /**
    * Attempts to enable a module with a missing dependency.
    */
-  public function testMissingModules() {
+  public function testMissingModules(): void {
     // Test that the system_dependencies_test module is marked
     // as missing a dependency.
     $this->drupalGet('admin/modules');
@@ -78,7 +78,7 @@ public function testMissingModules() {
   /**
    * Tests enabling a module with an incompatible dependency version.
    */
-  public function testIncompatibleModuleVersionDependency() {
+  public function testIncompatibleModuleVersionDependency(): void {
     // Test that the system_incompatible_module_version_dependencies_test is
     // marked as having an incompatible dependency.
     $this->drupalGet('admin/modules');
@@ -90,7 +90,7 @@ public function testIncompatibleModuleVersionDependency() {
   /**
    * Tests enabling a module that depends on a module with an incompatible core version.
    */
-  public function testIncompatibleCoreVersionDependency() {
+  public function testIncompatibleCoreVersionDependency(): void {
     // Test that the system_incompatible_core_version_dependencies_test is
     // marked as having an incompatible dependency.
     $this->drupalGet('admin/modules');
@@ -102,7 +102,7 @@ public function testIncompatibleCoreVersionDependency() {
   /**
    * Tests visiting admin/modules when a module outside of core has no version.
    */
-  public function testNoVersionInfo() {
+  public function testNoVersionInfo(): void {
     // Create a module for testing. We set core_version_requirement to '*' for
     // the test so that it does not need to be updated between major versions.
     $info = [
@@ -164,7 +164,7 @@ public function testNoVersionInfo() {
   /**
    * Tests failing PHP version requirements.
    */
-  public function testIncompatiblePhpVersionDependency() {
+  public function testIncompatiblePhpVersionDependency(): void {
     $this->drupalGet('admin/modules');
     $this->assertSession()->pageTextContains('This module requires PHP version 6502.* and is incompatible with PHP version ' . phpversion() . '.');
     $this->assertSession()->fieldDisabled('modules[system_incompatible_php_version_test][enable]');
@@ -173,7 +173,7 @@ public function testIncompatiblePhpVersionDependency() {
   /**
    * Tests enabling modules with different core version specifications.
    */
-  public function testCoreCompatibility() {
+  public function testCoreCompatibility(): void {
     $this->markTestSkipped('Skipped due to major version-specific logic. See https://www.drupal.org/project/drupal/issues/3359322');
     $assert_session = $this->assertSession();
 
@@ -197,7 +197,7 @@ public function testCoreCompatibility() {
   /**
    * Tests the dependency checks when core version contains '8.x' within it.
    */
-  public function testCoreVersionContains8X() {
+  public function testCoreVersionContains8X(): void {
     // Enable the helper module that alters the version and dependencies.
     \Drupal::service('module_installer')->install(['dependency_version_test']);
 
@@ -212,7 +212,7 @@ public function testCoreVersionContains8X() {
   /**
    * Tests enabling a module that depends on a module which fails hook_requirements().
    */
-  public function testEnableRequirementsFailureDependency() {
+  public function testEnableRequirementsFailureDependency(): void {
     \Drupal::service('module_installer')->install(['comment']);
 
     $this->assertModules(['requirements1_test'], FALSE);
@@ -240,7 +240,7 @@ public function testEnableRequirementsFailureDependency() {
    *
    * Dependencies should be enabled before their dependents.
    */
-  public function testModuleEnableOrder() {
+  public function testModuleEnableOrder(): void {
     \Drupal::service('module_installer')->install(['module_test'], FALSE);
     $this->resetAll();
     $this->assertModules(['module_test'], TRUE);
diff --git a/core/modules/system/tests/src/Functional/Module/DeprecatedTemplateTest.php b/core/modules/system/tests/src/Functional/Module/DeprecatedTemplateTest.php
index f162b95e4a99..c2bf5aabf3db 100644
--- a/core/modules/system/tests/src/Functional/Module/DeprecatedTemplateTest.php
+++ b/core/modules/system/tests/src/Functional/Module/DeprecatedTemplateTest.php
@@ -30,7 +30,7 @@ class DeprecatedTemplateTest extends BrowserTestBase {
    *
    * @group legacy
    */
-  public function testDeprecatedTemplate() {
+  public function testDeprecatedTemplate(): void {
     $this->expectDeprecation('The "deprecated-template.html.twig" template is deprecated in drupal:X.0.0 and is removed from drupal:Y.0.0. Use another template instead. See https://www.example.com');
     $this->drupalGet('/deprecated-twig-template');
   }
diff --git a/core/modules/system/tests/src/Functional/Module/HookRequirementsTest.php b/core/modules/system/tests/src/Functional/Module/HookRequirementsTest.php
index 9738698f8002..cfa631ffcbea 100644
--- a/core/modules/system/tests/src/Functional/Module/HookRequirementsTest.php
+++ b/core/modules/system/tests/src/Functional/Module/HookRequirementsTest.php
@@ -19,7 +19,7 @@ class HookRequirementsTest extends ModuleTestBase {
   /**
    * Assert that a module cannot be installed if it fails hook_requirements().
    */
-  public function testHookRequirementsFailure() {
+  public function testHookRequirementsFailure(): void {
     $this->assertModules(['requirements1_test'], FALSE);
 
     // Attempt to install the requirements1_test module.
diff --git a/core/modules/system/tests/src/Functional/Module/PrepareUninstallTest.php b/core/modules/system/tests/src/Functional/Module/PrepareUninstallTest.php
index ac24f9b9421d..a38a4d26e6af 100644
--- a/core/modules/system/tests/src/Functional/Module/PrepareUninstallTest.php
+++ b/core/modules/system/tests/src/Functional/Module/PrepareUninstallTest.php
@@ -78,7 +78,7 @@ protected function setUp(): void {
   /**
    * Tests that Node and Taxonomy can be uninstalled.
    */
-  public function testUninstall() {
+  public function testUninstall(): void {
     // Check that Taxonomy cannot be uninstalled yet.
     $this->drupalGet('admin/modules/uninstall');
     $this->assertSession()->pageTextContains('Remove content items');
diff --git a/core/modules/system/tests/src/Functional/Module/UninstallTest.php b/core/modules/system/tests/src/Functional/Module/UninstallTest.php
index f7a126a2ad0c..8059d850c421 100644
--- a/core/modules/system/tests/src/Functional/Module/UninstallTest.php
+++ b/core/modules/system/tests/src/Functional/Module/UninstallTest.php
@@ -34,7 +34,7 @@ class UninstallTest extends BrowserTestBase {
   /**
    * Tests the hook_modules_uninstalled() of the user module.
    */
-  public function testUserPermsUninstalled() {
+  public function testUserPermsUninstalled(): void {
     // Uninstalls the module_test module, so hook_modules_uninstalled()
     // is executed.
     $this->container->get('module_installer')->uninstall(['module_test']);
@@ -47,7 +47,7 @@ public function testUserPermsUninstalled() {
   /**
    * Tests the Uninstall page and Uninstall confirmation page.
    */
-  public function testUninstallPage() {
+  public function testUninstallPage(): void {
     $account = $this->drupalCreateUser(['administer modules']);
     $this->drupalLogin($account);
 
@@ -189,7 +189,7 @@ public function testUninstallPage() {
   /**
    * Tests that a module which fails to install can still be uninstalled.
    */
-  public function testFailedInstallStatus() {
+  public function testFailedInstallStatus(): void {
     $account = $this->drupalCreateUser(['administer modules']);
     $this->drupalLogin($account);
 
diff --git a/core/modules/system/tests/src/Functional/Module/VersionTest.php b/core/modules/system/tests/src/Functional/Module/VersionTest.php
index ea0da8362471..ffe38adc8d57 100644
--- a/core/modules/system/tests/src/Functional/Module/VersionTest.php
+++ b/core/modules/system/tests/src/Functional/Module/VersionTest.php
@@ -19,7 +19,7 @@ class VersionTest extends ModuleTestBase {
   /**
    * Tests version dependencies.
    */
-  public function testModuleVersions() {
+  public function testModuleVersions(): void {
     $dependencies = [
       // Alternating between being compatible and incompatible with 8.x-2.4-beta3.
       // The first is always a compatible.
diff --git a/core/modules/system/tests/src/Functional/Page/DefaultMetatagsTest.php b/core/modules/system/tests/src/Functional/Page/DefaultMetatagsTest.php
index c23b28872c2c..6de2fa183b03 100644
--- a/core/modules/system/tests/src/Functional/Page/DefaultMetatagsTest.php
+++ b/core/modules/system/tests/src/Functional/Page/DefaultMetatagsTest.php
@@ -21,7 +21,7 @@ class DefaultMetatagsTest extends BrowserTestBase {
   /**
    * Tests meta tags.
    */
-  public function testMetaTag() {
+  public function testMetaTag(): void {
     $this->drupalGet('');
     // Ensures that the charset metatag is on the page.
     $this->assertSession()->elementsCount('xpath', '//meta[@charset="utf-8"]', 1);
diff --git a/core/modules/system/tests/src/Functional/Pager/PagerTest.php b/core/modules/system/tests/src/Functional/Pager/PagerTest.php
index 573a0dad4421..e24a751378da 100644
--- a/core/modules/system/tests/src/Functional/Pager/PagerTest.php
+++ b/core/modules/system/tests/src/Functional/Pager/PagerTest.php
@@ -60,7 +60,7 @@ protected function setUp(): void {
   /**
    * Tests markup and CSS classes of pager links.
    */
-  public function testActiveClass() {
+  public function testActiveClass(): void {
     // Verify first page.
     $this->drupalGet('admin/reports/dblog');
     $current_page = 0;
@@ -86,7 +86,7 @@ public function testActiveClass() {
   /**
    * Tests pager query parameters and cache context.
    */
-  public function testPagerQueryParametersAndCacheContext() {
+  public function testPagerQueryParametersAndCacheContext(): void {
     // First page.
     $this->drupalGet('pager-test/query-parameters');
     $this->assertSession()->pageTextContains('Pager calls: 0');
@@ -112,7 +112,7 @@ public function testPagerQueryParametersAndCacheContext() {
   /**
    * Tests proper functioning of multiple pagers.
    */
-  public function testMultiplePagers() {
+  public function testMultiplePagers(): void {
     // First page.
     $this->drupalGet('pager-test/multiple-pagers');
 
@@ -195,7 +195,7 @@ public function testMultiplePagers() {
   /**
    * Tests proper functioning of the ellipsis.
    */
-  public function testPagerEllipsis() {
+  public function testPagerEllipsis(): void {
     // Insert 100 extra log messages to get 9 pages.
     $logger = $this->container->get('logger.factory')->get('pager_test');
     for ($i = 0; $i < 100; $i++) {
diff --git a/core/modules/system/tests/src/Functional/ParamConverter/UpcastingTest.php b/core/modules/system/tests/src/Functional/ParamConverter/UpcastingTest.php
index b9242b936e4a..be1587153d16 100644
--- a/core/modules/system/tests/src/Functional/ParamConverter/UpcastingTest.php
+++ b/core/modules/system/tests/src/Functional/ParamConverter/UpcastingTest.php
@@ -33,7 +33,7 @@ class UpcastingTest extends BrowserTestBase {
    * The test shuffles the parameters around and checks if the right thing is
    * happening.
    */
-  public function testUpcasting() {
+  public function testUpcasting(): void {
     $node = $this->drupalCreateNode(['title' => $this->randomMachineName(8)]);
     $user = $this->drupalCreateUser(['access content']);
     $foo = 'bar';
@@ -59,7 +59,7 @@ public function testUpcasting() {
   /**
    * Confirms we can upcast to controller arguments of the same type.
    */
-  public function testSameTypes() {
+  public function testSameTypes(): void {
     $node = $this->drupalCreateNode(['title' => $this->randomMachineName(8)]);
     $parent = $this->drupalCreateNode(['title' => $this->randomMachineName(8)]);
     // paramconverter_test/node/{node}/set/parent/{parent}
@@ -71,7 +71,7 @@ public function testSameTypes() {
   /**
    * Confirms entity is shown in user's language by default.
    */
-  public function testEntityLanguage() {
+  public function testEntityLanguage(): void {
     $language = ConfigurableLanguage::createFromLangcode('de');
     $language->save();
     \Drupal::configFactory()->getEditable('language.negotiation')
diff --git a/core/modules/system/tests/src/Functional/Render/AjaxPageStateTest.php b/core/modules/system/tests/src/Functional/Render/AjaxPageStateTest.php
index 5a6624acf6ae..13c0e030639a 100644
--- a/core/modules/system/tests/src/Functional/Render/AjaxPageStateTest.php
+++ b/core/modules/system/tests/src/Functional/Render/AjaxPageStateTest.php
@@ -52,7 +52,7 @@ protected function setUp(): void {
    * The libraries active-link and drupalSettings are loaded default from core
    * and available in code as scripts. Do this as the base test.
    */
-  public function testLibrariesAvailable() {
+  public function testLibrariesAvailable(): void {
     $this->drupalGet('node', []);
     // The active link library from core should be loaded.
     $this->assertSession()->responseContains('/core/misc/active-link.js');
@@ -67,7 +67,7 @@ public function testLibrariesAvailable() {
    * should be excluded as it is already loaded. This should not affect other
    * libraries so test if active-link is still available.
    */
-  public function testDrupalSettingsIsNotLoaded() {
+  public function testDrupalSettingsIsNotLoaded(): void {
     $this->drupalGet('node',
       [
         'query' =>
@@ -91,7 +91,7 @@ public function testDrupalSettingsIsNotLoaded() {
    * The ajax_page_state[libraries] should be able to support multiple libraries
    * comma separated.
    */
-  public function testMultipleLibrariesAreNotLoaded() {
+  public function testMultipleLibrariesAreNotLoaded(): void {
     $this->drupalGet('node', [
       'query' => [
         'ajax_page_state' => [
diff --git a/core/modules/system/tests/src/Functional/Render/DisplayVariantTest.php b/core/modules/system/tests/src/Functional/Render/DisplayVariantTest.php
index 2cda418cea04..98c80fcb6e66 100644
--- a/core/modules/system/tests/src/Functional/Render/DisplayVariantTest.php
+++ b/core/modules/system/tests/src/Functional/Render/DisplayVariantTest.php
@@ -28,7 +28,7 @@ class DisplayVariantTest extends BrowserTestBase {
   /**
    * Tests selecting the variant and passing configuration.
    */
-  public function testPageDisplayVariantSelectionEvent() {
+  public function testPageDisplayVariantSelectionEvent(): void {
     // Tests that our display variant was selected, and that its configuration
     // was passed correctly. If the configuration wasn't passed, we'd get an
     // error page here.
diff --git a/core/modules/system/tests/src/Functional/Render/HtmlResponseAttachmentsTest.php b/core/modules/system/tests/src/Functional/Render/HtmlResponseAttachmentsTest.php
index 002cc507a55d..a6c41617cf05 100644
--- a/core/modules/system/tests/src/Functional/Render/HtmlResponseAttachmentsTest.php
+++ b/core/modules/system/tests/src/Functional/Render/HtmlResponseAttachmentsTest.php
@@ -28,7 +28,7 @@ class HtmlResponseAttachmentsTest extends BrowserTestBase {
   /**
    * Tests rendering of ['#attached'].
    */
-  public function testAttachments() {
+  public function testAttachments(): void {
     // Test ['#attached']['http_header] = ['Status', $code].
     $this->drupalGet('/render_attached_test/teapot');
     $this->assertSession()->statusCodeEquals(418);
@@ -79,7 +79,7 @@ public function testAttachments() {
   /**
    * Tests caching of ['#attached'].
    */
-  public function testRenderCachedBlock() {
+  public function testRenderCachedBlock(): void {
     // Make sure our test block is visible.
     $this->drupalPlaceBlock('attached_rendering_block', ['region' => 'content']);
 
diff --git a/core/modules/system/tests/src/Functional/Render/PlaceholderMessageTest.php b/core/modules/system/tests/src/Functional/Render/PlaceholderMessageTest.php
index 7debcc26d726..cf55e7fc8f0f 100644
--- a/core/modules/system/tests/src/Functional/Render/PlaceholderMessageTest.php
+++ b/core/modules/system/tests/src/Functional/Render/PlaceholderMessageTest.php
@@ -29,7 +29,7 @@ class PlaceholderMessageTest extends BrowserTestBase {
   /**
    * Tests rendering of message placeholder.
    */
-  public function testMessagePlaceholder() {
+  public function testMessagePlaceholder(): void {
     $messages_markup = '<div role="contentinfo" aria-label="Status message"';
 
     $test_routes = [
diff --git a/core/modules/system/tests/src/Functional/Render/RenderArrayNonHtmlSubscriberTest.php b/core/modules/system/tests/src/Functional/Render/RenderArrayNonHtmlSubscriberTest.php
index 58238ef3aef6..b578e82fd718 100644
--- a/core/modules/system/tests/src/Functional/Render/RenderArrayNonHtmlSubscriberTest.php
+++ b/core/modules/system/tests/src/Functional/Render/RenderArrayNonHtmlSubscriberTest.php
@@ -29,7 +29,7 @@ class RenderArrayNonHtmlSubscriberTest extends BrowserTestBase {
   /**
    * Tests handling of responses by events subscriber.
    */
-  public function testResponses() {
+  public function testResponses(): void {
     // Test that event subscriber does not interfere with normal requests.
     $url = Url::fromRoute('render_array_non_html_subscriber_test.render_array');
 
diff --git a/core/modules/system/tests/src/Functional/Render/UrlBubbleableMetadataBubblingTest.php b/core/modules/system/tests/src/Functional/Render/UrlBubbleableMetadataBubblingTest.php
index a33fb8f72ac5..5b37b8ff810a 100644
--- a/core/modules/system/tests/src/Functional/Render/UrlBubbleableMetadataBubblingTest.php
+++ b/core/modules/system/tests/src/Functional/Render/UrlBubbleableMetadataBubblingTest.php
@@ -39,7 +39,7 @@ protected function setUp(): void {
   /**
    * Tests that URL bubbleable metadata is correctly bubbled.
    */
-  public function testUrlBubbleableMetadataBubbling() {
+  public function testUrlBubbleableMetadataBubbling(): void {
     // Test that regular URLs bubble up bubbleable metadata when converted to
     // string.
     $url = Url::fromRoute('cache_test.url_bubbling');
diff --git a/core/modules/system/tests/src/Functional/Routing/DestinationTest.php b/core/modules/system/tests/src/Functional/Routing/DestinationTest.php
index bb76ed9d9e26..b9c2a015686a 100644
--- a/core/modules/system/tests/src/Functional/Routing/DestinationTest.php
+++ b/core/modules/system/tests/src/Functional/Routing/DestinationTest.php
@@ -32,7 +32,7 @@ class DestinationTest extends BrowserTestBase {
   /**
    * Tests that $_GET/$_REQUEST['destination'] only contain internal URLs.
    */
-  public function testDestination() {
+  public function testDestination(): void {
     $http_client = $this->getHttpClient();
     $session = $this->getSession();
 
diff --git a/core/modules/system/tests/src/Functional/Routing/RouterPermissionTest.php b/core/modules/system/tests/src/Functional/Routing/RouterPermissionTest.php
index 55b13d1a7818..8eb3189982fc 100644
--- a/core/modules/system/tests/src/Functional/Routing/RouterPermissionTest.php
+++ b/core/modules/system/tests/src/Functional/Routing/RouterPermissionTest.php
@@ -28,7 +28,7 @@ class RouterPermissionTest extends BrowserTestBase {
   /**
    * Tests permission requirements on routes.
    */
-  public function testPermissionAccess() {
+  public function testPermissionAccess(): void {
     // Ensure 403 Access Denied for a route without permission.
     $this->drupalGet('router_test/test7');
     $this->assertSession()->statusCodeEquals(403);
diff --git a/core/modules/system/tests/src/Functional/Routing/RouterTest.php b/core/modules/system/tests/src/Functional/Routing/RouterTest.php
index 87f22b971e44..ead1cd8956ac 100644
--- a/core/modules/system/tests/src/Functional/Routing/RouterTest.php
+++ b/core/modules/system/tests/src/Functional/Routing/RouterTest.php
@@ -35,7 +35,7 @@ class RouterTest extends BrowserTestBase {
   /**
    * Confirms that our FinishResponseSubscriber logic works properly.
    */
-  public function testFinishResponseSubscriber() {
+  public function testFinishResponseSubscriber(): void {
     $renderer_required_cache_contexts = ['languages:' . LanguageInterface::TYPE_INTERFACE, 'theme', 'user.permissions'];
     $expected_cache_contexts = Cache::mergeContexts($renderer_required_cache_contexts, ['url.query_args:' . MainContentViewSubscriber::WRAPPER_FORMAT, 'user.roles:authenticated']);
     sort($expected_cache_contexts);
@@ -122,7 +122,7 @@ public function testFinishResponseSubscriber() {
   /**
    * Confirms that multiple routes with the same path do not cause an error.
    */
-  public function testDuplicateRoutePaths() {
+  public function testDuplicateRoutePaths(): void {
     // Tests two routes with exactly the same path. The route with the maximum
     // fit and lowest sorting route name will match, regardless of the order the
     // routes are declared.
@@ -150,7 +150,7 @@ public function testDuplicateRoutePaths() {
   /**
    * Confirms that placeholders in paths work correctly.
    */
-  public function testControllerPlaceholders() {
+  public function testControllerPlaceholders(): void {
     // Test with 0 and a random value.
     $values = ["0", $this->randomMachineName()];
     foreach ($values as $value) {
@@ -171,7 +171,7 @@ public function testControllerPlaceholders() {
   /**
    * Confirms that default placeholders in paths work correctly.
    */
-  public function testControllerPlaceholdersDefaultValues() {
+  public function testControllerPlaceholdersDefaultValues(): void {
     $this->drupalGet('router_test/test4');
     $this->assertSession()->statusCodeEquals(200);
     $this->assertSession()->pageTextContains('Lassie');
@@ -188,7 +188,7 @@ public function testControllerPlaceholdersDefaultValues() {
   /**
    * Confirms that default placeholders in paths work correctly.
    */
-  public function testControllerPlaceholdersDefaultValuesProvided() {
+  public function testControllerPlaceholdersDefaultValuesProvided(): void {
     $this->drupalGet('router_test/test4/barf');
     $this->assertSession()->statusCodeEquals(200);
     $this->assertSession()->pageTextContains('barf');
@@ -207,7 +207,7 @@ public function testControllerPlaceholdersDefaultValuesProvided() {
    *
    * @see \Drupal\router_test\RouteSubscriber
    */
-  public function testDynamicRoutes() {
+  public function testDynamicRoutes(): void {
     // Test the altered route.
     $this->drupalGet('router_test/test6');
     $this->assertSession()->statusCodeEquals(200);
@@ -217,7 +217,7 @@ public function testDynamicRoutes() {
   /**
    * Checks that a request with text/html response gets rendered as a page.
    */
-  public function testControllerResolutionPage() {
+  public function testControllerResolutionPage(): void {
     $this->drupalGet('/router_test/test10');
 
     $this->assertSession()->pageTextContains('abcde');
@@ -234,7 +234,7 @@ public function testControllerResolutionPage() {
   /**
    * Checks the generate method on the URL generator using the front router.
    */
-  public function testUrlGeneratorFront() {
+  public function testUrlGeneratorFront(): void {
     $front_url = Url::fromRoute('<front>', [], ['absolute' => TRUE]);
     // Compare to the site base URL.
     $base_url = Url::fromUri('base:/', ['absolute' => TRUE]);
@@ -244,7 +244,7 @@ public function testUrlGeneratorFront() {
   /**
    * Tests that a page trying to match a path will succeed.
    */
-  public function testRouterMatching() {
+  public function testRouterMatching(): void {
     $this->drupalGet('router_test/test14/1');
     $this->assertSession()->statusCodeEquals(200);
     $this->assertSession()->pageTextContains('User route "entity.user.canonical" was matched.');
@@ -267,7 +267,7 @@ public function testRouterMatching() {
   /**
    * Tests that a PSR-7 response works.
    */
-  public function testRouterResponsePsr7() {
+  public function testRouterResponsePsr7(): void {
     $this->drupalGet('/router_test/test23');
     $this->assertSession()->statusCodeEquals(200);
     $this->assertSession()->pageTextContains('test23');
@@ -276,7 +276,7 @@ public function testRouterResponsePsr7() {
   /**
    * Tests the user account on the DIC.
    */
-  public function testUserAccount() {
+  public function testUserAccount(): void {
     $account = $this->drupalCreateUser();
     $this->drupalLogin($account);
 
@@ -294,7 +294,7 @@ public function testUserAccount() {
   /**
    * Checks that an ajax request gets rendered as an Ajax response, by mime.
    */
-  public function testControllerResolutionAjax() {
+  public function testControllerResolutionAjax(): void {
     // This will fail with a JSON parse error if the request is not routed to
     // The correct controller.
     $options['query'][MainContentViewSubscriber::WRAPPER_FORMAT] = 'drupal_ajax';
@@ -309,7 +309,7 @@ public function testControllerResolutionAjax() {
   /**
    * Tests that routes no longer exist for a module that has been uninstalled.
    */
-  public function testRouterUninstallInstall() {
+  public function testRouterUninstallInstall(): void {
     \Drupal::service('module_installer')->uninstall(['router_test']);
     try {
       \Drupal::service('router.route_provider')->getRouteByName('router_test.1');
@@ -327,7 +327,7 @@ public function testRouterUninstallInstall() {
   /**
    * Ensure that multiple successive slashes are redirected.
    */
-  public function testSuccessiveSlashes() {
+  public function testSuccessiveSlashes(): void {
     $request = $this->container->get('request_stack')->getCurrentRequest();
 
     // Test a simple path with successive leading slashes.
diff --git a/core/modules/system/tests/src/Functional/ServiceProvider/ServiceProviderWebTest.php b/core/modules/system/tests/src/Functional/ServiceProvider/ServiceProviderWebTest.php
index 007e26926629..9c16dab148ed 100644
--- a/core/modules/system/tests/src/Functional/ServiceProvider/ServiceProviderWebTest.php
+++ b/core/modules/system/tests/src/Functional/ServiceProvider/ServiceProviderWebTest.php
@@ -31,7 +31,7 @@ class ServiceProviderWebTest extends BrowserTestBase {
    * Also tests that services provided by module service providers get
    * registered to the DIC.
    */
-  public function testServiceProviderRegistrationIntegration() {
+  public function testServiceProviderRegistrationIntegration(): void {
     $this->assertTrue(\Drupal::hasService('service_provider_test_class'), 'The service_provider_test_class service has been registered to the DIC');
     // The event subscriber method in the test class calls
     // \Drupal\Core\Messenger\MessengerInterface::addStatus() with a message
diff --git a/core/modules/system/tests/src/Functional/Session/SessionAuthenticationTest.php b/core/modules/system/tests/src/Functional/Session/SessionAuthenticationTest.php
index 6d2a8f4a6fb2..54267fb22387 100644
--- a/core/modules/system/tests/src/Functional/Session/SessionAuthenticationTest.php
+++ b/core/modules/system/tests/src/Functional/Session/SessionAuthenticationTest.php
@@ -50,7 +50,7 @@ protected function setUp(): void {
    * Regression test for a bug that caused a session initiated by basic
    * authentication to persist over subsequent unauthorized requests.
    */
-  public function testSessionFromBasicAuthenticationDoesNotLeak() {
+  public function testSessionFromBasicAuthenticationDoesNotLeak(): void {
     // This route is authorized through basic_auth only, not cookie.
     $protected_url = Url::fromRoute('session_test.get_session_basic_auth');
 
@@ -85,7 +85,7 @@ public function testSessionFromBasicAuthenticationDoesNotLeak() {
   /**
    * Tests if a session can be initiated through basic authentication.
    */
-  public function testBasicAuthSession() {
+  public function testBasicAuthSession(): void {
     // Set a session value on a request through basic auth.
     $test_value = 'alpaca';
     $response = $this->basicAuthGet('session-test/set-session/' . $test_value, $this->user->getAccountName(), $this->user->pass_raw);
@@ -119,7 +119,7 @@ protected function assertSessionData(string $response, string $expected): void {
   /**
    * Tests that a session is not started automatically by basic authentication.
    */
-  public function testBasicAuthNoSession() {
+  public function testBasicAuthNoSession(): void {
     // A route that is authorized through basic_auth only, not cookie.
     $no_cookie_url = Url::fromRoute('session_test.get_session_basic_auth');
 
diff --git a/core/modules/system/tests/src/Functional/Session/SessionHttpsTest.php b/core/modules/system/tests/src/Functional/Session/SessionHttpsTest.php
index 976a6dd3f581..12dade7f2098 100644
--- a/core/modules/system/tests/src/Functional/Session/SessionHttpsTest.php
+++ b/core/modules/system/tests/src/Functional/Session/SessionHttpsTest.php
@@ -65,7 +65,7 @@ protected function setUp(): void {
   /**
    * Tests HTTPS sessions.
    */
-  public function testHttpsSession() {
+  public function testHttpsSession(): void {
     $user = $this->drupalCreateUser(['access administration pages', 'administer site configuration']);
 
     /** @var \Symfony\Component\BrowserKit\CookieJar $browser_kit_cookie_jar */
diff --git a/core/modules/system/tests/src/Functional/Session/SessionTest.php b/core/modules/system/tests/src/Functional/Session/SessionTest.php
index fa3ad0419851..499ba7a50065 100644
--- a/core/modules/system/tests/src/Functional/Session/SessionTest.php
+++ b/core/modules/system/tests/src/Functional/Session/SessionTest.php
@@ -34,7 +34,7 @@ class SessionTest extends BrowserTestBase {
    * @covers \Drupal\Core\Session\WriteSafeSessionHandler::isSessionWritable
    * @covers \Drupal\Core\Session\SessionManager::regenerate
    */
-  public function testSessionSaveRegenerate() {
+  public function testSessionSaveRegenerate(): void {
     $session_handler = $this->container->get('session_handler.write_safe');
     $this->assertTrue($session_handler->isSessionWritable(), 'session_handler->isSessionWritable() initially returns TRUE.');
     $session_handler->setSessionWritable(FALSE);
@@ -88,7 +88,7 @@ public function testSessionSaveRegenerate() {
   /**
    * Tests data persistence via the session_test module callbacks.
    */
-  public function testDataPersistence() {
+  public function testDataPersistence(): void {
     $user = $this->drupalCreateUser([]);
     // Enable sessions.
     $this->sessionReset();
@@ -172,7 +172,7 @@ public function testDataPersistence() {
   /**
    * Tests storing data in Session() object.
    */
-  public function testSessionPersistenceOnLogin() {
+  public function testSessionPersistenceOnLogin(): void {
     // Store information via hook_user_login().
     $user = $this->drupalCreateUser();
     $this->drupalLogin($user);
@@ -184,7 +184,7 @@ public function testSessionPersistenceOnLogin() {
   /**
    * Tests that empty anonymous sessions are destroyed.
    */
-  public function testEmptyAnonymousSession() {
+  public function testEmptyAnonymousSession(): void {
     // Disable the dynamic_page_cache module; it'd cause session_test's debug
     // output (that is added in
     // SessionTestSubscriber::onKernelResponseSessionTest()) to not be added.
@@ -249,7 +249,7 @@ public function testEmptyAnonymousSession() {
   /**
    * Tests that sessions are only saved when necessary.
    */
-  public function testSessionWrite() {
+  public function testSessionWrite(): void {
     $user = $this->drupalCreateUser([]);
     $this->drupalLogin($user);
     $connection = Database::getConnection();
@@ -300,7 +300,7 @@ public function testSessionWrite() {
   /**
    * Tests that empty session IDs are not allowed.
    */
-  public function testEmptySessionID() {
+  public function testEmptySessionID(): void {
     $user = $this->drupalCreateUser([]);
     $this->drupalLogin($user);
     $this->drupalGet('session-test/is-logged-in');
@@ -329,7 +329,7 @@ public function testEmptySessionID() {
   /**
    * Tests session bag.
    */
-  public function testSessionBag() {
+  public function testSessionBag(): void {
     // Ensure the flag is absent to start with.
     $this->drupalGet('/session-test/has-bag-flag');
     $this->assertSessionCookie(FALSE);
@@ -364,7 +364,7 @@ public function testSessionBag() {
   /**
    * Test exception thrown during session write close.
    */
-  public function testSessionWriteError() {
+  public function testSessionWriteError(): void {
     // Login to ensure a session exists.
     $user = $this->drupalCreateUser([]);
     $this->drupalLogin($user);
diff --git a/core/modules/system/tests/src/Functional/Session/StackSessionHandlerIntegrationTest.php b/core/modules/system/tests/src/Functional/Session/StackSessionHandlerIntegrationTest.php
index eafdd89dc746..61cb40d64a4c 100644
--- a/core/modules/system/tests/src/Functional/Session/StackSessionHandlerIntegrationTest.php
+++ b/core/modules/system/tests/src/Functional/Session/StackSessionHandlerIntegrationTest.php
@@ -27,7 +27,7 @@ class StackSessionHandlerIntegrationTest extends BrowserTestBase {
   /**
    * Tests a request.
    */
-  public function testRequest() {
+  public function testRequest(): void {
     $options['query'][MainContentViewSubscriber::WRAPPER_FORMAT] = 'drupal_ajax';
     $headers[] = 'X-Requested-With: XMLHttpRequest';
     $actual_trace = json_decode($this->drupalGet('session-test/trace-handler', $options, $headers));
diff --git a/core/modules/system/tests/src/Functional/System/AccessDeniedTest.php b/core/modules/system/tests/src/Functional/System/AccessDeniedTest.php
index 77e6b9d1109d..1196ccbf57ec 100644
--- a/core/modules/system/tests/src/Functional/System/AccessDeniedTest.php
+++ b/core/modules/system/tests/src/Functional/System/AccessDeniedTest.php
@@ -53,7 +53,7 @@ protected function setUp(): void {
     user_role_grant_permissions(RoleInterface::AUTHENTICATED_ID, ['access user profiles']);
   }
 
-  public function testAccessDenied() {
+  public function testAccessDenied(): void {
     $this->drupalGet('admin');
     $this->assertSession()->pageTextContains('Access denied');
     $this->assertSession()->statusCodeEquals(403);
@@ -130,7 +130,7 @@ public function testAccessDenied() {
   /**
    * Tests that an inaccessible custom 403 page falls back to the default.
    */
-  public function testAccessDeniedCustomPageWithAccessDenied() {
+  public function testAccessDeniedCustomPageWithAccessDenied(): void {
     // Sets up a 403 page not accessible by the anonymous user.
     $this->config('system.site')->set('page.403', '/system-test/custom-4xx')->save();
 
diff --git a/core/modules/system/tests/src/Functional/System/AdminMetaTagTest.php b/core/modules/system/tests/src/Functional/System/AdminMetaTagTest.php
index e96dd0f774d0..be1ccbdb1a67 100644
--- a/core/modules/system/tests/src/Functional/System/AdminMetaTagTest.php
+++ b/core/modules/system/tests/src/Functional/System/AdminMetaTagTest.php
@@ -21,7 +21,7 @@ class AdminMetaTagTest extends BrowserTestBase {
   /**
    * Verify that the meta tag HTML is generated correctly.
    */
-  public function testMetaTag() {
+  public function testMetaTag(): void {
     [$version] = explode('.', \Drupal::VERSION);
     $string = '<meta name="Generator" content="Drupal ' . $version . ' (https://www.drupal.org)" />';
     $this->drupalGet('node');
diff --git a/core/modules/system/tests/src/Functional/System/AdminTest.php b/core/modules/system/tests/src/Functional/System/AdminTest.php
index f30384a3b611..46bda15eeda9 100644
--- a/core/modules/system/tests/src/Functional/System/AdminTest.php
+++ b/core/modules/system/tests/src/Functional/System/AdminTest.php
@@ -61,7 +61,7 @@ protected function setUp(): void {
   /**
    * Tests output on administrative listing pages.
    */
-  public function testAdminPages() {
+  public function testAdminPages(): void {
     // Go to Administration.
     $this->drupalGet('admin');
 
@@ -152,7 +152,7 @@ protected function getTopLevelMenuLinks() {
   /**
    * Tests compact mode.
    */
-  public function testCompactMode() {
+  public function testCompactMode(): void {
     $session = $this->getSession();
 
     // The front page defaults to 'user/login', which redirects to 'user/{user}'
diff --git a/core/modules/system/tests/src/Functional/System/CronRunTest.php b/core/modules/system/tests/src/Functional/System/CronRunTest.php
index edec54e0f890..8820b992cfbd 100644
--- a/core/modules/system/tests/src/Functional/System/CronRunTest.php
+++ b/core/modules/system/tests/src/Functional/System/CronRunTest.php
@@ -37,7 +37,7 @@ class CronRunTest extends BrowserTestBase {
   /**
    * Tests cron runs.
    */
-  public function testCronRun() {
+  public function testCronRun(): void {
     // Run cron anonymously without any cron key.
     $this->drupalGet('cron');
     $this->assertSession()->statusCodeEquals(404);
@@ -59,7 +59,7 @@ public function testCronRun() {
    * In these tests we do not use \Drupal::time()->getRequestTime() to track start time, because we
    * need the exact time when cron is triggered.
    */
-  public function testAutomatedCron() {
+  public function testAutomatedCron(): void {
     // To prevent race conditions between the admin_user login triggering cron
     // and updating its state, and this test doing the same thing, we use
     // \Drupal\Tests\WaitTerminateTestTrait::setWaitForTerminate.
@@ -106,7 +106,7 @@ public function testAutomatedCron() {
   /**
    * Make sure exceptions thrown on hook_cron() don't affect other modules.
    */
-  public function testCronExceptions() {
+  public function testCronExceptions(): void {
     \Drupal::state()->delete('common_test.cron');
     // The common_test module throws an exception. If it isn't caught, the tests
     // won't finish successfully.
@@ -119,7 +119,7 @@ public function testCronExceptions() {
   /**
    * Make sure the cron UI reads from the state storage.
    */
-  public function testCronUI() {
+  public function testCronUI(): void {
     $admin_user = $this->drupalCreateUser(['administer site configuration']);
     $this->drupalLogin($admin_user);
     $this->drupalGet('admin/config/system/cron');
@@ -147,7 +147,7 @@ public function testCronUI() {
   /**
    * Ensure that the manual cron run is working.
    */
-  public function testManualCron() {
+  public function testManualCron(): void {
     $admin_user = $this->drupalCreateUser(['administer site configuration']);
     $this->drupalLogin($admin_user);
 
diff --git a/core/modules/system/tests/src/Functional/System/DateFormatsLockedTest.php b/core/modules/system/tests/src/Functional/System/DateFormatsLockedTest.php
index f061534ba723..81bfc5ead82b 100644
--- a/core/modules/system/tests/src/Functional/System/DateFormatsLockedTest.php
+++ b/core/modules/system/tests/src/Functional/System/DateFormatsLockedTest.php
@@ -21,7 +21,7 @@ class DateFormatsLockedTest extends BrowserTestBase {
   /**
    * Tests attempts at listing, editing, and deleting locked date formats.
    */
-  public function testDateLocking() {
+  public function testDateLocking(): void {
     $this->drupalLogin($this->drupalCreateUser(['administer site configuration']));
 
     // Locked date formats are not linked on the listing page, locked date
diff --git a/core/modules/system/tests/src/Functional/System/DateFormatsMachineNameTest.php b/core/modules/system/tests/src/Functional/System/DateFormatsMachineNameTest.php
index da925b9f1a73..0b2abcdae549 100644
--- a/core/modules/system/tests/src/Functional/System/DateFormatsMachineNameTest.php
+++ b/core/modules/system/tests/src/Functional/System/DateFormatsMachineNameTest.php
@@ -31,7 +31,7 @@ protected function setUp(): void {
   /**
    * Tests that date formats cannot be created with invalid machine names.
    */
-  public function testDateFormatsMachineNameAllowedValues() {
+  public function testDateFormatsMachineNameAllowedValues(): void {
     // Try to create a date format with a not allowed character to test the date
     // format specific machine name replace pattern.
     $edit = [
diff --git a/core/modules/system/tests/src/Functional/System/DateTimeTest.php b/core/modules/system/tests/src/Functional/System/DateTimeTest.php
index 96107ceee27b..54f2f468ef59 100644
--- a/core/modules/system/tests/src/Functional/System/DateTimeTest.php
+++ b/core/modules/system/tests/src/Functional/System/DateTimeTest.php
@@ -59,7 +59,7 @@ protected function setUp(): void {
   /**
    * Tests time zones and DST handling.
    */
-  public function testTimeZoneHandling() {
+  public function testTimeZoneHandling(): void {
     // Setup date/time settings for Honolulu time.
     $config = $this->config('system.date')
       ->set('timezone.default', 'Pacific/Honolulu')
@@ -100,7 +100,7 @@ public function testTimeZoneHandling() {
   /**
    * Tests date format configuration.
    */
-  public function testDateFormatConfiguration() {
+  public function testDateFormatConfiguration(): void {
     // Confirm 'no custom date formats available' message appears.
     $this->drupalGet('admin/config/regional/date-time');
 
@@ -209,7 +209,7 @@ public function testDateFormatConfiguration() {
   /**
    * Tests handling case with invalid data in selectors (like February, 31st).
    */
-  public function testEnteringDateTimeViaSelectors() {
+  public function testEnteringDateTimeViaSelectors(): void {
 
     $this->drupalCreateContentType(['type' => 'page_with_date', 'name' => 'Page with date']);
 
diff --git a/core/modules/system/tests/src/Functional/System/DefaultMobileMetaTagsTest.php b/core/modules/system/tests/src/Functional/System/DefaultMobileMetaTagsTest.php
index 4c1482bdcd18..e599884c2d20 100644
--- a/core/modules/system/tests/src/Functional/System/DefaultMobileMetaTagsTest.php
+++ b/core/modules/system/tests/src/Functional/System/DefaultMobileMetaTagsTest.php
@@ -38,7 +38,7 @@ protected function setUp(): void {
   /**
    * Verifies that the default mobile meta tags are added.
    */
-  public function testDefaultMetaTagsExist() {
+  public function testDefaultMetaTagsExist(): void {
     $this->drupalGet('');
     foreach ($this->defaultMetaTags as $name => $metatag) {
       $this->assertSession()->responseContains($metatag);
@@ -48,7 +48,7 @@ public function testDefaultMetaTagsExist() {
   /**
    * Verifies that the default mobile meta tags can be removed.
    */
-  public function testRemovingDefaultMetaTags() {
+  public function testRemovingDefaultMetaTags(): void {
     \Drupal::service('module_installer')->install(['system_module_test']);
     $this->drupalGet('');
     foreach ($this->defaultMetaTags as $name => $metatag) {
diff --git a/core/modules/system/tests/src/Functional/System/ErrorHandlerTest.php b/core/modules/system/tests/src/Functional/System/ErrorHandlerTest.php
index ee51a944f4c9..9c86c29ea2ee 100644
--- a/core/modules/system/tests/src/Functional/System/ErrorHandlerTest.php
+++ b/core/modules/system/tests/src/Functional/System/ErrorHandlerTest.php
@@ -29,7 +29,7 @@ class ErrorHandlerTest extends BrowserTestBase {
   /**
    * Tests the error handler.
    */
-  public function testErrorHandler() {
+  public function testErrorHandler(): void {
     $config = $this->config('system.logging');
     $error_notice = [
       '%type' => 'Notice',
@@ -97,7 +97,7 @@ public function testErrorHandler() {
   /**
    * Tests a custom error handler set in settings.php.
    */
-  public function testCustomErrorHandler() {
+  public function testCustomErrorHandler(): void {
     $settings_filename = $this->siteDirectory . '/settings.php';
     chmod($settings_filename, 0777);
     $settings_php = file_get_contents($settings_filename);
@@ -121,7 +121,7 @@ public function testCustomErrorHandler() {
   /**
    * Tests the exception handler.
    */
-  public function testExceptionHandler() {
+  public function testExceptionHandler(): void {
     $error_exception = [
       '%type' => 'Exception',
       '@message' => 'Drupal & awesome',
diff --git a/core/modules/system/tests/src/Functional/System/FrontPageTest.php b/core/modules/system/tests/src/Functional/System/FrontPageTest.php
index abb645a54510..8786ba5913fe 100644
--- a/core/modules/system/tests/src/Functional/System/FrontPageTest.php
+++ b/core/modules/system/tests/src/Functional/System/FrontPageTest.php
@@ -55,7 +55,7 @@ protected function setUp(): void {
   /**
    * Tests front page functionality.
    */
-  public function testDrupalFrontPage() {
+  public function testDrupalFrontPage(): void {
     // Create a promoted node to test the <title> tag on the front page view.
     $settings = [
       'title' => $this->randomMachineName(8),
diff --git a/core/modules/system/tests/src/Functional/System/HtaccessTest.php b/core/modules/system/tests/src/Functional/System/HtaccessTest.php
index 81fe8e15f5de..8f57acb9f66a 100644
--- a/core/modules/system/tests/src/Functional/System/HtaccessTest.php
+++ b/core/modules/system/tests/src/Functional/System/HtaccessTest.php
@@ -106,7 +106,7 @@ protected function getProtectedFiles() {
   /**
    * Iterates over protected files and calls assertNoFileAccess().
    */
-  public function testFileAccess() {
+  public function testFileAccess(): void {
     foreach ($this->getProtectedFiles() as $file => $response_code) {
       $this->assertFileAccess($file, $response_code);
     }
@@ -156,7 +156,7 @@ protected function assertFileAccess(string $path, int $response_code): void {
   /**
    * Tests that SVGZ files are served with Content-Encoding: gzip.
    */
-  public function testSvgzContentEncoding() {
+  public function testSvgzContentEncoding(): void {
     $this->drupalGet('core/modules/system/tests/logo.svgz');
     $this->assertSession()->statusCodeEquals(200);
 
diff --git a/core/modules/system/tests/src/Functional/System/IndexPhpTest.php b/core/modules/system/tests/src/Functional/System/IndexPhpTest.php
index 470f7fe1f25b..ae94b015850f 100644
--- a/core/modules/system/tests/src/Functional/System/IndexPhpTest.php
+++ b/core/modules/system/tests/src/Functional/System/IndexPhpTest.php
@@ -28,7 +28,7 @@ protected function setUp(): void {
   /**
    * Tests index.php handling.
    */
-  public function testIndexPhpHandling() {
+  public function testIndexPhpHandling(): void {
     $index_php = $GLOBALS['base_url'] . '/index.php';
 
     $this->drupalGet($index_php, ['external' => TRUE]);
diff --git a/core/modules/system/tests/src/Functional/System/MainContentFallbackTest.php b/core/modules/system/tests/src/Functional/System/MainContentFallbackTest.php
index c1331ad0a8d5..149547a57341 100644
--- a/core/modules/system/tests/src/Functional/System/MainContentFallbackTest.php
+++ b/core/modules/system/tests/src/Functional/System/MainContentFallbackTest.php
@@ -49,7 +49,7 @@ protected function setUp(): void {
   /**
    * Tests availability of main content: Drupal falls back to SimplePageVariant.
    */
-  public function testMainContentFallback() {
+  public function testMainContentFallback(): void {
     $edit = [];
     // Uninstall the block module.
     $edit['uninstall[block]'] = 'block';
diff --git a/core/modules/system/tests/src/Functional/System/PageNotFoundTest.php b/core/modules/system/tests/src/Functional/System/PageNotFoundTest.php
index ed34bf7333f5..21f81b2defcc 100644
--- a/core/modules/system/tests/src/Functional/System/PageNotFoundTest.php
+++ b/core/modules/system/tests/src/Functional/System/PageNotFoundTest.php
@@ -49,7 +49,7 @@ protected function setUp(): void {
     user_role_grant_permissions(RoleInterface::AUTHENTICATED_ID, ['access user profiles']);
   }
 
-  public function testPageNotFound() {
+  public function testPageNotFound(): void {
     $this->drupalLogin($this->adminUser);
     $this->drupalGet($this->randomMachineName(10));
     $this->assertSession()->pageTextContains('Page not found');
@@ -76,7 +76,7 @@ public function testPageNotFound() {
   /**
    * Tests that an inaccessible custom 404 page falls back to the default.
    */
-  public function testPageNotFoundCustomPageWithAccessDenied() {
+  public function testPageNotFoundCustomPageWithAccessDenied(): void {
     // Sets up a 404 page not accessible by the anonymous user.
     $this->config('system.site')->set('page.404', '/system-test/custom-4xx')->save();
 
diff --git a/core/modules/system/tests/src/Functional/System/PageTitleTest.php b/core/modules/system/tests/src/Functional/System/PageTitleTest.php
index b0b71e373534..119f1e84fc02 100644
--- a/core/modules/system/tests/src/Functional/System/PageTitleTest.php
+++ b/core/modules/system/tests/src/Functional/System/PageTitleTest.php
@@ -54,7 +54,7 @@ protected function setUp(): void {
   /**
    * Tests the handling of HTML in node titles.
    */
-  public function testTitleTags() {
+  public function testTitleTags(): void {
     $title = "string with <em>HTML</em>";
     // Generate node content.
     $edit = [
@@ -76,7 +76,7 @@ public function testTitleTags() {
   /**
    * Tests if the title of the site is XSS proof.
    */
-  public function testTitleXSS() {
+  public function testTitleXSS(): void {
     // Set some title with JavaScript and HTML chars to escape.
     $title = '</title><script type="text/javascript">alert("Title XSS!");</script> & < > " \' ';
     $title_filtered = Html::escape($title);
@@ -117,7 +117,7 @@ public function testTitleXSS() {
    *
    * @see \Drupal\test_page_test\Controller\Test
    */
-  public function testRoutingTitle() {
+  public function testRoutingTitle(): void {
     // Test the '#title' render array attribute.
     $this->drupalGet('test-render-title');
 
diff --git a/core/modules/system/tests/src/Functional/System/PhpRequirementTest.php b/core/modules/system/tests/src/Functional/System/PhpRequirementTest.php
index 497d6d2a1a6e..f7447b8d4185 100644
--- a/core/modules/system/tests/src/Functional/System/PhpRequirementTest.php
+++ b/core/modules/system/tests/src/Functional/System/PhpRequirementTest.php
@@ -49,7 +49,7 @@ protected function setUp(): void {
   /**
    * Tests status report messages regarding the PHP version.
    */
-  public function testStatusPage() {
+  public function testStatusPage(): void {
     $minimum_php_version = PhpRequirements::getMinimumSupportedPhp();
     // Go to Administration.
     $this->drupalGet('admin/reports/status');
diff --git a/core/modules/system/tests/src/Functional/System/ResponseGeneratorTest.php b/core/modules/system/tests/src/Functional/System/ResponseGeneratorTest.php
index 128586c89948..4d7b6a888a19 100644
--- a/core/modules/system/tests/src/Functional/System/ResponseGeneratorTest.php
+++ b/core/modules/system/tests/src/Functional/System/ResponseGeneratorTest.php
@@ -40,7 +40,7 @@ protected function setUp(): void {
   /**
    * Tests to see if generator header is added.
    */
-  public function testGeneratorHeaderAdded() {
+  public function testGeneratorHeaderAdded(): void {
 
     $node = $this->drupalCreateNode();
 
diff --git a/core/modules/system/tests/src/Functional/System/ShutdownFunctionsTest.php b/core/modules/system/tests/src/Functional/System/ShutdownFunctionsTest.php
index d9bd9c980bdb..eaf71465daf3 100644
--- a/core/modules/system/tests/src/Functional/System/ShutdownFunctionsTest.php
+++ b/core/modules/system/tests/src/Functional/System/ShutdownFunctionsTest.php
@@ -39,7 +39,7 @@ protected function tearDown(): void {
   /**
    * Tests shutdown functions.
    */
-  public function testShutdownFunctions() {
+  public function testShutdownFunctions(): void {
     $arg1 = $this->randomMachineName();
     $arg2 = $this->randomMachineName();
     $this->drupalGet('system-test/shutdown-functions/' . $arg1 . '/' . $arg2);
diff --git a/core/modules/system/tests/src/Functional/System/SiteMaintenanceTest.php b/core/modules/system/tests/src/Functional/System/SiteMaintenanceTest.php
index 46c6aaba135d..239ca0b7a0b3 100644
--- a/core/modules/system/tests/src/Functional/System/SiteMaintenanceTest.php
+++ b/core/modules/system/tests/src/Functional/System/SiteMaintenanceTest.php
@@ -67,7 +67,7 @@ protected function setUp(): void {
   /**
    * Verifies site maintenance mode functionality.
    */
-  public function testSiteMaintenance() {
+  public function testSiteMaintenance(): void {
 
     // Verify that permission message is displayed.
     $this->drupalGet(Url::fromRoute('system.site_maintenance_mode'));
@@ -177,7 +177,7 @@ public function testSiteMaintenance() {
   /**
    * Tests responses to non-HTML requests when in maintenance mode.
    */
-  public function testNonHtmlRequest() {
+  public function testNonHtmlRequest(): void {
     $this->drupalLogout();
     \Drupal::state()->set('system.maintenance_mode', TRUE);
     $formats = ['json', 'xml', 'non-existing'];
diff --git a/core/modules/system/tests/src/Functional/System/SitesDirectoryHardeningTest.php b/core/modules/system/tests/src/Functional/System/SitesDirectoryHardeningTest.php
index 9962df6672f3..09bb7143667b 100644
--- a/core/modules/system/tests/src/Functional/System/SitesDirectoryHardeningTest.php
+++ b/core/modules/system/tests/src/Functional/System/SitesDirectoryHardeningTest.php
@@ -24,7 +24,7 @@ class SitesDirectoryHardeningTest extends BrowserTestBase {
    *
    * Checks both the current sites directory and settings.php.
    */
-  public function testSitesDirectoryHardening() {
+  public function testSitesDirectoryHardening(): void {
     $site_path = $this->kernel->getSitePath();
     $settings_file = $this->settingsFile($site_path);
 
@@ -45,7 +45,7 @@ public function testSitesDirectoryHardening() {
   /**
    * Tests writable files remain writable when directory hardening is disabled.
    */
-  public function testSitesDirectoryHardeningConfig() {
+  public function testSitesDirectoryHardeningConfig(): void {
     $site_path = $this->kernel->getSitePath();
     $settings_file = $this->settingsFile($site_path);
 
diff --git a/core/modules/system/tests/src/Functional/System/StatusTest.php b/core/modules/system/tests/src/Functional/System/StatusTest.php
index e7be4f9ef047..aaf6fb18570d 100644
--- a/core/modules/system/tests/src/Functional/System/StatusTest.php
+++ b/core/modules/system/tests/src/Functional/System/StatusTest.php
@@ -50,7 +50,7 @@ protected function setUp(): void {
    *
    * @group legacy
    */
-  public function testStatusPage() {
+  public function testStatusPage(): void {
     // Verify if the 'Status report' is the first item link.
     $this->drupalGet('admin/reports');
     $this->assertEquals('Status report', $this->cssSelect('.list-group :first-child')[0]->getText());
@@ -193,7 +193,7 @@ public function testStatusPage() {
   /**
    * Tests that the Error counter matches the displayed number of errors.
    */
-  public function testErrorElementCount() {
+  public function testErrorElementCount(): void {
     // Trigger "cron has not run recently" error:
     $cron_config = \Drupal::config('system.cron');
     $time = \Drupal::time()->getRequestTime();
@@ -213,7 +213,7 @@ public function testErrorElementCount() {
   /**
    * Tests that the Warning counter matches the displayed number of warnings.
    */
-  public function testWarningElementCount() {
+  public function testWarningElementCount(): void {
     // Trigger "cron has not run recently" with warning threshold:
     $cron_config = \Drupal::config('system.cron');
     $time = \Drupal::time()->getRequestTime();
diff --git a/core/modules/system/tests/src/Functional/System/SystemAuthorizeTest.php b/core/modules/system/tests/src/Functional/System/SystemAuthorizeTest.php
index 9a44b78fbb4c..98dde216c2e6 100644
--- a/core/modules/system/tests/src/Functional/System/SystemAuthorizeTest.php
+++ b/core/modules/system/tests/src/Functional/System/SystemAuthorizeTest.php
@@ -55,7 +55,7 @@ public function drupalGetAuthorizePHP($page_title = 'system-test-auth') {
   /**
    * Tests the FileTransfer hooks.
    */
-  public function testFileTransferHooks() {
+  public function testFileTransferHooks(): void {
     $page_title = $this->randomMachineName(16);
     $this->drupalGetAuthorizePHP($page_title);
     $this->assertSession()->titleEquals("$page_title | Drupal");
diff --git a/core/modules/system/tests/src/Functional/System/ThemeTest.php b/core/modules/system/tests/src/Functional/System/ThemeTest.php
index 19f7f1170433..ec6e6a4d358b 100644
--- a/core/modules/system/tests/src/Functional/System/ThemeTest.php
+++ b/core/modules/system/tests/src/Functional/System/ThemeTest.php
@@ -70,7 +70,7 @@ protected function setUp(): void {
   /**
    * Tests the theme settings form.
    */
-  public function testThemeSettings() {
+  public function testThemeSettings(): void {
     // Ensure a disabled theme settings form URL returns 404.
     $this->drupalGet('admin/appearance/settings/olivero');
     $this->assertSession()->statusCodeEquals(404);
@@ -255,7 +255,7 @@ public function testThemeSettings() {
   /**
    * Tests the theme settings logo form.
    */
-  public function testThemeSettingsLogo() {
+  public function testThemeSettingsLogo(): void {
     // Visit Olivero's theme settings page to replace the logo.
     $this->container->get('theme_installer')->install(['olivero']);
     $this->drupalGet('admin/appearance/settings/olivero');
@@ -321,7 +321,7 @@ public function testThemeSettingsColorHexCode() : void {
   /**
    * Tests the 'rendered' cache tag is cleared when saving theme settings.
    */
-  public function testThemeSettingsRenderCacheClear() {
+  public function testThemeSettingsRenderCacheClear(): void {
     $this->container->get('theme_installer')->install(['olivero']);
     // Ensure the frontpage is cached for anonymous users. The render cache will
     // cleared by installing a theme.
@@ -344,7 +344,7 @@ public function testThemeSettingsRenderCacheClear() {
   /**
    * Tests the administration theme functionality.
    */
-  public function testAdministrationTheme() {
+  public function testAdministrationTheme(): void {
     $this->container->get('theme_installer')->install(['claro']);
 
     // Install an administration theme and show it on the node admin pages.
@@ -428,7 +428,7 @@ public function testAdministrationTheme() {
   /**
    * Tests switching the default theme.
    */
-  public function testSwitchDefaultTheme() {
+  public function testSwitchDefaultTheme(): void {
     /** @var \Drupal\Core\Extension\ThemeInstallerInterface $theme_installer */
     $theme_installer = \Drupal::service('theme_installer');
     // First, install Stark and set it as the default theme programmatically.
@@ -459,7 +459,7 @@ public function testSwitchDefaultTheme() {
    * Include test for themes that have a missing base theme somewhere further up
    * the chain than the immediate base theme.
    */
-  public function testInvalidTheme() {
+  public function testInvalidTheme(): void {
     // theme_page_test_system_info_alter() un-hides all hidden themes.
     $this->container->get('module_installer')->install(['theme_page_test']);
     // Clear the system_list() and theme listing cache to pick up the change.
@@ -479,7 +479,7 @@ public function testInvalidTheme() {
   /**
    * Tests uninstalling of themes works.
    */
-  public function testUninstallingThemes() {
+  public function testUninstallingThemes(): void {
     // Install olivero.
     \Drupal::service('theme_installer')->install(['olivero']);
     // Set up Claro as the admin theme.
@@ -527,7 +527,7 @@ public function testUninstallingThemes() {
   /**
    * Tests installing a theme and setting it as default.
    */
-  public function testInstallAndSetAsDefault() {
+  public function testInstallAndSetAsDefault(): void {
     $this->markTestSkipped('Skipped due to major version-specific logic. See https://www.drupal.org/project/drupal/issues/3359322');
     $themes = [
       'olivero' => 'Olivero',
@@ -557,7 +557,7 @@ public function testInstallAndSetAsDefault() {
   /**
    * Tests the theme settings form when logo and favicon features are disabled.
    */
-  public function testThemeSettingsNoLogoNoFavicon() {
+  public function testThemeSettingsNoLogoNoFavicon(): void {
     // Install theme with no logo and no favicon feature.
     $this->container->get('theme_installer')->install(['test_theme_settings_features']);
     // Visit this theme's settings page.
diff --git a/core/modules/system/tests/src/Functional/System/TokenReplaceWebTest.php b/core/modules/system/tests/src/Functional/System/TokenReplaceWebTest.php
index 45f7a3f0649a..65456eac9186 100644
--- a/core/modules/system/tests/src/Functional/System/TokenReplaceWebTest.php
+++ b/core/modules/system/tests/src/Functional/System/TokenReplaceWebTest.php
@@ -30,7 +30,7 @@ class TokenReplaceWebTest extends BrowserTestBase {
   /**
    * Tests a token replacement on an actual website.
    */
-  public function testTokens() {
+  public function testTokens(): void {
     $node = $this->drupalCreateNode();
     $account = $this->drupalCreateUser();
     $this->drupalLogin($account);
diff --git a/core/modules/system/tests/src/Functional/System/TrustedHostsTest.php b/core/modules/system/tests/src/Functional/System/TrustedHostsTest.php
index c714925754f4..a1ae5b761076 100644
--- a/core/modules/system/tests/src/Functional/System/TrustedHostsTest.php
+++ b/core/modules/system/tests/src/Functional/System/TrustedHostsTest.php
@@ -36,7 +36,7 @@ protected function setUp(): void {
    * Checks that an error is shown when the trusted host setting is missing from
    * settings.php
    */
-  public function testStatusPageWithoutConfiguration() {
+  public function testStatusPageWithoutConfiguration(): void {
     $this->drupalGet('admin/reports/status');
     $this->assertSession()->statusCodeEquals(200);
 
@@ -47,7 +47,7 @@ public function testStatusPageWithoutConfiguration() {
   /**
    * Tests that the status page shows the trusted patterns from settings.php.
    */
-  public function testStatusPageWithConfiguration() {
+  public function testStatusPageWithConfiguration(): void {
     $settings['settings']['trusted_host_patterns'] = (object) [
       'value' => ['^' . preg_quote(\Drupal::request()->getHost()) . '$'],
       'required' => TRUE,
@@ -67,7 +67,7 @@ public function testStatusPageWithConfiguration() {
    *
    * @see \Drupal\Core\Http\TrustedHostsRequestFactory
    */
-  public function testFakeRequests() {
+  public function testFakeRequests(): void {
     $this->container->get('module_installer')->install(['trusted_hosts_test']);
 
     $host = $this->container->get('request_stack')->getCurrentRequest()->getHost();
@@ -85,7 +85,7 @@ public function testFakeRequests() {
   /**
    * Tests that shortcut module works together with host verification.
    */
-  public function testShortcut() {
+  public function testShortcut(): void {
     $this->container->get('module_installer')->install(['block', 'shortcut']);
     $this->rebuildContainer();
 
@@ -120,7 +120,7 @@ public function testShortcut() {
    *
    * @see \Drupal\Core\Http\TrustedHostsRequestFactory
    */
-  public function testRequestBags() {
+  public function testRequestBags(): void {
     $this->container->get('module_installer')->install(['trusted_hosts_test']);
 
     $host = $this->container->get('request_stack')->getCurrentRequest()->getHost();
diff --git a/core/modules/system/tests/src/Functional/Theme/EngineNyanCatTest.php b/core/modules/system/tests/src/Functional/Theme/EngineNyanCatTest.php
index aa107b63cfcf..c3fae622efa5 100644
--- a/core/modules/system/tests/src/Functional/Theme/EngineNyanCatTest.php
+++ b/core/modules/system/tests/src/Functional/Theme/EngineNyanCatTest.php
@@ -36,7 +36,7 @@ protected function setUp(): void {
   /**
    * Ensures a theme's template is overridable based on the 'template' filename.
    */
-  public function testTemplateOverride() {
+  public function testTemplateOverride(): void {
     $this->config('system.theme')
       ->set('default', 'test_theme_nyan_cat_engine')
       ->save();
diff --git a/core/modules/system/tests/src/Functional/Theme/EngineTwigTest.php b/core/modules/system/tests/src/Functional/Theme/EngineTwigTest.php
index 4db8ecd517b7..65380e5721b4 100644
--- a/core/modules/system/tests/src/Functional/Theme/EngineTwigTest.php
+++ b/core/modules/system/tests/src/Functional/Theme/EngineTwigTest.php
@@ -41,7 +41,7 @@ protected function setUp(): void {
   /**
    * Tests that the Twig engine handles PHP data correctly.
    */
-  public function testTwigVariableDataTypes() {
+  public function testTwigVariableDataTypes(): void {
     $this->config('system.theme')
       ->set('default', 'test_theme')
       ->save();
@@ -54,7 +54,7 @@ public function testTwigVariableDataTypes() {
   /**
    * Tests the url and url_generate Twig functions.
    */
-  public function testTwigUrlGenerator() {
+  public function testTwigUrlGenerator(): void {
     $this->drupalGet('twig-theme-test/url-generator');
     // Find the absolute URL of the current site.
     $url_generator = $this->container->get('url_generator');
@@ -83,7 +83,7 @@ public function testTwigUrlGenerator() {
   /**
    * Tests the link_generator Twig functions.
    */
-  public function testTwigLinkGenerator() {
+  public function testTwigLinkGenerator(): void {
     $this->drupalGet('twig-theme-test/link-generator');
 
     /** @var \Drupal\Core\Utility\LinkGenerator $link_generator */
@@ -119,7 +119,7 @@ public function testTwigLinkGenerator() {
    *
    * @see \Drupal\Core\Url
    */
-  public function testTwigUrlToString() {
+  public function testTwigUrlToString(): void {
     $this->drupalGet('twig-theme-test/url-to-string');
 
     $expected = [
@@ -136,7 +136,7 @@ public function testTwigUrlToString() {
   /**
    * Tests the automatic/magic calling of toString() on objects, if exists.
    */
-  public function testTwigFileUrls() {
+  public function testTwigFileUrls(): void {
     $this->drupalGet('/twig-theme-test/file-url');
     /** @var \Drupal\Core\File\FileUrlGeneratorInterface $file_url_generator */
     $file_url_generator = \Drupal::service('file_url_generator');
@@ -147,7 +147,7 @@ public function testTwigFileUrls() {
   /**
    * Tests the attach of asset libraries.
    */
-  public function testTwigAttachLibrary() {
+  public function testTwigAttachLibrary(): void {
     $this->drupalGet('/twig-theme-test/attach-library');
     $this->assertSession()->responseContains('ckeditor5-dll.js');
   }
@@ -155,7 +155,7 @@ public function testTwigAttachLibrary() {
   /**
    * Tests the rendering of renderables.
    */
-  public function testRenderable() {
+  public function testRenderable(): void {
     $this->drupalGet('/twig-theme-test/renderable');
     $this->assertSession()->responseContains('<div>Example markup</div>');
   }
diff --git a/core/modules/system/tests/src/Functional/Theme/EntityFilteringThemeTest.php b/core/modules/system/tests/src/Functional/Theme/EntityFilteringThemeTest.php
index 825bc5ffd83c..e6c9fb73bb4b 100644
--- a/core/modules/system/tests/src/Functional/Theme/EntityFilteringThemeTest.php
+++ b/core/modules/system/tests/src/Functional/Theme/EntityFilteringThemeTest.php
@@ -140,7 +140,7 @@ protected function setUp(): void {
   /**
    * Checks each themed entity for XSS filtering in available themes.
    */
-  public function testThemedEntity() {
+  public function testThemedEntity(): void {
     // Check paths where various view modes of the entities are rendered.
     $paths = [
       'user',
diff --git a/core/modules/system/tests/src/Functional/Theme/FastTest.php b/core/modules/system/tests/src/Functional/Theme/FastTest.php
index e14be894952d..dd2621cdf65e 100644
--- a/core/modules/system/tests/src/Functional/Theme/FastTest.php
+++ b/core/modules/system/tests/src/Functional/Theme/FastTest.php
@@ -44,7 +44,7 @@ protected function setUp(): void {
   /**
    * Tests access to user autocompletion and verify the correct results.
    */
-  public function testUserAutocomplete() {
+  public function testUserAutocomplete(): void {
     $this->drupalLogin($this->account);
     $this->drupalGet('user/autocomplete', ['query' => ['q' => $this->account->getAccountName()]]);
     $this->assertSession()->responseContains($this->account->getAccountName());
diff --git a/core/modules/system/tests/src/Functional/Theme/HtmlAttributesTest.php b/core/modules/system/tests/src/Functional/Theme/HtmlAttributesTest.php
index dd0c67f7717e..c39ce5ee3341 100644
--- a/core/modules/system/tests/src/Functional/Theme/HtmlAttributesTest.php
+++ b/core/modules/system/tests/src/Functional/Theme/HtmlAttributesTest.php
@@ -28,7 +28,7 @@ class HtmlAttributesTest extends BrowserTestBase {
   /**
    * Tests that attributes in the 'html' and 'body' elements can be altered.
    */
-  public function testThemeHtmlAttributes() {
+  public function testThemeHtmlAttributes(): void {
     $this->drupalGet('');
     $this->assertSession()->responseContains('<html lang="en" dir="ltr" theme_test_html_attribute="theme test html attribute value">');
     $this->assertSession()->elementsCount('xpath', '/body[@theme_test_body_attribute="theme test body attribute value"]', 1);
diff --git a/core/modules/system/tests/src/Functional/Theme/ImageLoadingAttributeTest.php b/core/modules/system/tests/src/Functional/Theme/ImageLoadingAttributeTest.php
index 9c3ee42a1070..c77cf2aaefb2 100644
--- a/core/modules/system/tests/src/Functional/Theme/ImageLoadingAttributeTest.php
+++ b/core/modules/system/tests/src/Functional/Theme/ImageLoadingAttributeTest.php
@@ -28,7 +28,7 @@ class ImageLoadingAttributeTest extends BrowserTestBase {
   /**
    * Tests that loading attribute is enabled for images.
    */
-  public function testImageLoadingAttribute() {
+  public function testImageLoadingAttribute(): void {
     $assert = $this->assertSession();
 
     // Get page under test.
diff --git a/core/modules/system/tests/src/Functional/Theme/MaintenanceThemeUpdateRegistryTest.php b/core/modules/system/tests/src/Functional/Theme/MaintenanceThemeUpdateRegistryTest.php
index 3a15c1c9cba0..e3aeb3cb81ab 100644
--- a/core/modules/system/tests/src/Functional/Theme/MaintenanceThemeUpdateRegistryTest.php
+++ b/core/modules/system/tests/src/Functional/Theme/MaintenanceThemeUpdateRegistryTest.php
@@ -65,7 +65,7 @@ protected function prepareEnvironment() {
   /**
    * Tests that after installing the profile there are no outstanding updates.
    */
-  public function testMaintenanceThemeUpdateRegistration() {
+  public function testMaintenanceThemeUpdateRegistration(): void {
     $this->drupalLogin($this->drupalCreateUser(['administer software updates']));
 
     $this->drupalGet('update.php/selection');
diff --git a/core/modules/system/tests/src/Functional/Theme/ThemeEarlyInitializationTest.php b/core/modules/system/tests/src/Functional/Theme/ThemeEarlyInitializationTest.php
index 83498774d458..5edbf2cf46a5 100644
--- a/core/modules/system/tests/src/Functional/Theme/ThemeEarlyInitializationTest.php
+++ b/core/modules/system/tests/src/Functional/Theme/ThemeEarlyInitializationTest.php
@@ -28,7 +28,7 @@ class ThemeEarlyInitializationTest extends BrowserTestBase {
   /**
    * Tests that the theme system can generate output in a request listener.
    */
-  public function testRequestListener() {
+  public function testRequestListener(): void {
     $this->drupalGet('theme-test/request-listener');
     // Verify that themed output generated in the request listener appears.
     $this->assertSession()->responseContains('Themed output generated in a KernelEvents::REQUEST listener');
diff --git a/core/modules/system/tests/src/Functional/Theme/ThemeInfoTest.php b/core/modules/system/tests/src/Functional/Theme/ThemeInfoTest.php
index c9174975e5fb..f8ec258a2074 100644
--- a/core/modules/system/tests/src/Functional/Theme/ThemeInfoTest.php
+++ b/core/modules/system/tests/src/Functional/Theme/ThemeInfoTest.php
@@ -60,7 +60,7 @@ protected function setUp(): void {
   /**
    * Tests libraries-override.
    */
-  public function testStylesheets() {
+  public function testStylesheets(): void {
     $this->themeInstaller->install(['test_basetheme', 'test_subtheme']);
     $this->config('system.theme')
       ->set('default', 'test_subtheme')
@@ -89,7 +89,7 @@ public function testStylesheets() {
   /**
    * Tests that changes to the info file are picked up.
    */
-  public function testChanges() {
+  public function testChanges(): void {
     $this->themeInstaller->install(['test_theme']);
     $this->config('system.theme')->set('default', 'test_theme')->save();
     $this->themeManager->resetActiveTheme();
diff --git a/core/modules/system/tests/src/Functional/Theme/ThemeSuggestionsAlterTest.php b/core/modules/system/tests/src/Functional/Theme/ThemeSuggestionsAlterTest.php
index fce7b042d1ac..4f6efef77eb1 100644
--- a/core/modules/system/tests/src/Functional/Theme/ThemeSuggestionsAlterTest.php
+++ b/core/modules/system/tests/src/Functional/Theme/ThemeSuggestionsAlterTest.php
@@ -37,7 +37,7 @@ protected function setUp(): void {
   /**
    * Tests that hooks to provide theme suggestions work.
    */
-  public function testTemplateSuggestions() {
+  public function testTemplateSuggestions(): void {
     $this->drupalGet('theme-test/suggestion-provided');
     $this->assertSession()->pageTextContains('Template for testing suggestions provided by the module declaring the theme hook.');
 
@@ -54,7 +54,7 @@ public function testTemplateSuggestions() {
   /**
    * Tests hook_theme_suggestions_alter().
    */
-  public function testGeneralSuggestionsAlter() {
+  public function testGeneralSuggestionsAlter(): void {
     $this->drupalGet('theme-test/general-suggestion-alter');
     $this->assertSession()->pageTextContains('Original template for testing hook_theme_suggestions_alter().');
     $this->assertSession()->pageTextContains('Hooks: theme_test_theme none');
@@ -79,7 +79,7 @@ public function testGeneralSuggestionsAlter() {
   /**
    * Tests that theme suggestion alter hooks work for templates.
    */
-  public function testTemplateSuggestionsAlter() {
+  public function testTemplateSuggestionsAlter(): void {
     $this->drupalGet('theme-test/suggestion-alter');
     $this->assertSession()->pageTextContains('Original template for testing hook_theme_suggestions_HOOK_alter().');
 
@@ -101,7 +101,7 @@ public function testTemplateSuggestionsAlter() {
   /**
    * Tests that theme suggestion alter hooks work for specific theme calls.
    */
-  public function testSpecificSuggestionsAlter() {
+  public function testSpecificSuggestionsAlter(): void {
     // Test that the default template is rendered.
     $this->drupalGet('theme-test/specific-suggestion-alter');
     $this->assertSession()->pageTextContains('Template for testing specific theme calls.');
@@ -132,7 +132,7 @@ public function testSpecificSuggestionsAlter() {
    * Hook hook_theme_suggestions_alter() should fire before
    * hook_theme_suggestions_HOOK_alter() within an extension (module or theme).
    */
-  public function testExecutionOrder() {
+  public function testExecutionOrder(): void {
     // Install our test theme and module.
     $this->config('system.theme')
       ->set('default', 'test_theme')
diff --git a/core/modules/system/tests/src/Functional/Theme/ThemeTest.php b/core/modules/system/tests/src/Functional/Theme/ThemeTest.php
index 396c253ed3d8..344f4d78a3e6 100644
--- a/core/modules/system/tests/src/Functional/Theme/ThemeTest.php
+++ b/core/modules/system/tests/src/Functional/Theme/ThemeTest.php
@@ -43,7 +43,7 @@ protected function setUp(): void {
    * separate file, so this test also ensures that the file is correctly loaded
    * when needed.
    */
-  public function testPreprocessForSuggestions() {
+  public function testPreprocessForSuggestions(): void {
     // Test with both an unprimed and primed theme registry.
     \Drupal::service('theme.registry')->reset();
     for ($i = 0; $i < 2; $i++) {
@@ -55,7 +55,7 @@ public function testPreprocessForSuggestions() {
   /**
    * Tests the priority of some theme negotiators.
    */
-  public function testNegotiatorPriorities() {
+  public function testNegotiatorPriorities(): void {
     $this->drupalGet('theme-test/priority');
 
     // Ensure that the custom theme negotiator was not able to set the theme.
@@ -65,7 +65,7 @@ public function testNegotiatorPriorities() {
   /**
    * Ensures that non-HTML requests never initialize themes.
    */
-  public function testThemeOnNonHtmlRequest() {
+  public function testThemeOnNonHtmlRequest(): void {
     $this->drupalGet('theme-test/non-html');
     $json = Json::decode($this->getSession()->getPage()->getContent());
     $this->assertFalse($json['theme_initialized']);
@@ -74,7 +74,7 @@ public function testThemeOnNonHtmlRequest() {
   /**
    * Ensure page-front template suggestion is added when on front page.
    */
-  public function testFrontPageThemeSuggestion() {
+  public function testFrontPageThemeSuggestion(): void {
     // Set the current route to user.login because theme_get_suggestions() will
     // query it to see if we are on the front page.
     $request = Request::create('/user/login');
@@ -91,7 +91,7 @@ public function testFrontPageThemeSuggestion() {
   /**
    * Tests theme can provide classes.
    */
-  public function testClassLoading() {
+  public function testClassLoading(): void {
     // Install test theme and set it as default.
     $this->config('system.theme')
       ->set('default', 'test_theme')
@@ -107,7 +107,7 @@ public function testClassLoading() {
    *
    * @see test_theme.info.yml
    */
-  public function testCSSOverride() {
+  public function testCSSOverride(): void {
     // Reuse the same page as in testPreprocessForSuggestions(). We're testing
     // what is output to the HTML HEAD based on what is in a theme's .info.yml
     // file, so it doesn't matter what page we get, as long as it is themed with
@@ -136,7 +136,7 @@ public function testCSSOverride() {
   /**
    * Ensures a themes template is overridable based on the 'template' filename.
    */
-  public function testTemplateOverride() {
+  public function testTemplateOverride(): void {
     $this->config('system.theme')
       ->set('default', 'test_theme')
       ->save();
@@ -150,7 +150,7 @@ public function testTemplateOverride() {
    * Some modules check the page array in template_preprocess_html(), so we
    * ensure that it has not been rendered prematurely.
    */
-  public function testPreprocessHtml() {
+  public function testPreprocessHtml(): void {
     $this->drupalGet('');
     $this->assertSession()->elementsCount('xpath', '/body[@theme_test_page_variable="Page variable is an array."]', 1);
     $this->assertSession()->pageTextContains('theme test page bottom markup');
@@ -159,7 +159,7 @@ public function testPreprocessHtml() {
   /**
    * Tests that region attributes can be manipulated via preprocess functions.
    */
-  public function testRegionClass() {
+  public function testRegionClass(): void {
     \Drupal::service('module_installer')->install(['block', 'theme_region_test']);
 
     // Place a block.
@@ -178,7 +178,7 @@ public function testRegionClass() {
    * separate file, so this test also ensures that the file is correctly loaded
    * when needed.
    */
-  public function testSuggestionPreprocessForDefaults() {
+  public function testSuggestionPreprocessForDefaults(): void {
     $this->config('system.theme')->set('default', 'test_theme')->save();
     // Test with both an unprimed and primed theme registry.
     \Drupal::service('theme.registry')->reset();
@@ -201,7 +201,7 @@ public function testSuggestionPreprocessForDefaults() {
   /**
    * Ensures that preprocess callbacks can be defined.
    */
-  public function testPreprocessCallback() {
+  public function testPreprocessCallback(): void {
     $this->drupalGet('theme-test/preprocess-callback');
     $this->assertSession()->pageTextContains('Make Drupal full of kittens again!');
   }
diff --git a/core/modules/system/tests/src/Functional/Theme/ThemeTokenTest.php b/core/modules/system/tests/src/Functional/Theme/ThemeTokenTest.php
index 1fc4cb150874..9549e8d1bd77 100644
--- a/core/modules/system/tests/src/Functional/Theme/ThemeTokenTest.php
+++ b/core/modules/system/tests/src/Functional/Theme/ThemeTokenTest.php
@@ -40,7 +40,7 @@ protected function setUp(): void {
   /**
    * Tests if the 'theme_token' key of 'ajaxPageState' is computed.
    */
-  public function testThemeToken() {
+  public function testThemeToken(): void {
     // Visit the block administrative page with default theme. We use that page
     // because 'misc/ajax.js' is loaded there and we can test the token
     // generation.
diff --git a/core/modules/system/tests/src/Functional/Theme/ThemeUiTest.php b/core/modules/system/tests/src/Functional/Theme/ThemeUiTest.php
index b5bc6e3fa7f9..2619cac84525 100644
--- a/core/modules/system/tests/src/Functional/Theme/ThemeUiTest.php
+++ b/core/modules/system/tests/src/Functional/Theme/ThemeUiTest.php
@@ -47,7 +47,7 @@ protected function setUp(): void {
   /**
    * Tests permissions for enabling themes depending on disabled modules.
    */
-  public function testModulePermissions() {
+  public function testModulePermissions(): void {
     // Log in as a user without permission to enable modules.
     $this->drupalLogin($this->drupalCreateUser([
       'administer themes',
@@ -88,7 +88,7 @@ public function testModulePermissions() {
    *
    * @dataProvider providerTestThemeInstallWithModuleDependencies
    */
-  public function testThemeInstallWithModuleDependencies($theme_name, array $first_modules, array $second_modules, array $required_by_messages, $base_theme_to_uninstall, array $base_theme_module_names) {
+  public function testThemeInstallWithModuleDependencies($theme_name, array $first_modules, array $second_modules, array $required_by_messages, $base_theme_to_uninstall, array $base_theme_module_names): void {
     $assert_session = $this->assertSession();
     $page = $this->getSession()->getPage();
     $all_dependent_modules = array_merge($first_modules, $second_modules);
@@ -310,7 +310,7 @@ protected function assertUninstallableTheme(array $expected_requires_list_items,
   /**
    * Tests installing a theme with missing module dependencies.
    */
-  public function testInstallModuleWithMissingDependencies() {
+  public function testInstallModuleWithMissingDependencies(): void {
     $this->drupalGet('admin/appearance');
     $theme_container = $this->getSession()->getPage()->find('css', 'h3:contains("Test Theme Depending on Nonexisting Module")')->getParent();
     $this->assertStringContainsString('Requires: test_module_non_existing (missing)', $theme_container->getText());
@@ -320,7 +320,7 @@ public function testInstallModuleWithMissingDependencies() {
   /**
    * Tests installing a theme with incompatible module dependencies.
    */
-  public function testInstallModuleWithIncompatibleDependencies() {
+  public function testInstallModuleWithIncompatibleDependencies(): void {
     $this->container->get('module_installer')->install(['test_module_compatible_constraint', 'test_module_incompatible_constraint']);
     $this->drupalGet('admin/appearance');
     $theme_container = $this->getSession()->getPage()->find('css', 'h3:contains("Test Theme Depending on Version Constrained Modules")')->getParent();
@@ -331,7 +331,7 @@ public function testInstallModuleWithIncompatibleDependencies() {
   /**
    * Tests that incompatible themes message is shown.
    */
-  public function testInstalledIncompatibleTheme() {
+  public function testInstalledIncompatibleTheme(): void {
     $page = $this->getSession()->getPage();
     $assert_session = $this->assertSession();
     $incompatible_themes_message = 'There are errors with some installed themes. Visit the status report page for more information.';
diff --git a/core/modules/system/tests/src/Functional/Theme/ThemeUpdateTest.php b/core/modules/system/tests/src/Functional/Theme/ThemeUpdateTest.php
index c38aa4cc937c..d847abb559e3 100644
--- a/core/modules/system/tests/src/Functional/Theme/ThemeUpdateTest.php
+++ b/core/modules/system/tests/src/Functional/Theme/ThemeUpdateTest.php
@@ -27,7 +27,7 @@ class ThemeUpdateTest extends BrowserTestBase {
    * separate file, so this test also ensures that the file is correctly loaded
    * when needed.
    */
-  public function testThemeUpdates() {
+  public function testThemeUpdates(): void {
     \Drupal::service('module_installer')->install(['test_module_required_by_theme']);
     $this->rebuildAll();
     \Drupal::state()->set('test_theme_depending_on_modules.system_info_alter', ['dependencies' => ['test_module_required_by_theme', 'stark']]);
diff --git a/core/modules/system/tests/src/Functional/Theme/ToolbarClaroOverridesTest.php b/core/modules/system/tests/src/Functional/Theme/ToolbarClaroOverridesTest.php
index 4b25f92cfbce..ec113eeab86a 100644
--- a/core/modules/system/tests/src/Functional/Theme/ToolbarClaroOverridesTest.php
+++ b/core/modules/system/tests/src/Functional/Theme/ToolbarClaroOverridesTest.php
@@ -61,7 +61,7 @@ protected function setUp(): void {
   /**
    * Confirm Claro assets load on a non-Claro default theme.
    */
-  public function testClaroAssets() {
+  public function testClaroAssets(): void {
     $default_stylesheets = [
       'core/modules/toolbar/css/toolbar.module.css',
       'core/modules/toolbar/css/toolbar.menu.css',
diff --git a/core/modules/system/tests/src/Functional/Theme/TwigDebugMarkupTest.php b/core/modules/system/tests/src/Functional/Theme/TwigDebugMarkupTest.php
index 53fdfdf3f525..ac2e45b4ca7d 100644
--- a/core/modules/system/tests/src/Functional/Theme/TwigDebugMarkupTest.php
+++ b/core/modules/system/tests/src/Functional/Theme/TwigDebugMarkupTest.php
@@ -29,7 +29,7 @@ class TwigDebugMarkupTest extends BrowserTestBase {
   /**
    * Tests debug markup added to Twig template output.
    */
-  public function testTwigDebugMarkup() {
+  public function testTwigDebugMarkup(): void {
     /** @var \Drupal\Core\Render\RendererInterface $renderer */
     $renderer = $this->container->get('renderer');
     $extension = twig_extension();
diff --git a/core/modules/system/tests/src/Functional/Theme/TwigEnvironmentTest.php b/core/modules/system/tests/src/Functional/Theme/TwigEnvironmentTest.php
index 352e288c27c7..d9fd78835721 100644
--- a/core/modules/system/tests/src/Functional/Theme/TwigEnvironmentTest.php
+++ b/core/modules/system/tests/src/Functional/Theme/TwigEnvironmentTest.php
@@ -26,7 +26,7 @@ class TwigEnvironmentTest extends BrowserTestBase {
   /**
    * Tests template class loading with Twig embed.
    */
-  public function testTwigEmbed() {
+  public function testTwigEmbed(): void {
     $assert_session = $this->assertSession();
     // Test the Twig embed tag.
     $this->drupalGet('twig-theme-test/embed-tag');
diff --git a/core/modules/system/tests/src/Functional/Theme/TwigExtensionTest.php b/core/modules/system/tests/src/Functional/Theme/TwigExtensionTest.php
index 43c4318ea736..a597d7e50524 100644
--- a/core/modules/system/tests/src/Functional/Theme/TwigExtensionTest.php
+++ b/core/modules/system/tests/src/Functional/Theme/TwigExtensionTest.php
@@ -37,7 +37,7 @@ protected function setUp(): void {
   /**
    * Tests that the provided Twig extension loads the service appropriately.
    */
-  public function testTwigExtensionLoaded() {
+  public function testTwigExtensionLoaded(): void {
     $twigService = \Drupal::service('twig');
     $ext = $twigService->getExtension(TestExtension::class);
     $this->assertInstanceOf(TestExtension::class, $ext);
@@ -46,7 +46,7 @@ public function testTwigExtensionLoaded() {
   /**
    * Tests that the Twig extension's filter produces expected output.
    */
-  public function testTwigExtensionFilter() {
+  public function testTwigExtensionFilter(): void {
     $this->config('system.theme')
       ->set('default', 'test_theme')
       ->save();
@@ -60,7 +60,7 @@ public function testTwigExtensionFilter() {
   /**
    * Tests that the Twig extension's function produces expected output.
    */
-  public function testTwigExtensionFunction() {
+  public function testTwigExtensionFunction(): void {
     $this->config('system.theme')
       ->set('default', 'test_theme')
       ->save();
@@ -76,7 +76,7 @@ public function testTwigExtensionFunction() {
    *
    * @see https://www.drupal.org/node/2417733
    */
-  public function testsRenderEscapedZeroValue() {
+  public function testsRenderEscapedZeroValue(): void {
     /** @var \Drupal\Core\Template\TwigExtension $extension */
     $extension = \Drupal::service('twig.extension');
     /** @var \Drupal\Core\Template\TwigEnvironment $twig */
@@ -90,7 +90,7 @@ public function testsRenderEscapedZeroValue() {
    *
    * @see https://www.drupal.org/node/2417733
    */
-  public function testsRenderZeroValue() {
+  public function testsRenderZeroValue(): void {
     /** @var \Drupal\Core\Template\TwigExtension $extension */
     $extension = \Drupal::service('twig.extension');
     $this->assertSame(0, $extension->renderVar(0), 'TwigExtension::renderVar() renders zero correctly when provided as an integer.');
@@ -100,7 +100,7 @@ public function testsRenderZeroValue() {
   /**
    * Tests the dump function.
    */
-  public function testDump() {
+  public function testDump(): void {
     // Test Twig Debug disabled.
     $this->drupalGet('/twig-theme-test/dump');
     $this->assertSession()->elementsCount('css', '.sf-dump', 0);
diff --git a/core/modules/system/tests/src/Functional/Theme/TwigRegistryLoaderTest.php b/core/modules/system/tests/src/Functional/Theme/TwigRegistryLoaderTest.php
index b1da0d133459..6bc426e68436 100644
--- a/core/modules/system/tests/src/Functional/Theme/TwigRegistryLoaderTest.php
+++ b/core/modules/system/tests/src/Functional/Theme/TwigRegistryLoaderTest.php
@@ -52,14 +52,14 @@ public function assertTwigTemplate($value, string $message = ''): void {
   /**
    * Tests template discovery using the Drupal theme registry.
    */
-  public function testTemplateDiscovery() {
+  public function testTemplateDiscovery(): void {
     $this->assertTwigTemplate($this->twig->load('block.html.twig'), 'Found block.html.twig in block module.');
   }
 
   /**
    * Tests template extension and includes using the Drupal theme registry.
    */
-  public function testTwigNamespaces() {
+  public function testTwigNamespaces(): void {
     // Test the module-provided extend and insert templates.
     $this->drupalGet('twig-theme-test/registry-loader');
     $this->assertSession()->pageTextContains('This line is from twig_theme_test/templates/twig-registry-loader-test-extend.html.twig');
diff --git a/core/modules/system/tests/src/Functional/Theme/TwigSettingsTest.php b/core/modules/system/tests/src/Functional/Theme/TwigSettingsTest.php
index 7ed4fc351747..e77cb68dd273 100644
--- a/core/modules/system/tests/src/Functional/Theme/TwigSettingsTest.php
+++ b/core/modules/system/tests/src/Functional/Theme/TwigSettingsTest.php
@@ -29,7 +29,7 @@ class TwigSettingsTest extends BrowserTestBase {
   /**
    * Ensures Twig template auto reload setting can be overridden.
    */
-  public function testTwigAutoReloadOverride() {
+  public function testTwigAutoReloadOverride(): void {
     // Enable auto reload and rebuild the service container.
     $parameters = $this->container->getParameter('twig.config');
     $parameters['auto_reload'] = TRUE;
@@ -51,7 +51,7 @@ public function testTwigAutoReloadOverride() {
   /**
    * Ensures Twig engine debug setting can be overridden.
    */
-  public function testTwigDebugOverride() {
+  public function testTwigDebugOverride(): void {
     // Enable debug and rebuild the service container.
     $parameters = $this->container->getParameter('twig.config');
     $parameters['debug'] = TRUE;
@@ -81,7 +81,7 @@ public function testTwigDebugOverride() {
   /**
    * Ensures Twig template cache setting can be overridden.
    */
-  public function testTwigCacheOverride() {
+  public function testTwigCacheOverride(): void {
     $extension = twig_extension();
     $theme_installer = $this->container->get('theme_installer');
     $theme_installer->install(['test_theme']);
@@ -126,7 +126,7 @@ public function testTwigCacheOverride() {
   /**
    * Tests twig inline templates with auto_reload.
    */
-  public function testTwigInlineWithAutoReload() {
+  public function testTwigInlineWithAutoReload(): void {
     $parameters = $this->container->getParameter('twig.config');
     $parameters['auto_reload'] = TRUE;
     $parameters['debug'] = TRUE;
diff --git a/core/modules/system/tests/src/Functional/Theme/TwigTransTest.php b/core/modules/system/tests/src/Functional/Theme/TwigTransTest.php
index 18dd85822c78..301661b7ea33 100644
--- a/core/modules/system/tests/src/Functional/Theme/TwigTransTest.php
+++ b/core/modules/system/tests/src/Functional/Theme/TwigTransTest.php
@@ -85,7 +85,7 @@ protected function setUp(): void {
   /**
    * Tests Twig "trans" tags.
    */
-  public function testTwigTransTags() {
+  public function testTwigTransTags(): void {
     // Run this once without and once with Twig debug because trans can work
     // differently depending on that setting.
     $this->drupalGet('twig-theme-test/trans', ['language' => \Drupal::languageManager()->getLanguage('xx')]);
@@ -105,7 +105,7 @@ public function testTwigTransTags() {
   /**
    * Tests empty Twig "trans" tags.
    */
-  public function testEmptyTwigTransTags() {
+  public function testEmptyTwigTransTags(): void {
     $elements = [
       '#type' => 'inline_template',
       '#template' => '{% trans %}{% endtrans %}',
diff --git a/core/modules/system/tests/src/Functional/UpdateSystem/BrokenCacheUpdateTest.php b/core/modules/system/tests/src/Functional/UpdateSystem/BrokenCacheUpdateTest.php
index 746dfd4e9596..9aa889d52b04 100644
--- a/core/modules/system/tests/src/Functional/UpdateSystem/BrokenCacheUpdateTest.php
+++ b/core/modules/system/tests/src/Functional/UpdateSystem/BrokenCacheUpdateTest.php
@@ -32,7 +32,7 @@ protected function setUp(): void {
   /**
    * Ensures that a broken or out-of-date element info cache is not used.
    */
-  public function testUpdate() {
+  public function testUpdate(): void {
     $connection = Database::getConnection();
 
     // Create broken element info caches entries.
diff --git a/core/modules/system/tests/src/Functional/UpdateSystem/DependencyHookInvocationTest.php b/core/modules/system/tests/src/Functional/UpdateSystem/DependencyHookInvocationTest.php
index 0fe869a11b62..f62b932ee0d9 100644
--- a/core/modules/system/tests/src/Functional/UpdateSystem/DependencyHookInvocationTest.php
+++ b/core/modules/system/tests/src/Functional/UpdateSystem/DependencyHookInvocationTest.php
@@ -40,7 +40,7 @@ protected function setUp(): void {
   /**
    * Tests the structure of the array returned by hook_update_dependencies().
    */
-  public function testHookUpdateDependencies() {
+  public function testHookUpdateDependencies(): void {
     $update_dependencies = update_retrieve_dependencies();
     $this->assertSame(8001, $update_dependencies['update_test_0'][8001]['update_test_1'], 'An update function that has a dependency on two separate modules has the first dependency recorded correctly.');
     $this->assertSame(8002, $update_dependencies['update_test_0'][8001]['update_test_2'], 'An update function that has a dependency on two separate modules has the second dependency recorded correctly.');
diff --git a/core/modules/system/tests/src/Functional/UpdateSystem/DependencyMissingTest.php b/core/modules/system/tests/src/Functional/UpdateSystem/DependencyMissingTest.php
index e9fe9d5254d1..f1e52e7472cf 100644
--- a/core/modules/system/tests/src/Functional/UpdateSystem/DependencyMissingTest.php
+++ b/core/modules/system/tests/src/Functional/UpdateSystem/DependencyMissingTest.php
@@ -35,7 +35,7 @@ protected function setUp(): void {
     require_once $this->root . '/core/includes/update.inc';
   }
 
-  public function testMissingUpdate() {
+  public function testMissingUpdate(): void {
     $starting_updates = [
       'update_test_2' => 8001,
     ];
diff --git a/core/modules/system/tests/src/Functional/UpdateSystem/DependencyOrderingTest.php b/core/modules/system/tests/src/Functional/UpdateSystem/DependencyOrderingTest.php
index a1e22be743c6..1dcc6120e57c 100644
--- a/core/modules/system/tests/src/Functional/UpdateSystem/DependencyOrderingTest.php
+++ b/core/modules/system/tests/src/Functional/UpdateSystem/DependencyOrderingTest.php
@@ -41,7 +41,7 @@ protected function setUp(): void {
   /**
    * Tests that updates within a single module run in the correct order.
    */
-  public function testUpdateOrderingSingleModule() {
+  public function testUpdateOrderingSingleModule(): void {
     $starting_updates = [
       'update_test_1' => 8001,
     ];
@@ -57,7 +57,7 @@ public function testUpdateOrderingSingleModule() {
   /**
    * Tests that dependencies between modules are resolved correctly.
    */
-  public function testUpdateOrderingModuleInterdependency() {
+  public function testUpdateOrderingModuleInterdependency(): void {
     $starting_updates = [
       'update_test_2' => 8001,
       'update_test_3' => 8001,
diff --git a/core/modules/system/tests/src/Functional/UpdateSystem/EntityUpdateInitialTest.php b/core/modules/system/tests/src/Functional/UpdateSystem/EntityUpdateInitialTest.php
index f66645ba553e..fa8868ee997d 100644
--- a/core/modules/system/tests/src/Functional/UpdateSystem/EntityUpdateInitialTest.php
+++ b/core/modules/system/tests/src/Functional/UpdateSystem/EntityUpdateInitialTest.php
@@ -58,7 +58,7 @@ protected function setUp(): void {
   /**
    * Tests that a pre-existing initial key in the field schema is not a change.
    */
-  public function testInitialIsIgnored() {
+  public function testInitialIsIgnored(): void {
     $this->runUpdates();
   }
 
diff --git a/core/modules/system/tests/src/Functional/UpdateSystem/InvalidUpdateHookTest.php b/core/modules/system/tests/src/Functional/UpdateSystem/InvalidUpdateHookTest.php
index 003fe1458a6d..c1121813419c 100644
--- a/core/modules/system/tests/src/Functional/UpdateSystem/InvalidUpdateHookTest.php
+++ b/core/modules/system/tests/src/Functional/UpdateSystem/InvalidUpdateHookTest.php
@@ -60,7 +60,7 @@ protected function setUp(): void {
     ]);
   }
 
-  public function testInvalidUpdateHook() {
+  public function testInvalidUpdateHook(): void {
     // Confirm that a module with hook_update_8000() cannot be updated.
     $this->drupalLogin($this->updateUser);
     $this->drupalGet($this->updateUrl);
diff --git a/core/modules/system/tests/src/Functional/UpdateSystem/NoPreExistingSchemaUpdateTest.php b/core/modules/system/tests/src/Functional/UpdateSystem/NoPreExistingSchemaUpdateTest.php
index 4e2cd254d1c9..957200a969a0 100644
--- a/core/modules/system/tests/src/Functional/UpdateSystem/NoPreExistingSchemaUpdateTest.php
+++ b/core/modules/system/tests/src/Functional/UpdateSystem/NoPreExistingSchemaUpdateTest.php
@@ -49,7 +49,7 @@ protected function setUp(): void {
   /**
    * Tests the system module updates with no dependencies installed.
    */
-  public function testNoPreExistingSchema() {
+  public function testNoPreExistingSchema(): void {
     $schema = \Drupal::service('update.update_hook_registry')->getAllInstalledVersions();
     $this->assertArrayNotHasKey('update_test_no_preexisting', $schema);
     $this->assertFalse(\Drupal::state()->get('update_test_no_preexisting_update_8001', FALSE));
diff --git a/core/modules/system/tests/src/Functional/UpdateSystem/RebuildScriptTest.php b/core/modules/system/tests/src/Functional/UpdateSystem/RebuildScriptTest.php
index 8d8a541e84a4..77d15a813e5b 100644
--- a/core/modules/system/tests/src/Functional/UpdateSystem/RebuildScriptTest.php
+++ b/core/modules/system/tests/src/Functional/UpdateSystem/RebuildScriptTest.php
@@ -28,7 +28,7 @@ class RebuildScriptTest extends BrowserTestBase {
   /**
    * Tests redirect in rebuild.php.
    */
-  public function testRebuild() {
+  public function testRebuild(): void {
     $cache = $this->container->get('cache.default');
 
     $cache->set('rebuild_test', TRUE);
diff --git a/core/modules/system/tests/src/Functional/UpdateSystem/UpdateCacheTest.php b/core/modules/system/tests/src/Functional/UpdateSystem/UpdateCacheTest.php
index e1f5f728294a..1c1e0255603f 100644
--- a/core/modules/system/tests/src/Functional/UpdateSystem/UpdateCacheTest.php
+++ b/core/modules/system/tests/src/Functional/UpdateSystem/UpdateCacheTest.php
@@ -27,7 +27,7 @@ class UpdateCacheTest extends BrowserTestBase {
    * @see \Drupal\Core\Update\UpdateServiceProvider
    * @see \Drupal\Core\Update\UpdateBackend
    */
-  public function testCaches() {
+  public function testCaches(): void {
     \Drupal::cache()->set('will_not_exist_after_update', TRUE);
     // The site might be broken at the time so logging in using the UI might
     // not work, so we use the API itself.
diff --git a/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePathLastRemovedTest.php b/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePathLastRemovedTest.php
index ad819b7c2d99..a03525479f75 100644
--- a/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePathLastRemovedTest.php
+++ b/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePathLastRemovedTest.php
@@ -56,7 +56,7 @@ protected function setUp(): void {
   /**
    * Tests that a module with a too old schema version can not be updated.
    */
-  public function testLastRemovedVersion() {
+  public function testLastRemovedVersion(): void {
     /** @var \Drupal\Core\Update\UpdateHookRegistry $update_registry */
     $update_registry = \Drupal::service('update.update_hook_registry');
 
diff --git a/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePathNewDependencyTest.php b/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePathNewDependencyTest.php
index 6c9505050afa..c657d311a081 100644
--- a/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePathNewDependencyTest.php
+++ b/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePathNewDependencyTest.php
@@ -24,7 +24,7 @@ class UpdatePathNewDependencyTest extends BrowserTestBase {
   /**
    * Tests that a module can add services that depend on new modules.
    */
-  public function testUpdateNewDependency() {
+  public function testUpdateNewDependency(): void {
     // The new_dependency_test before the update is just an empty info.yml file.
     // The code of the new_dependency_test module is after the update and
     // contains the dependency on the new_dependency_test_with_service module.
diff --git a/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePathTestBaseFilledTest.php b/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePathTestBaseFilledTest.php
index 87bd43f3c79b..47c93e107e6d 100644
--- a/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePathTestBaseFilledTest.php
+++ b/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePathTestBaseFilledTest.php
@@ -36,7 +36,7 @@ protected function setDatabaseDumpFiles() {
   /**
    * Tests that the content and configuration were properly updated.
    */
-  public function testUpdatedSite() {
+  public function testUpdatedSite(): void {
     $assert_session = $this->assertSession();
 
     $this->runUpdates();
@@ -408,7 +408,7 @@ protected function replaceUser1() {
   /**
    * Tests that the database was properly loaded.
    */
-  public function testDatabaseProperlyLoaded() {
+  public function testDatabaseProperlyLoaded(): void {
     $this->testDatabaseLoaded();
   }
 
diff --git a/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePathTestJavaScriptTest.php b/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePathTestJavaScriptTest.php
index 0b561800ea60..18e9adbefad8 100644
--- a/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePathTestJavaScriptTest.php
+++ b/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePathTestJavaScriptTest.php
@@ -33,7 +33,7 @@ protected function setUp(): void {
    *
    * @see ::doPreUpdateTests
    */
-  public function testJavaScriptLoading() {
+  public function testJavaScriptLoading(): void {
     $this->runUpdates();
   }
 
diff --git a/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePathWithBrokenRoutingTest.php b/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePathWithBrokenRoutingTest.php
index fa82541d5d23..e61dad75c7ca 100644
--- a/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePathWithBrokenRoutingTest.php
+++ b/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePathWithBrokenRoutingTest.php
@@ -32,7 +32,7 @@ protected function setUp(): void {
   /**
    * Tests running update.php with some form of broken routing.
    */
-  public function testWithBrokenRouting() {
+  public function testWithBrokenRouting(): void {
     // Simulate a broken router, and make sure the front page is
     // inaccessible.
     \Drupal::state()->set('update_script_test_broken_inbound', TRUE);
diff --git a/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePostUpdateExceptionTest.php b/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePostUpdateExceptionTest.php
index 4102243c6be4..814c02b9920c 100644
--- a/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePostUpdateExceptionTest.php
+++ b/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePostUpdateExceptionTest.php
@@ -52,7 +52,7 @@ protected function setUp(): void {
   /**
    * Tests hook_post_update_NAME().
    */
-  public function testPostUpdate() {
+  public function testPostUpdate(): void {
     // There are expected to be failed updates.
     $this->checkFailedUpdates = FALSE;
 
diff --git a/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePostUpdateFailingTest.php b/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePostUpdateFailingTest.php
index 8c0dc5fd8dde..7eca9da31fd3 100644
--- a/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePostUpdateFailingTest.php
+++ b/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePostUpdateFailingTest.php
@@ -52,7 +52,7 @@ protected function setUp(): void {
   /**
    * Tests hook_post_update_NAME().
    */
-  public function testPostUpdate() {
+  public function testPostUpdate(): void {
     // There are expected to be failed updates.
     $this->checkFailedUpdates = FALSE;
 
diff --git a/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePostUpdateTest.php b/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePostUpdateTest.php
index 70a353f0bbde..73aaabc8d655 100644
--- a/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePostUpdateTest.php
+++ b/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePostUpdateTest.php
@@ -74,7 +74,7 @@ protected function doSelectionTest() {
   /**
    * Tests hook_post_update_NAME().
    */
-  public function testPostUpdate() {
+  public function testPostUpdate(): void {
     $this->runUpdates();
 
     $this->assertSession()->responseContains('<h3>Update first</h3>');
diff --git a/core/modules/system/tests/src/Functional/UpdateSystem/UpdateRemovedPostUpdateTest.php b/core/modules/system/tests/src/Functional/UpdateSystem/UpdateRemovedPostUpdateTest.php
index d4b35181d686..f4f3ca4ec37b 100644
--- a/core/modules/system/tests/src/Functional/UpdateSystem/UpdateRemovedPostUpdateTest.php
+++ b/core/modules/system/tests/src/Functional/UpdateSystem/UpdateRemovedPostUpdateTest.php
@@ -73,7 +73,7 @@ protected function setUp(): void {
   /**
    * Tests hook_post_update_NAME().
    */
-  public function testRemovedPostUpdate() {
+  public function testRemovedPostUpdate(): void {
     // Mimic the behavior of ModuleInstaller::install().
     $key_value = \Drupal::service('keyvalue');
     $existing_updates = $key_value->get('post_update')->get('existing_updates', []);
diff --git a/core/modules/system/tests/src/Functional/UpdateSystem/UpdateSchemaTest.php b/core/modules/system/tests/src/Functional/UpdateSystem/UpdateSchemaTest.php
index 74ecc99e8b05..dd21a3dbe142 100644
--- a/core/modules/system/tests/src/Functional/UpdateSystem/UpdateSchemaTest.php
+++ b/core/modules/system/tests/src/Functional/UpdateSystem/UpdateSchemaTest.php
@@ -57,7 +57,7 @@ protected function setUp(): void {
   /**
    * Tests that update hooks are properly run.
    */
-  public function testUpdateHooks() {
+  public function testUpdateHooks(): void {
     $connection = Database::getConnection();
 
     /** @var \Drupal\Core\Update\UpdateHookRegistry $update_registry */
diff --git a/core/modules/system/tests/src/Functional/UpdateSystem/UpdateScriptTest.php b/core/modules/system/tests/src/Functional/UpdateSystem/UpdateScriptTest.php
index d0a10206585a..430eb4fbe216 100644
--- a/core/modules/system/tests/src/Functional/UpdateSystem/UpdateScriptTest.php
+++ b/core/modules/system/tests/src/Functional/UpdateSystem/UpdateScriptTest.php
@@ -79,7 +79,7 @@ protected function setUp(): void {
   /**
    * Tests access to the update script.
    */
-  public function testUpdateAccess() {
+  public function testUpdateAccess(): void {
     // Try accessing update.php without the proper permission.
     $regular_user = $this->drupalCreateUser();
     $this->drupalLogin($regular_user);
@@ -128,7 +128,7 @@ public function testUpdateAccess() {
   /**
    * Tests that requirements warnings and errors are correctly displayed.
    */
-  public function testRequirements() {
+  public function testRequirements(): void {
     $update_script_test_config = $this->config('update_script_test.settings');
     $this->drupalLogin($this->updateUser);
 
@@ -507,7 +507,7 @@ public function testMissingExtension(array $core, array $contrib): void {
   /**
    * Tests that orphan schemas are handled properly.
    */
-  public function testOrphanedSchemaEntries() {
+  public function testOrphanedSchemaEntries(): void {
     $this->drupalLogin($this->updateUser);
 
     // Insert a bogus value into the system.schema key/value storage for a
@@ -654,7 +654,7 @@ protected function enableMissingExtensions(array $extension_info): void {
   /**
    * Tests the effect of using the update script on the theme system.
    */
-  public function testThemeSystem() {
+  public function testThemeSystem(): void {
     // Since visiting update.php triggers a rebuild of the theme system from an
     // unusual maintenance mode environment, we check that this rebuild did not
     // put any incorrect information about the themes into the database.
@@ -668,7 +668,7 @@ public function testThemeSystem() {
   /**
    * Tests update.php when there are no updates to apply.
    */
-  public function testNoUpdateFunctionality() {
+  public function testNoUpdateFunctionality(): void {
     // Click through update.php with 'administer software updates' permission.
     $this->drupalLogin($this->updateUser);
     $this->drupalGet($this->updateUrl, ['external' => TRUE]);
@@ -699,7 +699,7 @@ public function testNoUpdateFunctionality() {
   /**
    * Tests update.php after performing a successful update.
    */
-  public function testSuccessfulUpdateFunctionality() {
+  public function testSuccessfulUpdateFunctionality(): void {
     $initial_maintenance_mode = $this->container->get('state')->get('system.maintenance_mode');
     $this->assertNull($initial_maintenance_mode, 'Site is not in maintenance mode.');
     $this->runUpdates($initial_maintenance_mode);
@@ -743,7 +743,7 @@ public function testSuccessfulUpdateFunctionality() {
   /**
    * Tests update.php while in maintenance mode.
    */
-  public function testMaintenanceModeUpdateFunctionality() {
+  public function testMaintenanceModeUpdateFunctionality(): void {
     $this->container->get('state')
       ->set('system.maintenance_mode', TRUE);
     $initial_maintenance_mode = $this->container->get('state')
@@ -758,7 +758,7 @@ public function testMaintenanceModeUpdateFunctionality() {
   /**
    * Tests performing updates with update.php in a multilingual environment.
    */
-  public function testSuccessfulMultilingualUpdateFunctionality() {
+  public function testSuccessfulMultilingualUpdateFunctionality(): void {
     // Add some custom languages.
     foreach (['aa', 'bb'] as $language_code) {
       ConfigurableLanguage::create([
@@ -819,7 +819,7 @@ public function testSuccessfulMultilingualUpdateFunctionality() {
   /**
    * Tests maintenance mode link on update.php.
    */
-  public function testMaintenanceModeLink() {
+  public function testMaintenanceModeLink(): void {
     $full_admin_user = $this->drupalCreateUser([
       'administer software updates',
       'access administration pages',
diff --git a/core/modules/system/tests/src/Functional/UpdateSystem/UpdatesWith7xTest.php b/core/modules/system/tests/src/Functional/UpdateSystem/UpdatesWith7xTest.php
index 0f740b078bf6..2e6163c7e4e5 100644
--- a/core/modules/system/tests/src/Functional/UpdateSystem/UpdatesWith7xTest.php
+++ b/core/modules/system/tests/src/Functional/UpdateSystem/UpdatesWith7xTest.php
@@ -53,7 +53,7 @@ protected function setUp(): void {
     ]);
   }
 
-  public function testWith7x() {
+  public function testWith7x(): void {
     /** @var \Drupal\Core\Update\UpdateHookRegistry $update_registry */
     $update_registry = \Drupal::service('update.update_hook_registry');
 
diff --git a/core/modules/system/tests/src/FunctionalJavascript/CopyFieldValueTest.php b/core/modules/system/tests/src/FunctionalJavascript/CopyFieldValueTest.php
index 1e524de1d02a..38728c384559 100644
--- a/core/modules/system/tests/src/FunctionalJavascript/CopyFieldValueTest.php
+++ b/core/modules/system/tests/src/FunctionalJavascript/CopyFieldValueTest.php
@@ -28,7 +28,7 @@ class CopyFieldValueTest extends WebDriverTestBase {
   /**
    * Tests copy field value JavaScript functionality.
    */
-  public function testCopyFieldValue() {
+  public function testCopyFieldValue(): void {
     $this->drupalGet('/system-test/copy-field-value-test-form');
     $page = $this->getSession()->getPage();
     $source_field_selector = 'edit-source-field';
diff --git a/core/modules/system/tests/src/FunctionalJavascript/Form/ElementsTableSelectTest.php b/core/modules/system/tests/src/FunctionalJavascript/Form/ElementsTableSelectTest.php
index b395e5628597..379856a5a1b0 100644
--- a/core/modules/system/tests/src/FunctionalJavascript/Form/ElementsTableSelectTest.php
+++ b/core/modules/system/tests/src/FunctionalJavascript/Form/ElementsTableSelectTest.php
@@ -26,7 +26,7 @@ class ElementsTableSelectTest extends WebDriverTestBase {
   /**
    * Tests the presence of ajax functionality for all options.
    */
-  public function testAjax() {
+  public function testAjax(): void {
     // Test checkboxes (#multiple == TRUE).
     $this->drupalGet('form_test/tableselect/multiple-true');
     $session = $this->getSession();
@@ -65,7 +65,7 @@ public function testAjax() {
   /**
    * Tests table select with disabled rows.
    */
-  public function testDisabledRows() {
+  public function testDisabledRows(): void {
     // Asserts that a row number (1 based) is enabled.
     $assert_row_enabled = function ($delta) {
       $row = $this->assertSession()->elementExists('xpath', "//table/tbody/tr[$delta]");
diff --git a/core/modules/system/tests/src/FunctionalJavascript/Form/RebuildTest.php b/core/modules/system/tests/src/FunctionalJavascript/Form/RebuildTest.php
index 4fd1acb9dae4..3858006154cf 100644
--- a/core/modules/system/tests/src/FunctionalJavascript/Form/RebuildTest.php
+++ b/core/modules/system/tests/src/FunctionalJavascript/Form/RebuildTest.php
@@ -53,7 +53,7 @@ protected function setUp(): void {
    * The 'action' attribute of a form should not change after an Ajax submission
    * followed by a non-Ajax submission, which triggers a validation error.
    */
-  public function testPreserveFormActionAfterAJAX() {
+  public function testPreserveFormActionAfterAJAX(): void {
     $page = $this->getSession()->getPage();
     // Create a multi-valued field for 'page' nodes to use for Ajax testing.
     $field_name = 'field_ajax_test';
diff --git a/core/modules/system/tests/src/FunctionalJavascript/Form/TriggeringElementTest.php b/core/modules/system/tests/src/FunctionalJavascript/Form/TriggeringElementTest.php
index 01db4e524f82..d07aea57549d 100644
--- a/core/modules/system/tests/src/FunctionalJavascript/Form/TriggeringElementTest.php
+++ b/core/modules/system/tests/src/FunctionalJavascript/Form/TriggeringElementTest.php
@@ -30,7 +30,7 @@ class TriggeringElementTest extends WebDriverTestBase {
    * information is included in the POST data, as is sometimes the case when
    * the ENTER key is pressed in a textfield in Internet Explorer.
    */
-  public function testNoButtonInfoInPost() {
+  public function testNoButtonInfoInPost(): void {
     $path = '/form-test/clicked-button';
     $form_html_id = 'form-test-clicked-button';
 
@@ -88,7 +88,7 @@ public function testNoButtonInfoInPost() {
    * Test that the triggering element does not get set to a button with
    * #access=FALSE.
    */
-  public function testAttemptAccessControlBypass() {
+  public function testAttemptAccessControlBypass(): void {
     $path = 'form-test/clicked-button';
     $form_html_id = 'form-test-clicked-button';
 
diff --git a/core/modules/system/tests/src/FunctionalJavascript/FrameworkTest.php b/core/modules/system/tests/src/FunctionalJavascript/FrameworkTest.php
index 1f03dcb01146..0fd5f468fb18 100644
--- a/core/modules/system/tests/src/FunctionalJavascript/FrameworkTest.php
+++ b/core/modules/system/tests/src/FunctionalJavascript/FrameworkTest.php
@@ -26,7 +26,7 @@ class FrameworkTest extends WebDriverTestBase {
   /**
    * Tests that new JavaScript and CSS files are lazy-loaded on an AJAX request.
    */
-  public function testLazyLoad() {
+  public function testLazyLoad(): void {
     $expected = [
       'setting_name' => 'ajax_forms_test_lazy_load_form_submit',
       'setting_value' => 'executed',
@@ -86,7 +86,7 @@ public function testLazyLoad() {
   /**
    * Tests that drupalSettings.currentPath is not updated on AJAX requests.
    */
-  public function testCurrentPathChange() {
+  public function testCurrentPathChange(): void {
     $this->drupalGet('ajax_forms_test_lazy_load_form');
     $page = $this->getSession()->getPage();
     $assert = $this->assertSession();
@@ -101,7 +101,7 @@ public function testCurrentPathChange() {
   /**
    * Tests that overridden CSS files are not added during lazy load.
    */
-  public function testLazyLoadOverriddenCSS() {
+  public function testLazyLoadOverriddenCSS(): void {
     // The test_theme throws a few JavaScript errors. Since we're only
     // interested in CSS for this test, we're not letting this test fail on
     // those.
diff --git a/core/modules/system/tests/src/FunctionalJavascript/ModalRendererTest.php b/core/modules/system/tests/src/FunctionalJavascript/ModalRendererTest.php
index a5e609fd5b5e..ab5735efc57e 100644
--- a/core/modules/system/tests/src/FunctionalJavascript/ModalRendererTest.php
+++ b/core/modules/system/tests/src/FunctionalJavascript/ModalRendererTest.php
@@ -26,7 +26,7 @@ class ModalRendererTest extends WebDriverTestBase {
   /**
    * Tests that links respect 'data-dialog-renderer' attribute.
    */
-  public function testModalRenderer() {
+  public function testModalRenderer(): void {
     $session_assert = $this->assertSession();
     $this->drupalGet('/dialog_renderer-test-links');
     $this->clickLink('Normal Modal!');
@@ -103,7 +103,7 @@ public function testModalRenderer() {
   /**
    * Confirm focus management of a dialog openers in a dropbutton.
    */
-  public function testOpenerInDropbutton() {
+  public function testOpenerInDropbutton(): void {
     $assert_session = $this->assertSession();
     $page = $this->getSession()->getPage();
 
diff --git a/core/modules/system/tests/src/FunctionalJavascript/ModuleFilterTest.php b/core/modules/system/tests/src/FunctionalJavascript/ModuleFilterTest.php
index 308fa70a84c9..96f877179e3f 100644
--- a/core/modules/system/tests/src/FunctionalJavascript/ModuleFilterTest.php
+++ b/core/modules/system/tests/src/FunctionalJavascript/ModuleFilterTest.php
@@ -39,7 +39,7 @@ protected function setUp(): void {
   /**
    * Tests that filter results announcement has correct pluralization.
    */
-  public function testModuleFilter() {
+  public function testModuleFilter(): void {
 
     // Find the module filter field.
     $this->drupalGet('admin/modules');
diff --git a/core/modules/system/tests/src/FunctionalJavascript/ModuleUninstallFilterTest.php b/core/modules/system/tests/src/FunctionalJavascript/ModuleUninstallFilterTest.php
index b4bb3718d441..e89ac08ec837 100644
--- a/core/modules/system/tests/src/FunctionalJavascript/ModuleUninstallFilterTest.php
+++ b/core/modules/system/tests/src/FunctionalJavascript/ModuleUninstallFilterTest.php
@@ -38,7 +38,7 @@ protected function setUp(): void {
   /**
    * Tests that correct module count is returned when list filtered.
    */
-  public function testModuleUninstallFilter() {
+  public function testModuleUninstallFilter(): void {
 
     // Find the module filter field.
     $this->drupalGet('admin/modules/uninstall');
diff --git a/core/modules/system/tests/src/FunctionalJavascript/OffCanvasTest.php b/core/modules/system/tests/src/FunctionalJavascript/OffCanvasTest.php
index 959b42bea4c5..aef99eb39018 100644
--- a/core/modules/system/tests/src/FunctionalJavascript/OffCanvasTest.php
+++ b/core/modules/system/tests/src/FunctionalJavascript/OffCanvasTest.php
@@ -37,7 +37,7 @@ class OffCanvasTest extends OffCanvasTestBase {
    *
    * @dataProvider themeDataProvider
    */
-  public function testOffCanvasLinks($theme) {
+  public function testOffCanvasLinks($theme): void {
     $this->enableTheme($theme);
     $this->drupalGet('/off-canvas-test-links');
 
@@ -117,7 +117,7 @@ public function testOffCanvasLinks($theme) {
   /**
    * Tests the body displacement behaves differently at a narrow width.
    */
-  public function testNarrowWidth() {
+  public function testNarrowWidth(): void {
     $narrow_width_breakpoint = 768;
     $offset = 20;
     $height = 800;
diff --git a/core/modules/system/tests/src/FunctionalJavascript/System/DateFormatTest.php b/core/modules/system/tests/src/FunctionalJavascript/System/DateFormatTest.php
index 0bc84181d105..d2ab2f4a744b 100644
--- a/core/modules/system/tests/src/FunctionalJavascript/System/DateFormatTest.php
+++ b/core/modules/system/tests/src/FunctionalJavascript/System/DateFormatTest.php
@@ -40,7 +40,7 @@ protected function setUp(): void {
   /**
    * Tests XSS via date format configuration.
    */
-  public function testDateFormatXss() {
+  public function testDateFormatXss(): void {
     $page = $this->getSession()->getPage();
     $assert = $this->assertSession();
 
diff --git a/core/modules/system/tests/src/FunctionalJavascript/ThemeSettingsFormTest.php b/core/modules/system/tests/src/FunctionalJavascript/ThemeSettingsFormTest.php
index 0b8da7ad4443..41fc94d4f1e1 100644
--- a/core/modules/system/tests/src/FunctionalJavascript/ThemeSettingsFormTest.php
+++ b/core/modules/system/tests/src/FunctionalJavascript/ThemeSettingsFormTest.php
@@ -42,7 +42,7 @@ protected function setUp(): void {
    *
    * @dataProvider providerTestFormSettingsSubmissionHandler
    */
-  public function testFormSettingsSubmissionHandler($theme) {
+  public function testFormSettingsSubmissionHandler($theme): void {
 
     \Drupal::service('theme_installer')->install([$theme]);
 
diff --git a/core/modules/system/tests/src/Kernel/Action/ActionTest.php b/core/modules/system/tests/src/Kernel/Action/ActionTest.php
index 9a941fb5067b..43e24cce4f1f 100644
--- a/core/modules/system/tests/src/Kernel/Action/ActionTest.php
+++ b/core/modules/system/tests/src/Kernel/Action/ActionTest.php
@@ -42,7 +42,7 @@ protected function setUp(): void {
   /**
    * Tests the functionality of test actions.
    */
-  public function testOperations() {
+  public function testOperations(): void {
     // Test that actions can be discovered.
     $definitions = $this->actionManager->getDefinitions();
     // Verify that the action definitions are found.
@@ -77,7 +77,7 @@ public function testOperations() {
   /**
    * Tests the dependency calculation of actions.
    */
-  public function testDependencies() {
+  public function testDependencies(): void {
     // Create a new action that depends on a user role.
     $action = Action::create([
       'id' => 'user_add_role_action.' . RoleInterface::ANONYMOUS_ID,
diff --git a/core/modules/system/tests/src/Kernel/Block/SystemMenuBlockTest.php b/core/modules/system/tests/src/Kernel/Block/SystemMenuBlockTest.php
index 20efaa452700..af4d0ba8a2e7 100644
--- a/core/modules/system/tests/src/Kernel/Block/SystemMenuBlockTest.php
+++ b/core/modules/system/tests/src/Kernel/Block/SystemMenuBlockTest.php
@@ -153,7 +153,7 @@ protected function setUp(): void {
   /**
    * Tests calculation of a system menu block's configuration dependencies.
    */
-  public function testSystemMenuBlockConfigDependencies() {
+  public function testSystemMenuBlockConfigDependencies(): void {
 
     $block = Block::create([
       'plugin' => 'system_menu_block:' . $this->menu->id(),
@@ -180,7 +180,7 @@ public function testSystemMenuBlockConfigDependencies() {
   /**
    * Tests the config start level and depth.
    */
-  public function testConfigLevelDepth() {
+  public function testConfigLevelDepth(): void {
     // Helper function to generate a configured block instance.
     $place_block = function ($level, $depth) {
       return $this->blockManager->createInstance('system_menu_block:' . $this->menu->id(), [
@@ -291,7 +291,7 @@ public function testConfigLevelDepth() {
    *
    * @dataProvider configExpandedTestCases
    */
-  public function testConfigExpanded($active_route, $menu_block_level, $expected_items) {
+  public function testConfigExpanded($active_route, $menu_block_level, $expected_items): void {
     $block = $this->blockManager->createInstance('system_menu_block:' . $this->menu->id(), [
       'region' => 'footer',
       'id' => 'machine_name',
diff --git a/core/modules/system/tests/src/Kernel/Common/AddFeedTest.php b/core/modules/system/tests/src/Kernel/Common/AddFeedTest.php
index f4ab0e8bf396..98bd03714d50 100644
--- a/core/modules/system/tests/src/Kernel/Common/AddFeedTest.php
+++ b/core/modules/system/tests/src/Kernel/Common/AddFeedTest.php
@@ -22,7 +22,7 @@ class AddFeedTest extends KernelTestBase {
   /**
    * Tests attaching feeds with paths, URLs, and titles.
    */
-  public function testBasicFeedAddNoTitle() {
+  public function testBasicFeedAddNoTitle(): void {
     $path = $this->randomMachineName(12);
     $external_url = 'http://' . $this->randomMachineName(12) . '/' . $this->randomMachineName(12);
     $fully_qualified_local_url = Url::fromUri('base:' . $this->randomMachineName(12), ['absolute' => TRUE])->toString();
@@ -89,7 +89,7 @@ public function urlToRSSLinkPattern($url, $title = '') {
    *
    * @see https://www.drupal.org/node/1211668
    */
-  public function testFeedIconEscaping() {
+  public function testFeedIconEscaping(): void {
     $variables = [
       '#theme' => 'feed_icon',
       '#url' => 'node',
diff --git a/core/modules/system/tests/src/Kernel/Common/FormElementsRenderTest.php b/core/modules/system/tests/src/Kernel/Common/FormElementsRenderTest.php
index 3563199bf875..a0fb74c01672 100644
--- a/core/modules/system/tests/src/Kernel/Common/FormElementsRenderTest.php
+++ b/core/modules/system/tests/src/Kernel/Common/FormElementsRenderTest.php
@@ -25,7 +25,7 @@ class FormElementsRenderTest extends KernelTestBase {
    *
    * @see \Drupal\Core\Form\FormBuilderInterface::doBuildForm()
    */
-  public function testDrupalRenderFormElements() {
+  public function testDrupalRenderFormElements(): void {
     // Define a series of form elements.
     $element = [
       '#type' => 'button',
diff --git a/core/modules/system/tests/src/Kernel/Common/PageRenderTest.php b/core/modules/system/tests/src/Kernel/Common/PageRenderTest.php
index 16bcbff03c6c..95f0d7f139ca 100644
--- a/core/modules/system/tests/src/Kernel/Common/PageRenderTest.php
+++ b/core/modules/system/tests/src/Kernel/Common/PageRenderTest.php
@@ -18,7 +18,7 @@ class PageRenderTest extends KernelTestBase {
   /**
    * Tests hook_page_attachments() exceptions.
    */
-  public function testHookPageAttachmentsExceptions() {
+  public function testHookPageAttachmentsExceptions(): void {
     $this->enableModules(['common_test', 'system']);
 
     $this->assertPageRenderHookExceptions('common_test', 'hook_page_attachments');
@@ -27,7 +27,7 @@ public function testHookPageAttachmentsExceptions() {
   /**
    * Tests hook_page_attachments_alter() exceptions.
    */
-  public function testHookPageAlter() {
+  public function testHookPageAlter(): void {
     $this->enableModules(['common_test', 'system']);
 
     $this->assertPageRenderHookExceptions('common_test', 'hook_page_attachments_alter');
diff --git a/core/modules/system/tests/src/Kernel/Common/SystemListingTest.php b/core/modules/system/tests/src/Kernel/Common/SystemListingTest.php
index d236d5417c49..f7b1e192d026 100644
--- a/core/modules/system/tests/src/Kernel/Common/SystemListingTest.php
+++ b/core/modules/system/tests/src/Kernel/Common/SystemListingTest.php
@@ -17,7 +17,7 @@ class SystemListingTest extends KernelTestBase {
   /**
    * Tests that files in different directories take precedence as expected.
    */
-  public function testDirectoryPrecedence() {
+  public function testDirectoryPrecedence(): void {
     // Define the module files we will search for, and the directory precedence
     // we expect.
     $expected_directories = [
@@ -55,7 +55,7 @@ public function testDirectoryPrecedence() {
   /**
    * Tests that directories matching file_scan_ignore_directories are ignored.
    */
-  public function testFileScanIgnoreDirectory() {
+  public function testFileScanIgnoreDirectory(): void {
     $listing = new ExtensionDiscovery($this->root, FALSE);
     $listing->setProfileDirectories(['core/profiles/testing']);
     $files = $listing->scan('module');
diff --git a/core/modules/system/tests/src/Kernel/Common/UrlTest.php b/core/modules/system/tests/src/Kernel/Common/UrlTest.php
index 291ea6e3a396..43644fac54a1 100644
--- a/core/modules/system/tests/src/Kernel/Common/UrlTest.php
+++ b/core/modules/system/tests/src/Kernel/Common/UrlTest.php
@@ -27,7 +27,7 @@ class UrlTest extends KernelTestBase {
   /**
    * Confirms that invalid URLs are filtered in link generating functions.
    */
-  public function testLinkXSS() {
+  public function testLinkXSS(): void {
     // Test link generator.
     $text = $this->randomMachineName();
     $path = "<SCRIPT>alert('XSS')</SCRIPT>";
@@ -46,7 +46,7 @@ public function testLinkXSS() {
   /**
    * Tests that #type=link bubbles outbound route/path processors' metadata.
    */
-  public function testLinkBubbleableMetadata() {
+  public function testLinkBubbleableMetadata(): void {
     \Drupal::service('module_installer')->install(['user']);
 
     $cases = [
@@ -76,7 +76,7 @@ public function testLinkBubbleableMetadata() {
   /**
    * Tests that default and custom attributes are handled correctly on links.
    */
-  public function testLinkAttributes() {
+  public function testLinkAttributes(): void {
     /** @var \Drupal\Core\Render\RendererInterface $renderer */
     $renderer = $this->container->get('renderer');
 
@@ -129,7 +129,7 @@ public function testLinkAttributes() {
   /**
    * Tests that link functions support render arrays as 'text'.
    */
-  public function testLinkRenderArrayText() {
+  public function testLinkRenderArrayText(): void {
     /** @var \Drupal\Core\Render\RendererInterface $renderer */
     $renderer = $this->container->get('renderer');
 
@@ -182,7 +182,7 @@ private function hasAttribute($attribute, $link, $class) {
   /**
    * Tests UrlHelper::filterQueryParameters().
    */
-  public function testDrupalGetQueryParameters() {
+  public function testDrupalGetQueryParameters(): void {
     $original = [
       'a' => 1,
       'b' => [
@@ -218,7 +218,7 @@ public function testDrupalGetQueryParameters() {
   /**
    * Tests UrlHelper::parse().
    */
-  public function testDrupalParseUrl() {
+  public function testDrupalParseUrl(): void {
     // Relative, absolute, and external URLs, without/with explicit script path,
     // without/with Drupal path.
     foreach (['', '/', 'https://www.drupal.org/'] as $absolute) {
@@ -256,7 +256,7 @@ public function testDrupalParseUrl() {
   /**
    * Tests external URL handling.
    */
-  public function testExternalUrls() {
+  public function testExternalUrls(): void {
     $test_url = 'https://www.drupal.org/';
 
     // Verify external URL can contain a fragment.
diff --git a/core/modules/system/tests/src/Kernel/DateFormatAccessControlHandlerTest.php b/core/modules/system/tests/src/Kernel/DateFormatAccessControlHandlerTest.php
index 2259e64b8e67..d737fe010175 100644
--- a/core/modules/system/tests/src/Kernel/DateFormatAccessControlHandlerTest.php
+++ b/core/modules/system/tests/src/Kernel/DateFormatAccessControlHandlerTest.php
@@ -53,7 +53,7 @@ protected function setUp(): void {
    * @covers ::checkCreateAccess
    * @dataProvider testAccessProvider
    */
-  public function testAccess($permissions, $which_entity, $view_label_access_result, $view_access_result, $update_access_result, $delete_access_result, $create_access_result) {
+  public function testAccess($permissions, $which_entity, $view_label_access_result, $view_access_result, $update_access_result, $delete_access_result, $create_access_result): void {
 
     $user = $this->drupalCreateUser($permissions);
 
diff --git a/core/modules/system/tests/src/Kernel/DecoratedServiceTest.php b/core/modules/system/tests/src/Kernel/DecoratedServiceTest.php
index fbff3b83a0e9..6df2d23e5223 100644
--- a/core/modules/system/tests/src/Kernel/DecoratedServiceTest.php
+++ b/core/modules/system/tests/src/Kernel/DecoratedServiceTest.php
@@ -22,7 +22,7 @@ class DecoratedServiceTest extends KernelTestBase {
   /**
    * Check that decorated services keep their original service ID.
    */
-  public function testDecoratedServiceId() {
+  public function testDecoratedServiceId(): void {
     // Service decorated once.
     $test_service = $this->container->get('test_service');
     $this->assertEquals('test_service', $this->container->get(ReverseContainer::class)->getId($test_service));
diff --git a/core/modules/system/tests/src/Kernel/Entity/ConfigEntityImportTest.php b/core/modules/system/tests/src/Kernel/Entity/ConfigEntityImportTest.php
index 7666503a81a0..d3405e5279a5 100644
--- a/core/modules/system/tests/src/Kernel/Entity/ConfigEntityImportTest.php
+++ b/core/modules/system/tests/src/Kernel/Entity/ConfigEntityImportTest.php
@@ -38,7 +38,7 @@ class ConfigEntityImportTest extends KernelTestBase {
   /**
    * Runs test methods for each module within a single test run.
    */
-  public function testConfigUpdateImport() {
+  public function testConfigUpdateImport(): void {
     $this->installConfig(['block', 'filter', 'image']);
     $this->container->get('theme_installer')->install(['olivero']);
     $config_storage = $this->container->get('config.storage');
diff --git a/core/modules/system/tests/src/Kernel/Entity/EntityLabelTest.php b/core/modules/system/tests/src/Kernel/Entity/EntityLabelTest.php
index e3f84c1ee82a..3f29865ac954 100644
--- a/core/modules/system/tests/src/Kernel/Entity/EntityLabelTest.php
+++ b/core/modules/system/tests/src/Kernel/Entity/EntityLabelTest.php
@@ -17,7 +17,7 @@ class EntityLabelTest extends KernelTestBase {
   /**
    * Tests that entity type labels use sentence-case.
    */
-  public function testEntityLabelCasing() {
+  public function testEntityLabelCasing(): void {
     $base_directory = $this->root . '/core/modules/';
     $modules = scandir($base_directory);
     $paths = [];
diff --git a/core/modules/system/tests/src/Kernel/Entity/EntityReferenceSelectionReferenceableTest.php b/core/modules/system/tests/src/Kernel/Entity/EntityReferenceSelectionReferenceableTest.php
index b8ef9a7c43c4..de8f1b0ac69f 100644
--- a/core/modules/system/tests/src/Kernel/Entity/EntityReferenceSelectionReferenceableTest.php
+++ b/core/modules/system/tests/src/Kernel/Entity/EntityReferenceSelectionReferenceableTest.php
@@ -113,7 +113,7 @@ protected function setUp(): void {
    *
    * @dataProvider providerTestCases
    */
-  public function testReferenceablesWithNoLabelKey($match, $match_operator, $limit, $count_limited, array $items, $count_all) {
+  public function testReferenceablesWithNoLabelKey($match, $match_operator, $limit, $count_limited, array $items, $count_all): void {
     // Test ::getReferenceableEntities().
     $referenceables = $this->selectionHandler->getReferenceableEntities($match, $match_operator, $limit);
 
diff --git a/core/modules/system/tests/src/Kernel/Extension/ModuleHandlerTest.php b/core/modules/system/tests/src/Kernel/Extension/ModuleHandlerTest.php
index 864c9a1a7a2c..53f9b662fb9f 100644
--- a/core/modules/system/tests/src/Kernel/Extension/ModuleHandlerTest.php
+++ b/core/modules/system/tests/src/Kernel/Extension/ModuleHandlerTest.php
@@ -26,7 +26,7 @@ class ModuleHandlerTest extends KernelTestBase {
   /**
    * The basic functionality of retrieving enabled modules.
    */
-  public function testModuleList() {
+  public function testModuleList(): void {
     $module_list = ['system'];
     $database_module = \Drupal::database()->getProvider();
     if ($database_module !== 'core') {
@@ -87,7 +87,7 @@ protected function assertModuleList(array $expected_values, string $condition):
    * @see module_test_system_info_alter()
    * @see https://www.drupal.org/files/issues/dep.gv__0.png
    */
-  public function testDependencyResolution() {
+  public function testDependencyResolution(): void {
     $this->enableModules(['module_test']);
     $this->assertTrue($this->moduleHandler()->moduleExists('module_test'), 'Test module is enabled.');
 
@@ -167,7 +167,7 @@ public function testDependencyResolution() {
   /**
    * Tests uninstalling a module installed by a profile.
    */
-  public function testUninstallProfileDependency() {
+  public function testUninstallProfileDependency(): void {
     $profile = 'testing_install_profile_dependencies';
     $dependency = 'dblog';
     $non_dependency = 'ban';
@@ -227,7 +227,7 @@ public function testUninstallProfileDependency() {
   /**
    * Tests that a profile can supply only real dependencies.
    */
-  public function testProfileAllDependencies() {
+  public function testProfileAllDependencies(): void {
     $profile = 'testing_install_profile_all_dependencies';
     $dependencies = ['dblog', 'ban'];
     $this->setInstallProfile($profile);
@@ -260,7 +260,7 @@ public function testProfileAllDependencies() {
   /**
    * Tests uninstalling a module that has content.
    */
-  public function testUninstallContentDependency() {
+  public function testUninstallContentDependency(): void {
     $this->enableModules(['module_test', 'entity_test', 'text', 'user', 'help']);
     $this->assertTrue($this->moduleHandler()->moduleExists('entity_test'), 'Test module is enabled.');
     $this->assertTrue($this->moduleHandler()->moduleExists('module_test'), 'Test module is enabled.');
@@ -315,7 +315,7 @@ public function testUninstallContentDependency() {
   /**
    * Tests whether the correct module metadata is returned.
    */
-  public function testModuleMetaData() {
+  public function testModuleMetaData(): void {
     // Generate the list of available modules.
     $modules = $this->container->get('extension.list.module')->getList();
     // Check that the mtime field exists for the system module.
@@ -330,7 +330,7 @@ public function testModuleMetaData() {
   /**
    * Tests whether module-provided stream wrappers are registered properly.
    */
-  public function testModuleStreamWrappers() {
+  public function testModuleStreamWrappers(): void {
     // file_test.module provides (among others) a 'dummy' stream wrapper.
     // Verify that it is not registered yet to prevent false positives.
     $stream_wrappers = \Drupal::service('stream_wrapper_manager')->getWrappers();
@@ -349,7 +349,7 @@ public function testModuleStreamWrappers() {
   /**
    * Tests whether the correct theme metadata is returned.
    */
-  public function testThemeMetaData() {
+  public function testThemeMetaData(): void {
     // Generate the list of available themes.
     $themes = \Drupal::service('extension.list.theme')->reset()->getList();
     // Check that the mtime field exists for the olivero theme.
diff --git a/core/modules/system/tests/src/Kernel/Form/ElementsFieldsetTest.php b/core/modules/system/tests/src/Kernel/Form/ElementsFieldsetTest.php
index 5de078c15fe0..732268ccb9d2 100644
--- a/core/modules/system/tests/src/Kernel/Form/ElementsFieldsetTest.php
+++ b/core/modules/system/tests/src/Kernel/Form/ElementsFieldsetTest.php
@@ -111,7 +111,7 @@ public function validateForm(array &$form, FormStateInterface $form_state) {}
   /**
    * Tests different display options for fieldset element descriptions.
    */
-  public function testFieldsetDescriptions() {
+  public function testFieldsetDescriptions(): void {
     $form_state = new FormState();
     $form = \Drupal::formBuilder()->getForm($this);
     $this->render($form);
diff --git a/core/modules/system/tests/src/Kernel/Form/FileElementTest.php b/core/modules/system/tests/src/Kernel/Form/FileElementTest.php
index 522c03fec02a..b4b16f9f3e25 100644
--- a/core/modules/system/tests/src/Kernel/Form/FileElementTest.php
+++ b/core/modules/system/tests/src/Kernel/Form/FileElementTest.php
@@ -22,7 +22,7 @@ class FileElementTest extends KernelTestBase {
   /**
    * Tests that file elements are built and processed correctly.
    */
-  public function testFileElement() {
+  public function testFileElement(): void {
     $form = $this->container->get('form_builder')
       ->getForm(FormTestFileForm::class);
 
diff --git a/core/modules/system/tests/src/Kernel/Form/FormElementLabelTest.php b/core/modules/system/tests/src/Kernel/Form/FormElementLabelTest.php
index 56315d685c4c..e8f3d1f68f80 100644
--- a/core/modules/system/tests/src/Kernel/Form/FormElementLabelTest.php
+++ b/core/modules/system/tests/src/Kernel/Form/FormElementLabelTest.php
@@ -22,7 +22,7 @@ class FormElementLabelTest extends KernelTestBase {
   /**
    * Ensures that attributes can be placed for form element label.
    */
-  public function testAttributes() {
+  public function testAttributes(): void {
     $render_array = [
       '#type' => 'label',
       '#attributes' => ['class' => ['kitten']],
diff --git a/core/modules/system/tests/src/Kernel/Form/FormElementMaxlengthTest.php b/core/modules/system/tests/src/Kernel/Form/FormElementMaxlengthTest.php
index 95e6ceec9482..ef0fcea6fed5 100644
--- a/core/modules/system/tests/src/Kernel/Form/FormElementMaxlengthTest.php
+++ b/core/modules/system/tests/src/Kernel/Form/FormElementMaxlengthTest.php
@@ -64,7 +64,7 @@ public function validateForm(array &$form, FormStateInterface $form_state) {}
   /**
    * Ensures maxlength attribute can be used in compatible elements.
    */
-  public function testAttributes() {
+  public function testAttributes(): void {
 
     /** @var \Drupal\Core\Form\FormBuilderInterface $form_builder */
     $form_builder = $this->container->get('form_builder');
diff --git a/core/modules/system/tests/src/Kernel/Form/ProgrammaticTest.php b/core/modules/system/tests/src/Kernel/Form/ProgrammaticTest.php
index dcda4519e107..a203f0fbf9ce 100644
--- a/core/modules/system/tests/src/Kernel/Form/ProgrammaticTest.php
+++ b/core/modules/system/tests/src/Kernel/Form/ProgrammaticTest.php
@@ -24,7 +24,7 @@ class ProgrammaticTest extends KernelTestBase {
   /**
    * Tests the programmatic form submission workflow.
    */
-  public function testSubmissionWorkflow() {
+  public function testSubmissionWorkflow(): void {
     // Backup the current batch status and reset it to avoid conflicts while
     // processing the dummy form submit handler.
     $current_batch = $batch =& batch_get();
@@ -91,7 +91,7 @@ protected function doSubmitForm($values, $valid_input) {
   /**
    * Tests the programmed_bypass_access_check flag.
    */
-  public function testProgrammaticAccessBypass() {
+  public function testProgrammaticAccessBypass(): void {
     $form_state = (new FormState())->setValues([
       'textfield' => 'dummy value',
       'field_restricted' => 'dummy value',
diff --git a/core/modules/system/tests/src/Kernel/Installer/InstallTranslationFilePatternTest.php b/core/modules/system/tests/src/Kernel/Installer/InstallTranslationFilePatternTest.php
index 9ac46ee2a2b7..619f7744ec1b 100644
--- a/core/modules/system/tests/src/Kernel/Installer/InstallTranslationFilePatternTest.php
+++ b/core/modules/system/tests/src/Kernel/Installer/InstallTranslationFilePatternTest.php
@@ -42,7 +42,7 @@ protected function setUp(): void {
   /**
    * @dataProvider providerValidTranslationFiles
    */
-  public function testFilesPatternValid($langcode, $filename) {
+  public function testFilesPatternValid($langcode, $filename): void {
     $pattern = $this->filePatternMethod->invoke($this->fileTranslation, $langcode);
     $this->assertNotEmpty(preg_match($pattern, $filename));
   }
@@ -61,7 +61,7 @@ public static function providerValidTranslationFiles() {
   /**
    * @dataProvider providerInvalidTranslationFiles
    */
-  public function testFilesPatternInvalid($langcode, $filename) {
+  public function testFilesPatternInvalid($langcode, $filename): void {
     $pattern = $this->filePatternMethod->invoke($this->fileTranslation, $langcode);
     $this->assertEmpty(preg_match($pattern, $filename));
   }
diff --git a/core/modules/system/tests/src/Kernel/Installer/InstallerDependenciesResolutionTest.php b/core/modules/system/tests/src/Kernel/Installer/InstallerDependenciesResolutionTest.php
index 97dd7a683e04..8f385c45e485 100644
--- a/core/modules/system/tests/src/Kernel/Installer/InstallerDependenciesResolutionTest.php
+++ b/core/modules/system/tests/src/Kernel/Installer/InstallerDependenciesResolutionTest.php
@@ -22,7 +22,7 @@ class InstallerDependenciesResolutionTest extends KernelTestBase {
   /**
    * Verifies that the exception message in the profile step is correct.
    */
-  public function testDependenciesResolution() {
+  public function testDependenciesResolution(): void {
     // Prime the \Drupal\Core\Extension\ExtensionList::getPathname static cache
     // with the location of the testing profile as it is not the currently
     // active profile and we don't yet have any cached way to retrieve its
diff --git a/core/modules/system/tests/src/Kernel/Installer/UninstallKernelTest.php b/core/modules/system/tests/src/Kernel/Installer/UninstallKernelTest.php
index 38b860e6e183..37b4911a5696 100644
--- a/core/modules/system/tests/src/Kernel/Installer/UninstallKernelTest.php
+++ b/core/modules/system/tests/src/Kernel/Installer/UninstallKernelTest.php
@@ -43,7 +43,7 @@ protected function setUp(): void {
   /**
    * Tests uninstalling media and file modules.
    */
-  public function testUninstallMedia() {
+  public function testUninstallMedia(): void {
     // Media creates a file field that is removed on uninstall, ensure that it
     // is fully deleted (as it is empty) and that file then can be uninstalled
     // as well.
@@ -54,7 +54,7 @@ public function testUninstallMedia() {
   /**
    * Tests uninstalling a module with a plugin cache clearer service.
    */
-  public function testUninstallPluginCacheClear() {
+  public function testUninstallPluginCacheClear(): void {
     \Drupal::service('module_installer')->install(['module_test']);
     $this->assertFalse($this->container->get('state')->get(PluginManagerCacheClearer::class));
     \Drupal::service('module_installer')->install(['dblog']);
diff --git a/core/modules/system/tests/src/Kernel/Mail/MailTest.php b/core/modules/system/tests/src/Kernel/Mail/MailTest.php
index e688d3fe4b20..5e6f1d2f519e 100644
--- a/core/modules/system/tests/src/Kernel/Mail/MailTest.php
+++ b/core/modules/system/tests/src/Kernel/Mail/MailTest.php
@@ -56,7 +56,7 @@ protected function setUp(): void {
   /**
    * Assert that the pluggable mail system is functional.
    */
-  public function testPluggableFramework() {
+  public function testPluggableFramework(): void {
     // Switch mail backends.
     $this->configureDefaultMailInterface('test_php_mail_failure');
 
@@ -83,7 +83,7 @@ public function testPluggableFramework() {
   /**
    * Assert that the pluggable mail system is functional.
    */
-  public function testErrorMessageDisplay() {
+  public function testErrorMessageDisplay(): void {
     // Switch mail backends.
     $this->configureDefaultMailInterface('test_php_mail_failure');
 
@@ -103,7 +103,7 @@ public function testErrorMessageDisplay() {
    *
    * @see mail_cancel_test_mail_alter()
    */
-  public function testCancelMessage() {
+  public function testCancelMessage(): void {
     $language_interface = \Drupal::languageManager()->getCurrentLanguage();
 
     // Reset the state variable that holds sent messages.
@@ -123,7 +123,7 @@ public function testCancelMessage() {
   /**
    * Checks the From: and Reply-to: headers.
    */
-  public function testFromAndReplyToHeader() {
+  public function testFromAndReplyToHeader(): void {
     $language = \Drupal::languageManager()->getCurrentLanguage();
 
     // Reset the state variable that holds sent messages.
@@ -200,7 +200,7 @@ public function testFromAndReplyToHeader() {
   /**
    * Checks that relative paths in mails are converted into absolute URLs.
    */
-  public function testConvertRelativeUrlsIntoAbsolute() {
+  public function testConvertRelativeUrlsIntoAbsolute(): void {
     $language_interface = \Drupal::languageManager()->getCurrentLanguage();
 
     $this->configureDefaultMailInterface('test_html_mail_collector');
@@ -287,7 +287,7 @@ public function testConvertRelativeUrlsIntoAbsolute() {
    * By default Drupal uses relative paths for images and links. When sending
    * emails, absolute paths should be used instead.
    */
-  public function testRenderedElementsUseAbsolutePaths() {
+  public function testRenderedElementsUseAbsolutePaths(): void {
     $language_interface = \Drupal::languageManager()->getCurrentLanguage();
 
     $this->configureDefaultMailInterface('test_html_mail_collector');
diff --git a/core/modules/system/tests/src/Kernel/Menu/MenuStorageTest.php b/core/modules/system/tests/src/Kernel/Menu/MenuStorageTest.php
index b22983494fd1..2d08283eb138 100644
--- a/core/modules/system/tests/src/Kernel/Menu/MenuStorageTest.php
+++ b/core/modules/system/tests/src/Kernel/Menu/MenuStorageTest.php
@@ -26,7 +26,7 @@ class MenuStorageTest extends KernelTestBase {
   /**
    * Tests MenuStorage::MAX_ID_LENGTH is enforced.
    */
-  public function testMaxIdLengthException() {
+  public function testMaxIdLengthException(): void {
     $id = $this->randomMachineName(MenuStorage::MAX_ID_LENGTH + 1);
     $this->expectException(ConfigEntityIdLengthException::class);
     $this->expectExceptionMessage(
diff --git a/core/modules/system/tests/src/Kernel/MenuAccessControlHandlerTest.php b/core/modules/system/tests/src/Kernel/MenuAccessControlHandlerTest.php
index e423f3ae220b..797d97daeee7 100644
--- a/core/modules/system/tests/src/Kernel/MenuAccessControlHandlerTest.php
+++ b/core/modules/system/tests/src/Kernel/MenuAccessControlHandlerTest.php
@@ -50,7 +50,7 @@ protected function setUp(): void {
    * @covers ::checkCreateAccess
    * @dataProvider testAccessProvider
    */
-  public function testAccess($permissions, $which_entity, $view_label_access_result, $view_access_result, $update_access_result, $delete_access_result, $create_access_result) {
+  public function testAccess($permissions, $which_entity, $view_label_access_result, $view_access_result, $update_access_result, $delete_access_result, $create_access_result): void {
     $user = $this->drupalCreateUser($permissions);
 
     $entity_values = ($which_entity === 'unlocked')
diff --git a/core/modules/system/tests/src/Kernel/Migrate/d6/MigrateActionConfigsTest.php b/core/modules/system/tests/src/Kernel/Migrate/d6/MigrateActionConfigsTest.php
index 29f69ddbd407..f8d51c467884 100644
--- a/core/modules/system/tests/src/Kernel/Migrate/d6/MigrateActionConfigsTest.php
+++ b/core/modules/system/tests/src/Kernel/Migrate/d6/MigrateActionConfigsTest.php
@@ -27,7 +27,7 @@ protected function setUp(): void {
   /**
    * Tests migration of action variables to null.
    */
-  public function testActionSettings() {
+  public function testActionSettings(): void {
     $config = $this->config('action.settings');
     $this->assertTrue($config->isNew());
   }
diff --git a/core/modules/system/tests/src/Kernel/Migrate/d6/MigrateActionsTest.php b/core/modules/system/tests/src/Kernel/Migrate/d6/MigrateActionsTest.php
index a43cb560c33d..262d3589a414 100644
--- a/core/modules/system/tests/src/Kernel/Migrate/d6/MigrateActionsTest.php
+++ b/core/modules/system/tests/src/Kernel/Migrate/d6/MigrateActionsTest.php
@@ -27,7 +27,7 @@ protected function setUp(): void {
   /**
    * Tests Drupal 6 action migration to Drupal 8.
    */
-  public function testActions() {
+  public function testActions(): void {
     // Test default actions.
     $this->assertEntity('node_publish_action', 'Publish post', 'node', []);
     $this->assertEntity('node_make_sticky_action', 'Make post sticky', 'node', []);
diff --git a/core/modules/system/tests/src/Kernel/Migrate/d6/MigrateDateFormatTest.php b/core/modules/system/tests/src/Kernel/Migrate/d6/MigrateDateFormatTest.php
index 269ee177ce81..0e9a469c2a86 100644
--- a/core/modules/system/tests/src/Kernel/Migrate/d6/MigrateDateFormatTest.php
+++ b/core/modules/system/tests/src/Kernel/Migrate/d6/MigrateDateFormatTest.php
@@ -26,7 +26,7 @@ protected function setUp(): void {
   /**
    * Tests the Drupal 6 date formats to Drupal 8 migration.
    */
-  public function testDateFormats() {
+  public function testDateFormats(): void {
     $short_date_format = DateFormat::load('short');
     $this->assertSame('\S\H\O\R\T m/d/Y - H:i', $short_date_format->getPattern());
 
diff --git a/core/modules/system/tests/src/Kernel/Migrate/d6/MigrateMenuTest.php b/core/modules/system/tests/src/Kernel/Migrate/d6/MigrateMenuTest.php
index d86fbdd48519..322ae15ccd87 100644
--- a/core/modules/system/tests/src/Kernel/Migrate/d6/MigrateMenuTest.php
+++ b/core/modules/system/tests/src/Kernel/Migrate/d6/MigrateMenuTest.php
@@ -26,7 +26,7 @@ protected function setUp(): void {
   /**
    * Tests the Drupal 6 menu to Drupal 8 migration.
    */
-  public function testMenu() {
+  public function testMenu(): void {
     $navigation_menu = Menu::load('navigation');
     $this->assertSame('navigation', $navigation_menu->id());
     $this->assertSame('Navigation', $navigation_menu->label());
diff --git a/core/modules/system/tests/src/Kernel/Migrate/d6/MigrateSystemConfigurationTest.php b/core/modules/system/tests/src/Kernel/Migrate/d6/MigrateSystemConfigurationTest.php
index cc6f23723168..093504e218e8 100644
--- a/core/modules/system/tests/src/Kernel/Migrate/d6/MigrateSystemConfigurationTest.php
+++ b/core/modules/system/tests/src/Kernel/Migrate/d6/MigrateSystemConfigurationTest.php
@@ -145,7 +145,7 @@ protected function setUp(): void {
   /**
    * Tests that all expected configuration gets migrated.
    */
-  public function testConfigurationMigration() {
+  public function testConfigurationMigration(): void {
     foreach ($this->expectedConfig as $config_id => $values) {
       $actual = \Drupal::config($config_id)->get();
       unset($actual['_core']);
diff --git a/core/modules/system/tests/src/Kernel/Migrate/d7/MigrateActionConfigsTest.php b/core/modules/system/tests/src/Kernel/Migrate/d7/MigrateActionConfigsTest.php
index c6f85d1ab709..53b53ffdab9c 100644
--- a/core/modules/system/tests/src/Kernel/Migrate/d7/MigrateActionConfigsTest.php
+++ b/core/modules/system/tests/src/Kernel/Migrate/d7/MigrateActionConfigsTest.php
@@ -27,7 +27,7 @@ protected function setUp(): void {
   /**
    * Tests migration of action variables to null.
    */
-  public function testActionSettings() {
+  public function testActionSettings(): void {
     $config = $this->config('action.settings');
     $this->assertTrue($config->isNew());
   }
diff --git a/core/modules/system/tests/src/Kernel/Migrate/d7/MigrateActionsTest.php b/core/modules/system/tests/src/Kernel/Migrate/d7/MigrateActionsTest.php
index b2ea8fe1c96c..60dda796a078 100644
--- a/core/modules/system/tests/src/Kernel/Migrate/d7/MigrateActionsTest.php
+++ b/core/modules/system/tests/src/Kernel/Migrate/d7/MigrateActionsTest.php
@@ -27,7 +27,7 @@ protected function setUp(): void {
   /**
    * Tests Drupal 7 action migration to Drupal 8.
    */
-  public function testActions() {
+  public function testActions(): void {
     // Test default actions.
     $this->assertEntity('node_publish_action', 'Publish content', 'node', []);
     $this->assertEntity('node_make_sticky_action', 'Make content sticky', 'node', []);
diff --git a/core/modules/system/tests/src/Kernel/Migrate/d7/MigrateGlobalThemeSettingsTest.php b/core/modules/system/tests/src/Kernel/Migrate/d7/MigrateGlobalThemeSettingsTest.php
index 22cd7319c95c..04faddb611bf 100644
--- a/core/modules/system/tests/src/Kernel/Migrate/d7/MigrateGlobalThemeSettingsTest.php
+++ b/core/modules/system/tests/src/Kernel/Migrate/d7/MigrateGlobalThemeSettingsTest.php
@@ -29,7 +29,7 @@ protected function setUp(): void {
   /**
    * Tests migration of global theme settings to configuration.
    */
-  public function testMigrateThemeSettings() {
+  public function testMigrateThemeSettings(): void {
     $config = $this->config('system.theme.global');
 
     $this->assertSame('image/png', $config->get('favicon.mimetype'));
diff --git a/core/modules/system/tests/src/Kernel/Migrate/d7/MigrateMenuTest.php b/core/modules/system/tests/src/Kernel/Migrate/d7/MigrateMenuTest.php
index 8f013bb2216e..2fa4229480a7 100644
--- a/core/modules/system/tests/src/Kernel/Migrate/d7/MigrateMenuTest.php
+++ b/core/modules/system/tests/src/Kernel/Migrate/d7/MigrateMenuTest.php
@@ -48,7 +48,7 @@ protected function assertEntity(string $id, string $language, string $label, str
   /**
    * Tests the Drupal 7 menu to Drupal 8 migration.
    */
-  public function testMenu() {
+  public function testMenu(): void {
     $this->assertEntity('main', 'und', 'Main menu', 'The <em>Main</em> menu is used on many sites to show the major sections of the site, often in a top navigation bar.');
     $this->assertEntity('admin', 'und', 'Management', 'The <em>Management</em> menu contains links for administrative tasks.');
     $this->assertEntity('menu-test-menu', 'und', 'Test Menu', 'Test menu description.');
diff --git a/core/modules/system/tests/src/Kernel/Migrate/d7/MigrateMenuTranslationTest.php b/core/modules/system/tests/src/Kernel/Migrate/d7/MigrateMenuTranslationTest.php
index 29576a362334..e9502ea93c00 100644
--- a/core/modules/system/tests/src/Kernel/Migrate/d7/MigrateMenuTranslationTest.php
+++ b/core/modules/system/tests/src/Kernel/Migrate/d7/MigrateMenuTranslationTest.php
@@ -41,7 +41,7 @@ protected function setUp(): void {
   /**
    * Tests migration of menu translations.
    */
-  public function testMenuTranslation() {
+  public function testMenuTranslation(): void {
     $language_manager = \Drupal::service('language_manager');
 
     $config_translation = $language_manager->getLanguageConfigOverride('is', 'system.menu.main');
diff --git a/core/modules/system/tests/src/Kernel/Migrate/d7/MigrateSystemConfigurationTest.php b/core/modules/system/tests/src/Kernel/Migrate/d7/MigrateSystemConfigurationTest.php
index 065dd471fcb9..cfc950e81bf0 100644
--- a/core/modules/system/tests/src/Kernel/Migrate/d7/MigrateSystemConfigurationTest.php
+++ b/core/modules/system/tests/src/Kernel/Migrate/d7/MigrateSystemConfigurationTest.php
@@ -177,7 +177,7 @@ protected function setUp(): void {
   /**
    * Tests that all expected configuration gets migrated.
    */
-  public function testConfigurationMigration() {
+  public function testConfigurationMigration(): void {
     foreach ($this->expectedConfig as $config_id => $values) {
       if ($config_id == 'system.mail') {
         $actual = \Drupal::config($config_id)->getRawData();
diff --git a/core/modules/system/tests/src/Kernel/Migrate/d7/MigrateThemeSettingsTest.php b/core/modules/system/tests/src/Kernel/Migrate/d7/MigrateThemeSettingsTest.php
index 9cc874fe51cb..4a8d49955a04 100644
--- a/core/modules/system/tests/src/Kernel/Migrate/d7/MigrateThemeSettingsTest.php
+++ b/core/modules/system/tests/src/Kernel/Migrate/d7/MigrateThemeSettingsTest.php
@@ -27,7 +27,7 @@ protected function setUp(): void {
   /**
    * Tests migration of theme settings to variables to configuration.
    */
-  public function testMigrateThemeSettings() {
+  public function testMigrateThemeSettings(): void {
     $config = $this->config('olivero.settings');
 
     $this->assertSame('', $config->get('favicon.path'));
diff --git a/core/modules/system/tests/src/Kernel/Module/InstallTest.php b/core/modules/system/tests/src/Kernel/Module/InstallTest.php
index 6f392e436635..dc95d49e1a3f 100644
--- a/core/modules/system/tests/src/Kernel/Module/InstallTest.php
+++ b/core/modules/system/tests/src/Kernel/Module/InstallTest.php
@@ -125,7 +125,7 @@ public function testModuleNameLengthWithoutDependencyCheck(): void {
   /**
    * Tests installing a module with the same name as an enabled theme.
    */
-  public function testInstallModuleSameNameAsTheme() {
+  public function testInstallModuleSameNameAsTheme(): void {
     $name = 'name_collision_test';
 
     // Install and uninstall the module.
diff --git a/core/modules/system/tests/src/Kernel/PermissionsTest.php b/core/modules/system/tests/src/Kernel/PermissionsTest.php
index 2470665d2ffa..5f03065ecabf 100644
--- a/core/modules/system/tests/src/Kernel/PermissionsTest.php
+++ b/core/modules/system/tests/src/Kernel/PermissionsTest.php
@@ -22,7 +22,7 @@ class PermissionsTest extends KernelTestBase {
   /**
    * Tests the 'access content' permission is provided by the System module.
    */
-  public function testAccessContentPermission() {
+  public function testAccessContentPermission(): void {
     // Uninstalling modules requires the users_data table to exist.
     $this->installSchema('user', ['users_data']);
 
diff --git a/core/modules/system/tests/src/Kernel/PhpStorage/PhpStorageFactoryTest.php b/core/modules/system/tests/src/Kernel/PhpStorage/PhpStorageFactoryTest.php
index 57db17ac2343..219ded03f300 100644
--- a/core/modules/system/tests/src/Kernel/PhpStorage/PhpStorageFactoryTest.php
+++ b/core/modules/system/tests/src/Kernel/PhpStorage/PhpStorageFactoryTest.php
@@ -34,7 +34,7 @@ protected function setUp(): void {
   /**
    * Tests the get() method with no settings.
    */
-  public function testGetNoSettings() {
+  public function testGetNoSettings(): void {
     $php = PhpStorageFactory::get('test');
     // This should be the default class used.
     $this->assertInstanceOf(MTimeProtectedFileStorage::class, $php);
@@ -43,7 +43,7 @@ public function testGetNoSettings() {
   /**
    * Tests the get() method using the 'default' settings.
    */
-  public function testGetDefault() {
+  public function testGetDefault(): void {
     $this->setSettings();
     $php = PhpStorageFactory::get('test');
     $this->assertInstanceOf(MockPhpStorage::class, $php);
@@ -52,7 +52,7 @@ public function testGetDefault() {
   /**
    * Tests the get() method with overridden settings.
    */
-  public function testGetOverride() {
+  public function testGetOverride(): void {
     $this->setSettings('test');
     $php = PhpStorageFactory::get('test');
     // The FileReadOnlyStorage should be used from settings.
diff --git a/core/modules/system/tests/src/Kernel/Scripts/DbCommandBaseTest.php b/core/modules/system/tests/src/Kernel/Scripts/DbCommandBaseTest.php
index f0068998b857..8856055b8ce5 100644
--- a/core/modules/system/tests/src/Kernel/Scripts/DbCommandBaseTest.php
+++ b/core/modules/system/tests/src/Kernel/Scripts/DbCommandBaseTest.php
@@ -25,7 +25,7 @@ class DbCommandBaseTest extends KernelTestBase {
   /**
    * Tests specifying a database key.
    */
-  public function testSpecifyDatabaseKey() {
+  public function testSpecifyDatabaseKey(): void {
     $command = new DbCommandBaseTester();
     $command_tester = new CommandTester($command);
 
@@ -41,7 +41,7 @@ public function testSpecifyDatabaseKey() {
   /**
    * Invalid database names will throw a useful exception.
    */
-  public function testSpecifyDatabaseDoesNotExist() {
+  public function testSpecifyDatabaseDoesNotExist(): void {
     $command = new DbCommandBaseTester();
     $command_tester = new CommandTester($command);
     $command_tester->execute([
@@ -54,7 +54,7 @@ public function testSpecifyDatabaseDoesNotExist() {
   /**
    * Tests supplying database connection as a URL.
    */
-  public function testSpecifyDbUrl() {
+  public function testSpecifyDbUrl(): void {
     $command = new DbCommandBaseTester();
     $command_tester = new CommandTester($command);
     $command_tester->execute([
@@ -72,7 +72,7 @@ public function testSpecifyDbUrl() {
   /**
    * Tests specifying a prefix for different connections.
    */
-  public function testPrefix() {
+  public function testPrefix(): void {
     if (Database::getConnection()->driver() == 'sqlite') {
       $this->markTestSkipped('SQLITE modifies the prefixes so we cannot effectively test it');
     }
diff --git a/core/modules/system/tests/src/Kernel/Scripts/DbImportCommandTest.php b/core/modules/system/tests/src/Kernel/Scripts/DbImportCommandTest.php
index ce226ffe6bd4..4f158bbc9a76 100644
--- a/core/modules/system/tests/src/Kernel/Scripts/DbImportCommandTest.php
+++ b/core/modules/system/tests/src/Kernel/Scripts/DbImportCommandTest.php
@@ -61,7 +61,7 @@ class DbImportCommandTest extends KernelTestBase {
    *
    * @requires extension pdo_sqlite
    */
-  public function testDbImportCommand() {
+  public function testDbImportCommand(): void {
     $connection_info = [
       'driver' => 'sqlite',
       'database' => ':memory:',
diff --git a/core/modules/system/tests/src/Kernel/Scripts/DbToolsApplicationTest.php b/core/modules/system/tests/src/Kernel/Scripts/DbToolsApplicationTest.php
index 3928ce1fd74e..55d28f4da4a8 100644
--- a/core/modules/system/tests/src/Kernel/Scripts/DbToolsApplicationTest.php
+++ b/core/modules/system/tests/src/Kernel/Scripts/DbToolsApplicationTest.php
@@ -20,7 +20,7 @@ class DbToolsApplicationTest extends KernelTestBase {
   /**
    * Tests that the dump command is correctly registered.
    */
-  public function testDumpCommandRegistration() {
+  public function testDumpCommandRegistration(): void {
     $application = new DbToolsApplication();
     $command = $application->find('dump');
     $this->assertInstanceOf('\Drupal\Core\Command\DbDumpCommand', $command);
@@ -30,7 +30,7 @@ public function testDumpCommandRegistration() {
   /**
    * Tests that the dump command is correctly registered.
    */
-  public function testImportCommandRegistration() {
+  public function testImportCommandRegistration(): void {
     $application = new DbToolsApplication();
     $command = $application->find('import');
     $this->assertInstanceOf('\Drupal\Core\Command\DbImportCommand', $command);
diff --git a/core/modules/system/tests/src/Kernel/System/CronQueueTest.php b/core/modules/system/tests/src/Kernel/System/CronQueueTest.php
index 8b2dca9a2cfa..7190afc2af6c 100644
--- a/core/modules/system/tests/src/Kernel/System/CronQueueTest.php
+++ b/core/modules/system/tests/src/Kernel/System/CronQueueTest.php
@@ -98,7 +98,7 @@ protected function setUp(): void {
   /**
    * Tests that DelayedRequeueException behaves as expected when running cron.
    */
-  public function testDelayException() {
+  public function testDelayException(): void {
     $database = $this->container->get('queue')->get('cron_queue_test_database_delay_exception');
     $memory = $this->container->get('queue')->get('cron_queue_test_memory_delay_exception');
 
@@ -142,7 +142,7 @@ public function testDelayException() {
   /**
    * Tests that leases are expiring correctly, also within the same request.
    */
-  public function testLeaseTime() {
+  public function testLeaseTime(): void {
     $queue = $this->container->get('queue')->get('cron_queue_test_lease_time');
     $queue->createItem([$this->randomMachineName() => $this->randomMachineName()]);
     // Run initial queue job and ensure lease time variable is initialized.
@@ -174,7 +174,7 @@ public function testLeaseTime() {
    *
    * @see \Drupal\cron_queue_test\Plugin\QueueWorker\CronQueueTestException
    */
-  public function testUncaughtExceptions() {
+  public function testUncaughtExceptions(): void {
     $this->logger->log(
       RfcLogLevel::ERROR,
       '%type: @message in %function (line %line of %file).',
diff --git a/core/modules/system/tests/src/Kernel/System/FloodTest.php b/core/modules/system/tests/src/Kernel/System/FloodTest.php
index a4a7f7dc6cb1..cf33695a6a14 100644
--- a/core/modules/system/tests/src/Kernel/System/FloodTest.php
+++ b/core/modules/system/tests/src/Kernel/System/FloodTest.php
@@ -24,7 +24,7 @@ class FloodTest extends KernelTestBase {
   /**
    * Tests flood control mechanism clean-up.
    */
-  public function testCleanUp() {
+  public function testCleanUp(): void {
     $threshold = 1;
     $window_expired = -1;
     $name = 'flood_test_cleanup';
@@ -52,7 +52,7 @@ public function testCleanUp() {
   /**
    * Tests flood control database backend.
    */
-  public function testDatabaseBackend() {
+  public function testDatabaseBackend(): void {
     $threshold = 1;
     $window_expired = -1;
     $name = 'flood_test_cleanup';
@@ -96,7 +96,7 @@ public function floodBackendProvider() :array {
   /**
    * Tests clearByPrefix method on flood backends.
    */
-  public function testClearByPrefix() {
+  public function testClearByPrefix(): void {
     $threshold = 1;
     $window_expired = 3600;
     $identifier = 'prefix-127.0.0.1';
diff --git a/core/modules/system/tests/src/Kernel/System/InfoAlterTest.php b/core/modules/system/tests/src/Kernel/System/InfoAlterTest.php
index 9ea81b23f060..545d15074ab7 100644
--- a/core/modules/system/tests/src/Kernel/System/InfoAlterTest.php
+++ b/core/modules/system/tests/src/Kernel/System/InfoAlterTest.php
@@ -22,7 +22,7 @@ class InfoAlterTest extends KernelTestBase {
    * hook_system_info_alter() is enabled. Also tests if core *_list() functions
    * return freshly altered info.
    */
-  public function testSystemInfoAlter() {
+  public function testSystemInfoAlter(): void {
     \Drupal::state()->set('module_required_test.hook_system_info_alter', TRUE);
     $info = \Drupal::service('extension.list.module')->getList();
     $this->assertFalse(isset($info['node']->info['required']), 'Before the module_required_test is installed the node module is not required.');
diff --git a/core/modules/system/tests/src/Kernel/Theme/FunctionsTest.php b/core/modules/system/tests/src/Kernel/Theme/FunctionsTest.php
index 752ce4435485..e4aa017c732c 100644
--- a/core/modules/system/tests/src/Kernel/Theme/FunctionsTest.php
+++ b/core/modules/system/tests/src/Kernel/Theme/FunctionsTest.php
@@ -40,7 +40,7 @@ protected function setUp(): void {
   /**
    * Tests item-list.html.twig.
    */
-  public function testItemList() {
+  public function testItemList(): void {
     // Verify that empty items produce no output.
     $variables = [];
     $expected = '';
@@ -180,7 +180,7 @@ public function testItemList() {
   /**
    * Tests links.html.twig.
    */
-  public function testLinks() {
+  public function testLinks(): void {
     // Turn off the query for the
     // \Drupal\Core\Utility\LinkGeneratorInterface::generate() method to compare
     // the active link correctly.
@@ -301,7 +301,7 @@ public function testLinks() {
   /**
    * Tests links.html.twig using links with indexed keys.
    */
-  public function testIndexedKeyedLinks() {
+  public function testIndexedKeyedLinks(): void {
     // Turn off the query for the
     // \Drupal\Core\Utility\LinkGeneratorInterface::generate() method to compare
     // the active link correctly.
@@ -424,7 +424,7 @@ public function testIndexedKeyedLinks() {
    *
    * @see \Drupal\Core\Render\Element\Link::preRenderLinks()
    */
-  public function testDrupalPreRenderLinks() {
+  public function testDrupalPreRenderLinks(): void {
     // Define the base array to be rendered, containing a variety of different
     // kinds of links.
     $base_array = [
@@ -519,7 +519,7 @@ public function testDrupalPreRenderLinks() {
   /**
    * Tests theme_image().
    */
-  public function testImage() {
+  public function testImage(): void {
     // Test that data URIs work with theme_image().
     $variables = [];
     $variables['uri'] = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==';
diff --git a/core/modules/system/tests/src/Kernel/Theme/ThemeTest.php b/core/modules/system/tests/src/Kernel/Theme/ThemeTest.php
index 4b4f32b174bf..21bfbe5d43e0 100644
--- a/core/modules/system/tests/src/Kernel/Theme/ThemeTest.php
+++ b/core/modules/system/tests/src/Kernel/Theme/ThemeTest.php
@@ -37,7 +37,7 @@ protected function setUp(): void {
    *   - the render element's #attributes
    *   - any attributes set in the template's preprocessing function
    */
-  public function testAttributeMerging() {
+  public function testAttributeMerging(): void {
     $theme_test_render_element = [
       'elements' => [
         '#attributes' => ['data-foo' => 'bar'],
@@ -52,7 +52,7 @@ public function testAttributeMerging() {
   /**
    * Tests that ThemeManager renders the expected data types.
    */
-  public function testThemeDataTypes() {
+  public function testThemeDataTypes(): void {
     // theme_test_false is an implemented theme hook so \Drupal::theme() service
     // should return a string or an object that implements MarkupInterface,
     // even though the theme function itself can return anything.
@@ -77,7 +77,7 @@ public function testThemeDataTypes() {
   /**
    * Tests function theme_get_suggestions() for SA-CORE-2009-003.
    */
-  public function testThemeSuggestions() {
+  public function testThemeSuggestions(): void {
     // Set the front page as something random otherwise the CLI
     // test runner fails.
     $this->config('system.site')->set('page.front', '/nobody-home')->save();
@@ -104,7 +104,7 @@ public function testThemeSuggestions() {
   /**
    * Tests the listInfo() function.
    */
-  public function testListThemes() {
+  public function testListThemes(): void {
     $this->container->get('theme_installer')->install(['test_subtheme']);
     $theme_handler = $this->container->get('theme_handler');
     $themes = $theme_handler->listInfo();
@@ -129,7 +129,7 @@ public function testListThemes() {
   /**
    * Tests child element rendering for 'render element' theme hooks.
    */
-  public function testDrupalRenderChildren() {
+  public function testDrupalRenderChildren(): void {
     $element = [
       '#theme' => 'theme_test_render_element_children',
       'child' => [
@@ -150,7 +150,7 @@ public function testDrupalRenderChildren() {
   /**
    * Tests drupal_find_theme_templates().
    */
-  public function testFindThemeTemplates() {
+  public function testFindThemeTemplates(): void {
     $registry = $this->container->get('theme.registry')->get();
     $templates = drupal_find_theme_templates($registry, '.html.twig', $this->getThemePath('test_theme'));
     $this->assertEquals('node--1', $templates['node__1']['template'], 'Template node--1.html.twig was found in test_theme.');
@@ -159,7 +159,7 @@ public function testFindThemeTemplates() {
   /**
    * Tests the update registry is correct during theme install and uninstall.
    */
-  public function testThemeUpdateManagement() {
+  public function testThemeUpdateManagement(): void {
     // Install modules the theme is dependent on and enable the post update
     // function.
     \Drupal::state()->set('test_theme_depending_on_modules.post_update', TRUE);
@@ -186,7 +186,7 @@ public function testThemeUpdateManagement() {
   /**
    * Tests the update registry is correct during theme install and uninstall.
    */
-  public function testThemeUpdateManagementRemovedPostUpdates() {
+  public function testThemeUpdateManagementRemovedPostUpdates(): void {
     // Install modules the theme is dependent on and enable the removed post
     // updates function.
     \Drupal::state()->set('test_theme_depending_on_modules.removed_post_updates', TRUE);
diff --git a/core/modules/system/tests/src/Kernel/Theme/TwigFilterTest.php b/core/modules/system/tests/src/Kernel/Theme/TwigFilterTest.php
index bd3dfbf3b757..132cff7e1160 100644
--- a/core/modules/system/tests/src/Kernel/Theme/TwigFilterTest.php
+++ b/core/modules/system/tests/src/Kernel/Theme/TwigFilterTest.php
@@ -23,7 +23,7 @@ class TwigFilterTest extends KernelTestBase {
   /**
    * Tests Twig "without" filter.
    */
-  public function testTwigWithoutFilter() {
+  public function testTwigWithoutFilter(): void {
     $filter_test = [
       '#theme' => 'twig_theme_test_filter',
       '#quote' => [
diff --git a/core/modules/system/tests/src/Kernel/Theme/TwigNamespaceTest.php b/core/modules/system/tests/src/Kernel/Theme/TwigNamespaceTest.php
index 3df5fc12f358..eec18f971ac2 100644
--- a/core/modules/system/tests/src/Kernel/Theme/TwigNamespaceTest.php
+++ b/core/modules/system/tests/src/Kernel/Theme/TwigNamespaceTest.php
@@ -52,7 +52,7 @@ public function assertTwigTemplate($value, string $message = ''): void {
   /**
    * Tests template discovery using namespaces.
    */
-  public function testTemplateDiscovery() {
+  public function testTemplateDiscovery(): void {
     // Tests resolving namespaced templates in modules.
     $this->assertTwigTemplate($this->twig->load('@node/node.html.twig'), 'Found node.html.twig in node module.');
 
@@ -63,7 +63,7 @@ public function testTemplateDiscovery() {
   /**
    * Tests template extension and includes using namespaces.
    */
-  public function testTwigNamespaces() {
+  public function testTwigNamespaces(): void {
     // Test twig @extends and @include in template files.
     $test = ['#theme' => 'twig_namespace_test'];
     $this->setRawContent(\Drupal::service('renderer')->renderRoot($test));
diff --git a/core/modules/system/tests/src/Kernel/Theme/TwigRawTest.php b/core/modules/system/tests/src/Kernel/Theme/TwigRawTest.php
index 4295f0f4ef47..0f670b54cd10 100644
--- a/core/modules/system/tests/src/Kernel/Theme/TwigRawTest.php
+++ b/core/modules/system/tests/src/Kernel/Theme/TwigRawTest.php
@@ -23,7 +23,7 @@ class TwigRawTest extends KernelTestBase {
   /**
    * Tests the raw filter inside an autoescape tag.
    */
-  public function testAutoescapeRaw() {
+  public function testAutoescapeRaw(): void {
     $test = [
       '#theme' => 'twig_raw_test',
       '#script' => '<script>alert("This alert is real because I will put it through the raw filter!");</script>',
@@ -39,7 +39,7 @@ public function testAutoescapeRaw() {
    * This is one of the most important tests in Drupal itself in terms of
    * security.
    */
-  public function testAutoescape() {
+  public function testAutoescape(): void {
     $script = '<script>alert("This alert is unreal!");</script>';
     $build = [
       '#theme' => 'twig_autoescape_test',
diff --git a/core/modules/system/tests/src/Kernel/TimezoneResolverTest.php b/core/modules/system/tests/src/Kernel/TimezoneResolverTest.php
index eb77255fed1c..7410aeba35ac 100644
--- a/core/modules/system/tests/src/Kernel/TimezoneResolverTest.php
+++ b/core/modules/system/tests/src/Kernel/TimezoneResolverTest.php
@@ -29,7 +29,7 @@ class TimezoneResolverTest extends KernelTestBase {
   /**
    * Tests time zone resolution.
    */
-  public function testGetTimeZone() {
+  public function testGetTimeZone(): void {
     $this->installEntitySchema('user');
     $this->installConfig(['system']);
 
diff --git a/core/modules/system/tests/src/Kernel/Token/TokenReplaceKernelTest.php b/core/modules/system/tests/src/Kernel/Token/TokenReplaceKernelTest.php
index 6511a082eef6..d46e2ed4f4d9 100644
--- a/core/modules/system/tests/src/Kernel/Token/TokenReplaceKernelTest.php
+++ b/core/modules/system/tests/src/Kernel/Token/TokenReplaceKernelTest.php
@@ -31,7 +31,7 @@ protected function setUp(): void {
   /**
    * Tests whether token-replacement works in various contexts.
    */
-  public function testSystemTokenRecognition() {
+  public function testSystemTokenRecognition(): void {
     // Generate prefixes and suffixes for the token context.
     $tests = [
       ['prefix' => 'this is the ', 'suffix' => ' site'],
@@ -61,7 +61,7 @@ public function testSystemTokenRecognition() {
   /**
    * Tests the clear parameter.
    */
-  public function testClear() {
+  public function testClear(): void {
     // Valid token.
     $source = '[site:name]';
     // No user passed in, should be untouched.
@@ -83,7 +83,7 @@ public function testClear() {
   /**
    * Tests the generation of all system site information tokens.
    */
-  public function testSystemSiteTokenReplacement() {
+  public function testSystemSiteTokenReplacement(): void {
     $url_options = [
       'absolute' => TRUE,
       'language' => $this->interfaceLanguage,
@@ -156,7 +156,7 @@ public function testSystemSiteTokenReplacement() {
   /**
    * Tests the generation of all system date tokens.
    */
-  public function testSystemDateTokenReplacement() {
+  public function testSystemDateTokenReplacement(): void {
     // Set time to one hour before request.
     $date = \Drupal::time()->getRequestTime() - 3600;
 
diff --git a/core/modules/system/tests/src/Unit/Batch/BatchControllerTest.php b/core/modules/system/tests/src/Unit/Batch/BatchControllerTest.php
index 605b135327b9..12a225526e51 100644
--- a/core/modules/system/tests/src/Unit/Batch/BatchControllerTest.php
+++ b/core/modules/system/tests/src/Unit/Batch/BatchControllerTest.php
@@ -23,7 +23,7 @@ class BatchControllerTest extends UnitTestCase {
    *
    * @covers ::batchPageTitle
    */
-  public function testBatchPageTitle() {
+  public function testBatchPageTitle(): void {
     $batch_storage = $this->createMock(BatchStorageInterface::class);
     $controller = new BatchController($this->root, $batch_storage);
     require_once $this->root . '/core/includes/form.inc';
diff --git a/core/modules/system/tests/src/Unit/Breadcrumbs/PathBasedBreadcrumbBuilderTest.php b/core/modules/system/tests/src/Unit/Breadcrumbs/PathBasedBreadcrumbBuilderTest.php
index f2f1d6e20cdf..fed64ed349d1 100644
--- a/core/modules/system/tests/src/Unit/Breadcrumbs/PathBasedBreadcrumbBuilderTest.php
+++ b/core/modules/system/tests/src/Unit/Breadcrumbs/PathBasedBreadcrumbBuilderTest.php
@@ -141,7 +141,7 @@ protected function setUp(): void {
    *
    * @covers ::build
    */
-  public function testBuildOnFrontpage() {
+  public function testBuildOnFrontpage(): void {
     $this->pathMatcher->expects($this->once())
       ->method('isFrontPage')
       ->willReturn(TRUE);
@@ -158,7 +158,7 @@ public function testBuildOnFrontpage() {
    *
    * @covers ::build
    */
-  public function testBuildWithOnePathElement() {
+  public function testBuildWithOnePathElement(): void {
     $this->context->expects($this->once())
       ->method('getPathInfo')
       ->willReturn('/example');
@@ -176,7 +176,7 @@ public function testBuildWithOnePathElement() {
    * @covers ::build
    * @covers ::getRequestForPath
    */
-  public function testBuildWithTwoPathElements() {
+  public function testBuildWithTwoPathElements(): void {
     $this->context->expects($this->once())
       ->method('getPathInfo')
       ->willReturn('/example/baz');
@@ -215,7 +215,7 @@ public function testBuildWithTwoPathElements() {
    * @covers ::build
    * @covers ::getRequestForPath
    */
-  public function testBuildWithThreePathElements() {
+  public function testBuildWithThreePathElements(): void {
     $this->context->expects($this->once())
       ->method('getPathInfo')
       ->willReturn('/example/bar/baz');
@@ -273,7 +273,7 @@ public function testBuildWithThreePathElements() {
    *
    * @dataProvider providerTestBuildWithException
    */
-  public function testBuildWithException($exception_class, $exception_argument) {
+  public function testBuildWithException($exception_class, $exception_argument): void {
     $this->context->expects($this->once())
       ->method('getPathInfo')
       ->willReturn('/example/bar');
@@ -314,7 +314,7 @@ public static function providerTestBuildWithException() {
    * @covers ::build
    * @covers ::getRequestForPath
    */
-  public function testBuildWithNonProcessedPath() {
+  public function testBuildWithNonProcessedPath(): void {
     $this->context->expects($this->once())
       ->method('getPathInfo')
       ->willReturn('/example/bar');
@@ -341,7 +341,7 @@ public function testBuildWithNonProcessedPath() {
    *
    * @covers ::applies
    */
-  public function testApplies() {
+  public function testApplies(): void {
     $this->assertTrue($this->builder->applies($this->createMock('Drupal\Core\Routing\RouteMatchInterface')));
   }
 
@@ -351,7 +351,7 @@ public function testApplies() {
    * @covers ::build
    * @covers ::getRequestForPath
    */
-  public function testBuildWithUserPath() {
+  public function testBuildWithUserPath(): void {
     $this->context->expects($this->once())
       ->method('getPathInfo')
       ->willReturn('/user/1/edit');
diff --git a/core/modules/system/tests/src/Unit/Event/SecurityFileUploadEventSubscriberTest.php b/core/modules/system/tests/src/Unit/Event/SecurityFileUploadEventSubscriberTest.php
index 50a4baed4af1..8c92f8d05afa 100644
--- a/core/modules/system/tests/src/Unit/Event/SecurityFileUploadEventSubscriberTest.php
+++ b/core/modules/system/tests/src/Unit/Event/SecurityFileUploadEventSubscriberTest.php
@@ -32,7 +32,7 @@ class SecurityFileUploadEventSubscriberTest extends UnitTestCase {
    *
    * @covers ::sanitizeName
    */
-  public function testSanitizeName(string $filename, string $allowed_extensions, string $expected_filename, ?string $expected_filename_with_insecure_uploads = NULL) {
+  public function testSanitizeName(string $filename, string $allowed_extensions, string $expected_filename, ?string $expected_filename_with_insecure_uploads = NULL): void {
     // Configure insecure uploads to be renamed.
     $config_factory = $this->getConfigFactoryStub([
       'system.file' => [
@@ -106,7 +106,7 @@ public static function provideFilenames() {
    *
    * @covers ::sanitizeName
    */
-  public function testSanitizeNameNoMunge(string $filename, string $allowed_extensions) {
+  public function testSanitizeNameNoMunge(string $filename, string $allowed_extensions): void {
     $config_factory = $this->getConfigFactoryStub([
       'system.file' => [
         'allow_insecure_uploads' => FALSE,
diff --git a/core/modules/system/tests/src/Unit/FileTransfer/FileTransferTest.php b/core/modules/system/tests/src/Unit/FileTransfer/FileTransferTest.php
index 29cb90f958c1..e13c7d778515 100644
--- a/core/modules/system/tests/src/Unit/FileTransfer/FileTransferTest.php
+++ b/core/modules/system/tests/src/Unit/FileTransfer/FileTransferTest.php
@@ -26,7 +26,7 @@ protected function setUp(): void {
     $this->testConnection = TestFileTransfer::factory($this->root, []);
   }
 
-  public function testFileTransferMagicMethods() {
+  public function testFileTransferMagicMethods(): void {
     // Test to ensure __get() preserves public access.
     $this->assertInstanceOf(MockTestConnection::class, $this->testConnection->connection);
   }
diff --git a/core/modules/system/tests/src/Unit/Menu/MenuLinkTreeTest.php b/core/modules/system/tests/src/Unit/Menu/MenuLinkTreeTest.php
index bade40dfbb5a..da1865e0fefe 100644
--- a/core/modules/system/tests/src/Unit/Menu/MenuLinkTreeTest.php
+++ b/core/modules/system/tests/src/Unit/Menu/MenuLinkTreeTest.php
@@ -100,7 +100,7 @@ protected function setUp(): void {
    * @covers ::build
    * @dataProvider providerTestBuildCacheability
    */
-  public function testBuildCacheability($description, $tree, $expected_build, $access, array $access_cache_contexts = []) {
+  public function testBuildCacheability($description, $tree, $expected_build, $access, array $access_cache_contexts = []): void {
     if ($access !== NULL) {
       $access->addCacheContexts($access_cache_contexts);
     }
diff --git a/core/modules/system/tests/src/Unit/Menu/SystemLocalTasksTest.php b/core/modules/system/tests/src/Unit/Menu/SystemLocalTasksTest.php
index 735d3513210a..780ba81c12b3 100644
--- a/core/modules/system/tests/src/Unit/Menu/SystemLocalTasksTest.php
+++ b/core/modules/system/tests/src/Unit/Menu/SystemLocalTasksTest.php
@@ -69,7 +69,7 @@ protected function setUp(): void {
    *
    * @dataProvider getSystemAdminRoutes
    */
-  public function testSystemAdminLocalTasks($route, $expected) {
+  public function testSystemAdminLocalTasks($route, $expected): void {
     $this->assertLocalTasks($route, $expected);
   }
 
diff --git a/core/modules/system/tests/src/Unit/Pager/PreprocessPagerTest.php b/core/modules/system/tests/src/Unit/Pager/PreprocessPagerTest.php
index 24a12a53b472..ab42b418125a 100644
--- a/core/modules/system/tests/src/Unit/Pager/PreprocessPagerTest.php
+++ b/core/modules/system/tests/src/Unit/Pager/PreprocessPagerTest.php
@@ -52,7 +52,7 @@ protected function setUp(): void {
    *
    * @covers ::template_preprocess_pager
    */
-  public function testQuantityNotSet() {
+  public function testQuantityNotSet(): void {
     require_once $this->root . '/core/includes/theme.inc';
     $variables = [
       'pager' => [
@@ -73,7 +73,7 @@ public function testQuantityNotSet() {
    *
    * @covers ::template_preprocess_pager
    */
-  public function testQuantitySet() {
+  public function testQuantitySet(): void {
     require_once $this->root . '/core/includes/theme.inc';
     $variables = [
       'pager' => [
@@ -98,7 +98,7 @@ public function testQuantitySet() {
    *
    * @covers ::template_preprocess_pager
    */
-  public function testEmptyPaginationHeadingLevelSet() {
+  public function testEmptyPaginationHeadingLevelSet(): void {
     require_once $this->root . '/core/includes/theme.inc';
     $variables = [
       'pager' => [
@@ -120,7 +120,7 @@ public function testEmptyPaginationHeadingLevelSet() {
    *
    * @covers ::template_preprocess_pager
    */
-  public function testPaginationHeadingLevelNotSet() {
+  public function testPaginationHeadingLevelNotSet(): void {
     require_once $this->root . '/core/includes/theme.inc';
     $variables = [
       'pager' => [
@@ -141,7 +141,7 @@ public function testPaginationHeadingLevelNotSet() {
    *
    * @covers ::template_preprocess_pager
    */
-  public function testPaginationHeadingLevelSet() {
+  public function testPaginationHeadingLevelSet(): void {
     require_once $this->root . '/core/includes/theme.inc';
     $variables = [
       'pager' => [
@@ -163,7 +163,7 @@ public function testPaginationHeadingLevelSet() {
    *
    * @covers ::template_preprocess_pager
    */
-  public function testPaginationHeadingLevelInvalid() {
+  public function testPaginationHeadingLevelInvalid(): void {
     require_once $this->root . '/core/includes/theme.inc';
     $variables = [
       'pager' => [
diff --git a/core/modules/system/tests/src/Unit/Routing/AdminRouteSubscriberTest.php b/core/modules/system/tests/src/Unit/Routing/AdminRouteSubscriberTest.php
index a2a0a03f98a5..7cd8f89c11e0 100644
--- a/core/modules/system/tests/src/Unit/Routing/AdminRouteSubscriberTest.php
+++ b/core/modules/system/tests/src/Unit/Routing/AdminRouteSubscriberTest.php
@@ -22,7 +22,7 @@ class AdminRouteSubscriberTest extends UnitTestCase {
    *
    * @dataProvider providerTestAlterRoutes
    */
-  public function testAlterRoutes(Route $route, $is_admin) {
+  public function testAlterRoutes(Route $route, $is_admin): void {
     $collection = new RouteCollection();
     $collection->add('the_route', $route);
     (new AdminRouteSubscriber())->onAlterRoutes(new RouteBuildEvent($collection));
diff --git a/core/modules/system/tests/src/Unit/TraitAccessTest.php b/core/modules/system/tests/src/Unit/TraitAccessTest.php
index 2abd92171b42..424ab939dddc 100644
--- a/core/modules/system/tests/src/Unit/TraitAccessTest.php
+++ b/core/modules/system/tests/src/Unit/TraitAccessTest.php
@@ -20,7 +20,7 @@ class TraitAccessTest extends UnitTestCase {
   /**
    * @coversNothing
    */
-  public function testSimpleStuff() {
+  public function testSimpleStuff(): void {
     $stuff = $this->getStuff();
     $this->assertSame($stuff, 'stuff', "Same old stuff");
   }
diff --git a/core/modules/taxonomy/tests/src/Functional/EarlyDateTest.php b/core/modules/taxonomy/tests/src/Functional/EarlyDateTest.php
index 42e04e2ce8f8..41b6d49d5a78 100644
--- a/core/modules/taxonomy/tests/src/Functional/EarlyDateTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/EarlyDateTest.php
@@ -66,7 +66,7 @@ protected function setUp(): void {
   /**
    * Tests taxonomy functionality with nodes prior to 1970.
    */
-  public function testTaxonomyEarlyDateNode() {
+  public function testTaxonomyEarlyDateNode(): void {
     // Posts an article with a taxonomy term and a date prior to 1970.
     $date = new DrupalDateTime('1969-01-01 00:00:00');
     $edit = [];
diff --git a/core/modules/taxonomy/tests/src/Functional/Rest/TermResourceTestBase.php b/core/modules/taxonomy/tests/src/Functional/Rest/TermResourceTestBase.php
index 416038f98408..2c64a7b04c9b 100644
--- a/core/modules/taxonomy/tests/src/Functional/Rest/TermResourceTestBase.php
+++ b/core/modules/taxonomy/tests/src/Functional/Rest/TermResourceTestBase.php
@@ -283,7 +283,7 @@ protected function getExpectedUnauthorizedAccessMessage($method) {
    *
    * @see \Drupal\Tests\rest\Functional\EntityResource\Node\NodeResourceTestBase::testPatchPath()
    */
-  public function testPatchPath() {
+  public function testPatchPath(): void {
     $this->initAuthentication();
     $this->provisionEntityResource();
     $this->setUpAuthorization('GET');
@@ -332,7 +332,7 @@ protected function getExpectedCacheContexts() {
    *
    * @dataProvider providerTestGetTermWithParent
    */
-  public function testGetTermWithParent(array $parent_term_ids) {
+  public function testGetTermWithParent(array $parent_term_ids): void {
     // Create all possible parent terms.
     Term::create(['vid' => Vocabulary::load('camelids')->id()])
       ->setName('Lamoids')
diff --git a/core/modules/taxonomy/tests/src/Functional/Rest/TermXmlAnonTest.php b/core/modules/taxonomy/tests/src/Functional/Rest/TermXmlAnonTest.php
index 2c3691b3f0e2..f5c7a2bc562d 100644
--- a/core/modules/taxonomy/tests/src/Functional/Rest/TermXmlAnonTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/Rest/TermXmlAnonTest.php
@@ -34,7 +34,7 @@ class TermXmlAnonTest extends TermResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public function testPatchPath() {
+  public function testPatchPath(): void {
     // Deserialization of the XML format is not supported.
     $this->markTestSkipped();
   }
diff --git a/core/modules/taxonomy/tests/src/Functional/Rest/TermXmlBasicAuthTest.php b/core/modules/taxonomy/tests/src/Functional/Rest/TermXmlBasicAuthTest.php
index efce9ab17eb7..caa6e5e05564 100644
--- a/core/modules/taxonomy/tests/src/Functional/Rest/TermXmlBasicAuthTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/Rest/TermXmlBasicAuthTest.php
@@ -44,7 +44,7 @@ class TermXmlBasicAuthTest extends TermResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public function testPatchPath() {
+  public function testPatchPath(): void {
     // Deserialization of the XML format is not supported.
     $this->markTestSkipped();
   }
diff --git a/core/modules/taxonomy/tests/src/Functional/Rest/TermXmlCookieTest.php b/core/modules/taxonomy/tests/src/Functional/Rest/TermXmlCookieTest.php
index 1979dffab643..7eba87162c1f 100644
--- a/core/modules/taxonomy/tests/src/Functional/Rest/TermXmlCookieTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/Rest/TermXmlCookieTest.php
@@ -39,7 +39,7 @@ class TermXmlCookieTest extends TermResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public function testPatchPath() {
+  public function testPatchPath(): void {
     // Deserialization of the XML format is not supported.
     $this->markTestSkipped();
   }
diff --git a/core/modules/taxonomy/tests/src/Functional/RssTest.php b/core/modules/taxonomy/tests/src/Functional/RssTest.php
index b24eaabcec88..4c186b8a9a53 100644
--- a/core/modules/taxonomy/tests/src/Functional/RssTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/RssTest.php
@@ -83,7 +83,7 @@ protected function setUp(): void {
    *
    * Create a node and assert that taxonomy terms appear in rss.xml.
    */
-  public function testTaxonomyRss() {
+  public function testTaxonomyRss(): void {
     // Create two taxonomy terms.
     $term1 = $this->createTerm($this->vocabulary);
 
diff --git a/core/modules/taxonomy/tests/src/Functional/TaxonomyRevisionTest.php b/core/modules/taxonomy/tests/src/Functional/TaxonomyRevisionTest.php
index 0f3ea991dc44..06cfd027993f 100644
--- a/core/modules/taxonomy/tests/src/Functional/TaxonomyRevisionTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/TaxonomyRevisionTest.php
@@ -32,7 +32,7 @@ class TaxonomyRevisionTest extends BrowserTestBase {
   /**
    * Tests default revision settings on vocabularies.
    */
-  public function testVocabularyTermRevision() {
+  public function testVocabularyTermRevision(): void {
     $assert = $this->assertSession();
     $vocabulary1 = $this->createVocabulary(['new_revision' => TRUE]);
     $vocabulary2 = $this->createVocabulary(['new_revision' => FALSE]);
diff --git a/core/modules/taxonomy/tests/src/Functional/TaxonomyTermIndentationTest.php b/core/modules/taxonomy/tests/src/Functional/TaxonomyTermIndentationTest.php
index c6f797c23782..6db21d6fbbb1 100644
--- a/core/modules/taxonomy/tests/src/Functional/TaxonomyTermIndentationTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/TaxonomyTermIndentationTest.php
@@ -45,7 +45,7 @@ protected function setUp(): void {
   /**
    * Tests term indentation.
    */
-  public function testTermIndentation() {
+  public function testTermIndentation(): void {
     $assert = $this->assertSession();
     // Create three taxonomy terms.
     $term1 = $this->createTerm($this->vocabulary);
diff --git a/core/modules/taxonomy/tests/src/Functional/TaxonomyTermPagerTest.php b/core/modules/taxonomy/tests/src/Functional/TaxonomyTermPagerTest.php
index 5a4aff0ab5ef..592b2382f7ca 100644
--- a/core/modules/taxonomy/tests/src/Functional/TaxonomyTermPagerTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/TaxonomyTermPagerTest.php
@@ -45,7 +45,7 @@ protected function setUp(): void {
   /**
    * Tests that the pager is displayed properly on the term overview page.
    */
-  public function testTaxonomyTermOverviewPager() {
+  public function testTaxonomyTermOverviewPager(): void {
     // Set limit to 3 terms per page.
     $this->config('taxonomy.settings')
       ->set('terms_per_page_admin', '3')
@@ -78,7 +78,7 @@ public function testTaxonomyTermOverviewPager() {
   /**
    * Tests that overview page only loads the necessary terms.
    */
-  public function testTaxonomyTermOverviewTermLoad() {
+  public function testTaxonomyTermOverviewTermLoad(): void {
     // Set limit to 3 terms per page.
     $this->config('taxonomy.settings')
       ->set('terms_per_page_admin', '3')
diff --git a/core/modules/taxonomy/tests/src/Functional/TermAccessTest.php b/core/modules/taxonomy/tests/src/Functional/TermAccessTest.php
index 3e9a985b3871..985c1ac63d41 100644
--- a/core/modules/taxonomy/tests/src/Functional/TermAccessTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/TermAccessTest.php
@@ -25,7 +25,7 @@ class TermAccessTest extends TaxonomyTestBase {
   /**
    * Tests access control functionality for taxonomy terms.
    */
-  public function testTermAccess() {
+  public function testTermAccess(): void {
     $assert_session = $this->assertSession();
 
     $vocabulary = $this->createVocabulary();
diff --git a/core/modules/taxonomy/tests/src/Functional/TermAutocompleteTest.php b/core/modules/taxonomy/tests/src/Functional/TermAutocompleteTest.php
index d4f413a4a04a..3845ff3ca493 100644
--- a/core/modules/taxonomy/tests/src/Functional/TermAutocompleteTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/TermAutocompleteTest.php
@@ -168,7 +168,7 @@ protected function drupalGetJson($path, array $options = [], array $headers = []
    *
    * @see \Drupal\taxonomy\Controller\TermAutocompleteController::autocomplete()
    */
-  public function testAutocompleteCountResults() {
+  public function testAutocompleteCountResults(): void {
     // Test that no matching term found.
     $data = $this->drupalGetJson(
       $this->autocompleteUrl,
@@ -204,7 +204,7 @@ public function testAutocompleteCountResults() {
    *
    * @see \Drupal\taxonomy\Controller\TermAutocompleteController::autocomplete()
    */
-  public function testAutocompleteOrderedResults() {
+  public function testAutocompleteOrderedResults(): void {
     $expectedResults = [
       'aaa 10 bbb',
       'aaa 11 bbb',
diff --git a/core/modules/taxonomy/tests/src/Functional/TermContextualLinksTest.php b/core/modules/taxonomy/tests/src/Functional/TermContextualLinksTest.php
index 718e55372906..9ce615aa6016 100644
--- a/core/modules/taxonomy/tests/src/Functional/TermContextualLinksTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/TermContextualLinksTest.php
@@ -26,7 +26,7 @@ class TermContextualLinksTest extends TaxonomyTestBase {
   /**
    * Tests contextual links.
    */
-  public function testTermContextualLinks() {
+  public function testTermContextualLinks(): void {
     $vocabulary = $this->createVocabulary();
     $term = $this->createTerm($vocabulary);
 
diff --git a/core/modules/taxonomy/tests/src/Functional/TermIndexTest.php b/core/modules/taxonomy/tests/src/Functional/TermIndexTest.php
index 79fd6e86d234..c7c8c97f54b0 100644
--- a/core/modules/taxonomy/tests/src/Functional/TermIndexTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/TermIndexTest.php
@@ -105,7 +105,7 @@ protected function setUp(): void {
   /**
    * Tests that the taxonomy index is maintained properly.
    */
-  public function testTaxonomyIndex() {
+  public function testTaxonomyIndex(): void {
     $node_storage = $this->container->get('entity_type.manager')->getStorage('node');
     // Create terms in the vocabulary.
     $term_1 = $this->createTerm($this->vocabulary);
@@ -241,7 +241,7 @@ public function testTaxonomyIndex() {
   /**
    * Tests that there is a link to the parent term on the child term page.
    */
-  public function testTaxonomyTermHierarchyBreadcrumbs() {
+  public function testTaxonomyTermHierarchyBreadcrumbs(): void {
     // Create two taxonomy terms and set term2 as the parent of term1.
     $term1 = $this->createTerm($this->vocabulary);
     $term2 = $this->createTerm($this->vocabulary);
diff --git a/core/modules/taxonomy/tests/src/Functional/TermLanguageTest.php b/core/modules/taxonomy/tests/src/Functional/TermLanguageTest.php
index e1fd3fdb1794..e33f700c3d02 100644
--- a/core/modules/taxonomy/tests/src/Functional/TermLanguageTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/TermLanguageTest.php
@@ -49,7 +49,7 @@ protected function setUp(): void {
     }
   }
 
-  public function testTermLanguage() {
+  public function testTermLanguage(): void {
     // Configure the vocabulary to not hide the language selector.
     $edit = [
       'default_language[language_alterable]' => TRUE,
@@ -87,7 +87,7 @@ public function testTermLanguage() {
     $this->assertTrue($this->assertSession()->optionExists('edit-langcode-0-value', $edit['langcode[0][value]'])->isSelected());
   }
 
-  public function testDefaultTermLanguage() {
+  public function testDefaultTermLanguage(): void {
     // Configure the vocabulary to not hide the language selector, and make the
     // default language of the terms fixed.
     $edit = [
@@ -127,7 +127,7 @@ public function testDefaultTermLanguage() {
   /**
    * Tests that translated terms are displayed correctly on the term overview.
    */
-  public function testTermTranslatedOnOverviewPage() {
+  public function testTermTranslatedOnOverviewPage(): void {
     // Configure the vocabulary to not hide the language selector.
     $edit = [
       'default_language[language_alterable]' => TRUE,
diff --git a/core/modules/taxonomy/tests/src/Functional/TermParentsTest.php b/core/modules/taxonomy/tests/src/Functional/TermParentsTest.php
index 1a4d7a4760ea..c37d4486b47e 100644
--- a/core/modules/taxonomy/tests/src/Functional/TermParentsTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/TermParentsTest.php
@@ -64,7 +64,7 @@ protected function setUp(): void {
   /**
    * Tests specifying parents when creating terms.
    */
-  public function testAddWithParents() {
+  public function testAddWithParents(): void {
     $this->drupalGet("/admin/structure/taxonomy/manage/{$this->vocabularyId}/add");
     $page = $this->getSession()->getPage();
 
@@ -135,7 +135,7 @@ protected function submitAddTermForm($name) {
   /**
    * Tests editing the parents of existing terms.
    */
-  public function testEditingParents() {
+  public function testEditingParents(): void {
     $terms = $this->doTestEditingSingleParent();
     $term_5 = array_pop($terms);
     $term_4 = array_pop($terms);
@@ -161,7 +161,7 @@ public function testEditingParents() {
   /**
    * Tests specifying parents when creating terms and a disabled parent form.
    */
-  public function testEditingParentsWithDisabledFormElement() {
+  public function testEditingParentsWithDisabledFormElement(): void {
     // Disable the parent form element.
     $this->state->set('taxonomy_test.disable_parent_form_element', TRUE);
     $this->drupalGet("/admin/structure/taxonomy/manage/{$this->vocabularyId}/add");
@@ -253,7 +253,7 @@ protected function doTestEditingSingleParent() {
   /**
    * Test the term add/edit form with parent query parameter.
    */
-  public function testParentFromQuery() {
+  public function testParentFromQuery(): void {
     // Create three terms without any parents.
     $term_1 = $this->createTerm('Test term 1');
     $term_2 = $this->createTerm('Test term 2');
diff --git a/core/modules/taxonomy/tests/src/Functional/TermTest.php b/core/modules/taxonomy/tests/src/Functional/TermTest.php
index 01e7e0056dfd..70aea5a79ca1 100644
--- a/core/modules/taxonomy/tests/src/Functional/TermTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/TermTest.php
@@ -92,7 +92,7 @@ protected function setUp(): void {
   /**
    * The "parent" field must restrict references to the same vocabulary.
    */
-  public function testParentHandlerSettings() {
+  public function testParentHandlerSettings(): void {
     $vocabulary_fields = \Drupal::service('entity_field.manager')->getFieldDefinitions('taxonomy_term', $this->vocabulary->id());
     $parent_target_bundles = $vocabulary_fields['parent']->getSetting('handler_settings')['target_bundles'];
     $this->assertSame([$this->vocabulary->id() => $this->vocabulary->id()], $parent_target_bundles);
@@ -101,7 +101,7 @@ public function testParentHandlerSettings() {
   /**
    * Tests terms in a single and multiple hierarchy.
    */
-  public function testTaxonomyTermHierarchy() {
+  public function testTaxonomyTermHierarchy(): void {
     // Create two taxonomy terms.
     $term1 = $this->createTerm($this->vocabulary);
     $term2 = $this->createTerm($this->vocabulary);
@@ -143,7 +143,7 @@ public function testTaxonomyTermHierarchy() {
   /**
    * Tests that many terms with parents show on each page.
    */
-  public function testTaxonomyTermChildTerms() {
+  public function testTaxonomyTermChildTerms(): void {
     // Set limit to 10 terms per page. Set variable to 9 so 10 terms appear.
     $this->config('taxonomy.settings')->set('terms_per_page_admin', '9')->save();
     $term1 = $this->createTerm($this->vocabulary);
@@ -197,7 +197,7 @@ public function testTaxonomyTermChildTerms() {
   /**
    * Tests term creation with a free-tagging vocabulary from the node form.
    */
-  public function testNodeTermCreationAndDeletion() {
+  public function testNodeTermCreationAndDeletion(): void {
     // Enable tags in the vocabulary.
     $field = $this->field;
     \Drupal::service('entity_display.repository')
@@ -292,7 +292,7 @@ public function testNodeTermCreationAndDeletion() {
   /**
    * Save, edit and delete a term using the user interface.
    */
-  public function testTermInterface() {
+  public function testTermInterface(): void {
     \Drupal::service('module_installer')->install(['views']);
     $edit = [
       'name[0][value]' => $this->randomMachineName(12),
@@ -429,7 +429,7 @@ public function testTermInterface() {
   /**
    * Test UI with override_selector TRUE.
    */
-  public function testTermSaveOverrideSelector() {
+  public function testTermSaveOverrideSelector(): void {
     $this->config('taxonomy.settings')->set('override_selector', TRUE)->save();
 
     // Create a Term.
@@ -454,7 +454,7 @@ public function testTermSaveOverrideSelector() {
   /**
    * Save, edit and delete a term using the user interface.
    */
-  public function testTermReorder() {
+  public function testTermReorder(): void {
     $assert = $this->assertSession();
     $this->createTerm($this->vocabulary);
     $this->createTerm($this->vocabulary);
@@ -522,7 +522,7 @@ public function testTermReorder() {
   /**
    * Tests saving a term with multiple parents through the UI.
    */
-  public function testTermMultipleParentsInterface() {
+  public function testTermMultipleParentsInterface(): void {
     // Add two new terms to the vocabulary so that we can have multiple parents.
     // These will be terms with tids of 1 and 2 respectively.
     $this->createTerm($this->vocabulary);
@@ -618,7 +618,7 @@ private function getParentTids($term) {
   /**
    * Tests that editing and saving a node with no changes works correctly.
    */
-  public function testReSavingTags() {
+  public function testReSavingTags(): void {
     // Enable tags in the vocabulary.
     $field = $this->field;
     \Drupal::service('entity_display.repository')
@@ -648,7 +648,7 @@ public function testReSavingTags() {
   /**
    * Check the breadcrumb on edit and delete a term page.
    */
-  public function testTermBreadcrumbs() {
+  public function testTermBreadcrumbs(): void {
     $edit = [
       'name[0][value]' => $this->randomMachineName(14),
       'description[0][value]' => $this->randomMachineName(100),
diff --git a/core/modules/taxonomy/tests/src/Functional/TermTranslationFieldViewTest.php b/core/modules/taxonomy/tests/src/Functional/TermTranslationFieldViewTest.php
index 208036c2d90b..21f7f301885b 100644
--- a/core/modules/taxonomy/tests/src/Functional/TermTranslationFieldViewTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/TermTranslationFieldViewTest.php
@@ -64,7 +64,7 @@ protected function setUp(): void {
   /**
    * Tests if the translated taxonomy term is displayed.
    */
-  public function testTranslatedTaxonomyTermReferenceDisplay() {
+  public function testTranslatedTaxonomyTermReferenceDisplay(): void {
     $path = 'node/' . $this->node->id();
     $translation_path = $this->translateToLangcode . '/' . $path;
 
diff --git a/core/modules/taxonomy/tests/src/Functional/TermTranslationTest.php b/core/modules/taxonomy/tests/src/Functional/TermTranslationTest.php
index e1bbcfd363e8..37ffbe522f1e 100644
--- a/core/modules/taxonomy/tests/src/Functional/TermTranslationTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/TermTranslationTest.php
@@ -60,7 +60,7 @@ protected function setUp(): void {
   /**
    * Tests translated breadcrumbs.
    */
-  public function testTranslatedBreadcrumbs() {
+  public function testTranslatedBreadcrumbs(): void {
     // Ensure non-translated breadcrumb is correct.
     $breadcrumb = [Url::fromRoute('<front>')->toString() => 'Home'];
     foreach ($this->terms as $term) {
@@ -94,7 +94,7 @@ public function testTranslatedBreadcrumbs() {
   /**
    * Tests translation of terms are showed in the node.
    */
-  public function testTermsTranslation() {
+  public function testTermsTranslation(): void {
 
     // Set the display of the term reference field on the article content type
     // to "Check boxes/radio buttons".
diff --git a/core/modules/taxonomy/tests/src/Functional/TermTranslationUITest.php b/core/modules/taxonomy/tests/src/Functional/TermTranslationUITest.php
index c41eef8aacf2..ff06aeef9738 100644
--- a/core/modules/taxonomy/tests/src/Functional/TermTranslationUITest.php
+++ b/core/modules/taxonomy/tests/src/Functional/TermTranslationUITest.php
@@ -108,7 +108,7 @@ protected function getEditValues($values, $langcode, $new = FALSE) {
   /**
    * {@inheritdoc}
    */
-  public function testTranslationUI() {
+  public function testTranslationUI(): void {
     parent::testTranslationUI();
 
     // Make sure that no row was inserted for taxonomy vocabularies which do
@@ -128,7 +128,7 @@ public function testTranslationUI() {
   /**
    * Tests translate link on vocabulary term list.
    */
-  public function testTranslateLinkVocabularyAdminPage() {
+  public function testTranslateLinkVocabularyAdminPage(): void {
     $this->drupalLogin($this->drupalCreateUser(array_merge(parent::getTranslatorPermissions(), ['access administration pages', 'administer taxonomy'])));
 
     $values = [
diff --git a/core/modules/taxonomy/tests/src/Functional/ThemeTest.php b/core/modules/taxonomy/tests/src/Functional/ThemeTest.php
index 917dc0f569d7..f31a58b4c231 100644
--- a/core/modules/taxonomy/tests/src/Functional/ThemeTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/ThemeTest.php
@@ -42,7 +42,7 @@ protected function setUp(): void {
   /**
    * Tests the theme used when adding, viewing and editing taxonomy terms.
    */
-  public function testTaxonomyTermThemes() {
+  public function testTaxonomyTermThemes(): void {
     // Adding a term to a vocabulary is considered an administrative action and
     // should use the administrative theme.
     $vocabulary = $this->createVocabulary();
diff --git a/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyDefaultArgumentTest.php b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyDefaultArgumentTest.php
index bdbe0920c26c..90209f7f6fee 100644
--- a/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyDefaultArgumentTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyDefaultArgumentTest.php
@@ -26,7 +26,7 @@ class TaxonomyDefaultArgumentTest extends TaxonomyTestBase {
   /**
    * Tests escaping of page title when the taxonomy plugin provides it.
    */
-  public function testTermTitleEscaping() {
+  public function testTermTitleEscaping(): void {
     $this->term1->setName('<em>Markup</em>')->save();
     $this->drupalGet('taxonomy_default_argument_test/' . $this->term1->id());
     $this->assertSession()->assertEscaped($this->term1->label());
diff --git a/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyFieldAllTermsTest.php b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyFieldAllTermsTest.php
index 7d1921563099..52e07caf7b31 100644
--- a/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyFieldAllTermsTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyFieldAllTermsTest.php
@@ -29,7 +29,7 @@ class TaxonomyFieldAllTermsTest extends TaxonomyTestBase {
   /**
    * Tests the "all terms" field handler.
    */
-  public function testViewsHandlerAllTermsField() {
+  public function testViewsHandlerAllTermsField(): void {
     $this->term1->setName('<em>Markup</em>')->save();
     $view = Views::getView('taxonomy_all_terms_test');
     $this->executeView($view);
@@ -54,7 +54,7 @@ public function testViewsHandlerAllTermsField() {
   /**
    * Tests token replacement in the "all terms" field handler.
    */
-  public function testViewsHandlerAllTermsWithTokens() {
+  public function testViewsHandlerAllTermsWithTokens(): void {
     $view = Views::getView('taxonomy_all_terms_test');
     $this->drupalGet('taxonomy_all_terms_token_test');
 
diff --git a/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyFieldFilterTest.php b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyFieldFilterTest.php
index 2c9c866e44b5..36d6444b7801 100644
--- a/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyFieldFilterTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyFieldFilterTest.php
@@ -114,7 +114,7 @@ protected function setUp($import_test_views = TRUE, $modules = []): void {
   /**
    * Tests description and term name filters.
    */
-  public function testFilters() {
+  public function testFilters(): void {
     // Test the name filter page, which filters for name contains 'Comida'.
     // Should show just the Spanish translation, once.
     $this->assertPageCounts('test-name-filter', ['es' => 1, 'fr' => 0, 'en' => 0], 'Comida name filter');
diff --git a/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyIndexTidUiTest.php b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyIndexTidUiTest.php
index 31ed23421bef..386bce016b7f 100644
--- a/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyIndexTidUiTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyIndexTidUiTest.php
@@ -115,7 +115,7 @@ protected function setUp($import_test_views = TRUE, $modules = []): void {
   /**
    * Tests the filter UI.
    */
-  public function testFilterUI() {
+  public function testFilterUI(): void {
     $this->drupalGet('admin/structure/views/nojs/handler/test_filter_taxonomy_index_tid/default/filter/tid');
 
     $result = $this->assertSession()->selectExists('edit-options-value')->findAll('css', 'option');
@@ -162,7 +162,7 @@ public function testFilterUI() {
   /**
    * Tests exposed taxonomy filters.
    */
-  public function testExposedFilter() {
+  public function testExposedFilter(): void {
     $node_type = $this->drupalCreateContentType(['type' => 'page']);
 
     // Create the tag field itself.
@@ -293,7 +293,7 @@ public function testExposedFilter() {
   /**
    * Tests exposed grouped taxonomy filters.
    */
-  public function testExposedGroupedFilter() {
+  public function testExposedGroupedFilter(): void {
     // Create a content type with a taxonomy field.
     $this->drupalCreateContentType(['type' => 'article']);
     $field_name = 'field_views_testing_tags';
@@ -337,7 +337,7 @@ public function testExposedGroupedFilter() {
   /**
    * Tests that an exposed taxonomy filter doesn't show unpublished terms.
    */
-  public function testExposedUnpublishedFilterOptions() {
+  public function testExposedUnpublishedFilterOptions(): void {
     $this->terms[1][0]->setUnpublished()->save();
     // Expose the filter.
     $this->drupalGet('admin/structure/views/nojs/handler/test_filter_taxonomy_index_tid/default/filter/tid');
@@ -376,7 +376,7 @@ public function testExposedUnpublishedFilterOptions() {
   /**
    * Tests using the TaxonomyIndexTid in a filter group.
    */
-  public function testFilterGrouping() {
+  public function testFilterGrouping(): void {
     $node_type = $this->drupalCreateContentType(['type' => 'page']);
 
     // Create the tag field itself.
diff --git a/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyParentUITest.php b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyParentUITest.php
index 83f045a0825e..c6b6f374a1ad 100644
--- a/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyParentUITest.php
+++ b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyParentUITest.php
@@ -43,7 +43,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['taxonomy_test_v
   /**
    * Tests the taxonomy parent plugin UI.
    */
-  public function testTaxonomyParentUI() {
+  public function testTaxonomyParentUI(): void {
     $this->drupalGet('admin/structure/views/nojs/handler/test_taxonomy_parent/default/relationship/parent');
     $this->assertSession()->pageTextNotContains('The handler for this item is broken or missing.');
   }
diff --git a/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyRelationshipTest.php b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyRelationshipTest.php
index f0a7bc4386b1..cfa26a405c98 100644
--- a/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyRelationshipTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyRelationshipTest.php
@@ -59,7 +59,7 @@ protected function setUp($import_test_views = TRUE, $modules = []): void {
   /**
    * Tests the taxonomy parent plugin UI.
    */
-  public function testTaxonomyRelationships() {
+  public function testTaxonomyRelationships(): void {
 
     // Check the generated views data of taxonomy_index.
     $views_data = Views::viewsData()->get('taxonomy_index');
diff --git a/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTermArgumentDepthTest.php b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTermArgumentDepthTest.php
index 400f8c4fbcb8..86ca9d664e0a 100644
--- a/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTermArgumentDepthTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTermArgumentDepthTest.php
@@ -63,7 +63,7 @@ protected function setUp($import_test_views = TRUE, $modules = []): void {
   /**
    * Tests title escaping.
    */
-  public function testTermWithDepthArgumentTitleEscaping() {
+  public function testTermWithDepthArgumentTitleEscaping(): void {
     $this->drupalGet('test_argument_taxonomy_index_tid_depth/' . $this->terms[0]->id());
     $this->assertSession()->assertEscaped($this->terms[0]->label());
   }
diff --git a/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTermViewTest.php b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTermViewTest.php
index b4ab6a7e9d2e..4f384757216b 100644
--- a/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTermViewTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTermViewTest.php
@@ -86,7 +86,7 @@ protected function setUp($import_test_views = TRUE, $modules = []): void {
   /**
    * Tests that the taxonomy term view is working properly.
    */
-  public function testTaxonomyTermView() {
+  public function testTaxonomyTermView(): void {
     // Create terms in the vocabulary.
     $term = $this->createTerm();
 
diff --git a/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyVocabularyArgumentTest.php b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyVocabularyArgumentTest.php
index 49d15eabdc87..a76bb4099dfc 100644
--- a/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyVocabularyArgumentTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyVocabularyArgumentTest.php
@@ -72,7 +72,7 @@ protected function setUp($import_test_views = TRUE, $modules = []): void {
    *
    * @see Drupal\taxonomy\Plugin\views\argument\VocabularyVid
    */
-  public function testTermWithVocabularyArgument() {
+  public function testTermWithVocabularyArgument(): void {
     $this->drupalGet('test_argument_taxonomy_vocabulary/' . $this->vocabularies[0]->id());
     // First term should be present.
     $this->assertSession()->pageTextContains($this->terms[0]->label());
diff --git a/core/modules/taxonomy/tests/src/Functional/Views/TermDisplayConfigurableTest.php b/core/modules/taxonomy/tests/src/Functional/Views/TermDisplayConfigurableTest.php
index e18a3dc2e26c..742f21233189 100644
--- a/core/modules/taxonomy/tests/src/Functional/Views/TermDisplayConfigurableTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/Views/TermDisplayConfigurableTest.php
@@ -26,7 +26,7 @@ class TermDisplayConfigurableTest extends TaxonomyTestBase {
   /**
    * Sets base fields to configurable display and check settings are respected.
    */
-  public function testDisplayConfigurable() {
+  public function testDisplayConfigurable(): void {
     $user = $this->drupalCreateUser(['administer nodes']);
     $this->drupalLogin($user);
 
diff --git a/core/modules/taxonomy/tests/src/Functional/Views/TermNameFieldTest.php b/core/modules/taxonomy/tests/src/Functional/Views/TermNameFieldTest.php
index 213d67715c13..4fafdf0304ed 100644
--- a/core/modules/taxonomy/tests/src/Functional/Views/TermNameFieldTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/Views/TermNameFieldTest.php
@@ -29,7 +29,7 @@ class TermNameFieldTest extends TaxonomyTestBase {
   /**
    * Tests term name field plugin functionality.
    */
-  public function testTermNameField() {
+  public function testTermNameField(): void {
     $this->term1->name->value = $this->randomMachineName() . ' ' . $this->randomMachineName();
     $this->term1->save();
 
diff --git a/core/modules/taxonomy/tests/src/Functional/Views/TermTranslationViewsTest.php b/core/modules/taxonomy/tests/src/Functional/Views/TermTranslationViewsTest.php
index 77844f0b60f5..6453205b4b52 100644
--- a/core/modules/taxonomy/tests/src/Functional/Views/TermTranslationViewsTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/Views/TermTranslationViewsTest.php
@@ -75,7 +75,7 @@ protected function setUp($import_test_views = TRUE, $modules = []): void {
    * Taxonomy term: Term ID & Content: Has taxonomy term ID (with depth)
    * contextual filters are enabled for two separate view modes.
    */
-  public function testTermsTranslationWithContextualFilter() {
+  public function testTermsTranslationWithContextualFilter(): void {
     $this->drupalLogin($this->rootUser);
 
     foreach ($this->terms as $term) {
diff --git a/core/modules/taxonomy/tests/src/Functional/VocabularyLanguageTest.php b/core/modules/taxonomy/tests/src/Functional/VocabularyLanguageTest.php
index 09ea651c711c..b2b64d6a6ee6 100644
--- a/core/modules/taxonomy/tests/src/Functional/VocabularyLanguageTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/VocabularyLanguageTest.php
@@ -45,7 +45,7 @@ protected function setUp(): void {
   /**
    * Tests language settings for vocabularies.
    */
-  public function testVocabularyLanguage() {
+  public function testVocabularyLanguage(): void {
     $this->drupalGet('admin/structure/taxonomy/add');
 
     // Check that we have the language selector available.
@@ -76,7 +76,7 @@ public function testVocabularyLanguage() {
   /**
    * Tests term language settings for vocabulary terms are saved and updated.
    */
-  public function testVocabularyDefaultLanguageForTerms() {
+  public function testVocabularyDefaultLanguageForTerms(): void {
     // Add a new vocabulary and check that the default language settings are for
     // the terms are saved.
     $edit = [
diff --git a/core/modules/taxonomy/tests/src/Functional/VocabularyPermissionsTest.php b/core/modules/taxonomy/tests/src/Functional/VocabularyPermissionsTest.php
index e699e9e4e5d7..a4338642bc35 100644
--- a/core/modules/taxonomy/tests/src/Functional/VocabularyPermissionsTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/VocabularyPermissionsTest.php
@@ -39,7 +39,7 @@ protected function setUp(): void {
   /**
    * Create, edit and delete a vocabulary via the user interface.
    */
-  public function testVocabularyPermissionsVocabulary() {
+  public function testVocabularyPermissionsVocabulary(): void {
     // VocabularyTest.php already tests for user with "administer taxonomy"
     // permission.
 
@@ -67,7 +67,7 @@ public function testVocabularyPermissionsVocabulary() {
   /**
    * Tests the vocabulary overview permission.
    */
-  public function testTaxonomyVocabularyOverviewPermissions() {
+  public function testTaxonomyVocabularyOverviewPermissions(): void {
     // Create two vocabularies, one with two terms, the other without any term.
     /** @var \Drupal\taxonomy\Entity\Vocabulary $vocabulary1 , $vocabulary2 */
     $vocabulary1 = $this->createVocabulary();
@@ -247,7 +247,7 @@ public function testTaxonomyVocabularyOverviewPermissions() {
   /**
    * Create, edit and delete a taxonomy term via the user interface.
    */
-  public function testVocabularyPermissionsTaxonomyTerm() {
+  public function testVocabularyPermissionsTaxonomyTerm(): void {
     // Vocabulary used for creating, removing and editing terms.
     $vocabulary = $this->createVocabulary();
 
diff --git a/core/modules/taxonomy/tests/src/Functional/VocabularySerializationTest.php b/core/modules/taxonomy/tests/src/Functional/VocabularySerializationTest.php
index 3eb05c7f5c31..1aefd30e8e14 100644
--- a/core/modules/taxonomy/tests/src/Functional/VocabularySerializationTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/VocabularySerializationTest.php
@@ -39,7 +39,7 @@ protected function setUp(): void {
     Vocabulary::create(['vid' => 'test', 'name' => 'Test'])->save();
   }
 
-  public function testSerialization() {
+  public function testSerialization(): void {
     $this->drupalGet('/vocabulary_serialization_test/test');
     $this->assertSession()->statusCodeEquals(200);
     $this->assertSame('this is the output', $this->getSession()->getPage()->getContent());
diff --git a/core/modules/taxonomy/tests/src/Functional/VocabularyTranslationTest.php b/core/modules/taxonomy/tests/src/Functional/VocabularyTranslationTest.php
index 60c9d42e51d8..e20e993ba5cf 100644
--- a/core/modules/taxonomy/tests/src/Functional/VocabularyTranslationTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/VocabularyTranslationTest.php
@@ -56,7 +56,7 @@ protected function setUp(): void {
   /**
    * Tests language settings for vocabularies.
    */
-  public function testVocabularyLanguage() {
+  public function testVocabularyLanguage(): void {
     $this->drupalGet('admin/structure/taxonomy/add');
 
     // Check that the field to enable content translation is available.
diff --git a/core/modules/taxonomy/tests/src/Functional/VocabularyUiTest.php b/core/modules/taxonomy/tests/src/Functional/VocabularyUiTest.php
index a5cd0a922e6a..5bdfc88c3904 100644
--- a/core/modules/taxonomy/tests/src/Functional/VocabularyUiTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/VocabularyUiTest.php
@@ -41,7 +41,7 @@ protected function setUp(): void {
   /**
    * Create, edit and delete a vocabulary via the user interface.
    */
-  public function testVocabularyInterface() {
+  public function testVocabularyInterface(): void {
     // Visit the main taxonomy administration page.
     $this->drupalGet('admin/structure/taxonomy');
 
@@ -111,7 +111,7 @@ public function testVocabularyInterface() {
   /**
    * Changing weights on the vocabulary overview with two or more vocabularies.
    */
-  public function testTaxonomyAdminChangingWeights() {
+  public function testTaxonomyAdminChangingWeights(): void {
     // Create some vocabularies.
     for ($i = 0; $i < 10; $i++) {
       $this->createVocabulary();
@@ -141,7 +141,7 @@ public function testTaxonomyAdminChangingWeights() {
   /**
    * Tests the vocabulary overview with no vocabularies.
    */
-  public function testTaxonomyAdminNoVocabularies() {
+  public function testTaxonomyAdminNoVocabularies(): void {
     // Delete all vocabularies.
     $vocabularies = Vocabulary::loadMultiple();
     foreach ($vocabularies as $key => $vocabulary) {
@@ -157,7 +157,7 @@ public function testTaxonomyAdminNoVocabularies() {
   /**
    * Deleting a vocabulary.
    */
-  public function testTaxonomyAdminDeletingVocabulary() {
+  public function testTaxonomyAdminDeletingVocabulary(): void {
     // Create a vocabulary.
     $vid = $this->randomMachineName();
     $edit = [
diff --git a/core/modules/taxonomy/tests/src/Kernel/ContextProvider/TermContextTest.php b/core/modules/taxonomy/tests/src/Kernel/ContextProvider/TermContextTest.php
index 70f37221b712..4ec6e63a8eff 100644
--- a/core/modules/taxonomy/tests/src/Kernel/ContextProvider/TermContextTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/ContextProvider/TermContextTest.php
@@ -36,7 +36,7 @@ protected function setUp(): void {
   /**
    * @covers ::getAvailableContexts
    */
-  public function testGetAvailableContexts() {
+  public function testGetAvailableContexts(): void {
     $context_repository = $this->container->get('context.repository');
 
     // Test taxonomy_term.taxonomy_term_route_context:taxonomy_term exists.
@@ -49,7 +49,7 @@ public function testGetAvailableContexts() {
   /**
    * @covers ::getRuntimeContexts
    */
-  public function testGetRuntimeContexts() {
+  public function testGetRuntimeContexts(): void {
     // Create term.
     $vocabulary = $this->createVocabulary();
     $term = $this->createTerm($vocabulary);
diff --git a/core/modules/taxonomy/tests/src/Kernel/LoadMultipleTest.php b/core/modules/taxonomy/tests/src/Kernel/LoadMultipleTest.php
index a7b19459212b..0508a06519bc 100644
--- a/core/modules/taxonomy/tests/src/Kernel/LoadMultipleTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/LoadMultipleTest.php
@@ -40,7 +40,7 @@ protected function setUp(): void {
   /**
    * Tests loading multiple taxonomy terms by term ID and vocabulary.
    */
-  public function testTaxonomyTermMultipleLoad() {
+  public function testTaxonomyTermMultipleLoad(): void {
     // Create a vocabulary.
     $vocabulary = $this->createVocabulary();
 
diff --git a/core/modules/taxonomy/tests/src/Kernel/Migrate/MigrateTaxonomyConfigsTest.php b/core/modules/taxonomy/tests/src/Kernel/Migrate/MigrateTaxonomyConfigsTest.php
index 8a6d5dcfd49b..bdb3cc6708ea 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Migrate/MigrateTaxonomyConfigsTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/MigrateTaxonomyConfigsTest.php
@@ -32,7 +32,7 @@ protected function setUp(): void {
   /**
    * Tests migration of taxonomy variables to taxonomy.settings.yml.
    */
-  public function testTaxonomySettings() {
+  public function testTaxonomySettings(): void {
     $config = $this->config('taxonomy.settings');
     $this->assertSame(100, $config->get('terms_per_page_admin'));
     $this->assertFalse($config->get('override_selector'));
diff --git a/core/modules/taxonomy/tests/src/Kernel/Migrate/MigrateTaxonomyTermStubTest.php b/core/modules/taxonomy/tests/src/Kernel/Migrate/MigrateTaxonomyTermStubTest.php
index 37a9989ae45b..bbcdda473bd2 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Migrate/MigrateTaxonomyTermStubTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/MigrateTaxonomyTermStubTest.php
@@ -35,7 +35,7 @@ protected function setUp(): void {
   /**
    * Tests creation of taxonomy term stubs.
    */
-  public function testStub() {
+  public function testStub(): void {
     Vocabulary::create([
       'vid' => 'test_vocabulary',
       'name' => 'Test vocabulary',
@@ -46,7 +46,7 @@ public function testStub() {
   /**
    * Tests creation of stubs when weight is mapped.
    */
-  public function testStubWithWeightMapping() {
+  public function testStubWithWeightMapping(): void {
     // Create a vocabulary via migration for the terms to reference.
     $vocabulary_data_rows = [
       ['id' => '1', 'name' => 'tags'],
diff --git a/core/modules/taxonomy/tests/src/Kernel/Migrate/TaxonomyTermDeriverTest.php b/core/modules/taxonomy/tests/src/Kernel/Migrate/TaxonomyTermDeriverTest.php
index 69ce45635546..0615b19afba4 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Migrate/TaxonomyTermDeriverTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/TaxonomyTermDeriverTest.php
@@ -20,7 +20,7 @@ class TaxonomyTermDeriverTest extends MigrateDrupal7TestBase {
   /**
    * Tests fields exist in  process pipeline for term migrations.
    */
-  public function testBuilder() {
+  public function testBuilder(): void {
     // Test a field on the vocabfixed term.
     $process = $this->getMigration('d7_taxonomy_term:vocabfixed')->getProcess();
     $this->assertSame('field_training', $process['field_training'][0]['source']);
diff --git a/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTaxonomyTermTest.php b/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTaxonomyTermTest.php
index f0050c878aeb..d12ca4f1edd2 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTaxonomyTermTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTaxonomyTermTest.php
@@ -31,7 +31,7 @@ protected function setUp(): void {
   /**
    * Tests the Drupal 6 taxonomy term to Drupal 8 migration.
    */
-  public function testTaxonomyTerms() {
+  public function testTaxonomyTerms(): void {
     $expected_results = [
       '1' => [
         'source_vid' => 1,
diff --git a/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTaxonomyVocabularyTest.php b/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTaxonomyVocabularyTest.php
index ce4ad03110a2..844e40f1e3e1 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTaxonomyVocabularyTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTaxonomyVocabularyTest.php
@@ -30,7 +30,7 @@ protected function setUp(): void {
   /**
    * Tests the Drupal 6 taxonomy vocabularies to Drupal 8 migration.
    */
-  public function testTaxonomyVocabulary() {
+  public function testTaxonomyVocabulary(): void {
     for ($i = 0; $i < 3; $i++) {
       $j = $i + 1;
       $vocabulary = Vocabulary::load("vocabulary_{$j}_i_{$i}_");
diff --git a/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTaxonomyVocabularyTranslationTest.php b/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTaxonomyVocabularyTranslationTest.php
index f67385145b4a..502ba4930b3b 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTaxonomyVocabularyTranslationTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTaxonomyVocabularyTranslationTest.php
@@ -37,7 +37,7 @@ protected function setUp(): void {
   /**
    * Tests the Drupal 6 i18n taxonomy vocabularies to Drupal 8 migration.
    */
-  public function testTaxonomyVocabularyTranslation() {
+  public function testTaxonomyVocabularyTranslation(): void {
     $language_manager = \Drupal::service('language_manager');
     $config = $language_manager->getLanguageConfigOverride('zu', 'taxonomy.vocabulary.vocabulary_1_i_0_');
     $this->assertSame('zu - vocabulary 1 (i=0)', $config->get('name'));
diff --git a/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTermLocalizedTranslationTest.php b/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTermLocalizedTranslationTest.php
index e05b439c434e..16116a6b9bbe 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTermLocalizedTranslationTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTermLocalizedTranslationTest.php
@@ -119,7 +119,7 @@ protected function assertHierarchy(string $vid, int $tid, array $parent_ids): vo
   /**
    * Tests the Drupal 6 i18n localized taxonomy term to Drupal 8 migration.
    */
-  public function testTranslatedLocalizedTaxonomyTerms() {
+  public function testTranslatedLocalizedTaxonomyTerms(): void {
     $this->assertEntity(14, 'en', 'Talos IV', 'vocabulary_name_much_longer_th', 'The home of Captain Christopher Pike.', NULL, 0, []);
     $this->assertEntity(15, 'en', 'Vulcan', 'vocabulary_name_much_longer_th', NULL, NULL, 0, []);
 
diff --git a/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTermNodeComplete.php b/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTermNodeComplete.php
index 941d3800573b..7fb16096cd49 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTermNodeComplete.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTermNodeComplete.php
@@ -49,7 +49,7 @@ protected function setUp(): void {
   /**
    * Tests the Drupal 6 term-node association to Drupal 8 migration.
    */
-  public function testTermNode() {
+  public function testTermNode(): void {
     $this->container->get('entity_type.manager')
       ->getStorage('node')
       ->resetCache([1, 2]);
diff --git a/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTermNodeRevisionTest.php b/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTermNodeRevisionTest.php
index 208dfdb5f9fe..68882ea4d2a2 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTermNodeRevisionTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTermNodeRevisionTest.php
@@ -32,7 +32,7 @@ protected function setUp(): void {
   /**
    * Tests the Drupal 6 term-node revision association to Drupal 8 migration.
    */
-  public function testTermRevisionNode() {
+  public function testTermRevisionNode(): void {
     $node = \Drupal::entityTypeManager()->getStorage('node')->loadRevision(2001);
     $this->assertCount(2, $node->field_vocabulary_3_i_2_);
     $this->assertSame('4', $node->field_vocabulary_3_i_2_[0]->target_id);
diff --git a/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTermNodeTest.php b/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTermNodeTest.php
index 2f361186137e..1d9654dd5050 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTermNodeTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTermNodeTest.php
@@ -32,7 +32,7 @@ protected function setUp(): void {
   /**
    * Tests the Drupal 6 term-node association to Drupal 8 migration.
    */
-  public function testTermNode() {
+  public function testTermNode(): void {
     // This is a base plugin id and we want to run all derivatives.
     $this->executeMigrations(['d6_term_node']);
 
@@ -53,7 +53,7 @@ public function testTermNode() {
   /**
    * Tests that term relationships are ignored for un-migrated nodes.
    */
-  public function testSkipNonExistentNode() {
+  public function testSkipNonExistentNode(): void {
     // Node 2 is migrated by d6_node__story, but we need to pretend that it
     // failed, so record that in the map table.
     $this->mockFailure('d6_node:story', ['nid' => 2, 'language' => 'en']);
diff --git a/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTermNodeTranslationTest.php b/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTermNodeTranslationTest.php
index c06eae94c5d1..8d9465f61a3f 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTermNodeTranslationTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTermNodeTranslationTest.php
@@ -53,7 +53,7 @@ protected function setUp(): void {
   /**
    * Tests the Drupal 6 term-node association to Drupal 8 migration.
    */
-  public function testTermNode() {
+  public function testTermNode(): void {
     $this->container->get('entity_type.manager')
       ->getStorage('node')
       ->resetCache([18, 21]);
diff --git a/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateVocabularyEntityDisplayTest.php b/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateVocabularyEntityDisplayTest.php
index 0d3bef67ab59..bf0df9b31221 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateVocabularyEntityDisplayTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateVocabularyEntityDisplayTest.php
@@ -39,7 +39,7 @@ protected function setUp(): void {
   /**
    * Tests the Drupal 6 vocabulary-node type association to Drupal 8 migration.
    */
-  public function testVocabularyEntityDisplay() {
+  public function testVocabularyEntityDisplay(): void {
     $this->executeMigration('d6_vocabulary_entity_display');
 
     // Test that the field exists.
@@ -61,7 +61,7 @@ public function testVocabularyEntityDisplay() {
    * Vocabulary displays should be ignored when they belong to node types which
    * were not migrated.
    */
-  public function testSkipNonExistentNodeType() {
+  public function testSkipNonExistentNodeType(): void {
     // The "story" node type is migrated by d6_node_type but we need to pretend
     // that it didn't occur, so record that in the map table.
     $this->mockFailure('d6_node_type', ['type' => 'story']);
diff --git a/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateVocabularyEntityFormDisplayTest.php b/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateVocabularyEntityFormDisplayTest.php
index 928e73b8ef08..10a0d991fc34 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateVocabularyEntityFormDisplayTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateVocabularyEntityFormDisplayTest.php
@@ -39,7 +39,7 @@ protected function setUp(): void {
   /**
    * Tests the Drupal 6 vocabulary-node type association to Drupal 8 migration.
    */
-  public function testVocabularyEntityFormDisplay() {
+  public function testVocabularyEntityFormDisplay(): void {
     $this->executeMigration('d6_vocabulary_entity_form_display');
 
     // Test that the field exists.
@@ -66,7 +66,7 @@ public function testVocabularyEntityFormDisplay() {
    * Vocabulary displays should be ignored when they belong to node types which
    * were not migrated.
    */
-  public function testSkipNonExistentNodeType() {
+  public function testSkipNonExistentNodeType(): void {
     // The "story" node type is migrated by d6_node_type but we need to pretend
     // that it didn't occur, so record that in the map table.
     $this->mockFailure('d6_node_type', ['type' => 'story']);
diff --git a/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateVocabularyFieldInstanceTest.php b/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateVocabularyFieldInstanceTest.php
index aa55777e31c4..187c357b5662 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateVocabularyFieldInstanceTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateVocabularyFieldInstanceTest.php
@@ -38,7 +38,7 @@ protected function setUp(): void {
   /**
    * Tests the Drupal 6 vocabulary-node type association to Drupal 8 migration.
    */
-  public function testVocabularyFieldInstance() {
+  public function testVocabularyFieldInstance(): void {
     $this->executeMigration('d6_vocabulary_field_instance');
 
     // Test that the field exists. Tags has a multilingual option of 'None'.
@@ -121,7 +121,7 @@ protected function assertTargetBundles($id, array $target_bundles) {
    * Vocabulary field instances should be ignored when they belong to node
    * types which were not migrated.
    */
-  public function testSkipNonExistentNodeType() {
+  public function testSkipNonExistentNodeType(): void {
     // The "story" node type is migrated by d6_node_type but we need to pretend
     // that it didn't occur, so record that in the map table.
     $this->mockFailure('d6_node_type', ['type' => 'story']);
diff --git a/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateVocabularyFieldTest.php b/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateVocabularyFieldTest.php
index c93ba538307c..d0204f4fa26c 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateVocabularyFieldTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateVocabularyFieldTest.php
@@ -30,7 +30,7 @@ protected function setUp(): void {
   /**
    * Tests the Drupal 6 vocabulary-node type association to Drupal 8 migration.
    */
-  public function testVocabularyField() {
+  public function testVocabularyField(): void {
     // Test that the field exists.
     $field_storage_id = 'node.field_tags';
     /** @var \Drupal\field\FieldStorageConfigInterface $field_storage */
diff --git a/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateNodeTaxonomyTest.php b/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateNodeTaxonomyTest.php
index 96dd5bce5f3d..791052402c37 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateNodeTaxonomyTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateNodeTaxonomyTest.php
@@ -42,7 +42,7 @@ protected function setUp(): void {
   /**
    * Tests node migration from Drupal 7 to 8.
    */
-  public function testMigration() {
+  public function testMigration(): void {
     $node = Node::load(2);
     $this->assertInstanceOf(NodeInterface::class, $node);
     $this->assertEquals(9, $node->field_tags[0]->target_id);
diff --git a/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyTermTest.php b/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyTermTest.php
index 1ee4e4986f69..657c520e2f76 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyTermTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyTermTest.php
@@ -108,7 +108,7 @@ protected function assertEntity(int $id, string $expected_language, string $expe
   /**
    * Tests the Drupal 7 taxonomy term to Drupal 8 migration.
    */
-  public function testTaxonomyTerms() {
+  public function testTaxonomyTerms(): void {
     $this->assertEntity(1, 'en', 'General discussion', 'sujet_de_discussion', '', NULL, 2);
 
     // Tests that terms that used the Drupal 7 Title module and that have their
diff --git a/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyTermTranslationTest.php b/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyTermTranslationTest.php
index 84c30acb4e11..1fb8b819fdc7 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyTermTranslationTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyTermTranslationTest.php
@@ -132,7 +132,7 @@ protected function assertHierarchy(string $vid, int $tid, array $parent_ids): vo
   /**
    * Tests the Drupal i18n  taxonomy term to Drupal 8 migration.
    */
-  public function testTaxonomyTermTranslation() {
+  public function testTaxonomyTermTranslation(): void {
     // Forums vocabulary, no multilingual option.
     $this->assertEntity(1, 'en', 'General discussion', 'sujet_de_discussion', NULL, NULL, 2, []);
     $this->assertEntity(5, 'en', 'Custom Forum', 'sujet_de_discussion', 'Where the cool kids are.', NULL, 3, []);
diff --git a/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyVocabularyTest.php b/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyVocabularyTest.php
index 92be17f71da9..3cde0fb5485a 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyVocabularyTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyVocabularyTest.php
@@ -54,7 +54,7 @@ protected function assertEntity(string $id, string $expected_label, string $expe
   /**
    * Tests the Drupal 7 taxonomy vocabularies to Drupal 8 migration.
    */
-  public function testTaxonomyVocabulary() {
+  public function testTaxonomyVocabulary(): void {
     $this->assertEntity('tags', 'Tags', 'Use tags to group articles on similar topics into categories.', 0);
     $this->assertEntity('sujet_de_discussion', 'Sujet de discussion', 'Forum navigation vocabulary', -10);
     $this->assertEntity('test_vocabulary', 'Test Vocabulary', 'This is the vocabulary description', 0);
diff --git a/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyVocabularyTranslationTest.php b/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyVocabularyTranslationTest.php
index 74a6045435a8..71f1674660c9 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyVocabularyTranslationTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyVocabularyTranslationTest.php
@@ -38,7 +38,7 @@ protected function setUp(): void {
   /**
    * Tests the Drupal 7 i18n taxonomy vocabularies to Drupal 8 migration.
    */
-  public function testTaxonomyVocabularyTranslation() {
+  public function testTaxonomyVocabularyTranslation(): void {
     /** @var \Drupal\language\ConfigurableLanguageManagerInterface $language_manager */
     $language_manager = \Drupal::service('language_manager');
 
diff --git a/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTermLocalizedTranslationTest.php b/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTermLocalizedTranslationTest.php
index 926d7cafffcf..3417af607fcf 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTermLocalizedTranslationTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTermLocalizedTranslationTest.php
@@ -115,7 +115,7 @@ protected function assertHierarchy(string $vid, int $tid, array $parent_ids): vo
   /**
    * Tests the Drupal 6 i18n localized taxonomy term to Drupal 8 migration.
    */
-  public function testTranslatedLocalizedTaxonomyTerms() {
+  public function testTranslatedLocalizedTaxonomyTerms(): void {
     $this->assertEntity(19, 'en', 'Jupiter Station', 'vocablocalized', 'Holographic research.', 'filtered_html', 0, []);
     $this->assertEntity(20, 'en', 'DS9', 'vocablocalized', 'Terok Nor', 'filtered_html', 0, []);
     $this->assertEntity(25, 'en', 'Emissary', 'vocablocalized2', 'Pilot episode', 'filtered_html', 0, []);
diff --git a/core/modules/taxonomy/tests/src/Kernel/PendingRevisionTest.php b/core/modules/taxonomy/tests/src/Kernel/PendingRevisionTest.php
index ba42428c66ff..0030b64b08c8 100644
--- a/core/modules/taxonomy/tests/src/Kernel/PendingRevisionTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/PendingRevisionTest.php
@@ -47,7 +47,7 @@ protected function setUp(): void {
   /**
    * Tests that the taxonomy index work correctly with pending revisions.
    */
-  public function testTaxonomyIndexWithPendingRevision() {
+  public function testTaxonomyIndexWithPendingRevision(): void {
     \Drupal::configFactory()->getEditable('taxonomy.settings')->set('maintain_index_table', TRUE)->save();
 
     Vocabulary::create([
diff --git a/core/modules/taxonomy/tests/src/Kernel/TaxonomyQueryAlterTest.php b/core/modules/taxonomy/tests/src/Kernel/TaxonomyQueryAlterTest.php
index 7343586c2f1a..785a060eb105 100644
--- a/core/modules/taxonomy/tests/src/Kernel/TaxonomyQueryAlterTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/TaxonomyQueryAlterTest.php
@@ -31,7 +31,7 @@ class TaxonomyQueryAlterTest extends KernelTestBase {
   /**
    * Tests that appropriate tags are added when querying the database.
    */
-  public function testTaxonomyQueryAlter() {
+  public function testTaxonomyQueryAlter(): void {
     $this->installEntitySchema('taxonomy_term');
 
     // Create a new vocabulary and add a few terms to it.
diff --git a/core/modules/taxonomy/tests/src/Kernel/TermEntityQueryTest.php b/core/modules/taxonomy/tests/src/Kernel/TermEntityQueryTest.php
index 9916995674cf..91ccb65d9016 100644
--- a/core/modules/taxonomy/tests/src/Kernel/TermEntityQueryTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/TermEntityQueryTest.php
@@ -30,7 +30,7 @@ class TermEntityQueryTest extends KernelTestBase {
   /**
    * Tests that a basic taxonomy entity query works.
    */
-  public function testTermEntityQuery() {
+  public function testTermEntityQuery(): void {
     $this->installEntitySchema('taxonomy_term');
     $vocabulary = $this->createVocabulary();
 
diff --git a/core/modules/taxonomy/tests/src/Kernel/TermEntityReferenceTest.php b/core/modules/taxonomy/tests/src/Kernel/TermEntityReferenceTest.php
index 417725d8ad0d..ab302e6b419d 100644
--- a/core/modules/taxonomy/tests/src/Kernel/TermEntityReferenceTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/TermEntityReferenceTest.php
@@ -47,7 +47,7 @@ protected function setUp(): void {
    * field to limit the target vocabulary to one of them, ensuring that
    * the restriction applies.
    */
-  public function testSelectionTestVocabularyRestriction() {
+  public function testSelectionTestVocabularyRestriction(): void {
     // Create two vocabularies.
     $vocabulary = Vocabulary::create([
       'name' => 'test1',
diff --git a/core/modules/taxonomy/tests/src/Kernel/TermHierarchyValidationTest.php b/core/modules/taxonomy/tests/src/Kernel/TermHierarchyValidationTest.php
index 04596aefd8c6..ea45ce863271 100644
--- a/core/modules/taxonomy/tests/src/Kernel/TermHierarchyValidationTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/TermHierarchyValidationTest.php
@@ -33,7 +33,7 @@ protected function setUp(): void {
   /**
    * Tests the term hierarchy validation with re-parenting in pending revisions.
    */
-  public function testTermHierarchyValidation() {
+  public function testTermHierarchyValidation(): void {
     $vocabulary_id = $this->randomMachineName();
     $vocabulary = Vocabulary::create([
       'name' => $vocabulary_id,
diff --git a/core/modules/taxonomy/tests/src/Kernel/TermKernelTest.php b/core/modules/taxonomy/tests/src/Kernel/TermKernelTest.php
index b77aeca661c5..c49bdef2fb13 100644
--- a/core/modules/taxonomy/tests/src/Kernel/TermKernelTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/TermKernelTest.php
@@ -37,7 +37,7 @@ protected function setUp(): void {
   /**
    * Tests that a deleted term is no longer in the vocabulary.
    */
-  public function testTermDelete() {
+  public function testTermDelete(): void {
     $vocabulary = $this->createVocabulary();
     $valid_term = $this->createTerm($vocabulary);
     // Delete a valid term.
@@ -49,7 +49,7 @@ public function testTermDelete() {
   /**
    * Deleting a parent of a term with multiple parents does not delete the term.
    */
-  public function testMultipleParentDelete() {
+  public function testMultipleParentDelete(): void {
     $vocabulary = $this->createVocabulary();
     $parent_term1 = $this->createTerm($vocabulary);
     $parent_term2 = $this->createTerm($vocabulary);
@@ -73,7 +73,7 @@ public function testMultipleParentDelete() {
   /**
    * Tests a taxonomy with terms that have multiple parents of different depths.
    */
-  public function testTaxonomyVocabularyTree() {
+  public function testTaxonomyVocabularyTree(): void {
     // Create a new vocabulary with 6 terms.
     $vocabulary = $this->createVocabulary();
     $term = [];
@@ -153,7 +153,7 @@ public function testTaxonomyVocabularyTree() {
   /**
    * Tests that a Term is renderable when unsaved (preview).
    */
-  public function testTermPreview() {
+  public function testTermPreview(): void {
     $entity_manager = \Drupal::entityTypeManager();
     $vocabulary = $this->createVocabulary();
 
diff --git a/core/modules/taxonomy/tests/src/Kernel/TermValidationTest.php b/core/modules/taxonomy/tests/src/Kernel/TermValidationTest.php
index 7228b08a6967..9443b3081ddc 100644
--- a/core/modules/taxonomy/tests/src/Kernel/TermValidationTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/TermValidationTest.php
@@ -32,7 +32,7 @@ protected function setUp(): void {
   /**
    * Tests the term validation constraints.
    */
-  public function testValidation() {
+  public function testValidation(): void {
     $this->entityTypeManager->getStorage('taxonomy_vocabulary')->create([
       'vid' => 'tags',
       'name' => 'Tags',
diff --git a/core/modules/taxonomy/tests/src/Kernel/TokenReplaceTest.php b/core/modules/taxonomy/tests/src/Kernel/TokenReplaceTest.php
index 6fdfd55f1d70..a0253d1aab99 100644
--- a/core/modules/taxonomy/tests/src/Kernel/TokenReplaceTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/TokenReplaceTest.php
@@ -97,7 +97,7 @@ protected function setUp(): void {
   /**
    * Creates some terms and a node, then tests the tokens generated from them.
    */
-  public function testTaxonomyTokenReplacement() {
+  public function testTaxonomyTokenReplacement(): void {
     $token_service = \Drupal::token();
     $language_interface = \Drupal::languageManager()->getCurrentLanguage();
 
diff --git a/core/modules/taxonomy/tests/src/Kernel/Views/ArgumentTransformTermTest.php b/core/modules/taxonomy/tests/src/Kernel/Views/ArgumentTransformTermTest.php
index 3375dea2faf8..a6ab7c67c0ee 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Views/ArgumentTransformTermTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Views/ArgumentTransformTermTest.php
@@ -29,7 +29,7 @@ class ArgumentTransformTermTest extends TaxonomyTestBase {
    * @param string $name
    *   The name of the taxonomy term to use for the test.
    */
-  public function testTermArgumentTransformation($name) {
+  public function testTermArgumentTransformation($name): void {
     /** @var \Drupal\taxonomy\TermInterface $term */
     $term = $this->createTerm(['name' => $name]);
 
diff --git a/core/modules/taxonomy/tests/src/Kernel/Views/ArgumentValidatorTermNameTest.php b/core/modules/taxonomy/tests/src/Kernel/Views/ArgumentValidatorTermNameTest.php
index f93307a47424..582fd7c7d342 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Views/ArgumentValidatorTermNameTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Views/ArgumentValidatorTermNameTest.php
@@ -80,7 +80,7 @@ protected function setUp($import_test_views = TRUE): void {
   /**
    * Tests the term name argument validator plugin.
    */
-  public function testArgumentValidatorTermName() {
+  public function testArgumentValidatorTermName(): void {
     $view = Views::getView('test_taxonomy_name_argument');
     $view->initHandlers();
 
@@ -150,7 +150,7 @@ public function testArgumentValidatorTermName() {
   /**
    * Tests the access checking in term name argument validator plugin.
    */
-  public function testArgumentValidatorTermNameAccess() {
+  public function testArgumentValidatorTermNameAccess(): void {
     $this->installConfig(['user']);
     $this->setCurrentUser($this->createUser(['access content']));
     $view = Views::getView('test_taxonomy_name_argument');
diff --git a/core/modules/taxonomy/tests/src/Kernel/Views/ArgumentValidatorTermTest.php b/core/modules/taxonomy/tests/src/Kernel/Views/ArgumentValidatorTermTest.php
index 27091feb3681..b693dc9aa19e 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Views/ArgumentValidatorTermTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Views/ArgumentValidatorTermTest.php
@@ -56,7 +56,7 @@ protected function setUp($import_test_views = TRUE): void {
   /**
    * Tests the term argument validator plugin.
    */
-  public function testArgumentValidatorTerm() {
+  public function testArgumentValidatorTerm(): void {
     $view = Views::getView('test_argument_validator_term');
     $view->initHandlers();
 
diff --git a/core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyDefaultArgumentTest.php b/core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyDefaultArgumentTest.php
index 09138983a146..eea33c764b12 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyDefaultArgumentTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyDefaultArgumentTest.php
@@ -56,7 +56,7 @@ protected function initViewWithRequest($request_url, $view_name = 'taxonomy_defa
   /**
    * Tests the relationship.
    */
-  public function testNodePath() {
+  public function testNodePath(): void {
     $view = $this->initViewWithRequest($this->nodes[0]->toUrl()->toString());
 
     $expected = implode(',', [$this->term1->id(), $this->term2->id()]);
@@ -65,7 +65,7 @@ public function testNodePath() {
     $view->destroy();
   }
 
-  public function testNodePathWithViewSelection() {
+  public function testNodePathWithViewSelection(): void {
     // Change the term entity reference field to use a view as selection plugin.
     \Drupal::service('module_installer')->install(['entity_reference_test']);
 
@@ -87,7 +87,7 @@ public function testNodePathWithViewSelection() {
     $this->assertEquals($this->nodes[0]->getCacheTags(), $view->argument['tid']->getPlugin('argument_default')->getCacheTags());
   }
 
-  public function testTermPath() {
+  public function testTermPath(): void {
     $view = $this->initViewWithRequest($this->term1->toUrl()->toString());
 
     $expected = $this->term1->id();
diff --git a/core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyFieldTidTest.php b/core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyFieldTidTest.php
index 295c6d6d2793..fd3037bd3abc 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyFieldTidTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyFieldTidTest.php
@@ -61,7 +61,7 @@ protected function setUp($import_test_views = TRUE): void {
   /**
    * Tests the taxonomy field handler.
    */
-  public function testViewsHandlerTidField() {
+  public function testViewsHandlerTidField(): void {
     /** @var \Drupal\Core\Render\RendererInterface $renderer */
     $renderer = \Drupal::service('renderer');
 
diff --git a/core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyFieldVidTest.php b/core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyFieldVidTest.php
index 33d80f99a46c..74f4d3238c7a 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyFieldVidTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyFieldVidTest.php
@@ -83,7 +83,7 @@ protected function setUp($import_test_views = TRUE): void {
   /**
    * Tests the field handling for the Vocabulary ID.
    */
-  public function testViewsHandlerVidField() {
+  public function testViewsHandlerVidField(): void {
     /** @var \Drupal\Core\Render\RendererInterface $renderer */
     $renderer = \Drupal::service('renderer');
 
diff --git a/core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyIndexTidFilterTest.php b/core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyIndexTidFilterTest.php
index ccfb90379bd8..0e8324f82efb 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyIndexTidFilterTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyIndexTidFilterTest.php
@@ -61,7 +61,7 @@ protected function setUp($import_test_views = TRUE): void {
   /**
    * Tests dependencies are not added for terms that do not exist.
    */
-  public function testConfigDependency() {
+  public function testConfigDependency(): void {
     /** @var \Drupal\views\Entity\View $view */
     $view = View::load('test_filter_taxonomy_index_tid__non_existing_dependency');
 
diff --git a/core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyViewsFieldAccessTest.php b/core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyViewsFieldAccessTest.php
index 45912d80b104..da8c717ce8ee 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyViewsFieldAccessTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyViewsFieldAccessTest.php
@@ -32,7 +32,7 @@ protected function setUp($import_test_views = TRUE): void {
   /**
    * Check access for taxonomy fields.
    */
-  public function testTermFields() {
+  public function testTermFields(): void {
     $vocab = Vocabulary::create([
       'vid' => 'random',
       'name' => 'Randomness',
diff --git a/core/modules/taxonomy/tests/src/Kernel/VocabularyCrudTest.php b/core/modules/taxonomy/tests/src/Kernel/VocabularyCrudTest.php
index 2182b61491f4..bf8d4dbe47b0 100644
--- a/core/modules/taxonomy/tests/src/Kernel/VocabularyCrudTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/VocabularyCrudTest.php
@@ -44,7 +44,7 @@ protected function setUp(): void {
   /**
    * Tests deleting a taxonomy that contains terms.
    */
-  public function testTaxonomyVocabularyDeleteWithTerms() {
+  public function testTaxonomyVocabularyDeleteWithTerms(): void {
     $vocabulary = $this->createVocabulary();
     $query = \Drupal::entityQuery('taxonomy_term')->accessCheck(FALSE)->count();
 
@@ -74,7 +74,7 @@ public function testTaxonomyVocabularyDeleteWithTerms() {
   /**
    * Tests for loading multiple vocabularies.
    */
-  public function testTaxonomyVocabularyLoadMultiple() {
+  public function testTaxonomyVocabularyLoadMultiple(): void {
     // Ensure there are no vocabularies.
     $this->assertEmpty(Vocabulary::loadMultiple());
 
@@ -126,7 +126,7 @@ public function testTaxonomyVocabularyLoadMultiple() {
   /**
    * Tests uninstall and reinstall of the taxonomy module.
    */
-  public function testUninstallReinstall() {
+  public function testUninstallReinstall(): void {
     $vocabulary = $this->createVocabulary();
     // Field storages and fields attached to taxonomy term bundles should be
     // removed when the module is uninstalled.
diff --git a/core/modules/taxonomy/tests/src/Unit/Menu/TaxonomyLocalTasksTest.php b/core/modules/taxonomy/tests/src/Unit/Menu/TaxonomyLocalTasksTest.php
index dc6799c960aa..0b837081e415 100644
--- a/core/modules/taxonomy/tests/src/Unit/Menu/TaxonomyLocalTasksTest.php
+++ b/core/modules/taxonomy/tests/src/Unit/Menu/TaxonomyLocalTasksTest.php
@@ -26,7 +26,7 @@ protected function setUp(): void {
    *
    * @dataProvider getTaxonomyPageRoutes
    */
-  public function testTaxonomyPageLocalTasks($route, $subtask = []) {
+  public function testTaxonomyPageLocalTasks($route, $subtask = []): void {
     $tasks = [
       0 => ['entity.taxonomy_term.canonical', 'entity.taxonomy_term.edit_form', 'entity.taxonomy_term.delete_form'],
     ];
diff --git a/core/modules/taxonomy/tests/src/Unit/Plugin/migrate/field/TaxonomyTermReferenceFieldTest.php b/core/modules/taxonomy/tests/src/Unit/Plugin/migrate/field/TaxonomyTermReferenceFieldTest.php
index 687ca4557402..58c14e4542d9 100644
--- a/core/modules/taxonomy/tests/src/Unit/Plugin/migrate/field/TaxonomyTermReferenceFieldTest.php
+++ b/core/modules/taxonomy/tests/src/Unit/Plugin/migrate/field/TaxonomyTermReferenceFieldTest.php
@@ -50,7 +50,7 @@ protected function setUp(): void {
   /**
    * @covers ::defineValueProcessPipeline
    */
-  public function testDefineValueProcessPipeline($method = 'defineValueProcessPipeline') {
+  public function testDefineValueProcessPipeline($method = 'defineValueProcessPipeline'): void {
     $this->plugin->$method($this->migration, 'field_name', []);
 
     $expected = [
diff --git a/core/modules/telephone/tests/src/Functional/TelephoneFieldTest.php b/core/modules/telephone/tests/src/Functional/TelephoneFieldTest.php
index ed72f844b675..16573fffa8de 100644
--- a/core/modules/telephone/tests/src/Functional/TelephoneFieldTest.php
+++ b/core/modules/telephone/tests/src/Functional/TelephoneFieldTest.php
@@ -90,7 +90,7 @@ protected function setUp(): void {
    *
    * @covers \Drupal\telephone\Plugin\Field\FieldWidget\TelephoneDefaultWidget::formElement
    */
-  public function testTelephoneWidget() {
+  public function testTelephoneWidget(): void {
     $this->drupalGet('node/add/article');
     $this->assertSession()->fieldValueEquals("field_telephone[0][value]", '');
     $this->assertSession()->elementAttributeContains('css', 'input[name="field_telephone[0][value]"]', 'maxlength', (string) TelephoneItem::MAX_LENGTH);
@@ -104,7 +104,7 @@ public function testTelephoneWidget() {
    *
    * @dataProvider providerPhoneNumbers
    */
-  public function testTelephoneFormatter($input, $expected) {
+  public function testTelephoneFormatter($input, $expected): void {
     // Test basic entry of telephone field.
     $edit = [
       'title[0][value]' => $this->randomMachineName(),
diff --git a/core/modules/telephone/tests/src/Kernel/TelephoneItemTest.php b/core/modules/telephone/tests/src/Kernel/TelephoneItemTest.php
index 7541a4a24399..b05ba71609c0 100644
--- a/core/modules/telephone/tests/src/Kernel/TelephoneItemTest.php
+++ b/core/modules/telephone/tests/src/Kernel/TelephoneItemTest.php
@@ -48,7 +48,7 @@ protected function setUp(): void {
   /**
    * Tests using entity fields of the telephone field type.
    */
-  public function testTestItem() {
+  public function testTestItem(): void {
     // Verify entity creation.
     $entity = EntityTest::create();
     $value = '+0123456789';
diff --git a/core/modules/text/tests/src/Functional/TextFieldTest.php b/core/modules/text/tests/src/Functional/TextFieldTest.php
index 8bfce08a22ba..1ad2c627f3a5 100644
--- a/core/modules/text/tests/src/Functional/TextFieldTest.php
+++ b/core/modules/text/tests/src/Functional/TextFieldTest.php
@@ -59,7 +59,7 @@ protected function setUp(): void {
   /**
    * Tests text field validation.
    */
-  public function testTextFieldValidation() {
+  public function testTextFieldValidation(): void {
     // Create a field with settings to validate.
     $max_length = 3;
     $field_name = $this->randomMachineName();
@@ -94,7 +94,7 @@ public function testTextFieldValidation() {
   /**
    * Tests required long text with file upload.
    */
-  public function testRequiredLongTextWithFileUpload() {
+  public function testRequiredLongTextWithFileUpload(): void {
     // Create a text field.
     $text_field_name = 'text_long';
     $field_storage = FieldStorageConfig::create([
@@ -156,7 +156,7 @@ public function testRequiredLongTextWithFileUpload() {
   /**
    * Tests widgets.
    */
-  public function testTextfieldWidgets() {
+  public function testTextfieldWidgets(): void {
     $this->_testTextfieldWidgets('text', 'text_textfield');
     $this->_testTextfieldWidgets('text_long', 'text_textarea');
   }
@@ -164,7 +164,7 @@ public function testTextfieldWidgets() {
   /**
    * Tests widgets + 'formatted_text' setting.
    */
-  public function testTextfieldWidgetsFormatted() {
+  public function testTextfieldWidgetsFormatted(): void {
     $this->_testTextfieldWidgetsFormatted('text', 'text_textfield');
     $this->_testTextfieldWidgetsFormatted('text_long', 'text_textarea');
   }
@@ -172,7 +172,7 @@ public function testTextfieldWidgetsFormatted() {
   /**
    * Test widgets for fields with selected allowed formats.
    */
-  public function testTextfieldWidgetsAllowedFormats() {
+  public function testTextfieldWidgetsAllowedFormats(): void {
     // Create one text format.
     $this->drupalLogin($this->adminUser);
     $format1 = FilterFormat::create([
diff --git a/core/modules/text/tests/src/FunctionalJavascript/TextareaWithSummaryTest.php b/core/modules/text/tests/src/FunctionalJavascript/TextareaWithSummaryTest.php
index 02a2e0f345c3..957b7ae5e9d1 100644
--- a/core/modules/text/tests/src/FunctionalJavascript/TextareaWithSummaryTest.php
+++ b/core/modules/text/tests/src/FunctionalJavascript/TextareaWithSummaryTest.php
@@ -66,7 +66,7 @@ protected function assertSummaryToggle(): void {
   /**
    * Tests the textSummary javascript behavior.
    */
-  public function testTextSummaryBehavior() {
+  public function testTextSummaryBehavior(): void {
     // Test with field defaults.
     $this->assertSummaryToggle();
 
@@ -104,7 +104,7 @@ public function testTextSummaryBehavior() {
   /**
    * Tests that the textSummary behavior is not run for required summary fields.
    */
-  public function testTextSummaryRequiredBehavior() {
+  public function testTextSummaryRequiredBehavior(): void {
     // Test with field defaults.
     $this->assertSummaryToggle();
 
diff --git a/core/modules/text/tests/src/Kernel/Migrate/MigrateTextConfigsTest.php b/core/modules/text/tests/src/Kernel/Migrate/MigrateTextConfigsTest.php
index 87b6e4cb5dc9..6723859b96e5 100644
--- a/core/modules/text/tests/src/Kernel/Migrate/MigrateTextConfigsTest.php
+++ b/core/modules/text/tests/src/Kernel/Migrate/MigrateTextConfigsTest.php
@@ -27,7 +27,7 @@ protected function setUp(): void {
   /**
    * Tests migration of text variables to text.settings.yml.
    */
-  public function testTextSettings() {
+  public function testTextSettings(): void {
     $config = $this->config('text.settings');
     $this->assertSame(456, $config->get('default_summary_length'));
     $this->assertConfigSchema(\Drupal::service('config.typed'), 'text.settings', $config->get());
diff --git a/core/modules/text/tests/src/Kernel/TextFormatterTest.php b/core/modules/text/tests/src/Kernel/TextFormatterTest.php
index 02a0491f754a..2bb80eaad98e 100644
--- a/core/modules/text/tests/src/Kernel/TextFormatterTest.php
+++ b/core/modules/text/tests/src/Kernel/TextFormatterTest.php
@@ -71,7 +71,7 @@ protected function setUp(): void {
   /**
    * Tests all text field formatters.
    */
-  public function testFormatters() {
+  public function testFormatters(): void {
     $formatters = [
       'text_default',
       'text_trimmed',
diff --git a/core/modules/text/tests/src/Kernel/TextItemBaseTest.php b/core/modules/text/tests/src/Kernel/TextItemBaseTest.php
index c080a1ecb466..6d8ce13e160c 100644
--- a/core/modules/text/tests/src/Kernel/TextItemBaseTest.php
+++ b/core/modules/text/tests/src/Kernel/TextItemBaseTest.php
@@ -30,7 +30,7 @@ class TextItemBaseTest extends KernelTestBase {
    * @covers ::generateSampleValue
    * @dataProvider providerTextFieldSampleValue
    */
-  public function testTextFieldSampleValue($max_length) {
+  public function testTextFieldSampleValue($max_length): void {
     // Create a text field.
     $field_definition = BaseFieldDefinition::create('text')
       ->setTargetEntityTypeId('foo');
@@ -66,7 +66,7 @@ public static function providerTextFieldSampleValue() {
   /**
    * @covers ::calculateDependencies
    */
-  public function testCalculateDependencies() {
+  public function testCalculateDependencies(): void {
     $format = FilterFormat::create([
       'format' => 'test_format',
       'name' => 'Test format',
diff --git a/core/modules/text/tests/src/Kernel/TextSummaryTest.php b/core/modules/text/tests/src/Kernel/TextSummaryTest.php
index 89175b4a3b42..2a77312d18d3 100644
--- a/core/modules/text/tests/src/Kernel/TextSummaryTest.php
+++ b/core/modules/text/tests/src/Kernel/TextSummaryTest.php
@@ -43,7 +43,7 @@ protected function setUp(): void {
   /**
    * Tests text summaries for a question followed by a sentence.
    */
-  public function testFirstSentenceQuestion() {
+  public function testFirstSentenceQuestion(): void {
     $text = 'A question? A sentence. Another sentence.';
     $expected = 'A question? A sentence.';
     $this->assertTextSummary($text, $expected, NULL, 30);
@@ -52,7 +52,7 @@ public function testFirstSentenceQuestion() {
   /**
    * Tests summary with long example.
    */
-  public function testLongSentence() {
+  public function testLongSentence(): void {
     // 125.
     // cSpell:disable
     $text =
@@ -74,7 +74,7 @@ public function testLongSentence() {
   /**
    * Tests various summary length edge cases.
    */
-  public function testLength() {
+  public function testLength(): void {
     FilterFormat::create([
       'format' => 'autop',
       'name' => 'Autop',
@@ -234,7 +234,7 @@ public function testLength() {
    *
    * @see text_summary()
    */
-  public function testInvalidFilterFormat() {
+  public function testInvalidFilterFormat(): void {
 
     $this->assertTextSummary($this->randomString(100), '', 'non_existent_format');
   }
@@ -252,7 +252,7 @@ public function assertTextSummary(string $text, string $expected, ?string $forma
   /**
    * Tests required summary.
    */
-  public function testRequiredSummary() {
+  public function testRequiredSummary(): void {
     $this->installEntitySchema('entity_test');
     $this->setUpCurrentUser();
     $field_definition = FieldStorageConfig::create([
@@ -314,7 +314,7 @@ public function testRequiredSummary() {
   /**
    * Test text normalization when filter_html or filter_htmlcorrector enabled.
    */
-  public function testNormalization() {
+  public function testNormalization(): void {
     FilterFormat::create([
       'format' => 'filter_html_enabled',
       'name' => 'Filter HTML enabled',
diff --git a/core/modules/text/tests/src/Kernel/TextWithSummaryItemTest.php b/core/modules/text/tests/src/Kernel/TextWithSummaryItemTest.php
index 6f1e92ec78f0..218140a49254 100644
--- a/core/modules/text/tests/src/Kernel/TextWithSummaryItemTest.php
+++ b/core/modules/text/tests/src/Kernel/TextWithSummaryItemTest.php
@@ -59,7 +59,7 @@ protected function setUp(): void {
   /**
    * Tests processed properties.
    */
-  public function testCrudAndUpdate() {
+  public function testCrudAndUpdate(): void {
     $entity_type = 'entity_test';
     $this->createField($entity_type);
 
diff --git a/core/modules/text/tests/src/Unit/Plugin/migrate/field/d6/TextFieldTest.php b/core/modules/text/tests/src/Unit/Plugin/migrate/field/d6/TextFieldTest.php
index 644e4d4457f1..dae798482d59 100644
--- a/core/modules/text/tests/src/Unit/Plugin/migrate/field/d6/TextFieldTest.php
+++ b/core/modules/text/tests/src/Unit/Plugin/migrate/field/d6/TextFieldTest.php
@@ -53,7 +53,7 @@ protected function setUp(): void {
   /**
    * @covers ::defineValueProcessPipeline
    */
-  public function testFilteredTextValueProcessPipeline() {
+  public function testFilteredTextValueProcessPipeline(): void {
     $field_info = [
       'widget_type' => 'text_textfield',
     ];
@@ -76,7 +76,7 @@ public function testFilteredTextValueProcessPipeline() {
   /**
    * @covers ::defineValueProcessPipeline
    */
-  public function testBooleanTextImplicitValueProcessPipeline() {
+  public function testBooleanTextImplicitValueProcessPipeline(): void {
     $info = [
       'widget_type' => 'optionwidgets_onoff',
       'global_settings' => [
@@ -101,7 +101,7 @@ public function testBooleanTextImplicitValueProcessPipeline() {
   /**
    * @covers ::defineValueProcessPipeline
    */
-  public function testBooleanTextExplicitValueProcessPipeline() {
+  public function testBooleanTextExplicitValueProcessPipeline(): void {
     $info = [
       'widget_type' => 'optionwidgets_onoff',
       'global_settings' => [
@@ -163,7 +163,7 @@ public static function getFieldTypeProvider() {
    * @covers ::getFieldType
    * @dataProvider getFieldTypeProvider
    */
-  public function testGetFieldType($expected_type, $widget_type, array $settings = []) {
+  public function testGetFieldType($expected_type, $widget_type, array $settings = []): void {
     $row = new Row();
     $row->setSourceProperty('widget_type', $widget_type);
     $row->setSourceProperty('global_settings', $settings);
diff --git a/core/modules/text/tests/src/Unit/Plugin/migrate/field/d7/TextFieldTest.php b/core/modules/text/tests/src/Unit/Plugin/migrate/field/d7/TextFieldTest.php
index 78cb15b86ffe..a057db6f1a0a 100644
--- a/core/modules/text/tests/src/Unit/Plugin/migrate/field/d7/TextFieldTest.php
+++ b/core/modules/text/tests/src/Unit/Plugin/migrate/field/d7/TextFieldTest.php
@@ -44,7 +44,7 @@ public static function getFieldFormatterTypeProvider() {
    * @covers ::getFieldType
    * @dataProvider getFieldFormatterTypeProvider
    */
-  public function testGetFieldFormatterType($type, $formatter_type, $expected) {
+  public function testGetFieldFormatterType($type, $formatter_type, $expected): void {
     $row = new Row();
     $row->setSourceProperty('type', $type);
     $row->setSourceProperty('formatter/type', $formatter_type);
diff --git a/core/modules/toolbar/tests/src/Functional/ToolbarAdminMenuTest.php b/core/modules/toolbar/tests/src/Functional/ToolbarAdminMenuTest.php
index d54dcebfc60e..39faebd2bb9f 100644
--- a/core/modules/toolbar/tests/src/Functional/ToolbarAdminMenuTest.php
+++ b/core/modules/toolbar/tests/src/Functional/ToolbarAdminMenuTest.php
@@ -124,7 +124,7 @@ protected function setUp(): void {
    * @see toolbar_modules_installed()
    * @see toolbar_modules_uninstalled()
    */
-  public function testModuleStatusChangeSubtreesHashCacheClear() {
+  public function testModuleStatusChangeSubtreesHashCacheClear(): void {
     // Use an admin role to ensure the user has all available permissions. This
     // results in the admin menu links changing as the taxonomy module is
     // installed and uninstalled because the role will always have the
@@ -162,7 +162,7 @@ public function testModuleStatusChangeSubtreesHashCacheClear() {
   /**
    * Tests toolbar cache tags implementation.
    */
-  public function testMenuLinkUpdateSubtreesHashCacheClear() {
+  public function testMenuLinkUpdateSubtreesHashCacheClear(): void {
     // The ID of (any) admin menu link.
     $admin_menu_link_id = 'system.admin_config_development';
 
@@ -185,7 +185,7 @@ public function testMenuLinkUpdateSubtreesHashCacheClear() {
    * @see toolbar_user_role_update()
    * @see toolbar_user_update()
    */
-  public function testUserRoleUpdateSubtreesHashCacheClear() {
+  public function testUserRoleUpdateSubtreesHashCacheClear(): void {
     // Find the new role ID.
     $all_rids = $this->adminUser->getRoles();
     unset($all_rids[array_search(RoleInterface::AUTHENTICATED_ID, $all_rids)]);
@@ -250,7 +250,7 @@ public function testUserRoleUpdateSubtreesHashCacheClear() {
   /**
    * Tests cache invalidation when one user modifies another user.
    */
-  public function testNonCurrentUserAccountUpdates() {
+  public function testNonCurrentUserAccountUpdates(): void {
     $admin_user_id = $this->adminUser->id();
     $this->hash = $this->getSubtreesHash();
 
@@ -286,7 +286,7 @@ public function testNonCurrentUserAccountUpdates() {
   /**
    * Tests that toolbar cache is cleared when string translations are made.
    */
-  public function testLocaleTranslationSubtreesHashCacheClear() {
+  public function testLocaleTranslationSubtreesHashCacheClear(): void {
     $admin_user = $this->adminUser;
     // User to translate and delete string.
     $translate_user = $this->drupalCreateUser([
@@ -379,7 +379,7 @@ public function testLocaleTranslationSubtreesHashCacheClear() {
   /**
    * Tests that the 'toolbar/subtrees/{hash}' is reachable and correct.
    */
-  public function testSubtreesJsonRequest() {
+  public function testSubtreesJsonRequest(): void {
     $admin_user = $this->adminUser;
     $this->drupalLogin($admin_user);
     // Request a new page to refresh the drupalSettings object.
@@ -394,7 +394,7 @@ public function testSubtreesJsonRequest() {
   /**
    * Tests that subtrees hashes vary by the language of the page.
    */
-  public function testLanguageSwitching() {
+  public function testLanguageSwitching(): void {
     // Create a new language with the langcode 'xx'.
     $langcode = 'xx';
     $language = ConfigurableLanguage::createFromLangcode($langcode);
@@ -418,7 +418,7 @@ public function testLanguageSwitching() {
   /**
    * Tests that back to site link exists on admin pages, not on content pages.
    */
-  public function testBackToSiteLink() {
+  public function testBackToSiteLink(): void {
     // Back to site link should exist in the markup.
     $this->drupalGet('test-page');
     $back_link = $this->cssSelect('.home-toolbar-tab');
@@ -428,7 +428,7 @@ public function testBackToSiteLink() {
   /**
    * Tests that external links added to the menu appear in the toolbar.
    */
-  public function testExternalLink() {
+  public function testExternalLink(): void {
     $edit = [
       'title[0][value]' => 'External URL',
       'link[0][uri]' => 'http://example.org',
diff --git a/core/modules/toolbar/tests/src/Functional/ToolbarCacheContextsTest.php b/core/modules/toolbar/tests/src/Functional/ToolbarCacheContextsTest.php
index 991ba659171b..bd8b056e1c7c 100644
--- a/core/modules/toolbar/tests/src/Functional/ToolbarCacheContextsTest.php
+++ b/core/modules/toolbar/tests/src/Functional/ToolbarCacheContextsTest.php
@@ -68,7 +68,7 @@ protected function setUp(): void {
   /**
    * Tests toolbar cache integration.
    */
-  public function testCacheIntegration() {
+  public function testCacheIntegration(): void {
     $this->installExtraModules(['csrf_test', 'dynamic_page_cache']);
     $this->drupalLogin($this->adminUser);
     $this->drupalGet('test-page');
@@ -82,7 +82,7 @@ public function testCacheIntegration() {
   /**
    * Tests toolbar cache contexts.
    */
-  public function testToolbarCacheContextsCaller() {
+  public function testToolbarCacheContextsCaller(): void {
     // Test with default combination and permission to see toolbar.
     $this->assertToolbarCacheContexts(['user', 'session'], 'Expected cache contexts found for default combination and permission to see toolbar.');
 
diff --git a/core/modules/toolbar/tests/src/Functional/ToolbarHookToolbarTest.php b/core/modules/toolbar/tests/src/Functional/ToolbarHookToolbarTest.php
index 575e56a66e01..03fcc60ab95f 100644
--- a/core/modules/toolbar/tests/src/Functional/ToolbarHookToolbarTest.php
+++ b/core/modules/toolbar/tests/src/Functional/ToolbarHookToolbarTest.php
@@ -46,7 +46,7 @@ protected function setUp(): void {
   /**
    * Tests for a tab and tray provided by a module implementing hook_toolbar().
    */
-  public function testHookToolbar() {
+  public function testHookToolbar(): void {
     $this->drupalGet('test-page');
     $this->assertSession()->statusCodeEquals(200);
 
diff --git a/core/modules/toolbar/tests/src/Functional/ToolbarMenuTranslationTest.php b/core/modules/toolbar/tests/src/Functional/ToolbarMenuTranslationTest.php
index 2eef9be6ecc3..3f856e9e88c3 100644
--- a/core/modules/toolbar/tests/src/Functional/ToolbarMenuTranslationTest.php
+++ b/core/modules/toolbar/tests/src/Functional/ToolbarMenuTranslationTest.php
@@ -58,7 +58,7 @@ protected function setUp(): void {
   /**
    * Tests that toolbar classes don't change when adding a translation.
    */
-  public function testToolbarClasses() {
+  public function testToolbarClasses(): void {
     $langcode = 'es';
 
     // Add Spanish.
diff --git a/core/modules/toolbar/tests/src/FunctionalJavascript/ToolbarActiveTrailTest.php b/core/modules/toolbar/tests/src/FunctionalJavascript/ToolbarActiveTrailTest.php
index e14a32ba0d53..5c698f23f4bf 100644
--- a/core/modules/toolbar/tests/src/FunctionalJavascript/ToolbarActiveTrailTest.php
+++ b/core/modules/toolbar/tests/src/FunctionalJavascript/ToolbarActiveTrailTest.php
@@ -51,7 +51,7 @@ protected function setUp(): void {
    *
    * @throws \Behat\Mink\Exception\ElementNotFoundException
    */
-  public function testToolbarActiveTrail(string $orientation) {
+  public function testToolbarActiveTrail(string $orientation): void {
     $page = $this->getSession()->getPage();
     $assert_session = $this->assertSession();
 
diff --git a/core/modules/toolbar/tests/src/FunctionalJavascript/ToolbarIntegrationTest.php b/core/modules/toolbar/tests/src/FunctionalJavascript/ToolbarIntegrationTest.php
index 5c327a71e81a..c315f9f6ebb0 100644
--- a/core/modules/toolbar/tests/src/FunctionalJavascript/ToolbarIntegrationTest.php
+++ b/core/modules/toolbar/tests/src/FunctionalJavascript/ToolbarIntegrationTest.php
@@ -26,7 +26,7 @@ class ToolbarIntegrationTest extends WebDriverTestBase {
   /**
    * Tests if the toolbar can be toggled with JavaScript.
    */
-  public function testToolbarToggling() {
+  public function testToolbarToggling(): void {
     $admin_user = $this->drupalCreateUser([
       'access toolbar',
       'administer site configuration',
@@ -63,7 +63,7 @@ public function testToolbarToggling() {
   /**
    * Tests that the orientation toggle is not shown for empty toolbar items.
    */
-  public function testEmptyTray() {
+  public function testEmptyTray(): void {
     // Granting access to the toolbar but not any administrative menu links will
     // result in an empty toolbar tray for the "Manage" toolbar item.
     $admin_user = $this->drupalCreateUser([
diff --git a/core/modules/toolbar/tests/src/FunctionalJavascript/ToolbarStoredStateTest.php b/core/modules/toolbar/tests/src/FunctionalJavascript/ToolbarStoredStateTest.php
index 9f22e736d568..7e2d7b5e0c3b 100644
--- a/core/modules/toolbar/tests/src/FunctionalJavascript/ToolbarStoredStateTest.php
+++ b/core/modules/toolbar/tests/src/FunctionalJavascript/ToolbarStoredStateTest.php
@@ -24,7 +24,7 @@ class ToolbarStoredStateTest extends WebDriverTestBase {
    */
   protected $defaultTheme = 'stark';
 
-  public function testToolbarStoredState() {
+  public function testToolbarStoredState(): void {
     $admin_user = $this->drupalCreateUser([
       'access toolbar',
       'administer site configuration',
diff --git a/core/modules/toolbar/tests/src/Unit/PageCache/AllowToolbarPathTest.php b/core/modules/toolbar/tests/src/Unit/PageCache/AllowToolbarPathTest.php
index 0b91bc2be860..9a5740cdb32b 100644
--- a/core/modules/toolbar/tests/src/Unit/PageCache/AllowToolbarPathTest.php
+++ b/core/modules/toolbar/tests/src/Unit/PageCache/AllowToolbarPathTest.php
@@ -37,7 +37,7 @@ protected function setUp(): void {
    * @dataProvider providerTestAllowToolbarPath
    * @covers ::check
    */
-  public function testAllowToolbarPath($expected_result, $path) {
+  public function testAllowToolbarPath($expected_result, $path): void {
     $request = Request::create($path);
     $result = $this->policy->check($request);
     $this->assertSame($expected_result, $result);
diff --git a/core/modules/update/tests/src/Functional/FileTransferAuthorizeFormTest.php b/core/modules/update/tests/src/Functional/FileTransferAuthorizeFormTest.php
index e871d8d13550..57cf35414144 100644
--- a/core/modules/update/tests/src/Functional/FileTransferAuthorizeFormTest.php
+++ b/core/modules/update/tests/src/Functional/FileTransferAuthorizeFormTest.php
@@ -43,7 +43,7 @@ protected function setUp(): void {
    *
    * @dataProvider archiveFileUrlProvider
    */
-  public function testViaAuthorize($url) {
+  public function testViaAuthorize($url): void {
     // Ensure the that we can select which file transfer backend to use.
     \Drupal::state()->set('test_uploaders_via_prompt', TRUE);
 
diff --git a/core/modules/update/tests/src/Functional/UpdateContribTest.php b/core/modules/update/tests/src/Functional/UpdateContribTest.php
index 1447874a62ca..9e069db4c0d0 100644
--- a/core/modules/update/tests/src/Functional/UpdateContribTest.php
+++ b/core/modules/update/tests/src/Functional/UpdateContribTest.php
@@ -54,7 +54,7 @@ protected function setUp(): void {
   /**
    * Tests when there is no available release data for a contrib module.
    */
-  public function testNoReleasesAvailable() {
+  public function testNoReleasesAvailable(): void {
     $this->mockInstalledExtensionsInfo([
       'aaa_update_test' => [
         'project' => 'aaa_update_test',
@@ -83,7 +83,7 @@ public function testNoReleasesAvailable() {
   /**
    * Tests the basic functionality of a contrib module on the status report.
    */
-  public function testUpdateContribBasic() {
+  public function testUpdateContribBasic(): void {
     $installed_extensions = [
       'aaa_update_test' => [
         'project' => 'aaa_update_test',
@@ -147,7 +147,7 @@ public function testUpdateContribBasic() {
    * if you sort alphabetically by module name (which is the order we see things
    * inside \Drupal\Core\Extension\ExtensionList::getList() for example).
    */
-  public function testUpdateContribOrder() {
+  public function testUpdateContribOrder(): void {
     // We want core to be version 8.0.0.
     $this->mockDefaultExtensionsInfo(['version' => '8.0.0']);
     // All the rest should be visible as contrib modules at version 8.x-1.0.
@@ -210,7 +210,7 @@ public function testUpdateContribOrder() {
   /**
    * Tests that subthemes are notified about security updates for base themes.
    */
-  public function testUpdateBaseThemeSecurityUpdate() {
+  public function testUpdateBaseThemeSecurityUpdate(): void {
     // @todo https://www.drupal.org/node/2338175 base themes have to be
     //   installed.
     // Only install the subtheme, not the base theme.
@@ -245,7 +245,7 @@ public function testUpdateBaseThemeSecurityUpdate() {
   /**
    * Tests the Update Manager module when one normal update is available.
    */
-  public function testNormalUpdateAvailable() {
+  public function testNormalUpdateAvailable(): void {
     $assert_session = $this->assertSession();
     // Ensure that the update check requires a token.
     $this->drupalGet('admin/reports/updates/check');
@@ -340,7 +340,7 @@ public function testNormalUpdateAvailable() {
    * @todo https://www.drupal.org/node/2338175 extensions can not be hidden and
    *   base themes have to be installed.
    */
-  public function testUpdateShowDisabledThemes() {
+  public function testUpdateShowDisabledThemes(): void {
     $update_settings = $this->config('update.settings');
     // Make sure all the update_test_* themes are uninstalled.
     $extension_config = $this->config('core.extension');
@@ -403,7 +403,7 @@ public function testUpdateShowDisabledThemes() {
   /**
    * Tests updates with a hidden base theme.
    */
-  public function testUpdateHiddenBaseTheme() {
+  public function testUpdateHiddenBaseTheme(): void {
     \Drupal::moduleHandler()->loadInclude('update', 'inc', 'update.compare');
 
     // Install the subtheme.
@@ -433,7 +433,7 @@ public function testUpdateHiddenBaseTheme() {
   /**
    * Makes sure that if we fetch from a broken URL, sane things happen.
    */
-  public function testUpdateBrokenFetchURL() {
+  public function testUpdateBrokenFetchURL(): void {
     $this->mockInstalledExtensionsInfo([
       'aaa_update_test' => [
         'project' => 'aaa_update_test',
@@ -496,7 +496,7 @@ public function testUpdateBrokenFetchURL() {
    * hook_update_status_alter() to try to mark this as missing a security
    * update, then assert if we see the appropriate warnings on the right pages.
    */
-  public function testHookUpdateStatusAlter() {
+  public function testHookUpdateStatusAlter(): void {
     $update_admin_user = $this->drupalCreateUser([
       'administer site configuration',
       'administer software updates',
@@ -552,7 +552,7 @@ public function testHookUpdateStatusAlter() {
   /**
    * Tests that core compatibility messages are displayed.
    */
-  public function testCoreCompatibilityMessage() {
+  public function testCoreCompatibilityMessage(): void {
     $this->mockInstalledExtensionsInfo([
       'aaa_update_test' => [
         'project' => 'aaa_update_test',
@@ -599,7 +599,7 @@ public function testCoreCompatibilityMessage() {
    *
    * @dataProvider securityUpdateAvailabilityProvider
    */
-  public function testSecurityUpdateAvailability($module_version, array $expected_security_releases, $expected_update_message_type, $fixture) {
+  public function testSecurityUpdateAvailability($module_version, array $expected_security_releases, $expected_update_message_type, $fixture): void {
     $this->mockInstalledExtensionsInfo([
       'aaa_update_test' => [
         'project' => 'aaa_update_test',
@@ -726,7 +726,7 @@ public static function securityUpdateAvailabilityProvider() {
    * They both have an '8.x-1.0' release that is unpublished and an '8.x-2.0'
    * release that is published and is the expected update.
    */
-  public function testRevokedRelease() {
+  public function testRevokedRelease(): void {
     $this->mockInstalledExtensionsInfo([
       'aaa_update_test' => [
         'project' => 'aaa_update_test',
@@ -764,7 +764,7 @@ public function testRevokedRelease() {
    * 'unsupported' and an '8.x-2.0' release that has the 'Release type' value of
    * 'supported' and is the expected update.
    */
-  public function testUnsupportedRelease() {
+  public function testUnsupportedRelease(): void {
     $this->mockInstalledExtensionsInfo([
       'aaa_update_test' => [
         'project' => 'aaa_update_test',
@@ -790,7 +790,7 @@ public function testUnsupportedRelease() {
   /**
    * Tests messages for invalid, empty and missing version strings.
    */
-  public function testNonStandardVersionStrings() {
+  public function testNonStandardVersionStrings(): void {
     $version_infos = [
       'invalid' => [
         'version' => 'llama',
diff --git a/core/modules/update/tests/src/Functional/UpdateManagerUpdateTest.php b/core/modules/update/tests/src/Functional/UpdateManagerUpdateTest.php
index 2d6e6e2cd1fd..7bd5de5f144d 100644
--- a/core/modules/update/tests/src/Functional/UpdateManagerUpdateTest.php
+++ b/core/modules/update/tests/src/Functional/UpdateManagerUpdateTest.php
@@ -182,7 +182,7 @@ public static function incompatibleUpdatesTableProvider() {
    *   - 'recommended': The recommended version.
    *   - 'range': The versions of Drupal core required for that version.
    */
-  public function testIncompatibleUpdatesTable($core_fixture, $a_fixture, $b_fixture, array $compatible, array $incompatible) {
+  public function testIncompatibleUpdatesTable($core_fixture, $a_fixture, $b_fixture, array $compatible, array $incompatible): void {
 
     $assert_session = $this->assertSession();
     $compatible_table_locator = '[data-drupal-selector="edit-projects"]';
@@ -231,7 +231,7 @@ public function testIncompatibleUpdatesTable($core_fixture, $a_fixture, $b_fixtu
   /**
    * Tests the Update form with an uninstalled module in the system.
    */
-  public function testUninstalledUpdatesTable() {
+  public function testUninstalledUpdatesTable(): void {
     $assert_session = $this->assertSession();
     $compatible_table_locator = '[data-drupal-selector="edit-projects"]';
     $uninstalled_table_locator = '[data-drupal-selector="edit-uninstalled-projects"]';
diff --git a/core/modules/update/tests/src/Functional/UpdateSemverCoreSecurityCoverageTest.php b/core/modules/update/tests/src/Functional/UpdateSemverCoreSecurityCoverageTest.php
index 65b44c7e0067..a23b037189d6 100644
--- a/core/modules/update/tests/src/Functional/UpdateSemverCoreSecurityCoverageTest.php
+++ b/core/modules/update/tests/src/Functional/UpdateSemverCoreSecurityCoverageTest.php
@@ -29,7 +29,7 @@ class UpdateSemverCoreSecurityCoverageTest extends UpdateSemverCoreTestBase {
    *
    * @dataProvider securityCoverageMessageProvider
    */
-  public function testSecurityCoverageMessage($installed_version, $fixture, $requirements_section_heading, $message, $mock_date) {
+  public function testSecurityCoverageMessage($installed_version, $fixture, $requirements_section_heading, $message, $mock_date): void {
     \Drupal::state()->set('update_test.mock_date', $mock_date);
     $this->setProjectInstalledVersion($installed_version);
     $this->refreshUpdateStatus(['drupal' => $fixture]);
diff --git a/core/modules/update/tests/src/Functional/UpdateSemverCoreTest.php b/core/modules/update/tests/src/Functional/UpdateSemverCoreTest.php
index 0566b44e552f..bc0264c49a82 100644
--- a/core/modules/update/tests/src/Functional/UpdateSemverCoreTest.php
+++ b/core/modules/update/tests/src/Functional/UpdateSemverCoreTest.php
@@ -20,7 +20,7 @@ class UpdateSemverCoreTest extends UpdateSemverCoreTestBase {
   /**
    * Ensures proper results where there are date mismatches among modules.
    */
-  public function testDatestampMismatch() {
+  public function testDatestampMismatch(): void {
     $this->mockInstalledExtensionsInfo([
       'block' => [
         // This is 2001-09-09 01:46:40 GMT, so test for "2001-Sep-".
@@ -42,7 +42,7 @@ public function testDatestampMismatch() {
   /**
    * Tests the Update Manager module when the update server returns 503 errors.
    */
-  public function testServiceUnavailable() {
+  public function testServiceUnavailable(): void {
     $this->refreshUpdateStatus([], '503-error');
     // Ensure that no "Warning: SimpleXMLElement..." parse errors are found.
     $this->assertSession()->pageTextNotContains('SimpleXMLElement');
@@ -52,7 +52,7 @@ public function testServiceUnavailable() {
   /**
    * Tests that exactly one fetch task per project is created and not more.
    */
-  public function testFetchTasks() {
+  public function testFetchTasks(): void {
     $project_a = [
       'name' => 'aaa_update_test',
     ];
@@ -83,7 +83,7 @@ public function testFetchTasks() {
    *  - drupal.sec.8.0.2.xml
    *     'supported_branches' is '8.0.,8.1.'.
    */
-  public function testBrokenThenFixedUpdates() {
+  public function testBrokenThenFixedUpdates(): void {
     $this->drupalLogin($this->drupalCreateUser([
       'administer site configuration',
       'view update notifications',
@@ -117,7 +117,7 @@ public function testBrokenThenFixedUpdates() {
   /**
    * Tests when a dev release does not have a date.
    */
-  public function testDevNoReleaseDate() {
+  public function testDevNoReleaseDate(): void {
     $this->setProjectInstalledVersion('8.0.x-dev');
     $this->refreshUpdateStatus([$this->updateProject => 'dev-no-date']);
   }
diff --git a/core/modules/update/tests/src/Functional/UpdateSemverTestBaselineTrait.php b/core/modules/update/tests/src/Functional/UpdateSemverTestBaselineTrait.php
index 6c1f7af19214..dd388da58f8c 100644
--- a/core/modules/update/tests/src/Functional/UpdateSemverTestBaselineTrait.php
+++ b/core/modules/update/tests/src/Functional/UpdateSemverTestBaselineTrait.php
@@ -25,7 +25,7 @@ trait UpdateSemverTestBaselineTrait {
    * - '8.0.2' is an unpublished release.
    * - '8.0.3' is marked as 'Release type' 'Unsupported'.
    */
-  public function testNoUpdatesAvailable() {
+  public function testNoUpdatesAvailable(): void {
     foreach ([0, 1] as $minor_version) {
       foreach ([0, 1] as $patch_version) {
         foreach (['-alpha1', '-beta1', ''] as $extra_version) {
@@ -48,7 +48,7 @@ public function testNoUpdatesAvailable() {
   /**
    * Tests the Update Manager module when one normal update is available.
    */
-  public function testNormalUpdateAvailable() {
+  public function testNormalUpdateAvailable(): void {
     $this->setProjectInstalledVersion('8.0.0');
 
     // Ensure that the update check requires a token.
@@ -131,7 +131,7 @@ protected function assertNoExtraVersion(string $full_version): void {
    * - drupal.current.xml and semver_test.current.xml: These declare major
    *   releases supported, 8 and 9.
    */
-  public function testMajorUpdateAvailable() {
+  public function testMajorUpdateAvailable(): void {
     foreach (['9.0.0', '8.0.0-9.0.0'] as $release_history) {
       foreach ([0, 1] as $minor_version) {
         foreach ([0, 1] as $patch_version) {
@@ -188,7 +188,7 @@ public function testMajorUpdateAvailable() {
    * They both have an '8.0.2' release that is unpublished and an '8.1.0'
    * release that is published and is the expected update.
    */
-  public function testRevokedRelease() {
+  public function testRevokedRelease(): void {
     foreach (['8.1.0', '8.1.0-unsupported'] as $fixture) {
       $this->setProjectInstalledVersion('8.0.2');
       $this->refreshUpdateStatus([$this->updateProject => $fixture]);
@@ -216,7 +216,7 @@ public function testRevokedRelease() {
    * 'unsupported' and an '8.1.0' release that has the 'Release type' value of
    * 'supported' and is the expected update.
    */
-  public function testUnsupportedRelease() {
+  public function testUnsupportedRelease(): void {
     foreach (['8.1.0', '8.1.0-unsupported'] as $fixture) {
       $this->setProjectInstalledVersion('8.0.3');
       $this->refreshUpdateStatus([$this->updateProject => $fixture]);
diff --git a/core/modules/update/tests/src/Functional/UpdateSemverTestSecurityAvailabilityTrait.php b/core/modules/update/tests/src/Functional/UpdateSemverTestSecurityAvailabilityTrait.php
index b0b497a23f0a..7c2d3faac53b 100644
--- a/core/modules/update/tests/src/Functional/UpdateSemverTestSecurityAvailabilityTrait.php
+++ b/core/modules/update/tests/src/Functional/UpdateSemverTestSecurityAvailabilityTrait.php
@@ -23,7 +23,7 @@ trait UpdateSemverTestSecurityAvailabilityTrait {
    *
    * @dataProvider securityUpdateAvailabilityProvider
    */
-  public function testSecurityUpdateAvailability($site_patch_version, array $expected_security_releases, $expected_update_message_type, $fixture) {
+  public function testSecurityUpdateAvailability($site_patch_version, array $expected_security_releases, $expected_update_message_type, $fixture): void {
     $this->setProjectInstalledVersion("8.$site_patch_version");
     $this->refreshUpdateStatus([$this->updateProject => $fixture]);
     $this->assertSecurityUpdates("{$this->updateProject}-8", $expected_security_releases, $expected_update_message_type, $this->updateTableLocator);
diff --git a/core/modules/update/tests/src/Functional/UpdateSettingsFormTest.php b/core/modules/update/tests/src/Functional/UpdateSettingsFormTest.php
index 8b1cad4fc0e2..160e3cef1fa3 100644
--- a/core/modules/update/tests/src/Functional/UpdateSettingsFormTest.php
+++ b/core/modules/update/tests/src/Functional/UpdateSettingsFormTest.php
@@ -29,7 +29,7 @@ class UpdateSettingsFormTest extends BrowserTestBase {
   /**
    * Tests the update_settings form.
    */
-  public function testUpdateSettingsForm() {
+  public function testUpdateSettingsForm(): void {
     $url = Url::fromRoute('update.settings');
 
     // Users without the appropriate permissions should not be able to access.
diff --git a/core/modules/update/tests/src/Functional/UpdateUploadTest.php b/core/modules/update/tests/src/Functional/UpdateUploadTest.php
index 876015b56e75..c6ef14240153 100644
--- a/core/modules/update/tests/src/Functional/UpdateUploadTest.php
+++ b/core/modules/update/tests/src/Functional/UpdateUploadTest.php
@@ -48,7 +48,7 @@ protected function setUp(): void {
   /**
    * Tests upload, extraction, and update of a module.
    */
-  public function testUploadModule() {
+  public function testUploadModule(): void {
     // Ensure that the update information is correct before testing.
     update_get_available(TRUE);
 
@@ -152,7 +152,7 @@ public function testUploadModule() {
   /**
    * Ensures that archiver extensions are properly merged in the UI.
    */
-  public function testFileNameExtensionMerging() {
+  public function testFileNameExtensionMerging(): void {
     $this->drupalGet('admin/modules/install');
     // Make sure the bogus extension supported by update_test.module is there.
     $this->assertSession()->responseMatches('/file extensions are supported:.*update-test-extension/');
@@ -163,7 +163,7 @@ public function testFileNameExtensionMerging() {
   /**
    * Checks the messages on update manager pages when missing a security update.
    */
-  public function testUpdateManagerCoreSecurityUpdateMessages() {
+  public function testUpdateManagerCoreSecurityUpdateMessages(): void {
     $this->mockDefaultExtensionsInfo(['version' => '8.0.0']);
     $this->mockReleaseHistory(['drupal' => '0.2-sec']);
     $this->config('update.settings')
@@ -200,7 +200,7 @@ public function testUpdateManagerCoreSecurityUpdateMessages() {
   /**
    * Tests only an *.info.yml file are detected without supporting files.
    */
-  public function testUpdateDirectory() {
+  public function testUpdateDirectory(): void {
     $type = Updater::getUpdaterFromDirectory($this->root . '/core/modules/update/tests/modules/aaa_update_test');
     $this->assertEquals('Drupal\\Core\\Updater\\Module', $type, 'Detected a Module');
 
diff --git a/core/modules/update/tests/src/Kernel/Migrate/d6/MigrateUpdateConfigsTest.php b/core/modules/update/tests/src/Kernel/Migrate/d6/MigrateUpdateConfigsTest.php
index 55f28af68ac5..598904725d61 100644
--- a/core/modules/update/tests/src/Kernel/Migrate/d6/MigrateUpdateConfigsTest.php
+++ b/core/modules/update/tests/src/Kernel/Migrate/d6/MigrateUpdateConfigsTest.php
@@ -32,7 +32,7 @@ protected function setUp(): void {
   /**
    * Tests migration of update variables to update.settings.yml.
    */
-  public function testUpdateSettings() {
+  public function testUpdateSettings(): void {
     $config = $this->config('update.settings');
     $this->assertSame(2, $config->get('fetch.max_attempts'));
     $this->assertSame('https://updates.drupal.org/release-history', $config->get('fetch.url'));
diff --git a/core/modules/update/tests/src/Kernel/UpdateDeleteFileIfStaleTest.php b/core/modules/update/tests/src/Kernel/UpdateDeleteFileIfStaleTest.php
index f9133fce50c1..16fc7dfe3381 100644
--- a/core/modules/update/tests/src/Kernel/UpdateDeleteFileIfStaleTest.php
+++ b/core/modules/update/tests/src/Kernel/UpdateDeleteFileIfStaleTest.php
@@ -24,7 +24,7 @@ class UpdateDeleteFileIfStaleTest extends KernelTestBase {
   /**
    * Tests the deletion of stale files.
    */
-  public function testUpdateDeleteFileIfStale() {
+  public function testUpdateDeleteFileIfStale(): void {
     $file_system = $this->container->get('file_system');
 
     $file_name = $file_system->saveData($this->randomMachineName(), 'public://');
diff --git a/core/modules/update/tests/src/Kernel/UpdateReportTest.php b/core/modules/update/tests/src/Kernel/UpdateReportTest.php
index 8fb925b23422..16468e62c5b0 100644
--- a/core/modules/update/tests/src/Kernel/UpdateReportTest.php
+++ b/core/modules/update/tests/src/Kernel/UpdateReportTest.php
@@ -30,7 +30,7 @@ class UpdateReportTest extends KernelTestBase {
   /**
    * @dataProvider providerTemplatePreprocessUpdateReport
    */
-  public function testTemplatePreprocessUpdateReport($variables) {
+  public function testTemplatePreprocessUpdateReport($variables): void {
     \Drupal::moduleHandler()->loadInclude('update', 'inc', 'update.report');
 
     // The function should run without an exception being thrown when the value
@@ -66,7 +66,7 @@ public static function providerTemplatePreprocessUpdateReport() {
    *
    * @see template_preprocess_update_fetch_error_message()
    */
-  public function testTemplatePreprocessUpdateFetchErrorMessageNoDblog() {
+  public function testTemplatePreprocessUpdateFetchErrorMessageNoDblog(): void {
     $build = [
       '#theme' => 'update_fetch_error_message',
     ];
@@ -88,7 +88,7 @@ public function testTemplatePreprocessUpdateFetchErrorMessageNoDblog() {
    *
    * @see template_preprocess_update_fetch_error_message()
    */
-  public function testTemplatePreprocessUpdateFetchErrorMessageWithDblog() {
+  public function testTemplatePreprocessUpdateFetchErrorMessageWithDblog(): void {
     \Drupal::moduleHandler()->loadInclude('update', 'inc', 'update.report');
 
     $this->enableModules(['dblog', 'user']);
diff --git a/core/modules/update/tests/src/Kernel/UpdateStorageTest.php b/core/modules/update/tests/src/Kernel/UpdateStorageTest.php
index 2dfbd63eebe8..0e486d3ca185 100644
--- a/core/modules/update/tests/src/Kernel/UpdateStorageTest.php
+++ b/core/modules/update/tests/src/Kernel/UpdateStorageTest.php
@@ -23,7 +23,7 @@ class UpdateStorageTest extends KernelTestBase {
   /**
    * Tests the Update module storage is cleared correctly.
    */
-  public function testUpdateStorage() {
+  public function testUpdateStorage(): void {
     // Setting values in both key stores, then installing the module and
     // testing if these key values are cleared.
     $keyvalue_update = $this->container->get('keyvalue.expirable')->get('update');
diff --git a/core/modules/update/tests/src/Unit/Menu/UpdateLocalTasksTest.php b/core/modules/update/tests/src/Unit/Menu/UpdateLocalTasksTest.php
index 41a6da04403c..f70cf012f004 100644
--- a/core/modules/update/tests/src/Unit/Menu/UpdateLocalTasksTest.php
+++ b/core/modules/update/tests/src/Unit/Menu/UpdateLocalTasksTest.php
@@ -26,7 +26,7 @@ protected function setUp(): void {
    *
    * @dataProvider getUpdateReportRoutes
    */
-  public function testUpdateReportLocalTasks($route) {
+  public function testUpdateReportLocalTasks($route): void {
     $this->assertLocalTasks($route, [
       0 => ['update.status', 'update.settings', 'update.report_update'],
     ]);
@@ -48,7 +48,7 @@ public static function getUpdateReportRoutes() {
    *
    * @dataProvider getUpdateModuleRoutes
    */
-  public function testUpdateModuleLocalTasks($route) {
+  public function testUpdateModuleLocalTasks($route): void {
     $this->assertLocalTasks($route, [
       0 => ['update.module_update'],
     ]);
@@ -68,7 +68,7 @@ public static function getUpdateModuleRoutes() {
    *
    * @dataProvider getUpdateThemeRoutes
    */
-  public function testUpdateThemeLocalTasks($route) {
+  public function testUpdateThemeLocalTasks($route): void {
     $this->assertLocalTasks($route, [
       0 => ['update.theme_update'],
     ]);
diff --git a/core/modules/update/tests/src/Unit/ProjectCoreCompatibilityTest.php b/core/modules/update/tests/src/Unit/ProjectCoreCompatibilityTest.php
index c98380f5f876..e8d872bb88fc 100644
--- a/core/modules/update/tests/src/Unit/ProjectCoreCompatibilityTest.php
+++ b/core/modules/update/tests/src/Unit/ProjectCoreCompatibilityTest.php
@@ -18,7 +18,7 @@ class ProjectCoreCompatibilityTest extends UnitTestCase {
    * @covers ::setReleaseMessage
    * @dataProvider providerSetProjectCoreCompatibilityRanges
    */
-  public function testSetProjectCoreCompatibilityRanges(array $project_data, $core_data, array $supported_branches, array $core_releases, array $expected_releases, array $expected_security_updates) {
+  public function testSetProjectCoreCompatibilityRanges(array $project_data, $core_data, array $supported_branches, array $core_releases, array $expected_releases, array $expected_security_updates): void {
     $project_compatibility = new ProjectCoreCompatibility($core_data, $core_releases, $supported_branches);
     $project_compatibility->setStringTranslation($this->getStringTranslationStub());
     $project_compatibility->setReleaseMessage($project_data);
diff --git a/core/modules/update/tests/src/Unit/UpdateFetcherTest.php b/core/modules/update/tests/src/Unit/UpdateFetcherTest.php
index 58d4c68ed8e1..4d9b47053a2e 100644
--- a/core/modules/update/tests/src/Unit/UpdateFetcherTest.php
+++ b/core/modules/update/tests/src/Unit/UpdateFetcherTest.php
@@ -102,7 +102,7 @@ protected function setUp(): void {
    *
    * @see \Drupal\update\UpdateFetcher::buildFetchUrl()
    */
-  public function testUpdateBuildFetchUrl(array $project, $site_key, $expected) {
+  public function testUpdateBuildFetchUrl(array $project, $site_key, $expected): void {
     $url = $this->updateFetcher->buildFetchUrl($project, $site_key);
     $this->assertEquals($url, $expected);
     $this->assertFalse($this->logger->hasErrorRecords());
@@ -176,7 +176,7 @@ protected function mockClient(Response ...$responses) {
    * @covers ::doRequest
    * @covers ::fetchProjectData
    */
-  public function testUpdateFetcherNoFallback() {
+  public function testUpdateFetcherNoFallback(): void {
     // First, try without the HTTP fallback setting, and HTTPS mocked to fail.
     $settings = new Settings([]);
     $this->mockClient(
@@ -205,7 +205,7 @@ public function testUpdateFetcherNoFallback() {
    * @covers ::doRequest
    * @covers ::fetchProjectData
    */
-  public function testUpdateFetcherHttpFallback() {
+  public function testUpdateFetcherHttpFallback(): void {
     $settings = new Settings(['update_fetch_with_http_fallback' => TRUE]);
     $this->mockClient(
       new Response(500, [], 'HTTPS failed'),
diff --git a/core/modules/update/tests/src/Unit/UpdateMailTest.php b/core/modules/update/tests/src/Unit/UpdateMailTest.php
index 5e46b751b20f..ca3f73891d26 100644
--- a/core/modules/update/tests/src/Unit/UpdateMailTest.php
+++ b/core/modules/update/tests/src/Unit/UpdateMailTest.php
@@ -76,7 +76,7 @@ protected function setUp(): void {
    *
    * @dataProvider providerTestUpdateEmail
    */
-  public function testUpdateEmail($notification_threshold, $params, $authorized, array $expected_body) {
+  public function testUpdateEmail($notification_threshold, $params, $authorized, array $expected_body): void {
     $langcode = 'en';
     $available_updates_url = 'https://example.com/admin/reports/updates';
     $update_settings_url = 'https://example.com/admin/reports/updates/settings';
diff --git a/core/modules/user/tests/src/Functional/AccessRoleUITest.php b/core/modules/user/tests/src/Functional/AccessRoleUITest.php
index 910b6f93b91e..12c51ee1344b 100644
--- a/core/modules/user/tests/src/Functional/AccessRoleUITest.php
+++ b/core/modules/user/tests/src/Functional/AccessRoleUITest.php
@@ -43,7 +43,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['user_test_views
   /**
    * Tests the role access plugin UI.
    */
-  public function testAccessRoleUI() {
+  public function testAccessRoleUI(): void {
     $entity_type_manager = $this->container->get('entity_type.manager');
     $entity_type_manager->getStorage('user_role')->create(['id' => 'custom_role', 'label' => 'Custom role'])->save();
     $access_url = "admin/structure/views/nojs/display/test_access_role/default/access_options";
diff --git a/core/modules/user/tests/src/Functional/Rest/UserResourceTestBase.php b/core/modules/user/tests/src/Functional/Rest/UserResourceTestBase.php
index ef8db3246073..d3c03ff5b8c1 100644
--- a/core/modules/user/tests/src/Functional/Rest/UserResourceTestBase.php
+++ b/core/modules/user/tests/src/Functional/Rest/UserResourceTestBase.php
@@ -147,7 +147,7 @@ protected function getNormalizedPostEntity() {
   /**
    * Tests PATCHing security-sensitive base fields of the logged in account.
    */
-  public function testPatchDxForSecuritySensitiveBaseFields() {
+  public function testPatchDxForSecuritySensitiveBaseFields(): void {
     // The anonymous user is never allowed to modify itself.
     if (!static::$auth) {
       $this->markTestSkipped();
@@ -263,7 +263,7 @@ protected function assertRpcLogin($username, $password) {
   /**
    * Tests PATCHing security-sensitive base fields to change other users.
    */
-  public function testPatchSecurityOtherUser() {
+  public function testPatchSecurityOtherUser(): void {
     // The anonymous user is never allowed to modify other users.
     if (!static::$auth) {
       $this->markTestSkipped();
diff --git a/core/modules/user/tests/src/Functional/Rest/UserXmlAnonTest.php b/core/modules/user/tests/src/Functional/Rest/UserXmlAnonTest.php
index 7f80ee915e2a..9b25e90217b3 100644
--- a/core/modules/user/tests/src/Functional/Rest/UserXmlAnonTest.php
+++ b/core/modules/user/tests/src/Functional/Rest/UserXmlAnonTest.php
@@ -34,7 +34,7 @@ class UserXmlAnonTest extends UserResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public function testPatchDxForSecuritySensitiveBaseFields() {
+  public function testPatchDxForSecuritySensitiveBaseFields(): void {
     // Deserialization of the XML format is not supported.
     $this->markTestSkipped();
   }
diff --git a/core/modules/user/tests/src/Functional/Rest/UserXmlBasicAuthTest.php b/core/modules/user/tests/src/Functional/Rest/UserXmlBasicAuthTest.php
index 7935fdc115ad..04384ea35c07 100644
--- a/core/modules/user/tests/src/Functional/Rest/UserXmlBasicAuthTest.php
+++ b/core/modules/user/tests/src/Functional/Rest/UserXmlBasicAuthTest.php
@@ -44,7 +44,7 @@ class UserXmlBasicAuthTest extends UserResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public function testPatchDxForSecuritySensitiveBaseFields() {
+  public function testPatchDxForSecuritySensitiveBaseFields(): void {
     // Deserialization of the XML format is not supported.
     $this->markTestSkipped();
   }
@@ -52,7 +52,7 @@ public function testPatchDxForSecuritySensitiveBaseFields() {
   /**
    * {@inheritdoc}
    */
-  public function testPatchSecurityOtherUser() {
+  public function testPatchSecurityOtherUser(): void {
     // Deserialization of the XML format is not supported.
     $this->markTestSkipped();
   }
diff --git a/core/modules/user/tests/src/Functional/Rest/UserXmlCookieTest.php b/core/modules/user/tests/src/Functional/Rest/UserXmlCookieTest.php
index 6524f2a53fe7..f4257b75f724 100644
--- a/core/modules/user/tests/src/Functional/Rest/UserXmlCookieTest.php
+++ b/core/modules/user/tests/src/Functional/Rest/UserXmlCookieTest.php
@@ -39,7 +39,7 @@ class UserXmlCookieTest extends UserResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public function testPatchDxForSecuritySensitiveBaseFields() {
+  public function testPatchDxForSecuritySensitiveBaseFields(): void {
     // Deserialization of the XML format is not supported.
     $this->markTestSkipped();
   }
@@ -47,7 +47,7 @@ public function testPatchDxForSecuritySensitiveBaseFields() {
   /**
    * {@inheritdoc}
    */
-  public function testPatchSecurityOtherUser() {
+  public function testPatchSecurityOtherUser(): void {
     // Deserialization of the XML format is not supported.
     $this->markTestSkipped();
   }
diff --git a/core/modules/user/tests/src/Functional/UserAccountLinksTest.php b/core/modules/user/tests/src/Functional/UserAccountLinksTest.php
index 2579ea39e937..61631cf5f71a 100644
--- a/core/modules/user/tests/src/Functional/UserAccountLinksTest.php
+++ b/core/modules/user/tests/src/Functional/UserAccountLinksTest.php
@@ -38,7 +38,7 @@ protected function setUp(): void {
   /**
    * Tests the secondary menu.
    */
-  public function testSecondaryMenu() {
+  public function testSecondaryMenu(): void {
     // Create a regular user.
     $user = $this->drupalCreateUser([]);
 
@@ -62,7 +62,7 @@ public function testSecondaryMenu() {
   /**
    * Tests disabling the 'My account' link.
    */
-  public function testDisabledAccountLink() {
+  public function testDisabledAccountLink(): void {
     // Create an admin user and log in.
     $this->drupalLogin($this->drupalCreateUser([
       'access administration pages',
@@ -95,7 +95,7 @@ public function testDisabledAccountLink() {
   /**
    * Tests page title is set correctly on user account tabs.
    */
-  public function testAccountPageTitles() {
+  public function testAccountPageTitles(): void {
     // Default page titles are suffixed with the site name - Drupal.
     $title_suffix = ' | Drupal';
 
@@ -121,7 +121,7 @@ public function testAccountPageTitles() {
   /**
    * Ensures that logout URL redirects an anonymous user to the front page.
    */
-  public function testAnonymousLogout() {
+  public function testAnonymousLogout(): void {
     $this->drupalGet('user/logout');
     $this->assertSession()->addressEquals('/');
     $this->assertSession()->statusCodeEquals(200);
diff --git a/core/modules/user/tests/src/Functional/UserAdminLanguageTest.php b/core/modules/user/tests/src/Functional/UserAdminLanguageTest.php
index e12257285aed..416dc52ae584 100644
--- a/core/modules/user/tests/src/Functional/UserAdminLanguageTest.php
+++ b/core/modules/user/tests/src/Functional/UserAdminLanguageTest.php
@@ -57,7 +57,7 @@ protected function setUp(): void {
   /**
    * Tests that admin language is not configurable in single language sites.
    */
-  public function testUserAdminLanguageConfigurationNotAvailableWithOnlyOneLanguage() {
+  public function testUserAdminLanguageConfigurationNotAvailableWithOnlyOneLanguage(): void {
     $this->drupalLogin($this->adminUser);
     $this->setLanguageNegotiation();
     $path = 'user/' . $this->adminUser->id() . '/edit';
@@ -69,7 +69,7 @@ public function testUserAdminLanguageConfigurationNotAvailableWithOnlyOneLanguag
   /**
    * Tests that admin language negotiation is configurable only if enabled.
    */
-  public function testUserAdminLanguageConfigurationAvailableWithAdminLanguageNegotiation() {
+  public function testUserAdminLanguageConfigurationAvailableWithAdminLanguageNegotiation(): void {
     $this->drupalLogin($this->adminUser);
     $this->addCustomLanguage();
     $path = 'user/' . $this->adminUser->id() . '/edit';
@@ -97,7 +97,7 @@ public function testUserAdminLanguageConfigurationAvailableWithAdminLanguageNego
    * have a setting for pages they cannot access, so they should not be able to
    * set a language for those pages.
    */
-  public function testUserAdminLanguageConfigurationAvailableIfAdminLanguageNegotiationIsEnabled() {
+  public function testUserAdminLanguageConfigurationAvailableIfAdminLanguageNegotiationIsEnabled(): void {
     $this->drupalLogin($this->adminUser);
     // Adds a new language, because with only one language, setting won't show.
     $this->addCustomLanguage();
@@ -124,7 +124,7 @@ public function testUserAdminLanguageConfigurationAvailableIfAdminLanguageNegoti
   /**
    * Tests the actual language negotiation.
    */
-  public function testActualNegotiation() {
+  public function testActualNegotiation(): void {
     $this->drupalLogin($this->adminUser);
     $this->addCustomLanguage();
     $this->setLanguageNegotiation();
diff --git a/core/modules/user/tests/src/Functional/UserAdminListingTest.php b/core/modules/user/tests/src/Functional/UserAdminListingTest.php
index c356cc2f8ce2..af9c84707092 100644
--- a/core/modules/user/tests/src/Functional/UserAdminListingTest.php
+++ b/core/modules/user/tests/src/Functional/UserAdminListingTest.php
@@ -23,7 +23,7 @@ class UserAdminListingTest extends BrowserTestBase {
   /**
    * Tests the listing.
    */
-  public function testUserListing() {
+  public function testUserListing(): void {
     // Ensure the anonymous user cannot access the admin listing.
     $this->drupalGet('admin/people');
     $this->assertSession()->statusCodeEquals(403);
diff --git a/core/modules/user/tests/src/Functional/UserAdminTest.php b/core/modules/user/tests/src/Functional/UserAdminTest.php
index 20ce9feed160..f65fb427e887 100644
--- a/core/modules/user/tests/src/Functional/UserAdminTest.php
+++ b/core/modules/user/tests/src/Functional/UserAdminTest.php
@@ -48,7 +48,7 @@ private static function getLinkSelectorForUser(UserInterface $user): string {
   /**
    * Registers a user and deletes it.
    */
-  public function testUserAdmin() {
+  public function testUserAdmin(): void {
     $config = $this->config('user.settings');
     $user_a = $this->drupalCreateUser();
     $user_a->name = 'User A';
@@ -182,7 +182,7 @@ public function testUserAdmin() {
   /**
    * Tests the alternate notification email address for user mails.
    */
-  public function testNotificationEmailAddress() {
+  public function testNotificationEmailAddress(): void {
     // Test that the Notification Email address field is on the config page.
     $admin_user = $this->drupalCreateUser([
       'administer users',
diff --git a/core/modules/user/tests/src/Functional/UserBlocksTest.php b/core/modules/user/tests/src/Functional/UserBlocksTest.php
index 0232c79915fb..383fd8ae991a 100644
--- a/core/modules/user/tests/src/Functional/UserBlocksTest.php
+++ b/core/modules/user/tests/src/Functional/UserBlocksTest.php
@@ -49,7 +49,7 @@ protected function setUp(): void {
   /**
    * Tests that user login block is hidden from user/login.
    */
-  public function testUserLoginBlockVisibility() {
+  public function testUserLoginBlockVisibility(): void {
     // Array keyed list where key being the URL address and value being expected
     // visibility as boolean type.
     $paths = [
@@ -72,7 +72,7 @@ public function testUserLoginBlockVisibility() {
   /**
    * Tests the user login block.
    */
-  public function testUserLoginBlock() {
+  public function testUserLoginBlock(): void {
     // Create a user with some permission that anonymous users lack.
     $user = $this->drupalCreateUser(['administer permissions']);
 
diff --git a/core/modules/user/tests/src/Functional/UserCancelTest.php b/core/modules/user/tests/src/Functional/UserCancelTest.php
index c1750c979fb1..7ee8ba2752b0 100644
--- a/core/modules/user/tests/src/Functional/UserCancelTest.php
+++ b/core/modules/user/tests/src/Functional/UserCancelTest.php
@@ -46,7 +46,7 @@ protected function setUp(): void {
   /**
    * Attempt to cancel account without permission.
    */
-  public function testUserCancelWithoutPermission() {
+  public function testUserCancelWithoutPermission(): void {
     $node_storage = $this->container->get('entity_type.manager')->getStorage('node');
     $this->config('user.settings')->set('cancel_method', 'user_cancel_reassign')->save();
     $user_storage = $this->container->get('entity_type.manager')->getStorage('user');
@@ -83,7 +83,7 @@ public function testUserCancelWithoutPermission() {
   /**
    * Tests ability to change the permission for canceling users.
    */
-  public function testUserCancelChangePermission() {
+  public function testUserCancelChangePermission(): void {
     \Drupal::service('module_installer')->install(['user_form_test']);
     $this->config('user.settings')->set('cancel_method', 'user_cancel_reassign')->save();
 
@@ -108,7 +108,7 @@ public function testUserCancelChangePermission() {
    * This should never be possible, or the site owner would become unable to
    * administer the site.
    */
-  public function testUserCancelUid1() {
+  public function testUserCancelUid1(): void {
     $user_storage = $this->container->get('entity_type.manager')->getStorage('user');
 
     \Drupal::service('module_installer')->install(['views']);
@@ -132,7 +132,7 @@ public function testUserCancelUid1() {
   /**
    * Attempt invalid account cancellations.
    */
-  public function testUserCancelInvalid() {
+  public function testUserCancelInvalid(): void {
     $node_storage = $this->container->get('entity_type.manager')->getStorage('node');
     $this->config('user.settings')->set('cancel_method', 'user_cancel_reassign')->save();
     $user_storage = $this->container->get('entity_type.manager')->getStorage('user');
@@ -179,7 +179,7 @@ public function testUserCancelInvalid() {
   /**
    * Disable account and keep all content.
    */
-  public function testUserBlock() {
+  public function testUserBlock(): void {
     $this->config('user.settings')->set('cancel_method', 'user_cancel_block')->save();
     $user_storage = $this->container->get('entity_type.manager')->getStorage('user');
 
@@ -216,7 +216,7 @@ public function testUserBlock() {
   /**
    * Disable account and unpublish all content.
    */
-  public function testUserBlockUnpublish() {
+  public function testUserBlockUnpublish(): void {
     $node_storage = $this->container->get('entity_type.manager')->getStorage('node');
     $this->config('user.settings')->set('cancel_method', 'user_cancel_block_unpublish')->save();
     // Create comment field on page.
@@ -288,7 +288,7 @@ public function testUserBlockUnpublish() {
   /**
    * Tests nodes are unpublished even if inaccessible to cancelling user.
    */
-  public function testUserBlockUnpublishNodeAccess() {
+  public function testUserBlockUnpublishNodeAccess(): void {
     \Drupal::service('module_installer')->install(['node_access_test', 'user_form_test']);
 
     // Setup node access
@@ -330,7 +330,7 @@ public function testUserBlockUnpublishNodeAccess() {
   /**
    * Delete account and anonymize all content.
    */
-  public function testUserAnonymize() {
+  public function testUserAnonymize(): void {
     $node_storage = $this->container->get('entity_type.manager')->getStorage('node');
     $this->config('user.settings')->set('cancel_method', 'user_cancel_reassign')->save();
     // Create comment field on page.
@@ -414,7 +414,7 @@ public function testUserAnonymize() {
   /**
    * Delete account and anonymize all content using a batch process.
    */
-  public function testUserAnonymizeBatch() {
+  public function testUserAnonymizeBatch(): void {
     $node_storage = $this->container->get('entity_type.manager')->getStorage('node');
     $this->config('user.settings')->set('cancel_method', 'user_cancel_reassign')->save();
     $user_storage = $this->container->get('entity_type.manager')->getStorage('user');
@@ -461,7 +461,7 @@ public function testUserAnonymizeBatch() {
   /**
    * Delete account and remove all content.
    */
-  public function testUserDelete() {
+  public function testUserDelete(): void {
     $node_storage = $this->container->get('entity_type.manager')->getStorage('node');
     $this->config('user.settings')->set('cancel_method', 'user_cancel_delete')->save();
     \Drupal::service('module_installer')->install(['comment']);
@@ -542,7 +542,7 @@ public function testUserDelete() {
   /**
    * Create an administrative user and delete another user.
    */
-  public function testUserCancelByAdmin() {
+  public function testUserCancelByAdmin(): void {
     $this->config('user.settings')->set('cancel_method', 'user_cancel_reassign')->save();
 
     // Create a regular user.
@@ -566,7 +566,7 @@ public function testUserCancelByAdmin() {
   /**
    * Tests deletion of a user account without an email address.
    */
-  public function testUserWithoutEmailCancelByAdmin() {
+  public function testUserWithoutEmailCancelByAdmin(): void {
     $this->config('user.settings')->set('cancel_method', 'user_cancel_reassign')->save();
 
     // Create a regular user.
@@ -593,7 +593,7 @@ public function testUserWithoutEmailCancelByAdmin() {
   /**
    * Create an administrative user and mass-delete other users.
    */
-  public function testMassUserCancelByAdmin() {
+  public function testMassUserCancelByAdmin(): void {
     \Drupal::service('module_installer')->install(['views']);
     $this->config('user.settings')->set('cancel_method', 'user_cancel_reassign')->save();
     $user_storage = $this->container->get('entity_type.manager')->getStorage('user');
@@ -648,7 +648,7 @@ public function testMassUserCancelByAdmin() {
   /**
    * Tests user cancel with node access.
    */
-  public function testUserDeleteWithContentAndNodeAccess() {
+  public function testUserDeleteWithContentAndNodeAccess(): void {
 
     \Drupal::service('module_installer')->install(['node_access_test']);
     // Rebuild node access.
@@ -664,7 +664,7 @@ public function testUserDeleteWithContentAndNodeAccess() {
   /**
    * Delete account and anonymize all content and it's translations.
    */
-  public function testUserAnonymizeTranslations() {
+  public function testUserAnonymizeTranslations(): void {
     $this->config('user.settings')->set('cancel_method', 'user_cancel_reassign')->save();
     // Create comment field on page.
     $this->addDefaultCommentField('node', 'page');
diff --git a/core/modules/user/tests/src/Functional/UserCreateFailMailTest.php b/core/modules/user/tests/src/Functional/UserCreateFailMailTest.php
index 646decbe535f..7708b78c2c38 100644
--- a/core/modules/user/tests/src/Functional/UserCreateFailMailTest.php
+++ b/core/modules/user/tests/src/Functional/UserCreateFailMailTest.php
@@ -28,7 +28,7 @@ class UserCreateFailMailTest extends BrowserTestBase {
   /**
    * Tests the create user administration page.
    */
-  public function testUserAdd() {
+  public function testUserAdd(): void {
     $user = $this->drupalCreateUser(['administer users']);
     $this->drupalLogin($user);
 
diff --git a/core/modules/user/tests/src/Functional/UserCreateTest.php b/core/modules/user/tests/src/Functional/UserCreateTest.php
index 04d4b29803f9..5f5b614c8de3 100644
--- a/core/modules/user/tests/src/Functional/UserCreateTest.php
+++ b/core/modules/user/tests/src/Functional/UserCreateTest.php
@@ -35,7 +35,7 @@ class UserCreateTest extends BrowserTestBase {
   /**
    * Tests user creation and display from the administration interface.
    */
-  public function testUserAdd() {
+  public function testUserAdd(): void {
     $user = $this->drupalCreateUser(['administer users']);
     $this->drupalLogin($user);
 
diff --git a/core/modules/user/tests/src/Functional/UserEditTest.php b/core/modules/user/tests/src/Functional/UserEditTest.php
index 3c872d3e60e4..295bc01f26e9 100644
--- a/core/modules/user/tests/src/Functional/UserEditTest.php
+++ b/core/modules/user/tests/src/Functional/UserEditTest.php
@@ -22,7 +22,7 @@ class UserEditTest extends BrowserTestBase {
   /**
    * Tests user edit page.
    */
-  public function testUserEdit() {
+  public function testUserEdit(): void {
     // Test user edit functionality.
     $user1 = $this->drupalCreateUser(['change own username']);
     $user2 = $this->drupalCreateUser([]);
@@ -147,7 +147,7 @@ public function testUserEdit() {
    * password that is literally "0" was not possible. This test ensures that
    * this regression can't happen again.
    */
-  public function testUserWith0Password() {
+  public function testUserWith0Password(): void {
     $admin = $this->drupalCreateUser(['administer users']);
     $this->drupalLogin($admin);
     // Create a regular user.
@@ -162,7 +162,7 @@ public function testUserWith0Password() {
   /**
    * Tests editing of a user account without an email address.
    */
-  public function testUserWithoutEmailEdit() {
+  public function testUserWithoutEmailEdit(): void {
     // Test that an admin can edit users without an email address.
     $admin = $this->drupalCreateUser(['administer users']);
     $this->drupalLogin($admin);
@@ -179,7 +179,7 @@ public function testUserWithoutEmailEdit() {
   /**
    * Tests well known change password route redirects to user edit form.
    */
-  public function testUserWellKnownChangePasswordAuth() {
+  public function testUserWellKnownChangePasswordAuth(): void {
     $account = $this->drupalCreateUser([]);
     $this->drupalLogin($account);
     $this->drupalGet('.well-known/change-password');
@@ -189,7 +189,7 @@ public function testUserWellKnownChangePasswordAuth() {
   /**
    * Tests well known change password route returns 403 to anonymous user.
    */
-  public function testUserWellKnownChangePasswordAnon() {
+  public function testUserWellKnownChangePasswordAnon(): void {
     $this->drupalGet('.well-known/change-password');
     $this->assertSession()->statusCodeEquals(403);
   }
@@ -197,7 +197,7 @@ public function testUserWellKnownChangePasswordAnon() {
   /**
    * Tests that a user is able to change site language.
    */
-  public function testUserChangeSiteLanguage() {
+  public function testUserChangeSiteLanguage(): void {
     // Install these modules here as these aren't needed for other test methods.
     \Drupal::service('module_installer')->install([
       'content_translation',
@@ -250,7 +250,7 @@ public function testUserChangeSiteLanguage() {
   /**
    * Tests the account form implements entity field access for mail.
    */
-  public function testUserMailFieldAccess() {
+  public function testUserMailFieldAccess(): void {
     \Drupal::state()->set('user_access_test_forbid_mail_edit', TRUE);
     \Drupal::service('module_installer')->install(['user_access_test']);
     $user = $this->drupalCreateUser();
diff --git a/core/modules/user/tests/src/Functional/UserEditedOwnAccountTest.php b/core/modules/user/tests/src/Functional/UserEditedOwnAccountTest.php
index 6ee3d5d5782e..9ff72b182a1f 100644
--- a/core/modules/user/tests/src/Functional/UserEditedOwnAccountTest.php
+++ b/core/modules/user/tests/src/Functional/UserEditedOwnAccountTest.php
@@ -19,7 +19,7 @@ class UserEditedOwnAccountTest extends BrowserTestBase {
    */
   protected $defaultTheme = 'stark';
 
-  public function testUserEditedOwnAccount() {
+  public function testUserEditedOwnAccount(): void {
     // Change account setting 'Who can register accounts?' to Administrators
     // only.
     $this->config('user.settings')->set('register', UserInterface::REGISTER_ADMINISTRATORS_ONLY)->save();
diff --git a/core/modules/user/tests/src/Functional/UserLanguageCreationTest.php b/core/modules/user/tests/src/Functional/UserLanguageCreationTest.php
index e52f99d9d090..fe6af7e8289f 100644
--- a/core/modules/user/tests/src/Functional/UserLanguageCreationTest.php
+++ b/core/modules/user/tests/src/Functional/UserLanguageCreationTest.php
@@ -29,7 +29,7 @@ class UserLanguageCreationTest extends BrowserTestBase {
   /**
    * Functional test for language handling during user creation.
    */
-  public function testLocalUserCreation() {
+  public function testLocalUserCreation(): void {
     // User to add and remove language and create new users.
     $admin_user = $this->drupalCreateUser([
       'administer languages',
diff --git a/core/modules/user/tests/src/Functional/UserLanguageTest.php b/core/modules/user/tests/src/Functional/UserLanguageTest.php
index ca907eb19298..20b491392638 100644
--- a/core/modules/user/tests/src/Functional/UserLanguageTest.php
+++ b/core/modules/user/tests/src/Functional/UserLanguageTest.php
@@ -29,7 +29,7 @@ class UserLanguageTest extends BrowserTestBase {
   /**
    * Tests if user can change their default language.
    */
-  public function testUserLanguageConfiguration() {
+  public function testUserLanguageConfiguration(): void {
     // User to add and remove language.
     $admin_user = $this->drupalCreateUser([
       'administer languages',
diff --git a/core/modules/user/tests/src/Functional/UserLoginHttpTest.php b/core/modules/user/tests/src/Functional/UserLoginHttpTest.php
index 3cf3eeebd2fc..2cf4b13c3e7a 100644
--- a/core/modules/user/tests/src/Functional/UserLoginHttpTest.php
+++ b/core/modules/user/tests/src/Functional/UserLoginHttpTest.php
@@ -103,7 +103,7 @@ protected function loginRequest($name, $pass, $format = 'json') {
   /**
    * Tests user session life cycle.
    */
-  public function testLogin() {
+  public function testLogin(): void {
     // Without the serialization module only JSON is supported.
     $this->doTestLogin('json');
 
@@ -239,7 +239,7 @@ protected function passwordRequest(array $request_body, $format = 'json') {
   /**
    * Tests user password reset.
    */
-  public function testPasswordReset() {
+  public function testPasswordReset(): void {
     // Create a user account.
     $account = $this->drupalCreateUser();
 
diff --git a/core/modules/user/tests/src/Functional/UserLoginTest.php b/core/modules/user/tests/src/Functional/UserLoginTest.php
index 94a6d34d63fd..4302113c42a0 100644
--- a/core/modules/user/tests/src/Functional/UserLoginTest.php
+++ b/core/modules/user/tests/src/Functional/UserLoginTest.php
@@ -34,7 +34,7 @@ class UserLoginTest extends BrowserTestBase {
   /**
    * Tests login with destination.
    */
-  public function testLoginCacheTagsAndDestination() {
+  public function testLoginCacheTagsAndDestination(): void {
     $this->drupalGet('user/login');
     // The user login form says "Enter your <site name> username.", hence it
     // depends on config:system.site, and its cache tags should be present.
@@ -50,7 +50,7 @@ public function testLoginCacheTagsAndDestination() {
   /**
    * Tests the global login flood control.
    */
-  public function testGlobalLoginFloodControl() {
+  public function testGlobalLoginFloodControl(): void {
     $this->config('user.flood')
       ->set('ip_limit', 10)
       // Set a high per-user limit out so that it is not relevant in the test.
@@ -94,7 +94,7 @@ public function testGlobalLoginFloodControl() {
   /**
    * Tests the per-user login flood control.
    */
-  public function testPerUserLoginFloodControl() {
+  public function testPerUserLoginFloodControl(): void {
     $this->config('user.flood')
       // Set a high global limit out so that it is not relevant in the test.
       ->set('ip_limit', 4000)
@@ -141,7 +141,7 @@ public function testPerUserLoginFloodControl() {
   /**
    * Tests user password is re-hashed upon login after changing $count_log2.
    */
-  public function testPasswordRehashOnLogin() {
+  public function testPasswordRehashOnLogin(): void {
     // Retrieve instance of password hashing algorithm.
     $password_hasher = $this->container->get('password');
 
@@ -182,7 +182,7 @@ public function testPasswordRehashOnLogin() {
   /**
    * Tests log in with a maximum length and a too long password.
    */
-  public function testPasswordLengthLogin() {
+  public function testPasswordLengthLogin(): void {
     // Create a new user and authenticate.
     $account = $this->drupalCreateUser([]);
     $current_password = $account->passRaw;
@@ -243,7 +243,7 @@ public function doPasswordLengthLogin(UserInterface $account, string $current_pa
   /**
    * Tests with a browser that denies cookies.
    */
-  public function testCookiesNotAccepted() {
+  public function testCookiesNotAccepted(): void {
     $this->drupalGet('user/login');
     $form_build_id = $this->getSession()->getPage()->findField('form_build_id');
 
@@ -348,7 +348,7 @@ public function resetUserPassword($user) {
   /**
    * Tests that user login form has the autocomplete attributes.
    */
-  public function testAutocompleteHtmlAttributes() {
+  public function testAutocompleteHtmlAttributes(): void {
     $this->drupalGet('user/login');
     $name_field = $this->getSession()->getPage()->findField('name');
     $pass_field = $this->getSession()->getPage()->findField('pass');
diff --git a/core/modules/user/tests/src/Functional/UserPasswordResetTest.php b/core/modules/user/tests/src/Functional/UserPasswordResetTest.php
index 5ecf3b53f482..21cbfd5639a1 100644
--- a/core/modules/user/tests/src/Functional/UserPasswordResetTest.php
+++ b/core/modules/user/tests/src/Functional/UserPasswordResetTest.php
@@ -83,7 +83,7 @@ protected function setUp(): void {
   /**
    * Tests password reset functionality.
    */
-  public function testUserPasswordReset() {
+  public function testUserPasswordReset(): void {
     // Verify that accessing the password reset form without having the session
     // variables set results in an access denied message.
     $this->drupalGet(Url::fromRoute('user.reset.form', ['uid' => $this->account->id()]));
@@ -242,7 +242,7 @@ public function testUserPasswordReset() {
    *
    * @dataProvider languagePrefixTestProvider
    */
-  public function testUserPasswordResetPreferredLanguage($setPreferredLangcode, $activeLangcode, $prefix, $visitingUrl, $expectedResetUrl, $unexpectedResetUrl) {
+  public function testUserPasswordResetPreferredLanguage($setPreferredLangcode, $activeLangcode, $prefix, $visitingUrl, $expectedResetUrl, $unexpectedResetUrl): void {
     // Set two new languages.
     ConfigurableLanguage::createFromLangcode('fr')->save();
     ConfigurableLanguage::createFromLangcode('zh-hant')->save();
@@ -326,7 +326,7 @@ public function getResetURL() {
   /**
    * Tests user password reset while logged in.
    */
-  public function testUserPasswordResetLoggedIn() {
+  public function testUserPasswordResetLoggedIn(): void {
     $another_account = $this->drupalCreateUser();
     $this->drupalLogin($another_account);
     $this->drupalGet('user/password');
@@ -382,7 +382,7 @@ public function testUserPasswordResetLoggedIn() {
   /**
    * Tests the text box on incorrect login via link to password reset page.
    */
-  public function testUserResetPasswordTextboxNotFilled() {
+  public function testUserResetPasswordTextboxNotFilled(): void {
     $this->drupalGet('user/login');
     $edit = [
       'name' => $this->randomMachineName(),
@@ -409,7 +409,7 @@ public function testUserResetPasswordTextboxNotFilled() {
   /**
    * Tests password reset flood control for one user.
    */
-  public function testUserResetPasswordUserFloodControl() {
+  public function testUserResetPasswordUserFloodControl(): void {
     \Drupal::configFactory()->getEditable('user.flood')
       ->set('user_limit', 3)
       ->save();
@@ -440,7 +440,7 @@ public function testUserResetPasswordUserFloodControl() {
   /**
    * Tests password reset flood control for one IP.
    */
-  public function testUserResetPasswordIpFloodControl() {
+  public function testUserResetPasswordIpFloodControl(): void {
     \Drupal::configFactory()->getEditable('user.flood')
       ->set('ip_limit', 3)
       ->save();
@@ -466,7 +466,7 @@ public function testUserResetPasswordIpFloodControl() {
   /**
    * Tests user password reset flood control is cleared on successful reset.
    */
-  public function testUserResetPasswordUserFloodControlIsCleared() {
+  public function testUserResetPasswordUserFloodControlIsCleared(): void {
     \Drupal::configFactory()->getEditable('user.flood')
       ->set('user_limit', 3)
       ->save();
@@ -506,7 +506,7 @@ public function testUserResetPasswordUserFloodControlIsCleared() {
   /**
    * Tests user password reset flood control is cleared on admin reset.
    */
-  public function testUserResetPasswordUserFloodControlAdmin() {
+  public function testUserResetPasswordUserFloodControlAdmin(): void {
     $admin_user = $this->drupalCreateUser([
       'administer account settings',
       'administer users',
@@ -602,7 +602,7 @@ public function assertNoPasswordIpFlood(): void {
   /**
    * Make sure that users cannot forge password reset URLs of other users.
    */
-  public function testResetImpersonation() {
+  public function testResetImpersonation(): void {
     // Create two identical user accounts except for the user name. They must
     // have the same empty password, so we can't use $this->drupalCreateUser().
     $edit = [];
@@ -647,7 +647,7 @@ public function testResetImpersonation() {
   /**
    * Test the autocomplete attribute is present.
    */
-  public function testResetFormHasAutocompleteAttribute() {
+  public function testResetFormHasAutocompleteAttribute(): void {
     $this->drupalGet('user/password');
     $field = $this->getSession()->getPage()->findField('name');
     $this->assertEquals('username', $field->getAttribute('autocomplete'));
diff --git a/core/modules/user/tests/src/Functional/UserPermissionsAdminTest.php b/core/modules/user/tests/src/Functional/UserPermissionsAdminTest.php
index 7321e44d23cb..fd96252c689c 100644
--- a/core/modules/user/tests/src/Functional/UserPermissionsAdminTest.php
+++ b/core/modules/user/tests/src/Functional/UserPermissionsAdminTest.php
@@ -22,7 +22,7 @@ class UserPermissionsAdminTest extends BrowserTestBase {
   /**
    * Tests granting and revoking permissions via the UI sorts permissions.
    */
-  public function testPermissionsSorting() {
+  public function testPermissionsSorting(): void {
     $role = Role::create(['id' => 'test_role', 'label' => 'Test role']);
     // Start the role with a permission that is near the end of the alphabet.
     $role->grantPermission('view user email addresses');
diff --git a/core/modules/user/tests/src/Functional/UserPermissionsTest.php b/core/modules/user/tests/src/Functional/UserPermissionsTest.php
index 5dbee10410b8..b9fea1381634 100644
--- a/core/modules/user/tests/src/Functional/UserPermissionsTest.php
+++ b/core/modules/user/tests/src/Functional/UserPermissionsTest.php
@@ -57,7 +57,7 @@ protected function setUp(): void {
   /**
    * Tests changing user permissions through the permissions pages.
    */
-  public function testUserPermissionChanges() {
+  public function testUserPermissionChanges(): void {
     $permissions_hash_generator = $this->container->get('user_permissions_hash_generator');
 
     $storage = $this->container->get('entity_type.manager')->getStorage('user_role');
@@ -123,7 +123,7 @@ public function testUserPermissionChanges() {
   /**
    * Tests assigning of permissions for the administrator role.
    */
-  public function testAdministratorRole() {
+  public function testAdministratorRole(): void {
     $this->drupalLogin($this->adminUser);
     $this->drupalGet('admin/people/role-settings');
 
@@ -168,7 +168,7 @@ public function testAdministratorRole() {
   /**
    * Verify proper permission changes by user_role_change_permissions().
    */
-  public function testUserRoleChangePermissions() {
+  public function testUserRoleChangePermissions(): void {
     $permissions_hash_generator = $this->container->get('user_permissions_hash_generator');
 
     $rid = $this->rid;
@@ -200,7 +200,7 @@ public function testUserRoleChangePermissions() {
   /**
    * Verify 'access content' is listed in the correct location.
    */
-  public function testAccessContentPermission() {
+  public function testAccessContentPermission(): void {
     $this->drupalLogin($this->adminUser);
 
     // When Node is not installed the 'access content' permission is listed next
@@ -220,7 +220,7 @@ public function testAccessContentPermission() {
   /**
    * Verify that module-specific pages have correct access.
    */
-  public function testAccessModulePermission() {
+  public function testAccessModulePermission(): void {
     $this->drupalLogin($this->adminUser);
 
     // When Node is not installed, the node-permissions page is not available.
@@ -254,7 +254,7 @@ public function testAccessModulePermission() {
   /**
    * Verify that bundle-specific pages work properly.
    */
-  public function testAccessBundlePermission() {
+  public function testAccessBundlePermission(): void {
     $this->drupalLogin($this->adminUser);
 
     \Drupal::service('module_installer')->install(['contact', 'taxonomy']);
diff --git a/core/modules/user/tests/src/Functional/UserPictureTest.php b/core/modules/user/tests/src/Functional/UserPictureTest.php
index 3d1f05d7769e..a57506d9726a 100644
--- a/core/modules/user/tests/src/Functional/UserPictureTest.php
+++ b/core/modules/user/tests/src/Functional/UserPictureTest.php
@@ -69,7 +69,7 @@ protected function setUp(): void {
   /**
    * Tests creation, display, and deletion of user pictures.
    */
-  public function testCreateDeletePicture() {
+  public function testCreateDeletePicture(): void {
     $this->drupalLogin($this->webUser);
 
     // Save a new picture.
@@ -108,7 +108,7 @@ public function testCreateDeletePicture() {
   /**
    * Tests embedded users on node pages.
    */
-  public function testPictureOnNodeComment() {
+  public function testPictureOnNodeComment(): void {
     $this->drupalLogin($this->webUser);
 
     $this->drupalCreateContentType(['type' => 'article', 'name' => 'Article']);
@@ -177,7 +177,7 @@ public function saveUserPicture($image) {
    *
    * @see user_user_view_alter()
    */
-  public function testUserViewAlter() {
+  public function testUserViewAlter(): void {
     \Drupal::service('module_installer')->install(['image_module_test']);
     // Set dummy_image_formatter to the default view mode of user entity.
     EntityViewDisplay::load('user.user.default')->setComponent('user_picture', [
diff --git a/core/modules/user/tests/src/Functional/UserRegistrationRestTest.php b/core/modules/user/tests/src/Functional/UserRegistrationRestTest.php
index aadf5ada016d..651d9d2a7fd2 100644
--- a/core/modules/user/tests/src/Functional/UserRegistrationRestTest.php
+++ b/core/modules/user/tests/src/Functional/UserRegistrationRestTest.php
@@ -71,7 +71,7 @@ public function setUp(): void {
   /**
    * Tests that only anonymous users can register users.
    */
-  public function testRegisterUser() {
+  public function testRegisterUser(): void {
     $config = $this->config('user.settings');
 
     // Test out different setting User Registration and Email Verification.
diff --git a/core/modules/user/tests/src/Functional/UserRegistrationTest.php b/core/modules/user/tests/src/Functional/UserRegistrationTest.php
index a6b95713baa7..5aac6f11f9e4 100644
--- a/core/modules/user/tests/src/Functional/UserRegistrationTest.php
+++ b/core/modules/user/tests/src/Functional/UserRegistrationTest.php
@@ -30,7 +30,7 @@ class UserRegistrationTest extends BrowserTestBase {
    */
   protected $defaultTheme = 'stark';
 
-  public function testRegistrationWithEmailVerification() {
+  public function testRegistrationWithEmailVerification(): void {
     $config = $this->config('user.settings');
     // Require email verification.
     $config->set('verify_mail', TRUE)->save();
@@ -72,7 +72,7 @@ public function testRegistrationWithEmailVerification() {
     $this->assertFalse($new_user->isActive(), 'New account is blocked until approved by an administrator.');
   }
 
-  public function testRegistrationWithoutEmailVerification() {
+  public function testRegistrationWithoutEmailVerification(): void {
     $config = $this->config('user.settings');
     // Don't require email verification and allow registration by site visitors
     // without administrator approval.
@@ -144,7 +144,7 @@ public function testRegistrationWithoutEmailVerification() {
     $this->assertSession()->pageTextContains('Member for');
   }
 
-  public function testRegistrationEmailDuplicates() {
+  public function testRegistrationEmailDuplicates(): void {
     // Don't require email verification and allow registration by site visitors
     // without administrator approval.
     $this->config('user.settings')
@@ -178,7 +178,7 @@ public function testRegistrationEmailDuplicates() {
    * This is a regression test for https://www.drupal.org/node/2500527 to ensure
    * that the form is not cached on GET requests.
    */
-  public function testUuidFormState() {
+  public function testUuidFormState(): void {
     \Drupal::service('module_installer')->install(['image']);
 
     // Add a picture field in order to ensure that no form cache is written,
@@ -242,7 +242,7 @@ public function testUuidFormState() {
     $this->assertNotEmpty($user_storage->loadByProperties(['name' => $edit['name']]));
   }
 
-  public function testRegistrationDefaultValues() {
+  public function testRegistrationDefaultValues(): void {
     // Don't require email verification and allow registration by site visitors
     // without administrator approval.
     $config_user_settings = $this->config('user.settings')
@@ -288,7 +288,7 @@ public function testRegistrationDefaultValues() {
    * @see \Drupal\user\Plugin\Validation\Constraint\UserNameUnique
    * @see \Drupal\user\Plugin\Validation\Constraint\UserMailUnique
    */
-  public function testUniqueFields() {
+  public function testUniqueFields(): void {
     $account = $this->drupalCreateUser();
 
     $edit = ['mail' => 'test@example.com', 'name' => $account->getAccountName()];
@@ -305,7 +305,7 @@ public function testUniqueFields() {
   /**
    * Tests Field API fields on user registration forms.
    */
-  public function testRegistrationWithUserFields() {
+  public function testRegistrationWithUserFields(): void {
     // Create a field on 'user' entity type.
     $field_storage = FieldStorageConfig::create([
       'field_name' => 'test_user_field',
diff --git a/core/modules/user/tests/src/Functional/UserRoleAdminTest.php b/core/modules/user/tests/src/Functional/UserRoleAdminTest.php
index 7cc87835eecf..3c54ea3c0f43 100644
--- a/core/modules/user/tests/src/Functional/UserRoleAdminTest.php
+++ b/core/modules/user/tests/src/Functional/UserRoleAdminTest.php
@@ -49,7 +49,7 @@ protected function setUp(): void {
   /**
    * Tests adding, renaming and deleting roles.
    */
-  public function testRoleAdministration() {
+  public function testRoleAdministration(): void {
     $this->drupalLogin($this->adminUser);
     $default_langcode = \Drupal::languageManager()->getDefaultLanguage()->getId();
     // Test presence of tab.
@@ -113,7 +113,7 @@ public function testRoleAdministration() {
   /**
    * Tests user role weight change operation and ordering.
    */
-  public function testRoleWeightOrdering() {
+  public function testRoleWeightOrdering(): void {
     $this->drupalLogin($this->adminUser);
     $roles = Role::loadMultiple();
     $weight = count($roles);
diff --git a/core/modules/user/tests/src/Functional/UserRolesAssignmentTest.php b/core/modules/user/tests/src/Functional/UserRolesAssignmentTest.php
index c6115a7854a9..44f9a36cb9aa 100644
--- a/core/modules/user/tests/src/Functional/UserRolesAssignmentTest.php
+++ b/core/modules/user/tests/src/Functional/UserRolesAssignmentTest.php
@@ -33,7 +33,7 @@ protected function setUp(): void {
   /**
    * Test that user can be assigned role and that the role can be removed again.
    */
-  public function testAssignAndRemoveRole() {
+  public function testAssignAndRemoveRole(): void {
     $rid = $this->drupalCreateRole(['administer users']);
     $account = $this->drupalCreateUser();
 
@@ -55,7 +55,7 @@ public function testAssignAndRemoveRole() {
   /**
    * Tests assigning a role at user creation and removing the role.
    */
-  public function testCreateUserWithRole() {
+  public function testCreateUserWithRole(): void {
     $rid = $this->drupalCreateRole(['administer users']);
     // Create a new user and add the role at the same time.
     $edit = [
diff --git a/core/modules/user/tests/src/Functional/UserSearchTest.php b/core/modules/user/tests/src/Functional/UserSearchTest.php
index 57c75a908f7c..d1432f9f4af7 100644
--- a/core/modules/user/tests/src/Functional/UserSearchTest.php
+++ b/core/modules/user/tests/src/Functional/UserSearchTest.php
@@ -25,7 +25,7 @@ class UserSearchTest extends BrowserTestBase {
    */
   protected $defaultTheme = 'stark';
 
-  public function testUserSearch() {
+  public function testUserSearch(): void {
     // Verify that a user without 'administer users' permission cannot search
     // for users by email address. Additionally, ensure that the username has a
     // plus sign to ensure searching works with that.
diff --git a/core/modules/user/tests/src/Functional/UserSubAdminTest.php b/core/modules/user/tests/src/Functional/UserSubAdminTest.php
index 250ce6abcada..c5ec390da20f 100644
--- a/core/modules/user/tests/src/Functional/UserSubAdminTest.php
+++ b/core/modules/user/tests/src/Functional/UserSubAdminTest.php
@@ -26,7 +26,7 @@ class UserSubAdminTest extends BrowserTestBase {
   /**
    * Tests create and cancel forms as 'sub-admin'.
    */
-  public function testSubAdmin() {
+  public function testSubAdmin(): void {
     $user = $this->drupalCreateUser(['sub-admin']);
     $this->drupalLogin($user);
 
diff --git a/core/modules/user/tests/src/Functional/UserTimeZoneTest.php b/core/modules/user/tests/src/Functional/UserTimeZoneTest.php
index 1a630754a113..7f25b391cc05 100644
--- a/core/modules/user/tests/src/Functional/UserTimeZoneTest.php
+++ b/core/modules/user/tests/src/Functional/UserTimeZoneTest.php
@@ -29,7 +29,7 @@ class UserTimeZoneTest extends BrowserTestBase {
   /**
    * Tests the display of dates and time when user-configurable time zones are set.
    */
-  public function testUserTimeZone() {
+  public function testUserTimeZone(): void {
     // Setup date/time settings for Los Angeles time.
     $this->config('system.date')
       ->set('timezone.user.configurable', 1)
diff --git a/core/modules/user/tests/src/Functional/UserTokenReplaceTest.php b/core/modules/user/tests/src/Functional/UserTokenReplaceTest.php
index 881010cf8bb2..a9bc370c6ce9 100644
--- a/core/modules/user/tests/src/Functional/UserTokenReplaceTest.php
+++ b/core/modules/user/tests/src/Functional/UserTokenReplaceTest.php
@@ -40,7 +40,7 @@ protected function setUp(): void {
   /**
    * Creates a user, then tests the tokens generated from it.
    */
-  public function testUserTokenReplacement() {
+  public function testUserTokenReplacement(): void {
     $token_service = \Drupal::token();
     $language_interface = \Drupal::languageManager()->getCurrentLanguage();
     $url_options = [
diff --git a/core/modules/user/tests/src/Functional/UserTranslationUITest.php b/core/modules/user/tests/src/Functional/UserTranslationUITest.php
index 1af1453eaae6..1a388b931302 100644
--- a/core/modules/user/tests/src/Functional/UserTranslationUITest.php
+++ b/core/modules/user/tests/src/Functional/UserTranslationUITest.php
@@ -100,7 +100,7 @@ protected function doTestTranslationEdit() {
   /**
    * Tests translated user deletion.
    */
-  public function testTranslatedUserDeletion() {
+  public function testTranslatedUserDeletion(): void {
     $this->drupalLogin($this->administrator);
     $entity_id = $this->createEntity($this->getNewEntityValues('en'), 'en');
 
diff --git a/core/modules/user/tests/src/Functional/Views/AccessRoleTest.php b/core/modules/user/tests/src/Functional/Views/AccessRoleTest.php
index 6aaf342bedce..58a5b0d346b4 100644
--- a/core/modules/user/tests/src/Functional/Views/AccessRoleTest.php
+++ b/core/modules/user/tests/src/Functional/Views/AccessRoleTest.php
@@ -42,7 +42,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['user_test_views
   /**
    * Tests role access plugin.
    */
-  public function testAccessRole() {
+  public function testAccessRole(): void {
     /** @var \Drupal\views\ViewEntityInterface $view */
     $view = \Drupal::entityTypeManager()->getStorage('view')->load('test_access_role');
     $display = &$view->getDisplay('default');
@@ -113,7 +113,7 @@ public function testAccessRole() {
   /**
    * Tests access on render caching.
    */
-  public function testRenderCaching() {
+  public function testRenderCaching(): void {
     $view = Views::getView('test_access_role');
     $display = &$view->storage->getDisplay('default');
     $display['display_options']['cache'] = [
diff --git a/core/modules/user/tests/src/Functional/Views/BulkFormAccessTest.php b/core/modules/user/tests/src/Functional/Views/BulkFormAccessTest.php
index 14c6bdf879ff..93ff96adabd5 100644
--- a/core/modules/user/tests/src/Functional/Views/BulkFormAccessTest.php
+++ b/core/modules/user/tests/src/Functional/Views/BulkFormAccessTest.php
@@ -37,7 +37,7 @@ class BulkFormAccessTest extends UserTestBase {
   /**
    * Tests if users that may not be edited, can not be edited in bulk.
    */
-  public function testUserEditAccess() {
+  public function testUserEditAccess(): void {
     // Create an authenticated user.
     $no_edit_user = $this->drupalCreateUser([], 'no_edit');
     // Ensure this account is not blocked.
@@ -99,7 +99,7 @@ public function testUserEditAccess() {
   /**
    * Tests if users that may not be deleted, can not be deleted in bulk.
    */
-  public function testUserDeleteAccess() {
+  public function testUserDeleteAccess(): void {
     // Create two authenticated users.
     $account = $this->drupalCreateUser([], 'no_delete');
     $account2 = $this->drupalCreateUser([], 'may_delete');
diff --git a/core/modules/user/tests/src/Functional/Views/BulkFormTest.php b/core/modules/user/tests/src/Functional/Views/BulkFormTest.php
index 19e378c88060..3e1548a10229 100644
--- a/core/modules/user/tests/src/Functional/Views/BulkFormTest.php
+++ b/core/modules/user/tests/src/Functional/Views/BulkFormTest.php
@@ -39,7 +39,7 @@ class BulkFormTest extends UserTestBase {
   /**
    * Tests the user bulk form.
    */
-  public function testBulkForm() {
+  public function testBulkForm(): void {
     // Log in as a user without 'administer users'.
     $this->drupalLogin($this->drupalCreateUser(['administer permissions']));
     $user_storage = $this->container->get('entity_type.manager')->getStorage('user');
@@ -144,7 +144,7 @@ public function testBulkForm() {
   /**
    * Tests the user bulk form with a combined field filter on the bulk column.
    */
-  public function testBulkFormCombineFilter() {
+  public function testBulkFormCombineFilter(): void {
     // Add a user.
     User::load($this->users[0]->id());
     $view = Views::getView('test_user_bulk_form_combine_filter');
diff --git a/core/modules/user/tests/src/Functional/Views/FilterPermissionUiTest.php b/core/modules/user/tests/src/Functional/Views/FilterPermissionUiTest.php
index 5ee903b272d3..21ba6d7cfe5a 100644
--- a/core/modules/user/tests/src/Functional/Views/FilterPermissionUiTest.php
+++ b/core/modules/user/tests/src/Functional/Views/FilterPermissionUiTest.php
@@ -45,7 +45,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['user_test_views
   /**
    * Tests basic filter handler settings in the UI.
    */
-  public function testHandlerUI() {
+  public function testHandlerUI(): void {
     $this->drupalLogin($this->drupalCreateUser([
       'administer views',
       'administer users',
diff --git a/core/modules/user/tests/src/Functional/Views/HandlerFieldRoleTest.php b/core/modules/user/tests/src/Functional/Views/HandlerFieldRoleTest.php
index 99afa5dbe8cd..24de6fbf9b33 100644
--- a/core/modules/user/tests/src/Functional/Views/HandlerFieldRoleTest.php
+++ b/core/modules/user/tests/src/Functional/Views/HandlerFieldRoleTest.php
@@ -27,7 +27,7 @@ class HandlerFieldRoleTest extends UserTestBase {
    */
   protected $defaultTheme = 'stark';
 
-  public function testRole() {
+  public function testRole(): void {
     // Create a couple of roles for the view.
     $role_name_a = 'a' . $this->randomMachineName(8);
     $this->drupalCreateRole(['access content'], $role_name_a, '<em>' . $role_name_a . '</em>', 9);
diff --git a/core/modules/user/tests/src/Functional/Views/HandlerFieldUserNameTest.php b/core/modules/user/tests/src/Functional/Views/HandlerFieldUserNameTest.php
index 97852c7271bb..656ead917de1 100644
--- a/core/modules/user/tests/src/Functional/Views/HandlerFieldUserNameTest.php
+++ b/core/modules/user/tests/src/Functional/Views/HandlerFieldUserNameTest.php
@@ -27,7 +27,7 @@ class HandlerFieldUserNameTest extends UserTestBase {
    */
   protected $defaultTheme = 'stark';
 
-  public function testUserName() {
+  public function testUserName(): void {
     /** @var \Drupal\Core\Render\RendererInterface $renderer */
     $renderer = \Drupal::service('renderer');
 
@@ -69,7 +69,7 @@ public function testUserName() {
   /**
    * Tests that the field handler works when no additional fields are added.
    */
-  public function testNoAdditionalFields() {
+  public function testNoAdditionalFields(): void {
     /** @var \Drupal\Core\Render\RendererInterface $renderer */
     $renderer = \Drupal::service('renderer');
 
diff --git a/core/modules/user/tests/src/Functional/Views/HandlerFilterUserNameTest.php b/core/modules/user/tests/src/Functional/Views/HandlerFilterUserNameTest.php
index 6021c2de9fa5..fc0f6c2c7aa0 100644
--- a/core/modules/user/tests/src/Functional/Views/HandlerFilterUserNameTest.php
+++ b/core/modules/user/tests/src/Functional/Views/HandlerFilterUserNameTest.php
@@ -76,7 +76,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['user_test_views
   /**
    * Tests just using the filter.
    */
-  public function testUserNameApi() {
+  public function testUserNameApi(): void {
     $view = Views::getView('test_user_name');
 
     $view->initHandlers();
@@ -91,7 +91,7 @@ public function testUserNameApi() {
   /**
    * Tests using the user interface.
    */
-  public function testAdminUserInterface() {
+  public function testAdminUserInterface(): void {
     $admin_user = $this->drupalCreateUser([
       'administer views',
       'administer site configuration',
@@ -137,7 +137,7 @@ public function testAdminUserInterface() {
   /**
    * Tests exposed filters.
    */
-  public function testExposedFilter() {
+  public function testExposedFilter(): void {
     $path = 'test_user_name';
 
     $options = [];
diff --git a/core/modules/user/tests/src/Functional/Views/RolesRidArgumentTest.php b/core/modules/user/tests/src/Functional/Views/RolesRidArgumentTest.php
index c6359267e1e7..bd7ed7508698 100644
--- a/core/modules/user/tests/src/Functional/Views/RolesRidArgumentTest.php
+++ b/core/modules/user/tests/src/Functional/Views/RolesRidArgumentTest.php
@@ -32,7 +32,7 @@ class RolesRidArgumentTest extends UserTestBase {
   /**
    * Tests the generated title of a user: roles argument.
    */
-  public function testArgumentTitle() {
+  public function testArgumentTitle(): void {
     $role_id = $this->createRole([], 'markup_role_name', '<em>Role name with markup</em>');
     $this->createRole([], 'second_role_name', 'Second role name');
     $user = $this->createUser([], 'User with role one');
diff --git a/core/modules/user/tests/src/Functional/Views/UserChangedTest.php b/core/modules/user/tests/src/Functional/Views/UserChangedTest.php
index 11d2878d0f9e..81371c778ae8 100644
--- a/core/modules/user/tests/src/Functional/Views/UserChangedTest.php
+++ b/core/modules/user/tests/src/Functional/Views/UserChangedTest.php
@@ -44,7 +44,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['user_test_views
   /**
    * Tests changed field.
    */
-  public function testChangedField() {
+  public function testChangedField(): void {
     $path = 'test_user_changed';
 
     $options = [];
diff --git a/core/modules/user/tests/src/Functional/Views/UserFieldsAccessChangeTest.php b/core/modules/user/tests/src/Functional/Views/UserFieldsAccessChangeTest.php
index 4f6a0e67b299..9ff5f8211ca4 100644
--- a/core/modules/user/tests/src/Functional/Views/UserFieldsAccessChangeTest.php
+++ b/core/modules/user/tests/src/Functional/Views/UserFieldsAccessChangeTest.php
@@ -33,7 +33,7 @@ class UserFieldsAccessChangeTest extends UserTestBase {
   /**
    * Tests if another module can change field access.
    */
-  public function testUserFieldAccess() {
+  public function testUserFieldAccess(): void {
     $this->drupalGet('test_user_fields_access');
 
     // User has access to name and created date by default.
@@ -62,7 +62,7 @@ public function testUserFieldAccess() {
    * Tests that the user name formatter shows a link to the user when there is
    * access but not otherwise.
    */
-  public function testUserNameLink() {
+  public function testUserNameLink(): void {
     $test_user = $this->drupalCreateUser();
     $xpath = "//td/a[.='" . $test_user->getAccountName() . "']/@href[.='" . $test_user->toUrl()->toString() . "']";
 
diff --git a/core/modules/user/tests/src/FunctionalJavascript/PasswordConfirmWidgetTest.php b/core/modules/user/tests/src/FunctionalJavascript/PasswordConfirmWidgetTest.php
index aafd4fc6315e..7f63bec926e9 100644
--- a/core/modules/user/tests/src/FunctionalJavascript/PasswordConfirmWidgetTest.php
+++ b/core/modules/user/tests/src/FunctionalJavascript/PasswordConfirmWidgetTest.php
@@ -47,7 +47,7 @@ protected function setUp(): void {
   /**
    * Tests the components added to the password confirm widget.
    */
-  public function testPasswordConfirmWidgetJsComponents() {
+  public function testPasswordConfirmWidgetJsComponents(): void {
     $this->drupalGet($this->testUser->toUrl('edit-form'));
 
     $password_confirm_widget_selector = '.js-form-type-password-confirm.js-form-item-pass';
@@ -129,7 +129,7 @@ public function testPasswordConfirmWidgetJsComponents() {
   /**
    * Ensures that password match message is visible when widget is initialized.
    */
-  public function testPasswordConfirmMessage() {
+  public function testPasswordConfirmMessage(): void {
     $this->drupalGet($this->testUser->toUrl('edit-form'));
     $password_confirm_widget_selector = '.js-form-type-password-confirm.js-form-item-pass';
     $password_confirm_selector = '.js-form-item-pass-pass2';
@@ -145,7 +145,7 @@ public function testPasswordConfirmMessage() {
   /**
    * Tests the password confirm widget so that only confirm input is filled.
    */
-  public function testFillConfirmOnly() {
+  public function testFillConfirmOnly(): void {
     $this->drupalGet($this->testUser->toUrl('edit-form'));
     $password_confirm_widget_selector = '.js-form-type-password-confirm.js-form-item-pass';
     $password_parent_selector = '.js-form-item-pass-pass1';
diff --git a/core/modules/user/tests/src/FunctionalJavascript/PermissionFilterTest.php b/core/modules/user/tests/src/FunctionalJavascript/PermissionFilterTest.php
index 67ccc3a6fb7f..f961061c2c4a 100644
--- a/core/modules/user/tests/src/FunctionalJavascript/PermissionFilterTest.php
+++ b/core/modules/user/tests/src/FunctionalJavascript/PermissionFilterTest.php
@@ -38,7 +38,7 @@ protected function setUp(): void {
   /**
    * Tests that filter results announcement has correct pluralization.
    */
-  public function testPermissionFilter() {
+  public function testPermissionFilter(): void {
     // Find the permission filter field.
     $this->drupalGet('admin/people/permissions');
     $assertSession = $this->assertSession();
diff --git a/core/modules/user/tests/src/FunctionalJavascript/RegistrationWithUserFieldsTest.php b/core/modules/user/tests/src/FunctionalJavascript/RegistrationWithUserFieldsTest.php
index 488fa96778b1..7361ea0698cb 100644
--- a/core/modules/user/tests/src/FunctionalJavascript/RegistrationWithUserFieldsTest.php
+++ b/core/modules/user/tests/src/FunctionalJavascript/RegistrationWithUserFieldsTest.php
@@ -52,7 +52,7 @@ protected function setUp(): void {
   /**
    * Tests Field API fields on user registration forms.
    */
-  public function testRegistrationWithUserFields() {
+  public function testRegistrationWithUserFields(): void {
     // Create a field on 'user' entity type.
     $field_storage = FieldStorageConfig::create([
       'field_name' => 'test_user_field',
diff --git a/core/modules/user/tests/src/FunctionalJavascript/UserPasswordResetTest.php b/core/modules/user/tests/src/FunctionalJavascript/UserPasswordResetTest.php
index a331f01564e2..5d996c0298ed 100644
--- a/core/modules/user/tests/src/FunctionalJavascript/UserPasswordResetTest.php
+++ b/core/modules/user/tests/src/FunctionalJavascript/UserPasswordResetTest.php
@@ -74,7 +74,7 @@ protected function setUp(): void {
    * Make sure the ajax request from uploading a user picture does not
    * invalidate the reset token.
    */
-  public function testUserPasswordResetWithAdditionalAjaxForm() {
+  public function testUserPasswordResetWithAdditionalAjaxForm(): void {
     $this->drupalGet(Url::fromRoute('user.reset.form', ['uid' => $this->account->id()]));
 
     // Try to reset the password for an invalid account.
diff --git a/core/modules/user/tests/src/FunctionalJavascript/UserPermissionsTest.php b/core/modules/user/tests/src/FunctionalJavascript/UserPermissionsTest.php
index f24c3aad5672..0cac61c9a69b 100644
--- a/core/modules/user/tests/src/FunctionalJavascript/UserPermissionsTest.php
+++ b/core/modules/user/tests/src/FunctionalJavascript/UserPermissionsTest.php
@@ -52,7 +52,7 @@ protected function setUp(): void {
   /**
    * Tests the dummy checkboxes added to the permissions page.
    */
-  public function testPermissionCheckboxes() {
+  public function testPermissionCheckboxes(): void {
     $this->drupalLogin($this->adminUser);
     $this->drupalGet('admin/people/permissions');
 
diff --git a/core/modules/user/tests/src/Kernel/Condition/UserRoleConditionTest.php b/core/modules/user/tests/src/Kernel/Condition/UserRoleConditionTest.php
index 090e8a7d5dd2..21cc0b60797f 100644
--- a/core/modules/user/tests/src/Kernel/Condition/UserRoleConditionTest.php
+++ b/core/modules/user/tests/src/Kernel/Condition/UserRoleConditionTest.php
@@ -103,7 +103,7 @@ protected function setUp(): void {
   /**
    * Tests the user_role condition.
    */
-  public function testConditions() {
+  public function testConditions(): void {
     // Grab the user role condition and configure it to check against
     // authenticated user roles.
     /** @var \Drupal\Core\Condition\ConditionInterface $condition */
diff --git a/core/modules/user/tests/src/Kernel/ContextProvider/CurrentUserContextTest.php b/core/modules/user/tests/src/Kernel/ContextProvider/CurrentUserContextTest.php
index f29608682fbd..3630ae3e074f 100644
--- a/core/modules/user/tests/src/Kernel/ContextProvider/CurrentUserContextTest.php
+++ b/core/modules/user/tests/src/Kernel/ContextProvider/CurrentUserContextTest.php
@@ -32,7 +32,7 @@ protected function setUp(): void {
   /**
    * @covers ::getAvailableContexts
    */
-  public function testGetAvailableContexts() {
+  public function testGetAvailableContexts(): void {
     $context_repository = $this->container->get('context.repository');
 
     // Test an authenticated account.
diff --git a/core/modules/user/tests/src/Kernel/Controller/UserControllerTest.php b/core/modules/user/tests/src/Kernel/Controller/UserControllerTest.php
index 1d59ee2eb6aa..74ce838520f5 100644
--- a/core/modules/user/tests/src/Kernel/Controller/UserControllerTest.php
+++ b/core/modules/user/tests/src/Kernel/Controller/UserControllerTest.php
@@ -60,7 +60,7 @@ protected function setUp(): void {
    *
    * @covers ::userEditPage
    */
-  public function testUserEditPage() {
+  public function testUserEditPage(): void {
 
     $response = $this->userController->userEditPage();
 
diff --git a/core/modules/user/tests/src/Kernel/Field/UserNameFormatterTest.php b/core/modules/user/tests/src/Kernel/Field/UserNameFormatterTest.php
index 7be78399b6ff..de0565527e20 100644
--- a/core/modules/user/tests/src/Kernel/Field/UserNameFormatterTest.php
+++ b/core/modules/user/tests/src/Kernel/Field/UserNameFormatterTest.php
@@ -72,7 +72,7 @@ protected function renderEntityFields(FieldableEntityInterface $entity, EntityVi
   /**
    * Tests the formatter output.
    */
-  public function testFormatter() {
+  public function testFormatter(): void {
     $user = User::create([
       'name' => 'test name',
     ]);
diff --git a/core/modules/user/tests/src/Kernel/Migrate/MigrateUserAdminPassTest.php b/core/modules/user/tests/src/Kernel/Migrate/MigrateUserAdminPassTest.php
index 038d3c623ad6..f2553f9e7bcf 100644
--- a/core/modules/user/tests/src/Kernel/Migrate/MigrateUserAdminPassTest.php
+++ b/core/modules/user/tests/src/Kernel/Migrate/MigrateUserAdminPassTest.php
@@ -58,7 +58,7 @@ protected function setUp(): void {
   /**
    * Tests preserving the admin user's password.
    */
-  public function testAdminPasswordPreserved() {
+  public function testAdminPasswordPreserved(): void {
     $user_data_rows = [
       [
         'id' => '1',
diff --git a/core/modules/user/tests/src/Kernel/Migrate/MigrateUserStubTest.php b/core/modules/user/tests/src/Kernel/Migrate/MigrateUserStubTest.php
index 8fb3d8e346e9..7ce461eb4953 100644
--- a/core/modules/user/tests/src/Kernel/Migrate/MigrateUserStubTest.php
+++ b/core/modules/user/tests/src/Kernel/Migrate/MigrateUserStubTest.php
@@ -32,7 +32,7 @@ protected function setUp(): void {
   /**
    * Tests creation of user stubs.
    */
-  public function testStub() {
+  public function testStub(): void {
     $this->performStubTest('user');
   }
 
diff --git a/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateProfileFieldOptionTranslationTest.php b/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateProfileFieldOptionTranslationTest.php
index 1496f4d904e2..e2da7dc06830 100644
--- a/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateProfileFieldOptionTranslationTest.php
+++ b/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateProfileFieldOptionTranslationTest.php
@@ -39,7 +39,7 @@ protected function setUp(): void {
   /**
    * Tests the Drupal 6 field option translation.
    */
-  public function testFieldOptionTranslation() {
+  public function testFieldOptionTranslation(): void {
     $language_manager = $this->container->get('language_manager');
 
     /** @var \Drupal\language\Config\LanguageConfigOverride $config_translation */
diff --git a/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserConfigsTest.php b/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserConfigsTest.php
index 514caf0c25fe..538a26eabbdb 100644
--- a/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserConfigsTest.php
+++ b/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserConfigsTest.php
@@ -30,7 +30,7 @@ protected function setUp(): void {
   /**
    * Tests migration of user variables to user.mail.yml.
    */
-  public function testUserMail() {
+  public function testUserMail(): void {
     $config = $this->config('user.mail');
 
     $this->assertSame('Account details for [user:name] at [site:name] (approved)', $config->get('status_activated.subject'));
diff --git a/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserContactSettingsTest.php b/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserContactSettingsTest.php
index e7c6d0e00eeb..020ceef6f754 100644
--- a/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserContactSettingsTest.php
+++ b/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserContactSettingsTest.php
@@ -31,7 +31,7 @@ protected function setUp(): void {
   /**
    * Tests the Drupal6 user contact settings migration.
    */
-  public function testUserContactSettings() {
+  public function testUserContactSettings(): void {
     $user_data = \Drupal::service('user.data');
     $module = $key = 'contact';
     $uid = 2;
diff --git a/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserPictureD6FileTest.php b/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserPictureD6FileTest.php
index fc9eb5ad2b95..5a4cc1984f0a 100644
--- a/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserPictureD6FileTest.php
+++ b/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserPictureD6FileTest.php
@@ -31,7 +31,7 @@ protected function setUp(): void {
   /**
    * Tests the Drupal 6 user pictures to Drupal 8 migration.
    */
-  public function testUserPictures() {
+  public function testUserPictures(): void {
     $file_ids = [];
     foreach ($this->migration->getIdMap() as $destination_ids) {
       $file_ids[] = reset($destination_ids);
diff --git a/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserProfileEntityDisplayTest.php b/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserProfileEntityDisplayTest.php
index d2eb907140b3..66caa7f0923b 100644
--- a/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserProfileEntityDisplayTest.php
+++ b/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserProfileEntityDisplayTest.php
@@ -29,7 +29,7 @@ protected function setUp(): void {
   /**
    * Tests migration of user profile fields.
    */
-  public function testUserProfileFields() {
+  public function testUserProfileFields(): void {
     $display = EntityViewDisplay::load('user.user.default');
 
     // Test a text field.
diff --git a/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserProfileEntityFormDisplayTest.php b/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserProfileEntityFormDisplayTest.php
index 4d4c83283ae2..a659ba79e97f 100644
--- a/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserProfileEntityFormDisplayTest.php
+++ b/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserProfileEntityFormDisplayTest.php
@@ -29,7 +29,7 @@ protected function setUp(): void {
   /**
    * Tests migration of user profile fields.
    */
-  public function testUserProfileEntityFormDisplay() {
+  public function testUserProfileEntityFormDisplay(): void {
     $display = EntityFormDisplay::load('user.user.default');
 
     // Test a text field.
diff --git a/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserProfileFieldInstanceTest.php b/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserProfileFieldInstanceTest.php
index 53b437a2c4da..dbaf9dea6bbd 100644
--- a/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserProfileFieldInstanceTest.php
+++ b/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserProfileFieldInstanceTest.php
@@ -33,7 +33,7 @@ protected function setUp(): void {
   /**
    * Tests migration of user profile fields.
    */
-  public function testUserProfileFields() {
+  public function testUserProfileFields(): void {
     // Migrated a text field.
     $field = FieldConfig::load('user.user.profile_color');
     $this->assertSame('Favorite color', $field->label());
diff --git a/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserProfileFieldTest.php b/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserProfileFieldTest.php
index 7f1510c1dea3..d9f344a9df8b 100644
--- a/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserProfileFieldTest.php
+++ b/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserProfileFieldTest.php
@@ -25,7 +25,7 @@ protected function setUp(): void {
   /**
    * Tests migration of user profile fields.
    */
-  public function testUserProfileFields() {
+  public function testUserProfileFields(): void {
     // Migrated a text field.
     $field_storage = FieldStorageConfig::load('user.profile_color');
     $this->assertSame('text', $field_storage->getType(), 'Field type is text.');
diff --git a/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserProfileValuesTest.php b/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserProfileValuesTest.php
index e1d723325b06..12ad8f188ab3 100644
--- a/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserProfileValuesTest.php
+++ b/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserProfileValuesTest.php
@@ -39,7 +39,7 @@ protected function setUp(): void {
   /**
    * Tests Drupal 6 profile values to Drupal 8 migration.
    */
-  public function testUserProfileValues() {
+  public function testUserProfileValues(): void {
     $user = User::load(2);
     $this->assertNotNull($user);
     $this->assertSame('red', $user->profile_color->value);
diff --git a/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserRoleTest.php b/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserRoleTest.php
index 3f96bf4564f7..6fb7e9e7d9b5 100644
--- a/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserRoleTest.php
+++ b/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserRoleTest.php
@@ -283,7 +283,7 @@ public static function providerTestUserRole() {
    *
    * @dataProvider providerTestUserRole
    */
-  public function testUserRole(array $modules, array $migrations, array $role_data) {
+  public function testUserRole(array $modules, array $migrations, array $role_data): void {
     if ($modules) {
       // Install modules that have migrations that may provide permissions.
       \Drupal::service('module_installer')->install($modules);
diff --git a/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserTest.php b/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserTest.php
index 068a81b1c4ff..4d451749db0b 100644
--- a/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserTest.php
+++ b/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserTest.php
@@ -74,7 +74,7 @@ protected function setUp(): void {
   /**
    * Tests the Drupal6 user to Drupal 8 migration.
    */
-  public function testUser() {
+  public function testUser(): void {
     $users = Database::getConnection('default', 'migrate')
       ->select('users', 'u')
       ->fields('u')
diff --git a/core/modules/user/tests/src/Kernel/Migrate/d6/ProfileFieldCheckRequirementsTest.php b/core/modules/user/tests/src/Kernel/Migrate/d6/ProfileFieldCheckRequirementsTest.php
index 348704ead60a..c6090f82fa63 100644
--- a/core/modules/user/tests/src/Kernel/Migrate/d6/ProfileFieldCheckRequirementsTest.php
+++ b/core/modules/user/tests/src/Kernel/Migrate/d6/ProfileFieldCheckRequirementsTest.php
@@ -25,7 +25,7 @@ protected function setUp(): void {
   /**
    * Tests exception is thrown when profile_fields tables do not exist.
    */
-  public function testCheckRequirements() {
+  public function testCheckRequirements(): void {
     $this->expectException(RequirementsException::class);
     $this->expectExceptionMessage('Profile module not enabled on source site');
     $this->getMigration('user_profile_field')
diff --git a/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserFloodTest.php b/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserFloodTest.php
index 387a2329e7a4..4f27032cf50e 100644
--- a/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserFloodTest.php
+++ b/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserFloodTest.php
@@ -25,7 +25,7 @@ protected function setUp(): void {
   /**
    * Tests the migration.
    */
-  public function testMigration() {
+  public function testMigration(): void {
     $expected = [
       '_core' => [
         'default_config_hash' => 'UYfMzeP1S8jKm9PSvxf7nQNe8DsNS-3bc2WSNNXBQWs',
diff --git a/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserMailTest.php b/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserMailTest.php
index c08a920356fe..c4a04ddc9e65 100644
--- a/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserMailTest.php
+++ b/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserMailTest.php
@@ -25,7 +25,7 @@ protected function setUp(): void {
   /**
    * Tests the migration.
    */
-  public function testMigration() {
+  public function testMigration(): void {
     $config = $this->config('user.mail');
     $this->assertSame('Your account is approved!', $config->get('status_activated.subject'));
     $this->assertSame('Your account was activated, and there was much rejoicing.', $config->get('status_activated.body'));
diff --git a/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserPictureEntityDisplayTest.php b/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserPictureEntityDisplayTest.php
index 3dffdca92e14..7f55e7268e3a 100644
--- a/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserPictureEntityDisplayTest.php
+++ b/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserPictureEntityDisplayTest.php
@@ -35,7 +35,7 @@ protected function setUp(): void {
   /**
    * Tests the Drupal 7 user picture to Drupal 8 entity display migration.
    */
-  public function testUserPictureEntityDisplay() {
+  public function testUserPictureEntityDisplay(): void {
     $component = EntityViewDisplay::load('user.user.default')->getComponent('user_picture');
     $this->assertSame('image', $component['type']);
     $this->assertSame('', $component['settings']['image_style']);
diff --git a/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserPictureEntityFormDisplayTest.php b/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserPictureEntityFormDisplayTest.php
index ad88477bfe16..07520ce37f0c 100644
--- a/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserPictureEntityFormDisplayTest.php
+++ b/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserPictureEntityFormDisplayTest.php
@@ -31,7 +31,7 @@ protected function setUp(): void {
   /**
    * Tests the field's entity form display settings.
    */
-  public function testEntityFormDisplaySettings() {
+  public function testEntityFormDisplaySettings(): void {
     $component = EntityFormDisplay::load('user.user.default')->getComponent('user_picture');
     $this->assertSame('image_image', $component['type']);
     $this->assertSame('throbber', $component['settings']['progress_indicator']);
diff --git a/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserPictureFieldInstanceTest.php b/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserPictureFieldInstanceTest.php
index 2d7f912b2c29..7d8e29de8d0f 100644
--- a/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserPictureFieldInstanceTest.php
+++ b/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserPictureFieldInstanceTest.php
@@ -31,7 +31,7 @@ protected function setUp(): void {
   /**
    * Tests the user picture field migration.
    */
-  public function testUserPictureField() {
+  public function testUserPictureField(): void {
     /** @var \Drupal\field\FieldConfigInterface $field */
     $field = FieldConfig::load('user.user.user_picture');
     $this->assertInstanceOf(FieldConfigInterface::class, $field);
diff --git a/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserPictureFieldTest.php b/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserPictureFieldTest.php
index 8864a4cffc0f..56a97206e700 100644
--- a/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserPictureFieldTest.php
+++ b/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserPictureFieldTest.php
@@ -28,7 +28,7 @@ protected function setUp(): void {
   /**
    * Tests the user picture field migration.
    */
-  public function testUserPictureField() {
+  public function testUserPictureField(): void {
     /** @var \Drupal\field\FieldStorageConfigInterface $field_storage */
     $field_storage = FieldStorageConfig::load('user.user_picture');
     $this->assertInstanceOf(FieldStorageConfigInterface::class, $field_storage);
diff --git a/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserRoleTest.php b/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserRoleTest.php
index a4a9e8a6c19b..cab95c394cf8 100644
--- a/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserRoleTest.php
+++ b/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserRoleTest.php
@@ -47,7 +47,7 @@ protected function assertEntity(string $id, string $label, array $permissions):
   /**
    * Tests user role migration.
    */
-  public function testUserRole() {
+  public function testUserRole(): void {
     $anonymous_permissions = ['access content'];
     $this->assertEntity('anonymous', 'anonymous user', $anonymous_permissions);
     $this->assertEntity('authenticated', 'authenticated user', $anonymous_permissions);
diff --git a/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserSettingsTest.php b/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserSettingsTest.php
index df40aaca3aa8..da388bd9e3b2 100644
--- a/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserSettingsTest.php
+++ b/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserSettingsTest.php
@@ -30,7 +30,7 @@ protected function setUp(): void {
   /**
    * Tests the migration.
    */
-  public function testMigration() {
+  public function testMigration(): void {
     $config = $this->config('user.settings');
     $this->assertTrue($config->get('notify.status_blocked'));
     $this->assertTrue($config->get('notify.status_activated'));
diff --git a/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserTest.php b/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserTest.php
index e812f07ec8bb..0b860716b136 100644
--- a/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserTest.php
+++ b/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserTest.php
@@ -143,7 +143,7 @@ protected function assertEntity(string $id, string $label, string $mail, string
   /**
    * Tests the Drupal 7 user to Drupal 8 migration.
    */
-  public function testUser() {
+  public function testUser(): void {
     $users = Database::getConnection('default', 'migrate')
       ->select('users', 'u')
       ->fields('u')
diff --git a/core/modules/user/tests/src/Kernel/Migrate/d7/ProfileFieldCheckRequirementsTest.php b/core/modules/user/tests/src/Kernel/Migrate/d7/ProfileFieldCheckRequirementsTest.php
index 91e3d96ae6ce..cfffb4b49523 100644
--- a/core/modules/user/tests/src/Kernel/Migrate/d7/ProfileFieldCheckRequirementsTest.php
+++ b/core/modules/user/tests/src/Kernel/Migrate/d7/ProfileFieldCheckRequirementsTest.php
@@ -25,7 +25,7 @@ protected function setUp(): void {
   /**
    * Tests exception is thrown when profile_fields tables do not exist.
    */
-  public function testCheckRequirements() {
+  public function testCheckRequirements(): void {
     $this->expectException(RequirementsException::class);
     $this->expectExceptionMessage('Profile module not enabled on source site');
     $this->getMigration('user_profile_field')
diff --git a/core/modules/user/tests/src/Kernel/Migrate/d7/UserMigrationClassTest.php b/core/modules/user/tests/src/Kernel/Migrate/d7/UserMigrationClassTest.php
index 7b229f4580f1..c5b707c6cbe8 100644
--- a/core/modules/user/tests/src/Kernel/Migrate/d7/UserMigrationClassTest.php
+++ b/core/modules/user/tests/src/Kernel/Migrate/d7/UserMigrationClassTest.php
@@ -19,7 +19,7 @@ class UserMigrationClassTest extends MigrateDrupal7TestBase {
    * Ensures profile fields are merged into the d7_profile_values migration's
    * process pipeline.
    */
-  public function testClass() {
+  public function testClass(): void {
     $migration = $this->getMigration('d7_user');
     /** @var \Drupal\migrate\Plugin\MigrationInterface[] $migrations */
     $this->assertSame('d7_user', $migration->id());
diff --git a/core/modules/user/tests/src/Kernel/UserAccountFormFieldsTest.php b/core/modules/user/tests/src/Kernel/UserAccountFormFieldsTest.php
index 6817dc359952..787874d1447e 100644
--- a/core/modules/user/tests/src/Kernel/UserAccountFormFieldsTest.php
+++ b/core/modules/user/tests/src/Kernel/UserAccountFormFieldsTest.php
@@ -31,7 +31,7 @@ class UserAccountFormFieldsTest extends KernelTestBase {
   /**
    * Tests the root user account form section in the "Configure site" form.
    */
-  public function testInstallConfigureForm() {
+  public function testInstallConfigureForm(): void {
     require_once $this->root . '/core/includes/install.core.inc';
     require_once $this->root . '/core/includes/install.inc';
     $install_state = install_state_defaults();
@@ -53,7 +53,7 @@ public function testInstallConfigureForm() {
   /**
    * Tests the user registration form.
    */
-  public function testUserRegistrationForm() {
+  public function testUserRegistrationForm(): void {
     // Install default configuration; required for AccountFormController.
     $this->installConfig(['user']);
 
@@ -77,7 +77,7 @@ public function testUserRegistrationForm() {
   /**
    * Tests the user edit form.
    */
-  public function testUserEditForm() {
+  public function testUserEditForm(): void {
     // Install default configuration; required for AccountFormController.
     $this->installConfig(['user']);
     $this->installEntitySchema('user');
diff --git a/core/modules/user/tests/src/Kernel/UserAccountFormPasswordResetTest.php b/core/modules/user/tests/src/Kernel/UserAccountFormPasswordResetTest.php
index ca957a715fe8..a7e407e0889e 100644
--- a/core/modules/user/tests/src/Kernel/UserAccountFormPasswordResetTest.php
+++ b/core/modules/user/tests/src/Kernel/UserAccountFormPasswordResetTest.php
@@ -50,7 +50,7 @@ protected function setUp(): void {
   /**
    * Tests the reset token used only from query string.
    */
-  public function testPasswordResetToken() {
+  public function testPasswordResetToken(): void {
     /** @var \Symfony\Component\HttpFoundation\Request $request */
     $request = $this->container->get('request_stack')->getCurrentRequest();
 
diff --git a/core/modules/user/tests/src/Kernel/UserActionConfigSchemaTest.php b/core/modules/user/tests/src/Kernel/UserActionConfigSchemaTest.php
index 13d4ab57c711..fa9915de285c 100644
--- a/core/modules/user/tests/src/Kernel/UserActionConfigSchemaTest.php
+++ b/core/modules/user/tests/src/Kernel/UserActionConfigSchemaTest.php
@@ -27,7 +27,7 @@ class UserActionConfigSchemaTest extends KernelTestBase {
   /**
    * Tests whether the user action config schema are valid.
    */
-  public function testValidUserActionConfigSchema() {
+  public function testValidUserActionConfigSchema(): void {
     $rid = $this->randomMachineName(8);
     Role::create(['id' => $rid, 'label' => $rid])->save();
 
diff --git a/core/modules/user/tests/src/Kernel/UserAnonymousActivateTest.php b/core/modules/user/tests/src/Kernel/UserAnonymousActivateTest.php
index 29134b58e144..8d210789aeee 100644
--- a/core/modules/user/tests/src/Kernel/UserAnonymousActivateTest.php
+++ b/core/modules/user/tests/src/Kernel/UserAnonymousActivateTest.php
@@ -33,7 +33,7 @@ protected function setUp(): void {
   /**
    * Tests that the anonymous user cannot be activated.
    */
-  public function testAnonymousActivate() {
+  public function testAnonymousActivate(): void {
     $accountAnon = \Drupal::entityTypeManager()->getStorage('user')->load(0);
 
     // Test that the anonymous user is blocked.
diff --git a/core/modules/user/tests/src/Kernel/UserDeleteTest.php b/core/modules/user/tests/src/Kernel/UserDeleteTest.php
index 463d9f762190..148e9f241394 100644
--- a/core/modules/user/tests/src/Kernel/UserDeleteTest.php
+++ b/core/modules/user/tests/src/Kernel/UserDeleteTest.php
@@ -29,7 +29,7 @@ class UserDeleteTest extends KernelTestBase {
   /**
    * Tests deleting multiple users.
    */
-  public function testUserDeleteMultiple() {
+  public function testUserDeleteMultiple(): void {
     $this->installSchema('user', ['users_data']);
     $this->installEntitySchema('user');
 
diff --git a/core/modules/user/tests/src/Kernel/UserEntityLabelTest.php b/core/modules/user/tests/src/Kernel/UserEntityLabelTest.php
index 52c34ccfdc6e..dbf086707829 100644
--- a/core/modules/user/tests/src/Kernel/UserEntityLabelTest.php
+++ b/core/modules/user/tests/src/Kernel/UserEntityLabelTest.php
@@ -29,7 +29,7 @@ class UserEntityLabelTest extends KernelTestBase {
   /**
    * Tests label callback.
    */
-  public function testLabelCallback() {
+  public function testLabelCallback(): void {
     $this->installEntitySchema('user');
     $this->installConfig(['user']);
 
diff --git a/core/modules/user/tests/src/Kernel/UserEntityReferenceTest.php b/core/modules/user/tests/src/Kernel/UserEntityReferenceTest.php
index 9e84b43469b0..d42c4a4ca767 100644
--- a/core/modules/user/tests/src/Kernel/UserEntityReferenceTest.php
+++ b/core/modules/user/tests/src/Kernel/UserEntityReferenceTest.php
@@ -56,7 +56,7 @@ protected function setUp(): void {
   /**
    * Tests user selection by roles.
    */
-  public function testUserSelectionByRole() {
+  public function testUserSelectionByRole(): void {
     $field_definition = FieldConfig::loadByName('user', 'user', 'user_reference');
     $handler_settings = $field_definition->getSetting('handler_settings');
     $handler_settings['filter']['role'] = [
diff --git a/core/modules/user/tests/src/Kernel/UserEntityTest.php b/core/modules/user/tests/src/Kernel/UserEntityTest.php
index 96311c2fd4d7..282adb7cbf49 100644
--- a/core/modules/user/tests/src/Kernel/UserEntityTest.php
+++ b/core/modules/user/tests/src/Kernel/UserEntityTest.php
@@ -38,7 +38,7 @@ protected function setUp(): void {
    * @see \Drupal\user\Entity\User::addRole()
    * @see \Drupal\user\Entity\User::removeRole()
    */
-  public function testUserMethods() {
+  public function testUserMethods(): void {
     $role_storage = $this->container->get('entity_type.manager')->getStorage('user_role');
     $role_storage->create(['id' => 'test_role_one', 'label' => 'Test role 1'])->save();
     $role_storage->create(['id' => 'test_role_two', 'label' => 'Test role 2'])->save();
@@ -84,7 +84,7 @@ public function testUserMethods() {
    * @see \Drupal\Core\Field\FieldItemInterface::generateSampleValue()
    * @see \Drupal\Core\Entity\FieldableEntityInterface::validate()
    */
-  public function testUserValidation() {
+  public function testUserValidation(): void {
     $user = User::create([]);
     foreach ($user as $field_name => $field) {
       if (!in_array($field_name, ['uid'])) {
@@ -98,7 +98,7 @@ public function testUserValidation() {
   /**
    * Tests that ::existingPassword can be used for chaining.
    */
-  public function testChainExistingPasswordMethod() {
+  public function testChainExistingPasswordMethod(): void {
     /** @var \Drupal\user\Entity\User $user */
     $user = User::create([
       'name' => $this->randomMachineName(),
diff --git a/core/modules/user/tests/src/Kernel/UserFieldsTest.php b/core/modules/user/tests/src/Kernel/UserFieldsTest.php
index e5c00a28be13..79ddf3695312 100644
--- a/core/modules/user/tests/src/Kernel/UserFieldsTest.php
+++ b/core/modules/user/tests/src/Kernel/UserFieldsTest.php
@@ -38,7 +38,7 @@ protected function setUp(): void {
   /**
    * Tests account's available fields.
    */
-  public function testUserFields() {
+  public function testUserFields(): void {
     // Create the user to test the user fields.
     $user = User::create([
       'name' => 'foobar',
diff --git a/core/modules/user/tests/src/Kernel/UserInstallTest.php b/core/modules/user/tests/src/Kernel/UserInstallTest.php
index fd08cb0a6802..9478a16404fd 100644
--- a/core/modules/user/tests/src/Kernel/UserInstallTest.php
+++ b/core/modules/user/tests/src/Kernel/UserInstallTest.php
@@ -33,7 +33,7 @@ protected function setUp(): void {
   /**
    * Tests that the initial users have correct values.
    */
-  public function testUserInstall() {
+  public function testUserInstall(): void {
     $user_ids = \Drupal::entityQuery('user')->sort('uid')->accessCheck(FALSE)->execute();
     $users = \Drupal::entityTypeManager()->getStorage('user')->loadMultiple($user_ids);
     $anon = $users[0];
diff --git a/core/modules/user/tests/src/Kernel/UserMailDefaultsTest.php b/core/modules/user/tests/src/Kernel/UserMailDefaultsTest.php
index 39adad74b452..5e7aaae78057 100644
--- a/core/modules/user/tests/src/Kernel/UserMailDefaultsTest.php
+++ b/core/modules/user/tests/src/Kernel/UserMailDefaultsTest.php
@@ -31,7 +31,7 @@ protected function setUp(): void {
    *
    * @dataProvider userMailsProvider
    */
-  public function testMailDefaults($key) {
+  public function testMailDefaults($key): void {
     $body = $this->config('user.mail')->get("$key.body");
     $this->assertStringContainsString("\n\n", $body);
   }
diff --git a/core/modules/user/tests/src/Kernel/UserMailNotifyTest.php b/core/modules/user/tests/src/Kernel/UserMailNotifyTest.php
index a237b50d0342..620540453201 100644
--- a/core/modules/user/tests/src/Kernel/UserMailNotifyTest.php
+++ b/core/modules/user/tests/src/Kernel/UserMailNotifyTest.php
@@ -81,7 +81,7 @@ public static function userMailsProvider() {
    *
    * @dataProvider userMailsProvider
    */
-  public function testUserMailsSent($op, array $mail_keys) {
+  public function testUserMailsSent($op, array $mail_keys): void {
     $this->installConfig('user');
     $this->config('system.site')->set('mail', 'test@example.com')->save();
     $this->config('user.settings')->set('notify.' . $op, TRUE)->save();
@@ -102,7 +102,7 @@ public function testUserMailsSent($op, array $mail_keys) {
    *
    * @dataProvider userMailsProvider
    */
-  public function testUserMailsNotSent($op) {
+  public function testUserMailsNotSent($op): void {
     $this->config('user.settings')->set('notify.' . $op, FALSE)->save();
     $return = _user_mail_notify($op, $this->createUser());
     $this->assertNull($return);
@@ -112,7 +112,7 @@ public function testUserMailsNotSent($op) {
   /**
    * Tests recovery email content and token langcode is aligned.
    */
-  public function testUserRecoveryMailLanguage() {
+  public function testUserRecoveryMailLanguage(): void {
 
     // Install locale schema.
     $this->installSchema('locale', [
diff --git a/core/modules/user/tests/src/Kernel/UserRoleDeleteTest.php b/core/modules/user/tests/src/Kernel/UserRoleDeleteTest.php
index b5c19a7e0d32..cd5ce09c460a 100644
--- a/core/modules/user/tests/src/Kernel/UserRoleDeleteTest.php
+++ b/core/modules/user/tests/src/Kernel/UserRoleDeleteTest.php
@@ -37,7 +37,7 @@ protected function setUp(): void {
    *
    * @see user_user_role_delete()
    */
-  public function testRoleDeleteUserRoleReferenceDelete() {
+  public function testRoleDeleteUserRoleReferenceDelete(): void {
     // Create two test roles.
     $role_storage = $this->container->get('entity_type.manager')->getStorage('user_role');
     $role_storage->create(['id' => 'test_role_one', 'label' => 'Test role 1'])->save();
@@ -82,7 +82,7 @@ public function testRoleDeleteUserRoleReferenceDelete() {
   /**
    * Tests the removal of user role dependencies.
    */
-  public function testDependenciesRemoval() {
+  public function testDependenciesRemoval(): void {
     $this->enableModules(['node', 'filter']);
     /** @var \Drupal\user\RoleStorage $role_storage */
     $role_storage = $this->container->get('entity_type.manager')->getStorage('user_role');
diff --git a/core/modules/user/tests/src/Kernel/UserRoleEntityTest.php b/core/modules/user/tests/src/Kernel/UserRoleEntityTest.php
index 248bbdcd1b4d..8f41d069017f 100644
--- a/core/modules/user/tests/src/Kernel/UserRoleEntityTest.php
+++ b/core/modules/user/tests/src/Kernel/UserRoleEntityTest.php
@@ -15,7 +15,7 @@ class UserRoleEntityTest extends KernelTestBase {
 
   protected static $modules = ['system', 'user', 'user_permissions_test'];
 
-  public function testOrderOfPermissions() {
+  public function testOrderOfPermissions(): void {
     $role = Role::create(['id' => 'test_role', 'label' => 'Test role']);
     $role->grantPermission('b')
       ->grantPermission('a')
@@ -30,7 +30,7 @@ public function testOrderOfPermissions() {
     $this->assertEquals(['a', 'b', 'c'], $role->getPermissions());
   }
 
-  public function testGrantingNonExistentPermission() {
+  public function testGrantingNonExistentPermission(): void {
     $role = Role::create(['id' => 'test_role', 'label' => 'Test role']);
 
     // A single permission that does not exist.
@@ -47,7 +47,7 @@ public function testGrantingNonExistentPermission() {
       ->save();
   }
 
-  public function testPermissionRevokeAndConfigSync() {
+  public function testPermissionRevokeAndConfigSync(): void {
     $role = Role::create(['id' => 'test_role', 'label' => 'Test role']);
     $role->setSyncing(TRUE);
     $role->grantPermission('a')
diff --git a/core/modules/user/tests/src/Kernel/UserSaveStatusTest.php b/core/modules/user/tests/src/Kernel/UserSaveStatusTest.php
index d0f0d02dc18a..e5763bf2729b 100644
--- a/core/modules/user/tests/src/Kernel/UserSaveStatusTest.php
+++ b/core/modules/user/tests/src/Kernel/UserSaveStatusTest.php
@@ -32,7 +32,7 @@ protected function setUp(): void {
   /**
    * Tests SAVED_NEW and SAVED_UPDATED statuses for user entity type.
    */
-  public function testUserSaveStatus() {
+  public function testUserSaveStatus(): void {
     // Create a new user.
     $values = [
       'uid' => 1,
diff --git a/core/modules/user/tests/src/Kernel/UserSaveTest.php b/core/modules/user/tests/src/Kernel/UserSaveTest.php
index 65133eaaaf6e..aa44d00aa465 100644
--- a/core/modules/user/tests/src/Kernel/UserSaveTest.php
+++ b/core/modules/user/tests/src/Kernel/UserSaveTest.php
@@ -25,7 +25,7 @@ class UserSaveTest extends KernelTestBase {
   /**
    * Ensures that an existing password is unset after the user was saved.
    */
-  public function testExistingPasswordRemoval() {
+  public function testExistingPasswordRemoval(): void {
     $this->installEntitySchema('user');
 
     /** @var \Drupal\user\Entity\User $user */
diff --git a/core/modules/user/tests/src/Kernel/UserValidationTest.php b/core/modules/user/tests/src/Kernel/UserValidationTest.php
index 08e276a1c478..e5fff84d9b11 100644
--- a/core/modules/user/tests/src/Kernel/UserValidationTest.php
+++ b/core/modules/user/tests/src/Kernel/UserValidationTest.php
@@ -43,7 +43,7 @@ protected function setUp(): void {
    *
    * @group legacy
    */
-  public function testUsernames() {
+  public function testUsernames(): void {
     // cSpell:disable
     $test_cases = [
       // '<username>' => ['<description>', 'assert<testName>'].
@@ -82,7 +82,7 @@ public function testUsernames() {
   /**
    * Runs entity validation checks.
    */
-  public function testValidation() {
+  public function testValidation(): void {
     $user = User::create([
       'name' => 'test',
       'mail' => 'test@example.com',
diff --git a/core/modules/user/tests/src/Kernel/Views/AccessPermissionTest.php b/core/modules/user/tests/src/Kernel/Views/AccessPermissionTest.php
index 9e3092e5f469..d05ab1eb6eaf 100644
--- a/core/modules/user/tests/src/Kernel/Views/AccessPermissionTest.php
+++ b/core/modules/user/tests/src/Kernel/Views/AccessPermissionTest.php
@@ -72,7 +72,7 @@ protected function setUp(): void {
   /**
    * Tests perm access plugin.
    */
-  public function testAccessPerm() {
+  public function testAccessPerm(): void {
     $view = Views::getView('test_access_perm');
     $view->setDisplay();
 
@@ -87,7 +87,7 @@ public function testAccessPerm() {
   /**
    * Tests access on render caching.
    */
-  public function testRenderCaching() {
+  public function testRenderCaching(): void {
     $view = Views::getView('test_access_perm');
     $display = &$view->storage->getDisplay('default');
     $display['display_options']['cache'] = [
diff --git a/core/modules/user/tests/src/Kernel/Views/ArgumentDefaultTest.php b/core/modules/user/tests/src/Kernel/Views/ArgumentDefaultTest.php
index a6235aa099e3..10a783bc450c 100644
--- a/core/modules/user/tests/src/Kernel/Views/ArgumentDefaultTest.php
+++ b/core/modules/user/tests/src/Kernel/Views/ArgumentDefaultTest.php
@@ -39,7 +39,7 @@ class ArgumentDefaultTest extends KernelTestBase {
   /**
    * Tests the current user with argument default.
    */
-  public function testPluginArgumentDefaultCurrentUser() {
+  public function testPluginArgumentDefaultCurrentUser(): void {
     $this->installEntitySchema('user');
     ViewTestData::createTestViews(static::class, ['user_test_views']);
 
diff --git a/core/modules/user/tests/src/Kernel/Views/ArgumentValidateTest.php b/core/modules/user/tests/src/Kernel/Views/ArgumentValidateTest.php
index 47b7f6fd0d79..ed4049eded34 100644
--- a/core/modules/user/tests/src/Kernel/Views/ArgumentValidateTest.php
+++ b/core/modules/user/tests/src/Kernel/Views/ArgumentValidateTest.php
@@ -55,7 +55,7 @@ protected function setUp($import_test_views = TRUE): void {
   /**
    * Tests the User (ID) argument validator.
    */
-  public function testArgumentValidateUserUid() {
+  public function testArgumentValidateUserUid(): void {
     $view = Views::getView('test_view_argument_validate_user');
     $this->executeView($view);
 
@@ -75,7 +75,7 @@ public function testArgumentValidateUserUid() {
   /**
    * Tests the UserName argument validator.
    */
-  public function testArgumentValidateUserName() {
+  public function testArgumentValidateUserName(): void {
     $view = Views::getView('test_view_argument_validate_username');
     $this->executeView($view);
 
diff --git a/core/modules/user/tests/src/Kernel/Views/HandlerArgumentUserUidTest.php b/core/modules/user/tests/src/Kernel/Views/HandlerArgumentUserUidTest.php
index c3b7e871f483..11b4e2ffca7c 100644
--- a/core/modules/user/tests/src/Kernel/Views/HandlerArgumentUserUidTest.php
+++ b/core/modules/user/tests/src/Kernel/Views/HandlerArgumentUserUidTest.php
@@ -39,7 +39,7 @@ class HandlerArgumentUserUidTest extends KernelTestBase {
   /**
    * Tests the generated title of a user: uid argument.
    */
-  public function testArgumentTitle() {
+  public function testArgumentTitle(): void {
     $this->installEntitySchema('user');
     $this->installConfig(['user']);
     User::create(['uid' => 0, 'name' => ''])->save();
diff --git a/core/modules/user/tests/src/Kernel/Views/HandlerFieldPermissionTest.php b/core/modules/user/tests/src/Kernel/Views/HandlerFieldPermissionTest.php
index c405d8c8d431..1415ae6f92cc 100644
--- a/core/modules/user/tests/src/Kernel/Views/HandlerFieldPermissionTest.php
+++ b/core/modules/user/tests/src/Kernel/Views/HandlerFieldPermissionTest.php
@@ -24,7 +24,7 @@ class HandlerFieldPermissionTest extends UserKernelTestBase {
   /**
    * Tests the permission field handler output.
    */
-  public function testFieldPermission() {
+  public function testFieldPermission(): void {
     $this->setupPermissionTestData();
 
     $view = Views::getView('test_field_permission');
diff --git a/core/modules/user/tests/src/Kernel/Views/HandlerFilterCurrentUserTest.php b/core/modules/user/tests/src/Kernel/Views/HandlerFilterCurrentUserTest.php
index 5f0879a10b3f..36f56faf7ea3 100644
--- a/core/modules/user/tests/src/Kernel/Views/HandlerFilterCurrentUserTest.php
+++ b/core/modules/user/tests/src/Kernel/Views/HandlerFilterCurrentUserTest.php
@@ -41,7 +41,7 @@ protected function setUp($import_test_views = TRUE): void {
   /**
    * Tests the current user filter handler with anonymous user.
    */
-  public function testFilterCurrentUserAsAnonymous() {
+  public function testFilterCurrentUserAsAnonymous(): void {
     $column_map = ['uid' => 'uid'];
     $this->currentUser->setAccount(new AnonymousUserSession());
 
@@ -68,7 +68,7 @@ public function testFilterCurrentUserAsAnonymous() {
   /**
    * Tests the current user filter handler with logged-in user.
    */
-  public function testFilterCurrentUserAsUser() {
+  public function testFilterCurrentUserAsUser(): void {
     $column_map = ['uid' => 'uid'];
     $user = reset($this->users);
     $this->currentUser->setAccount($user);
diff --git a/core/modules/user/tests/src/Kernel/Views/HandlerFilterPermissionTest.php b/core/modules/user/tests/src/Kernel/Views/HandlerFilterPermissionTest.php
index 7c55609aea9b..105a1ac787cf 100644
--- a/core/modules/user/tests/src/Kernel/Views/HandlerFilterPermissionTest.php
+++ b/core/modules/user/tests/src/Kernel/Views/HandlerFilterPermissionTest.php
@@ -30,7 +30,7 @@ class HandlerFilterPermissionTest extends UserKernelTestBase {
    * @todo Fix the different commented out tests by fixing the many to one
    *   handler handling with the NOT operator.
    */
-  public function testFilterPermission() {
+  public function testFilterPermission(): void {
     $this->setupPermissionTestData();
 
     $column_map = ['uid' => 'uid'];
diff --git a/core/modules/user/tests/src/Kernel/Views/HandlerFilterRolesTest.php b/core/modules/user/tests/src/Kernel/Views/HandlerFilterRolesTest.php
index caf2001b6cee..d7518a1a38c6 100644
--- a/core/modules/user/tests/src/Kernel/Views/HandlerFilterRolesTest.php
+++ b/core/modules/user/tests/src/Kernel/Views/HandlerFilterRolesTest.php
@@ -30,7 +30,7 @@ class HandlerFilterRolesTest extends UserKernelTestBase {
   /**
    * Tests that role filter dependencies are calculated correctly.
    */
-  public function testDependencies() {
+  public function testDependencies(): void {
     $role = Role::create(['id' => 'test_user_role', 'label' => 'Test user role']);
     $role->save();
     $view = View::load('test_user_name');
@@ -103,7 +103,7 @@ public function testDependencies() {
   /**
    * Tests that a warning is triggered if the filter references a missing role.
    */
-  public function testMissingRole() {
+  public function testMissingRole(): void {
     $logger = $this->prophesize(LoggerInterface::class);
     $this->container->get('logger.factory')
       ->get('system')
diff --git a/core/modules/user/tests/src/Kernel/Views/RelationshipRepresentativeNodeTest.php b/core/modules/user/tests/src/Kernel/Views/RelationshipRepresentativeNodeTest.php
index ecbdcef24021..12b059b8ef1f 100644
--- a/core/modules/user/tests/src/Kernel/Views/RelationshipRepresentativeNodeTest.php
+++ b/core/modules/user/tests/src/Kernel/Views/RelationshipRepresentativeNodeTest.php
@@ -44,7 +44,7 @@ class RelationshipRepresentativeNodeTest extends KernelTestBase {
   /**
    * Tests the relationship.
    */
-  public function testRelationship() {
+  public function testRelationship(): void {
     $this->installEntitySchema('user');
     $this->installEntitySchema('node');
     $this->installConfig(['filter']);
diff --git a/core/modules/user/tests/src/Kernel/Views/UserDataTest.php b/core/modules/user/tests/src/Kernel/Views/UserDataTest.php
index e854fd7f1699..b53b7e33a338 100644
--- a/core/modules/user/tests/src/Kernel/Views/UserDataTest.php
+++ b/core/modules/user/tests/src/Kernel/Views/UserDataTest.php
@@ -31,7 +31,7 @@ class UserDataTest extends ViewsKernelTestBase {
   /**
    * Tests field handler.
    */
-  public function testDataField() {
+  public function testDataField(): void {
     ViewTestData::createTestViews(static::class, ['user_test_views']);
 
     $this->installEntitySchema('user');
diff --git a/core/modules/user/tests/src/Kernel/Views/UserRoleTest.php b/core/modules/user/tests/src/Kernel/Views/UserRoleTest.php
index 961f00c1acef..03c496bd4e6b 100644
--- a/core/modules/user/tests/src/Kernel/Views/UserRoleTest.php
+++ b/core/modules/user/tests/src/Kernel/Views/UserRoleTest.php
@@ -19,7 +19,7 @@ class UserRoleTest extends ViewsKernelTestBase {
   /**
    * Tests numeric role.
    */
-  public function testNumericRole() {
+  public function testNumericRole(): void {
     $this->installEntitySchema('user');
     $this->installSchema('user', ['users_data']);
 
diff --git a/core/modules/user/tests/src/Kernel/Views/UserViewsDataTest.php b/core/modules/user/tests/src/Kernel/Views/UserViewsDataTest.php
index a7444964513d..183b6c134117 100644
--- a/core/modules/user/tests/src/Kernel/Views/UserViewsDataTest.php
+++ b/core/modules/user/tests/src/Kernel/Views/UserViewsDataTest.php
@@ -50,7 +50,7 @@ protected function setUp(): void {
   /**
    * Tests if user views data object doesn't contain pass field.
    */
-  public function testUserPasswordFieldNotAvailableToViews() {
+  public function testUserPasswordFieldNotAvailableToViews(): void {
     $field_definitions = $this->entityFieldManager->getBaseFieldDefinitions('user');
     $this->assertArrayHasKey('pass', $field_definitions);
     $this->assertArrayNotHasKey('pass', $this->viewsData->get('users_field_data'));
diff --git a/core/modules/user/tests/src/Kernel/Views/UserViewsFieldAccessTest.php b/core/modules/user/tests/src/Kernel/Views/UserViewsFieldAccessTest.php
index 01cae1b21af7..2b7953cc9619 100644
--- a/core/modules/user/tests/src/Kernel/Views/UserViewsFieldAccessTest.php
+++ b/core/modules/user/tests/src/Kernel/Views/UserViewsFieldAccessTest.php
@@ -29,7 +29,7 @@ protected function setUp($import_test_views = TRUE): void {
     $this->installEntitySchema('user');
   }
 
-  public function testUserFields() {
+  public function testUserFields(): void {
     ConfigurableLanguage::createFromLangcode('es')->save();
     ConfigurableLanguage::createFromLangcode('fr')->save();
 
diff --git a/core/modules/user/tests/src/Kernel/WhoIsOnlineBlockTest.php b/core/modules/user/tests/src/Kernel/WhoIsOnlineBlockTest.php
index 179bda8607be..7fa4db7cce5b 100644
--- a/core/modules/user/tests/src/Kernel/WhoIsOnlineBlockTest.php
+++ b/core/modules/user/tests/src/Kernel/WhoIsOnlineBlockTest.php
@@ -75,7 +75,7 @@ protected function setUp(): void {
   /**
    * Tests the Who's Online block.
    */
-  public function testWhoIsOnlineBlock() {
+  public function testWhoIsOnlineBlock(): void {
     // Generate users.
     $user1 = User::create([
       'name' => 'user1',
diff --git a/core/modules/user/tests/src/Unit/Form/EntityPermissionsFormTest.php b/core/modules/user/tests/src/Unit/Form/EntityPermissionsFormTest.php
index bccc105552f3..aa4639f3192e 100644
--- a/core/modules/user/tests/src/Unit/Form/EntityPermissionsFormTest.php
+++ b/core/modules/user/tests/src/Unit/Form/EntityPermissionsFormTest.php
@@ -43,7 +43,7 @@ class EntityPermissionsFormTest extends UnitTestCase {
    * @covers \Drupal\user\Form\EntityPermissionsForm::access
    * @covers \Drupal\user\Form\EntityPermissionsForm::permissionsByProvider
    */
-  public function testPermissionsByProvider(string $dependency_name, bool $found) {
+  public function testPermissionsByProvider(string $dependency_name, bool $found): void {
 
     // Mock the constructor parameters.
     $prophecy = $this->prophesize(PermissionHandlerInterface::class);
diff --git a/core/modules/user/tests/src/Unit/Menu/UserLocalTasksTest.php b/core/modules/user/tests/src/Unit/Menu/UserLocalTasksTest.php
index f812efce9206..922e7aef2c46 100644
--- a/core/modules/user/tests/src/Unit/Menu/UserLocalTasksTest.php
+++ b/core/modules/user/tests/src/Unit/Menu/UserLocalTasksTest.php
@@ -35,7 +35,7 @@ protected function setUp(): void {
    *
    * @dataProvider getUserAdminRoutes
    */
-  public function testUserAdminLocalTasks($route, $expected) {
+  public function testUserAdminLocalTasks($route, $expected): void {
     $this->assertLocalTasks($route, $expected);
   }
 
@@ -56,7 +56,7 @@ public static function getUserAdminRoutes() {
    *
    * @dataProvider getUserLoginRoutes
    */
-  public function testUserLoginLocalTasks($route) {
+  public function testUserLoginLocalTasks($route): void {
     $tasks = [
       0 => ['user.register', 'user.pass', 'user.login'],
     ];
@@ -79,7 +79,7 @@ public static function getUserLoginRoutes() {
    *
    * @dataProvider getUserPageRoutes
    */
-  public function testUserPageLocalTasks($route, $subtask = []) {
+  public function testUserPageLocalTasks($route, $subtask = []): void {
     $tasks = [
       0 => ['entity.user.canonical', 'entity.user.edit_form'],
     ];
diff --git a/core/modules/user/tests/src/Unit/PermissionAccessCheckTest.php b/core/modules/user/tests/src/Unit/PermissionAccessCheckTest.php
index 3c98ff42bd60..3660e00fe1df 100644
--- a/core/modules/user/tests/src/Unit/PermissionAccessCheckTest.php
+++ b/core/modules/user/tests/src/Unit/PermissionAccessCheckTest.php
@@ -70,7 +70,7 @@ public static function providerTestAccess() {
    * @dataProvider providerTestAccess
    * @covers ::access
    */
-  public function testAccess($requirements, $access, array $contexts = [], $message = '') {
+  public function testAccess($requirements, $access, array $contexts = [], $message = ''): void {
     $access_result = AccessResult::allowedIf($access)->addCacheContexts($contexts);
     if (!empty($message)) {
       $access_result->setReason($message);
diff --git a/core/modules/user/tests/src/Unit/PermissionHandlerTest.php b/core/modules/user/tests/src/Unit/PermissionHandlerTest.php
index fb71401294d2..cbd35353ec10 100644
--- a/core/modules/user/tests/src/Unit/PermissionHandlerTest.php
+++ b/core/modules/user/tests/src/Unit/PermissionHandlerTest.php
@@ -88,7 +88,7 @@ protected function mockModuleExtension($module, $name) {
    * @covers ::buildPermissionsYaml
    * @covers ::moduleProvidesPermissions
    */
-  public function testBuildPermissionsYaml() {
+  public function testBuildPermissionsYaml(): void {
     vfsStreamWrapper::register();
     $root = new vfsStreamDirectory('modules');
     vfsStreamWrapper::setRoot($root);
@@ -153,7 +153,7 @@ public function testBuildPermissionsYaml() {
    * @covers ::buildPermissionsYaml
    * @covers ::sortPermissions
    */
-  public function testBuildPermissionsSortPerModule() {
+  public function testBuildPermissionsSortPerModule(): void {
     vfsStreamWrapper::register();
     $root = new vfsStreamDirectory('modules');
     vfsStreamWrapper::setRoot($root);
@@ -209,7 +209,7 @@ public function testBuildPermissionsSortPerModule() {
    * @covers ::getPermissions
    * @covers ::buildPermissionsYaml
    */
-  public function testBuildPermissionsYamlCallback() {
+  public function testBuildPermissionsYamlCallback(): void {
     vfsStreamWrapper::register();
     $root = new vfsStreamDirectory('modules');
     vfsStreamWrapper::setRoot($root);
@@ -270,7 +270,7 @@ public function testBuildPermissionsYamlCallback() {
   /**
    * Tests a YAML file containing both static permissions and a callback.
    */
-  public function testPermissionsYamlStaticAndCallback() {
+  public function testPermissionsYamlStaticAndCallback(): void {
     vfsStreamWrapper::register();
     $root = new vfsStreamDirectory('modules');
     vfsStreamWrapper::setRoot($root);
diff --git a/core/modules/user/tests/src/Unit/Plugin/Action/AddRoleUserTest.php b/core/modules/user/tests/src/Unit/Plugin/Action/AddRoleUserTest.php
index fd48cfa3299e..df68245eb4b7 100644
--- a/core/modules/user/tests/src/Unit/Plugin/Action/AddRoleUserTest.php
+++ b/core/modules/user/tests/src/Unit/Plugin/Action/AddRoleUserTest.php
@@ -15,7 +15,7 @@ class AddRoleUserTest extends RoleUserTestBase {
   /**
    * Tests the execute method on a user with a role.
    */
-  public function testExecuteAddExistingRole() {
+  public function testExecuteAddExistingRole(): void {
     $this->account->expects($this->never())
       ->method('addRole')
       ->willReturn($this->account);
@@ -34,7 +34,7 @@ public function testExecuteAddExistingRole() {
   /**
    * Tests the execute method on a user without a specific role.
    */
-  public function testExecuteAddNonExistingRole() {
+  public function testExecuteAddNonExistingRole(): void {
     $this->account->expects($this->once())
       ->method('addRole')
       ->willReturn($this->account);
diff --git a/core/modules/user/tests/src/Unit/Plugin/Action/RemoveRoleUserTest.php b/core/modules/user/tests/src/Unit/Plugin/Action/RemoveRoleUserTest.php
index 429f2428b481..c0b12a8c5c9e 100644
--- a/core/modules/user/tests/src/Unit/Plugin/Action/RemoveRoleUserTest.php
+++ b/core/modules/user/tests/src/Unit/Plugin/Action/RemoveRoleUserTest.php
@@ -15,7 +15,7 @@ class RemoveRoleUserTest extends RoleUserTestBase {
   /**
    * Tests the execute method on a user with a role.
    */
-  public function testExecuteRemoveExistingRole() {
+  public function testExecuteRemoveExistingRole(): void {
     $this->account->expects($this->once())
       ->method('removeRole')
       ->willReturn($this->account);
@@ -34,7 +34,7 @@ public function testExecuteRemoveExistingRole() {
   /**
    * Tests the execute method on a user without a specific role.
    */
-  public function testExecuteRemoveNonExistingRole() {
+  public function testExecuteRemoveNonExistingRole(): void {
     $this->account->expects($this->never())
       ->method('removeRole')
       ->willReturn($this->account);
diff --git a/core/modules/user/tests/src/Unit/Plugin/Core/Entity/UserTest.php b/core/modules/user/tests/src/Unit/Plugin/Core/Entity/UserTest.php
index 8851dae88c80..bb1715af98f4 100644
--- a/core/modules/user/tests/src/Unit/Plugin/Core/Entity/UserTest.php
+++ b/core/modules/user/tests/src/Unit/Plugin/Core/Entity/UserTest.php
@@ -44,7 +44,7 @@ protected function createUserSession(array $rids = [], $authenticated = FALSE) {
    * @see \Drupal\user\Entity\User::getRoles()
    * @covers ::getRoles
    */
-  public function testUserGetRoles() {
+  public function testUserGetRoles(): void {
     // Anonymous user.
     $user = $this->createUserSession([]);
     $this->assertEquals([RoleInterface::ANONYMOUS_ID], $user->getRoles());
diff --git a/core/modules/user/tests/src/Unit/Plugin/Derivative/UserLocalTaskTest.php b/core/modules/user/tests/src/Unit/Plugin/Derivative/UserLocalTaskTest.php
index 770b56107872..259175325129 100644
--- a/core/modules/user/tests/src/Unit/Plugin/Derivative/UserLocalTaskTest.php
+++ b/core/modules/user/tests/src/Unit/Plugin/Derivative/UserLocalTaskTest.php
@@ -66,7 +66,7 @@ protected function setUp(): void {
    *
    * @covers \Drupal\user\Plugin\Derivative\UserLocalTask::getDerivativeDefinitions
    */
-  public function testGetDerivativeDefinitions() {
+  public function testGetDerivativeDefinitions(): void {
     $expected = [
       'permissions_entity_bundle_of_id' => [
         'route_name' => 'entity.entity_bundle_of_id.entity_permissions_form',
diff --git a/core/modules/user/tests/src/Unit/Plugin/Validation/Constraint/ProtectedUserFieldConstraintValidatorTest.php b/core/modules/user/tests/src/Unit/Plugin/Validation/Constraint/ProtectedUserFieldConstraintValidatorTest.php
index ab2ae11d35f2..c8d891c10285 100644
--- a/core/modules/user/tests/src/Unit/Plugin/Validation/Constraint/ProtectedUserFieldConstraintValidatorTest.php
+++ b/core/modules/user/tests/src/Unit/Plugin/Validation/Constraint/ProtectedUserFieldConstraintValidatorTest.php
@@ -69,7 +69,7 @@ protected function validate($items, ?string $name = NULL): void {
   /**
    * @covers ::validate
    */
-  public function testValidate() {
+  public function testValidate(): void {
     // Case 1: Validation context should not be touched if no items are passed.
     $this->validate(NULL);
 
diff --git a/core/modules/user/tests/src/Unit/Plugin/Validation/Constraint/UserMailRequiredValidatorTest.php b/core/modules/user/tests/src/Unit/Plugin/Validation/Constraint/UserMailRequiredValidatorTest.php
index 02ac593f8cdd..8cbd25fe5bee 100644
--- a/core/modules/user/tests/src/Unit/Plugin/Validation/Constraint/UserMailRequiredValidatorTest.php
+++ b/core/modules/user/tests/src/Unit/Plugin/Validation/Constraint/UserMailRequiredValidatorTest.php
@@ -58,7 +58,7 @@ protected function createValidator($is_admin) {
    *
    * @dataProvider providerTestValidate
    */
-  public function testValidate($items, $expected_violation, $is_admin = FALSE) {
+  public function testValidate($items, $expected_violation, $is_admin = FALSE): void {
     $constraint = new UserMailRequired();
 
     // If a violation is expected, then the context's addViolation method will
diff --git a/core/modules/user/tests/src/Unit/Plugin/migrate/process/ConvertTokensTest.php b/core/modules/user/tests/src/Unit/Plugin/migrate/process/ConvertTokensTest.php
index f7e6dd297085..aab06f47477a 100644
--- a/core/modules/user/tests/src/Unit/Plugin/migrate/process/ConvertTokensTest.php
+++ b/core/modules/user/tests/src/Unit/Plugin/migrate/process/ConvertTokensTest.php
@@ -25,7 +25,7 @@ protected function setUp(): void {
   /**
    * Tests conversion of user tokens.
    */
-  public function testConvertTokens() {
+  public function testConvertTokens(): void {
     $value = $this->plugin->transform('Account details for !username at !site', $this->migrateExecutable, $this->row, 'destination_property');
     $this->assertEquals('Account details for [user:name] at [site:name]', $value);
   }
@@ -33,7 +33,7 @@ public function testConvertTokens() {
   /**
    * Tests conversion of user tokens with a NULL value.
    */
-  public function testConvertTokensNull() {
+  public function testConvertTokensNull(): void {
     $value = $this->plugin->transform(NULL, $this->migrateExecutable, $this->row, 'destination_property');
     $this->assertEquals('', $value);
   }
diff --git a/core/modules/user/tests/src/Unit/Plugin/views/field/UserBulkFormTest.php b/core/modules/user/tests/src/Unit/Plugin/views/field/UserBulkFormTest.php
index 95703a459204..55c864ea45d6 100644
--- a/core/modules/user/tests/src/Unit/Plugin/views/field/UserBulkFormTest.php
+++ b/core/modules/user/tests/src/Unit/Plugin/views/field/UserBulkFormTest.php
@@ -29,7 +29,7 @@ protected function tearDown(): void {
   /**
    * Tests the constructor assignment of actions.
    */
-  public function testConstructor() {
+  public function testConstructor(): void {
     $actions = [];
 
     for ($i = 1; $i <= 2; $i++) {
diff --git a/core/modules/user/tests/src/Unit/Theme/AdminNegotiatorTest.php b/core/modules/user/tests/src/Unit/Theme/AdminNegotiatorTest.php
index 2740acf784e3..cb95afcd05c7 100644
--- a/core/modules/user/tests/src/Unit/Theme/AdminNegotiatorTest.php
+++ b/core/modules/user/tests/src/Unit/Theme/AdminNegotiatorTest.php
@@ -22,7 +22,7 @@ class AdminNegotiatorTest extends UnitTestCase {
   /**
    * @dataProvider getThemes
    */
-  public function testDetermineActiveTheme($admin_theme, $expected) {
+  public function testDetermineActiveTheme($admin_theme, $expected): void {
     $user = $this->prophesize(AccountInterface::class);
     $config_factory = $this->getConfigFactoryStub(['system.theme' => ['admin' => $admin_theme]]);
     $entity_type_manager = $this->prophesize(EntityTypeManagerInterface::class);
diff --git a/core/modules/user/tests/src/Unit/ToolbarLinkBuilderTest.php b/core/modules/user/tests/src/Unit/ToolbarLinkBuilderTest.php
index 5c40206ee3ce..5945580a844f 100644
--- a/core/modules/user/tests/src/Unit/ToolbarLinkBuilderTest.php
+++ b/core/modules/user/tests/src/Unit/ToolbarLinkBuilderTest.php
@@ -21,7 +21,7 @@ class ToolbarLinkBuilderTest extends UnitTestCase {
    *
    * @covers ::renderDisplayName
    */
-  public function testRenderDisplayName() {
+  public function testRenderDisplayName(): void {
     $account = $this->prophesize(AccountProxyInterface::class);
     $display_name = 'Something suspicious that should be #plain_text, not #markup';
     $account->getDisplayName()->willReturn($display_name);
diff --git a/core/modules/user/tests/src/Unit/UserAccessControlHandlerTest.php b/core/modules/user/tests/src/Unit/UserAccessControlHandlerTest.php
index 624da1b23484..62d9e4d0433b 100644
--- a/core/modules/user/tests/src/Unit/UserAccessControlHandlerTest.php
+++ b/core/modules/user/tests/src/Unit/UserAccessControlHandlerTest.php
@@ -160,7 +160,7 @@ public function assertFieldAccess(string $field, string $viewer, string $target,
    *
    * @dataProvider userNameProvider
    */
-  public function testUserNameAccess($viewer, $target, $view, $edit) {
+  public function testUserNameAccess($viewer, $target, $view, $edit): void {
     $this->assertFieldAccess('name', $viewer, $target, $view, $edit);
   }
 
@@ -211,7 +211,7 @@ public static function userNameProvider() {
    *
    * @dataProvider hiddenUserSettingsProvider
    */
-  public function testHiddenUserSettings($field, $viewer, $target, $view, $edit) {
+  public function testHiddenUserSettings($field, $viewer, $target, $view, $edit): void {
     $this->assertFieldAccess($field, $viewer, $target, $view, $edit);
   }
 
@@ -278,7 +278,7 @@ public static function hiddenUserSettingsProvider() {
    *
    * @dataProvider adminFieldAccessProvider
    */
-  public function testAdminFieldAccess($field, $viewer, $target, $view, $edit) {
+  public function testAdminFieldAccess($field, $viewer, $target, $view, $edit): void {
     $this->assertFieldAccess($field, $viewer, $target, $view, $edit);
   }
 
@@ -328,7 +328,7 @@ public static function adminFieldAccessProvider() {
    *
    * @dataProvider passwordAccessProvider
    */
-  public function testPasswordAccess($viewer, $target, $view, $edit) {
+  public function testPasswordAccess($viewer, $target, $view, $edit): void {
     $this->assertFieldAccess('pass', $viewer, $target, $view, $edit);
   }
 
@@ -373,7 +373,7 @@ public static function passwordAccessProvider() {
    *
    * @dataProvider createdAccessProvider
    */
-  public function testCreatedAccess($viewer, $target, $view, $edit) {
+  public function testCreatedAccess($viewer, $target, $view, $edit): void {
     $this->assertFieldAccess('created', $viewer, $target, $view, $edit);
   }
 
@@ -409,7 +409,7 @@ public static function createdAccessProvider() {
    *
    * @dataProvider NonExistingFieldAccessProvider
    */
-  public function testNonExistingFieldAccess($viewer, $target, $view, $edit) {
+  public function testNonExistingFieldAccess($viewer, $target, $view, $edit): void {
     // By default everyone has access to all fields that do not have explicit
     // access control.
     // @see EntityAccessControlHandler::checkFieldAccess()
diff --git a/core/modules/user/tests/src/Unit/UserAuthTest.php b/core/modules/user/tests/src/Unit/UserAuthTest.php
index 364376aa1257..b007a570fd8f 100644
--- a/core/modules/user/tests/src/Unit/UserAuthTest.php
+++ b/core/modules/user/tests/src/Unit/UserAuthTest.php
@@ -96,7 +96,7 @@ protected function setUp(): void {
    *
    * @dataProvider providerTestAuthenticateWithMissingCredentials
    */
-  public function testAuthenticateWithMissingCredentials($username, $password) {
+  public function testAuthenticateWithMissingCredentials($username, $password): void {
     $this->userStorage->expects($this->never())
       ->method('loadByProperties');
 
@@ -122,7 +122,7 @@ public static function providerTestAuthenticateWithMissingCredentials() {
    *
    * @covers ::authenticate
    */
-  public function testAuthenticateWithNoAccountReturned() {
+  public function testAuthenticateWithNoAccountReturned(): void {
     $this->userStorage->expects($this->once())
       ->method('loadByProperties')
       ->with(['name' => $this->username])
@@ -136,7 +136,7 @@ public function testAuthenticateWithNoAccountReturned() {
    *
    * @covers ::authenticate
    */
-  public function testAuthenticateWithIncorrectPassword() {
+  public function testAuthenticateWithIncorrectPassword(): void {
     $this->userStorage->expects($this->once())
       ->method('loadByProperties')
       ->with(['name' => $this->username])
@@ -155,7 +155,7 @@ public function testAuthenticateWithIncorrectPassword() {
    *
    * @covers ::authenticate
    */
-  public function testAuthenticateWithCorrectPassword() {
+  public function testAuthenticateWithCorrectPassword(): void {
     $this->testUser->expects($this->once())
       ->method('id')
       ->willReturn(1);
@@ -182,7 +182,7 @@ public function testAuthenticateWithCorrectPassword() {
    *
    * @covers ::authenticate
    */
-  public function testAuthenticateWithZeroPassword() {
+  public function testAuthenticateWithZeroPassword(): void {
     $this->testUser->expects($this->once())
       ->method('id')
       ->willReturn(2);
@@ -205,7 +205,7 @@ public function testAuthenticateWithZeroPassword() {
    *
    * @covers ::authenticate
    */
-  public function testAuthenticateWithCorrectPasswordAndNewPasswordHash() {
+  public function testAuthenticateWithCorrectPasswordAndNewPasswordHash(): void {
     $this->testUser->expects($this->once())
       ->method('id')
       ->willReturn(1);
diff --git a/core/modules/user/tests/src/Unit/UserRegistrationResourceTest.php b/core/modules/user/tests/src/Unit/UserRegistrationResourceTest.php
index c2fc0ec35dcb..dd3e6a1740cf 100644
--- a/core/modules/user/tests/src/Unit/UserRegistrationResourceTest.php
+++ b/core/modules/user/tests/src/Unit/UserRegistrationResourceTest.php
@@ -88,7 +88,7 @@ protected function setUp(): void {
   /**
    * Tests that an exception is thrown when no data provided for the account.
    */
-  public function testEmptyPost() {
+  public function testEmptyPost(): void {
     $this->expectException(BadRequestHttpException::class);
     $this->testClass->post(NULL);
   }
@@ -96,7 +96,7 @@ public function testEmptyPost() {
   /**
    * Tests that only new user accounts can be registered.
    */
-  public function testExistedEntityPost() {
+  public function testExistedEntityPost(): void {
     $entity = $this->prophesize(User::class);
     $entity->isNew()->willReturn(FALSE);
     $this->expectException(BadRequestHttpException::class);
@@ -107,7 +107,7 @@ public function testExistedEntityPost() {
   /**
    * Tests that admin permissions are required to register a user account.
    */
-  public function testRegistrationAdminOnlyPost() {
+  public function testRegistrationAdminOnlyPost(): void {
 
     $this->userSettings->get('register')->willReturn(UserInterface::REGISTER_ADMINISTRATORS_ONLY);
 
@@ -126,7 +126,7 @@ public function testRegistrationAdminOnlyPost() {
   /**
    * Tests that only anonymous users can register users.
    */
-  public function testRegistrationAnonymousOnlyPost() {
+  public function testRegistrationAnonymousOnlyPost(): void {
     $this->currentUser->isAnonymous()->willReturn(FALSE);
 
     $this->testClass = new UserRegistrationResource([], 'plugin_id', '', [], $this->logger, $this->userSettings->reveal(), $this->currentUser->reveal(), $this->passwordGenerator);
diff --git a/core/modules/user/tests/src/Unit/Views/Argument/RolesRidTest.php b/core/modules/user/tests/src/Unit/Views/Argument/RolesRidTest.php
index f46b8932033a..53538044b7eb 100644
--- a/core/modules/user/tests/src/Unit/Views/Argument/RolesRidTest.php
+++ b/core/modules/user/tests/src/Unit/Views/Argument/RolesRidTest.php
@@ -21,7 +21,7 @@ class RolesRidTest extends UnitTestCase {
    *
    * @covers ::titleQuery
    */
-  public function testTitleQuery() {
+  public function testTitleQuery(): void {
     $role1 = new Role([
       'id' => 'test_rid_1',
       'label' => 'test rid 1',
diff --git a/core/modules/views/tests/src/Functional/BulkFormTest.php b/core/modules/views/tests/src/Functional/BulkFormTest.php
index 7f3a8a85015b..7d05fb202266 100644
--- a/core/modules/views/tests/src/Functional/BulkFormTest.php
+++ b/core/modules/views/tests/src/Functional/BulkFormTest.php
@@ -50,7 +50,7 @@ protected function setUp(): void {
   /**
    * Tests the bulk form.
    */
-  public function testBulkForm() {
+  public function testBulkForm(): void {
     $node_storage = $this->container->get('entity_type.manager')->getStorage('node');
 
     // First, test an empty bulk form with the default style plugin to make sure
diff --git a/core/modules/views/tests/src/Functional/DefaultViewsTest.php b/core/modules/views/tests/src/Functional/DefaultViewsTest.php
index debae77fe906..a3d8afa83eab 100644
--- a/core/modules/views/tests/src/Functional/DefaultViewsTest.php
+++ b/core/modules/views/tests/src/Functional/DefaultViewsTest.php
@@ -138,7 +138,7 @@ protected function setUp($import_test_views = TRUE, $modules = []): void {
   /**
    * Tests that all Default views work as expected.
    */
-  public function testDefaultViews() {
+  public function testDefaultViews(): void {
     // Get all default views.
     $controller = $this->container->get('entity_type.manager')->getStorage('view');
     $views = $controller->loadMultiple();
@@ -185,7 +185,7 @@ public function createTerm($vocabulary) {
   /**
    * Tests the archive view.
    */
-  public function testArchiveView() {
+  public function testArchiveView(): void {
     // Create additional nodes compared to the one in the setup method.
     // Create two nodes in the same month, and one in each following month.
     $node = [
diff --git a/core/modules/views/tests/src/Functional/Entity/BaseFieldAccessTest.php b/core/modules/views/tests/src/Functional/Entity/BaseFieldAccessTest.php
index 9febcbe6ef81..2440fac096c0 100644
--- a/core/modules/views/tests/src/Functional/Entity/BaseFieldAccessTest.php
+++ b/core/modules/views/tests/src/Functional/Entity/BaseFieldAccessTest.php
@@ -64,7 +64,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['views_test_conf
   /**
    * Tests access to protected base fields.
    */
-  public function testProtectedField() {
+  public function testProtectedField(): void {
     $this->drupalGet('test-entity-protected-access');
     $this->assertSession()->pageTextContains('ok to see this one');
     $this->assertSession()->pageTextNotContains('no access value');
diff --git a/core/modules/views/tests/src/Functional/Entity/EntityQueryAccessTest.php b/core/modules/views/tests/src/Functional/Entity/EntityQueryAccessTest.php
index a8c60c0fa1fe..1a5b85353ae1 100644
--- a/core/modules/views/tests/src/Functional/Entity/EntityQueryAccessTest.php
+++ b/core/modules/views/tests/src/Functional/Entity/EntityQueryAccessTest.php
@@ -35,7 +35,7 @@ class EntityQueryAccessTest extends ViewTestBase {
   /**
    * Tests that the 'media_access' query tag is respected by Views.
    */
-  public function testMediaEntityQueryAccess() {
+  public function testMediaEntityQueryAccess(): void {
     $this->container->get('module_installer')->install(['media']);
 
     $media_type = $this->createMediaType('test');
@@ -77,7 +77,7 @@ public function testMediaEntityQueryAccess() {
   /**
    * Tests that the 'block_content_access' query tag is respected by Views.
    */
-  public function testBlockContentEntityQueryAccess() {
+  public function testBlockContentEntityQueryAccess(): void {
     $this->container->get('module_installer')->install(['block_content']);
 
     BlockContentType::create([
diff --git a/core/modules/views/tests/src/Functional/Entity/FieldEntityTest.php b/core/modules/views/tests/src/Functional/Entity/FieldEntityTest.php
index 9183520f3d96..671153db1cf9 100644
--- a/core/modules/views/tests/src/Functional/Entity/FieldEntityTest.php
+++ b/core/modules/views/tests/src/Functional/Entity/FieldEntityTest.php
@@ -86,7 +86,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['views_test_conf
   /**
    * Tests the getEntity method.
    */
-  public function testGetEntity() {
+  public function testGetEntity(): void {
     // The view is a view of comments, their nodes and their authors, so there
     // are three layers of entities.
 
diff --git a/core/modules/views/tests/src/Functional/Entity/FieldEntityTranslationTest.php b/core/modules/views/tests/src/Functional/Entity/FieldEntityTranslationTest.php
index 2eb24283dc5d..fa9c7d4f83e0 100644
--- a/core/modules/views/tests/src/Functional/Entity/FieldEntityTranslationTest.php
+++ b/core/modules/views/tests/src/Functional/Entity/FieldEntityTranslationTest.php
@@ -67,7 +67,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['views_test_conf
   /**
    * Tests that different translation mechanisms can be used for base fields.
    */
-  public function testTranslationRows() {
+  public function testTranslationRows(): void {
     $node = Node::create([
       'type' => 'article',
       'title' => 'example EN',
diff --git a/core/modules/views/tests/src/Functional/Entity/FieldRenderedEntityTranslationTest.php b/core/modules/views/tests/src/Functional/Entity/FieldRenderedEntityTranslationTest.php
index 0c8510705661..fd9fac492c00 100644
--- a/core/modules/views/tests/src/Functional/Entity/FieldRenderedEntityTranslationTest.php
+++ b/core/modules/views/tests/src/Functional/Entity/FieldRenderedEntityTranslationTest.php
@@ -73,7 +73,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['views_test_conf
   /**
    * Tests that different translation mechanisms can be used for base fields.
    */
-  public function testTranslationRows() {
+  public function testTranslationRows(): void {
     // First, an EN node with an ES translation.
     /** @var \Drupal\node\NodeInterface $node */
     $node = $this->entityTypeManager->getStorage('node')->create([
diff --git a/core/modules/views/tests/src/Functional/Entity/ViewNonTranslatableEntityTest.php b/core/modules/views/tests/src/Functional/Entity/ViewNonTranslatableEntityTest.php
index 6cf0dbdc4ea2..5684c85adedf 100644
--- a/core/modules/views/tests/src/Functional/Entity/ViewNonTranslatableEntityTest.php
+++ b/core/modules/views/tests/src/Functional/Entity/ViewNonTranslatableEntityTest.php
@@ -35,7 +35,7 @@ class ViewNonTranslatableEntityTest extends BrowserTestBase {
   /**
    * Tests displaying a view of non-translatable entities.
    */
-  public function testViewNoTranslatableEntity() {
+  public function testViewNoTranslatableEntity(): void {
     // Add a new language.
     ConfigurableLanguage::createFromLangcode('sr')->save();
 
diff --git a/core/modules/views/tests/src/Functional/GlossaryTest.php b/core/modules/views/tests/src/Functional/GlossaryTest.php
index 2010d849124f..0a197444f5c0 100644
--- a/core/modules/views/tests/src/Functional/GlossaryTest.php
+++ b/core/modules/views/tests/src/Functional/GlossaryTest.php
@@ -35,7 +35,7 @@ class GlossaryTest extends ViewTestBase {
   /**
    * Tests the default glossary view.
    */
-  public function testGlossaryView() {
+  public function testGlossaryView(): void {
     // Create a content type and add some nodes, with a non-random title.
     $type = $this->drupalCreateContentType();
     $nodes_per_char = [
diff --git a/core/modules/views/tests/src/Functional/Handler/AreaHTTPStatusCodeTest.php b/core/modules/views/tests/src/Functional/Handler/AreaHTTPStatusCodeTest.php
index 34fc31b1e401..1fe8ed00b356 100644
--- a/core/modules/views/tests/src/Functional/Handler/AreaHTTPStatusCodeTest.php
+++ b/core/modules/views/tests/src/Functional/Handler/AreaHTTPStatusCodeTest.php
@@ -37,7 +37,7 @@ class AreaHTTPStatusCodeTest extends ViewTestBase {
   /**
    * Tests the area handler.
    */
-  public function testHTTPStatusCodeHandler() {
+  public function testHTTPStatusCodeHandler(): void {
     $this->drupalGet('test-http-status-code');
     $this->assertSession()->statusCodeEquals(200);
 
diff --git a/core/modules/views/tests/src/Functional/Handler/AreaTest.php b/core/modules/views/tests/src/Functional/Handler/AreaTest.php
index f1935a19b00b..60ef405c7da8 100644
--- a/core/modules/views/tests/src/Functional/Handler/AreaTest.php
+++ b/core/modules/views/tests/src/Functional/Handler/AreaTest.php
@@ -60,7 +60,7 @@ protected function viewsData() {
   /**
    * Tests the generic UI of an area handler.
    */
-  public function testUI() {
+  public function testUI(): void {
     $admin_user = $this->drupalCreateUser([
       'administer views',
       'administer site configuration',
@@ -96,7 +96,7 @@ public function testUI() {
   /**
    * Tests global tokens.
    */
-  public function testRenderAreaToken() {
+  public function testRenderAreaToken(): void {
     $admin_user = $this->drupalCreateUser([
       'administer views',
       'administer site configuration',
@@ -138,7 +138,7 @@ public function testRenderAreaToken() {
   /**
    * Tests overriding the view title using the area title handler.
    */
-  public function testTitleArea() {
+  public function testTitleArea(): void {
     $view = Views::getView('frontpage');
     $view->initDisplay('page_1');
 
diff --git a/core/modules/views/tests/src/Functional/Handler/AreaTitleWebTest.php b/core/modules/views/tests/src/Functional/Handler/AreaTitleWebTest.php
index 67551be45f07..a379125979c2 100644
--- a/core/modules/views/tests/src/Functional/Handler/AreaTitleWebTest.php
+++ b/core/modules/views/tests/src/Functional/Handler/AreaTitleWebTest.php
@@ -39,7 +39,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['views_test_conf
   /**
    * Tests the title area handler.
    */
-  public function testTitleText() {
+  public function testTitleText(): void {
     // Confirm that the view has the normal title before making the view return
     // no result.
     $this->drupalGet('test-area-title');
diff --git a/core/modules/views/tests/src/Functional/Handler/FieldDropButtonTest.php b/core/modules/views/tests/src/Functional/Handler/FieldDropButtonTest.php
index 0ecd5f05b272..355e1930e21c 100644
--- a/core/modules/views/tests/src/Functional/Handler/FieldDropButtonTest.php
+++ b/core/modules/views/tests/src/Functional/Handler/FieldDropButtonTest.php
@@ -50,7 +50,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['views_test_conf
   /**
    * Tests dropbutton field.
    */
-  public function testDropbutton() {
+  public function testDropbutton(): void {
     // Create some test nodes.
     $nodes = [];
     for ($i = 0; $i < 5; $i++) {
diff --git a/core/modules/views/tests/src/Functional/Handler/FieldEntityLinkBaseTest.php b/core/modules/views/tests/src/Functional/Handler/FieldEntityLinkBaseTest.php
index 75466892bc5f..4705a620751f 100644
--- a/core/modules/views/tests/src/Functional/Handler/FieldEntityLinkBaseTest.php
+++ b/core/modules/views/tests/src/Functional/Handler/FieldEntityLinkBaseTest.php
@@ -70,7 +70,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['views_test_conf
   /**
    * Tests entity link fields.
    */
-  public function testEntityLink() {
+  public function testEntityLink(): void {
     $this->drupalGet('test-link-base-links');
     $session = $this->assertSession();
 
diff --git a/core/modules/views/tests/src/Functional/Handler/FieldEntityOperationsTest.php b/core/modules/views/tests/src/Functional/Handler/FieldEntityOperationsTest.php
index ab0f1d1318ac..f515a46bb457 100644
--- a/core/modules/views/tests/src/Functional/Handler/FieldEntityOperationsTest.php
+++ b/core/modules/views/tests/src/Functional/Handler/FieldEntityOperationsTest.php
@@ -48,7 +48,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['views_test_conf
   /**
    * Tests entity operations field.
    */
-  public function testEntityOperations() {
+  public function testEntityOperations(): void {
     // Add languages and refresh the container so the entity type manager will
     // have fresh data.
     ConfigurableLanguage::createFromLangcode('hu')->save();
diff --git a/core/modules/views/tests/src/Functional/Handler/FieldGroupRowsWebTest.php b/core/modules/views/tests/src/Functional/Handler/FieldGroupRowsWebTest.php
index e08b5c16df75..ecd33946e1d6 100644
--- a/core/modules/views/tests/src/Functional/Handler/FieldGroupRowsWebTest.php
+++ b/core/modules/views/tests/src/Functional/Handler/FieldGroupRowsWebTest.php
@@ -99,7 +99,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['views_test_conf
   /**
    * Testing when "Display all values in the same row" is checked.
    */
-  public function testGroupRows() {
+  public function testGroupRows(): void {
     $this->drupalGet('test-group-rows');
     $result = $this->cssSelect('div.views-field-field-views-testing-group- div');
 
@@ -113,7 +113,7 @@ public function testGroupRows() {
   /**
    * Testing when "Display all values in the same row" is unchecked.
    */
-  public function testUngroupedRows() {
+  public function testUngroupedRows(): void {
     $this->drupalGet('test-ungroup-rows');
     $result = $this->cssSelect('div.views-field-field-views-testing-group- div');
     $rendered_value = [];
diff --git a/core/modules/views/tests/src/Functional/Handler/FieldWebTest.php b/core/modules/views/tests/src/Functional/Handler/FieldWebTest.php
index d24cf1a6afb8..051d5e30235f 100644
--- a/core/modules/views/tests/src/Functional/Handler/FieldWebTest.php
+++ b/core/modules/views/tests/src/Functional/Handler/FieldWebTest.php
@@ -70,7 +70,7 @@ protected function viewsData() {
   /**
    * Tests the click sorting functionality.
    */
-  public function testClickSorting() {
+  public function testClickSorting(): void {
     $this->drupalGet('test_click_sort');
     $this->assertSession()->statusCodeEquals(200);
 
@@ -106,7 +106,7 @@ public function testClickSorting() {
   /**
    * Tests the default click sorting functionality with distinct.
    */
-  public function testClickSortingDistinct() {
+  public function testClickSortingDistinct(): void {
     ConfigurableLanguage::createFromLangcode('es')->save();
     $node = $this->drupalCreateNode();
     $this->drupalGet('test_distinct_click_sorting');
@@ -218,7 +218,7 @@ protected function xpathContent($content, $xpath, array $arguments = []) {
   /**
    * Tests rewriting the output to a link.
    */
-  public function testAlterUrl() {
+  public function testAlterUrl(): void {
     /** @var \Drupal\Core\Render\RendererInterface $renderer */
     $renderer = \Drupal::service('renderer');
 
@@ -408,7 +408,7 @@ public function testAlterUrl() {
   /**
    * Tests the field/label/wrapper classes.
    */
-  public function testFieldClasses() {
+  public function testFieldClasses(): void {
     /** @var \Drupal\Core\Render\RendererInterface $renderer */
     $renderer = $this->container->get('renderer');
     $view = Views::getView('test_field_classes');
@@ -519,7 +519,7 @@ public function testFieldClasses() {
   /**
    * Tests trimming/read-more/ellipses.
    */
-  public function testTextRendering() {
+  public function testTextRendering(): void {
     /** @var \Drupal\Core\Render\RendererInterface $renderer */
     $renderer = \Drupal::service('renderer');
 
diff --git a/core/modules/views/tests/src/Functional/Handler/FilterDateTest.php b/core/modules/views/tests/src/Functional/Handler/FilterDateTest.php
index 3814ed641e38..da0d2aa9a30b 100644
--- a/core/modules/views/tests/src/Functional/Handler/FilterDateTest.php
+++ b/core/modules/views/tests/src/Functional/Handler/FilterDateTest.php
@@ -99,7 +99,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['views_test_conf
   /**
    * Runs other test methods.
    */
-  public function testDateFilter() {
+  public function testDateFilter(): void {
     $this->_testOffset();
     $this->_testBetween();
     $this->_testUiValidation();
@@ -343,7 +343,7 @@ protected function _testFilterDatetimeUI() {
   /**
    * Tests that the exposed date filter is displayed without errors.
    */
-  public function testExposedFilter() {
+  public function testExposedFilter(): void {
     $this->drupalLogin($this->drupalCreateUser(['administer views']));
     $this->drupalGet('admin/structure/views/nojs/handler/test_filter_date_between/default/filter/created');
     $this->submitForm([], 'Expose filter');
diff --git a/core/modules/views/tests/src/Functional/Handler/FilterPlaceholderTextTest.php b/core/modules/views/tests/src/Functional/Handler/FilterPlaceholderTextTest.php
index 01ec573cfd89..7adc5c6cc94d 100644
--- a/core/modules/views/tests/src/Functional/Handler/FilterPlaceholderTextTest.php
+++ b/core/modules/views/tests/src/Functional/Handler/FilterPlaceholderTextTest.php
@@ -33,7 +33,7 @@ class FilterPlaceholderTextTest extends ViewTestBase {
   /**
    * Tests that HTML placeholders are added, when appropriate.
    */
-  public function testPlaceholderText() {
+  public function testPlaceholderText(): void {
     $this->drupalGet('placeholder-text-test');
 
     // String filter that has no placeholder configured.
diff --git a/core/modules/views/tests/src/Functional/Handler/HandlerTest.php b/core/modules/views/tests/src/Functional/Handler/HandlerTest.php
index 258b79b79693..c0fbf0c4878a 100644
--- a/core/modules/views/tests/src/Functional/Handler/HandlerTest.php
+++ b/core/modules/views/tests/src/Functional/Handler/HandlerTest.php
@@ -78,7 +78,7 @@ protected function viewsData() {
   /**
    * Tests the breakString method.
    */
-  public function testBreakString() {
+  public function testBreakString(): void {
     // Check defaults.
     $this->assertEquals((object) ['value' => [], 'operator' => NULL], HandlerBase::breakString(''));
 
@@ -205,7 +205,7 @@ public function testBreakString() {
   /**
    * Tests the order of handlers is the same before and after saving.
    */
-  public function testHandlerWeights() {
+  public function testHandlerWeights(): void {
     $handler_types = ['fields', 'filters', 'sorts'];
 
     $view = Views::getView('test_view_handler_weight');
@@ -231,7 +231,7 @@ public function testHandlerWeights() {
   /**
    * Tests the relationship ui for field/filter/argument/relationship.
    */
-  public function testRelationshipUI() {
+  public function testRelationshipUI(): void {
     $views_admin = $this->drupalCreateUser(['administer views']);
     $this->drupalLogin($views_admin);
 
@@ -295,7 +295,7 @@ public function testRelationshipUI() {
   /**
    * Tests the relationship method on the base class.
    */
-  public function testSetRelationship() {
+  public function testSetRelationship(): void {
     $view = Views::getView('test_handler_relationships');
     $view->setDisplay();
     // Setup a broken relationship.
@@ -334,7 +334,7 @@ public function testSetRelationship() {
    *
    * @see \Drupal\views\Plugin\views\HandlerBase::placeholder()
    */
-  public function testPlaceholder() {
+  public function testPlaceholder(): void {
     $view = Views::getView('test_view');
     $view->initHandlers();
     $view->initQuery();
@@ -366,7 +366,7 @@ public function testPlaceholder() {
    *
    * @see views_test_data_handler_test_access_callback
    */
-  public function testAccess() {
+  public function testAccess(): void {
     $view = Views::getView('test_handler_test_access');
     $views_data = $this->viewsData();
     $views_data = $views_data['views_test_data'];
diff --git a/core/modules/views/tests/src/Functional/Plugin/AccessTest.php b/core/modules/views/tests/src/Functional/Plugin/AccessTest.php
index 450f6cb914eb..ea1adceec118 100644
--- a/core/modules/views/tests/src/Functional/Plugin/AccessTest.php
+++ b/core/modules/views/tests/src/Functional/Plugin/AccessTest.php
@@ -74,7 +74,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['views_test_conf
   /**
    * Tests none access plugin.
    */
-  public function testAccessNone() {
+  public function testAccessNone(): void {
     $view = Views::getView('test_access_none');
     $view->setDisplay();
 
@@ -91,7 +91,7 @@ public function testAccessNone() {
    *
    * @see \Drupal\views_test\Plugin\views\access\StaticTest
    */
-  public function testStaticAccessPlugin() {
+  public function testStaticAccessPlugin(): void {
     $view = Views::getView('test_access_static');
     $view->setDisplay();
 
diff --git a/core/modules/views/tests/src/Functional/Plugin/ArgumentDefaultTest.php b/core/modules/views/tests/src/Functional/Plugin/ArgumentDefaultTest.php
index 0628fbc7dc5f..35da559fc1d3 100644
--- a/core/modules/views/tests/src/Functional/Plugin/ArgumentDefaultTest.php
+++ b/core/modules/views/tests/src/Functional/Plugin/ArgumentDefaultTest.php
@@ -59,7 +59,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['views_test_conf
    *
    * @see \Drupal\views_test_data\Plugin\views\argument_default\ArgumentDefaultTest
    */
-  public function testArgumentDefaultPlugin() {
+  public function testArgumentDefaultPlugin(): void {
     $view = Views::getView('test_view');
 
     // Add a new argument and set the test plugin for the argument_default.
@@ -96,7 +96,7 @@ public function testArgumentDefaultPlugin() {
   /**
    * Tests the use of a default argument plugin that provides no options.
    */
-  public function testArgumentDefaultNoOptions() {
+  public function testArgumentDefaultNoOptions(): void {
     $admin_user = $this->drupalCreateUser([
       'administer views',
       'administer site configuration',
@@ -118,7 +118,7 @@ public function testArgumentDefaultNoOptions() {
   /**
    * Tests fixed default argument.
    */
-  public function testArgumentDefaultFixed() {
+  public function testArgumentDefaultFixed(): void {
     $random = $this->randomMachineName();
     $view = Views::getView('test_argument_default_fixed');
     $view->setDisplay();
@@ -144,7 +144,7 @@ public function testArgumentDefaultFixed() {
   /**
    * Tests node default argument.
    */
-  public function testArgumentDefaultNode() {
+  public function testArgumentDefaultNode(): void {
     // Create a user that has permission to place a view block.
     $permissions = [
       'administer views',
@@ -183,7 +183,7 @@ public function testArgumentDefaultNode() {
   /**
    * Tests the query parameter default argument.
    */
-  public function testArgumentDefaultQueryParameter() {
+  public function testArgumentDefaultQueryParameter(): void {
     $view = Views::getView('test_argument_default_query_param');
 
     $request = Request::create(Url::fromUri('internal:/whatever', ['absolute' => TRUE])->toString());
@@ -203,7 +203,7 @@ public function testArgumentDefaultQueryParameter() {
   /**
    * Tests the more line generation if a default argument is provided.
    */
-  public function testArgumentDefaultUrlGeneration() {
+  public function testArgumentDefaultUrlGeneration(): void {
     // Create a user that has permission to place a view block.
     $permissions = [
       'administer views',
diff --git a/core/modules/views/tests/src/Functional/Plugin/CacheTagTest.php b/core/modules/views/tests/src/Functional/Plugin/CacheTagTest.php
index 4199934359f3..4464f8703ff7 100644
--- a/core/modules/views/tests/src/Functional/Plugin/CacheTagTest.php
+++ b/core/modules/views/tests/src/Functional/Plugin/CacheTagTest.php
@@ -124,7 +124,7 @@ protected function getRenderCache(ViewExecutable $view) {
   /**
    * Tests the tag cache plugin.
    */
-  public function testTagCaching() {
+  public function testTagCaching(): void {
     /** @var \Drupal\Core\Render\RendererInterface $renderer */
     $renderer = \Drupal::service('renderer');
     $view = Views::getView('test_tag_cache');
diff --git a/core/modules/views/tests/src/Functional/Plugin/CacheWebTest.php b/core/modules/views/tests/src/Functional/Plugin/CacheWebTest.php
index 2d6c6a4812cb..ea80e7e50d4f 100644
--- a/core/modules/views/tests/src/Functional/Plugin/CacheWebTest.php
+++ b/core/modules/views/tests/src/Functional/Plugin/CacheWebTest.php
@@ -50,7 +50,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['views_test_conf
   /**
    * Tests the output caching on an actual page.
    */
-  public function testCacheOutputOnPage() {
+  public function testCacheOutputOnPage(): void {
     $view = Views::getView('test_display');
     $view->storage->setStatus(TRUE);
     $view->setDisplay('page_1');
@@ -90,7 +90,7 @@ public function testCacheOutputOnPage() {
   /**
    * Tests that a display without caching still contains the cache metadata.
    */
-  public function testDisplayWithoutCacheStillBubblesMetadata() {
+  public function testDisplayWithoutCacheStillBubblesMetadata(): void {
     $view = Views::getView('test_display');
 
     $uncached_block = $view->buildRenderable('block_1', [], FALSE);
diff --git a/core/modules/views/tests/src/Functional/Plugin/ContextualFiltersBlockContextTest.php b/core/modules/views/tests/src/Functional/Plugin/ContextualFiltersBlockContextTest.php
index 26383ae6e052..d54c4e28c477 100644
--- a/core/modules/views/tests/src/Functional/Plugin/ContextualFiltersBlockContextTest.php
+++ b/core/modules/views/tests/src/Functional/Plugin/ContextualFiltersBlockContextTest.php
@@ -87,7 +87,7 @@ protected function setUp($import_test_views = TRUE, $modules = []): void {
   /**
    * Tests exposed context.
    */
-  public function testBlockContext() {
+  public function testBlockContext(): void {
     $this->drupalLogin($this->drupalCreateUser([
       'administer views',
       'administer blocks',
diff --git a/core/modules/views/tests/src/Functional/Plugin/ContextualFiltersStringTest.php b/core/modules/views/tests/src/Functional/Plugin/ContextualFiltersStringTest.php
index f47dde5224ff..1a6710aff9aa 100644
--- a/core/modules/views/tests/src/Functional/Plugin/ContextualFiltersStringTest.php
+++ b/core/modules/views/tests/src/Functional/Plugin/ContextualFiltersStringTest.php
@@ -71,7 +71,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['views_test_conf
   /**
    * Tests contextual filter for the user roles.
    */
-  public function testUserRoleContextualFilter() {
+  public function testUserRoleContextualFilter(): void {
     $this->drupalGet('admin/structure/views/view/test_user_role_contextual_filter');
     $edit = [
       'view_args' => $this->role1,
diff --git a/core/modules/views/tests/src/Functional/Plugin/DisabledDisplayTest.php b/core/modules/views/tests/src/Functional/Plugin/DisabledDisplayTest.php
index 2a749deeaa84..c2738f6d7323 100644
--- a/core/modules/views/tests/src/Functional/Plugin/DisabledDisplayTest.php
+++ b/core/modules/views/tests/src/Functional/Plugin/DisabledDisplayTest.php
@@ -56,7 +56,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['views_test_conf
    * the .enabled property disappear from the schema both the load and save
    * calls will start failing.
    */
-  public function testDisabledDisplays() {
+  public function testDisabledDisplays(): void {
     // The displays defined in this view.
     $display_ids = ['attachment_1', 'block_1', 'embed_1', 'feed_1', 'page_2'];
 
diff --git a/core/modules/views/tests/src/Functional/Plugin/DisplayAttachmentTest.php b/core/modules/views/tests/src/Functional/Plugin/DisplayAttachmentTest.php
index 8f2fc15994b6..7a6605271de5 100644
--- a/core/modules/views/tests/src/Functional/Plugin/DisplayAttachmentTest.php
+++ b/core/modules/views/tests/src/Functional/Plugin/DisplayAttachmentTest.php
@@ -49,7 +49,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['views_test_conf
   /**
    * Tests the attachment plugin.
    */
-  public function testAttachment() {
+  public function testAttachment(): void {
     $this->drupalGet('test-display-attachment');
     // Verify that both actual view and the attachment are rendered.
     $this->assertSession()->elementsCount('xpath', '//div[contains(@class, "view-content")]', 2);
@@ -62,7 +62,7 @@ public function testAttachment() {
   /**
    * Tests that nothing is output when the attachment displays are disabled.
    */
-  public function testDisabledAttachments() {
+  public function testDisabledAttachments(): void {
     $this->drupalCreateContentType(['type' => 'page']);
     $this->drupalCreateNode();
 
diff --git a/core/modules/views/tests/src/Functional/Plugin/DisplayEntityReferenceTest.php b/core/modules/views/tests/src/Functional/Plugin/DisplayEntityReferenceTest.php
index bace798cddae..36564e9b104d 100644
--- a/core/modules/views/tests/src/Functional/Plugin/DisplayEntityReferenceTest.php
+++ b/core/modules/views/tests/src/Functional/Plugin/DisplayEntityReferenceTest.php
@@ -131,7 +131,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['views_test_conf
   /**
    * Tests the entity reference display plugin.
    */
-  public function testEntityReferenceDisplay() {
+  public function testEntityReferenceDisplay(): void {
     // Test that the 'title' settings are not shown.
     $this->drupalGet('admin/structure/views/view/test_display_entity_reference/edit/entity_reference_1');
     $this->assertSession()->linkByHrefNotExists('admin/structure/views/nojs/display/test_display_entity_reference/entity_reference_1/title');
diff --git a/core/modules/views/tests/src/Functional/Plugin/DisplayFeedTest.php b/core/modules/views/tests/src/Functional/Plugin/DisplayFeedTest.php
index e940bdf1ebee..0e092c84ae6a 100644
--- a/core/modules/views/tests/src/Functional/Plugin/DisplayFeedTest.php
+++ b/core/modules/views/tests/src/Functional/Plugin/DisplayFeedTest.php
@@ -53,7 +53,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['views_test_conf
   /**
    * Tests the rendered output.
    */
-  public function testFeedOutput() {
+  public function testFeedOutput(): void {
     $this->drupalCreateContentType(['type' => 'page']);
 
     // Verify a title with HTML entities is properly escaped.
@@ -116,7 +116,7 @@ public function testFeedOutput() {
   /**
    * Tests the rendered output for fields display.
    */
-  public function testFeedFieldOutput() {
+  public function testFeedFieldOutput(): void {
     $this->drupalCreateContentType(['type' => 'page']);
 
     // Verify a title with HTML entities is properly escaped.
@@ -158,7 +158,7 @@ public function testFeedFieldOutput() {
   /**
    * Tests that nothing is output when the feed display is disabled.
    */
-  public function testDisabledFeed() {
+  public function testDisabledFeed(): void {
     $this->drupalCreateContentType(['type' => 'page']);
     $this->drupalCreateNode();
 
@@ -189,7 +189,7 @@ public function testDisabledFeed() {
   /**
    * Tests that the feed display works when the linked display is disabled.
    */
-  public function testDisabledLinkedDisplay() {
+  public function testDisabledLinkedDisplay(): void {
     $view = Views::getView('test_attached_disabled');
     $view->setDisplay();
     // Disable the page and link the feed to the page.
diff --git a/core/modules/views/tests/src/Functional/Plugin/DisplayFeedTranslationTest.php b/core/modules/views/tests/src/Functional/Plugin/DisplayFeedTranslationTest.php
index 964235a142a7..48eef57fd09e 100644
--- a/core/modules/views/tests/src/Functional/Plugin/DisplayFeedTranslationTest.php
+++ b/core/modules/views/tests/src/Functional/Plugin/DisplayFeedTranslationTest.php
@@ -96,7 +96,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['views_test_conf
   /**
    * Tests the rendered output for fields display with multiple translations.
    */
-  public function testFeedFieldOutput() {
+  public function testFeedFieldOutput(): void {
     $node = $this->drupalCreateNode([
       'type' => 'page',
       'title' => 'en',
diff --git a/core/modules/views/tests/src/Functional/Plugin/DisplayPageWebTest.php b/core/modules/views/tests/src/Functional/Plugin/DisplayPageWebTest.php
index 16ece9f9cda3..01b13e842474 100644
--- a/core/modules/views/tests/src/Functional/Plugin/DisplayPageWebTest.php
+++ b/core/modules/views/tests/src/Functional/Plugin/DisplayPageWebTest.php
@@ -49,7 +49,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['views_test_conf
   /**
    * Tests arguments.
    */
-  public function testArguments() {
+  public function testArguments(): void {
     $xpath = '//span[@class="field-content"]';
 
     // Ensure that all the entries are returned.
@@ -94,7 +94,7 @@ public function testArguments() {
   /**
    * Tests menu settings of page displays.
    */
-  public function testPageDisplayMenu() {
+  public function testPageDisplayMenu(): void {
     // Check local tasks.
     $this->drupalGet('test_page_display_menu');
     $this->assertSession()->statusCodeEquals(200);
@@ -131,7 +131,7 @@ public function testPageDisplayMenu() {
   /**
    * Tests the title is not displayed in the output.
    */
-  public function testTitleOutput() {
+  public function testTitleOutput(): void {
     $this->drupalGet('test_page_display_200');
 
     $view = Views::getView('test_page_display');
@@ -142,7 +142,7 @@ public function testTitleOutput() {
   /**
    * Tests the views page path functionality.
    */
-  public function testPagePaths() {
+  public function testPagePaths(): void {
     $this->drupalLogin($this->createUser(['administer views']));
     $this->assertPagePath('0');
     $this->assertPagePath('9999');
diff --git a/core/modules/views/tests/src/Functional/Plugin/DisplayTest.php b/core/modules/views/tests/src/Functional/Plugin/DisplayTest.php
index 204c77179698..07da90822355 100644
--- a/core/modules/views/tests/src/Functional/Plugin/DisplayTest.php
+++ b/core/modules/views/tests/src/Functional/Plugin/DisplayTest.php
@@ -71,7 +71,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['views_test_conf
    *
    * @see \Drupal\views_test_data\Plugin\views\display\DisplayTest
    */
-  public function testDisplayPlugin() {
+  public function testDisplayPlugin(): void {
     /** @var \Drupal\Core\Render\RendererInterface $renderer */
     $renderer = $this->container->get('renderer');
     $view = Views::getView('test_view');
@@ -167,7 +167,7 @@ public function testDisplayPlugin() {
   /**
    * Tests the overriding of filter_groups.
    */
-  public function testFilterGroupsOverriding() {
+  public function testFilterGroupsOverriding(): void {
     $view = Views::getView('test_filter_groups');
     $view->initDisplay();
 
@@ -180,7 +180,7 @@ public function testFilterGroupsOverriding() {
   /**
    * Tests the getAttachedDisplays method.
    */
-  public function testGetAttachedDisplays() {
+  public function testGetAttachedDisplays(): void {
     $view = Views::getView('test_get_attach_displays');
 
     // Both the feed_1 and the feed_2 display are attached to the page display.
@@ -194,7 +194,7 @@ public function testGetAttachedDisplays() {
   /**
    * Tests the readmore validation.
    */
-  public function testReadMoreNoDisplay() {
+  public function testReadMoreNoDisplay(): void {
     $view = Views::getView('test_display_more');
     // Confirm that the view validates when there is a page display.
     $errors = $view->validate();
@@ -220,7 +220,7 @@ public function testReadMoreNoDisplay() {
   /**
    * Tests the readmore with custom URL.
    */
-  public function testReadMoreCustomURL() {
+  public function testReadMoreCustomURL(): void {
     /** @var \Drupal\Core\Render\RendererInterface $renderer */
     $renderer = $this->container->get('renderer');
 
@@ -315,7 +315,7 @@ public function testReadMoreCustomURL() {
   /**
    * Tests invalid display plugins.
    */
-  public function testInvalidDisplayPlugins() {
+  public function testInvalidDisplayPlugins(): void {
     $this->drupalGet('test_display_invalid');
     $this->assertSession()->statusCodeEquals(200);
 
@@ -364,7 +364,7 @@ public function testInvalidDisplayPlugins() {
   /**
    * Tests display validation when a required relationship is missing.
    */
-  public function testMissingRelationship() {
+  public function testMissingRelationship(): void {
     $view = Views::getView('test_exposed_relationship_admin_ui');
 
     // Remove the relationship that is not used by other handlers.
@@ -389,7 +389,7 @@ public function testMissingRelationship() {
   /**
    * Tests the outputIsEmpty method on the display.
    */
-  public function testOutputIsEmpty() {
+  public function testOutputIsEmpty(): void {
     $view = Views::getView('test_display_empty');
     $this->executeView($view);
     $this->assertNotEmpty($view->result);
@@ -432,7 +432,7 @@ public function testOutputIsEmpty() {
   /**
    * Tests translation rendering settings based on entity translatability.
    */
-  public function testTranslationSetting() {
+  public function testTranslationSetting(): void {
     \Drupal::service('module_installer')->install(['file']);
 
     // By default there should be no language settings.
diff --git a/core/modules/views/tests/src/Functional/Plugin/ExposedFormCheckboxesTest.php b/core/modules/views/tests/src/Functional/Plugin/ExposedFormCheckboxesTest.php
index 72c9b1ead676..a6e39524c245 100644
--- a/core/modules/views/tests/src/Functional/Plugin/ExposedFormCheckboxesTest.php
+++ b/core/modules/views/tests/src/Functional/Plugin/ExposedFormCheckboxesTest.php
@@ -84,7 +84,7 @@ protected function setUp($import_test_views = TRUE, $modules = []): void {
   /**
    * Tests overriding the default render option with checkboxes.
    */
-  public function testExposedFormRenderCheckboxes() {
+  public function testExposedFormRenderCheckboxes(): void {
     // Use a test theme to convert multi-select elements into checkboxes.
     \Drupal::service('theme_installer')->install(['views_test_checkboxes_theme']);
     $this->config('system.theme')
@@ -117,7 +117,7 @@ public function testExposedFormRenderCheckboxes() {
   /**
    * Tests that "is all of" filters work with checkboxes.
    */
-  public function testExposedIsAllOfFilter() {
+  public function testExposedIsAllOfFilter(): void {
     foreach (['Term 1', 'Term 2', 'Term 3'] as $term_name) {
       // Add a few terms to the new vocabulary.
       $term = Term::create([
diff --git a/core/modules/views/tests/src/Functional/Plugin/ExposedFormTest.php b/core/modules/views/tests/src/Functional/Plugin/ExposedFormTest.php
index 918dcda51ae4..0d4fe6e4973d 100644
--- a/core/modules/views/tests/src/Functional/Plugin/ExposedFormTest.php
+++ b/core/modules/views/tests/src/Functional/Plugin/ExposedFormTest.php
@@ -71,7 +71,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['views_test_conf
   /**
    * Tests the submit button.
    */
-  public function testSubmitButton() {
+  public function testSubmitButton(): void {
     // Test the submit button value defaults to 'Apply'.
     $this->drupalGet('test_exposed_form_buttons');
     $this->assertSession()->statusCodeEquals(200);
@@ -107,7 +107,7 @@ public function testSubmitButton() {
   /**
    * Tests the exposed form with a non-standard identifier.
    */
-  public function testExposedIdentifier() {
+  public function testExposedIdentifier(): void {
     // Alter the identifier of the filter to a random string.
     $view = Views::getView('test_exposed_form_buttons');
     $view->setDisplay();
@@ -201,7 +201,7 @@ public function testExposedIdentifier() {
   /**
    * Tests whether the reset button works on an exposed form.
    */
-  public function testResetButton() {
+  public function testResetButton(): void {
     // Test the button is hidden when there is no exposed input.
     $this->drupalGet('test_exposed_form_buttons');
     $this->assertSession()->fieldNotExists('edit-reset');
@@ -249,7 +249,7 @@ public function testResetButton() {
    *
    * @dataProvider providerTestExposedBlock
    */
-  public function testExposedBlock($display) {
+  public function testExposedBlock($display): void {
     $view = Views::getView('test_exposed_block');
     $view->setDisplay($display);
     $block = $this->drupalPlaceBlock('views_exposed_filter_block:test_exposed_block-' . $display);
@@ -334,7 +334,7 @@ public static function providerTestExposedBlock() {
   /**
    * Tests the input required exposed form type.
    */
-  public function testInputRequired() {
+  public function testInputRequired(): void {
     $view = View::load('test_exposed_form_buttons');
     $display = &$view->getDisplay('default');
     $display['display_options']['exposed_form']['type'] = 'input_required';
@@ -357,7 +357,7 @@ public function testInputRequired() {
   /**
    * Tests the "on demand text" for the input required exposed form type.
    */
-  public function testTextInputRequired() {
+  public function testTextInputRequired(): void {
     $view = Views::getView('test_exposed_form_buttons');
     $display = &$view->storage->getDisplay('default');
     $display['display_options']['exposed_form']['type'] = 'input_required';
@@ -382,7 +382,7 @@ public function testTextInputRequired() {
   /**
    * Tests exposed forms with exposed sort and items per page.
    */
-  public function testExposedSortAndItemsPerPage() {
+  public function testExposedSortAndItemsPerPage(): void {
     for ($i = 0; $i < 50; $i++) {
       $entity = EntityTest::create([]);
       $entity->save();
@@ -480,7 +480,7 @@ protected function getExpectedExposedFormId(ViewExecutable $view) {
   /**
    * Tests a view which is rendered after a form with a validation error.
    */
-  public function testFormErrorWithExposedForm() {
+  public function testFormErrorWithExposedForm(): void {
     $this->drupalGet('views_test_data_error_form_page');
     $this->assertSession()->statusCodeEquals(200);
     $form = $this->cssSelect('form.views-exposed-form');
@@ -501,7 +501,7 @@ public function testFormErrorWithExposedForm() {
   /**
    * Tests the exposed form with a pager.
    */
-  public function testExposedFilterPagination() {
+  public function testExposedFilterPagination(): void {
     $this->drupalCreateContentType(['type' => 'post']);
     // Create some random nodes.
     for ($i = 0; $i < 5; $i++) {
@@ -548,7 +548,7 @@ protected function assertNodesExist(array $bundles): void {
   /**
    * Tests the "Remember the last selection" functionality.
    */
-  public function testRememberSelected() {
+  public function testRememberSelected(): void {
     $this->drupalGet('test_remember_selected');
     $this->getSession()->getPage()->fillField('type', 'page');
     $this->getSession()->getPage()->pressButton('Apply');
diff --git a/core/modules/views/tests/src/Functional/Plugin/FilterTest.php b/core/modules/views/tests/src/Functional/Plugin/FilterTest.php
index 5710582b1141..1f08bb14777e 100644
--- a/core/modules/views/tests/src/Functional/Plugin/FilterTest.php
+++ b/core/modules/views/tests/src/Functional/Plugin/FilterTest.php
@@ -61,7 +61,7 @@ protected function viewsData() {
   /**
    * Tests query of the row plugin.
    */
-  public function testFilterQuery() {
+  public function testFilterQuery(): void {
     // Check that we can find the test filter plugin.
     $plugin = $this->container->get('plugin.manager.views.filter')->createInstance('test_filter');
     $this->assertInstanceOf(FilterPlugin::class, $plugin);
@@ -156,7 +156,7 @@ public function testFilterQuery() {
   /**
    * Tests an exposed filter when all options are selected.
    */
-  public function testInOperatorSelectAllOptions() {
+  public function testInOperatorSelectAllOptions(): void {
     $row['row[type]'] = 'fields';
     $this->drupalGet('admin/structure/views/nojs/display/test_filter_in_operator_ui/default/row');
     $this->submitForm($row, 'Apply');
@@ -179,7 +179,7 @@ public function testInOperatorSelectAllOptions() {
   /**
    * Tests the limit of the expose operator functionality.
    */
-  public function testLimitExposedOperators() {
+  public function testLimitExposedOperators(): void {
 
     $this->drupalGet('test_filter_in_operator_ui');
     $this->assertSession()->statusCodeEquals(200);
diff --git a/core/modules/views/tests/src/Functional/Plugin/MenuLinkTest.php b/core/modules/views/tests/src/Functional/Plugin/MenuLinkTest.php
index 502637790d85..9f529872e1bc 100644
--- a/core/modules/views/tests/src/Functional/Plugin/MenuLinkTest.php
+++ b/core/modules/views/tests/src/Functional/Plugin/MenuLinkTest.php
@@ -66,7 +66,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['views_test_conf
   /**
    * Tests that menu links using menu_link_content as parent are visible.
    */
-  public function testHierarchicalMenuLinkVisibility() {
+  public function testHierarchicalMenuLinkVisibility(): void {
     $this->drupalLogin($this->adminUser);
 
     $node = $this->drupalCreateNode(['type' => 'page']);
diff --git a/core/modules/views/tests/src/Functional/Plugin/MiniPagerTest.php b/core/modules/views/tests/src/Functional/Plugin/MiniPagerTest.php
index b53099554d63..8a264d5163cd 100644
--- a/core/modules/views/tests/src/Functional/Plugin/MiniPagerTest.php
+++ b/core/modules/views/tests/src/Functional/Plugin/MiniPagerTest.php
@@ -57,7 +57,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['views_test_conf
   /**
    * Tests the rendering of mini pagers.
    */
-  public function testMiniPagerRender() {
+  public function testMiniPagerRender(): void {
     // On first page, current page and next page link appear, previous page link
     // does not.
     $this->drupalGet('test_mini_pager');
@@ -151,7 +151,7 @@ public function testMiniPagerRender() {
   /**
    * Tests changing the heading level.
    */
-  public function testPagerHeadingLevel() {
+  public function testPagerHeadingLevel(): void {
     // Set "Pager Heading" to h3 and check that it is correct.
     $view = Views::getView('test_mini_pager');
     $view->setDisplay();
diff --git a/core/modules/views/tests/src/Functional/Plugin/MonthDatePluginTest.php b/core/modules/views/tests/src/Functional/Plugin/MonthDatePluginTest.php
index b638cd76cbb3..6f9e518ed8e0 100644
--- a/core/modules/views/tests/src/Functional/Plugin/MonthDatePluginTest.php
+++ b/core/modules/views/tests/src/Functional/Plugin/MonthDatePluginTest.php
@@ -65,7 +65,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['views_test_conf
   /**
    * Tests the Month Date Plugin.
    */
-  public function testMonthDatePlugin() {
+  public function testMonthDatePlugin(): void {
     $assert_session = $this->assertSession();
 
     // Test fallback value.
diff --git a/core/modules/views/tests/src/Functional/Plugin/NumericFormatPluralTest.php b/core/modules/views/tests/src/Functional/Plugin/NumericFormatPluralTest.php
index 203f72bfd6fd..f477f07ad06a 100644
--- a/core/modules/views/tests/src/Functional/Plugin/NumericFormatPluralTest.php
+++ b/core/modules/views/tests/src/Functional/Plugin/NumericFormatPluralTest.php
@@ -51,7 +51,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['views_test_conf
   /**
    * Tests plural formatting setting on a numeric views handler.
    */
-  public function testNumericFormatPlural() {
+  public function testNumericFormatPlural(): void {
     // Create a file.
     $file = $this->createFile();
 
diff --git a/core/modules/views/tests/src/Functional/Plugin/PagerTest.php b/core/modules/views/tests/src/Functional/Plugin/PagerTest.php
index a36450509c32..0db04b214345 100644
--- a/core/modules/views/tests/src/Functional/Plugin/PagerTest.php
+++ b/core/modules/views/tests/src/Functional/Plugin/PagerTest.php
@@ -51,7 +51,7 @@ class PagerTest extends ViewTestBase {
    *
    * @see https://www.drupal.org/node/652712
    */
-  public function testStorePagerSettings() {
+  public function testStorePagerSettings(): void {
     // Show the default display so the override selection is shown.
     \Drupal::configFactory()->getEditable('views.settings')->set('ui.show.default_display', TRUE)->save();
 
@@ -223,7 +223,7 @@ public function testStorePagerSettings() {
   /**
    * Tests the none-pager-query.
    */
-  public function testNoLimit() {
+  public function testNoLimit(): void {
     // Create 11 nodes and make sure that everyone is returned.
     // We create 11 nodes, because the default pager plugin had 10 items per page.
     $this->drupalCreateContentType(['type' => 'page']);
@@ -254,7 +254,7 @@ public function testNoLimit() {
     $this->assertEquals(0, $view->pager->getItemsPerPage());
   }
 
-  public function testViewTotalRowsWithoutPager() {
+  public function testViewTotalRowsWithoutPager(): void {
     $this->drupalCreateContentType(['type' => 'page']);
     for ($i = 0; $i < 23; $i++) {
       $this->drupalCreateNode();
@@ -270,7 +270,7 @@ public function testViewTotalRowsWithoutPager() {
   /**
    * Tests the some pager plugin.
    */
-  public function testLimit() {
+  public function testLimit(): void {
     // Create 11 nodes and make sure that everyone is returned.
     // We create 11 nodes, because the default pager plugin had 10 items per page.
     $this->drupalCreateContentType(['type' => 'page']);
@@ -304,7 +304,7 @@ public function testLimit() {
   /**
    * Tests the normal pager.
    */
-  public function testNormalPager() {
+  public function testNormalPager(): void {
     // Create 11 nodes and make sure that everyone is returned.
     // We create 11 nodes, because the default pager plugin had 10 items per page.
     $this->drupalCreateContentType(['type' => 'page']);
@@ -382,7 +382,7 @@ public function testNormalPager() {
   /**
    * Tests changing the heading level.
    */
-  public function testPagerHeadingLevel() {
+  public function testPagerHeadingLevel(): void {
     // Create 2 nodes and make sure that everyone is returned.
     $this->drupalCreateContentType(['type' => 'page']);
     for ($i = 0; $i < 2; $i++) {
@@ -416,7 +416,7 @@ public function testPagerHeadingLevel() {
   /**
    * Tests rendering with NULL pager.
    */
-  public function testRenderNullPager() {
+  public function testRenderNullPager(): void {
     // Create 11 nodes and make sure that everyone is returned.
     // We create 11 nodes, because the default pager plugin had 10 items per page.
     $this->drupalCreateContentType(['type' => 'page']);
@@ -436,7 +436,7 @@ public function testRenderNullPager() {
   /**
    * Tests the api functions on the view object.
    */
-  public function testPagerApi() {
+  public function testPagerApi(): void {
     $view = Views::getView('test_pager_full');
     $view->setDisplay();
     // On the first round don't initialize the pager.
@@ -492,7 +492,7 @@ public function testPagerApi() {
   /**
    * Tests translating the pager using config_translation.
    */
-  public function testPagerConfigTranslation() {
+  public function testPagerConfigTranslation(): void {
     $view = Views::getView('content');
     $display = &$view->storage->getDisplay('default');
     $display['display_options']['pager']['options']['items_per_page'] = 5;
@@ -551,7 +551,7 @@ public function testPagerConfigTranslation() {
   /**
    * Tests translating the pager using locale.
    */
-  public function testPagerLocale() {
+  public function testPagerLocale(): void {
     // Enable locale and language module.
     $this->container->get('module_installer')->install(['locale', 'language']);
     $this->resetAll();
diff --git a/core/modules/views/tests/src/Functional/Plugin/QueryOptionsTest.php b/core/modules/views/tests/src/Functional/Plugin/QueryOptionsTest.php
index 6a143afaf94e..6312d5261780 100644
--- a/core/modules/views/tests/src/Functional/Plugin/QueryOptionsTest.php
+++ b/core/modules/views/tests/src/Functional/Plugin/QueryOptionsTest.php
@@ -35,7 +35,7 @@ class QueryOptionsTest extends ViewTestBase {
   /**
    * Test that query overrides are stored.
    */
-  public function testStoreQuerySettingsOverride() {
+  public function testStoreQuerySettingsOverride(): void {
     // Show the default display so the override selection is shown.
     \Drupal::configFactory()->getEditable('views.settings')->set('ui.show.default_display', TRUE)->save();
 
diff --git a/core/modules/views/tests/src/Functional/Plugin/StyleSummaryTest.php b/core/modules/views/tests/src/Functional/Plugin/StyleSummaryTest.php
index 78efcb727cb1..3f25a0b5a768 100644
--- a/core/modules/views/tests/src/Functional/Plugin/StyleSummaryTest.php
+++ b/core/modules/views/tests/src/Functional/Plugin/StyleSummaryTest.php
@@ -58,7 +58,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['views_test_conf
   /**
    * Tests a summary view.
    */
-  public function testSummaryView() {
+  public function testSummaryView(): void {
     $this->drupalGet('test-summary');
 
     // Ensure styles are properly added for summary views.
diff --git a/core/modules/views/tests/src/Functional/Plugin/StyleTableTest.php b/core/modules/views/tests/src/Functional/Plugin/StyleTableTest.php
index c7a2cf390687..d4d0f8903f36 100644
--- a/core/modules/views/tests/src/Functional/Plugin/StyleTableTest.php
+++ b/core/modules/views/tests/src/Functional/Plugin/StyleTableTest.php
@@ -40,7 +40,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['views_test_conf
   /**
    * Tests table caption/summary/description.
    */
-  public function testAccessibilitySettings() {
+  public function testAccessibilitySettings(): void {
     $this->drupalGet('test-table');
 
     $this->assertSession()->elementExists('xpath', '//caption/child::text()');
@@ -84,7 +84,7 @@ public function testAccessibilitySettings() {
   /**
    * Tests table fields in columns.
    */
-  public function testFieldInColumns() {
+  public function testFieldInColumns(): void {
     $this->drupalGet('test-table');
 
     // Ensure that both columns are in separate tds.
@@ -110,7 +110,7 @@ public function testFieldInColumns() {
   /**
    * Tests that a number with the value of "0" is displayed in the table.
    */
-  public function testNumericFieldVisible() {
+  public function testNumericFieldVisible(): void {
     // Adds a new data point in the views_test_data table to have a person with
     // an age of zero.
     $data_set = $this->dataSet();
@@ -134,7 +134,7 @@ public function testNumericFieldVisible() {
   /**
    * Tests that empty columns are hidden when empty_column is set.
    */
-  public function testEmptyColumn() {
+  public function testEmptyColumn(): void {
     // Empty the 'job' data.
     \Drupal::database()->update('views_test_data')
       ->fields(['job' => ''])
@@ -151,7 +151,7 @@ public function testEmptyColumn() {
   /**
    * Tests grouping by a field.
    */
-  public function testGrouping() {
+  public function testGrouping(): void {
     /** @var \Drupal\views\ViewEntityInterface $view */
     $view = \Drupal::entityTypeManager()->getStorage('view')->load('test_table');
     // Get a reference to the display configuration so we can alter some
@@ -229,7 +229,7 @@ public function testGrouping() {
   /**
    * Tests responsive classes and column assigning.
    */
-  public function testResponsiveMergedColumns() {
+  public function testResponsiveMergedColumns(): void {
     /** @var \Drupal\views\ViewEntityInterface $view */
     $view = \Drupal::entityTypeManager()->getStorage('view')->load('test_table');
 
@@ -250,7 +250,7 @@ public function testResponsiveMergedColumns() {
   /**
    * Tests the cacheability of the table display.
    */
-  public function testTableCacheability() {
+  public function testTableCacheability(): void {
     \Drupal::service('module_installer')->uninstall(['page_cache']);
 
     $url = 'test-table';
diff --git a/core/modules/views/tests/src/Functional/Plugin/ViewsBulkTest.php b/core/modules/views/tests/src/Functional/Plugin/ViewsBulkTest.php
index a63d91cfc560..141bfd073669 100644
--- a/core/modules/views/tests/src/Functional/Plugin/ViewsBulkTest.php
+++ b/core/modules/views/tests/src/Functional/Plugin/ViewsBulkTest.php
@@ -45,7 +45,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['views_test_conf
   /**
    * Tests bulk selection.
    */
-  public function testBulkSelection() {
+  public function testBulkSelection(): void {
 
     // Create first node, set updated time to the past.
     $node_1 = $this->drupalCreateNode([
diff --git a/core/modules/views/tests/src/Functional/Plugin/ViewsFormTest.php b/core/modules/views/tests/src/Functional/Plugin/ViewsFormTest.php
index dd9d3734ae62..d5445d2b21e9 100644
--- a/core/modules/views/tests/src/Functional/Plugin/ViewsFormTest.php
+++ b/core/modules/views/tests/src/Functional/Plugin/ViewsFormTest.php
@@ -28,7 +28,7 @@ class ViewsFormTest extends ViewTestBase {
   /**
    * Tests the Views form wrapper.
    */
-  public function testFormWrapper() {
+  public function testFormWrapper(): void {
     $this->drupalGet('test_bulk_form');
     // Ensure we have the form tag on the page.
     $xpath = $this->cssSelect('.views-form form');
diff --git a/core/modules/views/tests/src/Functional/RenderCacheWebTest.php b/core/modules/views/tests/src/Functional/RenderCacheWebTest.php
index 0f50ad489f8c..cd5a58bc5f84 100644
--- a/core/modules/views/tests/src/Functional/RenderCacheWebTest.php
+++ b/core/modules/views/tests/src/Functional/RenderCacheWebTest.php
@@ -60,7 +60,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['views_test_conf
   /**
    * Tests rendering caching of a views block with arguments.
    */
-  public function testEmptyView() {
+  public function testEmptyView(): void {
     $this->placeBlock('views_block:node_id_argument-block_1', ['region' => 'header']);
     $this->drupalGet('<front>');
     $this->assertEquals([], $this->cssSelect('div.region-header div.views-field-title'));
@@ -81,7 +81,7 @@ public function testEmptyView() {
   /**
    * Tests render caching for display rendered with different args on same page.
    */
-  public function testRepeatedDisplay() {
+  public function testRepeatedDisplay(): void {
     $this->drupalGet("views_test_render_cache/node_id_argument/block_1/{$this->nodes[0]->id()}/{$this->nodes[1]->id()}");
     // Confirm there are two displays.
     $displays = $this->cssSelect('.views-element-container .view-id-node_id_argument.view-display-id-block_1');
diff --git a/core/modules/views/tests/src/Functional/SearchIntegrationTest.php b/core/modules/views/tests/src/Functional/SearchIntegrationTest.php
index a9910a2216af..03fd20b13247 100644
--- a/core/modules/views/tests/src/Functional/SearchIntegrationTest.php
+++ b/core/modules/views/tests/src/Functional/SearchIntegrationTest.php
@@ -37,7 +37,7 @@ class SearchIntegrationTest extends ViewTestBase {
   /**
    * Tests search integration.
    */
-  public function testSearchIntegration() {
+  public function testSearchIntegration(): void {
     // Create a content type.
     $type = $this->drupalCreateContentType();
 
diff --git a/core/modules/views/tests/src/Functional/SearchMultilingualTest.php b/core/modules/views/tests/src/Functional/SearchMultilingualTest.php
index d0dab7eb92c1..90991632e6aa 100644
--- a/core/modules/views/tests/src/Functional/SearchMultilingualTest.php
+++ b/core/modules/views/tests/src/Functional/SearchMultilingualTest.php
@@ -45,7 +45,7 @@ class SearchMultilingualTest extends ViewTestBase {
   /**
    * Tests search with multilingual nodes.
    */
-  public function testMultilingualSearchFilter() {
+  public function testMultilingualSearchFilter(): void {
     // Add Spanish language programmatically.
     static::createLanguageFromLangcode('es');
 
diff --git a/core/modules/views/tests/src/Functional/TaxonomyGlossaryTest.php b/core/modules/views/tests/src/Functional/TaxonomyGlossaryTest.php
index d1570775275d..d7fb44f83cf9 100644
--- a/core/modules/views/tests/src/Functional/TaxonomyGlossaryTest.php
+++ b/core/modules/views/tests/src/Functional/TaxonomyGlossaryTest.php
@@ -61,7 +61,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['views_test_conf
   /**
    * Tests a taxonomy glossary view.
    */
-  public function testTaxonomyGlossaryView() {
+  public function testTaxonomyGlossaryView(): void {
     $initials = [];
     foreach ($this->taxonomyTerms as $term) {
       $char = mb_strtolower(substr($term->label(), 0, 1));
diff --git a/core/modules/views/tests/src/Functional/UserBatchActionTest.php b/core/modules/views/tests/src/Functional/UserBatchActionTest.php
index 8a21942cf65c..370ff761c3a0 100644
--- a/core/modules/views/tests/src/Functional/UserBatchActionTest.php
+++ b/core/modules/views/tests/src/Functional/UserBatchActionTest.php
@@ -34,7 +34,7 @@ class UserBatchActionTest extends BrowserTestBase {
   /**
    * Tests user admin batch.
    */
-  public function testUserAction() {
+  public function testUserAction(): void {
     $themes = ['stark', 'olivero', 'claro'];
     $this->container->get('theme_installer')->install($themes);
 
diff --git a/core/modules/views/tests/src/Functional/UserPathTest.php b/core/modules/views/tests/src/Functional/UserPathTest.php
index b63c50f12bd4..e2b43e8dd425 100644
--- a/core/modules/views/tests/src/Functional/UserPathTest.php
+++ b/core/modules/views/tests/src/Functional/UserPathTest.php
@@ -31,7 +31,7 @@ class UserPathTest extends ViewTestBase {
   /**
    * Tests if the login page is still available when using a wildcard path.
    */
-  public function testUserLoginPage() {
+  public function testUserLoginPage(): void {
     $this->drupalGet('user/login');
     $this->assertSession()->statusCodeEquals(200);
   }
diff --git a/core/modules/views/tests/src/Functional/ViewAjaxTest.php b/core/modules/views/tests/src/Functional/ViewAjaxTest.php
index 4decb6f007b8..6c2e3ead5c03 100644
--- a/core/modules/views/tests/src/Functional/ViewAjaxTest.php
+++ b/core/modules/views/tests/src/Functional/ViewAjaxTest.php
@@ -37,7 +37,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['views_test_conf
   /**
    * Tests an ajax view.
    */
-  public function testAjaxView() {
+  public function testAjaxView(): void {
     $this->drupalGet('test_ajax_view');
 
     $drupal_settings = $this->getDrupalSettings();
@@ -51,7 +51,7 @@ public function testAjaxView() {
   /**
    * Ensures that non-ajax view cannot be accessed via an ajax HTTP request.
    */
-  public function testNonAjaxViewViaAjax() {
+  public function testNonAjaxViewViaAjax(): void {
     $client = $this->getHttpClient();
     $response = $client->request('POST', $this->buildUrl('views/ajax'), [
       'form_params' => ['view_name' => 'test_ajax_view', 'view_display_id' => 'default'],
diff --git a/core/modules/views/tests/src/Functional/ViewElementTest.php b/core/modules/views/tests/src/Functional/ViewElementTest.php
index 77f97a06cda9..1a26f457dbe2 100644
--- a/core/modules/views/tests/src/Functional/ViewElementTest.php
+++ b/core/modules/views/tests/src/Functional/ViewElementTest.php
@@ -37,7 +37,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['views_test_conf
   /**
    * Tests the rendered output and form output of a view element.
    */
-  public function testViewElement() {
+  public function testViewElement(): void {
     $view = Views::getView('test_view_embed');
     $view->setDisplay();
     // Test a form.
@@ -77,7 +77,7 @@ public function testViewElement() {
   /**
    * Tests the rendered output and form output of the "embed" display plugin.
    */
-  public function testViewElementEmbed() {
+  public function testViewElementEmbed(): void {
     $view = Views::getView('test_view_embed');
     $view->setDisplay();
     // Test a form.
diff --git a/core/modules/views/tests/src/Functional/ViewTranslationTest.php b/core/modules/views/tests/src/Functional/ViewTranslationTest.php
index c9212bf50f05..ade9cdc659fa 100644
--- a/core/modules/views/tests/src/Functional/ViewTranslationTest.php
+++ b/core/modules/views/tests/src/Functional/ViewTranslationTest.php
@@ -53,7 +53,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['views_test_conf
   /**
    * Tests that the view route title is translated.
    */
-  public function testViewTitleTranslation() {
+  public function testViewTitleTranslation(): void {
     $view = Views::getView('test_view');
 
     // Create a test display, add path and default language title.
diff --git a/core/modules/views/tests/src/Functional/ViewsEscapingTest.php b/core/modules/views/tests/src/Functional/ViewsEscapingTest.php
index c7e695af17ae..9c3d45a467e2 100644
--- a/core/modules/views/tests/src/Functional/ViewsEscapingTest.php
+++ b/core/modules/views/tests/src/Functional/ViewsEscapingTest.php
@@ -46,7 +46,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['views_test_conf
   /**
    * Tests for incorrectly escaped markup in the views-view-fields.html.twig.
    */
-  public function testViewsViewFieldsEscaping() {
+  public function testViewsViewFieldsEscaping(): void {
     // Test with system theme using theme function.
     $this->drupalGet('test_page_display_200');
 
@@ -74,7 +74,7 @@ public function testViewsViewFieldsEscaping() {
   /**
    * Tests for incorrectly escaped markup in a header label on a display table.
    */
-  public function testViewsFieldHeaderEscaping() {
+  public function testViewsFieldHeaderEscaping(): void {
     // Test with a field header label having an html element wrapper.
     $this->drupalGet('test_field_header');
 
diff --git a/core/modules/views/tests/src/Functional/ViewsFormAlterTest.php b/core/modules/views/tests/src/Functional/ViewsFormAlterTest.php
index 2f475cafebf2..5d3442d70f67 100644
--- a/core/modules/views/tests/src/Functional/ViewsFormAlterTest.php
+++ b/core/modules/views/tests/src/Functional/ViewsFormAlterTest.php
@@ -24,7 +24,7 @@ class ViewsFormAlterTest extends ViewTestBase {
   /**
    * Tests hook_form_BASE_FORM_ID_alter for a ViewsForm.
    */
-  public function testViewsFormAlter() {
+  public function testViewsFormAlter(): void {
     $this->drupalLogin($this->createUser(['access media overview']));
     $this->drupalGet('admin/content/media');
     $count = $this->container->get('state')->get('hook_form_BASE_FORM_ID_alter_count');
diff --git a/core/modules/views/tests/src/Functional/ViewsFormMultipleTest.php b/core/modules/views/tests/src/Functional/ViewsFormMultipleTest.php
index eec9827d08f7..42c2261c89ac 100644
--- a/core/modules/views/tests/src/Functional/ViewsFormMultipleTest.php
+++ b/core/modules/views/tests/src/Functional/ViewsFormMultipleTest.php
@@ -48,7 +48,7 @@ protected function viewsData() {
   /**
    * Tests the a page with multiple View forms in it.
    */
-  public function testViewsFormMultiple() {
+  public function testViewsFormMultiple(): void {
     // Get the test page.
     $this->drupalGet('views_test_form_multiple');
 
diff --git a/core/modules/views/tests/src/Functional/ViewsNoResultsBehaviorTest.php b/core/modules/views/tests/src/Functional/ViewsNoResultsBehaviorTest.php
index ee820f5ac8af..719b56750872 100644
--- a/core/modules/views/tests/src/Functional/ViewsNoResultsBehaviorTest.php
+++ b/core/modules/views/tests/src/Functional/ViewsNoResultsBehaviorTest.php
@@ -42,7 +42,7 @@ protected function setUp($import_test_views = TRUE, $modules = []): void {
   /**
    * Tests the view with the text.
    */
-  public function testDuplicateText() {
+  public function testDuplicateText(): void {
     $output = $this->drupalGet('admin/content');
     $this->assertEquals(1, substr_count($output, 'No content available.'), 'Only one message should be present');
   }
diff --git a/core/modules/views/tests/src/Functional/ViewsThemeIntegrationTest.php b/core/modules/views/tests/src/Functional/ViewsThemeIntegrationTest.php
index eedebea8a7f2..0111f34e936c 100644
--- a/core/modules/views/tests/src/Functional/ViewsThemeIntegrationTest.php
+++ b/core/modules/views/tests/src/Functional/ViewsThemeIntegrationTest.php
@@ -49,7 +49,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['views_test_conf
   /**
    * Tests pre_render and post_render hooks in a theme and sub-theme.
    */
-  public function testThemedViewPage() {
+  public function testThemedViewPage(): void {
 
     \Drupal::service('theme_installer')->install(['test_basetheme', 'test_subtheme']);
 
diff --git a/core/modules/views/tests/src/Functional/Wizard/BasicTest.php b/core/modules/views/tests/src/Functional/Wizard/BasicTest.php
index 40828d3b5270..5187acc1e861 100644
--- a/core/modules/views/tests/src/Functional/Wizard/BasicTest.php
+++ b/core/modules/views/tests/src/Functional/Wizard/BasicTest.php
@@ -29,7 +29,7 @@ protected function setUp($import_test_views = TRUE, $modules = []): void {
     $this->drupalPlaceBlock('page_title_block');
   }
 
-  public function testViewsWizardAndListing() {
+  public function testViewsWizardAndListing(): void {
     $this->drupalCreateContentType(['type' => 'article']);
     $this->drupalCreateContentType(['type' => 'page']);
 
@@ -203,7 +203,7 @@ public function testViewsWizardAndListing() {
    *
    * @see \Drupal\views\Plugin\views\display\DisplayPluginBase::mergeDefaults()
    */
-  public function testWizardDefaultValues() {
+  public function testWizardDefaultValues(): void {
     $random_id = $this->randomMachineName(16);
     // Create a basic view.
     $view = [];
diff --git a/core/modules/views/tests/src/Functional/Wizard/EntityTestRevisionTest.php b/core/modules/views/tests/src/Functional/Wizard/EntityTestRevisionTest.php
index f9d4610b8247..3a9b74eeb181 100644
--- a/core/modules/views/tests/src/Functional/Wizard/EntityTestRevisionTest.php
+++ b/core/modules/views/tests/src/Functional/Wizard/EntityTestRevisionTest.php
@@ -24,7 +24,7 @@ class EntityTestRevisionTest extends WizardTestBase {
   /**
    * Tests creating a view of revisions where the type is not on the base table.
    */
-  public function testRevisionsViewWithNoTypeOnBaseTable() {
+  public function testRevisionsViewWithNoTypeOnBaseTable(): void {
     $type = [
       'show[wizard_key]' => 'standard:entity_test_rev_revision',
     ];
diff --git a/core/modules/views/tests/src/Functional/Wizard/ItemsPerPageTest.php b/core/modules/views/tests/src/Functional/Wizard/ItemsPerPageTest.php
index b301aad40d7a..5f9cd364dac8 100644
--- a/core/modules/views/tests/src/Functional/Wizard/ItemsPerPageTest.php
+++ b/core/modules/views/tests/src/Functional/Wizard/ItemsPerPageTest.php
@@ -28,7 +28,7 @@ protected function setUp($import_test_views = TRUE, $modules = []): void {
   /**
    * Tests the number of items per page.
    */
-  public function testItemsPerPage() {
+  public function testItemsPerPage(): void {
     $this->drupalCreateContentType(['type' => 'article']);
 
     // Create articles, each with a different creation time so that we can do a
diff --git a/core/modules/views/tests/src/Functional/Wizard/MenuTest.php b/core/modules/views/tests/src/Functional/Wizard/MenuTest.php
index 68f0dc9a0814..5ca2100d3e09 100644
--- a/core/modules/views/tests/src/Functional/Wizard/MenuTest.php
+++ b/core/modules/views/tests/src/Functional/Wizard/MenuTest.php
@@ -21,7 +21,7 @@ class MenuTest extends WizardTestBase {
   /**
    * Tests the menu functionality.
    */
-  public function testMenus() {
+  public function testMenus(): void {
     $this->drupalPlaceBlock('system_menu_block:main');
 
     // Create a view with a page display and a menu link in the Main Menu.
diff --git a/core/modules/views/tests/src/Functional/Wizard/NodeWizardTest.php b/core/modules/views/tests/src/Functional/Wizard/NodeWizardTest.php
index 0c5c5c035e86..5fafdae573ea 100644
--- a/core/modules/views/tests/src/Functional/Wizard/NodeWizardTest.php
+++ b/core/modules/views/tests/src/Functional/Wizard/NodeWizardTest.php
@@ -20,7 +20,7 @@ class NodeWizardTest extends WizardTestBase {
   /**
    * Tests creating a view with node titles.
    */
-  public function testViewAddWithNodeTitles() {
+  public function testViewAddWithNodeTitles(): void {
     $this->drupalCreateContentType(['type' => 'article']);
 
     $view = [];
diff --git a/core/modules/views/tests/src/Functional/Wizard/PagerTest.php b/core/modules/views/tests/src/Functional/Wizard/PagerTest.php
index e25091b23539..76e37c0cd5d5 100644
--- a/core/modules/views/tests/src/Functional/Wizard/PagerTest.php
+++ b/core/modules/views/tests/src/Functional/Wizard/PagerTest.php
@@ -19,7 +19,7 @@ class PagerTest extends WizardTestBase {
   /**
    * Tests the pager option.
    */
-  public function testPager() {
+  public function testPager(): void {
     // Create nodes, each with a different creation time so that we have
     // conditions that are meaningful for the use of a pager.
     $this->drupalCreateContentType(['type' => 'page']);
diff --git a/core/modules/views/tests/src/Functional/Wizard/SortingTest.php b/core/modules/views/tests/src/Functional/Wizard/SortingTest.php
index a3dd1bc50144..96833a5bd014 100644
--- a/core/modules/views/tests/src/Functional/Wizard/SortingTest.php
+++ b/core/modules/views/tests/src/Functional/Wizard/SortingTest.php
@@ -28,7 +28,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['views_test_conf
   /**
    * Tests the sorting functionality.
    */
-  public function testSorting() {
+  public function testSorting(): void {
     // Create nodes, each with a different creation time so that we can do a
     // meaningful sort.
     $this->drupalCreateContentType(['type' => 'page']);
diff --git a/core/modules/views/tests/src/Functional/Wizard/TaggedWithTest.php b/core/modules/views/tests/src/Functional/Wizard/TaggedWithTest.php
index dc7beeea3e5e..eefa980b46fa 100644
--- a/core/modules/views/tests/src/Functional/Wizard/TaggedWithTest.php
+++ b/core/modules/views/tests/src/Functional/Wizard/TaggedWithTest.php
@@ -127,7 +127,7 @@ protected function setUp($import_test_views = TRUE, $modules = []): void {
   /**
    * Tests the "tagged with" functionality.
    */
-  public function testTaggedWith() {
+  public function testTaggedWith(): void {
     // In this test we will only create nodes that have an instance of the tag
     // field.
     $node_add_path = 'node/add/' . $this->nodeTypeWithTags->id();
@@ -198,7 +198,7 @@ public function testTaggedWith() {
   /**
    * Tests that the "tagged with" form element only shows for node types that support it.
    */
-  public function testTaggedWithByNodeType() {
+  public function testTaggedWithByNodeType(): void {
     // The tagging field is associated with one of our node types only. So the
     // "tagged with" form element on the view wizard should appear on the form
     // by default (when the wizard is configured to display all content) and
@@ -249,7 +249,7 @@ public function testTaggedWithByNodeType() {
   /**
    * Tests that "tagged with" works with views entity reference.
    */
-  public function testTaggedWithByViewReference() {
+  public function testTaggedWithByViewReference(): void {
     Term::create(['name' => 'term1', 'vid' => 'views_testing_tags']);
     $tags_xpath = '//input[@name="show[tagged_with]"]';
 
diff --git a/core/modules/views/tests/src/FunctionalJavascript/BlockExposedFilterAJAXTest.php b/core/modules/views/tests/src/FunctionalJavascript/BlockExposedFilterAJAXTest.php
index fe2b4c850897..dff279552af7 100644
--- a/core/modules/views/tests/src/FunctionalJavascript/BlockExposedFilterAJAXTest.php
+++ b/core/modules/views/tests/src/FunctionalJavascript/BlockExposedFilterAJAXTest.php
@@ -51,7 +51,7 @@ protected function setUp(): void {
   /**
    * Tests if exposed filtering and reset works with a views block and ajax.
    */
-  public function testExposedFilteringAndReset() {
+  public function testExposedFilteringAndReset(): void {
     $node = $this->createNode();
     $block = $this->drupalPlaceBlock('views_block:test_block_exposed_ajax-block_1');
     $this->drupalGet($node->toUrl());
diff --git a/core/modules/views/tests/src/FunctionalJavascript/ClickSortingAJAXTest.php b/core/modules/views/tests/src/FunctionalJavascript/ClickSortingAJAXTest.php
index b009ebdd07f0..29cad07068b0 100644
--- a/core/modules/views/tests/src/FunctionalJavascript/ClickSortingAJAXTest.php
+++ b/core/modules/views/tests/src/FunctionalJavascript/ClickSortingAJAXTest.php
@@ -56,7 +56,7 @@ protected function setUp(): void {
   /**
    * Tests if sorting via AJAX works for the "Content" View.
    */
-  public function testClickSorting() {
+  public function testClickSorting(): void {
     // Visit the content page.
     $this->drupalGet('test-content-ajax');
 
diff --git a/core/modules/views/tests/src/FunctionalJavascript/ExposedFilterAJAXTest.php b/core/modules/views/tests/src/FunctionalJavascript/ExposedFilterAJAXTest.php
index ff4cdd4a9537..6d61ecef80a0 100644
--- a/core/modules/views/tests/src/FunctionalJavascript/ExposedFilterAJAXTest.php
+++ b/core/modules/views/tests/src/FunctionalJavascript/ExposedFilterAJAXTest.php
@@ -77,7 +77,7 @@ protected function setUp(): void {
   /**
    * Tests if exposed filtering via AJAX works for the "Content" View.
    */
-  public function testExposedFiltering() {
+  public function testExposedFiltering(): void {
     // Visit the View page.
     $this->drupalGet('admin/content');
 
@@ -149,7 +149,7 @@ public function testExposedFilteringThemeNegotiation(): void {
   /**
    * Tests if exposed filtering via AJAX works in a modal.
    */
-  public function testExposedFiltersInModal() {
+  public function testExposedFiltersInModal(): void {
     $this->drupalGet('views-test-modal/modal');
 
     $assert = $this->assertSession();
@@ -197,7 +197,7 @@ public function testExposedFiltersInModal() {
   /**
    * Tests exposed filtering via AJAX with a button element.
    */
-  public function testExposedFilteringWithButtonElement() {
+  public function testExposedFilteringWithButtonElement(): void {
     // Install theme to test with template system.
     \Drupal::service('theme_installer')->install(['views_test_theme']);
 
diff --git a/core/modules/views/tests/src/FunctionalJavascript/GlossaryViewTest.php b/core/modules/views/tests/src/FunctionalJavascript/GlossaryViewTest.php
index 1366c0a6953e..390046be4124 100644
--- a/core/modules/views/tests/src/FunctionalJavascript/GlossaryViewTest.php
+++ b/core/modules/views/tests/src/FunctionalJavascript/GlossaryViewTest.php
@@ -82,7 +82,7 @@ protected function setUp(): void {
   /**
    * Tests the AJAX callbacks for the glossary view.
    */
-  public function testGlossaryDefault() {
+  public function testGlossaryDefault(): void {
     // Visit the default Glossary page.
     $url = Url::fromRoute('view.test_glossary.page_1');
     $this->drupalGet($url);
@@ -104,7 +104,7 @@ public function testGlossaryDefault() {
   /**
    * Tests that the glossary also works on a language prefixed URL.
    */
-  public function testGlossaryLanguagePrefix() {
+  public function testGlossaryLanguagePrefix(): void {
     ConfigurableLanguage::createFromLangcode('nl')->save();
 
     $config = $this->config('language.negotiation');
diff --git a/core/modules/views/tests/src/FunctionalJavascript/PaginationAJAXTest.php b/core/modules/views/tests/src/FunctionalJavascript/PaginationAJAXTest.php
index c2019bb8c2d9..5eb53caba9cc 100644
--- a/core/modules/views/tests/src/FunctionalJavascript/PaginationAJAXTest.php
+++ b/core/modules/views/tests/src/FunctionalJavascript/PaginationAJAXTest.php
@@ -67,7 +67,7 @@ protected function setUp(): void {
   /**
    * Tests if pagination via AJAX works for the "Content" View.
    */
-  public function testBasicPagination() {
+  public function testBasicPagination(): void {
     // Visit the content page.
     $this->drupalGet('test-content-ajax');
 
@@ -144,7 +144,7 @@ public function testBasicPagination() {
   /**
    * Tests if pagination via AJAX works for the filter with default value.
    */
-  public function testDefaultFilterPagination() {
+  public function testDefaultFilterPagination(): void {
     // Add default value to the title filter.
     $view = \Drupal::configFactory()->getEditable('views.view.test_content_ajax');
     $display = $view->get('display');
diff --git a/core/modules/views/tests/src/FunctionalJavascript/Plugin/BulkOperationsTest.php b/core/modules/views/tests/src/FunctionalJavascript/Plugin/BulkOperationsTest.php
index 17153865b0e0..d2ce491eb848 100644
--- a/core/modules/views/tests/src/FunctionalJavascript/Plugin/BulkOperationsTest.php
+++ b/core/modules/views/tests/src/FunctionalJavascript/Plugin/BulkOperationsTest.php
@@ -40,7 +40,7 @@ protected function setUp(): void {
     $this->drupalLogin($this->createUser(['bypass node access', 'administer nodes', 'access content overview']));
   }
 
-  public function testBulkOperations() {
+  public function testBulkOperations(): void {
     $node_1 = $this->drupalCreateNode([
       'type' => 'page',
       'title' => 'The first node',
diff --git a/core/modules/views/tests/src/FunctionalJavascript/Plugin/views/Handler/ContextualFilterTest.php b/core/modules/views/tests/src/FunctionalJavascript/Plugin/views/Handler/ContextualFilterTest.php
index b725bb2dfbe5..1987e5854313 100644
--- a/core/modules/views/tests/src/FunctionalJavascript/Plugin/views/Handler/ContextualFilterTest.php
+++ b/core/modules/views/tests/src/FunctionalJavascript/Plugin/views/Handler/ContextualFilterTest.php
@@ -59,7 +59,7 @@ protected function setUp(): void {
   /**
    * Tests adding a contextual filter handler through the UI.
    */
-  public function testAddContextualFilterUI() {
+  public function testAddContextualFilterUI(): void {
     $this->drupalGet('/admin/structure/views/view/test_field_body');
 
     $web_assert = $this->assertSession();
diff --git a/core/modules/views/tests/src/FunctionalJavascript/Plugin/views/Handler/FieldTest.php b/core/modules/views/tests/src/FunctionalJavascript/Plugin/views/Handler/FieldTest.php
index baa050c7a686..0eb4a9f91c20 100644
--- a/core/modules/views/tests/src/FunctionalJavascript/Plugin/views/Handler/FieldTest.php
+++ b/core/modules/views/tests/src/FunctionalJavascript/Plugin/views/Handler/FieldTest.php
@@ -112,7 +112,7 @@ public function testModalDialogTitle(): void {
     $this->assertEquals('Content', $web_assert->waitForElement('css', '.ui-dialog-title')->getText());
   }
 
-  public function testFormatterChanging() {
+  public function testFormatterChanging(): void {
     $web_assert = $this->assertSession();
     $url = '/admin/structure/views/view/test_field_body';
     $this->drupalGet($url);
diff --git a/core/modules/views/tests/src/FunctionalJavascript/Plugin/views/Handler/FilterTest.php b/core/modules/views/tests/src/FunctionalJavascript/Plugin/views/Handler/FilterTest.php
index 9b00504be2a0..38bd96fc6515 100644
--- a/core/modules/views/tests/src/FunctionalJavascript/Plugin/views/Handler/FilterTest.php
+++ b/core/modules/views/tests/src/FunctionalJavascript/Plugin/views/Handler/FilterTest.php
@@ -59,7 +59,7 @@ protected function setUp(): void {
   /**
    * Tests adding a filter handler.
    */
-  public function testAddingFilter() {
+  public function testAddingFilter(): void {
     $web_assert = $this->assertSession();
 
     $url = '/admin/structure/views/view/content';
diff --git a/core/modules/views/tests/src/FunctionalJavascript/Plugin/views/Handler/GroupedExposedFilterTest.php b/core/modules/views/tests/src/FunctionalJavascript/Plugin/views/Handler/GroupedExposedFilterTest.php
index 4acf73ff7512..458d90531678 100644
--- a/core/modules/views/tests/src/FunctionalJavascript/Plugin/views/Handler/GroupedExposedFilterTest.php
+++ b/core/modules/views/tests/src/FunctionalJavascript/Plugin/views/Handler/GroupedExposedFilterTest.php
@@ -76,7 +76,7 @@ protected function setUp(): void {
   /**
    * Tests if the right fields are shown and the right values set.
    */
-  public function testGroupedFilterValuesUI() {
+  public function testGroupedFilterValuesUI(): void {
     $web_assert = $this->assertSession();
 
     $this->drupalGet('/admin/structure/views/view/test_exposed_admin_ui');
diff --git a/core/modules/views/tests/src/FunctionalJavascript/RedirectAjaxTest.php b/core/modules/views/tests/src/FunctionalJavascript/RedirectAjaxTest.php
index 3d5a50e4ca51..2cee37e5c956 100644
--- a/core/modules/views/tests/src/FunctionalJavascript/RedirectAjaxTest.php
+++ b/core/modules/views/tests/src/FunctionalJavascript/RedirectAjaxTest.php
@@ -53,7 +53,7 @@ protected function setUp(): void {
   /**
    * Ensures that redirects work with ajax.
    */
-  public function testRedirectWithAjax() {
+  public function testRedirectWithAjax(): void {
     $this->drupalGet('admin/content');
     $original_url = $this->getSession()->getCurrentUrl();
 
diff --git a/core/modules/views/tests/src/Kernel/BasicTest.php b/core/modules/views/tests/src/Kernel/BasicTest.php
index bff2a6af098a..ba766c1e72ce 100644
--- a/core/modules/views/tests/src/Kernel/BasicTest.php
+++ b/core/modules/views/tests/src/Kernel/BasicTest.php
@@ -23,7 +23,7 @@ class BasicTest extends ViewsKernelTestBase {
   /**
    * Tests a trivial result set.
    */
-  public function testSimpleResultSet() {
+  public function testSimpleResultSet(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
 
@@ -41,7 +41,7 @@ public function testSimpleResultSet() {
   /**
    * Tests filtering of the result set.
    */
-  public function testSimpleFiltering() {
+  public function testSimpleFiltering(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
 
@@ -100,7 +100,7 @@ public function testSimpleFiltering() {
   /**
    * Tests simple argument.
    */
-  public function testSimpleArgument() {
+  public function testSimpleArgument(): void {
     // Execute with a view
     $view = Views::getView('test_simple_argument');
     $view->setArguments([27]);
diff --git a/core/modules/views/tests/src/Kernel/CacheableMetadataCalculationTest.php b/core/modules/views/tests/src/Kernel/CacheableMetadataCalculationTest.php
index 90f03850c352..ed28481f551b 100644
--- a/core/modules/views/tests/src/Kernel/CacheableMetadataCalculationTest.php
+++ b/core/modules/views/tests/src/Kernel/CacheableMetadataCalculationTest.php
@@ -69,7 +69,7 @@ protected function setUp(): void {
    *
    * @see \Drupal\views\Entity\View::addCacheMetadata()
    */
-  public function testCacheableMetadataCalculation() {
+  public function testCacheableMetadataCalculation(): void {
     // Enabling a module that contains a view should not cause the cacheability
     // metadata to be recalculated.
     $this->enableModules([self::TEST_MODULE]);
diff --git a/core/modules/views/tests/src/Kernel/Entity/EntityViewsDataTest.php b/core/modules/views/tests/src/Kernel/Entity/EntityViewsDataTest.php
index d3c8fcbf8200..fd172ce6271e 100644
--- a/core/modules/views/tests/src/Kernel/Entity/EntityViewsDataTest.php
+++ b/core/modules/views/tests/src/Kernel/Entity/EntityViewsDataTest.php
@@ -170,7 +170,7 @@ protected function setUpEntityType(EntityTypeInterface $definition, array $base_
   /**
    * Tests base tables.
    */
-  public function testBaseTables() {
+  public function testBaseTables(): void {
     $data = $this->entityTypeManager->getHandler('entity_test', 'views_data')->getViewsData();
 
     $this->assertEquals('entity_test', $data['entity_test']['table']['entity type']);
@@ -193,7 +193,7 @@ public function testBaseTables() {
   /**
    * Tests data_table support.
    */
-  public function testDataTable() {
+  public function testDataTable(): void {
     $entity_type = $this->baseEntityType
       ->set('data_table', 'entity_test_mul_property_data')
       ->set('id', 'entity_test_mul')
@@ -229,7 +229,7 @@ public function testDataTable() {
   /**
    * Tests revision table without data table support.
    */
-  public function testRevisionTableWithoutDataTable() {
+  public function testRevisionTableWithoutDataTable(): void {
     $entity_type = $this->baseEntityType
       ->set('revision_table', 'entity_test_mulrev_revision')
       ->set('revision_data_table', NULL)
@@ -268,7 +268,7 @@ public function testRevisionTableWithoutDataTable() {
   /**
    * Tests revision table with data table support.
    */
-  public function testRevisionTableWithRevisionDataTableAndDataTable() {
+  public function testRevisionTableWithRevisionDataTableAndDataTable(): void {
     $entity_type = $this->baseEntityType
       ->set('data_table', 'entity_test_mul_property_data')
       ->set('revision_table', 'entity_test_mulrev_revision')
@@ -326,7 +326,7 @@ public function testRevisionTableWithRevisionDataTableAndDataTable() {
   /**
    * Tests revision table with data table support.
    */
-  public function testRevisionTableWithRevisionDataTable() {
+  public function testRevisionTableWithRevisionDataTable(): void {
     $entity_type = $this->baseEntityType
       ->set('revision_table', 'entity_test_mulrev_revision')
       ->set('revision_data_table', 'entity_test_mulrev_property_revision')
@@ -382,7 +382,7 @@ public function testRevisionTableWithRevisionDataTable() {
   /**
    * Tests fields on the base table.
    */
-  public function testBaseTableFields() {
+  public function testBaseTableFields(): void {
     $data = $this->entityTypeManager->getHandler('entity_test', 'views_data')->getViewsData();
 
     $this->assertNumericField($data['entity_test']['id']);
@@ -435,7 +435,7 @@ public function testBaseTableFields() {
   /**
    * Tests fields on the data table.
    */
-  public function testDataTableFields() {
+  public function testDataTableFields(): void {
     $entity_test_type = new ConfigEntityType([
       'class' => ConfigEntityBase::class,
       'id' => 'entity_test_bundle',
@@ -524,7 +524,7 @@ public function testDataTableFields() {
   /**
    * Tests fields on the revision table.
    */
-  public function testRevisionTableFields() {
+  public function testRevisionTableFields(): void {
     $entity_type = $this->baseEntityType
       ->set('id', 'entity_test_mulrev')
       ->set('base_table', 'entity_test_mulrev')
diff --git a/core/modules/views/tests/src/Kernel/Entity/EntityViewsWithMultivalueBasefieldTest.php b/core/modules/views/tests/src/Kernel/Entity/EntityViewsWithMultivalueBasefieldTest.php
index c6c4b27b870c..30e001a85c53 100644
--- a/core/modules/views/tests/src/Kernel/Entity/EntityViewsWithMultivalueBasefieldTest.php
+++ b/core/modules/views/tests/src/Kernel/Entity/EntityViewsWithMultivalueBasefieldTest.php
@@ -37,7 +37,7 @@ protected function setUp($import_test_views = TRUE): void {
   /**
    * Tests entity views with multivalue base fields.
    */
-  public function testView() {
+  public function testView(): void {
     EntityTestMultiValueBasefield::create([
       'name' => 'test',
     ])->save();
diff --git a/core/modules/views/tests/src/Kernel/Entity/FilterEntityBundleTest.php b/core/modules/views/tests/src/Kernel/Entity/FilterEntityBundleTest.php
index ec5797e2ef6e..c3daf8260c1d 100644
--- a/core/modules/views/tests/src/Kernel/Entity/FilterEntityBundleTest.php
+++ b/core/modules/views/tests/src/Kernel/Entity/FilterEntityBundleTest.php
@@ -29,7 +29,7 @@ class FilterEntityBundleTest extends ViewsKernelTestBase {
   /**
    * Tests the generic bundle filter.
    */
-  public function testFilterEntity() {
+  public function testFilterEntity(): void {
     $this->installEntitySchema('user');
     $this->installEntitySchema('node');
     NodeType::create(['type' => 'test_bundle', 'name' => 'Test 1'])->save();
diff --git a/core/modules/views/tests/src/Kernel/Entity/LatestRevisionFilterTest.php b/core/modules/views/tests/src/Kernel/Entity/LatestRevisionFilterTest.php
index ddd0f3cf6c3e..1d6973ac51aa 100644
--- a/core/modules/views/tests/src/Kernel/Entity/LatestRevisionFilterTest.php
+++ b/core/modules/views/tests/src/Kernel/Entity/LatestRevisionFilterTest.php
@@ -30,7 +30,7 @@ class LatestRevisionFilterTest extends ViewsKernelTestBase {
   /**
    * Tests the 'Latest revision' filter.
    */
-  public function testLatestRevisionFilter() {
+  public function testLatestRevisionFilter(): void {
     $this->installEntitySchema('user');
     $this->installEntitySchema('node');
     $this->installSchema('node', ['node_access']);
diff --git a/core/modules/views/tests/src/Kernel/Entity/LatestTranslationAffectedRevisionTest.php b/core/modules/views/tests/src/Kernel/Entity/LatestTranslationAffectedRevisionTest.php
index bbe9d038713b..78362cb0b604 100644
--- a/core/modules/views/tests/src/Kernel/Entity/LatestTranslationAffectedRevisionTest.php
+++ b/core/modules/views/tests/src/Kernel/Entity/LatestTranslationAffectedRevisionTest.php
@@ -35,7 +35,7 @@ class LatestTranslationAffectedRevisionTest extends ViewsKernelTestBase {
   /**
    * Tests the 'Latest revision' filter.
    */
-  public function testLatestRevisionFilter() {
+  public function testLatestRevisionFilter(): void {
     $this->installEntitySchema('user');
     $this->installEntitySchema('node');
     $this->installSchema('node', ['node_access']);
diff --git a/core/modules/views/tests/src/Kernel/Entity/RowEntityRenderersTest.php b/core/modules/views/tests/src/Kernel/Entity/RowEntityRenderersTest.php
index 7c9c6611d9e1..30c18ae793f7 100644
--- a/core/modules/views/tests/src/Kernel/Entity/RowEntityRenderersTest.php
+++ b/core/modules/views/tests/src/Kernel/Entity/RowEntityRenderersTest.php
@@ -168,35 +168,35 @@ protected function setUp($import_test_views = TRUE): void {
   /**
    * Tests the entity row renderers.
    */
-  public function testEntityRenderers() {
+  public function testEntityRenderers(): void {
     $this->checkLanguageRenderers('page_1', $this->values);
   }
 
   /**
    * Tests the field row renderers.
    */
-  public function testFieldRenderers() {
+  public function testFieldRenderers(): void {
     $this->checkLanguageRenderers('page_2', $this->values);
   }
 
   /**
    * Tests the entity row renderers for relationships.
    */
-  public function testEntityRenderersRelationship() {
+  public function testEntityRenderersRelationship(): void {
     $this->checkLanguageRenderersRelationship('page_3', $this->values);
   }
 
   /**
    * Tests the field row renderers for relationships.
    */
-  public function testFieldRenderersRelationship() {
+  public function testFieldRenderersRelationship(): void {
     $this->checkLanguageRenderersRelationship('page_4', $this->values);
   }
 
   /**
    * Tests the row renderer with a revision base table.
    */
-  public function testRevisionBaseTable() {
+  public function testRevisionBaseTable(): void {
     $view = Views::getView('test_entity_row_renderers_revisions_base');
     $view->execute();
     $this->assertIdenticalResultset($view, $this->ids, ['nid' => 'nid', 'uid' => 'uid']);
diff --git a/core/modules/views/tests/src/Kernel/Entity/ViewEntityDependenciesTest.php b/core/modules/views/tests/src/Kernel/Entity/ViewEntityDependenciesTest.php
index c183a1bbf956..34954ed4f423 100644
--- a/core/modules/views/tests/src/Kernel/Entity/ViewEntityDependenciesTest.php
+++ b/core/modules/views/tests/src/Kernel/Entity/ViewEntityDependenciesTest.php
@@ -94,7 +94,7 @@ protected function setUp($import_test_views = TRUE): void {
   /**
    * Tests the getDependencies method.
    */
-  public function testGetDependencies() {
+  public function testGetDependencies(): void {
     $expected = [];
     $expected['test_field_get_entity'] = [
       'module' => [
diff --git a/core/modules/views/tests/src/Kernel/EventSubscriber/ViewsEntitySchemaSubscriberIntegrationTest.php b/core/modules/views/tests/src/Kernel/EventSubscriber/ViewsEntitySchemaSubscriberIntegrationTest.php
index f9a4c9b1171e..0017457e35a0 100644
--- a/core/modules/views/tests/src/Kernel/EventSubscriber/ViewsEntitySchemaSubscriberIntegrationTest.php
+++ b/core/modules/views/tests/src/Kernel/EventSubscriber/ViewsEntitySchemaSubscriberIntegrationTest.php
@@ -96,7 +96,7 @@ protected function setUp($import_test_views = TRUE): void {
   /**
    * Tests that views are disabled when an entity type is deleted.
    */
-  public function testDeleteEntityType() {
+  public function testDeleteEntityType(): void {
     $entity_storage = $this->entityTypeManager->getStorage('view');
 
     // Make the test entity type revisionable.
@@ -134,7 +134,7 @@ public function testDeleteEntityType() {
   /**
    * Tests that renaming base tables adapts the views.
    */
-  public function testBaseTableRename() {
+  public function testBaseTableRename(): void {
     $this->renameBaseTable();
     $this->applyEntityUpdates('entity_test_update');
 
@@ -159,7 +159,7 @@ public function testBaseTableRename() {
   /**
    * Tests that renaming data tables adapts the views.
    */
-  public function testDataTableRename() {
+  public function testDataTableRename(): void {
     $this->updateEntityTypeToTranslatable(TRUE);
 
     $entity_storage = $this->entityTypeManager->getStorage('view');
@@ -193,7 +193,7 @@ public function testDataTableRename() {
   /**
    * Tests that renaming revision tables adapts the views.
    */
-  public function testRevisionBaseTableRename() {
+  public function testRevisionBaseTableRename(): void {
     $this->updateEntityTypeToRevisionable(TRUE);
 
     /** @var \Drupal\views\Entity\View $view */
@@ -226,7 +226,7 @@ public function testRevisionBaseTableRename() {
   /**
    * Tests that renaming revision tables adapts the views.
    */
-  public function testRevisionDataTableRename() {
+  public function testRevisionDataTableRename(): void {
     $this->updateEntityTypeToRevisionableAndTranslatable(TRUE);
 
     /** @var \Drupal\views\Entity\View $view */
@@ -260,7 +260,7 @@ public function testRevisionDataTableRename() {
   /**
    * Tests that adding data tables adapts the views.
    */
-  public function testDataTableAddition() {
+  public function testDataTableAddition(): void {
     $this->updateEntityTypeToTranslatable(TRUE);
 
     /** @var \Drupal\views\Entity\View $view */
@@ -282,7 +282,7 @@ public function testDataTableAddition() {
   /**
    * Tests that enabling revisions doesn't do anything.
    */
-  public function testRevisionEnabling() {
+  public function testRevisionEnabling(): void {
     $this->updateEntityTypeToRevisionable(TRUE);
 
     /** @var \Drupal\views\Entity\View $view */
@@ -302,7 +302,7 @@ public function testRevisionEnabling() {
   /**
    * Tests that removing revision support disables the view.
    */
-  public function testRevisionDisabling() {
+  public function testRevisionDisabling(): void {
     $this->updateEntityTypeToRevisionable(TRUE);
     $this->updateEntityTypeToNotRevisionable(TRUE);
 
@@ -321,7 +321,7 @@ public function testRevisionDisabling() {
   /**
    * Tests a bunch possible entity definition table updates.
    */
-  public function testVariousTableUpdates() {
+  public function testVariousTableUpdates(): void {
     // We want to test the following permutations of entity definition updates:
     // base <-> base + translation
     // base + translation <-> base + translation + revision
@@ -439,7 +439,7 @@ public function testVariousTableUpdates() {
   /**
    * Tests some possible entity table updates for a revision view.
    */
-  public function testVariousTableUpdatesForRevisionView() {
+  public function testVariousTableUpdatesForRevisionView(): void {
     // base + revision <-> base + translation + revision
     $this->updateEntityTypeToRevisionable(TRUE);
 
@@ -474,7 +474,7 @@ public function testVariousTableUpdatesForRevisionView() {
   /**
    * Tests the case when a view could not be updated automatically.
    */
-  public function testViewSaveException() {
+  public function testViewSaveException(): void {
     $this->renameBaseTable();
     \Drupal::state()->set('entity_test_update.throw_view_exception', 'test_view_entity_test');
     $this->applyEntityUpdates('entity_test_update');
@@ -513,7 +513,7 @@ public function testViewSaveException() {
   /**
    * Tests that broken views are handled gracefully.
    */
-  public function testBrokenView() {
+  public function testBrokenView(): void {
     $view_id = 'test_view_entity_test';
     $this->state->set('views_test_config.broken_view', $view_id);
     $this->updateEntityTypeToTranslatable(TRUE);
diff --git a/core/modules/views/tests/src/Kernel/FieldApiDataTest.php b/core/modules/views/tests/src/Kernel/FieldApiDataTest.php
index b76ff0e35c8a..c4c6baecd9d1 100644
--- a/core/modules/views/tests/src/Kernel/FieldApiDataTest.php
+++ b/core/modules/views/tests/src/Kernel/FieldApiDataTest.php
@@ -51,7 +51,7 @@ protected function setUp($import_test_views = TRUE): void {
    *
    * We check data structure for both node and node revision tables.
    */
-  public function testViewsData() {
+  public function testViewsData(): void {
     $field_storage_string = FieldStorageConfig::create([
       'field_name' => 'field_string',
       'entity_type' => 'node',
@@ -211,7 +211,7 @@ protected function getViewsData($field_storage_key = 'field_string') {
   /**
    * Tests filtering entries with different translatability.
    */
-  public function testEntityFieldFilter() {
+  public function testEntityFieldFilter(): void {
     NodeType::create([
       'type' => 'bundle1',
       'name' => 'Bundle One',
diff --git a/core/modules/views/tests/src/Kernel/Handler/AreaDisplayLinkTest.php b/core/modules/views/tests/src/Kernel/Handler/AreaDisplayLinkTest.php
index a44e2d5d6320..61f7601511cd 100644
--- a/core/modules/views/tests/src/Kernel/Handler/AreaDisplayLinkTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/AreaDisplayLinkTest.php
@@ -129,7 +129,7 @@ protected function setUp($import_test_views = TRUE): void {
   /**
    * Tests the views area display_link handler.
    */
-  public function testAreaDisplayLink() {
+  public function testAreaDisplayLink(): void {
     $view = Views::getView('test_view');
 
     // Assert only path-based displays are available in the display link
diff --git a/core/modules/views/tests/src/Kernel/Handler/AreaEmptyTest.php b/core/modules/views/tests/src/Kernel/Handler/AreaEmptyTest.php
index 7e22ce2f7f6e..2c4fcad07d1f 100644
--- a/core/modules/views/tests/src/Kernel/Handler/AreaEmptyTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/AreaEmptyTest.php
@@ -54,7 +54,7 @@ protected function viewsData() {
   /**
    * Tests that the header and footer areas are not rendered if empty.
    */
-  public function testRenderEmptyHeaderFooter() {
+  public function testRenderEmptyHeaderFooter(): void {
     $view = Views::getView('test_example_area');
     $view->initHandlers();
 
diff --git a/core/modules/views/tests/src/Kernel/Handler/AreaEntityTest.php b/core/modules/views/tests/src/Kernel/Handler/AreaEntityTest.php
index e68ca013f485..b2a1ae370cea 100644
--- a/core/modules/views/tests/src/Kernel/Handler/AreaEntityTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/AreaEntityTest.php
@@ -62,7 +62,7 @@ protected function setUpFixtures() {
   /**
    * Tests views data for entity area handlers.
    */
-  public function testEntityAreaData() {
+  public function testEntityAreaData(): void {
     $data = $this->container->get('views.views_data')->get('views');
     $entity_types = $this->container->get('entity_type.manager')->getDefinitions();
 
@@ -90,7 +90,7 @@ public function testEntityAreaData() {
   /**
    * Tests the area handler.
    */
-  public function testEntityArea() {
+  public function testEntityArea(): void {
     /** @var \Drupal\Core\Entity\EntityInterface[] $entities */
     $entities = [];
     for ($i = 0; $i < 3; $i++) {
diff --git a/core/modules/views/tests/src/Kernel/Handler/AreaMessagesTest.php b/core/modules/views/tests/src/Kernel/Handler/AreaMessagesTest.php
index 01efd4c71adb..52b891e3475c 100644
--- a/core/modules/views/tests/src/Kernel/Handler/AreaMessagesTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/AreaMessagesTest.php
@@ -25,7 +25,7 @@ class AreaMessagesTest extends ViewsKernelTestBase {
   /**
    * Tests the messages area handler.
    */
-  public function testMessageText() {
+  public function testMessageText(): void {
     \Drupal::messenger()->addStatus('My drupal set message.');
 
     $view = Views::getView('test_area_messages');
diff --git a/core/modules/views/tests/src/Kernel/Handler/AreaOrderTest.php b/core/modules/views/tests/src/Kernel/Handler/AreaOrderTest.php
index 18aed6c9a843..d8ddade82934 100644
--- a/core/modules/views/tests/src/Kernel/Handler/AreaOrderTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/AreaOrderTest.php
@@ -58,7 +58,7 @@ protected function setUpFixtures() {
   /**
    * Tests the order of the handlers.
    */
-  public function testAreaOrder() {
+  public function testAreaOrder(): void {
     $view = Views::getView('test_area_order');
     $renderable = $view->buildRenderable();
     $output = $this->render($renderable);
diff --git a/core/modules/views/tests/src/Kernel/Handler/AreaResultTest.php b/core/modules/views/tests/src/Kernel/Handler/AreaResultTest.php
index 3ca261dce9b3..738079da5eb6 100644
--- a/core/modules/views/tests/src/Kernel/Handler/AreaResultTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/AreaResultTest.php
@@ -23,7 +23,7 @@ class AreaResultTest extends ViewsKernelTestBase {
   /**
    * Tests the results area handler.
    */
-  public function testResult() {
+  public function testResult(): void {
     $view = Views::getView('test_area_result');
     $view->setDisplay('default');
     $this->executeView($view);
@@ -39,7 +39,7 @@ public function testResult() {
   /**
    * Tests the results area handler.
    */
-  public function testResultEmpty() {
+  public function testResultEmpty(): void {
     $view = Views::getView('test_area_result');
 
     // Test that the area is displayed if we have checked the empty checkbox.
diff --git a/core/modules/views/tests/src/Kernel/Handler/AreaTest.php b/core/modules/views/tests/src/Kernel/Handler/AreaTest.php
index 0ffeaf5afb5d..48e155af4ec9 100644
--- a/core/modules/views/tests/src/Kernel/Handler/AreaTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/AreaTest.php
@@ -56,7 +56,7 @@ protected function viewsData() {
   /**
    * Tests the rendering of an area.
    */
-  public function testRenderArea() {
+  public function testRenderArea(): void {
     $view = Views::getView('test_example_area');
     $view->initHandlers();
 
@@ -87,7 +87,7 @@ public function testRenderArea() {
   /**
    * Tests the access for an area.
    */
-  public function testAreaAccess() {
+  public function testAreaAccess(): void {
     // Test with access denied for the area handler.
     $view = Views::getView('test_example_area_access');
     $view->initDisplay();
diff --git a/core/modules/views/tests/src/Kernel/Handler/AreaTextTest.php b/core/modules/views/tests/src/Kernel/Handler/AreaTextTest.php
index f0e488025e75..371224e0b1db 100644
--- a/core/modules/views/tests/src/Kernel/Handler/AreaTextTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/AreaTextTest.php
@@ -34,7 +34,7 @@ protected function setUp($import_test_views = TRUE): void {
     $this->installEntitySchema('user');
   }
 
-  public function testAreaText() {
+  public function testAreaText(): void {
     /** @var \Drupal\Core\Render\RendererInterface $renderer */
     $renderer = $this->container->get('renderer');
     $view = Views::getView('test_view');
diff --git a/core/modules/views/tests/src/Kernel/Handler/AreaTitleTest.php b/core/modules/views/tests/src/Kernel/Handler/AreaTitleTest.php
index e50e38e31aa7..00cb85c796da 100644
--- a/core/modules/views/tests/src/Kernel/Handler/AreaTitleTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/AreaTitleTest.php
@@ -25,7 +25,7 @@ class AreaTitleTest extends ViewsKernelTestBase {
   /**
    * Tests the title area handler.
    */
-  public function testTitleText() {
+  public function testTitleText(): void {
     $view = Views::getView('test_area_title');
 
     $view->setDisplay('default');
diff --git a/core/modules/views/tests/src/Kernel/Handler/AreaViewTest.php b/core/modules/views/tests/src/Kernel/Handler/AreaViewTest.php
index acb0fce0ce31..162b88139bba 100644
--- a/core/modules/views/tests/src/Kernel/Handler/AreaViewTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/AreaViewTest.php
@@ -32,7 +32,7 @@ class AreaViewTest extends ViewsKernelTestBase {
   /**
    * Tests the view area handler.
    */
-  public function testViewArea() {
+  public function testViewArea(): void {
     /** @var \Drupal\Core\Render\RendererInterface $renderer */
     $renderer = $this->container->get('renderer');
     $view = Views::getView('test_area_view');
diff --git a/core/modules/views/tests/src/Kernel/Handler/ArgumentDateTest.php b/core/modules/views/tests/src/Kernel/Handler/ArgumentDateTest.php
index 1560dc73c6fa..53b14c8b47b6 100644
--- a/core/modules/views/tests/src/Kernel/Handler/ArgumentDateTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/ArgumentDateTest.php
@@ -58,7 +58,7 @@ public function viewsData() {
    *
    * @see \Drupal\node\Plugin\views\argument\CreatedFullDate
    */
-  public function testCreatedFullDateHandler() {
+  public function testCreatedFullDateHandler(): void {
     $view = Views::getView('test_argument_date');
     $view->setDisplay('default');
     $this->executeView($view, ['20000102']);
@@ -89,7 +89,7 @@ public function testCreatedFullDateHandler() {
    *
    * @see \Drupal\node\Plugin\views\argument\CreatedDay
    */
-  public function testDayHandler() {
+  public function testDayHandler(): void {
     $view = Views::getView('test_argument_date');
     $view->setDisplay('embed_1');
     $this->executeView($view, ['02']);
@@ -119,7 +119,7 @@ public function testDayHandler() {
    *
    * @see \Drupal\node\Plugin\views\argument\CreatedMonth
    */
-  public function testMonthHandler() {
+  public function testMonthHandler(): void {
     $view = Views::getView('test_argument_date');
     $view->setDisplay('embed_2');
     $this->executeView($view, ['01']);
@@ -143,7 +143,7 @@ public function testMonthHandler() {
    *
    * @see \Drupal\node\Plugin\views\argument\CreatedWeek
    */
-  public function testWeekHandler() {
+  public function testWeekHandler(): void {
     $this->container->get('database')->update('views_test_data')
       ->fields(['created' => gmmktime(0, 0, 0, 9, 26, 2008)])
       ->condition('id', 1)
@@ -221,7 +221,7 @@ public function testWeekHandler() {
    *
    * @see \Drupal\node\Plugin\views\argument\CreatedYear
    */
-  public function testYearHandler() {
+  public function testYearHandler(): void {
     $this->container->get('database')->update('views_test_data')
       ->fields(['created' => gmmktime(0, 0, 0, 1, 1, 2001)])
       ->condition('id', 3)
@@ -272,7 +272,7 @@ public function testYearHandler() {
    *
    * @see \Drupal\node\Plugin\views\argument\CreatedYearMonth
    */
-  public function testYearMonthHandler() {
+  public function testYearMonthHandler(): void {
     $this->container->get('database')->update('views_test_data')
       ->fields(['created' => gmmktime(0, 0, 0, 1, 1, 2001)])
       ->condition('id', 3)
diff --git a/core/modules/views/tests/src/Kernel/Handler/ArgumentNullTest.php b/core/modules/views/tests/src/Kernel/Handler/ArgumentNullTest.php
index 6c4f5ede512b..1a3e462fd068 100644
--- a/core/modules/views/tests/src/Kernel/Handler/ArgumentNullTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/ArgumentNullTest.php
@@ -28,7 +28,7 @@ public function viewsData() {
     return $data;
   }
 
-  public function testAreaText() {
+  public function testAreaText(): void {
     // Test validation
     $view = Views::getView('test_view');
     $view->setDisplay();
diff --git a/core/modules/views/tests/src/Kernel/Handler/ArgumentStringTest.php b/core/modules/views/tests/src/Kernel/Handler/ArgumentStringTest.php
index c044846327be..d652d0ee63ba 100644
--- a/core/modules/views/tests/src/Kernel/Handler/ArgumentStringTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/ArgumentStringTest.php
@@ -31,7 +31,7 @@ class ArgumentStringTest extends ViewsKernelTestBase {
   /**
    * Tests the glossary feature.
    */
-  public function testGlossary() {
+  public function testGlossary(): void {
     $this->installEntitySchema('user');
     $this->installEntitySchema('node');
     NodeType::create([
diff --git a/core/modules/views/tests/src/Kernel/Handler/ComputedBundleFieldTest.php b/core/modules/views/tests/src/Kernel/Handler/ComputedBundleFieldTest.php
index 5d6e4715634d..9a14bb37e185 100644
--- a/core/modules/views/tests/src/Kernel/Handler/ComputedBundleFieldTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/ComputedBundleFieldTest.php
@@ -76,7 +76,7 @@ protected function setUp($import_test_views = TRUE): void {
   /**
    * Tests the computed field handler.
    */
-  public function testComputedFieldHandler() {
+  public function testComputedFieldHandler(): void {
     \Drupal::state()->set('entity_test_computed_field_item_list_value', ['computed string']);
     \Drupal::state()->set('entity_test_comp_bund_fld_item_list_value', ['some other string that is also computed']);
 
diff --git a/core/modules/views/tests/src/Kernel/Handler/ComputedFieldTest.php b/core/modules/views/tests/src/Kernel/Handler/ComputedFieldTest.php
index 5fe915725f09..88da578f5e7a 100644
--- a/core/modules/views/tests/src/Kernel/Handler/ComputedFieldTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/ComputedFieldTest.php
@@ -42,7 +42,7 @@ protected function setUp($import_test_views = TRUE): void {
   /**
    * Tests the computed field handler.
    */
-  public function testComputedFieldHandler() {
+  public function testComputedFieldHandler(): void {
     \Drupal::state()->set('entity_test_computed_field_item_list_value', ['computed string']);
 
     $entity = EntityTestComputedField::create([]);
diff --git a/core/modules/views/tests/src/Kernel/Handler/EntityTestViewsFieldAccessTest.php b/core/modules/views/tests/src/Kernel/Handler/EntityTestViewsFieldAccessTest.php
index 51e6ece7c021..db630c9ac591 100644
--- a/core/modules/views/tests/src/Kernel/Handler/EntityTestViewsFieldAccessTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/EntityTestViewsFieldAccessTest.php
@@ -30,7 +30,7 @@ protected function setUp($import_test_views = TRUE): void {
     ConfigurableLanguage::create(['id' => 'es', 'title' => 'Spanish title', 'label' => 'Spanish label'])->save();
   }
 
-  public function testEntityTestFields() {
+  public function testEntityTestFields(): void {
     $entity_test = EntityTest::create([
       'name' => 'test entity name',
     ]);
diff --git a/core/modules/views/tests/src/Kernel/Handler/FieldBooleanTest.php b/core/modules/views/tests/src/Kernel/Handler/FieldBooleanTest.php
index 43b2a10e25a1..4f89977e5411 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FieldBooleanTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FieldBooleanTest.php
@@ -35,7 +35,7 @@ public function viewsData() {
     return $data;
   }
 
-  public function testFieldBoolean() {
+  public function testFieldBoolean(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
 
diff --git a/core/modules/views/tests/src/Kernel/Handler/FieldCounterTest.php b/core/modules/views/tests/src/Kernel/Handler/FieldCounterTest.php
index 0fc1defdcfb8..5831a0f996e2 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FieldCounterTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FieldCounterTest.php
@@ -28,7 +28,7 @@ class FieldCounterTest extends ViewsKernelTestBase {
    */
   public static $testViews = ['test_view'];
 
-  public function testSimple() {
+  public function testSimple(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
     $view->displayHandlers->get('default')->overrideOption('fields', [
@@ -89,7 +89,7 @@ public function testSimple() {
   /**
    * Tests the counter field when using a pager.
    */
-  public function testPager() {
+  public function testPager(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
     $view->displayHandlers->get('default')->overrideOption('fields', [
diff --git a/core/modules/views/tests/src/Kernel/Handler/FieldCustomTest.php b/core/modules/views/tests/src/Kernel/Handler/FieldCustomTest.php
index 72ffdd35d116..502aa87f59aa 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FieldCustomTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FieldCustomTest.php
@@ -34,7 +34,7 @@ public function viewsData() {
   /**
    * Ensure that custom fields work and doesn't escape unnecessary markup.
    */
-  public function testFieldCustom() {
+  public function testFieldCustom(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
 
@@ -60,7 +60,7 @@ public function testFieldCustom() {
   /**
    * Ensure that custom fields can use tokens.
    */
-  public function testFieldCustomTokens() {
+  public function testFieldCustomTokens(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
 
@@ -94,7 +94,7 @@ public function testFieldCustomTokens() {
   /**
    * Ensure that custom field content is XSS filtered.
    */
-  public function testCustomFieldXss() {
+  public function testCustomFieldXss(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
 
diff --git a/core/modules/views/tests/src/Kernel/Handler/FieldDateTest.php b/core/modules/views/tests/src/Kernel/Handler/FieldDateTest.php
index 9e6131963be1..069d3ddf5824 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FieldDateTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FieldDateTest.php
@@ -69,7 +69,7 @@ public function dataSet() {
   /**
    * Sets up functional test of the views date field.
    */
-  public function testFieldDate() {
+  public function testFieldDate(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
 
diff --git a/core/modules/views/tests/src/Kernel/Handler/FieldDropbuttonTest.php b/core/modules/views/tests/src/Kernel/Handler/FieldDropbuttonTest.php
index 6d8b6688afdb..74a4df42c088 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FieldDropbuttonTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FieldDropbuttonTest.php
@@ -126,7 +126,7 @@ protected function setUp($import_test_views = TRUE): void {
   /**
    * Tests that dropbutton markup doesn't leak between rows.
    */
-  public function testDropbuttonMarkupShouldNotLeakBetweenRows() {
+  public function testDropbuttonMarkupShouldNotLeakBetweenRows(): void {
     $view = Views::getView('test_dropbutton');
     $view->setDisplay();
     $view->preExecute([]);
diff --git a/core/modules/views/tests/src/Kernel/Handler/FieldEntityLinkTest.php b/core/modules/views/tests/src/Kernel/Handler/FieldEntityLinkTest.php
index 95382a540542..b05db299fd7c 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FieldEntityLinkTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FieldEntityLinkTest.php
@@ -69,7 +69,7 @@ protected function setUpFixtures() {
   /**
    * Tests entity link fields.
    */
-  public function testEntityLink() {
+  public function testEntityLink(): void {
     // Anonymous users cannot see edit/delete links.
     $expected_results = ['canonical' => TRUE, 'edit-form' => FALSE, 'delete-form' => FALSE, 'canonical_raw' => TRUE, 'canonical_raw_absolute' => TRUE];
     $this->doTestEntityLink(\Drupal::currentUser(), $expected_results);
diff --git a/core/modules/views/tests/src/Kernel/Handler/FieldFieldTest.php b/core/modules/views/tests/src/Kernel/Handler/FieldFieldTest.php
index a1da447023b8..e57953228cdc 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FieldFieldTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FieldFieldTest.php
@@ -236,7 +236,7 @@ protected function setUp($import_test_views = TRUE): void {
   /**
    * Tests the result of a view with base fields and configurable fields.
    */
-  public function testSimpleExecute() {
+  public function testSimpleExecute(): void {
     $executable = Views::getView('test_field_field_test');
     $executable->execute();
 
@@ -258,7 +258,7 @@ public function testSimpleExecute() {
   /**
    * Tests the output of a view with base fields and configurable fields.
    */
-  public function testSimpleRender() {
+  public function testSimpleRender(): void {
     $executable = Views::getView('test_field_field_test');
     $executable->execute();
 
@@ -281,7 +281,7 @@ public function testSimpleRender() {
    *
    * @see \Drupal\views_test_formatter\Plugin\Field\FieldFormatter\AttachmentTestFormatter::viewElements()
    */
-  public function testAttachedRender() {
+  public function testAttachedRender(): void {
     $executable = Views::getView('test_field_field_attachment_test');
     $executable->execute();
 
@@ -306,7 +306,7 @@ public function testAttachedRender() {
    * A complex field configuration contains multiple times the same field, with
    * different delta limit / offset.
    */
-  public function testFieldAlias() {
+  public function testFieldAlias(): void {
     $executable = Views::getView('test_field_alias_test');
     $executable->execute();
 
@@ -332,7 +332,7 @@ public function testFieldAlias() {
    * A complex field configuration contains multiple times the same field, with
    * different delta limit / offset.
    */
-  public function testFieldAliasRender() {
+  public function testFieldAliasRender(): void {
     $executable = Views::getView('test_field_alias_test');
     $executable->execute();
 
@@ -347,7 +347,7 @@ public function testFieldAliasRender() {
   /**
    * Tests the result of a view field with field_api_classes enabled.
    */
-  public function testFieldApiClassesRender() {
+  public function testFieldApiClassesRender(): void {
     /** @var \Drupal\Core\Render\RendererInterface $renderer */
     $renderer = $this->container->get('renderer');
     $executable = Views::getView('test_field_field_test');
@@ -371,7 +371,7 @@ public function testFieldApiClassesRender() {
    * A complex field configuration contains multiple times the same field, with
    * different delta limit / offset.
    */
-  public function testComplexExecute() {
+  public function testComplexExecute(): void {
     $executable = Views::getView('test_field_field_complex_test');
     $executable->execute();
 
@@ -400,7 +400,7 @@ public function testComplexExecute() {
   /**
    * Tests the output of a view with complex field configuration.
    */
-  public function testComplexRender() {
+  public function testComplexRender(): void {
     $executable = Views::getView('test_field_field_complex_test');
     $executable->execute();
     $date_formatter = \Drupal::service('date.formatter');
@@ -449,7 +449,7 @@ public function testComplexRender() {
   /**
    * Tests the revision result.
    */
-  public function testRevisionExecute() {
+  public function testRevisionExecute(): void {
     $executable = Views::getView('test_field_field_revision_test');
     $executable->execute();
 
@@ -470,7 +470,7 @@ public function testRevisionExecute() {
   /**
    * Tests the output of a revision view with base and configurable fields.
    */
-  public function testRevisionRender() {
+  public function testRevisionRender(): void {
     $executable = Views::getView('test_field_field_revision_test');
     $executable->execute();
 
@@ -498,7 +498,7 @@ public function testRevisionRender() {
   /**
    * Tests the token replacement for revision fields.
    */
-  public function testRevisionTokenRender() {
+  public function testRevisionTokenRender(): void {
     $view = Views::getView('test_field_field_revision_test');
     $this->executeView($view);
 
@@ -511,7 +511,7 @@ public function testRevisionTokenRender() {
   /**
    * Tests the result set of a complex revision view.
    */
-  public function testRevisionComplexExecute() {
+  public function testRevisionComplexExecute(): void {
     $executable = Views::getView('test_field_field_revision_complex_test');
     $executable->execute();
 
@@ -541,7 +541,7 @@ public function testRevisionComplexExecute() {
   /**
    * Tests the output of a revision view with base fields and configurable fields.
    */
-  public function testRevisionComplexRender() {
+  public function testRevisionComplexRender(): void {
     $executable = Views::getView('test_field_field_revision_complex_test');
     $executable->execute();
 
@@ -577,7 +577,7 @@ public function testRevisionComplexRender() {
   /**
    * Tests that a field not available for every bundle is rendered as empty.
    */
-  public function testMissingBundleFieldRender() {
+  public function testMissingBundleFieldRender(): void {
     // Create a new bundle not having the test field attached.
     $bundle = $this->randomMachineName();
     entity_test_create_bundle($bundle);
@@ -598,7 +598,7 @@ public function testMissingBundleFieldRender() {
   /**
    * Tests \Drupal\views\Plugin\views\field\EntityField::getValue.
    */
-  public function testGetValueMethod() {
+  public function testGetValueMethod(): void {
     $bundle = 'test_bundle';
     entity_test_create_bundle($bundle);
 
diff --git a/core/modules/views/tests/src/Kernel/Handler/FieldFileSizeTest.php b/core/modules/views/tests/src/Kernel/Handler/FieldFileSizeTest.php
index 5b67f332def5..f29de027ba4d 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FieldFileSizeTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FieldFileSizeTest.php
@@ -39,7 +39,7 @@ public function viewsData() {
     return $data;
   }
 
-  public function testFieldFileSize() {
+  public function testFieldFileSize(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
 
diff --git a/core/modules/views/tests/src/Kernel/Handler/FieldGroupRowsTest.php b/core/modules/views/tests/src/Kernel/Handler/FieldGroupRowsTest.php
index 9c9f4727631e..373e0045fa08 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FieldGroupRowsTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FieldGroupRowsTest.php
@@ -41,7 +41,7 @@ class FieldGroupRowsTest extends ViewsKernelTestBase {
   /**
    * Testing the "Grouped rows" functionality.
    */
-  public function testGroupRows() {
+  public function testGroupRows(): void {
     $this->installConfig(['filter']);
     $this->installEntitySchema('node');
     $this->installEntitySchema('user');
diff --git a/core/modules/views/tests/src/Kernel/Handler/FieldKernelTest.php b/core/modules/views/tests/src/Kernel/Handler/FieldKernelTest.php
index f9f1440fa6a5..90cba8692698 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FieldKernelTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FieldKernelTest.php
@@ -50,7 +50,7 @@ protected function viewsData() {
   /**
    * Tests that the render function is called.
    */
-  public function testRender() {
+  public function testRender(): void {
     /** @var \Drupal\Core\Render\RendererInterface $renderer */
     $renderer = \Drupal::service('renderer');
 
@@ -68,7 +68,7 @@ public function testRender() {
   /**
    * Tests all things related to the query.
    */
-  public function testQuery() {
+  public function testQuery(): void {
     // Tests adding additional fields to the query.
     $view = Views::getView('test_view');
     $view->initHandlers();
@@ -133,7 +133,7 @@ protected function assertNotSubString(string $haystack, string $needle, string $
   /**
    * Tests general rewriting of the output.
    */
-  public function testRewrite() {
+  public function testRewrite(): void {
     /** @var \Drupal\Core\Render\RendererInterface $renderer */
     $renderer = \Drupal::service('renderer');
 
@@ -160,7 +160,7 @@ public function testRewrite() {
   /**
    * Tests rewriting of the output with HTML.
    */
-  public function testRewriteHtmlWithTokens() {
+  public function testRewriteHtmlWithTokens(): void {
     /** @var \Drupal\Core\Render\RendererInterface $renderer */
     $renderer = \Drupal::service('renderer');
 
@@ -189,7 +189,7 @@ public function testRewriteHtmlWithTokens() {
   /**
    * Tests rewriting of the output with HTML and aggregation.
    */
-  public function testRewriteHtmlWithTokensAndAggregation() {
+  public function testRewriteHtmlWithTokensAndAggregation(): void {
     /** @var \Drupal\Core\Render\RendererInterface $renderer */
     $renderer = \Drupal::service('renderer');
 
@@ -221,7 +221,7 @@ public function testRewriteHtmlWithTokensAndAggregation() {
   /**
    * Tests the arguments tokens on field level.
    */
-  public function testArgumentTokens() {
+  public function testArgumentTokens(): void {
     /** @var \Drupal\Core\Render\RendererInterface $renderer */
     $renderer = \Drupal::service('renderer');
 
@@ -259,7 +259,7 @@ public function testArgumentTokens() {
   /**
    * Tests the field tokens, row level and field level.
    */
-  public function testFieldTokens() {
+  public function testFieldTokens(): void {
     /** @var \Drupal\Core\Render\RendererInterface $renderer */
     $renderer = \Drupal::service('renderer');
 
@@ -358,7 +358,7 @@ public function testFieldTokens() {
   /**
    * Tests the exclude setting.
    */
-  public function testExclude() {
+  public function testExclude(): void {
     /** @var \Drupal\Core\Render\RendererInterface $renderer */
     $renderer = $this->container->get('renderer');
     $view = Views::getView('test_field_output');
@@ -385,7 +385,7 @@ public function testExclude() {
   /**
    * Tests everything related to empty output of a field.
    */
-  public function testEmpty() {
+  public function testEmpty(): void {
     $this->_testHideIfEmpty();
     $this->_testEmptyText();
   }
@@ -727,7 +727,7 @@ public function _testEmptyText() {
   /**
    * Tests views_handler_field::isValueEmpty().
    */
-  public function testIsValueEmpty() {
+  public function testIsValueEmpty(): void {
     $view = Views::getView('test_view');
     $view->initHandlers();
     $field = $view->field['name'];
@@ -749,7 +749,7 @@ public function testIsValueEmpty() {
   /**
    * Tests whether the filters are click sortable as expected.
    */
-  public function testClickSortable() {
+  public function testClickSortable(): void {
     // Test that clickSortable is TRUE by default.
     $item = [
       'table' => 'views_test_data',
@@ -772,7 +772,7 @@ public function testClickSortable() {
   /**
    * Tests the trimText method.
    */
-  public function testTrimText() {
+  public function testTrimText(): void {
     // Test unicode. See https://www.drupal.org/node/513396#comment-2839416.
     // cSpell:disable
     $text = [
diff --git a/core/modules/views/tests/src/Kernel/Handler/FieldNumericTest.php b/core/modules/views/tests/src/Kernel/Handler/FieldNumericTest.php
index c40b03b48e9b..0983f7ff71e7 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FieldNumericTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FieldNumericTest.php
@@ -27,7 +27,7 @@ class FieldNumericTest extends ViewsKernelTestBase {
    *
    * @dataProvider providerTestFieldNumeric
    */
-  public function testFieldNumeric($field_settings, $values, $expected_values) {
+  public function testFieldNumeric($field_settings, $values, $expected_values): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
 
diff --git a/core/modules/views/tests/src/Kernel/Handler/FieldRenderedEntityTest.php b/core/modules/views/tests/src/Kernel/Handler/FieldRenderedEntityTest.php
index aa90965b49af..c8cf36701d8b 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FieldRenderedEntityTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FieldRenderedEntityTest.php
@@ -113,7 +113,7 @@ protected function setUpFixtures() {
   /**
    * Tests the default rendered entity output.
    */
-  public function testRenderedEntityWithoutAndWithField() {
+  public function testRenderedEntityWithoutAndWithField(): void {
     // First test without test_field displayed.
     \Drupal::currentUser()->setAccount($this->user);
 
diff --git a/core/modules/views/tests/src/Kernel/Handler/FieldSelfTokensTest.php b/core/modules/views/tests/src/Kernel/Handler/FieldSelfTokensTest.php
index 13704cb31459..9c99bb0498a6 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FieldSelfTokensTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FieldSelfTokensTest.php
@@ -49,7 +49,7 @@ protected function setUp($import_test_views = TRUE): void {
   /**
    * {@inheritdoc}
    */
-  public function testSelfTokenEscaping() {
+  public function testSelfTokenEscaping(): void {
     $view = Views::getView('test_field_self_tokens');
     $view->initHandlers();
     $this->executeView($view);
diff --git a/core/modules/views/tests/src/Kernel/Handler/FieldUrlTest.php b/core/modules/views/tests/src/Kernel/Handler/FieldUrlTest.php
index 3d19768dcd3f..ee5255d2fe67 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FieldUrlTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FieldUrlTest.php
@@ -31,7 +31,7 @@ public function viewsData() {
     return $data;
   }
 
-  public function testFieldUrl() {
+  public function testFieldUrl(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
 
diff --git a/core/modules/views/tests/src/Kernel/Handler/FilterBooleanOperatorDefaultTest.php b/core/modules/views/tests/src/Kernel/Handler/FilterBooleanOperatorDefaultTest.php
index 21371f2064c1..e756d94b8756 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FilterBooleanOperatorDefaultTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FilterBooleanOperatorDefaultTest.php
@@ -39,7 +39,7 @@ protected function viewsData() {
   /**
    * Tests the queryOpBoolean() with default operator.
    */
-  public function testFilterBooleanOperatorDefault() {
+  public function testFilterBooleanOperatorDefault(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
 
diff --git a/core/modules/views/tests/src/Kernel/Handler/FilterBooleanOperatorStringTest.php b/core/modules/views/tests/src/Kernel/Handler/FilterBooleanOperatorStringTest.php
index 3ad342c6f6e7..a7096a9a4bb7 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FilterBooleanOperatorStringTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FilterBooleanOperatorStringTest.php
@@ -87,7 +87,7 @@ protected function dataSet() {
   /**
    * Tests the BooleanOperatorString filter.
    */
-  public function testFilterBooleanOperatorString() {
+  public function testFilterBooleanOperatorString(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
 
@@ -137,7 +137,7 @@ public function testFilterBooleanOperatorString() {
   /**
    * Tests the Boolean filter with grouped exposed form enabled.
    */
-  public function testFilterGroupedExposed() {
+  public function testFilterGroupedExposed(): void {
     $filters = $this->getGroupedExposedFilters();
     $view = Views::getView('test_view');
 
diff --git a/core/modules/views/tests/src/Kernel/Handler/FilterBooleanOperatorTest.php b/core/modules/views/tests/src/Kernel/Handler/FilterBooleanOperatorTest.php
index 803304f567a0..208b0270c16e 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FilterBooleanOperatorTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FilterBooleanOperatorTest.php
@@ -41,7 +41,7 @@ class FilterBooleanOperatorTest extends ViewsKernelTestBase {
   /**
    * Tests the BooleanOperator filter.
    */
-  public function testFilterBooleanOperator() {
+  public function testFilterBooleanOperator(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
 
@@ -115,7 +115,7 @@ public function testFilterBooleanOperator() {
   /**
    * Tests the boolean filter with grouped exposed form enabled.
    */
-  public function testFilterGroupedExposed() {
+  public function testFilterGroupedExposed(): void {
     $filters = $this->getGroupedExposedFilters();
     $view = Views::getView('test_view');
 
diff --git a/core/modules/views/tests/src/Kernel/Handler/FilterCombineTest.php b/core/modules/views/tests/src/Kernel/Handler/FilterCombineTest.php
index ba920f9743c8..437548477226 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FilterCombineTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FilterCombineTest.php
@@ -48,7 +48,7 @@ protected function setUp($import_test_views = TRUE): void {
     $this->installEntitySchema('entity_test');
   }
 
-  public function testFilterCombineContains() {
+  public function testFilterCombineContains(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
 
@@ -103,7 +103,7 @@ public function testFilterCombineContains() {
   /**
    * Tests the Combine field filter with the 'regular_expression' operator.
    */
-  public function testFilterCombineRegEx() {
+  public function testFilterCombineRegEx(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
 
@@ -162,7 +162,7 @@ public function testFilterCombineRegEx() {
   /**
    * Tests the Combine field filter with the 'word' operator.
    */
-  public function testFilterCombineWord() {
+  public function testFilterCombineWord(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
 
@@ -213,7 +213,7 @@ public function testFilterCombineWord() {
   /**
    * Tests the Combine field filter with the 'allwords' operator.
    */
-  public function testFilterCombineAllWords() {
+  public function testFilterCombineAllWords(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
 
@@ -265,7 +265,7 @@ public function testFilterCombineAllWords() {
    * and fields set in the combine filter are removed from the display
    * but not from the combined filter settings.
    */
-  public function testFilterCombineContainsFieldsOverwritten() {
+  public function testFilterCombineContainsFieldsOverwritten(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
 
@@ -309,7 +309,7 @@ public function testFilterCombineContainsFieldsOverwritten() {
   /**
    * Tests that the "combine" filter is only valid on displays that use fields.
    */
-  public function testNonFieldsRow() {
+  public function testNonFieldsRow(): void {
     $view = Views::getView('entity_test_fields');
     $view->setDisplay();
 
@@ -349,7 +349,7 @@ public function testNonFieldsRow() {
    *
    * @covers ::opEqual
    */
-  public function testFilterCombineEqual() {
+  public function testFilterCombineEqual(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
 
@@ -449,7 +449,7 @@ public function testFilterCombineNotEqual(): void {
   /**
    * Tests the Combine field filter using the 'starts' operator.
    */
-  public function testFilterCombineStarts() {
+  public function testFilterCombineStarts(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
 
@@ -495,7 +495,7 @@ public function testFilterCombineStarts() {
   /**
    * Tests the Combine field filter using the 'not_starts' operator.
    */
-  public function testFilterCombineNotStarts() {
+  public function testFilterCombineNotStarts(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
 
@@ -545,7 +545,7 @@ public function testFilterCombineNotStarts() {
   /**
    * Tests the Combine field filter using the 'ends' operator.
    */
-  public function testFilterCombineEnds() {
+  public function testFilterCombineEnds(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
 
@@ -591,7 +591,7 @@ public function testFilterCombineEnds() {
   /**
    * Tests the Combine field filter using the 'not_ends' operator.
    */
-  public function testFilterCombineNotEnds() {
+  public function testFilterCombineNotEnds(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
 
@@ -641,7 +641,7 @@ public function testFilterCombineNotEnds() {
   /**
    * Tests the Combine field filter using the 'not' operator.
    */
-  public function testFilterCombineNot() {
+  public function testFilterCombineNot(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
 
@@ -691,7 +691,7 @@ public function testFilterCombineNot() {
   /**
    * Tests the combine filter when no realName is used.
    */
-  public function testFilterCombineNoRealName() {
+  public function testFilterCombineNoRealName(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
 
diff --git a/core/modules/views/tests/src/Kernel/Handler/FilterEqualityTest.php b/core/modules/views/tests/src/Kernel/Handler/FilterEqualityTest.php
index 6cca16118ec8..0f054f6f2ad1 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FilterEqualityTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FilterEqualityTest.php
@@ -38,7 +38,7 @@ public function viewsData() {
     return $data;
   }
 
-  public function testEqual() {
+  public function testEqual(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
 
@@ -63,7 +63,7 @@ public function testEqual() {
     $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
   }
 
-  public function testEqualGroupedExposed() {
+  public function testEqualGroupedExposed(): void {
     $filters = $this->getGroupedExposedFilters();
     $view = Views::getView('test_view');
     $view->newDisplay('page', 'Page', 'page_1');
@@ -83,7 +83,7 @@ public function testEqualGroupedExposed() {
     $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
   }
 
-  public function testNotEqual() {
+  public function testNotEqual(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
 
@@ -117,7 +117,7 @@ public function testNotEqual() {
     $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
   }
 
-  public function testEqualGroupedNotExposed() {
+  public function testEqualGroupedNotExposed(): void {
     $filters = $this->getGroupedExposedFilters();
     $view = Views::getView('test_view');
     $view->newDisplay('page', 'Page', 'page_1');
diff --git a/core/modules/views/tests/src/Kernel/Handler/FilterInOperatorTest.php b/core/modules/views/tests/src/Kernel/Handler/FilterInOperatorTest.php
index 040086833177..8b71ceb34ae0 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FilterInOperatorTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FilterInOperatorTest.php
@@ -44,7 +44,7 @@ public function viewsData() {
     return $data;
   }
 
-  public function testFilterInOperatorSimple() {
+  public function testFilterInOperatorSimple(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
 
@@ -110,7 +110,7 @@ public function testFilterInOperatorSimple() {
     $this->assertIdenticalResultset($view, $expected_result, $this->columnMap);
   }
 
-  public function testFilterInOperatorGroupedExposedSimple() {
+  public function testFilterInOperatorGroupedExposedSimple(): void {
     $filters = $this->getGroupedExposedFilters();
     $view = Views::getView('test_view');
 
@@ -136,7 +136,7 @@ public function testFilterInOperatorGroupedExposedSimple() {
     $this->assertIdenticalResultset($view, $expected_result, $this->columnMap);
   }
 
-  public function testFilterNotInOperatorGroupedExposedSimple() {
+  public function testFilterNotInOperatorGroupedExposedSimple(): void {
     $filters = $this->getGroupedExposedFilters();
     $view = Views::getView('test_view');
 
@@ -169,7 +169,7 @@ public function testFilterNotInOperatorGroupedExposedSimple() {
   /**
    * Tests that we can safely change the identifier on a grouped filter.
    */
-  public function testFilterGroupedChangedIdentifier() {
+  public function testFilterGroupedChangedIdentifier(): void {
     $filters = $this->getGroupedExposedFilters();
     $view = Views::getView('test_view');
 
@@ -238,7 +238,7 @@ protected function getGroupedExposedFilters() {
   /**
    * Tests that the InOperator filter can handle TranslatableMarkup.
    */
-  public function testFilterOptionAsMarkup() {
+  public function testFilterOptionAsMarkup(): void {
     $view = $this->prophesize(ViewExecutable::class);
     $display = $this->prophesize(DisplayPluginBase::class);
     $display->getOption('relationships')->willReturn(FALSE);
diff --git a/core/modules/views/tests/src/Kernel/Handler/FilterNumericTest.php b/core/modules/views/tests/src/Kernel/Handler/FilterNumericTest.php
index a58234fdf34e..fe54c210401d 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FilterNumericTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FilterNumericTest.php
@@ -42,7 +42,7 @@ public function viewsData() {
     return $data;
   }
 
-  public function testFilterNumericSimple() {
+  public function testFilterNumericSimple(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
 
@@ -68,7 +68,7 @@ public function testFilterNumericSimple() {
     $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
   }
 
-  public function testFilterNumericExposedGroupedSimple() {
+  public function testFilterNumericExposedGroupedSimple(): void {
     $filters = $this->getGroupedExposedFilters();
     $view = Views::getView('test_view');
     $view->newDisplay('page', 'Page', 'page_1');
@@ -103,7 +103,7 @@ public function testFilterNumericExposedGroupedSimple() {
    *
    * @dataProvider providerTestFilterNumericBetween
    */
-  public function testFilterNumericBetween($operator, $min, $max, array $expected_result) {
+  public function testFilterNumericBetween($operator, $min, $max, array $expected_result): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
 
@@ -192,7 +192,7 @@ public static function providerTestFilterNumericBetween() {
     ];
   }
 
-  public function testFilterNumericExposedGroupedBetween() {
+  public function testFilterNumericExposedGroupedBetween(): void {
     $filters = $this->getGroupedExposedFilters();
     $view = Views::getView('test_view');
     $view->newDisplay('page', 'Page', 'page_1');
@@ -221,7 +221,7 @@ public function testFilterNumericExposedGroupedBetween() {
     $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
   }
 
-  public function testFilterNumericExposedGroupedNotBetween() {
+  public function testFilterNumericExposedGroupedNotBetween(): void {
     $filters = $this->getGroupedExposedFilters();
     $view = Views::getView('test_view');
     $view->newDisplay('page', 'Page', 'page_1');
@@ -249,7 +249,7 @@ public function testFilterNumericExposedGroupedNotBetween() {
   /**
    * Tests the numeric filter handler with the 'regular_expression' operator.
    */
-  public function testFilterNumericRegularExpression() {
+  public function testFilterNumericRegularExpression(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
 
@@ -280,7 +280,7 @@ public function testFilterNumericRegularExpression() {
   /**
    * Tests the numeric filter with negated 'regular_expression' operator.
    */
-  public function testFilterNumericNotRegularExpression() {
+  public function testFilterNumericNotRegularExpression(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
 
@@ -325,7 +325,7 @@ public function testFilterNumericNotRegularExpression() {
    *
    * The tests are performed with the 'regular_expression' operator.
    */
-  public function testFilterNumericExposedGroupedRegularExpression() {
+  public function testFilterNumericExposedGroupedRegularExpression(): void {
     $filters = $this->getGroupedExposedFilters();
     $view = Views::getView('test_view');
     $view->newDisplay('page', 'Page', 'page_1');
@@ -356,7 +356,7 @@ public function testFilterNumericExposedGroupedRegularExpression() {
    * Tests the numeric filter handler with the 'not_regular_expression' operator
    * to grouped exposed filters.
    */
-  public function testFilterNumericExposedGroupedNotRegularExpression() {
+  public function testFilterNumericExposedGroupedNotRegularExpression(): void {
     $filters = $this->getGroupedExposedFilters();
     $view = Views::getView('test_view');
     $view->newDisplay('page', 'Page', 'page_1');
@@ -385,7 +385,7 @@ public function testFilterNumericExposedGroupedNotRegularExpression() {
     $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
   }
 
-  public function testFilterNumericEmpty() {
+  public function testFilterNumericEmpty(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
 
@@ -444,7 +444,7 @@ public function testFilterNumericEmpty() {
     $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
   }
 
-  public function testFilterNumericExposedGroupedEmpty() {
+  public function testFilterNumericExposedGroupedEmpty(): void {
     $filters = $this->getGroupedExposedFilters();
     $view = Views::getView('test_view');
     $view->newDisplay('page', 'Page', 'page_1');
@@ -460,7 +460,7 @@ public function testFilterNumericExposedGroupedEmpty() {
     $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
   }
 
-  public function testFilterNumericExposedGroupedNotEmpty() {
+  public function testFilterNumericExposedGroupedNotEmpty(): void {
     $filters = $this->getGroupedExposedFilters();
     $view = Views::getView('test_view');
     $view->newDisplay('page', 'Page', 'page_1');
@@ -497,7 +497,7 @@ public function testFilterNumericExposedGroupedNotEmpty() {
     $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
   }
 
-  public function testAllowEmpty() {
+  public function testAllowEmpty(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
 
diff --git a/core/modules/views/tests/src/Kernel/Handler/FilterStringTest.php b/core/modules/views/tests/src/Kernel/Handler/FilterStringTest.php
index 1e90b6c30cd7..3472046018c0 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FilterStringTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FilterStringTest.php
@@ -87,7 +87,7 @@ protected function getBasicPageView() {
     return $view;
   }
 
-  public function testFilterStringEqual() {
+  public function testFilterStringEqual(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
 
@@ -112,7 +112,7 @@ public function testFilterStringEqual() {
     $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
   }
 
-  public function testFilterStringGroupedExposedEqual() {
+  public function testFilterStringGroupedExposedEqual(): void {
     $filters = $this->getGroupedExposedFilters();
     $view = $this->getBasicPageView();
 
@@ -133,7 +133,7 @@ public function testFilterStringGroupedExposedEqual() {
     $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
   }
 
-  public function testFilterStringNotEqual() {
+  public function testFilterStringNotEqual(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
 
@@ -167,7 +167,7 @@ public function testFilterStringNotEqual() {
     $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
   }
 
-  public function testFilterStringGroupedExposedNotEqual() {
+  public function testFilterStringGroupedExposedNotEqual(): void {
     $filters = $this->getGroupedExposedFilters();
     $view = $this->getBasicPageView();
 
@@ -198,7 +198,7 @@ public function testFilterStringGroupedExposedNotEqual() {
     $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
   }
 
-  public function testFilterStringContains() {
+  public function testFilterStringContains(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
 
@@ -223,7 +223,7 @@ public function testFilterStringContains() {
     $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
   }
 
-  public function testFilterStringGroupedExposedContains() {
+  public function testFilterStringGroupedExposedContains(): void {
     $filters = $this->getGroupedExposedFilters();
     $view = $this->getBasicPageView();
 
@@ -244,7 +244,7 @@ public function testFilterStringGroupedExposedContains() {
     $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
   }
 
-  public function testFilterStringWord() {
+  public function testFilterStringWord(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
 
@@ -332,7 +332,7 @@ public function testFilterStringWord() {
     $this->assertIdenticalResultset($view, $resultset);
   }
 
-  public function testFilterStringGroupedExposedWord() {
+  public function testFilterStringGroupedExposedWord(): void {
     $filters = $this->getGroupedExposedFilters();
     $view = $this->getBasicPageView();
 
@@ -373,7 +373,7 @@ public function testFilterStringGroupedExposedWord() {
     $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
   }
 
-  public function testFilterStringStarts() {
+  public function testFilterStringStarts(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
 
@@ -398,7 +398,7 @@ public function testFilterStringStarts() {
     $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
   }
 
-  public function testFilterStringGroupedExposedStarts() {
+  public function testFilterStringGroupedExposedStarts(): void {
     $filters = $this->getGroupedExposedFilters();
     $view = $this->getBasicPageView();
 
@@ -421,7 +421,7 @@ public function testFilterStringGroupedExposedStarts() {
   /**
    * Tests the string filter with negated 'regular_expression' operator.
    */
-  public function testFilterStringGroupedNotRegularExpression() {
+  public function testFilterStringGroupedNotRegularExpression(): void {
     $filters = $this->getGroupedExposedFilters();
     $view = $this->getBasicPageView();
 
@@ -451,7 +451,7 @@ public function testFilterStringGroupedNotRegularExpression() {
     $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
   }
 
-  public function testFilterStringNotStarts() {
+  public function testFilterStringNotStarts(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
 
@@ -483,7 +483,7 @@ public function testFilterStringNotStarts() {
     $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
   }
 
-  public function testFilterStringGroupedExposedNotStarts() {
+  public function testFilterStringGroupedExposedNotStarts(): void {
     $filters = $this->getGroupedExposedFilters();
     $view = $this->getBasicPageView();
 
@@ -510,7 +510,7 @@ public function testFilterStringGroupedExposedNotStarts() {
     $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
   }
 
-  public function testFilterStringEnds() {
+  public function testFilterStringEnds(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
 
@@ -538,7 +538,7 @@ public function testFilterStringEnds() {
     $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
   }
 
-  public function testFilterStringGroupedExposedEnds() {
+  public function testFilterStringGroupedExposedEnds(): void {
     $filters = $this->getGroupedExposedFilters();
     $view = $this->getBasicPageView();
 
@@ -561,7 +561,7 @@ public function testFilterStringGroupedExposedEnds() {
     $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
   }
 
-  public function testFilterStringNotEnds() {
+  public function testFilterStringNotEnds(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
 
@@ -590,7 +590,7 @@ public function testFilterStringNotEnds() {
     $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
   }
 
-  public function testFilterStringGroupedExposedNotEnds() {
+  public function testFilterStringGroupedExposedNotEnds(): void {
     $filters = $this->getGroupedExposedFilters();
     $view = $this->getBasicPageView();
 
@@ -614,7 +614,7 @@ public function testFilterStringGroupedExposedNotEnds() {
     $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
   }
 
-  public function testFilterStringNot() {
+  public function testFilterStringNot(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
 
@@ -643,7 +643,7 @@ public function testFilterStringNot() {
     $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
   }
 
-  public function testFilterStringGroupedExposedNot() {
+  public function testFilterStringGroupedExposedNot(): void {
     $filters = $this->getGroupedExposedFilters();
     $view = $this->getBasicPageView();
 
@@ -668,7 +668,7 @@ public function testFilterStringGroupedExposedNot() {
 
   }
 
-  public function testFilterStringShorter() {
+  public function testFilterStringShorter(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
 
@@ -696,7 +696,7 @@ public function testFilterStringShorter() {
     $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
   }
 
-  public function testFilterStringGroupedExposedShorter() {
+  public function testFilterStringGroupedExposedShorter(): void {
     $filters = $this->getGroupedExposedFilters();
     $view = $this->getBasicPageView();
 
@@ -718,7 +718,7 @@ public function testFilterStringGroupedExposedShorter() {
     $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
   }
 
-  public function testFilterStringLonger() {
+  public function testFilterStringLonger(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
 
@@ -743,7 +743,7 @@ public function testFilterStringLonger() {
     $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
   }
 
-  public function testFilterStringGroupedExposedLonger() {
+  public function testFilterStringGroupedExposedLonger(): void {
     $filters = $this->getGroupedExposedFilters();
     $view = $this->getBasicPageView();
 
@@ -762,7 +762,7 @@ public function testFilterStringGroupedExposedLonger() {
     $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
   }
 
-  public function testFilterStringEmpty() {
+  public function testFilterStringEmpty(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
 
@@ -786,7 +786,7 @@ public function testFilterStringEmpty() {
     $this->assertIdenticalResultset($view, $resultset, $this->columnMap);
   }
 
-  public function testFilterStringGroupedExposedEmpty() {
+  public function testFilterStringGroupedExposedEmpty(): void {
     $filters = $this->getGroupedExposedFilters();
     $view = $this->getBasicPageView();
 
@@ -808,7 +808,7 @@ public function testFilterStringGroupedExposedEmpty() {
   /**
    * Tests the string filter handler with the negated 'regular_expression' operator.
    */
-  public function testFilterStringNotRegularExpression() {
+  public function testFilterStringNotRegularExpression(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
 
diff --git a/core/modules/views/tests/src/Kernel/Handler/HandlerAliasTest.php b/core/modules/views/tests/src/Kernel/Handler/HandlerAliasTest.php
index 87f3d25972de..bf594bba9c4d 100644
--- a/core/modules/views/tests/src/Kernel/Handler/HandlerAliasTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/HandlerAliasTest.php
@@ -45,7 +45,7 @@ protected function viewsData() {
     return $data;
   }
 
-  public function testPluginAliases() {
+  public function testPluginAliases(): void {
     $view = Views::getView('test_filter');
     $view->initDisplay();
 
diff --git a/core/modules/views/tests/src/Kernel/Handler/SortDateTest.php b/core/modules/views/tests/src/Kernel/Handler/SortDateTest.php
index 4d16522d62f8..dfd60cd724ef 100644
--- a/core/modules/views/tests/src/Kernel/Handler/SortDateTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/SortDateTest.php
@@ -157,7 +157,7 @@ protected function expectedResultSet($granularity, $reverse = TRUE) {
   /**
    * Tests numeric ordering of the result set.
    */
-  public function testDateOrdering() {
+  public function testDateOrdering(): void {
     foreach (['second', 'minute', 'hour', 'day', 'month', 'year'] as $granularity) {
       foreach ([FALSE, TRUE] as $reverse) {
         $view = Views::getView('test_view');
diff --git a/core/modules/views/tests/src/Kernel/Handler/SortRandomTest.php b/core/modules/views/tests/src/Kernel/Handler/SortRandomTest.php
index d30522781f58..11456d921bfa 100644
--- a/core/modules/views/tests/src/Kernel/Handler/SortRandomTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/SortRandomTest.php
@@ -71,7 +71,7 @@ protected function getBasicRandomView() {
    *
    * @see DatabaseSelectTestCase::testRandomOrder()
    */
-  public function testRandomOrdering() {
+  public function testRandomOrdering(): void {
     // Execute a basic view first.
     $view = Views::getView('test_view');
     $this->executeView($view);
@@ -108,7 +108,7 @@ public function testRandomOrdering() {
    * The random sorting should opt out of caching by defining a max age of 0.
    * At the same time, the row render caching still works.
    */
-  public function testRandomOrderingWithRenderCaching() {
+  public function testRandomOrderingWithRenderCaching(): void {
     $view_random = $this->getBasicRandomView();
 
     $display = &$view_random->storage->getDisplay('default');
diff --git a/core/modules/views/tests/src/Kernel/Handler/SortTest.php b/core/modules/views/tests/src/Kernel/Handler/SortTest.php
index baa2489834d0..a27e46ebac50 100644
--- a/core/modules/views/tests/src/Kernel/Handler/SortTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/SortTest.php
@@ -24,7 +24,7 @@ class SortTest extends ViewsKernelTestBase {
   /**
    * Tests numeric ordering of the result set.
    */
-  public function testNumericOrdering() {
+  public function testNumericOrdering(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
 
@@ -77,7 +77,7 @@ public function testNumericOrdering() {
   /**
    * Tests string ordering of the result set.
    */
-  public function testStringOrdering() {
+  public function testStringOrdering(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
 
diff --git a/core/modules/views/tests/src/Kernel/Handler/SortTranslationTest.php b/core/modules/views/tests/src/Kernel/Handler/SortTranslationTest.php
index ee6f2cd0ed85..a7559a0a66b3 100644
--- a/core/modules/views/tests/src/Kernel/Handler/SortTranslationTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/SortTranslationTest.php
@@ -99,7 +99,7 @@ protected function setUp($import_test_views = TRUE): void {
   /**
    * Tests sorting on an untranslated field.
    */
-  public function testSortbyUntranslatedIntegerField() {
+  public function testSortbyUntranslatedIntegerField(): void {
     $map = [
       'nid' => 'nid',
       'node_field_data_langcode' => 'langcode',
diff --git a/core/modules/views/tests/src/Kernel/ModuleTest.php b/core/modules/views/tests/src/Kernel/ModuleTest.php
index 9fad6c3c5159..67aa927f2bfc 100644
--- a/core/modules/views/tests/src/Kernel/ModuleTest.php
+++ b/core/modules/views/tests/src/Kernel/ModuleTest.php
@@ -48,7 +48,7 @@ class ModuleTest extends ViewsKernelTestBase {
    *
    * @see \Drupal\views\Plugin\ViewsHandlerManager::getHandler()
    */
-  public function testViewsGetHandler() {
+  public function testViewsGetHandler(): void {
     $types = [
       'field' => BrokenField::class,
       'area' => BrokenArea::class,
@@ -116,7 +116,7 @@ public function testViewsGetHandler() {
   /**
    * Tests the load wrapper/helper functions.
    */
-  public function testLoadFunctions() {
+  public function testLoadFunctions(): void {
     $this->enableModules(['text', 'node']);
     $this->installEntitySchema('node');
     $this->installConfig(['node']);
@@ -187,7 +187,7 @@ public function testLoadFunctions() {
   /**
    * Tests view enable and disable procedural wrapper functions.
    */
-  public function testStatusFunctions() {
+  public function testStatusFunctions(): void {
     $view = Views::getView('test_view_status')->storage;
 
     $this->assertFalse($view->status(), 'The view status is disabled.');
@@ -204,7 +204,7 @@ public function testStatusFunctions() {
   /**
    * Tests the \Drupal\views\Views::fetchPluginNames() method.
    */
-  public function testViewsFetchPluginNames() {
+  public function testViewsFetchPluginNames(): void {
     // All style plugins should be returned, as we have not specified a type.
     $plugins = Views::fetchPluginNames('style');
     $definitions = $this->container->get('plugin.manager.views.style')->getDefinitions();
@@ -228,7 +228,7 @@ public function testViewsFetchPluginNames() {
   /**
    * Tests the \Drupal\views\Views::pluginList() method.
    */
-  public function testViewsPluginList() {
+  public function testViewsPluginList(): void {
     $plugin_list = Views::pluginList();
     // Only plugins used by 'test_view' should be in the plugin list.
     foreach (['display:default', 'pager:none'] as $key) {
@@ -248,7 +248,7 @@ public function testViewsPluginList() {
   /**
    * Tests views.module: views_embed_view().
    */
-  public function testViewsEmbedView() {
+  public function testViewsEmbedView(): void {
     /** @var \Drupal\Core\Render\RendererInterface $renderer */
     $renderer = \Drupal::service('renderer');
 
@@ -276,7 +276,7 @@ public function testViewsEmbedView() {
   /**
    * Tests the \Drupal\views\ViewsExecutable::preview() method.
    */
-  public function testViewsPreview() {
+  public function testViewsPreview(): void {
     $view = Views::getView('test_argument');
     $result = $view->preview('default');
     $this->assertCount(5, $result['#view']->result);
diff --git a/core/modules/views/tests/src/Kernel/Plugin/ArgumentValidatorTest.php b/core/modules/views/tests/src/Kernel/Plugin/ArgumentValidatorTest.php
index 1e87e44b9cae..64d3b00e7b58 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/ArgumentValidatorTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/ArgumentValidatorTest.php
@@ -22,7 +22,7 @@ class ArgumentValidatorTest extends ViewsKernelTestBase {
    */
   public static $testViews = ['test_view_argument_validate_numeric', 'test_view'];
 
-  public function testArgumentValidateNumeric() {
+  public function testArgumentValidateNumeric(): void {
     $view = Views::getView('test_view_argument_validate_numeric');
     $view->initHandlers();
     $this->assertFalse($view->argument['null']->validateArgument($this->randomString()));
@@ -36,7 +36,7 @@ public function testArgumentValidateNumeric() {
    *
    * @see Drupal\views_test_data\Plugin\views\argument_validator\ArgumentValidatorTest
    */
-  public function testArgumentValidatorPlugin() {
+  public function testArgumentValidatorPlugin(): void {
     $view = Views::getView('test_view');
 
     // Add a new argument and set the test plugin for the argument_validator.
diff --git a/core/modules/views/tests/src/Kernel/Plugin/BlockDependenciesTest.php b/core/modules/views/tests/src/Kernel/Plugin/BlockDependenciesTest.php
index e208b46237bf..0a55efc53381 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/BlockDependenciesTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/BlockDependenciesTest.php
@@ -41,7 +41,7 @@ protected function setUp($import_test_views = TRUE): void {
    *
    * @see \Drupal\views\Plugin\Derivative\ViewsExposedFilterBlock::getDerivativeDefinitions()
    */
-  public function testExposedBlock() {
+  public function testExposedBlock(): void {
     $block = $this->createBlock('views_exposed_filter_block:test_exposed_block-page_1');
     $dependencies = $block->calculateDependencies()->getDependencies();
     $expected = [
@@ -57,7 +57,7 @@ public function testExposedBlock() {
    *
    * @see \Drupal\views\Plugin\Derivative\ViewsBlock::getDerivativeDefinitions()
    */
-  public function testViewsBlock() {
+  public function testViewsBlock(): void {
     $block = $this->createBlock('views_block:content_recent-block_1');
     $dependencies = $block->calculateDependencies()->getDependencies();
     $expected = [
diff --git a/core/modules/views/tests/src/Kernel/Plugin/CacheTest.php b/core/modules/views/tests/src/Kernel/Plugin/CacheTest.php
index c8be7daaca03..094d6dcd5a68 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/CacheTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/CacheTest.php
@@ -70,7 +70,7 @@ protected function viewsData() {
    *
    * @see views_plugin_cache_time
    */
-  public function testTimeResultCaching() {
+  public function testTimeResultCaching(): void {
     $view = Views::getView('test_cache');
     $view->setDisplay();
     $view->display_handler->overrideOption('cache', [
@@ -108,7 +108,7 @@ public function testTimeResultCaching() {
    *
    * @see views_plugin_cache_time
    */
-  public function testTimeResultCachingWithFilter() {
+  public function testTimeResultCachingWithFilter(): void {
     // Check that we can find the test filter plugin.
     $plugin = $this->container->get('plugin.manager.views.filter')->createInstance('test_filter');
     $this->assertInstanceOf(FilterPlugin::class, $plugin);
@@ -184,7 +184,7 @@ public function testTimeResultCachingWithFilter() {
   /**
    * Tests result caching with a pager.
    */
-  public function testTimeResultCachingWithPager() {
+  public function testTimeResultCachingWithPager(): void {
     $view = Views::getView('test_cache');
     $view->setDisplay();
     $view->display_handler->overrideOption('cache', [
@@ -227,7 +227,7 @@ public function testTimeResultCachingWithPager() {
    *
    * @see views_plugin_cache_time
    */
-  public function testNoneResultCaching() {
+  public function testNoneResultCaching(): void {
     // Create a basic result which just 2 results.
     $view = Views::getView('test_cache');
     $view->setDisplay();
@@ -264,7 +264,7 @@ public function testNoneResultCaching() {
   /**
    * Tests css/js storage and restoring mechanism.
    */
-  public function testHeaderStorage() {
+  public function testHeaderStorage(): void {
     // Create a view with output caching enabled.
     // Some hook_views_pre_render in views_test_data.module adds the test css/js file.
     // so they should be added to the css/js storage.
@@ -305,7 +305,7 @@ public function testHeaderStorage() {
   /**
    * Tests that Subqueries are cached as expected.
    */
-  public function testSubqueryStringCache() {
+  public function testSubqueryStringCache(): void {
     // Execute the view.
     $view = Views::getView('test_groupwise_term_ui');
     $view->setDisplay();
@@ -319,7 +319,7 @@ public function testSubqueryStringCache() {
   /**
    * Tests the data contained in cached items.
    */
-  public function testCacheData() {
+  public function testCacheData(): void {
     for ($i = 1; $i <= 5; $i++) {
       Node::create([
         'title' => $this->randomMachineName(8),
@@ -357,7 +357,7 @@ public function testCacheData() {
   /**
    * Tests the cache context integration for views result cache.
    */
-  public function testCacheContextIntegration() {
+  public function testCacheContextIntegration(): void {
     $view = Views::getView('test_cache');
     $view->setDisplay('page_2');
     \Drupal::state()->set('views_test_cache_context', 'George');
@@ -389,7 +389,7 @@ public function testCacheContextIntegration() {
   /**
    * Tests that cacheability metadata is carried over from argument defaults.
    */
-  public function testArgumentDefaultCache() {
+  public function testArgumentDefaultCache(): void {
     $view = Views::getView('test_view');
 
     // Add a new argument and set the test plugin for the argument_default.
diff --git a/core/modules/views/tests/src/Kernel/Plugin/CastedIntFieldJoinTestBase.php b/core/modules/views/tests/src/Kernel/Plugin/CastedIntFieldJoinTestBase.php
index 9c498e791c97..c7e8212a3e2d 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/CastedIntFieldJoinTestBase.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/CastedIntFieldJoinTestBase.php
@@ -94,7 +94,7 @@ protected function setUpFixtures() {
    * \Drupal\Tests\views\Kernel\Plugin\JoinTest::testBasePlugin() to ensure that
    * no functionality provided by the base join plugin is broken.
    */
-  public function testBuildJoin() {
+  public function testBuildJoin(): void {
     // Setup a simple join and test the result sql.
     $view = Views::getView('test_view');
     $view->initDisplay();
diff --git a/core/modules/views/tests/src/Kernel/Plugin/Display/ViewsMenuLinkTest.php b/core/modules/views/tests/src/Kernel/Plugin/Display/ViewsMenuLinkTest.php
index 9ecceb8891bd..4626d473ffdc 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/Display/ViewsMenuLinkTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/Display/ViewsMenuLinkTest.php
@@ -53,7 +53,7 @@ protected function setUp($import_test_views = TRUE): void {
   /**
    * Tests views internal menu link options.
    */
-  public function testMenuLinkOverrides() {
+  public function testMenuLinkOverrides(): void {
     // Link from views module.
     $views_link = $this->menuLinkManager->getDefinition('views_view:views.test_page_display_menu.page_3');
     $this->assertTrue((bool) $views_link['enabled'], 'Menu link is enabled.');
diff --git a/core/modules/views/tests/src/Kernel/Plugin/DisplayExtenderTest.php b/core/modules/views/tests/src/Kernel/Plugin/DisplayExtenderTest.php
index d210facfe887..97e90bc6e5db 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/DisplayExtenderTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/DisplayExtenderTest.php
@@ -26,7 +26,7 @@ class DisplayExtenderTest extends ViewsKernelTestBase {
   /**
    * Tests display extenders.
    */
-  public function testDisplayExtenders() {
+  public function testDisplayExtenders(): void {
     $this->config('views.settings')->set('display_extenders', ['display_extender_test'])->save();
     $this->assertCount(1, Views::getEnabledDisplayExtenders(), 'Make sure that there is only one enabled display extender.');
 
@@ -47,7 +47,7 @@ public function testDisplayExtenders() {
   /**
    * Tests display extenders validation.
    */
-  public function testDisplayExtendersValidate() {
+  public function testDisplayExtendersValidate(): void {
     $this->config('views.settings')->set('display_extenders', ['display_extender_test_3'])->save();
 
     $view = Views::getView('test_view');
diff --git a/core/modules/views/tests/src/Kernel/Plugin/DisplayKernelTest.php b/core/modules/views/tests/src/Kernel/Plugin/DisplayKernelTest.php
index 880a4b27e65f..065ce91fe99b 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/DisplayKernelTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/DisplayKernelTest.php
@@ -63,7 +63,7 @@ class DisplayKernelTest extends ViewsKernelTestBase {
   /**
    * Tests the default display options.
    */
-  public function testDefaultOptions() {
+  public function testDefaultOptions(): void {
     // Save the view.
     $view = Views::getView('test_display_defaults');
     $view->mergeDefaults();
@@ -91,7 +91,7 @@ public function testDefaultOptions() {
   /**
    * Tests the \Drupal\views\Plugin\views\display\DisplayPluginBase::getPlugin() method.
    */
-  public function testGetPlugin() {
+  public function testGetPlugin(): void {
     $view = Views::getView('test_display_defaults');
     $view->initDisplay();
     $display_handler = $view->display_handler;
@@ -120,7 +120,7 @@ public function testGetPlugin() {
   /**
    * Tests the ::isIdentifierUnique method.
    */
-  public function testisIdentifierUnique() {
+  public function testisIdentifierUnique(): void {
     $view = Views::getView('test_view');
     $view->initDisplay();
 
diff --git a/core/modules/views/tests/src/Kernel/Plugin/DisplayPageTest.php b/core/modules/views/tests/src/Kernel/Plugin/DisplayPageTest.php
index 0cd0708f4f67..ceaa991dca21 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/DisplayPageTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/DisplayPageTest.php
@@ -50,7 +50,7 @@ class DisplayPageTest extends ViewsKernelTestBase {
   /**
    * Checks the behavior of the page for access denied/not found behaviors.
    */
-  public function testPageResponses() {
+  public function testPageResponses(): void {
     \Drupal::currentUser()->setAccount(new AnonymousUserSession());
     $subrequest = Request::create('/test_page_display_403', 'GET');
     $response = $this->container->get('http_kernel')->handle($subrequest, HttpKernelInterface::SUB_REQUEST);
@@ -82,7 +82,7 @@ public function testPageResponses() {
   /**
    * Checks that the router items are properly registered.
    */
-  public function testPageRouterItems() {
+  public function testPageRouterItems(): void {
     $collection = \Drupal::service('views.route_subscriber')->routes();
 
     // Check the controller defaults.
@@ -124,7 +124,7 @@ public function testPageRouterItems() {
   /**
    * Tests the generated menu links of views.
    */
-  public function testMenuLinks() {
+  public function testMenuLinks(): void {
     \Drupal::service('plugin.manager.menu.link')->rebuild();
     $tree = \Drupal::menuTree()->load('admin', new MenuTreeParameters());
     $this->assertTrue(isset($tree['system.admin']->subtree['views_view:views.test_page_display_menu.page_4']));
@@ -137,7 +137,7 @@ public function testMenuLinks() {
   /**
    * Tests the calculated dependencies for various views using Page displays.
    */
-  public function testDependencies() {
+  public function testDependencies(): void {
     $view = Views::getView('test_page_display');
     $this->assertSame(['module' => ['views_test_data']], $view->getDependencies());
 
@@ -164,7 +164,7 @@ public function testDependencies() {
   /**
    * Tests the readmore functionality.
    */
-  public function testReadMore() {
+  public function testReadMore(): void {
     /** @var \Drupal\Core\Render\RendererInterface $renderer */
     $renderer = $this->container->get('renderer');
 
@@ -231,7 +231,7 @@ public function testReadMore() {
   /**
    * Tests the templates with empty rows.
    */
-  public function testEmptyRow() {
+  public function testEmptyRow(): void {
     $view = Views::getView('test_page_display');
     $view->initDisplay();
     $view->newDisplay('page', 'Page', 'empty_row');
diff --git a/core/modules/views/tests/src/Kernel/Plugin/ExposedFormRenderTest.php b/core/modules/views/tests/src/Kernel/Plugin/ExposedFormRenderTest.php
index 24a7fe5e4348..97d670634b3f 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/ExposedFormRenderTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/ExposedFormRenderTest.php
@@ -38,7 +38,7 @@ protected function setUp($import_test_views = TRUE): void {
   /**
    * Tests the exposed form markup.
    */
-  public function testExposedFormRender() {
+  public function testExposedFormRender(): void {
     $view = Views::getView('test_exposed_form_buttons');
     $this->executeView($view);
     $exposed_form = $view->display_handler->getPlugin('exposed_form');
@@ -58,7 +58,7 @@ public function testExposedFormRender() {
   /**
    * Tests the exposed form raw input.
    */
-  public function testExposedFormRawInput() {
+  public function testExposedFormRawInput(): void {
     NodeType::create([
       'type' => 'article',
       'name' => 'Article',
diff --git a/core/modules/views/tests/src/Kernel/Plugin/FieldOrLanguageJoinTest.php b/core/modules/views/tests/src/Kernel/Plugin/FieldOrLanguageJoinTest.php
index 5ffb69a1f7eb..c06ab3694d94 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/FieldOrLanguageJoinTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/FieldOrLanguageJoinTest.php
@@ -50,7 +50,7 @@ protected function setUp($import_test_views = TRUE): void {
    * \Drupal\Tests\views\Kernel\Plugin\JoinTest::testBasePlugin() to ensure that
    * no functionality provided by the base join plugin is broken.
    */
-  public function testBase() {
+  public function testBase(): void {
     // Setup a simple join and test the result sql.
     $view = Views::getView('test_view');
     $view->initDisplay();
@@ -130,7 +130,7 @@ public function testBase() {
   /**
    * Tests the adding of conditions by the join plugin.
    */
-  public function testLanguageBundleConditions() {
+  public function testLanguageBundleConditions(): void {
     // Setup a simple join and test the result sql.
     $view = Views::getView('test_view');
     $view->initDisplay();
diff --git a/core/modules/views/tests/src/Kernel/Plugin/JoinTest.php b/core/modules/views/tests/src/Kernel/Plugin/JoinTest.php
index 5094eed88146..87a1f007bf6c 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/JoinTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/JoinTest.php
@@ -45,7 +45,7 @@ protected function setUp($import_test_views = TRUE): void {
   /**
    * Tests an example join plugin.
    */
-  public function testExamplePlugin() {
+  public function testExamplePlugin(): void {
 
     // Setup a simple join and test the result sql.
     $view = Views::getView('test_view');
@@ -76,7 +76,7 @@ public function testExamplePlugin() {
   /**
    * Tests the join plugin base.
    */
-  public function testBasePlugin() {
+  public function testBasePlugin(): void {
 
     // Setup a simple join and test the result sql.
     $view = Views::getView('test_view');
diff --git a/core/modules/views/tests/src/Kernel/Plugin/PagerKernelTest.php b/core/modules/views/tests/src/Kernel/Plugin/PagerKernelTest.php
index fbfb97a8264e..ac3cd794b6cd 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/PagerKernelTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/PagerKernelTest.php
@@ -42,7 +42,7 @@ protected function setUp($import_test_views = TRUE): void {
    * @see \Drupal\views\ViewExecutable::setOffset
    * @see \Drupal\views\ViewExecutable::setCurrentPage
    */
-  public function testSetPagerMethods() {
+  public function testSetPagerMethods(): void {
     $view = Views::getView('test_pager_full');
 
     // Mark the view as cacheable in order have the cache checking working
diff --git a/core/modules/views/tests/src/Kernel/Plugin/PluginBaseTest.php b/core/modules/views/tests/src/Kernel/Plugin/PluginBaseTest.php
index b3c8386bcaca..42a3624e25da 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/PluginBaseTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/PluginBaseTest.php
@@ -32,7 +32,7 @@ protected function setUp(): void {
   /**
    * Tests that the token replacement in views works correctly.
    */
-  public function testViewsTokenReplace() {
+  public function testViewsTokenReplace(): void {
     $text = '{{ langcode__value }} means {{ langcode }}';
     $tokens = ['{{ langcode }}' => Markup::create('English'), '{{ langcode__value }}' => 'en'];
 
@@ -46,7 +46,7 @@ public function testViewsTokenReplace() {
   /**
    * Tests that the token replacement in views works correctly with dots.
    */
-  public function testViewsTokenReplaceWithDots() {
+  public function testViewsTokenReplaceWithDots(): void {
     $text = '{{ argument.first }} comes before {{ argument.second }}';
     $tokens = ['{{ argument.first }}' => 'first', '{{ argument.second }}' => 'second'];
 
@@ -70,7 +70,7 @@ public function testViewsTokenReplaceWithDots() {
   /**
    * Tests viewsTokenReplace without any twig tokens.
    */
-  public function testViewsTokenReplaceWithTwigTokens() {
+  public function testViewsTokenReplaceWithTwigTokens(): void {
     $text = 'Just some text';
     $tokens = [];
     $result = $this->testPluginBase->viewsTokenReplace($text, $tokens);
diff --git a/core/modules/views/tests/src/Kernel/Plugin/QueryTest.php b/core/modules/views/tests/src/Kernel/Plugin/QueryTest.php
index 0b20a3528c3b..52b29887ed7a 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/QueryTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/QueryTest.php
@@ -32,7 +32,7 @@ protected function viewsData() {
   /**
    * Tests query plugins.
    */
-  public function testQuery() {
+  public function testQuery(): void {
     $this->_testInitQuery();
     $this->_testQueryExecute();
     $this->queryMethodsTests();
diff --git a/core/modules/views/tests/src/Kernel/Plugin/RelationshipJoinInTest.php b/core/modules/views/tests/src/Kernel/Plugin/RelationshipJoinInTest.php
index 0fe7b5b2f7c0..b9e1fbe3d2b2 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/RelationshipJoinInTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/RelationshipJoinInTest.php
@@ -40,7 +40,7 @@ class RelationshipJoinInTest extends RelationshipJoinTestBase {
   /**
    * Tests the query result of a view with a relationship with an IN condition.
    */
-  public function testRelationshipInQuery() {
+  public function testRelationshipInQuery(): void {
     // Update the first two Beatles to be authored by Kristiaan.
     $account_k = $this->createUser([], 'Kristiaan');
     $connection = Database::getConnection();
diff --git a/core/modules/views/tests/src/Kernel/Plugin/RelationshipTest.php b/core/modules/views/tests/src/Kernel/Plugin/RelationshipTest.php
index 9fad7eefdc66..e213340a4f92 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/RelationshipTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/RelationshipTest.php
@@ -37,7 +37,7 @@ class RelationshipTest extends RelationshipJoinTestBase {
   /**
    * Tests the query result of a view with a relationship.
    */
-  public function testRelationshipQuery() {
+  public function testRelationshipQuery(): void {
     $connection = Database::getConnection();
     // Set the first entry to have the admin as author.
     $connection->update('views_test_data')
@@ -145,7 +145,7 @@ public function testRelationshipQuery() {
   /**
    * Tests rendering of a view with a relationship.
    */
-  public function testRelationshipRender() {
+  public function testRelationshipRender(): void {
     $connection = Database::getConnection();
     $author1 = $this->createUser();
     $connection->update('views_test_data')
diff --git a/core/modules/views/tests/src/Kernel/Plugin/RowEntityTest.php b/core/modules/views/tests/src/Kernel/Plugin/RowEntityTest.php
index 548ee09feb94..99ec20452416 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/RowEntityTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/RowEntityTest.php
@@ -50,7 +50,7 @@ protected function setUp($import_test_views = TRUE): void {
   /**
    * Tests the entity row handler.
    */
-  public function testEntityRow() {
+  public function testEntityRow(): void {
     $user = User::create([
       'name' => 'test user',
     ]);
diff --git a/core/modules/views/tests/src/Kernel/Plugin/RowRenderCacheTest.php b/core/modules/views/tests/src/Kernel/Plugin/RowRenderCacheTest.php
index 04d2602823f0..1629bbdad047 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/RowRenderCacheTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/RowRenderCacheTest.php
@@ -89,7 +89,7 @@ protected function setUpFixtures() {
   /**
    * Tests complex field rewriting and uncacheable field handlers.
    */
-  public function testAdvancedCaching() {
+  public function testAdvancedCaching(): void {
     // Test that row field output is actually cached and with the proper cache
     // contexts.
     $this->doTestRenderedOutput($this->editorUser);
@@ -112,7 +112,7 @@ public function testAdvancedCaching() {
   /**
    * Tests that rows are not cached when the none cache plugin is used.
    */
-  public function testNoCaching() {
+  public function testNoCaching(): void {
     $this->setCurrentUser($this->regularUser);
     $view = Views::getView('test_row_render_cache_none');
     $view->setDisplay();
diff --git a/core/modules/views/tests/src/Kernel/Plugin/RssFieldsTest.php b/core/modules/views/tests/src/Kernel/Plugin/RssFieldsTest.php
index a33ddbd2a1cb..7773e2598afc 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/RssFieldsTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/RssFieldsTest.php
@@ -49,7 +49,7 @@ protected function setUp($import_test_views = TRUE): void {
    * ensure that root-relative links also work in a scenario without
    * subdirectory.
    */
-  public function testRssFields() {
+  public function testRssFields(): void {
     $this->setUpCurrentUser([], ['access content']);
 
     $date = '1975-05-18';
diff --git a/core/modules/views/tests/src/Kernel/Plugin/SqlEntityLoadingTest.php b/core/modules/views/tests/src/Kernel/Plugin/SqlEntityLoadingTest.php
index a3e60b3dd617..571f8d0ce085 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/SqlEntityLoadingTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/SqlEntityLoadingTest.php
@@ -39,7 +39,7 @@ protected function setUp($import_test_views = TRUE): void {
     $this->installSchema('node', 'node_access');
   }
 
-  public function testViewWithNonDefaultPendingRevision() {
+  public function testViewWithNonDefaultPendingRevision(): void {
     $node_type = NodeType::create([
       'type' => 'page',
       'name' => 'Page',
diff --git a/core/modules/views/tests/src/Kernel/Plugin/SqlQueryTest.php b/core/modules/views/tests/src/Kernel/Plugin/SqlQueryTest.php
index 9f3bd6bcf9a6..f5d39734aa64 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/SqlQueryTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/SqlQueryTest.php
@@ -37,7 +37,7 @@ protected function viewsData() {
   /**
    * Tests adding some metadata/tags to the views query.
    */
-  public function testExecuteMetadata() {
+  public function testExecuteMetadata(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
 
@@ -91,7 +91,7 @@ public function testExecuteMetadata() {
    *
    * @covers \Drupal\views\Plugin\views\query\Sql::getConnection
    */
-  public function testGetConnection() {
+  public function testGetConnection(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
 
diff --git a/core/modules/views/tests/src/Kernel/Plugin/StyleFieldsTest.php b/core/modules/views/tests/src/Kernel/Plugin/StyleFieldsTest.php
index 9bf7f20750a4..f509b286bd40 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/StyleFieldsTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/StyleFieldsTest.php
@@ -24,7 +24,7 @@ class StyleFieldsTest extends ViewsKernelTestBase {
   /**
    * Tests inline fields and separator.
    */
-  public function testInlineFields() {
+  public function testInlineFields(): void {
     $renderer = $this->container->get('renderer');
     $view = Views::getView('test_view');
     $view->setDisplay();
diff --git a/core/modules/views/tests/src/Kernel/Plugin/StyleGridTest.php b/core/modules/views/tests/src/Kernel/Plugin/StyleGridTest.php
index 95b11faf0e00..ad960d2357a4 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/StyleGridTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/StyleGridTest.php
@@ -32,7 +32,7 @@ class StyleGridTest extends PluginKernelTestBase {
   /**
    * Tests the grid style.
    */
-  public function testGrid() {
+  public function testGrid(): void {
     $view = Views::getView('test_grid');
     foreach (['horizontal', 'vertical'] as $alignment) {
       $this->assertGrid($view, $alignment, 5);
diff --git a/core/modules/views/tests/src/Kernel/Plugin/StyleHtmlListTest.php b/core/modules/views/tests/src/Kernel/Plugin/StyleHtmlListTest.php
index 1a4d36df4ab9..677224e2d208 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/StyleHtmlListTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/StyleHtmlListTest.php
@@ -25,7 +25,7 @@ class StyleHtmlListTest extends ViewsKernelTestBase {
   /**
    * Make sure that the HTML list style markup is correct.
    */
-  public function testDefaultRowClasses() {
+  public function testDefaultRowClasses(): void {
     $view = Views::getView('test_style_html_list');
     $output = $view->preview();
     $output = (string) \Drupal::service('renderer')->renderRoot($output);
diff --git a/core/modules/views/tests/src/Kernel/Plugin/StyleMappingTest.php b/core/modules/views/tests/src/Kernel/Plugin/StyleMappingTest.php
index 004c66eb62b5..ec3842528bc5 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/StyleMappingTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/StyleMappingTest.php
@@ -26,7 +26,7 @@ class StyleMappingTest extends StyleTestBase {
   /**
    * Verifies that the fields were mapped correctly.
    */
-  public function testMappedOutput() {
+  public function testMappedOutput(): void {
     $view = Views::getView('test_style_mapping');
     $output = (string) $this->mappedOutputHelper($view);
     $this->assertStringNotContainsString('job', $output, 'The job field is added to the view but not in the mapping.');
diff --git a/core/modules/views/tests/src/Kernel/Plugin/StyleTableUnitTest.php b/core/modules/views/tests/src/Kernel/Plugin/StyleTableUnitTest.php
index 449faf22b868..4cb228651439 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/StyleTableUnitTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/StyleTableUnitTest.php
@@ -26,7 +26,7 @@ class StyleTableUnitTest extends PluginKernelTestBase {
   /**
    * Tests the table style.
    */
-  public function testTable() {
+  public function testTable(): void {
     $view = Views::getView('test_table');
 
     $view->setDisplay('default');
diff --git a/core/modules/views/tests/src/Kernel/Plugin/StyleTest.php b/core/modules/views/tests/src/Kernel/Plugin/StyleTest.php
index e95c91f97870..a88ee3ae0ed6 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/StyleTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/StyleTest.php
@@ -29,7 +29,7 @@ class StyleTest extends ViewsKernelTestBase {
   /**
    * Tests the general rendering of styles.
    */
-  public function testStyle() {
+  public function testStyle(): void {
     $renderer = $this->container->get('renderer');
 
     // This run use the test row plugin and render with it.
@@ -78,7 +78,7 @@ public function testStyle() {
   /**
    * Tests the grouping features of styles.
    */
-  public function testGrouping() {
+  public function testGrouping(): void {
     $this->doTestGrouping(FALSE);
     $this->doTestGrouping(TRUE);
   }
@@ -278,7 +278,7 @@ protected function doTestGrouping($stripped = FALSE) {
   /**
    * Tests custom CSS row classes.
    */
-  public function testCustomRowClasses() {
+  public function testCustomRowClasses(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
 
diff --git a/core/modules/views/tests/src/Kernel/Plugin/StyleUnformattedTest.php b/core/modules/views/tests/src/Kernel/Plugin/StyleUnformattedTest.php
index 8e54fd4dcf36..a9a3f5d31335 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/StyleUnformattedTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/StyleUnformattedTest.php
@@ -23,7 +23,7 @@ class StyleUnformattedTest extends StyleTestBase {
   /**
    * Make sure that the default css classes works as expected.
    */
-  public function testDefaultRowClasses() {
+  public function testDefaultRowClasses(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
     $output = $view->preview();
diff --git a/core/modules/views/tests/src/Kernel/Plugin/ViewsBlockTest.php b/core/modules/views/tests/src/Kernel/Plugin/ViewsBlockTest.php
index b3ff27077a14..2afcc654dbf2 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/ViewsBlockTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/ViewsBlockTest.php
@@ -44,7 +44,7 @@ protected function setUp($import_test_views = TRUE): void {
    *
    * @see \Drupal\views\Plugin\Block::getMachineNameSuggestion()
    */
-  public function testMachineNameSuggestion() {
+  public function testMachineNameSuggestion(): void {
     $plugin_definition = [
       'provider' => 'views',
     ];
@@ -59,7 +59,7 @@ public function testMachineNameSuggestion() {
    *
    * @see \Drupal\views\Plugin\Block::build()
    */
-  public function testBuildWithTitleToken() {
+  public function testBuildWithTitleToken(): void {
     $view = Views::getView('test_view_block');
     $view->setDisplay();
 
@@ -93,7 +93,7 @@ public function testBuildWithTitleToken() {
    *
    * @see \Drupal\views\Plugin\Block::build()
    */
-  public function testBuildWithTitleOverride() {
+  public function testBuildWithTitleOverride(): void {
     $view = Views::getView('test_view_block');
     $view->setDisplay();
 
@@ -134,7 +134,7 @@ public function testBuildWithTitleOverride() {
    *
    * @see \Drupal\views\Plugin\Block\ViewsBlockBase::getPreviewFallbackString()
    */
-  public function testGetPreviewFallbackString() {
+  public function testGetPreviewFallbackString(): void {
     $plugin_definition = [
       'provider' => 'views',
     ];
diff --git a/core/modules/views/tests/src/Kernel/Plugin/ViewsSqlExceptionTest.php b/core/modules/views/tests/src/Kernel/Plugin/ViewsSqlExceptionTest.php
index e5eb58772bb2..9756d6482026 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/ViewsSqlExceptionTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/ViewsSqlExceptionTest.php
@@ -32,7 +32,7 @@ protected function viewsData() {
   /**
    * Tests for the SQL exception.
    */
-  public function testSqlException() {
+  public function testSqlException(): void {
     $view = Views::getView('test_filter');
     $view->initDisplay();
 
diff --git a/core/modules/views/tests/src/Kernel/PluginInstanceTest.php b/core/modules/views/tests/src/Kernel/PluginInstanceTest.php
index 93b101576ba8..9cd5dbe58667 100644
--- a/core/modules/views/tests/src/Kernel/PluginInstanceTest.php
+++ b/core/modules/views/tests/src/Kernel/PluginInstanceTest.php
@@ -74,7 +74,7 @@ protected function setUp($import_test_views = TRUE): void {
   /**
    * Confirms that there is plugin data for all views plugin types.
    */
-  public function testPluginData() {
+  public function testPluginData(): void {
     // Check that we have an array of data.
     $this->assertIsArray($this->definitions);
 
@@ -96,7 +96,7 @@ public function testPluginData() {
    * This will iterate through all plugins from _views_fetch_plugin_data(),
    * filtering out deprecated plugins.
    */
-  public function testPluginInstances() {
+  public function testPluginInstances(): void {
     $this->assertPluginInstances(FALSE);
   }
 
diff --git a/core/modules/views/tests/src/Kernel/QueryGroupByTest.php b/core/modules/views/tests/src/Kernel/QueryGroupByTest.php
index 1eba42de59cf..4d597ee646a5 100644
--- a/core/modules/views/tests/src/Kernel/QueryGroupByTest.php
+++ b/core/modules/views/tests/src/Kernel/QueryGroupByTest.php
@@ -70,7 +70,7 @@ protected function setUp($import_test_views = TRUE): void {
   /**
    * Tests aggregate count feature.
    */
-  public function testAggregateCount() {
+  public function testAggregateCount(): void {
     $this->setupTestEntities();
 
     $view = Views::getView('test_aggregate_count');
@@ -91,7 +91,7 @@ public function testAggregateCount() {
   /**
    * Tests aggregate count feature with no group by.
    */
-  public function testAggregateCountFunction() {
+  public function testAggregateCountFunction(): void {
     $this->setupTestEntities();
 
     $view = Views::getView('test_aggregate_count_function');
@@ -163,49 +163,49 @@ protected function setupTestEntities() {
   /**
    * Tests the count aggregation function.
    */
-  public function testGroupByCount() {
+  public function testGroupByCount(): void {
     $this->groupByTestHelper('count', [4, 3]);
   }
 
   /**
    * Tests the sum aggregation function.
    */
-  public function testGroupBySum() {
+  public function testGroupBySum(): void {
     $this->groupByTestHelper('sum', [10, 18]);
   }
 
   /**
    * Tests the average aggregation function.
    */
-  public function testGroupByAverage() {
+  public function testGroupByAverage(): void {
     $this->groupByTestHelper('avg', [2.5, 6]);
   }
 
   /**
    * Tests the min aggregation function.
    */
-  public function testGroupByMin() {
+  public function testGroupByMin(): void {
     $this->groupByTestHelper('min', [1, 5]);
   }
 
   /**
    * Tests the max aggregation function.
    */
-  public function testGroupByMax() {
+  public function testGroupByMax(): void {
     $this->groupByTestHelper('max', [4, 7]);
   }
 
   /**
    * Tests aggregation with no specific function.
    */
-  public function testGroupByNone() {
+  public function testGroupByNone(): void {
     $this->groupByTestHelper(NULL, [1, 5]);
   }
 
   /**
    * Tests groupby with filters.
    */
-  public function testGroupByCountOnlyFilters() {
+  public function testGroupByCountOnlyFilters(): void {
     // Check if GROUP BY and HAVING are included when a view
     // doesn't display SUM, COUNT, MAX, etc. functions in SELECT statement.
 
@@ -223,7 +223,7 @@ public function testGroupByCountOnlyFilters() {
   /**
    * Tests grouping on base field.
    */
-  public function testGroupByBaseField() {
+  public function testGroupByBaseField(): void {
     $this->setupTestEntities();
 
     $view = Views::getView('test_group_by_count');
@@ -239,7 +239,7 @@ public function testGroupByBaseField() {
   /**
    * Tests grouping a field with cardinality > 1.
    */
-  public function testGroupByFieldWithCardinality() {
+  public function testGroupByFieldWithCardinality(): void {
     $field_storage = FieldStorageConfig::create([
       'type' => 'integer',
       'field_name' => 'field_test',
@@ -319,7 +319,7 @@ public function testGroupByFieldWithCardinality() {
   /**
    * Tests groupby with a non-existent field on some bundle.
    */
-  public function testGroupByWithFieldsNotExistingOnBundle() {
+  public function testGroupByWithFieldsNotExistingOnBundle(): void {
     $field_storage = FieldStorageConfig::create([
       'type' => 'integer',
       'field_name' => 'field_test',
diff --git a/core/modules/views/tests/src/Kernel/RenderCacheIntegrationTest.php b/core/modules/views/tests/src/Kernel/RenderCacheIntegrationTest.php
index 5b39872277c5..d9a3e5dc7c99 100644
--- a/core/modules/views/tests/src/Kernel/RenderCacheIntegrationTest.php
+++ b/core/modules/views/tests/src/Kernel/RenderCacheIntegrationTest.php
@@ -45,7 +45,7 @@ protected function setUp($import_test_views = TRUE): void {
   /**
    * Tests a field-based view's cache tags when using the "none" cache plugin.
    */
-  public function testFieldBasedViewCacheTagsWithCachePluginNone() {
+  public function testFieldBasedViewCacheTagsWithCachePluginNone(): void {
     $view = Views::getView('entity_test_fields');
     $view->getDisplay()->overrideOption('cache', [
       'type' => 'none',
@@ -58,7 +58,7 @@ public function testFieldBasedViewCacheTagsWithCachePluginNone() {
   /**
    * Tests a field-based view's cache tags when using the "tag" cache plugin.
    */
-  public function testFieldBasedViewCacheTagsWithCachePluginTag() {
+  public function testFieldBasedViewCacheTagsWithCachePluginTag(): void {
     $view = Views::getView('entity_test_fields');
     $view->getDisplay()->overrideOption('cache', [
       'type' => 'tag',
@@ -71,7 +71,7 @@ public function testFieldBasedViewCacheTagsWithCachePluginTag() {
   /**
    * Tests a field-based view's cache tags when using the "time" cache plugin.
    */
-  public function testFieldBasedViewCacheTagsWithCachePluginTime() {
+  public function testFieldBasedViewCacheTagsWithCachePluginTime(): void {
     $view = Views::getView('entity_test_fields');
     $view->getDisplay()->overrideOption('cache', [
       'type' => 'time',
@@ -192,7 +192,7 @@ protected function assertCacheTagsForFieldBasedView(bool $do_assert_views_caches
   /**
    * Tests an entity-based view's cache tags when using the "none" cache plugin.
    */
-  public function testEntityBasedViewCacheTagsWithCachePluginNone() {
+  public function testEntityBasedViewCacheTagsWithCachePluginNone(): void {
     $view = Views::getView('entity_test_row');
     $view->getDisplay()->overrideOption('cache', [
       'type' => 'none',
@@ -205,7 +205,7 @@ public function testEntityBasedViewCacheTagsWithCachePluginNone() {
   /**
    * Tests an entity-based view's cache tags when using the "tag" cache plugin.
    */
-  public function testEntityBasedViewCacheTagsWithCachePluginTag() {
+  public function testEntityBasedViewCacheTagsWithCachePluginTag(): void {
     $view = Views::getView('entity_test_row');
     $view->getDisplay()->overrideOption('cache', [
       'type' => 'tag',
@@ -218,7 +218,7 @@ public function testEntityBasedViewCacheTagsWithCachePluginTag() {
   /**
    * Tests an entity-based view's cache tags when using the "time" cache plugin.
    */
-  public function testEntityBasedViewCacheTagsWithCachePluginTime() {
+  public function testEntityBasedViewCacheTagsWithCachePluginTime(): void {
     $view = Views::getView('entity_test_row');
     $view->getDisplay()->overrideOption('cache', [
       'type' => 'time',
@@ -275,7 +275,7 @@ protected function assertCacheTagsForEntityBasedView(bool $do_assert_views_cache
   /**
    * Ensure that the view renderable contains the cache contexts.
    */
-  public function testBuildRenderableWithCacheContexts() {
+  public function testBuildRenderableWithCacheContexts(): void {
     $view = View::load('test_view');
     $display =& $view->getDisplay('default');
     $display['cache_metadata']['contexts'] = ['views_test_cache_context'];
@@ -288,7 +288,7 @@ public function testBuildRenderableWithCacheContexts() {
   /**
    * Ensures that saving a view calculates the cache contexts.
    */
-  public function testViewAddCacheMetadata() {
+  public function testViewAddCacheMetadata(): void {
     $view = View::load('test_display');
     $view->save();
 
diff --git a/core/modules/views/tests/src/Kernel/TestViewsTest.php b/core/modules/views/tests/src/Kernel/TestViewsTest.php
index 5a9db54488c4..9e46c42d6f38 100644
--- a/core/modules/views/tests/src/Kernel/TestViewsTest.php
+++ b/core/modules/views/tests/src/Kernel/TestViewsTest.php
@@ -197,7 +197,7 @@ protected function setUp(): void {
   /**
    * Tests default configuration data type.
    */
-  public function testDefaultConfig() {
+  public function testDefaultConfig(): void {
     // Create a typed config manager with access to configuration schema in
     // every module, profile and theme.
     $typed_config = new TypedConfigManager(
diff --git a/core/modules/views/tests/src/Kernel/TokenReplaceTest.php b/core/modules/views/tests/src/Kernel/TokenReplaceTest.php
index a2d2ecdb3c27..95d11df2050d 100644
--- a/core/modules/views/tests/src/Kernel/TokenReplaceTest.php
+++ b/core/modules/views/tests/src/Kernel/TokenReplaceTest.php
@@ -27,7 +27,7 @@ class TokenReplaceTest extends ViewsKernelTestBase {
   /**
    * Tests core token replacements generated from a view.
    */
-  public function testTokenReplacement() {
+  public function testTokenReplacement(): void {
     $token_handler = \Drupal::token();
     $view = Views::getView('test_tokens');
     $view->setDisplay('page_1');
@@ -74,7 +74,7 @@ public function testTokenReplacement() {
   /**
    * Tests core token replacements generated from a view.
    */
-  public function testTokenReplacementWithMiniPager() {
+  public function testTokenReplacementWithMiniPager(): void {
     $token_handler = \Drupal::token();
     $view = Views::getView('test_tokens');
     $view->setDisplay('page_3');
@@ -145,7 +145,7 @@ public function testTokenReplacementWithSpecificNumberOfItems(): void {
   /**
    * Tests core token replacements generated from a view without results.
    */
-  public function testTokenReplacementNoResults() {
+  public function testTokenReplacementNoResults(): void {
     $token_handler = \Drupal::token();
     $view = Views::getView('test_tokens');
     $view->setDisplay('page_2');
@@ -164,7 +164,7 @@ public function testTokenReplacementNoResults() {
   /**
    * Tests path token replacements generated from a view without a path.
    */
-  public function testTokenReplacementNoPath() {
+  public function testTokenReplacementNoPath(): void {
     $token_handler = \Drupal::token();
     $view = Views::getView('test_invalid_tokens');
     $view->setDisplay('block_1');
diff --git a/core/modules/views/tests/src/Kernel/ViewElementTest.php b/core/modules/views/tests/src/Kernel/ViewElementTest.php
index 9cad35d7a523..4989a46a336e 100644
--- a/core/modules/views/tests/src/Kernel/ViewElementTest.php
+++ b/core/modules/views/tests/src/Kernel/ViewElementTest.php
@@ -24,7 +24,7 @@ class ViewElementTest extends ViewsKernelTestBase {
   /**
    * Tests the rendered output and form output of a view element.
    */
-  public function testViewElement() {
+  public function testViewElement(): void {
     /** @var \Drupal\Core\Render\RendererInterface $renderer */
     $renderer = $this->container->get('renderer');
     $view = Views::getView('test_view_embed');
@@ -74,7 +74,7 @@ public function testViewElement() {
   /**
    * Tests the rendered output and form output of the "embed" display plugin.
    */
-  public function testViewElementEmbed() {
+  public function testViewElementEmbed(): void {
     /** @var \Drupal\Core\Render\RendererInterface $renderer */
     $renderer = $this->container->get('renderer');
     $view = Views::getView('test_view_embed');
@@ -134,7 +134,7 @@ public function testViewElementEmbed() {
   /**
    * Tests that an exception is thrown when an invalid View is passed.
    */
-  public function testInvalidView() {
+  public function testInvalidView(): void {
     $renderer = $this->container->get('renderer');
     $render_element = [
       '#type' => 'view',
diff --git a/core/modules/views/tests/src/Kernel/ViewExecutableTest.php b/core/modules/views/tests/src/Kernel/ViewExecutableTest.php
index 64aeeac346ac..501633cbbaef 100644
--- a/core/modules/views/tests/src/Kernel/ViewExecutableTest.php
+++ b/core/modules/views/tests/src/Kernel/ViewExecutableTest.php
@@ -109,7 +109,7 @@ protected function setUpFixtures() {
   /**
    * Tests the views.executable container service.
    */
-  public function testFactoryService() {
+  public function testFactoryService(): void {
     $factory = $this->container->get('views.executable');
     $this->assertInstanceOf(ViewExecutableFactory::class, $factory);
     $view = View::load('test_executable_displays');
@@ -119,7 +119,7 @@ public function testFactoryService() {
   /**
    * Tests the initDisplay() and initHandlers() methods.
    */
-  public function testInitMethods() {
+  public function testInitMethods(): void {
     $view = Views::getView('test_destroy');
     $view->initDisplay();
 
@@ -187,14 +187,14 @@ public function testInitMethods() {
   /**
    * Tests the generation of the executable object.
    */
-  public function testConstructing() {
+  public function testConstructing(): void {
     Views::getView('test_destroy');
   }
 
   /**
    * Tests the accessing of values on the object.
    */
-  public function testProperties() {
+  public function testProperties(): void {
     $view = Views::getView('test_destroy');
     foreach ($this->executableProperties as $property) {
       $this->assertTrue(isset($view->{$property}));
@@ -204,7 +204,7 @@ public function testProperties() {
     $this->assertEquals([], $view->getExposedInput());
   }
 
-  public function testSetDisplayWithInvalidDisplay() {
+  public function testSetDisplayWithInvalidDisplay(): void {
     \Drupal::service('module_installer')->install(['dblog']);
     $view = Views::getView('test_executable_displays');
     $view->initDisplay();
@@ -229,7 +229,7 @@ public function testSetDisplayWithInvalidDisplay() {
   /**
    * Tests the display related methods and properties.
    */
-  public function testDisplays() {
+  public function testDisplays(): void {
     $view = Views::getView('test_executable_displays');
 
     // Tests Drupal\views\ViewExecutable::initDisplay().
@@ -299,7 +299,7 @@ public function testDisplays() {
   /**
    * Tests the setting/getting of properties.
    */
-  public function testPropertyMethods() {
+  public function testPropertyMethods(): void {
     $view = Views::getView('test_executable_displays');
 
     // Test the setAjaxEnabled() method.
@@ -356,7 +356,7 @@ public function testPropertyMethods() {
   /**
    * Tests the destructor to be sure that necessary objects are removed.
    */
-  public function testDestroy() {
+  public function testDestroy(): void {
     $view = Views::getView('test_destroy');
 
     $view->preview();
@@ -410,7 +410,7 @@ protected function getProtectedProperty($instance, $property) {
   /**
    * Tests ViewExecutable::getHandlerTypes().
    */
-  public function testGetHandlerTypes() {
+  public function testGetHandlerTypes(): void {
     $types = ViewExecutable::getHandlerTypes();
     foreach (['field', 'filter', 'argument', 'sort', 'header', 'footer', 'empty'] as $type) {
       $this->assertTrue(isset($types[$type]));
@@ -429,7 +429,7 @@ public function testGetHandlerTypes() {
   /**
    * Tests ViewExecutable::getHandlers().
    */
-  public function testGetHandlers() {
+  public function testGetHandlers(): void {
     $view = Views::getView('test_executable_displays');
     $view->setDisplay('page_1');
 
@@ -442,7 +442,7 @@ public function testGetHandlers() {
   /**
    * Tests the validation of display handlers.
    */
-  public function testValidate() {
+  public function testValidate(): void {
     $view = Views::getView('test_executable_displays');
     $view->setDisplay('page_1');
 
@@ -473,7 +473,7 @@ public function testValidate() {
   /**
    * Tests that nested loops of the display handlers won't break validation.
    */
-  public function testValidateNestedLoops() {
+  public function testValidateNestedLoops(): void {
     $view = View::create(['id' => 'test_validate_nested_loops']);
     $executable = $view->getExecutable();
 
@@ -493,7 +493,7 @@ public function testValidateNestedLoops() {
   /**
    * Tests serialization of the ViewExecutable object.
    */
-  public function testSerialization() {
+  public function testSerialization(): void {
     $view = Views::getView('test_executable_displays');
     $view->setDisplay('page_1');
     $view->setArguments(['test']);
@@ -549,7 +549,7 @@ public function testSerialization() {
   /**
    * Tests if argument overrides by validators are propagated to tokens.
    */
-  public function testArgumentValidatorValueOverride() {
+  public function testArgumentValidatorValueOverride(): void {
     $account = User::create(['name' => $this->randomString()]);
     $account->save();
 
diff --git a/core/modules/views/tests/src/Kernel/ViewRenderTest.php b/core/modules/views/tests/src/Kernel/ViewRenderTest.php
index 84b9492ec41f..e9a4b2ba3b2d 100644
--- a/core/modules/views/tests/src/Kernel/ViewRenderTest.php
+++ b/core/modules/views/tests/src/Kernel/ViewRenderTest.php
@@ -21,7 +21,7 @@ class ViewRenderTest extends ViewsKernelTestBase {
   /**
    * Tests render functionality.
    */
-  public function testRender() {
+  public function testRender(): void {
     $state = $this->container->get('state');
     $state->set('views_render.test', 0);
 
diff --git a/core/modules/views/tests/src/Kernel/ViewStorageTest.php b/core/modules/views/tests/src/Kernel/ViewStorageTest.php
index 280237c5c4ab..216a410ff6bc 100644
--- a/core/modules/views/tests/src/Kernel/ViewStorageTest.php
+++ b/core/modules/views/tests/src/Kernel/ViewStorageTest.php
@@ -58,7 +58,7 @@ class ViewStorageTest extends ViewsKernelTestBase {
   /**
    * Tests CRUD operations.
    */
-  public function testConfigurationEntityCRUD() {
+  public function testConfigurationEntityCRUD(): void {
     // Get the configuration entity type and controller.
     $this->entityType = \Drupal::entityTypeManager()->getDefinition('view');
     $this->controller = $this->container->get('entity_type.manager')->getStorage('view');
@@ -302,7 +302,7 @@ protected function displayMethodTests() {
   /**
    * Tests the createDuplicate() View method.
    */
-  public function testCreateDuplicate() {
+  public function testCreateDuplicate(): void {
     $view = Views::getView('test_view_storage');
     $copy = $view->storage->createDuplicate();
 
diff --git a/core/modules/views/tests/src/Kernel/ViewsConfigDependenciesIntegrationTest.php b/core/modules/views/tests/src/Kernel/ViewsConfigDependenciesIntegrationTest.php
index ae2c098341b9..bb0b3e370e04 100644
--- a/core/modules/views/tests/src/Kernel/ViewsConfigDependenciesIntegrationTest.php
+++ b/core/modules/views/tests/src/Kernel/ViewsConfigDependenciesIntegrationTest.php
@@ -49,7 +49,7 @@ protected function setUp($import_test_views = TRUE): void {
   /**
    * Tests integration with image module.
    */
-  public function testImage() {
+  public function testImage(): void {
     /** @var \Drupal\image\ImageStyleInterface $style */
     $style = ImageStyle::create(['name' => 'foo', 'label' => 'Foo']);
     $style->save();
@@ -111,7 +111,7 @@ public function testImage() {
   /**
    * Tests removing a config dependency that deletes the View.
    */
-  public function testConfigRemovalRole() {
+  public function testConfigRemovalRole(): void {
     // Create a role we can add to the View and delete.
     $role = Role::create([
       'id' => 'dummy',
@@ -151,7 +151,7 @@ public function testConfigRemovalRole() {
   /**
    * Tests uninstalling a module that provides a base table for a View.
    */
-  public function testConfigRemovalBaseTable() {
+  public function testConfigRemovalBaseTable(): void {
     // Find all the entity types provided by the entity_test module and install
     // the schema for them so we can uninstall them.
     $entities = \Drupal::entityTypeManager()->getDefinitions();
diff --git a/core/modules/views/tests/src/Kernel/ViewsDataTest.php b/core/modules/views/tests/src/Kernel/ViewsDataTest.php
index 09ee97de82cb..3c7d436fa797 100644
--- a/core/modules/views/tests/src/Kernel/ViewsDataTest.php
+++ b/core/modules/views/tests/src/Kernel/ViewsDataTest.php
@@ -14,7 +14,7 @@ class ViewsDataTest extends ViewsKernelTestBase {
   /**
    * Tests that the service "views.views_data" is backend-overridable.
    */
-  public function testViewsViewsDataIsBackendOverridable() {
+  public function testViewsViewsDataIsBackendOverridable(): void {
     $definition = $this->container->getDefinition('views.views_data');
     $this->assertTrue($definition->hasTag('backend_overridable'));
   }
diff --git a/core/modules/views/tests/src/Kernel/ViewsHooksTest.php b/core/modules/views/tests/src/Kernel/ViewsHooksTest.php
index 3315c26e9371..37d0d4aed777 100644
--- a/core/modules/views/tests/src/Kernel/ViewsHooksTest.php
+++ b/core/modules/views/tests/src/Kernel/ViewsHooksTest.php
@@ -73,7 +73,7 @@ protected function setUp($import_test_views = TRUE): void {
   /**
    * Tests the hooks.
    */
-  public function testHooks() {
+  public function testHooks(): void {
     $view = Views::getView('test_view');
     $view->setDisplay();
 
@@ -113,7 +113,7 @@ public function testHooks() {
    * @see views_test_data_views_form_substitutions()
    * @see \Drupal\views\Form\ViewsFormMainForm::preRenderViewsForm()
    */
-  public function testViewsFormMainFormPreRender() {
+  public function testViewsFormMainFormPreRender(): void {
     $element = [
       'output' => [
         '#plain_text' => '<!--will-be-escaped--><!--will-be-not-escaped-->',
@@ -131,7 +131,7 @@ public function testViewsFormMainFormPreRender() {
   /**
    * Test that hook_views_invalidate_cache() is called when a view is deleted.
    */
-  public function testViewsInvalidateCacheOnDelete() {
+  public function testViewsInvalidateCacheOnDelete(): void {
     $this->container->get('state')->set('views_hook_test_views_invalidate_cache', FALSE);
     $view = $this->viewStorage->load('test_view');
     $view->delete();
diff --git a/core/modules/views/tests/src/Kernel/ViewsPreprocessTest.php b/core/modules/views/tests/src/Kernel/ViewsPreprocessTest.php
index eecd5c8128e3..3cac529801c0 100644
--- a/core/modules/views/tests/src/Kernel/ViewsPreprocessTest.php
+++ b/core/modules/views/tests/src/Kernel/ViewsPreprocessTest.php
@@ -36,7 +36,7 @@ protected function setUp($import_test_views = TRUE): void {
   /**
    * Tests css classes on displays are cleaned correctly.
    */
-  public function testCssClassCleaning() {
+  public function testCssClassCleaning(): void {
     \Drupal::service('theme_installer')->install(['test_theme']);
     $this->config('system.theme')->set('default', 'test_theme')->save();
 
@@ -64,7 +64,7 @@ public function testCssClassCleaning() {
    *
    * @covers ::template_preprocess_views_mini_pager
    */
-  public function testEmptyPaginationHeadingLevelSet() {
+  public function testEmptyPaginationHeadingLevelSet(): void {
     require_once $this->root . '/core/modules/views/views.theme.inc';
     $variables = [
       'tags' => [],
@@ -83,7 +83,7 @@ public function testEmptyPaginationHeadingLevelSet() {
    *
    * @covers ::template_preprocess_views_mini_pager
    */
-  public function testPaginationHeadingLevelNotSet() {
+  public function testPaginationHeadingLevelNotSet(): void {
     require_once $this->root . '/core/modules/views/views.theme.inc';
     $variables = [
       'tags' => [],
@@ -101,7 +101,7 @@ public function testPaginationHeadingLevelNotSet() {
    *
    * @covers ::template_preprocess_views_mini_pager
    */
-  public function testPaginationHeadingLevelSet() {
+  public function testPaginationHeadingLevelSet(): void {
     require_once $this->root . '/core/modules/views/views.theme.inc';
     $variables = [
       'tags' => [],
diff --git a/core/modules/views/tests/src/Kernel/ViewsTemplateTest.php b/core/modules/views/tests/src/Kernel/ViewsTemplateTest.php
index 610852c5fed6..de3656686b31 100644
--- a/core/modules/views/tests/src/Kernel/ViewsTemplateTest.php
+++ b/core/modules/views/tests/src/Kernel/ViewsTemplateTest.php
@@ -35,7 +35,7 @@ public function register(ContainerBuilder $container) {
   /**
    * Tests render functionality.
    */
-  public function testTemplate() {
+  public function testTemplate(): void {
     // Make sure that the rendering just calls the preprocess function once.
     $output = Views::getView('test_view_display_template')->preview();
     $renderer = $this->container->get('renderer');
@@ -48,7 +48,7 @@ public function testTemplate() {
    * @covers views_theme_suggestions_container_alter
    * @throws \Exception
    */
-  public function testThemeSuggestionsContainerAlter() {
+  public function testThemeSuggestionsContainerAlter(): void {
     $build = [
       '#type' => 'view',
       '#name' => 'test_page_display',
diff --git a/core/modules/views/tests/src/Kernel/Wizard/WizardPluginBaseKernelTest.php b/core/modules/views/tests/src/Kernel/Wizard/WizardPluginBaseKernelTest.php
index 5cf357417284..8991c3915428 100644
--- a/core/modules/views/tests/src/Kernel/Wizard/WizardPluginBaseKernelTest.php
+++ b/core/modules/views/tests/src/Kernel/Wizard/WizardPluginBaseKernelTest.php
@@ -47,7 +47,7 @@ protected function setUp($import_test_views = TRUE): void {
    *
    * @see \Drupal\views\Plugin\views\wizard\WizardPluginBase
    */
-  public function testCreateView() {
+  public function testCreateView(): void {
     $form = [];
     $form_state = new FormState();
     $form = $this->wizard->buildForm($form, $form_state);
diff --git a/core/modules/views/tests/src/Unit/Controller/ViewAjaxControllerTest.php b/core/modules/views/tests/src/Unit/Controller/ViewAjaxControllerTest.php
index 10ec7fc29516..129613f892be 100644
--- a/core/modules/views/tests/src/Unit/Controller/ViewAjaxControllerTest.php
+++ b/core/modules/views/tests/src/Unit/Controller/ViewAjaxControllerTest.php
@@ -126,7 +126,7 @@ protected function setUp(): void {
   /**
    * Tests missing view_name and view_display_id.
    */
-  public function testMissingViewName() {
+  public function testMissingViewName(): void {
     $request = new Request();
     $this->expectException(NotFoundHttpException::class);
     $this->viewAjaxController->ajaxView($request);
@@ -135,7 +135,7 @@ public function testMissingViewName() {
   /**
    * Tests non-existent view with view_name and view_display_id.
    */
-  public function testMissingView() {
+  public function testMissingView(): void {
     $request = new Request();
     $request->request->set('view_name', 'test_view');
     $request->request->set('view_display_id', 'page_1');
@@ -152,7 +152,7 @@ public function testMissingView() {
   /**
    * Tests a view without having access to it.
    */
-  public function testAccessDeniedView() {
+  public function testAccessDeniedView(): void {
     $request = new Request();
     $request->request->set('view_name', 'test_view');
     $request->request->set('view_display_id', 'page_1');
@@ -185,7 +185,7 @@ public function testAccessDeniedView() {
   /**
    * Tests a valid view without arguments pagers etc.
    */
-  public function testAjaxView() {
+  public function testAjaxView(): void {
     $request = new Request();
     $request->query->set('view_name', 'test_view');
     $request->query->set('view_display_id', 'page_1');
@@ -222,7 +222,7 @@ public function testAjaxView() {
   /**
    * Tests a valid view with a view_path with no slash.
    */
-  public function testAjaxViewViewPathNoSlash() {
+  public function testAjaxViewViewPathNoSlash(): void {
     $request = new Request();
     $request->query->set('view_name', 'test_view');
     $request->query->set('view_display_id', 'page_1');
@@ -251,7 +251,7 @@ public function testAjaxViewViewPathNoSlash() {
   /**
    * Tests a valid view without ajax enabled.
    */
-  public function testAjaxViewWithoutAjax() {
+  public function testAjaxViewWithoutAjax(): void {
     $request = new Request();
     $request->request->set('view_name', 'test_view');
     $request->request->set('view_display_id', 'page_1');
@@ -269,7 +269,7 @@ public function testAjaxViewWithoutAjax() {
   /**
    * Tests a valid view with arguments.
    */
-  public function testAjaxViewWithArguments() {
+  public function testAjaxViewWithArguments(): void {
     $request = new Request();
     $request->request->set('view_name', 'test_view');
     $request->request->set('view_display_id', 'page_1');
@@ -289,7 +289,7 @@ public function testAjaxViewWithArguments() {
   /**
    * Tests a valid view with arguments.
    */
-  public function testAjaxViewWithEmptyArguments() {
+  public function testAjaxViewWithEmptyArguments(): void {
     $request = new Request();
     $request->request->set('view_name', 'test_view');
     $request->request->set('view_display_id', 'page_1');
@@ -310,7 +310,7 @@ public function testAjaxViewWithEmptyArguments() {
   /**
    * Tests a valid view with arguments.
    */
-  public function testAjaxViewWithHtmlEntityArguments() {
+  public function testAjaxViewWithHtmlEntityArguments(): void {
     $request = new Request();
     $request->request->set('view_name', 'test_view');
     $request->request->set('view_display_id', 'page_1');
@@ -330,7 +330,7 @@ public function testAjaxViewWithHtmlEntityArguments() {
   /**
    * Tests a valid view with a pager.
    */
-  public function testAjaxViewWithPager() {
+  public function testAjaxViewWithPager(): void {
     $request = new Request();
     $request->request->set('view_name', 'test_view');
     $request->request->set('view_display_id', 'page_1');
diff --git a/core/modules/views/tests/src/Unit/EventSubscriber/RouteSubscriberTest.php b/core/modules/views/tests/src/Unit/EventSubscriber/RouteSubscriberTest.php
index 377a0c227f82..6d9801e66915 100644
--- a/core/modules/views/tests/src/Unit/EventSubscriber/RouteSubscriberTest.php
+++ b/core/modules/views/tests/src/Unit/EventSubscriber/RouteSubscriberTest.php
@@ -66,7 +66,7 @@ protected function setUp(): void {
   /**
    * @covers ::routeRebuildFinished
    */
-  public function testRouteRebuildFinished() {
+  public function testRouteRebuildFinished(): void {
     [$display_1, $display_2] = $this->setupMocks();
 
     $display_1->expects($this->once())
@@ -89,7 +89,7 @@ public function testRouteRebuildFinished() {
    *
    * @see \Drupal\views\EventSubscriber\RouteSubscriber::onAlterRoutes()
    */
-  public function testOnAlterRoutes() {
+  public function testOnAlterRoutes(): void {
     $collection = new RouteCollection();
     // The first route will be overridden later.
     $collection->add('test_route', new Route('test_route', ['_controller' => 'Drupal\Tests\Core\Controller\TestController']));
diff --git a/core/modules/views/tests/src/Unit/Plugin/Block/ViewsBlockTest.php b/core/modules/views/tests/src/Unit/Plugin/Block/ViewsBlockTest.php
index bbf8b8292ff3..d0d63479d980 100644
--- a/core/modules/views/tests/src/Unit/Plugin/Block/ViewsBlockTest.php
+++ b/core/modules/views/tests/src/Unit/Plugin/Block/ViewsBlockTest.php
@@ -137,7 +137,7 @@ protected function setUp(): void {
    *
    * @see \Drupal\views\Plugin\block\ViewsBlock::build()
    */
-  public function testBuild() {
+  public function testBuild(): void {
     $output = $this->randomMachineName(100);
     $build = ['view_build' => $output, '#view_id' => 'test_view', '#view_display_plugin_class' => '\Drupal\views\Plugin\views\display\Block', '#view_display_show_admin_links' => FALSE, '#view_display_plugin_id' => 'block', '#pre_rendered' => TRUE];
     $this->executable->expects($this->once())
@@ -160,7 +160,7 @@ public function testBuild() {
    *
    * @covers ::build
    */
-  public function testBuildEmpty() {
+  public function testBuildEmpty(): void {
     $build = ['view_build' => [], '#view_id' => 'test_view', '#view_display_plugin_class' => '\Drupal\views\Plugin\views\display\Block', '#view_display_show_admin_links' => FALSE, '#view_display_plugin_id' => 'block', '#pre_rendered' => TRUE, '#cache' => ['contexts' => ['user']]];
     $this->executable->expects($this->once())
       ->method('buildRenderable')
@@ -182,7 +182,7 @@ public function testBuildEmpty() {
    *
    * @see \Drupal\views\Plugin\block\ViewsBlock::build()
    */
-  public function testBuildFailed() {
+  public function testBuildFailed(): void {
     $output = FALSE;
     $this->executable->expects($this->once())
       ->method('buildRenderable')
diff --git a/core/modules/views/tests/src/Unit/Plugin/Derivative/ViewsLocalTaskTest.php b/core/modules/views/tests/src/Unit/Plugin/Derivative/ViewsLocalTaskTest.php
index e09ac60407eb..f9b941374a23 100644
--- a/core/modules/views/tests/src/Unit/Plugin/Derivative/ViewsLocalTaskTest.php
+++ b/core/modules/views/tests/src/Unit/Plugin/Derivative/ViewsLocalTaskTest.php
@@ -64,7 +64,7 @@ protected function setUp(): void {
    *
    * @see \Drupal\views\Plugin\Derivative\ViewsLocalTask::getDerivativeDefinitions()
    */
-  public function testGetDerivativeDefinitionsWithoutHookMenuViews() {
+  public function testGetDerivativeDefinitionsWithoutHookMenuViews(): void {
     $result = [];
     $this->localTaskDerivative->setApplicableMenuViews($result);
 
@@ -75,7 +75,7 @@ public function testGetDerivativeDefinitionsWithoutHookMenuViews() {
   /**
    * Tests fetching the derivatives on a view with without a local task.
    */
-  public function testGetDerivativeDefinitionsWithoutLocalTask() {
+  public function testGetDerivativeDefinitionsWithoutLocalTask(): void {
     $executable = $this->getMockBuilder('Drupal\views\ViewExecutable')
       ->disableOriginalConstructor()
       ->getMock();
@@ -114,7 +114,7 @@ public function testGetDerivativeDefinitionsWithoutLocalTask() {
   /**
    * Tests fetching the derivatives on a view with a default local task.
    */
-  public function testGetDerivativeDefinitionsWithLocalTask() {
+  public function testGetDerivativeDefinitionsWithLocalTask(): void {
     $executable = $this->getMockBuilder('Drupal\views\ViewExecutable')
       ->disableOriginalConstructor()
       ->getMock();
@@ -171,7 +171,7 @@ public function testGetDerivativeDefinitionsWithLocalTask() {
   /**
    * Tests fetching the derivatives on a view which overrides an existing route.
    */
-  public function testGetDerivativeDefinitionsWithOverrideRoute() {
+  public function testGetDerivativeDefinitionsWithOverrideRoute(): void {
     $executable = $this->getMockBuilder('Drupal\views\ViewExecutable')
       ->disableOriginalConstructor()
       ->getMock();
@@ -220,7 +220,7 @@ public function testGetDerivativeDefinitionsWithOverrideRoute() {
   /**
    * Tests fetching the derivatives on a view with a default local task.
    */
-  public function testGetDerivativeDefinitionsWithDefaultLocalTask() {
+  public function testGetDerivativeDefinitionsWithDefaultLocalTask(): void {
     $executable = $this->getMockBuilder('Drupal\views\ViewExecutable')
       ->disableOriginalConstructor()
       ->getMock();
@@ -293,7 +293,7 @@ public function testGetDerivativeDefinitionsWithDefaultLocalTask() {
    *
    * The parent is defined by another module, not views.
    */
-  public function testGetDerivativeDefinitionsWithExistingLocalTask() {
+  public function testGetDerivativeDefinitionsWithExistingLocalTask(): void {
     $executable = $this->getMockBuilder('Drupal\views\ViewExecutable')
       ->disableOriginalConstructor()
       ->getMock();
diff --git a/core/modules/views/tests/src/Unit/Plugin/HandlerBaseTest.php b/core/modules/views/tests/src/Unit/Plugin/HandlerBaseTest.php
index 31f5c9399834..a0b0b81fb571 100644
--- a/core/modules/views/tests/src/Unit/Plugin/HandlerBaseTest.php
+++ b/core/modules/views/tests/src/Unit/Plugin/HandlerBaseTest.php
@@ -29,7 +29,7 @@ protected function setUp(): void {
   /**
    * @covers ::getEntityType
    */
-  public function testGetEntityTypeForFieldOnBaseTable() {
+  public function testGetEntityTypeForFieldOnBaseTable(): void {
     $handler = new TestHandler([], 'test_handler', []);
     $handler->init($this->executable, $this->display);
 
@@ -51,7 +51,7 @@ public function testGetEntityTypeForFieldOnBaseTable() {
   /**
    * @covers ::getEntityType
    */
-  public function testGetEntityTypeForFieldWithRelationship() {
+  public function testGetEntityTypeForFieldWithRelationship(): void {
     $handler = new TestHandler([], 'test_handler', []);
 
     $options = ['relationship' => 'test_relationship'];
diff --git a/core/modules/views/tests/src/Unit/Plugin/area/EntityTest.php b/core/modules/views/tests/src/Unit/Plugin/area/EntityTest.php
index c7df3c222b3f..486238298869 100644
--- a/core/modules/views/tests/src/Unit/Plugin/area/EntityTest.php
+++ b/core/modules/views/tests/src/Unit/Plugin/area/EntityTest.php
@@ -157,7 +157,7 @@ public static function providerTestTokens() {
    * @covers ::defineOptions
    * @covers ::init
    */
-  public function testRenderWithId() {
+  public function testRenderWithId(): void {
     $this->setupEntityTypeManager();
     $options = [
       'target' => 1,
@@ -193,7 +193,7 @@ public function testRenderWithId() {
    *
    * @dataProvider providerTestTokens
    */
-  public function testRenderWithIdAndToken($token, $id) {
+  public function testRenderWithIdAndToken($token, $id): void {
     $this->setupEntityTypeManager();
     $options = [
       'target' => $token,
@@ -232,7 +232,7 @@ public function testRenderWithIdAndToken($token, $id) {
    * @covers ::defineOptions
    * @covers ::init
    */
-  public function testRenderWithUuid() {
+  public function testRenderWithUuid(): void {
     $this->setupEntityTypeManager();
     $uuid = '1d52762e-b9d8-4177-908f-572d1a5845a4';
     $options = [
@@ -265,7 +265,7 @@ public function testRenderWithUuid() {
    *
    * @dataProvider providerTestTokens
    */
-  public function testCalculateDependenciesWithPlaceholder($token, $id) {
+  public function testCalculateDependenciesWithPlaceholder($token, $id): void {
     $this->setupEntityTypeManager();
 
     $options = [
@@ -279,7 +279,7 @@ public function testCalculateDependenciesWithPlaceholder($token, $id) {
   /**
    * @covers ::calculateDependencies
    */
-  public function testCalculateDependenciesWithUuid() {
+  public function testCalculateDependenciesWithUuid(): void {
     $this->setupEntityTypeManager();
 
     $uuid = '1d52762e-b9d8-4177-908f-572d1a5845a4';
@@ -311,7 +311,7 @@ public function testCalculateDependenciesWithUuid() {
   /**
    * @covers ::calculateDependencies
    */
-  public function testCalculateDependenciesWithEntityId() {
+  public function testCalculateDependenciesWithEntityId(): void {
     $this->setupEntityTypeManager();
 
     $entity = $this->createMock('Drupal\Core\Entity\EntityInterface');
diff --git a/core/modules/views/tests/src/Unit/Plugin/area/MessagesTest.php b/core/modules/views/tests/src/Unit/Plugin/area/MessagesTest.php
index 1c81c8200189..bacb64876402 100644
--- a/core/modules/views/tests/src/Unit/Plugin/area/MessagesTest.php
+++ b/core/modules/views/tests/src/Unit/Plugin/area/MessagesTest.php
@@ -42,7 +42,7 @@ protected function setUp(): void {
    * @covers ::defineOptions
    * @covers ::render
    */
-  public function testRender() {
+  public function testRender(): void {
     // The handler is configured to show with empty views by default, so should
     // appear.
     $this->assertSame(['#type' => 'status_messages'], $this->messagesHandler->render());
diff --git a/core/modules/views/tests/src/Unit/Plugin/area/ResultTest.php b/core/modules/views/tests/src/Unit/Plugin/area/ResultTest.php
index 1ed0fddf035e..224eba343a47 100644
--- a/core/modules/views/tests/src/Unit/Plugin/area/ResultTest.php
+++ b/core/modules/views/tests/src/Unit/Plugin/area/ResultTest.php
@@ -58,7 +58,7 @@ protected function setUp(): void {
   /**
    * Tests the query method.
    */
-  public function testQuery() {
+  public function testQuery(): void {
     $this->assertNull($this->view->get_total_rows);
     // @total should set get_total_rows.
     $this->resultHandler->options['content'] = '@total';
@@ -83,7 +83,7 @@ public function testQuery() {
    *
    * @dataProvider providerTestResultArea
    */
-  public function testResultArea($content, $expected, $items_per_page = 0) {
+  public function testResultArea($content, $expected, $items_per_page = 0): void {
     $this->setupViewPager($items_per_page);
     $this->resultHandler->options['content'] = $content;
     $this->assertEquals(['#markup' => $expected], $this->resultHandler->render());
diff --git a/core/modules/views/tests/src/Unit/Plugin/area/ViewTest.php b/core/modules/views/tests/src/Unit/Plugin/area/ViewTest.php
index b8d2a81725c6..d97e70eaa3f5 100644
--- a/core/modules/views/tests/src/Unit/Plugin/area/ViewTest.php
+++ b/core/modules/views/tests/src/Unit/Plugin/area/ViewTest.php
@@ -42,7 +42,7 @@ protected function setUp(): void {
   /**
    * @covers ::calculateDependencies
    */
-  public function testCalculateDependencies() {
+  public function testCalculateDependencies(): void {
     /** @var \Drupal\views\Entity\View $view_this */
     /** @var \Drupal\views\Entity\View $view_other */
     $view_this = $this->createMock('Drupal\views\ViewEntityInterface');
diff --git a/core/modules/views/tests/src/Unit/Plugin/argument_default/QueryParameterTest.php b/core/modules/views/tests/src/Unit/Plugin/argument_default/QueryParameterTest.php
index 796b4c7b03fe..fe0d5f802920 100644
--- a/core/modules/views/tests/src/Unit/Plugin/argument_default/QueryParameterTest.php
+++ b/core/modules/views/tests/src/Unit/Plugin/argument_default/QueryParameterTest.php
@@ -20,7 +20,7 @@ class QueryParameterTest extends UnitTestCase {
    * @covers ::getArgument
    * @dataProvider providerGetArgument
    */
-  public function testGetArgument($options, Request $request, $expected) {
+  public function testGetArgument($options, Request $request, $expected): void {
     $view = $this->getMockBuilder('Drupal\views\ViewExecutable')
       ->disableOriginalConstructor()
       ->onlyMethods([])
diff --git a/core/modules/views/tests/src/Unit/Plugin/argument_default/RawTest.php b/core/modules/views/tests/src/Unit/Plugin/argument_default/RawTest.php
index 83a370ed868f..33ad36dcf1c0 100644
--- a/core/modules/views/tests/src/Unit/Plugin/argument_default/RawTest.php
+++ b/core/modules/views/tests/src/Unit/Plugin/argument_default/RawTest.php
@@ -22,7 +22,7 @@ class RawTest extends UnitTestCase {
    *
    * @see \Drupal\views\Plugin\views\argument_default\Raw::getArgument()
    */
-  public function testGetArgument() {
+  public function testGetArgument(): void {
     $view = $this->getMockBuilder('Drupal\views\ViewExecutable')
       ->disableOriginalConstructor()
       ->getMock();
diff --git a/core/modules/views/tests/src/Unit/Plugin/argument_validator/EntityTest.php b/core/modules/views/tests/src/Unit/Plugin/argument_validator/EntityTest.php
index e10477d46081..533e579e720a 100644
--- a/core/modules/views/tests/src/Unit/Plugin/argument_validator/EntityTest.php
+++ b/core/modules/views/tests/src/Unit/Plugin/argument_validator/EntityTest.php
@@ -123,7 +123,7 @@ protected function setUp(): void {
    *
    * @see \Drupal\views\Plugin\views\argument_validator\Entity::validateArgument()
    */
-  public function testValidateArgumentNoAccess() {
+  public function testValidateArgumentNoAccess(): void {
     $options = [];
     $options['access'] = FALSE;
     $options['bundles'] = [];
@@ -143,7 +143,7 @@ public function testValidateArgumentNoAccess() {
    *
    * @see \Drupal\views\Plugin\views\argument_validator\Entity::validateArgument()
    */
-  public function testValidateArgumentAccess() {
+  public function testValidateArgumentAccess(): void {
     $options = [];
     $options['access'] = TRUE;
     $options['bundles'] = [];
@@ -171,7 +171,7 @@ public function testValidateArgumentAccess() {
   /**
    * Tests the validate argument method with bundle checking.
    */
-  public function testValidateArgumentBundle() {
+  public function testValidateArgumentBundle(): void {
     $options = [];
     $options['access'] = FALSE;
     $options['bundles'] = ['test_bundle' => 1];
@@ -190,7 +190,7 @@ public function testValidateArgumentBundle() {
   /**
    * @covers ::calculateDependencies
    */
-  public function testCalculateDependencies() {
+  public function testCalculateDependencies(): void {
     // Create an entity type manager, storage, entity type, and entity to mock the
     // loading of entities providing bundles.
     $entity_type_manager = $this->createMock(EntityTypeManagerInterface::class);
@@ -238,7 +238,7 @@ public function testCalculateDependencies() {
   /**
    * Tests the validate argument method with multiple argument splitting.
    */
-  public function testValidateArgumentMultiple() {
+  public function testValidateArgumentMultiple(): void {
     $options = [];
     $options['access'] = TRUE;
     $options['bundles'] = [];
diff --git a/core/modules/views/tests/src/Unit/Plugin/display/PageTest.php b/core/modules/views/tests/src/Unit/Plugin/display/PageTest.php
index c801ec556fcf..b2af4babff57 100644
--- a/core/modules/views/tests/src/Unit/Plugin/display/PageTest.php
+++ b/core/modules/views/tests/src/Unit/Plugin/display/PageTest.php
@@ -17,7 +17,7 @@ class PageTest extends UnitTestCase {
   /**
    * @covers ::buildBasicRenderable
    */
-  public function testBuildBasicRenderable() {
+  public function testBuildBasicRenderable(): void {
     $route = new Route('/test-view');
     $route->setDefault('view_id', 'test_view');
     $route->setOption('_view_display_plugin_id', 'page');
@@ -33,7 +33,7 @@ public function testBuildBasicRenderable() {
   /**
    * @covers ::buildBasicRenderable
    */
-  public function testBuildBasicRenderableWithMissingRoute() {
+  public function testBuildBasicRenderableWithMissingRoute(): void {
     $this->expectException(\BadFunctionCallException::class);
     Page::buildBasicRenderable('test_view', 'page_1', []);
   }
diff --git a/core/modules/views/tests/src/Unit/Plugin/display/PathPluginBaseTest.php b/core/modules/views/tests/src/Unit/Plugin/display/PathPluginBaseTest.php
index ae4701156864..f6b12ea391e6 100644
--- a/core/modules/views/tests/src/Unit/Plugin/display/PathPluginBaseTest.php
+++ b/core/modules/views/tests/src/Unit/Plugin/display/PathPluginBaseTest.php
@@ -105,7 +105,7 @@ public function setupContainer() {
    *
    * @see \Drupal\views\Plugin\views\display\PathPluginBase::collectRoutes()
    */
-  public function testCollectRoutes() {
+  public function testCollectRoutes(): void {
     [$view] = $this->setupViewExecutableAccessPlugin();
 
     $display = [];
@@ -133,7 +133,7 @@ public function testCollectRoutes() {
    *
    * @see \Drupal\views\Plugin\views\display\PathPluginBase::collectRoutes()
    */
-  public function testCollectRoutesWithDisplayReturnResponse() {
+  public function testCollectRoutesWithDisplayReturnResponse(): void {
     [$view] = $this->setupViewExecutableAccessPlugin();
 
     $display = [];
@@ -160,7 +160,7 @@ public function testCollectRoutesWithDisplayReturnResponse() {
    *
    * @see \Drupal\views\Plugin\views\display\PathPluginBase::collectRoutes()
    */
-  public function testCollectRoutesWithArguments() {
+  public function testCollectRoutesWithArguments(): void {
     [$view] = $this->setupViewExecutableAccessPlugin();
 
     $display = [];
@@ -188,7 +188,7 @@ public function testCollectRoutesWithArguments() {
    *
    * @see \Drupal\views\Plugin\views\display\PathPluginBase::collectRoutes()
    */
-  public function testCollectRoutesWithArgumentsNotSpecifiedInPath() {
+  public function testCollectRoutesWithArgumentsNotSpecifiedInPath(): void {
     [$view] = $this->setupViewExecutableAccessPlugin();
 
     $display = [];
@@ -217,7 +217,7 @@ public function testCollectRoutesWithArgumentsNotSpecifiedInPath() {
   /**
    * Tests the collect routes method with an alternative route name in the UI.
    */
-  public function testCollectRoutesWithSpecialRouteName() {
+  public function testCollectRoutesWithSpecialRouteName(): void {
     [$view] = $this->setupViewExecutableAccessPlugin();
 
     $display = [];
@@ -243,7 +243,7 @@ public function testCollectRoutesWithSpecialRouteName() {
   /**
    * Tests the alter route method.
    */
-  public function testAlterRoute() {
+  public function testAlterRoute(): void {
     $collection = new RouteCollection();
     $collection->add('test_route', new Route('test_route', ['_controller' => 'Drupal\Tests\Core\Controller\TestController::content']));
     $route_2 = new Route('test_route/example', ['_controller' => 'Drupal\Tests\Core\Controller\TestController::content']);
@@ -280,7 +280,7 @@ public function testAlterRoute() {
   /**
    * Tests the altering of a REST route.
    */
-  public function testAlterPostRestRoute() {
+  public function testAlterPostRestRoute(): void {
     $collection = new RouteCollection();
     $route = new Route('test_route', ['_controller' => 'Drupal\Tests\Core\Controller\TestController::content']);
     $route->setMethods(['POST']);
@@ -318,7 +318,7 @@ public function testAlterPostRestRoute() {
   /**
    * Tests the altering of a REST route.
    */
-  public function testGetRestRoute() {
+  public function testGetRestRoute(): void {
     $collection = new RouteCollection();
     $route = new Route('test_route', ['_controller' => 'Drupal\Tests\Core\Controller\TestController::content']);
     $route->setMethods(['GET']);
@@ -357,7 +357,7 @@ public function testGetRestRoute() {
   /**
    * Tests the alter route method with preexisting title callback.
    */
-  public function testAlterRouteWithAlterCallback() {
+  public function testAlterRouteWithAlterCallback(): void {
     $collection = new RouteCollection();
     $collection->add('test_route', new Route('test_route', ['_controller' => 'Drupal\Tests\Core\Controller\TestController::content', '_title_callback' => '\Drupal\Tests\views\Unit\Plugin\display\TestController::testTitle']));
     $route_2 = new Route('test_route/example', ['_controller' => 'Drupal\Tests\Core\Controller\TestController::content']);
@@ -396,7 +396,7 @@ public function testAlterRouteWithAlterCallback() {
    *
    * @see \Drupal\views\Plugin\views\display\PathPluginBase::collectRoutes()
    */
-  public function testCollectRoutesWithNamedParameters() {
+  public function testCollectRoutesWithNamedParameters(): void {
     /** @var \Drupal\views\ViewExecutable|\PHPUnit\Framework\MockObject\MockObject $view */
     [$view] = $this->setupViewExecutableAccessPlugin();
 
@@ -429,7 +429,7 @@ public function testCollectRoutesWithNamedParameters() {
   /**
    * Tests altering routes with parameters in the overridden route.
    */
-  public function testAlterRoutesWithParameters() {
+  public function testAlterRoutesWithParameters(): void {
     $collection = new RouteCollection();
     $collection->add('test_route', new Route('test_route/{parameter}', ['_controller' => 'Drupal\Tests\Core\Controller\TestController::content']));
 
@@ -466,7 +466,7 @@ public function testAlterRoutesWithParameters() {
   /**
    * Tests altering routes with parameters and upcasting information.
    */
-  public function testAlterRoutesWithParametersAndUpcasting() {
+  public function testAlterRoutesWithParametersAndUpcasting(): void {
     $collection = new RouteCollection();
     $collection->add('test_route', new Route('test_route/{parameter}', ['_controller' => 'Drupal\Tests\Core\Controller\TestController::content'], [], ['parameters' => ['taxonomy_term' => 'entity:entity_test']]));
 
@@ -504,7 +504,7 @@ public function testAlterRoutesWithParametersAndUpcasting() {
   /**
    * Tests altering routes with optional parameters in the overridden route.
    */
-  public function testAlterRoutesWithOptionalParameters() {
+  public function testAlterRoutesWithOptionalParameters(): void {
     $collection = new RouteCollection();
     $collection->add('test_route', new Route('test_route/{parameter}', ['_controller' => 'Drupal\Tests\Core\Controller\TestController::content']));
 
@@ -539,7 +539,7 @@ public function testAlterRoutesWithOptionalParameters() {
   /**
    * Tests the getRouteName method.
    */
-  public function testGetRouteName() {
+  public function testGetRouteName(): void {
     [$view] = $this->setupViewExecutableAccessPlugin();
 
     $display = [];
diff --git a/core/modules/views/tests/src/Unit/Plugin/field/CounterTest.php b/core/modules/views/tests/src/Unit/Plugin/field/CounterTest.php
index 63c61c303242..f3ed9a64f6b8 100644
--- a/core/modules/views/tests/src/Unit/Plugin/field/CounterTest.php
+++ b/core/modules/views/tests/src/Unit/Plugin/field/CounterTest.php
@@ -116,7 +116,7 @@ public static function providerRowIndexes() {
    *
    * @dataProvider providerRowIndexes
    */
-  public function testSimpleCounter($i) {
+  public function testSimpleCounter($i): void {
     $counter_handler = new Counter([], 'counter', $this->definition);
     $options = [];
     $counter_handler->init($this->view, $this->display, $options);
@@ -138,7 +138,7 @@ public function testSimpleCounter($i) {
    *
    * @dataProvider providerRowIndexes
    */
-  public function testCounterRandomStart($i) {
+  public function testCounterRandomStart($i): void {
     // Setup a counter field with a random start.
     $rand_start = rand(5, 10);
     $counter_handler = new Counter([], 'counter', $this->definition);
@@ -164,7 +164,7 @@ public function testCounterRandomStart($i) {
    *
    * @dataProvider providerRowIndexes
    */
-  public function testCounterRandomPagerOffset($i) {
+  public function testCounterRandomPagerOffset($i): void {
     // Setup a counter field with a pager with a random offset.
     $offset = 3;
     $this->pager->setOffset($offset);
@@ -193,7 +193,7 @@ public function testCounterRandomPagerOffset($i) {
    *
    * @dataProvider providerRowIndexes
    */
-  public function testCounterSecondPage($i) {
+  public function testCounterSecondPage($i): void {
     $offset = 3;
     // Setup a pager on the second page.
     $this->pager->setOffset($offset);
diff --git a/core/modules/views/tests/src/Unit/Plugin/field/FieldPluginBaseTest.php b/core/modules/views/tests/src/Unit/Plugin/field/FieldPluginBaseTest.php
index f1635f29a726..65c1475ce83b 100644
--- a/core/modules/views/tests/src/Unit/Plugin/field/FieldPluginBaseTest.php
+++ b/core/modules/views/tests/src/Unit/Plugin/field/FieldPluginBaseTest.php
@@ -211,7 +211,7 @@ protected function setupDisplayWithEmptyArgumentsAndFields() {
    *
    * @covers ::renderAsLink
    */
-  public function testRenderAsLinkWithoutPath() {
+  public function testRenderAsLinkWithoutPath(): void {
     $alter = [
       'make_link' => TRUE,
     ];
@@ -237,7 +237,7 @@ public function testRenderAsLinkWithoutPath() {
    * @dataProvider providerTestRenderTrimmedWithMoreLinkAndPath
    * @covers ::renderText
    */
-  public function testRenderTrimmedWithMoreLinkAndPath($path, $url) {
+  public function testRenderTrimmedWithMoreLinkAndPath($path, $url): void {
     $alter = [
       'trim' => TRUE,
       'max_length' => 7,
@@ -297,7 +297,7 @@ public static function providerTestRenderTrimmedWithMoreLinkAndPath() {
    *
    * @covers ::renderText
    */
-  public function testRenderNoResult() {
+  public function testRenderNoResult(): void {
     $this->setupDisplayWithEmptyArgumentsAndFields();
     $field = $this->setupTestField(['empty' => 'This <strong>should work</strong>.']);
     $field->field_alias = 'key';
@@ -315,7 +315,7 @@ public function testRenderNoResult() {
    * @dataProvider providerTestRenderAsLinkWithPathAndOptions
    * @covers ::renderAsLink
    */
-  public function testRenderAsLinkWithPathAndOptions($path, $alter, $final_html) {
+  public function testRenderAsLinkWithPathAndOptions($path, $alter, $final_html): void {
     $alter += [
       'make_link' => TRUE,
       'path' => $path,
@@ -386,7 +386,7 @@ public static function providerTestRenderAsLinkWithPathAndOptions() {
    * @dataProvider providerTestRenderAsLinkWithUrlAndOptions
    * @covers ::renderAsLink
    */
-  public function testRenderAsLinkWithUrlAndOptions(Url $url, $alter, Url $expected_url, $url_path, Url $expected_link_url, $final_html) {
+  public function testRenderAsLinkWithUrlAndOptions(Url $url, $alter, Url $expected_url, $url_path, Url $expected_link_url, $final_html): void {
     $alter += [
       'make_link' => TRUE,
       'url' => $url,
@@ -526,7 +526,7 @@ public static function providerTestRenderAsLinkWithUrlAndOptions() {
    * @dataProvider providerTestRenderAsLinkWithPathAndTokens
    * @covers ::renderAsLink
    */
-  public function testRenderAsLinkWithPathAndTokens($path, $tokens, $link_html) {
+  public function testRenderAsLinkWithPathAndTokens($path, $tokens, $link_html): void {
     $alter = [
       'make_link' => TRUE,
       'path' => $path,
@@ -586,7 +586,7 @@ public static function providerTestRenderAsLinkWithPathAndTokens() {
    * @dataProvider providerTestRenderAsExternalLinkWithPathAndTokens
    * @covers ::renderAsLink
    */
-  public function testRenderAsExternalLinkWithPathAndTokens($path, $tokens, $link_html, $context) {
+  public function testRenderAsExternalLinkWithPathAndTokens($path, $tokens, $link_html, $context): void {
     $alter = [
       'make_link' => TRUE,
       'path' => $path,
@@ -652,7 +652,7 @@ protected function setupTestField(array $options = []) {
   /**
    * @covers ::getRenderTokens
    */
-  public function testGetRenderTokensWithoutFieldsAndArguments() {
+  public function testGetRenderTokensWithoutFieldsAndArguments(): void {
     $field = $this->setupTestField();
 
     $this->display->expects($this->any())
@@ -668,7 +668,7 @@ public function testGetRenderTokensWithoutFieldsAndArguments() {
   /**
    * @covers ::getRenderTokens
    */
-  public function testGetRenderTokensWithoutArguments() {
+  public function testGetRenderTokensWithoutArguments(): void {
     $field = $this->setupTestField(['id' => 'id']);
 
     $field->last_render = 'last rendered output';
@@ -685,7 +685,7 @@ public function testGetRenderTokensWithoutArguments() {
   /**
    * @covers ::getRenderTokens
    */
-  public function testGetRenderTokensWithArguments() {
+  public function testGetRenderTokensWithArguments(): void {
     $field = $this->setupTestField(['id' => 'id']);
     $field->view->args = ['argument value'];
     $field->view->build_info['substitutions']['{{ arguments.name }}'] = 'argument value';
@@ -817,7 +817,7 @@ public static function providerTestGetRenderTokensWithQuery(): array {
    * @covers ::elementLabelClasses
    * @covers ::elementWrapperClasses
    */
-  public function testElementClassesWithTokens() {
+  public function testElementClassesWithTokens(): void {
     $functions = [
       'elementClasses' => 'element_class',
       'elementLabelClasses' => 'element_label_class',
diff --git a/core/modules/views/tests/src/Unit/Plugin/field/FieldTest.php b/core/modules/views/tests/src/Unit/Plugin/field/FieldTest.php
index a6eeea7bdfd0..c9c04a97d893 100644
--- a/core/modules/views/tests/src/Unit/Plugin/field/FieldTest.php
+++ b/core/modules/views/tests/src/Unit/Plugin/field/FieldTest.php
@@ -125,7 +125,7 @@ protected function setUp(): void {
   /**
    * @covers ::__construct
    */
-  public function testConstruct() {
+  public function testConstruct(): void {
     $definition = [
       'entity_type' => 'test_entity',
       // Just provide 'entity field' as definition. This is how EntityViewsData
@@ -140,7 +140,7 @@ public function testConstruct() {
   /**
    * @covers ::defineOptions
    */
-  public function testDefineOptionsWithNoOptions() {
+  public function testDefineOptionsWithNoOptions(): void {
     $definition = [
       'entity_type' => 'test_entity',
       'field_name' => 'title',
@@ -167,7 +167,7 @@ public function testDefineOptionsWithNoOptions() {
   /**
    * @covers ::defineOptions
    */
-  public function testDefineOptionsWithDefaultFormatterOnFieldDefinition() {
+  public function testDefineOptionsWithDefaultFormatterOnFieldDefinition(): void {
     $definition = [
       'entity_type' => 'test_entity',
       'field_name' => 'title',
@@ -195,7 +195,7 @@ public function testDefineOptionsWithDefaultFormatterOnFieldDefinition() {
   /**
    * @covers ::defineOptions
    */
-  public function testDefineOptionsWithDefaultFormatterOnFieldType() {
+  public function testDefineOptionsWithDefaultFormatterOnFieldType(): void {
     $definition = [
       'entity_type' => 'test_entity',
       'field_name' => 'title',
@@ -222,7 +222,7 @@ public function testDefineOptionsWithDefaultFormatterOnFieldType() {
   /**
    * @covers ::calculateDependencies
    */
-  public function testCalculateDependenciesWithBaseField() {
+  public function testCalculateDependenciesWithBaseField(): void {
     $definition = [
       'entity_type' => 'test_entity',
       'field_name' => 'title',
@@ -244,7 +244,7 @@ public function testCalculateDependenciesWithBaseField() {
   /**
    * @covers ::calculateDependencies
    */
-  public function testCalculateDependenciesWithConfiguredField() {
+  public function testCalculateDependenciesWithConfiguredField(): void {
     $definition = [
       'entity_type' => 'test_entity',
       'field_name' => 'body',
@@ -270,7 +270,7 @@ public function testCalculateDependenciesWithConfiguredField() {
   /**
    * @covers ::access
    */
-  public function testAccess() {
+  public function testAccess(): void {
     $definition = [
       'entity_type' => 'test_entity',
       'field_name' => 'title',
@@ -321,7 +321,7 @@ public function testAccess() {
    * @param string $order
    *   The sort order.
    */
-  public function testClickSortWithOutConfiguredColumn($order) {
+  public function testClickSortWithOutConfiguredColumn($order): void {
     $definition = [
       'entity_type' => 'test_entity',
       'field_name' => 'title',
@@ -343,7 +343,7 @@ public function testClickSortWithOutConfiguredColumn($order) {
    *
    * @covers ::clickSort
    */
-  public function testClickSortWithBaseField($order) {
+  public function testClickSortWithBaseField($order): void {
     $definition = [
       'entity_type' => 'test_entity',
       'field_name' => 'title',
@@ -403,7 +403,7 @@ public function testClickSortWithBaseField($order) {
    *
    * @covers ::clickSort
    */
-  public function testClickSortWithConfiguredField($order) {
+  public function testClickSortWithConfiguredField($order): void {
     $definition = [
       'entity_type' => 'test_entity',
       'field_name' => 'body',
@@ -458,7 +458,7 @@ public function testClickSortWithConfiguredField($order) {
   /**
    * @covers ::query
    */
-  public function testQueryWithGroupByForBaseField() {
+  public function testQueryWithGroupByForBaseField(): void {
     $definition = [
       'entity_type' => 'test_entity',
       'field_name' => 'title',
@@ -520,7 +520,7 @@ public function testQueryWithGroupByForBaseField() {
   /**
    * @covers ::query
    */
-  public function testQueryWithGroupByForConfigField() {
+  public function testQueryWithGroupByForConfigField(): void {
     $definition = [
       'entity_type' => 'test_entity',
       'field_name' => 'body',
@@ -584,7 +584,7 @@ public function testQueryWithGroupByForConfigField() {
    *
    * @dataProvider providerTestPrepareItemsByDelta
    */
-  public function testPrepareItemsByDelta(array $options, array $expected_values) {
+  public function testPrepareItemsByDelta(array $options, array $expected_values): void {
     $definition = [
       'entity_type' => 'test_entity',
       'field_name' => 'integer',
diff --git a/core/modules/views/tests/src/Unit/Plugin/filter/FilterPluginBaseTest.php b/core/modules/views/tests/src/Unit/Plugin/filter/FilterPluginBaseTest.php
index 6ef76466f48d..0c9990c81315 100644
--- a/core/modules/views/tests/src/Unit/Plugin/filter/FilterPluginBaseTest.php
+++ b/core/modules/views/tests/src/Unit/Plugin/filter/FilterPluginBaseTest.php
@@ -18,7 +18,7 @@ class FilterPluginBaseTest extends UnitTestCase {
    *
    * @dataProvider acceptExposedInputProvider
    */
-  public function testAcceptExposedInput(bool $expected_result, array $options, array $input) {
+  public function testAcceptExposedInput(bool $expected_result, array $options, array $input): void {
     $definition = [
       'title' => 'Accept exposed input Test',
       'group' => 'Test',
diff --git a/core/modules/views/tests/src/Unit/Plugin/filter/InOperatorTest.php b/core/modules/views/tests/src/Unit/Plugin/filter/InOperatorTest.php
index 7a208c3b0a95..dd0fea7dd871 100644
--- a/core/modules/views/tests/src/Unit/Plugin/filter/InOperatorTest.php
+++ b/core/modules/views/tests/src/Unit/Plugin/filter/InOperatorTest.php
@@ -16,7 +16,7 @@ class InOperatorTest extends UnitTestCase {
   /**
    * @covers ::validate
    */
-  public function testValidate() {
+  public function testValidate(): void {
     $definition = [
       'title' => 'Is InOperator Test',
       'group' => 'Test',
diff --git a/core/modules/views/tests/src/Unit/Plugin/pager/PagerPluginBaseTest.php b/core/modules/views/tests/src/Unit/Plugin/pager/PagerPluginBaseTest.php
index e8906f874fb1..6c2cb0ca5639 100644
--- a/core/modules/views/tests/src/Unit/Plugin/pager/PagerPluginBaseTest.php
+++ b/core/modules/views/tests/src/Unit/Plugin/pager/PagerPluginBaseTest.php
@@ -53,7 +53,7 @@ protected function setUp(): void {
    *
    * @see \Drupal\views\Plugin\views\pager\PagerPluginBase::getItemsPerPage()
    */
-  public function testGetItemsPerPage() {
+  public function testGetItemsPerPage(): void {
     $this->assertEquals(5, $this->pager->getItemsPerPage());
   }
 
@@ -62,7 +62,7 @@ public function testGetItemsPerPage() {
    *
    * @see \Drupal\views\Plugin\views\pager\PagerPluginBase::setItemsPerPage()
    */
-  public function testSetItemsPerPage() {
+  public function testSetItemsPerPage(): void {
     $this->pager->setItemsPerPage(6);
     $this->assertEquals(6, $this->pager->getItemsPerPage());
   }
@@ -72,7 +72,7 @@ public function testSetItemsPerPage() {
    *
    * @see \Drupal\views\Plugin\views\pager\PagerPluginBase::getOffset()
    */
-  public function testGetOffset() {
+  public function testGetOffset(): void {
     $this->assertEquals(1, $this->pager->getOffset());
   }
 
@@ -81,7 +81,7 @@ public function testGetOffset() {
    *
    * @see \Drupal\views\Plugin\views\pager\PagerPluginBase::setOffset()
    */
-  public function testSetOffset() {
+  public function testSetOffset(): void {
     $this->pager->setOffset(2);
     $this->assertEquals(2, $this->pager->getOffset());
   }
@@ -91,7 +91,7 @@ public function testSetOffset() {
    *
    * @see \Drupal\views\Plugin\views\pager\PagerPluginBase::getCurrentPage()
    */
-  public function testGetCurrentPage() {
+  public function testGetCurrentPage(): void {
     $this->assertEquals(1, $this->pager->getCurrentPage());
   }
 
@@ -100,7 +100,7 @@ public function testGetCurrentPage() {
    *
    * @see \Drupal\views\Plugin\views\pager\PagerPluginBase::setCurrentPage()
    */
-  public function testSetCurrentPage() {
+  public function testSetCurrentPage(): void {
     $this->pager->setCurrentPage(2);
     $this->assertEquals(2, $this->pager->getCurrentPage());
 
@@ -117,7 +117,7 @@ public function testSetCurrentPage() {
    *
    * @see \Drupal\views\Plugin\views\pager\PagerPluginBase::getTotalItems()
    */
-  public function testGetTotalItems() {
+  public function testGetTotalItems(): void {
     // Should return 0 by default.
     $this->assertEquals(0, $this->pager->getTotalItems());
 
@@ -130,7 +130,7 @@ public function testGetTotalItems() {
    *
    * @see \Drupal\views\Plugin\views\pager\PagerPluginBase::getPagerId()
    */
-  public function testGetPagerId() {
+  public function testGetPagerId(): void {
     // Should return 0 if 'id' is not set.
     $this->assertEquals(0, $this->pager->getPagerId());
 
@@ -144,7 +144,7 @@ public function testGetPagerId() {
    *
    * @see \Drupal\views\Plugin\views\pager\PagerPluginBase::usePager()
    */
-  public function testUsePager() {
+  public function testUsePager(): void {
     $this->assertTrue($this->pager->usePager());
   }
 
@@ -153,7 +153,7 @@ public function testUsePager() {
    *
    * @see \Drupal\views\Plugin\views\pager\PagerPluginBase::useCountQuery()
    */
-  public function testUseCountQuery() {
+  public function testUseCountQuery(): void {
     $this->assertTrue($this->pager->useCountQuery());
   }
 
@@ -162,7 +162,7 @@ public function testUseCountQuery() {
    *
    * @see \Drupal\views\Plugin\views\pager\PagerPluginBase::usedExposed()
    */
-  public function testUsesExposed() {
+  public function testUsesExposed(): void {
     $this->assertFalse($this->pager->usesExposed());
   }
 
@@ -173,7 +173,7 @@ public function testUsesExposed() {
    *
    * @see \Drupal\views\Plugin\views\pager\PagerPluginBase::hasMoreRecords()
    */
-  public function testHasMoreRecords($items_per_page, $total_items, $current_page, $has_more_records) {
+  public function testHasMoreRecords($items_per_page, $total_items, $current_page, $has_more_records): void {
     $this->pager->setItemsPerPage($items_per_page);
     $this->pager->total_items = $total_items;
     $this->pager->setCurrentPage($current_page);
@@ -207,7 +207,7 @@ public static function providerTestHasMoreRecords() {
    *
    * @see \Drupal\views\Plugin\views\pager\PagerPluginBase::executeCountQuery()
    */
-  public function testExecuteCountQueryWithoutOffset() {
+  public function testExecuteCountQueryWithoutOffset(): void {
     $statement = $this->createMock('\Drupal\Tests\views\Unit\Plugin\pager\TestStatementInterface');
 
     $statement->expects($this->once())
@@ -231,7 +231,7 @@ public function testExecuteCountQueryWithoutOffset() {
    *
    * @see \Drupal\views\Plugin\views\pager\PagerPluginBase::executeCountQuery()
    */
-  public function testExecuteCountQueryWithOffset() {
+  public function testExecuteCountQueryWithOffset(): void {
     $statement = $this->createMock('\Drupal\Tests\views\Unit\Plugin\pager\TestStatementInterface');
 
     $statement->expects($this->once())
@@ -255,7 +255,7 @@ public function testExecuteCountQueryWithOffset() {
    *
    * @see \Drupal\views\Plugin\views\pager\PagerPluginBase::executeCountQuery()
    */
-  public function testExecuteCountQueryWithOffsetLargerThanResult() {
+  public function testExecuteCountQueryWithOffsetLargerThanResult(): void {
     $statement = $this->createMock(TestStatementInterface::class);
 
     $statement->expects($this->once())
diff --git a/core/modules/views/tests/src/Unit/Plugin/pager/SqlBaseTest.php b/core/modules/views/tests/src/Unit/Plugin/pager/SqlBaseTest.php
index a56d8e409d10..2a48cb4a81e7 100644
--- a/core/modules/views/tests/src/Unit/Plugin/pager/SqlBaseTest.php
+++ b/core/modules/views/tests/src/Unit/Plugin/pager/SqlBaseTest.php
@@ -68,7 +68,7 @@ protected function setUp(): void {
    *
    * @see \Drupal\views\Plugin\views\pager\SqlBase::query()
    */
-  public function testQuery() {
+  public function testQuery(): void {
     $request = new Request([
       'items_per_page' => 'All',
     ]);
diff --git a/core/modules/views/tests/src/Unit/Plugin/query/SqlTest.php b/core/modules/views/tests/src/Unit/Plugin/query/SqlTest.php
index a1878ee4451c..6daac05a3516 100644
--- a/core/modules/views/tests/src/Unit/Plugin/query/SqlTest.php
+++ b/core/modules/views/tests/src/Unit/Plugin/query/SqlTest.php
@@ -30,7 +30,7 @@ class SqlTest extends UnitTestCase {
    * @covers ::getCacheTags
    * @covers ::getAllEntities
    */
-  public function testGetCacheTags() {
+  public function testGetCacheTags(): void {
     $view = $this->prophesize('Drupal\views\ViewExecutable')->reveal();
     $entity_type_manager = $this->prophesize(EntityTypeManagerInterface::class);
     $date_sql = $this->prophesize(DateSqlInterface::class);
@@ -78,7 +78,7 @@ public function testGetCacheTags() {
    * @covers ::getCacheTags
    * @covers ::getAllEntities
    */
-  public function testGetCacheMaxAge() {
+  public function testGetCacheMaxAge(): void {
     $view = $this->prophesize('Drupal\views\ViewExecutable')->reveal();
     $entity_type_manager = $this->prophesize(EntityTypeManagerInterface::class);
     $date_sql = $this->prophesize(DateSqlInterface::class);
@@ -248,7 +248,7 @@ protected function setupEntityTypes($entities_by_type = [], $entity_revisions_by
    * @covers ::loadEntities
    * @covers ::assignEntitiesToResult
    */
-  public function testLoadEntitiesWithEmptyResult() {
+  public function testLoadEntitiesWithEmptyResult(): void {
     $view = $this->prophesize('Drupal\views\ViewExecutable')->reveal();
     $view_entity = $this->prophesize(ViewEntityInterface::class);
     $view_entity->get('base_table')->willReturn('entity_first');
@@ -272,7 +272,7 @@ public function testLoadEntitiesWithEmptyResult() {
    * @covers ::loadEntities
    * @covers ::assignEntitiesToResult
    */
-  public function testLoadEntitiesWithNoRelationshipAndNoRevision() {
+  public function testLoadEntitiesWithNoRelationshipAndNoRevision(): void {
     $view = $this->prophesize('Drupal\views\ViewExecutable')->reveal();
     $view_entity = $this->prophesize(ViewEntityInterface::class);
     $view_entity->get('base_table')->willReturn('entity_first');
@@ -330,7 +330,7 @@ protected function setupViewWithRelationships(ViewExecutable $view, $base = 'ent
    * @covers ::loadEntities
    * @covers ::assignEntitiesToResult
    */
-  public function testLoadEntitiesWithRelationship() {
+  public function testLoadEntitiesWithRelationship(): void {
     // We don't use prophecy, because prophecy enforces methods.
     $view = $this->getMockBuilder(ViewExecutable::class)->disableOriginalConstructor()->getMock();
     $this->setupViewWithRelationships($view);
@@ -390,7 +390,7 @@ public function testLoadEntitiesWithRelationship() {
    * @covers ::loadEntities
    * @covers ::assignEntitiesToResult
    */
-  public function testLoadEntitiesWithNonEntityRelationship() {
+  public function testLoadEntitiesWithNonEntityRelationship(): void {
     // We don't use prophecy, because prophecy enforces methods.
     $view = $this->getMockBuilder(ViewExecutable::class)->disableOriginalConstructor()->getMock();
     $this->setupViewWithRelationships($view, 'entity_first_field_data');
@@ -441,7 +441,7 @@ public function testLoadEntitiesWithNonEntityRelationship() {
    * @covers ::loadEntities
    * @covers ::assignEntitiesToResult
    */
-  public function testLoadEntitiesWithRevision() {
+  public function testLoadEntitiesWithRevision(): void {
     // We don't use prophecy, because prophecy enforces methods.
     $view = $this->getMockBuilder(ViewExecutable::class)
       ->disableOriginalConstructor()
@@ -488,7 +488,7 @@ public function testLoadEntitiesWithRevision() {
    * @covers ::loadEntities
    * @covers ::assignEntitiesToResult
    */
-  public function testLoadEntitiesWithRevisionOfSameEntityType() {
+  public function testLoadEntitiesWithRevisionOfSameEntityType(): void {
     // We don't use prophecy, because prophecy enforces methods.
     $view = $this->getMockBuilder(ViewExecutable::class)
       ->disableOriginalConstructor()
@@ -550,7 +550,7 @@ public function testLoadEntitiesWithRevisionOfSameEntityType() {
    * @covers ::loadEntities
    * @covers ::assignEntitiesToResult
    */
-  public function testLoadEntitiesWithRelationshipAndRevision() {
+  public function testLoadEntitiesWithRelationshipAndRevision(): void {
     // We don't use prophecy, because prophecy enforces methods.
     $view = $this->getMockBuilder(ViewExecutable::class)->disableOriginalConstructor()->getMock();
     $this->setupViewWithRelationships($view);
diff --git a/core/modules/views/tests/src/Unit/Plugin/views/display/BlockTest.php b/core/modules/views/tests/src/Unit/Plugin/views/display/BlockTest.php
index 29c3851b2ce3..0d72bf27b4ac 100644
--- a/core/modules/views/tests/src/Unit/Plugin/views/display/BlockTest.php
+++ b/core/modules/views/tests/src/Unit/Plugin/views/display/BlockTest.php
@@ -63,7 +63,7 @@ protected function setUp(): void {
   /**
    * Tests the build method with no overriding.
    */
-  public function testBuildNoOverride() {
+  public function testBuildNoOverride(): void {
     $this->executable->expects($this->never())
       ->method('setItemsPerPage');
 
@@ -77,7 +77,7 @@ public function testBuildNoOverride() {
   /**
    * Tests the build method with overriding items per page.
    */
-  public function testBuildOverride() {
+  public function testBuildOverride(): void {
     $this->executable->expects($this->once())
       ->method('setItemsPerPage')
       ->with(5);
diff --git a/core/modules/views/tests/src/Unit/Plugin/views/field/EntityOperationsUnitTest.php b/core/modules/views/tests/src/Unit/Plugin/views/field/EntityOperationsUnitTest.php
index 4e6dad459784..a1c2a78a99ee 100644
--- a/core/modules/views/tests/src/Unit/Plugin/views/field/EntityOperationsUnitTest.php
+++ b/core/modules/views/tests/src/Unit/Plugin/views/field/EntityOperationsUnitTest.php
@@ -85,14 +85,14 @@ protected function setUp(): void {
   /**
    * @covers ::usesGroupBy
    */
-  public function testUsesGroupBy() {
+  public function testUsesGroupBy(): void {
     $this->assertFalse($this->plugin->usesGroupBy());
   }
 
   /**
    * @covers ::defineOptions
    */
-  public function testDefineOptions() {
+  public function testDefineOptions(): void {
     $options = $this->plugin->defineOptions();
     $this->assertIsArray($options);
     $this->assertArrayHasKey('destination', $options);
@@ -101,7 +101,7 @@ public function testDefineOptions() {
   /**
    * @covers ::render
    */
-  public function testRenderWithDestination() {
+  public function testRenderWithDestination(): void {
     $entity_type_id = $this->randomMachineName();
     $entity = $this->getMockBuilder('\Drupal\user\Entity\Role')
       ->disableOriginalConstructor()
@@ -143,7 +143,7 @@ public function testRenderWithDestination() {
   /**
    * @covers ::render
    */
-  public function testRenderWithoutDestination() {
+  public function testRenderWithoutDestination(): void {
     $entity_type_id = $this->randomMachineName();
     $entity = $this->getMockBuilder('\Drupal\user\Entity\Role')
       ->disableOriginalConstructor()
@@ -184,7 +184,7 @@ public function testRenderWithoutDestination() {
   /**
    * @covers ::render
    */
-  public function testRenderWithoutEntity() {
+  public function testRenderWithoutEntity(): void {
     $this->setUpMockLoggerWithMissingEntity();
 
     $entity = NULL;
diff --git a/core/modules/views/tests/src/Unit/Plugin/views/query/MysqlDateSqlTest.php b/core/modules/views/tests/src/Unit/Plugin/views/query/MysqlDateSqlTest.php
index c797edbd208a..91a4453fbffb 100644
--- a/core/modules/views/tests/src/Unit/Plugin/views/query/MysqlDateSqlTest.php
+++ b/core/modules/views/tests/src/Unit/Plugin/views/query/MysqlDateSqlTest.php
@@ -37,7 +37,7 @@ protected function setUp(): void {
    *
    * @covers ::getDateField
    */
-  public function testGetDateField() {
+  public function testGetDateField(): void {
     $date_sql = new MysqlDateSql($this->database);
 
     $expected = 'foo.field';
@@ -54,7 +54,7 @@ public function testGetDateField() {
    *
    * @dataProvider providerTestGetDateFormat
    */
-  public function testGetDateFormat($field, $format, $expected_format) {
+  public function testGetDateFormat($field, $format, $expected_format): void {
     $date_sql = new MysqlDateSql($this->database);
 
     $this->assertEquals("DATE_FORMAT($field, '$expected_format')", $date_sql->getDateFormat($field, $format));
@@ -76,7 +76,7 @@ public static function providerTestGetDateFormat() {
    *
    * @covers ::setFieldTimezoneOffset
    */
-  public function testSetFieldTimezoneOffset() {
+  public function testSetFieldTimezoneOffset(): void {
     $date_sql = new MysqlDateSql($this->database);
 
     $field = 'foobar.field';
@@ -89,7 +89,7 @@ public function testSetFieldTimezoneOffset() {
    *
    * @covers ::setTimezoneOffset
    */
-  public function testSetTimezoneOffset() {
+  public function testSetTimezoneOffset(): void {
     $database = $this->prophesize(Connection::class);
     $database->query("SET @@session.time_zone = '42'")->shouldBeCalledTimes(1);
     $date_sql = new MysqlDateSql($database->reveal());
diff --git a/core/modules/views/tests/src/Unit/Plugin/views/query/PostgresqlDateSqlTest.php b/core/modules/views/tests/src/Unit/Plugin/views/query/PostgresqlDateSqlTest.php
index 835882c36922..89e1de317b1d 100644
--- a/core/modules/views/tests/src/Unit/Plugin/views/query/PostgresqlDateSqlTest.php
+++ b/core/modules/views/tests/src/Unit/Plugin/views/query/PostgresqlDateSqlTest.php
@@ -37,7 +37,7 @@ protected function setUp(): void {
    *
    * @covers ::getDateField
    */
-  public function testGetDateField() {
+  public function testGetDateField(): void {
     $date_sql = new PostgresqlDateSql($this->database);
 
     $expected = "TO_TIMESTAMP(foo.field, 'YYYY-MM-DD\"T\"HH24:MI:SS')";
@@ -54,7 +54,7 @@ public function testGetDateField() {
    *
    * @dataProvider providerTestGetDateFormat
    */
-  public function testGetDateFormat($field, $format, $expected_format) {
+  public function testGetDateFormat($field, $format, $expected_format): void {
     $date_sql = new PostgresqlDateSql($this->database);
 
     $this->assertEquals("TO_CHAR($field, '$expected_format')", $date_sql->getDateFormat($field, $format));
@@ -76,7 +76,7 @@ public static function providerTestGetDateFormat() {
    *
    * @covers ::setFieldTimezoneOffset
    */
-  public function testSetFieldTimezoneOffset() {
+  public function testSetFieldTimezoneOffset(): void {
     $date_sql = new PostgresqlDateSql($this->database);
 
     $field = 'foobar.field';
@@ -89,7 +89,7 @@ public function testSetFieldTimezoneOffset() {
    *
    * @covers ::setTimezoneOffset
    */
-  public function testSetTimezoneOffset() {
+  public function testSetTimezoneOffset(): void {
     $database = $this->prophesize(Connection::class);
     $database->query("SET TIME ZONE INTERVAL '42' HOUR TO MINUTE")->shouldBeCalledTimes(1);
     $date_sql = new PostgresqlDateSql($database->reveal());
diff --git a/core/modules/views/tests/src/Unit/Plugin/views/query/SqliteDateSqlTest.php b/core/modules/views/tests/src/Unit/Plugin/views/query/SqliteDateSqlTest.php
index 82fe4d5e0a44..d66c4c68a1a3 100644
--- a/core/modules/views/tests/src/Unit/Plugin/views/query/SqliteDateSqlTest.php
+++ b/core/modules/views/tests/src/Unit/Plugin/views/query/SqliteDateSqlTest.php
@@ -39,7 +39,7 @@ protected function setUp(): void {
    *
    * @covers ::getDateField
    */
-  public function testGetDateField() {
+  public function testGetDateField(): void {
     $date_sql = new SqliteDateSql($this->database);
 
     $expected = "strftime('%s', foo.field)";
@@ -56,7 +56,7 @@ public function testGetDateField() {
    *
    * @dataProvider providerTestGetDateFormat
    */
-  public function testGetDateFormat($field, $format, $expected) {
+  public function testGetDateFormat($field, $format, $expected): void {
     $date_sql = new SqliteDateSql($this->database);
 
     $this->assertEquals($expected, $date_sql->getDateFormat($field, $format));
@@ -79,7 +79,7 @@ public static function providerTestGetDateFormat() {
    *
    * @covers ::setFieldTimezoneOffset
    */
-  public function testSetFieldTimezoneOffset() {
+  public function testSetFieldTimezoneOffset(): void {
     $date_sql = new SqliteDateSql($this->database);
 
     $field = 'foobar.field';
@@ -92,7 +92,7 @@ public function testSetFieldTimezoneOffset() {
    *
    * @covers ::setTimezoneOffset
    */
-  public function testSetTimezoneOffset() {
+  public function testSetTimezoneOffset(): void {
     $database = $this->prophesize(Connection::class);
     $database->query()->shouldNotBeCalled();
     $date_sql = new SqliteDateSql($database->reveal());
diff --git a/core/modules/views/tests/src/Unit/PluginBaseTest.php b/core/modules/views/tests/src/Unit/PluginBaseTest.php
index a7e4a22017ab..57fa28d4810a 100644
--- a/core/modules/views/tests/src/Unit/PluginBaseTest.php
+++ b/core/modules/views/tests/src/Unit/PluginBaseTest.php
@@ -46,7 +46,7 @@ protected function setUp(): void {
    * @dataProvider providerTestUnpackOptions
    * @covers ::unpackOptions
    */
-  public function testUnpackOptions($storage, $options, $definition, $expected, $all = FALSE) {
+  public function testUnpackOptions($storage, $options, $definition, $expected, $all = FALSE): void {
     $this->testHelperPlugin->unpackOptions($storage, $options, $definition, $all);
     $this->assertEquals($storage, $expected);
   }
@@ -64,7 +64,7 @@ public function testUnpackOptions($storage, $options, $definition, $expected, $a
    * @dataProvider providerTestSetOptionDefault
    * @covers ::setOptionDefaults
    */
-  public function testSetOptionDefault($storage, $definition, $expected) {
+  public function testSetOptionDefault($storage, $definition, $expected): void {
     $this->testHelperPlugin->testSetOptionDefaults($storage, $definition);
     $this->assertEquals($storage, $expected);
   }
@@ -283,7 +283,7 @@ public static function providerTestSetOptionDefault() {
    * @dataProvider providerTestFilterByDefinedOptions
    * @covers ::filterByDefinedOptions
    */
-  public function testFilterByDefinedOptions($storage, $options, $expected_storage) {
+  public function testFilterByDefinedOptions($storage, $options, $expected_storage): void {
     $this->testHelperPlugin->setDefinedOptions($options);
     $this->testHelperPlugin->filterByDefinedOptions($storage);
     $this->assertEquals($expected_storage, $storage);
diff --git a/core/modules/views/tests/src/Unit/PluginTypeListTest.php b/core/modules/views/tests/src/Unit/PluginTypeListTest.php
index 228b1052c7aa..763cd5cf2489 100644
--- a/core/modules/views/tests/src/Unit/PluginTypeListTest.php
+++ b/core/modules/views/tests/src/Unit/PluginTypeListTest.php
@@ -17,7 +17,7 @@ class PluginTypeListTest extends UnitTestCase {
   /**
    * Tests the plugins list is correct.
    */
-  public function testPluginList() {
+  public function testPluginList(): void {
     $plugin_list = [
       'access',
       'area',
diff --git a/core/modules/views/tests/src/Unit/Routing/ViewPageControllerTest.php b/core/modules/views/tests/src/Unit/Routing/ViewPageControllerTest.php
index 81a003915485..c299d711b046 100644
--- a/core/modules/views/tests/src/Unit/Routing/ViewPageControllerTest.php
+++ b/core/modules/views/tests/src/Unit/Routing/ViewPageControllerTest.php
@@ -49,7 +49,7 @@ protected function setUp(): void {
   /**
    * Tests the page controller.
    */
-  public function testPageController() {
+  public function testPageController(): void {
     $build = [
       '#type' => 'view',
       '#name' => 'test_page_view',
@@ -78,7 +78,7 @@ public function testPageController() {
   /**
    * Tests the page controller with arguments on a non overridden page view.
    */
-  public function testHandleWithArgumentsWithoutOverridden() {
+  public function testHandleWithArgumentsWithoutOverridden(): void {
     $request = new Request();
     $request->attributes->set('view_id', 'test_page_view');
     $request->attributes->set('display_id', 'page_1');
@@ -112,7 +112,7 @@ public function testHandleWithArgumentsWithoutOverridden() {
    *
    * Note: This test does not care about upcasting for now.
    */
-  public function testHandleWithArgumentsOnOverriddenRoute() {
+  public function testHandleWithArgumentsOnOverriddenRoute(): void {
     $request = new Request();
     $request->attributes->set('view_id', 'test_page_view');
     $request->attributes->set('display_id', 'page_1');
@@ -149,7 +149,7 @@ public function testHandleWithArgumentsOnOverriddenRoute() {
    * This test care about upcasted values and ensures that the raw variables
    * are pulled in.
    */
-  public function testHandleWithArgumentsOnOverriddenRouteWithUpcasting() {
+  public function testHandleWithArgumentsOnOverriddenRouteWithUpcasting(): void {
     $request = new Request();
     $request->attributes->set('view_id', 'test_page_view');
     $request->attributes->set('display_id', 'page_1');
diff --git a/core/modules/views/tests/src/Unit/ViewExecutableFactoryTest.php b/core/modules/views/tests/src/Unit/ViewExecutableFactoryTest.php
index 8e90932f2e09..8679eb4dd53a 100644
--- a/core/modules/views/tests/src/Unit/ViewExecutableFactoryTest.php
+++ b/core/modules/views/tests/src/Unit/ViewExecutableFactoryTest.php
@@ -88,7 +88,7 @@ protected function setUp(): void {
    *
    * @covers ::get
    */
-  public function testGet() {
+  public function testGet(): void {
     $request_1 = new Request();
     $request_2 = new Request();
 
diff --git a/core/modules/views/tests/src/Unit/ViewExecutableTest.php b/core/modules/views/tests/src/Unit/ViewExecutableTest.php
index 105480d5513c..c971c6450c4d 100644
--- a/core/modules/views/tests/src/Unit/ViewExecutableTest.php
+++ b/core/modules/views/tests/src/Unit/ViewExecutableTest.php
@@ -176,7 +176,7 @@ protected function setUp(): void {
   /**
    * @covers ::getUrl
    */
-  public function testGetUrlWithOverriddenUrl() {
+  public function testGetUrlWithOverriddenUrl(): void {
     $url = Url::fromRoute('example');
     $this->executable->override_url = $url;
 
@@ -186,7 +186,7 @@ public function testGetUrlWithOverriddenUrl() {
   /**
    * @covers ::getUrl
    */
-  public function testGetUrlWithPathNoPlaceholders() {
+  public function testGetUrlWithPathNoPlaceholders(): void {
     $this->displayHandler->expects($this->any())
       ->method('getRoutedDisplay')
       ->willReturn($this->displayHandler);
@@ -206,7 +206,7 @@ public function testGetUrlWithPathNoPlaceholders() {
   /**
    * @covers ::getUrl
    */
-  public function testGetUrlWithoutRouterDisplay() {
+  public function testGetUrlWithoutRouterDisplay(): void {
     $this->displayHandler = $this->createMock('Drupal\views\Plugin\views\display\DisplayPluginInterface');
     $this->displayHandlers->expects($this->any())
       ->method('get')
@@ -220,7 +220,7 @@ public function testGetUrlWithoutRouterDisplay() {
   /**
    * @covers ::getUrl
    */
-  public function testGetUrlWithPlaceholdersAndArgs() {
+  public function testGetUrlWithPlaceholdersAndArgs(): void {
     $this->displayHandler->expects($this->any())
       ->method('getRoutedDisplay')
       ->willReturn($this->displayHandler);
@@ -246,7 +246,7 @@ public function testGetUrlWithPlaceholdersAndArgs() {
   /**
    * @covers ::getUrl
    */
-  public function testGetUrlWithPlaceholdersAndWithoutArgs() {
+  public function testGetUrlWithPlaceholdersAndWithoutArgs(): void {
     $this->displayHandler->expects($this->any())
       ->method('getRoutedDisplay')
       ->willReturn($this->displayHandler);
@@ -272,7 +272,7 @@ public function testGetUrlWithPlaceholdersAndWithoutArgs() {
   /**
    * @covers ::getUrl
    */
-  public function testGetUrlWithPlaceholdersAndWithoutArgsAndExceptionValue() {
+  public function testGetUrlWithPlaceholdersAndWithoutArgsAndExceptionValue(): void {
     $this->displayHandler->expects($this->any())
       ->method('getRoutedDisplay')
       ->willReturn($this->displayHandler);
@@ -309,7 +309,7 @@ public function testGetUrlWithPlaceholdersAndWithoutArgsAndExceptionValue() {
   /**
    * @covers ::buildThemeFunctions
    */
-  public function testBuildThemeFunctions() {
+  public function testBuildThemeFunctions(): void {
     /** @var \Drupal\views\ViewExecutable|\PHPUnit\Framework\MockObject\MockObject $view */
     /** @var \Drupal\views\Plugin\views\display\DisplayPluginBase|\PHPUnit\Framework\MockObject\MockObject $display */
     [$view, $display] = $this->setupBaseViewAndDisplay();
@@ -353,7 +353,7 @@ public function testBuildThemeFunctions() {
   /**
    * @covers ::generateHandlerId
    */
-  public function testGenerateHandlerId() {
+  public function testGenerateHandlerId(): void {
     // Test the generateHandlerId() method.
     $test_ids = ['test' => 'test', 'test_1' => 'test_1'];
     $this->assertEquals('new', ViewExecutable::generateHandlerId('new', $test_ids));
@@ -370,7 +370,7 @@ public function testGenerateHandlerId() {
    * @param $handler_type
    *   The handler type to set.
    */
-  public function testAddHandler($option, $handler_type) {
+  public function testAddHandler($option, $handler_type): void {
     /** @var \Drupal\views\ViewExecutable|\PHPUnit\Framework\MockObject\MockObject $view */
     /** @var \Drupal\views\Plugin\views\display\DisplayPluginBase|\PHPUnit\Framework\MockObject\MockObject $display */
     [$view, $display] = $this->setupBaseViewAndDisplay();
@@ -412,7 +412,7 @@ public function testAddHandler($option, $handler_type) {
    * @param $handler_type
    *   The handler type to set.
    */
-  public function testAddHandlerWithEntityField($option, $handler_type) {
+  public function testAddHandlerWithEntityField($option, $handler_type): void {
     /** @var \Drupal\views\ViewExecutable|\PHPUnit\Framework\MockObject\MockObject $view */
     /** @var \Drupal\views\Plugin\views\display\DisplayPluginBase|\PHPUnit\Framework\MockObject\MockObject $display */
     [$view, $display] = $this->setupBaseViewAndDisplay();
@@ -476,7 +476,7 @@ public static function addHandlerProvider() {
    * @covers ::attachDisplays
    * @dataProvider providerAttachDisplays
    */
-  public function testAttachDisplays($display_enabled, $access_granted, $expected_to_be_attached) {
+  public function testAttachDisplays($display_enabled, $access_granted, $expected_to_be_attached): void {
     /** @var \Drupal\views\ViewExecutable|\PHPUnit\Framework\MockObject\MockObject $view */
     /** @var \Drupal\views\Plugin\views\display\DisplayPluginBase|\PHPUnit\Framework\MockObject\MockObject $display */
     [$view, $display] = $this->setupBaseViewAndDisplay();
@@ -592,7 +592,7 @@ protected function setupBaseViewAndDisplay() {
    * @covers ::setItemsPerPage
    * @covers ::getItemsPerPage
    */
-  public function testSetItemsPerPageBeforePreRender() {
+  public function testSetItemsPerPageBeforePreRender(): void {
     /** @var \Drupal\views\ViewExecutable|\PHPUnit\Framework\MockObject\MockObject $view */
     /** @var \Drupal\views\Plugin\views\display\DisplayPluginBase|\PHPUnit\Framework\MockObject\MockObject $display */
     [$view, $display] = $this->setupBaseViewAndDisplay();
@@ -606,7 +606,7 @@ public function testSetItemsPerPageBeforePreRender() {
    * @covers ::setItemsPerPage
    * @covers ::getItemsPerPage
    */
-  public function testSetItemsPerPageDuringPreRender() {
+  public function testSetItemsPerPageDuringPreRender(): void {
     /** @var \Drupal\views\ViewExecutable|\PHPUnit\Framework\MockObject\MockObject $view */
     /** @var \Drupal\views\Plugin\views\display\DisplayPluginBase|\PHPUnit\Framework\MockObject\MockObject $display */
     [$view, $display] = $this->setupBaseViewAndDisplay();
@@ -624,7 +624,7 @@ public function testSetItemsPerPageDuringPreRender() {
    * @covers ::setOffset
    * @covers ::getOffset
    */
-  public function testSetOffsetBeforePreRender() {
+  public function testSetOffsetBeforePreRender(): void {
     /** @var \Drupal\views\ViewExecutable|\PHPUnit\Framework\MockObject\MockObject $view */
     /** @var \Drupal\views\Plugin\views\display\DisplayPluginBase|\PHPUnit\Framework\MockObject\MockObject $display */
     [$view, $display] = $this->setupBaseViewAndDisplay();
@@ -638,7 +638,7 @@ public function testSetOffsetBeforePreRender() {
    * @covers ::setOffset
    * @covers ::getOffset
    */
-  public function testSetOffsetDuringPreRender() {
+  public function testSetOffsetDuringPreRender(): void {
     /** @var \Drupal\views\ViewExecutable|\PHPUnit\Framework\MockObject\MockObject $view */
     /** @var \Drupal\views\Plugin\views\display\DisplayPluginBase|\PHPUnit\Framework\MockObject\MockObject $display */
     [$view, $display] = $this->setupBaseViewAndDisplay();
@@ -656,7 +656,7 @@ public function testSetOffsetDuringPreRender() {
    * @covers ::setCurrentPage
    * @covers ::getCurrentPage
    */
-  public function testSetCurrentPageBeforePreRender() {
+  public function testSetCurrentPageBeforePreRender(): void {
     /** @var \Drupal\views\ViewExecutable|\PHPUnit\Framework\MockObject\MockObject $view */
     /** @var \Drupal\views\Plugin\views\display\DisplayPluginBase|\PHPUnit\Framework\MockObject\MockObject $display */
     [$view, $display] = $this->setupBaseViewAndDisplay();
@@ -670,7 +670,7 @@ public function testSetCurrentPageBeforePreRender() {
    * @covers ::setCurrentPage
    * @covers ::getCurrentPage
    */
-  public function testSetCurrentPageDuringPreRender() {
+  public function testSetCurrentPageDuringPreRender(): void {
     /** @var \Drupal\views\ViewExecutable|\PHPUnit\Framework\MockObject\MockObject $view */
     /** @var \Drupal\views\Plugin\views\display\DisplayPluginBase|\PHPUnit\Framework\MockObject\MockObject $display */
     [$view, $display] = $this->setupBaseViewAndDisplay();
@@ -687,7 +687,7 @@ public function testSetCurrentPageDuringPreRender() {
   /**
    * @covers ::execute
    */
-  public function testCacheIsIgnoredDuringPreview() {
+  public function testCacheIsIgnoredDuringPreview(): void {
     /** @var \Drupal\views\ViewExecutable|\PHPUnit\Framework\MockObject\MockObject $view */
     /** @var \Drupal\views\Plugin\views\display\DisplayPluginBase|\PHPUnit\Framework\MockObject\MockObject $display */
     [$view, $display] = $this->setupBaseViewAndDisplay();
@@ -722,7 +722,7 @@ public function testCacheIsIgnoredDuringPreview() {
    * @covers ::execute
    * @dataProvider providerExecuteReturn
    */
-  public function testExecuteReturn($display_enabled, $expected_result) {
+  public function testExecuteReturn($display_enabled, $expected_result): void {
     /** @var \Drupal\views\ViewExecutable|\PHPUnit\Framework\MockObject\MockObject $view */
     /** @var \Drupal\views\Plugin\views\display\DisplayPluginBase|\PHPUnit\Framework\MockObject\MockObject $display */
     [$view, $display] = $this->setupBaseViewAndDisplay();
diff --git a/core/modules/views/tests/src/Unit/ViewsDataHelperTest.php b/core/modules/views/tests/src/Unit/ViewsDataHelperTest.php
index fae9639b996a..510a1ba953b6 100644
--- a/core/modules/views/tests/src/Unit/ViewsDataHelperTest.php
+++ b/core/modules/views/tests/src/Unit/ViewsDataHelperTest.php
@@ -40,7 +40,7 @@ protected function viewsData() {
   /**
    * Tests fetchFields.
    */
-  public function testFetchFields() {
+  public function testFetchFields(): void {
     $views_data = $this->getMockBuilder('Drupal\views\ViewsData')
       ->disableOriginalConstructor()
       ->getMock();
diff --git a/core/modules/views/tests/src/Unit/ViewsDataTest.php b/core/modules/views/tests/src/Unit/ViewsDataTest.php
index f3e4e92a3988..4018cd979604 100644
--- a/core/modules/views/tests/src/Unit/ViewsDataTest.php
+++ b/core/modules/views/tests/src/Unit/ViewsDataTest.php
@@ -142,7 +142,7 @@ protected function setupMockedModuleHandler(): void {
   /**
    * Tests the fetchBaseTables() method.
    */
-  public function testFetchBaseTables() {
+  public function testFetchBaseTables(): void {
     $this->setupMockedModuleHandler();
     $data = $this->viewsData->getAll();
 
@@ -180,7 +180,7 @@ public function testFetchBaseTables() {
   /**
    * Tests fetching all the views data without a static cache.
    */
-  public function testGetOnFirstCall() {
+  public function testGetOnFirstCall(): void {
     // Ensure that the hooks are just invoked once.
     $this->setupMockedModuleHandler();
 
@@ -201,7 +201,7 @@ public function testGetOnFirstCall() {
   /**
    * Tests the cache of the full and single table data.
    */
-  public function testFullAndTableGetCache() {
+  public function testFullAndTableGetCache(): void {
     $expected_views_data = $this->viewsDataWithProvider();
     $table_name = 'views_test_data';
     $table_name_2 = 'views_test_data_2';
@@ -277,7 +277,7 @@ public function testFullAndTableGetCache() {
   /**
    * Tests the caching of the full views data.
    */
-  public function testFullGetCache() {
+  public function testFullGetCache(): void {
     $expected_views_data = $this->viewsDataWithProvider();
 
     // Views data should be invoked once.
@@ -302,7 +302,7 @@ public function testFullGetCache() {
   /**
    * Tests the caching of the views data for a specific table.
    */
-  public function testSingleTableGetCache() {
+  public function testSingleTableGetCache(): void {
     $table_name = 'views_test_data';
     $expected_views_data = $this->viewsDataWithProvider();
 
@@ -337,7 +337,7 @@ public function testSingleTableGetCache() {
   /**
    * Tests building the views data with a non existing table.
    */
-  public function testNonExistingTableGetCache() {
+  public function testNonExistingTableGetCache(): void {
     $random_table_name = $this->randomMachineName();
 
     // Views data should be invoked once.
@@ -367,7 +367,7 @@ public function testNonExistingTableGetCache() {
   /**
    * Tests the cache backend behavior with requesting the same table multiple.
    */
-  public function testCacheCallsWithSameTableMultipleTimes() {
+  public function testCacheCallsWithSameTableMultipleTimes(): void {
     $expected_views_data = $this->viewsDataWithProvider();
 
     $this->setupMockedModuleHandler();
@@ -410,7 +410,7 @@ public function testCacheCallsWithSameTableMultipleTimes() {
    *   - all tables
    *   - views_test_data
    */
-  public function testCacheCallsWithSameTableMultipleTimesAndWarmCache() {
+  public function testCacheCallsWithSameTableMultipleTimesAndWarmCache(): void {
     $expected_views_data = $this->viewsDataWithProvider();
     $this->moduleHandler->expects($this->never())
       ->method('invokeAllWith');
@@ -440,7 +440,7 @@ public function testCacheCallsWithSameTableMultipleTimesAndWarmCache() {
    * Not warm cache:
    *   - views_test_data_2
    */
-  public function testCacheCallsWithWarmCacheAndDifferentTable() {
+  public function testCacheCallsWithWarmCacheAndDifferentTable(): void {
     $expected_views_data = $this->viewsDataWithProvider();
     $this->moduleHandler->expects($this->never())
       ->method('invokeAllWith');
@@ -478,7 +478,7 @@ public function testCacheCallsWithWarmCacheAndDifferentTable() {
    * Not warm cache:
    *   - $non_existing_table
    */
-  public function testCacheCallsWithWarmCacheAndInvalidTable() {
+  public function testCacheCallsWithWarmCacheAndInvalidTable(): void {
     $expected_views_data = $this->viewsDataWithProvider();
     $non_existing_table = $this->randomMachineName();
     $this->moduleHandler->expects($this->never())
@@ -518,7 +518,7 @@ public function testCacheCallsWithWarmCacheAndInvalidTable() {
    *   - views_test_data
    *   - $non_existing_table
    */
-  public function testCacheCallsWithWarmCacheForInvalidTable() {
+  public function testCacheCallsWithWarmCacheForInvalidTable(): void {
     $non_existing_table = $this->randomMachineName();
     $this->moduleHandler->expects($this->never())
       ->method('invokeAllWith');
@@ -545,7 +545,7 @@ public function testCacheCallsWithWarmCacheForInvalidTable() {
   /**
    * Tests the cache calls for all views data without a warm cache.
    */
-  public function testCacheCallsWithoutWarmCacheAndGetAllTables() {
+  public function testCacheCallsWithoutWarmCacheAndGetAllTables(): void {
     $expected_views_data = $this->viewsDataWithProvider();
     $this->setupMockedModuleHandler();
 
@@ -571,7 +571,7 @@ public function testCacheCallsWithoutWarmCacheAndGetAllTables() {
    * Warm cache:
    *   - all tables
    */
-  public function testCacheCallsWithWarmCacheAndGetAllTables() {
+  public function testCacheCallsWithWarmCacheAndGetAllTables(): void {
     $expected_views_data = $this->viewsDataWithProvider();
     $this->moduleHandler->expects($this->never())
       ->method('invokeAllWith');
@@ -597,7 +597,7 @@ public function testCacheCallsWithWarmCacheAndGetAllTables() {
    *
    * @covers ::get
    */
-  public function testCacheCallsWithoutWarmCacheAndGetMultipleTables() {
+  public function testCacheCallsWithoutWarmCacheAndGetMultipleTables(): void {
     $expected_views_data = $this->viewsDataWithProvider();
     $table_name = 'views_test_data';
     $table_name_2 = 'views_test_data_2';
@@ -641,7 +641,7 @@ public function testCacheCallsWithoutWarmCacheAndGetMultipleTables() {
    * @covers ::get
    * @dataProvider providerTestGetEmptyKey
    */
-  public function testGetEmptyKey($key) {
+  public function testGetEmptyKey($key): void {
     $this->expectException(\InvalidArgumentException::class);
     $this->expectExceptionMessage('A valid cache entry key is required. Use getAll() to get all table data.');
 
diff --git a/core/modules/views/tests/src/Unit/ViewsHandlerManagerTest.php b/core/modules/views/tests/src/Unit/ViewsHandlerManagerTest.php
index 159f860c29be..dc7212df4493 100644
--- a/core/modules/views/tests/src/Unit/ViewsHandlerManagerTest.php
+++ b/core/modules/views/tests/src/Unit/ViewsHandlerManagerTest.php
@@ -70,7 +70,7 @@ protected function setupMockedFactory() {
    * @covers ::__construct
    * @covers ::getDefinitions
    */
-  public function testAlterHookInvocation() {
+  public function testAlterHookInvocation(): void {
     $this->moduleHandler->expects($this->once())
       ->method('alter')
       ->with('views_plugins_test', []);
@@ -81,7 +81,7 @@ public function testAlterHookInvocation() {
   /**
    * Tests getHandler() and its base information propagation.
    */
-  public function testGetHandlerBaseInformationPropagation() {
+  public function testGetHandlerBaseInformationPropagation(): void {
     $this->setupMockedFactory();
 
     $item = [];
@@ -124,7 +124,7 @@ public function testGetHandlerBaseInformationPropagation() {
   /**
    * Tests getHandler() with an override.
    */
-  public function testGetHandlerOverride() {
+  public function testGetHandlerOverride(): void {
     $this->setupMockedFactory();
 
     $item = [];
@@ -152,7 +152,7 @@ public function testGetHandlerOverride() {
   /**
    * Tests getHandler() without an override.
    */
-  public function testGetHandlerNoOverride() {
+  public function testGetHandlerNoOverride(): void {
     $this->setupMockedFactory();
 
     $item = [];
diff --git a/core/modules/views/tests/src/Unit/ViewsTest.php b/core/modules/views/tests/src/Unit/ViewsTest.php
index adb18cea204f..784b5a89e8db 100644
--- a/core/modules/views/tests/src/Unit/ViewsTest.php
+++ b/core/modules/views/tests/src/Unit/ViewsTest.php
@@ -54,7 +54,7 @@ protected function setUp(): void {
    *
    * @covers ::getView
    */
-  public function testGetView() {
+  public function testGetView(): void {
     $view = new View(['id' => 'test_view'], 'view');
 
     $view_storage = $this->getMockBuilder('Drupal\Core\Config\Entity\ConfigEntityStorage')
@@ -83,7 +83,7 @@ public function testGetView() {
    *
    * @covers ::getView
    */
-  public function testGetNonExistentView() {
+  public function testGetNonExistentView(): void {
     $entity_type_manager = $this->prophesize(EntityTypeManagerInterface::class);
     $storage = $this->prophesize(EntityStorageInterface::class);
     $storage->load('test_view_non_existent')->willReturn(NULL);
@@ -98,7 +98,7 @@ public function testGetNonExistentView() {
    *
    * @dataProvider providerTestGetApplicableViews
    */
-  public function testGetApplicableViews($applicable_type, $expected) {
+  public function testGetApplicableViews($applicable_type, $expected): void {
     $view_1 = new View([
       'id' => 'test_view_1',
       'display' => [
diff --git a/core/modules/views/tests/src/Unit/WizardPluginBaseTest.php b/core/modules/views/tests/src/Unit/WizardPluginBaseTest.php
index 3c2e84baf039..1c9643102a88 100644
--- a/core/modules/views/tests/src/Unit/WizardPluginBaseTest.php
+++ b/core/modules/views/tests/src/Unit/WizardPluginBaseTest.php
@@ -20,7 +20,7 @@ class WizardPluginBaseTest extends UnitTestCase {
    *
    * @dataProvider providerTestGetSelected
    */
-  public function testGetSelected($expected, $element = [], $parents = [], $user_input = [], $not_rebuilding_expected = NULL) {
+  public function testGetSelected($expected, $element = [], $parents = [], $user_input = [], $not_rebuilding_expected = NULL): void {
     $not_rebuilding_expected = $not_rebuilding_expected ?: $expected;
     $form_state = new FormState();
     $form_state->setUserInput($user_input);
diff --git a/core/modules/views_ui/tests/src/Functional/AnalyzeTest.php b/core/modules/views_ui/tests/src/Functional/AnalyzeTest.php
index 14004fcf00b7..f9f09c0468bc 100644
--- a/core/modules/views_ui/tests/src/Functional/AnalyzeTest.php
+++ b/core/modules/views_ui/tests/src/Functional/AnalyzeTest.php
@@ -33,7 +33,7 @@ class AnalyzeTest extends UITestBase {
   /**
    * Tests that analyze works in general.
    */
-  public function testAnalyzeBasic() {
+  public function testAnalyzeBasic(): void {
     $this->drupalLogin($this->adminUser);
 
     $this->drupalGet('admin/structure/views/view/test_view/edit');
diff --git a/core/modules/views_ui/tests/src/Functional/AreaEntityUITest.php b/core/modules/views_ui/tests/src/Functional/AreaEntityUITest.php
index 79e700623f65..d45fed51e813 100644
--- a/core/modules/views_ui/tests/src/Functional/AreaEntityUITest.php
+++ b/core/modules/views_ui/tests/src/Functional/AreaEntityUITest.php
@@ -26,7 +26,7 @@ class AreaEntityUITest extends UITestBase {
    */
   protected $defaultTheme = 'stark';
 
-  public function testUI() {
+  public function testUI(): void {
     // Set up a block and an entity_test entity.
     $block = Block::create(['id' => 'test_id', 'plugin' => 'system_main_block', 'theme' => 'stark']);
     $block->save();
diff --git a/core/modules/views_ui/tests/src/Functional/ArgumentValidatorTest.php b/core/modules/views_ui/tests/src/Functional/ArgumentValidatorTest.php
index 882991d3dd91..241f64944a19 100644
--- a/core/modules/views_ui/tests/src/Functional/ArgumentValidatorTest.php
+++ b/core/modules/views_ui/tests/src/Functional/ArgumentValidatorTest.php
@@ -28,7 +28,7 @@ class ArgumentValidatorTest extends UITestBase {
   /**
    * Tests the 'Specify validation criteria' checkbox functionality.
    */
-  public function testSpecifyValidation() {
+  public function testSpecifyValidation(): void {
     // Specify a validation based on Node for the 'id' argument on the default
     // display and assert that this works.
     $this->saveArgumentHandlerWithValidationOptions(TRUE);
diff --git a/core/modules/views_ui/tests/src/Functional/CachedDataUITest.php b/core/modules/views_ui/tests/src/Functional/CachedDataUITest.php
index 2c6fe2a1d5ee..169fb51c4911 100644
--- a/core/modules/views_ui/tests/src/Functional/CachedDataUITest.php
+++ b/core/modules/views_ui/tests/src/Functional/CachedDataUITest.php
@@ -26,7 +26,7 @@ class CachedDataUITest extends UITestBase {
   /**
    * Tests the shared tempstore views data in the UI.
    */
-  public function testCacheData() {
+  public function testCacheData(): void {
     $views_admin_user_uid = $this->fullAdminUser->id();
 
     $temp_store = $this->container->get('tempstore.shared')->get('views');
diff --git a/core/modules/views_ui/tests/src/Functional/CustomBooleanTest.php b/core/modules/views_ui/tests/src/Functional/CustomBooleanTest.php
index ede46aa6a493..9b00ae31ec4a 100644
--- a/core/modules/views_ui/tests/src/Functional/CustomBooleanTest.php
+++ b/core/modules/views_ui/tests/src/Functional/CustomBooleanTest.php
@@ -48,7 +48,7 @@ public function dataSet() {
   /**
    * Tests the setting and output of custom labels for boolean values.
    */
-  public function testCustomOption() {
+  public function testCustomOption(): void {
     // Add the boolean field handler to the test view.
     $view = Views::getView('test_view');
     $view->setDisplay();
@@ -113,7 +113,7 @@ public function testCustomOption() {
   /**
    * Tests the setting and output of custom labels for boolean values.
    */
-  public function testCustomOptionTemplate() {
+  public function testCustomOptionTemplate(): void {
     // Install theme to test with template system.
     \Drupal::service('theme_installer')->install(['views_test_theme']);
 
diff --git a/core/modules/views_ui/tests/src/Functional/DefaultViewsTest.php b/core/modules/views_ui/tests/src/Functional/DefaultViewsTest.php
index 0c7a2b6789ab..f35bae650ac3 100644
--- a/core/modules/views_ui/tests/src/Functional/DefaultViewsTest.php
+++ b/core/modules/views_ui/tests/src/Functional/DefaultViewsTest.php
@@ -39,7 +39,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['views_test_conf
   /**
    * Tests default views.
    */
-  public function testDefaultViews() {
+  public function testDefaultViews(): void {
     // Make sure the view starts off as disabled (does not appear on the listing
     // page).
     $edit_href = 'admin/structure/views/view/glossary';
@@ -173,7 +173,7 @@ public function testDefaultViews() {
   /**
    * Tests that enabling views moves them to the correct table.
    */
-  public function testSplitListing() {
+  public function testSplitListing(): void {
     $this->drupalGet('admin/structure/views');
     $this->assertSession()->elementNotExists('xpath', '//div[@id="views-entity-list"]/div[@class = "views-list-section enabled"]/table//td/text()[contains(., "test_view_status")]');
     $this->assertSession()->elementsCount('xpath', '//div[@id="views-entity-list"]/div[@class = "views-list-section disabled"]/table//td/text()[contains(., "test_view_status")]', 1);
@@ -191,7 +191,7 @@ public function testSplitListing() {
   /**
    * Tests that page displays show the correct path.
    */
-  public function testPathDestination() {
+  public function testPathDestination(): void {
     $this->drupalGet('admin/structure/views');
 
     // Check that links to views on default tabs are rendered correctly.
diff --git a/core/modules/views_ui/tests/src/Functional/DisplayAttachmentTest.php b/core/modules/views_ui/tests/src/Functional/DisplayAttachmentTest.php
index 6536ef40d71a..13b5baf3e2d9 100644
--- a/core/modules/views_ui/tests/src/Functional/DisplayAttachmentTest.php
+++ b/core/modules/views_ui/tests/src/Functional/DisplayAttachmentTest.php
@@ -30,7 +30,7 @@ class DisplayAttachmentTest extends UITestBase {
   /**
    * Tests the attachment UI.
    */
-  public function testAttachmentUI() {
+  public function testAttachmentUI(): void {
     $this->drupalGet('admin/structure/views/view/test_attachment_ui/edit/attachment_1');
     $this->assertSession()->pageTextContains('Not defined');
 
@@ -71,7 +71,7 @@ public function testAttachmentUI() {
   /**
    * Tests the attachment working after the attached page was deleted.
    */
-  public function testRemoveAttachedDisplay() {
+  public function testRemoveAttachedDisplay(): void {
     // Create a view.
     $view = $this->randomView();
     $path_prefix = 'admin/structure/views/view/' . $view['id'] . '/edit';
diff --git a/core/modules/views_ui/tests/src/Functional/DisplayCRUDTest.php b/core/modules/views_ui/tests/src/Functional/DisplayCRUDTest.php
index 1377855abc9b..ab7d500195ae 100644
--- a/core/modules/views_ui/tests/src/Functional/DisplayCRUDTest.php
+++ b/core/modules/views_ui/tests/src/Functional/DisplayCRUDTest.php
@@ -35,7 +35,7 @@ class DisplayCRUDTest extends UITestBase {
   /**
    * Tests adding a display.
    */
-  public function testAddDisplay() {
+  public function testAddDisplay(): void {
     // Show the default display.
     $this->config('views.settings')->set('ui.show.default_display', TRUE)->save();
 
@@ -60,7 +60,7 @@ public function testAddDisplay() {
   /**
    * Tests removing a display.
    */
-  public function testRemoveDisplay() {
+  public function testRemoveDisplay(): void {
     $view = $this->randomView();
     $path_prefix = 'admin/structure/views/view/' . $view['id'] . '/edit';
 
@@ -106,7 +106,7 @@ public function testRemoveDisplay() {
   /**
    * Tests that the correct display is loaded by default.
    */
-  public function testDefaultDisplay() {
+  public function testDefaultDisplay(): void {
     $this->drupalGet('admin/structure/views/view/test_display');
     $this->assertSession()->elementsCount('xpath', '//*[@id="views-page-1-display-title"]', 1);
   }
@@ -114,7 +114,7 @@ public function testDefaultDisplay() {
   /**
    * Tests the duplicating of a display.
    */
-  public function testDuplicateDisplay() {
+  public function testDuplicateDisplay(): void {
     $view = $this->randomView();
     $path_prefix = 'admin/structure/views/view/' . $view['id'] . '/edit';
     $path = $view['page[path]'];
diff --git a/core/modules/views_ui/tests/src/Functional/DisplayExtenderUITest.php b/core/modules/views_ui/tests/src/Functional/DisplayExtenderUITest.php
index 922eeb686308..884cd3d8062f 100644
--- a/core/modules/views_ui/tests/src/Functional/DisplayExtenderUITest.php
+++ b/core/modules/views_ui/tests/src/Functional/DisplayExtenderUITest.php
@@ -28,7 +28,7 @@ class DisplayExtenderUITest extends UITestBase {
   /**
    * Tests the display extender UI.
    */
-  public function testDisplayExtenderUI() {
+  public function testDisplayExtenderUI(): void {
     $this->config('views.settings')->set('display_extenders', ['display_extender_test'])->save();
 
     $view = Views::getView('test_view');
diff --git a/core/modules/views_ui/tests/src/Functional/DisplayFeedTest.php b/core/modules/views_ui/tests/src/Functional/DisplayFeedTest.php
index c1ab43b26b6e..58e0f5e62a22 100644
--- a/core/modules/views_ui/tests/src/Functional/DisplayFeedTest.php
+++ b/core/modules/views_ui/tests/src/Functional/DisplayFeedTest.php
@@ -34,7 +34,7 @@ class DisplayFeedTest extends UITestBase {
   /**
    * Tests feed display admin UI.
    */
-  public function testFeedUI() {
+  public function testFeedUI(): void {
     // Test the RSS feed.
     foreach (self::$testViews as $view_name) {
       $this->checkFeedViewUi($view_name);
diff --git a/core/modules/views_ui/tests/src/Functional/DisplayPathTest.php b/core/modules/views_ui/tests/src/Functional/DisplayPathTest.php
index 8cb6a77ff241..f9f7d6505aeb 100644
--- a/core/modules/views_ui/tests/src/Functional/DisplayPathTest.php
+++ b/core/modules/views_ui/tests/src/Functional/DisplayPathTest.php
@@ -45,7 +45,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['views_test_conf
   /**
    * Runs the tests.
    */
-  public function testPathUI() {
+  public function testPathUI(): void {
     $this->doBasicPathUITest();
     $this->doAdvancedPathsValidationTest();
     $this->doPathXssFilterTest();
@@ -121,7 +121,7 @@ protected function doAdvancedPathsValidationTest() {
   /**
    * Tests deleting a page display that has no path.
    */
-  public function testDeleteWithNoPath() {
+  public function testDeleteWithNoPath(): void {
     $this->drupalGet('admin/structure/views/view/test_view');
     $this->submitForm([], 'Add Page');
     $this->submitForm([], 'Delete Page');
@@ -132,7 +132,7 @@ public function testDeleteWithNoPath() {
   /**
    * Tests the menu and tab option form.
    */
-  public function testMenuOptions() {
+  public function testMenuOptions(): void {
     $this->drupalGet('admin/structure/views/view/test_view');
 
     // Add a new page display.
@@ -206,7 +206,7 @@ public function testMenuOptions() {
   /**
    * Tests the regression in https://www.drupal.org/node/2532490.
    */
-  public function testDefaultMenuTabRegression() {
+  public function testDefaultMenuTabRegression(): void {
     $this->container->get('module_installer')->install(['menu_link_content', 'toolbar', 'system']);
     $this->resetAll();
     $admin_user = $this->drupalCreateUser([
diff --git a/core/modules/views_ui/tests/src/Functional/DisplayTest.php b/core/modules/views_ui/tests/src/Functional/DisplayTest.php
index 426344b573c1..0fd1b26eb7c5 100644
--- a/core/modules/views_ui/tests/src/Functional/DisplayTest.php
+++ b/core/modules/views_ui/tests/src/Functional/DisplayTest.php
@@ -38,7 +38,7 @@ class DisplayTest extends UITestBase {
   /**
    * Tests adding a display.
    */
-  public function testAddDisplay() {
+  public function testAddDisplay(): void {
     $view = $this->randomView();
     $this->assertSession()->elementNotExists('xpath', '//li[@data-drupal-selector="edit-displays-top-tabs-block-1"]');
     $this->assertSession()->elementNotExists('xpath', '//li[@data-drupal-selector="edit-displays-top-tabs-block-2"]');
@@ -53,7 +53,7 @@ public function testAddDisplay() {
   /**
    * Tests reordering of displays.
    */
-  public function testReorderDisplay() {
+  public function testReorderDisplay(): void {
     $view = [
       'block[create]' => TRUE,
     ];
@@ -88,7 +88,7 @@ public function testReorderDisplay() {
   /**
    * Tests disabling of a display.
    */
-  public function testDisableDisplay() {
+  public function testDisableDisplay(): void {
     $view = $this->randomView();
     $path_prefix = 'admin/structure/views/view/' . $view['id'] . '/edit';
 
@@ -115,7 +115,7 @@ public function testDisableDisplay() {
   /**
    * Tests views_ui_views_plugins_display_alter is altering plugin definitions.
    */
-  public function testDisplayPluginsAlter() {
+  public function testDisplayPluginsAlter(): void {
     $definitions = Views::pluginManager('display')->getDefinitions();
 
     $expected = [
@@ -132,7 +132,7 @@ public function testDisplayPluginsAlter() {
   /**
    * Tests display areas.
    */
-  public function testDisplayAreas() {
+  public function testDisplayAreas(): void {
     // Show the advanced column.
     $this->config('views.settings')->set('ui.show.advanced_column', TRUE)->save();
 
@@ -158,7 +158,7 @@ public function testDisplayAreas() {
   /**
    * Tests the link-display setting.
    */
-  public function testLinkDisplay() {
+  public function testLinkDisplay(): void {
     // Test setting the link display in the UI form.
     $path = 'admin/structure/views/view/test_display/edit/block_1';
     $link_display_path = 'admin/structure/views/nojs/display/test_display/block_1/link_display';
@@ -199,7 +199,7 @@ public function testLinkDisplay() {
   /**
    * Tests that the view status is correctly reflected on the edit form.
    */
-  public function testViewStatus() {
+  public function testViewStatus(): void {
     $view = $this->randomView();
     $id = $view['id'];
 
@@ -218,7 +218,7 @@ public function testViewStatus() {
   /**
    * Ensures that no XSS is possible for buttons.
    */
-  public function testDisplayTitleInButtonsXss() {
+  public function testDisplayTitleInButtonsXss(): void {
     $xss_markup = '"><script>alert(123)</script>';
     $view = $this->randomView();
     $view = View::load($view['id']);
@@ -247,7 +247,7 @@ public function testDisplayTitleInButtonsXss() {
   /**
    * Tests the action links on the edit display UI.
    */
-  public function testActionLinks() {
+  public function testActionLinks(): void {
     // Change the display title of a display so it contains characters that will
     // be escaped when rendered.
     $display_title = "'<test>'";
@@ -279,7 +279,7 @@ public function testActionLinks() {
   /**
    * Tests that the override option is hidden when it's not needed.
    */
-  public function testHideDisplayOverride() {
+  public function testHideDisplayOverride(): void {
     // Test that the override option appears with two displays.
     $this->drupalGet('admin/structure/views/nojs/handler/test_display/page_1/field/title');
     $this->assertSession()->pageTextContains('All displays');
diff --git a/core/modules/views_ui/tests/src/Functional/DuplicateTest.php b/core/modules/views_ui/tests/src/Functional/DuplicateTest.php
index fb1f599d4591..600ae7e6fcc0 100644
--- a/core/modules/views_ui/tests/src/Functional/DuplicateTest.php
+++ b/core/modules/views_ui/tests/src/Functional/DuplicateTest.php
@@ -35,7 +35,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['views_test_conf
   /**
    * Checks if duplicated view exists and has correct label.
    */
-  public function testDuplicateView() {
+  public function testDuplicateView(): void {
     $language_manager = $this->container->get('language_manager');
     ConfigurableLanguage::createFromLangcode('nl')->save();
 
diff --git a/core/modules/views_ui/tests/src/Functional/ExposedFormUITest.php b/core/modules/views_ui/tests/src/Functional/ExposedFormUITest.php
index 3cb81d65f7f8..5a717182ca9a 100644
--- a/core/modules/views_ui/tests/src/Functional/ExposedFormUITest.php
+++ b/core/modules/views_ui/tests/src/Functional/ExposedFormUITest.php
@@ -70,7 +70,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['views_test_conf
   /**
    * Tests the admin interface of exposed filter and sort items.
    */
-  public function testExposedAdminUi() {
+  public function testExposedAdminUi(): void {
     $edit = [];
 
     $this->drupalGet('admin/structure/views/nojs/handler/test_exposed_admin_ui/default/filter/type');
@@ -187,7 +187,7 @@ public function testExposedAdminUi() {
   /**
    * Tests the admin interface of exposed grouped filters.
    */
-  public function testGroupedFilterAdminUi() {
+  public function testGroupedFilterAdminUi(): void {
     $edit = [];
 
     $this->drupalGet('admin/structure/views/nojs/handler/test_exposed_admin_ui/default/filter/type');
@@ -269,7 +269,7 @@ public function testGroupedFilterAdminUi() {
     $this->assertNoGroupedFilterErrors();
   }
 
-  public function testGroupedFilterAdminUiErrors() {
+  public function testGroupedFilterAdminUiErrors(): void {
     // Select the empty operator without a title specified.
     $this->drupalGet('admin/structure/views/nojs/handler/test_exposed_admin_ui/default/filter/body_value');
     $edit = [];
@@ -317,7 +317,7 @@ protected function assertNoGroupedFilterErrors(string $message = ''): void {
   /**
    * Tests the configuration of grouped exposed filters.
    */
-  public function testExposedGroupedFilter() {
+  public function testExposedGroupedFilter(): void {
     // Click the Expose filter button.
     $this->drupalGet('admin/structure/views/nojs/handler/test_exposed_admin_ui/default/filter/type');
     $this->submitForm([], 'Expose filter');
diff --git a/core/modules/views_ui/tests/src/Functional/FieldUITest.php b/core/modules/views_ui/tests/src/Functional/FieldUITest.php
index 43057cb7d249..cd8a199d18af 100644
--- a/core/modules/views_ui/tests/src/Functional/FieldUITest.php
+++ b/core/modules/views_ui/tests/src/Functional/FieldUITest.php
@@ -30,7 +30,7 @@ class FieldUITest extends UITestBase {
   /**
    * Tests the UI of field handlers.
    */
-  public function testFieldUI() {
+  public function testFieldUI(): void {
     // Ensure the field is not marked as hidden on the first run.
     $this->drupalGet('admin/structure/views/view/test_view/edit');
     $this->assertSession()->pageTextContains('Views test: Name');
@@ -84,7 +84,7 @@ public function testFieldUI() {
   /**
    * Tests the field labels.
    */
-  public function testFieldLabel() {
+  public function testFieldLabel(): void {
     // Create a view with unformatted style and make sure the fields have no
     // labels by default.
     $view = [];
diff --git a/core/modules/views_ui/tests/src/Functional/FilterBooleanWebTest.php b/core/modules/views_ui/tests/src/Functional/FilterBooleanWebTest.php
index 7e3bb185a85b..19adb14ba2ee 100644
--- a/core/modules/views_ui/tests/src/Functional/FilterBooleanWebTest.php
+++ b/core/modules/views_ui/tests/src/Functional/FilterBooleanWebTest.php
@@ -27,7 +27,7 @@ class FilterBooleanWebTest extends UITestBase {
   /**
    * Tests the filter boolean UI.
    */
-  public function testFilterBooleanUI() {
+  public function testFilterBooleanUI(): void {
     $this->drupalGet('admin/structure/views/nojs/add-handler/test_view/default/filter');
     $this->submitForm(['name[views_test_data.status]' => TRUE], 'Add and configure filter criteria');
 
diff --git a/core/modules/views_ui/tests/src/Functional/FilterNumericWebTest.php b/core/modules/views_ui/tests/src/Functional/FilterNumericWebTest.php
index 4b97f1a7ad6a..6612f4a7f927 100644
--- a/core/modules/views_ui/tests/src/Functional/FilterNumericWebTest.php
+++ b/core/modules/views_ui/tests/src/Functional/FilterNumericWebTest.php
@@ -30,7 +30,7 @@ class FilterNumericWebTest extends UITestBase {
   /**
    * Tests the filter numeric UI.
    */
-  public function testFilterNumericUI() {
+  public function testFilterNumericUI(): void {
     // Add a page display to the test_view to be able to test the filtering.
     $path = 'test_view-path';
     $this->drupalGet('admin/structure/views/view/test_view/edit');
diff --git a/core/modules/views_ui/tests/src/Functional/FilterUITest.php b/core/modules/views_ui/tests/src/Functional/FilterUITest.php
index 3e92560ade7b..7891d6df02ae 100644
--- a/core/modules/views_ui/tests/src/Functional/FilterUITest.php
+++ b/core/modules/views_ui/tests/src/Functional/FilterUITest.php
@@ -42,7 +42,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['views_test_conf
   /**
    * Tests that an option for a filter is saved as expected from the UI.
    */
-  public function testFilterInOperatorUi() {
+  public function testFilterInOperatorUi(): void {
     $admin_user = $this->drupalCreateUser([
       'administer views',
       'administer site configuration',
@@ -69,7 +69,7 @@ public function testFilterInOperatorUi() {
   /**
    * Tests the filters from the UI.
    */
-  public function testFiltersUI() {
+  public function testFiltersUI(): void {
     $admin_user = $this->drupalCreateUser([
       'administer views',
       'administer site configuration',
@@ -104,7 +104,7 @@ public function testFiltersUI() {
   /**
    * Tests the identifier settings and restrictions.
    */
-  public function testFilterIdentifier() {
+  public function testFilterIdentifier(): void {
     $admin_user = $this->drupalCreateUser([
       'administer views',
       'administer site configuration',
diff --git a/core/modules/views_ui/tests/src/Functional/GroupByTest.php b/core/modules/views_ui/tests/src/Functional/GroupByTest.php
index a81b3af2820f..692106930278 100644
--- a/core/modules/views_ui/tests/src/Functional/GroupByTest.php
+++ b/core/modules/views_ui/tests/src/Functional/GroupByTest.php
@@ -28,7 +28,7 @@ class GroupByTest extends UITestBase {
    *
    * @todo This should check the change of the settings as well.
    */
-  public function testGroupBySave() {
+  public function testGroupBySave(): void {
     $this->drupalGet('admin/structure/views/view/test_views_groupby_save/edit');
 
     $edit_groupby_url = 'admin/structure/views/nojs/handler-group/test_views_groupby_save/default/field/id';
diff --git a/core/modules/views_ui/tests/src/Functional/HandlerTest.php b/core/modules/views_ui/tests/src/Functional/HandlerTest.php
index 122b1cd81209..18e396caf776 100644
--- a/core/modules/views_ui/tests/src/Functional/HandlerTest.php
+++ b/core/modules/views_ui/tests/src/Functional/HandlerTest.php
@@ -97,7 +97,7 @@ protected function viewsData() {
   /**
    * Tests UI CRUD.
    */
-  public function testUiCrud() {
+  public function testUiCrud(): void {
     $handler_types = ViewExecutable::getHandlerTypes();
     foreach ($handler_types as $type => $type_info) {
       // Test adding handlers.
@@ -188,7 +188,7 @@ public function testUiCrud() {
   /**
    * Tests escaping of field labels in help text.
    */
-  public function testHandlerHelpEscaping() {
+  public function testHandlerHelpEscaping(): void {
     // Setup a field with two instances using a different label.
     // Ensure that the label is escaped properly.
 
@@ -223,7 +223,7 @@ public function testHandlerHelpEscaping() {
   /**
    * Tests broken handlers.
    */
-  public function testBrokenHandlers() {
+  public function testBrokenHandlers(): void {
     $handler_types = ViewExecutable::getHandlerTypes();
     foreach ($handler_types as $type => $type_info) {
       $this->drupalGet('admin/structure/views/view/test_view_broken/edit');
@@ -257,7 +257,7 @@ public function testBrokenHandlers() {
    *
    * @see \Drupal\views\EntityViewsData
    */
-  public function testNoDuplicateFields() {
+  public function testNoDuplicateFields(): void {
     $handler_types = ['field', 'filter', 'sort', 'argument'];
 
     foreach ($handler_types as $handler_type) {
@@ -278,7 +278,7 @@ public function testNoDuplicateFields() {
    *
    * @see \Drupal\views\EntityViewsData
    */
-  public function testErrorMissingHelp() {
+  public function testErrorMissingHelp(): void {
     // Test that the error message is not shown for entity fields but an empty
     // description field is shown instead.
     $this->drupalGet('admin/structure/views/nojs/add-handler/test_node_view/default/field');
diff --git a/core/modules/views_ui/tests/src/Functional/NewViewConfigSchemaTest.php b/core/modules/views_ui/tests/src/Functional/NewViewConfigSchemaTest.php
index 1ca10a67e302..44111e646727 100644
--- a/core/modules/views_ui/tests/src/Functional/NewViewConfigSchemaTest.php
+++ b/core/modules/views_ui/tests/src/Functional/NewViewConfigSchemaTest.php
@@ -33,7 +33,7 @@ class NewViewConfigSchemaTest extends UITestBase {
   /**
    * Tests creating brand new views.
    */
-  public function testNewViews() {
+  public function testNewViews(): void {
     $this->drupalLogin($this->drupalCreateUser(['administer views']));
 
     // Create views with all core Views wizards.
diff --git a/core/modules/views_ui/tests/src/Functional/OverrideDisplaysTest.php b/core/modules/views_ui/tests/src/Functional/OverrideDisplaysTest.php
index 90fbb65c8ddd..6b481dbe4a6f 100644
--- a/core/modules/views_ui/tests/src/Functional/OverrideDisplaysTest.php
+++ b/core/modules/views_ui/tests/src/Functional/OverrideDisplaysTest.php
@@ -29,7 +29,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['views_test_conf
   /**
    * Tests that displays can be overridden via the UI.
    */
-  public function testOverrideDisplays() {
+  public function testOverrideDisplays(): void {
     // Create a basic view that shows all content, with a page and a block
     // display.
     $view['label'] = $this->randomMachineName(16);
@@ -94,7 +94,7 @@ public function testOverrideDisplays() {
   /**
    * Tests that the wizard correctly sets up default and overridden displays.
    */
-  public function testWizardMixedDefaultOverriddenDisplays() {
+  public function testWizardMixedDefaultOverriddenDisplays(): void {
     // Create a basic view with a page, block, and feed. Give the page and feed
     // identical titles, but give the block a different one, so we expect the
     // page and feed to inherit their titles from the default display, but the
@@ -195,7 +195,7 @@ public function testWizardMixedDefaultOverriddenDisplays() {
   /**
    * Tests that the revert to all displays select-option works as expected.
    */
-  public function testRevertAllDisplays() {
+  public function testRevertAllDisplays(): void {
     // Create a basic view with a page, block.
     // Because there is both a title on page and block we expect the title on
     // the block be overridden.
diff --git a/core/modules/views_ui/tests/src/Functional/PreviewTest.php b/core/modules/views_ui/tests/src/Functional/PreviewTest.php
index c9d98962fc37..e2204a5dc5ce 100644
--- a/core/modules/views_ui/tests/src/Functional/PreviewTest.php
+++ b/core/modules/views_ui/tests/src/Functional/PreviewTest.php
@@ -33,7 +33,7 @@ class PreviewTest extends UITestBase {
   /**
    * Tests contextual links in the preview form.
    */
-  public function testPreviewContextual() {
+  public function testPreviewContextual(): void {
     \Drupal::service('module_installer')->install(['contextual']);
     $this->resetAll();
 
@@ -68,7 +68,7 @@ public function testPreviewContextual() {
   /**
    * Tests arguments in the preview form.
    */
-  public function testPreviewUI() {
+  public function testPreviewUI(): void {
     $this->drupalGet('admin/structure/views/view/test_preview/edit');
     $this->assertSession()->statusCodeEquals(200);
 
@@ -150,7 +150,7 @@ public function testPreviewUI() {
   /**
    * Tests the additional information query info area.
    */
-  public function testPreviewAdditionalInfo() {
+  public function testPreviewAdditionalInfo(): void {
     \Drupal::service('module_installer')->install(['views_ui_test']);
     $this->resetAll();
 
@@ -171,7 +171,7 @@ public function testPreviewAdditionalInfo() {
   /**
    * Tests view validation error messages in the preview.
    */
-  public function testPreviewError() {
+  public function testPreviewError(): void {
     $this->drupalGet('admin/structure/views/view/test_preview_error/edit');
     $this->assertSession()->statusCodeEquals(200);
 
@@ -183,7 +183,7 @@ public function testPreviewError() {
   /**
    * Tests HTML is filtered from the view title when previewing.
    */
-  public function testPreviewTitle() {
+  public function testPreviewTitle(): void {
     // Update the view and change title with html tags.
     \Drupal::configFactory()->getEditable('views.view.test_preview')
       ->set('display.default.display_options.title', '<strong>Test preview title</strong>')
diff --git a/core/modules/views_ui/tests/src/Functional/QueryTest.php b/core/modules/views_ui/tests/src/Functional/QueryTest.php
index 92782b010671..9ef5d5bae88b 100644
--- a/core/modules/views_ui/tests/src/Functional/QueryTest.php
+++ b/core/modules/views_ui/tests/src/Functional/QueryTest.php
@@ -39,7 +39,7 @@ protected function viewsData() {
   /**
    * Tests query plugins settings.
    */
-  public function testQueryUI() {
+  public function testQueryUI(): void {
     $view = View::load('test_view');
     $display = &$view->getDisplay('default');
     $display['display_options']['query'] = ['type' => 'query_test'];
diff --git a/core/modules/views_ui/tests/src/Functional/RearrangeFieldsTest.php b/core/modules/views_ui/tests/src/Functional/RearrangeFieldsTest.php
index 207f23e0319f..5edc08b04ced 100644
--- a/core/modules/views_ui/tests/src/Functional/RearrangeFieldsTest.php
+++ b/core/modules/views_ui/tests/src/Functional/RearrangeFieldsTest.php
@@ -60,7 +60,7 @@ protected function assertFieldOrder(string $view_name, array $fields): void {
   /**
    * Tests field sorting.
    */
-  public function testRearrangeFields() {
+  public function testRearrangeFields(): void {
     $view_name = 'test_view';
 
     // Checks that the order on the rearrange form matches the creation order.
diff --git a/core/modules/views_ui/tests/src/Functional/RedirectTest.php b/core/modules/views_ui/tests/src/Functional/RedirectTest.php
index 98bbea904bdc..7d57860d32c8 100644
--- a/core/modules/views_ui/tests/src/Functional/RedirectTest.php
+++ b/core/modules/views_ui/tests/src/Functional/RedirectTest.php
@@ -26,7 +26,7 @@ class RedirectTest extends UITestBase {
   /**
    * Tests the redirecting.
    */
-  public function testRedirect() {
+  public function testRedirect(): void {
     $view_name = 'test_view';
 
     $random_destination = $this->randomMachineName();
diff --git a/core/modules/views_ui/tests/src/Functional/ReportFieldsTest.php b/core/modules/views_ui/tests/src/Functional/ReportFieldsTest.php
index 37cadbeab4dd..36681e5ebfc2 100644
--- a/core/modules/views_ui/tests/src/Functional/ReportFieldsTest.php
+++ b/core/modules/views_ui/tests/src/Functional/ReportFieldsTest.php
@@ -32,7 +32,7 @@ class ReportFieldsTest extends UITestBase {
   /**
    * Tests the Views fields report page.
    */
-  public function testReportFields() {
+  public function testReportFields(): void {
     $this->drupalGet('admin/reports/fields/views-fields');
     $this->assertSession()->pageTextContains('Used in views');
     $this->assertSession()->pageTextContains('No fields have been used in views yet.');
diff --git a/core/modules/views_ui/tests/src/Functional/ReportTest.php b/core/modules/views_ui/tests/src/Functional/ReportTest.php
index 5b87ccd560ff..11b41c3b6d7f 100644
--- a/core/modules/views_ui/tests/src/Functional/ReportTest.php
+++ b/core/modules/views_ui/tests/src/Functional/ReportTest.php
@@ -33,7 +33,7 @@ class ReportTest extends UITestBase {
   /**
    * Tests the existence of the views plugin report.
    */
-  public function testReport() {
+  public function testReport(): void {
     $this->drupalLogin($this->adminUser);
 
     // Test the report page.
diff --git a/core/modules/views_ui/tests/src/Functional/RowUITest.php b/core/modules/views_ui/tests/src/Functional/RowUITest.php
index 187f611cf8b9..2b8a31fa0a88 100644
--- a/core/modules/views_ui/tests/src/Functional/RowUITest.php
+++ b/core/modules/views_ui/tests/src/Functional/RowUITest.php
@@ -30,7 +30,7 @@ class RowUITest extends UITestBase {
   /**
    * Tests changing the row plugin and changing some options of a row.
    */
-  public function testRowUI() {
+  public function testRowUI(): void {
     $view_name = 'test_view';
     $view_edit_url = "admin/structure/views/view/$view_name/edit";
 
diff --git a/core/modules/views_ui/tests/src/Functional/SettingsTest.php b/core/modules/views_ui/tests/src/Functional/SettingsTest.php
index 1e27b0759895..426e3a3122cf 100644
--- a/core/modules/views_ui/tests/src/Functional/SettingsTest.php
+++ b/core/modules/views_ui/tests/src/Functional/SettingsTest.php
@@ -36,7 +36,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['views_test_conf
   /**
    * Tests the settings for the edit ui.
    */
-  public function testEditUI() {
+  public function testEditUI(): void {
     $this->drupalLogin($this->adminUser);
 
     // Test the settings tab exists.
diff --git a/core/modules/views_ui/tests/src/Functional/StorageTest.php b/core/modules/views_ui/tests/src/Functional/StorageTest.php
index bc4bd920cb07..3176483f647b 100644
--- a/core/modules/views_ui/tests/src/Functional/StorageTest.php
+++ b/core/modules/views_ui/tests/src/Functional/StorageTest.php
@@ -38,7 +38,7 @@ class StorageTest extends UITestBase {
    *
    * @see views_ui_edit_details_form
    */
-  public function testDetails() {
+  public function testDetails(): void {
     $view_name = 'test_view';
 
     ConfigurableLanguage::createFromLangcode('fr')->save();
diff --git a/core/modules/views_ui/tests/src/Functional/StyleTableTest.php b/core/modules/views_ui/tests/src/Functional/StyleTableTest.php
index 122ba1e5dbc2..ae1e6a3eb8c7 100644
--- a/core/modules/views_ui/tests/src/Functional/StyleTableTest.php
+++ b/core/modules/views_ui/tests/src/Functional/StyleTableTest.php
@@ -22,7 +22,7 @@ class StyleTableTest extends UITestBase {
   /**
    * Tests created a table style view.
    */
-  public function testWizard() {
+  public function testWizard(): void {
     // Create a new view and check that the first field has a label.
     $view = [];
     $view['label'] = $this->randomMachineName(16);
diff --git a/core/modules/views_ui/tests/src/Functional/StyleUITest.php b/core/modules/views_ui/tests/src/Functional/StyleUITest.php
index fe60b48488d5..d04d6659322e 100644
--- a/core/modules/views_ui/tests/src/Functional/StyleUITest.php
+++ b/core/modules/views_ui/tests/src/Functional/StyleUITest.php
@@ -29,7 +29,7 @@ class StyleUITest extends UITestBase {
   /**
    * Tests changing the style plugin and changing some options of a style.
    */
-  public function testStyleUI() {
+  public function testStyleUI(): void {
     $view_name = 'test_view';
     $view_edit_url = "admin/structure/views/view/$view_name/edit";
 
diff --git a/core/modules/views_ui/tests/src/Functional/TokenizeAreaUITest.php b/core/modules/views_ui/tests/src/Functional/TokenizeAreaUITest.php
index 054c88cc61a8..2d62f00a91ea 100644
--- a/core/modules/views_ui/tests/src/Functional/TokenizeAreaUITest.php
+++ b/core/modules/views_ui/tests/src/Functional/TokenizeAreaUITest.php
@@ -28,7 +28,7 @@ class TokenizeAreaUITest extends UITestBase {
   /**
    * Tests that the right tokens are shown as available for replacement.
    */
-  public function testTokenUI() {
+  public function testTokenUI(): void {
     $entity_test = EntityTest::create(['bundle' => 'entity_test']);
     $entity_test->save();
 
diff --git a/core/modules/views_ui/tests/src/Functional/TranslatedViewTest.php b/core/modules/views_ui/tests/src/Functional/TranslatedViewTest.php
index 653feb545148..ec0afc31188f 100644
--- a/core/modules/views_ui/tests/src/Functional/TranslatedViewTest.php
+++ b/core/modules/views_ui/tests/src/Functional/TranslatedViewTest.php
@@ -73,7 +73,7 @@ protected function setUp($import_test_views = TRUE, $modules = []): void {
     $this->rebuildContainer();
   }
 
-  public function testTranslatedStrings() {
+  public function testTranslatedStrings(): void {
     $translation_url = 'admin/structure/views/view/files/translate/fr/add';
     $edit_url = 'admin/structure/views/view/files';
 
diff --git a/core/modules/views_ui/tests/src/Functional/UnsavedPreviewTest.php b/core/modules/views_ui/tests/src/Functional/UnsavedPreviewTest.php
index f3d1e36846f0..16be2e74331f 100644
--- a/core/modules/views_ui/tests/src/Functional/UnsavedPreviewTest.php
+++ b/core/modules/views_ui/tests/src/Functional/UnsavedPreviewTest.php
@@ -48,7 +48,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['views_test_conf
   /**
    * Tests previews of unsaved new page displays.
    */
-  public function testUnsavedPageDisplayPreview() {
+  public function testUnsavedPageDisplayPreview(): void {
     $this->drupalCreateContentType(['type' => 'page']);
     for ($i = 0; $i < 5; $i++) {
       $this->drupalCreateNode();
diff --git a/core/modules/views_ui/tests/src/Functional/ViewEditTest.php b/core/modules/views_ui/tests/src/Functional/ViewEditTest.php
index eb074c45ffbe..b15fe2aeb197 100644
--- a/core/modules/views_ui/tests/src/Functional/ViewEditTest.php
+++ b/core/modules/views_ui/tests/src/Functional/ViewEditTest.php
@@ -31,7 +31,7 @@ class ViewEditTest extends UITestBase {
   /**
    * Tests the delete link on a views UI.
    */
-  public function testDeleteLink() {
+  public function testDeleteLink(): void {
     $this->drupalGet('admin/structure/views/view/test_view');
     $this->assertSession()->linkExists('Delete view', 0, 'Ensure that the view delete link appears');
 
@@ -50,7 +50,7 @@ public function testDeleteLink() {
   /**
    * Tests the machine name and administrative comment forms.
    */
-  public function testOtherOptions() {
+  public function testOtherOptions(): void {
     \Drupal::service('module_installer')->install(['dblog']);
     $this->drupalGet('admin/structure/views/view/test_view');
     // Add a new attachment display.
@@ -139,7 +139,7 @@ public function testOtherOptions() {
   /**
    * Tests the language options on the views edit form.
    */
-  public function testEditFormLanguageOptions() {
+  public function testEditFormLanguageOptions(): void {
     $assert_session = $this->assertSession();
 
     // Language options should not exist without language module.
@@ -262,7 +262,7 @@ public function testEditFormLanguageOptions() {
   /**
    * Tests Representative Node for a Taxonomy Term.
    */
-  public function testRelationRepresentativeNode() {
+  public function testRelationRepresentativeNode(): void {
     // Populate and submit the form.
     $edit["name[taxonomy_term_field_data.tid_representative]"] = TRUE;
     $this->drupalGet('admin/structure/views/nojs/add-handler/test_groupwise_term_ui/default/relationship');
diff --git a/core/modules/views_ui/tests/src/Functional/ViewsListTest.php b/core/modules/views_ui/tests/src/Functional/ViewsListTest.php
index 4d540fb3b499..2de0a8853421 100644
--- a/core/modules/views_ui/tests/src/Functional/ViewsListTest.php
+++ b/core/modules/views_ui/tests/src/Functional/ViewsListTest.php
@@ -48,7 +48,7 @@ protected function setUp($import_test_views = TRUE, $modules = []): void {
   /**
    * Tests that the views list does not use a pager.
    */
-  public function testViewsListLimit() {
+  public function testViewsListLimit(): void {
     // Check if we can access the main views admin page.
     $this->drupalGet('admin/structure/views');
     $this->assertSession()->statusCodeEquals(200);
diff --git a/core/modules/views_ui/tests/src/Functional/WizardTest.php b/core/modules/views_ui/tests/src/Functional/WizardTest.php
index 6ac9b7d8fe00..82042cc0c0ec 100644
--- a/core/modules/views_ui/tests/src/Functional/WizardTest.php
+++ b/core/modules/views_ui/tests/src/Functional/WizardTest.php
@@ -25,7 +25,7 @@ class WizardTest extends WizardTestBase {
   /**
    * Tests filling in the wizard with really long strings.
    */
-  public function testWizardFieldLength() {
+  public function testWizardFieldLength(): void {
     $view = [];
     $view['label'] = $this->randomMachineName(256);
     $view['id'] = $this->randomMachineName(129);
diff --git a/core/modules/views_ui/tests/src/Functional/XssTest.php b/core/modules/views_ui/tests/src/Functional/XssTest.php
index 47a98951bcbd..64528e943e4d 100644
--- a/core/modules/views_ui/tests/src/Functional/XssTest.php
+++ b/core/modules/views_ui/tests/src/Functional/XssTest.php
@@ -23,7 +23,7 @@ class XssTest extends UITestBase {
    */
   protected $defaultTheme = 'stark';
 
-  public function testViewsUi() {
+  public function testViewsUi(): void {
     $this->drupalGet('admin/structure/views/view/sa_contrib_2013_035');
     // Verify that the field admin label is properly escaped.
     $this->assertSession()->assertEscaped('<marquee>test</marquee>');
@@ -37,7 +37,7 @@ public function testViewsUi() {
   /**
    * Checks the admin UI for double escaping.
    */
-  public function testNoDoubleEscaping() {
+  public function testNoDoubleEscaping(): void {
     $this->drupalGet('admin/structure/views');
     $this->assertSession()->assertNoEscaped('&lt;');
 
diff --git a/core/modules/views_ui/tests/src/FunctionalJavascript/AdminAjaxTest.php b/core/modules/views_ui/tests/src/FunctionalJavascript/AdminAjaxTest.php
index 38e1a3089b79..7b6f8495264d 100644
--- a/core/modules/views_ui/tests/src/FunctionalJavascript/AdminAjaxTest.php
+++ b/core/modules/views_ui/tests/src/FunctionalJavascript/AdminAjaxTest.php
@@ -39,7 +39,7 @@ protected function setUp(): void {
   /**
    * Confirms that form_alter is triggered after AJAX rebuilds.
    */
-  public function testAjaxRebuild() {
+  public function testAjaxRebuild(): void {
     \Drupal::service('theme_installer')->install(['views_ui_test_theme']);
 
     $this->config('system.theme')
@@ -64,7 +64,7 @@ public function testAjaxRebuild() {
   /**
    * Tests body scroll.
    */
-  public function testBodyScroll() {
+  public function testBodyScroll(): void {
     $this->drupalGet('admin/structure/views/view/user_admin_people');
     $page = $this->getSession()->getPage();
     foreach (['name[views.nothing]', 'name[views.dropbutton]'] as $field) {
diff --git a/core/modules/views_ui/tests/src/FunctionalJavascript/DisplayTest.php b/core/modules/views_ui/tests/src/FunctionalJavascript/DisplayTest.php
index 70fb850e6e11..9e55481c9cdc 100644
--- a/core/modules/views_ui/tests/src/FunctionalJavascript/DisplayTest.php
+++ b/core/modules/views_ui/tests/src/FunctionalJavascript/DisplayTest.php
@@ -67,7 +67,7 @@ protected function setUp(): void {
   /**
    * Tests adding a display.
    */
-  public function testAddDisplay() {
+  public function testAddDisplay(): void {
     $this->drupalGet('admin/structure/views/view/test_content_ajax');
     $page = $this->getSession()->getPage();
 
@@ -86,7 +86,7 @@ public function testAddDisplay() {
   /**
    * Tests setting the administrative title.
    */
-  public function testRenameDisplayAdminName() {
+  public function testRenameDisplayAdminName(): void {
     $titles = ['New admin title', '</title><script>alert("alert!")</script>'];
     foreach ($titles as $new_title) {
       $this->drupalGet('admin/structure/views/view/test_content_ajax');
@@ -108,7 +108,7 @@ public function testRenameDisplayAdminName() {
   /**
    * Tests contextual links on Views page displays.
    */
-  public function testPageContextualLinks() {
+  public function testPageContextualLinks(): void {
     $view = View::load('test_display');
     $view->enable()->save();
     $this->container->get('router.builder')->rebuildIfNeeded();
@@ -160,7 +160,7 @@ protected function toggleContextualTriggerVisibility($selector) {
   /**
    * Test if 'add' translations are filtered from multilingual display options.
    */
-  public function testAddDisplayBlockTranslation() {
+  public function testAddDisplayBlockTranslation(): void {
 
     // Set up an additional language (Hungarian).
     $langcode = 'hu';
diff --git a/core/modules/views_ui/tests/src/FunctionalJavascript/FieldDialogsTest.php b/core/modules/views_ui/tests/src/FunctionalJavascript/FieldDialogsTest.php
index 39f45b482093..edb025c2fa36 100644
--- a/core/modules/views_ui/tests/src/FunctionalJavascript/FieldDialogsTest.php
+++ b/core/modules/views_ui/tests/src/FunctionalJavascript/FieldDialogsTest.php
@@ -58,7 +58,7 @@ protected function setUp(): void {
   /**
    * Tests removing a field through the rearrange dialog.
    */
-  public function testRemoveFieldHandler() {
+  public function testRemoveFieldHandler(): void {
     $this->drupalGet('admin/structure/views/view/test_content_ajax');
     $page = $this->getSession()->getPage();
 
diff --git a/core/modules/views_ui/tests/src/FunctionalJavascript/FilterCriteriaTest.php b/core/modules/views_ui/tests/src/FunctionalJavascript/FilterCriteriaTest.php
index a23c72f6ff1a..8dffc12aa430 100644
--- a/core/modules/views_ui/tests/src/FunctionalJavascript/FilterCriteriaTest.php
+++ b/core/modules/views_ui/tests/src/FunctionalJavascript/FilterCriteriaTest.php
@@ -44,7 +44,7 @@ protected function setUp(): void {
   /**
    * Tests dialog for filter criteria.
    */
-  public function testFilterCriteriaDialog() {
+  public function testFilterCriteriaDialog(): void {
     // Checks that the admin summary is not double escaped.
     $this->drupalGet('admin/structure/views/view/who_s_online');
     $page = $this->getSession()->getPage();
@@ -130,7 +130,7 @@ public function testFilterCriteriaDialog() {
   /**
    * Tests operator labels.
    */
-  public function testOperatorLabels() {
+  public function testOperatorLabels(): void {
     // Open the "Frontpage" view.
     $this->drupalGet('admin/structure/views/view/frontpage');
     $session = $this->getSession();
diff --git a/core/modules/views_ui/tests/src/FunctionalJavascript/FilterOptionsTest.php b/core/modules/views_ui/tests/src/FunctionalJavascript/FilterOptionsTest.php
index f8c15f1d43a3..3a5dc1100403 100644
--- a/core/modules/views_ui/tests/src/FunctionalJavascript/FilterOptionsTest.php
+++ b/core/modules/views_ui/tests/src/FunctionalJavascript/FilterOptionsTest.php
@@ -43,7 +43,7 @@ protected function setUp(): void {
   /**
    * Tests filtering options in the 'Add fields' dialog.
    */
-  public function testFilterOptionsAddFields() {
+  public function testFilterOptionsAddFields(): void {
     $this->drupalGet('admin/structure/views/view/content');
 
     $session = $this->getSession();
diff --git a/core/modules/views_ui/tests/src/FunctionalJavascript/PreviewTest.php b/core/modules/views_ui/tests/src/FunctionalJavascript/PreviewTest.php
index b9afc6146f16..134861728083 100644
--- a/core/modules/views_ui/tests/src/FunctionalJavascript/PreviewTest.php
+++ b/core/modules/views_ui/tests/src/FunctionalJavascript/PreviewTest.php
@@ -116,7 +116,7 @@ protected function dataSet() {
    *
    * @see https://www.drupal.org/node/2452659
    */
-  public function testTaxonomyAJAX() {
+  public function testTaxonomyAJAX(): void {
     \Drupal::service('module_installer')->install(['taxonomy']);
     $this->getPreviewAJAX('taxonomy_term', 'page_1', 0);
   }
@@ -124,7 +124,7 @@ public function testTaxonomyAJAX() {
   /**
    * Tests pagers in the preview form.
    */
-  public function testPreviewWithPagersUI() {
+  public function testPreviewWithPagersUI(): void {
     // Create 11 nodes and make sure that everyone is returned.
     $this->drupalCreateContentType(['type' => 'page']);
     for ($i = 0; $i < 11; $i++) {
@@ -229,7 +229,7 @@ public function testPreviewWithPagersUI() {
   /**
    * Tests the link to sort in the preview form.
    */
-  public function testPreviewSortLink() {
+  public function testPreviewSortLink(): void {
     // Get the preview.
     $this->getPreviewAJAX('test_click_sort_ajax', 'page_1', 0);
 
diff --git a/core/modules/views_ui/tests/src/FunctionalJavascript/ViewsListingTest.php b/core/modules/views_ui/tests/src/FunctionalJavascript/ViewsListingTest.php
index cd2f7cb9dd11..7355e16c023b 100644
--- a/core/modules/views_ui/tests/src/FunctionalJavascript/ViewsListingTest.php
+++ b/core/modules/views_ui/tests/src/FunctionalJavascript/ViewsListingTest.php
@@ -40,7 +40,7 @@ protected function setUp(): void {
   /**
    * Tests the filtering on the Views listing page.
    */
-  public function testFilterViewsListing() {
+  public function testFilterViewsListing(): void {
     $enabled_views_count = 6;
     $disabled_views_count = 2;
     $content_views_count = 3;
diff --git a/core/modules/views_ui/tests/src/FunctionalJavascript/ViewsWizardTest.php b/core/modules/views_ui/tests/src/FunctionalJavascript/ViewsWizardTest.php
index 227ccb618e07..b1026d785841 100644
--- a/core/modules/views_ui/tests/src/FunctionalJavascript/ViewsWizardTest.php
+++ b/core/modules/views_ui/tests/src/FunctionalJavascript/ViewsWizardTest.php
@@ -40,7 +40,7 @@ protected function setUp(): void {
   /**
    * Tests creating a View using the wizard.
    */
-  public function testCreateViewWizard() {
+  public function testCreateViewWizard(): void {
     $this->drupalGet('admin/structure/views/add');
     $page = $this->getSession()->getPage();
 
diff --git a/core/modules/views_ui/tests/src/Kernel/TagTest.php b/core/modules/views_ui/tests/src/Kernel/TagTest.php
index a9311c65479c..5881a169fa02 100644
--- a/core/modules/views_ui/tests/src/Kernel/TagTest.php
+++ b/core/modules/views_ui/tests/src/Kernel/TagTest.php
@@ -27,7 +27,7 @@ class TagTest extends ViewsKernelTestBase {
   /**
    * Tests the ViewsUIController::autocompleteTag() function.
    */
-  public function testViewsUiAutocompleteTag() {
+  public function testViewsUiAutocompleteTag(): void {
     \Drupal::moduleHandler()->loadInclude('views_ui', 'inc', 'admin');
 
     // Save 15 views with a tag.
@@ -80,7 +80,7 @@ public function testViewsUiAutocompleteTag() {
    *
    * @dataProvider providerViewsUiAutocompleteIndividualTags
    */
-  public function testViewsUiAutocompleteIndividualTags($expected_tag, $search_string) {
+  public function testViewsUiAutocompleteIndividualTags($expected_tag, $search_string): void {
     $controller = ViewsUIController::create($this->container);
     $request = $this->container->get('request_stack')->getCurrentRequest();
     $tag = 'comma, 你好, Foo bar';
diff --git a/core/modules/views_ui/tests/src/Unit/Form/Ajax/RearrangeFilterTest.php b/core/modules/views_ui/tests/src/Unit/Form/Ajax/RearrangeFilterTest.php
index a47c8450bdd4..d249435deccb 100644
--- a/core/modules/views_ui/tests/src/Unit/Form/Ajax/RearrangeFilterTest.php
+++ b/core/modules/views_ui/tests/src/Unit/Form/Ajax/RearrangeFilterTest.php
@@ -17,7 +17,7 @@ class RearrangeFilterTest extends UnitTestCase {
   /**
    * Tests static methods.
    */
-  public function testStaticMethods() {
+  public function testStaticMethods(): void {
     // Test the RearrangeFilter::arrayKeyPlus method.
     $original = [0 => 'one', 1 => 'two', 2 => 'three'];
     $expected = [1 => 'one', 2 => 'two', 3 => 'three'];
diff --git a/core/modules/views_ui/tests/src/Unit/ViewListBuilderTest.php b/core/modules/views_ui/tests/src/Unit/ViewListBuilderTest.php
index 442d9310818e..ceae6360fc7f 100644
--- a/core/modules/views_ui/tests/src/Unit/ViewListBuilderTest.php
+++ b/core/modules/views_ui/tests/src/Unit/ViewListBuilderTest.php
@@ -27,7 +27,7 @@ class ViewListBuilderTest extends UnitTestCase {
    * @see \Drupal\views_ui\ViewListBuilder::getDisplaysList()
    * @covers ::buildRow
    */
-  public function testBuildRowEntityList() {
+  public function testBuildRowEntityList(): void {
     $storage = $this->getMockBuilder('Drupal\Core\Config\Entity\ConfigEntityStorage')
       ->disableOriginalConstructor()
       ->getMock();
diff --git a/core/modules/views_ui/tests/src/Unit/ViewUIObjectTest.php b/core/modules/views_ui/tests/src/Unit/ViewUIObjectTest.php
index d98a31dd04c4..d5fea2ab2cde 100644
--- a/core/modules/views_ui/tests/src/Unit/ViewUIObjectTest.php
+++ b/core/modules/views_ui/tests/src/Unit/ViewUIObjectTest.php
@@ -20,7 +20,7 @@ class ViewUIObjectTest extends UnitTestCase {
   /**
    * Tests entity method decoration.
    */
-  public function testEntityDecoration() {
+  public function testEntityDecoration(): void {
     $method_args = [];
     $method_args['setOriginalId'] = [12];
     $method_args['setStatus'] = [TRUE];
@@ -75,7 +75,7 @@ public function testEntityDecoration() {
   /**
    * Tests the isLocked method.
    */
-  public function testIsLocked() {
+  public function testIsLocked(): void {
     $storage = $this->getMockBuilder('Drupal\views\Entity\View')
       ->setConstructorArgs([[], 'view'])
       ->getMock();
@@ -115,7 +115,7 @@ public function testIsLocked() {
   /**
    * Tests serialization of the ViewUI object.
    */
-  public function testSerialization() {
+  public function testSerialization(): void {
     $storage = new View([], 'view');
     $executable = $this->getMockBuilder('Drupal\views\ViewExecutable')
       ->disableOriginalConstructor()
diff --git a/core/modules/workflows/tests/src/Functional/WorkflowCustomStateTransitionAccessTest.php b/core/modules/workflows/tests/src/Functional/WorkflowCustomStateTransitionAccessTest.php
index 8029164aaf23..b99b2bca6934 100644
--- a/core/modules/workflows/tests/src/Functional/WorkflowCustomStateTransitionAccessTest.php
+++ b/core/modules/workflows/tests/src/Functional/WorkflowCustomStateTransitionAccessTest.php
@@ -58,7 +58,7 @@ protected function setUp(): void {
   /**
    * Tests the custom state/transition operation access rules.
    */
-  public function testCustomWorkflowAccessOperations() {
+  public function testCustomWorkflowAccessOperations(): void {
     $this->drupalLogin($this->adminUser);
     $forbidden_paths = [
       'admin/config/workflow/workflows/manage/test_type/state/cannot_delete/delete',
diff --git a/core/modules/workflows/tests/src/Functional/WorkflowUiNoTypeTest.php b/core/modules/workflows/tests/src/Functional/WorkflowUiNoTypeTest.php
index 3025b0c4b606..ee5b7806f4ab 100644
--- a/core/modules/workflows/tests/src/Functional/WorkflowUiNoTypeTest.php
+++ b/core/modules/workflows/tests/src/Functional/WorkflowUiNoTypeTest.php
@@ -38,7 +38,7 @@ protected function setUp(): void {
   /**
    * Tests the creation of a workflow through the UI.
    */
-  public function testWorkflowUiWithNoType() {
+  public function testWorkflowUiWithNoType(): void {
     $this->drupalLogin($this->createUser(['access administration pages', 'administer workflows']));
     $this->drupalGet('admin/config/workflow/workflows/add');
     // There are no workflow types so this should be a 403.
diff --git a/core/modules/workflows/tests/src/Functional/WorkflowUiTest.php b/core/modules/workflows/tests/src/Functional/WorkflowUiTest.php
index 152853130970..c959cc020b65 100644
--- a/core/modules/workflows/tests/src/Functional/WorkflowUiTest.php
+++ b/core/modules/workflows/tests/src/Functional/WorkflowUiTest.php
@@ -40,7 +40,7 @@ protected function setUp(): void {
   /**
    * Tests route access/permissions.
    */
-  public function testAccess() {
+  public function testAccess(): void {
     // Create a minimal workflow for testing.
     $workflow = Workflow::create(['id' => 'test', 'type' => 'workflow_type_test', 'label' => 'Test']);
     $workflow
@@ -91,7 +91,7 @@ public function testAccess() {
   /**
    * Tests the machine name validation of the state add form.
    */
-  public function testStateMachineNameValidation() {
+  public function testStateMachineNameValidation(): void {
     Workflow::create([
       'id' => 'test_workflow',
       'label' => 'Test workflow',
@@ -119,7 +119,7 @@ public function testStateMachineNameValidation() {
   /**
    * Tests the creation of a workflow through the UI.
    */
-  public function testWorkflowCreation() {
+  public function testWorkflowCreation(): void {
     $workflow_storage = $this->container->get('entity_type.manager')->getStorage('workflow');
     /** @var \Drupal\workflows\WorkflowInterface $workflow */
     $this->drupalLogin($this->createUser(['access administration pages', 'administer workflows']));
@@ -291,7 +291,7 @@ public function testWorkflowCreation() {
   /**
    * Tests the workflow configuration form.
    */
-  public function testWorkflowConfigurationForm() {
+  public function testWorkflowConfigurationForm(): void {
     $workflow = Workflow::create(['id' => 'test', 'type' => 'workflow_type_complex_test', 'label' => 'Test']);
     $workflow
       ->getTypePlugin()
@@ -314,7 +314,7 @@ public function testWorkflowConfigurationForm() {
   /**
    * Tests a workflow, state, and transition can have a numeric ID and label.
    */
-  public function testNumericIds() {
+  public function testNumericIds(): void {
     $this->drupalLogin($this->createUser(['administer workflows']));
     $this->drupalGet('admin/config/workflow/workflows');
     $this->clickLink('Add workflow');
@@ -343,7 +343,7 @@ public function testNumericIds() {
   /**
    * Tests the sorting of states and transitions by weight and label.
    */
-  public function testSorting() {
+  public function testSorting(): void {
     $workflow = Workflow::create(['id' => 'test', 'type' => 'workflow_type_complex_test', 'label' => 'Test']);
     $workflow
       ->getTypePlugin()
diff --git a/core/modules/workflows/tests/src/Kernel/ComplexWorkflowTypeTest.php b/core/modules/workflows/tests/src/Kernel/ComplexWorkflowTypeTest.php
index f36ef8a5038d..f1fb13c1bd61 100644
--- a/core/modules/workflows/tests/src/Kernel/ComplexWorkflowTypeTest.php
+++ b/core/modules/workflows/tests/src/Kernel/ComplexWorkflowTypeTest.php
@@ -24,7 +24,7 @@ class ComplexWorkflowTypeTest extends KernelTestBase {
   /**
    * @covers \Drupal\workflows\Entity\Workflow::loadMultipleByType
    */
-  public function testLoadMultipleByType() {
+  public function testLoadMultipleByType(): void {
     $workflow1 = Workflow::create([
       'id' => 'test1',
       'label' => 'Test 1',
diff --git a/core/modules/workflows/tests/src/Kernel/PredefinedWorkflowTypeTest.php b/core/modules/workflows/tests/src/Kernel/PredefinedWorkflowTypeTest.php
index 5cd634613a3c..39fa5082cdd8 100644
--- a/core/modules/workflows/tests/src/Kernel/PredefinedWorkflowTypeTest.php
+++ b/core/modules/workflows/tests/src/Kernel/PredefinedWorkflowTypeTest.php
@@ -22,7 +22,7 @@ class PredefinedWorkflowTypeTest extends KernelTestBase {
   /**
    * Tests a predefined workflow type.
    */
-  public function testPredefinedWorkflowType() {
+  public function testPredefinedWorkflowType(): void {
     $workflow = Workflow::create([
       'id' => 'aces',
       'label' => 'Aces Workflow',
diff --git a/core/modules/workflows/tests/src/Kernel/RequiredStatesTest.php b/core/modules/workflows/tests/src/Kernel/RequiredStatesTest.php
index a9368965dd13..c76a989ebfac 100644
--- a/core/modules/workflows/tests/src/Kernel/RequiredStatesTest.php
+++ b/core/modules/workflows/tests/src/Kernel/RequiredStatesTest.php
@@ -26,7 +26,7 @@ class RequiredStatesTest extends KernelTestBase {
    * @covers ::getRequiredStates
    * @covers ::__construct
    */
-  public function testGetRequiredStates() {
+  public function testGetRequiredStates(): void {
     $workflow = Workflow::create([
       'id' => 'test',
       'label' => 'Test workflow',
@@ -45,7 +45,7 @@ public function testGetRequiredStates() {
   /**
    * @covers \Drupal\workflows\Entity\Workflow::preSave
    */
-  public function testDeleteRequiredStateAPI() {
+  public function testDeleteRequiredStateAPI(): void {
     $workflow = Workflow::create([
       'id' => 'test',
       'label' => 'Test workflow',
@@ -62,7 +62,7 @@ public function testDeleteRequiredStateAPI() {
   /**
    * @covers \Drupal\workflows\Entity\Workflow::preSave
    */
-  public function testNoStatesRequiredStateAPI() {
+  public function testNoStatesRequiredStateAPI(): void {
     $workflow = Workflow::create([
       'id' => 'test',
       'type' => 'workflow_type_required_state_test',
@@ -78,7 +78,7 @@ public function testNoStatesRequiredStateAPI() {
   /**
    * Ensures that initialized configuration can be changed.
    */
-  public function testChangeRequiredStateAPI() {
+  public function testChangeRequiredStateAPI(): void {
     $workflow = Workflow::create([
       'id' => 'test',
       'label' => 'Test workflow',
diff --git a/core/modules/workflows/tests/src/Kernel/WorkflowAccessControlHandlerTest.php b/core/modules/workflows/tests/src/Kernel/WorkflowAccessControlHandlerTest.php
index 81cf994a94b7..b3e3d9a9c208 100644
--- a/core/modules/workflows/tests/src/Kernel/WorkflowAccessControlHandlerTest.php
+++ b/core/modules/workflows/tests/src/Kernel/WorkflowAccessControlHandlerTest.php
@@ -72,7 +72,7 @@ protected function setUp(): void {
   /**
    * @covers ::checkCreateAccess
    */
-  public function testCheckCreateAccess() {
+  public function testCheckCreateAccess(): void {
     // A user must have the correct permission to create a workflow.
     $this->assertEquals(
       AccessResult::neutral()
@@ -101,7 +101,7 @@ public function testCheckCreateAccess() {
    * @covers ::checkAccess
    * @dataProvider checkAccessProvider
    */
-  public function testCheckAccess($user, $operation, $result, $states_to_create = []) {
+  public function testCheckAccess($user, $operation, $result, $states_to_create = []): void {
     $workflow = Workflow::create([
       'type' => 'workflow_type_test',
       'id' => 'test_workflow',
diff --git a/core/modules/workflows/tests/src/Kernel/WorkflowDependenciesTest.php b/core/modules/workflows/tests/src/Kernel/WorkflowDependenciesTest.php
index 07fdeb0407c8..e0f9c681e551 100644
--- a/core/modules/workflows/tests/src/Kernel/WorkflowDependenciesTest.php
+++ b/core/modules/workflows/tests/src/Kernel/WorkflowDependenciesTest.php
@@ -29,7 +29,7 @@ class WorkflowDependenciesTest extends KernelTestBase {
   /**
    * Tests \Drupal\workflows\Entity\Workflow::onDependencyRemoval().
    */
-  public function testOnDependencyRemoval() {
+  public function testOnDependencyRemoval(): void {
     // Create a workflow that has a dependency on a third party setting.
     $workflow = Workflow::create([
       'id' => 'test3',
diff --git a/core/modules/workflows/tests/src/Unit/StateTest.php b/core/modules/workflows/tests/src/Unit/StateTest.php
index 2ce55c4745c6..a5e508a3d5bc 100644
--- a/core/modules/workflows/tests/src/Unit/StateTest.php
+++ b/core/modules/workflows/tests/src/Unit/StateTest.php
@@ -22,7 +22,7 @@ class StateTest extends UnitTestCase {
    * @covers ::label
    * @covers ::weight
    */
-  public function testGetters() {
+  public function testGetters(): void {
     $state = new State(
       $this->prophesize(WorkflowTypeInterface::class)->reveal(),
       'draft',
@@ -37,7 +37,7 @@ public function testGetters() {
   /**
    * @covers ::canTransitionTo
    */
-  public function testCanTransitionTo() {
+  public function testCanTransitionTo(): void {
     $workflow_type = new TestType([], '', []);
     $workflow_type
       ->addState('draft', 'Draft')
@@ -54,7 +54,7 @@ public function testCanTransitionTo() {
   /**
    * @covers ::getTransitionTo
    */
-  public function testGetTransitionTo() {
+  public function testGetTransitionTo(): void {
     $workflow_type = new TestType([], '', []);
     $workflow_type
       ->addState('draft', 'Draft')
@@ -68,7 +68,7 @@ public function testGetTransitionTo() {
   /**
    * @covers ::getTransitionTo
    */
-  public function testGetTransitionToException() {
+  public function testGetTransitionToException(): void {
     $this->expectException(\InvalidArgumentException::class);
     $this->expectExceptionMessage("Can not transition to 'published' state");
     $workflow_type = new TestType([], '', []);
@@ -80,7 +80,7 @@ public function testGetTransitionToException() {
   /**
    * @covers ::getTransitions
    */
-  public function testGetTransitions() {
+  public function testGetTransitions(): void {
     $workflow_type = new TestType([], '', []);
     $workflow_type
       ->addState('draft', 'Draft')
@@ -99,7 +99,7 @@ public function testGetTransitions() {
   /**
    * @covers ::labelCallback
    */
-  public function testLabelCallback() {
+  public function testLabelCallback(): void {
     $workflow_type = $this->prophesize(WorkflowTypeInterface::class)->reveal();
     $states = [
       new State($workflow_type, 'draft', 'Draft'),
diff --git a/core/modules/workflows/tests/src/Unit/TransitionTest.php b/core/modules/workflows/tests/src/Unit/TransitionTest.php
index 5ff7d02abbde..7aac71ff078a 100644
--- a/core/modules/workflows/tests/src/Unit/TransitionTest.php
+++ b/core/modules/workflows/tests/src/Unit/TransitionTest.php
@@ -21,7 +21,7 @@ class TransitionTest extends UnitTestCase {
    * @covers ::id
    * @covers ::label
    */
-  public function testGetters() {
+  public function testGetters(): void {
     $state = new Transition(
       $this->prophesize(WorkflowTypeInterface::class)->reveal(),
       'draft_published',
@@ -37,7 +37,7 @@ public function testGetters() {
    * @covers ::from
    * @covers ::to
    */
-  public function testFromAndTo() {
+  public function testFromAndTo(): void {
     $workflow = new TestType([], '', []);
     $workflow
       ->addState('draft', 'Draft')
diff --git a/core/modules/workflows/tests/src/Unit/WorkflowStateTransitionOperationsAccessCheckTest.php b/core/modules/workflows/tests/src/Unit/WorkflowStateTransitionOperationsAccessCheckTest.php
index 1f7b4ed45177..da1aabd97dcf 100644
--- a/core/modules/workflows/tests/src/Unit/WorkflowStateTransitionOperationsAccessCheckTest.php
+++ b/core/modules/workflows/tests/src/Unit/WorkflowStateTransitionOperationsAccessCheckTest.php
@@ -25,7 +25,7 @@ class WorkflowStateTransitionOperationsAccessCheckTest extends UnitTestCase {
    * @covers ::access
    * @dataProvider accessTestCases
    */
-  public function testAccess($route_requirement, $resulting_entity_access_check, $route_parameters = []) {
+  public function testAccess($route_requirement, $resulting_entity_access_check, $route_parameters = []): void {
     $workflow_entity_access_result = AccessResult::allowed();
     $workflow = $this->prophesize(WorkflowInterface::class);
     $workflow->access($resulting_entity_access_check, Argument::type(AccountInterface::class), TRUE)
@@ -94,7 +94,7 @@ public static function accessTestCases() {
   /**
    * @covers ::access
    */
-  public function testMissingRouteParams() {
+  public function testMissingRouteParams(): void {
     $workflow = $this->prophesize(WorkflowInterface::class);
     $workflow->access()->shouldNotBeCalled();
 
@@ -126,7 +126,7 @@ public function testMissingRouteParams() {
    * @covers ::access
    * @dataProvider invalidOperationNameTestCases
    */
-  public function testInvalidOperationName($operation_name) {
+  public function testInvalidOperationName($operation_name): void {
     $this->expectException(\Exception::class);
     $this->expectExceptionMessage("Invalid _workflow_access operation '$operation_name' specified for route 'Foo Route'.");
     $route = new Route('', [], [
diff --git a/core/modules/workflows/tests/src/Unit/WorkflowTest.php b/core/modules/workflows/tests/src/Unit/WorkflowTest.php
index d15567d22cd9..76fae5af6f67 100644
--- a/core/modules/workflows/tests/src/Unit/WorkflowTest.php
+++ b/core/modules/workflows/tests/src/Unit/WorkflowTest.php
@@ -38,7 +38,7 @@ protected function setUp(): void {
    * @covers ::addState
    * @covers ::hasState
    */
-  public function testAddAndHasState() {
+  public function testAddAndHasState(): void {
     $workflow = new Workflow(['id' => 'test', 'type' => 'test_type'], 'workflow');
     $this->assertFalse($workflow->getTypePlugin()->hasState('draft'));
 
@@ -59,7 +59,7 @@ public function testAddAndHasState() {
   /**
    * @covers ::addState
    */
-  public function testAddStateException() {
+  public function testAddStateException(): void {
     $this->expectException(\InvalidArgumentException::class);
     $this->expectExceptionMessage("The state 'draft' already exists in workflow.");
     $workflow = new Workflow(['id' => 'test', 'type' => 'test_type'], 'workflow');
@@ -70,7 +70,7 @@ public function testAddStateException() {
   /**
    * @covers ::addState
    */
-  public function testAddStateInvalidIdException() {
+  public function testAddStateInvalidIdException(): void {
     $this->expectException(\InvalidArgumentException::class);
     $this->expectExceptionMessage("The state ID 'draft-draft' must contain only lowercase letters, numbers, and underscores");
     $workflow = new Workflow(['id' => 'test', 'type' => 'test_type'], 'workflow');
@@ -80,7 +80,7 @@ public function testAddStateInvalidIdException() {
   /**
    * @covers ::getStates
    */
-  public function testGetStates() {
+  public function testGetStates(): void {
     $workflow = new Workflow(['id' => 'test', 'type' => 'test_type'], 'workflow');
 
     // Getting states works when there are none.
@@ -124,7 +124,7 @@ public function testGetStates() {
   /**
    * Tests numeric IDs when added to a workflow.
    */
-  public function testNumericIdSorting() {
+  public function testNumericIdSorting(): void {
     $workflow = new Workflow(['id' => 'test', 'type' => 'test_type'], 'workflow');
     $workflow_type = $workflow->getTypePlugin();
 
@@ -145,7 +145,7 @@ public function testNumericIdSorting() {
   /**
    * @covers ::getStates
    */
-  public function testGetStatesException() {
+  public function testGetStatesException(): void {
     $this->expectException(\InvalidArgumentException::class);
     $this->expectExceptionMessage("The state 'state_that_does_not_exist' does not exist in workflow.");
     $workflow = new Workflow(['id' => 'test', 'type' => 'test_type'], 'workflow');
@@ -155,7 +155,7 @@ public function testGetStatesException() {
   /**
    * @covers ::getState
    */
-  public function testGetState() {
+  public function testGetState(): void {
     $workflow = new Workflow(['id' => 'test', 'type' => 'test_type'], 'workflow');
     // By default states are ordered in the order added.
     $workflow
@@ -184,7 +184,7 @@ public function testGetState() {
   /**
    * @covers ::getState
    */
-  public function testGetStateException() {
+  public function testGetStateException(): void {
     $this->expectException(\InvalidArgumentException::class);
     $this->expectExceptionMessage("The state 'state_that_does_not_exist' does not exist in workflow.");
     $workflow = new Workflow(['id' => 'test', 'type' => 'test_type'], 'workflow');
@@ -194,7 +194,7 @@ public function testGetStateException() {
   /**
    * @covers ::setStateLabel
    */
-  public function testSetStateLabel() {
+  public function testSetStateLabel(): void {
     $workflow = new Workflow(['id' => 'test', 'type' => 'test_type'], 'workflow');
     $workflow->getTypePlugin()->addState('draft', 'Draft');
     $this->assertEquals('Draft', $workflow->getTypePlugin()->getState('draft')->label());
@@ -205,7 +205,7 @@ public function testSetStateLabel() {
   /**
    * @covers ::setStateLabel
    */
-  public function testSetStateLabelException() {
+  public function testSetStateLabelException(): void {
     $this->expectException(\InvalidArgumentException::class);
     $this->expectExceptionMessage("The state 'draft' does not exist in workflow.");
     $workflow = new Workflow(['id' => 'test', 'type' => 'test_type'], 'workflow');
@@ -215,7 +215,7 @@ public function testSetStateLabelException() {
   /**
    * @covers ::setStateWeight
    */
-  public function testSetStateWeight() {
+  public function testSetStateWeight(): void {
     $workflow = new Workflow(['id' => 'test', 'type' => 'test_type'], 'workflow');
     $workflow->getTypePlugin()->addState('draft', 'Draft');
     $this->assertEquals(0, $workflow->getTypePlugin()->getState('draft')->weight());
@@ -226,7 +226,7 @@ public function testSetStateWeight() {
   /**
    * @covers ::setStateWeight
    */
-  public function testSetStateWeightException() {
+  public function testSetStateWeightException(): void {
     $this->expectException(\InvalidArgumentException::class);
     $this->expectExceptionMessage("The state 'draft' does not exist in workflow.");
     $workflow = new Workflow(['id' => 'test', 'type' => 'test_type'], 'workflow');
@@ -236,7 +236,7 @@ public function testSetStateWeightException() {
   /**
    * @covers ::setStateWeight
    */
-  public function testSetStateWeightNonNumericException() {
+  public function testSetStateWeightNonNumericException(): void {
     $this->expectException(\InvalidArgumentException::class);
     $this->expectExceptionMessage("The weight 'foo' must be numeric for state 'Published'.");
     $workflow = new Workflow(['id' => 'test', 'type' => 'test_type'], 'workflow');
@@ -247,7 +247,7 @@ public function testSetStateWeightNonNumericException() {
   /**
    * @covers ::deleteState
    */
-  public function testDeleteState() {
+  public function testDeleteState(): void {
     $workflow_type = new TestType([], '', []);
     $workflow_type
       ->addState('draft', 'Draft')
@@ -269,7 +269,7 @@ public function testDeleteState() {
   /**
    * @covers ::deleteState
    */
-  public function testDeleteStateException() {
+  public function testDeleteStateException(): void {
     $this->expectException(\InvalidArgumentException::class);
     $this->expectExceptionMessage("The state 'draft' does not exist in workflow.");
     $workflow = new Workflow(['id' => 'test', 'type' => 'test_type'], 'workflow');
@@ -279,7 +279,7 @@ public function testDeleteStateException() {
   /**
    * @covers ::deleteState
    */
-  public function testDeleteOnlyStateException() {
+  public function testDeleteOnlyStateException(): void {
     $this->expectException(\InvalidArgumentException::class);
     $this->expectExceptionMessage("The state 'draft' can not be deleted from workflow as it is the only state");
     $workflow = new Workflow(['id' => 'test', 'type' => 'test_type'], 'workflow');
@@ -291,7 +291,7 @@ public function testDeleteOnlyStateException() {
    * @covers ::addTransition
    * @covers ::hasTransition
    */
-  public function testAddTransition() {
+  public function testAddTransition(): void {
     $workflow = new Workflow(['id' => 'test', 'type' => 'test_type'], 'workflow');
 
     // By default states are ordered in the order added.
@@ -314,7 +314,7 @@ public function testAddTransition() {
   /**
    * @covers ::addTransition
    */
-  public function testAddTransitionDuplicateException() {
+  public function testAddTransitionDuplicateException(): void {
     $this->expectException(\InvalidArgumentException::class);
     $this->expectExceptionMessage("The transition 'publish' already exists in workflow.");
     $workflow = new Workflow(['id' => 'test', 'type' => 'test_type'], 'workflow');
@@ -326,7 +326,7 @@ public function testAddTransitionDuplicateException() {
   /**
    * @covers ::addTransition
    */
-  public function testAddTransitionInvalidIdException() {
+  public function testAddTransitionInvalidIdException(): void {
     $this->expectException(\InvalidArgumentException::class);
     $this->expectExceptionMessage("The transition ID 'publish-publish' must contain only lowercase letters, numbers, and underscores");
     $workflow = new Workflow(['id' => 'test', 'type' => 'test_type'], 'workflow');
@@ -337,7 +337,7 @@ public function testAddTransitionInvalidIdException() {
   /**
    * @covers ::addTransition
    */
-  public function testAddTransitionMissingFromException() {
+  public function testAddTransitionMissingFromException(): void {
     $this->expectException(\InvalidArgumentException::class);
     $this->expectExceptionMessage("The state 'draft' does not exist in workflow.");
     $workflow = new Workflow(['id' => 'test', 'type' => 'test_type'], 'workflow');
@@ -348,7 +348,7 @@ public function testAddTransitionMissingFromException() {
   /**
    * @covers ::addTransition
    */
-  public function testAddTransitionDuplicateTransitionStatesException() {
+  public function testAddTransitionDuplicateTransitionStatesException(): void {
     $this->expectException(\InvalidArgumentException::class);
     $this->expectExceptionMessage("The 'publish' transition already allows 'draft' to 'published' transitions in workflow.");
     $workflow = new Workflow(['id' => 'test', 'type' => 'test_type'], 'workflow');
@@ -363,7 +363,7 @@ public function testAddTransitionDuplicateTransitionStatesException() {
   /**
    * @covers ::addTransition
    */
-  public function testAddTransitionConsistentAfterFromCatch() {
+  public function testAddTransitionConsistentAfterFromCatch(): void {
     $workflow = new Workflow(['id' => 'test', 'type' => 'test_type'], 'workflow');
     $workflow->getTypePlugin()->addState('published', 'Published');
     try {
@@ -380,7 +380,7 @@ public function testAddTransitionConsistentAfterFromCatch() {
   /**
    * @covers ::addTransition
    */
-  public function testAddTransitionMissingToException() {
+  public function testAddTransitionMissingToException(): void {
     $this->expectException(\InvalidArgumentException::class);
     $this->expectExceptionMessage("The state 'published' does not exist in workflow.");
     $workflow = new Workflow(['id' => 'test', 'type' => 'test_type'], 'workflow');
@@ -392,7 +392,7 @@ public function testAddTransitionMissingToException() {
    * @covers ::getTransitions
    * @covers ::setTransitionWeight
    */
-  public function testGetTransitions() {
+  public function testGetTransitions(): void {
     $workflow = new Workflow(['id' => 'test', 'type' => 'test_type'], 'workflow');
 
     // Getting transitions works when there are none.
@@ -436,7 +436,7 @@ public function testGetTransitions() {
   /**
    * @covers ::getTransition
    */
-  public function testGetTransition() {
+  public function testGetTransition(): void {
     $workflow = new Workflow(['id' => 'test', 'type' => 'test_type'], 'workflow');
     // By default states are ordered in the order added.
     $workflow
@@ -460,7 +460,7 @@ public function testGetTransition() {
   /**
    * @covers ::getTransition
    */
-  public function testGetTransitionException() {
+  public function testGetTransitionException(): void {
     $this->expectException(\InvalidArgumentException::class);
     $this->expectExceptionMessage("The transition 'transition_that_does_not_exist' does not exist in workflow.");
     $workflow = new Workflow(['id' => 'test', 'type' => 'test_type'], 'workflow');
@@ -470,7 +470,7 @@ public function testGetTransitionException() {
   /**
    * @covers ::getTransitionsForState
    */
-  public function testGetTransitionsForState() {
+  public function testGetTransitionsForState(): void {
     $workflow = new Workflow(['id' => 'test', 'type' => 'test_type'], 'workflow');
     // By default states are ordered in the order added.
     $workflow
@@ -494,7 +494,7 @@ public function testGetTransitionsForState() {
    * @covers ::getTransitionFromStateToState
    * @covers ::hasTransitionFromStateToState
    */
-  public function testGetTransitionFromStateToState() {
+  public function testGetTransitionFromStateToState(): void {
     $workflow = new Workflow(['id' => 'test', 'type' => 'test_type'], 'workflow');
     // By default states are ordered in the order added.
     $workflow
@@ -515,7 +515,7 @@ public function testGetTransitionFromStateToState() {
   /**
    * @covers ::getTransitionFromStateToState
    */
-  public function testGetTransitionFromStateToStateException() {
+  public function testGetTransitionFromStateToStateException(): void {
     $this->expectException(\InvalidArgumentException::class);
     $this->expectExceptionMessage("The transition from 'archived' to 'archived' does not exist in workflow.");
     $workflow = new Workflow(['id' => 'test', 'type' => 'test_type'], 'workflow');
@@ -535,7 +535,7 @@ public function testGetTransitionFromStateToStateException() {
   /**
    * @covers ::setTransitionLabel
    */
-  public function testSetTransitionLabel() {
+  public function testSetTransitionLabel(): void {
     $workflow = new Workflow(['id' => 'test', 'type' => 'test_type'], 'workflow');
     $workflow
       ->getTypePlugin()
@@ -550,7 +550,7 @@ public function testSetTransitionLabel() {
   /**
    * @covers ::setTransitionLabel
    */
-  public function testSetTransitionLabelException() {
+  public function testSetTransitionLabelException(): void {
     $this->expectException(\InvalidArgumentException::class);
     $this->expectExceptionMessage("The transition 'draft-published' does not exist in workflow.");
     $workflow = new Workflow(['id' => 'test', 'type' => 'test_type'], 'workflow');
@@ -561,7 +561,7 @@ public function testSetTransitionLabelException() {
   /**
    * @covers ::setTransitionWeight
    */
-  public function testSetTransitionWeight() {
+  public function testSetTransitionWeight(): void {
     $workflow = new Workflow(['id' => 'test', 'type' => 'test_type'], 'workflow');
     $workflow
       ->getTypePlugin()
@@ -576,7 +576,7 @@ public function testSetTransitionWeight() {
   /**
    * @covers ::setTransitionWeight
    */
-  public function testSetTransitionWeightException() {
+  public function testSetTransitionWeightException(): void {
     $this->expectException(\InvalidArgumentException::class);
     $this->expectExceptionMessage("The transition 'draft-published' does not exist in workflow.");
     $workflow = new Workflow(['id' => 'test', 'type' => 'test_type'], 'workflow');
@@ -587,7 +587,7 @@ public function testSetTransitionWeightException() {
   /**
    * @covers ::setTransitionWeight
    */
-  public function testSetTransitionWeightNonNumericException() {
+  public function testSetTransitionWeightNonNumericException(): void {
     $this->expectException(\InvalidArgumentException::class);
     $this->expectExceptionMessage("The weight 'foo' must be numeric for transition 'Publish'.");
     $workflow = new Workflow(['id' => 'test', 'type' => 'test_type'], 'workflow');
@@ -599,7 +599,7 @@ public function testSetTransitionWeightNonNumericException() {
   /**
    * @covers ::setTransitionFromStates
    */
-  public function testSetTransitionFromStates() {
+  public function testSetTransitionFromStates(): void {
     $workflow = new Workflow(['id' => 'test', 'type' => 'test_type'], 'workflow');
     $workflow
       ->getTypePlugin()
@@ -624,7 +624,7 @@ public function testSetTransitionFromStates() {
   /**
    * @covers ::setTransitionFromStates
    */
-  public function testSetTransitionFromStatesMissingTransition() {
+  public function testSetTransitionFromStatesMissingTransition(): void {
     $this->expectException(\InvalidArgumentException::class);
     $this->expectExceptionMessage("The transition 'test' does not exist in workflow.");
     $workflow = new Workflow(['id' => 'test', 'type' => 'test_type'], 'workflow');
@@ -641,7 +641,7 @@ public function testSetTransitionFromStatesMissingTransition() {
   /**
    * @covers ::setTransitionFromStates
    */
-  public function testSetTransitionFromStatesMissingState() {
+  public function testSetTransitionFromStatesMissingState(): void {
     $this->expectException(\InvalidArgumentException::class);
     $this->expectExceptionMessage("The state 'published' does not exist in workflow.");
     $workflow = new Workflow(['id' => 'test', 'type' => 'test_type'], 'workflow');
@@ -657,7 +657,7 @@ public function testSetTransitionFromStatesMissingState() {
   /**
    * @covers ::setTransitionFromStates
    */
-  public function testSetTransitionFromStatesAlreadyExists() {
+  public function testSetTransitionFromStatesAlreadyExists(): void {
     $this->expectException(\InvalidArgumentException::class);
     $this->expectExceptionMessage("The 'create_new_draft' transition already allows 'draft' to 'draft' transitions in workflow.");
     $workflow = new Workflow(['id' => 'test', 'type' => 'test_type'], 'workflow');
@@ -675,7 +675,7 @@ public function testSetTransitionFromStatesAlreadyExists() {
   /**
    * @covers ::deleteTransition
    */
-  public function testDeleteTransition() {
+  public function testDeleteTransition(): void {
     $workflow_type = new TestType([], '', []);
     $workflow_type
       ->addState('draft', 'Draft')
@@ -691,7 +691,7 @@ public function testDeleteTransition() {
   /**
    * @covers ::deleteTransition
    */
-  public function testDeleteTransitionException() {
+  public function testDeleteTransitionException(): void {
     $this->expectException(\InvalidArgumentException::class);
     $this->expectExceptionMessage("The transition 'draft-published' does not exist in workflow.");
     $workflow = new Workflow(['id' => 'test', 'type' => 'test_type'], 'workflow');
@@ -702,7 +702,7 @@ public function testDeleteTransitionException() {
   /**
    * @covers \Drupal\workflows\Entity\Workflow::status
    */
-  public function testStatus() {
+  public function testStatus(): void {
     $workflow = new Workflow(['id' => 'test', 'type' => 'test_type'], 'workflow');
     $this->assertFalse($workflow->status());
     $workflow->getTypePlugin()->addState('published', 'Published');
diff --git a/core/modules/workspaces/tests/src/Functional/PathWorkspacesTest.php b/core/modules/workspaces/tests/src/Functional/PathWorkspacesTest.php
index 800d40af8a0a..9144c1eb0bf5 100644
--- a/core/modules/workspaces/tests/src/Functional/PathWorkspacesTest.php
+++ b/core/modules/workspaces/tests/src/Functional/PathWorkspacesTest.php
@@ -83,7 +83,7 @@ protected function setUp(): void {
   /**
    * Tests path aliases with workspaces.
    */
-  public function testPathAliases() {
+  public function testPathAliases(): void {
     // Create a published node in Live, without an alias.
     $node = $this->drupalCreateNode([
       'type' => 'article',
@@ -123,7 +123,7 @@ public function testPathAliases() {
   /**
    * Tests path aliases with workspaces and user switching.
    */
-  public function testPathAliasesUserSwitch() {
+  public function testPathAliasesUserSwitch(): void {
     // Create a published node in Live, without an alias.
     $node = $this->drupalCreateNode([
       'type' => 'article',
@@ -167,7 +167,7 @@ public function testPathAliasesUserSwitch() {
   /**
    * Tests path aliases with workspaces for translatable nodes.
    */
-  public function testPathAliasesWithTranslation() {
+  public function testPathAliasesWithTranslation(): void {
     $stage = Workspace::load('stage');
 
     // Create one node with a random alias.
diff --git a/core/modules/workspaces/tests/src/Functional/Rest/WorkspaceXmlAnonTest.php b/core/modules/workspaces/tests/src/Functional/Rest/WorkspaceXmlAnonTest.php
index 930e917dbbbd..2e3dd785b694 100644
--- a/core/modules/workspaces/tests/src/Functional/Rest/WorkspaceXmlAnonTest.php
+++ b/core/modules/workspaces/tests/src/Functional/Rest/WorkspaceXmlAnonTest.php
@@ -35,7 +35,7 @@ class WorkspaceXmlAnonTest extends WorkspaceResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public function testPatchPath() {
+  public function testPatchPath(): void {
     // Deserialization of the XML format is not supported.
     $this->markTestSkipped();
   }
diff --git a/core/modules/workspaces/tests/src/Functional/Rest/WorkspaceXmlBasicAuthTest.php b/core/modules/workspaces/tests/src/Functional/Rest/WorkspaceXmlBasicAuthTest.php
index eacd4ac49ef4..cbecdd36d2c7 100644
--- a/core/modules/workspaces/tests/src/Functional/Rest/WorkspaceXmlBasicAuthTest.php
+++ b/core/modules/workspaces/tests/src/Functional/Rest/WorkspaceXmlBasicAuthTest.php
@@ -45,7 +45,7 @@ class WorkspaceXmlBasicAuthTest extends WorkspaceResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public function testPatchPath() {
+  public function testPatchPath(): void {
     // Deserialization of the XML format is not supported.
     $this->markTestSkipped();
   }
diff --git a/core/modules/workspaces/tests/src/Functional/Rest/WorkspaceXmlCookieTest.php b/core/modules/workspaces/tests/src/Functional/Rest/WorkspaceXmlCookieTest.php
index 5f064f7163d8..9065e0714a19 100644
--- a/core/modules/workspaces/tests/src/Functional/Rest/WorkspaceXmlCookieTest.php
+++ b/core/modules/workspaces/tests/src/Functional/Rest/WorkspaceXmlCookieTest.php
@@ -40,7 +40,7 @@ class WorkspaceXmlCookieTest extends WorkspaceResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public function testPatchPath() {
+  public function testPatchPath(): void {
     // Deserialization of the XML format is not supported.
     $this->markTestSkipped();
   }
diff --git a/core/modules/workspaces/tests/src/Functional/UpdateSystem/ActiveWorkspaceUpdateTest.php b/core/modules/workspaces/tests/src/Functional/UpdateSystem/ActiveWorkspaceUpdateTest.php
index 17e6fa5af07d..c10d6ae59ade 100644
--- a/core/modules/workspaces/tests/src/Functional/UpdateSystem/ActiveWorkspaceUpdateTest.php
+++ b/core/modules/workspaces/tests/src/Functional/UpdateSystem/ActiveWorkspaceUpdateTest.php
@@ -54,7 +54,7 @@ protected function setUp(): void {
   /**
    * Tests that there is no active workspace during database updates.
    */
-  public function testActiveWorkspaceDuringUpdate() {
+  public function testActiveWorkspaceDuringUpdate(): void {
     /** @var \Drupal\workspaces\WorkspaceManagerInterface $workspace_manager */
     $workspace_manager = \Drupal::service('workspaces.manager');
 
diff --git a/core/modules/workspaces/tests/src/Functional/WorkspaceBypassTest.php b/core/modules/workspaces/tests/src/Functional/WorkspaceBypassTest.php
index 7d1d84e6fc0c..a4dc09c14ad6 100644
--- a/core/modules/workspaces/tests/src/Functional/WorkspaceBypassTest.php
+++ b/core/modules/workspaces/tests/src/Functional/WorkspaceBypassTest.php
@@ -32,7 +32,7 @@ class WorkspaceBypassTest extends BrowserTestBase {
   /**
    * Verifies that a user can edit anything in a workspace they own.
    */
-  public function testBypassOwnWorkspace() {
+  public function testBypassOwnWorkspace(): void {
     $permissions = [
       'create workspace',
       'edit own workspace',
diff --git a/core/modules/workspaces/tests/src/Functional/WorkspaceCacheContextTest.php b/core/modules/workspaces/tests/src/Functional/WorkspaceCacheContextTest.php
index 40edb1a68ffc..1e46e94c2b16 100644
--- a/core/modules/workspaces/tests/src/Functional/WorkspaceCacheContextTest.php
+++ b/core/modules/workspaces/tests/src/Functional/WorkspaceCacheContextTest.php
@@ -33,7 +33,7 @@ class WorkspaceCacheContextTest extends BrowserTestBase {
   /**
    * Tests the 'workspace' cache context.
    */
-  public function testWorkspaceCacheContext() {
+  public function testWorkspaceCacheContext(): void {
     $renderer = \Drupal::service('renderer');
     $cache_contexts_manager = \Drupal::service("cache_contexts_manager");
     /** @var \Drupal\Core\Cache\VariationCacheFactoryInterface $variation_cache_factory */
diff --git a/core/modules/workspaces/tests/src/Functional/WorkspaceConcurrentEditingTest.php b/core/modules/workspaces/tests/src/Functional/WorkspaceConcurrentEditingTest.php
index 3c21fc67330a..20ddf4f9bdae 100644
--- a/core/modules/workspaces/tests/src/Functional/WorkspaceConcurrentEditingTest.php
+++ b/core/modules/workspaces/tests/src/Functional/WorkspaceConcurrentEditingTest.php
@@ -28,7 +28,7 @@ class WorkspaceConcurrentEditingTest extends BrowserTestBase {
   /**
    * Tests editing a node in multiple workspaces.
    */
-  public function testConcurrentEditing() {
+  public function testConcurrentEditing(): void {
     // Create a test node.
     $this->createContentType(['type' => 'test', 'label' => 'Test']);
     $this->setupWorkspaceSwitcherBlock();
diff --git a/core/modules/workspaces/tests/src/Functional/WorkspaceMenuLinkContentIntegrationTest.php b/core/modules/workspaces/tests/src/Functional/WorkspaceMenuLinkContentIntegrationTest.php
index 8df9d5632e57..4ff79aa61dda 100644
--- a/core/modules/workspaces/tests/src/Functional/WorkspaceMenuLinkContentIntegrationTest.php
+++ b/core/modules/workspaces/tests/src/Functional/WorkspaceMenuLinkContentIntegrationTest.php
@@ -59,7 +59,7 @@ protected function setUp(): void {
   /**
    * Tests custom menu links in non-default workspaces.
    */
-  public function testWorkspacesWithCustomMenuLinks() {
+  public function testWorkspacesWithCustomMenuLinks(): void {
     $stage = Workspace::load('stage');
 
     $this->setupWorkspaceSwitcherBlock();
diff --git a/core/modules/workspaces/tests/src/Functional/WorkspacePermissionsTest.php b/core/modules/workspaces/tests/src/Functional/WorkspacePermissionsTest.php
index 3650a9bcde08..962d459bcf11 100644
--- a/core/modules/workspaces/tests/src/Functional/WorkspacePermissionsTest.php
+++ b/core/modules/workspaces/tests/src/Functional/WorkspacePermissionsTest.php
@@ -30,7 +30,7 @@ class WorkspacePermissionsTest extends BrowserTestBase {
   /**
    * Verifies that a user can create but not edit a workspace.
    */
-  public function testCreateWorkspace() {
+  public function testCreateWorkspace(): void {
     $editor = $this->drupalCreateUser([
       'access administration pages',
       'administer site configuration',
@@ -56,7 +56,7 @@ public function testCreateWorkspace() {
   /**
    * Verifies that a user can create and edit only their own workspace.
    */
-  public function testEditOwnWorkspace() {
+  public function testEditOwnWorkspace(): void {
     $permissions = [
       'access administration pages',
       'administer site configuration',
@@ -100,7 +100,7 @@ public function testEditOwnWorkspace() {
   /**
    * Verifies that a user can edit any workspace.
    */
-  public function testEditAnyWorkspace() {
+  public function testEditAnyWorkspace(): void {
     $permissions = [
       'access administration pages',
       'administer site configuration',
@@ -144,7 +144,7 @@ public function testEditAnyWorkspace() {
   /**
    * Verifies that a user can create and delete only their own workspace.
    */
-  public function testDeleteOwnWorkspace() {
+  public function testDeleteOwnWorkspace(): void {
     $permissions = [
       'access administration pages',
       'administer site configuration',
@@ -178,7 +178,7 @@ public function testDeleteOwnWorkspace() {
   /**
    * Verifies that a user can delete any workspace.
    */
-  public function testDeleteAnyWorkspace() {
+  public function testDeleteAnyWorkspace(): void {
     $permissions = [
       'access administration pages',
       'administer site configuration',
diff --git a/core/modules/workspaces/tests/src/Functional/WorkspaceSwitcherTest.php b/core/modules/workspaces/tests/src/Functional/WorkspaceSwitcherTest.php
index 4c27e4f64a3f..6fbdbce51a9b 100644
--- a/core/modules/workspaces/tests/src/Functional/WorkspaceSwitcherTest.php
+++ b/core/modules/workspaces/tests/src/Functional/WorkspaceSwitcherTest.php
@@ -56,7 +56,7 @@ protected function setUp(): void {
   /**
    * Tests switching workspace via the switcher block and admin page.
    */
-  public function testSwitchingWorkspaces() {
+  public function testSwitchingWorkspaces(): void {
     $this->createAndActivateWorkspaceThroughUi('Vultures', 'vultures');
     $gravity = $this->createWorkspaceThroughUi('Gravity', 'gravity');
 
@@ -81,7 +81,7 @@ public function testSwitchingWorkspaces() {
   /**
    * Tests switching workspace via a query parameter.
    */
-  public function testQueryParameterNegotiator() {
+  public function testQueryParameterNegotiator(): void {
     $web_assert = $this->assertSession();
     // Initially the default workspace should be active.
     $web_assert->elementContains('css', '#block-workspace-switcher', 'None');
@@ -103,7 +103,7 @@ public function testQueryParameterNegotiator() {
   /**
    * Tests that the toolbar workspace switcher doesn't disable the page cache.
    */
-  public function testToolbarSwitcherDynamicPageCache() {
+  public function testToolbarSwitcherDynamicPageCache(): void {
     $this->drupalLogin($this->drupalCreateUser([
       'access toolbar',
       'view any workspace',
diff --git a/core/modules/workspaces/tests/src/Functional/WorkspaceTest.php b/core/modules/workspaces/tests/src/Functional/WorkspaceTest.php
index 9a25f492677a..92227485f1f6 100644
--- a/core/modules/workspaces/tests/src/Functional/WorkspaceTest.php
+++ b/core/modules/workspaces/tests/src/Functional/WorkspaceTest.php
@@ -78,7 +78,7 @@ protected function setUp(): void {
   /**
    * Tests creating a workspace with special characters.
    */
-  public function testSpecialCharacters() {
+  public function testSpecialCharacters(): void {
     $this->drupalLogin($this->editor1);
     $page = $this->getSession()->getPage();
 
@@ -99,7 +99,7 @@ public function testSpecialCharacters() {
   /**
    * Tests that the toolbar correctly shows the active workspace.
    */
-  public function testWorkspaceToolbar() {
+  public function testWorkspaceToolbar(): void {
     $this->drupalLogin($this->editor1);
 
     $this->drupalGet('/admin/config/workflow/workspaces/add');
@@ -130,7 +130,7 @@ public function testWorkspaceToolbar() {
   /**
    * Tests changing the owner of a workspace.
    */
-  public function testWorkspaceOwner() {
+  public function testWorkspaceOwner(): void {
     $this->drupalLogin($this->editor1);
 
     $this->drupalGet('/admin/config/workflow/workspaces/add');
@@ -153,7 +153,7 @@ public function testWorkspaceOwner() {
   /**
    * Tests that editing a workspace creates a new revision.
    */
-  public function testWorkspaceFormRevisions() {
+  public function testWorkspaceFormRevisions(): void {
     $this->drupalLogin($this->editor1);
     $storage = \Drupal::entityTypeManager()->getStorage('workspace');
 
@@ -171,7 +171,7 @@ public function testWorkspaceFormRevisions() {
   /**
    * Tests the manage workspace page.
    */
-  public function testWorkspaceManagePage() {
+  public function testWorkspaceManagePage(): void {
     $this->drupalCreateContentType(['type' => 'test', 'label' => 'Test']);
 
     $permissions = [
@@ -237,7 +237,7 @@ public function testWorkspaceManagePage() {
   /**
    * Tests adding new fields to workspace entities.
    */
-  public function testWorkspaceFieldUi() {
+  public function testWorkspaceFieldUi(): void {
     $user = $this->drupalCreateUser([
       'administer workspaces',
       'access administration pages',
@@ -268,7 +268,7 @@ public function testWorkspaceFieldUi() {
   /**
    * Verifies that a workspace with existing content may be deleted.
    */
-  public function testDeleteWorkspaceWithExistingContent() {
+  public function testDeleteWorkspaceWithExistingContent(): void {
     $this->createContentType(['type' => 'test', 'label' => 'Test']);
 
     // Login and create a workspace.
@@ -294,7 +294,7 @@ public function testDeleteWorkspaceWithExistingContent() {
   /**
    * Tests the Workspaces listing UI.
    */
-  public function testWorkspaceList() {
+  public function testWorkspaceList(): void {
     $page = $this->getSession()->getPage();
     $assert_session = $this->assertSession();
 
@@ -340,7 +340,7 @@ public function testWorkspaceList() {
   /**
    * Verifies that a workspace can be published.
    */
-  public function testPublishWorkspace() {
+  public function testPublishWorkspace(): void {
     $this->createContentType(['type' => 'test', 'label' => 'Test']);
     $permissions = [
       'administer workspaces',
diff --git a/core/modules/workspaces/tests/src/Functional/WorkspaceViewTest.php b/core/modules/workspaces/tests/src/Functional/WorkspaceViewTest.php
index 266d2c2ff575..a304cffd621c 100644
--- a/core/modules/workspaces/tests/src/Functional/WorkspaceViewTest.php
+++ b/core/modules/workspaces/tests/src/Functional/WorkspaceViewTest.php
@@ -29,7 +29,7 @@ class WorkspaceViewTest extends BrowserTestBase {
   /**
    * Verifies that a user can view their own workspace.
    */
-  public function testViewOwnWorkspace() {
+  public function testViewOwnWorkspace(): void {
     $permissions = [
       'access administration pages',
       'administer site configuration',
@@ -67,7 +67,7 @@ public function testViewOwnWorkspace() {
   /**
    * Verifies that a user can view any workspace.
    */
-  public function testViewAnyWorkspace() {
+  public function testViewAnyWorkspace(): void {
     $permissions = [
       'access administration pages',
       'administer site configuration',
diff --git a/core/modules/workspaces/tests/src/Functional/WorkspaceViewsBulkFormTest.php b/core/modules/workspaces/tests/src/Functional/WorkspaceViewsBulkFormTest.php
index c91d568208c8..4b9dc1f72b66 100644
--- a/core/modules/workspaces/tests/src/Functional/WorkspaceViewsBulkFormTest.php
+++ b/core/modules/workspaces/tests/src/Functional/WorkspaceViewsBulkFormTest.php
@@ -44,7 +44,7 @@ protected function setUp(): void {
     $this->switchToWorkspace($stage);
   }
 
-  public function testBulkForm() {
+  public function testBulkForm(): void {
     // Ignore entity types that are not being tested, in order to fully re-use
     // the parent test method.
     $this->ignoreEntityType('view');
diff --git a/core/modules/workspaces/tests/src/Functional/WorkspacesUninstallTest.php b/core/modules/workspaces/tests/src/Functional/WorkspacesUninstallTest.php
index 3d7c35731992..453d08703c49 100644
--- a/core/modules/workspaces/tests/src/Functional/WorkspacesUninstallTest.php
+++ b/core/modules/workspaces/tests/src/Functional/WorkspacesUninstallTest.php
@@ -41,7 +41,7 @@ protected function setUp(): void {
   /**
    * Tests deleting workspace entities and uninstalling Workspaces module.
    */
-  public function testUninstallingWorkspace() {
+  public function testUninstallingWorkspace(): void {
     $this->createContentType(['type' => 'article']);
     $this->drupalGet('/admin/modules/uninstall');
     $session = $this->assertSession();
diff --git a/core/modules/workspaces/tests/src/FunctionalJavascript/WorkspaceToolbarIntegrationTest.php b/core/modules/workspaces/tests/src/FunctionalJavascript/WorkspaceToolbarIntegrationTest.php
index 65b9f3d163d2..701d89ec9067 100644
--- a/core/modules/workspaces/tests/src/FunctionalJavascript/WorkspaceToolbarIntegrationTest.php
+++ b/core/modules/workspaces/tests/src/FunctionalJavascript/WorkspaceToolbarIntegrationTest.php
@@ -39,7 +39,7 @@ protected function setUp(): void {
   /**
    * Tests workspace canvas can be toggled with JavaScript.
    */
-  public function testWorkspaceCanvasToggling() {
+  public function testWorkspaceCanvasToggling(): void {
     $page = $this->getSession()->getPage();
     $assert_session = $this->assertSession();
 
@@ -63,7 +63,7 @@ public function testWorkspaceCanvasToggling() {
   /**
    * Tests workspace switch and landing page behavior.
    */
-  public function testWorkspaceSwitch() {
+  public function testWorkspaceSwitch(): void {
     $page = $this->getSession()->getPage();
     $assert_session = $this->assertSession();
 
diff --git a/core/modules/workspaces/tests/src/Kernel/EntityReferenceSupportedNewEntitiesConstraintValidatorTest.php b/core/modules/workspaces/tests/src/Kernel/EntityReferenceSupportedNewEntitiesConstraintValidatorTest.php
index 9c805d3ce9f2..4cfdfec08161 100644
--- a/core/modules/workspaces/tests/src/Kernel/EntityReferenceSupportedNewEntitiesConstraintValidatorTest.php
+++ b/core/modules/workspaces/tests/src/Kernel/EntityReferenceSupportedNewEntitiesConstraintValidatorTest.php
@@ -57,7 +57,7 @@ protected function setUp(): void {
   /**
    * @covers ::validate
    */
-  public function testNewEntitiesAllowedInDefaultWorkspace() {
+  public function testNewEntitiesAllowedInDefaultWorkspace(): void {
     $entity = EntityTestMulRevPub::create([
       'unsupported_reference' => [
         'entity' => EntityTest::create([]),
@@ -72,7 +72,7 @@ public function testNewEntitiesAllowedInDefaultWorkspace() {
   /**
    * @covers ::validate
    */
-  public function testNewEntitiesForbiddenInNonDefaultWorkspace() {
+  public function testNewEntitiesForbiddenInNonDefaultWorkspace(): void {
     $this->switchToWorkspace('stage');
     $entity = EntityTestMulRevPub::create([
       'unsupported_reference' => [
diff --git a/core/modules/workspaces/tests/src/Kernel/WorkspaceAccessTest.php b/core/modules/workspaces/tests/src/Kernel/WorkspaceAccessTest.php
index ac3051b718bf..1193b2180eb2 100644
--- a/core/modules/workspaces/tests/src/Kernel/WorkspaceAccessTest.php
+++ b/core/modules/workspaces/tests/src/Kernel/WorkspaceAccessTest.php
@@ -76,7 +76,7 @@ public static function operationCases() {
    *
    * @dataProvider operationCases
    */
-  public function testWorkspaceAccess($operation, $permission) {
+  public function testWorkspaceAccess($operation, $permission): void {
     $user = $this->createUser();
     $this->setCurrentUser($user);
     $workspace = Workspace::create(['id' => 'oak']);
@@ -93,7 +93,7 @@ public function testWorkspaceAccess($operation, $permission) {
   /**
    * Tests workspace publishing access.
    */
-  public function testPublishWorkspaceAccess() {
+  public function testPublishWorkspaceAccess(): void {
     $user = $this->createUser([
       'view own workspace',
       'edit own workspace',
@@ -116,7 +116,7 @@ public function testPublishWorkspaceAccess() {
   /**
    * @covers \Drupal\workspaces\Plugin\EntityReferenceSelection\WorkspaceSelection::getReferenceableEntities
    */
-  public function testWorkspaceSelection() {
+  public function testWorkspaceSelection(): void {
     $own_permission_user = $this->createUser(['view own workspace']);
     $any_permission_user = $this->createUser(['view any workspace']);
     $admin_permission_user = $this->createUser(['administer workspaces']);
diff --git a/core/modules/workspaces/tests/src/Kernel/WorkspaceAssociationTest.php b/core/modules/workspaces/tests/src/Kernel/WorkspaceAssociationTest.php
index e22e2bf026cb..4d7e8d80e628 100644
--- a/core/modules/workspaces/tests/src/Kernel/WorkspaceAssociationTest.php
+++ b/core/modules/workspaces/tests/src/Kernel/WorkspaceAssociationTest.php
@@ -83,7 +83,7 @@ protected function setUp(): void {
    * @covers ::getTrackedEntities
    * @covers ::getAssociatedRevisions
    */
-  public function testWorkspaceAssociation() {
+  public function testWorkspaceAssociation(): void {
     $this->createNode(['title' => 'Test article 1 - live - unpublished', 'type' => 'article', 'status' => 0]);
     $this->createNode(['title' => 'Test article 2 - live - published', 'type' => 'article']);
 
diff --git a/core/modules/workspaces/tests/src/Kernel/WorkspaceCRUDTest.php b/core/modules/workspaces/tests/src/Kernel/WorkspaceCRUDTest.php
index c8c9a5ba4962..6c4ac5ef105d 100644
--- a/core/modules/workspaces/tests/src/Kernel/WorkspaceCRUDTest.php
+++ b/core/modules/workspaces/tests/src/Kernel/WorkspaceCRUDTest.php
@@ -83,7 +83,7 @@ protected function setUp(): void {
   /**
    * Tests the deletion of workspaces.
    */
-  public function testDeletingWorkspaces() {
+  public function testDeletingWorkspaces(): void {
     $admin = $this->createUser([
       'administer nodes',
       'create workspace',
@@ -209,7 +209,7 @@ public function testDeletingWorkspaces() {
   /**
    * Tests that deleting a workspace keeps its already published content.
    */
-  public function testDeletingPublishedWorkspace() {
+  public function testDeletingPublishedWorkspace(): void {
     $admin = $this->createUser([
       'administer nodes',
       'create workspace',
@@ -283,7 +283,7 @@ public function testDeletingPublishedWorkspace() {
   /**
    * Tests that a workspace with children can not be deleted.
    */
-  public function testDeletingWorkspaceWithChildren() {
+  public function testDeletingWorkspaceWithChildren(): void {
     $stage = Workspace::create(['id' => 'stage', 'label' => 'Stage']);
     $stage->save();
 
@@ -311,7 +311,7 @@ public function testDeletingWorkspaceWithChildren() {
   /**
    * Tests loading the workspace tree when there are no workspaces available.
    */
-  public function testEmptyWorkspaceTree() {
+  public function testEmptyWorkspaceTree(): void {
     $tree = \Drupal::service('workspaces.repository')->loadTree();
     $this->assertSame([], $tree);
   }
diff --git a/core/modules/workspaces/tests/src/Kernel/WorkspaceInformationTest.php b/core/modules/workspaces/tests/src/Kernel/WorkspaceInformationTest.php
index 602d3b339f63..17e561ffe8d7 100644
--- a/core/modules/workspaces/tests/src/Kernel/WorkspaceInformationTest.php
+++ b/core/modules/workspaces/tests/src/Kernel/WorkspaceInformationTest.php
@@ -79,7 +79,7 @@ protected function setUp(): void {
   /**
    * Tests fully supported entity types.
    */
-  public function testSupportedEntityTypes() {
+  public function testSupportedEntityTypes(): void {
     // Check a supported entity type.
     $entity = $this->entityTypeManager->getStorage('entity_test_revpub')->create();
 
@@ -98,7 +98,7 @@ public function testSupportedEntityTypes() {
   /**
    * Tests an entity type with a custom workspace handler.
    */
-  public function testCustomSupportEntityTypes() {
+  public function testCustomSupportEntityTypes(): void {
     $entity_type = clone $this->entityTypeManager->getDefinition('entity_test_revpub');
     $entity_type->setHandlerClass('workspace', EntityTestRevPubWorkspaceHandler::class);
     $this->state->set('entity_test_revpub.entity_type', $entity_type);
@@ -135,7 +135,7 @@ public function testCustomSupportEntityTypes() {
   /**
    * Tests ignored entity types.
    */
-  public function testIgnoredEntityTypes() {
+  public function testIgnoredEntityTypes(): void {
     $entity_type = clone $this->entityTypeManager->getDefinition('entity_test_rev');
     $entity_type->setHandlerClass('workspace', IgnoredWorkspaceHandler::class);
     $this->state->set('entity_test_rev.entity_type', $entity_type);
@@ -158,7 +158,7 @@ public function testIgnoredEntityTypes() {
   /**
    * Tests unsupported entity types.
    */
-  public function testUnsupportedEntityTypes() {
+  public function testUnsupportedEntityTypes(): void {
     // Check an unsupported entity type.
     $entity_test = $this->entityTypeManager->getDefinition('entity_test');
     $this->assertFalse($entity_test->hasHandlerClass('workspace'));
diff --git a/core/modules/workspaces/tests/src/Kernel/WorkspaceIntegrationTest.php b/core/modules/workspaces/tests/src/Kernel/WorkspaceIntegrationTest.php
index 42c35e170123..718af2449d38 100644
--- a/core/modules/workspaces/tests/src/Kernel/WorkspaceIntegrationTest.php
+++ b/core/modules/workspaces/tests/src/Kernel/WorkspaceIntegrationTest.php
@@ -114,7 +114,7 @@ protected function setUp(): void {
   /**
    * Tests various scenarios for creating and publishing content in workspaces.
    */
-  public function testWorkspaces() {
+  public function testWorkspaces(): void {
     $this->initializeWorkspacesModule();
 
     // Notes about the structure of the test scenarios:
@@ -377,7 +377,7 @@ public function testWorkspaces() {
    * @covers ::workspaces_entity_delete
    * @covers ::workspaces_entity_revision_delete
    */
-  public function testWorkspaceAssociationDataIntegrity() {
+  public function testWorkspaceAssociationDataIntegrity(): void {
     $this->initializeWorkspacesModule();
 
     // Check the initial empty state.
@@ -425,7 +425,7 @@ public function testWorkspaceAssociationDataIntegrity() {
   /**
    * Tests entity tracking in workspace descendants.
    */
-  public function testWorkspaceHierarchy() {
+  public function testWorkspaceHierarchy(): void {
     $this->initializeWorkspacesModule();
     $this->createWorkspaceHierarchy();
 
@@ -540,7 +540,7 @@ public function testWorkspaceHierarchy() {
   /**
    * Tests workspace publishing as anonymous user, simulating a CLI request.
    */
-  public function testCliPublishing() {
+  public function testCliPublishing(): void {
     $this->initializeWorkspacesModule();
     $this->switchToWorkspace('stage');
 
@@ -560,7 +560,7 @@ public function testCliPublishing() {
   /**
    * Tests entity query overrides without any conditions.
    */
-  public function testEntityQueryWithoutConditions() {
+  public function testEntityQueryWithoutConditions(): void {
     $this->initializeWorkspacesModule();
     $this->switchToWorkspace('stage');
 
@@ -587,7 +587,7 @@ public function testEntityQueryWithoutConditions() {
   /**
    * Tests the Entity Query relationship API with workspaces.
    */
-  public function testEntityQueryRelationship() {
+  public function testEntityQueryRelationship(): void {
     $this->initializeWorkspacesModule();
 
     // Add an entity reference field that targets 'entity_test_mulrevpub'
@@ -674,7 +674,7 @@ public function testEntityQueryRelationship() {
    *
    * @dataProvider providerTestAllowedEntityCrudInNonDefaultWorkspace
    */
-  public function testDisallowedEntityCreateInNonDefaultWorkspace($entity_type_id, $allowed) {
+  public function testDisallowedEntityCreateInNonDefaultWorkspace($entity_type_id, $allowed): void {
     $this->initializeWorkspacesModule();
     /** @var \Drupal\Core\Entity\ContentEntityStorageInterface $storage */
     $storage = $this->entityTypeManager->getStorage($entity_type_id);
@@ -700,7 +700,7 @@ public function testDisallowedEntityCreateInNonDefaultWorkspace($entity_type_id,
    *
    * @dataProvider providerTestAllowedEntityCrudInNonDefaultWorkspace
    */
-  public function testDisallowedEntityUpdateInNonDefaultWorkspace($entity_type_id, $allowed) {
+  public function testDisallowedEntityUpdateInNonDefaultWorkspace($entity_type_id, $allowed): void {
     $this->initializeWorkspacesModule();
     /** @var \Drupal\Core\Entity\ContentEntityStorageInterface $storage */
     $storage = $this->entityTypeManager->getStorage($entity_type_id);
@@ -731,7 +731,7 @@ public function testDisallowedEntityUpdateInNonDefaultWorkspace($entity_type_id,
    *
    * @dataProvider providerTestAllowedEntityCrudInNonDefaultWorkspace
    */
-  public function testDisallowedEntityDeleteInNonDefaultWorkspace($entity_type_id, $allowed) {
+  public function testDisallowedEntityDeleteInNonDefaultWorkspace($entity_type_id, $allowed): void {
     $this->initializeWorkspacesModule();
     /** @var \Drupal\Core\Entity\ContentEntityStorageInterface $storage */
     $storage = $this->entityTypeManager->getStorage($entity_type_id);
@@ -778,7 +778,7 @@ public static function providerTestAllowedEntityCrudInNonDefaultWorkspace() {
   /**
    * @covers \Drupal\workspaces\WorkspaceManager::executeInWorkspace
    */
-  public function testExecuteInWorkspaceContext() {
+  public function testExecuteInWorkspaceContext(): void {
     $this->initializeWorkspacesModule();
 
     // Create an entity in the default workspace.
@@ -1049,7 +1049,7 @@ protected function flattenExpectedValues(array $expected, $entity_type_id) {
   /**
    * Tests that entity forms can be stored in the form cache.
    */
-  public function testFormCacheForEntityForms() {
+  public function testFormCacheForEntityForms(): void {
     $this->initializeWorkspacesModule();
     $this->switchToWorkspace('stage');
 
@@ -1066,7 +1066,7 @@ public function testFormCacheForEntityForms() {
   /**
    * Tests that non-entity forms can be stored in the form cache.
    */
-  public function testFormCacheForRegularForms() {
+  public function testFormCacheForRegularForms(): void {
     $this->initializeWorkspacesModule();
     $this->switchToWorkspace('stage');
 
@@ -1080,7 +1080,7 @@ public function testFormCacheForRegularForms() {
   /**
    * Tests publishing with fields in dedicated table storage.
    */
-  public function testPublishWorkspaceDedicatedTableStorage() {
+  public function testPublishWorkspaceDedicatedTableStorage(): void {
     $this->initializeWorkspacesModule();
     $node_storage = $this->entityTypeManager->getStorage('node');
 
@@ -1114,7 +1114,7 @@ public function testPublishWorkspaceDedicatedTableStorage() {
    * so enable it and test getDifferringRevisionIdsOnTarget() with an anonymous
    * node.
    */
-  public function testNodeAccessDifferringRevisionIdsOnTarget() {
+  public function testNodeAccessDifferringRevisionIdsOnTarget(): void {
     $this->initializeWorkspacesModule();
     \Drupal::service('module_installer')->install(['node_access_test']);
     node_access_rebuild();
diff --git a/core/modules/workspaces/tests/src/Kernel/WorkspaceMergerTest.php b/core/modules/workspaces/tests/src/Kernel/WorkspaceMergerTest.php
index e46e1fab9c33..a026f5d93c1d 100644
--- a/core/modules/workspaces/tests/src/Kernel/WorkspaceMergerTest.php
+++ b/core/modules/workspaces/tests/src/Kernel/WorkspaceMergerTest.php
@@ -78,7 +78,7 @@ protected function setUp(): void {
    * @covers ::getDifferringRevisionIdsOnSource
    * @covers ::getDifferringRevisionIdsOnTarget
    */
-  public function testWorkspaceMerger() {
+  public function testWorkspaceMerger(): void {
     $this->initializeWorkspacesModule();
     $this->createWorkspaceHierarchy();
 
diff --git a/core/modules/workspaces/tests/src/Kernel/WorkspacePublishFormTest.php b/core/modules/workspaces/tests/src/Kernel/WorkspacePublishFormTest.php
index da55c8e963d0..eb6696c24581 100644
--- a/core/modules/workspaces/tests/src/Kernel/WorkspacePublishFormTest.php
+++ b/core/modules/workspaces/tests/src/Kernel/WorkspacePublishFormTest.php
@@ -24,7 +24,7 @@ class WorkspacePublishFormTest extends KernelTestBase {
   /**
    * @covers ::submitForm
    */
-  public function testSubmitFormWithException() {
+  public function testSubmitFormWithException(): void {
     /** @var \Drupal\Core\Messenger\MessengerInterface $messenger */
     $messenger = \Drupal::service('messenger');
 
diff --git a/core/modules/workspaces/tests/src/Unit/ActiveWorkspaceCheckTest.php b/core/modules/workspaces/tests/src/Unit/ActiveWorkspaceCheckTest.php
index 1105dcfd5773..c87da448fa03 100644
--- a/core/modules/workspaces/tests/src/Unit/ActiveWorkspaceCheckTest.php
+++ b/core/modules/workspaces/tests/src/Unit/ActiveWorkspaceCheckTest.php
@@ -61,7 +61,7 @@ public static function providerTestAccess() {
    * @covers ::access
    * @dataProvider providerTestAccess
    */
-  public function testAccess($requirements, $has_active_workspace, $access, array $contexts = []) {
+  public function testAccess($requirements, $has_active_workspace, $access, array $contexts = []): void {
     $route = new Route('', [], $requirements);
 
     $workspace_manager = $this->prophesize(WorkspaceManagerInterface::class);
diff --git a/core/modules/workspaces/tests/src/Unit/WorkspaceRequestSubscriberTest.php b/core/modules/workspaces/tests/src/Unit/WorkspaceRequestSubscriberTest.php
index df888ece36d8..8de6d7bbc4c8 100644
--- a/core/modules/workspaces/tests/src/Unit/WorkspaceRequestSubscriberTest.php
+++ b/core/modules/workspaces/tests/src/Unit/WorkspaceRequestSubscriberTest.php
@@ -41,7 +41,7 @@ protected function setUp(): void {
   /**
    * @covers ::onKernelRequest
    */
-  public function testOnKernelRequestWithCacheableRouteProvider() {
+  public function testOnKernelRequestWithCacheableRouteProvider(): void {
     $route_provider = $this->prophesize(CacheableRouteProviderInterface::class);
     $route_provider->addExtraCacheKeyPart('workspace', 'test')->shouldBeCalled();
 
@@ -56,7 +56,7 @@ public function testOnKernelRequestWithCacheableRouteProvider() {
   /**
    * @covers ::onKernelRequest
    */
-  public function testOnKernelRequestWithoutCacheableRouteProvider() {
+  public function testOnKernelRequestWithoutCacheableRouteProvider(): void {
     $route_provider = $this->prophesize(RouteProviderInterface::class);
 
     // Check that WorkspaceRequestSubscriber::onKernelRequest() doesn't call
diff --git a/core/profiles/demo_umami/tests/src/Functional/DemoUmamiProfileTest.php b/core/profiles/demo_umami/tests/src/Functional/DemoUmamiProfileTest.php
index 2ca37dc1006d..b6a9906524b8 100644
--- a/core/profiles/demo_umami/tests/src/Functional/DemoUmamiProfileTest.php
+++ b/core/profiles/demo_umami/tests/src/Functional/DemoUmamiProfileTest.php
@@ -42,7 +42,7 @@ protected function installParameters() {
   /**
    * Tests some features specific to being a demonstration profile.
    */
-  public function testDemoSpecificFeatures() {
+  public function testDemoSpecificFeatures(): void {
     // This test coverage is organized into separate protected methods rather
     // than individual test methods to avoid having to reinstall Umami for
     // a handful of assertions each.
@@ -67,7 +67,7 @@ protected function testWarningsOnStatusPage() {
   /**
    * Tests the profile supplied configuration is the same after installation.
    */
-  public function testConfig() {
+  public function testConfig(): void {
     // Just connect directly to the config table so we don't need to worry about
     // the cache layer.
     $active_config_storage = $this->container->get('config.storage');
@@ -160,7 +160,7 @@ protected function testUser() {
   /**
    * Tests the successful editing of nodes by admin.
    */
-  public function testEditNodesByAdmin() {
+  public function testEditNodesByAdmin(): void {
     $permissions = [
       'administer nodes',
       'edit any recipe content',
diff --git a/core/profiles/demo_umami/tests/src/Functional/UmamiMultilingualInstallTest.php b/core/profiles/demo_umami/tests/src/Functional/UmamiMultilingualInstallTest.php
index 088910834a0a..b01f7d68c1ba 100644
--- a/core/profiles/demo_umami/tests/src/Functional/UmamiMultilingualInstallTest.php
+++ b/core/profiles/demo_umami/tests/src/Functional/UmamiMultilingualInstallTest.php
@@ -26,7 +26,7 @@ class UmamiMultilingualInstallTest extends InstallerTestBase {
   /**
    * Ensures that Umami can be installed with Spanish as the default language.
    */
-  public function testUmami() {
+  public function testUmami(): void {
     $this->drupalGet('');
     // cSpell:disable-next-line
     $this->assertSession()->pageTextContains('Quiche mediterráneo profundo');
diff --git a/core/profiles/demo_umami/tests/src/FunctionalJavascript/AssetAggregationAcrossPagesTest.php b/core/profiles/demo_umami/tests/src/FunctionalJavascript/AssetAggregationAcrossPagesTest.php
index 141383657d64..f3ba232b09ec 100644
--- a/core/profiles/demo_umami/tests/src/FunctionalJavascript/AssetAggregationAcrossPagesTest.php
+++ b/core/profiles/demo_umami/tests/src/FunctionalJavascript/AssetAggregationAcrossPagesTest.php
@@ -21,7 +21,7 @@ class AssetAggregationAcrossPagesTest extends PerformanceTestBase {
   /**
    * Checks the asset requests made when the front and recipe pages are visited.
    */
-  public function testFrontAndRecipesPages() {
+  public function testFrontAndRecipesPages(): void {
     $performance_data = $this->collectPerformanceData(function () {
       $this->doRequests();
     }, 'umamiFrontAndRecipePages');
@@ -34,7 +34,7 @@ public function testFrontAndRecipesPages() {
   /**
    * Checks the asset requests made when the front and recipe pages are visited.
    */
-  public function testFrontAndRecipesPagesAuthenticated() {
+  public function testFrontAndRecipesPagesAuthenticated(): void {
     $user = $this->createUser();
     $this->drupalLogin($user);
     sleep(2);
diff --git a/core/profiles/demo_umami/tests/src/FunctionalJavascript/OpenTelemetryFrontPagePerformanceTest.php b/core/profiles/demo_umami/tests/src/FunctionalJavascript/OpenTelemetryFrontPagePerformanceTest.php
index 108e09ec30c0..9cdf35039f78 100644
--- a/core/profiles/demo_umami/tests/src/FunctionalJavascript/OpenTelemetryFrontPagePerformanceTest.php
+++ b/core/profiles/demo_umami/tests/src/FunctionalJavascript/OpenTelemetryFrontPagePerformanceTest.php
@@ -23,7 +23,7 @@ class OpenTelemetryFrontPagePerformanceTest extends PerformanceTestBase {
   /**
    * Logs front page tracing data with a cold cache.
    */
-  public function testFrontPageColdCache() {
+  public function testFrontPageColdCache(): void {
     // @todo Chromedriver doesn't collect tracing performance logs for the very
     //   first request in a test, so warm it up.
     //   https://www.drupal.org/project/drupal/issues/3379750
@@ -40,7 +40,7 @@ public function testFrontPageColdCache() {
    *
    * Hot here means that all possible caches are warmed.
    */
-  public function testFrontPageHotCache() {
+  public function testFrontPageHotCache(): void {
     // Request the page twice so that asset aggregates and image derivatives are
     // definitely cached in the browser cache. The first response builds the
     // file and serves from PHP with private, no-store headers. The second
@@ -76,7 +76,7 @@ public function testFrontPageHotCache() {
    * Cool here means that 'global' site caches are warm but anything
    * specific to the front page is cold.
    */
-  public function testFrontPageCoolCache() {
+  public function testFrontPageCoolCache(): void {
     // First of all visit the front page to ensure the image style exists.
     $this->drupalGet('<front>');
     $this->rebuildAll();
diff --git a/core/profiles/demo_umami/tests/src/FunctionalJavascript/OpenTelemetryNodePagePerformanceTest.php b/core/profiles/demo_umami/tests/src/FunctionalJavascript/OpenTelemetryNodePagePerformanceTest.php
index 5c0c85636527..2e3597ea7294 100644
--- a/core/profiles/demo_umami/tests/src/FunctionalJavascript/OpenTelemetryNodePagePerformanceTest.php
+++ b/core/profiles/demo_umami/tests/src/FunctionalJavascript/OpenTelemetryNodePagePerformanceTest.php
@@ -23,7 +23,7 @@ class OpenTelemetryNodePagePerformanceTest extends PerformanceTestBase {
   /**
    * Logs node page tracing data with a cold cache.
    */
-  public function testNodePageColdCache() {
+  public function testNodePageColdCache(): void {
     // @todo Chromedriver doesn't collect tracing performance logs for the very
     //   first request in a test, so warm it up.
     //   https://www.drupal.org/project/drupal/issues/3379750
@@ -40,7 +40,7 @@ public function testNodePageColdCache() {
    *
    * Hot here means that all possible caches are warmed.
    */
-  public function testNodePageHotCache() {
+  public function testNodePageHotCache(): void {
     // Request the page twice so that asset aggregates are definitely cached in
     // the browser cache.
     $this->drupalGet('node/1');
@@ -64,7 +64,7 @@ public function testNodePageHotCache() {
    * Cool here means that 'global' site caches are warm but anything
    * specific to the route or path is cold.
    */
-  public function testNodePageCoolCache() {
+  public function testNodePageCoolCache(): void {
     // First of all visit the node page to ensure the image style exists.
     $this->drupalGet('node/1');
     $this->rebuildAll();
@@ -82,7 +82,7 @@ public function testNodePageCoolCache() {
    * Warm here means that 'global' site caches and route-specific caches are
    * warm but caches specific to this particular node/path are not.
    */
-  public function testNodePageWarmCache() {
+  public function testNodePageWarmCache(): void {
     // First of all visit the node page to ensure the image style exists.
     $this->drupalGet('node/1');
     $this->rebuildAll();
diff --git a/core/profiles/minimal/tests/src/Functional/MinimalTest.php b/core/profiles/minimal/tests/src/Functional/MinimalTest.php
index 365273dbc96e..cfc5b65b9b11 100644
--- a/core/profiles/minimal/tests/src/Functional/MinimalTest.php
+++ b/core/profiles/minimal/tests/src/Functional/MinimalTest.php
@@ -29,7 +29,7 @@ class MinimalTest extends BrowserTestBase {
   /**
    * Tests Minimal installation profile.
    */
-  public function testMinimal() {
+  public function testMinimal(): void {
     $this->drupalGet('');
     // Check the login block is present.
     $this->assertSession()->buttonExists('Log in');
diff --git a/core/profiles/standard/tests/src/FunctionalJavascript/StandardJavascriptTest.php b/core/profiles/standard/tests/src/FunctionalJavascript/StandardJavascriptTest.php
index a7ed9e733c1b..06a27eb787fd 100644
--- a/core/profiles/standard/tests/src/FunctionalJavascript/StandardJavascriptTest.php
+++ b/core/profiles/standard/tests/src/FunctionalJavascript/StandardJavascriptTest.php
@@ -22,7 +22,7 @@ class StandardJavascriptTest extends WebDriverTestBase {
   /**
    * Tests BigPipe accelerates particular Standard installation profile routes.
    */
-  public function testBigPipe() {
+  public function testBigPipe(): void {
     $this->drupalLogin($this->drupalCreateUser([
       'access content',
       'post comments',
diff --git a/core/profiles/standard/tests/src/FunctionalJavascript/StandardPerformanceTest.php b/core/profiles/standard/tests/src/FunctionalJavascript/StandardPerformanceTest.php
index 371ed6ed6000..fa8ef92c0705 100644
--- a/core/profiles/standard/tests/src/FunctionalJavascript/StandardPerformanceTest.php
+++ b/core/profiles/standard/tests/src/FunctionalJavascript/StandardPerformanceTest.php
@@ -46,7 +46,7 @@ protected function setUp(): void {
   /**
    * Tests performance for anonymous users.
    */
-  public function testAnonymous() {
+  public function testAnonymous(): void {
     // Request the front page, then immediately clear all object caches, so that
     // aggregates and image styles are created on disk but otherwise caches are
     // empty.
diff --git a/core/profiles/standard/tests/src/Traits/StandardTestTrait.php b/core/profiles/standard/tests/src/Traits/StandardTestTrait.php
index 180f062c4fc5..be8721bbe5fa 100644
--- a/core/profiles/standard/tests/src/Traits/StandardTestTrait.php
+++ b/core/profiles/standard/tests/src/Traits/StandardTestTrait.php
@@ -37,7 +37,7 @@ trait StandardTestTrait {
   /**
    * Tests Standard installation profile or recipe.
    */
-  public function testStandard() {
+  public function testStandard(): void {
     $this->drupalGet('');
     $this->assertSession()->pageTextContains('Powered by Drupal');
     $this->assertSession()->pageTextContains('Congratulations and welcome to the Drupal community.');
diff --git a/core/tests/Drupal/BuildTests/Command/GenerateThemeTest.php b/core/tests/Drupal/BuildTests/Command/GenerateThemeTest.php
index 7ca3023207dd..930f07e7edc1 100644
--- a/core/tests/Drupal/BuildTests/Command/GenerateThemeTest.php
+++ b/core/tests/Drupal/BuildTests/Command/GenerateThemeTest.php
@@ -86,7 +86,7 @@ private function assertThemeExists(string $theme_path_relative): array {
   /**
    * Tests the generate-theme command.
    */
-  public function test() {
+  public function test(): void {
     // Do not rely on \Drupal::VERSION: change the version to a concrete version
     // number, to simulate using a tagged core release.
     $starterkit_info_yml = $this->getWorkspaceDirectory() . '/core/themes/starterkit_theme/starterkit_theme.info.yml';
@@ -134,7 +134,7 @@ public function test() {
   /**
    * Tests generating a theme from another Starterkit enabled theme.
    */
-  public function testGeneratingFromAnotherTheme() {
+  public function testGeneratingFromAnotherTheme(): void {
     // Do not rely on \Drupal::VERSION: change the version to a concrete version
     // number, to simulate using a tagged core release.
     $starterkit_info_yml = $this->getWorkspaceDirectory() . '/core/themes/starterkit_theme/starterkit_theme.info.yml';
@@ -178,7 +178,7 @@ public function testGeneratingFromAnotherTheme() {
   /**
    * Tests the generate-theme command on a dev snapshot of Drupal core.
    */
-  public function testDevSnapshot() {
+  public function testDevSnapshot(): void {
     // Do not rely on \Drupal::VERSION: change the version to a development
     // snapshot version number, to simulate using a branch snapshot of core.
     $starterkit_info_yml = $this->getWorkspaceDirectory() . '/core/themes/starterkit_theme/starterkit_theme.info.yml';
diff --git a/core/tests/Drupal/BuildTests/Composer/ComposerValidateTest.php b/core/tests/Drupal/BuildTests/Composer/ComposerValidateTest.php
index c659d125724c..661d159bf806 100644
--- a/core/tests/Drupal/BuildTests/Composer/ComposerValidateTest.php
+++ b/core/tests/Drupal/BuildTests/Composer/ComposerValidateTest.php
@@ -26,7 +26,7 @@ public static function provideComposerJson() {
   /**
    * @dataProvider provideComposerJson
    */
-  public function testValidateComposer($path) {
+  public function testValidateComposer($path): void {
     $this->executeCommand('composer validate --strict --no-check-all ' . $path);
     $this->assertCommandSuccessful();
   }
diff --git a/core/tests/Drupal/BuildTests/Composer/Template/ComposerProjectTemplatesTest.php b/core/tests/Drupal/BuildTests/Composer/Template/ComposerProjectTemplatesTest.php
index cfbd463ddb32..62fce9147858 100644
--- a/core/tests/Drupal/BuildTests/Composer/Template/ComposerProjectTemplatesTest.php
+++ b/core/tests/Drupal/BuildTests/Composer/Template/ComposerProjectTemplatesTest.php
@@ -85,7 +85,7 @@ public static function provideTemplateCreateProject() {
   /**
    * Make sure that static::MINIMUM_STABILITY is sufficiently strict.
    */
-  public function testMinimumStabilityStrictness() {
+  public function testMinimumStabilityStrictness(): void {
     // Ensure that static::MINIMUM_STABILITY is not less stable than the
     // current core stability. For example, if we've already released a beta on
     // the branch, ensure that we no longer allow alpha dependencies.
@@ -146,7 +146,7 @@ public function testMinimumStabilityStrictness() {
   /**
    * Make sure we've accounted for all the templates.
    */
-  public function testVerifyTemplateTestProviderIsAccurate() {
+  public function testVerifyTemplateTestProviderIsAccurate(): void {
     $root = $this->getDrupalRoot();
     $data = $this->provideTemplateCreateProject();
 
@@ -174,7 +174,7 @@ public function testVerifyTemplateTestProviderIsAccurate() {
   /**
    * @dataProvider provideTemplateCreateProject
    */
-  public function testTemplateCreateProject($project, $package_dir, $docroot_dir) {
+  public function testTemplateCreateProject($project, $package_dir, $docroot_dir): void {
     // Make a working COMPOSER_HOME directory for setting global composer config
     $composer_home = $this->getWorkspaceDirectory() . '/composer-home';
     mkdir($composer_home);
diff --git a/core/tests/Drupal/BuildTests/Framework/Tests/BuildTestTest.php b/core/tests/Drupal/BuildTests/Framework/Tests/BuildTestTest.php
index 4803397db446..119ec0c40cce 100644
--- a/core/tests/Drupal/BuildTests/Framework/Tests/BuildTestTest.php
+++ b/core/tests/Drupal/BuildTests/Framework/Tests/BuildTestTest.php
@@ -18,7 +18,7 @@ class BuildTestTest extends BuildTestBase {
   /**
    * Ensure that workspaces work.
    */
-  public function testWorkspace() {
+  public function testWorkspace(): void {
     $test_directory = 'test_directory';
 
     // Execute an empty command through the shell to build out a working
@@ -36,7 +36,7 @@ public function testWorkspace() {
   /**
    * @covers ::copyCodebase
    */
-  public function testCopyCodebase() {
+  public function testCopyCodebase(): void {
     $test_directory = 'copied_codebase';
     $this->copyCodebase(NULL, $test_directory);
     $full_path = $this->getWorkspaceDirectory() . '/' . $test_directory;
@@ -58,7 +58,7 @@ public function testCopyCodebase() {
    *
    * @covers ::copyCodebase
    */
-  public function testCopyCodebaseExclude() {
+  public function testCopyCodebaseExclude(): void {
     // Create a virtual file system containing items that should be
     // excluded. Exception being modules directory.
     vfsStream::setup('drupal', NULL, [
@@ -131,7 +131,7 @@ public function testCopyCodebaseExclude() {
    *
    * @covers ::copyCodebase
    */
-  public function testCopyCodebaseDocRoot() {
+  public function testCopyCodebaseDocRoot(): void {
     // Create a virtual file system containing items that should be
     // excluded. Exception being modules directory.
     vfsStream::setup('drupal', NULL, [
@@ -208,7 +208,7 @@ public function testCopyCodebaseDocRoot() {
   /**
    * @covers ::findAvailablePort
    */
-  public function testPortMany() {
+  public function testPortMany(): void {
     $iterator = (new Finder())->in($this->getDrupalRoot())
       ->ignoreDotFiles(FALSE)
       ->exclude(['sites/simpletest'])
@@ -236,7 +236,7 @@ public function testPortMany() {
   /**
    * @covers ::standUpServer
    */
-  public function testStandUpServer() {
+  public function testStandUpServer(): void {
     // Stand up a server with working directory 'first'.
     $this->standUpServer('first');
 
diff --git a/core/tests/Drupal/BuildTests/Framework/Tests/HtRouterTest.php b/core/tests/Drupal/BuildTests/Framework/Tests/HtRouterTest.php
index 19c439c876d5..f34f5e7f896c 100644
--- a/core/tests/Drupal/BuildTests/Framework/Tests/HtRouterTest.php
+++ b/core/tests/Drupal/BuildTests/Framework/Tests/HtRouterTest.php
@@ -17,7 +17,7 @@ class HtRouterTest extends QuickStartTestBase {
   /**
    * @covers ::instantiateServer
    */
-  public function testHtRouter() {
+  public function testHtRouter(): void {
     $sqlite = (new \PDO('sqlite::memory:'))->query('select sqlite_version()')->fetch()[0];
     if (version_compare($sqlite, Tasks::SQLITE_MINIMUM_VERSION) < 0) {
       $this->markTestSkipped();
diff --git a/core/tests/Drupal/BuildTests/TestSiteApplication/InstallTest.php b/core/tests/Drupal/BuildTests/TestSiteApplication/InstallTest.php
index f16e3b15c38c..bbcce3d2ca2a 100644
--- a/core/tests/Drupal/BuildTests/TestSiteApplication/InstallTest.php
+++ b/core/tests/Drupal/BuildTests/TestSiteApplication/InstallTest.php
@@ -15,7 +15,7 @@
  */
 class InstallTest extends BuildTestBase {
 
-  public function testInstall() {
+  public function testInstall(): void {
     $sqlite = (new \PDO('sqlite::memory:'))->query('select sqlite_version()')->fetch()[0];
     if (version_compare($sqlite, Tasks::SQLITE_MINIMUM_VERSION) < 0) {
       $this->markTestSkipped();
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxCallbacksTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxCallbacksTest.php
index dace985114b2..d1c07c20124e 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxCallbacksTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxCallbacksTest.php
@@ -26,7 +26,7 @@ class AjaxCallbacksTest extends WebDriverTestBase {
   /**
    * Tests if Ajax callback works on date element.
    */
-  public function testDateAjaxCallback() {
+  public function testDateAjaxCallback(): void {
 
     // Test Ajax callback when date changes.
     $this->drupalGet('ajax_forms_test_ajax_element_form');
@@ -38,7 +38,7 @@ public function testDateAjaxCallback() {
   /**
    * Tests if Ajax callback works on datetime element.
    */
-  public function testDateTimeAjaxCallback() {
+  public function testDateTimeAjaxCallback(): void {
 
     // Test Ajax callback when datetime changes.
     $this->drupalGet('ajax_forms_test_ajax_element_form');
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormCacheTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormCacheTest.php
index ccad0ab51ad0..b2ae9386bd0a 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormCacheTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormCacheTest.php
@@ -27,7 +27,7 @@ class AjaxFormCacheTest extends WebDriverTestBase {
   /**
    * Tests the usage of form cache for AJAX forms.
    */
-  public function testFormCacheUsage() {
+  public function testFormCacheUsage(): void {
     /** @var \Drupal\Core\KeyValueStore\KeyValueStoreExpirableInterface $key_value_expirable */
     $key_value_expirable = \Drupal::service('keyvalue.expirable')->get('form');
     $this->drupalLogin($this->rootUser);
@@ -48,7 +48,7 @@ public function testFormCacheUsage() {
   /**
    * Tests AJAX forms in blocks.
    */
-  public function testBlockForms() {
+  public function testBlockForms(): void {
     $this->container->get('module_installer')->install(['block', 'search']);
     $this->rebuildContainer();
     $this->drupalLogin($this->rootUser);
@@ -83,7 +83,7 @@ public function testBlockForms() {
   /**
    * Tests AJAX forms on pages with a query string.
    */
-  public function testQueryString() {
+  public function testQueryString(): void {
     $this->container->get('module_installer')->install(['block']);
     $this->drupalLogin($this->rootUser);
 
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormImageButtonTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormImageButtonTest.php
index 4e4ff6f8d29c..c9a4b3ef2722 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormImageButtonTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormImageButtonTest.php
@@ -26,7 +26,7 @@ class AjaxFormImageButtonTest extends WebDriverTestBase {
   /**
    * Tests image buttons can be operated with the keyboard ENTER key.
    */
-  public function testAjaxImageButtonKeypressEnter() {
+  public function testAjaxImageButtonKeypressEnter(): void {
     // Get a Field UI manage-display page.
     $this->drupalGet('ajax_forms_image_button_form');
     $assertSession = $this->assertSession();
@@ -41,7 +41,7 @@ public function testAjaxImageButtonKeypressEnter() {
   /**
    * Tests image buttons can be operated with the keyboard SPACE key.
    */
-  public function testAjaxImageButtonKeypressSpace() {
+  public function testAjaxImageButtonKeypressSpace(): void {
     // Get a Field UI manage-display page.
     $this->drupalGet('ajax_forms_image_button_form');
     $assertSession = $this->assertSession();
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormPageCacheTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormPageCacheTest.php
index 622311c11434..a80a627a89cc 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormPageCacheTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormPageCacheTest.php
@@ -46,7 +46,7 @@ protected function getFormBuildId() {
   /**
    * Create a simple form, then submit the form via AJAX to change to it.
    */
-  public function testSimpleAJAXFormValue() {
+  public function testSimpleAJAXFormValue(): void {
     $this->drupalGet('ajax_forms_test_get_form');
     $build_id_initial = $this->getFormBuildId();
 
@@ -116,7 +116,7 @@ public function testSimpleAJAXFormValue() {
    *
    * @see \Drupal\system\Tests\Ajax\ElementValidationTest::testAjaxElementValidation()
    */
-  public function testAjaxElementValidation() {
+  public function testAjaxElementValidation(): void {
     $this->drupalGet('ajax_validation_test');
     // Changing the value of the textfield will trigger an AJAX
     // request/response.
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxInGroupTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxInGroupTest.php
index cd0b859bc596..a8282b2b6cfe 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxInGroupTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxInGroupTest.php
@@ -35,7 +35,7 @@ protected function setUp(): void {
   /**
    * Submits forms with select and checkbox elements via Ajax.
    */
-  public function testSimpleAjaxFormValue() {
+  public function testSimpleAjaxFormValue(): void {
     $this->drupalGet('/ajax_forms_test_get_form');
 
     $assert_session = $this->assertSession();
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxTest.php
index fab6190c61db..3d056401a2b8 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxTest.php
@@ -24,7 +24,7 @@ class AjaxTest extends WebDriverTestBase {
    */
   protected $defaultTheme = 'stark';
 
-  public function testAjaxWithAdminRoute() {
+  public function testAjaxWithAdminRoute(): void {
     \Drupal::service('theme_installer')->install(['stable9', 'claro']);
     $theme_config = \Drupal::configFactory()->getEditable('system.theme');
     $theme_config->set('admin', 'claro');
@@ -55,7 +55,7 @@ public function testAjaxWithAdminRoute() {
    *
    * @see https://www.drupal.org/node/2647916
    */
-  public function testDrupalSettingsCachingRegression() {
+  public function testDrupalSettingsCachingRegression(): void {
     $this->drupalGet('ajax-test/dialog');
     $assert = $this->assertSession();
     $session = $this->getSession();
@@ -100,7 +100,7 @@ public function testDrupalSettingsCachingRegression() {
    * reattached and all top-level elements of type Node.ELEMENT_NODE need to be
    * part of the context.
    */
-  public function testInsertAjaxResponse() {
+  public function testInsertAjaxResponse(): void {
     $render_single_root = [
       'pre-wrapped-div' => '<div class="pre-wrapped">pre-wrapped<script> var test;</script></div>',
       'pre-wrapped-span' => '<span class="pre-wrapped">pre-wrapped<script> var test;</script></span>',
@@ -162,7 +162,7 @@ public function testInsertAjaxResponse() {
   /**
    * Tests that jQuery's global Ajax events are triggered at the correct time.
    */
-  public function testGlobalEvents() {
+  public function testGlobalEvents(): void {
     $session = $this->getSession();
     $assert = $this->assertSession();
     $expected_event_order = implode('', ['ajaxSuccess', 'ajaxComplete', 'ajaxStop']);
@@ -260,7 +260,7 @@ protected function assertWaitPageContains(string $expected): void {
   /**
    * Tests that Ajax errors are visible in the UI.
    */
-  public function testUiAjaxException() {
+  public function testUiAjaxException(): void {
     $themes = [
       'olivero',
       'claro',
@@ -300,7 +300,7 @@ public function testUiAjaxException() {
   /**
    * Tests ajax focus handling.
    */
-  public function testAjaxFocus() {
+  public function testAjaxFocus(): void {
     $this->markTestSkipped("Skipped due to frequent random test failures. See https://www.drupal.org/project/drupal/issues/3396536");
     $this->drupalGet('/ajax_forms_test_get_form');
 
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/CommandsTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/CommandsTest.php
index 736f8351c69f..612bfba7a622 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/CommandsTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/CommandsTest.php
@@ -26,7 +26,7 @@ class CommandsTest extends WebDriverTestBase {
   /**
    * Tests the various Ajax Commands.
    */
-  public function testAjaxCommands() {
+  public function testAjaxCommands(): void {
     $session = $this->getSession();
     $page = $this->getSession()->getPage();
 
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/DialogTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/DialogTest.php
index 7438e1af1ca1..c42255d5404e 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/DialogTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/DialogTest.php
@@ -28,7 +28,7 @@ class DialogTest extends WebDriverTestBase {
   /**
    * Tests sending non-JS and AJAX requests to open and manipulate modals.
    */
-  public function testDialog() {
+  public function testDialog(): void {
     $this->drupalLogin($this->drupalCreateUser(['administer contact forms']));
     // Ensure the elements render without notices or exceptions.
     $this->drupalGet('ajax-test/dialog');
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/ElementValidationTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/ElementValidationTest.php
index 345cef2107d2..60fd1f40b95f 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/ElementValidationTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/ElementValidationTest.php
@@ -29,7 +29,7 @@ class ElementValidationTest extends WebDriverTestBase {
    * Drupal AJAX commands update the DOM echoing back the validated values in
    * the form of messages that appear on the page.
    */
-  public function testAjaxElementValidation() {
+  public function testAjaxElementValidation(): void {
     $this->drupalGet('ajax_validation_test');
     $page = $this->getSession()->getPage();
     $assert = $this->assertSession();
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/FocusFirstCommandTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/FocusFirstCommandTest.php
index 90175f1d7f03..7a9b91c52b90 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/FocusFirstCommandTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/FocusFirstCommandTest.php
@@ -25,7 +25,7 @@ class FocusFirstCommandTest extends WebDriverTestBase {
   /**
    * Tests AjaxFocusFirstCommand on a page.
    */
-  public function testFocusFirst() {
+  public function testFocusFirst(): void {
     $page = $this->getSession()->getPage();
     $assert_session = $this->assertSession();
 
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/FormValuesTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/FormValuesTest.php
index c2a1d3e5a880..2ee6b8ddb2ce 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/FormValuesTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/FormValuesTest.php
@@ -36,7 +36,7 @@ protected function setUp(): void {
    *
    * @dataProvider formModeProvider
    */
-  public function testSimpleAjaxFormValue($form_mode) {
+  public function testSimpleAjaxFormValue($form_mode): void {
     $this->drupalGet('ajax_forms_test_get_form');
 
     $session = $this->getSession();
@@ -78,7 +78,7 @@ public function testSimpleAjaxFormValue($form_mode) {
   /**
    * Tests that AJAX elements with invalid callbacks return error code 500.
    */
-  public function testSimpleInvalidCallbacksAjaxFormValue() {
+  public function testSimpleInvalidCallbacksAjaxFormValue(): void {
     $this->drupalGet('ajax_forms_test_get_form');
 
     $session = $this->getSession();
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/MessageCommandTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/MessageCommandTest.php
index ce9064118eb4..ac347e8c45dc 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/MessageCommandTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/MessageCommandTest.php
@@ -27,7 +27,7 @@ class MessageCommandTest extends WebDriverTestBase {
   /**
    * Tests AJAX MessageCommand use in a form.
    */
-  public function testMessageCommand() {
+  public function testMessageCommand(): void {
     $page = $this->getSession()->getPage();
     $assert_session = $this->assertSession();
 
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/MultiFormTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/MultiFormTest.php
index 7d18e56aef65..238474e5ae7b 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/MultiFormTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/MultiFormTest.php
@@ -58,7 +58,7 @@ protected function setUp(): void {
   /**
    * Tests that pages with the 'node_page_form' included twice work correctly.
    */
-  public function testMultiForm() {
+  public function testMultiForm(): void {
     // HTML IDs for elements within the field are potentially modified with
     // each Ajax submission, but these variables are stable and help target the
     // desired elements.
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/ThrobberTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/ThrobberTest.php
index d6ecae566a7c..0372ae1cd996 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/ThrobberTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/ThrobberTest.php
@@ -33,7 +33,7 @@ class ThrobberTest extends WebDriverTestBase {
   /**
    * Tests theming throbber element.
    */
-  public function testThemingThrobberElement() {
+  public function testThemingThrobberElement(): void {
     $session = $this->getSession();
     $web_assert = $this->assertSession();
     $page = $session->getPage();
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/BrowserWithJavascriptTest.php b/core/tests/Drupal/FunctionalJavascriptTests/BrowserWithJavascriptTest.php
index ecf579c8cb49..163a98e247be 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/BrowserWithJavascriptTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/BrowserWithJavascriptTest.php
@@ -25,7 +25,7 @@ class BrowserWithJavascriptTest extends WebDriverTestBase {
    */
   protected $defaultTheme = 'stark';
 
-  public function testJavascript() {
+  public function testJavascript(): void {
     $this->drupalGet('<front>');
     $session = $this->getSession();
 
@@ -48,7 +48,7 @@ public function testJavascript() {
     $this->assertFalse($this->isTestUsingGuzzleClient());
   }
 
-  public function testAssertJsCondition() {
+  public function testAssertJsCondition(): void {
     $this->drupalGet('<front>');
     $session = $this->getSession();
 
@@ -74,7 +74,7 @@ public function testAssertJsCondition() {
   /**
    * Tests creating screenshots.
    */
-  public function testCreateScreenshot() {
+  public function testCreateScreenshot(): void {
     $this->drupalGet('<front>');
     $this->createScreenshot('public://screenshot.jpg');
     $this->assertFileExists('public://screenshot.jpg');
@@ -86,7 +86,7 @@ public function testCreateScreenshot() {
    * @see \Drupal\Tests\WebAssert::assertNoEscaped()
    * @see \Drupal\Tests\WebAssert::assertEscaped()
    */
-  public function testEscapingAssertions() {
+  public function testEscapingAssertions(): void {
     $assert = $this->assertSession();
 
     $this->drupalGet('test-escaped-characters');
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Components/ComponentRenderTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Components/ComponentRenderTest.php
index c479411006af..5b77de188aa2 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/Components/ComponentRenderTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Components/ComponentRenderTest.php
@@ -29,7 +29,7 @@ class ComponentRenderTest extends WebDriverTestBase {
    * This also covers all the path translations necessary to produce the correct
    * path to the assets.
    */
-  public function testCssLibraryAttachesCorrectly() {
+  public function testCssLibraryAttachesCorrectly(): void {
     $build = [
       '#type' => 'inline_template',
       '#template' => "{{ include('sdc_theme_test:lib-overrides') }}",
@@ -47,7 +47,7 @@ public function testCssLibraryAttachesCorrectly() {
    * This also covers all the path translations necessary to produce the correct
    * path to the assets.
    */
-  public function testJsLibraryAttachesCorrectly() {
+  public function testJsLibraryAttachesCorrectly(): void {
     $build = [
       '#type' => 'inline_template',
       '#template' => "{{ include('sdc_test:my-button', {
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Core/CsrfTokenRaceTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Core/CsrfTokenRaceTest.php
index f0208d6d2ddf..f16b300441de 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/Core/CsrfTokenRaceTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Core/CsrfTokenRaceTest.php
@@ -26,7 +26,7 @@ class CsrfTokenRaceTest extends WebDriverTestBase {
   /**
    * Tests race condition for CSRF tokens for simultaneous requests.
    */
-  public function testCsrfRace() {
+  public function testCsrfRace(): void {
     $user = $this->createUser(['access content']);
     $this->drupalLogin($user);
     $this->drupalGet('/csrf_race/test');
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Core/Form/FormGroupingElementsTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Core/Form/FormGroupingElementsTest.php
index 57f139442ed3..7c8af15a2e31 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/Core/Form/FormGroupingElementsTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Core/Form/FormGroupingElementsTest.php
@@ -42,7 +42,7 @@ protected function setUp(): void {
    * becomes visible when the tab is clicked, a fragment link to the child is
    * clicked or when the URI fragment pointing to that child changes.
    */
-  public function testVerticalTabChildVisibility() {
+  public function testVerticalTabChildVisibility(): void {
     $session = $this->getSession();
     $web_assert = $this->assertSession();
 
@@ -92,7 +92,7 @@ public function testVerticalTabChildVisibility() {
    * becomes visible when a fragment link to the child is clicked or when the
    * URI fragment pointing to that child changes.
    */
-  public function testDetailsChildVisibility() {
+  public function testDetailsChildVisibility(): void {
     $session = $this->getSession();
     $web_assert = $this->assertSession();
 
@@ -139,7 +139,7 @@ public function testDetailsChildVisibility() {
   /**
    * Confirms tabs containing a field with a validation error are open.
    */
-  public function testVerticalTabValidationVisibility() {
+  public function testVerticalTabValidationVisibility(): void {
     $page = $this->getSession()->getPage();
     $assert_session = $this->assertSession();
 
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Core/Form/JavascriptStatesTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Core/Form/JavascriptStatesTest.php
index 3fb9f8feac87..179886e8b900 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/Core/Form/JavascriptStatesTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Core/Form/JavascriptStatesTest.php
@@ -63,7 +63,7 @@ protected function setUp(): void {
    * this is a single public test method that invokes a series of protected
    * methods to do assertions on specific kinds of triggering elements.
    */
-  public function testJavascriptStates() {
+  public function testJavascriptStates(): void {
     $this->doCheckboxTriggerTests();
     $this->doCheckboxesTriggerTests();
     $this->doTextfieldTriggerTests();
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Core/JsMessageTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Core/JsMessageTest.php
index bcd063ee4349..ce4cf583cd8c 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/Core/JsMessageTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Core/JsMessageTest.php
@@ -40,7 +40,7 @@ protected function setUp(): void {
   /**
    * Tests click on links to show messages and remove messages.
    */
-  public function testAddRemoveMessages() {
+  public function testAddRemoveMessages(): void {
     $web_assert = $this->assertSession();
     $this->drupalGet('js_message_test_link');
 
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Core/MachineNameTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Core/MachineNameTest.php
index 57affeb98f6e..31f044175860 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/Core/MachineNameTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Core/MachineNameTest.php
@@ -46,7 +46,7 @@ protected function setUp(): void {
    * Makes sure that the machine name field automatically provides a valid
    * machine name and that the manual editing mode functions.
    */
-  public function testMachineName() {
+  public function testMachineName(): void {
     // Visit the machine name test page which contains two machine name fields.
     $this->drupalGet('form-test/machine-name');
 
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Core/Session/SessionTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Core/Session/SessionTest.php
index d6b6241b1a8c..8adf7a5685a5 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/Core/Session/SessionTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Core/Session/SessionTest.php
@@ -50,7 +50,7 @@ protected function setUp(): void {
    * performed by the Mink browser. The SIMPLETEST_USER_AGENT cookie must always
    * be valid.
    */
-  public function testSessionExpiration() {
+  public function testSessionExpiration(): void {
     // Visit the front page and click the link back to the front page a large
     // number of times.
     $this->drupalGet('<front>');
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Dialog/DialogPositionTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Dialog/DialogPositionTest.php
index c3f9dcd8f8c7..ed73ac1ff706 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/Dialog/DialogPositionTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Dialog/DialogPositionTest.php
@@ -26,7 +26,7 @@ class DialogPositionTest extends WebDriverTestBase {
   /**
    * Tests if the dialog UI works properly with block layout page.
    */
-  public function testDialogOpenAndClose() {
+  public function testDialogOpenAndClose(): void {
     $admin_user = $this->drupalCreateUser(['administer blocks']);
     $this->drupalLogin($admin_user);
     $this->drupalGet('admin/structure/block');
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/EntityReference/EntityReferenceAutocompleteWidgetTest.php b/core/tests/Drupal/FunctionalJavascriptTests/EntityReference/EntityReferenceAutocompleteWidgetTest.php
index a40e99152389..ecf77d322b8b 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/EntityReference/EntityReferenceAutocompleteWidgetTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/EntityReference/EntityReferenceAutocompleteWidgetTest.php
@@ -58,7 +58,7 @@ protected function setUp(): void {
   /**
    * Tests that the default autocomplete widget return the correct results.
    */
-  public function testEntityReferenceAutocompleteWidget() {
+  public function testEntityReferenceAutocompleteWidget(): void {
     /** @var \Drupal\Core\Entity\EntityDisplayRepositoryInterface $display_repository */
     $display_repository = \Drupal::service('entity_display.repository');
 
@@ -164,7 +164,7 @@ public function testEntityReferenceAutocompleteWidget() {
    * Ensures that the entity the autocomplete widget stores the entity it is
    * rendered on, and is available in the autocomplete results' AJAX request.
    */
-  public function testEntityReferenceAutocompleteWidgetAttachedEntity() {
+  public function testEntityReferenceAutocompleteWidgetAttachedEntity(): void {
     $user = $this->drupalCreateUser([
       'administer entity_test content',
     ]);
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/JavascriptDeprecationTest.php b/core/tests/Drupal/FunctionalJavascriptTests/JavascriptDeprecationTest.php
index ab4dba1be7c4..7bdf7cd64153 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/JavascriptDeprecationTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/JavascriptDeprecationTest.php
@@ -22,7 +22,7 @@ class JavascriptDeprecationTest extends WebDriverTestBase {
   /**
    * Tests Javascript deprecation notices.
    */
-  public function testJavascriptDeprecation() {
+  public function testJavascriptDeprecation(): void {
     $this->expectDeprecation('Javascript Deprecation: This function is deprecated for testing purposes.');
     $this->expectDeprecation('Javascript Deprecation: This property is deprecated for testing purposes.');
     $this->drupalGet('js_deprecation_test');
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/JavascriptGetDrupalSettingsTest.php b/core/tests/Drupal/FunctionalJavascriptTests/JavascriptGetDrupalSettingsTest.php
index c9ed7f1d3fc5..31ec8c91675b 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/JavascriptGetDrupalSettingsTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/JavascriptGetDrupalSettingsTest.php
@@ -26,7 +26,7 @@ class JavascriptGetDrupalSettingsTest extends WebDriverTestBase {
    *
    * @see \Drupal\FunctionalJavascriptTests\WebDriverTestBase::getDrupalSettings()
    */
-  public function testGetDrupalSettings() {
+  public function testGetDrupalSettings(): void {
     $this->drupalLogin($this->drupalCreateUser());
     $this->drupalGet('test-page');
 
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/MachineName/MachineNameTransliterationTest.php b/core/tests/Drupal/FunctionalJavascriptTests/MachineName/MachineNameTransliterationTest.php
index 74546cb8104f..9cb079d954d7 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/MachineName/MachineNameTransliterationTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/MachineName/MachineNameTransliterationTest.php
@@ -51,7 +51,7 @@ protected function setUp(): void {
    *
    * @dataProvider machineNameInputOutput
    */
-  public function testMachineNameTransliterations($langcode, $input, $output) {
+  public function testMachineNameTransliterations($langcode, $input, $output): void {
     $page = $this->getSession()->getPage();
     if ($langcode !== 'en') {
       ConfigurableLanguage::createFromLangcode($langcode)->save();
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/TableDrag/TableDragTest.php b/core/tests/Drupal/FunctionalJavascriptTests/TableDrag/TableDragTest.php
index 82ceebe341c3..0a3dd44e6abc 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/TableDrag/TableDragTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/TableDrag/TableDragTest.php
@@ -63,7 +63,7 @@ protected function setUp(): void {
   /**
    * Tests row weight switch.
    */
-  public function testRowWeightSwitch() {
+  public function testRowWeightSwitch(): void {
     $this->state->set('tabledrag_test_table', array_flip(range(1, 3)));
 
     $this->drupalGet('tabledrag_test');
@@ -100,7 +100,7 @@ public function testRowWeightSwitch() {
   /**
    * Tests draggable table drag'n'drop.
    */
-  public function testDragAndDrop() {
+  public function testDragAndDrop(): void {
     $this->state->set('tabledrag_test_table', array_flip(range(1, 3)));
     $this->drupalGet('tabledrag_test');
 
@@ -147,7 +147,7 @@ public function testDragAndDrop() {
   /**
    * Tests accessibility through keyboard of the tabledrag functionality.
    */
-  public function testKeyboardAccessibility() {
+  public function testKeyboardAccessibility(): void {
     $this->assertKeyboardAccessibility();
   }
 
@@ -248,7 +248,7 @@ protected function assertKeyboardAccessibility(string $drupal_path = 'tabledrag_
   /**
    * Tests the root and leaf behaviors for rows.
    */
-  public function testRootLeafDraggableRowsWithKeyboard() {
+  public function testRootLeafDraggableRowsWithKeyboard(): void {
     $this->state->set('tabledrag_test_table', [
       1 => [],
       2 => ['parent' => 1, 'depth' => 1, 'classes' => ['tabledrag-leaf']],
@@ -298,7 +298,7 @@ public function testRootLeafDraggableRowsWithKeyboard() {
   /**
    * Tests the warning that appears upon making changes to a tabledrag table.
    */
-  public function testTableDragChangedWarning() {
+  public function testTableDragChangedWarning(): void {
     $this->drupalGet('tabledrag_test');
 
     // By default no text is visible.
@@ -347,7 +347,7 @@ protected function assertOrder(array $items): void {
   /**
    * Tests nested draggable tables through keyboard.
    */
-  public function testNestedDraggableTables() {
+  public function testNestedDraggableTables(): void {
     $this->state->set('tabledrag_test_table', array_flip(range(1, 5)));
     $this->drupalGet('tabledrag_test_nested');
     $this->assertKeyboardAccessibility('');
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Tests/DrupalSelenium2DriverTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Tests/DrupalSelenium2DriverTest.php
index 16089b7a26fe..58182ab305f2 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/Tests/DrupalSelenium2DriverTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Tests/DrupalSelenium2DriverTest.php
@@ -47,7 +47,7 @@ protected function setUp(): void {
   /**
    * Tests uploading remote files.
    */
-  public function testGetRemoteFilePath() {
+  public function testGetRemoteFilePath(): void {
     $web_driver = $this->getSession()->getDriver();
     $this->assertInstanceOf(Selenium2Driver::class, $web_driver);
     $this->assertFalse($web_driver->isW3C(), 'Driver is not operating in W3C mode');
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Tests/JSInteractionTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Tests/JSInteractionTest.php
index 52289bc933a7..866f04e3a72a 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/Tests/JSInteractionTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Tests/JSInteractionTest.php
@@ -29,7 +29,7 @@ class JSInteractionTest extends WebDriverTestBase {
   /**
    * Assert an exception is thrown when the blocker element is never removed.
    */
-  public function testNotClickable() {
+  public function testNotClickable(): void {
     $this->expectException(Exception::class);
     $this->drupalGet('/js_interaction_test');
     $this->assertSession()->elementExists('named', ['link', 'Target link'])->click();
@@ -38,7 +38,7 @@ public function testNotClickable() {
   /**
    * Assert an exception is thrown when the field is never enabled.
    */
-  public function testFieldValueNotSettable() {
+  public function testFieldValueNotSettable(): void {
     $this->expectException(Exception::class);
     $this->drupalGet('/js_interaction_test');
     $this->assertSession()->fieldExists('target_field')->setValue('Test');
@@ -47,7 +47,7 @@ public function testFieldValueNotSettable() {
   /**
    * Assert no exception is thrown when elements become interactive.
    */
-  public function testElementsInteraction() {
+  public function testElementsInteraction(): void {
     $this->drupalGet('/js_interaction_test');
     // Remove blocking element after 100 ms.
     $this->clickLink('Remove Blocker Trigger');
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Tests/JSWebAssertTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Tests/JSWebAssertTest.php
index 46b1ac5d01e4..07d84d19fc42 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/Tests/JSWebAssertTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Tests/JSWebAssertTest.php
@@ -31,7 +31,7 @@ class JSWebAssertTest extends WebDriverTestBase {
   /**
    * Tests that JSWebAssert assertions work correctly.
    */
-  public function testJsWebAssert() {
+  public function testJsWebAssert(): void {
     $this->drupalGet('js_webassert_test_form');
 
     $session = $this->getSession();
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroEntityDisplayTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroEntityDisplayTest.php
index df19a4986218..6e3ac8113c3e 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroEntityDisplayTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroEntityDisplayTest.php
@@ -42,7 +42,7 @@ protected function setUp(): void {
    * with a line changed to reflect row weight toggle being a link instead
    * of a button.
    */
-  public function testEntityForm() {
+  public function testEntityForm(): void {
     $this->drupalGet('entity_test/manage/1/edit');
     $this->assertSession()->fieldExists('field_test_text[0][value]');
 
@@ -68,7 +68,7 @@ public function testEntityForm() {
    * with a line changed to reflect row weight toggle being a link instead
    * of a button.
    */
-  public function testEntityView() {
+  public function testEntityView(): void {
     $this->drupalGet('entity_test/1');
     $this->assertSession()->elementNotExists('css', '.field--name-field-test-text');
 
@@ -95,7 +95,7 @@ public function testEntityView() {
    * This is Drupal\Tests\field_ui\FunctionalJavascript\EntityDisplayTest::testExtraFields()
    * with a line changed to reflect Claro's tabledrag selector.
    */
-  public function testExtraFields() {
+  public function testExtraFields(): void {
     entity_test_create_bundle('bundle_with_extra_fields');
     $this->drupalGet('entity_test/structure/bundle_with_extra_fields/display');
     $this->assertSession()->waitForElement('css', '.tabledrag-handle');
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroMenuUiJavascriptTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroMenuUiJavascriptTest.php
index f8f4c950c584..32f6256396b3 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroMenuUiJavascriptTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroMenuUiJavascriptTest.php
@@ -37,7 +37,7 @@ protected function setUp(): void {
    * Contextual links do not work in admin themes, so this is empty to prevent
    * this test running in the parent class.
    */
-  public function testBlockContextualLinks() {
+  public function testBlockContextualLinks(): void {
   }
 
 }
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroModalDisplayTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroModalDisplayTest.php
index 7956989b4a24..c78ff99c80a3 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroModalDisplayTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroModalDisplayTest.php
@@ -27,7 +27,7 @@ class ClaroModalDisplayTest extends MediaLibraryTestBase {
   /**
    * Tests the position f "add another" button in dialogs.
    */
-  public function testModalAddAnother() {
+  public function testModalAddAnother(): void {
 
     // Add unlimited field to the media type four.
     $unlimited_field_storage = FieldStorageConfig::create([
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroPasswordConfirmWidgetTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroPasswordConfirmWidgetTest.php
index 57952ad7b50c..af01db8d2a8f 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroPasswordConfirmWidgetTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroPasswordConfirmWidgetTest.php
@@ -21,7 +21,7 @@ class ClaroPasswordConfirmWidgetTest extends PasswordConfirmWidgetTest {
   /**
    * Tests that password match message is invisible when widget is initialized.
    */
-  public function testPasswordConfirmMessage() {
+  public function testPasswordConfirmMessage(): void {
     $this->drupalGet($this->testUser->toUrl('edit-form'));
     $password_confirm_widget_selector = '.js-form-type-password-confirm.js-form-item-pass';
     $password_confirm_selector = '.js-form-item-pass-pass2';
@@ -36,7 +36,7 @@ public function testPasswordConfirmMessage() {
   /**
    * {@inheritdoc}
    */
-  public function testFillConfirmOnly() {
+  public function testFillConfirmOnly(): void {
     // This test is not applicable to Claro because confirm field is hidden
     // until the password has been filled in the main field.
   }
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroTableDragTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroTableDragTest.php
index 5872284d677e..9938ad22d095 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroTableDragTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroTableDragTest.php
@@ -33,7 +33,7 @@ class ClaroTableDragTest extends TableDragTest {
   /**
    * Ensures that there are no duplicate tabledrag handles.
    */
-  public function testNoDuplicates() {
+  public function testNoDuplicates(): void {
     $this->drupalGet('tabledrag_test_nested');
     $this->assertCount(1, $this->findRowById(1)->findAll('css', '.tabledrag-handle'));
   }
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroViewsBulkOperationsTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroViewsBulkOperationsTest.php
index 058557e3cdd3..e752b79a65af 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroViewsBulkOperationsTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroViewsBulkOperationsTest.php
@@ -51,7 +51,7 @@ protected function setUp(): void {
   /**
    * Tests the dynamic Bulk Operations form.
    */
-  public function testBulkOperationsUi() {
+  public function testBulkOperationsUi(): void {
     $this->drupalGet('admin/content');
 
     $page = $this->getSession()->getPage();
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroViewsUiTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroViewsUiTest.php
index 9b1a97e0c19e..28b3c46a9996 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroViewsUiTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroViewsUiTest.php
@@ -47,7 +47,7 @@ protected function setUp(): void {
    * Ensures that the CSS classes added to display menu tabs are preserved when
    * Views UI is updated with AJAX.
    */
-  public function testViewsUiTabsCssClasses() {
+  public function testViewsUiTabsCssClasses(): void {
     $this->drupalGet('admin/structure/views/view/who_s_online');
     $assert_session = $this->assertSession();
     $assert_session->elementExists('css', '#views-display-menu-tabs.views-tabs.views-tabs--secondary');
@@ -69,7 +69,7 @@ public function testViewsUiTabsCssClasses() {
    * Ensures that the CSS classes added to the Views UI extra actions dropbutton
    * in .views-display-top are preserved when Views UI is refreshed with AJAX.
    */
-  public function testViewsUiDropButtonCssClasses() {
+  public function testViewsUiDropButtonCssClasses(): void {
     $this->drupalGet('admin/structure/views/view/who_s_online');
     $assert_session = $this->assertSession();
     $extra_actions_dropbutton_list = $assert_session->elementExists('css', '#views-display-extra-actions.dropbutton--small');
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Theme/OliveroMessagesTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Theme/OliveroMessagesTest.php
index ac880f12223a..6b0472702c0c 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/Theme/OliveroMessagesTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Theme/OliveroMessagesTest.php
@@ -46,7 +46,7 @@ protected function setUp(): void {
   /**
    * Tests data-drupal-selector="messages" exists.
    */
-  public function testDataDrupalSelectors() {
+  public function testDataDrupalSelectors(): void {
     $web_assert = $this->assertSession();
     $this->drupalGet('js_message_test_link');
 
diff --git a/core/tests/Drupal/FunctionalTests/Bootstrap/UncaughtExceptionTest.php b/core/tests/Drupal/FunctionalTests/Bootstrap/UncaughtExceptionTest.php
index 875f7f2bedcf..113371ba5da3 100644
--- a/core/tests/Drupal/FunctionalTests/Bootstrap/UncaughtExceptionTest.php
+++ b/core/tests/Drupal/FunctionalTests/Bootstrap/UncaughtExceptionTest.php
@@ -61,7 +61,7 @@ protected function setUp(): void {
   /**
    * Tests uncaught exception handling when system is in a bad state.
    */
-  public function testUncaughtException() {
+  public function testUncaughtException(): void {
     $this->expectedExceptionMessage = 'Oh oh, bananas in the instruments.';
     \Drupal::state()->set('error_service_test.break_bare_html_renderer', TRUE);
 
@@ -94,7 +94,7 @@ public function testUncaughtException() {
   /**
    * Tests displaying an uncaught fatal error.
    */
-  public function testUncaughtFatalError() {
+  public function testUncaughtFatalError(): void {
     $fatal_error = [
       '%type' => 'TypeError',
       '@message' => 'Drupal\error_test\Controller\ErrorTestController::Drupal\error_test\Controller\{closure}(): Argument #1 ($test) must be of type array, string given, called in ' . \Drupal::root() . '/core/modules/system/tests/modules/error_test/src/Controller/ErrorTestController.php on line 65',
@@ -113,7 +113,7 @@ public function testUncaughtFatalError() {
   /**
    * Tests uncaught exception handling with custom exception handler.
    */
-  public function testUncaughtExceptionCustomExceptionHandler() {
+  public function testUncaughtExceptionCustomExceptionHandler(): void {
     $settings_filename = $this->siteDirectory . '/settings.php';
     chmod($settings_filename, 0777);
     $settings_php = file_get_contents($settings_filename);
@@ -136,7 +136,7 @@ public function testUncaughtExceptionCustomExceptionHandler() {
   /**
    * Tests a missing dependency on a service.
    */
-  public function testMissingDependency() {
+  public function testMissingDependency(): void {
     $this->expectedExceptionMessage = 'Too few arguments to function Drupal\error_service_test\LonelyMonkeyClass::__construct(), 0 passed';
     $this->drupalGet('broken-service-class');
     $this->assertSession()->statusCodeEquals(500);
@@ -149,7 +149,7 @@ public function testMissingDependency() {
   /**
    * Tests a container which has an error.
    */
-  public function testErrorContainer() {
+  public function testErrorContainer(): void {
     $settings = [];
     $settings['settings']['container_base_class'] = (object) [
       'value' => '\Drupal\FunctionalTests\Bootstrap\ErrorContainer',
@@ -169,7 +169,7 @@ public function testErrorContainer() {
   /**
    * Tests a container which has an exception really early.
    */
-  public function testExceptionContainer() {
+  public function testExceptionContainer(): void {
     $settings = [];
     $settings['settings']['container_base_class'] = (object) [
       'value' => '\Drupal\FunctionalTests\Bootstrap\ExceptionContainer',
@@ -190,7 +190,7 @@ public function testExceptionContainer() {
   /**
    * Tests the case when the database connection is gone.
    */
-  public function testLostDatabaseConnection() {
+  public function testLostDatabaseConnection(): void {
     $incorrect_username = $this->randomMachineName(16);
     switch ($this->container->get('database')->driver()) {
       case 'pgsql':
@@ -225,7 +225,7 @@ public function testLostDatabaseConnection() {
   /**
    * Tests fallback to PHP error log when an exception is thrown while logging.
    */
-  public function testLoggerException() {
+  public function testLoggerException(): void {
     // Ensure the test error log is empty before these tests.
     $this->assertNoErrorsLogged();
 
diff --git a/core/tests/Drupal/FunctionalTests/Breadcrumb/Breadcrumb404Test.php b/core/tests/Drupal/FunctionalTests/Breadcrumb/Breadcrumb404Test.php
index c0814dd7b63a..b38a93c25652 100644
--- a/core/tests/Drupal/FunctionalTests/Breadcrumb/Breadcrumb404Test.php
+++ b/core/tests/Drupal/FunctionalTests/Breadcrumb/Breadcrumb404Test.php
@@ -29,7 +29,7 @@ class Breadcrumb404Test extends BrowserTestBase {
   /**
    * Tests that different 404s don't create unnecessary cache entries.
    */
-  public function testBreadcrumbOn404Pages() {
+  public function testBreadcrumbOn404Pages(): void {
     $this->placeBlock('system_breadcrumb_block', ['id' => 'breadcrumb']);
 
     // Prime the cache first.
diff --git a/core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php b/core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php
index 824ad1418a34..1cc4925b1295 100644
--- a/core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php
+++ b/core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php
@@ -47,7 +47,7 @@ class BrowserTestBaseTest extends BrowserTestBase {
   /**
    * Tests that JavaScript Drupal settings can be read.
    */
-  public function testDrupalSettings() {
+  public function testDrupalSettings(): void {
     // Trigger a 403 because those pages have very little else going on.
     $this->drupalGet('admin');
     $this->assertSame([], $this->getDrupalSettings());
@@ -63,7 +63,7 @@ public function testDrupalSettings() {
   /**
    * Tests basic page test.
    */
-  public function testGoTo() {
+  public function testGoTo(): void {
     $account = $this->drupalCreateUser();
     $this->drupalLogin($account);
 
@@ -113,7 +113,7 @@ public function testGoTo() {
   /**
    * Tests drupalGet().
    */
-  public function testDrupalGet() {
+  public function testDrupalGet(): void {
     $this->drupalGet('test-page');
     $this->assertSession()->statusCodeEquals(200);
     $this->assertSession()->addressEquals('test-page');
@@ -141,7 +141,7 @@ public function testDrupalGet() {
   /**
    * Tests basic form functionality.
    */
-  public function testForm() {
+  public function testForm(): void {
     // Ensure the proper response code for a _form route.
     $this->drupalGet('form-test/object-builder');
     $this->assertSession()->statusCodeEquals(200);
@@ -209,7 +209,7 @@ public function testForm() {
   /**
    * Tests clickLink() functionality.
    */
-  public function testClickLink() {
+  public function testClickLink(): void {
     $this->drupalGet('test-page');
     $this->clickLink('Visually identical test links');
     $this->assertStringContainsString('user/login', $this->getSession()->getCurrentUrl());
@@ -221,7 +221,7 @@ public function testClickLink() {
     $this->assertStringContainsString('user/register', $this->getSession()->getCurrentUrl());
   }
 
-  public function testError() {
+  public function testError(): void {
     $this->expectException('\Exception');
     $this->expectExceptionMessage('User notice: foo');
     $this->drupalGet('test-error');
@@ -230,7 +230,7 @@ public function testError() {
   /**
    * Tests legacy field asserts which use xpath directly.
    */
-  public function testXpathAsserts() {
+  public function testXpathAsserts(): void {
     $this->drupalGet('test-field-xpath');
     $this->assertSession()->elementTextContains('xpath', '//table/tbody/tr[2]/td[1]', 'one');
 
@@ -261,7 +261,7 @@ public function testXpathAsserts() {
   /**
    * Tests field asserts using textfields.
    */
-  public function testFieldAssertsForTextfields() {
+  public function testFieldAssertsForTextfields(): void {
     $this->drupalGet('test-field-xpath');
 
     // *** 1. fieldNotExists().
@@ -372,7 +372,7 @@ public function testFieldAssertsForTextfields() {
   /**
    * Tests legacy field asserts for checkbox field type.
    */
-  public function testFieldAssertsForCheckbox() {
+  public function testFieldAssertsForCheckbox(): void {
     $this->drupalGet('test-field-xpath');
 
     // Part 1 - Test by name.
@@ -464,7 +464,7 @@ public function testFieldAssertsForCheckbox() {
   /**
    * Tests the ::cronRun() method.
    */
-  public function testCronRun() {
+  public function testCronRun(): void {
     $last_cron_time = \Drupal::state()->get('system.cron_last');
     $this->cronRun();
     $this->assertSession()->statusCodeEquals(204);
@@ -476,7 +476,7 @@ public function testCronRun() {
   /**
    * Tests the Drupal install done in \Drupal\Tests\BrowserTestBase::setUp().
    */
-  public function testInstall() {
+  public function testInstall(): void {
     $htaccess_filename = $this->tempFilesDirectory . '/.htaccess';
     $this->assertFileExists($htaccess_filename);
 
@@ -487,7 +487,7 @@ public function testInstall() {
   /**
    * Tests the assumption that local time is in 'Australia/Sydney'.
    */
-  public function testLocalTimeZone() {
+  public function testLocalTimeZone(): void {
     $expected = 'Australia/Sydney';
     // The 'Australia/Sydney' time zone is set in core/tests/bootstrap.php
     $this->assertEquals($expected, date_default_timezone_get());
@@ -507,7 +507,7 @@ public function testLocalTimeZone() {
   /**
    * Tests the ::checkForMetaRefresh() method.
    */
-  public function testCheckForMetaRefresh() {
+  public function testCheckForMetaRefresh(): void {
     // Disable following redirects in the client.
     $this->getSession()->getDriver()->getClient()->followRedirects(FALSE);
     // Set the maximumMetaRefreshCount to zero to make sure the redirect doesn't
@@ -522,7 +522,7 @@ public function testCheckForMetaRefresh() {
     $this->assertSession()->pageTextContains('Test page text.');
   }
 
-  public function testGetDefaultDriveInstance() {
+  public function testGetDefaultDriveInstance(): void {
     putenv('MINK_DRIVER_ARGS=' . json_encode([NULL, ['key1' => ['key2' => ['key3' => 3, 'key3.1' => 3.1]]]]));
     $this->getDefaultDriverInstance();
     $this->assertEquals([NULL, ['key1' => ['key2' => ['key3' => 3, 'key3.1' => 3.1]]]], $this->minkDefaultDriverArgs);
@@ -531,7 +531,7 @@ public function testGetDefaultDriveInstance() {
   /**
    * Ensures we can't access modules we shouldn't be able to after install.
    */
-  public function testProfileModules() {
+  public function testProfileModules(): void {
     $this->expectException(\InvalidArgumentException::class);
     $this->expectExceptionMessage('The module demo_umami_content does not exist.');
     $this->assertFileExists('core/profiles/demo_umami/modules/demo_umami_content/demo_umami_content.info.yml');
@@ -541,7 +541,7 @@ public function testProfileModules() {
   /**
    * Tests the protections provided by .htkey.
    */
-  public function testHtKey() {
+  public function testHtKey(): void {
     // Remove the Simpletest private key file so we can test the protection
     // against requests that forge a valid testing user agent to gain access
     // to the installer.
@@ -576,7 +576,7 @@ public function testSessionOnRequest(): void {
    *
    * @see \Drupal\Core\Test\HttpClientMiddleware\TestHttpClientMiddleware::__invoke()
    */
-  public function testDeprecationHeaders() {
+  public function testDeprecationHeaders(): void {
     $this->drupalGet('/test-deprecations');
 
     $deprecation_messages = [];
@@ -603,7 +603,7 @@ public function testDeprecationHeaders() {
   /**
    * Tests the dump() function provided by the var-dumper Symfony component.
    */
-  public function testVarDump() {
+  public function testVarDump(): void {
     // Append the stream capturer to the STDERR stream, so that we can test the
     // dump() output and also prevent it from actually outputting in this
     // particular test.
@@ -638,7 +638,7 @@ public function testVarDump() {
   /**
    * Test if setting an invalid scheme in SIMPLETEST_BASE_URL throws an exception.
    */
-  public function testSimpleTestBaseUrlValidation() {
+  public function testSimpleTestBaseUrlValidation(): void {
     putenv('SIMPLETEST_BASE_URL=mysql://user:pass@localhost/database');
     $this->expectException(\Exception::class);
     $this->expectExceptionMessage('You must provide valid scheme for the SIMPLETEST_BASE_URL environment variable. Valid schema are: http, https.');
diff --git a/core/tests/Drupal/FunctionalTests/BrowserTestBaseUserAgentTest.php b/core/tests/Drupal/FunctionalTests/BrowserTestBaseUserAgentTest.php
index 80de5219b26d..ac65e81abe04 100644
--- a/core/tests/Drupal/FunctionalTests/BrowserTestBaseUserAgentTest.php
+++ b/core/tests/Drupal/FunctionalTests/BrowserTestBaseUserAgentTest.php
@@ -28,7 +28,7 @@ class BrowserTestBaseUserAgentTest extends BrowserTestBase {
   /**
    * Tests validation of the User-Agent header we use to perform test requests.
    */
-  public function testUserAgentValidation() {
+  public function testUserAgentValidation(): void {
     $assert_session = $this->assertSession();
     $system_path = $this->buildUrl(\Drupal::service('extension.list.module')->getPath('system'));
     $http_path = $system_path . '/tests/http.php/user/login';
diff --git a/core/tests/Drupal/FunctionalTests/Core/Container/ServiceDeprecationTest.php b/core/tests/Drupal/FunctionalTests/Core/Container/ServiceDeprecationTest.php
index 43eab184a55a..d441c23d3079 100644
--- a/core/tests/Drupal/FunctionalTests/Core/Container/ServiceDeprecationTest.php
+++ b/core/tests/Drupal/FunctionalTests/Core/Container/ServiceDeprecationTest.php
@@ -33,7 +33,7 @@ class ServiceDeprecationTest extends BrowserTestBase {
   /**
    * @covers ::get
    */
-  public function testGetDeprecated() {
+  public function testGetDeprecated(): void {
     $this->expectDeprecation('The "deprecation_test.service" service is deprecated in drupal:9.0.0 and is removed from drupal:20.0.0. This is a test.');
     $this->expectDeprecation('The "deprecation_test.alias" alias is deprecated in drupal:9.0.0 and is removed from drupal:20.0.0. This is a test.');
     // @phpstan-ignore-next-line
diff --git a/core/tests/Drupal/FunctionalTests/Core/Test/ModuleInstallBatchTest.php b/core/tests/Drupal/FunctionalTests/Core/Test/ModuleInstallBatchTest.php
index 732df7743d13..a229a5d183e8 100644
--- a/core/tests/Drupal/FunctionalTests/Core/Test/ModuleInstallBatchTest.php
+++ b/core/tests/Drupal/FunctionalTests/Core/Test/ModuleInstallBatchTest.php
@@ -33,7 +33,7 @@ class ModuleInstallBatchTest extends BrowserTestBase {
   /**
    * Tests loading entities created in a batch in test_batch_test_install().
    */
-  public function testLoadingEntitiesCreatedInBatch() {
+  public function testLoadingEntitiesCreatedInBatch(): void {
     foreach ([1, 2] as $id) {
       $this->assertNotNull(EntityTest::load($id), 'Successfully loaded entity ' . $id);
     }
diff --git a/core/tests/Drupal/FunctionalTests/Core/Test/PhpUnitBridgeTest.php b/core/tests/Drupal/FunctionalTests/Core/Test/PhpUnitBridgeTest.php
index a674fa7a8a5f..c306529a02ed 100644
--- a/core/tests/Drupal/FunctionalTests/Core/Test/PhpUnitBridgeTest.php
+++ b/core/tests/Drupal/FunctionalTests/Core/Test/PhpUnitBridgeTest.php
@@ -25,7 +25,7 @@ class PhpUnitBridgeTest extends BrowserTestBase {
   /**
    * Tests deprecation message from deprecation_test_function().
    */
-  public function testSilencedError() {
+  public function testSilencedError(): void {
     $this->expectDeprecation('This is the deprecation message for deprecation_test_function().');
     $this->assertEquals('known_return_value', deprecation_test_function());
   }
@@ -33,7 +33,7 @@ public function testSilencedError() {
   /**
    * Tests deprecation message from deprecated route.
    */
-  public function testErrorOnSiteUnderTest() {
+  public function testErrorOnSiteUnderTest(): void {
     $this->expectDeprecation('This is the deprecation message for deprecation_test_function().');
     $this->drupalGet(Url::fromRoute('deprecation_test.route'));
   }
diff --git a/core/tests/Drupal/FunctionalTests/Datetime/TimestampAgoFormatterTest.php b/core/tests/Drupal/FunctionalTests/Datetime/TimestampAgoFormatterTest.php
index 12d5fba27767..57b4191a7fd0 100644
--- a/core/tests/Drupal/FunctionalTests/Datetime/TimestampAgoFormatterTest.php
+++ b/core/tests/Drupal/FunctionalTests/Datetime/TimestampAgoFormatterTest.php
@@ -104,7 +104,7 @@ protected function setUp(): void {
   /**
    * Tests the formatter settings.
    */
-  public function testSettings() {
+  public function testSettings(): void {
     $this->drupalGet('entity_test/structure/entity_test/display');
 
     $edit = [
diff --git a/core/tests/Drupal/FunctionalTests/Datetime/TimestampTest.php b/core/tests/Drupal/FunctionalTests/Datetime/TimestampTest.php
index 81383c79f57a..d7e8a2342e16 100644
--- a/core/tests/Drupal/FunctionalTests/Datetime/TimestampTest.php
+++ b/core/tests/Drupal/FunctionalTests/Datetime/TimestampTest.php
@@ -106,7 +106,7 @@ protected function setUp(): void {
   /**
    * Tests the "datetime_timestamp" widget.
    */
-  public function testWidget() {
+  public function testWidget(): void {
     // Build up a date in the UTC timezone.
     $value = '2012-12-31 00:00:00';
     $date = new DrupalDateTime($value, 'UTC');
diff --git a/core/tests/Drupal/FunctionalTests/Entity/ContentEntityFormCorrectUserInputMappingOnFieldDeltaElementsTest.php b/core/tests/Drupal/FunctionalTests/Entity/ContentEntityFormCorrectUserInputMappingOnFieldDeltaElementsTest.php
index 87833a8b8bd7..2109cf1a1b1a 100644
--- a/core/tests/Drupal/FunctionalTests/Entity/ContentEntityFormCorrectUserInputMappingOnFieldDeltaElementsTest.php
+++ b/core/tests/Drupal/FunctionalTests/Entity/ContentEntityFormCorrectUserInputMappingOnFieldDeltaElementsTest.php
@@ -78,7 +78,7 @@ protected function setUp(): void {
   /**
    * Tests the correct user input mapping on complex fields.
    */
-  public function testCorrectUserInputMappingOnComplexFields() {
+  public function testCorrectUserInputMappingOnComplexFields(): void {
     /** @var \Drupal\Core\Entity\ContentEntityStorageInterface $storage */
     $storage = $this->container->get('entity_type.manager')->getStorage($this->entityTypeId);
 
diff --git a/core/tests/Drupal/FunctionalTests/Entity/ContentEntityFormFieldValidationFilteringTest.php b/core/tests/Drupal/FunctionalTests/Entity/ContentEntityFormFieldValidationFilteringTest.php
index b299c82a8906..7108b212bf11 100644
--- a/core/tests/Drupal/FunctionalTests/Entity/ContentEntityFormFieldValidationFilteringTest.php
+++ b/core/tests/Drupal/FunctionalTests/Entity/ContentEntityFormFieldValidationFilteringTest.php
@@ -130,7 +130,7 @@ protected function setUp(): void {
   /**
    * Tests field widgets with #limit_validation_errors.
    */
-  public function testFieldWidgetsWithLimitedValidationErrors() {
+  public function testFieldWidgetsWithLimitedValidationErrors(): void {
     $assert_session = $this->assertSession();
     $this->drupalGet($this->entityTypeId . '/add');
 
diff --git a/core/tests/Drupal/FunctionalTests/Entity/DeleteMultipleFormTest.php b/core/tests/Drupal/FunctionalTests/Entity/DeleteMultipleFormTest.php
index 3afa1e01caa4..e40b5fee04c9 100644
--- a/core/tests/Drupal/FunctionalTests/Entity/DeleteMultipleFormTest.php
+++ b/core/tests/Drupal/FunctionalTests/Entity/DeleteMultipleFormTest.php
@@ -57,7 +57,7 @@ protected function setUp(): void {
   /**
    * Tests the delete form for translatable entities.
    */
-  public function testTranslatableEntities() {
+  public function testTranslatableEntities(): void {
     ConfigurableLanguage::createFromLangcode('es')->save();
     ConfigurableLanguage::createFromLangcode('fr')->save();
 
@@ -117,7 +117,7 @@ public function testTranslatableEntities() {
   /**
    * Tests the delete form for untranslatable entities.
    */
-  public function testUntranslatableEntities() {
+  public function testUntranslatableEntities(): void {
     $selection = [];
 
     $entity1 = EntityTestRev::create(['type' => 'default', 'name' => 'entity1']);
diff --git a/core/tests/Drupal/FunctionalTests/Entity/EntityBundleListCacheTest.php b/core/tests/Drupal/FunctionalTests/Entity/EntityBundleListCacheTest.php
index aa5d0fbaacb1..d81ccf2a3dcb 100644
--- a/core/tests/Drupal/FunctionalTests/Entity/EntityBundleListCacheTest.php
+++ b/core/tests/Drupal/FunctionalTests/Entity/EntityBundleListCacheTest.php
@@ -49,7 +49,7 @@ protected function setUp(): void {
   /**
    * Tests that tags are invalidated when an entity with that bundle changes.
    */
-  public function testBundleListingCache() {
+  public function testBundleListingCache(): void {
     // Access to lists of test entities with each bundle.
     $bundle_a_url = Url::fromRoute('cache_test_list.bundle_tags', ['entity_type_id' => 'entity_test_with_bundle', 'bundle' => 'bundle_a']);
     $bundle_b_url = Url::fromRoute('cache_test_list.bundle_tags', ['entity_type_id' => 'entity_test_with_bundle', 'bundle' => 'bundle_b']);
diff --git a/core/tests/Drupal/FunctionalTests/ExistingDrupal8StyleDatabaseConnectionInSettingsPhpTest.php b/core/tests/Drupal/FunctionalTests/ExistingDrupal8StyleDatabaseConnectionInSettingsPhpTest.php
index 2989a378b397..01c694b4ef4b 100644
--- a/core/tests/Drupal/FunctionalTests/ExistingDrupal8StyleDatabaseConnectionInSettingsPhpTest.php
+++ b/core/tests/Drupal/FunctionalTests/ExistingDrupal8StyleDatabaseConnectionInSettingsPhpTest.php
@@ -57,7 +57,7 @@ protected function setUp(): void {
   /**
    * Confirms that the site works with Drupal 8 style database connection array.
    */
-  public function testExistingDrupal8StyleDatabaseConnectionInSettingsPhp() {
+  public function testExistingDrupal8StyleDatabaseConnectionInSettingsPhp(): void {
     $this->drupalLogin($this->drupalCreateUser());
     $this->assertSession()->addressEquals('user/2');
     $this->assertSession()->statusCodeEquals(200);
@@ -75,7 +75,7 @@ public function testExistingDrupal8StyleDatabaseConnectionInSettingsPhp() {
   /**
    * Confirms that the replica database connection works.
    */
-  public function testReplicaDrupal8StyleDatabaseConnectionInSettingsPhp() {
+  public function testReplicaDrupal8StyleDatabaseConnectionInSettingsPhp(): void {
     $this->drupalLogin($this->drupalCreateUser());
 
     $replica = Database::getConnection('replica', 'default');
diff --git a/core/tests/Drupal/FunctionalTests/FolderTest.php b/core/tests/Drupal/FunctionalTests/FolderTest.php
index 131d1c0c053e..1f1674306a66 100644
--- a/core/tests/Drupal/FunctionalTests/FolderTest.php
+++ b/core/tests/Drupal/FunctionalTests/FolderTest.php
@@ -27,7 +27,7 @@ class FolderTest extends BrowserTestBase {
    */
   protected $defaultTheme = 'stark';
 
-  public function testFolderSetup() {
+  public function testFolderSetup(): void {
     $directory = 'public://styles';
     $this->assertTrue(\Drupal::service('file_system')->prepareDirectory($directory, FALSE), 'Directory created.');
   }
diff --git a/core/tests/Drupal/FunctionalTests/GetTestMethodCallerExtendsTest.php b/core/tests/Drupal/FunctionalTests/GetTestMethodCallerExtendsTest.php
index 1fc66bb0b71b..f65c4951c0d2 100644
--- a/core/tests/Drupal/FunctionalTests/GetTestMethodCallerExtendsTest.php
+++ b/core/tests/Drupal/FunctionalTests/GetTestMethodCallerExtendsTest.php
@@ -21,7 +21,7 @@ class GetTestMethodCallerExtendsTest extends GetTestMethodCallerTest {
   /**
    * A test method that is not present in the parent class.
    */
-  public function testGetTestMethodCallerChildClass() {
+  public function testGetTestMethodCallerChildClass(): void {
     $method_caller = $this->getTestMethodCaller();
     $expected = [
       'file' => __FILE__,
diff --git a/core/tests/Drupal/FunctionalTests/GetTestMethodCallerTest.php b/core/tests/Drupal/FunctionalTests/GetTestMethodCallerTest.php
index 51a61a7d83ba..3966ebfe387b 100644
--- a/core/tests/Drupal/FunctionalTests/GetTestMethodCallerTest.php
+++ b/core/tests/Drupal/FunctionalTests/GetTestMethodCallerTest.php
@@ -21,7 +21,7 @@ class GetTestMethodCallerTest extends BrowserTestBase {
   /**
    * Tests BrowserTestBase::getTestMethodCaller().
    */
-  public function testGetTestMethodCaller() {
+  public function testGetTestMethodCaller(): void {
     $method_caller = $this->getTestMethodCaller();
     $expected = [
       'file' => __FILE__,
diff --git a/core/tests/Drupal/FunctionalTests/HttpKernel/CorsIntegrationTest.php b/core/tests/Drupal/FunctionalTests/HttpKernel/CorsIntegrationTest.php
index 84d7f5c5230a..07f7380a2340 100644
--- a/core/tests/Drupal/FunctionalTests/HttpKernel/CorsIntegrationTest.php
+++ b/core/tests/Drupal/FunctionalTests/HttpKernel/CorsIntegrationTest.php
@@ -28,7 +28,7 @@ class CorsIntegrationTest extends BrowserTestBase {
    */
   protected $defaultTheme = 'stark';
 
-  public function testCrossSiteRequest() {
+  public function testCrossSiteRequest(): void {
     // Test default parameters.
     $cors_config = $this->container->getParameter('cors.config');
     $this->assertFalse($cors_config['enabled']);
diff --git a/core/tests/Drupal/FunctionalTests/Image/ToolkitSetupFormTest.php b/core/tests/Drupal/FunctionalTests/Image/ToolkitSetupFormTest.php
index 2c2fac2822aa..3e6ebe4e2aba 100644
--- a/core/tests/Drupal/FunctionalTests/Image/ToolkitSetupFormTest.php
+++ b/core/tests/Drupal/FunctionalTests/Image/ToolkitSetupFormTest.php
@@ -46,7 +46,7 @@ protected function setUp(): void {
   /**
    * Tests Image toolkit setup form.
    */
-  public function testToolkitSetupForm() {
+  public function testToolkitSetupForm(): void {
     // Get form.
     $this->drupalGet('admin/config/media/image-toolkit');
 
diff --git a/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileExistingSettingsTest.php b/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileExistingSettingsTest.php
index 3000e3927176..ae9645dd0bd0 100644
--- a/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileExistingSettingsTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileExistingSettingsTest.php
@@ -115,7 +115,7 @@ protected function setUpSettings() {
   /**
    * Confirms that the installation succeeded.
    */
-  public function testInstalled() {
+  public function testInstalled(): void {
     $this->assertSession()->addressEquals('user/1');
     $this->assertSession()->statusCodeEquals(200);
     // Confirm that we are logged-in after installation.
diff --git a/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileTest.php b/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileTest.php
index 91ef89b3063f..fbbe1b2728ec 100644
--- a/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileTest.php
@@ -72,7 +72,7 @@ protected function setUpProfile() {
   /**
    * Confirms that the installation succeeded.
    */
-  public function testInstalled() {
+  public function testInstalled(): void {
     $this->assertSession()->addressEquals('root-user');
     $this->assertSession()->statusCodeEquals(200);
     // Confirm that we are logged-in after installation.
diff --git a/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileTranslationQueryTest.php b/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileTranslationQueryTest.php
index 3b3b1cfac89c..b895f7caa4b4 100644
--- a/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileTranslationQueryTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileTranslationQueryTest.php
@@ -111,7 +111,7 @@ protected function setUpSettings() {
   /**
    * Confirms that the installation succeeded.
    */
-  public function testInstalled() {
+  public function testInstalled(): void {
     $this->assertSession()->addressEquals('user/1');
     $this->assertSession()->statusCodeEquals(200);
 
diff --git a/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileTranslationTest.php b/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileTranslationTest.php
index 3e5124d4da18..0dd028e5ad05 100644
--- a/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileTranslationTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileTranslationTest.php
@@ -101,7 +101,7 @@ protected function setUpSettings() {
   /**
    * Confirms that the installation succeeded.
    */
-  public function testInstalled() {
+  public function testInstalled(): void {
     $this->assertSession()->addressEquals('user/1');
     $this->assertSession()->statusCodeEquals(200);
 
diff --git a/core/tests/Drupal/FunctionalTests/Installer/DrupalFlushAllCachesInInstallerTest.php b/core/tests/Drupal/FunctionalTests/Installer/DrupalFlushAllCachesInInstallerTest.php
index a0a9a0d50460..fd868ee97b5c 100644
--- a/core/tests/Drupal/FunctionalTests/Installer/DrupalFlushAllCachesInInstallerTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/DrupalFlushAllCachesInInstallerTest.php
@@ -56,7 +56,7 @@ function cache_flush_test_install() {
   /**
    * Confirms that the installation succeeded.
    */
-  public function testInstalled() {
+  public function testInstalled(): void {
     $this->assertTrue(\Drupal::state()->get('cache_flush_test'));
   }
 
diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallProfileDependenciesTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallProfileDependenciesTest.php
index 7087cecf8fc7..942555323bea 100644
--- a/core/tests/Drupal/FunctionalTests/Installer/InstallProfileDependenciesTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/InstallProfileDependenciesTest.php
@@ -27,7 +27,7 @@ class InstallProfileDependenciesTest extends BrowserTestBase {
   /**
    * Tests that an install profile can require modules.
    */
-  public function testUninstallingModules() {
+  public function testUninstallingModules(): void {
     $user = $this->drupalCreateUser(['administer modules']);
     $this->drupalLogin($user);
     $this->drupalGet('admin/modules/uninstall');
diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerBrokenDatabaseCredentialsTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerBrokenDatabaseCredentialsTest.php
index df46df638f9a..aa80899b8269 100644
--- a/core/tests/Drupal/FunctionalTests/Installer/InstallerBrokenDatabaseCredentialsTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerBrokenDatabaseCredentialsTest.php
@@ -56,7 +56,7 @@ protected function setUpSite() {
   /**
    * Tests the expected requirements problem.
    */
-  public function testRequirementsProblem() {
+  public function testRequirementsProblem(): void {
     $this->assertSession()->titleEquals('Requirements problem | Drupal');
     $this->assertSession()->pageTextContains('Database settings');
     $this->assertSession()->pageTextContains('Resolve all issues below to continue the installation. For help configuring your database server,');
diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerBrokenDatabasePortSettingsTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerBrokenDatabasePortSettingsTest.php
index 3f9764088868..6c706832f060 100644
--- a/core/tests/Drupal/FunctionalTests/Installer/InstallerBrokenDatabasePortSettingsTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerBrokenDatabasePortSettingsTest.php
@@ -56,7 +56,7 @@ protected function setUpSite() {
   /**
    * Tests the expected requirements problem.
    */
-  public function testRequirementsProblem() {
+  public function testRequirementsProblem(): void {
     $this->assertSession()->titleEquals('Requirements problem | Drupal');
     $this->assertSession()->pageTextContains('Database settings');
     $this->assertSession()->pageTextContains('Resolve all issues below to continue the installation. For help configuring your database server,');
diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerConfigDirectorySetNoDirectoryErrorTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerConfigDirectorySetNoDirectoryErrorTest.php
index 99a2524787bc..b38dc25af6f7 100644
--- a/core/tests/Drupal/FunctionalTests/Installer/InstallerConfigDirectorySetNoDirectoryErrorTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerConfigDirectorySetNoDirectoryErrorTest.php
@@ -69,7 +69,7 @@ protected function setUpSite() {
   /**
    * Verifies that installation failed.
    */
-  public function testError() {
+  public function testError(): void {
     $this->assertSession()->pageTextContains("An automated attempt to create the directory {$this->configDirectory}/sync failed, possibly due to a permissions problem.");
     $this->assertDirectoryDoesNotExist($this->configDirectory . '/sync');
   }
diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerConfigDirectorySetNoDirectoryTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerConfigDirectorySetNoDirectoryTest.php
index 8ebed8eb4c4a..b8149ee65293 100644
--- a/core/tests/Drupal/FunctionalTests/Installer/InstallerConfigDirectorySetNoDirectoryTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerConfigDirectorySetNoDirectoryTest.php
@@ -40,7 +40,7 @@ protected function prepareEnvironment() {
   /**
    * Verifies that installation succeeded.
    */
-  public function testInstaller() {
+  public function testInstaller(): void {
     $this->assertSession()->addressEquals('user/1');
     $this->assertSession()->statusCodeEquals(200);
     $this->assertDirectoryExists($this->syncDirectory);
diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerDatabaseErrorMessagesTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerDatabaseErrorMessagesTest.php
index 441d2fa00035..ab7258b4beb8 100644
--- a/core/tests/Drupal/FunctionalTests/Installer/InstallerDatabaseErrorMessagesTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerDatabaseErrorMessagesTest.php
@@ -50,7 +50,7 @@ protected function setUpSite() {
   /**
    * Verifies that the error message in the settings step is correct.
    */
-  public function testSetUpSettingsErrorMessage() {
+  public function testSetUpSettingsErrorMessage(): void {
     $this->assertSession()->responseContains('<ul><li>Failed to <strong>CREATE</strong> a test table');
   }
 
diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerEmptySettingsTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerEmptySettingsTest.php
index d158e865e8b2..1b2ee2cb2490 100644
--- a/core/tests/Drupal/FunctionalTests/Installer/InstallerEmptySettingsTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerEmptySettingsTest.php
@@ -29,7 +29,7 @@ protected function prepareEnvironment() {
   /**
    * Verifies that installation succeeded.
    */
-  public function testInstaller() {
+  public function testInstaller(): void {
     $this->assertSession()->addressEquals('user/1');
     $this->assertSession()->statusCodeEquals(200);
   }
diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingBrokenDatabaseSettingsTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingBrokenDatabaseSettingsTest.php
index 771e88ea99d5..636300b14482 100644
--- a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingBrokenDatabaseSettingsTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingBrokenDatabaseSettingsTest.php
@@ -73,7 +73,7 @@ protected function setUpSite() {
   /**
    * Tests the expected requirements problem.
    */
-  public function testRequirementsProblem() {
+  public function testRequirementsProblem(): void {
     $this->assertSession()->titleEquals('Requirements problem | Drupal');
     $this->assertSession()->pageTextContains('Database settings');
     $this->assertSession()->pageTextContains('Resolve all issues below to continue the installation. For help configuring your database server,');
diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigDirectoryTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigDirectoryTest.php
index 227f73e09db5..e391e0f66924 100644
--- a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigDirectoryTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigDirectoryTest.php
@@ -39,7 +39,7 @@ protected function prepareEnvironment() {
   /**
    * Verifies that installation succeeded.
    */
-  public function testInstaller() {
+  public function testInstaller(): void {
     $this->assertSession()->addressEquals('user/1');
     $this->assertSession()->statusCodeEquals(200);
     $this->assertEquals($this->expectedFilePerms, fileperms($this->siteDirectory . '/config_read_only'));
diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigMultilingualTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigMultilingualTest.php
index a02e75213b46..7b534dd06baa 100644
--- a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigMultilingualTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigMultilingualTest.php
@@ -28,7 +28,7 @@ protected function getConfigTarball() {
   /**
    * {@inheritdoc}
    */
-  public function testConfigSync() {
+  public function testConfigSync(): void {
     parent::testConfigSync();
 
     // Ensure no warning, error, critical, alert or emergency messages have been
diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigNoConfigTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigNoConfigTest.php
index 5fbdfd9d9b29..25d9287b3e37 100644
--- a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigNoConfigTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigNoConfigTest.php
@@ -35,7 +35,7 @@ protected function getConfigTarball() {
   /**
    * Tests that profiles with an empty config/sync directory do not work.
    */
-  public function testConfigSync() {
+  public function testConfigSync(): void {
     $this->assertSession()->titleEquals('Configuration validation | Drupal');
     $this->assertSession()->pageTextContains('The configuration synchronization failed validation.');
     $this->assertSession()->pageTextContains('This import is empty and if applied would delete all of your configuration, so has been rejected.');
diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigNoSystemSiteTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigNoSystemSiteTest.php
index 02328983ca65..68aaa6282a0d 100644
--- a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigNoSystemSiteTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigNoSystemSiteTest.php
@@ -30,7 +30,7 @@ public function setUpSite() {
   /**
    * Tests that profiles with no system.site do not work.
    */
-  public function testConfigSync() {
+  public function testConfigSync(): void {
     $this->htmlOutput(NULL);
     $this->assertSession()->titleEquals('Configuration validation | Drupal');
     $this->assertSession()->pageTextContains('The configuration synchronization failed validation.');
diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigProfileHookInstall.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigProfileHookInstall.php
index 838e91e51245..d4283e8510ac 100644
--- a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigProfileHookInstall.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigProfileHookInstall.php
@@ -64,7 +64,7 @@ protected function getConfigTarball() {
   /**
    * Confirms the installation has failed and the expected error is displayed.
    */
-  public function testConfigSync() {
+  public function testConfigSync(): void {
     $this->assertSession()->titleEquals('Requirements problem | Drupal');
     $this->assertSession()->pageTextContains($this->profile);
     $this->assertSession()->pageTextContains('The selected profile has a hook_install() implementation and therefore can not be installed from configuration.');
diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigSyncDirectoryMultilingualTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigSyncDirectoryMultilingualTest.php
index 52e3ebe5a428..b998e8eafd53 100644
--- a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigSyncDirectoryMultilingualTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigSyncDirectoryMultilingualTest.php
@@ -65,7 +65,7 @@ protected function prepareEnvironment() {
   /**
    * Confirms that the installation installed the configuration correctly.
    */
-  public function testConfigSync() {
+  public function testConfigSync(): void {
     $comparer = $this->configImporter()->getStorageComparer();
     $expected_changelist_default_collection = [
       'create' => [],
diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigSyncDirectoryProfileHookInstall.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigSyncDirectoryProfileHookInstall.php
index 5d00a77adb14..8c16ee969328 100644
--- a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigSyncDirectoryProfileHookInstall.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigSyncDirectoryProfileHookInstall.php
@@ -81,7 +81,7 @@ protected function getConfigTarball() {
   /**
    * Tests installing from config is not available due to hook_INSTALL().
    */
-  public function testConfigSync() {
+  public function testConfigSync(): void {
     $this->assertSession()->titleEquals('Select an installation profile | Drupal');
     $this->assertSession()->responseNotContains('Use existing configuration');
 
diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigSyncDirectoryProfileMismatchTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigSyncDirectoryProfileMismatchTest.php
index dac5d25219e9..fd7ade39a46c 100644
--- a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigSyncDirectoryProfileMismatchTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigSyncDirectoryProfileMismatchTest.php
@@ -49,7 +49,7 @@ protected function setUpSite() {
   /**
    * Tests that profile mismatch fails to install.
    */
-  public function testConfigSync() {
+  public function testConfigSync(): void {
     $this->htmlOutput(NULL);
     $this->assertSession()->titleEquals('Configuration validation | Drupal');
     $this->assertSession()->pageTextContains('The configuration synchronization failed validation.');
diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigTestBase.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigTestBase.php
index e3d42fe68f03..4404c0fa117d 100644
--- a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigTestBase.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigTestBase.php
@@ -134,7 +134,7 @@ protected function installParameters() {
   /**
    * Confirms that the installation installed the configuration correctly.
    */
-  public function testConfigSync() {
+  public function testConfigSync(): void {
     // After installation there is no snapshot and nothing to import.
     $change_list = $this->configImporter()->getStorageComparer()->getChangelist();
     $expected = [
diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingDatabaseSettingsTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingDatabaseSettingsTest.php
index 5e1ca85dc990..7d896c1e1d29 100644
--- a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingDatabaseSettingsTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingDatabaseSettingsTest.php
@@ -59,7 +59,7 @@ protected function setUpSettings() {
   /**
    * Verifies that installation succeeded.
    */
-  public function testInstaller() {
+  public function testInstaller(): void {
     $this->assertSession()->addressEquals('user/1');
     $this->assertSession()->statusCodeEquals(200);
   }
diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingInstallationTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingInstallationTest.php
index 9ee4a4b691f3..a932da76d33b 100644
--- a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingInstallationTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingInstallationTest.php
@@ -19,7 +19,7 @@ class InstallerExistingInstallationTest extends InstallerTestBase {
   /**
    * Tests that Drupal fails to install when there is an existing installation.
    */
-  public function testInstaller() {
+  public function testInstaller(): void {
     // Verify that Drupal can't be immediately reinstalled.
     $this->visitInstaller();
     $this->assertSession()->pageTextContains('Drupal already installed');
diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingSettingsNoProfileTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingSettingsNoProfileTest.php
index cf7813321c6f..03dc683e43c1 100644
--- a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingSettingsNoProfileTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingSettingsNoProfileTest.php
@@ -65,7 +65,7 @@ protected function setUpSettings() {
   /**
    * Verifies that installation succeeded.
    */
-  public function testInstaller() {
+  public function testInstaller(): void {
     $this->assertSession()->addressEquals('user/1');
     $this->assertSession()->statusCodeEquals(200);
     $this->assertEquals('testing', \Drupal::installProfile());
diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingSettingsTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingSettingsTest.php
index 4425352b4be8..8a44b6b70e68 100644
--- a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingSettingsTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingSettingsTest.php
@@ -78,7 +78,7 @@ protected function setUpSettings() {
   /**
    * Verifies that installation succeeded.
    */
-  public function testInstaller() {
+  public function testInstaller(): void {
     $this->assertSession()->addressEquals('user/1');
     $this->assertSession()->statusCodeEquals(200);
     $this->assertEquals('testing', \Drupal::installProfile());
diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerLanguageDirectionTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerLanguageDirectionTest.php
index 7935aaf03a40..81dc3d974f73 100644
--- a/core/tests/Drupal/FunctionalTests/Installer/InstallerLanguageDirectionTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerLanguageDirectionTest.php
@@ -44,7 +44,7 @@ protected function setUpLanguage() {
   /**
    * Confirms that the installation succeeded.
    */
-  public function testInstalled() {
+  public function testInstalled(): void {
     $this->assertSession()->addressEquals('user/1');
     $this->assertSession()->statusCodeEquals(200);
   }
diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerLanguagePageTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerLanguagePageTest.php
index 1338991438aa..a1e1c1597dd5 100644
--- a/core/tests/Drupal/FunctionalTests/Installer/InstallerLanguagePageTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerLanguagePageTest.php
@@ -45,7 +45,7 @@ protected function setUpLanguage() {
   /**
    * Confirms that the installation succeeded.
    */
-  public function testInstalled() {
+  public function testInstalled(): void {
     $this->assertSession()->addressEquals('user/1');
     $this->assertSession()->statusCodeEquals(200);
   }
diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerNonDefaultDatabaseDriverTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerNonDefaultDatabaseDriverTest.php
index a0ddc15b33ce..d15135cdbd06 100644
--- a/core/tests/Drupal/FunctionalTests/Installer/InstallerNonDefaultDatabaseDriverTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerNonDefaultDatabaseDriverTest.php
@@ -57,7 +57,7 @@ protected function setUpSettings() {
   /**
    * Confirms that the installation succeeded.
    */
-  public function testInstalled() {
+  public function testInstalled(): void {
     $this->assertSession()->addressEquals('user/1');
     $this->assertSession()->statusCodeEquals(200);
 
diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerNonEnglishProfileWithoutLocaleModuleTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerNonEnglishProfileWithoutLocaleModuleTest.php
index aa395890a6b7..b5152b56e694 100644
--- a/core/tests/Drupal/FunctionalTests/Installer/InstallerNonEnglishProfileWithoutLocaleModuleTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerNonEnglishProfileWithoutLocaleModuleTest.php
@@ -61,7 +61,7 @@ protected function prepareEnvironment() {
   /**
    * Tests installing a profile with non-English language and no locale module.
    */
-  public function testNonEnglishProfileWithoutLocaleModule() {
+  public function testNonEnglishProfileWithoutLocaleModule(): void {
     $this->assertSession()->statusCodeEquals(200);
     $this->assertSession()->addressEquals('user/1');
     // Confirm that we are logged-in after installation.
diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerPerformanceTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerPerformanceTest.php
index 8769c8ccbc43..37622c5e2823 100644
--- a/core/tests/Drupal/FunctionalTests/Installer/InstallerPerformanceTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerPerformanceTest.php
@@ -36,7 +36,7 @@ protected function prepareSettings() {
   /**
    * Ensures that the user page is available after installation.
    */
-  public function testInstaller() {
+  public function testInstaller(): void {
     // Ensures that router is not rebuilt unnecessarily during the install.
     // Currently it is built once during the install in install_finished().
     $this->assertSame(1, \Drupal::service('core.performance.test.recorder')->getCount('event', RoutingEvents::FINISHED));
diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerPostInstallTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerPostInstallTest.php
index 1e62de937c6a..f527f52ece05 100644
--- a/core/tests/Drupal/FunctionalTests/Installer/InstallerPostInstallTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerPostInstallTest.php
@@ -24,7 +24,7 @@ class InstallerPostInstallTest extends InstallerTestBase {
   /**
    * Confirms that visiting the installer does not break things post-install.
    */
-  public function testVisitInstallerPostInstall() {
+  public function testVisitInstallerPostInstall(): void {
     \Drupal::service('module_installer')->install(['system_test']);
     // Clear caches to ensure that system_test's routes are available.
     $this->resetAll();
diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerProfileRequirementsTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerProfileRequirementsTest.php
index 8fc1d041dfc9..f69a5ff0bb2d 100644
--- a/core/tests/Drupal/FunctionalTests/Installer/InstallerProfileRequirementsTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerProfileRequirementsTest.php
@@ -47,7 +47,7 @@ protected function setUpSite() {
   /**
    * Assert that the profile failed hook_requirements().
    */
-  public function testHookRequirementsFailure() {
+  public function testHookRequirementsFailure(): void {
     $this->assertSession()->pageTextContains('Testing requirements failed requirements.');
   }
 
diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerRouterTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerRouterTest.php
index 41839effe111..127ef7f919ef 100644
--- a/core/tests/Drupal/FunctionalTests/Installer/InstallerRouterTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerRouterTest.php
@@ -52,7 +52,7 @@ protected function prepareEnvironment() {
   /**
    * Confirms that the installation succeeded.
    */
-  public function testInstalled() {
+  public function testInstalled(): void {
     $this->assertSession()->statusCodeEquals(200);
     // Ensures that router is not rebuilt unnecessarily during the install. It
     // is rebuilt during:
diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerSiteConfigProfileTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerSiteConfigProfileTest.php
index 5c46d446e528..7da75723dd41 100644
--- a/core/tests/Drupal/FunctionalTests/Installer/InstallerSiteConfigProfileTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerSiteConfigProfileTest.php
@@ -61,7 +61,7 @@ protected function setUpSite() {
   /**
    * Verify the correct site config was set.
    */
-  public function testInstaller() {
+  public function testInstaller(): void {
     $this->assertEquals(self::EXPECTED_SITE_MAIL, $this->config('system.site')->get('mail'));
     $this->assertEquals(self::EXPECTED_TIMEZONE, $this->config('system.date')->get('timezone.default'));
   }
diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerSkipPermissionHardeningTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerSkipPermissionHardeningTest.php
index 74750099f304..fe585c118f4d 100644
--- a/core/tests/Drupal/FunctionalTests/Installer/InstallerSkipPermissionHardeningTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerSkipPermissionHardeningTest.php
@@ -40,7 +40,7 @@ protected function setUpSite() {
   /**
    * Verifies the expected behaviors of the installation result.
    */
-  public function testInstalled() {
+  public function testInstalled(): void {
     $this->assertSession()->addressEquals('user/1');
     $this->assertSession()->statusCodeEquals(200);
   }
diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerTest.php
index d70cf621e314..2793e16c9ef4 100644
--- a/core/tests/Drupal/FunctionalTests/Installer/InstallerTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerTest.php
@@ -26,7 +26,7 @@ class InstallerTest extends InstallerTestBase {
   /**
    * Ensures that the user page is available after installation.
    */
-  public function testInstaller() {
+  public function testInstaller(): void {
     $this->assertNotEquals('0', \Drupal::service('asset.query_string')->get(), 'The dummy query string should be set during install');
     $this->assertSession()->addressEquals('user/1');
     $this->assertSession()->statusCodeEquals(200);
@@ -127,7 +127,7 @@ protected function visitInstaller() {
   /**
    * Confirms that the installation succeeded.
    */
-  public function testInstalled() {
+  public function testInstalled(): void {
     $this->assertSession()->addressEquals('user/1');
     $this->assertSession()->statusCodeEquals(200);
 
diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerThemesBlocksProfileTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerThemesBlocksProfileTest.php
index 8418b92566d6..116028ecd4c0 100644
--- a/core/tests/Drupal/FunctionalTests/Installer/InstallerThemesBlocksProfileTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerThemesBlocksProfileTest.php
@@ -26,7 +26,7 @@ class InstallerThemesBlocksProfileTest extends InstallerTestBase {
   /**
    * Verify that there is no automatic block generation.
    */
-  public function testInstaller() {
+  public function testInstaller(): void {
 
     // Account menu is a block that testing_theme_required_blocks provides,
     // but not testing_theme_optional_blocks. There shouldn't be a account menu
diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationExistingFileTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationExistingFileTest.php
index 9c2c4a2a4ea0..77d4153f7d04 100644
--- a/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationExistingFileTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationExistingFileTest.php
@@ -80,7 +80,7 @@ protected function setUpSite() {
   /**
    * Ensures language selection has not failed.
    */
-  public function testInstall() {
+  public function testInstall(): void {
     // At this point we'll be on the profile selection or requirements screen.
     $this->assertSession()->statusCodeEquals(200);
   }
diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationMultipleLanguageNonInteractiveTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationMultipleLanguageNonInteractiveTest.php
index 358ccfd90210..6c4ad5c6d83a 100644
--- a/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationMultipleLanguageNonInteractiveTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationMultipleLanguageNonInteractiveTest.php
@@ -79,7 +79,7 @@ protected function installParameters() {
   /**
    * Tests that translations ended up at the expected places.
    */
-  public function testTranslationsLoaded() {
+  public function testTranslationsLoaded(): void {
     $this->drupalLogin($this->createUser([], NULL, TRUE));
     // Ensure the title is correct.
     $this->assertEquals('SITE_NAME_en', \Drupal::config('system.site')->get('name'));
diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationMultipleLanguageTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationMultipleLanguageTest.php
index b019bd97430e..bb2f5fb381c0 100644
--- a/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationMultipleLanguageTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationMultipleLanguageTest.php
@@ -76,7 +76,7 @@ protected function installParameters() {
   /**
    * Tests that translations ended up at the expected places.
    */
-  public function testTranslationsLoaded() {
+  public function testTranslationsLoaded(): void {
     // Ensure the title is correct.
     $this->assertEquals('SITE_NAME_' . $this->langcode, \Drupal::config('system.site')->get('name'));
 
diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationQueryTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationQueryTest.php
index e5ff25fadebe..f085ae3d034c 100644
--- a/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationQueryTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationQueryTest.php
@@ -57,7 +57,7 @@ protected function setUpLanguage() {
   /**
    * Verifies the expected behaviors of the installation result.
    */
-  public function testInstaller() {
+  public function testInstaller(): void {
     $this->assertSession()->addressEquals('user/1');
     $this->assertSession()->statusCodeEquals(200);
 
diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationTest.php
index fe9eac77f5a7..fa9368b2e9d4 100644
--- a/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationTest.php
@@ -80,7 +80,7 @@ protected function setUpSettings() {
   /**
    * Verifies the expected behaviors of the installation result.
    */
-  public function testInstaller() {
+  public function testInstaller(): void {
     $this->assertSession()->addressEquals('user/1');
     $this->assertSession()->statusCodeEquals(200);
 
diff --git a/core/tests/Drupal/FunctionalTests/Installer/MinimalInstallerTest.php b/core/tests/Drupal/FunctionalTests/Installer/MinimalInstallerTest.php
index de134e757f99..3513ff168deb 100644
--- a/core/tests/Drupal/FunctionalTests/Installer/MinimalInstallerTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/MinimalInstallerTest.php
@@ -28,7 +28,7 @@ class MinimalInstallerTest extends ConfigAfterInstallerTestBase {
   /**
    * Ensures that the exported minimal configuration is up to date.
    */
-  public function testMinimalConfig() {
+  public function testMinimalConfig(): void {
     $this->assertInstalledConfig([]);
   }
 
diff --git a/core/tests/Drupal/FunctionalTests/Installer/MultipleDistributionsProfileTest.php b/core/tests/Drupal/FunctionalTests/Installer/MultipleDistributionsProfileTest.php
index 37f60bcf31da..bcab6db5caf8 100644
--- a/core/tests/Drupal/FunctionalTests/Installer/MultipleDistributionsProfileTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/MultipleDistributionsProfileTest.php
@@ -76,7 +76,7 @@ protected function setUpProfile() {
   /**
    * Confirms that the installation succeeded.
    */
-  public function testInstalled() {
+  public function testInstalled(): void {
     $this->assertSession()->addressEquals('user/1');
     $this->assertSession()->statusCodeEquals(200);
     // Confirm that we are logged-in after installation.
diff --git a/core/tests/Drupal/FunctionalTests/Installer/SingleVisibleProfileTest.php b/core/tests/Drupal/FunctionalTests/Installer/SingleVisibleProfileTest.php
index 0a7bb8d527ad..7f2d7c35fa86 100644
--- a/core/tests/Drupal/FunctionalTests/Installer/SingleVisibleProfileTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/SingleVisibleProfileTest.php
@@ -57,7 +57,7 @@ protected function setUpProfile() {
   /**
    * Confirms that the installation succeeded.
    */
-  public function testInstalled() {
+  public function testInstalled(): void {
     $this->assertSession()->addressEquals('user/1');
     $this->assertSession()->statusCodeEquals(200);
     // Confirm that we are logged-in after installation.
diff --git a/core/tests/Drupal/FunctionalTests/Installer/SiteNameTest.php b/core/tests/Drupal/FunctionalTests/Installer/SiteNameTest.php
index 09e6bc6f961f..fa513876d490 100644
--- a/core/tests/Drupal/FunctionalTests/Installer/SiteNameTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/SiteNameTest.php
@@ -38,7 +38,7 @@ protected function installParameters() {
   /**
    * Tests that the desired site name appears on the page after installation.
    */
-  public function testSiteName() {
+  public function testSiteName(): void {
     $this->drupalGet('');
     $this->assertSession()->pageTextContains($this->siteName);
   }
diff --git a/core/tests/Drupal/FunctionalTests/Installer/SiteSettingsFormTest.php b/core/tests/Drupal/FunctionalTests/Installer/SiteSettingsFormTest.php
index eb157f6fd64c..404fd7c8ac2f 100644
--- a/core/tests/Drupal/FunctionalTests/Installer/SiteSettingsFormTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/SiteSettingsFormTest.php
@@ -26,7 +26,7 @@ class SiteSettingsFormTest extends BrowserTestBase {
   /**
    * Confirms that the form is extensible.
    */
-  public function testSiteSettingsForm() {
+  public function testSiteSettingsForm(): void {
     // Test that the form page can be loaded without errors.
     $this->drupalGet('test-form');
     $this->assertSession()->statusCodeEquals(200);
diff --git a/core/tests/Drupal/FunctionalTests/Installer/StandardInstallerTest.php b/core/tests/Drupal/FunctionalTests/Installer/StandardInstallerTest.php
index 5aba88177c53..ac997d6ab1e5 100644
--- a/core/tests/Drupal/FunctionalTests/Installer/StandardInstallerTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/StandardInstallerTest.php
@@ -19,7 +19,7 @@ class StandardInstallerTest extends ConfigAfterInstallerTestBase {
   /**
    * Ensures that the user page is available after installation.
    */
-  public function testInstaller() {
+  public function testInstaller(): void {
     // Verify that Olivero's default frontpage appears.
     $this->assertSession()->pageTextContains('Congratulations and welcome to the Drupal community.');
     $this->assertSession()->elementTextContains('css', '#block-olivero-powered', 'Powered by Drupal');
@@ -38,7 +38,7 @@ protected function setUpSite() {
   /**
    * Ensures that the exported standard configuration is up to date.
    */
-  public function testStandardConfig() {
+  public function testStandardConfig(): void {
     $skipped_config = [];
     // FunctionalTestSetupTrait::installParameters() uses Drupal as site name
     // and simpletest@example.com as mail address.
diff --git a/core/tests/Drupal/FunctionalTests/Installer/TestingProfileInstallTest.php b/core/tests/Drupal/FunctionalTests/Installer/TestingProfileInstallTest.php
index 2d1fc6e1738f..ddfa20ca5465 100644
--- a/core/tests/Drupal/FunctionalTests/Installer/TestingProfileInstallTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/TestingProfileInstallTest.php
@@ -26,7 +26,7 @@ class TestingProfileInstallTest extends BrowserTestBase {
   /**
    * Ensure the Update module is installed.
    */
-  public function testUpdateModuleInstall() {
+  public function testUpdateModuleInstall(): void {
     $this->assertTrue(\Drupal::moduleHandler()->moduleExists('update'));
   }
 
diff --git a/core/tests/Drupal/FunctionalTests/Libraries/JqueryUiLibraryAssetsTest.php b/core/tests/Drupal/FunctionalTests/Libraries/JqueryUiLibraryAssetsTest.php
index 1429d3d6ec3e..f733aa138481 100644
--- a/core/tests/Drupal/FunctionalTests/Libraries/JqueryUiLibraryAssetsTest.php
+++ b/core/tests/Drupal/FunctionalTests/Libraries/JqueryUiLibraryAssetsTest.php
@@ -94,7 +94,7 @@ protected function setUp(): void {
    * order. The necessary loading order was determined by the requirements
    * specified in each jQuery UI JavaScript file.
    */
-  public function testProperlySetWeights() {
+  public function testProperlySetWeights(): void {
     $assets = [];
 
     // Confirm that no asset is assigned multiple weights.
@@ -169,7 +169,7 @@ public function testProperlySetWeights() {
   /**
    * Confirm that uses of a jQuery UI asset are configured with the same weight.
    */
-  public function testSameAssetSameWeight() {
+  public function testSameAssetSameWeight(): void {
     $asset_weights = [];
     $libraries_to_check = $this->coreLibrariesWithJqueryUiAssets;
 
@@ -218,7 +218,7 @@ protected function trimFilePath($path) {
    *
    * @dataProvider providerTestAssetLoading
    */
-  public function testLibraryAssetLoadingOrder($library, array $expected_css, array $expected_js) {
+  public function testLibraryAssetLoadingOrder($library, array $expected_css, array $expected_js): void {
     $this->drupalGet("jqueryui_library_assets_test/$library");
     $this->assertSession()->statusCodeEquals(200);
 
@@ -299,7 +299,7 @@ public function testLibraryAssetLoadingOrder($library, array $expected_css, arra
    *
    * @dataProvider providerTestAssetLoading
    */
-  public function testAssetLoadingUnchanged($library, array $expected_css, array $expected_js) {
+  public function testAssetLoadingUnchanged($library, array $expected_css, array $expected_js): void {
     $this->drupalGet("jqueryui_library_assets_test/$library");
     $this->assertSession()->statusCodeEquals(200);
 
diff --git a/core/tests/Drupal/FunctionalTests/Libraries/ManyAssetsLoadOrderTest.php b/core/tests/Drupal/FunctionalTests/Libraries/ManyAssetsLoadOrderTest.php
index 7951249f23f5..c128587612f4 100644
--- a/core/tests/Drupal/FunctionalTests/Libraries/ManyAssetsLoadOrderTest.php
+++ b/core/tests/Drupal/FunctionalTests/Libraries/ManyAssetsLoadOrderTest.php
@@ -28,7 +28,7 @@ class ManyAssetsLoadOrderTest extends BrowserTestBase {
    *
    * Confirms the load order reflects the configured weights for each asset.
    */
-  public function testLoadOrder() {
+  public function testLoadOrder(): void {
     $this->drupalGet('many_assets_test');
 
     $js = $this->getSession()->getPage()->findAll('css', 'script[data-weight]');
diff --git a/core/tests/Drupal/FunctionalTests/MailCaptureTest.php b/core/tests/Drupal/FunctionalTests/MailCaptureTest.php
index b6d5c4f147b6..bea51a836453 100644
--- a/core/tests/Drupal/FunctionalTests/MailCaptureTest.php
+++ b/core/tests/Drupal/FunctionalTests/MailCaptureTest.php
@@ -28,7 +28,7 @@ class MailCaptureTest extends BrowserTestBase {
   /**
    * Tests to see if the wrapper function is executed correctly.
    */
-  public function testMailSend() {
+  public function testMailSend(): void {
     // Create an email.
     $subject = $this->randomString(64);
     $body = $this->randomString(128);
diff --git a/core/tests/Drupal/FunctionalTests/Menu/MenuActiveTrail403Test.php b/core/tests/Drupal/FunctionalTests/Menu/MenuActiveTrail403Test.php
index 5a151815efc3..2a7e446e3486 100644
--- a/core/tests/Drupal/FunctionalTests/Menu/MenuActiveTrail403Test.php
+++ b/core/tests/Drupal/FunctionalTests/Menu/MenuActiveTrail403Test.php
@@ -86,7 +86,7 @@ protected function setUp(): void {
   /**
    * Tests that visiting 403 page does not override original active trail.
    */
-  public function testMenuActiveTrail403Cache() {
+  public function testMenuActiveTrail403Cache(): void {
     $this->drupalLogin($this->privilegedUser);
     $system_status_url = Url::fromRoute('system.status');
     $this->drupalGet($system_status_url);
diff --git a/core/tests/Drupal/FunctionalTests/Routing/CaseInsensitivePathTest.php b/core/tests/Drupal/FunctionalTests/Routing/CaseInsensitivePathTest.php
index f4773b3c595f..447224e931fe 100644
--- a/core/tests/Drupal/FunctionalTests/Routing/CaseInsensitivePathTest.php
+++ b/core/tests/Drupal/FunctionalTests/Routing/CaseInsensitivePathTest.php
@@ -37,7 +37,7 @@ protected function setUp(): void {
   /**
    * Tests mixed case paths.
    */
-  public function testMixedCasePaths() {
+  public function testMixedCasePaths(): void {
     // Tests paths defined by routes from standard modules as anonymous.
     $this->drupalGet('user/login');
     $this->assertSession()->statusCodeEquals(200);
@@ -103,7 +103,7 @@ public function testMixedCasePaths() {
   /**
    * Tests paths with slugs.
    */
-  public function testPathsWithArguments() {
+  public function testPathsWithArguments(): void {
     $this->drupalGet('system-test/echo/foobarbaz');
     $this->assertSession()->statusCodeEquals(200);
     $this->assertSession()->pageTextMatches('/foobarbaz/');
diff --git a/core/tests/Drupal/FunctionalTests/Routing/DefaultFormatTest.php b/core/tests/Drupal/FunctionalTests/Routing/DefaultFormatTest.php
index 8a3cea331cdb..734058c0c4ed 100644
--- a/core/tests/Drupal/FunctionalTests/Routing/DefaultFormatTest.php
+++ b/core/tests/Drupal/FunctionalTests/Routing/DefaultFormatTest.php
@@ -21,7 +21,7 @@ class DefaultFormatTest extends BrowserTestBase {
    */
   protected $defaultTheme = 'stark';
 
-  public function testFoo() {
+  public function testFoo(): void {
     $this->drupalGet('/default_format_test/human');
     $this->assertSame('format:html', $this->getSession()->getPage()->getContent());
     $this->assertSession()->responseHeaderEquals('X-Drupal-Cache', 'MISS');
@@ -37,7 +37,7 @@ public function testFoo() {
     $this->assertSession()->responseHeaderEquals('X-Drupal-Cache', 'HIT');
   }
 
-  public function testMultipleRoutesWithSameSingleFormat() {
+  public function testMultipleRoutesWithSameSingleFormat(): void {
     $this->drupalGet('/default_format_test/machine');
     $this->assertSame('format:json', $this->getSession()->getPage()->getContent());
   }
diff --git a/core/tests/Drupal/FunctionalTests/Routing/LazyRouteProviderInstallTest.php b/core/tests/Drupal/FunctionalTests/Routing/LazyRouteProviderInstallTest.php
index b5ec69f803be..e344c7d41909 100644
--- a/core/tests/Drupal/FunctionalTests/Routing/LazyRouteProviderInstallTest.php
+++ b/core/tests/Drupal/FunctionalTests/Routing/LazyRouteProviderInstallTest.php
@@ -24,7 +24,7 @@ class LazyRouteProviderInstallTest extends BrowserTestBase {
   /**
    * Tests that the lazy route provider is used during a module install.
    */
-  public function testInstallation() {
+  public function testInstallation(): void {
     $this->container->get('module_installer')->install(['router_test']);
     // Note that on DrupalCI the test site is installed in a sub directory so
     // we cannot use ::assertEquals().
diff --git a/core/tests/Drupal/FunctionalTests/Routing/PathEncodedTest.php b/core/tests/Drupal/FunctionalTests/Routing/PathEncodedTest.php
index fd5e94a6f952..0ac2339a8100 100644
--- a/core/tests/Drupal/FunctionalTests/Routing/PathEncodedTest.php
+++ b/core/tests/Drupal/FunctionalTests/Routing/PathEncodedTest.php
@@ -28,7 +28,7 @@ class PathEncodedTest extends BrowserTestBase {
    */
   protected $defaultTheme = 'stark';
 
-  public function testGetEncoded() {
+  public function testGetEncoded(): void {
     $route_paths = [
       'path_encoded_test.colon' => '/hi/llama:party',
       'path_encoded_test.at_sign' => '/blog/@Dries',
@@ -40,7 +40,7 @@ public function testGetEncoded() {
     }
   }
 
-  public function testAliasToEncoded() {
+  public function testAliasToEncoded(): void {
     $route_paths = [
       'path_encoded_test.colon' => '/hi/llama:party',
       'path_encoded_test.at_sign' => '/blog/@Dries',
diff --git a/core/tests/Drupal/FunctionalTests/Routing/RouteCachingLanguageTest.php b/core/tests/Drupal/FunctionalTests/Routing/RouteCachingLanguageTest.php
index 3df21995346e..9e6e8b91af88 100644
--- a/core/tests/Drupal/FunctionalTests/Routing/RouteCachingLanguageTest.php
+++ b/core/tests/Drupal/FunctionalTests/Routing/RouteCachingLanguageTest.php
@@ -129,7 +129,7 @@ protected function setUp(): void {
    *
    * @dataProvider providerLanguage
    */
-  public function testLinkTranslationWithAlias($source_langcode) {
+  public function testLinkTranslationWithAlias($source_langcode): void {
     $source_url_options = [
       'language' => ConfigurableLanguage::load($source_langcode),
     ];
diff --git a/core/tests/Drupal/FunctionalTests/Routing/RouteCachingNonPathLanguageNegotiationTest.php b/core/tests/Drupal/FunctionalTests/Routing/RouteCachingNonPathLanguageNegotiationTest.php
index 0eeb7e4358b4..97cf9f8abf25 100644
--- a/core/tests/Drupal/FunctionalTests/Routing/RouteCachingNonPathLanguageNegotiationTest.php
+++ b/core/tests/Drupal/FunctionalTests/Routing/RouteCachingNonPathLanguageNegotiationTest.php
@@ -81,7 +81,7 @@ protected function setUp(): void {
   /**
    * Tests aliases when the negotiated language is not in the path.
    */
-  public function testAliases() {
+  public function testAliases(): void {
     // Switch to French and try to access the now inaccessible block.
     $this->drupalGet('');
 
diff --git a/core/tests/Drupal/FunctionalTests/Routing/RouteCachingQueryAlteredTest.php b/core/tests/Drupal/FunctionalTests/Routing/RouteCachingQueryAlteredTest.php
index 030e7a12d9ff..3e099fa46fc8 100644
--- a/core/tests/Drupal/FunctionalTests/Routing/RouteCachingQueryAlteredTest.php
+++ b/core/tests/Drupal/FunctionalTests/Routing/RouteCachingQueryAlteredTest.php
@@ -47,7 +47,7 @@ protected function setUp(): void {
   /**
    * Tests route collection cache after an exception.
    */
-  public function testRouteCollectionCacheAfterException() {
+  public function testRouteCollectionCacheAfterException(): void {
     // Force an exception early in the Kernel middleware on a cold cache by
     // simulating bad Bearer authentication.
     $this->drupalGet('/router-test/rejects-query-strings', [], [
diff --git a/core/tests/Drupal/FunctionalTests/Theme/ClaroLayoutBuilderTest.php b/core/tests/Drupal/FunctionalTests/Theme/ClaroLayoutBuilderTest.php
index 49e4fabb2613..99e4974e3fc0 100644
--- a/core/tests/Drupal/FunctionalTests/Theme/ClaroLayoutBuilderTest.php
+++ b/core/tests/Drupal/FunctionalTests/Theme/ClaroLayoutBuilderTest.php
@@ -71,7 +71,7 @@ protected function setUp(): void {
    *
    * @see claro.theme
    */
-  public function testContextualLinks() {
+  public function testContextualLinks(): void {
     $assert_session = $this->assertSession();
     $page = $this->getSession()->getPage();
 
diff --git a/core/tests/Drupal/FunctionalTests/Theme/ClaroTest.php b/core/tests/Drupal/FunctionalTests/Theme/ClaroTest.php
index 94d2a182bd6f..53a038af263c 100644
--- a/core/tests/Drupal/FunctionalTests/Theme/ClaroTest.php
+++ b/core/tests/Drupal/FunctionalTests/Theme/ClaroTest.php
@@ -36,7 +36,7 @@ class ClaroTest extends BrowserTestBase {
    *
    * @see claro.info.yml
    */
-  public function testRegressionMissingElementsCss() {
+  public function testRegressionMissingElementsCss(): void {
     $this->drupalGet('');
     $this->assertSession()->statusCodeEquals(200);
     // This can be any CSS file from the global library.
@@ -46,7 +46,7 @@ public function testRegressionMissingElementsCss() {
   /**
    * Tests Claro's configuration schema.
    */
-  public function testConfigSchema() {
+  public function testConfigSchema(): void {
     $permissions = [
       'administer modules',
     ];
@@ -66,7 +66,7 @@ public function testConfigSchema() {
   /**
    * Tests that the Claro theme can be uninstalled.
    */
-  public function testIsUninstallable() {
+  public function testIsUninstallable(): void {
     $this->drupalLogin($this->drupalCreateUser(['access administration pages', 'administer themes']));
 
     $this->drupalGet('admin/appearance');
diff --git a/core/tests/Drupal/FunctionalTests/Theme/OliveroTest.php b/core/tests/Drupal/FunctionalTests/Theme/OliveroTest.php
index c9e42bcc49b0..a6e2a81482d3 100644
--- a/core/tests/Drupal/FunctionalTests/Theme/OliveroTest.php
+++ b/core/tests/Drupal/FunctionalTests/Theme/OliveroTest.php
@@ -39,7 +39,7 @@ class OliveroTest extends BrowserTestBase {
    *
    * @see olivero.libraries.yml
    */
-  public function testBaseLibraryAvailable() {
+  public function testBaseLibraryAvailable(): void {
     $this->drupalGet('');
     $this->assertSession()->statusCodeEquals(200);
     $this->assertSession()->responseContains('olivero/css/base/base.css');
@@ -49,7 +49,7 @@ public function testBaseLibraryAvailable() {
   /**
    * Test Olivero's configuration schema.
    */
-  public function testConfigSchema() {
+  public function testConfigSchema(): void {
     // Required configuration.
     $this->drupalGet('');
     $this->assertSession()->statusCodeEquals(200);
@@ -74,7 +74,7 @@ public function testConfigSchema() {
    *
    * @see olivero.libraries.yml
    */
-  public function testPreprocessBlock() {
+  public function testPreprocessBlock(): void {
     $this->drupalGet('');
     $this->assertSession()->statusCodeEquals(200);
 
@@ -122,7 +122,7 @@ public function testPreprocessBlock() {
   /**
    * Tests that the Olivero theme can be uninstalled.
    */
-  public function testIsUninstallable() {
+  public function testIsUninstallable(): void {
     $this->drupalLogin($this->drupalCreateUser([
       'access administration pages',
       'administer themes',
diff --git a/core/tests/Drupal/FunctionalTests/Update/UpdatePathTestBaseTest.php b/core/tests/Drupal/FunctionalTests/Update/UpdatePathTestBaseTest.php
index e74802e8513a..9bf75311d593 100644
--- a/core/tests/Drupal/FunctionalTests/Update/UpdatePathTestBaseTest.php
+++ b/core/tests/Drupal/FunctionalTests/Update/UpdatePathTestBaseTest.php
@@ -32,14 +32,14 @@ protected function setDatabaseDumpFiles() {
   /**
    * Tests that the database was properly loaded.
    */
-  public function testDatabaseProperlyLoaded() {
+  public function testDatabaseProperlyLoaded(): void {
     $this->testDatabaseLoaded();
   }
 
   /**
    * Tests that updates are properly run.
    */
-  public function testUpdateHookN() {
+  public function testUpdateHookN(): void {
     $connection = Database::getConnection();
 
     // Increment the schema version.
@@ -76,7 +76,7 @@ public function testUpdateHookN() {
   /**
    * Tests that path aliases are not processed during database updates.
    */
-  public function testPathAliasProcessing() {
+  public function testPathAliasProcessing(): void {
     // Add a path alias for the '/admin' system path.
     $values = [
       'path' => '/admin/structure',
@@ -122,7 +122,7 @@ public function testPathAliasProcessing() {
    *
    * @see update_test_schema_update_8003()
    */
-  public function testModuleListChange() {
+  public function testModuleListChange(): void {
     // Set a value in the cache to prove caches are cleared.
     \Drupal::service('cache.default')->set(__CLASS__, 'Test');
 
@@ -169,7 +169,7 @@ public function testModuleListChange() {
    * @see \Drupal\FunctionalTests\Update\UpdatePathTestBase::runUpdates()
    * @see \Drupal\Core\Test\TestSetupTrait::$configSchemaCheckerExclusions
    */
-  public function testSchemaChecking() {
+  public function testSchemaChecking(): void {
     // Create some configuration that should be skipped.
     $this->config('config_schema_test.no_schema')->set('foo', 'bar')->save();
     $this->runUpdates();
@@ -180,7 +180,7 @@ public function testSchemaChecking() {
   /**
    * Tests that setup is done correctly.
    */
-  public function testSetup() {
+  public function testSetup(): void {
     $this->assertCount(3, $this->databaseDumpFiles);
     $this->assertSame(1, Settings::get('entity_update_batch_size'));
   }
diff --git a/core/tests/Drupal/FunctionalTests/UserHelpersTest.php b/core/tests/Drupal/FunctionalTests/UserHelpersTest.php
index d69d619058f4..151a08272467 100644
--- a/core/tests/Drupal/FunctionalTests/UserHelpersTest.php
+++ b/core/tests/Drupal/FunctionalTests/UserHelpersTest.php
@@ -21,7 +21,7 @@ class UserHelpersTest extends BrowserTestBase {
   /**
    * Tests BrowserTestBase::drupalUserIsLoggedIn().
    */
-  public function testDrupalUserIsLoggedIn() {
+  public function testDrupalUserIsLoggedIn(): void {
     $first_user = $this->drupalCreateUser();
     $second_user = $this->drupalCreateUser();
 
diff --git a/core/tests/Drupal/FunctionalTests/WebAssertTest.php b/core/tests/Drupal/FunctionalTests/WebAssertTest.php
index d5b42bd6a6b2..a8ca8bcac109 100644
--- a/core/tests/Drupal/FunctionalTests/WebAssertTest.php
+++ b/core/tests/Drupal/FunctionalTests/WebAssertTest.php
@@ -37,7 +37,7 @@ class WebAssertTest extends BrowserTestBase {
    *
    * @covers ::responseHeaderExists
    */
-  public function testResponseHeaderExists() {
+  public function testResponseHeaderExists(): void {
     $this->drupalGet('test-null-header');
     $this->assertSession()->responseHeaderExists('Null-Header');
 
@@ -51,7 +51,7 @@ public function testResponseHeaderExists() {
    *
    * @covers ::responseHeaderDoesNotExist
    */
-  public function testResponseHeaderDoesNotExist() {
+  public function testResponseHeaderDoesNotExist(): void {
     $this->drupalGet('test-null-header');
     $this->assertSession()->responseHeaderDoesNotExist('does-not-exist');
 
@@ -63,7 +63,7 @@ public function testResponseHeaderDoesNotExist() {
   /**
    * @covers ::pageTextMatchesCount
    */
-  public function testPageTextMatchesCount() {
+  public function testPageTextMatchesCount(): void {
     $this->drupalLogin($this->drupalCreateUser());
 
     // Visit a Drupal page that requires login.
@@ -78,7 +78,7 @@ public function testPageTextMatchesCount() {
   /**
    * @covers ::pageTextContainsOnce
    */
-  public function testPageTextContainsOnce() {
+  public function testPageTextContainsOnce(): void {
     $this->drupalLogin($this->drupalCreateUser());
 
     // Visit a Drupal page that requires login.
@@ -142,7 +142,7 @@ public function testAddressNotEqualsException(): void {
    *
    * @covers ::linkExists
    */
-  public function testPipeCharInLocator() {
+  public function testPipeCharInLocator(): void {
     $this->drupalGet('test-pipe-char');
     $this->assertSession()->linkExists('foo|bar|baz');
   }
@@ -152,7 +152,7 @@ public function testPipeCharInLocator() {
    *
    * @covers ::linkExistsExact
    */
-  public function testLinkExistsExact() {
+  public function testLinkExistsExact(): void {
     $this->drupalGet('test-pipe-char');
     $this->assertSession()->linkExistsExact('foo|bar|baz');
   }
@@ -162,7 +162,7 @@ public function testLinkExistsExact() {
    *
    * @covers ::linkExistsExact
    */
-  public function testInvalidLinkExistsExact() {
+  public function testInvalidLinkExistsExact(): void {
     $this->drupalGet('test-pipe-char');
     $this->expectException(ExpectationException::class);
     $this->expectExceptionMessage('Link with label foo|bar not found');
@@ -174,7 +174,7 @@ public function testInvalidLinkExistsExact() {
    *
    * @covers ::linkNotExistsExact
    */
-  public function testLinkNotExistsExact() {
+  public function testLinkNotExistsExact(): void {
     $this->drupalGet('test-pipe-char');
     $this->assertSession()->linkNotExistsExact('foo|bar');
   }
@@ -184,7 +184,7 @@ public function testLinkNotExistsExact() {
    *
    * @covers ::linkNotExistsExact
    */
-  public function testInvalidLinkNotExistsExact() {
+  public function testInvalidLinkNotExistsExact(): void {
     $this->drupalGet('test-pipe-char');
     $this->expectException(ExpectationException::class);
     $this->expectExceptionMessage('Link with label foo|bar|baz found');
@@ -295,7 +295,7 @@ public function testInvalidLinkByHrefNotExistsExact(): void {
    * @covers ::responseContains
    * @covers ::responseNotContains
    */
-  public function testTextAsserts() {
+  public function testTextAsserts(): void {
     $this->drupalGet('test-encoded');
     $dangerous = 'Bad html <script>alert(123);</script>';
     $sanitized = Html::escape($dangerous);
@@ -309,7 +309,7 @@ public function testTextAsserts() {
    * @covers ::buttonExists
    * @covers ::buttonNotExists
    */
-  public function testFieldAssertsForButton() {
+  public function testFieldAssertsForButton(): void {
     $this->drupalGet('test-field-xpath');
 
     // Verify if the test passes with button ID.
@@ -346,7 +346,7 @@ public function testFieldAssertsForButton() {
    *
    * @covers ::pageContainsNoDuplicateId
    */
-  public function testPageContainsNoDuplicateId() {
+  public function testPageContainsNoDuplicateId(): void {
     $assert_session = $this->assertSession();
     $this->drupalGet(Url::fromRoute('test_page_test.page_without_duplicate_ids'));
     $assert_session->pageContainsNoDuplicateId();
@@ -363,7 +363,7 @@ public function testPageContainsNoDuplicateId() {
    * @covers ::assertNoEscaped
    * @covers ::assertEscaped
    */
-  public function testEscapingAssertions() {
+  public function testEscapingAssertions(): void {
     $assert = $this->assertSession();
 
     $this->drupalGet('test-escaped-characters');
diff --git a/core/tests/Drupal/KernelTests/Component/Render/FormattableMarkupKernelTest.php b/core/tests/Drupal/KernelTests/Component/Render/FormattableMarkupKernelTest.php
index cfbb121e3871..4c9e7b1717b5 100644
--- a/core/tests/Drupal/KernelTests/Component/Render/FormattableMarkupKernelTest.php
+++ b/core/tests/Drupal/KernelTests/Component/Render/FormattableMarkupKernelTest.php
@@ -44,7 +44,7 @@ protected static function getFormattableMarkupUriArgs($uri, $options = []) {
    *
    * @dataProvider providerTestFormattableMarkupUri
    */
-  public function testFormattableMarkupUri($string, $uri, $options, $expected) {
+  public function testFormattableMarkupUri($string, $uri, $options, $expected): void {
     $args = self::getFormattableMarkupUriArgs($uri, $options);
     $this->assertSame($expected, (string) new FormattableMarkup($string, $args));
   }
@@ -103,7 +103,7 @@ public static function providerTestFormattableMarkupUri() {
   /**
    * @dataProvider providerTestFormattableMarkupUriWithException
    */
-  public function testFormattableMarkupUriWithExceptionUri($string, $uri) {
+  public function testFormattableMarkupUriWithExceptionUri($string, $uri): void {
     // Should throw an \InvalidArgumentException, due to Uri::toString().
     $this->expectException(\InvalidArgumentException::class);
     $args = self::getFormattableMarkupUriArgs($uri);
diff --git a/core/tests/Drupal/KernelTests/Config/DefaultConfigTest.php b/core/tests/Drupal/KernelTests/Config/DefaultConfigTest.php
index a1973722abac..853d3e3afe0e 100644
--- a/core/tests/Drupal/KernelTests/Config/DefaultConfigTest.php
+++ b/core/tests/Drupal/KernelTests/Config/DefaultConfigTest.php
@@ -60,7 +60,7 @@ public function testModuleConfig(string $module): void {
    *
    * @dataProvider themeListDataProvider
    */
-  public function testThemeConfig($theme) {
+  public function testThemeConfig($theme): void {
     $this->assertExtensionConfig($theme, 'theme');
   }
 
diff --git a/core/tests/Drupal/KernelTests/Config/TypedConfigTest.php b/core/tests/Drupal/KernelTests/Config/TypedConfigTest.php
index 44c6b7d87f17..db02ae73b14e 100644
--- a/core/tests/Drupal/KernelTests/Config/TypedConfigTest.php
+++ b/core/tests/Drupal/KernelTests/Config/TypedConfigTest.php
@@ -43,7 +43,7 @@ protected function setUp(): void {
   /**
    * Verifies that the Typed Data API is implemented correctly.
    */
-  public function testTypedDataAPI() {
+  public function testTypedDataAPI(): void {
     /** @var \Drupal\Core\Config\TypedConfigManagerInterface $typed_config_manager */
     $typed_config_manager = \Drupal::service('config.typed');
 
@@ -144,7 +144,7 @@ public function testNotBlankInteractionWithNotNull(?string $value, bool $is_requ
   /**
    * Tests config validation via the Typed Data API.
    */
-  public function testSimpleConfigValidation() {
+  public function testSimpleConfigValidation(): void {
     $config = \Drupal::configFactory()->getEditable('config_test.validation');
     /** @var \Drupal\Core\Config\TypedConfigManagerInterface $typed_config_manager */
     $typed_config_manager = \Drupal::service('config.typed');
diff --git a/core/tests/Drupal/KernelTests/ConfigFormTestBase.php b/core/tests/Drupal/KernelTests/ConfigFormTestBase.php
index 9cad9328d856..b588372865b8 100644
--- a/core/tests/Drupal/KernelTests/ConfigFormTestBase.php
+++ b/core/tests/Drupal/KernelTests/ConfigFormTestBase.php
@@ -42,7 +42,7 @@ abstract class ConfigFormTestBase extends KernelTestBase {
   /**
    * Submit the system_config_form ensure the configuration has expected values.
    */
-  public function testConfigForm() {
+  public function testConfigForm(): void {
     // Programmatically submit the given values.
     $values = [];
     foreach ($this->values as $form_key => $data) {
diff --git a/core/tests/Drupal/KernelTests/Core/Action/DeleteActionTest.php b/core/tests/Drupal/KernelTests/Core/Action/DeleteActionTest.php
index 4626a6af43f9..9ce189b5df14 100644
--- a/core/tests/Drupal/KernelTests/Core/Action/DeleteActionTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Action/DeleteActionTest.php
@@ -41,7 +41,7 @@ protected function setUp(): void {
   /**
    * @covers \Drupal\Core\Action\Plugin\Action\Derivative\EntityDeleteActionDeriver::getDerivativeDefinitions
    */
-  public function testGetDerivativeDefinitions() {
+  public function testGetDerivativeDefinitions(): void {
     $deriver = new EntityDeleteActionDeriver(\Drupal::entityTypeManager(), \Drupal::translation());
     $this->assertEquals([
       'entity_test_mulrevpub' => [
@@ -70,7 +70,7 @@ public function testGetDerivativeDefinitions() {
   /**
    * @covers \Drupal\Core\Action\Plugin\Action\DeleteAction::execute
    */
-  public function testDeleteAction() {
+  public function testDeleteAction(): void {
     $entity = EntityTestMulRevPub::create(['name' => 'test']);
     $entity->save();
 
diff --git a/core/tests/Drupal/KernelTests/Core/Action/EmailActionTest.php b/core/tests/Drupal/KernelTests/Core/Action/EmailActionTest.php
index faf116ec8f5f..34bf7a5a3793 100644
--- a/core/tests/Drupal/KernelTests/Core/Action/EmailActionTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Action/EmailActionTest.php
@@ -32,7 +32,7 @@ protected function setUp(): void {
   /**
    * Tests the email action plugin.
    */
-  public function testEmailAction() {
+  public function testEmailAction(): void {
     $this->config('system.site')->set('mail', 'test@example.com')->save();
 
     /** @var \Drupal\Core\Action\ActionManager $plugin_manager */
diff --git a/core/tests/Drupal/KernelTests/Core/Action/PublishActionTest.php b/core/tests/Drupal/KernelTests/Core/Action/PublishActionTest.php
index 09d63e96ba7f..09c62d5d9dcf 100644
--- a/core/tests/Drupal/KernelTests/Core/Action/PublishActionTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Action/PublishActionTest.php
@@ -30,7 +30,7 @@ protected function setUp(): void {
   /**
    * @covers \Drupal\Core\Action\Plugin\Action\Derivative\EntityPublishedActionDeriver::getDerivativeDefinitions
    */
-  public function testGetDerivativeDefinitions() {
+  public function testGetDerivativeDefinitions(): void {
     $deriver = new EntityPublishedActionDeriver(\Drupal::entityTypeManager(), \Drupal::translation());
     $definitions = $deriver->getDerivativeDefinitions([
       'action_label' => 'Save',
@@ -45,7 +45,7 @@ public function testGetDerivativeDefinitions() {
   /**
    * @covers \Drupal\Core\Action\Plugin\Action\PublishAction::execute
    */
-  public function testPublishAction() {
+  public function testPublishAction(): void {
     $entity = EntityTestMulRevPub::create(['name' => 'test']);
     $entity->setUnpublished()->save();
 
@@ -63,7 +63,7 @@ public function testPublishAction() {
   /**
    * @covers \Drupal\Core\Action\Plugin\Action\UnpublishAction::execute
    */
-  public function testUnpublishAction() {
+  public function testUnpublishAction(): void {
     $entity = EntityTestMulRevPub::create(['name' => 'test']);
     $entity->setPublished()->save();
 
diff --git a/core/tests/Drupal/KernelTests/Core/Action/SaveActionTest.php b/core/tests/Drupal/KernelTests/Core/Action/SaveActionTest.php
index 54453e1ab726..586523d18695 100644
--- a/core/tests/Drupal/KernelTests/Core/Action/SaveActionTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Action/SaveActionTest.php
@@ -30,7 +30,7 @@ protected function setUp(): void {
   /**
    * @covers \Drupal\Core\Action\Plugin\Action\Derivative\EntityChangedActionDeriver::getDerivativeDefinitions
    */
-  public function testGetDerivativeDefinitions() {
+  public function testGetDerivativeDefinitions(): void {
     $deriver = new EntityChangedActionDeriver(\Drupal::entityTypeManager(), \Drupal::translation());
     $definitions = $deriver->getDerivativeDefinitions([
       'action_label' => 'Save',
@@ -45,7 +45,7 @@ public function testGetDerivativeDefinitions() {
   /**
    * @covers \Drupal\Core\Action\Plugin\Action\SaveAction::execute
    */
-  public function testSaveAction() {
+  public function testSaveAction(): void {
     $entity = EntityTestMulChanged::create(['name' => 'test']);
     $entity->save();
     $saved_time = $entity->getChangedTime();
diff --git a/core/tests/Drupal/KernelTests/Core/Ajax/CommandsTest.php b/core/tests/Drupal/KernelTests/Core/Ajax/CommandsTest.php
index 90cfefbcd4cd..4571f2d025ee 100644
--- a/core/tests/Drupal/KernelTests/Core/Ajax/CommandsTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Ajax/CommandsTest.php
@@ -32,7 +32,7 @@ class CommandsTest extends KernelTestBase {
   /**
    * Regression test: Settings command exists regardless of JS aggregation.
    */
-  public function testAttachedSettings() {
+  public function testAttachedSettings(): void {
     $assert = function ($message) {
       $response = new AjaxResponse();
       $response->setAttachments([
@@ -69,7 +69,7 @@ public function testAttachedSettings() {
    *
    * @doesNotPerformAssertions
    */
-  public function testEmptyInsertCommand() {
+  public function testEmptyInsertCommand(): void {
     (new InsertCommand('foobar', []))->render();
   }
 
diff --git a/core/tests/Drupal/KernelTests/Core/Archiver/TarTest.php b/core/tests/Drupal/KernelTests/Core/Archiver/TarTest.php
index a3d300edb63b..ba7e84587c41 100644
--- a/core/tests/Drupal/KernelTests/Core/Archiver/TarTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Archiver/TarTest.php
@@ -19,7 +19,7 @@ class TarTest extends ArchiverTestBase {
   /**
    * Tests that the Tar archive is created if it does not exist.
    */
-  public function testCreateArchive() {
+  public function testCreateArchive(): void {
     $textFile = current($this->getTestFiles('text'));
     $archiveFilename = $this->fileSystem->realpath('public://' . $this->randomMachineName() . '.tar');
     $tar = new Tar($archiveFilename);
diff --git a/core/tests/Drupal/KernelTests/Core/Archiver/ZipTest.php b/core/tests/Drupal/KernelTests/Core/Archiver/ZipTest.php
index 689f76e9a1d0..2bc2fda371de 100644
--- a/core/tests/Drupal/KernelTests/Core/Archiver/ZipTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Archiver/ZipTest.php
@@ -19,7 +19,7 @@ class ZipTest extends ArchiverTestBase {
   /**
    * Tests that the Zip archive is created if it does not exist.
    */
-  public function testCreateArchive() {
+  public function testCreateArchive(): void {
     $textFile = current($this->getTestFiles('text'));
     $archiveFilename = $this->fileSystem->realpath('public://' . $this->randomMachineName() . '.zip');
     $zip = new Zip($archiveFilename, [
@@ -35,7 +35,7 @@ public function testCreateArchive() {
   /**
    * Tests that the Zip archiver is created and overwritten.
    */
-  public function testOverwriteArchive() {
+  public function testOverwriteArchive(): void {
     // Create an archive similarly to how it's done in ::testCreateArchive.
     $files = $this->getTestFiles('text');
     $textFile = current($files);
diff --git a/core/tests/Drupal/KernelTests/Core/Asset/AttachedAssetsTest.php b/core/tests/Drupal/KernelTests/Core/Asset/AttachedAssetsTest.php
index 1a8fa790333b..60f18afa57c7 100644
--- a/core/tests/Drupal/KernelTests/Core/Asset/AttachedAssetsTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Asset/AttachedAssetsTest.php
@@ -63,7 +63,7 @@ protected function setUp(): void {
   /**
    * Tests that default CSS and JavaScript is empty.
    */
-  public function testDefault() {
+  public function testDefault(): void {
     $assets = new AttachedAssets();
     $this->assertEquals([], $this->assetResolver->getCssAssets($assets, FALSE, \Drupal::languageManager()->getCurrentLanguage()), 'Default CSS is empty.');
     [$js_assets_header, $js_assets_footer] = $this->assetResolver->getJsAssets($assets, FALSE, \Drupal::languageManager()->getCurrentLanguage());
@@ -74,7 +74,7 @@ public function testDefault() {
   /**
    * Tests non-existing libraries.
    */
-  public function testLibraryUnknown() {
+  public function testLibraryUnknown(): void {
     $build['#attached']['library'][] = 'core/unknown';
     $assets = AttachedAssets::createFromRenderArray($build);
 
@@ -84,7 +84,7 @@ public function testLibraryUnknown() {
   /**
    * Tests adding a CSS and a JavaScript file.
    */
-  public function testAddFiles() {
+  public function testAddFiles(): void {
     $build['#attached']['library'][] = 'common_test/files';
     $assets = AttachedAssets::createFromRenderArray($build);
 
@@ -105,7 +105,7 @@ public function testAddFiles() {
   /**
    * Tests adding JavaScript settings.
    */
-  public function testAddJsSettings() {
+  public function testAddJsSettings(): void {
     // Add a file in order to test default settings.
     $build['#attached']['library'][] = 'core/drupalSettings';
     $assets = AttachedAssets::createFromRenderArray($build);
@@ -124,7 +124,7 @@ public function testAddJsSettings() {
   /**
    * Tests adding external CSS and JavaScript files.
    */
-  public function testAddExternalFiles() {
+  public function testAddExternalFiles(): void {
     $build['#attached']['library'][] = 'common_test/external';
     $assets = AttachedAssets::createFromRenderArray($build);
 
@@ -144,7 +144,7 @@ public function testAddExternalFiles() {
   /**
    * Tests adding JavaScript files with additional attributes.
    */
-  public function testAttributes() {
+  public function testAttributes(): void {
     $build['#attached']['library'][] = 'common_test/js-attributes';
     $assets = AttachedAssets::createFromRenderArray($build);
 
@@ -160,7 +160,7 @@ public function testAttributes() {
   /**
    * Tests that attributes are maintained when JS aggregation is enabled.
    */
-  public function testAggregatedAttributes() {
+  public function testAggregatedAttributes(): void {
     $build['#attached']['library'][] = 'common_test/js-attributes';
     $assets = AttachedAssets::createFromRenderArray($build);
 
@@ -176,7 +176,7 @@ public function testAggregatedAttributes() {
   /**
    * Integration test for CSS/JS aggregation.
    */
-  public function testAggregation() {
+  public function testAggregation(): void {
     $build['#attached']['library'][] = 'core/drupal.timezone';
     $build['#attached']['library'][] = 'core/drupal.vertical-tabs';
     $assets = AttachedAssets::createFromRenderArray($build);
@@ -194,7 +194,7 @@ public function testAggregation() {
   /**
    * Tests JavaScript settings.
    */
-  public function testSettings() {
+  public function testSettings(): void {
     $build = [];
     $build['#attached']['library'][] = 'core/drupalSettings';
     // Nonsensical value to verify if it's possible to override path settings.
@@ -234,7 +234,7 @@ public function testSettings() {
   /**
    * Tests JS assets depending on the 'core/<head>' virtual library.
    */
-  public function testHeaderHTML() {
+  public function testHeaderHTML(): void {
     $build['#attached']['library'][] = 'common_test/js-header';
     $assets = AttachedAssets::createFromRenderArray($build);
 
@@ -250,7 +250,7 @@ public function testHeaderHTML() {
   /**
    * Tests that for assets with cache = FALSE, Drupal sets preprocess = FALSE.
    */
-  public function testNoCache() {
+  public function testNoCache(): void {
     $build['#attached']['library'][] = 'common_test/no-cache';
     $assets = AttachedAssets::createFromRenderArray($build);
 
@@ -261,7 +261,7 @@ public function testNoCache() {
   /**
    * Tests JavaScript versioning.
    */
-  public function testVersionQueryString() {
+  public function testVersionQueryString(): void {
     $build['#attached']['library'][] = 'core/once';
     $assets = AttachedAssets::createFromRenderArray($build);
 
@@ -275,7 +275,7 @@ public function testVersionQueryString() {
   /**
    * Tests JavaScript and CSS asset ordering.
    */
-  public function testRenderOrder() {
+  public function testRenderOrder(): void {
     $build['#attached']['library'][] = 'common_test/order';
     $assets = AttachedAssets::createFromRenderArray($build);
 
@@ -353,7 +353,7 @@ public function testRenderOrder() {
   /**
    * Tests rendering the JavaScript with a file's weight above jQuery's.
    */
-  public function testRenderDifferentWeight() {
+  public function testRenderDifferentWeight(): void {
     // If a library contains assets A and B, and A is listed first, then B can
     // still make itself appear first by defining a lower weight.
     $build['#attached']['library'][] = 'core/jquery';
@@ -376,7 +376,7 @@ public function testRenderDifferentWeight() {
    *
    * @see common_test_js_alter()
    */
-  public function testAlter() {
+  public function testAlter(): void {
     // Add both tableselect.js and alter.js.
     $build['#attached']['library'][] = 'core/drupal.tableselect';
     $build['#attached']['library'][] = 'common_test/hook_js_alter';
@@ -397,7 +397,7 @@ public function testAlter() {
    *
    * @see common_test_library_info_alter()
    */
-  public function testLibraryAlter() {
+  public function testLibraryAlter(): void {
     // Verify that common_test altered the title of loadjs.
     /** @var \Drupal\Core\Asset\LibraryDiscoveryInterface $library_discovery */
     $library_discovery = \Drupal::service('library.discovery');
@@ -416,7 +416,7 @@ public function testLibraryAlter() {
   /**
    * Dynamically defines an asset library and alters it.
    */
-  public function testDynamicLibrary() {
+  public function testDynamicLibrary(): void {
     /** @var \Drupal\Core\Asset\LibraryDiscoveryInterface $library_discovery */
     $library_discovery = \Drupal::service('library.discovery');
     // Retrieve a dynamic library definition.
@@ -438,7 +438,7 @@ public function testDynamicLibrary() {
    *
    * @see common_test.library.yml
    */
-  public function testLibraryNameConflicts() {
+  public function testLibraryNameConflicts(): void {
     /** @var \Drupal\Core\Asset\LibraryDiscoveryInterface $library_discovery */
     $library_discovery = \Drupal::service('library.discovery');
     $loadjs = $library_discovery->getLibraryByName('common_test', 'loadjs');
@@ -448,7 +448,7 @@ public function testLibraryNameConflicts() {
   /**
    * Tests JavaScript files that have query strings attached get added right.
    */
-  public function testAddJsFileWithQueryString() {
+  public function testAddJsFileWithQueryString(): void {
     $build['#attached']['library'][] = 'common_test/querystring';
     $assets = AttachedAssets::createFromRenderArray($build);
 
diff --git a/core/tests/Drupal/KernelTests/Core/Asset/LibraryDiscoveryIntegrationTest.php b/core/tests/Drupal/KernelTests/Core/Asset/LibraryDiscoveryIntegrationTest.php
index 9fd06a29d390..6c3096ff5df4 100644
--- a/core/tests/Drupal/KernelTests/Core/Asset/LibraryDiscoveryIntegrationTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Asset/LibraryDiscoveryIntegrationTest.php
@@ -40,7 +40,7 @@ protected function setUp(): void {
   /**
    * Tests that hook_library_info is invoked and the cache is cleared.
    */
-  public function testHookLibraryInfoByTheme() {
+  public function testHookLibraryInfoByTheme(): void {
     // Activate test_theme and verify that the library 'kitten' is added using
     // hook_library_info_alter().
     $this->activateTheme('test_theme');
@@ -55,7 +55,7 @@ public function testHookLibraryInfoByTheme() {
   /**
    * Tests that libraries-override are applied to library definitions.
    */
-  public function testLibrariesOverride() {
+  public function testLibrariesOverride(): void {
     // Assert some starterkit_theme libraries that will be overridden or
     // removed.
     $this->activateTheme('starterkit_theme');
@@ -96,7 +96,7 @@ public function testLibrariesOverride() {
   /**
    * Tests libraries-override on drupalSettings.
    */
-  public function testLibrariesOverrideDrupalSettings() {
+  public function testLibrariesOverrideDrupalSettings(): void {
     // Activate test theme that attempts to override drupalSettings.
     $this->activateTheme('test_theme_libraries_override_with_drupal_settings');
 
@@ -114,7 +114,7 @@ public function testLibrariesOverrideDrupalSettings() {
   /**
    * Tests libraries-override on malformed assets.
    */
-  public function testLibrariesOverrideMalformedAsset() {
+  public function testLibrariesOverrideMalformedAsset(): void {
     // Activate test theme that overrides with a malformed asset.
     $this->activateTheme('test_theme_libraries_override_with_invalid_asset');
 
@@ -132,7 +132,7 @@ public function testLibrariesOverrideMalformedAsset() {
   /**
    * Tests libraries overrides with multiple parent themes.
    */
-  public function testLibrariesOverridesMultiple() {
+  public function testLibrariesOverridesMultiple(): void {
     /** @var \Drupal\Core\Extension\ThemeInstallerInterface $theme_installer */
     $theme_installer = $this->container->get('theme_installer');
     $theme_installer->install(['test_basetheme']);
@@ -155,7 +155,7 @@ public function testLibrariesOverridesMultiple() {
   /**
    * Tests library assets with other ways for specifying paths.
    */
-  public function testLibrariesOverrideOtherAssetLibraryNames() {
+  public function testLibrariesOverrideOtherAssetLibraryNames(): void {
     // Activate a test theme that defines libraries overrides on other types of
     // assets.
     $this->activateTheme('test_theme');
@@ -176,7 +176,7 @@ public function testLibrariesOverrideOtherAssetLibraryNames() {
   /**
    * Tests that base theme libraries-override still apply in sub themes.
    */
-  public function testBaseThemeLibrariesOverrideInSubTheme() {
+  public function testBaseThemeLibrariesOverrideInSubTheme(): void {
     // Activate a test theme that has subthemes.
     $this->activateTheme('test_subtheme');
 
@@ -189,7 +189,7 @@ public function testBaseThemeLibrariesOverrideInSubTheme() {
   /**
    * Tests libraries-extend.
    */
-  public function testLibrariesExtend() {
+  public function testLibrariesExtend(): void {
     // Simulate starterkit_theme defining the test-navigation library.
     // @see theme_test_library_info_alter()
     $this->container->get('state')
@@ -253,7 +253,7 @@ public function testLibrariesExtend() {
    *
    * @group legacy
    */
-  public function testDeprecatedLibrary() {
+  public function testDeprecatedLibrary(): void {
     $this->expectDeprecation('Targeting theme_test/moved_from css/foo.css from test_theme_with_deprecated_libraries library_overrides is deprecated in drupal:X.0.0 and will be removed in drupal:Y.0.0. Target theme_test/moved_to css/base-remove.css instead. See https://example.com');
     $this->expectDeprecation('Targeting theme_test/moved_from js/bar.js from test_theme_with_deprecated_libraries library_overrides is deprecated in drupal:X.0.0 and will be removed in drupal:Y.0.0. Target theme_test/moved_to js/foo.js instead. See https://example.com');
     $this->expectDeprecation('Theme "theme_test" is overriding a deprecated library. The "theme_test/deprecated_library" asset library is deprecated in drupal:X.0.0 and is removed from drupal:Y.0.0. Use another library instead. See https://www.example.com');
diff --git a/core/tests/Drupal/KernelTests/Core/Asset/ResolvedLibraryDefinitionsFilesMatchTest.php b/core/tests/Drupal/KernelTests/Core/Asset/ResolvedLibraryDefinitionsFilesMatchTest.php
index dea01689cc58..3a7e1328ec1e 100644
--- a/core/tests/Drupal/KernelTests/Core/Asset/ResolvedLibraryDefinitionsFilesMatchTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Asset/ResolvedLibraryDefinitionsFilesMatchTest.php
@@ -154,7 +154,7 @@ protected function setUp(): void {
   /**
    * Ensures that all core module and theme library files exist.
    */
-  public function testCoreLibraryCompleteness() {
+  public function testCoreLibraryCompleteness(): void {
     // First verify all libraries with no active theme.
     $this->verifyLibraryFilesExist($this->getAllLibraries());
 
diff --git a/core/tests/Drupal/KernelTests/Core/Batch/BatchKernelTest.php b/core/tests/Drupal/KernelTests/Core/Batch/BatchKernelTest.php
index e625b1861c0c..a8c8af5fe7b6 100644
--- a/core/tests/Drupal/KernelTests/Core/Batch/BatchKernelTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Batch/BatchKernelTest.php
@@ -25,7 +25,7 @@ protected function setUp(): void {
   /**
    * Tests _batch_needs_update().
    */
-  public function testNeedsUpdate() {
+  public function testNeedsUpdate(): void {
     // Before ever being called, the return value should be FALSE.
     $this->assertEquals(FALSE, _batch_needs_update());
 
diff --git a/core/tests/Drupal/KernelTests/Core/Batch/BatchNegotiatorTest.php b/core/tests/Drupal/KernelTests/Core/Batch/BatchNegotiatorTest.php
index 466bc216aada..98ebeffd8fee 100644
--- a/core/tests/Drupal/KernelTests/Core/Batch/BatchNegotiatorTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Batch/BatchNegotiatorTest.php
@@ -25,7 +25,7 @@ class BatchNegotiatorTest extends KernelTestBase {
   /**
    * Test that the negotiator applies to the batch route.
    */
-  public function testApplies() {
+  public function testApplies(): void {
     $request = Request::create('/batch');
     // Use the router to enhance the object so that a RouteMatch can be created.
     $this->container->get('router')->matchRequest($request);
diff --git a/core/tests/Drupal/KernelTests/Core/Block/MultipleBlockFormTest.php b/core/tests/Drupal/KernelTests/Core/Block/MultipleBlockFormTest.php
index 0938a7d57670..07237a966f3f 100644
--- a/core/tests/Drupal/KernelTests/Core/Block/MultipleBlockFormTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Block/MultipleBlockFormTest.php
@@ -22,7 +22,7 @@ class MultipleBlockFormTest extends KernelTestBase {
   /**
    * Tests that blocks can have multiple forms.
    */
-  public function testMultipleForms() {
+  public function testMultipleForms(): void {
     $configuration = ['label' => 'A very cool block'];
     $block = \Drupal::service('plugin.manager.block')->createInstance('test_multiple_forms_block', $configuration);
 
diff --git a/core/tests/Drupal/KernelTests/Core/Bootstrap/ExtensionPathResolverTest.php b/core/tests/Drupal/KernelTests/Core/Bootstrap/ExtensionPathResolverTest.php
index 8773c449dc07..f143ef109dab 100644
--- a/core/tests/Drupal/KernelTests/Core/Bootstrap/ExtensionPathResolverTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Bootstrap/ExtensionPathResolverTest.php
@@ -96,7 +96,7 @@ public function testExtensionPathResolvingWithNonExistingThemeEngine(): void {
   /**
    * Tests the getPath() method with an unknown extension.
    */
-  public function testUnknownExtension() {
+  public function testUnknownExtension(): void {
     $module_extension_list = $this->prophesize(ModuleExtensionList::class);
     $profile_extension_list = $this->prophesize(ProfileExtensionList::class);
     $theme_extension_list = $this->prophesize(ThemeExtensionList::class);
diff --git a/core/tests/Drupal/KernelTests/Core/Bootstrap/ResettableStaticTest.php b/core/tests/Drupal/KernelTests/Core/Bootstrap/ResettableStaticTest.php
index 72b973c67d19..b3b4617de111 100644
--- a/core/tests/Drupal/KernelTests/Core/Bootstrap/ResettableStaticTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Bootstrap/ResettableStaticTest.php
@@ -19,7 +19,7 @@ class ResettableStaticTest extends KernelTestBase {
    * Tests that a variable reference returned by drupal_static() gets reset when
    * drupal_static_reset() is called.
    */
-  public function testDrupalStatic() {
+  public function testDrupalStatic(): void {
     $name = __CLASS__ . '_' . __METHOD__;
     $var = &drupal_static($name, 'foo');
     $this->assertEquals('foo', $var, 'Variable returned by drupal_static() was set to its default.');
diff --git a/core/tests/Drupal/KernelTests/Core/Bootstrap/ShutdownFunctionTest.php b/core/tests/Drupal/KernelTests/Core/Bootstrap/ShutdownFunctionTest.php
index 04d941089342..ab4223b0193e 100644
--- a/core/tests/Drupal/KernelTests/Core/Bootstrap/ShutdownFunctionTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Bootstrap/ShutdownFunctionTest.php
@@ -30,7 +30,7 @@ class ShutdownFunctionTest extends KernelTestBase {
   /**
    * Tests that shutdown functions can be added by other shutdown functions.
    */
-  public function testShutdownFunctionInShutdownFunction() {
+  public function testShutdownFunctionInShutdownFunction(): void {
     // Ensure there are no shutdown functions registered before starting the
     // test.
     $this->assertEmpty(drupal_register_shutdown_function());
diff --git a/core/tests/Drupal/KernelTests/Core/Cache/ApcuBackendTest.php b/core/tests/Drupal/KernelTests/Core/Cache/ApcuBackendTest.php
index c28e77b3e71f..33a7d71de935 100644
--- a/core/tests/Drupal/KernelTests/Core/Cache/ApcuBackendTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Cache/ApcuBackendTest.php
@@ -35,7 +35,7 @@ protected function tearDown(): void {
   /**
    * {@inheritdoc}
    */
-  public function testSetGet() {
+  public function testSetGet(): void {
     parent::testSetGet();
 
     // Make sure entries are permanent (i.e. no TTL).
diff --git a/core/tests/Drupal/KernelTests/Core/Cache/CacheCollectorTest.php b/core/tests/Drupal/KernelTests/Core/Cache/CacheCollectorTest.php
index 7b2040f79ba7..a6e24cddbd13 100644
--- a/core/tests/Drupal/KernelTests/Core/Cache/CacheCollectorTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Cache/CacheCollectorTest.php
@@ -39,7 +39,7 @@ public function register(ContainerBuilder $container) {
    *
    * @dataProvider providerTestInvalidCharacters
    */
-  public function testCacheCollector($cid, $key, $value) {
+  public function testCacheCollector($cid, $key, $value): void {
     $collector = new CacheCollectorHelper($cid, $this->container->get('cache.default'), $this->container->get('lock'));
     $this->assertNull($collector->get($key));
     $collector->set($key, $value);
diff --git a/core/tests/Drupal/KernelTests/Core/Cache/CacheContextOptimizationTest.php b/core/tests/Drupal/KernelTests/Core/Cache/CacheContextOptimizationTest.php
index 05a7f6438095..fc88361463f0 100644
--- a/core/tests/Drupal/KernelTests/Core/Cache/CacheContextOptimizationTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Cache/CacheContextOptimizationTest.php
@@ -36,7 +36,7 @@ protected function setUp(): void {
   /**
    * Ensures that 'user.permissions' cache context is able to define cache tags.
    */
-  public function testUserPermissionCacheContextOptimization() {
+  public function testUserPermissionCacheContextOptimization(): void {
     $user1 = $this->createUser();
     $this->assertEquals(1, $user1->id());
 
@@ -79,7 +79,7 @@ public function testUserPermissionCacheContextOptimization() {
   /**
    * Ensures that 'user.roles' still works when it is optimized away.
    */
-  public function testUserRolesCacheContextOptimization() {
+  public function testUserRolesCacheContextOptimization(): void {
     $root_user = $this->createUser();
     $this->assertEquals(1, $root_user->id());
 
diff --git a/core/tests/Drupal/KernelTests/Core/Cache/DatabaseBackendTagTest.php b/core/tests/Drupal/KernelTests/Core/Cache/DatabaseBackendTagTest.php
index 934042aac10f..98d6e6ca66a5 100644
--- a/core/tests/Drupal/KernelTests/Core/Cache/DatabaseBackendTagTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Cache/DatabaseBackendTagTest.php
@@ -36,7 +36,7 @@ public function register(ContainerBuilder $container) {
       ->addMethodCall('setContainer', [new Reference('service_container')]);
   }
 
-  public function testTagInvalidations() {
+  public function testTagInvalidations(): void {
     // Create cache entry in multiple bins.
     $tags = ['test_tag:1', 'test_tag:2', 'test_tag:3'];
     $bins = ['data', 'bootstrap', 'render'];
diff --git a/core/tests/Drupal/KernelTests/Core/Cache/DatabaseBackendTest.php b/core/tests/Drupal/KernelTests/Core/Cache/DatabaseBackendTest.php
index 3fd81fb6027d..5183e59f80b7 100644
--- a/core/tests/Drupal/KernelTests/Core/Cache/DatabaseBackendTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Cache/DatabaseBackendTest.php
@@ -48,7 +48,7 @@ protected function createCacheBackend($bin) {
   /**
    * {@inheritdoc}
    */
-  public function testSetGet() {
+  public function testSetGet(): void {
     parent::testSetGet();
     $backend = $this->getCacheBackend();
 
@@ -77,7 +77,7 @@ public function testSetGet() {
   /**
    * Tests the row count limiting of cache bin database tables.
    */
-  public function testGarbageCollection() {
+  public function testGarbageCollection(): void {
     $backend = $this->getCacheBackend();
     $max_rows = static::$maxRows;
 
@@ -125,7 +125,7 @@ protected function getNumRows() {
   /**
    * Test that the service "cache_tags.invalidator.checksum" is backend overridable.
    */
-  public function testCacheTagsInvalidatorChecksumIsBackendOverridable() {
+  public function testCacheTagsInvalidatorChecksumIsBackendOverridable(): void {
     $definition = $this->container->getDefinition('cache_tags.invalidator.checksum');
     $this->assertTrue($definition->hasTag('backend_overridable'));
   }
@@ -133,7 +133,7 @@ public function testCacheTagsInvalidatorChecksumIsBackendOverridable() {
   /**
    * Test that the service "cache.backend.database" is backend overridable.
    */
-  public function testCacheBackendDatabaseIsBackendOverridable() {
+  public function testCacheBackendDatabaseIsBackendOverridable(): void {
     $definition = $this->container->getDefinition('cache.backend.database');
     $this->assertTrue($definition->hasTag('backend_overridable'));
   }
diff --git a/core/tests/Drupal/KernelTests/Core/Cache/GenericCacheBackendUnitTestBase.php b/core/tests/Drupal/KernelTests/Core/Cache/GenericCacheBackendUnitTestBase.php
index 00a105175ab5..88888b997356 100644
--- a/core/tests/Drupal/KernelTests/Core/Cache/GenericCacheBackendUnitTestBase.php
+++ b/core/tests/Drupal/KernelTests/Core/Cache/GenericCacheBackendUnitTestBase.php
@@ -135,7 +135,7 @@ protected function tearDown(): void {
   /**
    * Tests the get and set methods of Drupal\Core\Cache\CacheBackendInterface.
    */
-  public function testSetGet() {
+  public function testSetGet(): void {
     $backend = $this->getCacheBackend();
 
     $this->assertFalse($backend->get('test1'), "Backend does not contain data for cache id test1.");
@@ -239,7 +239,7 @@ public function testSetGet() {
   /**
    * Tests Drupal\Core\Cache\CacheBackendInterface::delete().
    */
-  public function testDelete() {
+  public function testDelete(): void {
     $backend = $this->getCacheBackend();
 
     $this->assertFalse($backend->get('test1'), "Backend does not contain data for cache id test1.");
@@ -267,7 +267,7 @@ public function testDelete() {
   /**
    * Tests data type preservation.
    */
-  public function testValueTypeIsKept() {
+  public function testValueTypeIsKept(): void {
     $backend = $this->getCacheBackend();
 
     $variables = [
@@ -295,7 +295,7 @@ public function testValueTypeIsKept() {
   /**
    * Tests Drupal\Core\Cache\CacheBackendInterface::getMultiple().
    */
-  public function testGetMultiple() {
+  public function testGetMultiple(): void {
     $backend = $this->getCacheBackend();
 
     // Set numerous testing keys.
@@ -389,7 +389,7 @@ public function testGetMultiple() {
   /**
    * Tests \Drupal\Core\Cache\CacheBackendInterface::setMultiple().
    */
-  public function testSetMultiple() {
+  public function testSetMultiple(): void {
     $backend = $this->getCacheBackend();
 
     $future_expiration = \Drupal::time()->getRequestTime() + 100;
@@ -454,7 +454,7 @@ public function testSetMultiple() {
    * @covers \Drupal\Core\Cache\MemoryBackend::deleteMultiple
    * @covers \Drupal\Core\Cache\PhpBackend::deleteMultiple
    */
-  public function testDeleteMultiple() {
+  public function testDeleteMultiple(): void {
     $backend = $this->getCacheBackend();
 
     // Set numerous testing keys.
@@ -501,7 +501,7 @@ public function testDeleteMultiple() {
   /**
    * Tests Drupal\Core\Cache\CacheBackendInterface::deleteAll().
    */
-  public function testDeleteAll() {
+  public function testDeleteAll(): void {
     $backend_a = $this->getCacheBackend();
     $backend_b = $this->getCacheBackend('bootstrap');
 
@@ -531,7 +531,7 @@ public function testDeleteAll() {
    * @covers \Drupal\Core\Cache\MemoryBackend::invalidateMultiple
    * @covers \Drupal\Core\Cache\PhpBackend::invalidateMultiple
    */
-  public function testInvalidate() {
+  public function testInvalidate(): void {
     $backend = $this->getCacheBackend();
     $backend->set('test1', 1);
     $backend->set('test2', 2);
@@ -563,7 +563,7 @@ public function testInvalidate() {
   /**
    * Tests Drupal\Core\Cache\CacheBackendInterface::invalidateTags().
    */
-  public function testInvalidateTags() {
+  public function testInvalidateTags(): void {
     $backend = $this->getCacheBackend();
 
     // Create two cache entries with the same tag and tag value.
@@ -630,7 +630,7 @@ public function testInvalidateTags() {
   /**
    * Tests Drupal\Core\Cache\CacheBackendInterface::invalidateAll().
    */
-  public function testInvalidateAll() {
+  public function testInvalidateAll(): void {
     $backend_a = $this->getCacheBackend();
     $backend_b = $this->getCacheBackend('bootstrap');
 
@@ -651,7 +651,7 @@ public function testInvalidateAll() {
   /**
    * Tests Drupal\Core\Cache\CacheBackendInterface::removeBin().
    */
-  public function testRemoveBin() {
+  public function testRemoveBin(): void {
     $backend_a = $this->getCacheBackend();
     $backend_b = $this->getCacheBackend('bootstrap');
 
diff --git a/core/tests/Drupal/KernelTests/Core/Common/DrupalFlushAllCachesTest.php b/core/tests/Drupal/KernelTests/Core/Common/DrupalFlushAllCachesTest.php
index b4f8536e560f..bacbc6d1d1f8 100644
--- a/core/tests/Drupal/KernelTests/Core/Common/DrupalFlushAllCachesTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Common/DrupalFlushAllCachesTest.php
@@ -28,7 +28,7 @@ class DrupalFlushAllCachesTest extends KernelTestBase {
   /**
    * Tests that drupal_flush_all_caches() uses core.extension properly.
    */
-  public function testDrupalFlushAllCachesModuleList() {
+  public function testDrupalFlushAllCachesModuleList(): void {
     $this->assertFalse(function_exists('system_test_help'));
     $core_extension = \Drupal::configFactory()->getEditable('core.extension');
     $module = $core_extension->get('module');
diff --git a/core/tests/Drupal/KernelTests/Core/Common/XssUnitTest.php b/core/tests/Drupal/KernelTests/Core/Common/XssUnitTest.php
index 36f73adac43b..1c76f8c63321 100644
--- a/core/tests/Drupal/KernelTests/Core/Common/XssUnitTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Common/XssUnitTest.php
@@ -36,7 +36,7 @@ protected function setUp(): void {
   /**
    * Tests t() functionality.
    */
-  public function testT() {
+  public function testT(): void {
     $text = t('Simple text');
     $this->assertSame('Simple text', (string) $text, 't leaves simple text alone.');
     $text = t('Escaped text: @value', ['@value' => '<script>']);
@@ -48,7 +48,7 @@ public function testT() {
   /**
    * Checks that harmful protocols are stripped.
    */
-  public function testBadProtocolStripping() {
+  public function testBadProtocolStripping(): void {
     // Ensure that check_url() strips out harmful protocols, and encodes for
     // HTML.
     // Ensure \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols() can
diff --git a/core/tests/Drupal/KernelTests/Core/Config/CacheabilityMetadataConfigOverrideTest.php b/core/tests/Drupal/KernelTests/Core/Config/CacheabilityMetadataConfigOverrideTest.php
index bb0b194dd7cd..6234e106a461 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/CacheabilityMetadataConfigOverrideTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/CacheabilityMetadataConfigOverrideTest.php
@@ -40,7 +40,7 @@ protected function setUp(): void {
   /**
    * Tests if config overrides correctly set cacheability metadata.
    */
-  public function testConfigOverride() {
+  public function testConfigOverride(): void {
     // It's pirate day today!
     $GLOBALS['it_is_pirate_day'] = TRUE;
 
@@ -60,7 +60,7 @@ public function testConfigOverride() {
   /**
    * Tests if config overrides set cacheability metadata on config entities.
    */
-  public function testConfigEntityOverride() {
+  public function testConfigEntityOverride(): void {
     // It's pirate day today!
     $GLOBALS['it_is_pirate_day'] = TRUE;
 
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigCRUDTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigCRUDTest.php
index fec1d336a2e8..c337f574d62e 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigCRUDTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigCRUDTest.php
@@ -38,7 +38,7 @@ class ConfigCRUDTest extends KernelTestBase {
   /**
    * Tests CRUD operations.
    */
-  public function testCRUD() {
+  public function testCRUD(): void {
     $event_dispatcher = $this->container->get('event_dispatcher');
     $typed_config_manager = $this->container->get('config.typed');
 
@@ -190,7 +190,7 @@ public function testCRUD() {
   /**
    * Tests the validation of configuration object names.
    */
-  public function testNameValidation() {
+  public function testNameValidation(): void {
     // Verify that an object name without namespace causes an exception.
     $name = 'no_namespace';
     try {
@@ -240,7 +240,7 @@ public function testNameValidation() {
   /**
    * Tests the validation of configuration object values.
    */
-  public function testValueValidation() {
+  public function testValueValidation(): void {
     // Verify that setData() will catch dotted keys.
     try {
       $this->config('namespace.object')->setData(['key.value' => 12])->save();
@@ -263,7 +263,7 @@ public function testValueValidation() {
   /**
    * Tests data type handling.
    */
-  public function testDataTypes() {
+  public function testDataTypes(): void {
     \Drupal::service('module_installer')->install(['config_test']);
     $storage = new DatabaseStorage($this->container->get('database'), 'config');
     $name = 'config_test.types';
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigDependencyTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigDependencyTest.php
index f08353a95164..15dd093d763e 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigDependencyTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigDependencyTest.php
@@ -28,7 +28,7 @@ class ConfigDependencyTest extends EntityKernelTestBase {
   /**
    * Tests that calculating dependencies for system module.
    */
-  public function testNonEntity() {
+  public function testNonEntity(): void {
     $this->installConfig(['system']);
     $config_manager = \Drupal::service('config.manager');
     $dependents = $config_manager->findConfigEntityDependencies('module', ['system']);
@@ -42,7 +42,7 @@ public function testNonEntity() {
   /**
    * Tests creating dependencies on configuration entities.
    */
-  public function testDependencyManagement() {
+  public function testDependencyManagement(): void {
     /** @var \Drupal\Core\Config\ConfigManagerInterface $config_manager */
     $config_manager = \Drupal::service('config.manager');
     $storage = $this->container->get('entity_type.manager')->getStorage('config_test');
@@ -190,7 +190,7 @@ public function testDependencyManagement() {
   /**
    * Tests ConfigManager::uninstall() and config entity dependency management.
    */
-  public function testConfigEntityUninstall() {
+  public function testConfigEntityUninstall(): void {
     /** @var \Drupal\Core\Config\ConfigManagerInterface $config_manager */
     $config_manager = \Drupal::service('config.manager');
     /** @var \Drupal\Core\Config\Entity\ConfigEntityStorage $storage */
@@ -250,7 +250,7 @@ public static function providerConfigEntityUninstallComplex() {
    *
    * @dataProvider providerConfigEntityUninstallComplex
    */
-  public function testConfigEntityUninstallComplex(array $entity_id_suffixes) {
+  public function testConfigEntityUninstallComplex(array $entity_id_suffixes): void {
     /** @var \Drupal\Core\Config\ConfigManagerInterface $config_manager */
     $config_manager = \Drupal::service('config.manager');
     /** @var \Drupal\Core\Config\Entity\ConfigEntityStorage $storage */
@@ -375,7 +375,7 @@ public function testConfigEntityUninstallComplex(array $entity_id_suffixes) {
    * @covers ::uninstall
    * @covers ::getConfigEntitiesToChangeOnDependencyRemoval
    */
-  public function testConfigEntityUninstallThirdParty() {
+  public function testConfigEntityUninstallThirdParty(): void {
     /** @var \Drupal\Core\Config\ConfigManagerInterface $config_manager */
     $config_manager = \Drupal::service('config.manager');
     /** @var \Drupal\Core\Config\Entity\ConfigEntityStorage $storage */
@@ -490,7 +490,7 @@ public function testConfigEntityUninstallThirdParty() {
   /**
    * Tests deleting a configuration entity and dependency management.
    */
-  public function testConfigEntityDelete() {
+  public function testConfigEntityDelete(): void {
     /** @var \Drupal\Core\Config\ConfigManagerInterface $config_manager */
     $config_manager = \Drupal::service('config.manager');
     /** @var \Drupal\Core\Config\Entity\ConfigEntityStorage $storage */
@@ -597,7 +597,7 @@ public function testConfigEntityDelete() {
    *
    * @see \Drupal\Core\Config\ConfigManager::getConfigEntitiesToChangeOnDependencyRemoval()
    */
-  public function testContentEntityDelete() {
+  public function testContentEntityDelete(): void {
     $this->installEntitySchema('entity_test');
     /** @var \Drupal\Core\Config\ConfigManagerInterface $config_manager */
     $config_manager = \Drupal::service('config.manager');
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigDiffTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigDiffTest.php
index 3e046f4ce8f4..486b3b988f91 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigDiffTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigDiffTest.php
@@ -23,7 +23,7 @@ class ConfigDiffTest extends KernelTestBase {
   /**
    * Tests calculating the difference between two sets of configuration.
    */
-  public function testDiff() {
+  public function testDiff(): void {
     $active = $this->container->get('config.storage');
     $sync = $this->container->get('config.storage.sync');
     $config_name = 'config_test.system';
@@ -110,7 +110,7 @@ public function testDiff() {
   /**
    * Tests calculating the difference between two sets of config collections.
    */
-  public function testCollectionDiff() {
+  public function testCollectionDiff(): void {
     /** @var \Drupal\Core\Config\StorageInterface $active */
     $active = $this->container->get('config.storage');
     /** @var \Drupal\Core\Config\StorageInterface $sync */
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityNormalizeTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityNormalizeTest.php
index 72bfd31c6cc7..6b8e09b9384a 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityNormalizeTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityNormalizeTest.php
@@ -28,7 +28,7 @@ protected function setUp(): void {
     $this->installConfig(static::$modules);
   }
 
-  public function testNormalize() {
+  public function testNormalize(): void {
     $config_entity = \Drupal::entityTypeManager()->getStorage('config_test')->create(['id' => 'system', 'label' => 'foobar', 'weight' => 1]);
     $config_entity->save();
 
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityStaticCacheTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityStaticCacheTest.php
index c3187283a520..faf68e746d52 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityStaticCacheTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityStaticCacheTest.php
@@ -54,7 +54,7 @@ protected function setUp(): void {
   /**
    * Tests that the static cache is working.
    */
-  public function testCacheHit() {
+  public function testCacheHit(): void {
     $storage = $this->container->get('entity_type.manager')
       ->getStorage($this->entityTypeId);
     $entity_1 = $storage->load($this->entityId);
@@ -68,7 +68,7 @@ public function testCacheHit() {
   /**
    * Tests that the static cache is reset on entity save and delete.
    */
-  public function testReset() {
+  public function testReset(): void {
     $storage = $this->container->get('entity_type.manager')
       ->getStorage($this->entityTypeId);
     $entity = $storage->load($this->entityId);
@@ -89,7 +89,7 @@ public function testReset() {
   /**
    * Tests that the static cache is sensitive to config overrides.
    */
-  public function testConfigOverride() {
+  public function testConfigOverride(): void {
     /** @var \Drupal\Core\Config\Entity\ConfigEntityStorage $storage */
     $storage = \Drupal::entityTypeManager()->getStorage($this->entityTypeId);
     // Prime the cache prior to adding a config override.
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityStatusTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityStatusTest.php
index b97afec13295..6d0fd3cb5f13 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityStatusTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityStatusTest.php
@@ -23,7 +23,7 @@ class ConfigEntityStatusTest extends KernelTestBase {
   /**
    * Tests the enabling/disabling of entities.
    */
-  public function testCRUD() {
+  public function testCRUD(): void {
     $entity = \Drupal::entityTypeManager()->getStorage('config_test')->create([
       'id' => $this->randomMachineName(),
     ]);
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityStorageTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityStorageTest.php
index aaa68aec21a4..981e1b451a44 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityStorageTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityStorageTest.php
@@ -24,7 +24,7 @@ class ConfigEntityStorageTest extends KernelTestBase {
   /**
    * Tests creating configuration entities with changed UUIDs.
    */
-  public function testUUIDConflict() {
+  public function testUUIDConflict(): void {
     $entity_type = 'config_test';
     $id = 'test_1';
     // Load the original configuration entity.
@@ -57,7 +57,7 @@ public function testUUIDConflict() {
    *
    * @covers \Drupal\Core\Config\Entity\ConfigEntityStorage::hasData
    */
-  public function testHasData() {
+  public function testHasData(): void {
     $storage = \Drupal::entityTypeManager()->getStorage('config_test');
     $this->assertFalse($storage->hasData());
 
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityUnitTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityUnitTest.php
index 26c98c8ec42a..2195b56e5b83 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityUnitTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityUnitTest.php
@@ -47,7 +47,7 @@ protected function setUp(): void {
   /**
    * Tests storage methods.
    */
-  public function testStorageMethods() {
+  public function testStorageMethods(): void {
     $entity_type = \Drupal::entityTypeManager()->getDefinition('config_test');
 
     // Test the static extractID() method.
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigEventsTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigEventsTest.php
index ce8bbacd0b1c..338de54aedb8 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigEventsTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigEventsTest.php
@@ -25,7 +25,7 @@ class ConfigEventsTest extends KernelTestBase {
   /**
    * Tests configuration events.
    */
-  public function testConfigEvents() {
+  public function testConfigEvents(): void {
     $name = 'config_events_test.test';
 
     $config = new Config($name, \Drupal::service('config.storage'), \Drupal::service('event_dispatcher'), \Drupal::service('config.typed'));
@@ -57,7 +57,7 @@ public function testConfigEvents() {
   /**
    * Tests configuration rename event that is fired from the ConfigFactory.
    */
-  public function testConfigRenameEvent() {
+  public function testConfigRenameEvent(): void {
     $name = 'config_events_test.test';
     $new_name = 'config_events_test.test_rename';
     $GLOBALS['config'][$name] = ['key' => 'overridden'];
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigExportStorageTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigExportStorageTest.php
index da1af33e63e2..1c559822b037 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigExportStorageTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigExportStorageTest.php
@@ -31,7 +31,7 @@ protected function setUp(): void {
   /**
    * Tests configuration override.
    */
-  public function testExportStorage() {
+  public function testExportStorage(): void {
     /** @var \Drupal\Core\Config\StorageInterface $active */
     $active = $this->container->get('config.storage');
     /** @var \Drupal\Core\Config\StorageInterface $export */
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigFileContentTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigFileContentTest.php
index a68d87435ea6..6de861d79459 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigFileContentTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigFileContentTest.php
@@ -27,7 +27,7 @@ class ConfigFileContentTest extends KernelTestBase {
   /**
    * Tests setting, writing, and reading of a configuration setting.
    */
-  public function testReadWriteConfig() {
+  public function testReadWriteConfig(): void {
     $storage = $this->container->get('config.storage');
 
     $name = 'foo.bar';
@@ -190,7 +190,7 @@ public function testReadWriteConfig() {
   /**
    * Tests serialization of configuration to file.
    */
-  public function testSerialization() {
+  public function testSerialization(): void {
     $name = $this->randomMachineName(10) . '.' . $this->randomMachineName(10);
     $config_data = [
       // Indexed arrays; the order of elements is essential.
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigImportRecreateTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigImportRecreateTest.php
index cdb689f013f8..48aa85b29a69 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigImportRecreateTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigImportRecreateTest.php
@@ -61,7 +61,7 @@ protected function setUp(): void {
     );
   }
 
-  public function testRecreateEntity() {
+  public function testRecreateEntity(): void {
     $type_name = $this->randomMachineName(16);
     $content_type = NodeType::create([
       'type' => $type_name,
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigImportRenameValidationTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigImportRenameValidationTest.php
index 7dce04602ea0..326e2a823d96 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigImportRenameValidationTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigImportRenameValidationTest.php
@@ -73,7 +73,7 @@ protected function setUp(): void {
   /**
    * Tests configuration renaming validation.
    */
-  public function testRenameValidation() {
+  public function testRenameValidation(): void {
     // Create a test entity.
     $test_entity_id = $this->randomMachineName();
     $test_entity = \Drupal::entityTypeManager()->getStorage('config_test')->create([
@@ -123,7 +123,7 @@ public function testRenameValidation() {
   /**
    * Tests configuration renaming validation for simple configuration.
    */
-  public function testRenameSimpleConfigValidation() {
+  public function testRenameSimpleConfigValidation(): void {
     $uuid = new Php();
     // Create a simple configuration with a UUID.
     $config = $this->config('config_test.new');
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigImporterMissingContentTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigImporterMissingContentTest.php
index b76e2e00fce0..2ab178cbaf62 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigImporterMissingContentTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigImporterMissingContentTest.php
@@ -105,7 +105,7 @@ protected function setUp(): void {
    * @see \Drupal\Core\Config\ConfigImporter::processMissingContent()
    * @see \Drupal\config_import_test\EventSubscriber
    */
-  public function testMissingContent() {
+  public function testMissingContent(): void {
     \Drupal::state()->set('config_import_test.config_import_missing_content', TRUE);
 
     // Update a configuration entity in the sync directory to have a dependency
@@ -143,7 +143,7 @@ public function testMissingContent() {
    * @see \Drupal\Core\Config\ConfigImporter::processMissingContent()
    * @see \Drupal\config_import_test\EventSubscriber
    */
-  public function testMissingBlockContent() {
+  public function testMissingBlockContent(): void {
     $this->enableModules([
       'block',
       'block_content',
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigImporterTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigImporterTest.php
index 2f588e3fff97..620126e5012b 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigImporterTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigImporterTest.php
@@ -49,7 +49,7 @@ protected function setUp(): void {
   /**
    * Tests omission of module APIs for bare configuration operations.
    */
-  public function testNoImport() {
+  public function testNoImport(): void {
     $dynamic_name = 'config_test.dynamic.dotted.default';
 
     // Verify the default configuration values exist.
@@ -63,7 +63,7 @@ public function testNoImport() {
   /**
    * Tests that trying to import from empty sync configuration directory fails.
    */
-  public function testEmptyImportFails() {
+  public function testEmptyImportFails(): void {
     $this->expectException(ConfigImporterException::class);
     $this->container->get('config.storage.sync')->deleteAll();
     $this->configImporter()->import();
@@ -72,7 +72,7 @@ public function testEmptyImportFails() {
   /**
    * Tests verification of site UUID before importing configuration.
    */
-  public function testSiteUuidValidate() {
+  public function testSiteUuidValidate(): void {
     $sync = \Drupal::service('config.storage.sync');
     // Create updated configuration object.
     $config_data = $this->config('system.site')->get();
@@ -102,7 +102,7 @@ public function testSiteUuidValidate() {
   /**
    * Tests deletion of configuration during import.
    */
-  public function testDeleted() {
+  public function testDeleted(): void {
     $dynamic_name = 'config_test.dynamic.dotted.default';
     $storage = $this->container->get('config.storage');
     $sync = $this->container->get('config.storage.sync');
@@ -140,7 +140,7 @@ public function testDeleted() {
   /**
    * Tests creation of configuration during import.
    */
-  public function testNew() {
+  public function testNew(): void {
     $dynamic_name = 'config_test.dynamic.new';
     $storage = $this->container->get('config.storage');
     $sync = $this->container->get('config.storage.sync');
@@ -195,7 +195,7 @@ public function testNew() {
   /**
    * Tests that secondary writes are overwritten.
    */
-  public function testSecondaryWritePrimaryFirst() {
+  public function testSecondaryWritePrimaryFirst(): void {
     $name_primary = 'config_test.dynamic.primary';
     $name_secondary = 'config_test.dynamic.secondary';
     $sync = $this->container->get('config.storage.sync');
@@ -242,7 +242,7 @@ public function testSecondaryWritePrimaryFirst() {
   /**
    * Tests that secondary writes are overwritten.
    */
-  public function testSecondaryWriteSecondaryFirst() {
+  public function testSecondaryWriteSecondaryFirst(): void {
     $name_primary = 'config_test.dynamic.primary';
     $name_secondary = 'config_test.dynamic.secondary';
     $sync = $this->container->get('config.storage.sync');
@@ -289,7 +289,7 @@ public function testSecondaryWriteSecondaryFirst() {
   /**
    * Tests that secondary updates for deleted files work as expected.
    */
-  public function testSecondaryUpdateDeletedParentFirst() {
+  public function testSecondaryUpdateDeletedParentFirst(): void {
     $name_dependency = 'config_test.dynamic.dependency';
     $name_dependent = 'config_test.dynamic.dependent';
     $name_other = 'config_test.dynamic.other';
@@ -376,7 +376,7 @@ public function testSecondaryUpdateDeletedParentFirst() {
    * configuration tree imports. Therefore, any configuration updates that cause
    * secondary deletes should be reflected already in the staged configuration.
    */
-  public function testSecondaryUpdateDeletedChildFirst() {
+  public function testSecondaryUpdateDeletedChildFirst(): void {
     $name_dependency = 'config_test.dynamic.dependency';
     $name_dependent = 'config_test.dynamic.dependent';
     $storage = $this->container->get('config.storage');
@@ -423,7 +423,7 @@ public function testSecondaryUpdateDeletedChildFirst() {
   /**
    * Tests that secondary deletes for deleted files work as expected.
    */
-  public function testSecondaryDeletedChildSecond() {
+  public function testSecondaryDeletedChildSecond(): void {
     $name_dependency = 'config_test.dynamic.dependency';
     $name_dependent = 'config_test.dynamic.dependent';
     $storage = $this->container->get('config.storage');
@@ -466,7 +466,7 @@ public function testSecondaryDeletedChildSecond() {
   /**
    * Tests updating of configuration during import.
    */
-  public function testUpdated() {
+  public function testUpdated(): void {
     $name = 'config_test.system';
     $dynamic_name = 'config_test.dynamic.dotted.default';
     $storage = $this->container->get('config.storage');
@@ -524,7 +524,7 @@ public function testUpdated() {
   /**
    * Tests the isInstallable method()
    */
-  public function testIsInstallable() {
+  public function testIsInstallable(): void {
     $config_name = 'config_test.dynamic.isinstallable';
     $this->assertFalse($this->container->get('config.storage')->exists($config_name));
     \Drupal::state()->set('config_test.isinstallable', TRUE);
@@ -538,7 +538,7 @@ public function testIsInstallable() {
    * @see \Drupal\Core\EventSubscriber\ConfigImportSubscriber
    * @see \Drupal\Core\Config\ConfigImporter::createExtensionChangelist()
    */
-  public function testUnmetDependency() {
+  public function testUnmetDependency(): void {
     $storage = $this->container->get('config.storage');
     $sync = $this->container->get('config.storage.sync');
 
@@ -650,7 +650,7 @@ public function testUnmetDependency() {
    *
    * @see \Drupal\Core\EventSubscriber\ConfigImportSubscriber
    */
-  public function testMissingCoreExtension() {
+  public function testMissingCoreExtension(): void {
     $sync = $this->container->get('config.storage.sync');
     $sync->delete('core.extension');
     $config_importer = $this->configImporter();
@@ -671,7 +671,7 @@ public function testMissingCoreExtension() {
    *
    * @see \Drupal\Core\EventSubscriber\ConfigImportSubscriber
    */
-  public function testRequiredModuleValidation() {
+  public function testRequiredModuleValidation(): void {
     $sync = $this->container->get('config.storage.sync');
 
     $extensions = $sync->read('core.extension');
@@ -695,7 +695,7 @@ public function testRequiredModuleValidation() {
    *
    * @see \Drupal\Core\EventSubscriber\ConfigImportSubscriber
    */
-  public function testInstallBaseAndSubThemes() {
+  public function testInstallBaseAndSubThemes(): void {
     $sync = $this->container->get('config.storage.sync');
     $extensions = $sync->read('core.extension');
     $extensions['theme']['test_basetheme'] = 0;
@@ -726,7 +726,7 @@ public function testInstallBaseAndSubThemes() {
    *
    * @see \Drupal\Core\EventSubscriber\ConfigImportSubscriber
    */
-  public function testInstallProfile() {
+  public function testInstallProfile(): void {
     $sync = $this->container->get('config.storage.sync');
 
     $extensions = $sync->read('core.extension');
@@ -753,7 +753,7 @@ public function testInstallProfile() {
    *
    * @see \Drupal\Core\EventSubscriber\ConfigImportSubscriber
    */
-  public function testInstallProfileMisMatch() {
+  public function testInstallProfileMisMatch(): void {
     // Install profiles can not be changed. They can only be uninstalled. We
     // need to set an install profile prior to testing because KernelTestBase
     // tests do not use one.
@@ -781,7 +781,7 @@ public function testInstallProfileMisMatch() {
   /**
    * Tests the isSyncing flags.
    */
-  public function testIsSyncingInHooks() {
+  public function testIsSyncingInHooks(): void {
     $dynamic_name = 'config_test.dynamic.dotted.default';
     $storage = $this->container->get('config.storage');
 
@@ -880,7 +880,7 @@ public function testIsSyncingInHooks() {
   /**
    * Tests that the isConfigSyncing flag is cleanup after an invalid step.
    */
-  public function testInvalidStep() {
+  public function testInvalidStep(): void {
     $this->assertFalse(\Drupal::isConfigSyncing(), 'Before an import \Drupal::isConfigSyncing() returns FALSE');
     $context = [];
     $config_importer = $this->configImporter();
@@ -897,7 +897,7 @@ public function testInvalidStep() {
   /**
    * Tests that the isConfigSyncing flag is set correctly during a custom step.
    */
-  public function testCustomStep() {
+  public function testCustomStep(): void {
     $this->assertFalse(\Drupal::isConfigSyncing(), 'Before an import \Drupal::isConfigSyncing() returns FALSE');
     $context = [];
     $this->configImporter()->doSyncStep(self::customStep(...), $context);
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigInstallTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigInstallTest.php
index 5587ff1daca1..66c977c44144 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigInstallTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigInstallTest.php
@@ -37,7 +37,7 @@ protected function setUp(): void {
   /**
    * Tests module installation.
    */
-  public function testModuleInstallation() {
+  public function testModuleInstallation(): void {
     $default_config = 'config_test.system';
     $default_configuration_entity = 'config_test.dynamic.dotted.default';
 
@@ -87,7 +87,7 @@ public function testModuleInstallation() {
   /**
    * Tests that collections are ignored if the event does not return anything.
    */
-  public function testCollectionInstallationNoCollections() {
+  public function testCollectionInstallationNoCollections(): void {
     // Install the test module.
     $this->enableModules(['config_collection_install_test']);
     $this->installConfig(['config_collection_install_test']);
@@ -99,7 +99,7 @@ public function testCollectionInstallationNoCollections() {
   /**
    * Tests config objects in collections are installed as expected.
    */
-  public function testCollectionInstallationCollections() {
+  public function testCollectionInstallationCollections(): void {
     $collections = [
       'another_collection',
       'collection.test1',
@@ -178,7 +178,7 @@ public function testCollectionInstallationCollections() {
    * matching name but does not support config entities it should be created
    * using simple configuration.
    */
-  public function testCollectionInstallationCollectionConfigEntity() {
+  public function testCollectionInstallationCollectionConfigEntity(): void {
     $collections = [
       'entity',
     ];
@@ -205,7 +205,7 @@ public function testCollectionInstallationCollectionConfigEntity() {
   /**
    * Tests the configuration with unmet dependencies is not installed.
    */
-  public function testDependencyChecking() {
+  public function testDependencyChecking(): void {
     $this->installModules(['config_test']);
     try {
       $this->installModules(['config_install_dependency_test']);
@@ -247,7 +247,7 @@ public function testDependencyChecking() {
   /**
    * Tests imported configuration entities with/without language information.
    */
-  public function testLanguage() {
+  public function testLanguage(): void {
     $this->installModules(['config_test_language']);
     // Test imported configuration with implicit language code.
     $storage = new InstallStorage();
@@ -264,7 +264,7 @@ public function testLanguage() {
   /**
    * Tests installing configuration where the filename and ID do not match.
    */
-  public function testIdMisMatch() {
+  public function testIdMisMatch(): void {
     $this->expectException(\LogicException::class);
     $this->expectExceptionMessage('The configuration name "config_test.dynamic.no_id_match" does not match the ID "does_not_match"');
     $this->installModules(['config_test_id_mismatch']);
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigLanguageOverrideTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigLanguageOverrideTest.php
index 3b49870ef1be..fc72ccf42588 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigLanguageOverrideTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigLanguageOverrideTest.php
@@ -38,7 +38,7 @@ protected function setUp(): void {
   /**
    * Tests locale override based on language.
    */
-  public function testConfigLanguageOverride() {
+  public function testConfigLanguageOverride(): void {
     // The language module implements a config factory override object that
     // overrides configuration when the Language module is enabled. This test ensures that
     // English overrides work.
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigModuleOverridesTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigModuleOverridesTest.php
index 12cb8e35a9ef..a1dbb2ca6c22 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigModuleOverridesTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigModuleOverridesTest.php
@@ -20,7 +20,7 @@ class ConfigModuleOverridesTest extends KernelTestBase {
    */
   protected static $modules = ['system', 'config', 'config_override_test'];
 
-  public function testSimpleModuleOverrides() {
+  public function testSimpleModuleOverrides(): void {
     $GLOBALS['config_test_run_module_overrides'] = TRUE;
     $name = 'system.site';
     $overridden_name = 'Wow overridden site name';
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigOverrideTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigOverrideTest.php
index ea595dc33608..85117c48843a 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigOverrideTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigOverrideTest.php
@@ -32,7 +32,7 @@ protected function setUp(): void {
   /**
    * Tests configuration override.
    */
-  public function testConfOverride() {
+  public function testConfOverride(): void {
     $expected_original_data = [
       'foo' => 'bar',
       'baz' => NULL,
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigOverridesPriorityTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigOverridesPriorityTest.php
index 3e4e5bc0af54..67fcaacd2b42 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigOverridesPriorityTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigOverridesPriorityTest.php
@@ -32,7 +32,7 @@ class ConfigOverridesPriorityTest extends KernelTestBase {
     'language',
   ];
 
-  public function testOverridePriorities() {
+  public function testOverridePriorities(): void {
     $GLOBALS['config_test_run_module_overrides'] = FALSE;
 
     $non_overridden_mail = 'site@example.com';
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigSchemaDeprecationTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigSchemaDeprecationTest.php
index d2068e1696c7..d09ee7846ec4 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigSchemaDeprecationTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigSchemaDeprecationTest.php
@@ -24,7 +24,7 @@ class ConfigSchemaDeprecationTest extends KernelTestBase {
   /**
    * Tests config schema deprecation.
    */
-  public function testConfigSchemaDeprecation() {
+  public function testConfigSchemaDeprecation(): void {
     $this->expectDeprecation('The \'complex_structure_deprecated\' config schema is deprecated in drupal:9.1.0 and is removed from drupal 10.0.0. Use the \'complex_structure\' config schema instead. See http://drupal.org/node/the-change-notice-nid.');
     $config = $this->config('config_schema_deprecated_test.settings');
     $config
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigSchemaTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigSchemaTest.php
index 90763605718e..5de26c1c2309 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigSchemaTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigSchemaTest.php
@@ -48,7 +48,7 @@ protected function setUp(): void {
   /**
    * Tests the basic metadata retrieval layer.
    */
-  public function testSchemaMapping() {
+  public function testSchemaMapping(): void {
     // Nonexistent configuration key will have Undefined as metadata.
     $this->assertFalse(\Drupal::service('config.typed')->hasConfigSchema('config_schema_test.no_such_key'));
     $definition = \Drupal::service('config.typed')->getDefinition('config_schema_test.no_such_key');
@@ -320,7 +320,7 @@ public function testSchemaMapping() {
   /**
    * Tests metadata retrieval with several levels of %parent indirection.
    */
-  public function testSchemaMappingWithParents() {
+  public function testSchemaMappingWithParents(): void {
     $config_data = \Drupal::service('config.typed')->get('config_schema_test.some_schema.with_parents');
 
     // Test fetching parent one level up.
@@ -366,7 +366,7 @@ public function testSchemaMappingWithParents() {
   /**
    * Tests metadata applied to configuration objects.
    */
-  public function testSchemaData() {
+  public function testSchemaData(): void {
     // Try a simple property.
     $meta = \Drupal::service('config.typed')->get('system.site');
     $property = $meta->get('page')->get('front');
@@ -414,7 +414,7 @@ public function testSchemaData() {
   /**
    * Tests configuration value data type enforcement using schemas.
    */
-  public function testConfigSaveWithSchema() {
+  public function testConfigSaveWithSchema(): void {
     $untyped_values = [
       // Test a custom type.
       'config_schema_test_integer' => '1',
@@ -484,7 +484,7 @@ public function testConfigSaveWithSchema() {
   /**
    * Test configuration value data type enforcement using schemas.
    */
-  public function testConfigSaveMappingSort() {
+  public function testConfigSaveMappingSort(): void {
     // Top level map sorting.
     $data = [
       'foo' => '1',
@@ -502,7 +502,7 @@ public function testConfigSaveMappingSort() {
   /**
    * Tests configuration sequence sorting using schemas.
    */
-  public function testConfigSaveWithSequenceSorting() {
+  public function testConfigSaveWithSequenceSorting(): void {
     $data = [
       'keyed_sort' => [
         'b' => '1',
@@ -572,7 +572,7 @@ public function testConfigSaveWithSequenceSorting() {
   /**
    * Tests fallback to a greedy wildcard.
    */
-  public function testSchemaFallback() {
+  public function testSchemaFallback(): void {
     $definition = \Drupal::service('config.typed')->getDefinition('config_schema_test.wildcard_fallback.something');
     // This should be the schema of config_schema_test.wildcard_fallback.*.
     $expected = [];
@@ -607,7 +607,7 @@ public function testSchemaFallback() {
    *
    * @see \Drupal\Core\Config\TypedConfigManager::getFallbackName()
    */
-  public function testColonsInSchemaTypeDetermination() {
+  public function testColonsInSchemaTypeDetermination(): void {
     $tests = \Drupal::service('config.typed')->get('config_schema_test.plugin_types')->get('tests')->getElements();
     $definition = $tests[0]->getDataDefinition()->toArray();
     $this->assertEquals('test.plugin_types.boolean', $definition['type']);
@@ -638,7 +638,7 @@ public function testColonsInSchemaTypeDetermination() {
   /**
    * Tests hook_config_schema_info_alter().
    */
-  public function testConfigSchemaInfoAlter() {
+  public function testConfigSchemaInfoAlter(): void {
     /** @var \Drupal\Core\Config\TypedConfigManagerInterface $typed_config */
     $typed_config = \Drupal::service('config.typed');
     $typed_config->clearCachedDefinitions();
@@ -682,7 +682,7 @@ public function testConfigSchemaInfoAlter() {
   /**
    * Tests saving config when the type is wrapped by a dynamic type.
    */
-  public function testConfigSaveWithWrappingSchema() {
+  public function testConfigSaveWithWrappingSchema(): void {
     $untyped_values = [
       'tests' => [
         [
@@ -713,7 +713,7 @@ public function testConfigSaveWithWrappingSchema() {
   /**
    * Tests dynamic config schema type with multiple sub-key references.
    */
-  public function testConfigSaveWithWrappingSchemaDoubleBrackets() {
+  public function testConfigSaveWithWrappingSchemaDoubleBrackets(): void {
     $untyped_values = [
       'tests' => [
         [
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigSnapshotTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigSnapshotTest.php
index d28e8a342cc3..12f87482d903 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigSnapshotTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigSnapshotTest.php
@@ -36,7 +36,7 @@ protected function setUp(): void {
   /**
    * Tests config snapshot creation and updating.
    */
-  public function testSnapshot() {
+  public function testSnapshot(): void {
     $active = $this->container->get('config.storage');
     $sync = $this->container->get('config.storage.sync');
     $snapshot = $this->container->get('config.storage.snapshot');
diff --git a/core/tests/Drupal/KernelTests/Core/Config/Entity/ConfigEntityUpdaterTest.php b/core/tests/Drupal/KernelTests/Core/Config/Entity/ConfigEntityUpdaterTest.php
index 4ba44d26d07d..142c1b975860 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/Entity/ConfigEntityUpdaterTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/Entity/ConfigEntityUpdaterTest.php
@@ -26,7 +26,7 @@ class ConfigEntityUpdaterTest extends KernelTestBase {
   /**
    * @covers ::update
    */
-  public function testUpdate() {
+  public function testUpdate(): void {
     // Create some entities to update.
     $storage = $this->container->get('entity_type.manager')->getStorage('config_test');
     for ($i = 0; $i < 15; $i++) {
@@ -79,7 +79,7 @@ public function testUpdate() {
   /**
    * @covers ::update
    */
-  public function testUpdateDefaultCallback() {
+  public function testUpdateDefaultCallback(): void {
     // Create some entities to update.
     $storage = $this->container->get('entity_type.manager')->getStorage('config_test');
     for ($i = 0; $i < 15; $i++) {
@@ -119,7 +119,7 @@ public function testUpdateDefaultCallback() {
   /**
    * @covers ::update
    */
-  public function testUpdateException() {
+  public function testUpdateException(): void {
     $this->enableModules(['entity_test']);
     $this->expectException(\InvalidArgumentException::class);
     $this->expectExceptionMessage('The provided entity type ID \'entity_test_mul_changed\' is not a configuration entity type');
@@ -131,7 +131,7 @@ public function testUpdateException() {
   /**
    * @covers ::update
    */
-  public function testUpdateOncePerUpdateException() {
+  public function testUpdateOncePerUpdateException(): void {
     $this->expectException(\RuntimeException::class);
     $this->expectExceptionMessage('Updating multiple entity types in the same update function is not supported');
     $updater = $this->container->get('class_resolver')->getInstanceFromDefinition(ConfigEntityUpdater::class);
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ExcludedModulesEventSubscriberTest.php b/core/tests/Drupal/KernelTests/Core/Config/ExcludedModulesEventSubscriberTest.php
index ed778a83a575..469c6e76478b 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ExcludedModulesEventSubscriberTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ExcludedModulesEventSubscriberTest.php
@@ -34,7 +34,7 @@ protected function setUp(): void {
   /**
    * Tests excluding modules from the config export.
    */
-  public function testExcludedModules() {
+  public function testExcludedModules(): void {
     // Assert that config_test is in the active config.
     $active = $this->container->get('config.storage');
     $this->assertNotEmpty($active->listAll('config_test.'));
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ExportStorageManagerTest.php b/core/tests/Drupal/KernelTests/Core/Config/ExportStorageManagerTest.php
index b71c69d82bd0..2a2c549bf892 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ExportStorageManagerTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ExportStorageManagerTest.php
@@ -37,7 +37,7 @@ protected function setUp(): void {
   /**
    * Tests getting the export storage.
    */
-  public function testGetStorage() {
+  public function testGetStorage(): void {
     // Get the raw system.site config and set it in the sync storage.
     $rawConfig = $this->config('system.site')->getRawData();
     $this->container->get('config.storage.sync')->write('system.site', $rawConfig);
@@ -81,7 +81,7 @@ public function testGetStorage() {
   /**
    * Tests the export storage when it is locked.
    */
-  public function testGetStorageLock() {
+  public function testGetStorageLock(): void {
     $lock = $this->createMock('Drupal\Core\Lock\LockBackendInterface');
     $lock->expects($this->exactly(2))
       ->method('acquire')
diff --git a/core/tests/Drupal/KernelTests/Core/Config/FileStorageFactoryTest.php b/core/tests/Drupal/KernelTests/Core/Config/FileStorageFactoryTest.php
index 3fa20b39f81c..306ebe7359cb 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/FileStorageFactoryTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/FileStorageFactoryTest.php
@@ -19,7 +19,7 @@ class FileStorageFactoryTest extends KernelTestBase {
   /**
    * @covers ::getSync
    */
-  public function testGetSync() {
+  public function testGetSync(): void {
 
     // Write some random data to the sync storage.
     $name = $this->randomMachineName();
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ImportStorageTransformerTest.php b/core/tests/Drupal/KernelTests/Core/Config/ImportStorageTransformerTest.php
index f88cd03242ce..af87421ca55c 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ImportStorageTransformerTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ImportStorageTransformerTest.php
@@ -39,7 +39,7 @@ protected function setUp(): void {
   /**
    * Tests the import transformation.
    */
-  public function testTransform() {
+  public function testTransform(): void {
     // Get the raw system.site config and set it in the sync storage.
     $rawConfig = $this->config('system.site')->getRawData();
 
@@ -67,7 +67,7 @@ public function testTransform() {
   /**
    * Tests that the import transformer throws an exception.
    */
-  public function testTransformLocked() {
+  public function testTransformLocked(): void {
     // Mock the request lock not being available.
     $lock = $this->createMock('Drupal\Core\Lock\LockBackendInterface');
     $lock->expects($this->exactly(2))
@@ -94,7 +94,7 @@ public function testTransformLocked() {
   /**
    * Tests the import transformer during a running config import.
    */
-  public function testTransformWhileImporting() {
+  public function testTransformWhileImporting(): void {
     // Set up the database table with the current active config.
     // This simulates the config importer having its transformation done.
     $storage = $this->container->get('config.import_transformer')->transform($this->container->get('config.storage'));
diff --git a/core/tests/Drupal/KernelTests/Core/Config/SchemaCheckTraitTest.php b/core/tests/Drupal/KernelTests/Core/Config/SchemaCheckTraitTest.php
index e4e551f72d3e..5fa037724745 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/SchemaCheckTraitTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/SchemaCheckTraitTest.php
@@ -44,7 +44,7 @@ protected function setUp(): void {
    *
    * @dataProvider providerCheckConfigSchema
    */
-  public function testCheckConfigSchema(string $type_to_validate_against, bool $validate_constraints, array|bool $nulled_expectations, array|bool $no_data_expectations, array $expectations) {
+  public function testCheckConfigSchema(string $type_to_validate_against, bool $validate_constraints, array|bool $nulled_expectations, array|bool $no_data_expectations, array $expectations): void {
     // Test a non existing schema.
     $ret = $this->checkConfigSchema($this->typedConfig, 'config_schema_test.no_schema', $this->config('config_schema_test.no_schema')->get());
     $this->assertFalse($ret);
diff --git a/core/tests/Drupal/KernelTests/Core/Config/Storage/CachedStorageTest.php b/core/tests/Drupal/KernelTests/Core/Config/Storage/CachedStorageTest.php
index b78fcb1a5567..f3a06135d9d9 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/Storage/CachedStorageTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/Storage/CachedStorageTest.php
@@ -44,7 +44,7 @@ protected function setUp(): void {
   /**
    * {@inheritdoc}
    */
-  public function testInvalidStorage() {
+  public function testInvalidStorage(): void {
     $this->markTestSkipped('No-op as this test does not make sense');
   }
 
diff --git a/core/tests/Drupal/KernelTests/Core/Config/Storage/ConfigStorageTestBase.php b/core/tests/Drupal/KernelTests/Core/Config/Storage/ConfigStorageTestBase.php
index 0879e06ffc53..6b8c31051728 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/Storage/ConfigStorageTestBase.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/Storage/ConfigStorageTestBase.php
@@ -35,7 +35,7 @@ abstract class ConfigStorageTestBase extends KernelTestBase {
    *
    * @todo Coverage: Trigger PDOExceptions / Database exceptions.
    */
-  public function testCRUD() {
+  public function testCRUD(): void {
     $name = 'config_test.storage';
 
     // Checking whether a non-existing name exists returns FALSE.
@@ -122,7 +122,7 @@ public function testCRUD() {
   /**
    * Tests an invalid storage.
    */
-  public function testInvalidStorage() {
+  public function testInvalidStorage(): void {
     $name = 'config_test.storage';
 
     // Write something to the valid storage to prove that the storages do not
@@ -164,7 +164,7 @@ public function testInvalidStorage() {
   /**
    * Tests storage writing and reading data preserving data type.
    */
-  public function testDataTypes() {
+  public function testDataTypes(): void {
     $name = 'config_test.types';
     $data = [
       'array' => [],
@@ -188,7 +188,7 @@ public function testDataTypes() {
   /**
    * Tests that the storage supports collections.
    */
-  public function testCollection() {
+  public function testCollection(): void {
     $name = 'config_test.storage';
     $data = ['foo' => 'bar'];
     $result = $this->storage->write($name, $data);
diff --git a/core/tests/Drupal/KernelTests/Core/Config/Storage/DatabaseStorageTest.php b/core/tests/Drupal/KernelTests/Core/Config/Storage/DatabaseStorageTest.php
index 813b49a97fdf..e8c1f674950f 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/Storage/DatabaseStorageTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/Storage/DatabaseStorageTest.php
@@ -45,7 +45,7 @@ protected function delete($name) {
   /**
    * Tests that operations throw exceptions if the query fails.
    */
-  public function testExceptionIsThrownIfQueryFails() {
+  public function testExceptionIsThrownIfQueryFails(): void {
     $connection = Database::getConnection();
     if ($connection->databaseType() === 'sqlite') {
       // See: https://www.drupal.org/project/drupal/issues/3349286
diff --git a/core/tests/Drupal/KernelTests/Core/Config/Storage/FileStorageTest.php b/core/tests/Drupal/KernelTests/Core/Config/Storage/FileStorageTest.php
index 6438cf00df99..8d63645761ea 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/Storage/FileStorageTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/Storage/FileStorageTest.php
@@ -58,7 +58,7 @@ protected function delete($name) {
   /**
    * Tests the FileStorage::listAll method with a relative and absolute path.
    */
-  public function testListAll() {
+  public function testListAll(): void {
     $expected_files = [
       'core.extension',
       'system.performance',
@@ -77,7 +77,7 @@ public function testListAll() {
   /**
    * Tests UnsupportedDataTypeConfigException.
    */
-  public function testUnsupportedDataTypeConfigException() {
+  public function testUnsupportedDataTypeConfigException(): void {
     $name = 'core.extension';
     $path = $this->storage->getFilePath($name);
     $this->expectException(UnsupportedDataTypeConfigException::class);
diff --git a/core/tests/Drupal/KernelTests/Core/Config/Storage/ManagedStorageTest.php b/core/tests/Drupal/KernelTests/Core/Config/Storage/ManagedStorageTest.php
index 4999fedd5487..094f08b84545 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/Storage/ManagedStorageTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/Storage/ManagedStorageTest.php
@@ -63,7 +63,7 @@ protected function delete($name) {
   /**
    * {@inheritdoc}
    */
-  public function testInvalidStorage() {
+  public function testInvalidStorage(): void {
     $this->markTestSkipped('ManagedStorage cannot be invalid.');
   }
 
diff --git a/core/tests/Drupal/KernelTests/Core/Config/Storage/MemoryStorageTest.php b/core/tests/Drupal/KernelTests/Core/Config/Storage/MemoryStorageTest.php
index 8ed48541225b..3848b8eacc73 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/Storage/MemoryStorageTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/Storage/MemoryStorageTest.php
@@ -52,7 +52,7 @@ protected function delete($name) {
   /**
    * {@inheritdoc}
    */
-  public function testInvalidStorage() {
+  public function testInvalidStorage(): void {
     $this->markTestSkipped('MemoryStorage cannot be invalid.');
   }
 
diff --git a/core/tests/Drupal/KernelTests/Core/Config/Storage/StorageReplaceDataWrapperTest.php b/core/tests/Drupal/KernelTests/Core/Config/Storage/StorageReplaceDataWrapperTest.php
index 15c287e45b37..0688e3e3df7e 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/Storage/StorageReplaceDataWrapperTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/Storage/StorageReplaceDataWrapperTest.php
@@ -53,7 +53,7 @@ protected function delete($name) {
   /**
    * {@inheritdoc}
    */
-  public function testInvalidStorage() {
+  public function testInvalidStorage(): void {
     $this->markTestSkipped('No-op as this test does not make sense');
   }
 
@@ -65,7 +65,7 @@ public function testInvalidStorage() {
    *
    * @dataProvider providerCollections
    */
-  public function testCreateCollection($collection) {
+  public function testCreateCollection($collection): void {
     $initial_collection_name = $this->storage->getCollectionName();
 
     // Create new storage with given collection and check it is set correctly.
diff --git a/core/tests/Drupal/KernelTests/Core/Controller/ControllerBaseTest.php b/core/tests/Drupal/KernelTests/Core/Controller/ControllerBaseTest.php
index d463740e17c8..499b6efd87c7 100644
--- a/core/tests/Drupal/KernelTests/Core/Controller/ControllerBaseTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Controller/ControllerBaseTest.php
@@ -27,7 +27,7 @@ class ControllerBaseTest extends KernelTestBase {
   /**
    * @covers ::create
    */
-  public function testCreate() {
+  public function testCreate(): void {
     /** @var \Drupal\system_test\Controller\SystemTestController $controller */
     $controller = $this->container->get('class_resolver')->getInstanceFromDefinition(SystemTestController::class);
 
@@ -48,7 +48,7 @@ public function testCreate() {
   /**
    * @covers ::create
    */
-  public function testCreateException() {
+  public function testCreateException(): void {
     $this->expectException(AutowiringFailedException::class);
     $this->expectExceptionMessage('Cannot autowire service "Drupal\Core\Lock\LockBackendInterface": argument "$lock" of method "Drupal\system_test\Controller\BrokenSystemTestController::_construct()", you should configure its value explicitly.');
     $this->container->get('class_resolver')->getInstanceFromDefinition(BrokenSystemTestController::class);
diff --git a/core/tests/Drupal/KernelTests/Core/Database/AlterTest.php b/core/tests/Drupal/KernelTests/Core/Database/AlterTest.php
index 0c69abec2a4a..d091a5bac80c 100644
--- a/core/tests/Drupal/KernelTests/Core/Database/AlterTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Database/AlterTest.php
@@ -15,7 +15,7 @@ class AlterTest extends DatabaseTestBase {
   /**
    * Tests that we can do basic alters.
    */
-  public function testSimpleAlter() {
+  public function testSimpleAlter(): void {
     $query = $this->connection->select('test');
     $query->addField('test', 'name');
     $query->addField('test', 'age', 'age');
@@ -29,7 +29,7 @@ public function testSimpleAlter() {
   /**
    * Tests that we can alter the joins on a query.
    */
-  public function testAlterWithJoin() {
+  public function testAlterWithJoin(): void {
     $query = $this->connection->select('test_task');
     $tid_field = $query->addField('test_task', 'tid');
     $task_field = $query->addField('test_task', 'task');
@@ -53,7 +53,7 @@ public function testAlterWithJoin() {
   /**
    * Tests that we can alter a query's conditionals.
    */
-  public function testAlterChangeConditional() {
+  public function testAlterChangeConditional(): void {
     $query = $this->connection->select('test_task');
     $tid_field = $query->addField('test_task', 'tid');
     $pid_field = $query->addField('test_task', 'pid');
@@ -78,7 +78,7 @@ public function testAlterChangeConditional() {
   /**
    * Tests that we can alter the fields of a query.
    */
-  public function testAlterChangeFields() {
+  public function testAlterChangeFields(): void {
     $query = $this->connection->select('test');
     $name_field = $query->addField('test', 'name');
     $age_field = $query->addField('test', 'age', 'age');
@@ -93,7 +93,7 @@ public function testAlterChangeFields() {
   /**
    * Tests that we can alter expressions in the query.
    */
-  public function testAlterExpression() {
+  public function testAlterExpression(): void {
     $query = $this->connection->select('test');
     $name_field = $query->addField('test', 'name');
     $age_field = $query->addExpression("[age]*2", 'double_age');
@@ -113,7 +113,7 @@ public function testAlterExpression() {
    *
    * This also tests hook_query_TAG_alter().
    */
-  public function testAlterRemoveRange() {
+  public function testAlterRemoveRange(): void {
     $query = $this->connection->select('test');
     $query->addField('test', 'name');
     $query->addField('test', 'age', 'age');
@@ -128,7 +128,7 @@ public function testAlterRemoveRange() {
   /**
    * Tests that we can do basic alters on subqueries.
    */
-  public function testSimpleAlterSubquery() {
+  public function testSimpleAlterSubquery(): void {
     // Create a sub-query with an alter tag.
     $subquery = $this->connection->select('test', 'p');
     $subquery->addField('p', 'name');
diff --git a/core/tests/Drupal/KernelTests/Core/Database/BasicSyntaxTest.php b/core/tests/Drupal/KernelTests/Core/Database/BasicSyntaxTest.php
index 1e7abebfe507..079009dc7a56 100644
--- a/core/tests/Drupal/KernelTests/Core/Database/BasicSyntaxTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Database/BasicSyntaxTest.php
@@ -18,7 +18,7 @@ class BasicSyntaxTest extends DatabaseTestBase {
   /**
    * Tests string concatenation.
    */
-  public function testConcatLiterals() {
+  public function testConcatLiterals(): void {
     $result = $this->connection->query('SELECT CONCAT(:a1, CONCAT(:a2, CONCAT(:a3, CONCAT(:a4, :a5))))', [
       ':a1' => 'This',
       ':a2' => ' ',
@@ -37,7 +37,7 @@ public function testConcatLiterals() {
    * since its type 'varchar_ascii' may lead to using field-level collations not
    * compatible with the other fields.
    */
-  public function testConcatFields() {
+  public function testConcatFields(): void {
     $result = $this->connection->query(
       'SELECT CONCAT(:a1, CONCAT([job], CONCAT(:a2, CONCAT([age], :a3)))) FROM {test} WHERE [age] = :age', [
         ':a1' => 'The age of ',
@@ -52,7 +52,7 @@ public function testConcatFields() {
   /**
    * Tests string concatenation with separator.
    */
-  public function testConcatWsLiterals() {
+  public function testConcatWsLiterals(): void {
     $result = $this->connection->query("SELECT CONCAT_WS(', ', :a1, NULL, :a2, :a3, :a4)", [
       ':a1' => 'Hello',
       ':a2' => NULL,
@@ -65,7 +65,7 @@ public function testConcatWsLiterals() {
   /**
    * Tests string concatenation with separator, with field values.
    */
-  public function testConcatWsFields() {
+  public function testConcatWsFields(): void {
     $result = $this->connection->query("SELECT CONCAT_WS('-', :a1, [name], :a2, [age]) FROM {test} WHERE [age] = :age", [
       ':a1' => 'name',
       ':a2' => 'age',
@@ -77,7 +77,7 @@ public function testConcatWsFields() {
   /**
    * Tests escaping of LIKE wildcards.
    */
-  public function testLikeEscape() {
+  public function testLikeEscape(): void {
     $this->connection->insert('test')
       ->fields([
         'name' => 'Ring_',
@@ -103,7 +103,7 @@ public function testLikeEscape() {
   /**
    * Tests a LIKE query containing a backslash.
    */
-  public function testLikeBackslash() {
+  public function testLikeBackslash(): void {
     $this->connection->insert('test')
       ->fields(['name'])
       ->values([
@@ -134,7 +134,7 @@ public function testLikeBackslash() {
   /**
    * Tests \Drupal\Core\Database\Connection::getFullQualifiedTableName().
    */
-  public function testGetFullQualifiedTableName() {
+  public function testGetFullQualifiedTableName(): void {
     $database = \Drupal::database();
     $num_matches = $database->select($database->getFullQualifiedTableName('test'), 't')
       ->countQuery()
diff --git a/core/tests/Drupal/KernelTests/Core/Database/CaseSensitivityTest.php b/core/tests/Drupal/KernelTests/Core/Database/CaseSensitivityTest.php
index c837534147a0..cd20af22f0fe 100644
--- a/core/tests/Drupal/KernelTests/Core/Database/CaseSensitivityTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Database/CaseSensitivityTest.php
@@ -14,7 +14,7 @@ class CaseSensitivityTest extends DatabaseTestBase {
   /**
    * Tests BINARY collation in MySQL.
    */
-  public function testCaseSensitiveInsert() {
+  public function testCaseSensitiveInsert(): void {
     $num_records_before = $this->connection->query('SELECT COUNT(*) FROM {test}')->fetchField();
 
     $this->connection->insert('test')
diff --git a/core/tests/Drupal/KernelTests/Core/Database/ConnectionTest.php b/core/tests/Drupal/KernelTests/Core/Database/ConnectionTest.php
index 86f4701b57c7..ef8ce03f1c11 100644
--- a/core/tests/Drupal/KernelTests/Core/Database/ConnectionTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Database/ConnectionTest.php
@@ -17,7 +17,7 @@ class ConnectionTest extends DatabaseTestBase {
   /**
    * Tests that connections return appropriate connection objects.
    */
-  public function testConnectionRouting() {
+  public function testConnectionRouting(): void {
     // Clone the primary credentials to a replica connection.
     // Note this will result in two independent connection objects that happen
     // to point to the same place.
@@ -51,7 +51,7 @@ public function testConnectionRouting() {
   /**
    * Tests that connections return appropriate connection objects.
    */
-  public function testConnectionRoutingOverride() {
+  public function testConnectionRoutingOverride(): void {
     // Clone the primary credentials to a replica connection.
     // Note this will result in two independent connection objects that happen
     // to point to the same place.
@@ -69,7 +69,7 @@ public function testConnectionRoutingOverride() {
   /**
    * Tests the closing of a database connection.
    */
-  public function testConnectionClosing() {
+  public function testConnectionClosing(): void {
     // Open the default target so we have an object to compare.
     $db1 = Database::getConnection('default', 'default');
 
@@ -84,7 +84,7 @@ public function testConnectionClosing() {
   /**
    * Tests the connection options of the active database.
    */
-  public function testConnectionOptions() {
+  public function testConnectionOptions(): void {
     $connection_info = Database::getConnectionInfo('default');
 
     // Be sure we're connected to the default database.
@@ -119,7 +119,7 @@ public function testConnectionOptions() {
   /**
    * Tests per-table prefix connection option.
    */
-  public function testPerTablePrefixOption() {
+  public function testPerTablePrefixOption(): void {
     $connection_info = Database::getConnectionInfo('default');
     $new_connection_info = $connection_info['default'];
     $new_connection_info['prefix'] = [
@@ -134,7 +134,7 @@ public function testPerTablePrefixOption() {
   /**
    * Tests the prefix connection option in array form.
    */
-  public function testPrefixArrayOption() {
+  public function testPrefixArrayOption(): void {
     $connection_info = Database::getConnectionInfo('default');
     $new_connection_info = $connection_info['default'];
     $new_connection_info['prefix'] = [
@@ -148,7 +148,7 @@ public function testPrefixArrayOption() {
   /**
    * Ensure that you cannot execute multiple statements in a query.
    */
-  public function testMultipleStatementsQuery() {
+  public function testMultipleStatementsQuery(): void {
     $this->expectException(\InvalidArgumentException::class);
     Database::getConnection('default', 'default')->query('SELECT * FROM {test}; SELECT * FROM {test_people}');
   }
@@ -156,7 +156,7 @@ public function testMultipleStatementsQuery() {
   /**
    * Ensure that you cannot prepare multiple statements.
    */
-  public function testMultipleStatements() {
+  public function testMultipleStatements(): void {
     $this->expectException(\InvalidArgumentException::class);
     Database::getConnection('default', 'default')->prepareStatement('SELECT * FROM {test}; SELECT * FROM {test_people}', []);
   }
@@ -164,7 +164,7 @@ public function testMultipleStatements() {
   /**
    * Tests that the method ::condition() returns a Condition object.
    */
-  public function testCondition() {
+  public function testCondition(): void {
     $connection = Database::getConnection('default', 'default');
     $namespace = (new \ReflectionObject($connection))->getNamespaceName() . "\\Condition";
     if (!class_exists($namespace)) {
@@ -177,7 +177,7 @@ public function testCondition() {
   /**
    * Tests that the method ::hasJson() returns TRUE.
    */
-  public function testHasJson() {
+  public function testHasJson(): void {
     $this->assertTrue($this->connection->hasJson());
   }
 
diff --git a/core/tests/Drupal/KernelTests/Core/Database/DatabaseExceptionWrapperTest.php b/core/tests/Drupal/KernelTests/Core/Database/DatabaseExceptionWrapperTest.php
index 746bf12e8f6f..41234f3ef4b5 100644
--- a/core/tests/Drupal/KernelTests/Core/Database/DatabaseExceptionWrapperTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Database/DatabaseExceptionWrapperTest.php
@@ -18,7 +18,7 @@ class DatabaseExceptionWrapperTest extends KernelTestBase {
   /**
    * Tests the expected database exception thrown for inexistent tables.
    */
-  public function testQueryThrowsDatabaseExceptionWrapperException() {
+  public function testQueryThrowsDatabaseExceptionWrapperException(): void {
     $this->expectException(DatabaseExceptionWrapper::class);
     Database::getConnection()->query('SELECT * FROM {does_not_exist}');
   }
diff --git a/core/tests/Drupal/KernelTests/Core/Database/DeleteTruncateTest.php b/core/tests/Drupal/KernelTests/Core/Database/DeleteTruncateTest.php
index cfe18af5a43f..4a40641a92b2 100644
--- a/core/tests/Drupal/KernelTests/Core/Database/DeleteTruncateTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Database/DeleteTruncateTest.php
@@ -24,7 +24,7 @@ class DeleteTruncateTest extends DatabaseTestBase {
   /**
    * Confirms that we can use a subselect in a delete successfully.
    */
-  public function testSubselectDelete() {
+  public function testSubselectDelete(): void {
     $num_records_before = $this->connection->query('SELECT COUNT(*) FROM {test_task}')->fetchField();
     $pid_to_delete = $this->connection->query("SELECT * FROM {test_task} WHERE [task] = 'sleep' ORDER BY [tid]")->fetchField();
 
@@ -45,7 +45,7 @@ public function testSubselectDelete() {
   /**
    * Confirms that we can delete a single record successfully.
    */
-  public function testSimpleDelete() {
+  public function testSimpleDelete(): void {
     $num_records_before = $this->connection->query('SELECT COUNT(*) FROM {test}')->fetchField();
 
     $num_deleted = $this->connection->delete('test')
@@ -60,7 +60,7 @@ public function testSimpleDelete() {
   /**
    * Confirms that we can truncate a whole table successfully.
    */
-  public function testTruncate() {
+  public function testTruncate(): void {
     $num_records_before = $this->connection->query("SELECT COUNT(*) FROM {test}")->fetchField();
     $this->assertNotEmpty($num_records_before);
 
@@ -73,7 +73,7 @@ public function testTruncate() {
   /**
    * Confirms that we can truncate a whole table while in transaction.
    */
-  public function testTruncateInTransaction() {
+  public function testTruncateInTransaction(): void {
     $num_records_before = $this->connection->select('test')->countQuery()->execute()->fetchField();
     $this->assertGreaterThan(0, $num_records_before, 'The table is not empty.');
 
@@ -107,7 +107,7 @@ public function testTruncateInTransaction() {
   /**
    * Confirms that transaction rollback voids a truncate operation.
    */
-  public function testTruncateTransactionRollback() {
+  public function testTruncateTransactionRollback(): void {
     $num_records_before = $this->connection->select('test')->countQuery()->execute()->fetchField();
     $this->assertGreaterThan(0, $num_records_before, 'The table is not empty.');
 
@@ -141,7 +141,7 @@ public function testTruncateTransactionRollback() {
   /**
    * Confirms that we can delete a single special column name record successfully.
    */
-  public function testSpecialColumnDelete() {
+  public function testSpecialColumnDelete(): void {
     $num_records_before = $this->connection->query('SELECT COUNT(*) FROM {select}')->fetchField();
 
     $num_deleted = $this->connection->delete('select')
diff --git a/core/tests/Drupal/KernelTests/Core/Database/DriverSpecificConnectionUnitTestBase.php b/core/tests/Drupal/KernelTests/Core/Database/DriverSpecificConnectionUnitTestBase.php
index 87cabe890269..f2c94ef04e2c 100644
--- a/core/tests/Drupal/KernelTests/Core/Database/DriverSpecificConnectionUnitTestBase.php
+++ b/core/tests/Drupal/KernelTests/Core/Database/DriverSpecificConnectionUnitTestBase.php
@@ -178,7 +178,7 @@ public function testOpenSelectQueryClose(): void {
   /**
    * Tests pdo options override.
    */
-  public function testConnectionOpen() {
+  public function testConnectionOpen(): void {
     $reflection = new \ReflectionObject($this->connection);
     $connection_property = $reflection->getProperty('connection');
     $error_mode = $connection_property->getValue($this->connection)
diff --git a/core/tests/Drupal/KernelTests/Core/Database/DriverSpecificSyntaxTestBase.php b/core/tests/Drupal/KernelTests/Core/Database/DriverSpecificSyntaxTestBase.php
index aa58043022c4..7723d872cc12 100644
--- a/core/tests/Drupal/KernelTests/Core/Database/DriverSpecificSyntaxTestBase.php
+++ b/core/tests/Drupal/KernelTests/Core/Database/DriverSpecificSyntaxTestBase.php
@@ -19,7 +19,7 @@ abstract class DriverSpecificSyntaxTestBase extends DriverSpecificDatabaseTestBa
    *
    * @see \Drupal\Core\Database\Connection::prepareQuery()
    */
-  public function testAllowSquareBrackets() {
+  public function testAllowSquareBrackets(): void {
     $this->connection->insert('test')
       ->fields(['name'])
       ->values([
diff --git a/core/tests/Drupal/KernelTests/Core/Database/FetchTest.php b/core/tests/Drupal/KernelTests/Core/Database/FetchTest.php
index dd2b382e6a34..dcea763eccbd 100644
--- a/core/tests/Drupal/KernelTests/Core/Database/FetchTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Database/FetchTest.php
@@ -20,7 +20,7 @@ class FetchTest extends DatabaseTestBase {
   /**
    * Confirms that we can fetch a record properly in default object mode.
    */
-  public function testQueryFetchDefault() {
+  public function testQueryFetchDefault(): void {
     $records = [];
     $result = $this->connection->query('SELECT [name] FROM {test} WHERE [age] = :age', [':age' => 25]);
     $this->assertInstanceOf(StatementInterface::class, $result);
@@ -36,7 +36,7 @@ public function testQueryFetchDefault() {
   /**
    * Confirms that we can fetch a record to an object explicitly.
    */
-  public function testQueryFetchObject() {
+  public function testQueryFetchObject(): void {
     $records = [];
     $result = $this->connection->query('SELECT [name] FROM {test} WHERE [age] = :age', [':age' => 25], ['fetch' => \PDO::FETCH_OBJ]);
     foreach ($result as $record) {
@@ -51,7 +51,7 @@ public function testQueryFetchObject() {
   /**
    * Confirms that we can fetch a record to an associative array explicitly.
    */
-  public function testQueryFetchArray() {
+  public function testQueryFetchArray(): void {
     $records = [];
     $result = $this->connection->query('SELECT [name] FROM {test} WHERE [age] = :age', [':age' => 25], ['fetch' => \PDO::FETCH_ASSOC]);
     foreach ($result as $record) {
@@ -69,7 +69,7 @@ public function testQueryFetchArray() {
    *
    * @see \Drupal\system\Tests\Database\FakeRecord
    */
-  public function testQueryFetchClass() {
+  public function testQueryFetchClass(): void {
     $records = [];
     $result = $this->connection->query('SELECT [name] FROM {test} WHERE [age] = :age', [':age' => 25], ['fetch' => FakeRecord::class]);
     foreach ($result as $record) {
@@ -87,7 +87,7 @@ public function testQueryFetchClass() {
    * @see \Drupal\Tests\system\Functional\Database\FakeRecord
    * @see \Drupal\Core\Database\StatementPrefetch::fetchObject
    */
-  public function testQueryFetchObjectClass() {
+  public function testQueryFetchObjectClass(): void {
     $records = 0;
     $query = $this->connection->query('SELECT [name] FROM {test} WHERE [age] = :age', [':age' => 25]);
     while ($result = $query->fetchObject(FakeRecord::class, [1])) {
@@ -120,7 +120,7 @@ public function testQueryFetchObjectClassNoConstructorArgs(): void {
   /**
    * Confirms that we can fetch a record into an indexed array explicitly.
    */
-  public function testQueryFetchNum() {
+  public function testQueryFetchNum(): void {
     $records = [];
     $result = $this->connection->query('SELECT [name] FROM {test} WHERE [age] = :age', [':age' => 25], ['fetch' => \PDO::FETCH_NUM]);
     foreach ($result as $record) {
@@ -136,7 +136,7 @@ public function testQueryFetchNum() {
   /**
    * Confirms that we can fetch all records into an array explicitly.
    */
-  public function testQueryFetchAllColumn() {
+  public function testQueryFetchAllColumn(): void {
     $query = $this->connection->select('test');
     $query->addField('test', 'name');
     $query->orderBy('name');
@@ -149,7 +149,7 @@ public function testQueryFetchAllColumn() {
   /**
    * Confirms that we can fetch an entire column of a result set at once.
    */
-  public function testQueryFetchCol() {
+  public function testQueryFetchCol(): void {
     $result = $this->connection->query('SELECT [name] FROM {test} WHERE [age] > :age', [':age' => 25]);
     $column = $result->fetchCol();
     $this->assertCount(3, $column, 'fetchCol() returns the right number of records.');
@@ -233,7 +233,7 @@ public function testQueryFetchField(): void {
   /**
    * Tests that rowCount() throws exception on SELECT query.
    */
-  public function testRowCount() {
+  public function testRowCount(): void {
     $result = $this->connection->query('SELECT [name] FROM {test}');
     try {
       $result->rowCount();
diff --git a/core/tests/Drupal/KernelTests/Core/Database/InsertDefaultsTest.php b/core/tests/Drupal/KernelTests/Core/Database/InsertDefaultsTest.php
index b5aeb6af1447..2aa2ff497afa 100644
--- a/core/tests/Drupal/KernelTests/Core/Database/InsertDefaultsTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Database/InsertDefaultsTest.php
@@ -18,7 +18,7 @@ class InsertDefaultsTest extends DatabaseTestBase {
    *
    * @see \database_test_schema()
    */
-  public function testDefaultInsert() {
+  public function testDefaultInsert(): void {
     $query = $this->connection->insert('test')->useDefaults(['job']);
     $id = $query->execute();
     $job = $this->connection->query('SELECT [job] FROM {test} WHERE [id] = :id', [':id' => $id])->fetchField();
@@ -28,7 +28,7 @@ public function testDefaultInsert() {
   /**
    * Tests that no action will be preformed if no fields are specified.
    */
-  public function testDefaultEmptyInsert() {
+  public function testDefaultEmptyInsert(): void {
     $num_records_before = (int) $this->connection->query('SELECT COUNT(*) FROM {test}')->fetchField();
 
     try {
@@ -49,7 +49,7 @@ public function testDefaultEmptyInsert() {
    *
    * @see \database_test_schema()
    */
-  public function testDefaultInsertWithFields() {
+  public function testDefaultInsertWithFields(): void {
     $query = $this->connection->insert('test')
       ->fields(['name' => 'Bob'])
       ->useDefaults(['job']);
diff --git a/core/tests/Drupal/KernelTests/Core/Database/InsertLobTest.php b/core/tests/Drupal/KernelTests/Core/Database/InsertLobTest.php
index 9c417a1b6ca6..2859a303878d 100644
--- a/core/tests/Drupal/KernelTests/Core/Database/InsertLobTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Database/InsertLobTest.php
@@ -14,7 +14,7 @@ class InsertLobTest extends DatabaseTestBase {
   /**
    * Tests that we can insert a single blob field successfully.
    */
-  public function testInsertOneBlob() {
+  public function testInsertOneBlob(): void {
     $data = "This is\000a test.";
     $this->assertSame(15, strlen($data), 'Test data contains a NULL.');
     $id = $this->connection->insert('test_one_blob')
@@ -27,7 +27,7 @@ public function testInsertOneBlob() {
   /**
    * Tests that we can insert a null into blob field.
    */
-  public function testInsertNullBlob() {
+  public function testInsertNullBlob(): void {
     $id = $this->connection->insert('test_one_blob')
       ->fields(['blob1' => NULL])
       ->execute();
@@ -38,7 +38,7 @@ public function testInsertNullBlob() {
   /**
    * Tests that we can insert multiple blob fields in the same query.
    */
-  public function testInsertMultipleBlob() {
+  public function testInsertMultipleBlob(): void {
     $id = $this->connection->insert('test_two_blobs')
       ->fields([
         'blob1' => 'This is',
diff --git a/core/tests/Drupal/KernelTests/Core/Database/InsertTest.php b/core/tests/Drupal/KernelTests/Core/Database/InsertTest.php
index 41b384e3f497..2a0f685d2ac7 100644
--- a/core/tests/Drupal/KernelTests/Core/Database/InsertTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Database/InsertTest.php
@@ -16,7 +16,7 @@ class InsertTest extends DatabaseTestBase {
   /**
    * Tests very basic insert functionality.
    */
-  public function testSimpleInsert() {
+  public function testSimpleInsert(): void {
     $num_records_before = $this->connection->query('SELECT COUNT(*) FROM {test}')->fetchField();
 
     $query = $this->connection->insert('test');
@@ -38,7 +38,7 @@ public function testSimpleInsert() {
   /**
    * Tests that we can insert multiple records in one query object.
    */
-  public function testMultiInsert() {
+  public function testMultiInsert(): void {
     $num_records_before = (int) $this->connection->query('SELECT COUNT(*) FROM {test}')->fetchField();
 
     $query = $this->connection->insert('test');
@@ -77,7 +77,7 @@ public function testMultiInsert() {
   /**
    * Tests that an insert object can be reused with new data after it executes.
    */
-  public function testRepeatedInsert() {
+  public function testRepeatedInsert(): void {
     $num_records_before = $this->connection->query('SELECT COUNT(*) FROM {test}')->fetchField();
 
     $query = $this->connection->insert('test');
@@ -120,7 +120,7 @@ public function testRepeatedInsert() {
   /**
    * Tests that we can specify fields without values and specify values later.
    */
-  public function testInsertFieldOnlyDefinition() {
+  public function testInsertFieldOnlyDefinition(): void {
     // This is useful for importers, when we want to create a query and define
     // its fields once, then loop over a multi-insert execution.
     $this->connection->insert('test')
@@ -140,7 +140,7 @@ public function testInsertFieldOnlyDefinition() {
   /**
    * Tests that inserts return the proper auto-increment ID.
    */
-  public function testInsertLastInsertID() {
+  public function testInsertLastInsertID(): void {
     $id = $this->connection->insert('test')
       ->fields([
         'name' => 'Larry',
@@ -154,7 +154,7 @@ public function testInsertLastInsertID() {
   /**
    * Tests that the INSERT INTO ... SELECT (fields) ... syntax works.
    */
-  public function testInsertSelectFields() {
+  public function testInsertSelectFields(): void {
     $query = $this->connection->select('test_people', 'tp');
     // The query builder will always append expressions after fields.
     // Add the expression first to test that the insert fields are correctly
@@ -180,7 +180,7 @@ public function testInsertSelectFields() {
   /**
    * Tests that the INSERT INTO ... SELECT * ... syntax works.
    */
-  public function testInsertSelectAll() {
+  public function testInsertSelectAll(): void {
     $query = $this->connection->select('test_people', 'tp')
       ->fields('tp')
       ->condition('tp.name', 'Meredith');
@@ -201,7 +201,7 @@ public function testInsertSelectAll() {
   /**
    * Tests that we can INSERT INTO a special named column.
    */
-  public function testSpecialColumnInsert() {
+  public function testSpecialColumnInsert(): void {
     $this->connection->insert('select')
       ->fields([
         'id' => 2,
@@ -215,7 +215,7 @@ public function testSpecialColumnInsert() {
   /**
    * Tests insertion integrity violation with no default value for a column.
    */
-  public function testInsertIntegrityViolation() {
+  public function testInsertIntegrityViolation(): void {
     // Remove the default from the 'age' column, so that inserting a record
     // without its value specified will lead to integrity failure.
     $this->connection->schema()->changeField('test', 'age', 'age', [
diff --git a/core/tests/Drupal/KernelTests/Core/Database/InvalidDataTest.php b/core/tests/Drupal/KernelTests/Core/Database/InvalidDataTest.php
index 7a6bd9c987af..85c50dd2e4ac 100644
--- a/core/tests/Drupal/KernelTests/Core/Database/InvalidDataTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Database/InvalidDataTest.php
@@ -16,7 +16,7 @@ class InvalidDataTest extends DatabaseTestBase {
   /**
    * Tests aborting of traditional SQL database systems with invalid data.
    */
-  public function testInsertDuplicateData() {
+  public function testInsertDuplicateData(): void {
     // Try to insert multiple records where at least one has bad data.
     $this->expectException(IntegrityConstraintViolationException::class);
     try {
@@ -55,7 +55,7 @@ public function testInsertDuplicateData() {
   /**
    * Tests inserting with invalid data from a select query.
    */
-  public function testInsertDuplicateDataFromSelect() {
+  public function testInsertDuplicateDataFromSelect(): void {
     // Insert multiple records in 'test_people' where one has bad data
     // (duplicate key). A 'Meredith' record has already been inserted
     // in ::setUp.
diff --git a/core/tests/Drupal/KernelTests/Core/Database/LoggingTest.php b/core/tests/Drupal/KernelTests/Core/Database/LoggingTest.php
index b27fef009551..87abede275a0 100644
--- a/core/tests/Drupal/KernelTests/Core/Database/LoggingTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Database/LoggingTest.php
@@ -18,7 +18,7 @@ class LoggingTest extends DatabaseTestBase {
   /**
    * Tests that we can log the existence of a query.
    */
-  public function testEnableLogging() {
+  public function testEnableLogging(): void {
     Database::startLog('testing');
 
     $start = microtime(TRUE);
@@ -42,7 +42,7 @@ public function testEnableLogging() {
   /**
    * Tests that we can run two logs in parallel.
    */
-  public function testEnableMultiLogging() {
+  public function testEnableMultiLogging(): void {
     Database::startLog('testing1');
 
     $this->connection->query('SELECT [name] FROM {test} WHERE [age] > :age', [':age' => 25])->fetchCol();
@@ -61,7 +61,7 @@ public function testEnableMultiLogging() {
   /**
    * Tests logging queries against multiple targets on the same connection.
    */
-  public function testEnableTargetLogging() {
+  public function testEnableTargetLogging(): void {
     // Clone the primary credentials to a replica connection and to another fake
     // connection.
     $connection_info = Database::getConnectionInfo('default');
@@ -87,7 +87,7 @@ public function testEnableTargetLogging() {
    * a fake target so the query should fall back to running on the default
    * target.
    */
-  public function testEnableTargetLoggingNoTarget() {
+  public function testEnableTargetLoggingNoTarget(): void {
     Database::startLog('testing1');
 
     $this->connection->query('SELECT [name] FROM {test} WHERE [age] > :age', [':age' => 25])->fetchCol();
@@ -109,7 +109,7 @@ public function testEnableTargetLoggingNoTarget() {
   /**
    * Tests that we can log queries separately on different connections.
    */
-  public function testEnableMultiConnectionLogging() {
+  public function testEnableMultiConnectionLogging(): void {
     // Clone the primary credentials to a fake connection.
     // That both connections point to the same physical database is irrelevant.
     $connection_info = Database::getConnectionInfo('default');
@@ -136,7 +136,7 @@ public function testEnableMultiConnectionLogging() {
   /**
    * Tests that getLog with a wrong key return an empty array.
    */
-  public function testGetLoggingWrongKey() {
+  public function testGetLoggingWrongKey(): void {
     $result = Database::getLog('wrong');
 
     $this->assertEquals([], $result, 'The function getLog with a wrong key returns an empty array.');
diff --git a/core/tests/Drupal/KernelTests/Core/Database/MergeTest.php b/core/tests/Drupal/KernelTests/Core/Database/MergeTest.php
index 92e99ea01216..b8da5e183662 100644
--- a/core/tests/Drupal/KernelTests/Core/Database/MergeTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Database/MergeTest.php
@@ -17,7 +17,7 @@ class MergeTest extends DatabaseTestBase {
   /**
    * Confirms that we can merge-insert a record successfully.
    */
-  public function testMergeInsert() {
+  public function testMergeInsert(): void {
     $num_records_before = $this->connection->query('SELECT COUNT(*) FROM {test_people}')->fetchField();
 
     $result = $this->connection->merge('test_people')
@@ -42,7 +42,7 @@ public function testMergeInsert() {
   /**
    * Confirms that we can merge-update a record successfully.
    */
-  public function testMergeUpdate() {
+  public function testMergeUpdate(): void {
     $num_records_before = $this->connection->query('SELECT COUNT(*) FROM {test_people}')->fetchField();
 
     $result = $this->connection->merge('test_people')
@@ -70,7 +70,7 @@ public function testMergeUpdate() {
    * This test varies from the previous test because it manually defines which
    * fields are inserted, and which fields are updated.
    */
-  public function testMergeUpdateExcept() {
+  public function testMergeUpdateExcept(): void {
     $num_records_before = $this->connection->query('SELECT COUNT(*) FROM {test_people}')->fetchField();
 
     $this->connection->merge('test_people')
@@ -91,7 +91,7 @@ public function testMergeUpdateExcept() {
   /**
    * Confirms that we can merge-update a record, with alternate replacement.
    */
-  public function testMergeUpdateExplicit() {
+  public function testMergeUpdateExplicit(): void {
     $num_records_before = $this->connection->query('SELECT COUNT(*) FROM {test_people}')->fetchField();
 
     $this->connection->merge('test_people')
@@ -117,7 +117,7 @@ public function testMergeUpdateExplicit() {
   /**
    * Confirms that we can merge-update a record successfully, with expressions.
    */
-  public function testMergeUpdateExpression() {
+  public function testMergeUpdateExpression(): void {
     $num_records_before = $this->connection->query('SELECT COUNT(*) FROM {test_people}')->fetchField();
 
     $age_before = $this->connection->query('SELECT [age] FROM {test_people} WHERE [job] = :job', [':job' => 'Speaker'])->fetchField();
@@ -146,7 +146,7 @@ public function testMergeUpdateExpression() {
   /**
    * Tests that we can merge-insert without any update fields.
    */
-  public function testMergeInsertWithoutUpdate() {
+  public function testMergeInsertWithoutUpdate(): void {
     $num_records_before = $this->connection->query('SELECT COUNT(*) FROM {test_people}')->fetchField();
 
     $this->connection->merge('test_people')
@@ -165,7 +165,7 @@ public function testMergeInsertWithoutUpdate() {
   /**
    * Confirms that we can merge-update without any update fields.
    */
-  public function testMergeUpdateWithoutUpdate() {
+  public function testMergeUpdateWithoutUpdate(): void {
     $num_records_before = $this->connection->query('SELECT COUNT(*) FROM {test_people}')->fetchField();
 
     $this->connection->merge('test_people')
@@ -197,7 +197,7 @@ public function testMergeUpdateWithoutUpdate() {
   /**
    * Tests that an invalid merge query throws an exception.
    */
-  public function testInvalidMerge() {
+  public function testInvalidMerge(): void {
     $this->expectException(InvalidMergeQueryException::class);
     // This merge will fail because there is no key field specified.
     $this->connection
@@ -209,7 +209,7 @@ public function testInvalidMerge() {
   /**
    * Tests that we can merge-insert with reserved keywords.
    */
-  public function testMergeWithReservedWords() {
+  public function testMergeWithReservedWords(): void {
     $num_records_before = $this->connection->query('SELECT COUNT(*) FROM {select}')->fetchField();
 
     $this->connection->merge('select')
diff --git a/core/tests/Drupal/KernelTests/Core/Database/QueryTest.php b/core/tests/Drupal/KernelTests/Core/Database/QueryTest.php
index 5893197ef74f..b2a7fe09bbb4 100644
--- a/core/tests/Drupal/KernelTests/Core/Database/QueryTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Database/QueryTest.php
@@ -17,7 +17,7 @@ class QueryTest extends DatabaseTestBase {
   /**
    * Tests that we can pass an array of values directly in the query.
    */
-  public function testArraySubstitution() {
+  public function testArraySubstitution(): void {
     $names = $this->connection->query('SELECT [name] FROM {test} WHERE [age] IN ( :ages[] ) ORDER BY [age]', [':ages[]' => [25, 26, 27]])->fetchAll();
     $this->assertCount(3, $names, 'Correct number of names returned');
 
@@ -28,7 +28,7 @@ public function testArraySubstitution() {
   /**
    * Tests that we can not pass a scalar value when an array is expected.
    */
-  public function testScalarSubstitution() {
+  public function testScalarSubstitution(): void {
     try {
       $names = $this->connection->query('SELECT [name] FROM {test} WHERE [age] IN ( :ages[] ) ORDER BY [age]', [':ages[]' => 25])->fetchAll();
       $this->fail('Array placeholder with scalar argument should result in an exception.');
@@ -42,7 +42,7 @@ public function testScalarSubstitution() {
   /**
    * Tests SQL injection via database query array arguments.
    */
-  public function testArrayArgumentsSQLInjection() {
+  public function testArrayArgumentsSQLInjection(): void {
     // Attempt SQL injection and verify that it does not work.
     $condition = [
       "1 ;INSERT INTO {test} (name) VALUES ('test12345678'); -- " => '',
@@ -69,7 +69,7 @@ public function testArrayArgumentsSQLInjection() {
   /**
    * Tests SQL injection via condition operator.
    */
-  public function testConditionOperatorArgumentsSQLInjection() {
+  public function testConditionOperatorArgumentsSQLInjection(): void {
     $injection = "IS NOT NULL) ;INSERT INTO {test} (name) VALUES ('test12345678'); -- ";
 
     try {
@@ -138,7 +138,7 @@ public function testConditionOperatorArgumentsSQLInjection() {
    * @see \Drupal\sqlite\Driver\Database\sqlite\Statement::getStatement()
    * @see http://bugs.php.net/bug.php?id=45259
    */
-  public function testNumericExpressionSubstitution() {
+  public function testNumericExpressionSubstitution(): void {
     $count_expected = $this->connection->query('SELECT COUNT(*) + 3 FROM {test}')->fetchField();
 
     $count = $this->connection->query('SELECT COUNT(*) + :count FROM {test}', [
@@ -150,7 +150,7 @@ public function testNumericExpressionSubstitution() {
   /**
    * Tests quoting identifiers in queries.
    */
-  public function testQuotingIdentifiers() {
+  public function testQuotingIdentifiers(): void {
     // Use the table named an ANSI SQL reserved word with a column that is as
     // well.
     $result = $this->connection->query('SELECT [update] FROM {select}')->fetchObject();
diff --git a/core/tests/Drupal/KernelTests/Core/Database/RangeQueryTest.php b/core/tests/Drupal/KernelTests/Core/Database/RangeQueryTest.php
index 0043cc00df48..ef061068d16e 100644
--- a/core/tests/Drupal/KernelTests/Core/Database/RangeQueryTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Database/RangeQueryTest.php
@@ -14,7 +14,7 @@ class RangeQueryTest extends DatabaseTestBase {
   /**
    * Confirms that range queries work and return the correct result.
    */
-  public function testRangeQuery() {
+  public function testRangeQuery(): void {
     // Test if return correct number of rows.
     $range_rows = $this->connection->queryRange("SELECT [name] FROM {test} ORDER BY [name]", 1, 3)->fetchAll();
     $this->assertCount(3, $range_rows, 'Range query work and return correct number of rows.');
diff --git a/core/tests/Drupal/KernelTests/Core/Database/RegressionTest.php b/core/tests/Drupal/KernelTests/Core/Database/RegressionTest.php
index a245c19a569f..1ac344658e06 100644
--- a/core/tests/Drupal/KernelTests/Core/Database/RegressionTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Database/RegressionTest.php
@@ -21,7 +21,7 @@ class RegressionTest extends DatabaseTestBase {
   /**
    * Ensures that non-ASCII UTF-8 data is stored in the database properly.
    */
-  public function testRegression_310447() {
+  public function testRegression_310447(): void {
     // That's a 255 character UTF-8 string.
     $job = str_repeat("é", 255);
     $this->connection
@@ -39,7 +39,7 @@ public function testRegression_310447() {
   /**
    * Tests the Schema::tableExists() method.
    */
-  public function testDBTableExists() {
+  public function testDBTableExists(): void {
     $this->assertTrue($this->connection->schema()->tableExists('test'), 'Returns true for existent table.');
     $this->assertFalse($this->connection->schema()->tableExists('no_such_table'), 'Returns false for nonexistent table.');
   }
@@ -47,7 +47,7 @@ public function testDBTableExists() {
   /**
    * Tests the \Drupal\Core\Database\Schema::fieldExists() method.
    */
-  public function testDBFieldExists() {
+  public function testDBFieldExists(): void {
     $schema = $this->connection->schema();
     $this->assertTrue($schema->fieldExists('test', 'name'), 'Returns true for existent column.');
     $this->assertFalse($schema->fieldExists('test', 'no_such_column'), 'Returns false for nonexistent column.');
@@ -56,7 +56,7 @@ public function testDBFieldExists() {
   /**
    * Tests the Schema::indexExists() method.
    */
-  public function testDBIndexExists() {
+  public function testDBIndexExists(): void {
     $this->assertTrue($this->connection->schema()->indexExists('test', 'ages'), 'Returns true for existent index.');
     $this->assertFalse($this->connection->schema()->indexExists('test', 'no_such_index'), 'Returns false for nonexistent index.');
   }
diff --git a/core/tests/Drupal/KernelTests/Core/Database/ReplicaKillSwitchTest.php b/core/tests/Drupal/KernelTests/Core/Database/ReplicaKillSwitchTest.php
index 3e2b2bb664f1..e359c292ea58 100644
--- a/core/tests/Drupal/KernelTests/Core/Database/ReplicaKillSwitchTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Database/ReplicaKillSwitchTest.php
@@ -22,7 +22,7 @@ class ReplicaKillSwitchTest extends KernelTestBase {
   /**
    * Tests database.replica_kill_switch service.
    */
-  public function testSystemInitIgnoresSecondaries() {
+  public function testSystemInitIgnoresSecondaries(): void {
     // Clone the master credentials to a replica connection.
     // Note this will result in two independent connection objects that happen
     // to point to the same place.
diff --git a/core/tests/Drupal/KernelTests/Core/Database/ReservedWordTest.php b/core/tests/Drupal/KernelTests/Core/Database/ReservedWordTest.php
index 322b80a6dffb..182ffb67546f 100644
--- a/core/tests/Drupal/KernelTests/Core/Database/ReservedWordTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Database/ReservedWordTest.php
@@ -14,7 +14,7 @@ class ReservedWordTest extends DatabaseTestBase {
   /**
    * Tests SELECT count query from a table with a reserved name.
    */
-  public function testSelectReservedWordTableCount() {
+  public function testSelectReservedWordTableCount(): void {
     $query = $this->connection->select('virtual');
     $num_records = $query->countQuery()->execute()->fetchField();
 
@@ -24,7 +24,7 @@ public function testSelectReservedWordTableCount() {
   /**
    * Tests SELECT query with a specific field from a table with a reserved name.
    */
-  public function testSelectReservedWordTableSpecificField() {
+  public function testSelectReservedWordTableSpecificField(): void {
     $query = $this->connection->select('virtual');
     $query->addField('virtual', 'function');
     $rows = $query->execute()->fetchCol();
@@ -35,7 +35,7 @@ public function testSelectReservedWordTableSpecificField() {
   /**
    * Tests SELECT query with all fields from a table with a reserved name.
    */
-  public function testSelectReservedWordTableAllFields() {
+  public function testSelectReservedWordTableAllFields(): void {
     $query = $this->connection->select('virtual');
     $query->fields('virtual');
     $result = $query->execute()->fetchObject();
@@ -46,7 +46,7 @@ public function testSelectReservedWordTableAllFields() {
   /**
    * Tests SELECT count query from a table with a reserved alias.
    */
-  public function testSelectReservedWordAliasCount() {
+  public function testSelectReservedWordAliasCount(): void {
     $query = $this->connection->select('test', 'character');
     $num_records = $query->countQuery()->execute()->fetchField();
 
@@ -56,7 +56,7 @@ public function testSelectReservedWordAliasCount() {
   /**
    * Tests SELECT query with specific fields from a table with a reserved alias.
    */
-  public function testSelectReservedWordAliasSpecificFields() {
+  public function testSelectReservedWordAliasSpecificFields(): void {
     $query = $this->connection->select('test', 'high_priority');
     $query->addField('high_priority', 'name');
     $query->addField('high_priority', 'age', 'age');
@@ -71,7 +71,7 @@ public function testSelectReservedWordAliasSpecificFields() {
   /**
    * Tests SELECT query with all fields from a table with a reserved alias.
    */
-  public function testSelectReservedWordAliasAllFields() {
+  public function testSelectReservedWordAliasAllFields(): void {
     $record = $this->connection->select('test', 'signal')
       ->fields('signal')
       ->condition('age', 27)
@@ -85,7 +85,7 @@ public function testSelectReservedWordAliasAllFields() {
   /**
    * Tests SELECT query with GROUP BY clauses on fields with reserved names.
    */
-  public function testGroupBy() {
+  public function testGroupBy(): void {
     $this->connection->insert('select')
       ->fields([
         'id' => 2,
diff --git a/core/tests/Drupal/KernelTests/Core/Database/SelectCloneTest.php b/core/tests/Drupal/KernelTests/Core/Database/SelectCloneTest.php
index 1619ca78d254..15364ad53afb 100644
--- a/core/tests/Drupal/KernelTests/Core/Database/SelectCloneTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Database/SelectCloneTest.php
@@ -14,7 +14,7 @@ class SelectCloneTest extends DatabaseTestBase {
   /**
    * Tests that subqueries as value within conditions are cloned properly.
    */
-  public function testSelectConditionSubQueryCloning() {
+  public function testSelectConditionSubQueryCloning(): void {
     $subquery = $this->connection->select('test', 't');
     $subquery->addField('t', 'id', 'id');
     $subquery->condition('age', 28, '<');
@@ -43,7 +43,7 @@ public function testSelectConditionSubQueryCloning() {
   /**
    * Tests that nested SELECT queries are cloned properly.
    */
-  public function testNestedQueryCloning() {
+  public function testNestedQueryCloning(): void {
     $sub_query = $this->connection->select('test', 't');
     $sub_query->addField('t', 'id', 'id');
     $sub_query->condition('age', 28, '<');
diff --git a/core/tests/Drupal/KernelTests/Core/Database/SelectComplexTest.php b/core/tests/Drupal/KernelTests/Core/Database/SelectComplexTest.php
index ab892aeab463..a0cfc20cbb79 100644
--- a/core/tests/Drupal/KernelTests/Core/Database/SelectComplexTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Database/SelectComplexTest.php
@@ -26,7 +26,7 @@ class SelectComplexTest extends DatabaseTestBase {
   /**
    * Tests simple JOIN statements.
    */
-  public function testDefaultJoin() {
+  public function testDefaultJoin(): void {
     $query = $this->connection->select('test_task', 't');
     $people_alias = $query->join('test', 'p', '[t].[pid] = [p].[id]');
     $name_field = $query->addField($people_alias, 'name', 'name');
@@ -52,7 +52,7 @@ public function testDefaultJoin() {
   /**
    * Tests LEFT OUTER joins.
    */
-  public function testLeftOuterJoin() {
+  public function testLeftOuterJoin(): void {
     $query = $this->connection->select('test', 'p');
     $people_alias = $query->leftJoin('test_task', 't', '[t].[pid] = [p].[id]');
     $name_field = $query->addField('p', 'name', 'name');
@@ -77,7 +77,7 @@ public function testLeftOuterJoin() {
   /**
    * Tests GROUP BY clauses.
    */
-  public function testGroupBy() {
+  public function testGroupBy(): void {
     $query = $this->connection->select('test_task', 't');
     $count_field = $query->addExpression('COUNT([task])', 'num');
     $task_field = $query->addField('t', 'task');
@@ -118,7 +118,7 @@ public function testGroupBy() {
   /**
    * Tests GROUP BY and HAVING clauses together.
    */
-  public function testGroupByAndHaving() {
+  public function testGroupByAndHaving(): void {
     $query = $this->connection->select('test_task', 't');
     $count_field = $query->addExpression('COUNT([task])', 'num');
     $task_field = $query->addField('t', 'task');
@@ -155,7 +155,7 @@ public function testGroupByAndHaving() {
    *
    * The SQL clause varies with the database.
    */
-  public function testRange() {
+  public function testRange(): void {
     $query = $this->connection->select('test');
     $query->addField('test', 'name');
     $query->addField('test', 'age', 'age');
@@ -168,7 +168,7 @@ public function testRange() {
   /**
    * Tests whether the range property of a select clause can be undone.
    */
-  public function testRangeUndo() {
+  public function testRangeUndo(): void {
     $query = $this->connection->select('test');
     $query->addField('test', 'name');
     $query->addField('test', 'age', 'age');
@@ -182,7 +182,7 @@ public function testRangeUndo() {
   /**
    * Tests distinct queries.
    */
-  public function testDistinct() {
+  public function testDistinct(): void {
     $query = $this->connection->select('test_task');
     $query->addField('test_task', 'task');
     $query->orderBy('task');
@@ -196,7 +196,7 @@ public function testDistinct() {
   /**
    * Tests that we can generate a count query from a built query.
    */
-  public function testCountQuery() {
+  public function testCountQuery(): void {
     $query = $this->connection->select('test');
     $name_field = $query->addField('test', 'name');
     $age_field = $query->addField('test', 'age', 'age');
@@ -216,7 +216,7 @@ public function testCountQuery() {
   /**
    * Tests having queries.
    */
-  public function testHavingCountQuery() {
+  public function testHavingCountQuery(): void {
     $query = $this->connection->select('test')
       ->extend(PagerSelectExtender::class)
       ->groupBy('age')
@@ -230,7 +230,7 @@ public function testHavingCountQuery() {
   /**
    * Tests that countQuery removes 'all_fields' statements and ordering clauses.
    */
-  public function testCountQueryRemovals() {
+  public function testCountQueryRemovals(): void {
     $query = $this->connection->select('test');
     $query->fields('test');
     $query->orderBy('name');
@@ -260,7 +260,7 @@ public function testCountQueryRemovals() {
   /**
    * Tests that countQuery properly removes fields and expressions.
    */
-  public function testCountQueryFieldRemovals() {
+  public function testCountQueryFieldRemovals(): void {
     // countQuery should remove all fields and expressions, so this can be
     // tested by adding a non-existent field and expression: if it ends
     // up in the query, an error will be thrown. If not, it will return the
@@ -278,7 +278,7 @@ public function testCountQueryFieldRemovals() {
   /**
    * Tests that we can generate a count query from a query with distinct.
    */
-  public function testCountQueryDistinct() {
+  public function testCountQueryDistinct(): void {
     $query = $this->connection->select('test_task');
     $query->addField('test_task', 'task');
     $query->distinct();
@@ -291,7 +291,7 @@ public function testCountQueryDistinct() {
   /**
    * Tests that we can generate a count query from a query with GROUP BY.
    */
-  public function testCountQueryGroupBy() {
+  public function testCountQueryGroupBy(): void {
     $query = $this->connection->select('test_task');
     $query->addField('test_task', 'pid');
     $query->groupBy('pid');
@@ -316,7 +316,7 @@ public function testCountQueryGroupBy() {
   /**
    * Confirms that we can properly nest conditional clauses.
    */
-  public function testNestedConditions() {
+  public function testNestedConditions(): void {
     // This query should translate to:
     // "SELECT job FROM {test} WHERE name = 'Paul' AND (age = 26 OR age = 27)"
     // That should find only one record. Yes it's a non-optimal way of writing
@@ -333,7 +333,7 @@ public function testNestedConditions() {
   /**
    * Confirms we can join on a single table twice with a dynamic alias.
    */
-  public function testJoinTwice() {
+  public function testJoinTwice(): void {
     $query = $this->connection->select('test')->fields('test');
     $alias = $query->join('test', 'test', '[test].[job] = [%alias].[job]');
     $query->addField($alias, 'name', 'other_name');
@@ -347,7 +347,7 @@ public function testJoinTwice() {
   /**
    * Tests that we can join on a query.
    */
-  public function testJoinSubquery() {
+  public function testJoinSubquery(): void {
     $account = User::create([
       'name' => $this->randomMachineName(),
       'mail' => $this->randomMachineName() . '@example.com',
@@ -385,7 +385,7 @@ public function testJoinSubquery() {
   /**
    * Tests that rowCount() throws exception on SELECT query.
    */
-  public function testSelectWithRowCount() {
+  public function testSelectWithRowCount(): void {
     $query = $this->connection->select('test');
     $query->addField('test', 'name');
     $result = $query->execute();
@@ -402,7 +402,7 @@ public function testSelectWithRowCount() {
   /**
    * Tests that join conditions can use Condition objects.
    */
-  public function testJoinConditionObject() {
+  public function testJoinConditionObject(): void {
     // Same test as testDefaultJoin, but with a Condition object.
     $query = $this->connection->select('test_task', 't');
     $join_cond = ($this->connection->condition('AND'))->where('[t].[pid] = [p].[id]');
diff --git a/core/tests/Drupal/KernelTests/Core/Database/SelectLeastTest.php b/core/tests/Drupal/KernelTests/Core/Database/SelectLeastTest.php
index 5294b75995e9..a67976589ecb 100644
--- a/core/tests/Drupal/KernelTests/Core/Database/SelectLeastTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Database/SelectLeastTest.php
@@ -16,7 +16,7 @@ class SelectLeastTest extends DatabaseTestBase {
    *
    * @dataProvider selectLeastProvider
    */
-  public function testSelectLeast($values, $expected) {
+  public function testSelectLeast($values, $expected): void {
     $least = $this->connection->query("SELECT LEAST(:values[])", [':values[]' => $values])->fetchField();
     $this->assertEquals($expected, $least);
   }
diff --git a/core/tests/Drupal/KernelTests/Core/Database/SelectOrderedTest.php b/core/tests/Drupal/KernelTests/Core/Database/SelectOrderedTest.php
index 2d3bd8d78cbb..b3cc7c2d2ced 100644
--- a/core/tests/Drupal/KernelTests/Core/Database/SelectOrderedTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Database/SelectOrderedTest.php
@@ -14,7 +14,7 @@ class SelectOrderedTest extends DatabaseTestBase {
   /**
    * Tests basic ORDER BY.
    */
-  public function testSimpleSelectOrdered() {
+  public function testSimpleSelectOrdered(): void {
     $query = $this->connection->select('test');
     $query->addField('test', 'name');
     $age_field = $query->addField('test', 'age', 'age');
@@ -36,7 +36,7 @@ public function testSimpleSelectOrdered() {
   /**
    * Tests multiple ORDER BY.
    */
-  public function testSimpleSelectMultiOrdered() {
+  public function testSimpleSelectMultiOrdered(): void {
     $query = $this->connection->select('test');
     $query->addField('test', 'name');
     $age_field = $query->addField('test', 'age', 'age');
@@ -67,7 +67,7 @@ public function testSimpleSelectMultiOrdered() {
   /**
    * Tests ORDER BY descending.
    */
-  public function testSimpleSelectOrderedDesc() {
+  public function testSimpleSelectOrderedDesc(): void {
     $query = $this->connection->select('test');
     $query->addField('test', 'name');
     $age_field = $query->addField('test', 'age', 'age');
diff --git a/core/tests/Drupal/KernelTests/Core/Database/SelectSubqueryTest.php b/core/tests/Drupal/KernelTests/Core/Database/SelectSubqueryTest.php
index 98e153bf5a46..acc6ef22cb23 100644
--- a/core/tests/Drupal/KernelTests/Core/Database/SelectSubqueryTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Database/SelectSubqueryTest.php
@@ -14,7 +14,7 @@ class SelectSubqueryTest extends DatabaseTestBase {
   /**
    * Tests that we can use a subquery in a FROM clause.
    */
-  public function testFromSubquerySelect() {
+  public function testFromSubquerySelect(): void {
     // Create a subquery, which is just a normal query object.
     $subquery = $this->connection->select('test_task', 'tt');
     $subquery->addField('tt', 'pid', 'pid');
@@ -50,7 +50,7 @@ public function testFromSubquerySelect() {
   /**
    * Tests that we can use a subquery in a FROM clause with a LIMIT.
    */
-  public function testFromSubquerySelectWithLimit() {
+  public function testFromSubquerySelectWithLimit(): void {
     // Create a subquery, which is just a normal query object.
     $subquery = $this->connection->select('test_task', 'tt');
     $subquery->addField('tt', 'pid', 'pid');
@@ -78,7 +78,7 @@ public function testFromSubquerySelectWithLimit() {
   /**
    * Tests that we can use a subquery with an IN operator in a WHERE clause.
    */
-  public function testConditionSubquerySelect() {
+  public function testConditionSubquerySelect(): void {
     // Create a subquery, which is just a normal query object.
     $subquery = $this->connection->select('test_task', 'tt');
     $subquery->addField('tt', 'pid', 'pid');
@@ -101,7 +101,7 @@ public function testConditionSubquerySelect() {
   /**
    * Tests we can use a subquery with a relational operator in a WHERE clause.
    */
-  public function testConditionSubquerySelect2() {
+  public function testConditionSubquerySelect2(): void {
     // Create a subquery, which is just a normal query object.
     $subquery = $this->connection->select('test', 't2');
     $subquery->addExpression('AVG([t2].[age])');
@@ -122,7 +122,7 @@ public function testConditionSubquerySelect2() {
   /**
    * Tests we can use 2 subqueries with a relational operator in a WHERE clause.
    */
-  public function testConditionSubquerySelect3() {
+  public function testConditionSubquerySelect3(): void {
     // Create subquery 1, which is just a normal query object.
     $subquery1 = $this->connection->select('test_task', 'tt');
     $subquery1->addExpression('AVG([tt].[priority])');
@@ -152,7 +152,7 @@ public function testConditionSubquerySelect3() {
    * the right hand side. The test query may not be that logical but that's due
    * to the limited amount of data and tables. 'Valid' use cases do exist :)
    */
-  public function testConditionSubquerySelect4() {
+  public function testConditionSubquerySelect4(): void {
     // Create subquery 1, which is just a normal query object.
     $subquery1 = $this->connection->select('test_task', 'tt');
     $subquery1->addExpression('AVG([tt].[priority])');
@@ -188,7 +188,7 @@ public function testConditionSubquerySelect4() {
   /**
    * Tests that we can use a subquery in a JOIN clause.
    */
-  public function testJoinSubquerySelect() {
+  public function testJoinSubquerySelect(): void {
     // Create a subquery, which is just a normal query object.
     $subquery = $this->connection->select('test_task', 'tt');
     $subquery->addField('tt', 'pid', 'pid');
@@ -217,7 +217,7 @@ public function testJoinSubquerySelect() {
    * We essentially select all rows from the {test} table that have matching
    * rows in the {test_people} table based on the shared name column.
    */
-  public function testExistsSubquerySelect() {
+  public function testExistsSubquerySelect(): void {
     // Put George into {test_people}.
     $this->connection->insert('test_people')
       ->fields([
@@ -247,7 +247,7 @@ public function testExistsSubquerySelect() {
    * We essentially select all rows from the {test} table that don't have
    * matching rows in the {test_people} table based on the shared name column.
    */
-  public function testNotExistsSubquerySelect() {
+  public function testNotExistsSubquerySelect(): void {
     // Put George into {test_people}.
     $this->connection->insert('test_people')
       ->fields([
diff --git a/core/tests/Drupal/KernelTests/Core/Database/SelectTest.php b/core/tests/Drupal/KernelTests/Core/Database/SelectTest.php
index ee4ce8145e75..be877c2866ae 100644
--- a/core/tests/Drupal/KernelTests/Core/Database/SelectTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Database/SelectTest.php
@@ -19,7 +19,7 @@ class SelectTest extends DatabaseTestBase {
   /**
    * Tests rudimentary SELECT statements.
    */
-  public function testSimpleSelect() {
+  public function testSimpleSelect(): void {
     $query = $this->connection->select('test');
     $query->addField('test', 'name');
     $query->addField('test', 'age', 'age');
@@ -31,7 +31,7 @@ public function testSimpleSelect() {
   /**
    * Tests rudimentary SELECT statement with a COMMENT.
    */
-  public function testSimpleComment() {
+  public function testSimpleComment(): void {
     $query = $this->connection->select('test')->comment('Testing query comments');
     $query->addField('test', 'name');
     $query->addField('test', 'age', 'age');
@@ -49,7 +49,7 @@ public function testSimpleComment() {
   /**
    * Tests query COMMENT system against vulnerabilities.
    */
-  public function testVulnerableComment() {
+  public function testVulnerableComment(): void {
     $query = $this->connection->select('test')->comment('Testing query comments */ SELECT nid FROM {node}; --');
     $query->addField('test', 'name');
     $query->addField('test', 'age', 'age');
@@ -106,7 +106,7 @@ public function makeCommentsProvider() {
   /**
    * Tests basic conditionals on SELECT statements.
    */
-  public function testSimpleSelectConditional() {
+  public function testSimpleSelectConditional(): void {
     $query = $this->connection->select('test');
     $name_field = $query->addField('test', 'name');
     $age_field = $query->addField('test', 'age', 'age');
@@ -126,7 +126,7 @@ public function testSimpleSelectConditional() {
   /**
    * Tests SELECT statements with expressions.
    */
-  public function testSimpleSelectExpression() {
+  public function testSimpleSelectExpression(): void {
     $query = $this->connection->select('test');
     $name_field = $query->addField('test', 'name');
     $age_field = $query->addExpression("[age]*2", 'double_age');
@@ -146,7 +146,7 @@ public function testSimpleSelectExpression() {
   /**
    * Tests SELECT statements with multiple expressions.
    */
-  public function testSimpleSelectExpressionMultiple() {
+  public function testSimpleSelectExpressionMultiple(): void {
     $query = $this->connection->select('test');
     $name_field = $query->addField('test', 'name');
     $age_double_field = $query->addExpression("[age]*2");
@@ -168,7 +168,7 @@ public function testSimpleSelectExpressionMultiple() {
   /**
    * Tests adding multiple fields to a SELECT statement at the same time.
    */
-  public function testSimpleSelectMultipleFields() {
+  public function testSimpleSelectMultipleFields(): void {
     $record = $this->connection->select('test')
       ->fields('test', ['id', 'name', 'age', 'job'])
       ->condition('age', 27)
@@ -191,7 +191,7 @@ public function testSimpleSelectMultipleFields() {
   /**
    * Tests adding all fields from a given table to a SELECT statement.
    */
-  public function testSimpleSelectAllFields() {
+  public function testSimpleSelectAllFields(): void {
     $record = $this->connection->select('test')
       ->fields('test')
       ->condition('age', 27)
@@ -214,7 +214,7 @@ public function testSimpleSelectAllFields() {
   /**
    * Tests that a comparison with NULL is always FALSE.
    */
-  public function testNullCondition() {
+  public function testNullCondition(): void {
     $this->ensureSampleDataNull();
 
     $names = $this->connection->select('test_null', 'tn')
@@ -228,7 +228,7 @@ public function testNullCondition() {
   /**
    * Tests that we can find a record with a NULL value.
    */
-  public function testIsNullCondition() {
+  public function testIsNullCondition(): void {
     $this->ensureSampleDataNull();
 
     $names = $this->connection->select('test_null', 'tn')
@@ -243,7 +243,7 @@ public function testIsNullCondition() {
   /**
    * Tests that we can find a record without a NULL value.
    */
-  public function testIsNotNullCondition() {
+  public function testIsNotNullCondition(): void {
     $this->ensureSampleDataNull();
 
     $names = $this->connection->select('test_null', 'tn')
@@ -260,7 +260,7 @@ public function testIsNotNullCondition() {
   /**
    * Tests that we can force a query to return an empty result.
    */
-  public function testAlwaysFalseCondition() {
+  public function testAlwaysFalseCondition(): void {
     $names = $this->connection->select('test', 'test')
       ->fields('test', ['name'])
       ->condition('age', 27)
@@ -281,7 +281,7 @@ public function testAlwaysFalseCondition() {
   /**
    * Tests that we can force an extended query to return an empty result.
    */
-  public function testExtenderAlwaysFalseCondition() {
+  public function testExtenderAlwaysFalseCondition(): void {
     $names = $this->connection->select('test', 'test')
       ->extend(SelectExtender::class)
       ->fields('test', ['name'])
@@ -307,7 +307,7 @@ public function testExtenderAlwaysFalseCondition() {
    * This is semantically equal to UNION DISTINCT, so we don't explicitly test
    * that.
    */
-  public function testUnion() {
+  public function testUnion(): void {
     $query_1 = $this->connection->select('test', 't')
       ->fields('t', ['name'])
       ->condition('age', [27, 28], 'IN');
@@ -329,7 +329,7 @@ public function testUnion() {
   /**
    * Tests that we can UNION ALL multiple SELECT queries together.
    */
-  public function testUnionAll() {
+  public function testUnionAll(): void {
     $query_1 = $this->connection->select('test', 't')
       ->fields('t', ['name'])
       ->condition('age', [27, 28], 'IN');
@@ -353,7 +353,7 @@ public function testUnionAll() {
   /**
    * Tests that we can get a count query for a UNION Select query.
    */
-  public function testUnionCount() {
+  public function testUnionCount(): void {
     $query_1 = $this->connection->select('test', 't')
       ->fields('t', ['name', 'age'])
       ->condition('age', [27, 28], 'IN');
@@ -373,7 +373,7 @@ public function testUnionCount() {
   /**
    * Tests that we can UNION multiple Select queries together and set the ORDER.
    */
-  public function testUnionOrder() {
+  public function testUnionOrder(): void {
     // This gives George and Ringo.
     $query_1 = $this->connection->select('test', 't')
       ->fields('t', ['name'])
@@ -402,7 +402,7 @@ public function testUnionOrder() {
   /**
    * Tests that we can UNION multiple Select queries together with and a LIMIT.
    */
-  public function testUnionOrderLimit() {
+  public function testUnionOrderLimit(): void {
     // This gives George and Ringo.
     $query_1 = $this->connection->select('test', 't')
       ->fields('t', ['name'])
@@ -443,7 +443,7 @@ public function testUnionOrderLimit() {
    * order each time, the only way this could happen is if we have successfully
    * triggered the database's random ordering functionality.
    */
-  public function testRandomOrder() {
+  public function testRandomOrder(): void {
     // Use 52 items, so the chance that this test fails by accident will be the
     // same as the chance that a deck of cards will come out in the same order
     // after shuffling it (in other words, nearly impossible).
@@ -523,7 +523,7 @@ public static function providerRegularExpressionCondition() {
    *
    * @dataProvider providerRegularExpressionCondition
    */
-  public function testRegularExpressionCondition($expected, $column, $pattern, $operator) {
+  public function testRegularExpressionCondition($expected, $column, $pattern, $operator): void {
     $database = $this->container->get('database');
     $database->insert('test')
       ->fields([
@@ -545,7 +545,7 @@ public function testRegularExpressionCondition($expected, $column, $pattern, $op
   /**
    * Tests that aliases are renamed when they are duplicates.
    */
-  public function testSelectDuplicateAlias() {
+  public function testSelectDuplicateAlias(): void {
     $query = $this->connection->select('test', 't');
     $alias1 = $query->addField('t', 'name', 'the_alias');
     $alias2 = $query->addField('t', 'age', 'the_alias');
@@ -555,7 +555,7 @@ public function testSelectDuplicateAlias() {
   /**
    * Tests that an invalid count query throws an exception.
    */
-  public function testInvalidSelectCount() {
+  public function testInvalidSelectCount(): void {
     $this->expectException(DatabaseExceptionWrapper::class);
     // This query will fail because the table does not exist.
     $this->connection->select('some_table_that_does_not_exist', 't')
@@ -567,7 +567,7 @@ public function testInvalidSelectCount() {
   /**
    * Tests thrown exception for IN query conditions with an empty array.
    */
-  public function testEmptyInCondition() {
+  public function testEmptyInCondition(): void {
     try {
       $this->connection->select('test', 't')
         ->fields('t')
@@ -619,7 +619,7 @@ public static function providerNonArrayOperatorWithArrayValueCondition() {
    *
    * @dataProvider providerNonArrayOperatorWithArrayValueCondition
    */
-  public function testNonArrayOperatorWithArrayValueCondition($operator, $operator_in_exception_message) {
+  public function testNonArrayOperatorWithArrayValueCondition($operator, $operator_in_exception_message): void {
     $this->expectException(InvalidQueryException::class);
     $this->expectExceptionMessage("Query condition 'age " . $operator_in_exception_message . " 26, 27' must have an array compatible operator.");
 
diff --git a/core/tests/Drupal/KernelTests/Core/Database/SerializeQueryTest.php b/core/tests/Drupal/KernelTests/Core/Database/SerializeQueryTest.php
index 00fe2780d1c9..0db69d82c97c 100644
--- a/core/tests/Drupal/KernelTests/Core/Database/SerializeQueryTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Database/SerializeQueryTest.php
@@ -14,7 +14,7 @@ class SerializeQueryTest extends DatabaseTestBase {
   /**
    * Confirms that a query can be serialized and unserialized.
    */
-  public function testSerializeQuery() {
+  public function testSerializeQuery(): void {
     $query = $this->connection->select('test');
     $query->addField('test', 'age');
     $query->condition('name', 'Ringo');
diff --git a/core/tests/Drupal/KernelTests/Core/Database/StatementTest.php b/core/tests/Drupal/KernelTests/Core/Database/StatementTest.php
index 72f693015f45..e14f39cb30da 100644
--- a/core/tests/Drupal/KernelTests/Core/Database/StatementTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Database/StatementTest.php
@@ -17,7 +17,7 @@ class StatementTest extends DatabaseTestBase {
   /**
    * Tests that a prepared statement object can be reused for multiple inserts.
    */
-  public function testRepeatedInsertStatementReuse() {
+  public function testRepeatedInsertStatementReuse(): void {
     $num_records_before = $this->connection->select('test')->countQuery()->execute()->fetchField();
 
     $sql = "INSERT INTO {test} ([name], [age]) VALUES (:name, :age)";
diff --git a/core/tests/Drupal/KernelTests/Core/Database/TaggingTest.php b/core/tests/Drupal/KernelTests/Core/Database/TaggingTest.php
index 92d7302c4fc1..0f3368dd9743 100644
--- a/core/tests/Drupal/KernelTests/Core/Database/TaggingTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Database/TaggingTest.php
@@ -19,7 +19,7 @@ class TaggingTest extends DatabaseTestBase {
   /**
    * Confirms that a query has a tag added to it.
    */
-  public function testHasTag() {
+  public function testHasTag(): void {
     $query = $this->connection->select('test');
     $query->addField('test', 'name');
     $query->addField('test', 'age', 'age');
@@ -33,7 +33,7 @@ public function testHasTag() {
   /**
    * Tests query tagging "has all of these tags" functionality.
    */
-  public function testHasAllTags() {
+  public function testHasAllTags(): void {
     $query = $this->connection->select('test');
     $query->addField('test', 'name');
     $query->addField('test', 'age', 'age');
@@ -48,7 +48,7 @@ public function testHasAllTags() {
   /**
    * Tests query tagging "has at least one of these tags" functionality.
    */
-  public function testHasAnyTag() {
+  public function testHasAnyTag(): void {
     $query = $this->connection->select('test');
     $query->addField('test', 'name');
     $query->addField('test', 'age', 'age');
@@ -62,7 +62,7 @@ public function testHasAnyTag() {
   /**
    * Confirms that an extended query has a tag added to it.
    */
-  public function testExtenderHasTag() {
+  public function testExtenderHasTag(): void {
     $query = $this->connection->select('test')
       ->extend(SelectExtender::class);
     $query->addField('test', 'name');
@@ -77,7 +77,7 @@ public function testExtenderHasTag() {
   /**
    * Tests extended query tagging "has all of these tags" functionality.
    */
-  public function testExtenderHasAllTags() {
+  public function testExtenderHasAllTags(): void {
     $query = $this->connection->select('test')
       ->extend(SelectExtender::class);
     $query->addField('test', 'name');
@@ -93,7 +93,7 @@ public function testExtenderHasAllTags() {
   /**
    * Tests extended query tagging for "has at least one of these tags".
    */
-  public function testExtenderHasAnyTag() {
+  public function testExtenderHasAnyTag(): void {
     $query = $this->connection->select('test')
       ->extend(SelectExtender::class);
     $query->addField('test', 'name');
@@ -110,7 +110,7 @@ public function testExtenderHasAnyTag() {
    *
    * This is how we pass additional context to alter hooks.
    */
-  public function testMetaData() {
+  public function testMetaData(): void {
     $query = $this->connection->select('test');
     $query->addField('test', 'name');
     $query->addField('test', 'age', 'age');
diff --git a/core/tests/Drupal/KernelTests/Core/Database/TemporaryQueryTestBase.php b/core/tests/Drupal/KernelTests/Core/Database/TemporaryQueryTestBase.php
index cfb990c565e1..a48855c20400 100644
--- a/core/tests/Drupal/KernelTests/Core/Database/TemporaryQueryTestBase.php
+++ b/core/tests/Drupal/KernelTests/Core/Database/TemporaryQueryTestBase.php
@@ -30,7 +30,7 @@ public function countTableRows($table_name) {
   /**
    * Confirms that temporary tables work.
    */
-  public function testTemporaryQuery() {
+  public function testTemporaryQuery(): void {
     $connection = $this->getConnection();
 
     // Now try to run two temporary queries in the same request.
diff --git a/core/tests/Drupal/KernelTests/Core/Database/UpdateComplexTest.php b/core/tests/Drupal/KernelTests/Core/Database/UpdateComplexTest.php
index 484051040172..53a7abaec87f 100644
--- a/core/tests/Drupal/KernelTests/Core/Database/UpdateComplexTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Database/UpdateComplexTest.php
@@ -14,7 +14,7 @@ class UpdateComplexTest extends DatabaseTestBase {
   /**
    * Tests updates with OR conditionals.
    */
-  public function testOrConditionUpdate() {
+  public function testOrConditionUpdate(): void {
     $update = $this->connection->update('test')
       ->fields(['job' => 'Musician'])
       ->condition(($this->connection->condition('OR'))
@@ -31,7 +31,7 @@ public function testOrConditionUpdate() {
   /**
    * Tests WHERE IN clauses.
    */
-  public function testInConditionUpdate() {
+  public function testInConditionUpdate(): void {
     $num_updated = $this->connection->update('test')
       ->fields(['job' => 'Musician'])
       ->condition('name', ['John', 'Paul'], 'IN')
@@ -45,7 +45,7 @@ public function testInConditionUpdate() {
   /**
    * Tests WHERE NOT IN clauses.
    */
-  public function testNotInConditionUpdate() {
+  public function testNotInConditionUpdate(): void {
     // The o is lowercase in the 'NoT IN' operator, to make sure the operators
     // work in mixed case.
     $num_updated = $this->connection->update('test')
@@ -61,7 +61,7 @@ public function testNotInConditionUpdate() {
   /**
    * Tests BETWEEN conditional clauses.
    */
-  public function testBetweenConditionUpdate() {
+  public function testBetweenConditionUpdate(): void {
     $num_updated = $this->connection->update('test')
       ->fields(['job' => 'Musician'])
       ->condition('age', [25, 26], 'BETWEEN')
@@ -75,7 +75,7 @@ public function testBetweenConditionUpdate() {
   /**
    * Tests LIKE conditionals.
    */
-  public function testLikeConditionUpdate() {
+  public function testLikeConditionUpdate(): void {
     $num_updated = $this->connection->update('test')
       ->fields(['job' => 'Musician'])
       ->condition('name', '%ge%', 'LIKE')
@@ -89,7 +89,7 @@ public function testLikeConditionUpdate() {
   /**
    * Tests UPDATE with expression values.
    */
-  public function testUpdateExpression() {
+  public function testUpdateExpression(): void {
     $before_age = $this->connection->query('SELECT [age] FROM {test} WHERE [name] = :name', [':name' => 'Ringo'])->fetchField();
     $num_updated = $this->connection->update('test')
       ->condition('name', 'Ringo')
@@ -110,7 +110,7 @@ public function testUpdateExpression() {
   /**
    * Tests UPDATE with only expression values.
    */
-  public function testUpdateOnlyExpression() {
+  public function testUpdateOnlyExpression(): void {
     $before_age = $this->connection->query('SELECT [age] FROM {test} WHERE [name] = :name', [':name' => 'Ringo'])->fetchField();
     $num_updated = $this->connection->update('test')
       ->condition('name', 'Ringo')
@@ -125,7 +125,7 @@ public function testUpdateOnlyExpression() {
   /**
    * Tests UPDATE with a subselect value.
    */
-  public function testSubSelectUpdate() {
+  public function testSubSelectUpdate(): void {
     $subselect = $this->connection->select('test_task', 't');
     $subselect->addExpression('MAX([priority]) + :increment', 'max_priority', [':increment' => 30]);
     // Clone this to make sure we are running a different query when
diff --git a/core/tests/Drupal/KernelTests/Core/Database/UpdateLobTest.php b/core/tests/Drupal/KernelTests/Core/Database/UpdateLobTest.php
index f7073b79c267..60bb3c6f9c23 100644
--- a/core/tests/Drupal/KernelTests/Core/Database/UpdateLobTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Database/UpdateLobTest.php
@@ -14,7 +14,7 @@ class UpdateLobTest extends DatabaseTestBase {
   /**
    * Confirms that we can update a blob column.
    */
-  public function testUpdateOneBlob() {
+  public function testUpdateOneBlob(): void {
     $data = "This is\000a test.";
     $this->assertSame(15, strlen($data), 'Test data contains a NULL.');
     $id = $this->connection->insert('test_one_blob')
@@ -34,7 +34,7 @@ public function testUpdateOneBlob() {
   /**
    * Tests that we can update a blob column to null.
    */
-  public function testUpdateNullBlob() {
+  public function testUpdateNullBlob(): void {
     $id = $this->connection->insert('test_one_blob')
       ->fields(['blob1' => 'test'])
       ->execute();
@@ -52,7 +52,7 @@ public function testUpdateNullBlob() {
   /**
    * Confirms that we can update two blob columns in the same table.
    */
-  public function testUpdateMultipleBlob() {
+  public function testUpdateMultipleBlob(): void {
     $id = $this->connection->insert('test_two_blobs')
       ->fields([
         'blob1' => 'This is',
diff --git a/core/tests/Drupal/KernelTests/Core/Database/UpdateTest.php b/core/tests/Drupal/KernelTests/Core/Database/UpdateTest.php
index eaaacc52f1ce..260237c06b3c 100644
--- a/core/tests/Drupal/KernelTests/Core/Database/UpdateTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Database/UpdateTest.php
@@ -17,7 +17,7 @@ class UpdateTest extends DatabaseTestBase {
   /**
    * Confirms that we can update a single record successfully.
    */
-  public function testSimpleUpdate() {
+  public function testSimpleUpdate(): void {
     $num_updated = $this->connection->update('test')
       ->fields(['name' => 'Tiffany'])
       ->condition('id', 1)
@@ -31,7 +31,7 @@ public function testSimpleUpdate() {
   /**
    * Confirms updating to NULL.
    */
-  public function testSimpleNullUpdate() {
+  public function testSimpleNullUpdate(): void {
     $this->ensureSampleDataNull();
     $num_updated = $this->connection->update('test_null')
       ->fields(['age' => NULL])
@@ -46,7 +46,7 @@ public function testSimpleNullUpdate() {
   /**
    * Confirms that we can update multiple records successfully.
    */
-  public function testMultiUpdate() {
+  public function testMultiUpdate(): void {
     $num_updated = $this->connection->update('test')
       ->fields(['job' => 'Musician'])
       ->condition('job', 'Singer')
@@ -60,7 +60,7 @@ public function testMultiUpdate() {
   /**
    * Confirms that we can update multiple records with a non-equality condition.
    */
-  public function testMultiGTUpdate() {
+  public function testMultiGTUpdate(): void {
     $num_updated = $this->connection->update('test')
       ->fields(['job' => 'Musician'])
       ->condition('age', 26, '>')
@@ -74,7 +74,7 @@ public function testMultiGTUpdate() {
   /**
    * Confirms that we can update multiple records with a where call.
    */
-  public function testWhereUpdate() {
+  public function testWhereUpdate(): void {
     $num_updated = $this->connection->update('test')
       ->fields(['job' => 'Musician'])
       ->where('[age] > :age', [':age' => 26])
@@ -88,7 +88,7 @@ public function testWhereUpdate() {
   /**
    * Confirms that we can stack condition and where calls.
    */
-  public function testWhereAndConditionUpdate() {
+  public function testWhereAndConditionUpdate(): void {
     $update = $this->connection->update('test')
       ->fields(['job' => 'Musician'])
       ->where('[age] > :age', [':age' => 26])
@@ -103,7 +103,7 @@ public function testWhereAndConditionUpdate() {
   /**
    * Tests updating with expressions.
    */
-  public function testExpressionUpdate() {
+  public function testExpressionUpdate(): void {
     // Ensure that expressions are handled properly. This should set every
     // record's age to a square of itself.
     $num_rows = $this->connection->update('test')
@@ -118,7 +118,7 @@ public function testExpressionUpdate() {
   /**
    * Tests return value on update.
    */
-  public function testUpdateAffectedRows() {
+  public function testUpdateAffectedRows(): void {
     // At 5am in the morning, all band members but those with a priority 1 task
     // are sleeping. So we set their tasks to 'sleep'. 5 records match the
     // condition and therefore are affected by the query, even though two of
@@ -135,7 +135,7 @@ public function testUpdateAffectedRows() {
   /**
    * Confirm that we can update values in a column with special name.
    */
-  public function testSpecialColumnUpdate() {
+  public function testSpecialColumnUpdate(): void {
     $num_updated = $this->connection->update('select')
       ->fields([
         'update' => 'New update value',
diff --git a/core/tests/Drupal/KernelTests/Core/Database/UpsertTest.php b/core/tests/Drupal/KernelTests/Core/Database/UpsertTest.php
index 47a83be9e59d..edb2717ed633 100644
--- a/core/tests/Drupal/KernelTests/Core/Database/UpsertTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Database/UpsertTest.php
@@ -17,7 +17,7 @@ class UpsertTest extends DatabaseTestBase {
   /**
    * Confirms that we can upsert (update-or-insert) records successfully.
    */
-  public function testUpsert() {
+  public function testUpsert(): void {
     $connection = Database::getConnection();
     $num_records_before = $connection->query('SELECT COUNT(*) FROM {test_people}')->fetchField();
 
@@ -61,7 +61,7 @@ public function testUpsert() {
   /**
    * Confirms that we can upsert records with keywords successfully.
    */
-  public function testUpsertWithKeywords() {
+  public function testUpsertWithKeywords(): void {
     $num_records_before = $this->connection->query('SELECT COUNT(*) FROM {select}')->fetchField();
 
     $upsert = $this->connection->upsert('select')
@@ -127,7 +127,7 @@ public function testUpsertNonExistingTable(): void {
   /**
    * Tests that we can upsert a null into blob field.
    */
-  public function testUpsertNullBlob() {
+  public function testUpsertNullBlob(): void {
     $id = $this->connection->insert('test_one_blob')
       ->fields(['blob1' => 'test'])
       ->execute();
diff --git a/core/tests/Drupal/KernelTests/Core/Datetime/DateFormatterTest.php b/core/tests/Drupal/KernelTests/Core/Datetime/DateFormatterTest.php
index f9228eea5d97..e3c68cb72fd9 100644
--- a/core/tests/Drupal/KernelTests/Core/Datetime/DateFormatterTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Datetime/DateFormatterTest.php
@@ -55,7 +55,7 @@ protected function setUp(): void {
    *
    * @covers ::format
    */
-  public function testFormat() {
+  public function testFormat(): void {
     /** @var \Drupal\Core\Datetime\DateFormatterInterface $formatter */
     $formatter = $this->container->get('date.formatter');
     /** @var \Drupal\Core\Language\LanguageManagerInterface $language_manager */
@@ -121,7 +121,7 @@ public function testFormat() {
    *
    * @covers ::format
    */
-  public function testRfc2822DateFormat() {
+  public function testRfc2822DateFormat(): void {
     $days_of_week_abbr = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
     foreach ($days_of_week_abbr as $day_of_week_abbr) {
       $this->setSetting('locale_custom_strings_' . self::LANGCODE, [
diff --git a/core/tests/Drupal/KernelTests/Core/Datetime/DatelistElementFormTest.php b/core/tests/Drupal/KernelTests/Core/Datetime/DatelistElementFormTest.php
index eb8dd5f64b17..a789f14d4110 100644
--- a/core/tests/Drupal/KernelTests/Core/Datetime/DatelistElementFormTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Datetime/DatelistElementFormTest.php
@@ -109,7 +109,7 @@ public function validateForm(array &$form, FormStateInterface $form_state) {}
   /**
    * Tests that trusted callbacks are executed.
    */
-  public function testDatelistElement() {
+  public function testDatelistElement(): void {
     $form_state = new FormState();
     $form = \Drupal::formBuilder()->buildForm($this, $form_state);
     $this->render($form);
diff --git a/core/tests/Drupal/KernelTests/Core/Datetime/DatetimeElementFormTest.php b/core/tests/Drupal/KernelTests/Core/Datetime/DatetimeElementFormTest.php
index 12792adb067c..b4048f17e2b4 100644
--- a/core/tests/Drupal/KernelTests/Core/Datetime/DatetimeElementFormTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Datetime/DatetimeElementFormTest.php
@@ -134,7 +134,7 @@ public function validateForm(array &$form, FormStateInterface $form_state) {}
   /**
    * Tests that default handlers are added even if custom are specified.
    */
-  public function testDatetimeElement() {
+  public function testDatetimeElement(): void {
     $form_state = new FormState();
     $form = \Drupal::formBuilder()->buildForm($this, $form_state);
     $this->render($form);
@@ -195,7 +195,7 @@ public static function providerUntrusted() : array {
   /**
    * Tests proper timezone handling of the Datetime element.
    */
-  public function testTimezoneHandling() {
+  public function testTimezoneHandling(): void {
     // Render the form once with the site's timezone.
     $form = \Drupal::formBuilder()->getForm($this);
     $this->render($form);
diff --git a/core/tests/Drupal/KernelTests/Core/Datetime/Element/TimezoneTest.php b/core/tests/Drupal/KernelTests/Core/Datetime/Element/TimezoneTest.php
index 6a24e520565e..491e37ae818d 100644
--- a/core/tests/Drupal/KernelTests/Core/Datetime/Element/TimezoneTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Datetime/Element/TimezoneTest.php
@@ -205,7 +205,7 @@ protected function setUp(): void {
    * save the form, otherwise stored times may be changed without the user
    * changing the element's values.
    */
-  public function testDatetimeElementTimesUnderstoodCorrectly() {
+  public function testDatetimeElementTimesUnderstoodCorrectly(): void {
     $this->assertTimesUnderstoodCorrectly('datetime', ['date', 'time']);
   }
 
@@ -214,7 +214,7 @@ public function testDatetimeElementTimesUnderstoodCorrectly() {
    *
    * See testDatetimeElementTimesUnderstoodCorrectly() for more explanation.
    */
-  public function testDatelistElementTimesUnderstoodCorrectly() {
+  public function testDatelistElementTimesUnderstoodCorrectly(): void {
     $this->assertTimesUnderstoodCorrectly('datelist', [
       'day',
       'month',
@@ -232,7 +232,7 @@ public function testDatelistElementTimesUnderstoodCorrectly() {
    * accurately reflect the timezone that will be used to interpret times
    * entered through the element.
    */
-  public function testDatetimeTimezonePropertyProcessed() {
+  public function testDatetimeTimezonePropertyProcessed(): void {
     $this->assertDateTimezonePropertyProcessed('datetime');
   }
 
@@ -241,7 +241,7 @@ public function testDatetimeTimezonePropertyProcessed() {
    *
    * See testDatetimeTimezonePropertyProcessed() for more explanation.
    */
-  public function testDatelistTimezonePropertyProcessed() {
+  public function testDatelistTimezonePropertyProcessed(): void {
     $this->assertDateTimezonePropertyProcessed('datelist');
   }
 
diff --git a/core/tests/Drupal/KernelTests/Core/Datetime/TimestampSchemaTest.php b/core/tests/Drupal/KernelTests/Core/Datetime/TimestampSchemaTest.php
index 794d5e84ab17..1ce687034626 100644
--- a/core/tests/Drupal/KernelTests/Core/Datetime/TimestampSchemaTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Datetime/TimestampSchemaTest.php
@@ -34,7 +34,7 @@ protected function setUp(): void {
   /**
    * Tests if the timestamp field schema is validated.
    */
-  public function testTimestampSchema() {
+  public function testTimestampSchema(): void {
     $this->installConfig(['field_timestamp_test']);
     // Make at least an assertion.
     $this->assertTrue(TRUE);
diff --git a/core/tests/Drupal/KernelTests/Core/DependencyInjection/ServicesDefaultsTest.php b/core/tests/Drupal/KernelTests/Core/DependencyInjection/ServicesDefaultsTest.php
index c88e46503879..07828a27492f 100644
--- a/core/tests/Drupal/KernelTests/Core/DependencyInjection/ServicesDefaultsTest.php
+++ b/core/tests/Drupal/KernelTests/Core/DependencyInjection/ServicesDefaultsTest.php
@@ -19,7 +19,7 @@ class ServicesDefaultsTest extends KernelTestBase {
   /**
    * Tests that 'services_defaults_test.service' has its dependencies injected.
    */
-  public function testAutowiring() {
+  public function testAutowiring(): void {
     // Ensure interface autowiring works.
     $this->assertSame(
       $this->container->get('Drupal\services_defaults_test\TestInjection'),
@@ -50,7 +50,7 @@ public function testAutowiring() {
   /**
    * Tests that default tags for 'services_defaults_test.service' are applied.
    */
-  public function testDefaultTags() {
+  public function testDefaultTags(): void {
     // Ensure default tags work.
     $testServiceDefinition = $this->container->getDefinition('Drupal\services_defaults_test\TestService');
     $testInjection1Definition = $this->container->getDefinition('Drupal\services_defaults_test\TestInjection');
@@ -76,7 +76,7 @@ public function testDefaultTags() {
   /**
    * Tests that service from 'services_defaults_test.service' is private.
    */
-  public function testPrivateServices() {
+  public function testPrivateServices(): void {
     // Ensure default and overridden public flag works.
     $this->expectException(ServiceNotFoundException::class);
     $this->container->getDefinition('Drupal\services_defaults_test\TestPrivateService');
diff --git a/core/tests/Drupal/KernelTests/Core/DrupalKernel/DrupalKernelSiteTest.php b/core/tests/Drupal/KernelTests/Core/DrupalKernel/DrupalKernelSiteTest.php
index c58461ea29ee..337d920c27a3 100644
--- a/core/tests/Drupal/KernelTests/Core/DrupalKernel/DrupalKernelSiteTest.php
+++ b/core/tests/Drupal/KernelTests/Core/DrupalKernel/DrupalKernelSiteTest.php
@@ -17,7 +17,7 @@ class DrupalKernelSiteTest extends KernelTestBase {
   /**
    * Tests services.yml in site directory.
    */
-  public function testServicesYml() {
+  public function testServicesYml(): void {
     $container_yamls = Settings::get('container_yamls');
     $container_yamls[] = $this->siteDirectory . '/services.yml';
     $this->setSetting('container_yamls', $container_yamls);
diff --git a/core/tests/Drupal/KernelTests/Core/DrupalKernel/DrupalKernelTest.php b/core/tests/Drupal/KernelTests/Core/DrupalKernel/DrupalKernelTest.php
index 41566b3ba95a..8d1c4fd2ab05 100644
--- a/core/tests/Drupal/KernelTests/Core/DrupalKernel/DrupalKernelTest.php
+++ b/core/tests/Drupal/KernelTests/Core/DrupalKernel/DrupalKernelTest.php
@@ -73,7 +73,7 @@ protected function getTestKernel(Request $request, ?array $modules_enabled = NUL
   /**
    * Tests DIC compilation.
    */
-  public function testCompileDIC() {
+  public function testCompileDIC(): void {
     // @todo Write a memory based storage backend for testing.
     $modules_enabled = [
       'system' => 'system',
@@ -155,7 +155,7 @@ public function testCompileDIC() {
   /**
    * Tests repeated loading of compiled DIC with different environment.
    */
-  public function testRepeatedBootWithDifferentEnvironment() {
+  public function testRepeatedBootWithDifferentEnvironment(): void {
     $request = Request::createFromGlobals();
     $class_loader = require $this->root . '/autoload.php';
 
@@ -177,7 +177,7 @@ public function testRepeatedBootWithDifferentEnvironment() {
   /**
    * Tests setting of site path after kernel boot.
    */
-  public function testPreventChangeOfSitePath() {
+  public function testPreventChangeOfSitePath(): void {
     // @todo Write a memory based storage backend for testing.
     $modules_enabled = [
       'system' => 'system',
@@ -226,7 +226,7 @@ public static function providerClassLoaderAutoDetect() {
    * @param bool $value
    *   The value to set class_loader_auto_detect to.
    */
-  public function testClassLoaderAutoDetect($value) {
+  public function testClassLoaderAutoDetect($value): void {
     // Create a virtual file system containing items that should be
     // excluded. Exception being modules directory.
     vfsStream::setup('root', NULL, [
@@ -264,7 +264,7 @@ public function testClassLoaderAutoDetect($value) {
   /**
    * @covers ::resetContainer
    */
-  public function testResetContainer() {
+  public function testResetContainer(): void {
     $modules_enabled = [
       'system' => 'system',
       'user' => 'user',
diff --git a/core/tests/Drupal/KernelTests/Core/DrupalKernel/ServiceDestructionTest.php b/core/tests/Drupal/KernelTests/Core/DrupalKernel/ServiceDestructionTest.php
index a3243f9eac79..5439351aef4a 100644
--- a/core/tests/Drupal/KernelTests/Core/DrupalKernel/ServiceDestructionTest.php
+++ b/core/tests/Drupal/KernelTests/Core/DrupalKernel/ServiceDestructionTest.php
@@ -17,7 +17,7 @@ class ServiceDestructionTest extends KernelTestBase {
   /**
    * Verifies that services are destructed when used.
    */
-  public function testDestructionUsed() {
+  public function testDestructionUsed(): void {
     // Enable the test module to add it to the container.
     $this->enableModules(['service_provider_test']);
 
@@ -39,7 +39,7 @@ public function testDestructionUsed() {
   /**
    * Verifies that services are not unnecessarily destructed when not used.
    */
-  public function testDestructionUnused() {
+  public function testDestructionUnused(): void {
     // Enable the test module to add it to the container.
     $this->enableModules(['service_provider_test']);
 
diff --git a/core/tests/Drupal/KernelTests/Core/Element/PathElementFormTest.php b/core/tests/Drupal/KernelTests/Core/Element/PathElementFormTest.php
index 69e5c938c77d..8ce07d663e89 100644
--- a/core/tests/Drupal/KernelTests/Core/Element/PathElementFormTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Element/PathElementFormTest.php
@@ -140,7 +140,7 @@ public function validateForm(array &$form, FormStateInterface $form_state) {}
   /**
    * Tests that default handlers are added even if custom are specified.
    */
-  public function testPathElement() {
+  public function testPathElement(): void {
     $form_state = (new FormState())
       ->setValues([
         'required_validate' => 'user/' . $this->testUser->id(),
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/BundleClassTest.php b/core/tests/Drupal/KernelTests/Core/Entity/BundleClassTest.php
index c95bf42e7009..3704d5c6478a 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/BundleClassTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/BundleClassTest.php
@@ -46,7 +46,7 @@ protected function setUp(): void {
   /**
    * Tests making use of a custom bundle class.
    */
-  public function testEntitySubclass() {
+  public function testEntitySubclass(): void {
     entity_test_create_bundle('bundle_class');
 
     // Ensure we start life with empty counters.
@@ -206,7 +206,7 @@ public function testEntitySubclass() {
   /**
    * Tests making use of a custom bundle class for an entity without bundles.
    */
-  public function testEntityNoBundleSubclass() {
+  public function testEntityNoBundleSubclass(): void {
     $this->container->get('state')->set('entity_test_bundle_class_enable_user_class', TRUE);
     $this->container->get('kernel')->rebuildContainer();
     $this->entityTypeManager->clearCachedDefinitions();
@@ -220,7 +220,7 @@ public function testEntityNoBundleSubclass() {
    *
    * @covers Drupal\Core\Entity\ContentEntityStorageBase::create
    */
-  public function testAmbiguousBundleClassExceptionCreate() {
+  public function testAmbiguousBundleClassExceptionCreate(): void {
     $this->container->get('state')->set('entity_test_bundle_class_enable_ambiguous_entity_types', TRUE);
     $this->entityTypeManager->clearCachedDefinitions();
     entity_test_create_bundle('bundle_class');
@@ -237,7 +237,7 @@ public function testAmbiguousBundleClassExceptionCreate() {
    *
    * @covers Drupal\Core\Entity\EntityTypeRepository::getEntityTypeFromClass
    */
-  public function testAmbiguousBundleClassExceptionEntityTypeRepository() {
+  public function testAmbiguousBundleClassExceptionEntityTypeRepository(): void {
     $this->container->get('state')->set('entity_test_bundle_class_enable_ambiguous_entity_types', TRUE);
     entity_test_create_bundle('entity_test_no_label');
     entity_test_create_bundle('entity_test_no_label', NULL, 'entity_test_no_label');
@@ -262,7 +262,7 @@ public function testNoAmbiguousBundleClassExceptionSharingEntityClass(): void {
   /**
    * Checks exception thrown if a bundle class doesn't extend the entity class.
    */
-  public function testBundleClassShouldExtendEntityClass() {
+  public function testBundleClassShouldExtendEntityClass(): void {
     $this->container->get('state')->set('entity_test_bundle_class_non_inheriting', TRUE);
     $this->entityTypeManager->clearCachedDefinitions();
     $this->expectException(BundleClassInheritanceException::class);
@@ -273,7 +273,7 @@ public function testBundleClassShouldExtendEntityClass() {
   /**
    * Checks exception thrown if a bundle class doesn't exist.
    */
-  public function testBundleClassShouldExist() {
+  public function testBundleClassShouldExist(): void {
     $this->container->get('state')->set('entity_test_bundle_class_does_not_exist', TRUE);
     $this->entityTypeManager->clearCachedDefinitions();
     $this->expectException(MissingBundleClassException::class);
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/BundleConstraintValidatorTest.php b/core/tests/Drupal/KernelTests/Core/Entity/BundleConstraintValidatorTest.php
index 321a830a7d1d..c962a2a14e6c 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/BundleConstraintValidatorTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/BundleConstraintValidatorTest.php
@@ -35,7 +35,7 @@ protected function setUp(): void {
   /**
    * Tests bundle constraint validation.
    */
-  public function testValidation() {
+  public function testValidation(): void {
     // Test with multiple values.
     $this->assertValidation(['foo', 'bar']);
     // Test with a single string value as well.
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/BundlePermissionHandlerTraitTest.php b/core/tests/Drupal/KernelTests/Core/Entity/BundlePermissionHandlerTraitTest.php
index b3356a587082..d69ea0d9f768 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/BundlePermissionHandlerTraitTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/BundlePermissionHandlerTraitTest.php
@@ -25,7 +25,7 @@ class BundlePermissionHandlerTraitTest extends KernelTestBase {
   /**
    * @covers ::generatePermissions
    */
-  public function testGeneratePermissions() {
+  public function testGeneratePermissions(): void {
     EntityTestBundle::create([
       'id' => 'test1',
     ])->save();
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/ConfigEntityAdapterTest.php b/core/tests/Drupal/KernelTests/Core/Entity/ConfigEntityAdapterTest.php
index 8c8e59a048f6..f8c9848bfcf4 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/ConfigEntityAdapterTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/ConfigEntityAdapterTest.php
@@ -53,7 +53,7 @@ protected function setUp(): void {
   /**
    * @covers \Drupal\Core\Entity\Plugin\DataType\Deriver\EntityDeriver::getDerivativeDefinitions
    */
-  public function testEntityDeriver() {
+  public function testEntityDeriver(): void {
     $definition = \Drupal::typedDataManager()->getDefinition('entity:config_test');
     $this->assertEquals(ConfigEntityAdapter::class, $definition['class']);
   }
@@ -61,7 +61,7 @@ public function testEntityDeriver() {
   /**
    * @covers ::validate
    */
-  public function testValidate() {
+  public function testValidate(): void {
     $adapter = ConfigEntityAdapter::createFromEntity($this->entity);
     $violations = $adapter->validate();
     $this->assertEmpty($violations);
@@ -85,7 +85,7 @@ public function testValidate() {
   /**
    * @covers ::getProperties
    */
-  public function testGetProperties() {
+  public function testGetProperties(): void {
     $expected_properties = [
       'uuid' => StringData::class,
       'langcode' => StringData::class,
@@ -111,7 +111,7 @@ public function testGetProperties() {
   /**
    * @covers ::getValue
    */
-  public function testGetValue() {
+  public function testGetValue(): void {
     $adapter = ConfigEntityAdapter::createFromEntity($this->entity);
     $this->assertEquals($this->entity->weight, $adapter->get('weight')->getValue());
     $this->assertEquals($this->entity->id(), $adapter->get('id')->getValue());
@@ -121,7 +121,7 @@ public function testGetValue() {
   /**
    * @covers ::set
    */
-  public function testSet() {
+  public function testSet(): void {
     $adapter = ConfigEntityAdapter::createFromEntity($this->entity);
     // Get the value via typed data to ensure that the typed representation is
     // updated correctly when the value is set.
@@ -137,7 +137,7 @@ public function testSet() {
   /**
    * @covers ::getString
    */
-  public function testGetString() {
+  public function testGetString(): void {
     $adapter = ConfigEntityAdapter::createFromEntity($this->entity);
     $this->assertEquals('foobar', $adapter->getString());
   }
@@ -145,7 +145,7 @@ public function testGetString() {
   /**
    * @covers ::applyDefaultValue
    */
-  public function testApplyDefaultValue() {
+  public function testApplyDefaultValue(): void {
     $this->expectException(\BadMethodCallException::class);
     $this->expectExceptionMessage('Method not supported');
     $adapter = ConfigEntityAdapter::createFromEntity($this->entity);
@@ -155,7 +155,7 @@ public function testApplyDefaultValue() {
   /**
    * @covers ::getIterator
    */
-  public function testGetIterator() {
+  public function testGetIterator(): void {
     $adapter = ConfigEntityAdapter::createFromEntity($this->entity);
     $iterator = $adapter->getIterator();
     $fields = iterator_to_array($iterator);
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/ConfigEntityQueryTest.php b/core/tests/Drupal/KernelTests/Core/Entity/ConfigEntityQueryTest.php
index cc01678df88f..d7fbca668105 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/ConfigEntityQueryTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/ConfigEntityQueryTest.php
@@ -144,7 +144,7 @@ protected function setUp(): void {
   /**
    * Tests basic functionality.
    */
-  public function testConfigEntityQuery() {
+  public function testConfigEntityQuery(): void {
     // Run a test without any condition.
     $this->queryResults = $this->entityStorage->getQuery()
       ->execute();
@@ -374,7 +374,7 @@ public function testConfigEntityQuery() {
   /**
    * Tests ID conditions.
    */
-  public function testStringIdConditions() {
+  public function testStringIdConditions(): void {
     // We need an entity with a non-numeric ID.
     $entity = ConfigQueryTest::create([
       'label' => 'entity_1',
@@ -430,7 +430,7 @@ public function testStringIdConditions() {
   /**
    * Tests count query.
    */
-  public function testCount() {
+  public function testCount(): void {
     // Test count on no conditions.
     $count = $this->entityStorage->getQuery()
       ->count()
@@ -456,7 +456,7 @@ public function testCount() {
   /**
    * Tests sorting and range on config entity queries.
    */
-  public function testSortRange() {
+  public function testSortRange(): void {
     // Sort by simple ascending/descending.
     $this->queryResults = $this->entityStorage->getQuery()
       ->sort('number', 'DESC')
@@ -546,7 +546,7 @@ public function testSortRange() {
   /**
    * Tests sorting with tableSort on config entity queries.
    */
-  public function testTableSort() {
+  public function testTableSort(): void {
     $header = [
       ['data' => 'ID', 'specifier' => 'id'],
       ['data' => 'Number', 'specifier' => 'number'],
@@ -614,7 +614,7 @@ public function testTableSort() {
   /**
    * Tests dotted path matching.
    */
-  public function testDotted() {
+  public function testDotted(): void {
     $this->queryResults = $this->entityStorage->getQuery()
       ->condition('array.level1.*', 1)
       ->execute();
@@ -688,7 +688,7 @@ public function testDotted() {
   /**
    * Tests case sensitivity.
    */
-  public function testCaseSensitivity() {
+  public function testCaseSensitivity(): void {
     // Filter by label with a known containing case-sensitive word.
     $this->queryResults = $this->entityStorage->getQuery()
       ->condition('label', 'TEST', 'CONTAINS')
@@ -704,7 +704,7 @@ public function testCaseSensitivity() {
   /**
    * Tests lookup keys are added to the key value store.
    */
-  public function testLookupKeys() {
+  public function testLookupKeys(): void {
     \Drupal::service('state')->set('config_test.lookup_keys', TRUE);
     \Drupal::entityTypeManager()->clearCachedDefinitions();
     $key_value = $this->container->get('keyvalue')->get(QueryFactory::CONFIG_LOOKUP_PREFIX . 'config_test');
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityChangedTest.php b/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityChangedTest.php
index ede11147aeed..32a49bf0a048 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityChangedTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityChangedTest.php
@@ -64,7 +64,7 @@ protected function setUp(): void {
   /**
    * Tests basic EntityChangedInterface functionality.
    */
-  public function testChanged() {
+  public function testChanged(): void {
     $user1 = $this->createUser();
     $user2 = $this->createUser();
 
@@ -241,7 +241,7 @@ public function testChanged() {
   /**
    * Tests revisionable EntityChangedInterface functionality.
    */
-  public function testRevisionChanged() {
+  public function testRevisionChanged(): void {
     $user1 = $this->createUser();
     $user2 = $this->createUser();
 
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityCloneTest.php b/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityCloneTest.php
index e27dc5b6a31d..273eb7b6475f 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityCloneTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityCloneTest.php
@@ -36,7 +36,7 @@ protected function setUp(): void {
   /**
    * Tests if entity references on fields are still correct after cloning.
    */
-  public function testFieldEntityReferenceAfterClone() {
+  public function testFieldEntityReferenceAfterClone(): void {
     $user = $this->createUser();
 
     // Create a test entity.
@@ -76,7 +76,7 @@ public function testFieldEntityReferenceAfterClone() {
   /**
    * Tests that the flag for enforcing a new entity is not shared.
    */
-  public function testEnforceIsNewOnClonedEntityTranslation() {
+  public function testEnforceIsNewOnClonedEntityTranslation(): void {
     // Create a test entity.
     $entity = EntityTestMul::create([
       'name' => $this->randomString(),
@@ -103,7 +103,7 @@ public function testEnforceIsNewOnClonedEntityTranslation() {
   /**
    * Tests if the entity fields are properly cloned.
    */
-  public function testClonedEntityFields() {
+  public function testClonedEntityFields(): void {
     $user = $this->createUser();
 
     // Create a test entity.
@@ -148,7 +148,7 @@ public function testClonedEntityFields() {
   /**
    * Tests that the flag for enforcing a new revision is not shared.
    */
-  public function testNewRevisionOnCloneEntityTranslation() {
+  public function testNewRevisionOnCloneEntityTranslation(): void {
     // Create a test entity.
     $entity = EntityTestMulRev::create([
       'name' => $this->randomString(),
@@ -180,7 +180,7 @@ public function testNewRevisionOnCloneEntityTranslation() {
   /**
    * Tests modifications on entity keys of a cloned entity object.
    */
-  public function testEntityKeysModifications() {
+  public function testEntityKeysModifications(): void {
     // Create a test entity with a translation, which will internally trigger
     // entity cloning for the new translation and create references for some of
     // the entity properties.
@@ -220,7 +220,7 @@ public function testEntityKeysModifications() {
   /**
    * Tests the field values after serializing an entity and its clone.
    */
-  public function testFieldValuesAfterSerialize() {
+  public function testFieldValuesAfterSerialize(): void {
     // Create a test entity with a translation, which will internally trigger
     // entity cloning for the new translation and create references for some of
     // the entity properties.
@@ -252,7 +252,7 @@ public function testFieldValuesAfterSerialize() {
   /**
    * Tests changing the default revision flag.
    */
-  public function testDefaultRevision() {
+  public function testDefaultRevision(): void {
     // Create a test entity with a translation, which will internally trigger
     // entity cloning for the new translation and create references for some of
     // the entity properties.
@@ -279,7 +279,7 @@ public function testDefaultRevision() {
   /**
    * Tests references of entity properties after entity cloning.
    */
-  public function testEntityPropertiesModifications() {
+  public function testEntityPropertiesModifications(): void {
     // Create a test entity with a translation, which will internally trigger
     // entity cloning for the new translation and create references for some of
     // the entity properties.
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityFieldMethodInvocationOrderTest.php b/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityFieldMethodInvocationOrderTest.php
index f302c8e3b49a..6327e39f6dc9 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityFieldMethodInvocationOrderTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityFieldMethodInvocationOrderTest.php
@@ -45,7 +45,7 @@ protected function setUp(): void {
   /**
    * Tests correct field method invocation order.
    */
-  public function testFieldMethodInvocationOrder() {
+  public function testFieldMethodInvocationOrder(): void {
 
     // Create a test entity.
     $entity = $this->entityTestFieldMethodsStorage->create([
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityHasChangesTest.php b/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityHasChangesTest.php
index 0247245f4738..4978a4bf1107 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityHasChangesTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityHasChangesTest.php
@@ -39,7 +39,7 @@ protected function setUp(): void {
   /**
    * Tests the correct functionality of the hasTranslationChanges() function.
    */
-  public function testHasTranslationChanges() {
+  public function testHasTranslationChanges(): void {
     $user1 = User::create([
       'name' => 'username1',
       'status' => 1,
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityNonRevisionableFieldTest.php b/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityNonRevisionableFieldTest.php
index b723086d32e4..ab7371fadecc 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityNonRevisionableFieldTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityNonRevisionableFieldTest.php
@@ -73,7 +73,7 @@ protected function setUp(): void {
   /**
    * Tests non-revisionable fields on revisionable and translatable entities.
    */
-  public function testMulNonRevisionableField() {
+  public function testMulNonRevisionableField(): void {
     $user1 = $this->createUser();
     $user2 = $this->createUser();
 
@@ -141,7 +141,7 @@ public function testMulNonRevisionableField() {
   /**
    * Tests non-revisionable fields on revisionable entities.
    */
-  public function testNonRevisionableField() {
+  public function testNonRevisionableField(): void {
     $user1 = $this->createUser();
     $user2 = $this->createUser();
 
@@ -202,7 +202,7 @@ public function testNonRevisionableField() {
   /**
    * Tests multi column non revisionable base field for revisionable entity.
    */
-  public function testMultiColumnNonRevisionableBaseField() {
+  public function testMultiColumnNonRevisionableBaseField(): void {
     \Drupal::state()->set('entity_test.multi_column', TRUE);
     $this->applyEntityUpdates('entity_test_mulrev');
     // Refresh the storage.
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityNullStorageTest.php b/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityNullStorageTest.php
index dcc8158c9f31..fc5f662be94b 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityNullStorageTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityNullStorageTest.php
@@ -31,7 +31,7 @@ class ContentEntityNullStorageTest extends KernelTestBase {
    *
    * @see \Drupal\Core\Entity\Query\Null\Query
    */
-  public function testEntityQuery() {
+  public function testEntityQuery(): void {
     $this->assertSame(0, \Drupal::entityQuery('contact_message')->accessCheck(FALSE)->count()->execute(), 'Counting a null storage returns 0.');
     $this->assertSame([], \Drupal::entityQuery('contact_message')->accessCheck(FALSE)->execute(), 'Querying a null storage returns an empty array.');
     $this->assertSame([], \Drupal::entityQuery('contact_message')->accessCheck(FALSE)->condition('contact_form', 'test')->execute(), 'Querying a null storage returns an empty array and conditions are ignored.');
@@ -44,7 +44,7 @@ public function testEntityQuery() {
    *
    * @see \Drupal\Core\Entity\Event\BundleConfigImportValidate
    */
-  public function testDeleteThroughImport() {
+  public function testDeleteThroughImport(): void {
     $this->installConfig(['system']);
     $contact_form = ContactForm::create(['id' => 'test', 'label' => 'Test contact form']);
     $contact_form->save();
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityStorageBaseTest.php b/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityStorageBaseTest.php
index 0ee23a8e8d4a..8bf86c677340 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityStorageBaseTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityStorageBaseTest.php
@@ -52,7 +52,7 @@ public static function providerTestCreate(): \Generator {
   /**
    * @covers ::create
    */
-  public function testReCreate() {
+  public function testReCreate(): void {
     $storage = $this->container->get('entity_type.manager')->getStorage('entity_test');
 
     $values = $storage->create(['type' => 'test_bundle'])->toArray();
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/CreateSampleEntityTest.php b/core/tests/Drupal/KernelTests/Core/Entity/CreateSampleEntityTest.php
index 7401f2d0206f..1fc832dda5cd 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/CreateSampleEntityTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/CreateSampleEntityTest.php
@@ -66,7 +66,7 @@ protected function setUp(): void {
    *
    * @covers ::createWithSampleValues
    */
-  public function testSampleValueContentEntity() {
+  public function testSampleValueContentEntity(): void {
     foreach ($this->entityTypeManager->getDefinitions() as $entity_type_id => $definition) {
       if ($definition->entityClassImplements(FieldableEntityInterface::class)) {
         $label = $definition->getKey('label');
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/DefaultTableMappingIntegrationTest.php b/core/tests/Drupal/KernelTests/Core/Entity/DefaultTableMappingIntegrationTest.php
index 16b3b98ae0a8..6dcdbd0bffd7 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/DefaultTableMappingIntegrationTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/DefaultTableMappingIntegrationTest.php
@@ -78,7 +78,7 @@ protected function setUp(): void {
    *
    * @covers ::getFieldTableName
    */
-  public function testGetFieldTableName() {
+  public function testGetFieldTableName(): void {
     // Test the field table name for a single-valued base field, which is stored
     // in the entity's base table.
     $expected = 'entity_test_mulrev';
@@ -98,7 +98,7 @@ public function testGetFieldTableName() {
   /**
    * @covers ::getAllFieldTableNames
    */
-  public function testGetAllFieldTableNames() {
+  public function testGetAllFieldTableNames(): void {
     // Check a field that is stored in all the shared tables.
     $expected = [
       'entity_test_mulrev',
@@ -137,7 +137,7 @@ public function testGetAllFieldTableNames() {
    *
    * @covers ::getTableNames
    */
-  public function testGetTableNames() {
+  public function testGetTableNames(): void {
     $storage_definitions = \Drupal::service('entity_field.manager')->getFieldStorageDefinitions('entity_test_mulrev');
     $dedicated_data_table = $this->tableMapping->getDedicatedDataTableName($storage_definitions['multivalued_base_field']);
     $dedicated_revision_table = $this->tableMapping->getDedicatedRevisionTableName($storage_definitions['multivalued_base_field']);
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/Element/EntityAutocompleteElementFormTest.php b/core/tests/Drupal/KernelTests/Core/Entity/Element/EntityAutocompleteElementFormTest.php
index 4fc3958421e5..bd7ec5c89c7e 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/Element/EntityAutocompleteElementFormTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/Element/EntityAutocompleteElementFormTest.php
@@ -213,7 +213,7 @@ public function validateForm(array &$form, FormStateInterface $form_state) {}
   /**
    * Tests valid entries in the EntityAutocomplete Form API element.
    */
-  public function testValidEntityAutocompleteElement() {
+  public function testValidEntityAutocompleteElement(): void {
     $form_state = (new FormState())
       ->setValues([
         'single' => $this->getAutocompleteInput($this->referencedEntities[0]),
@@ -293,7 +293,7 @@ public function testValidEntityAutocompleteElement() {
   /**
    * Tests invalid entries in the EntityAutocomplete Form API element.
    */
-  public function testInvalidEntityAutocompleteElement() {
+  public function testInvalidEntityAutocompleteElement(): void {
     $form_builder = $this->container->get('form_builder');
 
     // Test 'single' with an entity label that doesn't exist
@@ -343,7 +343,7 @@ public function testInvalidEntityAutocompleteElement() {
   /**
    * Tests that access is properly checked by the EntityAutocomplete element.
    */
-  public function testEntityAutocompleteAccess() {
+  public function testEntityAutocompleteAccess(): void {
     $form_builder = $this->container->get('form_builder');
     $form = $form_builder->getForm($this);
 
@@ -372,7 +372,7 @@ public function testEntityAutocompleteAccess() {
    *
    * E.g. This can happen with GET form parameters.
    */
-  public function testEntityAutocompleteIdInput() {
+  public function testEntityAutocompleteIdInput(): void {
     /** @var \Drupal\Core\Form\FormBuilderInterface $form_builder */
     $form_builder = $this->container->get('form_builder');
     // $form = $form_builder->getForm($this);
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityAccessControlHandlerTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityAccessControlHandlerTest.php
index 933f8566f5e3..f26280096eba 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityAccessControlHandlerTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityAccessControlHandlerTest.php
@@ -57,7 +57,7 @@ public function assertEntityAccess(array $ops, AccessibleInterface $object, ?Acc
   /**
    * Ensures user labels are accessible for everyone.
    */
-  public function testUserLabelAccess() {
+  public function testUserLabelAccess(): void {
     // Set up a non-admin user.
     \Drupal::currentUser()->setAccount($this->createUser([], NULL, FALSE, ['uid' => 2]));
 
@@ -111,7 +111,7 @@ public function testUserLabelAccess() {
   /**
    * Ensures entity access is properly working.
    */
-  public function testEntityAccess() {
+  public function testEntityAccess(): void {
     // Set up a non-admin user that is allowed to view test entities.
     \Drupal::currentUser()->setAccount($this->createUser(['view test entity'], NULL, FALSE, ['uid' => 2]));
 
@@ -154,7 +154,7 @@ public function testEntityAccess() {
    * @see \Drupal\entity_test\EntityTestAccessControlHandler::checkAccess()
    * @see entity_test_entity_access()
    */
-  public function testDefaultEntityAccess() {
+  public function testDefaultEntityAccess(): void {
     // Set up a non-admin user that is allowed to view test entities.
     \Drupal::currentUser()->setAccount($this->createUser(['view test entity'], NULL, FALSE, ['uid' => 2]));
     $entity = EntityTest::create([
@@ -173,7 +173,7 @@ public function testDefaultEntityAccess() {
   /**
    * Ensures that the default handler is used as a fallback.
    */
-  public function testEntityAccessDefaultController() {
+  public function testEntityAccessDefaultController(): void {
     // The implementation requires that the global user id can be loaded.
     \Drupal::currentUser()->setAccount($this->createUser([], NULL, FALSE, ['uid' => 2]));
 
@@ -194,7 +194,7 @@ public function testEntityAccessDefaultController() {
   /**
    * Ensures entity access for entity translations is properly working.
    */
-  public function testEntityTranslationAccess() {
+  public function testEntityTranslationAccess(): void {
 
     // Set up a non-admin user that is allowed to view test entity translations.
     \Drupal::currentUser()->setAccount($this->createUser(['view test entity translations'], NULL, FALSE, ['uid' => 2]));
@@ -224,7 +224,7 @@ public function testEntityTranslationAccess() {
    *
    * @see entity_test_entity_access()
    */
-  public function testEntityWithoutUuidAccessCache() {
+  public function testEntityWithoutUuidAccessCache(): void {
     $account = $this->createUser();
 
     $entity1 = EntityTestNoUuid::create([
@@ -253,7 +253,7 @@ public function testEntityWithoutUuidAccessCache() {
    *
    * @see entity_test_entity_access()
    */
-  public function testEntityWithUuidAccessCache() {
+  public function testEntityWithUuidAccessCache(): void {
     $account = $this->createUser();
 
     $entity1 = EntityTestRev::create([
@@ -280,7 +280,7 @@ public function testEntityWithUuidAccessCache() {
   /**
    * Tests hook invocations.
    */
-  public function testHooks() {
+  public function testHooks(): void {
     $state = $this->container->get('state');
     $entity = EntityTest::create([
       'name' => 'test',
@@ -304,7 +304,7 @@ public function testHooks() {
    * @covers ::fieldAccess
    * @dataProvider providerTestFieldAccess
    */
-  public function testFieldAccess($entity_class, array $entity_create_values, $expected_id_create_access) {
+  public function testFieldAccess($entity_class, array $entity_create_values, $expected_id_create_access): void {
     // Set up a non-admin user that is allowed to create and update test
     // entities.
     \Drupal::currentUser()->setAccount($this->createUser(['administer entity_test content'], NULL, FALSE, ['uid' => 2]));
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityApiTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityApiTest.php
index bef50bd5bfdc..07ae276d8e7b 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityApiTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityApiTest.php
@@ -33,7 +33,7 @@ protected function setUp(): void {
   /**
    * Tests basic CRUD functionality of the Entity API.
    */
-  public function testCRUD() {
+  public function testCRUD(): void {
     // All entity variations have to have the same results.
     foreach (entity_test_entity_types() as $entity_type) {
       $this->assertCRUD($entity_type, $this->createUser());
@@ -147,7 +147,7 @@ protected function assertCRUD(string $entity_type, UserInterface $user1): void {
    *
    * Entities should be returned in the same order as the passed IDs.
    */
-  public function testLoadMultiple() {
+  public function testLoadMultiple(): void {
     // Entity load.
     $storage = $this->container->get('entity_type.manager')->getStorage('entity_test');
 
@@ -204,7 +204,7 @@ public function testLoadMultiple() {
   /**
    * Tests that exceptions are thrown when saving or deleting an entity.
    */
-  public function testEntityStorageExceptionHandling() {
+  public function testEntityStorageExceptionHandling(): void {
     $entity = EntityTest::create(['name' => 'test']);
     try {
       $GLOBALS['entity_test_throw_exception'] = TRUE;
@@ -249,7 +249,7 @@ public function testEntityStorageExceptionHandling() {
   /**
    * Tests that resaving a revision with a different revision ID throws an exception.
    */
-  public function testUpdateWithRevisionId() {
+  public function testUpdateWithRevisionId(): void {
     $storage = \Drupal::entityTypeManager()->getStorage('entity_test_mulrev');
 
     // Create a new entity.
@@ -267,7 +267,7 @@ public function testUpdateWithRevisionId() {
   /**
    * Tests that resaving an entity with a different entity ID throws an exception.
    */
-  public function testUpdateWithId() {
+  public function testUpdateWithId(): void {
     $storage = \Drupal::entityTypeManager()->getStorage('entity_test_mulrev');
 
     // Create a new entity.
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityAutocompleteTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityAutocompleteTest.php
index eaf38ece6d96..43c24e42e87c 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityAutocompleteTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityAutocompleteTest.php
@@ -44,7 +44,7 @@ class EntityAutocompleteTest extends EntityKernelTestBase {
   /**
    * Tests autocompletion edge cases with slashes in the names.
    */
-  public function testEntityReferenceAutocompletion() {
+  public function testEntityReferenceAutocompletion(): void {
     // Add an entity with a slash in its name.
     $entity_1 = $this->container->get('entity_type.manager')
       ->getStorage($this->entityType)
@@ -145,7 +145,7 @@ public function testEntityReferenceAutocompletion() {
   /**
    * Tests that missing or invalid selection setting key are handled correctly.
    */
-  public function testSelectionSettingsHandling() {
+  public function testSelectionSettingsHandling(): void {
     $entity_reference_controller = EntityAutocompleteController::create($this->container);
     $request = Request::create('entity_reference_autocomplete/' . $this->entityType . '/default');
     $request->query->set('q', $this->randomString());
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityBaseTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityBaseTest.php
index 2ca05368bdc4..893213ee5003 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityBaseTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityBaseTest.php
@@ -32,7 +32,7 @@ protected function setUp(): void {
    *
    * @covers ::getTypedData
    */
-  public function testGetTypedData() {
+  public function testGetTypedData(): void {
     $bundle = EntityTestBundle::create([
       'id' => $this->randomMachineName(),
     ]);
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityBundleConditionTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityBundleConditionTest.php
index a80fce19caca..1ad86c1966e5 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityBundleConditionTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityBundleConditionTest.php
@@ -33,7 +33,7 @@ protected function setUp(): void {
   /**
    * Tests conditions.
    */
-  public function testConditions() {
+  public function testConditions(): void {
     $this->createUser();
     // Get some entities of various bundles to check against.
     $page = EntityTestWithBundle::create(['type' => 'page', 'name' => $this->randomMachineName()]);
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityBundleFieldTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityBundleFieldTest.php
index 0290d587adf6..4ef34422c3c7 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityBundleFieldTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityBundleFieldTest.php
@@ -46,7 +46,7 @@ protected function setUp(): void {
   /**
    * Tests making use of a custom bundle field.
    */
-  public function testCustomBundleFieldUsage() {
+  public function testCustomBundleFieldUsage(): void {
     entity_test_create_bundle('custom', NULL, 'entity_test_update');
 
     // Check that an entity with bundle entity_test does not have the custom
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityBundleListenerTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityBundleListenerTest.php
index 718dc4767d66..9e87ad7d52b6 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityBundleListenerTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityBundleListenerTest.php
@@ -20,7 +20,7 @@ class EntityBundleListenerTest extends EntityKernelTestBase {
    *
    * @covers ::onBundleCreate
    */
-  public function testOnBundleCreate() {
+  public function testOnBundleCreate(): void {
     $field_map = $this->container->get('entity_field.manager')->getFieldMap();
     $expected = [
       'entity_test' => 'entity_test',
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityCrudHookTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityCrudHookTest.php
index 63bc66b81904..02ebbb76e345 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityCrudHookTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityCrudHookTest.php
@@ -99,7 +99,7 @@ protected function assertHookMessageOrder(array $messages): void {
   /**
    * Tests hook invocations for CRUD operations on blocks.
    */
-  public function testBlockHooks() {
+  public function testBlockHooks(): void {
     $entity = Block::create([
       'id' => 'stark_test_html',
       'plugin' => 'test_html',
@@ -154,7 +154,7 @@ public function testBlockHooks() {
   /**
    * Tests hook invocations for CRUD operations on comments.
    */
-  public function testCommentHooks() {
+  public function testCommentHooks(): void {
     $account = $this->createUser();
     NodeType::create([
       'type' => 'article',
@@ -239,7 +239,7 @@ public function testCommentHooks() {
   /**
    * Tests hook invocations for CRUD operations on files.
    */
-  public function testFileHooks() {
+  public function testFileHooks(): void {
     $this->installEntitySchema('file');
 
     $url = 'public://entity_crud_hook_test.file';
@@ -304,7 +304,7 @@ public function testFileHooks() {
   /**
    * Tests hook invocations for CRUD operations on nodes.
    */
-  public function testNodeHooks() {
+  public function testNodeHooks(): void {
     $account = $this->createUser();
 
     $node = Node::create([
@@ -368,7 +368,7 @@ public function testNodeHooks() {
   /**
    * Tests hook invocations for CRUD operations on taxonomy terms.
    */
-  public function testTaxonomyTermHooks() {
+  public function testTaxonomyTermHooks(): void {
     $this->installEntitySchema('taxonomy_term');
 
     $vocabulary = Vocabulary::create([
@@ -437,7 +437,7 @@ public function testTaxonomyTermHooks() {
   /**
    * Tests hook invocations for CRUD operations on taxonomy vocabularies.
    */
-  public function testTaxonomyVocabularyHooks() {
+  public function testTaxonomyVocabularyHooks(): void {
     $this->installEntitySchema('taxonomy_term');
 
     $vocabulary = Vocabulary::create([
@@ -496,7 +496,7 @@ public function testTaxonomyVocabularyHooks() {
   /**
    * Tests hook invocations for CRUD operations on users.
    */
-  public function testUserHooks() {
+  public function testUserHooks(): void {
     $account = User::create([
       'name' => 'Test user',
       'mail' => 'test@example.com',
@@ -553,7 +553,7 @@ public function testUserHooks() {
   /**
    * Tests rollback from failed entity save.
    */
-  public function testEntityRollback() {
+  public function testEntityRollback(): void {
     // Create a block.
     try {
       EntityTest::create(['name' => 'fail_insert'])->save();
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityDecoupledTranslationRevisionsTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityDecoupledTranslationRevisionsTest.php
index 1b4bc5f688ab..81338be40ebc 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityDecoupledTranslationRevisionsTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityDecoupledTranslationRevisionsTest.php
@@ -205,7 +205,7 @@ public static function dataTestDecoupledPendingRevisions() {
    *
    * @dataProvider dataTestDecoupledPendingRevisions
    */
-  public function testDecoupledPendingRevisions($sequence) {
+  public function testDecoupledPendingRevisions($sequence): void {
     $revision_id = $this->doTestEditSequence($sequence);
     $this->assertCount($revision_id, $sequence);
   }
@@ -266,7 +266,7 @@ public static function dataTestUntranslatableFields() {
    *
    * @dataProvider dataTestUntranslatableFields
    */
-  public function testUntranslatableFields($sequence, $default_translation_affected) {
+  public function testUntranslatableFields($sequence, $default_translation_affected): void {
     // Configure the untranslatable fields edit mode.
     $this->state->set('entity_test.untranslatable_fields.default_translation_affected', $default_translation_affected);
     $this->bundleInfo->clearCachedBundles();
@@ -500,7 +500,7 @@ protected function formatMessage($message) {
    * @covers ::createRevision
    * @covers \Drupal\Core\Entity\Plugin\Validation\Constraint\EntityUntranslatableFieldsConstraintValidator::validate
    */
-  public function testMultipleTranslationChanges() {
+  public function testMultipleTranslationChanges(): void {
     // Configure the untranslatable fields edit mode.
     $this->state->set('entity_test.untranslatable_fields.default_translation_affected', TRUE);
     $this->bundleInfo->clearCachedBundles();
@@ -526,7 +526,7 @@ public function testMultipleTranslationChanges() {
   /**
    * Tests that internal properties are preserved while creating a new revision.
    */
-  public function testInternalProperties() {
+  public function testInternalProperties(): void {
     $entity = EntityTestMulRev::create();
     $this->doTestInternalProperties($entity);
 
@@ -559,7 +559,7 @@ protected function doTestInternalProperties(ContentEntityInterface $entity) {
    *
    * @covers ::createRevision
    */
-  public function testRemovedTranslations() {
+  public function testRemovedTranslations(): void {
     /** @var \Drupal\Core\Entity\ContentEntityInterface $entity */
     $entity = EntityTestMulRev::create(['name' => 'Test 1.1 EN']);
     $this->storage->save($entity);
@@ -594,7 +594,7 @@ public function testRemovedTranslations() {
    *
    * @covers ::createRevision
    */
-  public function testCreateRevisionHook() {
+  public function testCreateRevisionHook(): void {
     $entity = EntityTestMulRev::create();
     $entity->get('name')->value = 'revision_create_test_en';
     $this->storage->save($entity);
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php
index 2994c5c81910..7d0ea21b1881 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php
@@ -80,7 +80,7 @@ protected function setUp(): void {
   /**
    * Tests that new entity type definitions are correctly handled.
    */
-  public function testNewEntityType() {
+  public function testNewEntityType(): void {
     $entity_type_id = 'entity_test_new';
     $schema = $this->database->schema();
 
@@ -100,7 +100,7 @@ public function testNewEntityType() {
   /**
    * Tests when no definition update is needed.
    */
-  public function testNoUpdates() {
+  public function testNoUpdates(): void {
     // Ensure that the definition update manager reports no updates.
     $this->assertFalse($this->entityDefinitionUpdateManager->needsUpdates(), 'EntityDefinitionUpdateManager reports that no updates are needed.');
     $this->assertSame([], $this->entityDefinitionUpdateManager->getChangeSummary(), 'EntityDefinitionUpdateManager reports an empty change summary.');
@@ -110,7 +110,7 @@ public function testNoUpdates() {
   /**
    * Tests updating entity schema when there are no existing entities.
    */
-  public function testEntityTypeUpdateWithoutData() {
+  public function testEntityTypeUpdateWithoutData(): void {
     // The 'entity_test_update' entity type starts out non-revisionable, so
     // ensure the revision table hasn't been created during setUp().
     $this->assertFalse($this->database->schema()->tableExists('entity_test_update_revision'), 'Revision table not created for entity_test_update.');
@@ -138,7 +138,7 @@ public function testEntityTypeUpdateWithoutData() {
   /**
    * Tests updating entity schema when there are entity storage changes.
    */
-  public function testEntityTypeUpdateWithEntityStorageChange() {
+  public function testEntityTypeUpdateWithEntityStorageChange(): void {
     // Update the entity type to be revisionable and try to apply the update.
     // It's expected to throw an exception.
     $entity_type = $this->getUpdatedEntityTypeDefinition(TRUE, FALSE);
@@ -156,7 +156,7 @@ public function testEntityTypeUpdateWithEntityStorageChange() {
    *
    * @covers ::installFieldableEntityType
    */
-  public function testInstallAdditionalBaseFieldDuringFieldableEntityTypeInstallation() {
+  public function testInstallAdditionalBaseFieldDuringFieldableEntityTypeInstallation(): void {
     $entity_type = clone $this->entityTypeManager->getDefinition('entity_test_update');
     $field_storage_definitions = \Drupal::service('entity_field.manager')->getFieldStorageDefinitions('entity_test_update');
 
@@ -178,7 +178,7 @@ public function testInstallAdditionalBaseFieldDuringFieldableEntityTypeInstallat
    *
    * @covers ::installFieldableEntityType
    */
-  public function testInstallFieldableEntityTypeWithoutInCodeDefinition() {
+  public function testInstallFieldableEntityTypeWithoutInCodeDefinition(): void {
     $entity_type = clone $this->entityTypeManager->getDefinition('entity_test_update');
     $field_storage_definitions = \Drupal::service('entity_field.manager')->getFieldStorageDefinitions('entity_test_update');
 
@@ -196,7 +196,7 @@ public function testInstallFieldableEntityTypeWithoutInCodeDefinition() {
    *
    * @covers ::updateEntityType
    */
-  public function testUpdateEntityTypeWithoutInCodeDefinition() {
+  public function testUpdateEntityTypeWithoutInCodeDefinition(): void {
     $entity_type = clone $this->entityTypeManager->getDefinition('entity_test_update');
 
     // Remove the entity type definition. This is the same thing as removing the
@@ -216,7 +216,7 @@ public function testUpdateEntityTypeWithoutInCodeDefinition() {
    *
    * @covers ::updateFieldableEntityType
    */
-  public function testUpdateFieldableEntityTypeWithoutInCodeDefinition() {
+  public function testUpdateFieldableEntityTypeWithoutInCodeDefinition(): void {
     $entity_type = clone $this->entityTypeManager->getDefinition('entity_test_update');
     $field_storage_definitions = \Drupal::service('entity_field.manager')->getFieldStorageDefinitions('entity_test_update');
 
@@ -238,7 +238,7 @@ public function testUpdateFieldableEntityTypeWithoutInCodeDefinition() {
    *
    * @covers ::uninstallEntityType
    */
-  public function testUninstallEntityTypeWithoutInCodeDefinition() {
+  public function testUninstallEntityTypeWithoutInCodeDefinition(): void {
     $entity_type = clone $this->entityTypeManager->getDefinition('entity_test_update');
 
     // Remove the entity type definition. This is the same thing as removing the
@@ -256,7 +256,7 @@ public function testUninstallEntityTypeWithoutInCodeDefinition() {
    *
    * @covers ::uninstallEntityType
    */
-  public function testUninstallRevisionableEntityTypeWithoutInCodeDefinition() {
+  public function testUninstallRevisionableEntityTypeWithoutInCodeDefinition(): void {
     $this->updateEntityTypeToRevisionable(TRUE);
     $entity_type = $this->entityDefinitionUpdateManager->getEntityType('entity_test_update');
 
@@ -273,7 +273,7 @@ public function testUninstallRevisionableEntityTypeWithoutInCodeDefinition() {
   /**
    * Tests creating, updating, and deleting a base field if no entities exist.
    */
-  public function testBaseFieldCreateUpdateDeleteWithoutData() {
+  public function testBaseFieldCreateUpdateDeleteWithoutData(): void {
     // Add a base field, ensure the update manager reports it, and the update
     // creates its schema.
     $this->addBaseField();
@@ -334,7 +334,7 @@ public function testBaseFieldCreateUpdateDeleteWithoutData() {
    *
    * See testBaseFieldCreateUpdateDeleteWithoutData() for more details
    */
-  public function testBaseFieldWithoutLabelCreateUpdateDelete() {
+  public function testBaseFieldWithoutLabelCreateUpdateDelete(): void {
     // Add a base field, ensure the update manager reports it with the
     // field id.
     $this->addBaseField('string', 'entity_test_update', FALSE, FALSE);
@@ -362,7 +362,7 @@ public function testBaseFieldWithoutLabelCreateUpdateDelete() {
   /**
    * Tests creating, updating, and deleting a bundle field if no entities exist.
    */
-  public function testBundleFieldCreateUpdateDeleteWithoutData() {
+  public function testBundleFieldCreateUpdateDeleteWithoutData(): void {
     // Add a bundle field, ensure the update manager reports it, and the update
     // creates its schema.
     $this->addBundleField();
@@ -403,7 +403,7 @@ public function testBundleFieldCreateUpdateDeleteWithoutData() {
    *
    * @see testBaseFieldDeleteWithExistingData()
    */
-  public function testBaseFieldCreateDeleteWithExistingEntities() {
+  public function testBaseFieldCreateDeleteWithExistingEntities(): void {
     // Save an entity.
     $name = $this->randomString();
     $storage = $this->entityTypeManager->getStorage('entity_test_update');
@@ -459,7 +459,7 @@ public function testBaseFieldCreateDeleteWithExistingEntities() {
    *
    * @see testBundleFieldDeleteWithExistingData()
    */
-  public function testBundleFieldCreateDeleteWithExistingEntities() {
+  public function testBundleFieldCreateDeleteWithExistingEntities(): void {
     // Save an entity.
     $name = $this->randomString();
     $storage = $this->entityTypeManager->getStorage('entity_test_update');
@@ -519,7 +519,7 @@ public function testBundleFieldCreateDeleteWithExistingEntities() {
    *
    * @dataProvider baseFieldDeleteWithExistingDataTestCases
    */
-  public function testBaseFieldDeleteWithExistingData($entity_type_id, $create_entity_revision, $base_field_revisionable, $create_entity_translation) {
+  public function testBaseFieldDeleteWithExistingData($entity_type_id, $create_entity_revision, $base_field_revisionable, $create_entity_translation): void {
     // Enable an additional language.
     ConfigurableLanguage::createFromLangcode('ro')->save();
 
@@ -739,7 +739,7 @@ public static function baseFieldDeleteWithExistingDataTestCases() {
   /**
    * Tests deleting a bundle field when it has existing data.
    */
-  public function testBundleFieldDeleteWithExistingData() {
+  public function testBundleFieldDeleteWithExistingData(): void {
     /** @var \Drupal\Core\Entity\Sql\SqlEntityStorageInterface $storage */
     $storage = $this->entityTypeManager->getStorage('entity_test_update');
     $schema_handler = $this->database->schema();
@@ -814,7 +814,7 @@ public function testBundleFieldDeleteWithExistingData() {
   /**
    * Tests updating a base field when it has existing data.
    */
-  public function testBaseFieldUpdateWithExistingData() {
+  public function testBaseFieldUpdateWithExistingData(): void {
     // Add the base field and run the update.
     $this->addBaseField();
     $this->applyEntityUpdates();
@@ -837,7 +837,7 @@ public function testBaseFieldUpdateWithExistingData() {
   /**
    * Tests updating a bundle field when it has existing data.
    */
-  public function testBundleFieldUpdateWithExistingData() {
+  public function testBundleFieldUpdateWithExistingData(): void {
     // Add the bundle field and run the update.
     $this->addBundleField();
     $this->applyEntityUpdates();
@@ -861,7 +861,7 @@ public function testBundleFieldUpdateWithExistingData() {
   /**
    * Tests updating a bundle field when the entity type schema has changed.
    */
-  public function testBundleFieldUpdateWithEntityTypeSchemaUpdate() {
+  public function testBundleFieldUpdateWithEntityTypeSchemaUpdate(): void {
     // Add the bundle field and run the update.
     $this->addBundleField();
     $this->applyEntityUpdates();
@@ -880,7 +880,7 @@ public function testBundleFieldUpdateWithEntityTypeSchemaUpdate() {
   /**
    * Tests creating and deleting a multi-field index when there are no existing entities.
    */
-  public function testEntityIndexCreateDeleteWithoutData() {
+  public function testEntityIndexCreateDeleteWithoutData(): void {
     // Add an entity index and ensure the update manager reports that as an
     // update to the entity type.
     $this->addEntityIndex();
@@ -934,7 +934,7 @@ public function testEntityIndexCreateDeleteWithoutData() {
   /**
    * Tests creating a multi-field index when there are existing entities.
    */
-  public function testEntityIndexCreateWithData() {
+  public function testEntityIndexCreateWithData(): void {
     // Save an entity.
     $name = $this->randomString();
     $entity = $this->entityTypeManager->getStorage('entity_test_update')->create(['name' => $name]);
@@ -952,7 +952,7 @@ public function testEntityIndexCreateWithData() {
   /**
    * Tests entity type and field storage definition events.
    */
-  public function testDefinitionEvents() {
+  public function testDefinitionEvents(): void {
     /** @var \Drupal\entity_test\EntityTestDefinitionSubscriber $event_subscriber */
     $event_subscriber = $this->container->get('entity_test.definition.subscriber');
     $event_subscriber->enableEventTracking();
@@ -1029,7 +1029,7 @@ public function testDefinitionEvents() {
   /**
    * Tests applying single updates.
    */
-  public function testSingleActionCalls() {
+  public function testSingleActionCalls(): void {
     $db_schema = $this->database->schema();
 
     // Ensure that a non-existing entity type cannot be installed.
@@ -1107,7 +1107,7 @@ public function testSingleActionCalls() {
    *
    * @see Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema::createSharedTableSchema
    */
-  public function testCreateFieldAndIndexOnSharedTable() {
+  public function testCreateFieldAndIndexOnSharedTable(): void {
     $this->addBaseField();
     $this->addBaseFieldIndex();
     $this->applyEntityUpdates();
@@ -1125,7 +1125,7 @@ public function testCreateFieldAndIndexOnSharedTable() {
    *
    * @see Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema::onEntityTypeUpdate
    */
-  public function testCreateIndexUsingEntityStorageSchemaWithData() {
+  public function testCreateIndexUsingEntityStorageSchemaWithData(): void {
     // Save an entity.
     $name = $this->randomString();
     $storage = $this->entityTypeManager->getStorage('entity_test_update');
@@ -1152,7 +1152,7 @@ public function testCreateIndexUsingEntityStorageSchemaWithData() {
   /**
    * Tests updating a base field when it has existing data.
    */
-  public function testBaseFieldEntityKeyUpdateWithExistingData() {
+  public function testBaseFieldEntityKeyUpdateWithExistingData(): void {
     // Add the base field and run the update.
     $this->addBaseField();
     $this->applyEntityUpdates();
@@ -1204,7 +1204,7 @@ public function testBaseFieldEntityKeyUpdateWithExistingData() {
   /**
    * Check that field schema is correctly handled with long-named fields.
    */
-  public function testLongNameFieldIndexes() {
+  public function testLongNameFieldIndexes(): void {
     $this->addLongNameBaseField();
     $entity_type_id = 'entity_test_update';
     $entity_type = $this->entityTypeManager->getDefinition($entity_type_id);
@@ -1217,7 +1217,7 @@ public function testLongNameFieldIndexes() {
   /**
    * Tests adding a base field with initial values.
    */
-  public function testInitialValue() {
+  public function testInitialValue(): void {
     $storage = \Drupal::entityTypeManager()->getStorage('entity_test_update');
     $db_schema = $this->database->schema();
 
@@ -1248,7 +1248,7 @@ public function testInitialValue() {
    *
    * @dataProvider initialValueFromFieldTestCases
    */
-  public function testInitialValueFromField($default_initial_value, $expected_value) {
+  public function testInitialValueFromField($default_initial_value, $expected_value): void {
     $storage = \Drupal::entityTypeManager()->getStorage('entity_test_update');
     $db_schema = $this->database->schema();
 
@@ -1322,7 +1322,7 @@ public static function initialValueFromFieldTestCases() {
   /**
    * Tests the error handling when using initial values from another field.
    */
-  public function testInitialValueFromFieldErrorHandling() {
+  public function testInitialValueFromFieldErrorHandling(): void {
     // Check that setting invalid values for 'initial value from field' doesn't
     // work.
     try {
@@ -1376,7 +1376,7 @@ public function testInitialValueFromFieldErrorHandling() {
   /**
    * @covers ::getEntityTypes
    */
-  public function testGetEntityTypes() {
+  public function testGetEntityTypes(): void {
     $entity_type_definitions = $this->entityDefinitionUpdateManager->getEntityTypes();
 
     // Ensure that we have at least one entity type to check below.
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityDeriverTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityDeriverTest.php
index 0337fbd63e32..b7b65c33bbbe 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityDeriverTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityDeriverTest.php
@@ -60,7 +60,7 @@ protected function setUp(): void {
    *
    * @dataProvider derivativesProvider
    */
-  public function testDerivatives($data_type, $expect_exception) {
+  public function testDerivatives($data_type, $expect_exception): void {
     if ($expect_exception) {
       $this->expectException(PluginNotFoundException::class);
     }
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityDisplayBaseTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityDisplayBaseTest.php
index 9d70fba8620d..7514533966c8 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityDisplayBaseTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityDisplayBaseTest.php
@@ -43,7 +43,7 @@ protected function setUp(): void {
   /**
    * @covers ::preSave
    */
-  public function testPreSave() {
+  public function testPreSave(): void {
     $entity_display = EntityViewDisplay::create([
       'targetEntityType' => 'entity_test',
       'bundle' => 'entity_test',
@@ -80,7 +80,7 @@ public function testPreSave() {
   /**
    * @covers ::onDependencyRemoval
    */
-  public function testOnDependencyRemoval() {
+  public function testOnDependencyRemoval(): void {
     // Create a comment field for entity_test.
     $comment_bundle = CommentType::create([
       'id' => 'entity_test',
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityDisplayFormBaseTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityDisplayFormBaseTest.php
index e5fa1ec446aa..51d90fdd24c9 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityDisplayFormBaseTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityDisplayFormBaseTest.php
@@ -24,7 +24,7 @@ class EntityDisplayFormBaseTest extends KernelTestBase {
   /**
    * @covers ::copyFormValuesToEntity
    */
-  public function testCopyFormValuesToEntity() {
+  public function testCopyFormValuesToEntity(): void {
     $field_values = [];
     $entity = $this->prophesize(EntityDisplayInterface::class);
     $entity->getPluginCollections()->willReturn([]);
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityDisplayRepositoryTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityDisplayRepositoryTest.php
index 8c3a1c1ed240..5ffd220dcc38 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityDisplayRepositoryTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityDisplayRepositoryTest.php
@@ -61,7 +61,7 @@ protected function setUp(): void {
   /**
    * @covers ::getViewDisplay
    */
-  public function testViewDisplay() {
+  public function testViewDisplay(): void {
     $display = $this->displayRepository->getViewDisplay('user', 'user');
     $this->assertInstanceOf(EntityViewDisplayInterface::class, $display);
     $this->assertTrue($display->isNew(), 'Default view display was created on demand.');
@@ -83,7 +83,7 @@ public function testViewDisplay() {
   /**
    * @covers ::getFormDisplay
    */
-  public function testFormDisplay() {
+  public function testFormDisplay(): void {
     $display = $this->displayRepository->getFormDisplay('user', 'user');
     $this->assertInstanceOf(EntityFormDisplayInterface::class, $display);
     $this->assertTrue($display->isNew(), 'Default form display was created on demand.');
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityDuplicateTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityDuplicateTest.php
index 7eb127d301b3..a1b32dd60c32 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityDuplicateTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityDuplicateTest.php
@@ -30,7 +30,7 @@ protected function setUp(): void {
   /**
    * Tests duplicating a non-default revision.
    */
-  public function testDuplicateNonDefaultRevision() {
+  public function testDuplicateNonDefaultRevision(): void {
     $entity = EntityTestRev::create([
       'name' => 'First Revision',
     ]);
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityFieldDefaultValueTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityFieldDefaultValueTest.php
index be19a2b59833..4641f58f40ae 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityFieldDefaultValueTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityFieldDefaultValueTest.php
@@ -32,7 +32,7 @@ protected function setUp(): void {
   /**
    * Tests default values on entities and fields.
    */
-  public function testDefaultValues() {
+  public function testDefaultValues(): void {
     // All entity variations have to have the same results.
     foreach (entity_test_entity_types() as $entity_type) {
       $this->assertDefaultValues($entity_type);
@@ -61,7 +61,7 @@ protected function assertDefaultValues(string $entity_type_id): void {
   /**
    * Tests custom default value callbacks.
    */
-  public function testDefaultValueCallback() {
+  public function testDefaultValueCallback(): void {
     $entity = $this->entityTypeManager->getStorage('entity_test_default_value')->create();
     // The description field has a default value callback for testing, see
     // entity_test_field_default_value().
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityFieldTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityFieldTest.php
index af8331e4663a..0217513df6de 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityFieldTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityFieldTest.php
@@ -103,7 +103,7 @@ protected function createTestEntity($entity_type) {
   /**
    * Test setting field values on revisionable entities.
    */
-  public function testFieldEntityRevisionWrite() {
+  public function testFieldEntityRevisionWrite(): void {
     /** @var \Drupal\Core\Entity\RevisionableStorageInterface $storage */
     $storage = \Drupal::entityTypeManager()->getStorage('entity_test_rev');
 
@@ -136,7 +136,7 @@ public function testFieldEntityRevisionWrite() {
   /**
    * Tests reading and writing properties and field items.
    */
-  public function testReadWrite() {
+  public function testReadWrite(): void {
     // All entity variations have to have the same results.
     foreach (entity_test_entity_types() as $entity_type) {
       $this->doTestReadWrite($entity_type);
@@ -402,7 +402,7 @@ protected function doTestReadWrite($entity_type) {
   /**
    * Tries to save and load an entity again.
    */
-  public function testSave() {
+  public function testSave(): void {
     // All entity variations have to have the same results.
     foreach (entity_test_entity_types() as $entity_type) {
       $this->doTestSave($entity_type);
@@ -439,7 +439,7 @@ protected function doTestSave($entity_type) {
   /**
    * Tests introspection and getting metadata upfront.
    */
-  public function testIntrospection() {
+  public function testIntrospection(): void {
     // All entity variations have to have the same results.
     foreach (entity_test_entity_types() as $entity_type) {
       $this->doTestIntrospection($entity_type);
@@ -543,7 +543,7 @@ protected function doTestIntrospection($entity_type) {
   /**
    * Tests iterating over properties.
    */
-  public function testIterator() {
+  public function testIterator(): void {
     // All entity variations have to have the same results.
     foreach (entity_test_entity_types() as $entity_type) {
       $this->doTestIterator($entity_type);
@@ -582,7 +582,7 @@ protected function doTestIterator($entity_type) {
   /**
    * Tests working with the entity based upon the TypedData API.
    */
-  public function testDataStructureInterfaces() {
+  public function testDataStructureInterfaces(): void {
     // All entity variations have to have the same results.
     foreach (entity_test_entity_types() as $entity_type) {
       $this->doTestDataStructureInterfaces($entity_type);
@@ -654,7 +654,7 @@ public function getContainedStrings(TypedDataInterface $wrapper, $depth, array &
   /**
    * Makes sure data types are correctly derived for all entity types.
    */
-  public function testDataTypes() {
+  public function testDataTypes(): void {
     $types = \Drupal::typedDataManager()->getDefinitions();
     foreach (entity_test_entity_types() as $entity_type) {
       $this->assertNotEmpty($types['entity:' . $entity_type]['class'], 'Entity data type registered.');
@@ -670,7 +670,7 @@ public function testDataTypes() {
    *
    * @see entity_test_entity_base_field_info_alter()
    */
-  public function testBaseFieldNonExistingBaseField() {
+  public function testBaseFieldNonExistingBaseField(): void {
     $this->entityTypeManager->getStorage('node_type')->create([
       'type' => 'page',
       'name' => 'page',
@@ -692,7 +692,7 @@ public function testBaseFieldNonExistingBaseField() {
    *
    * @see entity_test_entity_base_field_info_alter()
    */
-  public function testFieldOverrideBundleField() {
+  public function testFieldOverrideBundleField(): void {
     // First make sure the bundle field override in code, which is provided by
     // the test entity works.
     entity_test_create_bundle('some_test_bundle', 'Some test bundle', 'entity_test_field_override');
@@ -720,7 +720,7 @@ public function testFieldOverrideBundleField() {
   /**
    * Tests validation constraints provided by the Entity API.
    */
-  public function testEntityConstraintValidation() {
+  public function testEntityConstraintValidation(): void {
     $entity = $this->createTestEntity('entity_test');
     $entity->save();
     // Create a reference field item and let it reference the entity.
@@ -774,7 +774,7 @@ public function testEntityConstraintValidation() {
   /**
    * Tests getting processed property values via a computed property.
    */
-  public function testComputedProperties() {
+  public function testComputedProperties(): void {
     // All entity variations have to have the same results.
     foreach (entity_test_entity_types() as $entity_type) {
       $this->doTestComputedProperties($entity_type);
@@ -784,7 +784,7 @@ public function testComputedProperties() {
   /**
    * Tests all the interaction points of a computed field.
    */
-  public function testComputedFields() {
+  public function testComputedFields(): void {
     $this->installEntitySchema('entity_test_computed_field');
 
     \Drupal::state()->set('entity_test_computed_field_item_list_value', ['foo computed']);
@@ -916,7 +916,7 @@ public function testComputedFields() {
   /**
    * Tests an entity reference computed field.
    */
-  public function testEntityReferenceComputedField() {
+  public function testEntityReferenceComputedField(): void {
     $this->installEntitySchema('entity_test_computed_field');
 
     // Create 2 entities to be referenced.
@@ -964,7 +964,7 @@ protected function doTestComputedProperties($entity_type) {
   /**
    * Tests explicit entity ID assignment.
    */
-  public function testEntityIdAssignment() {
+  public function testEntityIdAssignment(): void {
     $entity_type = 'entity_test';
     /** @var \Drupal\Core\Entity\ContentEntityStorageInterface $storage */
     $storage = $this->container->get('entity_type.manager')->getStorage($entity_type);
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityHasFieldConstraintValidatorTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityHasFieldConstraintValidatorTest.php
index 8b0daa31dd38..c53122ad5d53 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityHasFieldConstraintValidatorTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityHasFieldConstraintValidatorTest.php
@@ -28,7 +28,7 @@ protected function setUp(): void {
     $this->createUser();
   }
 
-  public function testValidation() {
+  public function testValidation(): void {
     $this->state->set('entity_test_constraints.build', [
       'EntityHasField' => 'body',
     ]);
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityKernelTestBaseTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityKernelTestBaseTest.php
index 52e4cc792e7c..edcfa268f223 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityKernelTestBaseTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityKernelTestBaseTest.php
@@ -22,7 +22,7 @@ protected function setUp(): void {
   /**
    * Tests that the current user is set up correctly.
    */
-  public function testSetUpCurrentUser() {
+  public function testSetUpCurrentUser(): void {
     $account = $this->setUpCurrentUser();
     $current_user = \Drupal::currentUser();
     $this->assertSame($account->id(), $current_user->id());
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityKeysTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityKeysTest.php
index caef4ae12a25..abac79142572 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityKeysTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityKeysTest.php
@@ -19,7 +19,7 @@ class EntityKeysTest extends EntityKernelTestBase {
    *
    * @dataProvider multipleKeysCacheTestCases
    */
-  public function testMultipleKeysCache($translatable) {
+  public function testMultipleKeysCache($translatable): void {
     $this->state->set('entity_test.additional_base_field_definitions', [
       'test_field' => BaseFieldDefinition::create('string')->setTranslatable($translatable),
     ]);
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityLoadByUuidTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityLoadByUuidTest.php
index 8e9c95e6f213..0ff1c38fb4b1 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityLoadByUuidTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityLoadByUuidTest.php
@@ -32,7 +32,7 @@ protected function setUp(): void {
   /**
    * Ensures that ::loadEntityByUuid() doesn't apply access checking.
    */
-  public function testLoadEntityByUuidAccessChecking() {
+  public function testLoadEntityByUuidAccessChecking(): void {
     \Drupal::state()->set('entity_test_query_access', TRUE);
     // Create two test entities.
     $entity_0 = EntityTest::create([
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityNonRevisionableTranslatableFieldTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityNonRevisionableTranslatableFieldTest.php
index ae51362480b2..255e68b35e43 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityNonRevisionableTranslatableFieldTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityNonRevisionableTranslatableFieldTest.php
@@ -39,7 +39,7 @@ protected function setUp(): void {
   /**
    * Tests translating a non-revisionable field.
    */
-  public function testTranslatingNonRevisionableField() {
+  public function testTranslatingNonRevisionableField(): void {
     /** @var \Drupal\Core\Entity\ContentEntityBase $entity */
     $entity = EntityTestMulRev::create();
     $entity->set('non_rev_field', 'Hello');
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryAggregateTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryAggregateTest.php
index ca3b771bd364..f0a2ae6d9d20 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryAggregateTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryAggregateTest.php
@@ -115,7 +115,7 @@ protected function setUp(): void {
   /**
    * Tests aggregation support.
    */
-  public function testAggregation() {
+  public function testAggregation(): void {
     // Apply a simple groupby.
     $this->queryResult = $this->entityStorage->getAggregateQuery()
       ->accessCheck(FALSE)
@@ -593,7 +593,7 @@ public function testAggregation() {
   /**
    * Tests preparing a query and executing twice.
    */
-  public function testRepeatedExecution() {
+  public function testRepeatedExecution(): void {
     $query = $this->entityStorage->getAggregateQuery()
       ->accessCheck(FALSE)
       ->groupBy('user_id');
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryRelationshipTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryRelationshipTest.php
index 6f959e7ce2b8..17be6152563e 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryRelationshipTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryRelationshipTest.php
@@ -115,7 +115,7 @@ protected function setUp(): void {
   /**
    * Tests querying.
    */
-  public function testQuery() {
+  public function testQuery(): void {
     $storage = $this->container->get('entity_type.manager')->getStorage('entity_test');
     // This returns the 0th entity as that's the only one pointing to the 0th
     // account.
@@ -214,7 +214,7 @@ public function testQuery() {
   /**
    * Tests the invalid specifier in the query relationship.
    */
-  public function testInvalidSpecifier() {
+  public function testInvalidSpecifier(): void {
     $this->expectException(PluginNotFoundException::class);
     $this->container
       ->get('entity_type.manager')
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryTest.php
index 19b924559146..0b6941d6f04a 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryTest.php
@@ -177,7 +177,7 @@ protected function setUp(): void {
   /**
    * Tests basic functionality.
    */
-  public function testEntityQuery() {
+  public function testEntityQuery(): void {
     $greetings = $this->greetings;
     $figures = $this->figures;
     $this->queryResults = $this->storage
@@ -401,7 +401,7 @@ public function testEntityQuery() {
    *
    * Warning: this is complicated.
    */
-  public function testSort() {
+  public function testSort(): void {
     $greetings = $this->greetings;
     $figures = $this->figures;
     // Order up and down on a number.
@@ -496,7 +496,7 @@ public function testSort() {
   /**
    * Tests tablesort().
    */
-  public function testTableSort() {
+  public function testTableSort(): void {
     // While ordering on bundles do not give us a definite order, we can still
     // assert that all entities from one bundle are after the other as the
     // order dictates.
@@ -552,7 +552,7 @@ public function testTableSort() {
   /**
    * Tests that count queries are separated across entity types.
    */
-  public function testCount() {
+  public function testCount(): void {
     // Create a field with the same name in a different entity type.
     $field_name = $this->figures;
     $field_storage = FieldStorageConfig::create([
@@ -592,7 +592,7 @@ public function testCount() {
   /**
    * Tests that nested condition groups work as expected.
    */
-  public function testNestedConditionGroups() {
+  public function testNestedConditionGroups(): void {
     // Query for all entities of the first bundle that have either a red
     // triangle as a figure or the Turkish greeting as a greeting.
     $query = $this->storage->getQuery()->accessCheck(FALSE);
@@ -620,7 +620,7 @@ public function testNestedConditionGroups() {
   /**
    * Tests that condition count returns expected number of conditions.
    */
-  public function testConditionCount() {
+  public function testConditionCount(): void {
     // Query for all entities of the first bundle that
     // have red as a color AND are triangle shaped.
     $query = $this->storage->getQuery()->accessCheck(FALSE);
@@ -645,7 +645,7 @@ public function testConditionCount() {
   /**
    * Tests queries with delta conditions.
    */
-  public function testDelta() {
+  public function testDelta(): void {
     $figures = $this->figures;
     // Test numeric delta value in field condition.
     $this->queryResults = $this->storage
@@ -798,7 +798,7 @@ protected function assertBundleOrder(string $order): void {
    *
    * The tags and metadata should propagate to the SQL query object.
    */
-  public function testMetaData() {
+  public function testMetaData(): void {
     field_test_memorize();
 
     $query = $this->storage->getQuery()->accessCheck(FALSE);
@@ -814,7 +814,7 @@ public function testMetaData() {
   /**
    * Tests case sensitive and in-sensitive query conditions.
    */
-  public function testCaseSensitivity() {
+  public function testCaseSensitivity(): void {
     $bundle = $this->randomMachineName();
     entity_test_create_bundle($bundle, entity_type: 'entity_test_mulrev');
 
@@ -1058,7 +1058,7 @@ public function testCaseSensitivity() {
   /**
    * Tests base fields with multiple columns.
    */
-  public function testBaseFieldMultipleColumns() {
+  public function testBaseFieldMultipleColumns(): void {
     $this->enableModules(['taxonomy']);
     $this->installEntitySchema('taxonomy_term');
 
@@ -1117,7 +1117,7 @@ public function testBaseFieldMultipleColumns() {
   /**
    * Tests pending revisions.
    */
-  public function testPendingRevisions() {
+  public function testPendingRevisions(): void {
     // Ensure entity 14 is returned.
     $result = $this->storage
       ->getQuery()
@@ -1228,7 +1228,7 @@ public function testPendingRevisions() {
    *
    * This covers a database driver's EntityQuery\Condition class.
    */
-  public function testInjectionInCondition() {
+  public function testInjectionInCondition(): void {
     $this->expectException(\Exception::class);
     $this->queryResults = $this->storage
       ->getQuery()
@@ -1241,7 +1241,7 @@ public function testInjectionInCondition() {
   /**
    * Tests that EntityQuery works when querying the same entity from two fields.
    */
-  public function testWithTwoEntityReferenceFieldsToSameEntityType() {
+  public function testWithTwoEntityReferenceFieldsToSameEntityType(): void {
     // Create two entity reference fields referring 'entity_test' entities.
     $this->createEntityReferenceField('entity_test', 'entity_test', 'ref1', $this->randomMachineName(), 'entity_test');
     $this->createEntityReferenceField('entity_test', 'entity_test', 'ref2', $this->randomMachineName(), 'entity_test');
@@ -1351,7 +1351,7 @@ public function testAlterHook(): void {
   /**
    * Tests entity queries with condition on the revision metadata keys.
    */
-  public function testConditionOnRevisionMetadataKeys() {
+  public function testConditionOnRevisionMetadataKeys(): void {
     $this->installModule('entity_test_revlog');
     $this->installEntitySchema('entity_test_revlog');
 
@@ -1391,7 +1391,7 @@ public function testConditionOnRevisionMetadataKeys() {
   /**
    * Tests __toString().
    */
-  public function testToString() {
+  public function testToString(): void {
     $query = $this->storage->getQuery()->accessCheck(FALSE);
     $group_blue = $query->andConditionGroup()->condition("{$this->figures}.color", ['blue'], 'IN');
     $group_red = $query->andConditionGroup()->condition("{$this->figures}.color", ['red'], 'IN');
@@ -1438,7 +1438,7 @@ public function testToString() {
   /**
    * Test the accessCheck method is called.
    */
-  public function testAccessCheckSpecified() {
+  public function testAccessCheckSpecified(): void {
     $this->expectException(QueryException::class);
     $this->expectExceptionMessage('Entity queries must explicitly set whether the query should be access checked or not. See Drupal\Core\Entity\Query\QueryInterface::accessCheck().');
     // We are purposely testing an entity query without access check, so we need
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityReferenceFieldTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityReferenceFieldTest.php
index 890c31883132..40d849d25f13 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityReferenceFieldTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityReferenceFieldTest.php
@@ -89,7 +89,7 @@ protected function setUp(): void {
   /**
    * Tests reference field validation.
    */
-  public function testEntityReferenceFieldValidation() {
+  public function testEntityReferenceFieldValidation(): void {
     // Test a valid reference.
     $referenced_entity = $this->container->get('entity_type.manager')
       ->getStorage($this->referencedEntityType)
@@ -124,7 +124,7 @@ public function testEntityReferenceFieldValidation() {
   /**
    * Tests the multiple target entities loader.
    */
-  public function testReferencedEntitiesMultipleLoad() {
+  public function testReferencedEntitiesMultipleLoad(): void {
     // Create the parent entity.
     $entity = $this->container->get('entity_type.manager')
       ->getStorage($this->entityType)
@@ -196,7 +196,7 @@ public function testReferencedEntitiesMultipleLoad() {
   /**
    * Tests referencing entities with string IDs.
    */
-  public function testReferencedEntitiesStringId() {
+  public function testReferencedEntitiesStringId(): void {
     $field_name = 'entity_reference_string_id';
     $this->installEntitySchema('entity_test_string_id');
     $this->createEntityReferenceField(
@@ -246,7 +246,7 @@ public function testReferencedEntitiesStringId() {
   /**
    * Tests all the possible ways to autocreate an entity via the API.
    */
-  public function testAutocreateApi() {
+  public function testAutocreateApi(): void {
     $entity = $this->entityTypeManager
       ->getStorage($this->entityType)
       ->create(['name' => $this->randomString()]);
@@ -374,7 +374,7 @@ protected function assertUserRoleAutocreate(EntityInterface $entity, callable $s
   /**
    * Tests exception thrown with a missing target entity type.
    */
-  public function testTargetEntityTypeMissing() {
+  public function testTargetEntityTypeMissing(): void {
     // Setup a test entity type with an entity reference field to an entity type
     // that doesn't exist.
     $definitions = [
@@ -394,7 +394,7 @@ public function testTargetEntityTypeMissing() {
   /**
    * Tests that the target entity is not unnecessarily loaded.
    */
-  public function testTargetEntityNoLoad() {
+  public function testTargetEntityNoLoad(): void {
     // Setup a test entity type with an entity reference field to itself. We use
     // a special storage class throwing exceptions when a load operation is
     // triggered to be able to detect them.
@@ -445,7 +445,7 @@ public function testTargetEntityNoLoad() {
   /**
    * Tests the dependencies entity reference fields are created with.
    */
-  public function testEntityReferenceFieldDependencies() {
+  public function testEntityReferenceFieldDependencies(): void {
     $field_name = 'user_reference_field';
     $entity_type = 'entity_test';
 
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityReferenceSelection/EntityReferenceSelectionSortTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityReferenceSelection/EntityReferenceSelectionSortTest.php
index a218493c6ddf..6fae5bf11774 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityReferenceSelection/EntityReferenceSelectionSortTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityReferenceSelection/EntityReferenceSelectionSortTest.php
@@ -46,7 +46,7 @@ protected function setUp(): void {
   /**
    * Assert sorting by field and property.
    */
-  public function testSort() {
+  public function testSort(): void {
     // Add text field to entity, to sort by.
     FieldStorageConfig::create([
       'field_name' => 'field_text',
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityRepositoryTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityRepositoryTest.php
index fa3d33df27d6..b54ccc4deb07 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityRepositoryTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityRepositoryTest.php
@@ -78,7 +78,7 @@ protected function setUp(): void {
    * @covers ::getActive
    * @covers ::getActiveMultiple
    */
-  public function testGetActive() {
+  public function testGetActive(): void {
     $en_contexts = $this->getLanguageContexts('en');
 
     // Check that when the entity does not exist NULL is returned.
@@ -211,7 +211,7 @@ public function testGetActive() {
    * @covers ::getCanonical
    * @covers ::getCanonicalMultiple
    */
-  public function testGetCanonical() {
+  public function testGetCanonical(): void {
     // Check that when the entity does not exist NULL is returned.
     $entity_type_id = 'entity_test_mul';
     $canonical = $this->entityRepository->getActive($entity_type_id, -1);
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityRevisionTranslationTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityRevisionTranslationTest.php
index f362161b9ec8..3d75bf3b29d2 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityRevisionTranslationTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityRevisionTranslationTest.php
@@ -37,7 +37,7 @@ protected function setUp(): void {
   /**
    * Tests if the translation object has the right revision id after new revision.
    */
-  public function testNewRevisionAfterTranslation() {
+  public function testNewRevisionAfterTranslation(): void {
     $user = $this->createUser();
 
     // Create a test entity.
@@ -63,7 +63,7 @@ public function testNewRevisionAfterTranslation() {
   /**
    * Tests if the translation object has the right revision id after new revision.
    */
-  public function testRevertRevisionAfterTranslation() {
+  public function testRevertRevisionAfterTranslation(): void {
     $user = $this->createUser();
     /** @var \Drupal\Core\Entity\RevisionableStorageInterface $storage */
     $storage = $this->entityTypeManager->getStorage('entity_test_mulrev');
@@ -99,7 +99,7 @@ public function testRevertRevisionAfterTranslation() {
   /**
    * Tests the translation values when saving a pending revision.
    */
-  public function testTranslationValuesWhenSavingPendingRevisions() {
+  public function testTranslationValuesWhenSavingPendingRevisions(): void {
     $user = $this->createUser();
     /** @var \Drupal\Core\Entity\RevisionableStorageInterface $storage */
     $storage = $this->entityTypeManager->getStorage('entity_test_mulrev');
@@ -145,7 +145,7 @@ public function testTranslationValuesWhenSavingPendingRevisions() {
   /**
    * Tests changing the default revision flag is propagated to all translations.
    */
-  public function testDefaultRevision() {
+  public function testDefaultRevision(): void {
     // Create a test entity with a translation, which will internally trigger
     // entity cloning for the new translation and create references for some of
     // the entity properties.
@@ -170,7 +170,7 @@ public function testDefaultRevision() {
   /**
    * @covers \Drupal\Core\Entity\ContentEntityBase::setNewRevision
    */
-  public function testSetNewRevision() {
+  public function testSetNewRevision(): void {
     $user = $this->createUser();
 
     // All revisionable entity variations have to have the same results.
@@ -202,7 +202,7 @@ public function testSetNewRevision() {
    *
    * @covers \Drupal\Core\Entity\ContentEntityStorageBase::isAnyStoredRevisionTranslated
    */
-  public function testIsAnyStoredRevisionTranslated() {
+  public function testIsAnyStoredRevisionTranslated(): void {
     /** @var \Drupal\Core\Entity\ContentEntityStorageInterface $storage */
     $storage = $this->entityTypeManager->getStorage('entity_test_mul');
     $method = new \ReflectionMethod(get_class($storage), 'isAnyStoredRevisionTranslated');
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityRevisionsTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityRevisionsTest.php
index ff9fa1c603df..163a0b5919ae 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityRevisionsTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityRevisionsTest.php
@@ -40,7 +40,7 @@ protected function setUp(): void {
   /**
    * Tests getLoadedRevisionId() returns the correct ID throughout the process.
    */
-  public function testLoadedRevisionId() {
+  public function testLoadedRevisionId(): void {
     // Create a basic EntityTestMulRev entity and save it.
     $entity = EntityTestMulRev::create();
     $entity->save();
@@ -82,7 +82,7 @@ public function testLoadedRevisionId() {
   /**
    * Tests the loaded revision ID after an entity re-save, clone and duplicate.
    */
-  public function testLoadedRevisionIdWithNoNewRevision() {
+  public function testLoadedRevisionIdWithNoNewRevision(): void {
     // Create a basic EntityTestMulRev entity and save it.
     $entity = EntityTestMulRev::create();
     $entity->save();
@@ -120,7 +120,7 @@ public function testLoadedRevisionIdWithNoNewRevision() {
   /**
    * Tests the loaded revision ID for translatable entities.
    */
-  public function testTranslatedLoadedRevisionId() {
+  public function testTranslatedLoadedRevisionId(): void {
     ConfigurableLanguage::createFromLangcode('fr')->save();
 
     // Create a basic EntityTestMulRev entity and save it.
@@ -161,7 +161,7 @@ public function testTranslatedLoadedRevisionId() {
   /**
    * Tests re-saving the entity in entity_test_entity_insert().
    */
-  public function testSaveInHookEntityInsert() {
+  public function testSaveInHookEntityInsert(): void {
     // Create an entity which will be saved again in entity_test_entity_insert().
     $entity = EntityTestMulRev::create(['name' => 'EntityLoadedRevisionTest']);
     $entity->save();
@@ -175,7 +175,7 @@ public function testSaveInHookEntityInsert() {
    *
    * @covers ::isLatestRevision
    */
-  public function testIsLatestRevision() {
+  public function testIsLatestRevision(): void {
     // Create a basic EntityTestMulRev entity and save it.
     $entity = EntityTestMulRev::create();
     $entity->save();
@@ -208,7 +208,7 @@ public function testIsLatestRevision() {
    * @covers \Drupal\Core\Entity\ContentEntityStorageBase::getLatestRevisionId
    * @covers \Drupal\Core\Entity\ContentEntityStorageBase::getLatestTranslationAffectedRevisionId
    */
-  public function testIsLatestAffectedRevisionTranslation() {
+  public function testIsLatestAffectedRevisionTranslation(): void {
     ConfigurableLanguage::createFromLangcode('it')->save();
 
     // Create a basic EntityTestMulRev entity and save it.
@@ -268,7 +268,7 @@ public function testIsLatestAffectedRevisionTranslation() {
    *
    * @covers \Drupal\Core\Entity\ContentEntityStorageBase::doSave
    */
-  public function testDefaultRevisionFlag() {
+  public function testDefaultRevisionFlag(): void {
     // Create a basic EntityTestMulRev entity and save it.
     $entity = EntityTestMulRev::create();
     $entity->save();
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntitySchemaTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntitySchemaTest.php
index 6a2f44d16e3e..27d9f9830968 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntitySchemaTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntitySchemaTest.php
@@ -61,7 +61,7 @@ protected function setUp(): void {
   /**
    * Tests the custom bundle field creation and deletion.
    */
-  public function testCustomFieldCreateDelete() {
+  public function testCustomFieldCreateDelete(): void {
     // Install the module which adds the field.
     $this->installModule('entity_schema_test');
     $storage_definitions = \Drupal::service('entity_field.manager')->getFieldStorageDefinitions('entity_test_update');
@@ -102,7 +102,7 @@ protected function updateEntityType($alter) {
   /**
    * Tests that entity schema responds to changes in the entity type definition.
    */
-  public function testEntitySchemaUpdate() {
+  public function testEntitySchemaUpdate(): void {
     $this->installModule('entity_schema_test');
     $storage_definitions = \Drupal::service('entity_field.manager')->getFieldStorageDefinitions('entity_test_update');
     \Drupal::service('field_storage_definition.listener')->onFieldStorageDefinitionCreate($storage_definitions['custom_base_field']);
@@ -147,7 +147,7 @@ public function testEntitySchemaUpdate() {
    *
    * @dataProvider providerTestPrimaryKeyUpdate
    */
-  public function testPrimaryKeyUpdate($entity_type_id, $field_name) {
+  public function testPrimaryKeyUpdate($entity_type_id, $field_name): void {
     // EntityKernelTestBase::setUp() already installs the schema for the
     // 'entity_test' entity type.
     if ($entity_type_id !== 'entity_test') {
@@ -304,7 +304,7 @@ protected function refreshServices() {
   /**
    * Tests that modifying the UUID field for a translatable entity works.
    */
-  public function testModifyingTranslatableColumnSchema() {
+  public function testModifyingTranslatableColumnSchema(): void {
     $this->installModule('entity_schema_test');
     $this->updateEntityType(TRUE);
     $fields = ['revision_log', 'uuid'];
@@ -321,7 +321,7 @@ public function testModifyingTranslatableColumnSchema() {
   /**
    * Tests fields from an uninstalled module are removed from the schema.
    */
-  public function testCleanUpStorageDefinition() {
+  public function testCleanUpStorageDefinition(): void {
     // Find all the entity types provided by the entity_test module and install
     // the schema for them.
     $entity_type_ids = [];
@@ -376,7 +376,7 @@ public function testCleanUpStorageDefinition() {
   /**
    * Tests the installed storage schema for identifier fields.
    */
-  public function testIdentifierSchema() {
+  public function testIdentifierSchema(): void {
     $this->installEntitySchema('entity_test_rev');
 
     $key_value_store = \Drupal::keyValue('entity.storage_schema.sql');
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityTranslationTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityTranslationTest.php
index d2e4dad930ae..3ddc5f0e7511 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityTranslationTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityTranslationTest.php
@@ -23,7 +23,7 @@ class EntityTranslationTest extends EntityLanguageTestBase {
   /**
    * Tests language related methods of the Entity class.
    */
-  public function testEntityLanguageMethods() {
+  public function testEntityLanguageMethods(): void {
     // All entity variations have to have the same results.
     foreach (entity_test_entity_types() as $entity_type) {
       $this->doTestEntityLanguageMethods($entity_type);
@@ -143,7 +143,7 @@ protected function doTestEntityLanguageMethods($entity_type) {
   /**
    * Tests multilingual properties.
    */
-  public function testMultilingualProperties() {
+  public function testMultilingualProperties(): void {
     // Test all entity variations with data table support.
     foreach (entity_test_entity_types(ENTITY_TEST_TYPES_MULTILINGUAL) as $entity_type) {
       $this->doTestMultilingualProperties($entity_type);
@@ -306,7 +306,7 @@ protected function doTestMultilingualProperties($entity_type) {
   /**
    * Tests the Entity Translation API behavior.
    */
-  public function testEntityTranslationAPI() {
+  public function testEntityTranslationAPI(): void {
     // Test all entity variations with data table support.
     foreach (entity_test_entity_types(ENTITY_TEST_TYPES_MULTILINGUAL) as $entity_type) {
       $this->doTestEntityTranslationAPI($entity_type);
@@ -574,7 +574,7 @@ protected function doTestEntityTranslationAPI($entity_type) {
   /**
    * Tests language fallback applied to field and entity translations.
    */
-  public function testLanguageFallback() {
+  public function testLanguageFallback(): void {
     // Test all entity variations with data table support.
     foreach (entity_test_entity_types(ENTITY_TEST_TYPES_MULTILINGUAL) as $entity_type) {
       $this->doTestLanguageFallback($entity_type);
@@ -670,7 +670,7 @@ protected function doTestLanguageFallback($entity_type) {
   /**
    * Check that field translatability is handled properly.
    */
-  public function testFieldDefinitions() {
+  public function testFieldDefinitions(): void {
     // Check that field translatability can be altered to be enabled or disabled
     // in field definitions.
     $entity_type = 'entity_test_mulrev';
@@ -715,7 +715,7 @@ public function testFieldDefinitions() {
   /**
    * Tests that changing entity language does not break field language.
    */
-  public function testLanguageChange() {
+  public function testLanguageChange(): void {
     // Test all entity variations with data table support.
     foreach (entity_test_entity_types(ENTITY_TEST_TYPES_MULTILINGUAL) as $entity_type) {
       $this->doTestLanguageChange($entity_type);
@@ -776,7 +776,7 @@ protected function doTestLanguageChange($entity_type) {
   /**
    * Tests how entity adapters work with translations.
    */
-  public function testEntityAdapter() {
+  public function testEntityAdapter(): void {
     $entity_type = 'entity_test';
     $default_langcode = 'en';
     $values[$default_langcode] = ['name' => $this->randomString()];
@@ -800,7 +800,7 @@ public function testEntityAdapter() {
   /**
    * Tests if entity references are correct after adding a new translation.
    */
-  public function testFieldEntityReference() {
+  public function testFieldEntityReference(): void {
     $entity_type = 'entity_test_mul';
     $controller = $this->entityTypeManager->getStorage($entity_type);
     /** @var \Drupal\Core\Entity\ContentEntityInterface $entity */
@@ -827,7 +827,7 @@ public function testFieldEntityReference() {
   /**
    * Tests that translation statuses are correct after removing translations.
    */
-  public function testDeleteEntityTranslation() {
+  public function testDeleteEntityTranslation(): void {
     $entity_type = 'entity_test_mul';
     $controller = $this->entityTypeManager->getStorage($entity_type);
 
@@ -919,7 +919,7 @@ public function testDeleteEntityTranslation() {
   /**
    * Tests the getTranslationStatus method.
    */
-  public function testTranslationStatus() {
+  public function testTranslationStatus(): void {
     $entity_type = 'entity_test_mul';
     $storage = $this->entityTypeManager->getStorage($entity_type);
 
@@ -1000,7 +1000,7 @@ public function testTranslationStatus() {
   /**
    * Tests the translation object cache.
    */
-  public function testTranslationObjectCache() {
+  public function testTranslationObjectCache(): void {
     $default_langcode = $this->langcodes[1];
     $translation_langcode = $this->langcodes[2];
 
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityTypeConstraintValidatorTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityTypeConstraintValidatorTest.php
index 5bf885aadaaf..fa088a8343f0 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityTypeConstraintValidatorTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityTypeConstraintValidatorTest.php
@@ -33,7 +33,7 @@ protected function setUp(): void {
   /**
    * Tests the EntityTypeConstraintValidator.
    */
-  public function testValidation() {
+  public function testValidation(): void {
     // Create a typed data definition with an EntityType constraint.
     $entity_type = 'node';
     $definition = DataDefinition::create('entity_reference')
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityTypeConstraintsTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityTypeConstraintsTest.php
index 120305db67f2..6367d15eb9fc 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityTypeConstraintsTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityTypeConstraintsTest.php
@@ -22,7 +22,7 @@ protected function setUp(): void {
   /**
    * Tests defining entity constraints via entity type annotations and hooks.
    */
-  public function testConstraintDefinition() {
+  public function testConstraintDefinition(): void {
     // Test reading the annotation. There should be two constraints, the defined
     // constraint and the automatically added EntityChanged constraint.
     $entity_type = $this->entityTypeManager->getDefinition('entity_test_constraints');
@@ -60,7 +60,7 @@ public function testConstraintDefinition() {
   /**
    * Tests entity constraints are validated.
    */
-  public function testConstraintValidation() {
+  public function testConstraintValidation(): void {
     $entity = $this->entityTypeManager->getStorage('entity_test_constraints')->create();
     $entity->user_id->target_id = 0;
     $violations = $entity->validate();
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityTypeTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityTypeTest.php
index 49723a935295..270c1c8f71f8 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityTypeTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityTypeTest.php
@@ -33,7 +33,7 @@ protected function setUpEntityType($definition) {
   /**
    * Tests that the EntityType object can be serialized.
    */
-  public function testIsSerializable() {
+  public function testIsSerializable(): void {
     $entity_type = $this->setUpEntityType([]);
 
     $translation_service = new class () extends TranslationManager {
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityTypedDataDefinitionTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityTypedDataDefinitionTest.php
index 71939d354a77..a7c34efcd31b 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityTypedDataDefinitionTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityTypedDataDefinitionTest.php
@@ -51,7 +51,7 @@ protected function setUp(): void {
   /**
    * Tests deriving metadata about fields.
    */
-  public function testFields() {
+  public function testFields(): void {
     $field_definition = BaseFieldDefinition::create('integer');
     // Fields are lists of complex data.
     $this->assertInstanceOf(ListDataDefinitionInterface::class, $field_definition);
@@ -90,7 +90,7 @@ public function testFields() {
   /**
    * Tests deriving metadata about entities.
    */
-  public function testEntities() {
+  public function testEntities(): void {
     NodeType::create([
       'type' => 'article',
       'name' => 'Article',
@@ -132,7 +132,7 @@ public function testEntities() {
   /**
    * Tests deriving metadata from entity references.
    */
-  public function testEntityReferences() {
+  public function testEntityReferences(): void {
     $reference_definition = DataReferenceDefinition::create('entity');
     $this->assertInstanceOf(DataReferenceDefinitionInterface::class, $reference_definition);
 
@@ -151,7 +151,7 @@ public function testEntityReferences() {
    *
    * @dataProvider entityDefinitionIsInternalProvider
    */
-  public function testEntityDefinitionIsInternal($internal, $expected) {
+  public function testEntityDefinitionIsInternal($internal, $expected): void {
     $entity_type_id = $this->randomMachineName();
 
     $entity_type = $this->prophesize(EntityTypeInterface::class);
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityUUIDTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityUUIDTest.php
index ae4fb009464e..984d8abca38e 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityUUIDTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityUUIDTest.php
@@ -28,7 +28,7 @@ protected function setUp(): void {
   /**
    * Tests UUID generation in entity CRUD operations.
    */
-  public function testCRUD() {
+  public function testCRUD(): void {
     // All entity variations have to have the same results.
     foreach (entity_test_entity_types() as $entity_type) {
       $this->assertCRUD($entity_type);
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityValidationTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityValidationTest.php
index 11afa0d2168a..bce2dfa6d606 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityValidationTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityValidationTest.php
@@ -99,7 +99,7 @@ protected function createTestEntity($entity_type) {
   /**
    * Tests validating test entity types.
    */
-  public function testValidation() {
+  public function testValidation(): void {
     // Ensure that the constraint manager is marked as cached cleared.
 
     // Use the protected property on the cache_clearer first to check whether
@@ -195,7 +195,7 @@ protected function checkValidation($entity_type) {
   /**
    * Tests composite constraints.
    */
-  public function testCompositeConstraintValidation() {
+  public function testCompositeConstraintValidation(): void {
     $entity = $this->createTestEntity('entity_test_composite_constraint');
     $violations = $entity->validate();
     $this->assertEquals(0, $violations->count());
@@ -218,7 +218,7 @@ public function testCompositeConstraintValidation() {
   /**
    * Tests the EntityChangedConstraintValidator with multiple translations.
    */
-  public function testEntityChangedConstraintOnConcurrentMultilingualEditing() {
+  public function testEntityChangedConstraintOnConcurrentMultilingualEditing(): void {
     $this->installEntitySchema('entity_test_mulrev_changed');
     $storage = \Drupal::entityTypeManager()
       ->getStorage('entity_test_mulrev_changed');
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityViewBuilderTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityViewBuilderTest.php
index 1c73452786ef..fba7909ba65d 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityViewBuilderTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityViewBuilderTest.php
@@ -41,7 +41,7 @@ protected function setUp(): void {
   /**
    * Tests entity render cache handling.
    */
-  public function testEntityViewBuilderCache() {
+  public function testEntityViewBuilderCache(): void {
     /** @var \Drupal\Core\Render\RendererInterface $renderer */
     $renderer = $this->container->get('renderer');
     $cache_contexts_manager = \Drupal::service("cache_contexts_manager");
@@ -96,7 +96,7 @@ public function testEntityViewBuilderCache() {
   /**
    * Tests entity render cache with references.
    */
-  public function testEntityViewBuilderCacheWithReferences() {
+  public function testEntityViewBuilderCacheWithReferences(): void {
     /** @var \Drupal\Core\Render\RendererInterface $renderer */
     $renderer = $this->container->get('renderer');
     $cache_contexts_manager = \Drupal::service("cache_contexts_manager");
@@ -163,7 +163,7 @@ public function testEntityViewBuilderCacheWithReferences() {
   /**
    * Tests entity render cache toggling.
    */
-  public function testEntityViewBuilderCacheToggling() {
+  public function testEntityViewBuilderCacheToggling(): void {
     $entity_test = $this->createTestEntity('entity_test');
     $entity_test->save();
 
@@ -190,7 +190,7 @@ public function testEntityViewBuilderCacheToggling() {
   /**
    * Tests weighting of display components.
    */
-  public function testEntityViewBuilderWeight() {
+  public function testEntityViewBuilderWeight(): void {
     /** @var \Drupal\Core\Render\RendererInterface $renderer */
     $renderer = $this->container->get('renderer');
 
@@ -212,7 +212,7 @@ public function testEntityViewBuilderWeight() {
   /**
    * Tests EntityViewBuilder::viewField() language awareness.
    */
-  public function testViewField() {
+  public function testViewField(): void {
     // Allow access to view translations as well.
     Role::load(RoleInterface::ANONYMOUS_ID)
       ->grantPermission('view test entity translations')
@@ -359,7 +359,7 @@ protected function createTestEntity($entity_type) {
   /**
    * Tests that viewing an entity without template does not specify #theme.
    */
-  public function testNoTemplate() {
+  public function testNoTemplate(): void {
     // Ensure that an entity type without explicit view builder uses the
     // default.
     $entity_type_manager = \Drupal::entityTypeManager();
@@ -378,7 +378,7 @@ public function testNoTemplate() {
   /**
    * Tests an entity type with an external canonical rel.
    */
-  public function testExternalEntity() {
+  public function testExternalEntity(): void {
     $this->installEntitySchema('entity_test_external');
     /** @var \Drupal\Core\Render\RendererInterface $renderer */
     $renderer = $this->container->get('renderer');
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityViewHookTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityViewHookTest.php
index a895b7d48922..2e7fa4327631 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityViewHookTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityViewHookTest.php
@@ -24,7 +24,7 @@ class EntityViewHookTest extends EntityKernelTestBase {
   /**
    * Tests hook_entity_display_build_alter().
    */
-  public function testHookEntityDisplayBuildAlter() {
+  public function testHookEntityDisplayBuildAlter(): void {
     entity_test_create_bundle('display_build_alter_bundle');
     /** @var \Drupal\Core\Render\RendererInterface $renderer */
     $renderer = $this->container->get('renderer');
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/FieldSqlStorageTest.php b/core/tests/Drupal/KernelTests/Core/Entity/FieldSqlStorageTest.php
index bd6543f4e178..b9e8f2b80661 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/FieldSqlStorageTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/FieldSqlStorageTest.php
@@ -107,7 +107,7 @@ protected function setUp(): void {
   /**
    * Tests field loading works correctly by inserting directly in the tables.
    */
-  public function testFieldLoad() {
+  public function testFieldLoad(): void {
     $entity_type = $bundle = 'entity_test_rev';
     /** @var \Drupal\Core\Entity\RevisionableStorageInterface $storage */
     $storage = $this->container->get('entity_type.manager')->getStorage($entity_type);
@@ -183,7 +183,7 @@ public function testFieldLoad() {
   /**
    * Tests field saving works correctly by reading directly from the tables.
    */
-  public function testFieldWrite() {
+  public function testFieldWrite(): void {
     $entity_type = $bundle = 'entity_test_rev';
     $entity = $this->container->get('entity_type.manager')
       ->getStorage($entity_type)
@@ -279,7 +279,7 @@ public function testFieldWrite() {
   /**
    * Tests that long entity type and field names do not break.
    */
-  public function testLongNames() {
+  public function testLongNames(): void {
     // Use one of the longest entity_type names in core.
     $entity_type = $bundle = 'entity_test_multivalue_basefield';
     $this->installEntitySchema('entity_test_multivalue_basefield');
@@ -320,7 +320,7 @@ public function testLongNames() {
   /**
    * Tests trying to update a field with data.
    */
-  public function testUpdateFieldSchemaWithData() {
+  public function testUpdateFieldSchemaWithData(): void {
     $entity_type = 'entity_test_rev';
     // Create a decimal 5.2 field and add some data.
     $field_storage = FieldStorageConfig::create([
@@ -353,7 +353,7 @@ public function testUpdateFieldSchemaWithData() {
   /**
    * Tests that failure to create fields is handled gracefully.
    */
-  public function testFieldUpdateFailure() {
+  public function testFieldUpdateFailure(): void {
     // Create a text field.
     $field_storage = FieldStorageConfig::create([
       'field_name' => 'test_text',
@@ -392,7 +392,7 @@ public function testFieldUpdateFailure() {
   /**
    * Tests adding and removing indexes while data is present.
    */
-  public function testFieldUpdateIndexesWithData() {
+  public function testFieldUpdateIndexesWithData(): void {
     // Create a decimal field.
     $field_name = 'test_field';
     $entity_type = 'entity_test_rev';
@@ -449,7 +449,7 @@ public function testFieldUpdateIndexesWithData() {
   /**
    * Tests foreign key support.
    */
-  public function testFieldSqlStorageForeignKeys() {
+  public function testFieldSqlStorageForeignKeys(): void {
     // Create a 'shape' field, with a configurable foreign key (see
     // field_test_field_schema()).
     $field_name = 'test_field';
@@ -483,7 +483,7 @@ public function testFieldSqlStorageForeignKeys() {
   /**
    * Tests table name generation.
    */
-  public function testTableNames() {
+  public function testTableNames(): void {
     // Note: we need to test entity types with long names. We therefore use
     // fields on imaginary entity types (works as long as we don't actually save
     // them), and just check the generated table names.
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/FieldTranslationSqlStorageTest.php b/core/tests/Drupal/KernelTests/Core/Entity/FieldTranslationSqlStorageTest.php
index 90043437197e..c864b515277f 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/FieldTranslationSqlStorageTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/FieldTranslationSqlStorageTest.php
@@ -18,7 +18,7 @@ class FieldTranslationSqlStorageTest extends EntityLanguageTestBase {
   /**
    * Tests field SQL storage.
    */
-  public function testFieldSqlStorage() {
+  public function testFieldSqlStorage(): void {
     $entity_type = 'entity_test_mul';
 
     $controller = $this->entityTypeManager->getStorage($entity_type);
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/FieldWidgetConstraintValidatorTest.php b/core/tests/Drupal/KernelTests/Core/Entity/FieldWidgetConstraintValidatorTest.php
index 36b7e4346bee..9a0a81c5894e 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/FieldWidgetConstraintValidatorTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/FieldWidgetConstraintValidatorTest.php
@@ -38,7 +38,7 @@ protected function setUp(): void {
   /**
    * Tests widget constraint validation.
    */
-  public function testValidation() {
+  public function testValidation(): void {
     $entity_type = 'entity_test_constraint_violation';
     $entity = $this->container->get('entity_type.manager')
       ->getStorage($entity_type)
@@ -106,7 +106,7 @@ protected function getErrorsForEntity(EntityInterface $entity, $hidden_fields =
   /**
    * Tests widget constraint validation with composite constraints.
    */
-  public function testValidationWithCompositeConstraint() {
+  public function testValidationWithCompositeConstraint(): void {
     // First provide a valid value, this should cause no validation.
     $entity = EntityTestCompositeConstraint::create([
       'name' => 'valid-value',
@@ -149,7 +149,7 @@ public function testValidationWithCompositeConstraint() {
   /**
    * Tests entity level constraint validation.
    */
-  public function testEntityLevelConstraintValidation() {
+  public function testEntityLevelConstraintValidation(): void {
     $entity = EntityTestCompositeConstraint::create([
       'name' => 'entity-level-violation',
     ]);
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/FieldableEntityDefinitionUpdateTest.php b/core/tests/Drupal/KernelTests/Core/Entity/FieldableEntityDefinitionUpdateTest.php
index 9842aed0beff..4a70ae7091c9 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/FieldableEntityDefinitionUpdateTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/FieldableEntityDefinitionUpdateTest.php
@@ -130,7 +130,7 @@ protected function setUp(): void {
    * @covers ::updateFieldableEntityType
    * @dataProvider providerTestFieldableEntityTypeUpdates
    */
-  public function testFieldableEntityTypeUpdates($initial_rev, $initial_mul, $new_rev, $new_mul, $data_migration_supported) {
+  public function testFieldableEntityTypeUpdates($initial_rev, $initial_mul, $new_rev, $new_mul, $data_migration_supported): void {
     // The 'entity_test_update' entity type is neither revisionable nor
     // translatable by default, so we need to get it into the initial testing
     // state. This also covers the "no existing data" scenario for fieldable
@@ -666,7 +666,7 @@ protected function assertBackupTables(): void {
   /**
    * Tests that a failed entity schema update preserves the existing data.
    */
-  public function testFieldableEntityTypeUpdatesErrorHandling() {
+  public function testFieldableEntityTypeUpdatesErrorHandling(): void {
     $schema = $this->database->schema();
 
     // First, convert the entity type to be translatable for better coverage and
@@ -834,7 +834,7 @@ public function testFieldableEntityTypeUpdatesErrorHandling() {
   /**
    * Tests the removal of the backup tables after a successful update.
    */
-  public function testFieldableEntityTypeUpdatesRemoveBackupTables() {
+  public function testFieldableEntityTypeUpdatesRemoveBackupTables(): void {
     $schema = $this->database->schema();
 
     // Convert the entity type to be revisionable.
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/RevisionableContentEntityBaseTest.php b/core/tests/Drupal/KernelTests/Core/Entity/RevisionableContentEntityBaseTest.php
index 5053b3367a3c..467b225134ef 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/RevisionableContentEntityBaseTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/RevisionableContentEntityBaseTest.php
@@ -38,7 +38,7 @@ protected function setUp(): void {
   /**
    * Tests the correct functionality CRUD operations of entity revisions.
    */
-  public function testRevisionableContentEntity() {
+  public function testRevisionableContentEntity(): void {
     $entity_type = 'entity_test_mul_revlog';
     $definition = \Drupal::entityTypeManager()->getDefinition($entity_type);
     $user = User::create(['name' => 'test name']);
@@ -99,7 +99,7 @@ public function testRevisionableContentEntity() {
    *
    * @covers \Drupal\Core\Entity\ContentEntityBase::wasDefaultRevision
    */
-  public function testWasDefaultRevision() {
+  public function testWasDefaultRevision(): void {
     $entity_type_id = 'entity_test_mul_revlog';
     $entity = EntityTestMulWithRevisionLog::create([
       'type' => $entity_type_id,
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/RouteProviderTest.php b/core/tests/Drupal/KernelTests/Core/Entity/RouteProviderTest.php
index ee99001dee98..ae8149e03310 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/RouteProviderTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/RouteProviderTest.php
@@ -63,7 +63,7 @@ protected function httpKernelHandle($url) {
   /**
    * @covers \Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider::getRoutes
    */
-  public function testHtmlRoutes() {
+  public function testHtmlRoutes(): void {
     /** @var \Drupal\Core\Routing\RouteProviderInterface $route_provider */
     $route_provider = \Drupal::service('router.route_provider');
 
@@ -104,7 +104,7 @@ public function testHtmlRoutes() {
    * @covers \Drupal\Core\Entity\Routing\AdminHtmlRouteProvider::getEditFormRoute
    * @covers \Drupal\Core\Entity\Routing\AdminHtmlRouteProvider::getDeleteFormRoute
    */
-  public function testAdminHtmlRoutes() {
+  public function testAdminHtmlRoutes(): void {
     /** @var \Drupal\Core\Routing\RouteProviderInterface $route_provider */
     $route_provider = \Drupal::service('router.route_provider');
 
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/Sql/SqlContentEntityStorageSchemaTest.php b/core/tests/Drupal/KernelTests/Core/Entity/Sql/SqlContentEntityStorageSchemaTest.php
index 0d0c1c053e8b..a0bfc4125b2e 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/Sql/SqlContentEntityStorageSchemaTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/Sql/SqlContentEntityStorageSchemaTest.php
@@ -41,7 +41,7 @@ protected function setUp(): void {
   /**
    * Tests updating a shared table field definition.
    */
-  public function testOnFieldStorageDefinitionUpdateShared() {
+  public function testOnFieldStorageDefinitionUpdateShared(): void {
     // Install the test entity type with an additional field. Use a multi-column
     // field so that field name and column name(s) do not match.
     $field = BaseFieldDefinition::create('shape')
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/ValidReferenceConstraintValidatorTest.php b/core/tests/Drupal/KernelTests/Core/Entity/ValidReferenceConstraintValidatorTest.php
index ea891ba0ff89..f815bf33f4d5 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/ValidReferenceConstraintValidatorTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/ValidReferenceConstraintValidatorTest.php
@@ -54,7 +54,7 @@ protected function setUp(): void {
   /**
    * Tests the ValidReferenceConstraintValidator.
    */
-  public function testValidation() {
+  public function testValidation(): void {
     // Create a test entity to be referenced.
     $entity = $this->createUser();
     // By default entity references already have the ValidReference constraint.
@@ -85,7 +85,7 @@ public function testValidation() {
   /**
    * Tests the validation of pre-existing items in an entity reference field.
    */
-  public function testPreExistingItemsValidation() {
+  public function testPreExistingItemsValidation(): void {
     // Create two types of users, with and without access to bypass content
     // access.
     /** @var \Drupal\user\RoleInterface $role_with_access */
diff --git a/core/tests/Drupal/KernelTests/Core/EventSubscriber/ExceptionLoggingSubscriberTest.php b/core/tests/Drupal/KernelTests/Core/EventSubscriber/ExceptionLoggingSubscriberTest.php
index 1f5afcdd0014..785a52c981be 100644
--- a/core/tests/Drupal/KernelTests/Core/EventSubscriber/ExceptionLoggingSubscriberTest.php
+++ b/core/tests/Drupal/KernelTests/Core/EventSubscriber/ExceptionLoggingSubscriberTest.php
@@ -32,7 +32,7 @@ class ExceptionLoggingSubscriberTest extends KernelTestBase {
   /**
    * Tests \Drupal\Core\EventSubscriber\ExceptionLoggingSubscriber::onException().
    */
-  public function testExceptionLogging() {
+  public function testExceptionLogging(): void {
     $http_kernel = \Drupal::service('http_kernel');
 
     $channel_map = [
diff --git a/core/tests/Drupal/KernelTests/Core/Extension/ModuleExtensionListTest.php b/core/tests/Drupal/KernelTests/Core/Extension/ModuleExtensionListTest.php
index fecd16f08c55..0981068243ef 100644
--- a/core/tests/Drupal/KernelTests/Core/Extension/ModuleExtensionListTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Extension/ModuleExtensionListTest.php
@@ -15,7 +15,7 @@ class ModuleExtensionListTest extends KernelTestBase {
   /**
    * @covers ::getList
    */
-  public function testGetList() {
+  public function testGetList(): void {
     \Drupal::configFactory()->getEditable('core.extension')
       ->set('module.testing', 1000)
       ->set('profile', 'testing')
diff --git a/core/tests/Drupal/KernelTests/Core/Extension/ModuleHandlerDeprecatedHookTest.php b/core/tests/Drupal/KernelTests/Core/Extension/ModuleHandlerDeprecatedHookTest.php
index 1f89983cbb71..91c4b426ff85 100644
--- a/core/tests/Drupal/KernelTests/Core/Extension/ModuleHandlerDeprecatedHookTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Extension/ModuleHandlerDeprecatedHookTest.php
@@ -21,7 +21,7 @@ class ModuleHandlerDeprecatedHookTest extends KernelTestBase {
   /**
    * @covers ::invokeDeprecated
    */
-  public function testInvokeDeprecated() {
+  public function testInvokeDeprecated(): void {
     $this->expectDeprecation('The deprecated hook hook_deprecated_hook() is implemented in these functions: deprecation_test_deprecated_hook(). Use something else.');
     /** @var \Drupal\Core\Extension\ModuleHandlerInterface $module_handler */
     $module_handler = $this->container->get('module_handler');
@@ -35,7 +35,7 @@ public function testInvokeDeprecated() {
   /**
    * @covers ::invokeAllDeprecated
    */
-  public function testInvokeAllDeprecated() {
+  public function testInvokeAllDeprecated(): void {
     $this->expectDeprecation('The deprecated hook hook_deprecated_hook() is implemented in these functions: deprecation_test_deprecated_hook(). Use something else.');
     /** @var \Drupal\Core\Extension\ModuleHandlerInterface $module_handler */
     $module_handler = $this->container->get('module_handler');
@@ -49,7 +49,7 @@ public function testInvokeAllDeprecated() {
   /**
    * @covers ::alterDeprecated
    */
-  public function testAlterDeprecated() {
+  public function testAlterDeprecated(): void {
     $this->expectDeprecation('The deprecated alter hook hook_deprecated_alter_alter() is implemented in these functions: deprecation_test_deprecated_alter_alter. Alter something else.');
     /** @var \Drupal\Core\Extension\ModuleHandlerInterface $module_handler */
     $module_handler = $this->container->get('module_handler');
diff --git a/core/tests/Drupal/KernelTests/Core/Extension/ModuleHandlerDeprecatedHookUnimplementedTest.php b/core/tests/Drupal/KernelTests/Core/Extension/ModuleHandlerDeprecatedHookUnimplementedTest.php
index feff674ecfc2..2f58084c3539 100644
--- a/core/tests/Drupal/KernelTests/Core/Extension/ModuleHandlerDeprecatedHookUnimplementedTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Extension/ModuleHandlerDeprecatedHookUnimplementedTest.php
@@ -21,7 +21,7 @@ class ModuleHandlerDeprecatedHookUnimplementedTest extends KernelTestBase {
    * @covers ::invokeAllDeprecated
    * @covers ::invokeDeprecated
    */
-  public function testUnimplementedHooks() {
+  public function testUnimplementedHooks(): void {
     $unimplemented_hook_name = 'unimplemented_hook_name';
 
     /** @var \Drupal\Core\Extension\ModuleHandlerInterface $module_handler */
diff --git a/core/tests/Drupal/KernelTests/Core/Extension/ModuleHandlerTest.php b/core/tests/Drupal/KernelTests/Core/Extension/ModuleHandlerTest.php
index a2d8e0da4e35..8ee28a968fd5 100644
--- a/core/tests/Drupal/KernelTests/Core/Extension/ModuleHandlerTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Extension/ModuleHandlerTest.php
@@ -19,7 +19,7 @@ class ModuleHandlerTest extends KernelTestBase {
    *
    * @covers ::getName
    */
-  public function testInvalidGetName() {
+  public function testInvalidGetName(): void {
     $this->expectException(UnknownExtensionException::class);
     $this->expectExceptionMessage('The module module_nonsense does not exist.');
     $module_handler = $this->container->get('module_handler');
@@ -31,7 +31,7 @@ public function testInvalidGetName() {
    *
    * @group legacy
    */
-  public function testGetNameDeprecation() {
+  public function testGetNameDeprecation(): void {
     $this->expectDeprecation('Drupal\Core\Extension\ModuleHandler::getName() is deprecated in drupal:10.3.0 and is removed from drupal:12.0.0. Use \Drupal\Core\Extension\ModuleExtensionList::getName($module) instead. See https://www.drupal.org/node/3310017');
     $this->assertNotNull(\Drupal::service('module_handler')->getName('module_test'));
   }
diff --git a/core/tests/Drupal/KernelTests/Core/Extension/ModuleImplementsAlterTest.php b/core/tests/Drupal/KernelTests/Core/Extension/ModuleImplementsAlterTest.php
index 6fd04ef0de4e..f37e257d0eec 100644
--- a/core/tests/Drupal/KernelTests/Core/Extension/ModuleImplementsAlterTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Extension/ModuleImplementsAlterTest.php
@@ -24,7 +24,7 @@ class ModuleImplementsAlterTest extends KernelTestBase {
    * @see \Drupal\Core\Extension\ModuleHandler::buildImplementationInfo()
    * @see module_test_module_implements_alter()
    */
-  public function testModuleImplementsAlter() {
+  public function testModuleImplementsAlter(): void {
 
     // Get an instance of the module handler, to observe how it is going to be
     // replaced.
@@ -71,7 +71,7 @@ public function testModuleImplementsAlter() {
    * @see \Drupal\Core\Extension\ModuleHandler::buildImplementationInfo()
    * @see module_test_module_implements_alter()
    */
-  public function testModuleImplementsAlterNonExistingImplementation() {
+  public function testModuleImplementsAlterNonExistingImplementation(): void {
 
     // Install the module_test module.
     \Drupal::service('module_installer')->install(['module_test']);
diff --git a/core/tests/Drupal/KernelTests/Core/Extension/ModuleInstallerTest.php b/core/tests/Drupal/KernelTests/Core/Extension/ModuleInstallerTest.php
index d232e0cd0f16..b95fad54b6e2 100644
--- a/core/tests/Drupal/KernelTests/Core/Extension/ModuleInstallerTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Extension/ModuleInstallerTest.php
@@ -27,7 +27,7 @@ class ModuleInstallerTest extends KernelTestBase {
    * @covers ::install
    * @covers ::uninstall
    */
-  public function testRouteRebuild() {
+  public function testRouteRebuild(): void {
     // Remove the routing table manually to ensure it can be created lazily
     // properly.
     Database::getConnection()->schema()->dropTable('router');
@@ -46,7 +46,7 @@ public function testRouteRebuild() {
    *
    * @covers ::install
    */
-  public function testConfigChangeOnInstall() {
+  public function testConfigChangeOnInstall(): void {
     // Install the child module so the parent is installed automatically.
     $this->container->get('module_installer')->install(['module_handler_test_multiple_child']);
     $modules = $this->config('core.extension')->get('module');
@@ -62,7 +62,7 @@ public function testConfigChangeOnInstall() {
    *
    * @covers ::removeCacheBins
    */
-  public function testCacheBinCleanup() {
+  public function testCacheBinCleanup(): void {
     $schema = $this->container->get('database')->schema();
     $table = 'cache_module_cache_bin';
 
@@ -85,7 +85,7 @@ public function testCacheBinCleanup() {
   /**
    * Ensure that rebuilding the container in hook_install() works.
    */
-  public function testKernelRebuildDuringHookInstall() {
+  public function testKernelRebuildDuringHookInstall(): void {
     \Drupal::state()->set('module_test_install:rebuild_container', TRUE);
     $module_installer = $this->container->get('module_installer');
     $this->assertTrue($module_installer->install(['module_test']));
@@ -97,7 +97,7 @@ public function testKernelRebuildDuringHookInstall() {
    * @dataProvider providerTestInvalidCoreInstall
    * @covers ::install
    */
-  public function testInvalidCoreInstall($module_name, $install_dependencies) {
+  public function testInvalidCoreInstall($module_name, $install_dependencies): void {
     $this->expectException(MissingDependencyException::class);
     $this->expectExceptionMessage("Unable to install modules: module '$module_name' is incompatible with this version of Drupal core.");
     $this->container->get('module_installer')->install([$module_name], $install_dependencies);
@@ -124,7 +124,7 @@ public static function providerTestInvalidCoreInstall() {
    *
    * @covers ::install
    */
-  public function testDependencyInvalidCoreInstall() {
+  public function testDependencyInvalidCoreInstall(): void {
     $this->expectException(MissingDependencyException::class);
     $this->expectExceptionMessage("Unable to install modules: module 'system_incompatible_core_version_dependencies_test'. Its dependency module 'system_core_incompatible_semver_test' is incompatible with this version of Drupal core.");
     $this->container->get('module_installer')->install(['system_incompatible_core_version_dependencies_test']);
@@ -135,7 +135,7 @@ public function testDependencyInvalidCoreInstall() {
    *
    * @covers ::install
    */
-  public function testDependencyInvalidCoreInstallNoDependencies() {
+  public function testDependencyInvalidCoreInstallNoDependencies(): void {
     $this->assertTrue($this->container->get('module_installer')->install(['system_incompatible_core_version_dependencies_test'], FALSE));
   }
 
@@ -144,7 +144,7 @@ public function testDependencyInvalidCoreInstallNoDependencies() {
    *
    * @covers ::install
    */
-  public function testObsoleteInstall() {
+  public function testObsoleteInstall(): void {
     $this->expectException(ObsoleteExtensionException::class);
     $this->expectExceptionMessage("Unable to install modules: module 'system_status_obsolete_test' is obsolete.");
     $this->container->get('module_installer')->install(['system_status_obsolete_test']);
@@ -157,7 +157,7 @@ public function testObsoleteInstall() {
    *
    * @group legacy
    */
-  public function testDeprecatedInstall() {
+  public function testDeprecatedInstall(): void {
     $this->expectDeprecation("The module 'deprecated_module' is deprecated. See http://example.com/deprecated");
     \Drupal::service('module_installer')->install(['deprecated_module']);
     $this->assertTrue(\Drupal::service('module_handler')->moduleExists('deprecated_module'));
@@ -171,7 +171,7 @@ public function testDeprecatedInstall() {
    *
    * @group legacy
    */
-  public function testUninstallValidatorsBC() {
+  public function testUninstallValidatorsBC(): void {
     $this->expectDeprecation('The "module_installer.uninstall_validators" service is deprecated in drupal:11.1.0 and is removed from drupal:12.0.0. Inject "!tagged_iterator module_install.uninstall_validator" instead. See https://www.drupal.org/node/3432595');
     $module_installer = new ModuleInstaller(
       $this->container->getParameter('app.root'),
diff --git a/core/tests/Drupal/KernelTests/Core/Extension/ThemeEngineExtensionListTest.php b/core/tests/Drupal/KernelTests/Core/Extension/ThemeEngineExtensionListTest.php
index c551d06b188a..9c39a9246b3a 100644
--- a/core/tests/Drupal/KernelTests/Core/Extension/ThemeEngineExtensionListTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Extension/ThemeEngineExtensionListTest.php
@@ -15,7 +15,7 @@ class ThemeEngineExtensionListTest extends KernelTestBase {
   /**
    * @covers ::getList
    */
-  public function testGetList() {
+  public function testGetList(): void {
     // Confirm that all theme engines are available.
     $theme_engines = \Drupal::service('extension.list.theme_engine')->getList();
     $this->assertArrayHasKey('twig', $theme_engines);
diff --git a/core/tests/Drupal/KernelTests/Core/Extension/ThemeExtensionListTest.php b/core/tests/Drupal/KernelTests/Core/Extension/ThemeExtensionListTest.php
index 98e3627823d7..0ccae25b155b 100644
--- a/core/tests/Drupal/KernelTests/Core/Extension/ThemeExtensionListTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Extension/ThemeExtensionListTest.php
@@ -15,7 +15,7 @@ class ThemeExtensionListTest extends KernelTestBase {
   /**
    * @covers ::getList
    */
-  public function testGetList() {
+  public function testGetList(): void {
     \Drupal::configFactory()->getEditable('core.extension')
       ->set('module.testing', 1000)
       ->set('theme.test_theme', 0)
@@ -35,7 +35,7 @@ public function testGetList() {
   /**
    * Tests that themes have an empty default version set.
    */
-  public function testThemeWithoutVersion() {
+  public function testThemeWithoutVersion(): void {
     $theme = \Drupal::service('extension.list.theme')->get('test_theme_settings_features');
     $this->assertNull($theme->info['version']);
   }
diff --git a/core/tests/Drupal/KernelTests/Core/Extension/UpdateDescriptionTest.php b/core/tests/Drupal/KernelTests/Core/Extension/UpdateDescriptionTest.php
index 3009dcd588da..e9ce1e2e4e03 100644
--- a/core/tests/Drupal/KernelTests/Core/Extension/UpdateDescriptionTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Extension/UpdateDescriptionTest.php
@@ -23,7 +23,7 @@ class UpdateDescriptionTest extends KernelTestBase {
    *
    * @see update_get_update_list()
    */
-  public function testUpdateGetUpdateList() {
+  public function testUpdateGetUpdateList(): void {
     require_once $this->root . '/core/includes/update.inc';
     \Drupal::service('update.update_hook_registry')->setInstalledVersion('update_test_description', 8000);
     \Drupal::moduleHandler()->loadInclude('update_test_description', 'install');
diff --git a/core/tests/Drupal/KernelTests/Core/Extension/UpdateSchemaTest.php b/core/tests/Drupal/KernelTests/Core/Extension/UpdateSchemaTest.php
index a9a3282eed05..26b698ca7878 100644
--- a/core/tests/Drupal/KernelTests/Core/Extension/UpdateSchemaTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Extension/UpdateSchemaTest.php
@@ -23,7 +23,7 @@ class UpdateSchemaTest extends KernelTestBase {
    *
    * @see \Drupal\Core\Update\UpdateHookRegistry::getAvailableUpdates()
    */
-  public function testDrupalGetSchemaVersionsInt() {
+  public function testDrupalGetSchemaVersionsInt(): void {
     \Drupal::state()->set('update_test_schema_version', 8001);
     $this->installSchema('update_test_schema', ['update_test_schema_table']);
     $schema = \Drupal::service('update.update_hook_registry')->getAvailableUpdates('update_test_schema');
diff --git a/core/tests/Drupal/KernelTests/Core/Field/Entity/BaseFieldOverrideTest.php b/core/tests/Drupal/KernelTests/Core/Field/Entity/BaseFieldOverrideTest.php
index cee655b539fc..b78dd21c164e 100644
--- a/core/tests/Drupal/KernelTests/Core/Field/Entity/BaseFieldOverrideTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Field/Entity/BaseFieldOverrideTest.php
@@ -40,7 +40,7 @@ protected function setUp(): void {
    *
    * @dataProvider getClassTestCases
    */
-  public function testGetClass($field_type, $base_field_class, $expected_override_class) {
+  public function testGetClass($field_type, $base_field_class, $expected_override_class): void {
     $base_field = BaseFieldDefinition::create($field_type)
       ->setName('Test Field')
       ->setTargetEntityTypeId('entity_test');
@@ -72,7 +72,7 @@ public static function getClassTestCases() {
   /**
    * Tests the default value callback.
    */
-  public function testDefaultValueCallback() {
+  public function testDefaultValueCallback(): void {
     $base_field = BaseFieldDefinition::create('entity_reference')
       ->setName('Test Field')
       ->setTargetEntityTypeId('entity_test')
@@ -92,7 +92,7 @@ public function testDefaultValueCallback() {
    * @covers ::isInternal
    * @covers ::getUniqueIdentifier
    */
-  public function testInheritedProperties() {
+  public function testInheritedProperties(): void {
     $base_field = BaseFieldDefinition::create('string')
       ->setName('Test Field')
       ->setTargetEntityTypeId('entity_test')
diff --git a/core/tests/Drupal/KernelTests/Core/Field/FieldAccessTest.php b/core/tests/Drupal/KernelTests/Core/Field/FieldAccessTest.php
index aa1e1265949b..37d06f0d1a45 100644
--- a/core/tests/Drupal/KernelTests/Core/Field/FieldAccessTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Field/FieldAccessTest.php
@@ -69,7 +69,7 @@ protected function setUp(): void {
    * @see entity_test_entity_field_access()
    * @see entity_test_entity_field_access_alter()
    */
-  public function testFieldAccess() {
+  public function testFieldAccess(): void {
     $values = [
       'name' => $this->randomMachineName(),
       'user_id' => 1,
diff --git a/core/tests/Drupal/KernelTests/Core/Field/FieldItemTest.php b/core/tests/Drupal/KernelTests/Core/Field/FieldItemTest.php
index 42a528945f44..7c16f9a0bc3f 100644
--- a/core/tests/Drupal/KernelTests/Core/Field/FieldItemTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Field/FieldItemTest.php
@@ -59,7 +59,7 @@ protected function setUp(): void {
   /**
    * Tests the field item save workflow.
    */
-  public function testSaveWorkflow() {
+  public function testSaveWorkflow(): void {
     $entity = EntityTestMulRev::create([
       'name' => $this->randomString(),
       'field_test_item' => $this->randomString(),
diff --git a/core/tests/Drupal/KernelTests/Core/Field/FieldMissingTypeTest.php b/core/tests/Drupal/KernelTests/Core/Field/FieldMissingTypeTest.php
index 0cd6eaf4eb0f..3fedd71caf27 100644
--- a/core/tests/Drupal/KernelTests/Core/Field/FieldMissingTypeTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Field/FieldMissingTypeTest.php
@@ -62,7 +62,7 @@ protected function setUp(): void {
    *
    * @see \Drupal\field\FieldStorageConfigStorage::mapFromStorageRecords()
    */
-  public function testFieldStorageMissingType() {
+  public function testFieldStorageMissingType(): void {
     $this->expectException(PluginNotFoundException::class);
     $this->expectExceptionMessage("Unable to determine class for field type 'foo_field_storage' found in the 'field.storage.entity_test_mulrev.{$this->fieldName}' configuration");
     $entity = EntityTestMulRev::create([
@@ -82,7 +82,7 @@ public function testFieldStorageMissingType() {
    *
    * @see \Drupal\field\FieldConfigStorageBase::mapFromStorageRecords()
    */
-  public function testFieldMissingType() {
+  public function testFieldMissingType(): void {
     $this->expectException(PluginNotFoundException::class);
     $this->expectExceptionMessage("Unable to determine class for field type 'foo_field' found in the 'field.field.entity_test_mulrev.entity_test_mulrev.{$this->fieldName}' configuration");
     $entity = EntityTestMulRev::create([
diff --git a/core/tests/Drupal/KernelTests/Core/Field/FieldSettingsTest.php b/core/tests/Drupal/KernelTests/Core/Field/FieldSettingsTest.php
index 8e82ce9f4138..dbf6f2062553 100644
--- a/core/tests/Drupal/KernelTests/Core/Field/FieldSettingsTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Field/FieldSettingsTest.php
@@ -27,7 +27,7 @@ class FieldSettingsTest extends EntityKernelTestBase {
    * @covers \Drupal\Core\Field\BaseFieldDefinition::getSettings
    * @covers \Drupal\Core\Field\BaseFieldDefinition::setSettings
    */
-  public function testBaseFieldSettings() {
+  public function testBaseFieldSettings(): void {
     $base_field = BaseFieldDefinition::create('test_field');
 
     // Check that the default settings have been populated.
@@ -51,7 +51,7 @@ public function testBaseFieldSettings() {
   /**
    * Tests the base field settings on a cloned base field definition object.
    */
-  public function testBaseFieldSettingsOnClone() {
+  public function testBaseFieldSettingsOnClone(): void {
     $base_field = BaseFieldDefinition::create('test_field');
 
     // Check that the default settings have been populated.
@@ -80,7 +80,7 @@ public function testBaseFieldSettingsOnClone() {
    * @covers \Drupal\field\Entity\FieldStorageConfig::getSettings
    * @covers \Drupal\field\Entity\FieldStorageConfig::setSettings
    */
-  public function testConfigurableFieldStorageSettings() {
+  public function testConfigurableFieldStorageSettings(): void {
     $field_storage = FieldStorageConfig::create([
       'field_name' => 'test_field',
       'entity_type' => 'entity_test',
@@ -108,7 +108,7 @@ public function testConfigurableFieldStorageSettings() {
    * @covers \Drupal\field\Entity\FieldStorageConfig::getSettings
    * @covers \Drupal\field\Entity\FieldStorageConfig::setSettings
    */
-  public function testConfigurableFieldSettings() {
+  public function testConfigurableFieldSettings(): void {
     $field_storage = FieldStorageConfig::create([
       'field_name' => 'test_field',
       'entity_type' => 'entity_test',
diff --git a/core/tests/Drupal/KernelTests/Core/Field/FieldType/PasswordItemTest.php b/core/tests/Drupal/KernelTests/Core/Field/FieldType/PasswordItemTest.php
index 7db2a7d285a2..c3d6fc47392f 100644
--- a/core/tests/Drupal/KernelTests/Core/Field/FieldType/PasswordItemTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Field/FieldType/PasswordItemTest.php
@@ -55,7 +55,7 @@ protected function setUp(): void {
   /**
    * @covers ::preSave
    */
-  public function testPreSavePreHashed() {
+  public function testPreSavePreHashed(): void {
     $entity = EntityTest::create([
       'name' => $this->randomString(),
     ]);
@@ -70,7 +70,7 @@ public function testPreSavePreHashed() {
   /**
    * @covers ::preSave
    */
-  public function testPreSaveNewNull() {
+  public function testPreSaveNewNull(): void {
     $entity = EntityTest::create([
       'name' => $this->randomString(),
     ]);
@@ -83,7 +83,7 @@ public function testPreSaveNewNull() {
   /**
    * @covers ::preSave
    */
-  public function testPreSaveNewEmptyString() {
+  public function testPreSaveNewEmptyString(): void {
     $entity = EntityTest::create([
       'name' => $this->randomString(),
     ]);
@@ -100,7 +100,7 @@ public function testPreSaveNewEmptyString() {
   /**
    * @covers ::preSave
    */
-  public function testPreSaveNewMultipleSpacesString() {
+  public function testPreSaveNewMultipleSpacesString(): void {
     $entity = EntityTest::create([
       'name' => $this->randomString(),
     ]);
@@ -117,7 +117,7 @@ public function testPreSaveNewMultipleSpacesString() {
   /**
    * @covers ::preSave
    */
-  public function testPreSaveExistingNull() {
+  public function testPreSaveExistingNull(): void {
     $entity = EntityTest::create();
     $entity->test_field = $this->randomString();
     $entity->save();
@@ -133,7 +133,7 @@ public function testPreSaveExistingNull() {
   /**
    * @covers ::preSave
    */
-  public function testPreSaveExistingEmptyString() {
+  public function testPreSaveExistingEmptyString(): void {
     $entity = EntityTest::create();
     $entity->test_field = $this->randomString();
     $entity->save();
@@ -149,7 +149,7 @@ public function testPreSaveExistingEmptyString() {
   /**
    * @covers ::preSave
    */
-  public function testPreSaveExistingMultipleSpacesString() {
+  public function testPreSaveExistingMultipleSpacesString(): void {
     $entity = EntityTest::create();
     $entity->test_field = $this->randomString();
     $entity->save();
@@ -164,7 +164,7 @@ public function testPreSaveExistingMultipleSpacesString() {
   /**
    * @covers ::preSave
    */
-  public function testPreSaveExceptionNew() {
+  public function testPreSaveExceptionNew(): void {
     $entity = EntityTest::create();
     $entity->test_field = str_repeat('a', PasswordInterface::PASSWORD_MAX_LENGTH + 1);
     $this->expectException(EntityStorageException::class);
@@ -175,7 +175,7 @@ public function testPreSaveExceptionNew() {
   /**
    * @covers ::preSave
    */
-  public function testPreSaveExceptionExisting() {
+  public function testPreSaveExceptionExisting(): void {
     $entity = EntityTest::create();
     $entity->test_field = 'will_be_hashed';
     $entity->save();
diff --git a/core/tests/Drupal/KernelTests/Core/Field/MapBaseFieldTest.php b/core/tests/Drupal/KernelTests/Core/Field/MapBaseFieldTest.php
index 01eefa6e2b77..fc3338dac815 100644
--- a/core/tests/Drupal/KernelTests/Core/Field/MapBaseFieldTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Field/MapBaseFieldTest.php
@@ -45,7 +45,7 @@ protected function setUp(): void {
   /**
    * Tests uninstalling map item base field.
    */
-  public function testUninstallMapItemBaseField() {
+  public function testUninstallMapItemBaseField(): void {
     $definitions['data_map'] = BaseFieldDefinition::create('map')
       ->setLabel(t('Data'))
       ->setRequired(TRUE);
diff --git a/core/tests/Drupal/KernelTests/Core/File/DirectoryTest.php b/core/tests/Drupal/KernelTests/Core/File/DirectoryTest.php
index d32a42343f42..8c6490d6e12b 100644
--- a/core/tests/Drupal/KernelTests/Core/File/DirectoryTest.php
+++ b/core/tests/Drupal/KernelTests/Core/File/DirectoryTest.php
@@ -21,7 +21,7 @@ class DirectoryTest extends FileTestBase {
   /**
    * Tests local directory handling functions.
    */
-  public function testFileCheckLocalDirectoryHandling() {
+  public function testFileCheckLocalDirectoryHandling(): void {
     $site_path = $this->container->getParameter('site.path');
     $directory = $site_path . '/files';
 
@@ -62,7 +62,7 @@ public function testFileCheckLocalDirectoryHandling() {
   /**
    * Tests directory handling functions.
    */
-  public function testFileCheckDirectoryHandling() {
+  public function testFileCheckDirectoryHandling(): void {
     // A directory to operate on.
     $default_scheme = 'public';
     $directory = $default_scheme . '://' . $this->randomMachineName() . '/' . $this->randomMachineName();
@@ -117,7 +117,7 @@ public function testFileCheckDirectoryHandling() {
   /**
    * Tests the file paths of newly created files.
    */
-  public function testFileCreateNewFilepath() {
+  public function testFileCreateNewFilepath(): void {
     // First we test against an imaginary file that does not exist in a
     // directory.
     $basename = 'xyz.txt';
@@ -152,7 +152,7 @@ public function testFileCreateNewFilepath() {
    * If the file doesn't currently exist, then it will simply return the
    * filepath.
    */
-  public function testFileDestination() {
+  public function testFileDestination(): void {
     // First test for non-existent file.
     $destination = 'core/misc/xyz.txt';
     /** @var \Drupal\Core\File\FileSystemInterface $file_system */
@@ -181,7 +181,7 @@ public function testFileDestination() {
   /**
    * Ensure that the getTempDirectory() method always returns a value.
    */
-  public function testFileDirectoryTemp() {
+  public function testFileDirectoryTemp(): void {
     $tmp_directory = \Drupal::service('file_system')->getTempDirectory();
     $this->assertNotEmpty($tmp_directory);
     $this->assertEquals($tmp_directory, FileSystem::getOsTemporaryDirectory());
@@ -190,7 +190,7 @@ public function testFileDirectoryTemp() {
   /**
    * Tests directory creation.
    */
-  public function testDirectoryCreation() {
+  public function testDirectoryCreation(): void {
     /** @var \Drupal\Core\File\FileSystemInterface $file_system */
     $file_system = $this->container->get('file_system');
 
@@ -206,7 +206,7 @@ public function testDirectoryCreation() {
    * Image style generation can result in many calls to create similar directory
    * paths. This test forks the process to create the same situation.
    */
-  public function testMultiplePrepareDirectory() {
+  public function testMultiplePrepareDirectory(): void {
     if (!function_exists('pcntl_fork')) {
       $this->markTestSkipped('Requires the pcntl_fork() function');
     }
diff --git a/core/tests/Drupal/KernelTests/Core/File/FileCopyTest.php b/core/tests/Drupal/KernelTests/Core/File/FileCopyTest.php
index 18fa19a9fffb..a7bf5b9dd70d 100644
--- a/core/tests/Drupal/KernelTests/Core/File/FileCopyTest.php
+++ b/core/tests/Drupal/KernelTests/Core/File/FileCopyTest.php
@@ -20,7 +20,7 @@ class FileCopyTest extends FileTestBase {
   /**
    * Copy a normal file.
    */
-  public function testNormal() {
+  public function testNormal(): void {
     // Create a file for testing
     $uri = $this->createUri();
 
@@ -50,7 +50,7 @@ public function testNormal() {
   /**
    * Copy a non-existent file.
    */
-  public function testNonExistent() {
+  public function testNonExistent(): void {
     // Copy non-existent file
     $desired_filepath = $this->randomMachineName();
     $this->assertFileDoesNotExist($desired_filepath);
@@ -62,7 +62,7 @@ public function testNonExistent() {
   /**
    * Copy a file onto itself.
    */
-  public function testOverwriteSelf() {
+  public function testOverwriteSelf(): void {
     // Create a file for testing
     $uri = $this->createUri();
 
diff --git a/core/tests/Drupal/KernelTests/Core/File/FileDeleteRecursiveTest.php b/core/tests/Drupal/KernelTests/Core/File/FileDeleteRecursiveTest.php
index 78fed67a9067..03f01e30fa10 100644
--- a/core/tests/Drupal/KernelTests/Core/File/FileDeleteRecursiveTest.php
+++ b/core/tests/Drupal/KernelTests/Core/File/FileDeleteRecursiveTest.php
@@ -14,7 +14,7 @@ class FileDeleteRecursiveTest extends FileTestBase {
   /**
    * Delete a normal file.
    */
-  public function testSingleFile() {
+  public function testSingleFile(): void {
     // Create a file for testing
     $filepath = 'public://' . $this->randomMachineName();
     file_put_contents($filepath, '');
@@ -27,7 +27,7 @@ public function testSingleFile() {
   /**
    * Try deleting an empty directory.
    */
-  public function testEmptyDirectory() {
+  public function testEmptyDirectory(): void {
     // A directory to operate on.
     $directory = $this->createDirectory();
 
@@ -39,7 +39,7 @@ public function testEmptyDirectory() {
   /**
    * Try deleting a directory with some files.
    */
-  public function testDirectory() {
+  public function testDirectory(): void {
     // A directory to operate on.
     $directory = $this->createDirectory();
     $filepathA = $directory . '/A';
@@ -57,7 +57,7 @@ public function testDirectory() {
   /**
    * Try deleting subdirectories with some files.
    */
-  public function testSubDirectory() {
+  public function testSubDirectory(): void {
     // A directory to operate on.
     $directory = $this->createDirectory();
     $subdirectory = $this->createDirectory($directory . '/sub');
diff --git a/core/tests/Drupal/KernelTests/Core/File/FileDeleteTest.php b/core/tests/Drupal/KernelTests/Core/File/FileDeleteTest.php
index b6eb9042c5e7..1b6cbd1df171 100644
--- a/core/tests/Drupal/KernelTests/Core/File/FileDeleteTest.php
+++ b/core/tests/Drupal/KernelTests/Core/File/FileDeleteTest.php
@@ -16,7 +16,7 @@ class FileDeleteTest extends FileTestBase {
   /**
    * Delete a normal file.
    */
-  public function testNormal() {
+  public function testNormal(): void {
     // Create a file for testing
     $uri = $this->createUri();
 
@@ -28,7 +28,7 @@ public function testNormal() {
   /**
    * Try deleting a missing file.
    */
-  public function testMissing() {
+  public function testMissing(): void {
     // Try to delete a non-existing file
     $this->assertTrue(\Drupal::service('file_system')->delete('public://' . $this->randomMachineName()), 'Returns true when deleting a non-existent file.');
   }
@@ -36,7 +36,7 @@ public function testMissing() {
   /**
    * Try deleting a directory.
    */
-  public function testDirectory() {
+  public function testDirectory(): void {
     // A directory to operate on.
     $directory = $this->createDirectory();
 
diff --git a/core/tests/Drupal/KernelTests/Core/File/FileMoveTest.php b/core/tests/Drupal/KernelTests/Core/File/FileMoveTest.php
index b4462006457f..bc0d80731536 100644
--- a/core/tests/Drupal/KernelTests/Core/File/FileMoveTest.php
+++ b/core/tests/Drupal/KernelTests/Core/File/FileMoveTest.php
@@ -20,7 +20,7 @@ class FileMoveTest extends FileTestBase {
   /**
    * Move a normal file.
    */
-  public function testNormal() {
+  public function testNormal(): void {
     // Create a file for testing
     $uri = $this->createUri();
 
@@ -53,7 +53,7 @@ public function testNormal() {
   /**
    * Try to move a missing file.
    */
-  public function testMissing() {
+  public function testMissing(): void {
     // Move non-existent file.
     $this->expectException(FileNotExistsException::class);
     \Drupal::service('file_system')->move($this->randomMachineName(), $this->randomMachineName());
@@ -62,7 +62,7 @@ public function testMissing() {
   /**
    * Try to move a file onto itself.
    */
-  public function testOverwriteSelf() {
+  public function testOverwriteSelf(): void {
     // Create a file for testing.
     $uri = $this->createUri();
 
diff --git a/core/tests/Drupal/KernelTests/Core/File/FileSaveDataTest.php b/core/tests/Drupal/KernelTests/Core/File/FileSaveDataTest.php
index ae0a7a64fdd2..67f95b43cbd6 100644
--- a/core/tests/Drupal/KernelTests/Core/File/FileSaveDataTest.php
+++ b/core/tests/Drupal/KernelTests/Core/File/FileSaveDataTest.php
@@ -16,7 +16,7 @@ class FileSaveDataTest extends FileTestBase {
   /**
    * Tests the file_unmanaged_save_data() function.
    */
-  public function testFileSaveData() {
+  public function testFileSaveData(): void {
     $contents = $this->randomMachineName(8);
     $this->setSetting('file_chmod_file', 0777);
 
diff --git a/core/tests/Drupal/KernelTests/Core/File/FileSystemRequirementsTest.php b/core/tests/Drupal/KernelTests/Core/File/FileSystemRequirementsTest.php
index fd3d206c687a..20679366393b 100644
--- a/core/tests/Drupal/KernelTests/Core/File/FileSystemRequirementsTest.php
+++ b/core/tests/Drupal/KernelTests/Core/File/FileSystemRequirementsTest.php
@@ -34,7 +34,7 @@ protected function setUp(): void {
   /**
    * Tests if settings are set, there are not warnings.
    */
-  public function testSettingsExist() {
+  public function testSettingsExist(): void {
     $this->setSetting('file_temp_path', $this->randomMachineName());
     $requirements = $this->checkSystemRequirements();
     $this->assertArrayNotHasKey('temp_directory', $requirements);
diff --git a/core/tests/Drupal/KernelTests/Core/File/FileSystemTempDirectoryTest.php b/core/tests/Drupal/KernelTests/Core/File/FileSystemTempDirectoryTest.php
index 41c54c3080f3..c66d1238826e 100644
--- a/core/tests/Drupal/KernelTests/Core/File/FileSystemTempDirectoryTest.php
+++ b/core/tests/Drupal/KernelTests/Core/File/FileSystemTempDirectoryTest.php
@@ -45,7 +45,7 @@ protected function setUp(): void {
    *
    * @covers ::getTempDirectory
    */
-  public function testGetTempDirectorySettings() {
+  public function testGetTempDirectorySettings(): void {
     $tempDir = '/var/tmp/' . $this->randomMachineName();
     $this->setSetting('file_temp_path', $tempDir);
     $this->assertEquals($tempDir, $this->fileSystem->getTempDirectory());
@@ -56,7 +56,7 @@ public function testGetTempDirectorySettings() {
    *
    * @covers ::getTempDirectory
    */
-  public function testGetTempDirectoryOsDefault() {
+  public function testGetTempDirectoryOsDefault(): void {
     $tempDir = FileSystemComponent::getOsTemporaryDirectory();
     $dir = $this->fileSystem->getTempDirectory();
     $this->assertEquals($tempDir, $dir);
diff --git a/core/tests/Drupal/KernelTests/Core/File/FileSystemTest.php b/core/tests/Drupal/KernelTests/Core/File/FileSystemTest.php
index 3231dd4bc5eb..c68e69ca89ae 100644
--- a/core/tests/Drupal/KernelTests/Core/File/FileSystemTest.php
+++ b/core/tests/Drupal/KernelTests/Core/File/FileSystemTest.php
@@ -40,7 +40,7 @@ protected function setUp(): void {
   /**
    * @covers ::copy
    */
-  public function testEnsureFileExistsBeforeCopy() {
+  public function testEnsureFileExistsBeforeCopy(): void {
     // We need to compute the exception message here because it will include
     // the 'real' path to the file, which varies with $this->siteDirectory.
     $this->expectException(FileNotExistsException::class);
@@ -52,7 +52,7 @@ public function testEnsureFileExistsBeforeCopy() {
   /**
    * @covers ::copy
    */
-  public function testDestinationDirectoryFailureOnCopy() {
+  public function testDestinationDirectoryFailureOnCopy(): void {
     $this->expectException(DirectoryNotReadyException::class);
     $this->expectExceptionMessage("The specified file 'public://test.txt' could not be copied because the destination directory 'public://subdirectory' is not properly configured. This may be caused by a problem with file or directory permissions.");
     touch('public://test.txt');
@@ -64,7 +64,7 @@ public function testDestinationDirectoryFailureOnCopy() {
   /**
    * @covers ::copy
    */
-  public function testCopyFailureIfFileAlreadyExists() {
+  public function testCopyFailureIfFileAlreadyExists(): void {
     $this->expectException(FileExistsException::class);
     $this->expectExceptionMessage("File 'public://test.txt' could not be copied because a file by that name already exists in the destination directory ('')");
     $uri = 'public://test.txt';
@@ -75,7 +75,7 @@ public function testCopyFailureIfFileAlreadyExists() {
   /**
    * @covers ::copy
    */
-  public function testCopyFailureIfSelfOverwrite() {
+  public function testCopyFailureIfSelfOverwrite(): void {
     $this->expectException(FileException::class);
     $this->expectExceptionMessage("'public://test.txt' could not be copied because it would overwrite itself");
     $uri = 'public://test.txt';
@@ -86,7 +86,7 @@ public function testCopyFailureIfSelfOverwrite() {
   /**
    * @covers ::copy
    */
-  public function testCopySelfRename() {
+  public function testCopySelfRename(): void {
     $uri = 'public://test.txt';
     touch($uri);
     $this->fileSystem->copy($uri, $uri);
@@ -96,7 +96,7 @@ public function testCopySelfRename() {
   /**
    * @covers ::copy
    */
-  public function testSuccessfulCopy() {
+  public function testSuccessfulCopy(): void {
     touch('public://test.txt');
     $this->fileSystem->copy('public://test.txt', 'public://test-copy.txt');
     $this->assertFileExists('public://test-copy.txt');
diff --git a/core/tests/Drupal/KernelTests/Core/File/FileUrlGeneratorTest.php b/core/tests/Drupal/KernelTests/Core/File/FileUrlGeneratorTest.php
index 743bed3ee8b7..a505e245412c 100644
--- a/core/tests/Drupal/KernelTests/Core/File/FileUrlGeneratorTest.php
+++ b/core/tests/Drupal/KernelTests/Core/File/FileUrlGeneratorTest.php
@@ -41,7 +41,7 @@ protected function setUp(): void {
    *
    * @covers ::generate
    */
-  public function testGenerateMissingStreamWrapper() {
+  public function testGenerateMissingStreamWrapper(): void {
     $this->expectException(InvalidStreamWrapperException::class);
     $result = $this->fileUrlGenerator->generate("foo://bar");
   }
@@ -51,7 +51,7 @@ public function testGenerateMissingStreamWrapper() {
    *
    * @covers ::generateString
    */
-  public function testGenerateStringMissingStreamWrapper() {
+  public function testGenerateStringMissingStreamWrapper(): void {
     $this->expectException(InvalidStreamWrapperException::class);
     $result = $this->fileUrlGenerator->generateString("foo://bar");
   }
@@ -61,7 +61,7 @@ public function testGenerateStringMissingStreamWrapper() {
    *
    * @covers ::generateAbsoluteString
    */
-  public function testGenerateAbsoluteStringMissingStreamWrapper() {
+  public function testGenerateAbsoluteStringMissingStreamWrapper(): void {
     $this->expectException(InvalidStreamWrapperException::class);
     $result = $this->fileUrlGenerator->generateAbsoluteString("foo://bar");
   }
@@ -71,7 +71,7 @@ public function testGenerateAbsoluteStringMissingStreamWrapper() {
    *
    * @covers ::generateAbsoluteString
    */
-  public function testShippedFileURL() {
+  public function testShippedFileURL(): void {
     // Test generating a URL to a shipped file (i.e. a file that is part of
     // Drupal core, a module or a theme, for example a JavaScript file).
 
@@ -120,7 +120,7 @@ public function testShippedFileURL() {
    *
    * @covers ::generateAbsoluteString
    */
-  public function testPublicManagedFileURL() {
+  public function testPublicManagedFileURL(): void {
     // Test generating a URL to a managed file.
 
     // Test alteration of file URLs to use a CDN.
@@ -152,7 +152,7 @@ public function testPublicManagedFileURL() {
    *
    * @covers ::generateAbsoluteString
    */
-  public function testRelativeFileURL() {
+  public function testRelativeFileURL(): void {
     // Disable file_test.module's hook_file_url_alter() implementation.
     \Drupal::state()->set('file_test.hook_file_url_alter', NULL);
 
@@ -182,7 +182,7 @@ public function testRelativeFileURL() {
    *
    * @dataProvider providerGenerateURI
    */
-  public function testGenerateURI($filepath, $expected) {
+  public function testGenerateURI($filepath, $expected): void {
     // Disable file_test.module's hook_file_url_alter() implementation.
     \Drupal::state()->set('file_test.hook_file_url_alter', NULL);
 
@@ -200,7 +200,7 @@ public function testGenerateURI($filepath, $expected) {
   /**
    * @covers ::generate
    */
-  public function testGenerateURIWithSchema() {
+  public function testGenerateURIWithSchema(): void {
     // Disable file_test.module's hook_file_url_alter() implementation.
     \Drupal::state()->set('file_test.hook_file_url_alter', NULL);
 
diff --git a/core/tests/Drupal/KernelTests/Core/File/HtaccessTest.php b/core/tests/Drupal/KernelTests/Core/File/HtaccessTest.php
index c992e76510cb..dfe537e4d1fa 100644
--- a/core/tests/Drupal/KernelTests/Core/File/HtaccessTest.php
+++ b/core/tests/Drupal/KernelTests/Core/File/HtaccessTest.php
@@ -46,7 +46,7 @@ protected function setUp(): void {
   /**
    * @covers ::write
    */
-  public function testHtaccessSave() {
+  public function testHtaccessSave(): void {
     // Prepare test directories.
     $private = Settings::get('file_public_path') . '/test/private';
     $stream = 'public://test/stream';
diff --git a/core/tests/Drupal/KernelTests/Core/File/MimeTypeTest.php b/core/tests/Drupal/KernelTests/Core/File/MimeTypeTest.php
index 2050989c84da..833e3765a655 100644
--- a/core/tests/Drupal/KernelTests/Core/File/MimeTypeTest.php
+++ b/core/tests/Drupal/KernelTests/Core/File/MimeTypeTest.php
@@ -21,7 +21,7 @@ class MimeTypeTest extends FileTestBase {
   /**
    * Tests mapping of mimetypes from filenames.
    */
-  public function testFileMimeTypeDetection() {
+  public function testFileMimeTypeDetection(): void {
     $prefixes = ['public://', 'private://', 'temporary://', 'dummy-remote://'];
 
     $test_case = [
diff --git a/core/tests/Drupal/KernelTests/Core/File/ReadOnlyStreamWrapperTest.php b/core/tests/Drupal/KernelTests/Core/File/ReadOnlyStreamWrapperTest.php
index 54305629dbb4..3752b3969947 100644
--- a/core/tests/Drupal/KernelTests/Core/File/ReadOnlyStreamWrapperTest.php
+++ b/core/tests/Drupal/KernelTests/Core/File/ReadOnlyStreamWrapperTest.php
@@ -31,7 +31,7 @@ class ReadOnlyStreamWrapperTest extends FileTestBase {
   /**
    * Tests read-only specific behavior.
    */
-  public function testReadOnlyBehavior() {
+  public function testReadOnlyBehavior(): void {
     $type = DummyReadOnlyStreamWrapper::getType();
     // Checks that the stream wrapper type is not declared as writable.
     $this->assertSame(0, $type & StreamWrapperInterface::WRITE);
diff --git a/core/tests/Drupal/KernelTests/Core/File/ScanDirectoryTest.php b/core/tests/Drupal/KernelTests/Core/File/ScanDirectoryTest.php
index c527b625a6ea..9bbf22f07df0 100644
--- a/core/tests/Drupal/KernelTests/Core/File/ScanDirectoryTest.php
+++ b/core/tests/Drupal/KernelTests/Core/File/ScanDirectoryTest.php
@@ -50,7 +50,7 @@ protected function setUp(): void {
    *
    * @covers ::scanDirectory
    */
-  public function testReturn() {
+  public function testReturn(): void {
     // Grab a listing of all the JavaScript files and check that they're
     // passed to the callback.
     $all_files = $this->fileSystem->scanDirectory($this->path, '/^javascript-/');
@@ -77,7 +77,7 @@ public function testReturn() {
    *
    * @covers ::scanDirectory
    */
-  public function testOptionCallback() {
+  public function testOptionCallback(): void {
 
     // When nothing is matched nothing should be passed to the callback.
     $all_files = $this->fileSystem->scanDirectory($this->path, '/^NON-EXISTING-FILENAME/', ['callback' => 'file_test_file_scan_callback']);
@@ -100,7 +100,7 @@ public function testOptionCallback() {
    *
    * @covers ::scanDirectory
    */
-  public function testOptionNoMask() {
+  public function testOptionNoMask(): void {
     // Grab a listing of all the JavaScript files.
     $all_files = $this->fileSystem->scanDirectory($this->path, '/^javascript-/');
     $this->assertCount(2, $all_files, 'Found two, expected javascript files.');
@@ -115,7 +115,7 @@ public function testOptionNoMask() {
    *
    * @covers ::scanDirectory
    */
-  public function testOptionKey() {
+  public function testOptionKey(): void {
     // "filename", for the path starting with $dir.
     $expected = [$this->path . '/javascript-1.txt', $this->path . '/javascript-2.script'];
     $actual = array_keys($this->fileSystem->scanDirectory($this->path, '/^javascript-/', ['key' => 'filepath']));
@@ -146,7 +146,7 @@ public function testOptionKey() {
    *
    * @covers ::scanDirectory
    */
-  public function testOptionRecurse() {
+  public function testOptionRecurse(): void {
     $files = $this->fileSystem->scanDirectory($this->path . '/..', '/^javascript-/', ['recurse' => FALSE]);
     $this->assertEmpty($files, "Without recursion couldn't find javascript files.");
 
@@ -159,7 +159,7 @@ public function testOptionRecurse() {
    *
    * @covers ::scanDirectory
    */
-  public function testOptionMinDepth() {
+  public function testOptionMinDepth(): void {
     $files = $this->fileSystem->scanDirectory($this->path, '/^javascript-/', ['min_depth' => 0]);
     $this->assertCount(2, $files, 'No minimum-depth gets files in current directory.');
 
@@ -172,7 +172,7 @@ public function testOptionMinDepth() {
    *
    * @covers ::scanDirectory
    */
-  public function testIgnoreDirectories() {
+  public function testIgnoreDirectories(): void {
     $files = $this->fileSystem->scanDirectory('core/modules/system/tests/fixtures/IgnoreDirectories', '/\.txt$/');
     $this->assertCount(2, $files, '2 text files found when not ignoring directories.');
 
diff --git a/core/tests/Drupal/KernelTests/Core/File/StreamWrapperTest.php b/core/tests/Drupal/KernelTests/Core/File/StreamWrapperTest.php
index 9468ba7f30dc..59e95b7dde6b 100644
--- a/core/tests/Drupal/KernelTests/Core/File/StreamWrapperTest.php
+++ b/core/tests/Drupal/KernelTests/Core/File/StreamWrapperTest.php
@@ -54,7 +54,7 @@ protected function setUp(): void {
   /**
    * Tests the getClassName() function.
    */
-  public function testGetClassName() {
+  public function testGetClassName(): void {
     // Check the dummy scheme.
     $this->assertEquals($this->classname, \Drupal::service('stream_wrapper_manager')->getClass($this->scheme), 'Got correct class name for dummy scheme.');
     // Check core's scheme.
@@ -64,7 +64,7 @@ public function testGetClassName() {
   /**
    * Tests the getViaScheme() method.
    */
-  public function testGetInstanceByScheme() {
+  public function testGetInstanceByScheme(): void {
     $instance = \Drupal::service('stream_wrapper_manager')->getViaScheme($this->scheme);
     $this->assertEquals($this->classname, get_class($instance), 'Got correct class type for dummy scheme.');
 
@@ -75,7 +75,7 @@ public function testGetInstanceByScheme() {
   /**
    * Tests the getViaUri() and getViaScheme() methods and target functions.
    */
-  public function testUriFunctions() {
+  public function testUriFunctions(): void {
     $config = $this->config('system.file');
 
     /** @var \Drupal\Core\StreamWrapper\StreamWrapperManagerInterface $stream_wrapper_manager */
@@ -113,7 +113,7 @@ public function testUriFunctions() {
   /**
    * Tests some file handle functions.
    */
-  public function testFileFunctions() {
+  public function testFileFunctions(): void {
     $filename = 'public://' . $this->randomMachineName();
     file_put_contents($filename, str_repeat('d', 1000));
 
@@ -145,7 +145,7 @@ public function testFileFunctions() {
   /**
    * Tests the scheme functions.
    */
-  public function testGetValidStreamScheme() {
+  public function testGetValidStreamScheme(): void {
 
     /** @var \Drupal\Core\StreamWrapper\StreamWrapperManagerInterface $stream_wrapper_manager */
     $stream_wrapper_manager = \Drupal::service('stream_wrapper_manager');
diff --git a/core/tests/Drupal/KernelTests/Core/File/UrlTransformRelativeTest.php b/core/tests/Drupal/KernelTests/Core/File/UrlTransformRelativeTest.php
index 14b1a74d73b6..063917d5b590 100644
--- a/core/tests/Drupal/KernelTests/Core/File/UrlTransformRelativeTest.php
+++ b/core/tests/Drupal/KernelTests/Core/File/UrlTransformRelativeTest.php
@@ -23,7 +23,7 @@ class UrlTransformRelativeTest extends KernelTestBase {
    *
    * @dataProvider providerFileUrlTransformRelative
    */
-  public function testFileUrlTransformRelative($host, $port, $https, $base_path, $root_relative, $url, $expected) {
+  public function testFileUrlTransformRelative($host, $port, $https, $base_path, $root_relative, $url, $expected): void {
 
     $_SERVER['REMOTE_ADDR'] = '127.0.0.1';
     $_SERVER['SERVER_ADDR'] = '127.0.0.1';
diff --git a/core/tests/Drupal/KernelTests/Core/Form/ExternalFormUrlTest.php b/core/tests/Drupal/KernelTests/Core/Form/ExternalFormUrlTest.php
index 930f0d7f869c..5a193154a844 100644
--- a/core/tests/Drupal/KernelTests/Core/Form/ExternalFormUrlTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Form/ExternalFormUrlTest.php
@@ -70,7 +70,7 @@ protected function setUp(): void {
   /**
    * Tests form behavior.
    */
-  public function testActionUrlBehavior() {
+  public function testActionUrlBehavior(): void {
     // Create a new request which has a request uri with multiple leading
     // slashes and make it the master request.
     $request_stack = \Drupal::service('request_stack');
diff --git a/core/tests/Drupal/KernelTests/Core/Form/FormActionXssTest.php b/core/tests/Drupal/KernelTests/Core/Form/FormActionXssTest.php
index 2ff12479f5b5..8fb9a3659aae 100644
--- a/core/tests/Drupal/KernelTests/Core/Form/FormActionXssTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Form/FormActionXssTest.php
@@ -72,7 +72,7 @@ protected function setUp(): void {
   /**
    * Tests form action attribute for XSS.
    */
-  public function testFormActionXss() {
+  public function testFormActionXss(): void {
     // Create a new request with a uri which attempts XSS.
     $request_stack = \Drupal::service('request_stack');
     /** @var \Symfony\Component\HttpFoundation\RequestStack $original_request */
diff --git a/core/tests/Drupal/KernelTests/Core/Form/FormCacheTest.php b/core/tests/Drupal/KernelTests/Core/Form/FormCacheTest.php
index b8f265166bf6..5c8e576471ee 100644
--- a/core/tests/Drupal/KernelTests/Core/Form/FormCacheTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Form/FormCacheTest.php
@@ -59,7 +59,7 @@ protected function setUp(): void {
   /**
    * Tests the form cache with a logged-in user.
    */
-  public function testCacheToken() {
+  public function testCacheToken(): void {
     \Drupal::currentUser()->setAccount(new UserSession(['uid' => 1]));
     \Drupal::formBuilder()->setCache($this->formBuildId, $this->form, $this->formState);
 
@@ -90,7 +90,7 @@ public function testCacheToken() {
   /**
    * Tests the form cache without a logged-in user.
    */
-  public function testNoCacheToken() {
+  public function testNoCacheToken(): void {
     // Switch to an anonymous user account.
     $account_switcher = \Drupal::service('account_switcher');
     $account_switcher->switchTo(new AnonymousUserSession());
@@ -111,7 +111,7 @@ public function testNoCacheToken() {
   /**
    * Tests the form cache with an overridden cache expiration.
    */
-  public function testCacheCustomExpiration() {
+  public function testCacheCustomExpiration(): void {
     // Override form cache expiration so that the cached form expired yesterday.
     new Settings(['form_cache_expiration' => -1 * (24 * 60 * 60), 'hash_salt' => $this->randomMachineName()]);
     \Drupal::formBuilder()->setCache($this->formBuildId, $this->form, $this->formState);
diff --git a/core/tests/Drupal/KernelTests/Core/Form/FormDefaultHandlersTest.php b/core/tests/Drupal/KernelTests/Core/Form/FormDefaultHandlersTest.php
index 0e53bcc7106d..b092803e22e1 100644
--- a/core/tests/Drupal/KernelTests/Core/Form/FormDefaultHandlersTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Form/FormDefaultHandlersTest.php
@@ -72,7 +72,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) {
   /**
    * Tests that default handlers are added even if custom are specified.
    */
-  public function testDefaultAndCustomHandlers() {
+  public function testDefaultAndCustomHandlers(): void {
     $form_state = new FormState();
     $form_builder = $this->container->get('form_builder');
     $form_builder->submitForm($this, $form_state);
diff --git a/core/tests/Drupal/KernelTests/Core/Form/FormValidationMessageOrderTest.php b/core/tests/Drupal/KernelTests/Core/Form/FormValidationMessageOrderTest.php
index 7476643b913b..c9b3a582d06d 100644
--- a/core/tests/Drupal/KernelTests/Core/Form/FormValidationMessageOrderTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Form/FormValidationMessageOrderTest.php
@@ -77,7 +77,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) {
   /**
    * Tests that fields validation messages are sorted in the fields order.
    */
-  public function testValidationErrorMessagesSortedWithWeight() {
+  public function testValidationErrorMessagesSortedWithWeight(): void {
     $form_state = new FormState();
     $form_builder = $this->container->get('form_builder');
     $form_builder->submitForm($this, $form_state);
diff --git a/core/tests/Drupal/KernelTests/Core/Form/TriggeringElementProgrammedTest.php b/core/tests/Drupal/KernelTests/Core/Form/TriggeringElementProgrammedTest.php
index f6a2a87af14c..dd145c87804b 100644
--- a/core/tests/Drupal/KernelTests/Core/Form/TriggeringElementProgrammedTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Form/TriggeringElementProgrammedTest.php
@@ -68,7 +68,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) {
   /**
    * Tests that #limit_validation_errors of the only submit button takes effect.
    */
-  public function testLimitValidationErrors() {
+  public function testLimitValidationErrors(): void {
     // Programmatically submit the form.
     $form_state = new FormState();
     $form_state->setValue('section', 'one');
diff --git a/core/tests/Drupal/KernelTests/Core/Http/LinkRelationsTest.php b/core/tests/Drupal/KernelTests/Core/Http/LinkRelationsTest.php
index 0f70b66aadde..a8401e7a8c42 100644
--- a/core/tests/Drupal/KernelTests/Core/Http/LinkRelationsTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Http/LinkRelationsTest.php
@@ -17,7 +17,7 @@ class LinkRelationsTest extends KernelTestBase {
   /**
    * Tests correct Link Relations are returned from the Link Relation Type Manager.
    */
-  public function testAvailableLinkRelationships() {
+  public function testAvailableLinkRelationships(): void {
     /** @var \Drupal\Core\Http\LinkRelationTypeManager $link_relation_type_manager */
     $link_relation_type_manager = $this->container->get('plugin.manager.link_relation_type');
 
diff --git a/core/tests/Drupal/KernelTests/Core/HttpKernel/StackKernelIntegrationTest.php b/core/tests/Drupal/KernelTests/Core/HttpKernel/StackKernelIntegrationTest.php
index 52a2ac9eb5df..94489e21cdf1 100644
--- a/core/tests/Drupal/KernelTests/Core/HttpKernel/StackKernelIntegrationTest.php
+++ b/core/tests/Drupal/KernelTests/Core/HttpKernel/StackKernelIntegrationTest.php
@@ -26,7 +26,7 @@ class StackKernelIntegrationTest extends KernelTestBase {
   /**
    * Tests a request.
    */
-  public function testRequest() {
+  public function testRequest(): void {
     $request = Request::create((new Url('http_kernel_test.empty'))->toString());
     /** @var \Symfony\Component\HttpKernel\HttpKernelInterface $http_kernel */
     $http_kernel = \Drupal::service('http_kernel');
@@ -39,7 +39,7 @@ public function testRequest() {
   /**
    * Tests that late middlewares are automatically flagged lazy.
    */
-  public function testLazyLateMiddlewares() {
+  public function testLazyLateMiddlewares(): void {
     $this->assertFalse($this->container->getDefinition('http_middleware.reverse_proxy')->isLazy(), 'lazy flag on http_middleware.reverse_proxy definition is not set');
     $this->assertFalse($this->container->getDefinition('http_middleware.kernel_pre_handle')->isLazy(), 'lazy flag on http_middleware.kernel_pre_handle definition is not set');
     $this->assertFalse($this->container->getDefinition('http_middleware.session')->isLazy(), 'lazy flag on http_middleware.session definition is not set');
diff --git a/core/tests/Drupal/KernelTests/Core/Image/ToolkitTest.php b/core/tests/Drupal/KernelTests/Core/Image/ToolkitTest.php
index d46a5665c23c..3e417576d6d3 100644
--- a/core/tests/Drupal/KernelTests/Core/Image/ToolkitTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Image/ToolkitTest.php
@@ -53,7 +53,7 @@ protected function setUp(): void {
   /**
    * Tests that the toolkit manager only returns available toolkits.
    */
-  public function testGetAvailableToolkits() {
+  public function testGetAvailableToolkits(): void {
     $manager = $this->container->get('image.toolkit.manager');
     $toolkits = $manager->getAvailableToolkits();
 
@@ -66,7 +66,7 @@ public function testGetAvailableToolkits() {
   /**
    * Tests Image's methods.
    */
-  public function testLoad() {
+  public function testLoad(): void {
     $image = $this->getImage();
     $this->assertInstanceOf(ImageInterface::class, $image);
     $this->assertEquals('test', $image->getToolkitId());
@@ -76,7 +76,7 @@ public function testLoad() {
   /**
    * Tests the Image::save() function.
    */
-  public function testSave() {
+  public function testSave(): void {
     $this->assertFalse($this->image->save());
     $this->assertToolkitOperationsCalled(['save']);
   }
@@ -84,7 +84,7 @@ public function testSave() {
   /**
    * Tests the 'apply' method.
    */
-  public function testApply() {
+  public function testApply(): void {
     $data = ['p1' => 1, 'p2' => TRUE, 'p3' => 'text'];
 
     // The operation plugin itself does not exist, so apply will return false.
@@ -102,7 +102,7 @@ public function testApply() {
   /**
    * Tests the 'apply' method without parameters.
    */
-  public function testApplyNoParameters() {
+  public function testApplyNoParameters(): void {
     // The operation plugin itself does not exist, so apply will return false.
     $this->assertFalse($this->image->apply('my_operation'));
 
@@ -116,7 +116,7 @@ public function testApplyNoParameters() {
   /**
    * Tests image toolkit operations inheritance by derivative toolkits.
    */
-  public function testDerivative() {
+  public function testDerivative(): void {
     $toolkit_manager = $this->container->get('image.toolkit.manager');
     $operation_manager = $this->container->get('image.toolkit.operation.manager');
 
diff --git a/core/tests/Drupal/KernelTests/Core/Installer/InstallerLanguageTest.php b/core/tests/Drupal/KernelTests/Core/Installer/InstallerLanguageTest.php
index 6393c754b860..abe6af085712 100644
--- a/core/tests/Drupal/KernelTests/Core/Installer/InstallerLanguageTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Installer/InstallerLanguageTest.php
@@ -18,7 +18,7 @@ class InstallerLanguageTest extends KernelTestBase {
   /**
    * Tests that the installer can find translation files.
    */
-  public function testInstallerTranslationFiles() {
+  public function testInstallerTranslationFiles(): void {
     // Different translation files would be found depending on which language
     // we are looking for.
     $expected_translation_files = [
@@ -44,7 +44,7 @@ public function testInstallerTranslationFiles() {
   /**
    * Tests profile info caching in non-English languages.
    */
-  public function testInstallerTranslationCache() {
+  public function testInstallerTranslationCache(): void {
     require_once 'core/includes/install.inc';
 
     // Prime the \Drupal\Core\Extension\ExtensionList::getPathname() static
diff --git a/core/tests/Drupal/KernelTests/Core/Installer/InstallerRedirectTraitTest.php b/core/tests/Drupal/KernelTests/Core/Installer/InstallerRedirectTraitTest.php
index a5bcb00f05f4..2f71293003a8 100644
--- a/core/tests/Drupal/KernelTests/Core/Installer/InstallerRedirectTraitTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Installer/InstallerRedirectTraitTest.php
@@ -69,7 +69,7 @@ public static function providerShouldRedirectToInstaller() {
    * @covers ::shouldRedirectToInstaller
    * @dataProvider providerShouldRedirectToInstaller
    */
-  public function testShouldRedirectToInstaller($expected, $exception, $connection, $connection_info, $sequences_table_exists = TRUE) {
+  public function testShouldRedirectToInstaller($expected, $exception, $connection, $connection_info, $sequences_table_exists = TRUE): void {
     try {
       throw new $exception();
     }
diff --git a/core/tests/Drupal/KernelTests/Core/KeyValueStore/DatabaseStorageExpirableTest.php b/core/tests/Drupal/KernelTests/Core/KeyValueStore/DatabaseStorageExpirableTest.php
index 28752925be38..529dd3f0ce77 100644
--- a/core/tests/Drupal/KernelTests/Core/KeyValueStore/DatabaseStorageExpirableTest.php
+++ b/core/tests/Drupal/KernelTests/Core/KeyValueStore/DatabaseStorageExpirableTest.php
@@ -42,7 +42,7 @@ public function register(ContainerBuilder $container) {
   /**
    * Tests CRUD functionality with expiration.
    */
-  public function testCRUDWithExpiration() {
+  public function testCRUDWithExpiration(): void {
     $stores = $this->createStorage();
 
     // Verify that an item can be stored with setWithExpire().
@@ -121,7 +121,7 @@ public function testCRUDWithExpiration() {
   /**
    * Tests data expiration.
    */
-  public function testExpiration() {
+  public function testExpiration(): void {
     $stores = $this->createStorage();
     $day = 604800;
 
diff --git a/core/tests/Drupal/KernelTests/Core/KeyValueStore/DatabaseStorageTest.php b/core/tests/Drupal/KernelTests/Core/KeyValueStore/DatabaseStorageTest.php
index 06b8fdd8e274..c187deed612c 100644
--- a/core/tests/Drupal/KernelTests/Core/KeyValueStore/DatabaseStorageTest.php
+++ b/core/tests/Drupal/KernelTests/Core/KeyValueStore/DatabaseStorageTest.php
@@ -37,7 +37,7 @@ public function register(ContainerBuilder $container) {
   /**
    * Tests asynchronous table creation.
    */
-  public function testConcurrent() {
+  public function testConcurrent(): void {
     $this->markTestSkipped("Skipped due to frequent random test failures. See https://www.drupal.org/project/drupal/issues/3398063");
     if (!function_exists('pcntl_fork')) {
       $this->markTestSkipped('Requires the pcntl_fork() function');
diff --git a/core/tests/Drupal/KernelTests/Core/KeyValueStore/GarbageCollectionTest.php b/core/tests/Drupal/KernelTests/Core/KeyValueStore/GarbageCollectionTest.php
index cc91e7e8d16e..8da527a58f72 100644
--- a/core/tests/Drupal/KernelTests/Core/KeyValueStore/GarbageCollectionTest.php
+++ b/core/tests/Drupal/KernelTests/Core/KeyValueStore/GarbageCollectionTest.php
@@ -26,7 +26,7 @@ class GarbageCollectionTest extends KernelTestBase {
   /**
    * Tests garbage collection.
    */
-  public function testGarbageCollection() {
+  public function testGarbageCollection(): void {
     $collection = $this->randomMachineName();
     $connection = Database::getConnection();
     $store = new DatabaseStorageExpirable($collection, new PhpSerialize(), $connection, \Drupal::time());
diff --git a/core/tests/Drupal/KernelTests/Core/KeyValueStore/KeyValueContentEntityStorageTest.php b/core/tests/Drupal/KernelTests/Core/KeyValueStore/KeyValueContentEntityStorageTest.php
index 3edc1d2fc973..1ca7fcbd2ded 100644
--- a/core/tests/Drupal/KernelTests/Core/KeyValueStore/KeyValueContentEntityStorageTest.php
+++ b/core/tests/Drupal/KernelTests/Core/KeyValueStore/KeyValueContentEntityStorageTest.php
@@ -36,7 +36,7 @@ protected function setUp(): void {
    *
    * @covers \Drupal\Core\Entity\KeyValueStore\KeyValueEntityStorage::hasData
    */
-  public function testCRUD() {
+  public function testCRUD(): void {
     $default_langcode = \Drupal::languageManager()->getDefaultLanguage()->getId();
 
     $storage = \Drupal::entityTypeManager()->getStorage('entity_test_label');
@@ -170,7 +170,7 @@ public function testCRUD() {
   /**
    * Tests uninstallation of a module that does not use the SQL entity storage.
    */
-  public function testUninstall() {
+  public function testUninstall(): void {
     $uninstall_validator_reasons = \Drupal::service('content_uninstall_validator')->validate('keyvalue_test');
     $this->assertEmpty($uninstall_validator_reasons);
   }
diff --git a/core/tests/Drupal/KernelTests/Core/KeyValueStore/StorageTestBase.php b/core/tests/Drupal/KernelTests/Core/KeyValueStore/StorageTestBase.php
index c2c56ad2eb30..3f2d0ff2d857 100644
--- a/core/tests/Drupal/KernelTests/Core/KeyValueStore/StorageTestBase.php
+++ b/core/tests/Drupal/KernelTests/Core/KeyValueStore/StorageTestBase.php
@@ -50,7 +50,7 @@ protected function setUp(): void {
   /**
    * Tests CRUD operations.
    */
-  public function testCRUD() {
+  public function testCRUD(): void {
     $stores = $this->createStorage();
     // Verify that each store returns its own collection name.
     $this->assertSame($this->collections[0], $stores[0]->getCollectionName());
@@ -129,7 +129,7 @@ public function testCRUD() {
   /**
    * Tests expected behavior for non-existing keys.
    */
-  public function testNonExistingKeys() {
+  public function testNonExistingKeys(): void {
 
     $stores = $this->createStorage();
 
@@ -157,7 +157,7 @@ public function testNonExistingKeys() {
   /**
    * Tests the setIfNotExists() method.
    */
-  public function testSetIfNotExists() {
+  public function testSetIfNotExists(): void {
     $stores = $this->createStorage();
 
     $key = $this->randomMachineName();
@@ -183,7 +183,7 @@ public function testSetIfNotExists() {
   /**
    * Tests the rename operation.
    */
-  public function testRename() {
+  public function testRename(): void {
     $stores = $this->createStorage();
     $store = $stores[0];
 
@@ -197,7 +197,7 @@ public function testRename() {
   /**
    * Tests the rename operation.
    */
-  public function testRenameNoChange() {
+  public function testRenameNoChange(): void {
     $stores = $this->createStorage();
     $store = $stores[0];
 
diff --git a/core/tests/Drupal/KernelTests/Core/Layout/IconBuilderTest.php b/core/tests/Drupal/KernelTests/Core/Layout/IconBuilderTest.php
index aa3da7215dea..b76ca4df3c38 100644
--- a/core/tests/Drupal/KernelTests/Core/Layout/IconBuilderTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Layout/IconBuilderTest.php
@@ -23,7 +23,7 @@ class IconBuilderTest extends KernelTestBase {
    *
    * @dataProvider providerTestBuild
    */
-  public function testBuild(SvgIconBuilder $icon_builder, $icon_map, $expected) {
+  public function testBuild(SvgIconBuilder $icon_builder, $icon_map, $expected): void {
     $renderer = $this->container->get('renderer');
 
     $build = $icon_builder->build($icon_map);
diff --git a/core/tests/Drupal/KernelTests/Core/Lock/LockTest.php b/core/tests/Drupal/KernelTests/Core/Lock/LockTest.php
index 54232d02c583..7de324526b2c 100644
--- a/core/tests/Drupal/KernelTests/Core/Lock/LockTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Lock/LockTest.php
@@ -32,7 +32,7 @@ protected function setUp(): void {
   /**
    * Tests backend release functionality.
    */
-  public function testBackendLockRelease() {
+  public function testBackendLockRelease(): void {
     $success = $this->lock->acquire('lock_a');
     $this->assertTrue($success, 'Could acquire first lock.');
 
@@ -72,7 +72,7 @@ public function testBackendLockRelease() {
   /**
    * Tests backend release functionality.
    */
-  public function testBackendLockReleaseAll() {
+  public function testBackendLockReleaseAll(): void {
     $success = $this->lock->acquire('lock_a');
     $this->assertTrue($success, 'Could acquire first lock.');
 
diff --git a/core/tests/Drupal/KernelTests/Core/Menu/LocalActionManagerTest.php b/core/tests/Drupal/KernelTests/Core/Menu/LocalActionManagerTest.php
index e70b4dd0d561..3a509a612159 100644
--- a/core/tests/Drupal/KernelTests/Core/Menu/LocalActionManagerTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Menu/LocalActionManagerTest.php
@@ -22,7 +22,7 @@ class LocalActionManagerTest extends KernelTestBase {
   /**
    * Tests the cacheability of local actions.
    */
-  public function testCacheability() {
+  public function testCacheability(): void {
     /** @var \Drupal\Core\Menu\LocalActionManager $local_action_manager */
     $local_action_manager = \Drupal::service('plugin.manager.menu.local_action');
     $build = [
diff --git a/core/tests/Drupal/KernelTests/Core/Menu/MenuLinkDefaultIntegrationTest.php b/core/tests/Drupal/KernelTests/Core/Menu/MenuLinkDefaultIntegrationTest.php
index c5837f792e27..7c4f5f83b08a 100644
--- a/core/tests/Drupal/KernelTests/Core/Menu/MenuLinkDefaultIntegrationTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Menu/MenuLinkDefaultIntegrationTest.php
@@ -26,7 +26,7 @@ class MenuLinkDefaultIntegrationTest extends KernelTestBase {
   /**
    * Tests moving a static menu link without a specified menu to the root.
    */
-  public function testMoveToRoot() {
+  public function testMoveToRoot(): void {
     /** @var \Drupal\Core\Menu\MenuLinkManagerInterface $menu_link_manager */
     $menu_link_manager = \Drupal::service('plugin.manager.menu.link');
     $menu_link_manager->rebuild();
diff --git a/core/tests/Drupal/KernelTests/Core/Menu/MenuLinkTreeTest.php b/core/tests/Drupal/KernelTests/Core/Menu/MenuLinkTreeTest.php
index 1f790e6a067c..809f90c99fd5 100644
--- a/core/tests/Drupal/KernelTests/Core/Menu/MenuLinkTreeTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Menu/MenuLinkTreeTest.php
@@ -64,7 +64,7 @@ protected function setUp(): void {
   /**
    * Tests deleting all the links in a menu.
    */
-  public function testDeleteLinksInMenu() {
+  public function testDeleteLinksInMenu(): void {
     /** @var \Drupal\system\MenuStorage $storage */
     $storage = \Drupal::entityTypeManager()->getStorage('menu');
     $storage->create(['id' => 'menu1', 'label' => 'Menu 1'])->save();
@@ -91,7 +91,7 @@ public function testDeleteLinksInMenu() {
   /**
    * Tests creating links with an expected tree structure.
    */
-  public function testCreateLinksInMenu() {
+  public function testCreateLinksInMenu(): void {
     // This creates a tree with the following structure:
     // - 1
     // - 2
@@ -141,7 +141,7 @@ public function testCreateLinksInMenu() {
   /**
    * Tests user/login and user/logout links.
    */
-  public function testUserLoginAndUserLogoutLinks() {
+  public function testUserLoginAndUserLogoutLinks(): void {
     $account_switcher = $this->container->get('account_switcher');
 
     $login_menu_link = MenuLinkMock::create(['id' => 'user_login_example', 'route_name' => 'user.login']);
diff --git a/core/tests/Drupal/KernelTests/Core/Menu/MenuTreeStorageTest.php b/core/tests/Drupal/KernelTests/Core/Menu/MenuTreeStorageTest.php
index 558c61e8c1c6..eceb9c16fc6e 100644
--- a/core/tests/Drupal/KernelTests/Core/Menu/MenuTreeStorageTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Menu/MenuTreeStorageTest.php
@@ -47,7 +47,7 @@ protected function setUp(): void {
   /**
    * Tests the tree storage when no tree was built yet.
    */
-  public function testBasicMethods() {
+  public function testBasicMethods(): void {
     $this->doTestEmptyStorage();
     $this->doTestTable();
   }
@@ -74,7 +74,7 @@ protected function doTestTable() {
   /**
    * Tests with a simple linear hierarchy.
    */
-  public function testSimpleHierarchy() {
+  public function testSimpleHierarchy(): void {
     // Add some links with parent on the previous one and test some values.
     // <tools>
     // - test1
@@ -96,7 +96,7 @@ public function testSimpleHierarchy() {
   /**
    * Tests the tree with moving links inside the hierarchy.
    */
-  public function testMenuLinkMoving() {
+  public function testMenuLinkMoving(): void {
     // Before the move.
     // <tools>
     // - test1
@@ -174,7 +174,7 @@ public function testMenuLinkMoving() {
   /**
    * Tests with disabled child links.
    */
-  public function testMenuDisabledChildLinks() {
+  public function testMenuDisabledChildLinks(): void {
     // Add some links with parent on the previous one and test some values.
     // <tools>
     // - test1
@@ -229,7 +229,7 @@ public function testMenuDisabledChildLinks() {
   /**
    * Tests the loadTreeData method.
    */
-  public function testLoadTree() {
+  public function testLoadTree(): void {
     $this->addMenuLink('test1', '', 'test1');
     $this->addMenuLink('test2', 'test1', 'test2');
     $this->addMenuLink('test3', 'test2', 'test3');
@@ -299,7 +299,7 @@ public function testLoadTree() {
   /**
    * Tests finding the subtree height with content menu links.
    */
-  public function testSubtreeHeight() {
+  public function testSubtreeHeight(): void {
     // root
     // - child1
     // -- child2
@@ -321,7 +321,7 @@ public function testSubtreeHeight() {
   /**
    * Ensure hierarchy persists after a menu rebuild.
    */
-  public function testMenuRebuild() {
+  public function testMenuRebuild(): void {
     // root
     // - child1
     // -- child2
@@ -352,7 +352,7 @@ public function testMenuRebuild() {
   /**
    * Tests MenuTreeStorage::loadByProperties().
    */
-  public function testLoadByProperties() {
+  public function testLoadByProperties(): void {
     $tests = [
       ['foo' => 'bar'],
       [0 => 'wrong'],
diff --git a/core/tests/Drupal/KernelTests/Core/Messenger/MessengerTest.php b/core/tests/Drupal/KernelTests/Core/Messenger/MessengerTest.php
index 674217db6e56..73e95136cb17 100644
--- a/core/tests/Drupal/KernelTests/Core/Messenger/MessengerTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Messenger/MessengerTest.php
@@ -35,7 +35,7 @@ protected function setUp(): void {
    * @covers ::deleteByType
    * @covers ::messagesByType
    */
-  public function testRemoveSingleMessage() {
+  public function testRemoveSingleMessage(): void {
 
     // Set two messages.
     $this->messenger->addStatus('First message (removed).');
@@ -65,7 +65,7 @@ public function testRemoveSingleMessage() {
    * @covers ::deleteByType
    * @covers ::deleteAll
    */
-  public function testAddNoDuplicates() {
+  public function testAddNoDuplicates(): void {
 
     $this->messenger->addStatus('Non Duplicated status message');
     $this->messenger->addStatus('Non Duplicated status message');
@@ -106,7 +106,7 @@ public function testAddNoDuplicates() {
    * @covers ::addError
    * @covers ::deleteByType
    */
-  public function testAddWithDuplicates() {
+  public function testAddWithDuplicates(): void {
 
     $this->messenger->addStatus('Duplicated status message', TRUE);
     $this->messenger->addStatus('Duplicated status message', TRUE);
@@ -132,7 +132,7 @@ public function testAddWithDuplicates() {
    * @covers ::deleteByType
    * @covers ::messagesByType
    */
-  public function testAddMarkup() {
+  public function testAddMarkup(): void {
 
     // Add a Markup message.
     $this->messenger->addStatus(Markup::create('Markup with <em>markup!</em>'));
diff --git a/core/tests/Drupal/KernelTests/Core/Pager/PagerManagerTest.php b/core/tests/Drupal/KernelTests/Core/Pager/PagerManagerTest.php
index b79200a68cc0..7fa906db6cf5 100644
--- a/core/tests/Drupal/KernelTests/Core/Pager/PagerManagerTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Pager/PagerManagerTest.php
@@ -19,7 +19,7 @@ class PagerManagerTest extends KernelTestBase {
   /**
    * @covers ::getUpdatedParameters
    */
-  public function testGetUpdatedParameters() {
+  public function testGetUpdatedParameters(): void {
     $element = 2;
     $index = 5;
     $test_parameters = [
@@ -46,7 +46,7 @@ public function testGetUpdatedParameters() {
   /**
    * @covers ::findPage
    */
-  public function testFindPage() {
+  public function testFindPage(): void {
     $request = Request::create('http://example.com', 'GET', ['page' => '0,10']);
     $request->setSession(new Session(new MockArraySessionStorage()));
 
diff --git a/core/tests/Drupal/KernelTests/Core/Pager/RequestPagerTest.php b/core/tests/Drupal/KernelTests/Core/Pager/RequestPagerTest.php
index 9e4b22d972c9..89c2f0f09fd2 100644
--- a/core/tests/Drupal/KernelTests/Core/Pager/RequestPagerTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Pager/RequestPagerTest.php
@@ -19,7 +19,7 @@ class RequestPagerTest extends KernelTestBase {
   /**
    * @covers ::findPage
    */
-  public function testFindPage() {
+  public function testFindPage(): void {
     $request = Request::create('http://example.com', 'GET', ['page' => '0,10']);
     $request->setSession(new Session(new MockArraySessionStorage()));
 
@@ -35,7 +35,7 @@ public function testFindPage() {
   /**
    * @covers ::getQueryParameters
    */
-  public function testGetQueryParameters() {
+  public function testGetQueryParameters(): void {
     $test_parameters = [
       'other' => 'arbitrary',
     ];
diff --git a/core/tests/Drupal/KernelTests/Core/ParamConverter/EntityConverterLatestRevisionTest.php b/core/tests/Drupal/KernelTests/Core/ParamConverter/EntityConverterLatestRevisionTest.php
index 31ca6dd011cc..19178bf78491 100644
--- a/core/tests/Drupal/KernelTests/Core/ParamConverter/EntityConverterLatestRevisionTest.php
+++ b/core/tests/Drupal/KernelTests/Core/ParamConverter/EntityConverterLatestRevisionTest.php
@@ -59,7 +59,7 @@ protected function setUp(): void {
   /**
    * Tests with no matching entity.
    */
-  public function testNoEntity() {
+  public function testNoEntity(): void {
     $converted = $this->converter->convert(1, [
       'load_latest_revision' => TRUE,
       'type' => 'entity:entity_test_mulrev',
@@ -70,7 +70,7 @@ public function testNoEntity() {
   /**
    * Tests with no pending revision.
    */
-  public function testEntityNoPendingRevision() {
+  public function testEntityNoPendingRevision(): void {
     $entity = EntityTestMulRev::create();
     $entity->save();
 
@@ -84,7 +84,7 @@ public function testEntityNoPendingRevision() {
   /**
    * Tests with a pending revision.
    */
-  public function testEntityWithPendingRevision() {
+  public function testEntityWithPendingRevision(): void {
     $entity = EntityTestMulRev::create();
     $entity->save();
 
@@ -103,7 +103,7 @@ public function testEntityWithPendingRevision() {
   /**
    * Tests with a translated pending revision.
    */
-  public function testWithTranslatedPendingRevision() {
+  public function testWithTranslatedPendingRevision(): void {
     // Enable translation for test entities.
     $this->container->get('state')->set('entity_test.translation', TRUE);
     $this->container->get('entity_type.bundle.info')->clearCachedBundles();
@@ -151,7 +151,7 @@ public function testWithTranslatedPendingRevision() {
   /**
    * Tests that pending revisions are loaded only when needed.
    */
-  public function testOptimizedConvert() {
+  public function testOptimizedConvert(): void {
     $entity = EntityTestMulRev::create();
     $entity->save();
 
@@ -179,7 +179,7 @@ public function testOptimizedConvert() {
   /**
    * Tests the latest revision flag and non-revisionable entities.
    */
-  public function testConvertNonRevisionableEntityType() {
+  public function testConvertNonRevisionableEntityType(): void {
     $entity = EntityTest::create();
     $entity->save();
 
diff --git a/core/tests/Drupal/KernelTests/Core/Path/PathValidatorTest.php b/core/tests/Drupal/KernelTests/Core/Path/PathValidatorTest.php
index d909e7631a98..2ec71d9dd109 100644
--- a/core/tests/Drupal/KernelTests/Core/Path/PathValidatorTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Path/PathValidatorTest.php
@@ -35,7 +35,7 @@ protected function setUp(): void {
     $this->installEntitySchema('entity_test');
   }
 
-  public function testGetUrlIfValidWithoutAccessCheck() {
+  public function testGetUrlIfValidWithoutAccessCheck(): void {
     $requestContext = \Drupal::service('router.request_context');
     $pathValidator = \Drupal::service('path.validator');
 
diff --git a/core/tests/Drupal/KernelTests/Core/Path/UrlAlterTest.php b/core/tests/Drupal/KernelTests/Core/Path/UrlAlterTest.php
index a85d0d7693cc..4f36dd3f41ae 100644
--- a/core/tests/Drupal/KernelTests/Core/Path/UrlAlterTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Path/UrlAlterTest.php
@@ -21,7 +21,7 @@ class UrlAlterTest extends KernelTestBase {
    */
   protected static $modules = ['path', 'url_alter_test', 'user'];
 
-  public function testUrlWithQueryString() {
+  public function testUrlWithQueryString(): void {
     // Test outbound query string altering.
     $url = Url::fromRoute('user.login');
     $this->assertEquals(\Drupal::request()->getBaseUrl() . '/user/login?foo=bar', $url->toString());
diff --git a/core/tests/Drupal/KernelTests/Core/Plugin/Annotation/ContextDefinitionTest.php b/core/tests/Drupal/KernelTests/Core/Plugin/Annotation/ContextDefinitionTest.php
index 5872ea06b771..6bb2c6172de9 100644
--- a/core/tests/Drupal/KernelTests/Core/Plugin/Annotation/ContextDefinitionTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Plugin/Annotation/ContextDefinitionTest.php
@@ -21,7 +21,7 @@ class ContextDefinitionTest extends KernelTestBase {
   /**
    * Tests adding constraints via annotations.
    */
-  public function testConstraints() {
+  public function testConstraints(): void {
     $definition = $this->container->get('plugin.manager.block')->getDefinition('test_context_aware');
     $this->assertArrayHasKey('context_definitions', $definition);
     $this->assertArrayHasKey('user', $definition['context_definitions']);
diff --git a/core/tests/Drupal/KernelTests/Core/Plugin/Condition/ConditionTestDualUserTest.php b/core/tests/Drupal/KernelTests/Core/Plugin/Condition/ConditionTestDualUserTest.php
index 998e9fef3f66..239e76243a9b 100644
--- a/core/tests/Drupal/KernelTests/Core/Plugin/Condition/ConditionTestDualUserTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Plugin/Condition/ConditionTestDualUserTest.php
@@ -49,7 +49,7 @@ protected function setUp(): void {
   /**
    * Tests the dual user condition.
    */
-  public function testConditions() {
+  public function testConditions(): void {
     $this->doTestIdenticalUser();
     $this->doTestDifferentUser();
   }
diff --git a/core/tests/Drupal/KernelTests/Core/Plugin/Condition/CurrentThemeConditionTest.php b/core/tests/Drupal/KernelTests/Core/Plugin/Condition/CurrentThemeConditionTest.php
index 8b90107f6bdf..f9d40c6c14f5 100644
--- a/core/tests/Drupal/KernelTests/Core/Plugin/Condition/CurrentThemeConditionTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Plugin/Condition/CurrentThemeConditionTest.php
@@ -22,7 +22,7 @@ class CurrentThemeConditionTest extends KernelTestBase {
   /**
    * Tests the current theme condition.
    */
-  public function testCurrentTheme() {
+  public function testCurrentTheme(): void {
     \Drupal::service('theme_installer')->install(['test_theme']);
 
     $manager = \Drupal::service('plugin.manager.condition');
diff --git a/core/tests/Drupal/KernelTests/Core/Plugin/Condition/OptionalContextConditionTest.php b/core/tests/Drupal/KernelTests/Core/Plugin/Condition/OptionalContextConditionTest.php
index 59e64844afb0..0fc70903827d 100644
--- a/core/tests/Drupal/KernelTests/Core/Plugin/Condition/OptionalContextConditionTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Plugin/Condition/OptionalContextConditionTest.php
@@ -26,7 +26,7 @@ class OptionalContextConditionTest extends KernelTestBase {
   /**
    * Tests with both contexts mapped to the same user.
    */
-  public function testContextMissing() {
+  public function testContextMissing(): void {
     /** @var \Drupal\Core\Condition\ConditionPluginBase $condition */
     $condition = \Drupal::service('plugin.manager.condition')
       ->createInstance('condition_test_optional_context')
@@ -40,7 +40,7 @@ public function testContextMissing() {
   /**
    * Tests with both contexts mapped to the same user.
    */
-  public function testContextNoValue() {
+  public function testContextNoValue(): void {
     /** @var \Drupal\Core\Condition\ConditionPluginBase $condition */
     $condition = \Drupal::service('plugin.manager.condition')
       ->createInstance('condition_test_optional_context')
@@ -56,7 +56,7 @@ public function testContextNoValue() {
   /**
    * Tests with both contexts mapped to the same user.
    */
-  public function testContextAvailable() {
+  public function testContextAvailable(): void {
     NodeType::create(['type' => 'example', 'name' => 'Example'])->save();
     /** @var \Drupal\Core\Condition\ConditionPluginBase $condition */
     $condition = \Drupal::service('plugin.manager.condition')
diff --git a/core/tests/Drupal/KernelTests/Core/Plugin/Condition/RequestPathTest.php b/core/tests/Drupal/KernelTests/Core/Plugin/Condition/RequestPathTest.php
index a837a6b09c2e..bfc73c4de0e2 100644
--- a/core/tests/Drupal/KernelTests/Core/Plugin/Condition/RequestPathTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Plugin/Condition/RequestPathTest.php
@@ -79,7 +79,7 @@ protected function setUp(): void {
   /**
    * Tests the request path condition.
    */
-  public function testConditions() {
+  public function testConditions(): void {
 
     // Get the request path condition and test and configure it to check against
     // different patterns and requests.
diff --git a/core/tests/Drupal/KernelTests/Core/Plugin/Condition/ResponseStatusTest.php b/core/tests/Drupal/KernelTests/Core/Plugin/Condition/ResponseStatusTest.php
index faec6e8c45f7..6617de546503 100644
--- a/core/tests/Drupal/KernelTests/Core/Plugin/Condition/ResponseStatusTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Plugin/Condition/ResponseStatusTest.php
@@ -55,7 +55,7 @@ protected function setUp(): void {
    *
    * @dataProvider providerTestConditions
    */
-  public function testConditions(array $status_codes, bool $negate, int $response_code, bool $expected_execute) {
+  public function testConditions(array $status_codes, bool $negate, int $response_code, bool $expected_execute): void {
     if ($response_code === Response::HTTP_OK) {
       $request = Request::create('/my/valid/page');
     }
diff --git a/core/tests/Drupal/KernelTests/Core/Plugin/Context/ContextAwarePluginTraitTest.php b/core/tests/Drupal/KernelTests/Core/Plugin/Context/ContextAwarePluginTraitTest.php
index a64cb87119b2..1bf868c8bf29 100644
--- a/core/tests/Drupal/KernelTests/Core/Plugin/Context/ContextAwarePluginTraitTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Plugin/Context/ContextAwarePluginTraitTest.php
@@ -55,14 +55,14 @@ protected function setUp(): void {
   /**
    * @covers ::getContextDefinitions
    */
-  public function testGetContextDefinitions() {
+  public function testGetContextDefinitions(): void {
     $this->assertIsArray($this->plugin->getContextDefinitions());
   }
 
   /**
    * @covers ::getContextDefinition
    */
-  public function testGetContextDefinition() {
+  public function testGetContextDefinition(): void {
     // The context is not defined, so an exception will be thrown.
     $this->expectException(ContextException::class);
     $this->expectExceptionMessage('The person context is not a valid context.');
@@ -72,7 +72,7 @@ public function testGetContextDefinition() {
   /**
    * @covers ::getContextValue
    */
-  public function testGetContextValue() {
+  public function testGetContextValue(): void {
     $this->plugin->setContextValue('nato_letter', 'Alpha');
     $this->assertSame('Alpha', $this->plugin->getContextValue('nato_letter'));
   }
@@ -80,7 +80,7 @@ public function testGetContextValue() {
   /**
    * @covers ::setContextValue
    */
-  public function testSetContextValue() {
+  public function testSetContextValue(): void {
     $typed_data_manager = $this->prophesize(TypedDataManagerInterface::class);
     $container = new ContainerBuilder();
     $container->set('typed_data_manager', $typed_data_manager->reveal());
diff --git a/core/tests/Drupal/KernelTests/Core/Plugin/ContextDefinitionTest.php b/core/tests/Drupal/KernelTests/Core/Plugin/ContextDefinitionTest.php
index 41f5346af5d4..436c9fd70a75 100644
--- a/core/tests/Drupal/KernelTests/Core/Plugin/ContextDefinitionTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Plugin/ContextDefinitionTest.php
@@ -25,7 +25,7 @@ class ContextDefinitionTest extends KernelTestBase {
   /**
    * @covers ::isSatisfiedBy
    */
-  public function testIsSatisfiedBy() {
+  public function testIsSatisfiedBy(): void {
     $this->installEntitySchema('user');
 
     $value = EntityTest::create([]);
@@ -51,7 +51,7 @@ public function testIsSatisfiedBy() {
   /**
    * @covers ::__construct
    */
-  public function testEntityContextDefinitionAssert() {
+  public function testEntityContextDefinitionAssert(): void {
     $this->expectException(\AssertionError::class);
     $this->expectExceptionMessage('assert(!str_starts_with($data_type, \'entity:\') || $this instanceof EntityContextDefinition)');
     new ContextDefinition('entity:entity_test');
@@ -60,7 +60,7 @@ public function testEntityContextDefinitionAssert() {
   /**
    * @covers ::create
    */
-  public function testCreateWithEntityDataType() {
+  public function testCreateWithEntityDataType(): void {
     $this->assertInstanceOf(EntityContextDefinition::class, ContextDefinition::create('entity:user'));
   }
 
diff --git a/core/tests/Drupal/KernelTests/Core/Plugin/ContextHandlerTest.php b/core/tests/Drupal/KernelTests/Core/Plugin/ContextHandlerTest.php
index 0259ca15c9b7..2340cbec9add 100644
--- a/core/tests/Drupal/KernelTests/Core/Plugin/ContextHandlerTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Plugin/ContextHandlerTest.php
@@ -31,7 +31,7 @@ class ContextHandlerTest extends KernelTestBase {
   /**
    * @covers ::applyContextMapping
    */
-  public function testApplyContextMapping() {
+  public function testApplyContextMapping(): void {
     $entity = EntityTest::create([]);
     $context_definition = EntityContextDefinition::fromEntity($entity);
     $context = EntityContext::fromEntity($entity);
@@ -49,7 +49,7 @@ public function testApplyContextMapping() {
   /**
    * @covers ::applyContextMapping
    */
-  public function testApplyContextMappingAlreadyApplied() {
+  public function testApplyContextMappingAlreadyApplied(): void {
     $entity = EntityTest::create([]);
     $context_definition = EntityContextDefinition::fromEntity($entity);
     $context = EntityContext::fromEntity($entity);
diff --git a/core/tests/Drupal/KernelTests/Core/Plugin/ContextPluginTest.php b/core/tests/Drupal/KernelTests/Core/Plugin/ContextPluginTest.php
index 2c5bb1c4ac56..d47d0aedffeb 100644
--- a/core/tests/Drupal/KernelTests/Core/Plugin/ContextPluginTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Plugin/ContextPluginTest.php
@@ -31,7 +31,7 @@ class ContextPluginTest extends KernelTestBase {
   /**
    * Tests basic context definition and value getters and setters.
    */
-  public function testContext() {
+  public function testContext(): void {
     $this->installEntitySchema('user');
     $this->installEntitySchema('node');
     $type = NodeType::create(['type' => 'page', 'name' => 'Page']);
diff --git a/core/tests/Drupal/KernelTests/Core/Plugin/ContextTypedDataTest.php b/core/tests/Drupal/KernelTests/Core/Plugin/ContextTypedDataTest.php
index 6954011a15aa..3e3e88bf0b0d 100644
--- a/core/tests/Drupal/KernelTests/Core/Plugin/ContextTypedDataTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Plugin/ContextTypedDataTest.php
@@ -22,7 +22,7 @@ class ContextTypedDataTest extends KernelTestBase {
   /**
    * Tests that contexts can be serialized.
    */
-  public function testSerialize() {
+  public function testSerialize(): void {
     $definition = new ContextDefinition('any');
     $data_definition = DataDefinition::create('string');
     $typed_data = new StringData($data_definition);
@@ -44,7 +44,7 @@ public function testSerialize() {
    *
    * @covers ::getContextValue
    */
-  public function testGetContextValue() {
+  public function testGetContextValue(): void {
     $data_definition = DataDefinition::create('string');
     $typed_data = new StringData($data_definition);
     $typed_data->setValue('example string');
diff --git a/core/tests/Drupal/KernelTests/Core/Plugin/DefaultPluginManagerTest.php b/core/tests/Drupal/KernelTests/Core/Plugin/DefaultPluginManagerTest.php
index aff66dcf9702..703d15f20623 100644
--- a/core/tests/Drupal/KernelTests/Core/Plugin/DefaultPluginManagerTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Plugin/DefaultPluginManagerTest.php
@@ -25,7 +25,7 @@ class DefaultPluginManagerTest extends KernelTestBase {
   /**
    * Tests annotations and attributes on the default plugin manager.
    */
-  public function testDefaultPluginManager() {
+  public function testDefaultPluginManager(): void {
     $subdir = 'Plugin/plugin_test/custom_annotation';
     $base_directory = $this->root . '/core/modules/system/tests/modules/plugin_test/src';
     $namespaces = new \ArrayObject(['Drupal\plugin_test' => $base_directory]);
diff --git a/core/tests/Drupal/KernelTests/Core/Plugin/DerivativeTest.php b/core/tests/Drupal/KernelTests/Core/Plugin/DerivativeTest.php
index 16ec96bdd21c..aecad9faa950 100644
--- a/core/tests/Drupal/KernelTests/Core/Plugin/DerivativeTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Plugin/DerivativeTest.php
@@ -19,7 +19,7 @@ class DerivativeTest extends PluginTestBase {
   /**
    * Tests getDefinitions() and getDefinition() with a derivativeDecorator.
    */
-  public function testDerivativeDecorator() {
+  public function testDerivativeDecorator(): void {
     // Ensure that getDefinitions() returns the expected definitions.
     $this->assertEquals($this->mockBlockExpectedDefinitions, $this->mockBlockManager->getDefinitions());
 
diff --git a/core/tests/Drupal/KernelTests/Core/Plugin/Discovery/DiscoveryTestBase.php b/core/tests/Drupal/KernelTests/Core/Plugin/Discovery/DiscoveryTestBase.php
index 76dd4a32407a..1a9686cf8cd7 100644
--- a/core/tests/Drupal/KernelTests/Core/Plugin/Discovery/DiscoveryTestBase.php
+++ b/core/tests/Drupal/KernelTests/Core/Plugin/Discovery/DiscoveryTestBase.php
@@ -39,7 +39,7 @@ abstract class DiscoveryTestBase extends KernelTestBase {
   /**
    * Tests getDefinitions() and getDefinition().
    */
-  public function testDiscoveryInterface() {
+  public function testDiscoveryInterface(): void {
     // Ensure that getDefinitions() returns the expected definitions.
     // For the arrays to be identical (instead of only equal), they must be
     // sorted equally, which seems unnecessary here.
diff --git a/core/tests/Drupal/KernelTests/Core/Plugin/EntityContextTypedDataTest.php b/core/tests/Drupal/KernelTests/Core/Plugin/EntityContextTypedDataTest.php
index 0effaabea890..868f06e4f7ff 100644
--- a/core/tests/Drupal/KernelTests/Core/Plugin/EntityContextTypedDataTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Plugin/EntityContextTypedDataTest.php
@@ -23,7 +23,7 @@ class EntityContextTypedDataTest extends KernelTestBase {
   /**
    * Tests that entity contexts wrapping a config entity can be validated.
    */
-  public function testValidateConfigEntityContext() {
+  public function testValidateConfigEntityContext(): void {
     $display = EntityViewDisplay::create([
       'targetEntityType' => 'entity_test',
       'bundle' => 'entity_test',
diff --git a/core/tests/Drupal/KernelTests/Core/Plugin/FactoryTest.php b/core/tests/Drupal/KernelTests/Core/Plugin/FactoryTest.php
index 4ad37617ee64..60d073b06e74 100644
--- a/core/tests/Drupal/KernelTests/Core/Plugin/FactoryTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Plugin/FactoryTest.php
@@ -21,7 +21,7 @@ class FactoryTest extends PluginTestBase {
   /**
    * Tests that DefaultFactory can create a plugin instance.
    */
-  public function testDefaultFactory() {
+  public function testDefaultFactory(): void {
     // Ensure a non-derivative plugin can be instantiated.
     $plugin = $this->testPluginManager->createInstance('user_login', ['title' => 'Enter your login name and password']);
     $this->assertSame('Drupal\\plugin_test\\Plugin\\plugin_test\\mock_block\\MockUserLoginBlock', get_class($plugin), 'Correct plugin class instantiated with default factory.');
@@ -48,7 +48,7 @@ public function testDefaultFactory() {
    * reflection factory and it provides some additional variety in plugin
    * object creation.
    */
-  public function testReflectionFactory() {
+  public function testReflectionFactory(): void {
     // Ensure a non-derivative plugin can be instantiated.
     $plugin = $this->mockBlockManager->createInstance('user_login', ['title' => 'Enter your login name and password']);
     $this->assertSame('Drupal\\plugin_test\\Plugin\\plugin_test\\mock_block\\MockUserLoginBlock', get_class($plugin), 'Correct plugin class instantiated.');
diff --git a/core/tests/Drupal/KernelTests/Core/Plugin/InspectionTest.php b/core/tests/Drupal/KernelTests/Core/Plugin/InspectionTest.php
index 1d6e0be68fa0..df96e3686540 100644
--- a/core/tests/Drupal/KernelTests/Core/Plugin/InspectionTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Plugin/InspectionTest.php
@@ -19,7 +19,7 @@ class InspectionTest extends PluginTestBase {
   /**
    * Ensure the test plugins correctly implement getPluginId() and getPluginDefinition().
    */
-  public function testInspection() {
+  public function testInspection(): void {
     foreach (['user_login'] as $id) {
       $plugin = $this->testPluginManager->createInstance($id);
       $expected_definition = $this->testPluginExpectedDefinitions[$id];
diff --git a/core/tests/Drupal/KernelTests/Core/Queue/QueueSerializationTest.php b/core/tests/Drupal/KernelTests/Core/Queue/QueueSerializationTest.php
index 5bb185c880c3..d69767410be3 100644
--- a/core/tests/Drupal/KernelTests/Core/Queue/QueueSerializationTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Queue/QueueSerializationTest.php
@@ -93,7 +93,7 @@ protected function setUp(): void {
   /**
    * Tests queue injection serialization.
    */
-  public function testQueueSerialization() {
+  public function testQueueSerialization(): void {
     $form_state = new FormState();
     $form_state->setRequestMethod('POST');
     $form_state->setCached();
diff --git a/core/tests/Drupal/KernelTests/Core/Queue/QueueTest.php b/core/tests/Drupal/KernelTests/Core/Queue/QueueTest.php
index 9561f0804eda..9b91a911174a 100644
--- a/core/tests/Drupal/KernelTests/Core/Queue/QueueTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Queue/QueueTest.php
@@ -19,7 +19,7 @@ class QueueTest extends KernelTestBase {
   /**
    * Tests the System queue.
    */
-  public function testSystemQueue() {
+  public function testSystemQueue(): void {
     // Create two queues.
     $queue1 = new DatabaseQueue($this->randomMachineName(), Database::getConnection());
     $queue1->createQueue();
@@ -32,7 +32,7 @@ public function testSystemQueue() {
   /**
    * Tests the Memory queue.
    */
-  public function testMemoryQueue() {
+  public function testMemoryQueue(): void {
     // Create two queues.
     $queue1 = new Memory($this->randomMachineName());
     $queue1->createQueue();
diff --git a/core/tests/Drupal/KernelTests/Core/Render/Element/ActionsTest.php b/core/tests/Drupal/KernelTests/Core/Render/Element/ActionsTest.php
index a67f3e7167ce..d263f1a4bc39 100644
--- a/core/tests/Drupal/KernelTests/Core/Render/Element/ActionsTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Render/Element/ActionsTest.php
@@ -63,7 +63,7 @@ public function validateForm(array &$form, FormStateInterface $form_state) {
   public function submitForm(array &$form, FormStateInterface $form_state) {
   }
 
-  public function testDropbuttonWithBubbleableMetadata() {
+  public function testDropbuttonWithBubbleableMetadata(): void {
     $result = \Drupal::formBuilder()->getForm($this);
     \Drupal::service('renderer')->renderRoot($result);
     $this->assertEquals(['system/base', 'core/drupal.dropbutton'], $result['#attached']['library']);
diff --git a/core/tests/Drupal/KernelTests/Core/Render/Element/DeprecatedElementTest.php b/core/tests/Drupal/KernelTests/Core/Render/Element/DeprecatedElementTest.php
index 815e999b09fe..09931b10f3a3 100644
--- a/core/tests/Drupal/KernelTests/Core/Render/Element/DeprecatedElementTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Render/Element/DeprecatedElementTest.php
@@ -22,7 +22,7 @@ class DeprecatedElementTest extends KernelTestBase {
   /**
    * Tests that render elements can trigger deprecations in their constructor.
    */
-  public function testBuildInfo() {
+  public function testBuildInfo(): void {
     $info_manager = $this->container->get('plugin.manager.element_info');
     $element_names = [
       'deprecated',
diff --git a/core/tests/Drupal/KernelTests/Core/Render/Element/MachineNameTest.php b/core/tests/Drupal/KernelTests/Core/Render/Element/MachineNameTest.php
index 98962932b308..95d6d633f11d 100644
--- a/core/tests/Drupal/KernelTests/Core/Render/Element/MachineNameTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Render/Element/MachineNameTest.php
@@ -66,7 +66,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) {
   /**
    * Tests the order of the machine name field and the source.
    */
-  public function testMachineNameOrderException() {
+  public function testMachineNameOrderException(): void {
     $this->expectException(\LogicException::class);
     $this->expectExceptionMessage('The machine name element "test_machine_name" is defined before the source element "test_source", it must be defined after or the source element must specify an id.');
     $form = \Drupal::formBuilder()->getForm($this);
diff --git a/core/tests/Drupal/KernelTests/Core/Render/Element/PluginAlterTest.php b/core/tests/Drupal/KernelTests/Core/Render/Element/PluginAlterTest.php
index 36bfeec71067..7ad8afa75be6 100644
--- a/core/tests/Drupal/KernelTests/Core/Render/Element/PluginAlterTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Render/Element/PluginAlterTest.php
@@ -19,7 +19,7 @@ class PluginAlterTest extends KernelTestBase {
   /**
    * Tests hook_element_plugin_alter().
    */
-  public function testPluginAlter() {
+  public function testPluginAlter(): void {
     $info_manager = $this->container->get('plugin.manager.element_info');
     $this->assertArrayHasKey('weight', $info_manager->getDefinitions());
 
diff --git a/core/tests/Drupal/KernelTests/Core/Render/Element/RenderElementTypesTest.php b/core/tests/Drupal/KernelTests/Core/Render/Element/RenderElementTypesTest.php
index aa5022359afe..e03e9d4f3ef8 100644
--- a/core/tests/Drupal/KernelTests/Core/Render/Element/RenderElementTypesTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Render/Element/RenderElementTypesTest.php
@@ -50,7 +50,7 @@ protected function assertElements(array $elements, string $expected_html, string
   /**
    * Tests system #type 'container'.
    */
-  public function testContainer() {
+  public function testContainer(): void {
     // Basic container with no attributes.
     $this->assertElements([
       '#type' => 'container',
@@ -78,7 +78,7 @@ public function testContainer() {
   /**
    * Tests system #type 'html_tag'.
    */
-  public function testHtmlTag() {
+  public function testHtmlTag(): void {
     // Test void element.
     $this->assertElements([
       '#type' => 'html_tag',
@@ -116,7 +116,7 @@ public function testHtmlTag() {
   /**
    * Tests system #type 'more_link'.
    */
-  public function testMoreLink() {
+  public function testMoreLink(): void {
     $elements = [
       [
         'name' => "#type 'more_link' anchor tag generation without extra classes",
@@ -196,7 +196,7 @@ public function testMoreLink() {
   /**
    * Tests system #type 'system_compact_link'.
    */
-  public function testSystemCompactLink() {
+  public function testSystemCompactLink(): void {
     $elements = [
       [
         'name' => "#type 'system_compact_link' when admin compact mode is off",
diff --git a/core/tests/Drupal/KernelTests/Core/Render/Element/TableSortExtenderTest.php b/core/tests/Drupal/KernelTests/Core/Render/Element/TableSortExtenderTest.php
index 0bb07c99357e..3596aafe7076 100644
--- a/core/tests/Drupal/KernelTests/Core/Render/Element/TableSortExtenderTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Render/Element/TableSortExtenderTest.php
@@ -20,7 +20,7 @@ class TableSortExtenderTest extends KernelTestBase {
   /**
    * Tests \Drupal\Core\Utility\TableSort::getContextFromRequest().
    */
-  public function testTableSortInit() {
+  public function testTableSortInit(): void {
 
     // Test simple table headers.
 
diff --git a/core/tests/Drupal/KernelTests/Core/Render/Element/TableTest.php b/core/tests/Drupal/KernelTests/Core/Render/Element/TableTest.php
index 04741d5114b8..0d72f964a5fb 100644
--- a/core/tests/Drupal/KernelTests/Core/Render/Element/TableTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Render/Element/TableTest.php
@@ -23,7 +23,7 @@ class TableTest extends KernelTestBase {
   /**
    * If $sticky is TRUE, `sticky-header` class should be included.
    */
-  public function testThemeTableStickyHeaders() {
+  public function testThemeTableStickyHeaders(): void {
     $header = ['one', 'two', 'three'];
     $rows = [[1, 2, 3], [4, 5, 6], [7, 8, 9]];
     $table = [
@@ -39,7 +39,7 @@ public function testThemeTableStickyHeaders() {
   /**
    * If $sticky is FALSE, `sticky-header` class should not be included.
    */
-  public function testThemeTableNoStickyHeaders() {
+  public function testThemeTableNoStickyHeaders(): void {
     $header = ['one', 'two', 'three'];
     $rows = [[1, 2, 3], [4, 5, 6], [7, 8, 9]];
     $attributes = [];
@@ -64,7 +64,7 @@ public function testThemeTableNoStickyHeaders() {
    * Tests are performed when the there are no rows and that the empty text is
    * displayed correctly.
    */
-  public function testThemeTableWithEmptyMessage() {
+  public function testThemeTableWithEmptyMessage(): void {
     $header = [
       'Header 1',
       [
@@ -92,7 +92,7 @@ public function testThemeTableWithEmptyMessage() {
   /**
    * Tests that the 'no_striping' option works correctly.
    */
-  public function testThemeTableWithNoStriping() {
+  public function testThemeTableWithNoStriping(): void {
     $rows = [
       [
         'data' => [1],
@@ -111,7 +111,7 @@ public function testThemeTableWithNoStriping() {
   /**
    * Tests that the 'footer' option works correctly.
    */
-  public function testThemeTableFooter() {
+  public function testThemeTableFooter(): void {
     $footer = [
       [
         'data' => [1],
@@ -133,7 +133,7 @@ public function testThemeTableFooter() {
   /**
    * Tests that the 'header' option in cells works correctly.
    */
-  public function testThemeTableHeaderCellOption() {
+  public function testThemeTableHeaderCellOption(): void {
     $rows = [
       [
         ['data' => 1, 'header' => TRUE],
@@ -153,7 +153,7 @@ public function testThemeTableHeaderCellOption() {
   /**
    * Tests that the 'responsive-table' class is applied correctly.
    */
-  public function testThemeTableResponsive() {
+  public function testThemeTableResponsive(): void {
     $header = ['one', 'two', 'three'];
     $rows = [[1, 2, 3], [4, 5, 6], [7, 8, 9]];
     $table = [
@@ -169,7 +169,7 @@ public function testThemeTableResponsive() {
   /**
    * Tests that the 'responsive-table' class is not applied without headers.
    */
-  public function testThemeTableNotResponsiveHeaders() {
+  public function testThemeTableNotResponsiveHeaders(): void {
     $rows = [[1, 2, 3], [4, 5, 6], [7, 8, 9]];
     $table = [
       '#type' => 'table',
@@ -183,7 +183,7 @@ public function testThemeTableNotResponsiveHeaders() {
   /**
    * Tests that 'responsive-table' class only applied when responsive is TRUE.
    */
-  public function testThemeTableNotResponsiveProperty() {
+  public function testThemeTableNotResponsiveProperty(): void {
     $header = ['one', 'two', 'three'];
     $rows = [[1, 2, 3], [4, 5, 6], [7, 8, 9]];
     $table = [
@@ -199,7 +199,7 @@ public function testThemeTableNotResponsiveProperty() {
   /**
    * Tests 'priority-medium' and 'priority-low' classes.
    */
-  public function testThemeTableResponsivePriority() {
+  public function testThemeTableResponsivePriority(): void {
     $header = [
       // Test associative header indices.
       'associative_key' => ['data' => 1, 'class' => [RESPONSIVE_PRIORITY_MEDIUM]],
@@ -227,7 +227,7 @@ public function testThemeTableResponsivePriority() {
   /**
    * Tests header elements with a mix of string and render array values.
    */
-  public function testThemeTableHeaderRenderArray() {
+  public function testThemeTableHeaderRenderArray(): void {
     $header = [
       [
         'data' => [
@@ -258,7 +258,7 @@ public function testThemeTableHeaderRenderArray() {
   /**
    * Tests row elements with a mix of string and render array values.
    */
-  public function testThemeTableRowRenderArray() {
+  public function testThemeTableRowRenderArray(): void {
     $header = ['one', 'two', 'three'];
     $rows = [
       [
@@ -299,7 +299,7 @@ public function testThemeTableRowRenderArray() {
   /**
    * Tests that the select/checkbox label is being generated and escaped.
    */
-  public function testThemeTableTitle() {
+  public function testThemeTableTitle(): void {
     $form = \Drupal::formBuilder()->getForm('\Drupal\form_test\Form\FormTestTableForm');
     $this->render($form);
     $this->assertEscaped('Update <em>kitten</em>');
diff --git a/core/tests/Drupal/KernelTests/Core/Render/Element/WeightTest.php b/core/tests/Drupal/KernelTests/Core/Render/Element/WeightTest.php
index d14f9511d4a0..00b7948f2a81 100644
--- a/core/tests/Drupal/KernelTests/Core/Render/Element/WeightTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Render/Element/WeightTest.php
@@ -35,7 +35,7 @@ protected function setUp(): void {
    *
    * @covers ::processWeight
    */
-  public function testProcessWeight() {
+  public function testProcessWeight(): void {
     $element = [];
     $form_state = new FormState();
     $complete_form = [];
@@ -61,7 +61,7 @@ public function testProcessWeight() {
    *
    * @covers ::processWeight
    */
-  public function testProcessWeightSelectMax() {
+  public function testProcessWeightSelectMax(): void {
     $form_state = new FormState();
     $definition = [
       '#type' => 'weight',
diff --git a/core/tests/Drupal/KernelTests/Core/Render/ElementInfoIntegrationTest.php b/core/tests/Drupal/KernelTests/Core/Render/ElementInfoIntegrationTest.php
index 46fa63a0908d..defad383beab 100644
--- a/core/tests/Drupal/KernelTests/Core/Render/ElementInfoIntegrationTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Render/ElementInfoIntegrationTest.php
@@ -25,7 +25,7 @@ protected function setUp(): void {
   /**
    * Ensures that the element info can be altered by themes.
    */
-  public function testElementInfoByTheme() {
+  public function testElementInfoByTheme(): void {
     /** @var \Drupal\Core\Theme\ThemeInitializationInterface $theme_initializer */
     $theme_initializer = $this->container->get('theme.initialization');
 
diff --git a/core/tests/Drupal/KernelTests/Core/Render/RenderCacheTest.php b/core/tests/Drupal/KernelTests/Core/Render/RenderCacheTest.php
index f29477a48a50..2f49ac29e509 100644
--- a/core/tests/Drupal/KernelTests/Core/Render/RenderCacheTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Render/RenderCacheTest.php
@@ -45,14 +45,14 @@ protected function setUp(): void {
   /**
    * Tests that user 1 has a different permission context with the same roles.
    */
-  public function testUser1PermissionContext() {
+  public function testUser1PermissionContext(): void {
     $this->doTestUser1WithContexts(['user.permissions']);
   }
 
   /**
    * Tests that user 1 has a different roles context with the same roles.
    */
-  public function testUser1RolesContext() {
+  public function testUser1RolesContext(): void {
     $this->doTestUser1WithContexts(['user.roles']);
   }
 
diff --git a/core/tests/Drupal/KernelTests/Core/Render/RenderTest.php b/core/tests/Drupal/KernelTests/Core/Render/RenderTest.php
index d2948015e7cf..8a517f5a4913 100644
--- a/core/tests/Drupal/KernelTests/Core/Render/RenderTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Render/RenderTest.php
@@ -23,7 +23,7 @@ class RenderTest extends KernelTestBase {
   /**
    * Tests theme preprocess functions being able to attach assets.
    */
-  public function testDrupalRenderThemePreprocessAttached() {
+  public function testDrupalRenderThemePreprocessAttached(): void {
     \Drupal::state()->set('theme_preprocess_attached_test', TRUE);
 
     $test_element = [
@@ -48,7 +48,7 @@ public function testDrupalRenderThemePreprocessAttached() {
   /**
    * Ensures that render array children are processed correctly.
    */
-  public function testRenderChildren() {
+  public function testRenderChildren(): void {
     // Ensure that #prefix and #suffix is only being printed once since that is
     // the behavior the caller code expects.
     $build = [
@@ -65,7 +65,7 @@ public function testRenderChildren() {
   /**
    * Tests that we get an exception when we try to attach an illegal type.
    */
-  public function testProcessAttached() {
+  public function testProcessAttached(): void {
     // Specify invalid attachments in a render array.
     $build['#attached']['library'][] = 'core/drupal.states';
     $build['#attached']['drupal_process_states'][] = [];
@@ -79,7 +79,7 @@ public function testProcessAttached() {
    *
    * @group legacy
    */
-  public function testDeprecateRenderPlain() {
+  public function testDeprecateRenderPlain(): void {
     $message = ['#markup' => 'Test'];
     \Drupal::service('renderer')->renderPlain($message);
     $this->expectDeprecation('Renderer::renderPlain() is deprecated in drupal:10.3.0 and is removed from drupal:12.0.0. Instead, you should use ::renderInIsolation(). See https://www.drupal.org/node/3407994');
diff --git a/core/tests/Drupal/KernelTests/Core/RouteProcessor/RouteNoneTest.php b/core/tests/Drupal/KernelTests/Core/RouteProcessor/RouteNoneTest.php
index 2f18af508b3d..9758937cd998 100644
--- a/core/tests/Drupal/KernelTests/Core/RouteProcessor/RouteNoneTest.php
+++ b/core/tests/Drupal/KernelTests/Core/RouteProcessor/RouteNoneTest.php
@@ -47,7 +47,7 @@ protected function setUp(): void {
   /**
    * Tests the output process.
    */
-  public function testProcessOutbound() {
+  public function testProcessOutbound(): void {
     $expected_cacheability = (new BubbleableMetadata())->setCacheMaxAge(Cache::PERMANENT);
 
     $request_stack = \Drupal::requestStack();
diff --git a/core/tests/Drupal/KernelTests/Core/RouteProcessor/RouteProcessorCurrentIntegrationTest.php b/core/tests/Drupal/KernelTests/Core/RouteProcessor/RouteProcessorCurrentIntegrationTest.php
index 32a6024215cd..942fd5b2751d 100644
--- a/core/tests/Drupal/KernelTests/Core/RouteProcessor/RouteProcessorCurrentIntegrationTest.php
+++ b/core/tests/Drupal/KernelTests/Core/RouteProcessor/RouteProcessorCurrentIntegrationTest.php
@@ -46,7 +46,7 @@ protected function setUp(): void {
   /**
    * Tests the output process.
    */
-  public function testProcessOutbound() {
+  public function testProcessOutbound(): void {
     $expected_cacheability = (new BubbleableMetadata())
       ->addCacheContexts(['route'])
       ->setCacheMaxAge(Cache::PERMANENT);
diff --git a/core/tests/Drupal/KernelTests/Core/Routing/ContentNegotiationRoutingTest.php b/core/tests/Drupal/KernelTests/Core/Routing/ContentNegotiationRoutingTest.php
index 9254ccc2568d..76e9b232ec60 100644
--- a/core/tests/Drupal/KernelTests/Core/Routing/ContentNegotiationRoutingTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Routing/ContentNegotiationRoutingTest.php
@@ -35,7 +35,7 @@ protected function setUp(): void {
   /**
    * Tests the content negotiation aspect of routing.
    */
-  public function testContentRouting() {
+  public function testContentRouting(): void {
     // Alias with extension pointing to no extension/constant content-type.
     $this->createPathAlias('/content_negotiation/html', '/alias.html');
 
@@ -99,7 +99,7 @@ public function testContentRouting() {
   /**
    * Full negotiation by header only.
    */
-  public function testFullNegotiation() {
+  public function testFullNegotiation(): void {
     $this->enableModules(['accept_header_routing_test']);
     $tests = [
       // ['path', 'accept', 'content-type'],
diff --git a/core/tests/Drupal/KernelTests/Core/Routing/ExceptionHandlingTest.php b/core/tests/Drupal/KernelTests/Core/Routing/ExceptionHandlingTest.php
index c5b9e26d6dd7..f9eed1d6eaf3 100644
--- a/core/tests/Drupal/KernelTests/Core/Routing/ExceptionHandlingTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Routing/ExceptionHandlingTest.php
@@ -34,7 +34,7 @@ protected function setUp(): void {
   /**
    * Tests on a route with a non-supported HTTP method.
    */
-  public function test405() {
+  public function test405(): void {
     $request = Request::create('/router_test/test15', 'PATCH');
 
     /** @var \Symfony\Component\HttpKernel\HttpKernelInterface $kernel */
@@ -47,7 +47,7 @@ public function test405() {
   /**
    * Tests a route with a non-supported _format parameter.
    */
-  public function test406() {
+  public function test406(): void {
     $request = Request::create('/router_test/test2?_format=non_existent_format');
 
     /** @var \Symfony\Component\HttpKernel\HttpKernelInterface $kernel */
@@ -60,7 +60,7 @@ public function test406() {
   /**
    * Tests the exception handling for json and 403 status code.
    */
-  public function testJson403() {
+  public function testJson403(): void {
     $request = Request::create('/router_test/test15');
     $request->query->set('_format', 'json');
     $request->setRequestFormat('json');
@@ -78,7 +78,7 @@ public function testJson403() {
   /**
    * Tests the exception handling for json and 404 status code.
    */
-  public function testJson404() {
+  public function testJson404(): void {
     $request = Request::create('/not-found');
     $request->query->set('_format', 'json');
     $request->setRequestFormat('json');
@@ -95,7 +95,7 @@ public function testJson404() {
   /**
    * Tests the exception handling for HTML and 403 status code.
    */
-  public function testHtml403() {
+  public function testHtml403(): void {
     $request = Request::create('/router_test/test15');
     $request->setFormat('html', ['text/html']);
 
@@ -110,7 +110,7 @@ public function testHtml403() {
   /**
    * Tests the exception handling for HTML and 404 status code.
    */
-  public function testHtml404() {
+  public function testHtml404(): void {
     $request = Request::create('/not-found');
     $request->setFormat('html', ['text/html']);
 
@@ -125,7 +125,7 @@ public function testHtml404() {
   /**
    * Tests that the exception response is executed in the original context.
    */
-  public function testExceptionResponseGeneratedForOriginalRequest() {
+  public function testExceptionResponseGeneratedForOriginalRequest(): void {
     // Test with 404 path pointing to a route that uses '_controller'.
     $response = $this->doTest404Route('/router_test/test25');
     $this->assertStringContainsString('/not-found', $response->getContent());
@@ -163,7 +163,7 @@ protected function doTest404Route($path) {
   /**
    * Tests if exception backtraces are properly escaped when output to HTML.
    */
-  public function testBacktraceEscaping() {
+  public function testBacktraceEscaping(): void {
     // Enable verbose error logging.
     $this->config('system.logging')->set('error_level', ERROR_REPORTING_DISPLAY_VERBOSE)->save();
 
@@ -185,7 +185,7 @@ public function testBacktraceEscaping() {
   /**
    * Tests exception message escaping.
    */
-  public function testExceptionEscaping() {
+  public function testExceptionEscaping(): void {
     // Enable verbose error logging.
     $this->config('system.logging')->set('error_level', ERROR_REPORTING_DISPLAY_VERBOSE)->save();
 
diff --git a/core/tests/Drupal/KernelTests/Core/Routing/MatcherDumperTest.php b/core/tests/Drupal/KernelTests/Core/Routing/MatcherDumperTest.php
index 677968b3ec8b..481caab2ca44 100644
--- a/core/tests/Drupal/KernelTests/Core/Routing/MatcherDumperTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Routing/MatcherDumperTest.php
@@ -59,7 +59,7 @@ protected function setUp(): void {
   /**
    * Confirms that the dumper can be instantiated successfully.
    */
-  public function testCreate() {
+  public function testCreate(): void {
     $connection = Database::getConnection();
     $dumper = new MatcherDumper($connection, $this->state, $this->logger);
 
@@ -70,7 +70,7 @@ public function testCreate() {
   /**
    * Confirms that we can add routes to the dumper.
    */
-  public function testAddRoutes() {
+  public function testAddRoutes(): void {
     $connection = Database::getConnection();
     $dumper = new MatcherDumper($connection, $this->state, $this->logger);
 
@@ -91,7 +91,7 @@ public function testAddRoutes() {
   /**
    * Confirms that we can add routes to the dumper when it already has some.
    */
-  public function testAddAdditionalRoutes() {
+  public function testAddAdditionalRoutes(): void {
     $connection = Database::getConnection();
     $dumper = new MatcherDumper($connection, $this->state, $this->logger);
 
@@ -119,7 +119,7 @@ public function testAddAdditionalRoutes() {
   /**
    * Confirm that we can dump a route collection to the database.
    */
-  public function testDump() {
+  public function testDump(): void {
     $connection = Database::getConnection();
     $dumper = new MatcherDumper($connection, $this->state, $this->logger, 'test_routes');
 
@@ -154,7 +154,7 @@ public function testDump() {
   /**
    * Tests the determination of the masks generation.
    */
-  public function testMenuMasksGeneration() {
+  public function testMenuMasksGeneration(): void {
     $connection = Database::getConnection();
     $dumper = new MatcherDumper($connection, $this->state, $this->logger, 'test_routes');
 
diff --git a/core/tests/Drupal/KernelTests/Core/Routing/PathChangedHelperTest.php b/core/tests/Drupal/KernelTests/Core/Routing/PathChangedHelperTest.php
index 99ab50ce0009..82ab86cdf11d 100644
--- a/core/tests/Drupal/KernelTests/Core/Routing/PathChangedHelperTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Routing/PathChangedHelperTest.php
@@ -34,7 +34,7 @@ class PathChangedHelperTest extends KernelTestBase {
    * @covers ::newPath
    * @covers ::redirect
    */
-  public function testPathChangedHelper() {
+  public function testPathChangedHelper(): void {
     $route = \Drupal::service('router.route_provider')->getRouteByName('path.changed.bc');
     $raw_parameters = [
       'block_type' => 'test_block_type',
diff --git a/core/tests/Drupal/KernelTests/Core/Routing/RouteProviderTest.php b/core/tests/Drupal/KernelTests/Core/Routing/RouteProviderTest.php
index fd9008f73c1e..4bb9c5efa29a 100644
--- a/core/tests/Drupal/KernelTests/Core/Routing/RouteProviderTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Routing/RouteProviderTest.php
@@ -122,7 +122,7 @@ protected function tearDown(): void {
   /**
    * Confirms that the correct candidate outlines are generated.
    */
-  public function testCandidateOutlines() {
+  public function testCandidateOutlines(): void {
 
     $connection = Database::getConnection();
     $provider = new TestRouteProvider($connection, $this->state, $this->currentPath, $this->cache, $this->pathProcessor, $this->cacheTagsInvalidator, 'test_routes');
@@ -146,7 +146,7 @@ public function testCandidateOutlines() {
   /**
    * Don't fail when given an empty path.
    */
-  public function testEmptyPathCandidatesOutlines() {
+  public function testEmptyPathCandidatesOutlines(): void {
     $provider = new TestRouteProvider(Database::getConnection(), $this->state, $this->currentPath, $this->cache, $this->pathProcessor, $this->cacheTagsInvalidator, 'test_routes');
     $candidates = $provider->getCandidateOutlines([]);
     $this->assertCount(0, $candidates, 'Empty parts should return no candidates.');
@@ -155,7 +155,7 @@ public function testEmptyPathCandidatesOutlines() {
   /**
    * Confirms that we can find routes with the exact incoming path.
    */
-  public function testExactPathMatch() {
+  public function testExactPathMatch(): void {
     $connection = Database::getConnection();
     $provider = new RouteProvider($connection, $this->state, $this->currentPath, $this->cache, $this->pathProcessor, $this->cacheTagsInvalidator, 'test_routes');
 
@@ -179,7 +179,7 @@ public function testExactPathMatch() {
   /**
    * Confirms that we can find routes whose pattern would match the request.
    */
-  public function testOutlinePathMatch() {
+  public function testOutlinePathMatch(): void {
     $connection = Database::getConnection();
     $provider = new RouteProvider($connection, $this->state, $this->currentPath, $this->cache, $this->pathProcessor, $this->cacheTagsInvalidator, 'test_routes');
 
@@ -232,7 +232,7 @@ public static function providerMixedCaseRoutePaths() {
    *
    * @dataProvider providerMixedCaseRoutePaths
    */
-  public function testMixedCasePaths($path, $expected_route_name, $method = 'GET') {
+  public function testMixedCasePaths($path, $expected_route_name, $method = 'GET'): void {
     $connection = Database::getConnection();
     $provider = new RouteProvider($connection, $this->state, $this->currentPath, $this->cache, $this->pathProcessor, $this->cacheTagsInvalidator, 'test_routes');
 
@@ -276,7 +276,7 @@ public static function providerDuplicateRoutePaths() {
    *
    * @dataProvider providerDuplicateRoutePaths
    */
-  public function testDuplicateRoutePaths($path, $number, $expected_route_name = NULL) {
+  public function testDuplicateRoutePaths($path, $number, $expected_route_name = NULL): void {
     $connection = Database::getConnection();
     $provider = new RouteProvider($connection, $this->state, $this->currentPath, $this->cache, $this->pathProcessor, $this->cacheTagsInvalidator, 'test_routes');
 
@@ -298,7 +298,7 @@ public function testDuplicateRoutePaths($path, $number, $expected_route_name = N
   /**
    * Confirms RouteProvider::getAllRoutes() extracts information correctly from the database.
    */
-  public function testGetAllRoutes() {
+  public function testGetAllRoutes(): void {
     $connection = Database::getConnection();
     $provider = new RouteProvider($connection, $this->state, $this->currentPath, $this->cache, $this->pathProcessor, $this->cacheTagsInvalidator, 'test_routes');
 
@@ -324,7 +324,7 @@ public function testGetAllRoutes() {
   /**
    * Confirms that a trailing slash on the request does not result in a 404.
    */
-  public function testOutlinePathMatchTrailingSlash() {
+  public function testOutlinePathMatchTrailingSlash(): void {
     $connection = Database::getConnection();
     $provider = new RouteProvider($connection, $this->state, $this->currentPath, $this->cache, $this->pathProcessor, $this->cacheTagsInvalidator, 'test_routes');
 
@@ -353,7 +353,7 @@ public function testOutlinePathMatchTrailingSlash() {
   /**
    * Confirms that we can find routes whose pattern would match the request.
    */
-  public function testOutlinePathMatchDefaults() {
+  public function testOutlinePathMatchDefaults(): void {
     $connection = Database::getConnection();
     $provider = new RouteProvider($connection, $this->state, $this->currentPath, $this->cache, $this->pathProcessor, $this->cacheTagsInvalidator, 'test_routes');
 
@@ -391,7 +391,7 @@ public function testOutlinePathMatchDefaults() {
   /**
    * Confirms that we can find routes whose pattern would match the request.
    */
-  public function testOutlinePathMatchDefaultsCollision() {
+  public function testOutlinePathMatchDefaultsCollision(): void {
     $connection = Database::getConnection();
     $provider = new RouteProvider($connection, $this->state, $this->currentPath, $this->cache, $this->pathProcessor, $this->cacheTagsInvalidator, 'test_routes');
 
@@ -430,7 +430,7 @@ public function testOutlinePathMatchDefaultsCollision() {
   /**
    * Confirms that we can find routes whose pattern would match the request.
    */
-  public function testOutlinePathMatchDefaultsCollision2() {
+  public function testOutlinePathMatchDefaultsCollision2(): void {
     $connection = Database::getConnection();
     $provider = new RouteProvider($connection, $this->state, $this->currentPath, $this->cache, $this->pathProcessor, $this->cacheTagsInvalidator, 'test_routes');
 
@@ -469,7 +469,7 @@ public function testOutlinePathMatchDefaultsCollision2() {
   /**
    * Confirms that we can find multiple routes that match the request equally.
    */
-  public function testOutlinePathMatchDefaultsCollision3() {
+  public function testOutlinePathMatchDefaultsCollision3(): void {
     $connection = Database::getConnection();
     $provider = new RouteProvider($connection, $this->state, $this->currentPath, $this->cache, $this->pathProcessor, $this->cacheTagsInvalidator, 'test_routes');
 
@@ -508,7 +508,7 @@ public function testOutlinePathMatchDefaultsCollision3() {
   /**
    * Tests a route with a 0 as value.
    */
-  public function testOutlinePathMatchZero() {
+  public function testOutlinePathMatchZero(): void {
     $connection = Database::getConnection();
     $provider = new RouteProvider($connection, $this->state, $this->currentPath, $this->cache, $this->pathProcessor, $this->cacheTagsInvalidator, 'test_routes');
 
@@ -543,7 +543,7 @@ public function testOutlinePathMatchZero() {
   /**
    * Confirms that an exception is thrown when no matching path is found.
    */
-  public function testOutlinePathNoMatch() {
+  public function testOutlinePathNoMatch(): void {
     $connection = Database::getConnection();
     $provider = new RouteProvider($connection, $this->state, $this->currentPath, $this->cache, $this->pathProcessor, $this->cacheTagsInvalidator, 'test_routes');
 
@@ -567,7 +567,7 @@ public function testOutlinePathNoMatch() {
   /**
    * Tests that route caching works.
    */
-  public function testRouteCaching() {
+  public function testRouteCaching(): void {
     $connection = Database::getConnection();
     $language_manager = \Drupal::languageManager();
     $provider = new RouteProvider($connection, $this->state, $this->currentPath, $this->cache, $this->pathProcessor, $this->cacheTagsInvalidator, 'test_routes', $language_manager);
@@ -659,7 +659,7 @@ public function testRouteCaching() {
   /**
    * Tests RouteProvider::getRouteByName() & RouteProvider::getRoutesByNames().
    */
-  public function testRouteByName() {
+  public function testRouteByName(): void {
     $connection = Database::getConnection();
     $provider = new RouteProvider($connection, $this->state, $this->currentPath, $this->cache, $this->pathProcessor, $this->cacheTagsInvalidator, 'test_routes');
 
@@ -694,7 +694,7 @@ public function testRouteByName() {
   /**
    * Ensures that the routing system is capable of extreme long patterns.
    */
-  public function testGetRoutesByPatternWithLongPatterns() {
+  public function testGetRoutesByPatternWithLongPatterns(): void {
     $connection = Database::getConnection();
     $provider = new TestRouteProvider($connection, $this->state, $this->currentPath, $this->cache, $this->pathProcessor, $this->cacheTagsInvalidator, 'test_routes');
 
diff --git a/core/tests/Drupal/KernelTests/Core/Routing/UrlIntegrationTest.php b/core/tests/Drupal/KernelTests/Core/Routing/UrlIntegrationTest.php
index 1b337b92b926..b71725dec074 100644
--- a/core/tests/Drupal/KernelTests/Core/Routing/UrlIntegrationTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Routing/UrlIntegrationTest.php
@@ -26,7 +26,7 @@ class UrlIntegrationTest extends KernelTestBase {
   /**
    * Ensures that the access() method on \Drupal\Core\Url objects works.
    */
-  public function testAccess() {
+  public function testAccess(): void {
     /** @var \Drupal\user\RoleInterface $role_with_access */
     $role_with_access = Role::create(['id' => 'role_with_access', 'label' => 'With access']);
     $role_with_access->grantPermission('administer users');
diff --git a/core/tests/Drupal/KernelTests/Core/ServiceProvider/ServiceProviderTest.php b/core/tests/Drupal/KernelTests/Core/ServiceProvider/ServiceProviderTest.php
index 19ad485c3b50..b0807f5d41e8 100644
--- a/core/tests/Drupal/KernelTests/Core/ServiceProvider/ServiceProviderTest.php
+++ b/core/tests/Drupal/KernelTests/Core/ServiceProvider/ServiceProviderTest.php
@@ -42,7 +42,7 @@ public function register(ContainerBuilder $container) {
   /**
    * Tests that services provided by module service providers get registered to the DIC.
    */
-  public function testServiceProviderRegistration() {
+  public function testServiceProviderRegistration(): void {
     $definition = $this->container->getDefinition('file.usage');
     $this->assertSame('Drupal\\service_provider_test\\TestFileUsage', $definition->getClass(), 'Class has been changed');
     $this->assertTrue(\Drupal::hasService('service_provider_test_class'), 'The service_provider_test_class service has been registered to the DIC');
@@ -51,7 +51,7 @@ public function testServiceProviderRegistration() {
   /**
    * Tests that the DIC keeps up with module enable/disable in the same request.
    */
-  public function testServiceProviderRegistrationDynamic() {
+  public function testServiceProviderRegistrationDynamic(): void {
     // Uninstall the module and ensure the service provider's service is not registered.
     \Drupal::service('module_installer')->uninstall(['service_provider_test']);
     $this->assertFalse(\Drupal::hasService('service_provider_test_class'), 'The service_provider_test_class service does not exist in the DIC.');
diff --git a/core/tests/Drupal/KernelTests/Core/Session/AccountSwitcherTest.php b/core/tests/Drupal/KernelTests/Core/Session/AccountSwitcherTest.php
index e10da57516b4..ca78d1997acf 100644
--- a/core/tests/Drupal/KernelTests/Core/Session/AccountSwitcherTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Session/AccountSwitcherTest.php
@@ -14,7 +14,7 @@
  */
 class AccountSwitcherTest extends KernelTestBase {
 
-  public function testAccountSwitching() {
+  public function testAccountSwitching(): void {
     $session_handler = $this->container->get('session_handler.write_safe');
     $user = $this->container->get('current_user');
     $switcher = $this->container->get('account_switcher');
diff --git a/core/tests/Drupal/KernelTests/Core/Session/SessionManagerDestroyNoCliCheckTest.php b/core/tests/Drupal/KernelTests/Core/Session/SessionManagerDestroyNoCliCheckTest.php
index 398c3d2dd076..8fc563f9d2ef 100644
--- a/core/tests/Drupal/KernelTests/Core/Session/SessionManagerDestroyNoCliCheckTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Session/SessionManagerDestroyNoCliCheckTest.php
@@ -16,7 +16,7 @@ class SessionManagerDestroyNoCliCheckTest extends KernelTestBase {
   /**
    * Tests starting and destroying a session from the CLI.
    */
-  public function testCallSessionManagerStartAndDestroy() {
+  public function testCallSessionManagerStartAndDestroy(): void {
     $this->assertFalse(\Drupal::service('session_manager')->start());
     $this->assertNull(\Drupal::service('session_manager')->destroy());
   }
diff --git a/core/tests/Drupal/KernelTests/Core/Site/SettingsRewriteTest.php b/core/tests/Drupal/KernelTests/Core/Site/SettingsRewriteTest.php
index 61121ef7c3e4..7d8b28ef37ed 100644
--- a/core/tests/Drupal/KernelTests/Core/Site/SettingsRewriteTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Site/SettingsRewriteTest.php
@@ -18,7 +18,7 @@ class SettingsRewriteTest extends KernelTestBase {
   /**
    * @covers \Drupal\Core\Site\SettingsEditor::rewrite
    */
-  public function testDrupalRewriteSettings() {
+  public function testDrupalRewriteSettings(): void {
     include_once $this->root . '/core/includes/install.inc';
     $site_path = $this->container->getParameter('site.path');
     $tests = [
diff --git a/core/tests/Drupal/KernelTests/Core/StreamWrapper/StreamWrapperManagerTest.php b/core/tests/Drupal/KernelTests/Core/StreamWrapper/StreamWrapperManagerTest.php
index 8df1ccb9d960..5d2fe9e6b9d5 100644
--- a/core/tests/Drupal/KernelTests/Core/StreamWrapper/StreamWrapperManagerTest.php
+++ b/core/tests/Drupal/KernelTests/Core/StreamWrapper/StreamWrapperManagerTest.php
@@ -38,7 +38,7 @@ protected function setUp(): void {
    *
    * @dataProvider providerTestUriScheme
    */
-  public function testUriScheme($uri, $expected) {
+  public function testUriScheme($uri, $expected): void {
     $this->assertSame($expected, StreamWrapperManager::getScheme($uri));
   }
 
diff --git a/core/tests/Drupal/KernelTests/Core/StringTranslation/TranslationStringTest.php b/core/tests/Drupal/KernelTests/Core/StringTranslation/TranslationStringTest.php
index cc2cf7045ecc..e5c3663d4772 100644
--- a/core/tests/Drupal/KernelTests/Core/StringTranslation/TranslationStringTest.php
+++ b/core/tests/Drupal/KernelTests/Core/StringTranslation/TranslationStringTest.php
@@ -35,7 +35,7 @@ protected function setUp(): void {
   /**
    * Tests that TranslatableMarkup objects can be compared.
    */
-  public function testComparison() {
+  public function testComparison(): void {
     $this->rebootAndPrepareSettings();
     $a = \Drupal::service('string_translation')->translate('Example @number', ['@number' => 42], ['langcode' => 'de']);
 
diff --git a/core/tests/Drupal/KernelTests/Core/TempStore/AnonymousPrivateTempStoreTest.php b/core/tests/Drupal/KernelTests/Core/TempStore/AnonymousPrivateTempStoreTest.php
index 6c7e2b99dce3..85aedbd1305e 100644
--- a/core/tests/Drupal/KernelTests/Core/TempStore/AnonymousPrivateTempStoreTest.php
+++ b/core/tests/Drupal/KernelTests/Core/TempStore/AnonymousPrivateTempStoreTest.php
@@ -38,7 +38,7 @@ protected function setUp(): void {
   /**
    * Tests anonymous can get without a previous set.
    */
-  public function testAnonymousCanUsePrivateTempStoreGet() {
+  public function testAnonymousCanUsePrivateTempStoreGet(): void {
     $actual = $this->tempStore->get('foo');
     $this->assertNull($actual);
   }
@@ -46,7 +46,7 @@ public function testAnonymousCanUsePrivateTempStoreGet() {
   /**
    * Tests anonymous can use the PrivateTempStore.
    */
-  public function testAnonymousCanUsePrivateTempStoreSet() {
+  public function testAnonymousCanUsePrivateTempStoreSet(): void {
     $this->tempStore->set('foo', 'bar');
     $metadata1 = $this->tempStore->getMetadata('foo');
 
diff --git a/core/tests/Drupal/KernelTests/Core/TempStore/TempStoreDatabaseTest.php b/core/tests/Drupal/KernelTests/Core/TempStore/TempStoreDatabaseTest.php
index 8d58db8806a1..e78bed732275 100644
--- a/core/tests/Drupal/KernelTests/Core/TempStore/TempStoreDatabaseTest.php
+++ b/core/tests/Drupal/KernelTests/Core/TempStore/TempStoreDatabaseTest.php
@@ -22,7 +22,7 @@ class TempStoreDatabaseTest extends KernelTestBase {
   /**
    * Tests the SharedTempStore API.
    */
-  public function testSharedTempStore() {
+  public function testSharedTempStore(): void {
     // Create testing objects.
     $objects = [];
     for ($i = 0; $i <= 3; $i++) {
diff --git a/core/tests/Drupal/KernelTests/Core/Test/AssertMailTraitTest.php b/core/tests/Drupal/KernelTests/Core/Test/AssertMailTraitTest.php
index ea8369c16736..859f1fe3badd 100644
--- a/core/tests/Drupal/KernelTests/Core/Test/AssertMailTraitTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Test/AssertMailTraitTest.php
@@ -20,7 +20,7 @@ class AssertMailTraitTest extends KernelTestBase {
   /**
    * Tests that the maintenance theme initializes the theme and its base themes.
    */
-  public function testAssertMailTrait() {
+  public function testAssertMailTrait(): void {
     /** @var \Drupal\Core\Mail\MailManagerInterface $mail_service */
     $mail_service = \Drupal::service('plugin.manager.mail');
 
diff --git a/core/tests/Drupal/KernelTests/Core/Test/EnvironmentCleanerTest.php b/core/tests/Drupal/KernelTests/Core/Test/EnvironmentCleanerTest.php
index 218b3418d70a..12fc563de17c 100644
--- a/core/tests/Drupal/KernelTests/Core/Test/EnvironmentCleanerTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Test/EnvironmentCleanerTest.php
@@ -20,7 +20,7 @@ class EnvironmentCleanerTest extends KernelTestBase {
   /**
    * @covers ::doCleanTemporaryDirectories
    */
-  public function testDoCleanTemporaryDirectories() {
+  public function testDoCleanTemporaryDirectories(): void {
     vfsStream::setup('cleanup_test', NULL, [
       'sites' => [
         'simpletest' => [
diff --git a/core/tests/Drupal/KernelTests/Core/Test/PhpUnitBridgeTest.php b/core/tests/Drupal/KernelTests/Core/Test/PhpUnitBridgeTest.php
index 006b20cee690..5480197f406c 100644
--- a/core/tests/Drupal/KernelTests/Core/Test/PhpUnitBridgeTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Test/PhpUnitBridgeTest.php
@@ -17,13 +17,13 @@ class PhpUnitBridgeTest extends KernelTestBase {
 
   protected static $modules = ['deprecation_test'];
 
-  public function testDeprecatedClass() {
+  public function testDeprecatedClass(): void {
     $this->expectDeprecation('Drupal\deprecation_test\Deprecation\FixtureDeprecatedClass is deprecated.');
     $deprecated = new FixtureDeprecatedClass();
     $this->assertEquals('test', $deprecated->testFunction());
   }
 
-  public function testDeprecatedFunction() {
+  public function testDeprecatedFunction(): void {
     $this->expectDeprecation('This is the deprecation message for deprecation_test_function().');
     $this->assertEquals('known_return_value', \deprecation_test_function());
   }
diff --git a/core/tests/Drupal/KernelTests/Core/Theme/BaseThemeMissingTest.php b/core/tests/Drupal/KernelTests/Core/Theme/BaseThemeMissingTest.php
index 12deaf106830..c59f43156f84 100644
--- a/core/tests/Drupal/KernelTests/Core/Theme/BaseThemeMissingTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Theme/BaseThemeMissingTest.php
@@ -46,7 +46,7 @@ protected function setUp(): void {
   /**
    * Tests exception is thrown.
    */
-  public function testMissingBaseThemeException() {
+  public function testMissingBaseThemeException(): void {
     $this->expectException(InfoParserException::class);
     $this->expectExceptionMessage('Missing required key ("base theme") in core/tests/fixtures/test_missing_base_theme/test_missing_base_theme.info.yml, see https://www.drupal.org/node/3066038');
     $this->themeInstaller->install(['test_missing_base_theme']);
diff --git a/core/tests/Drupal/KernelTests/Core/Theme/BaseThemeRequiredTest.php b/core/tests/Drupal/KernelTests/Core/Theme/BaseThemeRequiredTest.php
index 80aab70730b3..3f7c18953d38 100644
--- a/core/tests/Drupal/KernelTests/Core/Theme/BaseThemeRequiredTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Theme/BaseThemeRequiredTest.php
@@ -45,7 +45,7 @@ protected function setUp(): void {
   /**
    * Tests opting out of Stable 9 by setting the base theme to false.
    */
-  public function testWildWest() {
+  public function testWildWest(): void {
     $this->themeInstaller->install(['test_wild_west']);
     $this->config('system.theme')->set('default', 'test_wild_west')->save();
     $theme = $this->themeManager->getActiveTheme();
diff --git a/core/tests/Drupal/KernelTests/Core/Theme/ClaroVerticalTabsTest.php b/core/tests/Drupal/KernelTests/Core/Theme/ClaroVerticalTabsTest.php
index 841432ad607c..15ccdcb24907 100644
--- a/core/tests/Drupal/KernelTests/Core/Theme/ClaroVerticalTabsTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Theme/ClaroVerticalTabsTest.php
@@ -22,7 +22,7 @@ class ClaroVerticalTabsTest extends KernelTestBase {
   /**
    * Confirms that Claro can render vertical tabs correctly.
    */
-  public function testVerticalTabs() {
+  public function testVerticalTabs(): void {
     // Enable the Claro theme.
     \Drupal::service('theme_installer')->install(['claro']);
     $this->config('system.theme')->set('default', 'claro')->save();
diff --git a/core/tests/Drupal/KernelTests/Core/Theme/ConfigImportThemeInstallTest.php b/core/tests/Drupal/KernelTests/Core/Theme/ConfigImportThemeInstallTest.php
index a7ecad019296..6f0ed1a344e8 100644
--- a/core/tests/Drupal/KernelTests/Core/Theme/ConfigImportThemeInstallTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Theme/ConfigImportThemeInstallTest.php
@@ -32,7 +32,7 @@ protected function setUp(): void {
   /**
    * Tests config imports that install and uninstall a theme with dependencies.
    */
-  public function testConfigImportWithThemeWithModuleDependencies() {
+  public function testConfigImportWithThemeWithModuleDependencies(): void {
     $this->container->get('module_installer')->install(['test_module_required_by_theme', 'test_another_module_required_by_theme']);
     $this->container->get('theme_installer')->install(['test_theme_depending_on_modules']);
     $this->assertTrue($this->container->get('theme_handler')->themeExists('test_theme_depending_on_modules'), 'test_theme_depending_on_modules theme installed');
diff --git a/core/tests/Drupal/KernelTests/Core/Theme/FrontMatterTest.php b/core/tests/Drupal/KernelTests/Core/Theme/FrontMatterTest.php
index 895afc92fe39..888db8a0cd73 100644
--- a/core/tests/Drupal/KernelTests/Core/Theme/FrontMatterTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Theme/FrontMatterTest.php
@@ -72,7 +72,7 @@ protected function createTwigTemplate(string $content = ''): string {
    * @covers \Drupal\Core\Template\TwigEnvironment::getTemplateMetadata
    * @covers \Drupal\Component\FrontMatter\Exception\FrontMatterParseException
    */
-  public function testFrontMatterBroken() {
+  public function testFrontMatterBroken(): void {
     $source = "---\ncollection:\n-  key: foo\n  foo: bar\n---\n" . ComponentFrontMatterTest::SOURCE;
     $file = $this->createTwigTemplate($source);
     $this->expectException(SyntaxError::class);
@@ -95,7 +95,7 @@ public function testFrontMatterBroken() {
    *
    * @dataProvider \Drupal\Tests\Component\FrontMatter\FrontMatterTest::providerFrontMatterData
    */
-  public function testFrontMatter($yaml, $line, $content = ComponentFrontMatterTest::SOURCE) {
+  public function testFrontMatter($yaml, $line, $content = ComponentFrontMatterTest::SOURCE): void {
     // Create a temporary Twig template.
     $source = ComponentFrontMatterTest::createFrontMatterSource($yaml, $content);
     $file = $this->createTwigTemplate($source);
diff --git a/core/tests/Drupal/KernelTests/Core/Theme/ImageTest.php b/core/tests/Drupal/KernelTests/Core/Theme/ImageTest.php
index 78890315c6e8..297c1111a174 100644
--- a/core/tests/Drupal/KernelTests/Core/Theme/ImageTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Theme/ImageTest.php
@@ -62,7 +62,7 @@ protected function setUp(): void {
   /**
    * Tests that an image with the sizes attribute is output correctly.
    */
-  public function testThemeImageWithSizes() {
+  public function testThemeImageWithSizes(): void {
     // Test with multipliers.
     $sizes = '(max-width: ' . rand(10, 30) . 'em) 100vw, (max-width: ' . rand(30, 50) . 'em) 50vw, 30vw';
     $image = [
@@ -83,7 +83,7 @@ public function testThemeImageWithSizes() {
   /**
    * Tests that an image with the src attribute is output correctly.
    */
-  public function testThemeImageWithSrc() {
+  public function testThemeImageWithSrc(): void {
 
     $image = [
       '#theme' => 'image',
@@ -102,7 +102,7 @@ public function testThemeImageWithSrc() {
   /**
    * Tests that an image with the srcset and multipliers is output correctly.
    */
-  public function testThemeImageWithSrcsetMultiplier() {
+  public function testThemeImageWithSrcsetMultiplier(): void {
     // Test with multipliers.
     $image = [
       '#theme' => 'image',
@@ -130,7 +130,7 @@ public function testThemeImageWithSrcsetMultiplier() {
   /**
    * Tests that an image with the srcset and widths is output correctly.
    */
-  public function testThemeImageWithSrcsetWidth() {
+  public function testThemeImageWithSrcsetWidth(): void {
     // Test with multipliers.
     $widths = [
       rand(0, 500) . 'w',
diff --git a/core/tests/Drupal/KernelTests/Core/Theme/MaintenanceThemeTest.php b/core/tests/Drupal/KernelTests/Core/Theme/MaintenanceThemeTest.php
index 4e350ee689f5..2a7f8412d345 100644
--- a/core/tests/Drupal/KernelTests/Core/Theme/MaintenanceThemeTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Theme/MaintenanceThemeTest.php
@@ -16,7 +16,7 @@ class MaintenanceThemeTest extends KernelTestBase {
   /**
    * Tests that the maintenance theme initializes the theme and its base themes.
    */
-  public function testMaintenanceTheme() {
+  public function testMaintenanceTheme(): void {
     $this->setSetting('maintenance_theme', 'test_subtheme');
     // Get the maintenance theme loaded.
     drupal_maintenance_theme();
diff --git a/core/tests/Drupal/KernelTests/Core/Theme/MessageTest.php b/core/tests/Drupal/KernelTests/Core/Theme/MessageTest.php
index aaea0758dd5e..8898598e4d0e 100644
--- a/core/tests/Drupal/KernelTests/Core/Theme/MessageTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Theme/MessageTest.php
@@ -21,7 +21,7 @@ class MessageTest extends KernelTestBase {
   /**
    * Tests setting messages output.
    */
-  public function testMessages() {
+  public function testMessages(): void {
     // Enable the Starterkit theme.
     \Drupal::service('theme_installer')->install(['starterkit_theme']);
     $this->config('system.theme')->set('default', 'starterkit_theme')->save();
diff --git a/core/tests/Drupal/KernelTests/Core/Theme/RegistryTest.php b/core/tests/Drupal/KernelTests/Core/Theme/RegistryTest.php
index 0a672d6e3218..7e5ef5f4cfd5 100644
--- a/core/tests/Drupal/KernelTests/Core/Theme/RegistryTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Theme/RegistryTest.php
@@ -31,7 +31,7 @@ class RegistryTest extends KernelTestBase {
   /**
    * Tests the behavior of the theme registry class.
    */
-  public function testRaceCondition() {
+  public function testRaceCondition(): void {
     // The theme registry is not marked as persistable in case we don't have a
     // proper request.
     \Drupal::request()->setMethod('GET');
@@ -69,7 +69,7 @@ public function testRaceCondition() {
   /**
    * Tests the theme registry with multiple subthemes.
    */
-  public function testMultipleSubThemes() {
+  public function testMultipleSubThemes(): void {
     $theme_handler = \Drupal::service('theme_handler');
     \Drupal::service('theme_installer')->install(['test_basetheme', 'test_subtheme', 'test_subsubtheme']);
 
@@ -108,7 +108,7 @@ public function testMultipleSubThemes() {
   /**
    * Tests the theme registry with suggestions.
    */
-  public function testSuggestionPreprocessFunctions() {
+  public function testSuggestionPreprocessFunctions(): void {
     $theme_handler = \Drupal::service('theme_handler');
     \Drupal::service('theme_installer')->install(['test_theme']);
 
@@ -147,7 +147,7 @@ public function testSuggestionPreprocessFunctions() {
   /**
    * Tests that the theme registry can be altered by themes.
    */
-  public function testThemeRegistryAlterByTheme() {
+  public function testThemeRegistryAlterByTheme(): void {
 
     /** @var \Drupal\Core\Extension\ThemeHandlerInterface $theme_handler */
     $theme_handler = \Drupal::service('theme_handler');
@@ -164,7 +164,7 @@ public function testThemeRegistryAlterByTheme() {
   /**
    * Tests front node theme suggestion generation.
    */
-  public function testThemeSuggestions() {
+  public function testThemeSuggestions(): void {
     // Mock the current page as the front page.
     /** @var \Drupal\Core\Path\PathMatcherInterface $path_matcher */
     $path_matcher = $this->prophesize(PathMatcherInterface::class);
@@ -197,7 +197,7 @@ public function testThemeSuggestions() {
   /**
    * Tests page theme suggestions for 200 responses.
    */
-  public function test200ThemeSuggestions() {
+  public function test200ThemeSuggestions(): void {
     $path_matcher = $this->prophesize(PathMatcherInterface::class);
     $path_matcher->isFrontPage()->willReturn(FALSE);
     \Drupal::getContainer()->set('path.matcher', $path_matcher->reveal());
@@ -259,7 +259,7 @@ public function test40xThemeSuggestions(int $httpCode, string $suggestion): void
   /**
    * Tests theme-provided templates that are registered by modules.
    */
-  public function testThemeTemplatesRegisteredByModules() {
+  public function testThemeTemplatesRegisteredByModules(): void {
     $theme_handler = \Drupal::service('theme_handler');
     \Drupal::service('theme_installer')->install(['test_theme']);
 
diff --git a/core/tests/Drupal/KernelTests/Core/Theme/Stable9LibraryOverrideTest.php b/core/tests/Drupal/KernelTests/Core/Theme/Stable9LibraryOverrideTest.php
index 2e3fa0799bac..be6b1fc53427 100644
--- a/core/tests/Drupal/KernelTests/Core/Theme/Stable9LibraryOverrideTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Theme/Stable9LibraryOverrideTest.php
@@ -58,7 +58,7 @@ protected function setUp(): void {
   /**
    * Ensures that Stable 9 overrides all relevant core library assets.
    */
-  public function testStable9LibraryOverrides() {
+  public function testStable9LibraryOverrides(): void {
     // First get the clean library definitions with no active theme.
     $libraries_before = $this->getAllLibraries();
     $libraries_before = $this->removeVendorAssets($libraries_before);
diff --git a/core/tests/Drupal/KernelTests/Core/Theme/Stable9TemplateOverrideTest.php b/core/tests/Drupal/KernelTests/Core/Theme/Stable9TemplateOverrideTest.php
index 7f2598e2fa37..2e50db7e9b72 100644
--- a/core/tests/Drupal/KernelTests/Core/Theme/Stable9TemplateOverrideTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Theme/Stable9TemplateOverrideTest.php
@@ -91,7 +91,7 @@ protected function installAllModules() {
   /**
    * Ensures that Stable 9 overrides all relevant core templates.
    */
-  public function testStable9TemplateOverrides() {
+  public function testStable9TemplateOverrides(): void {
     $registry = new Registry($this->root, \Drupal::cache(), \Drupal::lock(), \Drupal::moduleHandler(), $this->themeHandler, \Drupal::service('theme.initialization'), \Drupal::service('cache.bootstrap'), \Drupal::service('extension.list.module'), \Drupal::service('kernel'), 'stable9');
     $registry->setThemeManager(\Drupal::theme());
 
diff --git a/core/tests/Drupal/KernelTests/Core/Theme/ThemeInstallerTest.php b/core/tests/Drupal/KernelTests/Core/Theme/ThemeInstallerTest.php
index 2ed0fd4650ce..69ef57c8cdb2 100644
--- a/core/tests/Drupal/KernelTests/Core/Theme/ThemeInstallerTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Theme/ThemeInstallerTest.php
@@ -50,7 +50,7 @@ protected function setUp(): void {
   /**
    * Verifies that no themes are installed by default.
    */
-  public function testEmpty() {
+  public function testEmpty(): void {
     $this->assertEmpty($this->extensionConfig()->get('theme'));
 
     $this->assertEmpty(array_keys($this->themeHandler()->listInfo()));
@@ -66,7 +66,7 @@ public function testEmpty() {
   /**
    * Tests installing a theme.
    */
-  public function testInstall() {
+  public function testInstall(): void {
     $name = 'test_basetheme';
 
     $themes = $this->themeHandler()->listInfo();
@@ -89,7 +89,7 @@ public function testInstall() {
   /**
    * Tests installing a sub-theme.
    */
-  public function testInstallSubTheme() {
+  public function testInstallSubTheme(): void {
     $name = 'test_subtheme';
     $base_name = 'test_basetheme';
 
@@ -112,7 +112,7 @@ public function testInstallSubTheme() {
   /**
    * Tests installing a non-existing theme.
    */
-  public function testInstallNonExisting() {
+  public function testInstallNonExisting(): void {
     $name = 'non_existing_theme';
 
     $themes = $this->themeHandler()->listInfo();
@@ -134,7 +134,7 @@ public function testInstallNonExisting() {
   /**
    * Tests installing a theme with a too long name.
    */
-  public function testInstallNameTooLong() {
+  public function testInstallNameTooLong(): void {
     $name = 'test_theme_having_veery_long_name_which_is_too_long';
 
     try {
@@ -150,7 +150,7 @@ public function testInstallNameTooLong() {
   /**
    * Tests installing a theme with the same name as an enabled module.
    */
-  public function testInstallThemeSameNameAsModule() {
+  public function testInstallThemeSameNameAsModule(): void {
     $name = 'name_collision_test';
 
     // Install and uninstall the theme.
@@ -170,7 +170,7 @@ public function testInstallThemeSameNameAsModule() {
    *
    * @dataProvider providerTestInstallThemeWithUnmetModuleDependencies
    */
-  public function testInstallThemeWithUnmetModuleDependencies($theme_name, $installed_modules, $message) {
+  public function testInstallThemeWithUnmetModuleDependencies($theme_name, $installed_modules, $message): void {
     $this->moduleInstaller()->install($installed_modules);
     $themes = $this->themeHandler()->listInfo();
     $this->assertEmpty($themes);
@@ -186,7 +186,7 @@ public function testInstallThemeWithUnmetModuleDependencies($theme_name, $instal
    *
    * @group legacy
    */
-  public function testInstallDeprecated() {
+  public function testInstallDeprecated(): void {
     $this->expectDeprecation("The theme 'deprecated_theme_test' is deprecated. See https://example.com/deprecated");
     $this->themeInstaller()->install(['deprecated_theme_test']);
     $this->assertTrue(\Drupal::service('theme_handler')->themeExists('deprecated_theme_test'));
@@ -238,7 +238,7 @@ public static function providerTestInstallThemeWithUnmetModuleDependencies() {
   /**
    * Tests installing a theme with module dependencies that are met.
    */
-  public function testInstallThemeWithMetModuleDependencies() {
+  public function testInstallThemeWithMetModuleDependencies(): void {
     $name = 'test_theme_depending_on_modules';
     $themes = $this->themeHandler()->listInfo();
     $this->assertArrayNotHasKey($name, $themes);
@@ -254,7 +254,7 @@ public function testInstallThemeWithMetModuleDependencies() {
   /**
    * Tests uninstalling the default theme.
    */
-  public function testUninstallDefault() {
+  public function testUninstallDefault(): void {
     $name = 'stark';
     $other_name = 'olivero';
     $this->themeInstaller()->install([$name, $other_name]);
@@ -281,7 +281,7 @@ public function testUninstallDefault() {
   /**
    * Tests uninstalling the admin theme.
    */
-  public function testUninstallAdmin() {
+  public function testUninstallAdmin(): void {
     $name = 'stark';
     $other_name = 'olivero';
     $this->themeInstaller()->install([$name, $other_name]);
@@ -308,7 +308,7 @@ public function testUninstallAdmin() {
   /**
    * Tests uninstalling a sub-theme.
    */
-  public function testUninstallSubTheme() {
+  public function testUninstallSubTheme(): void {
     $name = 'test_subtheme';
     $base_name = 'test_basetheme';
 
@@ -323,7 +323,7 @@ public function testUninstallSubTheme() {
   /**
    * Tests uninstalling a base theme before its sub-theme.
    */
-  public function testUninstallBaseBeforeSubTheme() {
+  public function testUninstallBaseBeforeSubTheme(): void {
     $name = 'test_basetheme';
     $sub_name = 'test_subtheme';
 
@@ -353,7 +353,7 @@ public function testUninstallBaseBeforeSubTheme() {
   /**
    * Tests uninstalling a non-existing theme.
    */
-  public function testUninstallNonExisting() {
+  public function testUninstallNonExisting(): void {
     $name = 'non_existing_theme';
 
     $themes = $this->themeHandler()->listInfo();
@@ -366,7 +366,7 @@ public function testUninstallNonExisting() {
   /**
    * Tests uninstalling a theme.
    */
-  public function testUninstall() {
+  public function testUninstall(): void {
     $name = 'test_basetheme';
 
     $this->themeInstaller()->install([$name]);
@@ -389,7 +389,7 @@ public function testUninstall() {
   /**
    * Tests uninstalling a theme that is not installed.
    */
-  public function testUninstallNotInstalled() {
+  public function testUninstallNotInstalled(): void {
     $name = 'test_basetheme';
 
     $themes = $this->themeHandler()->listInfo();
@@ -403,7 +403,7 @@ public function testUninstallNotInstalled() {
    *
    * @see module_test_system_info_alter()
    */
-  public function testThemeInfoAlter() {
+  public function testThemeInfoAlter(): void {
     $name = 'stark';
     $this->container->get('state')->set('module_test.hook_system_info_alter', TRUE);
 
diff --git a/core/tests/Drupal/KernelTests/Core/Theme/ThemeSettingsTest.php b/core/tests/Drupal/KernelTests/Core/Theme/ThemeSettingsTest.php
index 00c2220fd2dd..1e7613e33a93 100644
--- a/core/tests/Drupal/KernelTests/Core/Theme/ThemeSettingsTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Theme/ThemeSettingsTest.php
@@ -46,7 +46,7 @@ protected function setUp(): void {
   /**
    * Tests that $theme.settings are imported and used as default theme settings.
    */
-  public function testDefaultConfig() {
+  public function testDefaultConfig(): void {
     $name = 'test_basetheme';
     $path = $this->availableThemes[$name]->getPath();
     $this->assertFileExists("$path/" . InstallStorage::CONFIG_INSTALL_DIRECTORY . "/$name.settings.yml");
@@ -57,7 +57,7 @@ public function testDefaultConfig() {
   /**
    * Tests that the $theme.settings default config file is optional.
    */
-  public function testNoDefaultConfig() {
+  public function testNoDefaultConfig(): void {
     $name = 'stark';
     $path = $this->availableThemes[$name]->getPath();
     $this->assertFileDoesNotExist("$path/" . InstallStorage::CONFIG_INSTALL_DIRECTORY . "/$name.settings.yml");
@@ -68,7 +68,7 @@ public function testNoDefaultConfig() {
   /**
    * Tests that the default logo config can be overridden.
    */
-  public function testLogoConfig() {
+  public function testLogoConfig(): void {
     /** @var \Drupal\Core\Extension\ThemeInstallerInterface $theme_installer */
     $theme_installer = $this->container->get('theme_installer');
     $theme_installer->install(['stark']);
diff --git a/core/tests/Drupal/KernelTests/Core/Theme/TwigEnvironmentTest.php b/core/tests/Drupal/KernelTests/Core/Theme/TwigEnvironmentTest.php
index fe5bf4eaba37..1552dc39a013 100644
--- a/core/tests/Drupal/KernelTests/Core/Theme/TwigEnvironmentTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Theme/TwigEnvironmentTest.php
@@ -33,7 +33,7 @@ class TwigEnvironmentTest extends KernelTestBase {
   /**
    * Tests inline templates.
    */
-  public function testInlineTemplate() {
+  public function testInlineTemplate(): void {
     /** @var \Drupal\Core\Render\RendererInterface $renderer */
     $renderer = $this->container->get('renderer');
     /** @var \Drupal\Core\Template\TwigEnvironment $environment */
@@ -103,7 +103,7 @@ public function testInlineTemplate() {
   /**
    * Tests that exceptions are thrown when a template is not found.
    */
-  public function testTemplateNotFoundException() {
+  public function testTemplateNotFoundException(): void {
     /** @var \Drupal\Core\Template\TwigEnvironment $environment */
     $environment = \Drupal::service('twig');
 
@@ -119,7 +119,7 @@ public function testTemplateNotFoundException() {
   /**
    * Ensures that templates resolve to the same class name and cache file.
    */
-  public function testTemplateClassname() {
+  public function testTemplateClassname(): void {
     /** @var \Drupal\Core\Template\TwigEnvironment $environment */
     $environment = \Drupal::service('twig');
 
@@ -148,7 +148,7 @@ public function testTemplateClassname() {
   /**
    * Ensures that cacheFilename() varies by extensions + deployment identifier.
    */
-  public function testCacheFilename() {
+  public function testCacheFilename(): void {
     /** @var \Drupal\Core\Template\TwigEnvironment $environment */
     // Note: Later we refetch the twig service in order to bypass its internal
     // static cache.
@@ -198,7 +198,7 @@ public function register(ContainerBuilder $container) {
   /**
    * Tests template invalidation.
    */
-  public function testTemplateInvalidation() {
+  public function testTemplateInvalidation(): void {
     $template_before = <<<TWIG
 <div>Hello before</div>
 TWIG;
@@ -234,7 +234,7 @@ public function testTemplateInvalidation() {
   /**
    * Test twig file prefix change.
    */
-  public function testTwigFilePrefixChange() {
+  public function testTwigFilePrefixChange(): void {
     /** @var \Drupal\Core\Template\TwigEnvironment $environment */
     $environment = \Drupal::service('twig');
     $cache_prefixes = [];
diff --git a/core/tests/Drupal/KernelTests/Core/Theme/TwigMarkupInterfaceTest.php b/core/tests/Drupal/KernelTests/Core/Theme/TwigMarkupInterfaceTest.php
index b7fb86ff9cf7..dbdc813d1338 100644
--- a/core/tests/Drupal/KernelTests/Core/Theme/TwigMarkupInterfaceTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Theme/TwigMarkupInterfaceTest.php
@@ -33,7 +33,7 @@ class TwigMarkupInterfaceTest extends KernelTestBase {
   /**
    * @dataProvider providerTestMarkupInterfaceEmpty
    */
-  public function testMarkupInterfaceEmpty($expected, $variable) {
+  public function testMarkupInterfaceEmpty($expected, $variable): void {
     $this->assertSame($expected, (string) $this->renderObjectWithTwig($variable));
   }
 
@@ -61,7 +61,7 @@ public static function providerTestMarkupInterfaceEmpty() {
   /**
    * Tests behavior if a string is translated to become an empty string.
    */
-  public function testEmptyTranslation() {
+  public function testEmptyTranslation(): void {
     $settings = Settings::getAll();
     $settings['locale_custom_strings_en'] = ['' => ['test' => '']];
     // Recreate the settings static.
diff --git a/core/tests/Drupal/KernelTests/Core/Theme/TwigWhiteListTest.php b/core/tests/Drupal/KernelTests/Core/Theme/TwigWhiteListTest.php
index c78854623d2e..a34dc73edea7 100644
--- a/core/tests/Drupal/KernelTests/Core/Theme/TwigWhiteListTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Theme/TwigWhiteListTest.php
@@ -121,7 +121,7 @@ protected function setUp(): void {
   /**
    * Tests white-listing of methods doesn't interfere with chaining.
    */
-  public function testWhiteListChaining() {
+  public function testWhiteListChaining(): void {
     /** @var \Drupal\Core\Template\TwigEnvironment $environment */
     $environment = \Drupal::service('twig');
     $node = Node::create([
diff --git a/core/tests/Drupal/KernelTests/Core/TypedData/AllowedValuesConstraintValidatorTest.php b/core/tests/Drupal/KernelTests/Core/TypedData/AllowedValuesConstraintValidatorTest.php
index b6a7c0a6dedf..acefd78cd723 100644
--- a/core/tests/Drupal/KernelTests/Core/TypedData/AllowedValuesConstraintValidatorTest.php
+++ b/core/tests/Drupal/KernelTests/Core/TypedData/AllowedValuesConstraintValidatorTest.php
@@ -35,7 +35,7 @@ protected function setUp(): void {
    *
    * For testing we define an integer with a set of allowed values.
    */
-  public function testValidation() {
+  public function testValidation(): void {
     // Create a definition that specifies some AllowedValues.
     $definition = DataDefinition::create('integer')
       ->addConstraint('AllowedValues', [1, 2, 3]);
@@ -65,7 +65,7 @@ public function testValidation() {
   /**
    * Tests the AllowedValuesConstraintValidator with callbacks.
    */
-  public function testValidationCallback() {
+  public function testValidationCallback(): void {
     // Create a definition that specifies some AllowedValues and a callback.
     // This tests that callbacks have a higher priority than a supplied list of
     // values and can be used to coerce the value to the correct type.
@@ -105,7 +105,7 @@ public static function allowedValueCallback() {
   /**
    * Tests the AllowedValuesConstraintValidator with an invalid callback.
    */
-  public function testValidationCallbackException() {
+  public function testValidationCallbackException(): void {
     // Create a definition that specifies some AllowedValues and a callback.
     // This tests that callbacks have a higher priority than a supplied list of
     // values and can be used to coerce the value to the correct type.
diff --git a/core/tests/Drupal/KernelTests/Core/TypedData/ComplexDataConstraintValidatorTest.php b/core/tests/Drupal/KernelTests/Core/TypedData/ComplexDataConstraintValidatorTest.php
index aade322cddfd..17934095205a 100644
--- a/core/tests/Drupal/KernelTests/Core/TypedData/ComplexDataConstraintValidatorTest.php
+++ b/core/tests/Drupal/KernelTests/Core/TypedData/ComplexDataConstraintValidatorTest.php
@@ -35,7 +35,7 @@ protected function setUp(): void {
    *
    * For testing a map including a constraint on one of its keys is defined.
    */
-  public function testValidation() {
+  public function testValidation(): void {
     // Create a definition that specifies some ComplexData constraint.
     $definition = MapDataDefinition::create()
       ->setPropertyDefinition('key', DataDefinition::create('integer'))
diff --git a/core/tests/Drupal/KernelTests/Core/TypedData/RecursiveContextualValidatorTest.php b/core/tests/Drupal/KernelTests/Core/TypedData/RecursiveContextualValidatorTest.php
index 6646fb2cc5f6..cdc9a3da703f 100644
--- a/core/tests/Drupal/KernelTests/Core/TypedData/RecursiveContextualValidatorTest.php
+++ b/core/tests/Drupal/KernelTests/Core/TypedData/RecursiveContextualValidatorTest.php
@@ -35,7 +35,7 @@ protected function setUp(): void {
   /**
    * Tests recursive validation against given constraints against an entity.
    */
-  public function testRecursiveValidate() {
+  public function testRecursiveValidate(): void {
     $entity = EntityTest::create();
     $adapter = EntityAdapter::createFromEntity($entity);
     // This would trigger the ValidReferenceConstraint due to EntityTest
@@ -47,7 +47,7 @@ public function testRecursiveValidate() {
   /**
    * Tests recursive propagation of violations.
    */
-  public function testRecursiveViolationPropagation() {
+  public function testRecursiveViolationPropagation(): void {
     // We create an entity reference field with a constraint which will
     // trigger the validation of the referenced entities. Then we add a
     // required field and populate it only on the parent entity, so that
diff --git a/core/tests/Drupal/KernelTests/Core/TypedData/TypedDataDefinitionTest.php b/core/tests/Drupal/KernelTests/Core/TypedData/TypedDataDefinitionTest.php
index 045ac2973791..7c0580ff0648 100644
--- a/core/tests/Drupal/KernelTests/Core/TypedData/TypedDataDefinitionTest.php
+++ b/core/tests/Drupal/KernelTests/Core/TypedData/TypedDataDefinitionTest.php
@@ -40,7 +40,7 @@ protected function setUp(): void {
   /**
    * Tests deriving metadata about list items.
    */
-  public function testLists() {
+  public function testLists(): void {
     $list_definition = ListDataDefinition::create('string');
     $this->assertInstanceOf(ListDataDefinitionInterface::class, $list_definition);
     $item_definition = $list_definition->getItemDefinition();
@@ -63,7 +63,7 @@ public function testLists() {
   /**
    * Tests deriving metadata about maps.
    */
-  public function testMaps() {
+  public function testMaps(): void {
     $map_definition = MapDataDefinition::create()
       ->setPropertyDefinition('one', DataDefinition::create('string'))
       ->setPropertyDefinition('two', DataDefinition::create('string'))
@@ -89,7 +89,7 @@ public function testMaps() {
   /**
    * Tests deriving metadata from data references.
    */
-  public function testDataReferences() {
+  public function testDataReferences(): void {
     $language_reference_definition = DataReferenceDefinition::create('language');
     $this->assertInstanceOf(DataReferenceDefinitionInterface::class, $language_reference_definition);
 
@@ -105,7 +105,7 @@ public function testDataReferences() {
   /**
    * Tests getString() throws exception when getType() is not implemented.
    */
-  public function testNotImplementedGetType() {
+  public function testNotImplementedGetType(): void {
     $language_reference_definition = DataReferenceDefinition::create('language');
     $language_reference = $this->typedDataManager->create($language_reference_definition);
     $this->assertInstanceOf(DataReferenceInterface::class, $language_reference);
diff --git a/core/tests/Drupal/KernelTests/Core/TypedData/TypedDataTest.php b/core/tests/Drupal/KernelTests/Core/TypedData/TypedDataTest.php
index bc69a3401343..a7048f38eef0 100644
--- a/core/tests/Drupal/KernelTests/Core/TypedData/TypedDataTest.php
+++ b/core/tests/Drupal/KernelTests/Core/TypedData/TypedDataTest.php
@@ -72,7 +72,7 @@ protected function createTypedData($definition, $value = NULL, $name = NULL) {
   /**
    * Tests the basics around constructing and working with typed data objects.
    */
-  public function testGetAndSet() {
+  public function testGetAndSet(): void {
     // Boolean type.
     $typed_data = $this->createTypedData(['type' => 'boolean'], TRUE);
     $this->assertInstanceOf(BooleanInterface::class, $typed_data);
@@ -386,7 +386,7 @@ public function testGetAndSet() {
   /**
    * Tests using typed data lists.
    */
-  public function testTypedDataLists() {
+  public function testTypedDataLists(): void {
     // Test working with an existing list of strings.
     $value = ['one', 'two', 'three'];
     $typed_data = $this->createTypedData(ListDataDefinition::create('string'), $value);
@@ -465,7 +465,7 @@ public function testTypedDataLists() {
   /**
    * Tests the filter() method on typed data lists.
    */
-  public function testTypedDataListsFilter() {
+  public function testTypedDataListsFilter(): void {
     // Check that an all-pass filter leaves the list untouched.
     $value = ['zero', 'one'];
     $typed_data = $this->createTypedData(ListDataDefinition::create('string'), $value);
@@ -502,7 +502,7 @@ public function testTypedDataListsFilter() {
   /**
    * Tests using a typed data map.
    */
-  public function testTypedDataMaps() {
+  public function testTypedDataMaps(): void {
     // Test working with a simple map.
     $value = [
       'one' => 'eins',
@@ -599,7 +599,7 @@ public function testTypedDataMaps() {
   /**
    * Tests typed data validation.
    */
-  public function testTypedDataValidation() {
+  public function testTypedDataValidation(): void {
     $definition = DataDefinition::create('integer')
       ->setConstraints([
         'Range' => ['min' => 5],
diff --git a/core/tests/Drupal/KernelTests/Core/Updater/UpdaterTest.php b/core/tests/Drupal/KernelTests/Core/Updater/UpdaterTest.php
index 36d0c858f597..c63b10f85404 100644
--- a/core/tests/Drupal/KernelTests/Core/Updater/UpdaterTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Updater/UpdaterTest.php
@@ -23,7 +23,7 @@ class UpdaterTest extends KernelTestBase {
    *
    * @see https://drupal.org/node/2409515
    */
-  public function testGetProjectTitleWithChild() {
+  public function testGetProjectTitleWithChild(): void {
     // Get the project title from its directory. If it can't find the title
     // it will choose the first project title in the directory.
     $directory = $this->root . '/core/modules/system/tests/modules/module_handler_test_multiple';
diff --git a/core/tests/Drupal/KernelTests/Core/Url/LinkGenerationTest.php b/core/tests/Drupal/KernelTests/Core/Url/LinkGenerationTest.php
index fb81a8018a06..395bf9055e83 100644
--- a/core/tests/Drupal/KernelTests/Core/Url/LinkGenerationTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Url/LinkGenerationTest.php
@@ -21,7 +21,7 @@ class LinkGenerationTest extends KernelTestBase {
   /**
    * Tests how hook_link_alter() can affect escaping of the link text.
    */
-  public function testHookLinkAlter() {
+  public function testHookLinkAlter(): void {
     $url = Url::fromUri('http://example.com');
     $renderer = \Drupal::service('renderer');
 
diff --git a/core/tests/Drupal/KernelTests/Core/Validation/ConstraintFactoryTest.php b/core/tests/Drupal/KernelTests/Core/Validation/ConstraintFactoryTest.php
index 3b9326814a40..626f304f7b25 100644
--- a/core/tests/Drupal/KernelTests/Core/Validation/ConstraintFactoryTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Validation/ConstraintFactoryTest.php
@@ -24,7 +24,7 @@ class ConstraintFactoryTest extends KernelTestBase {
   /**
    * @covers ::createInstance
    */
-  public function testCreateInstance() {
+  public function testCreateInstance(): void {
     $constraint_manager = \Drupal::typedDataManager()->getValidationConstraintManager();
 
     // If the plugin is a \Symfony\Component\Validator\Constraint, they will be
diff --git a/core/tests/Drupal/KernelTests/Core/Validation/ConstraintsTest.php b/core/tests/Drupal/KernelTests/Core/Validation/ConstraintsTest.php
index 7caeadd50a4c..7eec6908d60c 100644
--- a/core/tests/Drupal/KernelTests/Core/Validation/ConstraintsTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Validation/ConstraintsTest.php
@@ -30,7 +30,7 @@ protected function setUp(): void {
   /**
    * @see \Drupal\Core\Validation\Plugin\Validation\Constraint\UuidConstraint
    */
-  public function testUuid() {
+  public function testUuid(): void {
     $typed_config_manager = \Drupal::service('config.typed');
     /** @var \Drupal\Core\Config\Schema\TypedConfigInterface $typed_config */
     $typed_config = $typed_config_manager->get('config_test.validation');
diff --git a/core/tests/Drupal/KernelTests/Core/Validation/UniqueFieldConstraintTest.php b/core/tests/Drupal/KernelTests/Core/Validation/UniqueFieldConstraintTest.php
index 22adbfbe19ef..1bf767970b22 100644
--- a/core/tests/Drupal/KernelTests/Core/Validation/UniqueFieldConstraintTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Validation/UniqueFieldConstraintTest.php
@@ -33,7 +33,7 @@ class UniqueFieldConstraintTest extends KernelTestBase {
    *
    * @covers ::validate
    */
-  public function testEntityWithStringId() {
+  public function testEntityWithStringId(): void {
     $this->installEntitySchema('entity_test_string_id');
 
     EntityTestStringId::create([
@@ -69,7 +69,7 @@ public function testEntityWithStringId() {
    *
    * @dataProvider providerTestEntityWithStringIdWithViolation
    */
-  public function testEntityWithStringIdWithViolation($id) {
+  public function testEntityWithStringIdWithViolation($id): void {
     $this->installEntitySchema('entity_test_string_id');
 
     $value = $this->randomString();
@@ -124,7 +124,7 @@ public static function providerTestEntityWithStringIdWithViolation() {
    *
    * @covers ::validate
    */
-  public function testViolationDespiteNoAccess() {
+  public function testViolationDespiteNoAccess(): void {
     $this->installEntitySchema('entity_test');
 
     // Create and save an entity with a given field value in the field that has
diff --git a/core/tests/Drupal/KernelTests/Core/Validation/UniqueValuesConstraintValidatorTest.php b/core/tests/Drupal/KernelTests/Core/Validation/UniqueValuesConstraintValidatorTest.php
index 304fa191cdb4..78cfaea2fc34 100644
--- a/core/tests/Drupal/KernelTests/Core/Validation/UniqueValuesConstraintValidatorTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Validation/UniqueValuesConstraintValidatorTest.php
@@ -47,7 +47,7 @@ protected function setUp(): void {
    *
    * @covers ::validate
    */
-  public function testValidation() {
+  public function testValidation(): void {
     // Create entity with two values for the testing field.
     $definition = [
       'id' => (int) rand(0, getrandmax()),
@@ -114,7 +114,7 @@ public function testValidation() {
    *
    * @covers ::validate
    */
-  public function testValidationReference() {
+  public function testValidationReference(): void {
 
     $users = [];
     for ($i = 0; $i <= 5; $i++) {
@@ -190,7 +190,7 @@ public function testValidationReference() {
    *
    * @covers ::validate
    */
-  public function testValidationOwn() {
+  public function testValidationOwn(): void {
     // Create new entity with two identical values for the testing field.
     $definition = [
       'user_id' => 0,
@@ -238,7 +238,7 @@ public function testValidationOwn() {
    *
    * @covers ::validate
    */
-  public function testValidationMultiple() {
+  public function testValidationMultiple(): void {
     // Create entity with two different values for the testing field.
     $definition = [
       'user_id' => 0,
diff --git a/core/tests/Drupal/KernelTests/KernelTestBaseShutdownTest.php b/core/tests/Drupal/KernelTests/KernelTestBaseShutdownTest.php
index 570d3f8c4cc3..4b99b24b1aad 100644
--- a/core/tests/Drupal/KernelTests/KernelTestBaseShutdownTest.php
+++ b/core/tests/Drupal/KernelTests/KernelTestBaseShutdownTest.php
@@ -39,7 +39,7 @@ protected function setUp(): void {
   /**
    * @covers ::assertPostConditions
    */
-  public function testShutdownFunction() {
+  public function testShutdownFunction(): void {
     $this->expectedShutdownCalled = ['shutdownFunction', 'shutdownFunction2'];
     drupal_register_shutdown_function([$this, 'shutdownFunction']);
   }
@@ -47,7 +47,7 @@ public function testShutdownFunction() {
   /**
    * @covers ::assertPostConditions
    */
-  public function testNoShutdownFunction() {
+  public function testNoShutdownFunction(): void {
     $this->expectedShutdownCalled = [];
   }
 
diff --git a/core/tests/Drupal/KernelTests/KernelTestBaseTest.php b/core/tests/Drupal/KernelTests/KernelTestBaseTest.php
index 55c27fa4c0ca..add76e05fbce 100644
--- a/core/tests/Drupal/KernelTests/KernelTestBaseTest.php
+++ b/core/tests/Drupal/KernelTests/KernelTestBaseTest.php
@@ -25,7 +25,7 @@ class KernelTestBaseTest extends KernelTestBase {
   /**
    * @covers ::setUpBeforeClass
    */
-  public function testSetUpBeforeClass() {
+  public function testSetUpBeforeClass(): void {
     // Note: PHPUnit automatically restores the original working directory.
     $this->assertSame(realpath(__DIR__ . '/../../../../'), getcwd());
   }
@@ -33,7 +33,7 @@ public function testSetUpBeforeClass() {
   /**
    * @covers ::bootEnvironment
    */
-  public function testBootEnvironment() {
+  public function testBootEnvironment(): void {
     $this->assertMatchesRegularExpression('/^test\d{8}$/', $this->databasePrefix);
     $this->assertStringStartsWith('vfs://root/sites/simpletest/', $this->siteDirectory);
     $this->assertEquals([
@@ -56,7 +56,7 @@ public function testBootEnvironment() {
   /**
    * @covers ::getDatabaseConnectionInfo
    */
-  public function testGetDatabaseConnectionInfoWithOutManualSetDbUrl() {
+  public function testGetDatabaseConnectionInfoWithOutManualSetDbUrl(): void {
     $options = $this->container->get('database')->getConnectionOptions();
     $this->assertSame($this->databasePrefix, $options['prefix']);
   }
@@ -64,7 +64,7 @@ public function testGetDatabaseConnectionInfoWithOutManualSetDbUrl() {
   /**
    * @covers ::setUp
    */
-  public function testSetUp() {
+  public function testSetUp(): void {
     $this->assertTrue($this->container->has('request_stack'));
     $this->assertTrue($this->container->initialized('request_stack'));
     $request = $this->container->get('request_stack')->getCurrentRequest();
@@ -94,7 +94,7 @@ public function testSetUp() {
    * @covers ::setUp
    * @depends testSetUp
    */
-  public function testSetUpDoesNotLeak() {
+  public function testSetUpDoesNotLeak(): void {
     // Ensure that we have a different database prefix.
     $schema = $this->container->get('database')->schema();
     $this->assertFalse($schema->tableExists('foo'));
@@ -103,7 +103,7 @@ public function testSetUpDoesNotLeak() {
   /**
    * @covers ::register
    */
-  public function testRegister() {
+  public function testRegister(): void {
     // Verify that this container is identical to the actual container.
     $this->assertInstanceOf('Symfony\Component\DependencyInjection\ContainerInterface', $this->container);
     $this->assertSame($this->container, \Drupal::getContainer());
@@ -142,7 +142,7 @@ public function testRegister() {
    *
    * @see ::testSubsequentContainerIsolation()
    */
-  public function testContainerIsolation() {
+  public function testContainerIsolation(): void {
     $this->enableModules(['system', 'user']);
     $this->assertNull($this->installConfig('user'));
   }
@@ -152,7 +152,7 @@ public function testContainerIsolation() {
    *
    * @depends testContainerIsolation
    */
-  public function testSubsequentContainerIsolation() {
+  public function testSubsequentContainerIsolation(): void {
     $this->enableModules(['system', 'user']);
     $this->assertNull($this->installConfig('user'));
   }
@@ -160,7 +160,7 @@ public function testSubsequentContainerIsolation() {
   /**
    * Tests that an outbound HTTP request can be performed inside of a test.
    */
-  public function testOutboundHttpRequest() {
+  public function testOutboundHttpRequest(): void {
     // The middleware test.http_client.middleware calls drupal_generate_test_ua
     // which checks the DRUPAL_TEST_IN_CHILD_SITE constant, that is not defined
     // in Kernel tests.
@@ -178,7 +178,7 @@ public function testOutboundHttpRequest() {
   /**
    * @covers ::render
    */
-  public function testRender() {
+  public function testRender(): void {
     $type = 'processed_text';
     $element_info = $this->container->get('element_info');
     $this->assertSame(['#defaults_loaded' => TRUE], $element_info->getInfo($type));
@@ -206,7 +206,7 @@ public function testRender() {
   /**
    * @covers ::render
    */
-  public function testRenderWithTheme() {
+  public function testRenderWithTheme(): void {
     $this->enableModules(['system']);
 
     $build = [
@@ -226,7 +226,7 @@ public function testRenderWithTheme() {
   /**
    * @covers ::bootKernel
    */
-  public function testBootKernel() {
+  public function testBootKernel(): void {
     $this->assertNull($this->container->get('request_stack')->getParentRequest(), 'There should only be one request on the stack');
     $this->assertEquals('public', \Drupal::config('system.file')->get('default_scheme'));
   }
@@ -250,7 +250,7 @@ public function testSessionOnRequest(): void {
   /**
    * Tests the assumption that local time is in 'Australia/Sydney'.
    */
-  public function testLocalTimeZone() {
+  public function testLocalTimeZone(): void {
     // The 'Australia/Sydney' time zone is set in core/tests/bootstrap.php
     $this->assertEquals('Australia/Sydney', date_default_timezone_get());
   }
@@ -284,7 +284,7 @@ protected function tearDown(): void {
   /**
    * Ensures KernelTestBase tests can access modules in profiles.
    */
-  public function testProfileModules() {
+  public function testProfileModules(): void {
     $this->assertFileExists('core/profiles/demo_umami/modules/demo_umami_content/demo_umami_content.info.yml');
     $this->assertSame(
       'core/profiles/demo_umami/modules/demo_umami_content/demo_umami_content.info.yml',
@@ -295,7 +295,7 @@ public function testProfileModules() {
   /**
    * Tests the dump() function provided by the var-dumper Symfony component.
    */
-  public function testVarDump() {
+  public function testVarDump(): void {
     // Append the stream capturer to the STDERR stream, so that we can test the
     // dump() output and also prevent it from actually outputting in this
     // particular test.
@@ -315,7 +315,7 @@ public function testVarDump() {
   /**
    * @covers ::bootEnvironment
    */
-  public function testDatabaseDriverModuleEnabled() {
+  public function testDatabaseDriverModuleEnabled(): void {
     $module = Database::getConnection()->getProvider();
 
     // Test that the module that is providing the database driver is enabled.
diff --git a/core/tests/Drupal/KernelTests/RequestProcessing/RedirectOnExceptionTest.php b/core/tests/Drupal/KernelTests/RequestProcessing/RedirectOnExceptionTest.php
index c9caef6ea7e3..6eb25fc0ad27 100644
--- a/core/tests/Drupal/KernelTests/RequestProcessing/RedirectOnExceptionTest.php
+++ b/core/tests/Drupal/KernelTests/RequestProcessing/RedirectOnExceptionTest.php
@@ -20,7 +20,7 @@ class RedirectOnExceptionTest extends KernelTestBase {
    */
   protected static $modules = ['system', 'test_page_test'];
 
-  public function testRedirectOn404() {
+  public function testRedirectOn404(): void {
     \Drupal::configFactory()->getEditable('system.site')
       ->set('page.404', '/test-http-response-exception/' . Response::HTTP_PERMANENTLY_REDIRECT)
       ->save();
diff --git a/core/tests/Drupal/Tests/CSpell/SortTest.php b/core/tests/Drupal/Tests/CSpell/SortTest.php
index 1b55eb542ce2..be073955fbbc 100644
--- a/core/tests/Drupal/Tests/CSpell/SortTest.php
+++ b/core/tests/Drupal/Tests/CSpell/SortTest.php
@@ -28,14 +28,14 @@ protected function setUp(): void {
   /**
    * Tests that the file exists.
    */
-  public function testFileExists() {
+  public function testFileExists(): void {
     $this->assertFileExists($this->filePath);
   }
 
   /**
    * Tests that the file is properly sorted.
    */
-  public function testSorted() {
+  public function testSorted(): void {
     $content = file_get_contents($this->filePath);
     $this->assertIsString($content);
     $current_dictionary = explode("\n", rtrim($content));
diff --git a/core/tests/Drupal/Tests/Component/Annotation/AnnotatedClassDiscoveryCachedTest.php b/core/tests/Drupal/Tests/Component/Annotation/AnnotatedClassDiscoveryCachedTest.php
index 944f479a7cd8..07a9fab674fb 100644
--- a/core/tests/Drupal/Tests/Component/Annotation/AnnotatedClassDiscoveryCachedTest.php
+++ b/core/tests/Drupal/Tests/Component/Annotation/AnnotatedClassDiscoveryCachedTest.php
@@ -32,7 +32,7 @@ protected function setUp(): void {
    *
    * @covers ::getDefinitions
    */
-  public function testGetDefinitions() {
+  public function testGetDefinitions(): void {
     // Path to the classes which we'll discover and parse annotation.
     $discovery_path = __DIR__ . '/Fixtures';
     // File path that should be discovered within that directory.
diff --git a/core/tests/Drupal/Tests/Component/Annotation/AnnotatedClassDiscoveryTest.php b/core/tests/Drupal/Tests/Component/Annotation/AnnotatedClassDiscoveryTest.php
index 97e1a6bec507..a83d030b2aff 100644
--- a/core/tests/Drupal/Tests/Component/Annotation/AnnotatedClassDiscoveryTest.php
+++ b/core/tests/Drupal/Tests/Component/Annotation/AnnotatedClassDiscoveryTest.php
@@ -31,7 +31,7 @@ protected function setUp(): void {
    * @covers ::__construct
    * @covers ::getPluginNamespaces
    */
-  public function testGetPluginNamespaces() {
+  public function testGetPluginNamespaces(): void {
     $discovery = new AnnotatedClassDiscovery(['com/example' => [__DIR__]]);
 
     $reflection = new \ReflectionMethod($discovery, 'getPluginNamespaces');
@@ -44,7 +44,7 @@ public function testGetPluginNamespaces() {
    * @covers ::prepareAnnotationDefinition
    * @covers ::getAnnotationReader
    */
-  public function testGetDefinitions() {
+  public function testGetDefinitions(): void {
     $discovery = new AnnotatedClassDiscovery(['com\example' => [__DIR__ . '/Fixtures']]);
     $this->assertEquals([
       'discovery_test_1' => [
diff --git a/core/tests/Drupal/Tests/Component/Annotation/AnnotationBaseTest.php b/core/tests/Drupal/Tests/Component/Annotation/AnnotationBaseTest.php
index 28824ecb5d93..80f3b31f82be 100644
--- a/core/tests/Drupal/Tests/Component/Annotation/AnnotationBaseTest.php
+++ b/core/tests/Drupal/Tests/Component/Annotation/AnnotationBaseTest.php
@@ -17,7 +17,7 @@ class AnnotationBaseTest extends TestCase {
    * @covers ::getProvider
    * @covers ::setProvider
    */
-  public function testSetProvider() {
+  public function testSetProvider(): void {
     $plugin = new AnnotationBaseStub();
     $plugin->setProvider('example');
     $this->assertEquals('example', $plugin->getProvider());
@@ -26,7 +26,7 @@ public function testSetProvider() {
   /**
    * @covers ::getId
    */
-  public function testGetId() {
+  public function testGetId(): void {
     $plugin = new AnnotationBaseStub();
     // Doctrine sets the public prop directly.
     $plugin->id = 'example';
@@ -37,7 +37,7 @@ public function testGetId() {
    * @covers ::getClass
    * @covers ::setClass
    */
-  public function testSetClass() {
+  public function testSetClass(): void {
     $plugin = new AnnotationBaseStub();
     $plugin->setClass('example');
     $this->assertEquals('example', $plugin->getClass());
diff --git a/core/tests/Drupal/Tests/Component/Annotation/DocParserIgnoredClassesTest.php b/core/tests/Drupal/Tests/Component/Annotation/DocParserIgnoredClassesTest.php
index 7ef3f2638a63..c211193d1fd5 100644
--- a/core/tests/Drupal/Tests/Component/Annotation/DocParserIgnoredClassesTest.php
+++ b/core/tests/Drupal/Tests/Component/Annotation/DocParserIgnoredClassesTest.php
@@ -20,7 +20,7 @@ class DocParserIgnoredClassesTest extends TestCase {
    * Drupal's DocParser should never use class_exists() on an ignored
    * annotation, including cases where namespaces are set.
    */
-  public function testIgnoredAnnotationSkippedBeforeReflection() {
+  public function testIgnoredAnnotationSkippedBeforeReflection(): void {
     $annotation = 'neverReflectThis';
     $parser = new DocParser();
     $parser->setIgnoredAnnotationNames([$annotation => TRUE]);
diff --git a/core/tests/Drupal/Tests/Component/Annotation/MockFileFinderTest.php b/core/tests/Drupal/Tests/Component/Annotation/MockFileFinderTest.php
index be571a20584f..6511a2c980c2 100644
--- a/core/tests/Drupal/Tests/Component/Annotation/MockFileFinderTest.php
+++ b/core/tests/Drupal/Tests/Component/Annotation/MockFileFinderTest.php
@@ -17,7 +17,7 @@ class MockFileFinderTest extends TestCase {
    * @covers ::create
    * @covers ::findFile
    */
-  public function testFindFile() {
+  public function testFindFile(): void {
     $tmp = MockFileFinder::create('test_filename.txt');
     $this->assertEquals('test_filename.txt', $tmp->findFile('n/a'));
     $this->assertEquals('test_filename.txt', $tmp->findFile('SomeClass'));
diff --git a/core/tests/Drupal/Tests/Component/Annotation/Plugin/Discovery/AnnotationBridgeDecoratorTest.php b/core/tests/Drupal/Tests/Component/Annotation/Plugin/Discovery/AnnotationBridgeDecoratorTest.php
index d4fbd465c76d..ab59964f3396 100644
--- a/core/tests/Drupal/Tests/Component/Annotation/Plugin/Discovery/AnnotationBridgeDecoratorTest.php
+++ b/core/tests/Drupal/Tests/Component/Annotation/Plugin/Discovery/AnnotationBridgeDecoratorTest.php
@@ -22,7 +22,7 @@ class AnnotationBridgeDecoratorTest extends TestCase {
   /**
    * @covers ::getDefinitions
    */
-  public function testGetDefinitions() {
+  public function testGetDefinitions(): void {
     $definitions = [];
     $definitions['object'] = new ObjectDefinition(['id' => 'foo']);
     $definitions['array'] = ['id' => 'bar'];
diff --git a/core/tests/Drupal/Tests/Component/Annotation/PluginIdTest.php b/core/tests/Drupal/Tests/Component/Annotation/PluginIdTest.php
index b07954605430..17fb399a7264 100644
--- a/core/tests/Drupal/Tests/Component/Annotation/PluginIdTest.php
+++ b/core/tests/Drupal/Tests/Component/Annotation/PluginIdTest.php
@@ -16,7 +16,7 @@ class PluginIdTest extends TestCase {
   /**
    * @covers ::get
    */
-  public function testGet() {
+  public function testGet(): void {
     // Assert plugin starts empty.
     $plugin = new PluginID();
     $this->assertEquals([
@@ -39,7 +39,7 @@ public function testGet() {
   /**
    * @covers ::getId
    */
-  public function testGetId() {
+  public function testGetId(): void {
     $plugin = new PluginID();
     $plugin->value = 'example';
     $this->assertEquals('example', $plugin->getId());
diff --git a/core/tests/Drupal/Tests/Component/Annotation/PluginTest.php b/core/tests/Drupal/Tests/Component/Annotation/PluginTest.php
index 5c106d70a5b8..a2b6ce7086da 100644
--- a/core/tests/Drupal/Tests/Component/Annotation/PluginTest.php
+++ b/core/tests/Drupal/Tests/Component/Annotation/PluginTest.php
@@ -18,7 +18,7 @@ class PluginTest extends TestCase {
    * @covers ::parse
    * @covers ::get
    */
-  public function testGet() {
+  public function testGet(): void {
     // Assert all values are accepted through constructor and default value is
     // used for non existent but defined property.
     $plugin = new PluginStub([
@@ -53,7 +53,7 @@ public function testGet() {
   /**
    * @covers ::getProvider
    */
-  public function testGetProvider() {
+  public function testGetProvider(): void {
     $plugin = new Plugin(['provider' => 'example']);
     $this->assertEquals('example', $plugin->getProvider());
   }
@@ -61,7 +61,7 @@ public function testGetProvider() {
   /**
    * @covers ::setProvider
    */
-  public function testSetProvider() {
+  public function testSetProvider(): void {
     $plugin = new Plugin([]);
     $plugin->setProvider('example');
     $this->assertEquals('example', $plugin->getProvider());
@@ -70,7 +70,7 @@ public function testSetProvider() {
   /**
    * @covers ::getId
    */
-  public function testGetId() {
+  public function testGetId(): void {
     $plugin = new Plugin(['id' => 'example']);
     $this->assertEquals('example', $plugin->getId());
   }
@@ -78,7 +78,7 @@ public function testGetId() {
   /**
    * @covers ::getClass
    */
-  public function testGetClass() {
+  public function testGetClass(): void {
     $plugin = new Plugin(['class' => 'example']);
     $this->assertEquals('example', $plugin->getClass());
   }
@@ -86,7 +86,7 @@ public function testGetClass() {
   /**
    * @covers ::setClass
    */
-  public function testSetClass() {
+  public function testSetClass(): void {
     $plugin = new Plugin([]);
     $plugin->setClass('example');
     $this->assertEquals('example', $plugin->getClass());
diff --git a/core/tests/Drupal/Tests/Component/Assertion/InspectorTest.php b/core/tests/Drupal/Tests/Component/Assertion/InspectorTest.php
index a5e1c5705163..0d3f5d221a32 100644
--- a/core/tests/Drupal/Tests/Component/Assertion/InspectorTest.php
+++ b/core/tests/Drupal/Tests/Component/Assertion/InspectorTest.php
@@ -22,7 +22,7 @@ class InspectorTest extends TestCase {
    * @covers ::assertAllStrings
    * @dataProvider providerTestAssertAllStrings
    */
-  public function testAssertAllStrings($input, $expected) {
+  public function testAssertAllStrings($input, $expected): void {
     $this->assertSame($expected, Inspector::assertAllStrings($input));
   }
 
@@ -57,7 +57,7 @@ public static function providerTestAssertAllStrings() {
    *
    * @covers ::assertAllStringable
    */
-  public function testAssertAllStringable() {
+  public function testAssertAllStringable(): void {
     $this->assertTrue(Inspector::assertAllStringable([]));
     $this->assertTrue(Inspector::assertAllStringable(['foo', 'bar']));
     $this->assertFalse(Inspector::assertAllStringable('foo'));
@@ -69,7 +69,7 @@ public function testAssertAllStringable() {
    *
    * @covers ::assertAllArrays
    */
-  public function testAssertAllArrays() {
+  public function testAssertAllArrays(): void {
     $this->assertTrue(Inspector::assertAllArrays([]));
     $this->assertTrue(Inspector::assertAllArrays([[], []]));
     $this->assertFalse(Inspector::assertAllArrays([[], 'foo']));
@@ -80,7 +80,7 @@ public function testAssertAllArrays() {
    *
    * @covers ::assertStrictArray
    */
-  public function testAssertStrictArray() {
+  public function testAssertStrictArray(): void {
     $this->assertTrue(Inspector::assertStrictArray([]));
     $this->assertTrue(Inspector::assertStrictArray(['bar', 'foo']));
     $this->assertFalse(Inspector::assertStrictArray(['foo' => 'bar', 'bar' => 'foo']));
@@ -91,7 +91,7 @@ public function testAssertStrictArray() {
    *
    * @covers ::assertAllStrictArrays
    */
-  public function testAssertAllStrictArrays() {
+  public function testAssertAllStrictArrays(): void {
     $this->assertTrue(Inspector::assertAllStrictArrays([]));
     $this->assertTrue(Inspector::assertAllStrictArrays([[], []]));
     $this->assertFalse(Inspector::assertAllStrictArrays([['foo' => 'bar', 'bar' => 'foo']]));
@@ -102,7 +102,7 @@ public function testAssertAllStrictArrays() {
    *
    * @covers ::assertAllHaveKey
    */
-  public function testAssertAllHaveKey() {
+  public function testAssertAllHaveKey(): void {
     $this->assertTrue(Inspector::assertAllHaveKey([]));
     $this->assertTrue(Inspector::assertAllHaveKey([['foo' => 'bar', 'bar' => 'foo']]));
     $this->assertTrue(Inspector::assertAllHaveKey([['foo' => 'bar', 'bar' => 'foo']], 'foo'));
@@ -115,7 +115,7 @@ public function testAssertAllHaveKey() {
    *
    * @covers ::assertAllIntegers
    */
-  public function testAssertAllIntegers() {
+  public function testAssertAllIntegers(): void {
     $this->assertTrue(Inspector::assertAllIntegers([]));
     $this->assertTrue(Inspector::assertAllIntegers([1, 2, 3]));
     $this->assertFalse(Inspector::assertAllIntegers([1, 2, 3.14]));
@@ -127,7 +127,7 @@ public function testAssertAllIntegers() {
    *
    * @covers ::assertAllFloat
    */
-  public function testAssertAllFloat() {
+  public function testAssertAllFloat(): void {
     $this->assertTrue(Inspector::assertAllFloat([]));
     $this->assertTrue(Inspector::assertAllFloat([1.0, 2.1, 3.14]));
     $this->assertFalse(Inspector::assertAllFloat([1, 2.1, 3.14]));
@@ -140,7 +140,7 @@ public function testAssertAllFloat() {
    *
    * @covers ::assertAllCallable
    */
-  public function testAllCallable() {
+  public function testAllCallable(): void {
     $this->assertTrue(Inspector::assertAllCallable([
       'strchr',
       [$this, 'callMe'],
@@ -166,7 +166,7 @@ function () {
    *
    * @covers ::assertAllNotEmpty
    */
-  public function testAllNotEmpty() {
+  public function testAllNotEmpty(): void {
     $this->assertTrue(Inspector::assertAllNotEmpty([1, 'two']));
     $this->assertFalse(Inspector::assertAllNotEmpty(['']));
   }
@@ -176,7 +176,7 @@ public function testAllNotEmpty() {
    *
    * @covers ::assertAllNumeric
    */
-  public function testAssertAllNumeric() {
+  public function testAssertAllNumeric(): void {
     $this->assertTrue(Inspector::assertAllNumeric([1, '2', 3.14]));
     $this->assertFalse(Inspector::assertAllNumeric([1, 'two', 3.14]));
   }
@@ -186,7 +186,7 @@ public function testAssertAllNumeric() {
    *
    * @covers ::assertAllMatch
    */
-  public function testAssertAllMatch() {
+  public function testAssertAllMatch(): void {
     $this->assertTrue(Inspector::assertAllMatch('f', ['fee', 'fi', 'fo']));
     $this->assertTrue(Inspector::assertAllMatch('F', ['fee', 'fi', 'fo']));
     $this->assertTrue(Inspector::assertAllMatch('f', ['fee', 'fi', 'fo'], TRUE));
@@ -200,7 +200,7 @@ public function testAssertAllMatch() {
    *
    * @covers ::assertAllRegularExpressionMatch
    */
-  public function testAssertAllRegularExpressionMatch() {
+  public function testAssertAllRegularExpressionMatch(): void {
     $this->assertTrue(Inspector::assertAllRegularExpressionMatch('/f/i', ['fee', 'fi', 'fo']));
     $this->assertTrue(Inspector::assertAllRegularExpressionMatch('/F/i', ['fee', 'fi', 'fo']));
     $this->assertTrue(Inspector::assertAllRegularExpressionMatch('/f/', ['fee', 'fi', 'fo']));
@@ -214,7 +214,7 @@ public function testAssertAllRegularExpressionMatch() {
    *
    * @covers ::assertAllObjects
    */
-  public function testAssertAllObjects() {
+  public function testAssertAllObjects(): void {
     $this->assertTrue(Inspector::assertAllObjects([new \ArrayObject(), new \ArrayObject()]));
     $this->assertFalse(Inspector::assertAllObjects([new \ArrayObject(), new \ArrayObject(), 'foo']));
     $this->assertTrue(Inspector::assertAllObjects([new \ArrayObject(), new \ArrayObject()], '\\Traversable'));
diff --git a/core/tests/Drupal/Tests/Component/ClassFinder/ClassFinderTest.php b/core/tests/Drupal/Tests/Component/ClassFinder/ClassFinderTest.php
index c7742e4cd7e1..9653180cfa22 100644
--- a/core/tests/Drupal/Tests/Component/ClassFinder/ClassFinderTest.php
+++ b/core/tests/Drupal/Tests/Component/ClassFinder/ClassFinderTest.php
@@ -17,7 +17,7 @@ class ClassFinderTest extends TestCase {
   /**
    * @covers ::findFile
    */
-  public function testFindFile() {
+  public function testFindFile(): void {
     $finder = new ClassFinder();
 
     // The full path is returned therefore only tests with
diff --git a/core/tests/Drupal/Tests/Component/Datetime/DateTimePlusTest.php b/core/tests/Drupal/Tests/Component/Datetime/DateTimePlusTest.php
index 99d0b79bdb42..2ae7a736a5cd 100644
--- a/core/tests/Drupal/Tests/Component/Datetime/DateTimePlusTest.php
+++ b/core/tests/Drupal/Tests/Component/Datetime/DateTimePlusTest.php
@@ -25,7 +25,7 @@ class DateTimePlusTest extends TestCase {
    *
    * @dataProvider providerTestDates
    */
-  public function testDates($input, $timezone, $expected) {
+  public function testDates($input, $timezone, $expected): void {
     $date = new DateTimePlus($input, $timezone);
     $value = $date->format('c');
 
@@ -47,7 +47,7 @@ public function testDates($input, $timezone, $expected) {
    *
    * @dataProvider providerTestDateArrays
    */
-  public function testDateArrays($input, $timezone, $expected) {
+  public function testDateArrays($input, $timezone, $expected): void {
     $date = DateTimePlus::createFromArray($input, $timezone);
     $value = $date->format('c');
 
@@ -71,7 +71,7 @@ public function testDateArrays($input, $timezone, $expected) {
    *
    * @dataProvider providerTestDateDiff
    */
-  public function testDateDiff($input1, $input2, $absolute, \DateInterval $expected) {
+  public function testDateDiff($input1, $input2, $absolute, \DateInterval $expected): void {
     $interval = $input1->diff($input2, $absolute);
     $this->assertEquals($interval, $expected);
   }
@@ -88,7 +88,7 @@ public function testDateDiff($input1, $input2, $absolute, \DateInterval $expecte
    *
    * @dataProvider providerTestInvalidDateDiff
    */
-  public function testInvalidDateDiff($input1, $input2, $absolute) {
+  public function testInvalidDateDiff($input1, $input2, $absolute): void {
     $this->expectException(\BadMethodCallException::class);
     $this->expectExceptionMessage('Method Drupal\Component\Datetime\DateTimePlus::diff expects parameter 1 to be a \DateTime or \Drupal\Component\Datetime\DateTimePlus object');
     $interval = $input1->diff($input2, $absolute);
@@ -106,7 +106,7 @@ public function testInvalidDateDiff($input1, $input2, $absolute) {
    *
    * @dataProvider providerTestInvalidDateArrays
    */
-  public function testInvalidDateArrays($input, $timezone, $class) {
+  public function testInvalidDateArrays($input, $timezone, $class): void {
     $this->expectException($class);
     $this->assertInstanceOf(
       '\Drupal\Component\DateTimePlus',
@@ -124,7 +124,7 @@ public function testInvalidDateArrays($input, $timezone, $class) {
    *
    * @dataProvider providerTestCheckArray
    */
-  public function testCheckArray(array $array, $expected) {
+  public function testCheckArray(array $array, $expected): void {
     $this->assertSame(
       $expected,
       DateTimePlus::checkArray($array)
@@ -159,7 +159,7 @@ public function testCheckArray(array $array, $expected) {
    *
    * @dataProvider providerTestTimestamp
    */
-  public function testTimestamp($input, array $initial, array $transform) {
+  public function testTimestamp($input, array $initial, array $transform): void {
     // Initialize a new date object.
     $date = DateTimePlus::createFromTimestamp($input, $initial['timezone']);
     $this->assertDateTimestamp($date, $input, $initial, $transform);
@@ -177,7 +177,7 @@ public function testTimestamp($input, array $initial, array $transform) {
    *
    * @dataProvider providerTestDateTimestamp
    */
-  public function testDateTimestamp($input, array $initial, array $transform) {
+  public function testDateTimestamp($input, array $initial, array $transform): void {
     // Initialize a new date object.
     $date = new DateTimePlus($input, $initial['timezone']);
     $this->assertDateTimestamp($date, $input, $initial, $transform);
@@ -242,7 +242,7 @@ public function assertDateTimestamp(DateTimePlus $date, string|int $input, array
    *
    * @dataProvider providerTestDateFormat
    */
-  public function testDateFormat($input, $timezone, $format, $format_date, $expected) {
+  public function testDateFormat($input, $timezone, $format, $format_date, $expected): void {
     $date = DateTimePlus::createFromFormat($format, $input, $timezone);
     $value = $date->format($format_date);
     $this->assertEquals($expected, $value, sprintf("Test new DateTimePlus(%s, %s, %s): should be %s, found %s.", $input, $timezone, $format, $expected, $value));
@@ -264,7 +264,7 @@ public function testDateFormat($input, $timezone, $format, $format_date, $expect
    *
    * @dataProvider providerTestInvalidDates
    */
-  public function testInvalidDates($input, $timezone, $format, $message, $class) {
+  public function testInvalidDates($input, $timezone, $format, $message, $class): void {
     $this->expectException($class);
     DateTimePlus::createFromFormat($format, $input, $timezone);
   }
@@ -285,7 +285,7 @@ public function testInvalidDates($input, $timezone, $format, $message, $class) {
    *
    * @dataProvider providerTestDateTimezone
    */
-  public function testDateTimezone($input, $timezone, $expected_timezone, $message) {
+  public function testDateTimezone($input, $timezone, $expected_timezone, $message): void {
     $date = new DateTimePlus($input, $timezone);
     $timezone = $date->getTimezone()->getName();
     $this->assertEquals($timezone, $expected_timezone, $message);
@@ -296,7 +296,7 @@ public function testDateTimezone($input, $timezone, $expected_timezone, $message
    *
    * But only when the DrupalDateTime is constructed from a datetime object.
    */
-  public function testDateTimezoneWithDateTimeObject() {
+  public function testDateTimezoneWithDateTimeObject(): void {
     // Create a date object with another date object.
     $input = new \DateTime('now', new \DateTimeZone('Pacific/Midway'));
     $timezone = NULL;
@@ -757,7 +757,7 @@ public static function providerTestInvalidDateDiff() {
    *
    * @dataProvider providerTestInvalidConstructor
    */
-  public function testInvalidConstructor($time, array $errors) {
+  public function testInvalidConstructor($time, array $errors): void {
     $date = new DateTimePlus($time);
 
     $this->assertEquals(TRUE, $date->hasErrors());
@@ -837,7 +837,7 @@ public static function providerTestInvalidConstructor() {
   /**
    * Tests the $settings['validate_format'] parameter in ::createFromFormat().
    */
-  public function testValidateFormat() {
+  public function testValidateFormat(): void {
     // Check that an input that does not strictly follow the input format will
     // produce the desired date. In this case the year string '11' doesn't
     // precisely match the 'Y' formatter parameter, but PHP will parse it
@@ -856,7 +856,7 @@ public function testValidateFormat() {
   /**
    * Tests setting the default time for date-only objects.
    */
-  public function testDefaultDateTime() {
+  public function testDefaultDateTime(): void {
     $utc = new \DateTimeZone('UTC');
 
     $date = DateTimePlus::createFromFormat('Y-m-d H:i:s', '2017-05-23 22:58:00', $utc);
@@ -870,7 +870,7 @@ public function testDefaultDateTime() {
    *
    * @covers ::__call
    */
-  public function testChainable() {
+  public function testChainable(): void {
     $date = new DateTimePlus('now', 'Australia/Sydney');
 
     $date->setTimestamp(12345678);
@@ -894,7 +894,7 @@ public function testChainable() {
    *
    * @covers ::__call
    */
-  public function testChainableNonChainable() {
+  public function testChainableNonChainable(): void {
     $datetime1 = new DateTimePlus('2009-10-11 12:00:00');
     $datetime2 = new DateTimePlus('2009-10-13 12:00:00');
     $interval = $datetime1->diff($datetime2);
@@ -907,7 +907,7 @@ public function testChainableNonChainable() {
    *
    * @covers ::__call
    */
-  public function testChainableNonCallable() {
+  public function testChainableNonCallable(): void {
     $this->expectException(\BadMethodCallException::class);
     $this->expectExceptionMessage('Call to undefined method Drupal\Component\Datetime\DateTimePlus::nonexistent()');
     $date = new DateTimePlus('now', 'Australia/Sydney');
@@ -917,7 +917,7 @@ public function testChainableNonCallable() {
   /**
    * @covers ::getPhpDateTime
    */
-  public function testGetPhpDateTime() {
+  public function testGetPhpDateTime(): void {
     $new_york = new \DateTimeZone('America/New_York');
     $berlin = new \DateTimeZone('Europe/Berlin');
 
diff --git a/core/tests/Drupal/Tests/Component/Datetime/TimeTest.php b/core/tests/Drupal/Tests/Component/Datetime/TimeTest.php
index 9291d73f406a..f793e3a9460d 100644
--- a/core/tests/Drupal/Tests/Component/Datetime/TimeTest.php
+++ b/core/tests/Drupal/Tests/Component/Datetime/TimeTest.php
@@ -49,7 +49,7 @@ protected function setUp(): void {
    *
    * @covers ::getRequestTime
    */
-  public function testGetRequestTime() {
+  public function testGetRequestTime(): void {
     $expected = 12345678;
 
     $request = Request::createFromGlobals();
@@ -68,7 +68,7 @@ public function testGetRequestTime() {
    *
    * @covers ::getRequestMicroTime
    */
-  public function testGetRequestMicroTime() {
+  public function testGetRequestMicroTime(): void {
     $expected = 1234567.89;
 
     $request = Request::createFromGlobals();
@@ -85,7 +85,7 @@ public function testGetRequestMicroTime() {
   /**
    * @covers ::getRequestTime
    */
-  public function testGetRequestTimeNoRequest() {
+  public function testGetRequestTimeNoRequest(): void {
     // With no request, and no global variable, we expect to get the int part
     // of the microtime.
     $expected = 1234567;
@@ -98,7 +98,7 @@ public function testGetRequestTimeNoRequest() {
   /**
    * @covers ::getRequestMicroTime
    */
-  public function testGetRequestMicroTimeNoRequest() {
+  public function testGetRequestMicroTimeNoRequest(): void {
     $expected = 1234567.89;
     unset($_SERVER['REQUEST_TIME_FLOAT']);
     $this->assertEquals($expected, $this->time->getRequestMicroTime());
@@ -111,7 +111,7 @@ public function testGetRequestMicroTimeNoRequest() {
    *
    * @covers ::getCurrentTime
    */
-  public function testGetCurrentTime() {
+  public function testGetCurrentTime(): void {
     $expected = 12345678;
     $this->assertEquals($expected, $this->time->getCurrentTime());
   }
@@ -121,7 +121,7 @@ public function testGetCurrentTime() {
    *
    * @covers ::getCurrentMicroTime
    */
-  public function testGetCurrentMicroTime() {
+  public function testGetCurrentMicroTime(): void {
     $expected = 1234567.89;
     $this->assertEquals($expected, $this->time->getCurrentMicroTime());
   }
diff --git a/core/tests/Drupal/Tests/Component/Datetime/TimeWithNoRequestTest.php b/core/tests/Drupal/Tests/Component/Datetime/TimeWithNoRequestTest.php
index 7eaf6e6130f4..69bac3cb0282 100644
--- a/core/tests/Drupal/Tests/Component/Datetime/TimeWithNoRequestTest.php
+++ b/core/tests/Drupal/Tests/Component/Datetime/TimeWithNoRequestTest.php
@@ -52,7 +52,7 @@ public function testGetRequestTimeImmutable(): void {
    *
    * @covers ::getRequestMicroTime
    */
-  public function testGetRequestMicroTimeImmutable() {
+  public function testGetRequestMicroTimeImmutable(): void {
     $requestTime = $this->time->getRequestMicroTime();
     usleep(20000);
     $this->assertSame($requestTime, $this->time->getRequestMicroTime());
diff --git a/core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php b/core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php
index 0e42a0b4e8e5..79fcaad7d749 100644
--- a/core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php
+++ b/core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php
@@ -68,7 +68,7 @@ protected function setUp(): void {
    *
    * @covers ::__construct
    */
-  public function testConstruct() {
+  public function testConstruct(): void {
     $container_definition = $this->getMockContainerDefinition();
     $container_definition['machine_format'] = !$this->machineFormat;
     $this->expectException(InvalidArgumentException::class);
@@ -80,7 +80,7 @@ public function testConstruct() {
    *
    * @covers ::getParameter
    */
-  public function testGetParameter() {
+  public function testGetParameter(): void {
     $this->assertEquals($this->containerDefinition['parameters']['some_config'], $this->container->getParameter('some_config'), 'Container parameter matches for %some_config%.');
     $this->assertEquals($this->containerDefinition['parameters']['some_other_config'], $this->container->getParameter('some_other_config'), 'Container parameter matches for %some_other_config%.');
   }
@@ -92,7 +92,7 @@ public function testGetParameter() {
    * @covers ::getParameterAlternatives
    * @covers ::getAlternatives
    */
-  public function testGetParameterIfNotFound() {
+  public function testGetParameterIfNotFound(): void {
     $this->expectException(ParameterNotFoundException::class);
     $this->container->getParameter('parameter_that_does_not_exist');
   }
@@ -102,7 +102,7 @@ public function testGetParameterIfNotFound() {
    *
    * @covers ::getParameter
    */
-  public function testGetParameterIfNotFoundBecauseNull() {
+  public function testGetParameterIfNotFoundBecauseNull(): void {
     $this->expectException(ParameterNotFoundException::class);
     $this->container->getParameter(NULL);
   }
@@ -112,7 +112,7 @@ public function testGetParameterIfNotFoundBecauseNull() {
    *
    * @covers ::hasParameter
    */
-  public function testHasParameter() {
+  public function testHasParameter(): void {
     $this->assertTrue($this->container->hasParameter('some_config'), 'Container parameters include %some_config%.');
     $this->assertFalse($this->container->hasParameter('some_config_not_exists'), 'Container parameters do not include %some_config_not_exists%.');
   }
@@ -122,7 +122,7 @@ public function testHasParameter() {
    *
    * @covers ::setParameter
    */
-  public function testSetParameterWithUnfrozenContainer() {
+  public function testSetParameterWithUnfrozenContainer(): void {
     $container_definition = $this->containerDefinition;
     $container_definition['frozen'] = FALSE;
     $this->container = new $this->containerClass($container_definition);
@@ -135,7 +135,7 @@ public function testSetParameterWithUnfrozenContainer() {
    *
    * @covers ::setParameter
    */
-  public function testSetParameterWithFrozenContainer() {
+  public function testSetParameterWithFrozenContainer(): void {
     $this->container = new $this->containerClass($this->containerDefinition);
     $this->expectException(LogicException::class);
     $this->container->setParameter('some_config', 'new_value');
@@ -147,7 +147,7 @@ public function testSetParameterWithFrozenContainer() {
    * @covers ::get
    * @covers ::createService
    */
-  public function testGet() {
+  public function testGet(): void {
     $container = $this->container->get('service_container');
     $this->assertSame($this->container, $container, 'Container can be retrieved from itself.');
 
@@ -174,7 +174,7 @@ public function testGet() {
    * @covers ::get
    * @covers ::createService
    */
-  public function testGetForNonSharedService() {
+  public function testGetForNonSharedService(): void {
     $service = $this->container->get('non_shared_service');
     $service2 = $this->container->get('non_shared_service');
 
@@ -187,7 +187,7 @@ public function testGetForNonSharedService() {
    * @covers ::get
    * @covers ::createService
    */
-  public function testGetForClassFromParameter() {
+  public function testGetForClassFromParameter(): void {
     $container_definition = $this->containerDefinition;
     $container_definition['frozen'] = FALSE;
     $container = new $this->containerClass($container_definition);
@@ -202,7 +202,7 @@ public function testGetForClassFromParameter() {
    *
    * @covers ::set
    */
-  public function testSet() {
+  public function testSet(): void {
     $this->assertNull($this->container->get('new_id', ContainerInterface::NULL_ON_INVALID_REFERENCE));
     $mock_service = new MockService();
     $this->container->set('new_id', $mock_service);
@@ -215,7 +215,7 @@ public function testSet() {
    *
    * @covers ::has
    */
-  public function testHas() {
+  public function testHas(): void {
     $this->assertTrue($this->container->has('other.service'));
     $this->assertFalse($this->container->has('another.service'));
 
@@ -230,7 +230,7 @@ public function testHas() {
    *
    * @covers ::has
    */
-  public function testHasForAliasedService() {
+  public function testHasForAliasedService(): void {
     $service = $this->container->has('service.provider');
     $aliased_service = $this->container->has('service.provider_alias');
     $this->assertSame($service, $aliased_service);
@@ -241,7 +241,7 @@ public function testHasForAliasedService() {
    * @covers ::get
    * @covers ::createService
    */
-  public function testGetForCircularServices() {
+  public function testGetForCircularServices(): void {
     $this->expectException(ServiceCircularReferenceException::class);
     $this->container->get('circular_dependency');
   }
@@ -254,7 +254,7 @@ public function testGetForCircularServices() {
    * @covers ::getAlternatives
    * @covers ::getServiceAlternatives
    */
-  public function testGetForNonExistentService() {
+  public function testGetForNonExistentService(): void {
     $this->expectException(ServiceNotFoundException::class);
     $this->container->get('service_not_exists');
   }
@@ -265,7 +265,7 @@ public function testGetForNonExistentService() {
    * @covers ::get
    * @covers ::createService
    */
-  public function testGetForSerializedServiceDefinition() {
+  public function testGetForSerializedServiceDefinition(): void {
     $container_definition = $this->containerDefinition;
     $container_definition['services']['other.service'] = serialize($container_definition['services']['other.service']);
     $container = new $this->containerClass($container_definition);
@@ -286,7 +286,7 @@ public function testGetForSerializedServiceDefinition() {
    * @covers ::createService
    * @covers ::resolveServicesAndParameters
    */
-  public function testGetForNonExistentParameterDependency() {
+  public function testGetForNonExistentParameterDependency(): void {
     $service = $this->container->get('service_parameter_not_exists', ContainerInterface::NULL_ON_INVALID_REFERENCE);
     $this->assertNull($service, 'Service is NULL.');
   }
@@ -298,7 +298,7 @@ public function testGetForNonExistentParameterDependency() {
    * @covers ::createService
    * @covers ::resolveServicesAndParameters
    */
-  public function testGetForParameterDependencyWithExceptionOnSecondCall() {
+  public function testGetForParameterDependencyWithExceptionOnSecondCall(): void {
     $service = $this->container->get('service_parameter_not_exists', ContainerInterface::NULL_ON_INVALID_REFERENCE);
     $this->assertNull($service, 'Service is NULL.');
 
@@ -315,7 +315,7 @@ public function testGetForParameterDependencyWithExceptionOnSecondCall() {
    * @covers ::createService
    * @covers ::resolveServicesAndParameters
    */
-  public function testGetForNonExistentParameterDependencyWithException() {
+  public function testGetForNonExistentParameterDependencyWithException(): void {
     $this->expectException(InvalidArgumentException::class);
     $this->container->get('service_parameter_not_exists');
   }
@@ -327,7 +327,7 @@ public function testGetForNonExistentParameterDependencyWithException() {
    * @covers ::createService
    * @covers ::resolveServicesAndParameters
    */
-  public function testGetForNonExistentServiceDependency() {
+  public function testGetForNonExistentServiceDependency(): void {
     $service = $this->container->get('service_dependency_not_exists', ContainerInterface::NULL_ON_INVALID_REFERENCE);
     $this->assertNull($service, 'Service is NULL.');
   }
@@ -340,7 +340,7 @@ public function testGetForNonExistentServiceDependency() {
    * @covers ::resolveServicesAndParameters
    * @covers ::getAlternatives
    */
-  public function testGetForNonExistentServiceDependencyWithException() {
+  public function testGetForNonExistentServiceDependencyWithException(): void {
     $this->expectException(ServiceNotFoundException::class);
     $this->container->get('service_dependency_not_exists');
   }
@@ -351,7 +351,7 @@ public function testGetForNonExistentServiceDependencyWithException() {
    * @covers ::get
    * @covers ::createService
    */
-  public function testGetForNonExistentServiceWhenUsingNull() {
+  public function testGetForNonExistentServiceWhenUsingNull(): void {
     $this->assertNull($this->container->get('service_not_exists', ContainerInterface::NULL_ON_INVALID_REFERENCE), 'Not found service does not throw exception.');
   }
 
@@ -360,7 +360,7 @@ public function testGetForNonExistentServiceWhenUsingNull() {
    * @covers ::get
    * @covers ::createService
    */
-  public function testGetForNonExistentNULLService() {
+  public function testGetForNonExistentNULLService(): void {
     $this->expectException(ServiceNotFoundException::class);
     $this->container->get(NULL);
   }
@@ -371,7 +371,7 @@ public function testGetForNonExistentNULLService() {
    * @covers ::get
    * @covers ::createService
    */
-  public function testGetForNonExistentServiceMultipleTimes() {
+  public function testGetForNonExistentServiceMultipleTimes(): void {
     $container = new $this->containerClass();
 
     $this->assertNull($container->get('service_not_exists', ContainerInterface::NULL_ON_INVALID_REFERENCE), 'Not found service does not throw exception.');
@@ -385,7 +385,7 @@ public function testGetForNonExistentServiceMultipleTimes() {
    * @covers ::createService
    * @covers ::getAlternatives
    */
-  public function testGetForNonExistentServiceWithExceptionOnSecondCall() {
+  public function testGetForNonExistentServiceWithExceptionOnSecondCall(): void {
     $this->assertNull($this->container->get('service_not_exists', ContainerInterface::NULL_ON_INVALID_REFERENCE), 'Not found service does nto throw exception.');
     $this->expectException(ServiceNotFoundException::class);
     $this->container->get('service_not_exists');
@@ -397,7 +397,7 @@ public function testGetForNonExistentServiceWithExceptionOnSecondCall() {
    * @covers ::get
    * @covers ::createService
    */
-  public function testGetForAliasedService() {
+  public function testGetForAliasedService(): void {
     $service = $this->container->get('service.provider');
     $aliased_service = $this->container->get('service.provider_alias');
     $this->assertSame($service, $aliased_service);
@@ -409,7 +409,7 @@ public function testGetForAliasedService() {
    * @covers ::get
    * @covers ::createService
    */
-  public function testGetForSyntheticService() {
+  public function testGetForSyntheticService(): void {
     $synthetic_service = new \stdClass();
     $this->container->set('synthetic', $synthetic_service);
     $test_service = $this->container->get('synthetic');
@@ -422,7 +422,7 @@ public function testGetForSyntheticService() {
    * @covers ::get
    * @covers ::createService
    */
-  public function testGetForSyntheticServiceWithException() {
+  public function testGetForSyntheticServiceWithException(): void {
     $this->expectException(RuntimeException::class);
     $this->container->get('synthetic');
   }
@@ -433,7 +433,7 @@ public function testGetForSyntheticServiceWithException() {
    * @covers ::get
    * @covers ::createService
    */
-  public function testGetWithFileInclude() {
+  public function testGetWithFileInclude(): void {
     $this->container->get('container_test_file_service_test');
     $this->assertTrue(function_exists('container_test_file_service_test_service_function'));
     $this->assertEquals('Hello Container', container_test_file_service_test_service_function());
@@ -446,7 +446,7 @@ public function testGetWithFileInclude() {
    * @covers ::createService
    * @covers ::resolveServicesAndParameters
    */
-  public function testGetForInstantiationWithVariousArgumentLengths() {
+  public function testGetForInstantiationWithVariousArgumentLengths(): void {
     $args = [];
     for ($i = 0; $i < 12; $i++) {
       $instantiation_service = $this->container->get('service_test_instantiation_' . $i);
@@ -461,7 +461,7 @@ public function testGetForInstantiationWithVariousArgumentLengths() {
    * @covers ::get
    * @covers ::createService
    */
-  public function testGetForWrongFactory() {
+  public function testGetForWrongFactory(): void {
     $this->expectException(RuntimeException::class);
     $this->container->get('wrong_factory');
   }
@@ -472,7 +472,7 @@ public function testGetForWrongFactory() {
    * @covers ::get
    * @covers ::createService
    */
-  public function testGetForFactoryService() {
+  public function testGetForFactoryService(): void {
     $factory_service = $this->container->get('factory_service');
     $factory_service_class = $this->container->getParameter('factory_service_class');
     $this->assertInstanceOf($factory_service_class, $factory_service);
@@ -484,7 +484,7 @@ public function testGetForFactoryService() {
    * @covers ::get
    * @covers ::createService
    */
-  public function testGetForFactoryClass() {
+  public function testGetForFactoryClass(): void {
     $service = $this->container->get('service.provider');
     $factory_service = $this->container->get('factory_class');
 
@@ -499,7 +499,7 @@ public function testGetForFactoryClass() {
    * @covers ::get
    * @covers ::createService
    */
-  public function testGetForConfiguratorWithException() {
+  public function testGetForConfiguratorWithException(): void {
     $this->expectException(InvalidArgumentException::class);
     $this->container->get('configurable_service_exception');
   }
@@ -510,7 +510,7 @@ public function testGetForConfiguratorWithException() {
    * @covers ::get
    * @covers ::createService
    */
-  public function testGetForConfigurator() {
+  public function testGetForConfigurator(): void {
     $container = $this->container;
 
     // Setup a configurator.
@@ -534,7 +534,7 @@ public function testGetForConfigurator() {
    * @covers ::createService
    * @covers ::resolveServicesAndParameters
    */
-  public function testResolveServicesAndParametersForPrivateService() {
+  public function testResolveServicesAndParametersForPrivateService(): void {
     $service = $this->container->get('service_using_private');
     $private_service = $service->getSomeOtherService();
     $this->assertEquals('really_private_lama', $private_service->getSomeParameter(), 'Private was found successfully.');
@@ -553,7 +553,7 @@ public function testResolveServicesAndParametersForPrivateService() {
    * @covers ::createService
    * @covers ::resolveServicesAndParameters
    */
-  public function testResolveServicesAndParametersForSharedPrivateService() {
+  public function testResolveServicesAndParametersForSharedPrivateService(): void {
     $service = $this->container->get('service_using_shared_private');
     $private_service = $service->getSomeOtherService();
     $this->assertEquals('really_private_lama', $private_service->getSomeParameter(), 'Private was found successfully.');
@@ -572,7 +572,7 @@ public function testResolveServicesAndParametersForSharedPrivateService() {
    * @covers ::createService
    * @covers ::resolveServicesAndParameters
    */
-  public function testResolveServicesAndParametersForArgumentsUsingDeepArray() {
+  public function testResolveServicesAndParametersForArgumentsUsingDeepArray(): void {
     $service = $this->container->get('service_using_array');
     $other_service = $this->container->get('other.service');
     $this->assertEquals($other_service, $service->getSomeOtherService(), '@other.service was injected via constructor.');
@@ -585,7 +585,7 @@ public function testResolveServicesAndParametersForArgumentsUsingDeepArray() {
    * @covers ::createService
    * @covers ::resolveServicesAndParameters
    */
-  public function testResolveServicesAndParametersForOptionalServiceDependencies() {
+  public function testResolveServicesAndParametersForOptionalServiceDependencies(): void {
     $service = $this->container->get('service_with_optional_dependency');
     $this->assertNull($service->getSomeOtherService(), 'other service was NULL was expected.');
   }
@@ -597,7 +597,7 @@ public function testResolveServicesAndParametersForOptionalServiceDependencies()
    * @covers ::createService
    * @covers ::resolveServicesAndParameters
    */
-  public function testResolveServicesAndParametersForServiceReferencedViaServiceClosure() {
+  public function testResolveServicesAndParametersForServiceReferencedViaServiceClosure(): void {
     $service = $this->container->get('service_within_service_closure');
     $other_service = $this->container->get('other.service');
     $factory_function = $service->getSomeOtherService();
@@ -612,7 +612,7 @@ public function testResolveServicesAndParametersForServiceReferencedViaServiceCl
    * @covers ::createService
    * @covers ::resolveServicesAndParameters
    */
-  public function testResolveServicesAndParametersForInvalidArgument() {
+  public function testResolveServicesAndParametersForInvalidArgument(): void {
     $this->expectException(InvalidArgumentException::class);
     $this->container->get('invalid_argument_service');
   }
@@ -624,7 +624,7 @@ public function testResolveServicesAndParametersForInvalidArgument() {
    * @covers ::createService
    * @covers ::resolveServicesAndParameters
    */
-  public function testResolveServicesAndParametersForInvalidArguments() {
+  public function testResolveServicesAndParametersForInvalidArguments(): void {
     // In case the machine-optimized format is not used, we need to simulate the
     // test failure.
     $this->expectException(InvalidArgumentException::class);
@@ -641,7 +641,7 @@ public function testResolveServicesAndParametersForInvalidArguments() {
    * @covers ::createService
    * @covers ::resolveServicesAndParameters
    */
-  public function testResolveServicesAndParametersForServiceInstantiatedFromParameter() {
+  public function testResolveServicesAndParametersForServiceInstantiatedFromParameter(): void {
     $service = $this->container->get('service.provider');
     $test_service = $this->container->get('service_with_parameter_service');
     $this->assertSame($service, $test_service->getSomeOtherService(), 'Service was passed via parameter.');
@@ -652,7 +652,7 @@ public function testResolveServicesAndParametersForServiceInstantiatedFromParame
    *
    * @covers ::initialized
    */
-  public function testInitialized() {
+  public function testInitialized(): void {
     $this->assertFalse($this->container->initialized('late.service'), 'Late service is not initialized.');
     $this->container->get('late.service');
     $this->assertTrue($this->container->initialized('late.service'), 'Late service is initialized after it was retrieved once.');
@@ -663,7 +663,7 @@ public function testInitialized() {
    *
    * @covers ::initialized
    */
-  public function testInitializedForAliases() {
+  public function testInitializedForAliases(): void {
     $this->assertFalse($this->container->initialized('late.service_alias'), 'Late service is not initialized.');
     $this->container->get('late.service');
     $this->assertTrue($this->container->initialized('late.service_alias'), 'Late service is initialized after it was retrieved once.');
@@ -674,7 +674,7 @@ public function testInitializedForAliases() {
    *
    * @covers ::getServiceIds
    */
-  public function testGetServiceIds() {
+  public function testGetServiceIds(): void {
     $service_definition_keys = array_merge(['service_container'], array_keys($this->containerDefinition['services']));
     $this->assertEquals($service_definition_keys, $this->container->getServiceIds(), 'Retrieved service IDs match definition.');
 
@@ -693,14 +693,14 @@ public function testGetServiceIds() {
    * @covers ::createService
    * @covers ::resolveServicesAndParameters
    */
-  public function testResolveServicesAndParametersForRawArgument() {
+  public function testResolveServicesAndParametersForRawArgument(): void {
     $this->assertEquals(['ccc'], $this->container->get('service_with_raw_argument')->getArguments());
   }
 
   /**
    * Tests that service iterators are lazily instantiated.
    */
-  public function testIterator() {
+  public function testIterator(): void {
     $iterator = $this->container->get('service_iterator')->getArguments()[0];
     $this->assertIsIterable($iterator);
     $this->assertFalse($this->container->initialized('other.service'));
@@ -715,7 +715,7 @@ public function testIterator() {
    *
    * @covers ::reset
    */
-  public function testReset() {
+  public function testReset(): void {
     $this->assertFalse($this->container->initialized('late.service'), 'Late service is not initialized.');
     $this->container->get('late.service');
     $this->assertTrue($this->container->initialized('late.service'), 'Late service is initialized after it was retrieved once.');
diff --git a/core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php b/core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php
index 1143f59e0b69..5a6f3140afc6 100644
--- a/core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php
+++ b/core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php
@@ -95,7 +95,7 @@ protected function setUp(): void {
    * @covers ::getArray
    * @covers ::supportsMachineFormat
    */
-  public function testDumpForEmptyContainer() {
+  public function testDumpForEmptyContainer(): void {
     $serialized_definition = $this->dumper->dump();
     $this->assertEquals(serialize($this->containerDefinition), $serialized_definition);
   }
@@ -107,7 +107,7 @@ public function testDumpForEmptyContainer() {
    *
    * @dataProvider getAliasesDataProvider
    */
-  public function testGetAliases($aliases, $definition_aliases) {
+  public function testGetAliases($aliases, $definition_aliases): void {
     $this->containerDefinition['aliases'] = $definition_aliases;
     $this->containerBuilder->getAliases()->willReturn($aliases);
     $this->assertEquals($this->containerDefinition, $this->dumper->getArray(), 'Expected definition matches dump.');
@@ -146,7 +146,7 @@ public static function getAliasesDataProvider() {
    *
    * @dataProvider getParametersDataProvider
    */
-  public function testGetParameters($parameters, $definition_parameters, $is_frozen) {
+  public function testGetParameters($parameters, $definition_parameters, $is_frozen): void {
     $this->containerDefinition['parameters'] = $definition_parameters;
     $this->containerDefinition['frozen'] = $is_frozen;
 
@@ -209,7 +209,7 @@ public static function getParametersDataProvider() {
    *
    * @dataProvider getDefinitionsDataProvider
    */
-  public function testGetServiceDefinitions($services, $definition_services) {
+  public function testGetServiceDefinitions($services, $definition_services): void {
     $this->containerDefinition['services'] = $definition_services;
 
     $this->containerBuilder->getDefinitions()->willReturn($services);
@@ -502,7 +502,7 @@ protected static function getServiceClosureCall($id, $invalid_behavior = Contain
    *
    * @dataProvider publicPrivateDataProvider
    */
-  public function testGetServiceDefinitionWithReferenceToAlias($public) {
+  public function testGetServiceDefinitionWithReferenceToAlias($public): void {
     $bar_definition = new Definition('\stdClass');
     $bar_definition_php_array = [
       'class' => '\stdClass',
@@ -561,7 +561,7 @@ public static function publicPrivateDataProvider() {
    *
    * @covers ::getServiceDefinition
    */
-  public function testGetServiceDefinitionForDecoratedService() {
+  public function testGetServiceDefinitionForDecoratedService(): void {
     $bar_definition = new Definition('\stdClass');
     $bar_definition->setPublic(TRUE);
     $bar_definition->setDecoratedService((string) new Reference('foo'));
@@ -577,7 +577,7 @@ public function testGetServiceDefinitionForDecoratedService() {
    *
    * @covers ::dumpValue
    */
-  public function testGetServiceDefinitionForExpression() {
+  public function testGetServiceDefinitionForExpression(): void {
     $expression = new Expression('');
 
     $bar_definition = new Definition('\stdClass');
@@ -595,7 +595,7 @@ public function testGetServiceDefinitionForExpression() {
    *
    * @covers ::dumpValue
    */
-  public function testGetServiceDefinitionForObject() {
+  public function testGetServiceDefinitionForObject(): void {
     $service = new \stdClass();
 
     $bar_definition = new Definition('\stdClass');
@@ -613,7 +613,7 @@ public function testGetServiceDefinitionForObject() {
    *
    * @covers ::dumpValue
    */
-  public function testGetServiceDefinitionForResource() {
+  public function testGetServiceDefinitionForResource(): void {
     $resource = fopen('php://memory', 'r');
 
     $bar_definition = new Definition('\stdClass');
@@ -631,7 +631,7 @@ public function testGetServiceDefinitionForResource() {
    *
    * @dataProvider percentsEscapeProvider
    */
-  public function testPercentsEscape($expected, $argument) {
+  public function testPercentsEscape($expected, $argument): void {
     $definition = new Definition('\stdClass', [$argument]);
     $definition->setPublic(TRUE);
     $this->containerBuilder->getDefinitions()->willReturn([
diff --git a/core/tests/Drupal/Tests/Component/Diff/DiffFormatterTest.php b/core/tests/Drupal/Tests/Component/Diff/DiffFormatterTest.php
index 9016dd483f47..696dcb852032 100644
--- a/core/tests/Drupal/Tests/Component/Diff/DiffFormatterTest.php
+++ b/core/tests/Drupal/Tests/Component/Diff/DiffFormatterTest.php
@@ -50,7 +50,7 @@ public static function provideTestDiff() {
    * @covers ::format
    * @dataProvider provideTestDiff
    */
-  public function testDiff($expected, $from, $to) {
+  public function testDiff($expected, $from, $to): void {
     $diff = new Diff($from, $to);
     $formatter = new DiffFormatter();
     $output = $formatter->format($diff);
diff --git a/core/tests/Drupal/Tests/Component/Diff/Engine/HWLDFWordAccumulatorTest.php b/core/tests/Drupal/Tests/Component/Diff/Engine/HWLDFWordAccumulatorTest.php
index bcaf935eabdf..fecf7d1ed07b 100644
--- a/core/tests/Drupal/Tests/Component/Diff/Engine/HWLDFWordAccumulatorTest.php
+++ b/core/tests/Drupal/Tests/Component/Diff/Engine/HWLDFWordAccumulatorTest.php
@@ -25,7 +25,7 @@ class HWLDFWordAccumulatorTest extends TestCase {
    *
    * @see Drupal\Component\Diff\Engine\HWLDFWordAccumulator::NBSP
    */
-  public function testGetLinesEmpty() {
+  public function testGetLinesEmpty(): void {
     $acc = new HWLDFWordAccumulator();
     $this->assertEquals(['&#160;'], $acc->getLines());
   }
@@ -48,7 +48,7 @@ public static function provideAddWords() {
    * @covers ::addWords
    * @dataProvider provideAddWords
    */
-  public function testAddWords($expected, $words, $tag) {
+  public function testAddWords($expected, $words, $tag): void {
     $acc = new HWLDFWordAccumulator();
     $acc->addWords($words, $tag);
     $this->assertEquals($expected, $acc->getLines());
diff --git a/core/tests/Drupal/Tests/Component/Discovery/YamlDirectoryDiscoveryTest.php b/core/tests/Drupal/Tests/Component/Discovery/YamlDirectoryDiscoveryTest.php
index ce8744744c4e..c0241d053c1e 100644
--- a/core/tests/Drupal/Tests/Component/Discovery/YamlDirectoryDiscoveryTest.php
+++ b/core/tests/Drupal/Tests/Component/Discovery/YamlDirectoryDiscoveryTest.php
@@ -32,7 +32,7 @@ protected function setUp(): void {
    *
    * @covers ::findAll
    */
-  public function testDiscovery() {
+  public function testDiscovery(): void {
     vfsStream::setup('modules', NULL, [
       'test_1' => [
         'subdir1' => [
@@ -103,7 +103,7 @@ public function testDiscovery() {
    *
    * @covers ::findAll
    */
-  public function testDiscoveryAlternateId() {
+  public function testDiscoveryAlternateId(): void {
     vfsStream::setup('modules', NULL, [
       'test_1' => [
         'item_1.test.yml' => "alt_id: item1\nid: ignored",
@@ -126,7 +126,7 @@ public function testDiscoveryAlternateId() {
    * @covers ::findAll
    * @covers ::getIdentifier
    */
-  public function testDiscoveryNoIdException() {
+  public function testDiscoveryNoIdException(): void {
     $this->expectException(DiscoveryException::class);
     $this->expectExceptionMessage('The vfs://modules/test_1' . DIRECTORY_SEPARATOR . 'item_1.test.yml contains no data in the identifier key \'id\'');
     vfsStream::setup('modules', NULL, [
@@ -147,7 +147,7 @@ public function testDiscoveryNoIdException() {
    *
    * @covers ::findAll
    */
-  public function testDiscoveryInvalidYamlException() {
+  public function testDiscoveryInvalidYamlException(): void {
     $this->expectException(DiscoveryException::class);
     $this->expectExceptionMessage('The vfs://modules/test_1' . DIRECTORY_SEPARATOR . 'item_1.test.yml contains invalid YAML');
     vfsStream::setup('modules', NULL, [
diff --git a/core/tests/Drupal/Tests/Component/Discovery/YamlDiscoveryTest.php b/core/tests/Drupal/Tests/Component/Discovery/YamlDiscoveryTest.php
index 2f0cf2af14d3..a592b1cea485 100644
--- a/core/tests/Drupal/Tests/Component/Discovery/YamlDiscoveryTest.php
+++ b/core/tests/Drupal/Tests/Component/Discovery/YamlDiscoveryTest.php
@@ -30,7 +30,7 @@ protected function setUp(): void {
   /**
    * Tests the YAML file discovery.
    */
-  public function testDiscovery() {
+  public function testDiscovery(): void {
     vfsStreamWrapper::register();
     $root = new vfsStreamDirectory('modules');
     vfsStreamWrapper::setRoot($root);
@@ -73,7 +73,7 @@ public function testDiscovery() {
   /**
    * Tests if filename is output for a broken YAML file.
    */
-  public function testForBrokenYml() {
+  public function testForBrokenYml(): void {
     vfsStreamWrapper::register();
     $root = new vfsStreamDirectory('modules');
     vfsStreamWrapper::setRoot($root);
diff --git a/core/tests/Drupal/Tests/Component/DrupalComponentTest.php b/core/tests/Drupal/Tests/Component/DrupalComponentTest.php
index b2566ed752ba..3f42a89a80a6 100644
--- a/core/tests/Drupal/Tests/Component/DrupalComponentTest.php
+++ b/core/tests/Drupal/Tests/Component/DrupalComponentTest.php
@@ -18,7 +18,7 @@ class DrupalComponentTest extends TestCase {
   /**
    * Tests that classes in Component do not use any Core class.
    */
-  public function testNoCoreInComponent() {
+  public function testNoCoreInComponent(): void {
     $component_path = dirname(substr(__DIR__, 0, -strlen(__NAMESPACE__))) . '/lib/Drupal/Component';
     foreach ($this->findPhpClasses($component_path) as $class) {
       $this->assertNoCoreUsage($class);
@@ -28,7 +28,7 @@ public function testNoCoreInComponent() {
   /**
    * Tests that classes in Component Tests do not use any Core class.
    */
-  public function testNoCoreInComponentTests() {
+  public function testNoCoreInComponentTests(): void {
     $component_path = dirname(substr(__DIR__, 0, -strlen(__NAMESPACE__))) . '/tests/Drupal/Tests/Component';
     foreach ($this->findPhpClasses($component_path) as $class) {
       $this->assertNoCoreUsage($class);
@@ -140,7 +140,7 @@ public static function providerAssertNoCoreUsage() {
    * @covers \Drupal\Tests\Component\DrupalComponentTest::assertNoCoreUsage
    * @dataProvider providerAssertNoCoreUsage
    */
-  public function testAssertNoCoreUsage($expected_pass, $file_data) {
+  public function testAssertNoCoreUsage($expected_pass, $file_data): void {
     // Set up a virtual file to read.
     $vfs_root = vfsStream::setup('root');
     vfsStream::newFile('Test.php')->at($vfs_root)->setContent($file_data);
diff --git a/core/tests/Drupal/Tests/Component/FileCache/FileCacheFactoryTest.php b/core/tests/Drupal/Tests/Component/FileCache/FileCacheFactoryTest.php
index 5d87abef9711..392c206e488d 100644
--- a/core/tests/Drupal/Tests/Component/FileCache/FileCacheFactoryTest.php
+++ b/core/tests/Drupal/Tests/Component/FileCache/FileCacheFactoryTest.php
@@ -38,7 +38,7 @@ protected function setUp(): void {
   /**
    * @covers ::get
    */
-  public function testGet() {
+  public function testGet(): void {
     $file_cache = FileCacheFactory::get('test_foo_settings', []);
 
     // Ensure the right backend and configuration is used.
@@ -59,7 +59,7 @@ public function testGet() {
   /**
    * @covers ::get
    */
-  public function testGetNoPrefix() {
+  public function testGetNoPrefix(): void {
     FileCacheFactory::setPrefix(NULL);
     $this->expectException(\InvalidArgumentException::class);
     $this->expectExceptionMessage('Required prefix configuration is missing');
@@ -69,7 +69,7 @@ public function testGetNoPrefix() {
   /**
    * @covers ::get
    */
-  public function testGetDisabledFileCache() {
+  public function testGetDisabledFileCache(): void {
     // Ensure the returned FileCache is an instance of FileCache::class.
     $file_cache = FileCacheFactory::get('test_foo_settings', []);
     $this->assertInstanceOf(FileCache::class, $file_cache);
@@ -88,7 +88,7 @@ public function testGetDisabledFileCache() {
    *
    * @dataProvider configurationDataProvider
    */
-  public function testGetConfigurationOverrides($configuration, $arguments, $class) {
+  public function testGetConfigurationOverrides($configuration, $arguments, $class): void {
     FileCacheFactory::setConfiguration($configuration);
 
     $file_cache = FileCacheFactory::get('test_foo_settings', $arguments);
@@ -157,7 +157,7 @@ public static function configurationDataProvider() {
    * @covers ::getConfiguration
    * @covers ::setConfiguration
    */
-  public function testGetSetConfiguration() {
+  public function testGetSetConfiguration(): void {
     $configuration = FileCacheFactory::getConfiguration();
     $configuration['test_foo_bar'] = ['bar' => 'llama'];
     FileCacheFactory::setConfiguration($configuration);
@@ -169,7 +169,7 @@ public function testGetSetConfiguration() {
    * @covers ::getPrefix
    * @covers ::setPrefix
    */
-  public function testGetSetPrefix() {
+  public function testGetSetPrefix(): void {
     // Random generator.
     $random = new Random();
 
diff --git a/core/tests/Drupal/Tests/Component/FileCache/FileCacheTest.php b/core/tests/Drupal/Tests/Component/FileCache/FileCacheTest.php
index 610a90905c56..88aa8e2f34cd 100644
--- a/core/tests/Drupal/Tests/Component/FileCache/FileCacheTest.php
+++ b/core/tests/Drupal/Tests/Component/FileCache/FileCacheTest.php
@@ -41,7 +41,7 @@ protected function setUp(): void {
    * @covers ::get
    * @covers ::__construct
    */
-  public function testGet() {
+  public function testGet(): void {
     // Test a cache miss.
     $result = $this->fileCache->get(__DIR__ . DIRECTORY_SEPARATOR . 'Fixtures' . DIRECTORY_SEPARATOR . 'no-llama-42.yml');
     $this->assertNull($result);
@@ -68,7 +68,7 @@ public function testGet() {
   /**
    * @covers ::getMultiple
    */
-  public function testGetMultiple() {
+  public function testGetMultiple(): void {
     // Test a cache miss.
     $result = $this->fileCache->getMultiple([__DIR__ . DIRECTORY_SEPARATOR . 'Fixtures' . DIRECTORY_SEPARATOR . 'no-llama-42.yml']);
     $this->assertEmpty($result);
@@ -103,7 +103,7 @@ public function testGetMultiple() {
   /**
    * @covers ::set
    */
-  public function testSet() {
+  public function testSet(): void {
     $filename = __DIR__ . DIRECTORY_SEPARATOR . 'Fixtures' . DIRECTORY_SEPARATOR . 'llama-23.txt';
     $realpath = realpath($filename);
     $cid = 'prefix:test:' . $realpath;
@@ -124,7 +124,7 @@ public function testSet() {
   /**
    * @covers ::delete
    */
-  public function testDelete() {
+  public function testDelete(): void {
     $filename = __DIR__ . DIRECTORY_SEPARATOR . 'Fixtures' . DIRECTORY_SEPARATOR . 'llama-23.txt';
     $realpath = realpath($filename);
     $cid = 'prefix:test:' . $realpath;
diff --git a/core/tests/Drupal/Tests/Component/FileSecurity/FileSecurityTest.php b/core/tests/Drupal/Tests/Component/FileSecurity/FileSecurityTest.php
index add09e6613ca..60cedeb245cb 100644
--- a/core/tests/Drupal/Tests/Component/FileSecurity/FileSecurityTest.php
+++ b/core/tests/Drupal/Tests/Component/FileSecurity/FileSecurityTest.php
@@ -19,7 +19,7 @@ class FileSecurityTest extends TestCase {
   /**
    * @covers ::writeHtaccess
    */
-  public function testWriteHtaccessPrivate() {
+  public function testWriteHtaccessPrivate(): void {
     vfsStream::setup('root');
     FileSecurity::writeHtaccess(vfsStream::url('root'));
     $htaccess_file = vfsStream::url('root') . '/.htaccess';
@@ -32,7 +32,7 @@ public function testWriteHtaccessPrivate() {
   /**
    * @covers ::writeHtaccess
    */
-  public function testWriteHtaccessPublic() {
+  public function testWriteHtaccessPublic(): void {
     vfsStream::setup('root');
     $this->assertTrue(FileSecurity::writeHtaccess(vfsStream::url('root'), FALSE));
     $htaccess_file = vfsStream::url('root') . '/.htaccess';
@@ -45,7 +45,7 @@ public function testWriteHtaccessPublic() {
   /**
    * @covers ::writeHtaccess
    */
-  public function testWriteHtaccessForceOverwrite() {
+  public function testWriteHtaccessForceOverwrite(): void {
     vfsStream::setup('root');
     $htaccess_file = vfsStream::url('root') . '/.htaccess';
     file_put_contents($htaccess_file, "foo");
@@ -58,7 +58,7 @@ public function testWriteHtaccessForceOverwrite() {
   /**
    * @covers ::writeHtaccess
    */
-  public function testWriteHtaccessFailure() {
+  public function testWriteHtaccessFailure(): void {
     vfsStream::setup('root');
     $this->assertFalse(FileSecurity::writeHtaccess(vfsStream::url('root') . '/foo'));
   }
diff --git a/core/tests/Drupal/Tests/Component/FileSystem/RegexDirectoryIteratorTest.php b/core/tests/Drupal/Tests/Component/FileSystem/RegexDirectoryIteratorTest.php
index 39a5095525b1..36749ade6dda 100644
--- a/core/tests/Drupal/Tests/Component/FileSystem/RegexDirectoryIteratorTest.php
+++ b/core/tests/Drupal/Tests/Component/FileSystem/RegexDirectoryIteratorTest.php
@@ -18,7 +18,7 @@ class RegexDirectoryIteratorTest extends TestCase {
    * @covers ::accept
    * @dataProvider providerTestRegexDirectoryIterator
    */
-  public function testRegexDirectoryIterator(array $directory, $regex, array $expected) {
+  public function testRegexDirectoryIterator(array $directory, $regex, array $expected): void {
     vfsStream::setup('root', NULL, $directory);
     $iterator = new RegexDirectoryIterator(vfsStream::url('root'), $regex);
 
diff --git a/core/tests/Drupal/Tests/Component/FrontMatter/FrontMatterTest.php b/core/tests/Drupal/Tests/Component/FrontMatter/FrontMatterTest.php
index a371dc3a70c8..90977d85fb60 100644
--- a/core/tests/Drupal/Tests/Component/FrontMatter/FrontMatterTest.php
+++ b/core/tests/Drupal/Tests/Component/FrontMatter/FrontMatterTest.php
@@ -50,7 +50,7 @@ public static function createFrontMatterSource(?array $yaml, string $content = s
    * @covers ::__construct
    * @covers ::create
    */
-  public function testFrontMatterSerializerException() {
+  public function testFrontMatterSerializerException(): void {
     $this->expectException(\AssertionError::class);
     $this->expectExceptionMessage('The $serializer parameter must reference a class that implements Drupal\Component\Serialization\SerializationInterface.');
     FrontMatter::create('', '');
@@ -64,7 +64,7 @@ public function testFrontMatterSerializerException() {
    * @covers ::parse
    * @covers \Drupal\Component\FrontMatter\Exception\FrontMatterParseException
    */
-  public function testFrontMatterBroken() {
+  public function testFrontMatterBroken(): void {
     $this->expectException(FrontMatterParseException::class);
     $this->expectExceptionMessage('An error occurred when attempting to parse front matter data on line 4');
     $source = "---\ncollection:\n-  key: foo\n  foo: bar\n---\n";
@@ -90,7 +90,7 @@ public function testFrontMatterBroken() {
    *
    * @dataProvider providerFrontMatterData
    */
-  public function testFrontMatterData($yaml, $line, $content = self::SOURCE) {
+  public function testFrontMatterData($yaml, $line, $content = self::SOURCE): void {
     $source = static::createFrontMatterSource($yaml, $content);
     $frontMatter = FrontMatter::create($source);
     $this->assertEquals($content, $frontMatter->getContent());
diff --git a/core/tests/Drupal/Tests/Component/Gettext/PoHeaderTest.php b/core/tests/Drupal/Tests/Component/Gettext/PoHeaderTest.php
index 54d7914475ac..17c26a0b36e0 100644
--- a/core/tests/Drupal/Tests/Component/Gettext/PoHeaderTest.php
+++ b/core/tests/Drupal/Tests/Component/Gettext/PoHeaderTest.php
@@ -29,7 +29,7 @@ class PoHeaderTest extends TestCase {
    *
    * @dataProvider providerTestPluralsFormula
    */
-  public function testPluralsFormula($plural, $expected) {
+  public function testPluralsFormula($plural, $expected): void {
     $p = new PoHeader();
     $parsed = $p->parsePluralForms($plural);
     [$nplurals, $new_plural] = $parsed;
diff --git a/core/tests/Drupal/Tests/Component/Gettext/PoStreamWriterTest.php b/core/tests/Drupal/Tests/Component/Gettext/PoStreamWriterTest.php
index d18888eecddd..667c2129770a 100644
--- a/core/tests/Drupal/Tests/Component/Gettext/PoStreamWriterTest.php
+++ b/core/tests/Drupal/Tests/Component/Gettext/PoStreamWriterTest.php
@@ -53,7 +53,7 @@ protected function setUp(): void {
   /**
    * @covers ::getURI
    */
-  public function testGetUriException() {
+  public function testGetUriException(): void {
     $this->expectException(\Exception::class);
     $this->expectExceptionMessage('No URI set.');
 
@@ -64,7 +64,7 @@ public function testGetUriException() {
    * @covers ::writeItem
    * @dataProvider providerWriteData
    */
-  public function testWriteItem($poContent, $expected, $long) {
+  public function testWriteItem($poContent, $expected, $long): void {
     if ($long) {
       $this->expectException(\Exception::class);
       $this->expectExceptionMessage('Unable to write data:');
@@ -107,7 +107,7 @@ public static function providerWriteData() {
   /**
    * @covers ::close
    */
-  public function testCloseException() {
+  public function testCloseException(): void {
     $this->expectException(\Exception::class);
     $this->expectExceptionMessage('Cannot close stream that is not open.');
 
diff --git a/core/tests/Drupal/Tests/Component/Graph/GraphTest.php b/core/tests/Drupal/Tests/Component/Graph/GraphTest.php
index 3fa25a7f1fa1..ccfd520b1274 100644
--- a/core/tests/Drupal/Tests/Component/Graph/GraphTest.php
+++ b/core/tests/Drupal/Tests/Component/Graph/GraphTest.php
@@ -16,7 +16,7 @@ class GraphTest extends TestCase {
   /**
    * Tests depth-first-search features.
    */
-  public function testDepthFirstSearch() {
+  public function testDepthFirstSearch(): void {
     // The sample graph used is:
     // @code
     // 1 --> 2 --> 3     5 ---> 6
diff --git a/core/tests/Drupal/Tests/Component/HttpFoundation/SecuredRedirectResponseTest.php b/core/tests/Drupal/Tests/Component/HttpFoundation/SecuredRedirectResponseTest.php
index b2a2cabea784..c6a19a35b99b 100644
--- a/core/tests/Drupal/Tests/Component/HttpFoundation/SecuredRedirectResponseTest.php
+++ b/core/tests/Drupal/Tests/Component/HttpFoundation/SecuredRedirectResponseTest.php
@@ -23,7 +23,7 @@ class SecuredRedirectResponseTest extends TestCase {
    * @covers ::createFromRedirectResponse
    * @covers ::fromResponse
    */
-  public function testRedirectCopy() {
+  public function testRedirectCopy(): void {
     $redirect = new RedirectResponse('/magic_redirect_url', 301, ['x-cache-foobar' => 123]);
     $redirect->setProtocolVersion('2.0');
     $redirect->setCharset('ibm-943_P14A-2000');
diff --git a/core/tests/Drupal/Tests/Component/PhpStorage/FileStorageReadOnlyTest.php b/core/tests/Drupal/Tests/Component/PhpStorage/FileStorageReadOnlyTest.php
index 438814702c62..4d4c56ef1ebf 100644
--- a/core/tests/Drupal/Tests/Component/PhpStorage/FileStorageReadOnlyTest.php
+++ b/core/tests/Drupal/Tests/Component/PhpStorage/FileStorageReadOnlyTest.php
@@ -53,7 +53,7 @@ protected function setUp(): void {
   /**
    * Tests writing with one class and reading with another.
    */
-  public function testReadOnly() {
+  public function testReadOnly(): void {
     // Random generator.
     $random = new Random();
 
@@ -85,7 +85,7 @@ public function testReadOnly() {
   /**
    * @covers ::deleteAll
    */
-  public function testDeleteAll() {
+  public function testDeleteAll(): void {
     // Random generator.
     $random = new Random();
 
diff --git a/core/tests/Drupal/Tests/Component/PhpStorage/FileStorageTest.php b/core/tests/Drupal/Tests/Component/PhpStorage/FileStorageTest.php
index db63b5498b64..bc0d8e5e908e 100644
--- a/core/tests/Drupal/Tests/Component/PhpStorage/FileStorageTest.php
+++ b/core/tests/Drupal/Tests/Component/PhpStorage/FileStorageTest.php
@@ -45,7 +45,7 @@ protected function setUp(): void {
    * @covers ::exists
    * @covers ::delete
    */
-  public function testCRUD() {
+  public function testCRUD(): void {
     $php = new FileStorage($this->standardSettings);
     $this->assertCRUD($php);
   }
@@ -53,7 +53,7 @@ public function testCRUD() {
   /**
    * @covers ::deleteAll
    */
-  public function testDeleteAll() {
+  public function testDeleteAll(): void {
     // Random generator.
     $random_generator = new Random();
 
@@ -88,7 +88,7 @@ public function testDeleteAll() {
   /**
    * @covers ::createDirectory
    */
-  public function testCreateDirectoryFailWarning() {
+  public function testCreateDirectoryFailWarning(): void {
     $directory = new vfsStreamDirectory('permissionDenied', 0200);
     $storage = new FileStorage([
       'directory' => $directory->url(),
diff --git a/core/tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFileStorageBase.php b/core/tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFileStorageBase.php
index 0056c4477cfc..5d769d0b1943 100644
--- a/core/tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFileStorageBase.php
+++ b/core/tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFileStorageBase.php
@@ -62,7 +62,7 @@ protected function setUp(): void {
   /**
    * Tests basic load/save/delete operations.
    */
-  public function testCRUD() {
+  public function testCRUD(): void {
     $php = new $this->storageClass($this->settings);
     $this->assertCRUD($php);
   }
@@ -76,7 +76,7 @@ public function testCRUD() {
    * We need to delay over 1 second for mtime test.
    * @medium
    */
-  public function testSecurity() {
+  public function testSecurity(): void {
     $php = new $this->storageClass($this->settings);
     $name = 'test.php';
     $php->save($name, '<?php');
diff --git a/core/tests/Drupal/Tests/Component/Plugin/Attribute/AttributeBaseTest.php b/core/tests/Drupal/Tests/Component/Plugin/Attribute/AttributeBaseTest.php
index 877a0fae2e5e..1dfa467e5998 100644
--- a/core/tests/Drupal/Tests/Component/Plugin/Attribute/AttributeBaseTest.php
+++ b/core/tests/Drupal/Tests/Component/Plugin/Attribute/AttributeBaseTest.php
@@ -17,7 +17,7 @@ class AttributeBaseTest extends TestCase {
    * @covers ::getProvider
    * @covers ::setProvider
    */
-  public function testSetProvider() {
+  public function testSetProvider(): void {
     $plugin = new AttributeBaseStub(id: '1');
     $plugin->setProvider('example');
     $this->assertEquals('example', $plugin->getProvider());
@@ -26,7 +26,7 @@ public function testSetProvider() {
   /**
    * @covers ::getId
    */
-  public function testGetId() {
+  public function testGetId(): void {
     $plugin = new AttributeBaseStub(id: 'example');
     $this->assertEquals('example', $plugin->getId());
   }
@@ -35,7 +35,7 @@ public function testGetId() {
    * @covers ::getClass
    * @covers ::setClass
    */
-  public function testSetClass() {
+  public function testSetClass(): void {
     $plugin = new AttributeBaseStub(id: '1');
     $plugin->setClass('example');
     $this->assertEquals('example', $plugin->getClass());
diff --git a/core/tests/Drupal/Tests/Component/Plugin/Attribute/AttributeClassDiscoveryCachedTest.php b/core/tests/Drupal/Tests/Component/Plugin/Attribute/AttributeClassDiscoveryCachedTest.php
index 4798504927b5..566058d7c886 100644
--- a/core/tests/Drupal/Tests/Component/Plugin/Attribute/AttributeClassDiscoveryCachedTest.php
+++ b/core/tests/Drupal/Tests/Component/Plugin/Attribute/AttributeClassDiscoveryCachedTest.php
@@ -36,7 +36,7 @@ protected function setUp(): void {
    *
    * @covers ::getDefinitions
    */
-  public function testGetDefinitions() {
+  public function testGetDefinitions(): void {
     // Path to the classes which we'll discover and parse annotation.
     $discovery_path = __DIR__ . '/Fixtures/Plugins';
     // File path that should be discovered within that directory.
diff --git a/core/tests/Drupal/Tests/Component/Plugin/Attribute/AttributeClassDiscoveryTest.php b/core/tests/Drupal/Tests/Component/Plugin/Attribute/AttributeClassDiscoveryTest.php
index 92b8fede1c44..f6c6370e7e12 100644
--- a/core/tests/Drupal/Tests/Component/Plugin/Attribute/AttributeClassDiscoveryTest.php
+++ b/core/tests/Drupal/Tests/Component/Plugin/Attribute/AttributeClassDiscoveryTest.php
@@ -36,7 +36,7 @@ protected function setUp(): void {
    * @covers ::__construct
    * @covers ::getPluginNamespaces
    */
-  public function testGetPluginNamespaces() {
+  public function testGetPluginNamespaces(): void {
     // Path to the classes which we'll discover and parse annotation.
     $discovery = new AttributeClassDiscovery(['com/example' => [__DIR__]]);
 
@@ -51,7 +51,7 @@ public function testGetPluginNamespaces() {
    * @covers ::getDefinitions
    * @covers ::prepareAttributeDefinition
    */
-  public function testGetDefinitions() {
+  public function testGetDefinitions(): void {
     $discovery = new AttributeClassDiscovery(['com\example' => [__DIR__ . '/Fixtures/Plugins']]);
     $this->assertEquals([
       'discovery_test_1' => [
diff --git a/core/tests/Drupal/Tests/Component/Plugin/Attribute/PluginIdTest.php b/core/tests/Drupal/Tests/Component/Plugin/Attribute/PluginIdTest.php
index 72ba747627a0..2791af3d3f7b 100644
--- a/core/tests/Drupal/Tests/Component/Plugin/Attribute/PluginIdTest.php
+++ b/core/tests/Drupal/Tests/Component/Plugin/Attribute/PluginIdTest.php
@@ -16,7 +16,7 @@ class PluginIdTest extends TestCase {
   /**
    * @covers ::get
    */
-  public function testGet() {
+  public function testGet(): void {
     // Assert plugin starts with only an ID.
     $plugin = new PluginID(id: 'test');
     // Plugin's always have a class set by discovery.
diff --git a/core/tests/Drupal/Tests/Component/Plugin/Attribute/PluginTest.php b/core/tests/Drupal/Tests/Component/Plugin/Attribute/PluginTest.php
index 0399b7c59b70..5cad2a940673 100644
--- a/core/tests/Drupal/Tests/Component/Plugin/Attribute/PluginTest.php
+++ b/core/tests/Drupal/Tests/Component/Plugin/Attribute/PluginTest.php
@@ -17,7 +17,7 @@ class PluginTest extends TestCase {
    * @covers ::__construct
    * @covers ::get
    */
-  public function testGet() {
+  public function testGet(): void {
     $plugin = new PluginStub(id: 'example', deriver: 'test');
     $plugin->setClass('foo');
     $this->assertEquals([
@@ -31,7 +31,7 @@ public function testGet() {
    * @covers ::setProvider
    * @covers ::getProvider
    */
-  public function testSetProvider() {
+  public function testSetProvider(): void {
     $plugin = new Plugin(id: 'example');
     $plugin->setProvider('example');
     $this->assertEquals('example', $plugin->getProvider());
@@ -40,7 +40,7 @@ public function testSetProvider() {
   /**
    * @covers ::getId
    */
-  public function testGetId() {
+  public function testGetId(): void {
     $plugin = new Plugin(id: 'example');
     $this->assertEquals('example', $plugin->getId());
   }
@@ -49,7 +49,7 @@ public function testGetId() {
    * @covers ::setClass
    * @covers ::getClass
    */
-  public function testSetClass() {
+  public function testSetClass(): void {
     $plugin = new Plugin(id: 'test');
     $plugin->setClass('example');
     $this->assertEquals('example', $plugin->getClass());
diff --git a/core/tests/Drupal/Tests/Component/Plugin/Context/ContextTest.php b/core/tests/Drupal/Tests/Component/Plugin/Context/ContextTest.php
index faa0dd47f0d9..6004e705acf8 100644
--- a/core/tests/Drupal/Tests/Component/Plugin/Context/ContextTest.php
+++ b/core/tests/Drupal/Tests/Component/Plugin/Context/ContextTest.php
@@ -28,7 +28,7 @@ public static function providerGetContextValue() {
    * @covers ::getContextValue
    * @dataProvider providerGetContextValue
    */
-  public function testGetContextValue($expected, $context_value, $is_required, $data_type) {
+  public function testGetContextValue($expected, $context_value, $is_required, $data_type): void {
     // Mock a Context object.
     $mock_context = $this->getMockBuilder('Drupal\Component\Plugin\Context\Context')
       ->disableOriginalConstructor()
@@ -116,7 +116,7 @@ public function testHasContextValue($has_context_value, $default_value): void {
   /**
    * @covers ::getContextValue
    */
-  public function testDefaultValue() {
+  public function testDefaultValue(): void {
     $mock_definition = $this->createMock('Drupal\Component\Plugin\Context\ContextDefinitionInterface');
 
     $mock_definition->expects($this->once())
diff --git a/core/tests/Drupal/Tests/Component/Plugin/DefaultFactoryTest.php b/core/tests/Drupal/Tests/Component/Plugin/DefaultFactoryTest.php
index 0413216eeb13..f92d274cd858 100644
--- a/core/tests/Drupal/Tests/Component/Plugin/DefaultFactoryTest.php
+++ b/core/tests/Drupal/Tests/Component/Plugin/DefaultFactoryTest.php
@@ -23,7 +23,7 @@ class DefaultFactoryTest extends TestCase {
    *
    * @covers ::getPluginClass
    */
-  public function testGetPluginClassWithValidArrayPluginDefinition() {
+  public function testGetPluginClassWithValidArrayPluginDefinition(): void {
     $plugin_class = Corn::class;
     $class = DefaultFactory::getPluginClass('corn', ['class' => $plugin_class]);
 
@@ -35,7 +35,7 @@ public function testGetPluginClassWithValidArrayPluginDefinition() {
    *
    * @covers ::getPluginClass
    */
-  public function testGetPluginClassWithValidObjectPluginDefinition() {
+  public function testGetPluginClassWithValidObjectPluginDefinition(): void {
     $plugin_class = Corn::class;
     $plugin_definition = $this->getMockBuilder(PluginDefinitionInterface::class)->getMock();
     $plugin_definition->expects($this->atLeastOnce())
@@ -51,7 +51,7 @@ public function testGetPluginClassWithValidObjectPluginDefinition() {
    *
    * @covers ::getPluginClass
    */
-  public function testGetPluginClassWithMissingClassWithArrayPluginDefinition() {
+  public function testGetPluginClassWithMissingClassWithArrayPluginDefinition(): void {
     $this->expectException(PluginException::class);
     $this->expectExceptionMessage('The plugin (corn) did not specify an instance class.');
     DefaultFactory::getPluginClass('corn', []);
@@ -62,7 +62,7 @@ public function testGetPluginClassWithMissingClassWithArrayPluginDefinition() {
    *
    * @covers ::getPluginClass
    */
-  public function testGetPluginClassWithMissingClassWithObjectPluginDefinition() {
+  public function testGetPluginClassWithMissingClassWithObjectPluginDefinition(): void {
     $plugin_definition = $this->getMockBuilder(PluginDefinitionInterface::class)
       ->getMock();
     $this->expectException(PluginException::class);
@@ -75,7 +75,7 @@ public function testGetPluginClassWithMissingClassWithObjectPluginDefinition() {
    *
    * @covers ::getPluginClass
    */
-  public function testGetPluginClassWithNotExistingClassWithArrayPluginDefinition() {
+  public function testGetPluginClassWithNotExistingClassWithArrayPluginDefinition(): void {
     $this->expectException(PluginException::class);
     $this->expectExceptionMessage('Plugin (carrot) instance class "Drupal\Tests\Component\Plugin\Fixtures\vegetable\Carrot" does not exist.');
     DefaultFactory::getPluginClass('carrot', ['class' => 'Drupal\Tests\Component\Plugin\Fixtures\vegetable\Carrot']);
@@ -86,7 +86,7 @@ public function testGetPluginClassWithNotExistingClassWithArrayPluginDefinition(
    *
    * @covers ::getPluginClass
    */
-  public function testGetPluginClassWithNotExistingClassWithObjectPluginDefinition() {
+  public function testGetPluginClassWithNotExistingClassWithObjectPluginDefinition(): void {
     $plugin_class = 'Drupal\Tests\Component\Plugin\Fixtures\vegetable\Carrot';
     $plugin_definition = $this->getMockBuilder(PluginDefinitionInterface::class)->getMock();
     $plugin_definition->expects($this->atLeastOnce())
@@ -101,7 +101,7 @@ public function testGetPluginClassWithNotExistingClassWithObjectPluginDefinition
    *
    * @covers ::getPluginClass
    */
-  public function testGetPluginClassWithInterfaceWithArrayPluginDefinition() {
+  public function testGetPluginClassWithInterfaceWithArrayPluginDefinition(): void {
     $plugin_class = Corn::class;
     $class = DefaultFactory::getPluginClass('corn', ['class' => $plugin_class], VegetableInterface::class);
 
@@ -113,7 +113,7 @@ public function testGetPluginClassWithInterfaceWithArrayPluginDefinition() {
    *
    * @covers ::getPluginClass
    */
-  public function testGetPluginClassWithInterfaceWithObjectPluginDefinition() {
+  public function testGetPluginClassWithInterfaceWithObjectPluginDefinition(): void {
     $plugin_class = Corn::class;
     $plugin_definition = $this->getMockBuilder(PluginDefinitionInterface::class)->getMock();
     $plugin_definition->expects($this->atLeastOnce())
@@ -129,7 +129,7 @@ public function testGetPluginClassWithInterfaceWithObjectPluginDefinition() {
    *
    * @covers ::getPluginClass
    */
-  public function testGetPluginClassWithInterfaceAndInvalidClassWithArrayPluginDefinition() {
+  public function testGetPluginClassWithInterfaceAndInvalidClassWithArrayPluginDefinition(): void {
     $this->expectException(PluginException::class);
     $this->expectExceptionMessage('Plugin "corn" (Drupal\Tests\Component\Plugin\Fixtures\vegetable\Broccoli) must implement interface Drupal\Tests\Component\Plugin\Fixtures\vegetable\VegetableInterface.');
     DefaultFactory::getPluginClass('corn', ['class' => Broccoli::class], VegetableInterface::class);
@@ -140,7 +140,7 @@ public function testGetPluginClassWithInterfaceAndInvalidClassWithArrayPluginDef
    *
    * @covers ::getPluginClass
    */
-  public function testGetPluginClassWithInterfaceAndInvalidClassWithObjectPluginDefinition() {
+  public function testGetPluginClassWithInterfaceAndInvalidClassWithObjectPluginDefinition(): void {
     $plugin_class = Broccoli::class;
     $plugin_definition = $this->getMockBuilder(PluginDefinitionInterface::class)->getMock();
     $plugin_definition->expects($this->atLeastOnce())
diff --git a/core/tests/Drupal/Tests/Component/Plugin/Discovery/AnnotatedClassDiscoveryTest.php b/core/tests/Drupal/Tests/Component/Plugin/Discovery/AnnotatedClassDiscoveryTest.php
index 6b7c905c28f3..483764b3c0ea 100644
--- a/core/tests/Drupal/Tests/Component/Plugin/Discovery/AnnotatedClassDiscoveryTest.php
+++ b/core/tests/Drupal/Tests/Component/Plugin/Discovery/AnnotatedClassDiscoveryTest.php
@@ -58,7 +58,7 @@ public static function provideBadAnnotations() {
    *
    * @coversNothing
    */
-  public function testAutoloadBadAnnotations($annotation) {
+  public function testAutoloadBadAnnotations($annotation): void {
     // Set up a class file in vfsStream.
     vfsStreamWrapper::register();
     $root = new vfsStreamDirectory('root');
diff --git a/core/tests/Drupal/Tests/Component/Plugin/Discovery/AttributeBridgeDecoratorTest.php b/core/tests/Drupal/Tests/Component/Plugin/Discovery/AttributeBridgeDecoratorTest.php
index 8d7be68c1662..d2deaa5ffb25 100644
--- a/core/tests/Drupal/Tests/Component/Plugin/Discovery/AttributeBridgeDecoratorTest.php
+++ b/core/tests/Drupal/Tests/Component/Plugin/Discovery/AttributeBridgeDecoratorTest.php
@@ -19,7 +19,7 @@ class AttributeBridgeDecoratorTest extends TestCase {
   /**
    * @covers ::getDefinitions
    */
-  public function testGetDefinitions() {
+  public function testGetDefinitions(): void {
     // Normally the attribute classes would be autoloaded.
     include_once __DIR__ . '/../Attribute/Fixtures/CustomPlugin.php';
     include_once __DIR__ . '/../Attribute/Fixtures/Plugins/PluginNamespace/AttributeDiscoveryTest1.php';
diff --git a/core/tests/Drupal/Tests/Component/Plugin/Discovery/DiscoveryCachedTraitTest.php b/core/tests/Drupal/Tests/Component/Plugin/Discovery/DiscoveryCachedTraitTest.php
index cd2bbcea11bd..9db89444c171 100644
--- a/core/tests/Drupal/Tests/Component/Plugin/Discovery/DiscoveryCachedTraitTest.php
+++ b/core/tests/Drupal/Tests/Component/Plugin/Discovery/DiscoveryCachedTraitTest.php
@@ -35,7 +35,7 @@ public static function providerGetDefinition() {
    * @covers ::getDefinition
    * @dataProvider providerGetDefinition
    */
-  public function testGetDefinition($expected, $cached_definitions, $get_definitions, $plugin_id) {
+  public function testGetDefinition($expected, $cached_definitions, $get_definitions, $plugin_id): void {
     $trait = $this->getMockBuilder(DiscoveryCachedTraitMockableClass::class)
       ->onlyMethods(['getDefinitions'])
       ->getMock();
diff --git a/core/tests/Drupal/Tests/Component/Plugin/Discovery/DiscoveryTraitTest.php b/core/tests/Drupal/Tests/Component/Plugin/Discovery/DiscoveryTraitTest.php
index 16858ae5d13f..d26a538aad62 100644
--- a/core/tests/Drupal/Tests/Component/Plugin/Discovery/DiscoveryTraitTest.php
+++ b/core/tests/Drupal/Tests/Component/Plugin/Discovery/DiscoveryTraitTest.php
@@ -33,7 +33,7 @@ public static function providerDoGetDefinition() {
    * @covers ::doGetDefinition
    * @dataProvider providerDoGetDefinition
    */
-  public function testDoGetDefinition($expected, $definitions, $plugin_id) {
+  public function testDoGetDefinition($expected, $definitions, $plugin_id): void {
     $trait = new DiscoveryTraitMockableClass();
     // Un-protect the method using reflection.
     $method_ref = new \ReflectionMethod($trait, 'doGetDefinition');
@@ -63,7 +63,7 @@ public static function providerDoGetDefinitionException() {
    * @dataProvider providerDoGetDefinitionException
    * @uses \Drupal\Component\Plugin\Exception\PluginNotFoundException
    */
-  public function testDoGetDefinitionException($expected, $definitions, $plugin_id) {
+  public function testDoGetDefinitionException($expected, $definitions, $plugin_id): void {
     $trait = new DiscoveryTraitMockableClass();
     // Un-protect the method using reflection.
     $method_ref = new \ReflectionMethod($trait, 'doGetDefinition');
@@ -76,7 +76,7 @@ public function testDoGetDefinitionException($expected, $definitions, $plugin_id
    * @covers ::getDefinition
    * @dataProvider providerDoGetDefinition
    */
-  public function testGetDefinition($expected, $definitions, $plugin_id) {
+  public function testGetDefinition($expected, $definitions, $plugin_id): void {
     // Since getDefinition is a wrapper around doGetDefinition(), we can re-use
     // its data provider. We just have to tell abstract method getDefinitions()
     // to use the $definitions array.
@@ -98,7 +98,7 @@ public function testGetDefinition($expected, $definitions, $plugin_id) {
    * @dataProvider providerDoGetDefinitionException
    * @uses \Drupal\Component\Plugin\Exception\PluginNotFoundException
    */
-  public function testGetDefinitionException($expected, $definitions, $plugin_id) {
+  public function testGetDefinitionException($expected, $definitions, $plugin_id): void {
     // Since getDefinition is a wrapper around doGetDefinition(), we can re-use
     // its data provider. We just have to tell abstract method getDefinitions()
     // to use the $definitions array.
@@ -131,7 +131,7 @@ public static function providerHasDefinition() {
    * @covers ::hasDefinition
    * @dataProvider providerHasDefinition
    */
-  public function testHasDefinition($expected, $plugin_id) {
+  public function testHasDefinition($expected, $plugin_id): void {
     $trait = $this->getMockBuilder(DiscoveryTraitMockableClass::class)
       ->onlyMethods(['getDefinition'])
       ->getMock();
diff --git a/core/tests/Drupal/Tests/Component/Plugin/Discovery/StaticDiscoveryDecoratorTest.php b/core/tests/Drupal/Tests/Component/Plugin/Discovery/StaticDiscoveryDecoratorTest.php
index 94fbe6ad9d7a..b2f430416a77 100644
--- a/core/tests/Drupal/Tests/Component/Plugin/Discovery/StaticDiscoveryDecoratorTest.php
+++ b/core/tests/Drupal/Tests/Component/Plugin/Discovery/StaticDiscoveryDecoratorTest.php
@@ -61,7 +61,7 @@ public static function providerGetDefinition() {
    * @covers ::getDefinition
    * @dataProvider providerGetDefinition
    */
-  public function testGetDefinition($expected, $has_register_definitions, $exception_on_invalid, $definitions, $base_plugin_id) {
+  public function testGetDefinition($expected, $has_register_definitions, $exception_on_invalid, $definitions, $base_plugin_id): void {
     // Mock our StaticDiscoveryDecorator.
     $mock_decorator = $this->getMockBuilder(StaticDiscoveryDecorator::class)
       ->disableOriginalConstructor()
@@ -126,7 +126,7 @@ public static function providerGetDefinitions() {
    * @covers ::getDefinitions
    * @dataProvider providerGetDefinitions
    */
-  public function testGetDefinitions($has_register_definitions, $definitions) {
+  public function testGetDefinitions($has_register_definitions, $definitions): void {
     // Mock our StaticDiscoveryDecorator.
     $mock_decorator = $this->getMockBuilder(StaticDiscoveryDecorator::class)
       ->disableOriginalConstructor()
@@ -189,7 +189,7 @@ public static function providerCall() {
    * @covers ::__call
    * @dataProvider providerCall
    */
-  public function testCall($method, $args) {
+  public function testCall($method, $args): void {
     // Mock a decorated object.
     $mock_decorated = $this->getMockBuilder(StaticDiscoveryTestDecoratedClass::class)
       ->onlyMethods([$method])
diff --git a/core/tests/Drupal/Tests/Component/Plugin/Factory/ReflectionFactoryTest.php b/core/tests/Drupal/Tests/Component/Plugin/Factory/ReflectionFactoryTest.php
index ccacab19e64f..860c96c6e22a 100644
--- a/core/tests/Drupal/Tests/Component/Plugin/Factory/ReflectionFactoryTest.php
+++ b/core/tests/Drupal/Tests/Component/Plugin/Factory/ReflectionFactoryTest.php
@@ -80,7 +80,7 @@ public static function providerGetInstanceArguments() {
    * @covers ::createInstance
    * @dataProvider providerGetInstanceArguments
    */
-  public function testCreateInstance($expected, $reflector_name, $plugin_id, $plugin_definition, $configuration) {
+  public function testCreateInstance($expected, $reflector_name, $plugin_id, $plugin_definition, $configuration): void {
     // Create a mock DiscoveryInterface which can return our plugin definition.
     $mock_discovery = $this->getMockBuilder('Drupal\Component\Plugin\Discovery\DiscoveryInterface')
       ->onlyMethods(['getDefinition', 'getDefinitions', 'hasDefinition'])
@@ -105,7 +105,7 @@ public function testCreateInstance($expected, $reflector_name, $plugin_id, $plug
    * @covers ::getInstanceArguments
    * @dataProvider providerGetInstanceArguments
    */
-  public function testGetInstanceArguments($expected, $reflector_name, $plugin_id, $plugin_definition, $configuration) {
+  public function testGetInstanceArguments($expected, $reflector_name, $plugin_id, $plugin_definition, $configuration): void {
     $reflection_factory = $this->getMockBuilder('Drupal\Component\Plugin\Factory\ReflectionFactory')
       ->disableOriginalConstructor()
       ->getMock();
diff --git a/core/tests/Drupal/Tests/Component/Plugin/PluginBaseTest.php b/core/tests/Drupal/Tests/Component/Plugin/PluginBaseTest.php
index e33cf214a759..488361d6de9e 100644
--- a/core/tests/Drupal/Tests/Component/Plugin/PluginBaseTest.php
+++ b/core/tests/Drupal/Tests/Component/Plugin/PluginBaseTest.php
@@ -16,7 +16,7 @@ class PluginBaseTest extends TestCase {
    * @dataProvider providerTestGetPluginId
    * @covers ::getPluginId
    */
-  public function testGetPluginId($plugin_id, $expected) {
+  public function testGetPluginId($plugin_id, $expected): void {
     $plugin_base = $this->getMockForAbstractClass('Drupal\Component\Plugin\PluginBase', [
       [],
       $plugin_id,
@@ -42,7 +42,7 @@ public static function providerTestGetPluginId() {
    * @dataProvider providerTestGetBaseId
    * @coves ::getBaseId
    */
-  public function testGetBaseId($plugin_id, $expected) {
+  public function testGetBaseId($plugin_id, $expected): void {
     /** @var \Drupal\Component\Plugin\PluginBase|\PHPUnit\Framework\MockObject\MockObject $plugin_base */
     $plugin_base = $this->getMockForAbstractClass('Drupal\Component\Plugin\PluginBase', [
       [],
@@ -69,7 +69,7 @@ public static function providerTestGetBaseId() {
    * @dataProvider providerTestGetDerivativeId
    * @covers ::getDerivativeId
    */
-  public function testGetDerivativeId($plugin_id = NULL, $expected = NULL) {
+  public function testGetDerivativeId($plugin_id = NULL, $expected = NULL): void {
     /** @var \Drupal\Component\Plugin\PluginBase|\PHPUnit\Framework\MockObject\MockObject $plugin_base */
     $plugin_base = $this->getMockForAbstractClass('Drupal\Component\Plugin\PluginBase', [
       [],
@@ -95,7 +95,7 @@ public static function providerTestGetDerivativeId() {
   /**
    * @covers ::getPluginDefinition
    */
-  public function testGetPluginDefinition() {
+  public function testGetPluginDefinition(): void {
     $plugin_base = $this->getMockForAbstractClass('Drupal\Component\Plugin\PluginBase', [
       [],
       'plugin_id',
diff --git a/core/tests/Drupal/Tests/Component/Plugin/PluginManagerBaseTest.php b/core/tests/Drupal/Tests/Component/Plugin/PluginManagerBaseTest.php
index ad9ba1ac9696..39fdeddc08dd 100644
--- a/core/tests/Drupal/Tests/Component/Plugin/PluginManagerBaseTest.php
+++ b/core/tests/Drupal/Tests/Component/Plugin/PluginManagerBaseTest.php
@@ -50,7 +50,7 @@ public function getMockFactoryInterface($expects_count) {
    *
    * @covers ::createInstance
    */
-  public function testCreateInstance() {
+  public function testCreateInstance(): void {
     $manager = $this->getMockBuilder('Drupal\Component\Plugin\PluginManagerBase')
       ->getMockForAbstractClass();
     // PluginManagerBase::createInstance() looks for a factory object and then
@@ -70,7 +70,7 @@ public function testCreateInstance() {
    *
    * @covers ::createInstance
    */
-  public function testCreateInstanceFallback() {
+  public function testCreateInstanceFallback(): void {
     // We use our special stub class which extends PluginManagerBase and also
     // implements FallbackPluginManagerInterface.
     $manager = new StubFallbackPluginManager();
@@ -96,7 +96,7 @@ public function testCreateInstanceFallback() {
   /**
    * @covers ::getInstance
    */
-  public function testGetInstance() {
+  public function testGetInstance(): void {
     $options = [
       'foo' => 'F00',
       'bar' => 'bAr',
@@ -113,7 +113,7 @@ public function testGetInstance() {
   /**
    * @covers ::getInstance
    */
-  public function testGetInstanceWithoutMapperShouldThrowException() {
+  public function testGetInstanceWithoutMapperShouldThrowException(): void {
     $options = [
       'foo' => 'F00',
       'bar' => 'bAr',
diff --git a/core/tests/Drupal/Tests/Component/ProxyBuilder/ProxyBuilderTest.php b/core/tests/Drupal/Tests/Component/ProxyBuilder/ProxyBuilderTest.php
index 271bef19ca0b..05eac87208e3 100644
--- a/core/tests/Drupal/Tests/Component/ProxyBuilder/ProxyBuilderTest.php
+++ b/core/tests/Drupal/Tests/Component/ProxyBuilder/ProxyBuilderTest.php
@@ -32,7 +32,7 @@ protected function setUp(): void {
   /**
    * @covers ::buildProxyClassName
    */
-  public function testBuildProxyClassName() {
+  public function testBuildProxyClassName(): void {
     $class_name = $this->proxyBuilder->buildProxyClassName('Drupal\Tests\Component\ProxyBuilder\TestServiceNoMethod');
     $this->assertEquals('Drupal\Tests\ProxyClass\Component\ProxyBuilder\TestServiceNoMethod', $class_name);
   }
@@ -40,7 +40,7 @@ public function testBuildProxyClassName() {
   /**
    * @covers ::buildProxyClassName
    */
-  public function testBuildProxyClassNameForModule() {
+  public function testBuildProxyClassNameForModule(): void {
     $class_name = $this->proxyBuilder->buildProxyClassName('Drupal\views_ui\ParamConverter\ViewUIConverter');
     $this->assertEquals('Drupal\views_ui\ProxyClass\ParamConverter\ViewUIConverter', $class_name);
   }
@@ -48,7 +48,7 @@ public function testBuildProxyClassNameForModule() {
   /**
    * @covers ::buildProxyNamespace
    */
-  public function testBuildProxyNamespace() {
+  public function testBuildProxyNamespace(): void {
     $class_name = $this->proxyBuilder->buildProxyNamespace('Drupal\Tests\Component\ProxyBuilder\TestServiceNoMethod');
     $this->assertEquals('Drupal\Tests\ProxyClass\Component\ProxyBuilder', $class_name);
   }
@@ -60,7 +60,7 @@ public function testBuildProxyNamespace() {
    * @covers ::buildConstructorMethod
    * @covers ::buildLazyLoadItselfMethod
    */
-  public function testBuildNoMethod() {
+  public function testBuildNoMethod(): void {
     $class = 'Drupal\Tests\Component\ProxyBuilder\TestServiceNoMethod';
 
     $result = $this->proxyBuilder->build($class);
@@ -71,7 +71,7 @@ public function testBuildNoMethod() {
    * @covers ::buildMethod
    * @covers ::buildMethodBody
    */
-  public function testBuildSimpleMethod() {
+  public function testBuildSimpleMethod(): void {
     $class = 'Drupal\Tests\Component\ProxyBuilder\TestServiceSimpleMethod';
 
     $result = $this->proxyBuilder->build($class);
@@ -95,7 +95,7 @@ public function method()
    * @covers ::buildParameter
    * @covers ::buildMethodBody
    */
-  public function testBuildMethodWithParameter() {
+  public function testBuildMethodWithParameter(): void {
     $class = 'Drupal\Tests\Component\ProxyBuilder\TestServiceMethodWithParameter';
 
     $result = $this->proxyBuilder->build($class);
@@ -119,7 +119,7 @@ public function methodWithParameter($parameter)
    * @covers ::buildParameter
    * @covers ::buildMethodBody
    */
-  public function testBuildComplexMethod() {
+  public function testBuildComplexMethod(): void {
     $class = 'Drupal\Tests\Component\ProxyBuilder\TestServiceComplexMethod';
 
     $result = $this->proxyBuilder->build($class);
@@ -144,7 +144,7 @@ public function complexMethod(string $parameter, callable $function, ?\Drupal\Te
   /**
    * @covers ::buildMethodBody
    */
-  public function testBuildServiceMethodReturnsVoid() {
+  public function testBuildServiceMethodReturnsVoid(): void {
     $class = TestServiceMethodReturnsVoid::class;
 
     $result = $this->proxyBuilder->build($class);
@@ -169,7 +169,7 @@ public function methodReturnsVoid(string $parameter): void
    * @covers ::buildMethod
    * @covers ::buildMethodBody
    */
-  public function testBuildReturnReference() {
+  public function testBuildReturnReference(): void {
     $class = 'Drupal\Tests\Component\ProxyBuilder\TestServiceReturnReference';
 
     $result = $this->proxyBuilder->build($class);
@@ -195,7 +195,7 @@ public function &returnReference()
    * @covers ::buildParameter
    * @covers ::buildMethodBody
    */
-  public function testBuildWithInterface() {
+  public function testBuildWithInterface(): void {
     $class = 'Drupal\Tests\Component\ProxyBuilder\TestServiceWithInterface';
 
     $result = $this->proxyBuilder->build($class);
@@ -219,7 +219,7 @@ public function testMethod($parameter)
   /**
    * @covers ::build
    */
-  public function testBuildWithNestedInterface() {
+  public function testBuildWithNestedInterface(): void {
     $class = 'Drupal\Tests\Component\ProxyBuilder\TestServiceWithChildInterfaces';
 
     $result = $this->proxyBuilder->build($class);
@@ -234,7 +234,7 @@ public function testBuildWithNestedInterface() {
    * @covers ::buildParameter
    * @covers ::buildMethodBody
    */
-  public function testBuildWithProtectedAndPrivateMethod() {
+  public function testBuildWithProtectedAndPrivateMethod(): void {
     $class = 'Drupal\Tests\Component\ProxyBuilder\TestServiceWithProtectedMethods';
 
     $result = $this->proxyBuilder->build($class);
@@ -259,7 +259,7 @@ public function testMethod($parameter)
    * @covers ::buildParameter
    * @covers ::buildMethodBody
    */
-  public function testBuildWithPublicStaticMethod() {
+  public function testBuildWithPublicStaticMethod(): void {
     $class = 'Drupal\Tests\Component\ProxyBuilder\TestServiceWithPublicStaticMethod';
 
     $result = $this->proxyBuilder->build($class);
@@ -285,7 +285,7 @@ public static function testMethod($parameter)
    * @covers ::buildParameter
    * @covers ::buildMethodBody
    */
-  public function testBuildWithNullableSelfTypeHint() {
+  public function testBuildWithNullableSelfTypeHint(): void {
     $class = 'Drupal\Tests\Component\ProxyBuilder\TestServiceNullableTypeHintSelf';
 
     $result = $this->proxyBuilder->build($class);
diff --git a/core/tests/Drupal/Tests/Component/Render/FormattableMarkupTest.php b/core/tests/Drupal/Tests/Component/Render/FormattableMarkupTest.php
index 9bd02126d786..d34511948954 100644
--- a/core/tests/Drupal/Tests/Component/Render/FormattableMarkupTest.php
+++ b/core/tests/Drupal/Tests/Component/Render/FormattableMarkupTest.php
@@ -36,7 +36,7 @@ class FormattableMarkupTest extends TestCase {
    * @covers ::__toString
    * @covers ::jsonSerialize
    */
-  public function testToString() {
+  public function testToString(): void {
     $string = 'Can I have a @replacement';
     $formattable_string = new FormattableMarkup($string, ['@replacement' => 'kitten']);
     $text = (string) $formattable_string;
@@ -48,7 +48,7 @@ public function testToString() {
   /**
    * @covers ::count
    */
-  public function testCount() {
+  public function testCount(): void {
     $string = 'Can I have a @replacement';
     $formattable_string = new FormattableMarkup($string, ['@replacement' => 'kitten']);
     $this->assertEquals(strlen($string), $formattable_string->count());
@@ -75,7 +75,7 @@ public function errorHandler($error_number, $error_message) {
    * @covers ::__toString
    * @dataProvider providerTestUnexpectedPlaceholder
    */
-  public function testUnexpectedPlaceholder($string, $arguments, $error_number, $error_message) {
+  public function testUnexpectedPlaceholder($string, $arguments, $error_number, $error_message): void {
     // We set a custom error handler because of https://github.com/sebastianbergmann/phpunit/issues/487
     set_error_handler([$this, 'errorHandler']);
     // We want this to trigger an error.
diff --git a/core/tests/Drupal/Tests/Component/Render/HtmlEscapedTextTest.php b/core/tests/Drupal/Tests/Component/Render/HtmlEscapedTextTest.php
index 2f09bf1821f0..2b10bbfbd79f 100644
--- a/core/tests/Drupal/Tests/Component/Render/HtmlEscapedTextTest.php
+++ b/core/tests/Drupal/Tests/Component/Render/HtmlEscapedTextTest.php
@@ -23,7 +23,7 @@ class HtmlEscapedTextTest extends TestCase {
    *
    * @dataProvider providerToString
    */
-  public function testToString($text, $expected, $message) {
+  public function testToString($text, $expected, $message): void {
     $escapable_string = new HtmlEscapedText($text);
     $this->assertEquals($expected, (string) $escapable_string, $message);
     $this->assertEquals($expected, $escapable_string->jsonSerialize());
@@ -60,7 +60,7 @@ public static function providerToString() {
   /**
    * @covers ::count
    */
-  public function testCount() {
+  public function testCount(): void {
     $string = 'Can I have a <em>kitten</em>';
     $escapable_string = new HtmlEscapedText($string);
     $this->assertEquals(strlen($string), $escapable_string->count());
diff --git a/core/tests/Drupal/Tests/Component/Render/PlainTextOutputTest.php b/core/tests/Drupal/Tests/Component/Render/PlainTextOutputTest.php
index afae2d777fe2..23ddfea01197 100644
--- a/core/tests/Drupal/Tests/Component/Render/PlainTextOutputTest.php
+++ b/core/tests/Drupal/Tests/Component/Render/PlainTextOutputTest.php
@@ -30,7 +30,7 @@ class PlainTextOutputTest extends TestCase {
    * @covers ::renderFromHtml
    * @dataProvider providerRenderFromHtml
    */
-  public function testRenderFromHtml($expected, $string, $args = []) {
+  public function testRenderFromHtml($expected, $string, $args = []): void {
     $markup = new FormattableMarkup($string, $args);
     $output = PlainTextOutput::renderFromHtml($markup);
     $this->assertSame($expected, $output);
diff --git a/core/tests/Drupal/Tests/Component/Serialization/JsonTest.php b/core/tests/Drupal/Tests/Component/Serialization/JsonTest.php
index d940543136bb..9f24283f962f 100644
--- a/core/tests/Drupal/Tests/Component/Serialization/JsonTest.php
+++ b/core/tests/Drupal/Tests/Component/Serialization/JsonTest.php
@@ -57,7 +57,7 @@ protected function setUp(): void {
   /**
    * Tests encoding for every ASCII character.
    */
-  public function testEncodingAscii() {
+  public function testEncodingAscii(): void {
     // Verify there aren't character encoding problems with the source string.
     $this->assertSame(127, strlen($this->string), 'A string with the full ASCII table has the correct length.');
     foreach ($this->htmlUnsafe as $char) {
@@ -68,7 +68,7 @@ public function testEncodingAscii() {
   /**
    * Tests encoding length.
    */
-  public function testEncodingLength() {
+  public function testEncodingLength(): void {
     // Verify that JSON encoding produces a string with all of the characters.
     $json = Json::encode($this->string);
     // Verify that a JSON-encoded string is larger than the source string.
@@ -78,7 +78,7 @@ public function testEncodingLength() {
   /**
    * Tests end and start of the encoded string.
    */
-  public function testEncodingStartEnd() {
+  public function testEncodingStartEnd(): void {
     $json = Json::encode($this->string);
     // The first and last characters should be ", and no others.
     $this->assertStringStartsWith('"', $json, 'A JSON encoded string begins with ".');
@@ -89,7 +89,7 @@ public function testEncodingStartEnd() {
   /**
    * Tests converting PHP variables to JSON strings and back.
    */
-  public function testReversibility() {
+  public function testReversibility(): void {
     $json = Json::encode($this->string);
     // Verify that encoding/decoding is reversible.
     $json_decoded = Json::decode($json);
@@ -99,7 +99,7 @@ public function testReversibility() {
   /**
    * Tests the reversibility of structured data.
    */
-  public function testStructuredReversibility() {
+  public function testStructuredReversibility(): void {
     // Verify reversibility for structured data. Also verify that necessary
     // characters are escaped.
     $source = [TRUE, FALSE, 0, 1, '0', '1', $this->string, ['key1' => $this->string, 'key2' => ['nested' => TRUE]]];
diff --git a/core/tests/Drupal/Tests/Component/Serialization/YamlPeclTest.php b/core/tests/Drupal/Tests/Component/Serialization/YamlPeclTest.php
index 174ea786b2ab..8f124a85ba95 100644
--- a/core/tests/Drupal/Tests/Component/Serialization/YamlPeclTest.php
+++ b/core/tests/Drupal/Tests/Component/Serialization/YamlPeclTest.php
@@ -31,7 +31,7 @@ public function testEncodeDecode(array $data): void {
   /**
    * Ensures that php object support is disabled.
    */
-  public function testObjectSupportDisabled() {
+  public function testObjectSupportDisabled(): void {
     $object = new \stdClass();
     $object->foo = 'bar';
     $this->assertEquals(['O:8:"stdClass":1:{s:3:"foo";s:3:"bar";}'], YamlPecl::decode(YamlPecl::encode([$object])));
@@ -44,7 +44,7 @@ public function testObjectSupportDisabled() {
    * @covers ::decode
    * @dataProvider providerDecodeTests
    */
-  public function testDecode($string, $data) {
+  public function testDecode($string, $data): void {
     $this->assertEquals($data, YamlPecl::decode($string));
   }
 
@@ -53,7 +53,7 @@ public function testDecode($string, $data) {
    *
    * @covers ::encode
    */
-  public function testEncode() {
+  public function testEncode(): void {
     // cSpell:disable
     $this->assertEquals('---
 foo:
@@ -74,14 +74,14 @@ public function testEncode() {
    * @covers ::applyBooleanCallbacks
    * @dataProvider providerBoolTest
    */
-  public function testApplyBooleanCallbacks($string, $expected) {
+  public function testApplyBooleanCallbacks($string, $expected): void {
     $this->assertEquals($expected, YamlPecl::applyBooleanCallbacks($string, 'bool', NULL));
   }
 
   /**
    * @covers ::getFileExtension
    */
-  public function testGetFileExtension() {
+  public function testGetFileExtension(): void {
     $this->assertEquals('yml', YamlPecl::getFileExtension());
   }
 
@@ -90,7 +90,7 @@ public function testGetFileExtension() {
    *
    * @covers ::errorHandler
    */
-  public function testError() {
+  public function testError(): void {
     $this->expectException(InvalidDataTypeException::class);
     YamlPecl::decode('foo: [ads');
   }
diff --git a/core/tests/Drupal/Tests/Component/Serialization/YamlTest.php b/core/tests/Drupal/Tests/Component/Serialization/YamlTest.php
index 7c08d60d701c..7980f5845357 100644
--- a/core/tests/Drupal/Tests/Component/Serialization/YamlTest.php
+++ b/core/tests/Drupal/Tests/Component/Serialization/YamlTest.php
@@ -33,7 +33,7 @@ public function testEncodeDecode(array $data): void {
    * @covers ::decode
    * @dataProvider providerDecodeTests
    */
-  public function testDecode($string, $data) {
+  public function testDecode($string, $data): void {
     $this->assertSame($data, Yaml::decode($string));
   }
 
@@ -42,7 +42,7 @@ public function testDecode($string, $data) {
    *
    * @covers ::encode
    */
-  public function testEncode() {
+  public function testEncode(): void {
     // cSpell:disable
     $this->assertSame('foo:
   bar: \'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus sapien ex, venenatis vitae nisi eu, posuere luctus dolor. Nullam convallis\'
@@ -53,7 +53,7 @@ public function testEncode() {
   /**
    * @covers ::getFileExtension
    */
-  public function testGetFileExtension() {
+  public function testGetFileExtension(): void {
     $this->assertSame('yml', Yaml::getFileExtension());
   }
 
@@ -62,7 +62,7 @@ public function testGetFileExtension() {
    *
    * @covers ::decode
    */
-  public function testError() {
+  public function testError(): void {
     $this->expectException(InvalidDataTypeException::class);
     Yaml::decode('foo: [ads');
   }
@@ -72,7 +72,7 @@ public function testError() {
    *
    * @covers ::encode
    */
-  public function testEncodeObjectSupportDisabled() {
+  public function testEncodeObjectSupportDisabled(): void {
     $this->expectException(InvalidDataTypeException::class);
     $this->expectExceptionMessage('Object support when dumping a YAML file has been disabled.');
     $object = new \stdClass();
@@ -85,7 +85,7 @@ public function testEncodeObjectSupportDisabled() {
    *
    * @covers ::decode
    */
-  public function testDecodeObjectSupportDisabled() {
+  public function testDecodeObjectSupportDisabled(): void {
     $this->expectException(InvalidDataTypeException::class);
     $this->expectExceptionMessageMatches('/^Object support when parsing a YAML file has been disabled/');
     $yaml = <<<YAML
diff --git a/core/tests/Drupal/Tests/Component/Transliteration/PhpTransliterationTest.php b/core/tests/Drupal/Tests/Component/Transliteration/PhpTransliterationTest.php
index ce176d262990..3badd32fab84 100644
--- a/core/tests/Drupal/Tests/Component/Transliteration/PhpTransliterationTest.php
+++ b/core/tests/Drupal/Tests/Component/Transliteration/PhpTransliterationTest.php
@@ -28,7 +28,7 @@ class PhpTransliterationTest extends TestCase {
    *
    * @dataProvider providerTestPhpTransliterationRemoveDiacritics
    */
-  public function testRemoveDiacritics($original, $expected) {
+  public function testRemoveDiacritics($original, $expected): void {
     $transliterator_class = new PhpTransliteration();
     $result = $transliterator_class->removeDiacritics($original);
     $this->assertEquals($expected, $result);
@@ -225,7 +225,7 @@ public static function providerTestPhpTransliteration(): array {
    *
    * @covers ::readLanguageOverrides
    */
-  public function testSafeInclude() {
+  public function testSafeInclude(): void {
     // The overrides in the transliteration data directory transliterates 0x82
     // into "safe" but the overrides one directory higher transliterates the
     // same character into "security hole". So by using "../index" as the
diff --git a/core/tests/Drupal/Tests/Component/Utility/ArgumentsResolverTest.php b/core/tests/Drupal/Tests/Component/Utility/ArgumentsResolverTest.php
index 9f7004e4d27e..d9d8563de208 100644
--- a/core/tests/Drupal/Tests/Component/Utility/ArgumentsResolverTest.php
+++ b/core/tests/Drupal/Tests/Component/Utility/ArgumentsResolverTest.php
@@ -25,7 +25,7 @@ protected function setUp(): void {
    *
    * @dataProvider providerTestGetArgument
    */
-  public function testGetArgument($callable, $scalars, $objects, $wildcards, $expected) {
+  public function testGetArgument($callable, $scalars, $objects, $wildcards, $expected): void {
     $arguments = (new ArgumentsResolver($scalars, $objects, $wildcards))->getArguments($callable);
     $this->assertSame($expected, $arguments);
   }
@@ -79,7 +79,7 @@ function ($foo) {}, $scalars, $objects, [], ['baz'],
   /**
    * Tests getArgument() with an object.
    */
-  public function testGetArgumentObject() {
+  public function testGetArgumentObject(): void {
     $callable = function (\stdClass $object) {};
 
     $object = new \stdClass();
@@ -90,7 +90,7 @@ public function testGetArgumentObject() {
   /**
    * Tests getArgument() with a wildcard object for a parameter with a custom name.
    */
-  public function testGetWildcardArgument() {
+  public function testGetWildcardArgument(): void {
     $callable = function (\stdClass $custom_name) {};
 
     $object = new \stdClass();
@@ -101,7 +101,7 @@ public function testGetWildcardArgument() {
   /**
    * Tests getArgument() with a Route, Request, and Account object.
    */
-  public function testGetArgumentOrder() {
+  public function testGetArgumentOrder(): void {
     $a1 = $this->getMockBuilder('\Drupal\Tests\Component\Utility\Test1Interface')->getMock();
     $a2 = $this->getMockBuilder('\Drupal\Tests\Component\Utility\TestClass')->getMock();
     $a3 = $this->getMockBuilder('\Drupal\Tests\Component\Utility\Test2Interface')->getMock();
@@ -128,7 +128,7 @@ public function testGetArgumentOrder() {
    *
    * Without the type hint, the wildcard object will not be passed to the callable.
    */
-  public function testGetWildcardArgumentNoTypeHint() {
+  public function testGetWildcardArgumentNoTypeHint(): void {
     $a = $this->getMockBuilder('\Drupal\Tests\Component\Utility\Test1Interface')->getMock();
     $wildcards = [$a];
     $resolver = new ArgumentsResolver([], [], $wildcards);
@@ -145,7 +145,7 @@ public function testGetWildcardArgumentNoTypeHint() {
    * Without the type hint, passing a value to a named parameter will still
    * receive the provided value.
    */
-  public function testGetArgumentRouteNoTypeHintAndValue() {
+  public function testGetArgumentRouteNoTypeHintAndValue(): void {
     $scalars = ['route' => 'foo'];
     $resolver = new ArgumentsResolver($scalars, [], []);
 
@@ -157,7 +157,7 @@ public function testGetArgumentRouteNoTypeHintAndValue() {
   /**
    * Tests handleUnresolvedArgument() for a scalar argument.
    */
-  public function testHandleNotUpcastedArgument() {
+  public function testHandleNotUpcastedArgument(): void {
     $objects = ['foo' => 'bar'];
     $scalars = ['foo' => 'baz'];
     $resolver = new ArgumentsResolver($scalars, $objects, []);
@@ -173,7 +173,7 @@ public function testHandleNotUpcastedArgument() {
    *
    * @dataProvider providerTestHandleUnresolvedArgument
    */
-  public function testHandleUnresolvedArgument($callable) {
+  public function testHandleUnresolvedArgument($callable): void {
     $resolver = new ArgumentsResolver([], [], []);
     $this->expectException(\RuntimeException::class);
     $this->expectExceptionMessage('requires a value for the "$foo" argument.');
diff --git a/core/tests/Drupal/Tests/Component/Utility/ColorTest.php b/core/tests/Drupal/Tests/Component/Utility/ColorTest.php
index f2a6a202f82e..d79aabb136d7 100644
--- a/core/tests/Drupal/Tests/Component/Utility/ColorTest.php
+++ b/core/tests/Drupal/Tests/Component/Utility/ColorTest.php
@@ -24,7 +24,7 @@ class ColorTest extends TestCase {
    *
    * @dataProvider providerTestValidateHex
    */
-  public function testValidateHex($expected, $value) {
+  public function testValidateHex($expected, $value): void {
     $this->assertSame($expected, Color::validateHex($value));
   }
 
@@ -80,7 +80,7 @@ public static function providerTestValidateHex() {
    *
    * @dataProvider providerTestHexToRgb
    */
-  public function testHexToRgb($value, $expected, $invalid = FALSE) {
+  public function testHexToRgb($value, $expected, $invalid = FALSE): void {
     if ($invalid) {
       $this->expectException('InvalidArgumentException');
     }
@@ -141,7 +141,7 @@ public static function providerTestHexToRgb() {
    *
    * @dataProvider providerTestRbgToHex
    */
-  public function testRgbToHex($value, $expected) {
+  public function testRgbToHex($value, $expected): void {
     $this->assertSame($expected, Color::rgbToHex($value));
   }
 
@@ -208,7 +208,7 @@ public static function providerTestNormalizeHexLength() {
    *
    * @dataProvider providerTestNormalizeHexLength
    */
-  public function testNormalizeHexLength($value, $expected) {
+  public function testNormalizeHexLength($value, $expected): void {
     $this->assertSame($expected, Color::normalizeHexLength($value));
   }
 
diff --git a/core/tests/Drupal/Tests/Component/Utility/CryptTest.php b/core/tests/Drupal/Tests/Component/Utility/CryptTest.php
index 22c5081efb71..c29ded1e2445 100644
--- a/core/tests/Drupal/Tests/Component/Utility/CryptTest.php
+++ b/core/tests/Drupal/Tests/Component/Utility/CryptTest.php
@@ -27,7 +27,7 @@ class CryptTest extends TestCase {
    * @param string $expected_hash
    *   Expected result from hashing $data.
    */
-  public function testHashBase64($data, $expected_hash) {
+  public function testHashBase64($data, $expected_hash): void {
     $hash = Crypt::hashBase64($data);
     $this->assertEquals($expected_hash, $hash, 'The correct hash was not calculated.');
   }
@@ -45,7 +45,7 @@ public function testHashBase64($data, $expected_hash) {
    * @param string $expected_hmac
    *   Expected result from hashing $data using $key.
    */
-  public function testHmacBase64($data, $key, $expected_hmac) {
+  public function testHmacBase64($data, $key, $expected_hmac): void {
     $hmac = Crypt::hmacBase64($data, $key);
     $this->assertEquals($expected_hmac, $hmac, 'The correct hmac was not calculated.');
   }
@@ -61,7 +61,7 @@ public function testHmacBase64($data, $key, $expected_hmac) {
    * @param string $key
    *   Key to use in hashing process.
    */
-  public function testHmacBase64Invalid($data, $key) {
+  public function testHmacBase64Invalid($data, $key): void {
     $this->expectException('InvalidArgumentException');
     Crypt::hmacBase64($data, $key);
   }
diff --git a/core/tests/Drupal/Tests/Component/Utility/DeprecationHelperTest.php b/core/tests/Drupal/Tests/Component/Utility/DeprecationHelperTest.php
index a44fe30c5ca0..2383752bffd6 100644
--- a/core/tests/Drupal/Tests/Component/Utility/DeprecationHelperTest.php
+++ b/core/tests/Drupal/Tests/Component/Utility/DeprecationHelperTest.php
@@ -21,7 +21,7 @@ class DeprecationHelperTest extends TestCase {
    *
    * @dataProvider deprecatedHelperTestCases
    */
-  public function testDeprecationHelper(string $currentVersion, array $tests) {
+  public function testDeprecationHelper(string $currentVersion, array $tests): void {
     foreach ($tests as $deprecatedVersion => $expectedCallable) {
       $result = DeprecationHelper::backwardsCompatibleCall(
         $currentVersion,
diff --git a/core/tests/Drupal/Tests/Component/Utility/EmailValidatorTest.php b/core/tests/Drupal/Tests/Component/Utility/EmailValidatorTest.php
index d5d4577baf57..b57f51c8b6a1 100644
--- a/core/tests/Drupal/Tests/Component/Utility/EmailValidatorTest.php
+++ b/core/tests/Drupal/Tests/Component/Utility/EmailValidatorTest.php
@@ -19,7 +19,7 @@ class EmailValidatorTest extends TestCase {
   /**
    * @covers ::isValid
    */
-  public function testIsValid() {
+  public function testIsValid(): void {
     // Note that \Drupal\Component\Utility\EmailValidator wraps
     // \Egulias\EmailValidator\EmailValidator so we don't do anything more than
     // test that the wrapping works since the dependency has its own test
@@ -33,7 +33,7 @@ public function testIsValid() {
   /**
    * @covers ::isValid
    */
-  public function testIsValidException() {
+  public function testIsValidException(): void {
     $validator = new EmailValidator();
     $this->expectException(\BadMethodCallException::class);
     $this->expectExceptionMessage('Calling \Drupal\Component\Utility\EmailValidator::isValid() with the second argument is not supported. See https://www.drupal.org/node/2997196');
diff --git a/core/tests/Drupal/Tests/Component/Utility/EnvironmentTest.php b/core/tests/Drupal/Tests/Component/Utility/EnvironmentTest.php
index 7f0ef7f0c960..228d8bc50a90 100644
--- a/core/tests/Drupal/Tests/Component/Utility/EnvironmentTest.php
+++ b/core/tests/Drupal/Tests/Component/Utility/EnvironmentTest.php
@@ -32,7 +32,7 @@ class EnvironmentTest extends TestCase {
    *   The expected return value from
    *   \Drupal\Component\Utility\Environment::checkMemoryLimit().
    */
-  public function testCheckMemoryLimit($required, $custom_memory_limit, $expected) {
+  public function testCheckMemoryLimit($required, $custom_memory_limit, $expected): void {
     $actual = Environment::checkMemoryLimit($required, $custom_memory_limit);
     $this->assertEquals($expected, $actual);
   }
diff --git a/core/tests/Drupal/Tests/Component/Utility/HtmlTest.php b/core/tests/Drupal/Tests/Component/Utility/HtmlTest.php
index 17fcabc59b03..a3f30dac6598 100644
--- a/core/tests/Drupal/Tests/Component/Utility/HtmlTest.php
+++ b/core/tests/Drupal/Tests/Component/Utility/HtmlTest.php
@@ -46,7 +46,7 @@ protected function setUp(): void {
    *
    * @covers ::cleanCssIdentifier
    */
-  public function testCleanCssIdentifier($expected, $source, $filter = NULL) {
+  public function testCleanCssIdentifier($expected, $source, $filter = NULL): void {
     if ($filter !== NULL) {
       $this->assertSame($expected, Html::cleanCssIdentifier($source, $filter));
     }
@@ -92,7 +92,7 @@ public static function providerTestCleanCssIdentifier() {
    *
    * @covers ::getClass
    */
-  public function testHtmlClass() {
+  public function testHtmlClass(): void {
     // Verify Drupal coding standards are enforced.
     $this->assertSame('class-name--ü', Html::getClass('CLASS NAME_[Ü]'), 'Enforce Drupal coding standards.');
 
@@ -116,7 +116,7 @@ public function testHtmlClass() {
    *
    * @covers ::getUniqueId
    */
-  public function testHtmlGetUniqueId($expected, $source, $reset = FALSE) {
+  public function testHtmlGetUniqueId($expected, $source, $reset = FALSE): void {
     if ($reset) {
       Html::resetSeenIds();
     }
@@ -159,7 +159,7 @@ public static function providerTestHtmlGetUniqueId() {
    *
    * @covers ::getUniqueId
    */
-  public function testHtmlGetUniqueIdWithAjaxIds($expected, $source) {
+  public function testHtmlGetUniqueIdWithAjaxIds($expected, $source): void {
     Html::setIsAjax(TRUE);
     $id = Html::getUniqueId($source);
 
@@ -203,7 +203,7 @@ public static function providerTestHtmlGetUniqueIdWithAjaxIds() {
    *
    * @covers ::getId
    */
-  public function testHtmlGetId($expected, $source) {
+  public function testHtmlGetId($expected, $source): void {
     Html::setIsAjax(FALSE);
     $this->assertSame($expected, Html::getId($source));
   }
@@ -237,7 +237,7 @@ public static function providerTestHtmlGetId() {
    * @dataProvider providerDecodeEntities
    * @covers ::decodeEntities
    */
-  public function testDecodeEntities($text, $expected) {
+  public function testDecodeEntities($text, $expected): void {
     $this->assertEquals($expected, Html::decodeEntities($text));
   }
 
@@ -278,7 +278,7 @@ public static function providerDecodeEntities() {
    * @dataProvider providerEscape
    * @covers ::escape
    */
-  public function testEscape($expected, $text) {
+  public function testEscape($expected, $text): void {
     $this->assertEquals($expected, Html::escape($text));
   }
 
@@ -312,7 +312,7 @@ public static function providerEscape() {
    * @covers ::decodeEntities
    * @covers ::escape
    */
-  public function testDecodeEntitiesAndEscape() {
+  public function testDecodeEntitiesAndEscape(): void {
     $string = "<em>répét&eacute;</em>";
     $escaped = Html::escape($string);
     $this->assertSame('&lt;em&gt;répét&amp;eacute;&lt;/em&gt;', $escaped);
@@ -332,7 +332,7 @@ public function testDecodeEntitiesAndEscape() {
    *
    * @covers ::serialize
    */
-  public function testSerialize() {
+  public function testSerialize(): void {
     $document = new \DOMDocument();
     $result = Html::serialize($document);
     $this->assertSame('', $result);
@@ -342,7 +342,7 @@ public function testSerialize() {
    * @covers ::transformRootRelativeUrlsToAbsolute
    * @dataProvider providerTestTransformRootRelativeUrlsToAbsolute
    */
-  public function testTransformRootRelativeUrlsToAbsolute($html, $scheme_and_host, $expected_html) {
+  public function testTransformRootRelativeUrlsToAbsolute($html, $scheme_and_host, $expected_html): void {
     $this->assertSame($expected_html ?: $html, Html::transformRootRelativeUrlsToAbsolute($html, $scheme_and_host));
   }
 
@@ -350,7 +350,7 @@ public function testTransformRootRelativeUrlsToAbsolute($html, $scheme_and_host,
    * @covers ::transformRootRelativeUrlsToAbsolute
    * @dataProvider providerTestTransformRootRelativeUrlsToAbsoluteAssertion
    */
-  public function testTransformRootRelativeUrlsToAbsoluteAssertion($scheme_and_host) {
+  public function testTransformRootRelativeUrlsToAbsoluteAssertion($scheme_and_host): void {
     $this->expectException(\AssertionError::class);
     Html::transformRootRelativeUrlsToAbsolute('', $scheme_and_host);
   }
diff --git a/core/tests/Drupal/Tests/Component/Utility/ImageTest.php b/core/tests/Drupal/Tests/Component/Utility/ImageTest.php
index c41af3179101..7d179e3145b3 100644
--- a/core/tests/Drupal/Tests/Component/Utility/ImageTest.php
+++ b/core/tests/Drupal/Tests/Component/Utility/ImageTest.php
@@ -18,7 +18,7 @@ class ImageTest extends TestCase {
    *
    * @dataProvider providerTestScaleDimensions
    */
-  public function testScaleDimensions($input, $output) {
+  public function testScaleDimensions($input, $output): void {
     // Process the test dataset.
     $return_value = Image::scaleDimensions($input['dimensions'], $input['width'], $input['height'], $input['upscale']);
 
diff --git a/core/tests/Drupal/Tests/Component/Utility/NestedArrayTest.php b/core/tests/Drupal/Tests/Component/Utility/NestedArrayTest.php
index a48d5bab73f8..7a43bda8882d 100644
--- a/core/tests/Drupal/Tests/Component/Utility/NestedArrayTest.php
+++ b/core/tests/Drupal/Tests/Component/Utility/NestedArrayTest.php
@@ -47,7 +47,7 @@ protected function setUp(): void {
    *
    * @covers ::getValue
    */
-  public function testGetValue() {
+  public function testGetValue(): void {
     // Verify getting a value of a nested element.
     $value = NestedArray::getValue($this->form, $this->parents);
     $this->assertSame('Nested element', $value['#value'], 'Nested element value found.');
@@ -77,7 +77,7 @@ public function testGetValue() {
    *
    * @covers ::setValue
    */
-  public function testSetValue() {
+  public function testSetValue(): void {
     $new_value = [
       '#value' => 'New value',
       '#required' => TRUE,
@@ -98,7 +98,7 @@ public function testSetValue() {
    *
    * @covers ::setValue
    */
-  public function testSetValueForce() {
+  public function testSetValueForce(): void {
     $new_value = [
       'one',
     ];
@@ -113,7 +113,7 @@ public function testSetValueForce() {
    *
    * @covers ::unsetValue
    */
-  public function testUnsetValue() {
+  public function testUnsetValue(): void {
     // Verify unsetting a non-existing nested element throws no errors and the
     // non-existing key is properly reported.
     $key_existed = NULL;
@@ -133,7 +133,7 @@ public function testUnsetValue() {
   /**
    * Tests existence of array key.
    */
-  public function testKeyExists() {
+  public function testKeyExists(): void {
     // Verify that existing key is found.
     $this->assertTrue(NestedArray::keyExists($this->form, $this->parents), 'Nested key found.');
 
@@ -149,7 +149,7 @@ public function testKeyExists() {
    * @covers ::mergeDeep
    * @covers ::mergeDeepArray
    */
-  public function testMergeDeepArray() {
+  public function testMergeDeepArray(): void {
     $link_options_1 = [
       'fragment' => 'x',
       'attributes' => ['title' => 'X', 'class' => ['a', 'b']],
@@ -176,7 +176,7 @@ public function testMergeDeepArray() {
    *
    * @covers ::mergeDeepArray
    */
-  public function testMergeImplicitKeys() {
+  public function testMergeImplicitKeys(): void {
     $a = [
       'subkey' => ['X', 'Y'],
     ];
@@ -197,7 +197,7 @@ public function testMergeImplicitKeys() {
    *
    * @covers ::mergeDeepArray
    */
-  public function testMergeExplicitKeys() {
+  public function testMergeExplicitKeys(): void {
     $a = [
       'subkey' => [
         0 => 'A',
@@ -233,7 +233,7 @@ public function testMergeExplicitKeys() {
    *
    * @covers ::mergeDeepArray
    */
-  public function testMergeOutOfSequenceKeys() {
+  public function testMergeOutOfSequenceKeys(): void {
     $a = [
       'subkey' => [
         10 => 'A',
@@ -264,7 +264,7 @@ public function testMergeOutOfSequenceKeys() {
    * @covers ::filter
    * @dataProvider providerTestFilter
    */
-  public function testFilter($array, $callable, $expected) {
+  public function testFilter($array, $callable, $expected): void {
     $this->assertEquals($expected, NestedArray::filter($array, $callable));
   }
 
diff --git a/core/tests/Drupal/Tests/Component/Utility/NumberTest.php b/core/tests/Drupal/Tests/Component/Utility/NumberTest.php
index 3e06711db903..174829900042 100644
--- a/core/tests/Drupal/Tests/Component/Utility/NumberTest.php
+++ b/core/tests/Drupal/Tests/Component/Utility/NumberTest.php
@@ -31,7 +31,7 @@ class NumberTest extends TestCase {
    * @param bool $expected
    *   Expected return value from Number::validStep().
    */
-  public function testValidStep($value, $step, $expected) {
+  public function testValidStep($value, $step, $expected): void {
     $return = Number::validStep($value, $step);
     $this->assertEquals($expected, $return);
   }
@@ -51,7 +51,7 @@ public function testValidStep($value, $step, $expected) {
    * @param bool $expected
    *   Expected return value from Number::validStep().
    */
-  public function testValidStepOffset($value, $step, $offset, $expected) {
+  public function testValidStepOffset($value, $step, $offset, $expected): void {
     $return = Number::validStep($value, $step, $offset);
     $this->assertEquals($expected, $return);
   }
@@ -130,7 +130,7 @@ public static function providerTestValidStepOffset() {
    * @param string $expected
    *   The expected alphadecimal value.
    */
-  public function testConversions($value, $expected) {
+  public function testConversions($value, $expected): void {
     $this->assertSame(Number::intToAlphadecimal($value), $expected);
     $this->assertSame($value, Number::alphadecimalToInt($expected));
   }
diff --git a/core/tests/Drupal/Tests/Component/Utility/RandomTest.php b/core/tests/Drupal/Tests/Component/Utility/RandomTest.php
index fde2dbbb824b..0f34c21d17b8 100644
--- a/core/tests/Drupal/Tests/Component/Utility/RandomTest.php
+++ b/core/tests/Drupal/Tests/Component/Utility/RandomTest.php
@@ -30,7 +30,7 @@ class RandomTest extends TestCase {
    *
    * @covers ::string
    */
-  public function testRandomStringUniqueness() {
+  public function testRandomStringUniqueness(): void {
     $strings = [];
     $random = new Random();
     for ($i = 0; $i <= 50; $i++) {
@@ -45,7 +45,7 @@ public function testRandomStringUniqueness() {
    *
    * @covers ::name
    */
-  public function testRandomNamesUniqueness() {
+  public function testRandomNamesUniqueness(): void {
     $names = [];
     $random = new Random();
     for ($i = 0; $i <= 10; $i++) {
@@ -60,7 +60,7 @@ public function testRandomNamesUniqueness() {
    *
    * @covers ::name
    */
-  public function testRandomNameException() {
+  public function testRandomNameException(): void {
     // There are fewer than 100 possibilities so an exception should occur to
     // prevent infinite loops.
     $random = new Random();
@@ -76,7 +76,7 @@ public function testRandomNameException() {
    *
    * @covers ::string
    */
-  public function testRandomStringException() {
+  public function testRandomStringException(): void {
     // There are fewer than 100 possibilities so an exception should occur to
     // prevent infinite loops.
     $random = new Random();
@@ -92,7 +92,7 @@ public function testRandomStringException() {
    *
    * @covers ::name
    */
-  public function testRandomNameNonUnique() {
+  public function testRandomNameNonUnique(): void {
     // There are fewer than 100 possibilities if we were forcing uniqueness so
     // exception would occur.
     $random = new Random();
@@ -107,7 +107,7 @@ public function testRandomNameNonUnique() {
    *
    * @covers ::string
    */
-  public function testRandomStringNonUnique() {
+  public function testRandomStringNonUnique(): void {
     // There are fewer than 100 possibilities if we were forcing uniqueness so
     // exception would occur.
     $random = new Random();
@@ -167,7 +167,7 @@ public function testRandomMachineNameNonUnique(): void {
    *
    * @covers ::object
    */
-  public function testRandomObject() {
+  public function testRandomObject(): void {
     // For values of 0 and 1 \Drupal\Component\Utility\Random::object() will
     // have different execution paths.
     $random = new Random();
@@ -182,7 +182,7 @@ public function testRandomObject() {
    *
    * @covers ::string
    */
-  public function testRandomStringValidator() {
+  public function testRandomStringValidator(): void {
     $random = new Random();
     $this->firstStringGenerated = '';
     $str = $random->string(1, TRUE, [$this, '_RandomStringValidate']);
@@ -194,7 +194,7 @@ public function testRandomStringValidator() {
    *
    * @covers ::word
    */
-  public function testRandomWordValidator() {
+  public function testRandomWordValidator(): void {
     $random = new Random();
     $this->assertNotEquals($random->word(20), $random->word(20));
   }
diff --git a/core/tests/Drupal/Tests/Component/Utility/RectangleTest.php b/core/tests/Drupal/Tests/Component/Utility/RectangleTest.php
index 79d42ff079d9..f7a77f6e7db5 100644
--- a/core/tests/Drupal/Tests/Component/Utility/RectangleTest.php
+++ b/core/tests/Drupal/Tests/Component/Utility/RectangleTest.php
@@ -18,7 +18,7 @@ class RectangleTest extends TestCase {
    *
    * @covers ::rotate
    */
-  public function testWrongWidth() {
+  public function testWrongWidth(): void {
     $this->expectException(\InvalidArgumentException::class);
     $rect = new Rectangle(-40, 20);
   }
@@ -28,7 +28,7 @@ public function testWrongWidth() {
    *
    * @covers ::rotate
    */
-  public function testWrongHeight() {
+  public function testWrongHeight(): void {
     $this->expectException(\InvalidArgumentException::class);
     $rect = new Rectangle(40, 0);
   }
@@ -53,7 +53,7 @@ public function testWrongHeight() {
    *
    * @dataProvider providerPhp55RotateDimensions
    */
-  public function testRotateDimensions($width, $height, $angle, $exp_width, $exp_height) {
+  public function testRotateDimensions($width, $height, $angle, $exp_width, $exp_height): void {
     $rect = new Rectangle($width, $height);
     $rect->rotate($angle);
     $this->assertEquals($exp_width, $rect->getBoundingWidth());
diff --git a/core/tests/Drupal/Tests/Component/Utility/ReflectionTest.php b/core/tests/Drupal/Tests/Component/Utility/ReflectionTest.php
index 1b15c34f331c..c1ea6045939e 100644
--- a/core/tests/Drupal/Tests/Component/Utility/ReflectionTest.php
+++ b/core/tests/Drupal/Tests/Component/Utility/ReflectionTest.php
@@ -22,7 +22,7 @@ class ReflectionTest extends TestCase {
    * @covers ::getParameterClassName
    * @dataProvider providerGetParameterClassName
    */
-  public function testGetParameterClassName(?string $expected, \ReflectionParameter $parameter) {
+  public function testGetParameterClassName(?string $expected, \ReflectionParameter $parameter): void {
     $this->assertEquals($expected, Reflection::getParameterClassName($parameter));
   }
 
diff --git a/core/tests/Drupal/Tests/Component/Utility/SortArrayTest.php b/core/tests/Drupal/Tests/Component/Utility/SortArrayTest.php
index f23aaf4bd87e..ceeefe20fe91 100644
--- a/core/tests/Drupal/Tests/Component/Utility/SortArrayTest.php
+++ b/core/tests/Drupal/Tests/Component/Utility/SortArrayTest.php
@@ -30,7 +30,7 @@ class SortArrayTest extends TestCase {
    * @param int $expected
    *   The expected output from calling the method.
    */
-  public function testSortByWeightElement($a, $b, $expected) {
+  public function testSortByWeightElement($a, $b, $expected): void {
     $result = SortArray::sortByWeightElement($a, $b);
     $this->assertBothNegativePositiveOrZero($expected, $result);
   }
@@ -106,7 +106,7 @@ public static function providerSortByWeightElement() {
    * @param int $expected
    *   The expected output from calling the method.
    */
-  public function testSortByWeightProperty($a, $b, $expected) {
+  public function testSortByWeightProperty($a, $b, $expected): void {
     $result = SortArray::sortByWeightProperty($a, $b);
     $this->assertBothNegativePositiveOrZero($expected, $result);
   }
@@ -182,7 +182,7 @@ public static function providerSortByWeightProperty() {
    * @param int $expected
    *   The expected output from calling the method.
    */
-  public function testSortByTitleElement($a, $b, $expected) {
+  public function testSortByTitleElement($a, $b, $expected): void {
     $result = SortArray::sortByTitleElement($a, $b);
     $this->assertBothNegativePositiveOrZero($expected, $result);
   }
@@ -251,7 +251,7 @@ public static function providerSortByTitleElement() {
    * @param int $expected
    *   The expected output from calling the method.
    */
-  public function testSortByTitleProperty($a, $b, $expected) {
+  public function testSortByTitleProperty($a, $b, $expected): void {
     $result = SortArray::sortByTitleProperty($a, $b);
     $this->assertBothNegativePositiveOrZero($expected, $result);
   }
diff --git a/core/tests/Drupal/Tests/Component/Utility/TimerTest.php b/core/tests/Drupal/Tests/Component/Utility/TimerTest.php
index 3c12f9a19df6..470ff1de13fe 100644
--- a/core/tests/Drupal/Tests/Component/Utility/TimerTest.php
+++ b/core/tests/Drupal/Tests/Component/Utility/TimerTest.php
@@ -23,7 +23,7 @@ class TimerTest extends TestCase {
    * @covers ::stop
    * @covers ::read
    */
-  public function testTimer() {
+  public function testTimer(): void {
     Timer::start('test');
     usleep(5000);
     $value = Timer::read('test');
diff --git a/core/tests/Drupal/Tests/Component/Utility/UnicodeTest.php b/core/tests/Drupal/Tests/Component/Utility/UnicodeTest.php
index 291304532786..99ee8ff7e52f 100644
--- a/core/tests/Drupal/Tests/Component/Utility/UnicodeTest.php
+++ b/core/tests/Drupal/Tests/Component/Utility/UnicodeTest.php
@@ -24,7 +24,7 @@ class UnicodeTest extends TestCase {
    * @dataProvider providerUcfirst
    * @covers ::ucfirst
    */
-  public function testUcfirst($text, $expected) {
+  public function testUcfirst($text, $expected): void {
     $this->assertEquals($expected, Unicode::ucfirst($text));
   }
 
@@ -55,7 +55,7 @@ public static function providerUcfirst() {
    * @dataProvider providerLcfirst
    * @covers ::lcfirst
    */
-  public function testLcfirst($text, $expected) {
+  public function testLcfirst($text, $expected): void {
     $this->assertEquals($expected, Unicode::lcfirst($text));
   }
 
@@ -86,7 +86,7 @@ public static function providerLcfirst() {
    * @dataProvider providerUcwords
    * @covers ::ucwords
    */
-  public function testUcwords($text, $expected) {
+  public function testUcwords($text, $expected): void {
     $this->assertEquals($expected, Unicode::ucwords($text));
   }
 
@@ -119,7 +119,7 @@ public static function providerUcwords() {
    * @dataProvider providerTruncate
    * @covers ::truncate
    */
-  public function testTruncate($text, $max_length, $expected, $wordsafe = FALSE, $add_ellipsis = FALSE) {
+  public function testTruncate($text, $max_length, $expected, $wordsafe = FALSE, $add_ellipsis = FALSE): void {
     $this->assertEquals($expected, Unicode::truncate($text, $max_length, $wordsafe, $add_ellipsis));
   }
 
@@ -218,7 +218,7 @@ public static function providerTruncate() {
    * @param string $expected
    *   The expected return from Unicode::truncateBytes().
    */
-  public function testTruncateBytes($text, $max_length, $expected) {
+  public function testTruncateBytes($text, $max_length, $expected): void {
     $this->assertEquals($expected, Unicode::truncateBytes($text, $max_length), 'The string was not correctly truncated.');
   }
 
@@ -253,7 +253,7 @@ public static function providerTestTruncateBytes() {
    * @param string $message
    *   The message to display on failure.
    */
-  public function testValidateUtf8($text, $expected, $message) {
+  public function testValidateUtf8($text, $expected, $message): void {
     $this->assertEquals($expected, Unicode::validateUtf8($text), $message);
   }
 
@@ -292,7 +292,7 @@ public static function providerTestValidateUtf8() {
    * @param string|bool $expected
    *   The expected result.
    */
-  public function testConvertToUtf8($data, $encoding, $expected) {
+  public function testConvertToUtf8($data, $encoding, $expected): void {
     $this->assertEquals($expected, Unicode::convertToUtf8($data, $encoding));
   }
 
diff --git a/core/tests/Drupal/Tests/Component/Utility/UrlHelperTest.php b/core/tests/Drupal/Tests/Component/Utility/UrlHelperTest.php
index d7431155f804..4e3e6a84f567 100644
--- a/core/tests/Drupal/Tests/Component/Utility/UrlHelperTest.php
+++ b/core/tests/Drupal/Tests/Component/Utility/UrlHelperTest.php
@@ -42,7 +42,7 @@ public static function providerTestBuildQuery() {
    * @param string $message
    *   The assertion message.
    */
-  public function testBuildQuery($query, $expected, $message) {
+  public function testBuildQuery($query, $expected, $message): void {
     $this->assertEquals(UrlHelper::buildQuery($query), $expected, $message);
   }
 
@@ -112,7 +112,7 @@ public static function providerTestInvalidAbsolute(): array {
   /**
    * Tests that we get the same thing out that we put in.
    */
-  public function testCompressUncompress() {
+  public function testCompressUncompress(): void {
     $data = [];
     while (count($data) < 30) {
       $data[] = 'drupal/drupal' . count($data);
@@ -127,7 +127,7 @@ public function testCompressUncompress() {
   /**
    * Tests passing an invalid string as a compressed query parameter.
    */
-  public function testUncompressInvalidString() {
+  public function testUncompressInvalidString(): void {
     // Pass an invalid string to ::uncompressQueryParameter() and ensure it
     // returns the passed string without resulting in a PHP warning.
     $this->assertSame('llama', UrlHelper::uncompressQueryParameter('llama'));
@@ -230,7 +230,7 @@ public function testInvalidRelative(string $url, string $prefix): void {
    * @param array $expected
    *   An array containing query parameters.
    */
-  public function testFilterQueryParameters($query, $exclude, $expected) {
+  public function testFilterQueryParameters($query, $exclude, $expected): void {
     $filtered = UrlHelper::filterQueryParameters($query, $exclude);
     $this->assertEquals($expected, $filtered, 'The query was not properly filtered.');
   }
@@ -268,7 +268,7 @@ public static function providerTestFilterQueryParameters() {
    * @param array $expected
    *   Associative array with expected parameters.
    */
-  public function testParse($url, $expected) {
+  public function testParse($url, $expected): void {
     $parsed = UrlHelper::parse($url);
     $this->assertEquals($expected, $parsed, 'The URL was not properly parsed.');
   }
@@ -390,7 +390,7 @@ public static function providerTestParse() {
    * @param string $expected
    *   The expected encoded path.
    */
-  public function testEncodePath($path, $expected) {
+  public function testEncodePath($path, $expected): void {
     $encoded = UrlHelper::encodePath($path);
     $this->assertEquals($expected, $encoded);
   }
@@ -418,7 +418,7 @@ public static function providerTestEncodePath() {
    * @param bool $expected
    *   Expected result.
    */
-  public function testIsExternal($path, $expected) {
+  public function testIsExternal($path, $expected): void {
     $isExternal = UrlHelper::isExternal($path);
     $this->assertEquals($expected, $isExternal);
   }
@@ -480,7 +480,7 @@ public static function providerTestIsExternal() {
    *
    * @runInSeparateProcess
    */
-  public function testFilterBadProtocol($uri, $expected, $protocols) {
+  public function testFilterBadProtocol($uri, $expected, $protocols): void {
     UrlHelper::setAllowedProtocols($protocols);
     $this->assertEquals($expected, UrlHelper::filterBadProtocol($uri));
     // Multiple calls to UrlHelper::filterBadProtocol() do not cause double
@@ -521,7 +521,7 @@ public static function providerTestFilterBadProtocol() {
    *
    * @runInSeparateProcess
    */
-  public function testStripDangerousProtocols($uri, $expected, $protocols) {
+  public function testStripDangerousProtocols($uri, $expected, $protocols): void {
     UrlHelper::setAllowedProtocols($protocols);
     $stripped = UrlHelper::stripDangerousProtocols($uri);
     $this->assertEquals($expected, $stripped);
@@ -598,7 +598,7 @@ protected static function dataEnhanceWithPrefix(array $urls): array {
    * @covers ::externalIsLocal
    * @dataProvider providerTestExternalIsLocal
    */
-  public function testExternalIsLocal($url, $base_url, $expected) {
+  public function testExternalIsLocal($url, $base_url, $expected): void {
     $this->assertSame($expected, UrlHelper::externalIsLocal($url, $base_url));
   }
 
@@ -650,7 +650,7 @@ public static function providerTestExternalIsLocal() {
    * @covers ::externalIsLocal
    * @dataProvider providerTestExternalIsLocalInvalid
    */
-  public function testExternalIsLocalInvalid($url, $base_url) {
+  public function testExternalIsLocalInvalid($url, $base_url): void {
     $this->expectException(\InvalidArgumentException::class);
     UrlHelper::externalIsLocal($url, $base_url);
   }
diff --git a/core/tests/Drupal/Tests/Component/Utility/UserAgentTest.php b/core/tests/Drupal/Tests/Component/Utility/UserAgentTest.php
index f0ee35429a69..b14d43273792 100644
--- a/core/tests/Drupal/Tests/Component/Utility/UserAgentTest.php
+++ b/core/tests/Drupal/Tests/Component/Utility/UserAgentTest.php
@@ -74,7 +74,7 @@ protected function getMappings() {
    * @dataProvider providerTestGetBestMatchingLangcode
    * @covers ::getBestMatchingLangcode
    */
-  public function testGetBestMatchingLangcode($accept_language, $expected) {
+  public function testGetBestMatchingLangcode($accept_language, $expected): void {
     $result = UserAgent::getBestMatchingLangcode($accept_language, $this->getLanguages(), $this->getMappings());
     $this->assertSame($expected, $result);
   }
diff --git a/core/tests/Drupal/Tests/Component/Utility/VariableTest.php b/core/tests/Drupal/Tests/Component/Utility/VariableTest.php
index 0df91d37e95d..16756235cfeb 100644
--- a/core/tests/Drupal/Tests/Component/Utility/VariableTest.php
+++ b/core/tests/Drupal/Tests/Component/Utility/VariableTest.php
@@ -174,7 +174,7 @@ public static function providerTestExport() {
    * @param mixed $variable
    *   The variable to be exported.
    */
-  public function testExport($expected, $variable) {
+  public function testExport($expected, $variable): void {
     $this->assertEquals($expected, Variable::export($variable));
   }
 
diff --git a/core/tests/Drupal/Tests/Component/Utility/XssTest.php b/core/tests/Drupal/Tests/Component/Utility/XssTest.php
index e25dd3e5dfc9..15b1f0384342 100644
--- a/core/tests/Drupal/Tests/Component/Utility/XssTest.php
+++ b/core/tests/Drupal/Tests/Component/Utility/XssTest.php
@@ -68,7 +68,7 @@ protected function setUp(): void {
    *
    * @dataProvider providerTestFilterXssNormalized
    */
-  public function testFilterXssNormalized($value, $expected, $message, ?array $allowed_tags = NULL) {
+  public function testFilterXssNormalized($value, $expected, $message, ?array $allowed_tags = NULL): void {
     if ($allowed_tags === NULL) {
       $value = Xss::filter($value);
     }
@@ -135,7 +135,7 @@ public static function providerTestFilterXssNormalized() {
    *
    * @dataProvider providerTestFilterXssNotNormalized
    */
-  public function testFilterXssNotNormalized($value, $expected, $message, ?array $allowed_tags = NULL) {
+  public function testFilterXssNotNormalized($value, $expected, $message, ?array $allowed_tags = NULL): void {
     if ($allowed_tags === NULL) {
       $value = Xss::filter($value);
     }
@@ -448,7 +448,7 @@ public static function providerTestFilterXssNotNormalized() {
    *
    * @dataProvider providerTestInvalidMultiByte
    */
-  public function testInvalidMultiByte($value, $expected, $message) {
+  public function testInvalidMultiByte($value, $expected, $message): void {
     $this->assertEquals(Xss::filter($value), $expected, $message);
   }
 
@@ -474,7 +474,7 @@ public static function providerTestInvalidMultiByte() {
   /**
    * Checks that strings starting with a question sign are correctly processed.
    */
-  public function testQuestionSign() {
+  public function testQuestionSign(): void {
     $value = Xss::filter('<?xml:namespace ns="urn:schemas-microsoft-com:time">');
     $this->assertStringNotContainsStringIgnoringCase('<?xml', $value, 'HTML tag stripping evasion -- starting with a question sign (processing instructions).');
   }
@@ -485,7 +485,7 @@ public function testQuestionSign() {
    * @covers ::attributes
    * @dataProvider providerTestAttributes
    */
-  public function testAttribute($value, $expected, $message, $allowed_tags = NULL) {
+  public function testAttribute($value, $expected, $message, $allowed_tags = NULL): void {
     $value = Xss::filter($value, $allowed_tags);
     $this->assertEquals($expected, $value, $message);
   }
@@ -567,7 +567,7 @@ public static function providerTestAttributes() {
   /**
    * Checks that \Drupal\Component\Utility\Xss::filterAdmin() correctly strips disallowed tags.
    */
-  public function testFilterXSSAdmin() {
+  public function testFilterXSSAdmin(): void {
     $value = Xss::filterAdmin('<style /><iframe /><frame /><frameset /><meta /><link /><embed /><applet /><param /><layer />');
     $this->assertEquals('', $value, 'Admin HTML filter -- should never allow some tags.');
   }
@@ -584,7 +584,7 @@ public function testFilterXSSAdmin() {
    *
    * @dataProvider providerTestFilterXssAdminNotNormalized
    */
-  public function testFilterXssAdminNotNormalized($value, $expected, $message) {
+  public function testFilterXssAdminNotNormalized($value, $expected, $message): void {
     $this->assertNotNormalized(Xss::filterAdmin($value), $expected, $message);
   }
 
@@ -612,7 +612,7 @@ public static function providerTestFilterXssAdminNotNormalized() {
    *
    * @see \Drupal\Component\Utility\HtmlSerializerRules
    */
-  public function testFilterNormalizedHtml5() {
+  public function testFilterNormalizedHtml5(): void {
     $input = '<span data-caption="foo &lt;em&gt;bar&lt;/em&gt;"></span>';
     $this->assertEquals($input, Xss::filter(Html::normalize($input), ['span']));
   }
diff --git a/core/tests/Drupal/Tests/Component/Uuid/UuidTest.php b/core/tests/Drupal/Tests/Component/Uuid/UuidTest.php
index 77a5ed1fb96b..a0c2dd8b9cda 100644
--- a/core/tests/Drupal/Tests/Component/Uuid/UuidTest.php
+++ b/core/tests/Drupal/Tests/Component/Uuid/UuidTest.php
@@ -23,7 +23,7 @@ class UuidTest extends TestCase {
    *
    * @dataProvider providerUuidInstances
    */
-  public function testGenerateUuid(UuidInterface $instance) {
+  public function testGenerateUuid(UuidInterface $instance): void {
     $this->assertTrue(Uuid::isValid($instance->generate()), sprintf('UUID generation for %s works.', get_class($instance)));
   }
 
@@ -32,7 +32,7 @@ public function testGenerateUuid(UuidInterface $instance) {
    *
    * @dataProvider providerUuidInstances
    */
-  public function testUuidIsUnique(UuidInterface $instance) {
+  public function testUuidIsUnique(UuidInterface $instance): void {
     $this->assertNotEquals($instance->generate(), $instance->generate(), sprintf('Same UUID was not generated twice with %s.', get_class($instance)));
   }
 
@@ -71,7 +71,7 @@ public static function providerUuidInstances() {
    *
    * @dataProvider providerTestValidation
    */
-  public function testValidation($uuid, $is_valid, $message) {
+  public function testValidation($uuid, $is_valid, $message): void {
     $this->assertSame($is_valid, Uuid::isValid($uuid), $message);
   }
 
diff --git a/core/tests/Drupal/Tests/Composer/ComposerTest.php b/core/tests/Drupal/Tests/Composer/ComposerTest.php
index 552f25c2166a..470844728803 100644
--- a/core/tests/Drupal/Tests/Composer/ComposerTest.php
+++ b/core/tests/Drupal/Tests/Composer/ComposerTest.php
@@ -18,7 +18,7 @@ class ComposerTest extends UnitTestCase {
    *
    * @covers ::ensureComposerVersion
    */
-  public function testEnsureComposerVersion() {
+  public function testEnsureComposerVersion(): void {
     try {
       $this->assertNull(Composer::ensureComposerVersion());
     }
@@ -33,7 +33,7 @@ public function testEnsureComposerVersion() {
    * Also ensure that the minimum php version in the root-level composer.json
    * file exactly matches \Drupal::MINIMUM_PHP.
    */
-  public function testEnsurePhpConfiguredVersion() {
+  public function testEnsurePhpConfiguredVersion(): void {
     $composer_json = json_decode(file_get_contents($this->root . '/composer.json'), TRUE);
     $composer_core_json = json_decode(file_get_contents($this->root . '/core/composer.json'), TRUE);
     $this->assertEquals(\Drupal::MINIMUM_PHP, $composer_json['config']['platform']['php'], 'The \Drupal::MINIMUM_PHP constant should always be exactly the same as the config.platform.php in the root composer.json.');
diff --git a/core/tests/Drupal/Tests/Composer/Generator/BuilderTest.php b/core/tests/Drupal/Tests/Composer/Generator/BuilderTest.php
index a41153b4ee86..4c85ec8f114f 100644
--- a/core/tests/Drupal/Tests/Composer/Generator/BuilderTest.php
+++ b/core/tests/Drupal/Tests/Composer/Generator/BuilderTest.php
@@ -88,7 +88,7 @@ public static function builderTestData() {
    *
    * @dataProvider builderTestData
    */
-  public function testBuilder($builderClass, $expected) {
+  public function testBuilder($builderClass, $expected): void {
     $fixtures = new Fixtures();
     $drupalCoreInfo = $fixtures->drupalCoreComposerFixture();
 
diff --git a/core/tests/Drupal/Tests/Composer/Generator/MetapackageUpdateTest.php b/core/tests/Drupal/Tests/Composer/Generator/MetapackageUpdateTest.php
index dcadfe9989c5..5a9df6df8f7f 100644
--- a/core/tests/Drupal/Tests/Composer/Generator/MetapackageUpdateTest.php
+++ b/core/tests/Drupal/Tests/Composer/Generator/MetapackageUpdateTest.php
@@ -55,7 +55,7 @@ public static function updatedTestData() {
    *
    *  @dataProvider updatedTestData
    */
-  public function testUpdated($builderClass, $path) {
+  public function testUpdated($builderClass, $path): void {
     // Create a DrupalCoreComposer for the System Under Test (current repo)
     $repositoryRoot = dirname(__DIR__, 6);
     $drupalCoreInfo = DrupalCoreComposer::createFromPath($repositoryRoot);
diff --git a/core/tests/Drupal/Tests/Composer/Generator/OverlapWithTopLevelDependenciesTest.php b/core/tests/Drupal/Tests/Composer/Generator/OverlapWithTopLevelDependenciesTest.php
index 2b0305f98509..503a78b1fc3f 100644
--- a/core/tests/Drupal/Tests/Composer/Generator/OverlapWithTopLevelDependenciesTest.php
+++ b/core/tests/Drupal/Tests/Composer/Generator/OverlapWithTopLevelDependenciesTest.php
@@ -35,7 +35,7 @@ public static function templateProjectPathProvider() {
    * @param string $template_project_path
    *   The path of the project template to test.
    */
-  public function testOverlapWithTemplateProject($template_project_path) {
+  public function testOverlapWithTemplateProject($template_project_path): void {
     $root = dirname(__DIR__, 6);
     // Read template project composer.json.
     $top_level_composer_json = json_decode(file_get_contents("$root/$template_project_path/composer.json"), TRUE);
diff --git a/core/tests/Drupal/Tests/Composer/Plugin/ProjectMessage/ConfigTest.php b/core/tests/Drupal/Tests/Composer/Plugin/ProjectMessage/ConfigTest.php
index 8949cf51cd72..4c52c5600fb7 100644
--- a/core/tests/Drupal/Tests/Composer/Plugin/ProjectMessage/ConfigTest.php
+++ b/core/tests/Drupal/Tests/Composer/Plugin/ProjectMessage/ConfigTest.php
@@ -59,7 +59,7 @@ public static function provideGetMessageText() {
    * @dataProvider provideGetMessageText
    * @covers ::getText
    */
-  public function testGetMessageText($expected, $config) {
+  public function testGetMessageText($expected, $config): void {
     // Root package has our config.
     $root = $this->createMock(RootPackageInterface::class);
     $root->expects($this->once())
@@ -74,7 +74,7 @@ public function testGetMessageText($expected, $config) {
   /**
    * @covers ::getText
    */
-  public function testDefaultFile() {
+  public function testDefaultFile(): void {
     // Root package has no extra field.
     $root = $this->createMock(RootPackageInterface::class);
     $root->expects($this->once())
diff --git a/core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Functional/ComposerHookTest.php b/core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Functional/ComposerHookTest.php
index dda93939b669..7c7a10909c1b 100644
--- a/core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Functional/ComposerHookTest.php
+++ b/core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Functional/ComposerHookTest.php
@@ -77,7 +77,7 @@ protected function tearDown(): void {
   /**
    * Tests to see if scaffold operation runs at the correct times.
    */
-  public function testComposerHooks() {
+  public function testComposerHooks(): void {
     $topLevelProjectDir = 'composer-hooks-fixture';
     $sut = $this->fixturesDir . '/' . $topLevelProjectDir;
     // First test: run composer install. This is the same as composer update
@@ -126,7 +126,7 @@ public function testComposerHooks() {
   /**
    * Tests to see if scaffold messages are omitted when running scaffold twice.
    */
-  public function testScaffoldMessagesDoNotPrintTwice() {
+  public function testScaffoldMessagesDoNotPrintTwice(): void {
     $topLevelProjectDir = 'drupal-drupal';
     $sut = $this->fixturesDir . '/' . $topLevelProjectDir;
     // First test: run composer install. This is the same as composer update
diff --git a/core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Functional/ManageGitIgnoreTest.php b/core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Functional/ManageGitIgnoreTest.php
index e61a716ff8bf..634b4018c592 100644
--- a/core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Functional/ManageGitIgnoreTest.php
+++ b/core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Functional/ManageGitIgnoreTest.php
@@ -102,7 +102,7 @@ protected function createSutWithGit($fixture_name) {
   /**
    * Tests scaffold command correctly manages the .gitignore file.
    */
-  public function testManageGitIgnore() {
+  public function testManageGitIgnore(): void {
     // Note that the drupal-composer-drupal-project fixture does not
     // have any configuration settings related to .gitignore management.
     $sut = $this->createSutWithGit('drupal-composer-drupal-project');
@@ -146,7 +146,7 @@ public function testManageGitIgnore() {
   /**
    * Tests scaffold command does not manage the .gitignore file when disabled.
    */
-  public function testUnmanagedGitIgnoreWhenDisabled() {
+  public function testUnmanagedGitIgnoreWhenDisabled(): void {
     // Note that the drupal-drupal fixture has a configuration setting
     // `"gitignore": false,` which disables .gitignore file handling.
     $sut = $this->createSutWithGit('drupal-drupal');
@@ -167,7 +167,7 @@ public function testUnmanagedGitIgnoreWhenDisabled() {
    * .gitignore files, then we expect that the unmanaged file should not be
    * added to the .gitignore file, because unmanaged files should be committed.
    */
-  public function testAppendToEmptySettingsIsUnmanaged() {
+  public function testAppendToEmptySettingsIsUnmanaged(): void {
     $sut = $this->createSutWithGit('drupal-drupal-append-settings');
     $this->assertFileDoesNotExist($sut . '/autoload.php');
     $this->assertFileDoesNotExist($sut . '/index.php');
@@ -187,7 +187,7 @@ public function testAppendToEmptySettingsIsUnmanaged() {
    * The scaffold operation should still succeed if there is no 'git'
    * executable.
    */
-  public function testUnmanagedGitIgnoreWhenGitNotAvailable() {
+  public function testUnmanagedGitIgnoreWhenGitNotAvailable(): void {
     // Note that the drupal-composer-drupal-project fixture does not have any
     // configuration settings related to .gitignore management.
     $sut = $this->createSutWithGit('drupal-composer-drupal-project');
diff --git a/core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Functional/ScaffoldTest.php b/core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Functional/ScaffoldTest.php
index 012cc4590c44..951bca662645 100644
--- a/core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Functional/ScaffoldTest.php
+++ b/core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Functional/ScaffoldTest.php
@@ -170,7 +170,7 @@ public static function scaffoldExpectedExceptionTestValues() {
    *
    * @dataProvider scaffoldExpectedExceptionTestValues
    */
-  public function testScaffoldWithExpectedException($fixture_name, $expected_exception_message, $is_link) {
+  public function testScaffoldWithExpectedException($fixture_name, $expected_exception_message, $is_link): void {
     // Test scaffold. Expect an error.
     $this->expectException(\Exception::class);
     $this->expectExceptionMessage($expected_exception_message);
@@ -180,7 +180,7 @@ public function testScaffoldWithExpectedException($fixture_name, $expected_excep
   /**
    * Try to scaffold a project that does not scaffold anything.
    */
-  public function testEmptyProject() {
+  public function testEmptyProject(): void {
     $fixture_name = 'empty-fixture';
 
     $result = $this->scaffoldSut($fixture_name, FALSE, FALSE);
@@ -190,7 +190,7 @@ public function testEmptyProject() {
   /**
    * Try to scaffold a project that allows a project with no scaffold files.
    */
-  public function testProjectThatScaffoldsEmptyProject() {
+  public function testProjectThatScaffoldsEmptyProject(): void {
     $fixture_name = 'project-allowing-empty-fixture';
     $result = $this->scaffoldSut($fixture_name, FALSE, FALSE);
     $this->assertStringContainsString('The allowed package fixtures/empty-fixture does not provide a file mapping for Composer Scaffold', $result->scaffoldOutput());
@@ -227,7 +227,7 @@ public static function scaffoldOverridingSettingsExcludingHtaccessValues() {
    *
    * @dataProvider scaffoldOverridingSettingsExcludingHtaccessValues
    */
-  public function testScaffoldOverridingSettingsExcludingHtaccess($fixture_name, $is_link, $relocated_docroot) {
+  public function testScaffoldOverridingSettingsExcludingHtaccess($fixture_name, $is_link, $relocated_docroot): void {
     $result = $this->scaffoldSut($fixture_name, $is_link, $relocated_docroot);
 
     $this->assertCommonDrupalAssetsWereScaffolded($result->docroot(), $is_link);
@@ -243,7 +243,7 @@ public function testScaffoldOverridingSettingsExcludingHtaccess($fixture_name, $
    * replaced, and that files that were not supposed to be replaced remain
    * unchanged.
    */
-  public function testDrupalDrupalFileWasReplaced() {
+  public function testDrupalDrupalFileWasReplaced(): void {
     $fixture_name = 'drupal-drupal-test-overwrite';
     $result = $this->scaffoldSut($fixture_name, FALSE, FALSE);
 
diff --git a/core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Functional/ScaffoldUpgradeTest.php b/core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Functional/ScaffoldUpgradeTest.php
index c9f34d95516d..f0c687bc439d 100644
--- a/core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Functional/ScaffoldUpgradeTest.php
+++ b/core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Functional/ScaffoldUpgradeTest.php
@@ -53,7 +53,7 @@ protected function setUp(): void {
   /**
    * Tests upgrading the Composer Scaffold plugin.
    */
-  public function testScaffoldUpgrade() {
+  public function testScaffoldUpgrade(): void {
     $composerVersionLine = exec('composer --version');
     if (str_contains($composerVersionLine, 'Composer version 2')) {
       $this->markTestSkipped('We cannot run the scaffold upgrade test with Composer 2 until we have a stable version of drupal/core-composer-scaffold to start from that we can install with Composer 2.x.');
diff --git a/core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Integration/AppendOpTest.php b/core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Integration/AppendOpTest.php
index 3cce05475a44..1363cb351b10 100644
--- a/core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Integration/AppendOpTest.php
+++ b/core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Integration/AppendOpTest.php
@@ -19,7 +19,7 @@ class AppendOpTest extends TestCase {
   /**
    * @covers ::process
    */
-  public function testProcess() {
+  public function testProcess(): void {
     $fixtures = new Fixtures();
     $destination = $fixtures->destinationPath('[web-root]/robots.txt');
     $options = ScaffoldOptions::create([]);
diff --git a/core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Integration/ReplaceOpTest.php b/core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Integration/ReplaceOpTest.php
index a781d5b9c66c..27053fe0eedb 100644
--- a/core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Integration/ReplaceOpTest.php
+++ b/core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Integration/ReplaceOpTest.php
@@ -19,7 +19,7 @@ class ReplaceOpTest extends TestCase {
   /**
    * @covers ::process
    */
-  public function testProcess() {
+  public function testProcess(): void {
     $fixtures = new Fixtures();
     $destination = $fixtures->destinationPath('[web-root]/robots.txt');
     $source = $fixtures->sourcePath('drupal-assets-fixture', 'robots.txt');
@@ -42,7 +42,7 @@ public function testProcess() {
   /**
    * @covers ::process
    */
-  public function testEmptyFile() {
+  public function testEmptyFile(): void {
     $fixtures = new Fixtures();
     $destination = $fixtures->destinationPath('[web-root]/empty_file.txt');
     $source = $fixtures->sourcePath('empty-file', 'empty_file.txt');
diff --git a/core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Integration/ScaffoldFileCollectionTest.php b/core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Integration/ScaffoldFileCollectionTest.php
index 2741a77d3389..05e89463c020 100644
--- a/core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Integration/ScaffoldFileCollectionTest.php
+++ b/core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Integration/ScaffoldFileCollectionTest.php
@@ -20,7 +20,7 @@ class ScaffoldFileCollectionTest extends TestCase {
   /**
    * @covers ::__construct
    */
-  public function testCreate() {
+  public function testCreate(): void {
     $fixtures = new Fixtures();
     $locationReplacements = $fixtures->getLocationReplacements();
     $scaffold_file_fixtures = [
diff --git a/core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Integration/SkipOpTest.php b/core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Integration/SkipOpTest.php
index 5a13e34918a4..ee5d3a566a17 100644
--- a/core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Integration/SkipOpTest.php
+++ b/core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Integration/SkipOpTest.php
@@ -19,7 +19,7 @@ class SkipOpTest extends TestCase {
   /**
    * @covers ::process
    */
-  public function testProcess() {
+  public function testProcess(): void {
     $fixtures = new Fixtures();
     $destination = $fixtures->destinationPath('[web-root]/robots.txt');
     $options = ScaffoldOptions::create([]);
diff --git a/core/tests/Drupal/Tests/Composer/Plugin/VendorHardening/ConfigTest.php b/core/tests/Drupal/Tests/Composer/Plugin/VendorHardening/ConfigTest.php
index 66f28d2ed5e5..77ceffae7efe 100644
--- a/core/tests/Drupal/Tests/Composer/Plugin/VendorHardening/ConfigTest.php
+++ b/core/tests/Drupal/Tests/Composer/Plugin/VendorHardening/ConfigTest.php
@@ -17,7 +17,7 @@ class ConfigTest extends TestCase {
   /**
    * @covers ::getPathsForPackage
    */
-  public function testGetPathsForPackageMixedCase() {
+  public function testGetPathsForPackageMixedCase(): void {
     $config = $this->getMockBuilder(Config::class)
       ->onlyMethods(['getAllCleanupPaths'])
       ->disableOriginalConstructor()
@@ -33,7 +33,7 @@ public function testGetPathsForPackageMixedCase() {
   /**
    * @covers ::getAllCleanupPaths
    */
-  public function testNoRootMergeConfig() {
+  public function testNoRootMergeConfig(): void {
     // Root package has no extra field.
     $root = $this->createMock(RootPackageInterface::class);
     $root->expects($this->once())
@@ -54,7 +54,7 @@ public function testNoRootMergeConfig() {
   /**
    * @covers ::getAllCleanupPaths
    */
-  public function testRootMergeConfig() {
+  public function testRootMergeConfig(): void {
     // Root package has configuration in extra.
     $root = $this->createMock(RootPackageInterface::class);
     $root->expects($this->once())
@@ -81,7 +81,7 @@ public function testRootMergeConfig() {
    *
    * @runInSeparateProcess
    */
-  public function testMixedCaseConfigCleanupPackages() {
+  public function testMixedCaseConfigCleanupPackages(): void {
     // Root package has configuration in extra.
     $root = $this->createMock(RootPackageInterface::class);
     $root->expects($this->once())
diff --git a/core/tests/Drupal/Tests/Composer/Plugin/VendorHardening/VendorHardeningPluginTest.php b/core/tests/Drupal/Tests/Composer/Plugin/VendorHardening/VendorHardeningPluginTest.php
index 29c935fe1444..7df0fc601297 100644
--- a/core/tests/Drupal/Tests/Composer/Plugin/VendorHardening/VendorHardeningPluginTest.php
+++ b/core/tests/Drupal/Tests/Composer/Plugin/VendorHardening/VendorHardeningPluginTest.php
@@ -42,7 +42,7 @@ protected function setUp(): void {
   /**
    * @covers ::cleanPackage
    */
-  public function testCleanPackage() {
+  public function testCleanPackage(): void {
 
     $config = $this->getMockBuilder(Config::class)
       ->disableOriginalConstructor()
@@ -78,7 +78,7 @@ public function testCleanPackage() {
   /**
    * @covers ::cleanPathsForPackage
    */
-  public function testCleanPathsForPackage() {
+  public function testCleanPathsForPackage(): void {
     $plugin = $this->getMockBuilder(VendorHardeningPlugin::class)
       ->onlyMethods(['getInstallPathForPackage'])
       ->getMock();
@@ -106,7 +106,7 @@ public function testCleanPathsForPackage() {
   /**
    * @covers ::cleanAllPackages
    */
-  public function testCleanAllPackages() {
+  public function testCleanAllPackages(): void {
     $config = $this->getMockBuilder(Config::class)
       ->disableOriginalConstructor()
       ->getMock();
@@ -146,7 +146,7 @@ public function testCleanAllPackages() {
   /**
    * @covers ::writeAccessRestrictionFiles
    */
-  public function testWriteAccessRestrictionFiles() {
+  public function testWriteAccessRestrictionFiles(): void {
     $dir = vfsStream::url('vendor');
 
     // Set up mocks so that writeAccessRestrictionFiles() can eventually use
@@ -219,7 +219,7 @@ public static function providerFindBinOverlap() {
    * @covers ::findBinOverlap
    * @dataProvider providerFindBinOverlap
    */
-  public function testFindBinOverlap($expected, $binaries, $clean_paths) {
+  public function testFindBinOverlap($expected, $binaries, $clean_paths): void {
     $plugin = $this->getMockBuilder(VendorHardeningPlugin::class)
       ->disableOriginalConstructor()
       ->getMock();
diff --git a/core/tests/Drupal/Tests/ComposerIntegrationTest.php b/core/tests/Drupal/Tests/ComposerIntegrationTest.php
index 3ea8d0ba8e68..f2dfe4bf73cd 100644
--- a/core/tests/Drupal/Tests/ComposerIntegrationTest.php
+++ b/core/tests/Drupal/Tests/ComposerIntegrationTest.php
@@ -25,7 +25,7 @@ class ComposerIntegrationTest extends UnitTestCase {
    *
    * @see https://www.drupal.org/about/core/policies/core-dependencies-policies/managing-composer-updates-for-drupal-core
    */
-  public function testComposerLockHash() {
+  public function testComposerLockHash(): void {
     $content_hash = self::getContentHash(file_get_contents($this->root . '/composer.json'));
     $lock = json_decode(file_get_contents($this->root . '/composer.lock'), TRUE);
     $this->assertSame($content_hash, $lock['content-hash']);
@@ -185,7 +185,7 @@ public static function providerTestExpectedScaffoldFiles() {
    *
    * @dataProvider providerTestExpectedScaffoldFiles
    */
-  public function testExpectedScaffoldFiles($destRelPath, $sourceRelPath, $expectedDestination = '[web-root]') {
+  public function testExpectedScaffoldFiles($destRelPath, $sourceRelPath, $expectedDestination = '[web-root]'): void {
     // Grab the 'file-mapping' section of the core composer.json file.
     $json = json_decode(file_get_contents($this->root . '/core/composer.json'));
     $scaffold_file_mapping = (array) $json->extra->{'drupal-scaffold'}->{'file-mapping'};
diff --git a/core/tests/Drupal/Tests/Core/Access/AccessManagerTest.php b/core/tests/Drupal/Tests/Core/Access/AccessManagerTest.php
index 248cbeac54ff..20862c77e43e 100644
--- a/core/tests/Drupal/Tests/Core/Access/AccessManagerTest.php
+++ b/core/tests/Drupal/Tests/Core/Access/AccessManagerTest.php
@@ -132,7 +132,7 @@ protected function setUp(): void {
   /**
    * Tests \Drupal\Core\Access\AccessManager::setChecks().
    */
-  public function testSetChecks() {
+  public function testSetChecks(): void {
     // Check setChecks without any access checker defined yet.
     $this->checkProvider->setChecks($this->routeCollection);
 
@@ -152,7 +152,7 @@ public function testSetChecks() {
   /**
    * Tests setChecks with a dynamic access checker.
    */
-  public function testSetChecksWithDynamicAccessChecker() {
+  public function testSetChecksWithDynamicAccessChecker(): void {
     // Setup the dynamic access checker.
     $access_check = $this->createMock('Drupal\Tests\Core\Access\TestAccessCheckInterface');
     $this->container->set('test_access', $access_check);
@@ -183,7 +183,7 @@ public function testSetChecksWithDynamicAccessChecker() {
   /**
    * Tests \Drupal\Core\Access\AccessManager::check().
    */
-  public function testCheck() {
+  public function testCheck(): void {
     $route_matches = [];
 
     // Construct route match objects.
@@ -225,7 +225,7 @@ public function testCheck() {
    *
    * @covers ::check
    */
-  public function testCheckWithNullAccount() {
+  public function testCheckWithNullAccount(): void {
     $this->setupAccessChecker();
     $this->checkProvider->setChecks($this->routeCollection);
 
@@ -299,7 +299,7 @@ public static function providerTestCheckConjunctions() {
    *
    * @dataProvider providerTestCheckConjunctions
    */
-  public function testCheckConjunctions($name, $condition_one, $condition_two, $expected_access) {
+  public function testCheckConjunctions($name, $condition_one, $condition_two, $expected_access): void {
     $this->setupAccessChecker();
     $this->container->register('test_access_defined', DefinedTestAccessCheck::class);
     $this->checkProvider->addCheckService('test_access_defined', 'access', ['_test_access']);
@@ -326,7 +326,7 @@ public function testCheckConjunctions($name, $condition_one, $condition_two, $ex
    *
    * @see \Drupal\Core\Access\AccessManager::checkNamedRoute()
    */
-  public function testCheckNamedRoute() {
+  public function testCheckNamedRoute(): void {
     $this->setupAccessChecker();
     $this->checkProvider->setChecks($this->routeCollection);
     $this->setupAccessArgumentsResolverFactory();
@@ -350,7 +350,7 @@ public function testCheckNamedRoute() {
    *
    * @see \Drupal\Core\Access\AccessManager::checkNamedRoute()
    */
-  public function testCheckNamedRouteWithUpcastedValues() {
+  public function testCheckNamedRouteWithUpcastedValues(): void {
     $this->routeCollection = new RouteCollection();
     $route = new Route('/test-route-1/{value}', [], ['_test_access' => 'TRUE']);
     $this->routeCollection->add('test_route_1', $route);
@@ -398,7 +398,7 @@ public function testCheckNamedRouteWithUpcastedValues() {
    *
    * @covers ::checkNamedRoute
    */
-  public function testCheckNamedRouteWithDefaultValue() {
+  public function testCheckNamedRouteWithDefaultValue(): void {
     $this->routeCollection = new RouteCollection();
     $route = new Route('/test-route-1/{value}', ['value' => 'example'], ['_test_access' => 'TRUE']);
     $this->routeCollection->add('test_route_1', $route);
@@ -444,7 +444,7 @@ public function testCheckNamedRouteWithDefaultValue() {
   /**
    * Tests checkNamedRoute given an invalid/non existing route name.
    */
-  public function testCheckNamedRouteWithNonExistingRoute() {
+  public function testCheckNamedRouteWithNonExistingRoute(): void {
     $this->routeProvider->expects($this->any())
       ->method('getRouteByName')
       ->will($this->throwException(new RouteNotFoundException()));
@@ -460,7 +460,7 @@ public function testCheckNamedRouteWithNonExistingRoute() {
    *
    * @dataProvider providerCheckException
    */
-  public function testCheckException($return_value) {
+  public function testCheckException($return_value): void {
     $route_provider = $this->createMock('Drupal\Core\Routing\RouteProviderInterface');
 
     // Setup a test route for each access configuration.
diff --git a/core/tests/Drupal/Tests/Core/Access/AccessResultForbiddenTest.php b/core/tests/Drupal/Tests/Core/Access/AccessResultForbiddenTest.php
index cdf7a8c99f6d..1bedba8f7f2a 100644
--- a/core/tests/Drupal/Tests/Core/Access/AccessResultForbiddenTest.php
+++ b/core/tests/Drupal/Tests/Core/Access/AccessResultForbiddenTest.php
@@ -19,7 +19,7 @@ class AccessResultForbiddenTest extends UnitTestCase {
    * @covers ::__construct
    * @covers ::getReason
    */
-  public function testConstruction() {
+  public function testConstruction(): void {
 
     $a = new AccessResultForbidden();
     $this->assertEquals(NULL, $a->getReason());
@@ -34,7 +34,7 @@ public function testConstruction() {
    *
    * @covers ::setReason
    */
-  public function testSetReason() {
+  public function testSetReason(): void {
     $a = new AccessResultForbidden();
 
     $reason = $this->getRandomGenerator()->string();
diff --git a/core/tests/Drupal/Tests/Core/Access/AccessResultNeutralTest.php b/core/tests/Drupal/Tests/Core/Access/AccessResultNeutralTest.php
index 2a0c4f3bc2e9..94fd5a73b24a 100644
--- a/core/tests/Drupal/Tests/Core/Access/AccessResultNeutralTest.php
+++ b/core/tests/Drupal/Tests/Core/Access/AccessResultNeutralTest.php
@@ -19,7 +19,7 @@ class AccessResultNeutralTest extends UnitTestCase {
    * @covers ::__construct
    * @covers ::getReason
    */
-  public function testConstruction() {
+  public function testConstruction(): void {
     $a = new AccessResultNeutral();
     $this->assertEquals('', $a->getReason());
 
@@ -33,7 +33,7 @@ public function testConstruction() {
    *
    * @covers ::setReason
    */
-  public function testSetReason() {
+  public function testSetReason(): void {
     $a = new AccessResultNeutral();
 
     $reason = $this->getRandomGenerator()->string();
diff --git a/core/tests/Drupal/Tests/Core/Access/AccessResultTest.php b/core/tests/Drupal/Tests/Core/Access/AccessResultTest.php
index f61abb0f3f78..fad36f270dcb 100644
--- a/core/tests/Drupal/Tests/Core/Access/AccessResultTest.php
+++ b/core/tests/Drupal/Tests/Core/Access/AccessResultTest.php
@@ -56,7 +56,7 @@ protected function assertDefaultCacheability(AccessResult $access): void {
    *
    * @covers ::neutral
    */
-  public function testConstruction() {
+  public function testConstruction(): void {
     $verify = function (AccessResult $access) {
       $this->assertFalse($access->isAllowed());
       $this->assertFalse($access->isForbidden());
@@ -81,7 +81,7 @@ public function testConstruction() {
    * @covers ::isForbidden
    * @covers ::isNeutral
    */
-  public function testAccessAllowed() {
+  public function testAccessAllowed(): void {
     $verify = function (AccessResult $access) {
       $this->assertTrue($access->isAllowed());
       $this->assertFalse($access->isForbidden());
@@ -100,7 +100,7 @@ public function testAccessAllowed() {
    * @covers ::isForbidden
    * @covers ::isNeutral
    */
-  public function testAccessForbidden() {
+  public function testAccessForbidden(): void {
     $verify = function (AccessResult $access) {
       $this->assertFalse($access->isAllowed());
       $this->assertTrue($access->isForbidden());
@@ -116,7 +116,7 @@ public function testAccessForbidden() {
   /**
    * @covers ::forbidden
    */
-  public function testAccessForbiddenReason() {
+  public function testAccessForbiddenReason(): void {
     $verify = function (AccessResult $access, $reason) {
       $this->assertInstanceOf(AccessResultReasonInterface::class, $access);
       $this->assertSame($reason, $access->getReason());
@@ -139,7 +139,7 @@ public function testAccessForbiddenReason() {
    * @covers ::isForbidden
    * @covers ::isNeutral
    */
-  public function testAccessConditionallyAllowed() {
+  public function testAccessConditionallyAllowed(): void {
     $verify = function (AccessResult $access, $allowed) {
       $this->assertSame($allowed, $access->isAllowed());
       $this->assertFalse($access->isForbidden());
@@ -159,7 +159,7 @@ public function testAccessConditionallyAllowed() {
    * @covers ::isForbidden
    * @covers ::isNeutral
    */
-  public function testAccessConditionallyForbidden() {
+  public function testAccessConditionallyForbidden(): void {
     $verify = function (AccessResult $access, $forbidden) {
       $this->assertFalse($access->isAllowed());
       $this->assertSame($forbidden, $access->isForbidden());
@@ -176,7 +176,7 @@ public function testAccessConditionallyForbidden() {
   /**
    * @covers ::andIf
    */
-  public function testAndIf() {
+  public function testAndIf(): void {
     $neutral = AccessResult::neutral('neutral message');
     $allowed = AccessResult::allowed();
     $forbidden = AccessResult::forbidden('forbidden message');
@@ -267,7 +267,7 @@ public function testAndIf() {
   /**
    * @covers ::orIf
    */
-  public function testOrIf() {
+  public function testOrIf(): void {
     $neutral = AccessResult::neutral('neutral message');
     $neutral_other = AccessResult::neutral('other neutral message');
     $neutral_reasonless = AccessResult::neutral();
@@ -385,7 +385,7 @@ public function testOrIf() {
    * @covers ::setCacheMaxAge
    * @covers ::getCacheMaxAge
    */
-  public function testCacheMaxAge() {
+  public function testCacheMaxAge(): void {
     $this->assertSame(Cache::PERMANENT, AccessResult::neutral()->getCacheMaxAge());
     $this->assertSame(1337, AccessResult::neutral()->setCacheMaxAge(1337)->getCacheMaxAge());
   }
@@ -398,7 +398,7 @@ public function testCacheMaxAge() {
    * @covers ::cachePerUser
    * @covers ::allowedIfHasPermission
    */
-  public function testCacheContexts() {
+  public function testCacheContexts(): void {
     $verify = function (AccessResult $access, array $contexts) {
       $this->assertFalse($access->isAllowed());
       $this->assertFalse($access->isForbidden());
@@ -474,7 +474,7 @@ public function testCacheContexts() {
    * @covers ::getCacheTags
    * @covers ::resetCacheTags
    */
-  public function testCacheTags() {
+  public function testCacheTags(): void {
     $verify = function (AccessResult $access, array $tags, array $contexts = [], $max_age = Cache::PERMANENT) {
       $this->assertFalse($access->isAllowed());
       $this->assertFalse($access->isForbidden());
@@ -532,7 +532,7 @@ public function testCacheTags() {
   /**
    * @covers ::inheritCacheability
    */
-  public function testInheritCacheability() {
+  public function testInheritCacheability(): void {
     // andIf(); 1st has defaults, 2nd has custom tags, contexts and max-age.
     $access = AccessResult::allowed();
     $other = AccessResult::allowed()->setCacheMaxAge(1500)->cachePerPermissions()->addCacheTags(['node:20011988']);
@@ -852,7 +852,7 @@ public static function andOrCacheabilityPropagationProvider() {
    *
    * @dataProvider andOrCacheabilityPropagationProvider
    */
-  public function testAndOrCacheabilityPropagation(AccessResultInterface $first, $op, AccessResultInterface $second, $implements_cacheable_dependency_interface, $is_cacheable) {
+  public function testAndOrCacheabilityPropagation(AccessResultInterface $first, $op, AccessResultInterface $second, $implements_cacheable_dependency_interface, $is_cacheable): void {
     if ($op === 'OR') {
       $result = $first->orIf($second);
     }
@@ -884,7 +884,7 @@ public function testAndOrCacheabilityPropagation(AccessResultInterface $first, $
    *
    * @covers ::orIf
    */
-  public function testOrIfCacheabilityMerging() {
+  public function testOrIfCacheabilityMerging(): void {
     $merge_both_directions = function (AccessResult $a, AccessResult $b) {
       // A globally cacheable access result.
       $a->setCacheMaxAge(3600);
@@ -920,7 +920,7 @@ public function testOrIfCacheabilityMerging() {
    * @param \Drupal\Core\Access\AccessResult $expected_access
    *   The expected access check result.
    */
-  public function testAllowedIfHasPermissions($permissions, $conjunction, AccessResult $expected_access) {
+  public function testAllowedIfHasPermissions($permissions, $conjunction, AccessResult $expected_access): void {
     $account = $this->createMock('\Drupal\Core\Session\AccountInterface');
     $account->expects($this->any())
       ->method('hasPermission')
diff --git a/core/tests/Drupal/Tests/Core/Access/CsrfAccessCheckTest.php b/core/tests/Drupal/Tests/Core/Access/CsrfAccessCheckTest.php
index b6678722ecca..34bb870ef481 100644
--- a/core/tests/Drupal/Tests/Core/Access/CsrfAccessCheckTest.php
+++ b/core/tests/Drupal/Tests/Core/Access/CsrfAccessCheckTest.php
@@ -55,7 +55,7 @@ protected function setUp(): void {
   /**
    * Tests the access() method with a valid token.
    */
-  public function testAccessTokenPass() {
+  public function testAccessTokenPass(): void {
     $this->csrfToken->expects($this->once())
       ->method('validate')
       ->with('test_query', 'test-path/42')
@@ -74,7 +74,7 @@ public function testAccessTokenPass() {
   /**
    * @covers ::access
    */
-  public function testCsrfTokenInvalid() {
+  public function testCsrfTokenInvalid(): void {
     $this->csrfToken->expects($this->once())
       ->method('validate')
       ->with('test_query', 'test-path')
@@ -93,7 +93,7 @@ public function testCsrfTokenInvalid() {
   /**
    * @covers ::access
    */
-  public function testCsrfTokenMissing() {
+  public function testCsrfTokenMissing(): void {
     $this->csrfToken->expects($this->once())
       ->method('validate')
       ->with('', 'test-path')
diff --git a/core/tests/Drupal/Tests/Core/Access/CsrfTokenGeneratorTest.php b/core/tests/Drupal/Tests/Core/Access/CsrfTokenGeneratorTest.php
index 011a8f2eba8e..9282dc94d487 100644
--- a/core/tests/Drupal/Tests/Core/Access/CsrfTokenGeneratorTest.php
+++ b/core/tests/Drupal/Tests/Core/Access/CsrfTokenGeneratorTest.php
@@ -82,7 +82,7 @@ protected function setupDefaultExpectations() {
    *
    * @covers ::get
    */
-  public function testGet() {
+  public function testGet(): void {
     $this->setupDefaultExpectations();
 
     $this->assertIsString($this->generator->get());
@@ -95,7 +95,7 @@ public function testGet() {
    *
    * @covers ::get
    */
-  public function testGenerateSeedOnGet() {
+  public function testGenerateSeedOnGet(): void {
     $key = Crypt::randomBytesBase64();
     $this->privateKey->expects($this->any())
       ->method('get')
@@ -117,7 +117,7 @@ public function testGenerateSeedOnGet() {
    *
    * @covers ::validate
    */
-  public function testValidate() {
+  public function testValidate(): void {
     $this->setupDefaultExpectations();
 
     $token = $this->generator->get();
@@ -139,7 +139,7 @@ public function testValidate() {
    * @covers ::validate
    * @dataProvider providerTestValidateParameterTypes
    */
-  public function testValidateParameterTypes($token, $value) {
+  public function testValidateParameterTypes($token, $value): void {
     $this->setupDefaultExpectations();
 
     // The following check might throw PHP fatal errors and notices, so we
@@ -176,7 +176,7 @@ public static function providerTestValidateParameterTypes() {
    * @covers ::validate
    * @dataProvider providerTestInvalidParameterTypes
    */
-  public function testInvalidParameterTypes($token, $value = '') {
+  public function testInvalidParameterTypes($token, $value = ''): void {
     $this->setupDefaultExpectations();
 
     $this->expectException(\InvalidArgumentException::class);
@@ -203,7 +203,7 @@ public static function providerTestInvalidParameterTypes() {
    *
    * @covers ::get
    */
-  public function testGetWithNoHashSalt() {
+  public function testGetWithNoHashSalt(): void {
     // Update settings with no hash salt.
     new Settings([]);
     $generator = new CsrfTokenGenerator($this->privateKey, $this->sessionMetadata);
diff --git a/core/tests/Drupal/Tests/Core/Access/CustomAccessCheckTest.php b/core/tests/Drupal/Tests/Core/Access/CustomAccessCheckTest.php
index c487ded7c97c..f4de1af10460 100644
--- a/core/tests/Drupal/Tests/Core/Access/CustomAccessCheckTest.php
+++ b/core/tests/Drupal/Tests/Core/Access/CustomAccessCheckTest.php
@@ -54,7 +54,7 @@ protected function setUp(): void {
   /**
    * Tests the access method.
    */
-  public function testAccess() {
+  public function testAccess(): void {
     $route_match = $this->createMock('Drupal\Core\Routing\RouteMatchInterface');
 
     $this->callableResolver
@@ -111,7 +111,7 @@ public function testAccess() {
   /**
    * Tests the access method exception for invalid access callbacks.
    */
-  public function testAccessException() {
+  public function testAccessException(): void {
     // Create callableResolver mock to return InvalidArgumentException.
     $this->callableResolver = $this->getMockBuilder(CallableResolver::class)
       ->disableOriginalConstructor()
diff --git a/core/tests/Drupal/Tests/Core/Access/DefaultAccessCheckTest.php b/core/tests/Drupal/Tests/Core/Access/DefaultAccessCheckTest.php
index 372b35159848..58a904492650 100644
--- a/core/tests/Drupal/Tests/Core/Access/DefaultAccessCheckTest.php
+++ b/core/tests/Drupal/Tests/Core/Access/DefaultAccessCheckTest.php
@@ -43,7 +43,7 @@ protected function setUp(): void {
   /**
    * Tests the access method.
    */
-  public function testAccess() {
+  public function testAccess(): void {
     $request = new Request([]);
 
     $route = new Route('/test-route', [], ['_access' => 'NULL']);
diff --git a/core/tests/Drupal/Tests/Core/Access/RouteProcessorCsrfTest.php b/core/tests/Drupal/Tests/Core/Access/RouteProcessorCsrfTest.php
index 6e356b7f244b..621d79557c0a 100644
--- a/core/tests/Drupal/Tests/Core/Access/RouteProcessorCsrfTest.php
+++ b/core/tests/Drupal/Tests/Core/Access/RouteProcessorCsrfTest.php
@@ -46,7 +46,7 @@ protected function setUp(): void {
   /**
    * Tests the processOutbound() method with no _csrf_token route requirement.
    */
-  public function testProcessOutboundNoRequirement() {
+  public function testProcessOutboundNoRequirement(): void {
     $this->csrfToken->expects($this->never())
       ->method('get');
 
@@ -65,7 +65,7 @@ public function testProcessOutboundNoRequirement() {
   /**
    * Tests the processOutbound() method with a _csrf_token route requirement.
    */
-  public function testProcessOutbound() {
+  public function testProcessOutbound(): void {
     $route = new Route('/test-path', [], ['_csrf_token' => 'TRUE']);
     $parameters = [];
 
@@ -87,7 +87,7 @@ public function testProcessOutbound() {
   /**
    * Tests the processOutbound() method with a dynamic path and one replacement.
    */
-  public function testProcessOutboundDynamicOne() {
+  public function testProcessOutboundDynamicOne(): void {
     $route = new Route('/test-path/{slug}', [], ['_csrf_token' => 'TRUE']);
     $parameters = ['slug' => 100];
 
@@ -106,7 +106,7 @@ public function testProcessOutboundDynamicOne() {
   /**
    * Tests the processOutbound() method with two parameter replacements.
    */
-  public function testProcessOutboundDynamicTwo() {
+  public function testProcessOutboundDynamicTwo(): void {
     $route = new Route('{slug_1}/test-path/{slug_2}', [], ['_csrf_token' => 'TRUE']);
     $parameters = ['slug_1' => 100, 'slug_2' => 'test'];
 
diff --git a/core/tests/Drupal/Tests/Core/Ajax/AjaxCommandsTest.php b/core/tests/Drupal/Tests/Core/Ajax/AjaxCommandsTest.php
index 276ce7955d75..58c37667be4d 100644
--- a/core/tests/Drupal/Tests/Core/Ajax/AjaxCommandsTest.php
+++ b/core/tests/Drupal/Tests/Core/Ajax/AjaxCommandsTest.php
@@ -120,7 +120,7 @@ public static function providerCss() {
    * @covers \Drupal\Core\Ajax\AddCssCommand
    * @dataProvider providerCss
    */
-  public function testAddCssCommand($css, $expected) {
+  public function testAddCssCommand($css, $expected): void {
     $command = new AddCssCommand($css);
 
     $this->assertEquals($expected, $command->render());
@@ -129,7 +129,7 @@ public function testAddCssCommand($css, $expected) {
   /**
    * @covers \Drupal\Core\Ajax\AfterCommand
    */
-  public function testAfterCommand() {
+  public function testAfterCommand(): void {
     $command = new AfterCommand('#page-title', '<p>New Text!</p>', ['my-setting' => 'setting']);
 
     $expected = [
@@ -146,7 +146,7 @@ public function testAfterCommand() {
   /**
    * @covers \Drupal\Core\Ajax\AlertCommand
    */
-  public function testAlertCommand() {
+  public function testAlertCommand(): void {
     $command = new AlertCommand('Set condition 1 throughout the ship!');
     $expected = [
       'command' => 'alert',
@@ -161,7 +161,7 @@ public function testAlertCommand() {
    *
    * @dataProvider announceCommandProvider
    */
-  public function testAnnounceCommand($message, $priority, array $expected) {
+  public function testAnnounceCommand($message, $priority, array $expected): void {
     if ($priority === NULL) {
       $command = new AnnounceCommand($message);
     }
@@ -214,7 +214,7 @@ public static function announceCommandProvider() {
   /**
    * @covers \Drupal\Core\Ajax\AppendCommand
    */
-  public function testAppendCommand() {
+  public function testAppendCommand(): void {
     $command = new AppendCommand('#page-title', '<p>New Text!</p>', ['my-setting' => 'setting']);
 
     $expected = [
@@ -231,7 +231,7 @@ public function testAppendCommand() {
   /**
    * @covers \Drupal\Core\Ajax\BeforeCommand
    */
-  public function testBeforeCommand() {
+  public function testBeforeCommand(): void {
     $command = new BeforeCommand('#page-title', '<p>New Text!</p>', ['my-setting' => 'setting']);
 
     $expected = [
@@ -248,7 +248,7 @@ public function testBeforeCommand() {
   /**
    * @covers \Drupal\Core\Ajax\ChangedCommand
    */
-  public function testChangedCommand() {
+  public function testChangedCommand(): void {
     $command = new ChangedCommand('#page-title', '#page-title-changed');
 
     $expected = [
@@ -263,7 +263,7 @@ public function testChangedCommand() {
   /**
    * @covers \Drupal\Core\Ajax\CssCommand
    */
-  public function testCssCommand() {
+  public function testCssCommand(): void {
     $command = new CssCommand('#page-title', ['text-decoration' => 'blink']);
     $command->setProperty('font-size', '40px')->setProperty('font-weight', 'bold');
 
@@ -283,7 +283,7 @@ public function testCssCommand() {
   /**
    * @covers \Drupal\Core\Ajax\DataCommand
    */
-  public function testDataCommand() {
+  public function testDataCommand(): void {
     $command = new DataCommand('#page-title', 'my-data', ['key' => 'value']);
 
     $expected = [
@@ -299,7 +299,7 @@ public function testDataCommand() {
   /**
    * @covers \Drupal\Core\Ajax\HtmlCommand
    */
-  public function testHtmlCommand() {
+  public function testHtmlCommand(): void {
     $command = new HtmlCommand('#page-title', '<p>New Text!</p>', ['my-setting' => 'setting']);
 
     $expected = [
@@ -316,7 +316,7 @@ public function testHtmlCommand() {
   /**
    * @covers \Drupal\Core\Ajax\InsertCommand
    */
-  public function testInsertCommand() {
+  public function testInsertCommand(): void {
     $command = new InsertCommand('#page-title', '<p>New Text!</p>', ['my-setting' => 'setting']);
 
     $expected = [
@@ -333,7 +333,7 @@ public function testInsertCommand() {
   /**
    * @covers \Drupal\Core\Ajax\InvokeCommand
    */
-  public function testInvokeCommand() {
+  public function testInvokeCommand(): void {
     $command = new InvokeCommand('#page-title', 'myMethod', ['var1', 'var2']);
 
     $expected = [
@@ -349,7 +349,7 @@ public function testInvokeCommand() {
   /**
    * @covers \Drupal\Core\Ajax\PrependCommand
    */
-  public function testPrependCommand() {
+  public function testPrependCommand(): void {
     $command = new PrependCommand('#page-title', '<p>New Text!</p>', ['my-setting' => 'setting']);
 
     $expected = [
@@ -366,7 +366,7 @@ public function testPrependCommand() {
   /**
    * @covers \Drupal\Core\Ajax\RemoveCommand
    */
-  public function testRemoveCommand() {
+  public function testRemoveCommand(): void {
     $command = new RemoveCommand('#page-title');
 
     $expected = [
@@ -380,7 +380,7 @@ public function testRemoveCommand() {
   /**
    * @covers \Drupal\Core\Ajax\ReplaceCommand
    */
-  public function testReplaceCommand() {
+  public function testReplaceCommand(): void {
     $command = new ReplaceCommand('#page-title', '<p>New Text!</p>', ['my-setting' => 'setting']);
 
     $expected = [
@@ -397,7 +397,7 @@ public function testReplaceCommand() {
   /**
    * @covers \Drupal\Core\Ajax\RestripeCommand
    */
-  public function testRestripeCommand() {
+  public function testRestripeCommand(): void {
     $command = new RestripeCommand('#page-title');
 
     $expected = [
@@ -411,7 +411,7 @@ public function testRestripeCommand() {
   /**
    * @covers \Drupal\Core\Ajax\SettingsCommand
    */
-  public function testSettingsCommand() {
+  public function testSettingsCommand(): void {
     $command = new SettingsCommand(['key' => 'value'], TRUE);
 
     $expected = [
@@ -426,7 +426,7 @@ public function testSettingsCommand() {
   /**
    * @covers \Drupal\Core\Ajax\OpenDialogCommand
    */
-  public function testOpenDialogCommand() {
+  public function testOpenDialogCommand(): void {
     $command = new OpenDialogCommand('#some-dialog', 'Title', '<p>Text!</p>', [
       'url' => FALSE,
       'width' => 500,
@@ -454,7 +454,7 @@ public function testOpenDialogCommand() {
   /**
    * @covers \Drupal\Core\Ajax\OpenModalDialogCommand
    */
-  public function testOpenModalDialogCommand() {
+  public function testOpenModalDialogCommand(): void {
     $command = $this->getMockBuilder('Drupal\Core\Ajax\OpenModalDialogCommand')
       ->setConstructorArgs([
         'Title', '<p>Text!</p>', [
@@ -489,7 +489,7 @@ public function testOpenModalDialogCommand() {
   /**
    * @covers \Drupal\Core\Ajax\CloseModalDialogCommand
    */
-  public function testCloseModalDialogCommand() {
+  public function testCloseModalDialogCommand(): void {
     $command = new CloseModalDialogCommand();
     $expected = [
       'command' => 'closeDialog',
@@ -503,7 +503,7 @@ public function testCloseModalDialogCommand() {
   /**
    * @covers \Drupal\Core\Ajax\CloseDialogCommand
    */
-  public function testCloseDialogCommand() {
+  public function testCloseDialogCommand(): void {
     $command = new CloseDialogCommand('#some-dialog', TRUE);
     $expected = [
       'command' => 'closeDialog',
@@ -517,7 +517,7 @@ public function testCloseDialogCommand() {
   /**
    * @covers \Drupal\Core\Ajax\SetDialogOptionCommand
    */
-  public function testSetDialogOptionCommand() {
+  public function testSetDialogOptionCommand(): void {
     $command = new SetDialogOptionCommand('#some-dialog', 'width', '500');
     $expected = [
       'command' => 'setDialogOption',
@@ -532,7 +532,7 @@ public function testSetDialogOptionCommand() {
   /**
    * @covers \Drupal\Core\Ajax\SetDialogTitleCommand
    */
-  public function testSetDialogTitleCommand() {
+  public function testSetDialogTitleCommand(): void {
     $command = new SetDialogTitleCommand('#some-dialog', 'Example');
     $expected = [
       'command' => 'setDialogOption',
@@ -547,7 +547,7 @@ public function testSetDialogTitleCommand() {
   /**
    * @covers \Drupal\Core\Ajax\RedirectCommand
    */
-  public function testRedirectCommand() {
+  public function testRedirectCommand(): void {
     $command = new RedirectCommand('http://example.com');
     $expected = [
       'command' => 'redirect',
@@ -560,7 +560,7 @@ public function testRedirectCommand() {
   /**
    * @covers \Drupal\Core\Ajax\UpdateBuildIdCommand
    */
-  public function testUpdateBuildIdCommand() {
+  public function testUpdateBuildIdCommand(): void {
     $old = 'ThisStringIsOld';
     $new = 'ThisStringIsNew';
     $command = new UpdateBuildIdCommand($old, $new);
diff --git a/core/tests/Drupal/Tests/Core/Ajax/AjaxResponseTest.php b/core/tests/Drupal/Tests/Core/Ajax/AjaxResponseTest.php
index ac17d0765091..ab5fce6d191c 100644
--- a/core/tests/Drupal/Tests/Core/Ajax/AjaxResponseTest.php
+++ b/core/tests/Drupal/Tests/Core/Ajax/AjaxResponseTest.php
@@ -39,7 +39,7 @@ protected function setUp(): void {
    * @see \Drupal\Core\Ajax\AjaxResponse::addCommand()
    * @see \Drupal\Core\Ajax\AjaxResponse::getCommands()
    */
-  public function testCommands() {
+  public function testCommands(): void {
     $command_one = $this->createMock('Drupal\Core\Ajax\CommandInterface');
     $command_one->expects($this->once())
       ->method('render')
@@ -79,7 +79,7 @@ public function testCommands() {
    *
    * @cover ::prepareResponse
    */
-  public function testPrepareResponseForIeFormRequestsWithFileUpload() {
+  public function testPrepareResponseForIeFormRequestsWithFileUpload(): void {
     $request = Request::create('/example', 'POST');
     $request->headers->set('Accept', 'text/html');
     $response = new AjaxResponse([]);
diff --git a/core/tests/Drupal/Tests/Core/Ajax/OpenOffCanvasDialogCommandTest.php b/core/tests/Drupal/Tests/Core/Ajax/OpenOffCanvasDialogCommandTest.php
index 1ad22f8905f4..5065b543e9f9 100644
--- a/core/tests/Drupal/Tests/Core/Ajax/OpenOffCanvasDialogCommandTest.php
+++ b/core/tests/Drupal/Tests/Core/Ajax/OpenOffCanvasDialogCommandTest.php
@@ -18,7 +18,7 @@ class OpenOffCanvasDialogCommandTest extends UnitTestCase {
    *
    * @dataProvider dialogPosition
    */
-  public function testRender($position) {
+  public function testRender($position): void {
     $command = new OpenOffCanvasDialogCommand('Title', '<p>Text!</p>', ['url' => 'example'], NULL, $position);
 
     $expected = [
diff --git a/core/tests/Drupal/Tests/Core/Annotation/PluralTranslationTest.php b/core/tests/Drupal/Tests/Core/Annotation/PluralTranslationTest.php
index 48ef55692719..9e8d98240bd3 100644
--- a/core/tests/Drupal/Tests/Core/Annotation/PluralTranslationTest.php
+++ b/core/tests/Drupal/Tests/Core/Annotation/PluralTranslationTest.php
@@ -19,7 +19,7 @@ class PluralTranslationTest extends UnitTestCase {
    *
    * @dataProvider providerTestGet
    */
-  public function testGet(array $values) {
+  public function testGet(array $values): void {
     $annotation = new PluralTranslation($values);
 
     $default_values = [
@@ -53,7 +53,7 @@ public static function providerTestGet() {
   /**
    * @dataProvider providerTestMissingData
    */
-  public function testMissingData($data) {
+  public function testMissingData($data): void {
     $this->expectException(\InvalidArgumentException::class);
     new PluralTranslation($data);
   }
diff --git a/core/tests/Drupal/Tests/Core/Annotation/TranslationTest.php b/core/tests/Drupal/Tests/Core/Annotation/TranslationTest.php
index 2a6e79aa48ad..c8b355d72b8c 100644
--- a/core/tests/Drupal/Tests/Core/Annotation/TranslationTest.php
+++ b/core/tests/Drupal/Tests/Core/Annotation/TranslationTest.php
@@ -36,7 +36,7 @@ protected function setUp(): void {
    *
    * @dataProvider providerTestGet
    */
-  public function testGet(array $values, $expected) {
+  public function testGet(array $values, $expected): void {
     $container = new ContainerBuilder();
     $container->set('string_translation', $this->translationManager);
     \Drupal::setContainer($container);
diff --git a/core/tests/Drupal/Tests/Core/Asset/AssetResolverTest.php b/core/tests/Drupal/Tests/Core/Asset/AssetResolverTest.php
index 9a23e5d7cac7..d5e2190439a5 100644
--- a/core/tests/Drupal/Tests/Core/Asset/AssetResolverTest.php
+++ b/core/tests/Drupal/Tests/Core/Asset/AssetResolverTest.php
@@ -168,7 +168,7 @@ protected function setUp(): void {
    * @covers ::getCssAssets
    * @dataProvider providerAttachedCssAssets
    */
-  public function testGetCssAssets(AttachedAssetsInterface $assets_a, AttachedAssetsInterface $assets_b, $expected_css_cache_item_count) {
+  public function testGetCssAssets(AttachedAssetsInterface $assets_a, AttachedAssetsInterface $assets_b, $expected_css_cache_item_count): void {
     $this->libraryDiscovery->expects($this->any())
       ->method('getLibraryByName')
       ->willReturnOnConsecutiveCalls(
@@ -203,7 +203,7 @@ public static function providerAttachedCssAssets() {
    * @covers ::getJsAssets
    * @dataProvider providerAttachedJsAssets
    */
-  public function testGetJsAssets(AttachedAssetsInterface $assets_a, AttachedAssetsInterface $assets_b, $expected_js_cache_item_count, $expected_multilingual_js_cache_item_count) {
+  public function testGetJsAssets(AttachedAssetsInterface $assets_a, AttachedAssetsInterface $assets_b, $expected_js_cache_item_count, $expected_multilingual_js_cache_item_count): void {
     $this->libraryDiscovery->expects($this->any())
       ->method('getLibraryByName')
       ->willReturnOnConsecutiveCalls(
diff --git a/core/tests/Drupal/Tests/Core/Asset/CssCollectionGrouperUnitTest.php b/core/tests/Drupal/Tests/Core/Asset/CssCollectionGrouperUnitTest.php
index 34adf3fe4974..adc8da35669f 100644
--- a/core/tests/Drupal/Tests/Core/Asset/CssCollectionGrouperUnitTest.php
+++ b/core/tests/Drupal/Tests/Core/Asset/CssCollectionGrouperUnitTest.php
@@ -33,7 +33,7 @@ protected function setUp(): void {
   /**
    * Tests \Drupal\Core\Asset\CssCollectionGrouper.
    */
-  public function testGrouper() {
+  public function testGrouper(): void {
     $css_assets = [
       'system.base.css' => [
         'group' => -100,
diff --git a/core/tests/Drupal/Tests/Core/Asset/CssCollectionRendererUnitTest.php b/core/tests/Drupal/Tests/Core/Asset/CssCollectionRendererUnitTest.php
index 18fb5b7f7128..3c38cfbac805 100644
--- a/core/tests/Drupal/Tests/Core/Asset/CssCollectionRendererUnitTest.php
+++ b/core/tests/Drupal/Tests/Core/Asset/CssCollectionRendererUnitTest.php
@@ -280,14 +280,14 @@ public static function providerTestRender() {
    *
    * @dataProvider providerTestRender
    */
-  public function testRender(array $css_assets, array $render_elements) {
+  public function testRender(array $css_assets, array $render_elements): void {
     $this->assertSame($render_elements, $this->renderer->render($css_assets));
   }
 
   /**
    * Tests a CSS asset group with the invalid 'type' => 'internal'.
    */
-  public function testRenderInvalidType() {
+  public function testRenderInvalidType(): void {
     $this->expectException('Exception');
     $this->expectExceptionMessage('Invalid CSS asset type.');
 
diff --git a/core/tests/Drupal/Tests/Core/Asset/CssOptimizerUnitTest.php b/core/tests/Drupal/Tests/Core/Asset/CssOptimizerUnitTest.php
index 985cc785f591..b61bd1e4b652 100644
--- a/core/tests/Drupal/Tests/Core/Asset/CssOptimizerUnitTest.php
+++ b/core/tests/Drupal/Tests/Core/Asset/CssOptimizerUnitTest.php
@@ -239,7 +239,7 @@ public static function providerTestOptimize() {
    *
    * @dataProvider providerTestOptimize
    */
-  public function testOptimize($css_asset, $expected) {
+  public function testOptimize($css_asset, $expected): void {
     global $base_path;
     $original_base_path = $base_path;
     $base_path = '/';
@@ -252,7 +252,7 @@ public function testOptimize($css_asset, $expected) {
   /**
    * Tests a file CSS asset with preprocessing disabled.
    */
-  public function testTypeFilePreprocessingDisabled() {
+  public function testTypeFilePreprocessingDisabled(): void {
     $this->expectException('Exception');
     $this->expectExceptionMessage('Only file CSS assets with preprocessing enabled can be optimized.');
 
@@ -272,7 +272,7 @@ public function testTypeFilePreprocessingDisabled() {
   /**
    * Tests a CSS asset with 'type' => 'external'.
    */
-  public function testTypeExternal() {
+  public function testTypeExternal(): void {
     $this->expectException('Exception');
     $this->expectExceptionMessage('Only file CSS assets can be optimized.');
 
diff --git a/core/tests/Drupal/Tests/Core/Asset/JsOptimizerUnitTest.php b/core/tests/Drupal/Tests/Core/Asset/JsOptimizerUnitTest.php
index e1da45e626a2..6a6b3f80e8a7 100644
--- a/core/tests/Drupal/Tests/Core/Asset/JsOptimizerUnitTest.php
+++ b/core/tests/Drupal/Tests/Core/Asset/JsOptimizerUnitTest.php
@@ -73,7 +73,7 @@ public static function providerTestClean() {
    *
    * @dataProvider providerTestClean
    */
-  public function testClean($js_asset, $expected) {
+  public function testClean($js_asset, $expected): void {
     $this->assertEquals($expected, $this->optimizer->clean($js_asset));
   }
 
@@ -139,7 +139,7 @@ public static function providerTestOptimize() {
    *
    * @dataProvider providerTestOptimize
    */
-  public function testOptimize($js_asset, $expected) {
+  public function testOptimize($js_asset, $expected): void {
     $this->assertEquals($expected, $this->optimizer->optimize($js_asset));
   }
 
diff --git a/core/tests/Drupal/Tests/Core/Asset/LibrariesDirectoryFileFinderTest.php b/core/tests/Drupal/Tests/Core/Asset/LibrariesDirectoryFileFinderTest.php
index bf3a7f02d83f..ad175404a960 100644
--- a/core/tests/Drupal/Tests/Core/Asset/LibrariesDirectoryFileFinderTest.php
+++ b/core/tests/Drupal/Tests/Core/Asset/LibrariesDirectoryFileFinderTest.php
@@ -18,7 +18,7 @@ class LibrariesDirectoryFileFinderTest extends UnitTestCase {
   /**
    * @covers ::find
    */
-  public function testFind() {
+  public function testFind(): void {
     // Place a library file in all the possible locations.
     $structure = [
       'sites' => [
diff --git a/core/tests/Drupal/Tests/Core/Asset/LibraryDependencyResolverTest.php b/core/tests/Drupal/Tests/Core/Asset/LibraryDependencyResolverTest.php
index 705461e915e0..fa65a72ff514 100644
--- a/core/tests/Drupal/Tests/Core/Asset/LibraryDependencyResolverTest.php
+++ b/core/tests/Drupal/Tests/Core/Asset/LibraryDependencyResolverTest.php
@@ -118,7 +118,7 @@ public static function providerTestGetLibrariesWithDependencies() {
    *
    * @dataProvider providerTestGetLibrariesWithDependencies
    */
-  public function testGetLibrariesWithDependencies(array $libraries, array $expected) {
+  public function testGetLibrariesWithDependencies(array $libraries, array $expected): void {
     $this->assertEquals($expected, $this->libraryDependencyResolver->getLibrariesWithDependencies($libraries));
   }
 
@@ -172,14 +172,14 @@ public static function providerTestGetMinimalRepresentativeSubset() {
    *
    * @dataProvider providerTestGetMinimalRepresentativeSubset
    */
-  public function testGetMinimalRepresentativeSubset(array $libraries, array $expected) {
+  public function testGetMinimalRepresentativeSubset(array $libraries, array $expected): void {
     $this->assertEquals($expected, $this->libraryDependencyResolver->getMinimalRepresentativeSubset($libraries));
   }
 
   /**
    * @covers ::getMinimalRepresentativeSubset
    */
-  public function testGetMinimalRepresentativeSubsetInvalidInput() {
+  public function testGetMinimalRepresentativeSubsetInvalidInput(): void {
     $this->expectException(\AssertionError::class);
     $this->expectExceptionMessage('$libraries can\'t contain duplicate items.');
     $this->libraryDependencyResolver->getMinimalRepresentativeSubset(['test/no_deps_a', 'test/no_deps_a']);
diff --git a/core/tests/Drupal/Tests/Core/Asset/LibraryDiscoveryCollectorTest.php b/core/tests/Drupal/Tests/Core/Asset/LibraryDiscoveryCollectorTest.php
index 5528ca294fb6..cecf44fc3b4e 100644
--- a/core/tests/Drupal/Tests/Core/Asset/LibraryDiscoveryCollectorTest.php
+++ b/core/tests/Drupal/Tests/Core/Asset/LibraryDiscoveryCollectorTest.php
@@ -106,7 +106,7 @@ protected function setUp(): void {
    *
    * @covers ::resolveCacheMiss
    */
-  public function testResolveCacheMiss() {
+  public function testResolveCacheMiss(): void {
     $this->activeTheme = $this->getMockBuilder(ActiveTheme::class)
       ->disableOriginalConstructor()
       ->getMock();
@@ -132,7 +132,7 @@ public function testResolveCacheMiss() {
    *
    * @covers ::destruct
    */
-  public function testDestruct() {
+  public function testDestruct(): void {
     $this->activeTheme = $this->getMockBuilder(ActiveTheme::class)
       ->disableOriginalConstructor()
       ->getMock();
@@ -176,7 +176,7 @@ public function testDestruct() {
    *
    * @covers ::applyLibrariesExtend
    */
-  public function testLibrariesExtend() {
+  public function testLibrariesExtend(): void {
     $this->activeTheme = $this->getMockBuilder(ActiveTheme::class)
       ->disableOriginalConstructor()
       ->getMock();
@@ -221,7 +221,7 @@ public function testLibrariesExtend() {
    *
    * @group legacy
    */
-  public function testLibrariesExtendDeprecated() {
+  public function testLibrariesExtendDeprecated(): void {
     $this->expectDeprecation('Theme "test" is extending a deprecated library. The "test/test_4" asset library is deprecated in drupal:X.0.0 and is removed from drupal:Y.0.0. Use the test_3 library instead. See https://www.example.com');
     $this->activeTheme = $this->getMockBuilder(ActiveTheme::class)
       ->disableOriginalConstructor()
diff --git a/core/tests/Drupal/Tests/Core/Asset/LibraryDiscoveryParserTest.php b/core/tests/Drupal/Tests/Core/Asset/LibraryDiscoveryParserTest.php
index 67b440fb2f9e..13ba2d41ad3e 100644
--- a/core/tests/Drupal/Tests/Core/Asset/LibraryDiscoveryParserTest.php
+++ b/core/tests/Drupal/Tests/Core/Asset/LibraryDiscoveryParserTest.php
@@ -124,7 +124,7 @@ protected function setUp(): void {
    *
    * @runInSeparateProcess
    */
-  public function testBuildByExtensionSimple() {
+  public function testBuildByExtensionSimple(): void {
     FileCacheFactory::setPrefix('testing');
     // Use the default file cache configuration.
     FileCacheFactory::setConfiguration([
@@ -164,7 +164,7 @@ public function testBuildByExtensionSimple() {
    *
    * @covers ::buildByExtension
    */
-  public function testBuildByExtensionWithTheme() {
+  public function testBuildByExtensionWithTheme(): void {
     $this->moduleHandler->expects($this->atLeastOnce())
       ->method('moduleExists')
       ->with('example_theme')
@@ -191,7 +191,7 @@ public function testBuildByExtensionWithTheme() {
    *
    * @covers ::buildByExtension
    */
-  public function testBuildByExtensionWithMissingLibraryFile() {
+  public function testBuildByExtensionWithMissingLibraryFile(): void {
     $this->moduleHandler->expects($this->atLeastOnce())
       ->method('moduleExists')
       ->with('example_module')
@@ -212,7 +212,7 @@ public function testBuildByExtensionWithMissingLibraryFile() {
    *
    * @covers ::buildByExtension
    */
-  public function testInvalidLibrariesFile() {
+  public function testInvalidLibrariesFile(): void {
     $this->moduleHandler->expects($this->atLeastOnce())
       ->method('moduleExists')
       ->with('invalid_file')
@@ -234,7 +234,7 @@ public function testInvalidLibrariesFile() {
    *
    * @covers ::buildByExtension
    */
-  public function testBuildByExtensionWithOnlyDependencies() {
+  public function testBuildByExtensionWithOnlyDependencies(): void {
     $this->moduleHandler->expects($this->atLeastOnce())
       ->method('moduleExists')
       ->with('example_module_only_dependencies')
@@ -256,7 +256,7 @@ public function testBuildByExtensionWithOnlyDependencies() {
    *
    * @covers ::buildByExtension
    */
-  public function testBuildByExtensionWithMissingInformation() {
+  public function testBuildByExtensionWithMissingInformation(): void {
     $this->moduleHandler->expects($this->atLeastOnce())
       ->method('moduleExists')
       ->with('example_module_missing_information')
@@ -279,7 +279,7 @@ public function testBuildByExtensionWithMissingInformation() {
    *
    * @covers ::buildByExtension
    */
-  public function testVersion() {
+  public function testVersion(): void {
     $this->moduleHandler->expects($this->atLeastOnce())
       ->method('moduleExists')
       ->with('versions')
@@ -312,7 +312,7 @@ public function testVersion() {
    *
    * @covers ::buildByExtension
    */
-  public function testExternalLibraries() {
+  public function testExternalLibraries(): void {
     $this->moduleHandler->expects($this->atLeastOnce())
       ->method('moduleExists')
       ->with('external')
@@ -338,7 +338,7 @@ public function testExternalLibraries() {
    *
    * @covers ::buildByExtension
    */
-  public function testDefaultCssWeights() {
+  public function testDefaultCssWeights(): void {
     $this->moduleHandler->expects($this->atLeastOnce())
       ->method('moduleExists')
       ->with('css_weights')
@@ -379,7 +379,7 @@ public function testDefaultCssWeights() {
    *
    * @covers ::buildByExtension
    */
-  public function testJsWithPositiveWeight() {
+  public function testJsWithPositiveWeight(): void {
     $this->moduleHandler->expects($this->atLeastOnce())
       ->method('moduleExists')
       ->with('js_positive_weight')
@@ -401,7 +401,7 @@ public function testJsWithPositiveWeight() {
    *
    * @covers ::buildByExtension
    */
-  public function testLibraryWithCssJsSetting() {
+  public function testLibraryWithCssJsSetting(): void {
     $this->moduleHandler->expects($this->atLeastOnce())
       ->method('moduleExists')
       ->with('css_js_settings')
@@ -434,7 +434,7 @@ public function testLibraryWithCssJsSetting() {
    *
    * @covers ::buildByExtension
    */
-  public function testLibraryWithDependencies() {
+  public function testLibraryWithDependencies(): void {
     $this->moduleHandler->expects($this->atLeastOnce())
       ->method('moduleExists')
       ->with('dependencies')
@@ -460,7 +460,7 @@ public function testLibraryWithDependencies() {
    *
    * @covers ::buildByExtension
    */
-  public function testLibraryWithDataTypes() {
+  public function testLibraryWithDataTypes(): void {
     $this->moduleHandler->expects($this->atLeastOnce())
       ->method('moduleExists')
       ->with('data_types')
@@ -498,7 +498,7 @@ public function testLibraryWithDataTypes() {
    *
    * @covers ::buildByExtension
    */
-  public function testLibraryWithJavaScript() {
+  public function testLibraryWithJavaScript(): void {
     $this->moduleHandler->expects($this->atLeastOnce())
       ->method('moduleExists')
       ->with('js')
@@ -524,7 +524,7 @@ public function testLibraryWithJavaScript() {
    *
    * @covers ::buildByExtension
    */
-  public function testLibraryThirdPartyWithMissingLicense() {
+  public function testLibraryThirdPartyWithMissingLicense(): void {
     $this->moduleHandler->expects($this->atLeastOnce())
       ->method('moduleExists')
       ->with('licenses_missing_information')
@@ -547,7 +547,7 @@ public function testLibraryThirdPartyWithMissingLicense() {
    *
    * @covers ::buildByExtension
    */
-  public function testLibraryWithLicenses() {
+  public function testLibraryWithLicenses(): void {
     $this->moduleHandler->expects($this->atLeastOnce())
       ->method('moduleExists')
       ->with('licenses')
@@ -634,7 +634,7 @@ public function testLibraryWithLicenses() {
    *
    * @covers ::applyLibrariesOverride
    */
-  public function testLibraryOverride() {
+  public function testLibraryOverride(): void {
     $mock_theme_path = 'mocked_themes/kittens';
     $this->themeManager = $this->createMock(ThemeManagerInterface::class);
     $this->activeTheme = $this->getMockBuilder(ActiveTheme::class)
@@ -689,7 +689,7 @@ public function testLibraryOverride() {
    *
    * @group legacy
    */
-  public function testLibraryOverrideDeprecated() {
+  public function testLibraryOverrideDeprecated(): void {
     $this->expectDeprecation('Theme "deprecated" is overriding a deprecated library. The "deprecated/deprecated" asset library is deprecated in drupal:X.0.0 and is removed from drupal:Y.0.0. Use another library instead. See https://www.example.com');
     $mock_theme_path = 'mocked_themes/kittens';
     $this->themeManager = $this->createMock(ThemeManagerInterface::class);
@@ -746,7 +746,7 @@ public function testLibraryOverrideDeprecated() {
    *
    * @dataProvider providerTestCssAssert
    */
-  public function testCssAssert($extension, $exception_message) {
+  public function testCssAssert($extension, $exception_message): void {
     $this->moduleHandler->expects($this->atLeastOnce())
       ->method('moduleExists')
       ->with($extension)
@@ -778,7 +778,7 @@ public static function providerTestCssAssert() {
   /**
    * @covers ::buildByExtension
    */
-  public function testNonCoreLibrariesFound() {
+  public function testNonCoreLibrariesFound(): void {
     $this->moduleHandler->expects($this->atLeastOnce())
       ->method('moduleExists')
       ->with('example_contrib_module')
@@ -809,7 +809,7 @@ public function testNonCoreLibrariesFound() {
   /**
    * @covers ::buildByExtension
    */
-  public function testNonCoreLibrariesNotFound() {
+  public function testNonCoreLibrariesNotFound(): void {
     $this->moduleHandler->expects($this->atLeastOnce())
       ->method('moduleExists')
       ->with('example_contrib_module')
@@ -844,7 +844,7 @@ public function testNonCoreLibrariesNotFound() {
   /**
    * @covers ::parseLibraryInfo
    */
-  public function testEmptyLibraryFile() {
+  public function testEmptyLibraryFile(): void {
     $this->moduleHandler->expects($this->atLeastOnce())
       ->method('moduleExists')
       ->with('empty')
diff --git a/core/tests/Drupal/Tests/Core/Asset/LibraryDiscoveryTest.php b/core/tests/Drupal/Tests/Core/Asset/LibraryDiscoveryTest.php
index 72bc4add577d..a10dac0d043a 100644
--- a/core/tests/Drupal/Tests/Core/Asset/LibraryDiscoveryTest.php
+++ b/core/tests/Drupal/Tests/Core/Asset/LibraryDiscoveryTest.php
@@ -81,7 +81,7 @@ protected function setUp(): void {
   /**
    * @covers ::getLibrariesByExtension
    */
-  public function testGetLibrariesByExtension() {
+  public function testGetLibrariesByExtension(): void {
     $this->libraryDiscovery->getLibrariesByExtension('test');
     // Verify that subsequent calls don't trigger hook_library_info_alter()
     // and hook_js_settings_alter() invocations, nor do they talk to the
@@ -97,14 +97,14 @@ public function testGetLibrariesByExtension() {
    *
    * @covers ::getLibraryByName
    */
-  public function testGetLibraryByName() {
+  public function testGetLibraryByName(): void {
     $this->assertSame($this->libraryData['test_1'], $this->libraryDiscovery->getLibraryByName('test', 'test_1'));
   }
 
   /**
    * Tests getting a deprecated library.
    */
-  public function testAssetLibraryDeprecation() {
+  public function testAssetLibraryDeprecation(): void {
     $previous_error_handler = set_error_handler(function ($severity, $message, $file, $line) use (&$previous_error_handler) {
       // Convert deprecation error into a catchable exception.
       if ($severity === E_USER_DEPRECATED) {
diff --git a/core/tests/Drupal/Tests/Core/Authentication/AuthenticationCollectorTest.php b/core/tests/Drupal/Tests/Core/Authentication/AuthenticationCollectorTest.php
index 9f19efe1113e..0a6d68a3aad2 100644
--- a/core/tests/Drupal/Tests/Core/Authentication/AuthenticationCollectorTest.php
+++ b/core/tests/Drupal/Tests/Core/Authentication/AuthenticationCollectorTest.php
@@ -23,7 +23,7 @@ class AuthenticationCollectorTest extends UnitTestCase {
    * @covers ::getProvider
    * @covers ::isGlobal
    */
-  public function testAuthenticationCollector() {
+  public function testAuthenticationCollector(): void {
     $providers = [];
     $global = [];
     $authentication_collector = new AuthenticationCollector();
diff --git a/core/tests/Drupal/Tests/Core/Authentication/AuthenticationManagerTest.php b/core/tests/Drupal/Tests/Core/Authentication/AuthenticationManagerTest.php
index c988388f73d2..0bfc70450d00 100644
--- a/core/tests/Drupal/Tests/Core/Authentication/AuthenticationManagerTest.php
+++ b/core/tests/Drupal/Tests/Core/Authentication/AuthenticationManagerTest.php
@@ -25,7 +25,7 @@ class AuthenticationManagerTest extends UnitTestCase {
    *
    * @dataProvider providerTestDefaultFilter
    */
-  public function testDefaultFilter($applies, $has_route, $auth_option, $provider_id, $global) {
+  public function testDefaultFilter($applies, $has_route, $auth_option, $provider_id, $global): void {
     $auth_provider = $this->createMock('Drupal\Core\Authentication\AuthenticationProviderInterface');
     $auth_collector = new AuthenticationCollector();
     $auth_collector->addProvider($auth_provider, $provider_id, 0, $global);
@@ -46,7 +46,7 @@ public function testDefaultFilter($applies, $has_route, $auth_option, $provider_
   /**
    * @covers ::applyFilter
    */
-  public function testApplyFilterWithFilterProvider() {
+  public function testApplyFilterWithFilterProvider(): void {
     $auth_provider = $this->createMock('Drupal\Tests\Core\Authentication\TestAuthenticationProviderInterface');
     $auth_provider->expects($this->once())
       ->method('appliesToRoutedRequest')
diff --git a/core/tests/Drupal/Tests/Core/Batch/BatchBuilderTest.php b/core/tests/Drupal/Tests/Core/Batch/BatchBuilderTest.php
index 5971692a116b..757a5c50660e 100644
--- a/core/tests/Drupal/Tests/Core/Batch/BatchBuilderTest.php
+++ b/core/tests/Drupal/Tests/Core/Batch/BatchBuilderTest.php
@@ -22,7 +22,7 @@ class BatchBuilderTest extends UnitTestCase {
    *
    * @covers ::toArray
    */
-  public function testDefaultValues() {
+  public function testDefaultValues(): void {
     $batch = (new BatchBuilder())->toArray();
 
     $this->assertIsArray($batch);
@@ -51,7 +51,7 @@ public function testDefaultValues() {
    *
    * @covers ::setTitle
    */
-  public function testSetTitle() {
+  public function testSetTitle(): void {
     $batch = (new BatchBuilder())
       ->setTitle(new TranslatableMarkup('New Title'))
       ->toArray();
@@ -64,7 +64,7 @@ public function testSetTitle() {
    *
    * @covers ::setFinishCallback
    */
-  public function testSetFinishCallback() {
+  public function testSetFinishCallback(): void {
     $batch = (new BatchBuilder())
       ->setFinishCallback('\Drupal\Tests\Core\Batch\BatchBuilderTest::finishedCallback')
       ->toArray();
@@ -77,7 +77,7 @@ public function testSetFinishCallback() {
    *
    * @covers ::setInitMessage
    */
-  public function testSetInitMessage() {
+  public function testSetInitMessage(): void {
     $batch = (new BatchBuilder())
       ->setInitMessage(new TranslatableMarkup('New initialization message.'))
       ->toArray();
@@ -90,7 +90,7 @@ public function testSetInitMessage() {
    *
    * @covers ::setProgressMessage
    */
-  public function testSetProgressMessage() {
+  public function testSetProgressMessage(): void {
     $batch = (new BatchBuilder())
       ->setProgressMessage(new TranslatableMarkup('Batch in progress...'))
       ->toArray();
@@ -101,7 +101,7 @@ public function testSetProgressMessage() {
   /**
    * Tests setErrorMessage().
    */
-  public function testSetErrorMessage() {
+  public function testSetErrorMessage(): void {
     $batch = (new BatchBuilder())
       ->setErrorMessage(new TranslatableMarkup('Oops. An error has occurred :('))
       ->toArray();
@@ -114,7 +114,7 @@ public function testSetErrorMessage() {
    *
    * @covers ::setFile
    */
-  public function testSetFile() {
+  public function testSetFile(): void {
     $filename = dirname(__DIR__, 6) . '/core/modules/system/tests/modules/batch_test/batch_test.callbacks.inc';
     $this->assertIsNotCallable('_batch_test_callback_1');
     $this->assertIsNotCallable('_batch_test_finished_1');
@@ -136,7 +136,7 @@ public function testSetFile() {
    *
    * @covers ::setLibraries
    */
-  public function testAddingLibraries() {
+  public function testAddingLibraries(): void {
     $batch = (new BatchBuilder())
       ->setLibraries(['only/library'])
       ->toArray();
@@ -149,7 +149,7 @@ public function testAddingLibraries() {
    *
    * @covers ::setProgressive
    */
-  public function testSetProgressive() {
+  public function testSetProgressive(): void {
     $batch_builder = new BatchBuilder();
     $batch = $batch_builder
       ->setProgressive(FALSE)
@@ -169,7 +169,7 @@ public function testSetProgressive() {
    *
    * @covers ::setQueue
    */
-  public function testSetQueue() {
+  public function testSetQueue(): void {
     $batch = (new BatchBuilder())
       ->setQueue('BatchName', '\Drupal\Core\Queue\Batch')
       ->toArray();
@@ -185,7 +185,7 @@ public function testSetQueue() {
    *
    * @covers ::setQueue
    */
-  public function testQueueExists() {
+  public function testQueueExists(): void {
     $batch_builder = (new BatchBuilder());
     $this->expectException(\InvalidArgumentException::class);
     $this->expectExceptionMessage('Class \ThisIsNotAClass does not exist.');
@@ -197,7 +197,7 @@ public function testQueueExists() {
    *
    * @covers ::setQueue
    */
-  public function testQueueImplements() {
+  public function testQueueImplements(): void {
     $batch_builder = (new BatchBuilder());
     $this->expectException(\InvalidArgumentException::class);
     $this->expectExceptionMessage('Class Exception does not implement \Drupal\Core\Queue\QueueInterface.');
@@ -209,7 +209,7 @@ public function testQueueImplements() {
    *
    * @covers ::setUrlOptions
    */
-  public function testSetUrlOptions() {
+  public function testSetUrlOptions(): void {
     $options = [
       'absolute' => TRUE,
       'language' => 'de',
@@ -226,7 +226,7 @@ public function testSetUrlOptions() {
    *
    * @covers ::addOperation
    */
-  public function testAddOperation() {
+  public function testAddOperation(): void {
     $batch_builder = new BatchBuilder();
     $batch = $batch_builder
       ->addOperation('\Drupal\Tests\Core\Batch\BatchBuilderTest::operationCallback')
diff --git a/core/tests/Drupal/Tests/Core/Batch/PercentagesTest.php b/core/tests/Drupal/Tests/Core/Batch/PercentagesTest.php
index 2cfa82644424..afd9b1f1dbe4 100644
--- a/core/tests/Drupal/Tests/Core/Batch/PercentagesTest.php
+++ b/core/tests/Drupal/Tests/Core/Batch/PercentagesTest.php
@@ -22,7 +22,7 @@ class PercentagesTest extends UnitTestCase {
    * @dataProvider providerTestPercentages
    * @covers ::format
    */
-  public function testPercentages($total, $current, $expected_result) {
+  public function testPercentages($total, $current, $expected_result): void {
     $actual_result = Percentage::format($total, $current);
     $this->assertEquals($actual_result, $expected_result, sprintf('The expected the batch api percentage at the state %s/%s is %s%% and got %s%%.', $current, $total, $expected_result, $actual_result));
   }
diff --git a/core/tests/Drupal/Tests/Core/Block/BlockBaseTest.php b/core/tests/Drupal/Tests/Core/Block/BlockBaseTest.php
index 5d4d2cbf4e11..4775100e59cf 100644
--- a/core/tests/Drupal/Tests/Core/Block/BlockBaseTest.php
+++ b/core/tests/Drupal/Tests/Core/Block/BlockBaseTest.php
@@ -27,7 +27,7 @@ class BlockBaseTest extends UnitTestCase {
    *
    * @dataProvider providerTestGetMachineNameSuggestion
    */
-  public function testGetMachineNameSuggestion($label, $expected) {
+  public function testGetMachineNameSuggestion($label, $expected): void {
     $module_handler = $this->createMock('Drupal\Core\Extension\ModuleHandlerInterface');
     $transliteration = $this->getMockBuilder('Drupal\Core\Transliteration\PhpTransliteration')
       ->setConstructorArgs([NULL, $module_handler])
diff --git a/core/tests/Drupal/Tests/Core/Block/BlockManagerTest.php b/core/tests/Drupal/Tests/Core/Block/BlockManagerTest.php
index dc993a5faadd..d11b3b8a001f 100644
--- a/core/tests/Drupal/Tests/Core/Block/BlockManagerTest.php
+++ b/core/tests/Drupal/Tests/Core/Block/BlockManagerTest.php
@@ -87,7 +87,7 @@ protected function setUp(): void {
   /**
    * @covers ::getDefinitions
    */
-  public function testDefinitions() {
+  public function testDefinitions(): void {
     $definitions = $this->blockManager->getDefinitions();
     $this->assertSame(['broken', 'block1', 'block2', 'block3'], array_keys($definitions));
   }
@@ -95,7 +95,7 @@ public function testDefinitions() {
   /**
    * @covers ::getSortedDefinitions
    */
-  public function testSortedDefinitions() {
+  public function testSortedDefinitions(): void {
     $definitions = $this->blockManager->getSortedDefinitions();
     $this->assertSame(['block2', 'block3', 'block1'], array_keys($definitions));
   }
@@ -103,7 +103,7 @@ public function testSortedDefinitions() {
   /**
    * @covers ::getGroupedDefinitions
    */
-  public function testGroupedDefinitions() {
+  public function testGroupedDefinitions(): void {
     $definitions = $this->blockManager->getGroupedDefinitions();
     $this->assertSame(['Group 1', 'Group 2'], array_keys($definitions));
     $this->assertSame(['block2'], array_keys($definitions['Group 1']));
@@ -113,7 +113,7 @@ public function testGroupedDefinitions() {
   /**
    * @covers ::handlePluginNotFound
    */
-  public function testHandlePluginNotFound() {
+  public function testHandlePluginNotFound(): void {
     $this->logger->warning('The "%plugin_id" was not found', ['%plugin_id' => 'invalid'])->shouldBeCalled();
     $plugin = $this->blockManager->createInstance('invalid');
     $this->assertSame('broken', $plugin->getPluginId());
diff --git a/core/tests/Drupal/Tests/Core/Breadcrumb/BreadcrumbManagerTest.php b/core/tests/Drupal/Tests/Core/Breadcrumb/BreadcrumbManagerTest.php
index 579a7168636f..92054fedc723 100644
--- a/core/tests/Drupal/Tests/Core/Breadcrumb/BreadcrumbManagerTest.php
+++ b/core/tests/Drupal/Tests/Core/Breadcrumb/BreadcrumbManagerTest.php
@@ -66,7 +66,7 @@ protected function setUp(): void {
   /**
    * Tests the breadcrumb manager without any set breadcrumb.
    */
-  public function testBuildWithoutBuilder() {
+  public function testBuildWithoutBuilder(): void {
     $route_match = $this->createMock('Drupal\Core\Routing\RouteMatchInterface');
     $this->moduleHandler->expects($this->once())
       ->method('alter')
@@ -82,7 +82,7 @@ public function testBuildWithoutBuilder() {
   /**
    * Tests the build method with a single breadcrumb builder.
    */
-  public function testBuildWithSingleBuilder() {
+  public function testBuildWithSingleBuilder(): void {
     $builder = $this->createMock('Drupal\Core\Breadcrumb\BreadcrumbBuilderInterface');
     $links = ['<a href="/example">Test</a>'];
     $this->breadcrumb->setLinks($links);
@@ -113,7 +113,7 @@ public function testBuildWithSingleBuilder() {
   /**
    * Tests multiple breadcrumb builder with different priority.
    */
-  public function testBuildWithMultipleApplyingBuilders() {
+  public function testBuildWithMultipleApplyingBuilders(): void {
     $builder1 = $this->createMock('Drupal\Core\Breadcrumb\BreadcrumbBuilderInterface');
     $builder1->expects($this->never())
       ->method('applies');
@@ -150,7 +150,7 @@ public function testBuildWithMultipleApplyingBuilders() {
   /**
    * Tests multiple breadcrumb builders of which one returns NULL.
    */
-  public function testBuildWithOneNotApplyingBuilders() {
+  public function testBuildWithOneNotApplyingBuilders(): void {
     $builder1 = $this->createMock('Drupal\Core\Breadcrumb\BreadcrumbBuilderInterface');
     $builder1->expects($this->once())
       ->method('applies')
@@ -188,7 +188,7 @@ public function testBuildWithOneNotApplyingBuilders() {
   /**
    * Tests a breadcrumb builder with a bad return value.
    */
-  public function testBuildWithInvalidBreadcrumbResult() {
+  public function testBuildWithInvalidBreadcrumbResult(): void {
     $builder = $this->createMock('Drupal\Core\Breadcrumb\BreadcrumbBuilderInterface');
     $builder->expects($this->once())
       ->method('applies')
diff --git a/core/tests/Drupal/Tests/Core/Breadcrumb/BreadcrumbTest.php b/core/tests/Drupal/Tests/Core/Breadcrumb/BreadcrumbTest.php
index c0f91db54a61..4932f17e9c93 100644
--- a/core/tests/Drupal/Tests/Core/Breadcrumb/BreadcrumbTest.php
+++ b/core/tests/Drupal/Tests/Core/Breadcrumb/BreadcrumbTest.php
@@ -18,7 +18,7 @@ class BreadcrumbTest extends UnitTestCase {
   /**
    * @covers ::setLinks
    */
-  public function testSetLinks() {
+  public function testSetLinks(): void {
     $breadcrumb = new Breadcrumb();
     $breadcrumb->setLinks([new Link('Home', Url::fromRoute('<front>'))]);
     $this->expectException(\LogicException::class);
diff --git a/core/tests/Drupal/Tests/Core/Cache/BackendChainImplementationUnitTest.php b/core/tests/Drupal/Tests/Core/Cache/BackendChainImplementationUnitTest.php
index 43e94f18d935..dd46ae78eb2c 100644
--- a/core/tests/Drupal/Tests/Core/Cache/BackendChainImplementationUnitTest.php
+++ b/core/tests/Drupal/Tests/Core/Cache/BackendChainImplementationUnitTest.php
@@ -90,7 +90,7 @@ protected function setUp(): void {
   /**
    * Tests the get feature.
    */
-  public function testGet() {
+  public function testGet(): void {
     $cached = $this->chain->get('t123');
     $this->assertNotFalse($cached, 'Got key that is on all backends');
     $this->assertSame(1231, $cached->data, 'Got the key from the backend 1');
@@ -107,7 +107,7 @@ public function testGet() {
   /**
    * Tests the get multiple feature.
    */
-  public function testGetMultiple() {
+  public function testGetMultiple(): void {
     $cids = ['t123', 't23', 't3', 't4'];
 
     $ret = $this->chain->getMultiple($cids);
@@ -125,7 +125,7 @@ public function testGetMultiple() {
   /**
    * Tests that set will propagate.
    */
-  public function testSet() {
+  public function testSet(): void {
     $this->chain->set('test', 123);
 
     $cached = $this->firstBackend->get('test');
@@ -144,7 +144,7 @@ public function testSet() {
   /**
    * Tests that delete will propagate.
    */
-  public function testDelete() {
+  public function testDelete(): void {
     $this->chain->set('test', 5);
 
     $cached = $this->firstBackend->get('test');
@@ -167,7 +167,7 @@ public function testDelete() {
   /**
    * Ensure get values propagation to previous backends.
    */
-  public function testGetHasPropagated() {
+  public function testGetHasPropagated(): void {
     $this->chain->get('t23');
     $cached = $this->firstBackend->get('t23');
     $this->assertNotFalse($cached, 'Test 2 has been propagated to the first backend');
@@ -182,7 +182,7 @@ public function testGetHasPropagated() {
   /**
    * Ensure get multiple values propagation to previous backends.
    */
-  public function testGetMultipleHasPropagated() {
+  public function testGetMultipleHasPropagated(): void {
     $cids = ['t3', 't23'];
     $this->chain->getMultiple($cids);
 
@@ -201,7 +201,7 @@ public function testGetMultipleHasPropagated() {
   /**
    * Tests that the delete all operation is propagated to all chained backends.
    */
-  public function testDeleteAllPropagation() {
+  public function testDeleteAllPropagation(): void {
     // Set both expiring and permanent keys.
     $this->chain->set('test1', 1, Cache::PERMANENT);
     $this->chain->set('test2', 3, time() + 1000);
@@ -218,7 +218,7 @@ public function testDeleteAllPropagation() {
   /**
    * Tests that the delete tags operation is propagated to all chained backends.
    */
-  public function testDeleteTagsPropagation() {
+  public function testDeleteTagsPropagation(): void {
     // Create two cache entries with the same tag and tag value.
     $this->chain->set('test_cid_clear1', 'foo', Cache::PERMANENT, ['test_tag:2']);
     $this->chain->set('test_cid_clear2', 'foo', Cache::PERMANENT, ['test_tag:2']);
@@ -294,7 +294,7 @@ public function testDeleteTagsPropagation() {
   /**
    * Tests that removing bin propagates to all backends.
    */
-  public function testRemoveBin() {
+  public function testRemoveBin(): void {
     $chain = new BackendChain();
     for ($i = 0; $i < 3; $i++) {
       $backend = $this->createMock('Drupal\Core\Cache\CacheBackendInterface');
diff --git a/core/tests/Drupal/Tests/Core/Cache/CacheCollectorTest.php b/core/tests/Drupal/Tests/Core/Cache/CacheCollectorTest.php
index fd7f06823913..a070a22f3d04 100644
--- a/core/tests/Drupal/Tests/Core/Cache/CacheCollectorTest.php
+++ b/core/tests/Drupal/Tests/Core/Cache/CacheCollectorTest.php
@@ -66,7 +66,7 @@ protected function setUp(): void {
   /**
    * Tests the resolve cache miss function.
    */
-  public function testResolveCacheMiss() {
+  public function testResolveCacheMiss(): void {
     $key = $this->randomMachineName();
     $value = $this->randomMachineName();
     $this->collector->setCacheMissData($key, $value);
@@ -77,7 +77,7 @@ public function testResolveCacheMiss() {
   /**
    * Tests setting and getting values when the cache is empty.
    */
-  public function testSetAndGet() {
+  public function testSetAndGet(): void {
     $key = $this->randomMachineName();
     $value = $this->randomMachineName();
 
@@ -91,7 +91,7 @@ public function testSetAndGet() {
   /**
    * Makes sure that NULL is a valid value and is collected.
    */
-  public function testSetAndGetNull() {
+  public function testSetAndGetNull(): void {
     $key = $this->randomMachineName();
     $value = NULL;
 
@@ -112,7 +112,7 @@ public function testSetAndGetNull() {
   /**
    * Tests returning value from the collected cache.
    */
-  public function testGetFromCache() {
+  public function testGetFromCache(): void {
     $key = $this->randomMachineName();
     $value = $this->randomMachineName();
 
@@ -132,7 +132,7 @@ public function testGetFromCache() {
   /**
    * Tests setting and deleting values.
    */
-  public function testDelete() {
+  public function testDelete(): void {
     $key = $this->randomMachineName();
     $value = $this->randomMachineName();
 
@@ -153,7 +153,7 @@ public function testDelete() {
   /**
    * Tests updating the cache when no changes were made.
    */
-  public function testUpdateCacheNoChanges() {
+  public function testUpdateCacheNoChanges(): void {
     $this->lock->expects($this->never())
       ->method('acquire');
     $this->cacheBackend->expects($this->never())
@@ -166,7 +166,7 @@ public function testUpdateCacheNoChanges() {
   /**
    * Tests updating the cache after a set.
    */
-  public function testUpdateCache() {
+  public function testUpdateCache(): void {
     $key = $this->randomMachineName();
     $value = $this->randomMachineName();
 
@@ -197,7 +197,7 @@ public function testUpdateCache() {
   /**
    * Tests updating the cache when the lock acquire fails.
    */
-  public function testUpdateCacheLockFail() {
+  public function testUpdateCacheLockFail(): void {
     $key = $this->randomMachineName();
     $value = $this->randomMachineName();
 
@@ -219,7 +219,7 @@ public function testUpdateCacheLockFail() {
   /**
    * Tests updating the cache when there is a conflict after cache invalidation.
    */
-  public function testUpdateCacheInvalidatedConflict() {
+  public function testUpdateCacheInvalidatedConflict(): void {
     $key = $this->randomMachineName();
     $value = $this->randomMachineName();
 
@@ -263,7 +263,7 @@ public function testUpdateCacheInvalidatedConflict() {
   /**
    * Tests a cache hit, then item updated by a different request.
    */
-  public function testUpdateCacheMerge() {
+  public function testUpdateCacheMerge(): void {
     $key = $this->randomMachineName();
     $value = $this->randomMachineName();
 
@@ -300,7 +300,7 @@ public function testUpdateCacheMerge() {
   /**
    * Tests a cache miss, then item created by another request.
    */
-  public function testUpdateCacheRace() {
+  public function testUpdateCacheRace(): void {
     $key = $this->randomMachineName();
     $value = $this->randomMachineName();
 
@@ -330,7 +330,7 @@ public function testUpdateCacheRace() {
   /**
    * Tests updating the cache after a delete.
    */
-  public function testUpdateCacheDelete() {
+  public function testUpdateCacheDelete(): void {
     $key = $this->randomMachineName();
     $value = $this->randomMachineName();
 
@@ -370,7 +370,7 @@ public function testUpdateCacheDelete() {
   /**
    * Tests a reset of the cache collector.
    */
-  public function testUpdateCacheReset() {
+  public function testUpdateCacheReset(): void {
     $key = $this->randomMachineName();
     $value = $this->randomMachineName();
 
@@ -391,7 +391,7 @@ public function testUpdateCacheReset() {
   /**
    * Tests a clear of the cache collector.
    */
-  public function testUpdateCacheClear() {
+  public function testUpdateCacheClear(): void {
     $key = $this->randomMachineName();
     $value = $this->randomMachineName();
 
@@ -417,7 +417,7 @@ public function testUpdateCacheClear() {
   /**
    * Tests a clear of the cache collector using tags.
    */
-  public function testUpdateCacheClearTags() {
+  public function testUpdateCacheClearTags(): void {
     $key = $this->randomMachineName();
     $value = $this->randomMachineName();
     $tags = [$this->randomMachineName()];
diff --git a/core/tests/Drupal/Tests/Core/Cache/CacheFactoryTest.php b/core/tests/Drupal/Tests/Core/Cache/CacheFactoryTest.php
index 8c555465c759..618c51fa38ff 100644
--- a/core/tests/Drupal/Tests/Core/Cache/CacheFactoryTest.php
+++ b/core/tests/Drupal/Tests/Core/Cache/CacheFactoryTest.php
@@ -21,7 +21,7 @@ class CacheFactoryTest extends UnitTestCase {
    * @covers ::__construct
    * @covers ::get
    */
-  public function testCacheFactoryWithDefaultSettings() {
+  public function testCacheFactoryWithDefaultSettings(): void {
     $settings = new Settings([]);
     $cache_factory = new CacheFactory($settings);
 
@@ -47,7 +47,7 @@ public function testCacheFactoryWithDefaultSettings() {
    * @covers ::__construct
    * @covers ::get
    */
-  public function testCacheFactoryWithCustomizedDefaultBackend() {
+  public function testCacheFactoryWithCustomizedDefaultBackend(): void {
     $settings = new Settings([
       'cache' => [
         'default' => 'cache.backend.custom',
@@ -77,7 +77,7 @@ public function testCacheFactoryWithCustomizedDefaultBackend() {
    * @covers ::__construct
    * @covers ::get
    */
-  public function testCacheFactoryWithDefaultBinBackend() {
+  public function testCacheFactoryWithDefaultBinBackend(): void {
     // Ensure the default bin backends are used before the configured default.
     $settings = new Settings([
       'cache' => [
@@ -113,7 +113,7 @@ public function testCacheFactoryWithDefaultBinBackend() {
    * @covers ::__construct
    * @covers ::get
    */
-  public function testCacheFactoryWithSpecifiedPerBinBackend() {
+  public function testCacheFactoryWithSpecifiedPerBinBackend(): void {
     // Ensure the per-bin configuration is used before the configured default
     // and per-bin defaults.
     $settings = new Settings([
diff --git a/core/tests/Drupal/Tests/Core/Cache/CacheTagsInvalidatorTest.php b/core/tests/Drupal/Tests/Core/Cache/CacheTagsInvalidatorTest.php
index 61527df595e7..2a118b368674 100644
--- a/core/tests/Drupal/Tests/Core/Cache/CacheTagsInvalidatorTest.php
+++ b/core/tests/Drupal/Tests/Core/Cache/CacheTagsInvalidatorTest.php
@@ -18,7 +18,7 @@ class CacheTagsInvalidatorTest extends UnitTestCase {
   /**
    * @covers ::invalidateTags
    */
-  public function testInvalidateTagsWithInvalidTags() {
+  public function testInvalidateTagsWithInvalidTags(): void {
     $cache_tags_invalidator = new CacheTagsInvalidator();
     $this->expectException(\AssertionError::class);
     $cache_tags_invalidator->invalidateTags(['node' => [2, 3, 5, 8, 13]]);
@@ -29,7 +29,7 @@ public function testInvalidateTagsWithInvalidTags() {
    * @covers ::addInvalidator
    * @covers ::addBin
    */
-  public function testInvalidateTags() {
+  public function testInvalidateTags(): void {
     $cache_tags_invalidator = new CacheTagsInvalidator();
 
     $invalidator_cache_bin = $this->createMock(InvalidatingCacheBackendInterface::class);
diff --git a/core/tests/Drupal/Tests/Core/Cache/CacheTest.php b/core/tests/Drupal/Tests/Core/Cache/CacheTest.php
index a3712c0d356f..dc005bc3f092 100644
--- a/core/tests/Drupal/Tests/Core/Cache/CacheTest.php
+++ b/core/tests/Drupal/Tests/Core/Cache/CacheTest.php
@@ -68,7 +68,7 @@ public static function mergeTagsProvider() {
    *
    * @dataProvider mergeTagsProvider
    */
-  public function testMergeTags(array $expected, ...$cache_tags) {
+  public function testMergeTags(array $expected, ...$cache_tags): void {
     $this->assertEqualsCanonicalizing($expected, Cache::mergeTags(...$cache_tags));
   }
 
@@ -107,7 +107,7 @@ public static function mergeMaxAgesProvider() {
    *
    * @dataProvider mergeMaxAgesProvider
    */
-  public function testMergeMaxAges($expected, ...$max_ages) {
+  public function testMergeMaxAges($expected, ...$max_ages): void {
     $this->assertSame($expected, Cache::mergeMaxAges(...$max_ages));
   }
 
@@ -141,7 +141,7 @@ public static function mergeCacheContextsProvide() {
    *
    * @dataProvider mergeCacheContextsProvide
    */
-  public function testMergeCacheContexts(array $expected, ...$contexts) {
+  public function testMergeCacheContexts(array $expected, ...$contexts): void {
     $cache_contexts_manager = $this->prophesize(CacheContextsManager::class);
     $cache_contexts_manager->assertValidTokens(Argument::any())->willReturn(TRUE);
     $container = $this->prophesize(Container::class);
@@ -182,7 +182,7 @@ public static function buildTagsProvider() {
    *
    * @dataProvider buildTagsProvider
    */
-  public function testBuildTags($prefix, array $suffixes, array $expected, $glue = ':') {
+  public function testBuildTags($prefix, array $suffixes, array $expected, $glue = ':'): void {
     $this->assertEquals($expected, Cache::buildTags($prefix, $suffixes, $glue));
   }
 
diff --git a/core/tests/Drupal/Tests/Core/Cache/CacheableMetadataTest.php b/core/tests/Drupal/Tests/Core/Cache/CacheableMetadataTest.php
index ef813ef4b363..9162ecf21cd5 100644
--- a/core/tests/Drupal/Tests/Core/Cache/CacheableMetadataTest.php
+++ b/core/tests/Drupal/Tests/Core/Cache/CacheableMetadataTest.php
@@ -29,7 +29,7 @@ class CacheableMetadataTest extends UnitTestCase {
    * @covers ::merge
    * @dataProvider providerTestMerge
    */
-  public function testMerge(CacheableMetadata $a, CacheableMetadata $b, CacheableMetadata $expected) {
+  public function testMerge(CacheableMetadata $a, CacheableMetadata $b, CacheableMetadata $expected): void {
     $cache_contexts_manager = $this->getMockBuilder('Drupal\Core\Cache\Context\CacheContextsManager')
       ->disableOriginalConstructor()
       ->getMock();
@@ -55,7 +55,7 @@ public function testMerge(CacheableMetadata $a, CacheableMetadata $b, CacheableM
    * @covers ::addCacheableDependency
    * @dataProvider providerTestMerge
    */
-  public function testAddCacheableDependency(CacheableMetadata $a, CacheableMetadata $b, CacheableMetadata $expected) {
+  public function testAddCacheableDependency(CacheableMetadata $a, CacheableMetadata $b, CacheableMetadata $expected): void {
     $cache_contexts_manager = $this->getMockBuilder('Drupal\Core\Cache\Context\CacheContextsManager')
       ->disableOriginalConstructor()
       ->getMock();
@@ -90,7 +90,7 @@ public static function providerTestMerge() {
    *
    * @covers ::addCacheTags
    */
-  public function testAddCacheTags() {
+  public function testAddCacheTags(): void {
     $metadata = new CacheableMetadata();
     $add_expected = [
       [[], []],
@@ -114,7 +114,7 @@ public function testAddCacheTags() {
    * @covers ::setCacheMaxAge
    * @dataProvider providerSetCacheMaxAge
    */
-  public function testSetCacheMaxAge($data, $expect_exception) {
+  public function testSetCacheMaxAge($data, $expect_exception): void {
     $metadata = new CacheableMetadata();
     if ($expect_exception) {
       $this->expectException('\InvalidArgumentException');
@@ -142,7 +142,7 @@ public static function providerSetCacheMaxAge() {
    * @covers ::createFromRenderArray
    * @dataProvider providerTestCreateFromRenderArray
    */
-  public function testCreateFromRenderArray(array $render_array, CacheableMetadata $expected) {
+  public function testCreateFromRenderArray(array $render_array, CacheableMetadata $expected): void {
     $this->assertEquals($expected, CacheableMetadata::createFromRenderArray($render_array));
   }
 
@@ -178,7 +178,7 @@ public static function providerTestCreateFromRenderArray() {
    * @covers ::createFromObject
    * @dataProvider providerTestCreateFromObject
    */
-  public function testCreateFromObject($object, CacheableMetadata $expected) {
+  public function testCreateFromObject($object, CacheableMetadata $expected): void {
     $this->assertEquals($expected, CacheableMetadata::createFromObject($object));
   }
 
diff --git a/core/tests/Drupal/Tests/Core/Cache/ChainedFastBackendFactoryTest.php b/core/tests/Drupal/Tests/Core/Cache/ChainedFastBackendFactoryTest.php
index 436db6dc00c0..012a0ce5237f 100644
--- a/core/tests/Drupal/Tests/Core/Cache/ChainedFastBackendFactoryTest.php
+++ b/core/tests/Drupal/Tests/Core/Cache/ChainedFastBackendFactoryTest.php
@@ -20,7 +20,7 @@ class ChainedFastBackendFactoryTest extends UnitTestCase {
   /**
    * Test if the same name is provided for consistent and fast services.
    */
-  public function testIdenticalService() {
+  public function testIdenticalService(): void {
     $container = $this->createMock(ContainerInterface::class);
     $testCacheFactory = $this->createMock(CacheFactoryInterface::class);
     $testCacheBackend = $this->createMock(CacheBackendInterface::class);
@@ -47,7 +47,7 @@ public function testIdenticalService() {
   /**
    * Test if different names are provided for consistent and fast services.
    */
-  public function testDifferentServices() {
+  public function testDifferentServices(): void {
     $container = $this->createMock(ContainerInterface::class);
     $testConsistentCacheFactory = $this->createMock(CacheFactoryInterface::class);
     $testFastCacheFactory = $this->createMock(CacheFactoryInterface::class);
diff --git a/core/tests/Drupal/Tests/Core/Cache/ChainedFastBackendTest.php b/core/tests/Drupal/Tests/Core/Cache/ChainedFastBackendTest.php
index 47a495e9d993..653f5d7b552d 100644
--- a/core/tests/Drupal/Tests/Core/Cache/ChainedFastBackendTest.php
+++ b/core/tests/Drupal/Tests/Core/Cache/ChainedFastBackendTest.php
@@ -39,7 +39,7 @@ class ChainedFastBackendTest extends UnitTestCase {
   /**
    * Tests a get() on the fast backend, with no hit on the consistent backend.
    */
-  public function testGetDoesNotHitConsistentBackend() {
+  public function testGetDoesNotHitConsistentBackend(): void {
     $consistent_cache = $this->createMock('Drupal\Core\Cache\CacheBackendInterface');
     $timestamp_cid = ChainedFastBackend::LAST_WRITE_TIMESTAMP_PREFIX . 'cache_foo';
     // Use the request time because that is what we will be comparing against.
@@ -64,7 +64,7 @@ public function testGetDoesNotHitConsistentBackend() {
   /**
    * Tests a fast cache miss gets data from the consistent cache backend.
    */
-  public function testFallThroughToConsistentCache() {
+  public function testFallThroughToConsistentCache(): void {
     $timestamp_item = (object) [
       'cid' => ChainedFastBackend::LAST_WRITE_TIMESTAMP_PREFIX . 'cache_foo',
       // Time travel is easy.
diff --git a/core/tests/Drupal/Tests/Core/Cache/Context/CacheContextsManagerTest.php b/core/tests/Drupal/Tests/Core/Cache/Context/CacheContextsManagerTest.php
index 51afa3a9d424..afc6999420d9 100644
--- a/core/tests/Drupal/Tests/Core/Cache/Context/CacheContextsManagerTest.php
+++ b/core/tests/Drupal/Tests/Core/Cache/Context/CacheContextsManagerTest.php
@@ -25,7 +25,7 @@ class CacheContextsManagerTest extends UnitTestCase {
    *
    * @dataProvider providerTestOptimizeTokens
    */
-  public function testOptimizeTokens(array $context_tokens, array $optimized_context_tokens) {
+  public function testOptimizeTokens(array $context_tokens, array $optimized_context_tokens): void {
     $container = $this->getMockBuilder('Drupal\Core\DependencyInjection\Container')
       ->disableOriginalConstructor()
       ->getMock();
@@ -104,7 +104,7 @@ public static function providerTestOptimizeTokens() {
   /**
    * @covers ::convertTokensToKeys
    */
-  public function testConvertTokensToKeys() {
+  public function testConvertTokensToKeys(): void {
     $container = $this->getMockContainer();
     $cache_contexts_manager = new CacheContextsManager($container, $this->getContextsFixture());
 
@@ -125,7 +125,7 @@ public function testConvertTokensToKeys() {
   /**
    * @covers ::convertTokensToKeys
    */
-  public function testInvalidContext() {
+  public function testInvalidContext(): void {
     $container = $this->getMockContainer();
     $cache_contexts_manager = new CacheContextsManager($container, $this->getContextsFixture());
 
@@ -138,7 +138,7 @@ public function testInvalidContext() {
    *
    * @dataProvider providerTestInvalidCalculatedContext
    */
-  public function testInvalidCalculatedContext($context_token) {
+  public function testInvalidCalculatedContext($context_token): void {
     $container = $this->getMockContainer();
     $cache_contexts_manager = new CacheContextsManager($container, $this->getContextsFixture());
 
@@ -156,13 +156,13 @@ public static function providerTestInvalidCalculatedContext() {
     ];
   }
 
-  public function testAvailableContextStrings() {
+  public function testAvailableContextStrings(): void {
     $cache_contexts_manager = new CacheContextsManager($this->getMockContainer(), $this->getContextsFixture());
     $contexts = $cache_contexts_manager->getAll();
     $this->assertEquals(["foo", "baz"], $contexts);
   }
 
-  public function testAvailableContextLabels() {
+  public function testAvailableContextLabels(): void {
     $container = $this->getMockContainer();
     $cache_contexts_manager = new CacheContextsManager($container, $this->getContextsFixture());
     $labels = $cache_contexts_manager->getLabels();
@@ -232,7 +232,7 @@ public static function validateTokensProvider() {
    *
    * @dataProvider validateTokensProvider
    */
-  public function testValidateContexts(array $contexts, $expected_exception_message) {
+  public function testValidateContexts(array $contexts, $expected_exception_message): void {
     $container = new ContainerBuilder();
     $cache_contexts_manager = new CacheContextsManager($container, ['foo', 'foo.bar', 'baz']);
     if ($expected_exception_message !== FALSE) {
diff --git a/core/tests/Drupal/Tests/Core/Cache/Context/CookieCacheContextTest.php b/core/tests/Drupal/Tests/Core/Cache/Context/CookieCacheContextTest.php
index 8eef5a405063..5a7c0835e1b9 100644
--- a/core/tests/Drupal/Tests/Core/Cache/Context/CookieCacheContextTest.php
+++ b/core/tests/Drupal/Tests/Core/Cache/Context/CookieCacheContextTest.php
@@ -20,7 +20,7 @@ class CookieCacheContextTest extends UnitTestCase {
    *
    * @dataProvider providerTestGetContext
    */
-  public function testGetContext($cookies, $cookie_name, $context) {
+  public function testGetContext($cookies, $cookie_name, $context): void {
     $request_stack = new RequestStack();
     $request = Request::create('/', 'GET');
     foreach ($cookies as $cookie => $value) {
diff --git a/core/tests/Drupal/Tests/Core/Cache/Context/HeadersCacheContextTest.php b/core/tests/Drupal/Tests/Core/Cache/Context/HeadersCacheContextTest.php
index f691ffe9da5a..7197a6283edf 100644
--- a/core/tests/Drupal/Tests/Core/Cache/Context/HeadersCacheContextTest.php
+++ b/core/tests/Drupal/Tests/Core/Cache/Context/HeadersCacheContextTest.php
@@ -20,7 +20,7 @@ class HeadersCacheContextTest extends UnitTestCase {
    *
    * @dataProvider providerTestGetContext
    */
-  public function testGetContext($headers, $header_name, $context) {
+  public function testGetContext($headers, $header_name, $context): void {
     $request_stack = new RequestStack();
     $request = Request::create('/', 'GET');
     // Request defaults could change, so compare with default values instead of
diff --git a/core/tests/Drupal/Tests/Core/Cache/Context/IsFrontPathCacheContextTest.php b/core/tests/Drupal/Tests/Core/Cache/Context/IsFrontPathCacheContextTest.php
index ef732eb9cec6..b54554dae0f5 100644
--- a/core/tests/Drupal/Tests/Core/Cache/Context/IsFrontPathCacheContextTest.php
+++ b/core/tests/Drupal/Tests/Core/Cache/Context/IsFrontPathCacheContextTest.php
@@ -17,7 +17,7 @@ class IsFrontPathCacheContextTest extends UnitTestCase {
   /**
    * @covers ::getContext
    */
-  public function testGetContextFront() {
+  public function testGetContextFront(): void {
     $cache_context = new IsFrontPathCacheContext($this->createPathMatcher(TRUE)->reveal());
     $this->assertSame('is_front.1', $cache_context->getContext());
   }
@@ -25,7 +25,7 @@ public function testGetContextFront() {
   /**
    * @covers ::getContext
    */
-  public function testGetContextNotFront() {
+  public function testGetContextNotFront(): void {
     $cache_context = new IsFrontPathCacheContext($this->createPathMatcher(FALSE)->reveal());
     $this->assertSame('is_front.0', $cache_context->getContext());
   }
diff --git a/core/tests/Drupal/Tests/Core/Cache/Context/PathParentCacheContextTest.php b/core/tests/Drupal/Tests/Core/Cache/Context/PathParentCacheContextTest.php
index 1d5b652ddbcb..3eed80e3db39 100644
--- a/core/tests/Drupal/Tests/Core/Cache/Context/PathParentCacheContextTest.php
+++ b/core/tests/Drupal/Tests/Core/Cache/Context/PathParentCacheContextTest.php
@@ -20,7 +20,7 @@ class PathParentCacheContextTest extends UnitTestCase {
    *
    * @dataProvider providerTestGetContext
    */
-  public function testGetContext($original_path, $context) {
+  public function testGetContext($original_path, $context): void {
     $request_stack = new RequestStack();
     $request = Request::create($original_path);
     $request_stack->push($request);
diff --git a/core/tests/Drupal/Tests/Core/Cache/Context/ProtocolVersionCacheContextTest.php b/core/tests/Drupal/Tests/Core/Cache/Context/ProtocolVersionCacheContextTest.php
index 673cd4cc387f..12f3c641a656 100644
--- a/core/tests/Drupal/Tests/Core/Cache/Context/ProtocolVersionCacheContextTest.php
+++ b/core/tests/Drupal/Tests/Core/Cache/Context/ProtocolVersionCacheContextTest.php
@@ -20,7 +20,7 @@ class ProtocolVersionCacheContextTest extends UnitTestCase {
    *
    * @dataProvider providerTestGetContext
    */
-  public function testGetContext($protocol, $context) {
+  public function testGetContext($protocol, $context): void {
     $request_stack = new RequestStack();
     $request = Request::create('/');
     $request->server->set('SERVER_PROTOCOL', $protocol);
diff --git a/core/tests/Drupal/Tests/Core/Cache/Context/QueryArgsCacheContextTest.php b/core/tests/Drupal/Tests/Core/Cache/Context/QueryArgsCacheContextTest.php
index 4ed09f3ae4d1..0556773defe8 100644
--- a/core/tests/Drupal/Tests/Core/Cache/Context/QueryArgsCacheContextTest.php
+++ b/core/tests/Drupal/Tests/Core/Cache/Context/QueryArgsCacheContextTest.php
@@ -20,7 +20,7 @@ class QueryArgsCacheContextTest extends UnitTestCase {
    *
    * @dataProvider providerTestGetContext
    */
-  public function testGetContext(array $query_args, $cache_context_parameter, $context) {
+  public function testGetContext(array $query_args, $cache_context_parameter, $context): void {
     $request_stack = new RequestStack();
     $request = Request::create('/', 'GET', $query_args);
     $request_stack->push($request);
diff --git a/core/tests/Drupal/Tests/Core/Cache/Context/SessionCacheContextTest.php b/core/tests/Drupal/Tests/Core/Cache/Context/SessionCacheContextTest.php
index 5d2dce80a734..b085377be467 100644
--- a/core/tests/Drupal/Tests/Core/Cache/Context/SessionCacheContextTest.php
+++ b/core/tests/Drupal/Tests/Core/Cache/Context/SessionCacheContextTest.php
@@ -54,7 +54,7 @@ protected function setUp(): void {
   /**
    * @covers ::getContext
    */
-  public function testSameContextForSameSession() {
+  public function testSameContextForSameSession(): void {
     $this->request->setSession($this->session);
     $cache_context = new SessionCacheContext($this->requestStack);
 
@@ -73,7 +73,7 @@ public function testSameContextForSameSession() {
   /**
    * @covers ::getContext
    */
-  public function testDifferentContextForDifferentSession() {
+  public function testDifferentContextForDifferentSession(): void {
     $this->request->setSession($this->session);
     $cache_context = new SessionCacheContext($this->requestStack);
 
diff --git a/core/tests/Drupal/Tests/Core/Cache/DatabaseBackendFactoryTest.php b/core/tests/Drupal/Tests/Core/Cache/DatabaseBackendFactoryTest.php
index 93666f28daf6..60438d2063a7 100644
--- a/core/tests/Drupal/Tests/Core/Cache/DatabaseBackendFactoryTest.php
+++ b/core/tests/Drupal/Tests/Core/Cache/DatabaseBackendFactoryTest.php
@@ -24,7 +24,7 @@ class DatabaseBackendFactoryTest extends UnitTestCase {
    * @covers ::get
    * @dataProvider getProvider
    */
-  public function testGet(array $settings, $expected_max_rows_foo, $expected_max_rows_bar) {
+  public function testGet(array $settings, $expected_max_rows_foo, $expected_max_rows_bar): void {
     $database_backend_factory = new DatabaseBackendFactory(
       $this->prophesize(Connection::class)->reveal(),
       $this->prophesize(CacheTagsChecksumInterface::class)->reveal(),
diff --git a/core/tests/Drupal/Tests/Core/Cache/NullBackendTest.php b/core/tests/Drupal/Tests/Core/Cache/NullBackendTest.php
index e5067a697d8e..51a6699585cf 100644
--- a/core/tests/Drupal/Tests/Core/Cache/NullBackendTest.php
+++ b/core/tests/Drupal/Tests/Core/Cache/NullBackendTest.php
@@ -17,7 +17,7 @@ class NullBackendTest extends UnitTestCase {
   /**
    * Tests that the NullBackend does not actually store variables.
    */
-  public function testNullBackend() {
+  public function testNullBackend(): void {
     $null_cache = new NullBackend('test');
 
     $key = $this->randomMachineName();
diff --git a/core/tests/Drupal/Tests/Core/Cache/VariationCacheTest.php b/core/tests/Drupal/Tests/Core/Cache/VariationCacheTest.php
index 64a11e90de49..61b058b7e2f2 100644
--- a/core/tests/Drupal/Tests/Core/Cache/VariationCacheTest.php
+++ b/core/tests/Drupal/Tests/Core/Cache/VariationCacheTest.php
@@ -184,7 +184,7 @@ protected function setUp(): void {
    * @covers ::get
    * @covers ::set
    */
-  public function testNoVariations() {
+  public function testNoVariations(): void {
     $data = 'You have a nice house!';
     $cacheability = (new CacheableMetadata())->setCacheTags(['bar', 'foo']);
     $initial_cacheability = (new CacheableMetadata())->setCacheTags(['foo']);
@@ -198,7 +198,7 @@ public function testNoVariations() {
    * @covers ::get
    * @covers ::set
    */
-  public function testSingleVariation() {
+  public function testSingleVariation(): void {
     $cacheability = $this->housingTypeCacheability;
 
     $house_data = [
@@ -221,7 +221,7 @@ public function testSingleVariation() {
    * @covers ::get
    * @covers ::set
    */
-  public function testNestedVariations() {
+  public function testNestedVariations(): void {
     // We are running this scenario in the best possible outcome: The redirects
     // are stored in expanding order, meaning the simplest one is stored first
     // and the nested ones are stored in subsequent ::set() calls. This means no
@@ -273,7 +273,7 @@ public function testNestedVariations() {
    *
    * @depends testNestedVariations
    */
-  public function testNestedVariationsSelfHealing() {
+  public function testNestedVariationsSelfHealing(): void {
     // This is the worst possible scenario: A very specific item was stored
     // first, followed by a less specific one. This means an overly specific
     // cache redirect was stored that needs to be dumbed down. After this
@@ -330,7 +330,7 @@ public function testNestedVariationsSelfHealing() {
    * @covers ::get
    * @covers ::set
    */
-  public function testSplitVariationsSelfHealing() {
+  public function testSplitVariationsSelfHealing(): void {
     // This is an edge case. Something varies by AB where some values of B
     // trigger the whole to vary by either C, D or nothing extra. But due to an
     // unfortunate series of requests, only ABC and ABD variations were cached.
@@ -402,7 +402,7 @@ public function testSplitVariationsSelfHealing() {
    * @covers ::get
    * @covers ::set
    */
-  public function testIncompatibleVariationsException() {
+  public function testIncompatibleVariationsException(): void {
     // This should never happen. When someone first stores something in the
     // cache using context A and then tries to store something using context B,
     // something is wrong. There should always be at least one shared context at
diff --git a/core/tests/Drupal/Tests/Core/Command/QuickStartTest.php b/core/tests/Drupal/Tests/Core/Command/QuickStartTest.php
index 688b54b753f5..74139e1b9bac 100644
--- a/core/tests/Drupal/Tests/Core/Command/QuickStartTest.php
+++ b/core/tests/Drupal/Tests/Core/Command/QuickStartTest.php
@@ -86,7 +86,7 @@ protected function tearDown(): void {
   /**
    * Tests the quick-start command.
    */
-  public function testQuickStartCommand() {
+  public function testQuickStartCommand(): void {
     $sqlite = (new \PDO('sqlite::memory:'))->query('select sqlite_version()')->fetch()[0];
     if (version_compare($sqlite, Tasks::SQLITE_MINIMUM_VERSION) < 0) {
       $this->markTestSkipped();
@@ -142,7 +142,7 @@ public function testQuickStartCommand() {
   /**
    * Tests the quick-start commands.
    */
-  public function testQuickStartInstallAndServerCommands() {
+  public function testQuickStartInstallAndServerCommands(): void {
     $sqlite = (new \PDO('sqlite::memory:'))->query('select sqlite_version()')->fetch()[0];
     if (version_compare($sqlite, Tasks::SQLITE_MINIMUM_VERSION) < 0) {
       $this->markTestSkipped();
@@ -224,7 +224,7 @@ public function testQuickStartInstallAndServerCommands() {
   /**
    * Tests the install command with an invalid profile.
    */
-  public function testQuickStartCommandProfileValidation() {
+  public function testQuickStartCommandProfileValidation(): void {
     // Install a site using the standard profile to ensure the one time login
     // link generation works.
     $install_command = [
@@ -242,7 +242,7 @@ public function testQuickStartCommandProfileValidation() {
   /**
    * Tests the server command when there is no installation.
    */
-  public function testServerWithNoInstall() {
+  public function testServerWithNoInstall(): void {
     $server_command = [
       $this->php,
       'core/scripts/drupal',
diff --git a/core/tests/Drupal/Tests/Core/Common/AttributesTest.php b/core/tests/Drupal/Tests/Core/Common/AttributesTest.php
index 49321a4fa2a7..e051a1338bb3 100644
--- a/core/tests/Drupal/Tests/Core/Common/AttributesTest.php
+++ b/core/tests/Drupal/Tests/Core/Common/AttributesTest.php
@@ -54,14 +54,14 @@ public static function providerTestAttributeData() {
    *
    * @dataProvider providerTestAttributeData
    */
-  public function testDrupalAttributes($attributes, $expected, $message) {
+  public function testDrupalAttributes($attributes, $expected, $message): void {
     $this->assertSame($expected, (string) new Attribute($attributes), $message);
   }
 
   /**
    * Tests attribute iteration.
    */
-  public function testAttributeIteration() {
+  public function testAttributeIteration(): void {
     $attribute = new Attribute(['key1' => 'value1']);
     foreach ($attribute as $value) {
       $this->assertSame((string) $value, 'value1', 'Iterate over attribute.');
@@ -71,7 +71,7 @@ public function testAttributeIteration() {
   /**
    * Tests AttributeValueBase copy.
    */
-  public function testAttributeValueBaseCopy() {
+  public function testAttributeValueBaseCopy(): void {
     $original_attributes = new Attribute([
       'checked' => TRUE,
       'class' => ['who', 'is', 'on'],
diff --git a/core/tests/Drupal/Tests/Core/Common/DiffArrayTest.php b/core/tests/Drupal/Tests/Core/Common/DiffArrayTest.php
index 3394fca907f6..77d1776f35ab 100644
--- a/core/tests/Drupal/Tests/Core/Common/DiffArrayTest.php
+++ b/core/tests/Drupal/Tests/Core/Common/DiffArrayTest.php
@@ -60,7 +60,7 @@ protected function setUp(): void {
   /**
    * Tests DiffArray::diffAssocRecursive().
    */
-  public function testDiffAssocRecursive() {
+  public function testDiffAssocRecursive(): void {
     $expected = [
       'different' => 'no',
       'int_diff' => 1,
diff --git a/core/tests/Drupal/Tests/Core/Common/TagsTest.php b/core/tests/Drupal/Tests/Core/Common/TagsTest.php
index 9c97fa5e28c4..d4fc3a936e2a 100644
--- a/core/tests/Drupal/Tests/Core/Common/TagsTest.php
+++ b/core/tests/Drupal/Tests/Core/Common/TagsTest.php
@@ -26,7 +26,7 @@ class TagsTest extends UnitTestCase {
   /**
    * Explodes a series of tags.
    */
-  public function testExplodeTags() {
+  public function testExplodeTags(): void {
     $string = implode(', ', array_keys($this->validTags));
     $tags = Tags::explode($string);
     $this->assertEquals(array_values($this->validTags), $tags);
@@ -35,7 +35,7 @@ public function testExplodeTags() {
   /**
    * Implodes a series of tags.
    */
-  public function testImplodeTags() {
+  public function testImplodeTags(): void {
     $tags = array_values($this->validTags);
     // Let's explode and implode to our heart's content.
     for ($i = 0; $i < 10; $i++) {
diff --git a/core/tests/Drupal/Tests/Core/Condition/ConditionAccessResolverTraitTest.php b/core/tests/Drupal/Tests/Core/Condition/ConditionAccessResolverTraitTest.php
index e90931e54b39..0fb4073b424b 100644
--- a/core/tests/Drupal/Tests/Core/Condition/ConditionAccessResolverTraitTest.php
+++ b/core/tests/Drupal/Tests/Core/Condition/ConditionAccessResolverTraitTest.php
@@ -20,7 +20,7 @@ class ConditionAccessResolverTraitTest extends UnitTestCase {
    *
    * @dataProvider providerTestResolveConditions
    */
-  public function testResolveConditions($conditions, $logic, $expected) {
+  public function testResolveConditions($conditions, $logic, $expected): void {
     $mocks['true'] = $this->createMock('Drupal\Core\Condition\ConditionInterface');
     $mocks['true']->expects($this->any())
       ->method('execute')
diff --git a/core/tests/Drupal/Tests/Core/Config/CachedStorageTest.php b/core/tests/Drupal/Tests/Core/Config/CachedStorageTest.php
index 32bb2b0fde03..fd440f707348 100644
--- a/core/tests/Drupal/Tests/Core/Config/CachedStorageTest.php
+++ b/core/tests/Drupal/Tests/Core/Config/CachedStorageTest.php
@@ -23,7 +23,7 @@ class CachedStorageTest extends UnitTestCase {
   /**
    * Tests listAll static cache.
    */
-  public function testListAllStaticCache() {
+  public function testListAllStaticCache(): void {
     $prefix = __FUNCTION__;
     $storage = $this->createMock('Drupal\Core\Config\StorageInterface');
 
diff --git a/core/tests/Drupal/Tests/Core/Config/ConfigDependencyManagerTest.php b/core/tests/Drupal/Tests/Core/Config/ConfigDependencyManagerTest.php
index a84b4f22bc58..557360b0c6ff 100644
--- a/core/tests/Drupal/Tests/Core/Config/ConfigDependencyManagerTest.php
+++ b/core/tests/Drupal/Tests/Core/Config/ConfigDependencyManagerTest.php
@@ -19,7 +19,7 @@ class ConfigDependencyManagerTest extends UnitTestCase {
   /**
    * @dataProvider providerTestSortAll
    */
-  public function testSortAll(array $data, array $expected_order) {
+  public function testSortAll(array $data, array $expected_order): void {
     $dependency_manager = new ConfigDependencyManager();
     $dependency_manager->setData($data);
     $this->assertEquals($expected_order, $dependency_manager->sortAll());
diff --git a/core/tests/Drupal/Tests/Core/Config/ConfigFactoryOverrideBaseTest.php b/core/tests/Drupal/Tests/Core/Config/ConfigFactoryOverrideBaseTest.php
index 8a01635b81fe..744e668f8425 100644
--- a/core/tests/Drupal/Tests/Core/Config/ConfigFactoryOverrideBaseTest.php
+++ b/core/tests/Drupal/Tests/Core/Config/ConfigFactoryOverrideBaseTest.php
@@ -19,7 +19,7 @@ class ConfigFactoryOverrideBaseTest extends UnitTestCase {
   /**
    * @dataProvider providerTestFilterNestedArray
    */
-  public function testFilterNestedArray(array $original_data, array $override_data_before, array $override_data_after, $changed) {
+  public function testFilterNestedArray(array $original_data, array $override_data_before, array $override_data_after, $changed): void {
     $config_factory = new TestConfigFactoryOverrideBase();
     $result = $config_factory->doFilterNestedArray($original_data, $override_data_before);
     $this->assertEquals($changed, $result);
diff --git a/core/tests/Drupal/Tests/Core/Config/ConfigFactoryTest.php b/core/tests/Drupal/Tests/Core/Config/ConfigFactoryTest.php
index ae0944489eba..d893f970d49a 100644
--- a/core/tests/Drupal/Tests/Core/Config/ConfigFactoryTest.php
+++ b/core/tests/Drupal/Tests/Core/Config/ConfigFactoryTest.php
@@ -71,7 +71,7 @@ protected function setUp(): void {
   /**
    * @covers ::rename
    */
-  public function testRename() {
+  public function testRename(): void {
     $old = new Config($this->randomMachineName(), $this->storage, $this->eventDispatcher, $this->typedConfig);
     $new = new Config($this->randomMachineName(), $this->storage, $this->eventDispatcher, $this->typedConfig);
 
diff --git a/core/tests/Drupal/Tests/Core/Config/ConfigTest.php b/core/tests/Drupal/Tests/Core/Config/ConfigTest.php
index 4ba8a31f727c..e313731c9eb2 100644
--- a/core/tests/Drupal/Tests/Core/Config/ConfigTest.php
+++ b/core/tests/Drupal/Tests/Core/Config/ConfigTest.php
@@ -77,7 +77,7 @@ protected function setUp(): void {
    * @covers ::setName
    * @dataProvider setNameProvider
    */
-  public function testSetName($name) {
+  public function testSetName($name): void {
     // Set the name.
     $this->config->setName($name);
 
@@ -110,7 +110,7 @@ public static function setNameProvider() {
   /**
    * @covers ::isNew
    */
-  public function testIsNew() {
+  public function testIsNew(): void {
     // Config should be new by default.
     $this->assertTrue($this->config->isNew());
 
@@ -123,7 +123,7 @@ public function testIsNew() {
    * @covers ::setData
    * @dataProvider nestedDataProvider
    */
-  public function testSetData($data) {
+  public function testSetData($data): void {
     $this->config->setData($data);
     $this->assertEquals($data, $this->config->getRawData());
     $this->assertConfigDataEquals($data);
@@ -133,7 +133,7 @@ public function testSetData($data) {
    * @covers ::save
    * @dataProvider nestedDataProvider
    */
-  public function testSaveNew($data) {
+  public function testSaveNew($data): void {
     $this->cacheTagsInvalidator->expects($this->never())
       ->method('invalidateTags');
 
@@ -159,7 +159,7 @@ public function testSaveNew($data) {
    * @covers ::save
    * @dataProvider nestedDataProvider
    */
-  public function testSaveExisting($data) {
+  public function testSaveExisting($data): void {
     $this->cacheTagsInvalidator->expects($this->once())
       ->method('invalidateTags')
       ->with(['config:config.test']);
@@ -183,7 +183,7 @@ public function testSaveExisting($data) {
    * @covers ::hasOverrides
    * @dataProvider overrideDataProvider
    */
-  public function testOverrideData($data, $module_data, $setting_data) {
+  public function testOverrideData($data, $module_data, $setting_data): void {
     // Set initial data.
     $this->config->setData($data);
 
@@ -253,7 +253,7 @@ public function testOverrideData($data, $module_data, $setting_data) {
    * @covers ::set
    * @dataProvider nestedDataProvider
    */
-  public function testSetValue($data) {
+  public function testSetValue($data): void {
     foreach ($data as $key => $value) {
       $this->config->set($key, $value);
     }
@@ -263,7 +263,7 @@ public function testSetValue($data) {
   /**
    * @covers ::set
    */
-  public function testSetValidation() {
+  public function testSetValidation(): void {
     $this->expectException(ConfigValueException::class);
     $this->config->set('testData', ['dot.key' => 1]);
   }
@@ -271,7 +271,7 @@ public function testSetValidation() {
   /**
    * @covers ::set
    */
-  public function testSetIllegalOffsetValue() {
+  public function testSetIllegalOffsetValue(): void {
     // Set a single value.
     $this->config->set('testData', 1);
 
@@ -285,7 +285,7 @@ public function testSetIllegalOffsetValue() {
    * @covers ::initWithData
    * @dataProvider nestedDataProvider
    */
-  public function testInitWithData($data) {
+  public function testInitWithData($data): void {
     $config = $this->config->initWithData($data);
 
     // Should return the Config object.
@@ -308,7 +308,7 @@ public function testInitWithData($data) {
    * @covers ::clear
    * @dataProvider simpleDataProvider
    */
-  public function testClear($data) {
+  public function testClear($data): void {
     foreach ($data as $key => $value) {
       // Check that values are cleared.
       $this->config->set($key, $value);
@@ -322,7 +322,7 @@ public function testClear($data) {
    * @covers ::clear
    * @dataProvider nestedDataProvider
    */
-  public function testNestedClear($data) {
+  public function testNestedClear($data): void {
     foreach ($data as $key => $value) {
       // Check that values are cleared.
       $this->config->set($key, $value);
@@ -340,7 +340,7 @@ public function testNestedClear($data) {
    * @covers ::delete
    * @dataProvider overrideDataProvider
    */
-  public function testDelete($data, $module_data) {
+  public function testDelete($data, $module_data): void {
     $this->cacheTagsInvalidator->expects($this->once())
       ->method('invalidateTags')
       ->with(['config:config.test']);
@@ -385,7 +385,7 @@ public function testDelete($data, $module_data) {
    * @covers ::merge
    * @dataProvider mergeDataProvider
    */
-  public function testMerge($data, $data_to_merge, $merged_data) {
+  public function testMerge($data, $data_to_merge, $merged_data): void {
     // Set initial data.
     $this->config->setData($data);
 
@@ -418,7 +418,7 @@ public static function mergeDataProvider() {
    * @covers ::validateName
    * @dataProvider validateNameProvider
    */
-  public function testValidateNameException($name, $exception_message) {
+  public function testValidateNameException($name, $exception_message): void {
     $this->expectException('\Drupal\Core\Config\ConfigNameException');
     $this->expectExceptionMessage($exception_message);
     $this->config->validateName($name);
@@ -427,7 +427,7 @@ public function testValidateNameException($name, $exception_message) {
   /**
    * @covers ::getCacheTags
    */
-  public function testGetCacheTags() {
+  public function testGetCacheTags(): void {
     $this->assertSame(['config:' . $this->config->getName()], $this->config->getCacheTags());
   }
 
@@ -615,7 +615,7 @@ public function assertOriginalConfigDataEquals(array $data, bool $apply_override
    * @covers ::set
    * @covers ::initWithData
    */
-  public function testSafeStringHandling() {
+  public function testSafeStringHandling(): void {
     // Safe strings are cast when using ::set().
     $safe_string = Markup::create('bar');
     $this->config->set('foo', $safe_string);
diff --git a/core/tests/Drupal/Tests/Core/Config/Entity/ConfigDependencyManagerTest.php b/core/tests/Drupal/Tests/Core/Config/Entity/ConfigDependencyManagerTest.php
index 1bf92c0ec495..587ccbcf48ab 100644
--- a/core/tests/Drupal/Tests/Core/Config/Entity/ConfigDependencyManagerTest.php
+++ b/core/tests/Drupal/Tests/Core/Config/Entity/ConfigDependencyManagerTest.php
@@ -14,12 +14,12 @@
  */
 class ConfigDependencyManagerTest extends UnitTestCase {
 
-  public function testNoConfiguration() {
+  public function testNoConfiguration(): void {
     $dep_manger = new ConfigDependencyManager();
     $this->assertEmpty($dep_manger->getDependentEntities('config', 'config_test.dynamic.entity_id:745b0ce0-aece-42dd-a800-ade5b8455e84'));
   }
 
-  public function testNoConfigEntities() {
+  public function testNoConfigEntities(): void {
     $dep_manger = new ConfigDependencyManager();
     $dep_manger->setData([
       'simple.config' => [
diff --git a/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityBaseUnitTest.php b/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityBaseUnitTest.php
index 35316ac0dcf5..63e02c778f40 100644
--- a/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityBaseUnitTest.php
+++ b/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityBaseUnitTest.php
@@ -170,7 +170,7 @@ protected function setUp(): void {
    * @covers ::calculateDependencies
    * @covers ::getDependencies
    */
-  public function testCalculateDependencies() {
+  public function testCalculateDependencies(): void {
     // Calculating dependencies will reset the dependencies array.
     $this->entity->set('dependencies', ['module' => ['node']]);
     $this->assertEmpty($this->entity->calculateDependencies()->getDependencies());
@@ -186,7 +186,7 @@ public function testCalculateDependencies() {
   /**
    * @covers ::preSave
    */
-  public function testPreSaveDuringSync() {
+  public function testPreSaveDuringSync(): void {
     $this->moduleHandler->moduleExists('node')->willReturn(TRUE);
 
     $query = $this->createMock('\Drupal\Core\Entity\Query\QueryInterface');
@@ -221,7 +221,7 @@ public function testPreSaveDuringSync() {
   /**
    * @covers ::addDependency
    */
-  public function testAddDependency() {
+  public function testAddDependency(): void {
     $method = new \ReflectionMethod('\Drupal\Core\Config\Entity\ConfigEntityBase', 'addDependency');
     $method->invoke($this->entity, 'module', static::PROVIDER);
     $method->invoke($this->entity, 'module', 'core');
@@ -334,7 +334,7 @@ public static function providerCalculateDependenciesWithPluginCollections(): arr
    * @covers ::getDependencies
    * @covers ::onDependencyRemoval
    */
-  public function testCalculateDependenciesWithThirdPartySettings() {
+  public function testCalculateDependenciesWithThirdPartySettings(): void {
     $this->entity = $this->getMockBuilder(ConfigEntityBaseMockableClass::class)
       ->setConstructorArgs([[], $this->entityTypeId])
       ->onlyMethods([])
@@ -354,7 +354,7 @@ public function testCalculateDependenciesWithThirdPartySettings() {
   /**
    * @covers ::__sleep
    */
-  public function testSleepWithPluginCollections() {
+  public function testSleepWithPluginCollections(): void {
     $instance_id = 'the_instance_id';
     $instance = new TestConfigurablePlugin([], $instance_id, []);
 
@@ -393,7 +393,7 @@ public function testSleepWithPluginCollections() {
    * @covers ::setOriginalId
    * @covers ::getOriginalId
    */
-  public function testGetOriginalId() {
+  public function testGetOriginalId(): void {
     $new_id = $this->randomMachineName();
     $this->entity->set('id', $new_id);
     $this->assertSame($this->id, $this->entity->getOriginalId());
@@ -413,7 +413,7 @@ public function testGetOriginalId() {
   /**
    * @covers ::isNew
    */
-  public function testIsNew() {
+  public function testIsNew(): void {
     $this->assertFalse($this->entity->isNew());
     $this->assertSame($this->entity, $this->entity->enforceIsNew());
     $this->assertTrue($this->entity->isNew());
@@ -425,7 +425,7 @@ public function testIsNew() {
    * @covers ::set
    * @covers ::get
    */
-  public function testGet() {
+  public function testGet(): void {
     $name = 'id';
     $value = $this->randomMachineName();
     $this->assertSame($this->id, $this->entity->get($name));
@@ -437,7 +437,7 @@ public function testGet() {
    * @covers ::setStatus
    * @covers ::status
    */
-  public function testSetStatus() {
+  public function testSetStatus(): void {
     $this->assertTrue($this->entity->status());
     $this->assertSame($this->entity, $this->entity->setStatus(FALSE));
     $this->assertFalse($this->entity->status());
@@ -449,7 +449,7 @@ public function testSetStatus() {
    * @covers ::enable
    * @depends testSetStatus
    */
-  public function testEnable() {
+  public function testEnable(): void {
     $this->entity->setStatus(FALSE);
     $this->assertSame($this->entity, $this->entity->enable());
     $this->assertTrue($this->entity->status());
@@ -459,7 +459,7 @@ public function testEnable() {
    * @covers ::disable
    * @depends testSetStatus
    */
-  public function testDisable() {
+  public function testDisable(): void {
     $this->entity->setStatus(TRUE);
     $this->assertSame($this->entity, $this->entity->disable());
     $this->assertFalse($this->entity->status());
@@ -469,7 +469,7 @@ public function testDisable() {
    * @covers ::setSyncing
    * @covers ::isSyncing
    */
-  public function testIsSyncing() {
+  public function testIsSyncing(): void {
     $this->assertFalse($this->entity->isSyncing());
     $this->assertSame($this->entity, $this->entity->setSyncing(TRUE));
     $this->assertTrue($this->entity->isSyncing());
@@ -480,7 +480,7 @@ public function testIsSyncing() {
   /**
    * @covers ::createDuplicate
    */
-  public function testCreateDuplicate() {
+  public function testCreateDuplicate(): void {
     $this->entityType->expects($this->exactly(2))
       ->method('getKey')
       ->willReturnMap([
@@ -512,7 +512,7 @@ public function testCreateDuplicate() {
   /**
    * @covers ::sort
    */
-  public function testSort() {
+  public function testSort(): void {
     $this->entityTypeManager->expects($this->any())
       ->method('getDefinition')
       ->with($this->entityTypeId)
@@ -555,7 +555,7 @@ public function testSort() {
   /**
    * @covers ::toArray
    */
-  public function testToArray() {
+  public function testToArray(): void {
     $this->typedConfigManager->expects($this->never())
       ->method('getDefinition');
     $this->entityType->expects($this->any())
@@ -569,7 +569,7 @@ public function testToArray() {
   /**
    * @covers ::toArray
    */
-  public function testToArrayIdKey() {
+  public function testToArrayIdKey(): void {
     $entity = $this->getMockBuilder(ConfigEntityBaseMockableClass::class)
       ->setConstructorArgs([[], $this->entityTypeId])
       ->onlyMethods(['id', 'get'])
@@ -602,7 +602,7 @@ public function testToArrayIdKey() {
    * @covers ::unsetThirdPartySetting
    * @covers ::getThirdPartyProviders
    */
-  public function testThirdPartySettings() {
+  public function testThirdPartySettings(): void {
     $key = 'test';
     $third_party = 'test_provider';
     $value = $this->getRandomGenerator()->string();
@@ -632,7 +632,7 @@ public function testThirdPartySettings() {
   /**
    * @covers ::toArray
    */
-  public function testToArraySchemaException() {
+  public function testToArraySchemaException(): void {
     $this->entityType->expects($this->any())
       ->method('getPropertiesToExport')
       ->willReturn(NULL);
diff --git a/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityDependencyTest.php b/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityDependencyTest.php
index d41ac6d92c3a..c367978ccb2e 100644
--- a/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityDependencyTest.php
+++ b/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityDependencyTest.php
@@ -14,7 +14,7 @@
  */
 class ConfigEntityDependencyTest extends UnitTestCase {
 
-  public function testEmptyDependencies() {
+  public function testEmptyDependencies(): void {
     $dep = new ConfigEntityDependency('config_test.dynamic.entity_id', []);
 
     $this->assertEquals('config_test.dynamic.entity_id', $dep->getConfigDependencyName());
@@ -25,7 +25,7 @@ public function testEmptyDependencies() {
     $this->assertFalse($dep->hasDependency('module', 'views'));
   }
 
-  public function testWithDependencies() {
+  public function testWithDependencies(): void {
     $values = [
       'uuid' => '60db47f4-54fb-4c86-a439-5769fbda4bd1',
       'dependencies' => [
diff --git a/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityStorageTest.php b/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityStorageTest.php
index 85b7461b6fbb..ca7f7f05d276 100644
--- a/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityStorageTest.php
+++ b/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityStorageTest.php
@@ -170,7 +170,7 @@ protected function setUp(): void {
    * @covers ::create
    * @covers ::doCreate
    */
-  public function testCreateWithPredefinedUuid() {
+  public function testCreateWithPredefinedUuid(): void {
     $this->cacheTagsInvalidator->invalidateTags(Argument::cetera())->shouldNotBeCalled();
 
     $entity = $this->getMockEntity();
@@ -227,7 +227,7 @@ public function testCreate() {
    * @covers ::create
    * @covers ::doCreate
    */
-  public function testCreateWithCurrentLanguage() {
+  public function testCreateWithCurrentLanguage(): void {
     $this->languageManager->getLanguage('hu')->willReturn(new Language(['id' => 'hu']));
 
     $entity = $this->entityStorage->create(['id' => 'foo']);
@@ -238,7 +238,7 @@ public function testCreateWithCurrentLanguage() {
    * @covers ::create
    * @covers ::doCreate
    */
-  public function testCreateWithExplicitLanguage() {
+  public function testCreateWithExplicitLanguage(): void {
     $this->languageManager->getLanguage('en')->willReturn(new Language(['id' => 'en']));
 
     $entity = $this->entityStorage->create(['id' => 'foo', 'langcode' => 'en']);
@@ -364,7 +364,7 @@ public function testSaveUpdate(EntityInterface $entity) {
    *
    * @depends testSaveInsert
    */
-  public function testSaveRename(ConfigEntityInterface $entity) {
+  public function testSaveRename(ConfigEntityInterface $entity): void {
     $immutable_config_object = $this->prophesize(ImmutableConfig::class);
     $immutable_config_object->isNew()->willReturn(FALSE);
 
@@ -410,7 +410,7 @@ public function testSaveRename(ConfigEntityInterface $entity) {
   /**
    * @covers ::save
    */
-  public function testSaveInvalid() {
+  public function testSaveInvalid(): void {
     $this->cacheTagsInvalidator->invalidateTags(Argument::cetera())
       ->shouldNotBeCalled();
 
@@ -424,7 +424,7 @@ public function testSaveInvalid() {
    * @covers ::save
    * @covers ::doSave
    */
-  public function testSaveDuplicate() {
+  public function testSaveDuplicate(): void {
     $config_object = $this->prophesize(ImmutableConfig::class);
     $config_object->isNew()->willReturn(FALSE);
 
@@ -445,7 +445,7 @@ public function testSaveDuplicate() {
    * @covers ::save
    * @covers ::doSave
    */
-  public function testSaveMismatch() {
+  public function testSaveMismatch(): void {
     $config_object = $this->prophesize(ImmutableConfig::class);
     $config_object->isNew()->willReturn(TRUE);
 
@@ -468,7 +468,7 @@ public function testSaveMismatch() {
    * @covers ::save
    * @covers ::doSave
    */
-  public function testSaveNoMismatch() {
+  public function testSaveNoMismatch(): void {
     $immutable_config_object = $this->prophesize(ImmutableConfig::class);
     $immutable_config_object->isNew()->willReturn(TRUE);
 
@@ -510,7 +510,7 @@ public function testSaveNoMismatch() {
    * @covers ::save
    * @covers ::doSave
    */
-  public function testSaveChangedUuid() {
+  public function testSaveChangedUuid(): void {
     $config_object = $this->prophesize(ImmutableConfig::class);
     $config_object->get()->willReturn(['id' => 'foo']);
     $config_object->get('id')->willReturn('foo');
@@ -546,7 +546,7 @@ public function testSaveChangedUuid() {
    * @covers ::mapFromStorageRecords
    * @covers ::doLoadMultiple
    */
-  public function testLoad() {
+  public function testLoad(): void {
     $config_object = $this->prophesize(ImmutableConfig::class);
     $config_object->get()->willReturn(['id' => 'foo']);
     $config_object->get('id')->willReturn('foo');
@@ -573,7 +573,7 @@ public function testLoad() {
    * @covers ::mapFromStorageRecords
    * @covers ::doLoadMultiple
    */
-  public function testLoadMultipleAll() {
+  public function testLoadMultipleAll(): void {
     $foo_config_object = $this->prophesize(ImmutableConfig::class);
     $foo_config_object->get()->willReturn(['id' => 'foo']);
     $foo_config_object->get('id')->willReturn('foo');
@@ -611,7 +611,7 @@ public function testLoadMultipleAll() {
    * @covers ::mapFromStorageRecords
    * @covers ::doLoadMultiple
    */
-  public function testLoadMultipleIds() {
+  public function testLoadMultipleIds(): void {
     $config_object = $this->prophesize(ImmutableConfig::class);
     $config_object->get()->willReturn(['id' => 'foo']);
     $config_object->get('id')->willReturn('foo');
@@ -634,7 +634,7 @@ public function testLoadMultipleIds() {
    * @covers ::delete
    * @covers ::doDelete
    */
-  public function testDelete() {
+  public function testDelete(): void {
     // Dependencies are tested in
     // \Drupal\Tests\config\Kernel\ConfigDependencyTest.
     $this->configManager
@@ -676,7 +676,7 @@ public function testDelete() {
    * @covers ::delete
    * @covers ::doDelete
    */
-  public function testDeleteNothing() {
+  public function testDeleteNothing(): void {
     $this->moduleHandler->invokeAll(Argument::cetera())->shouldNotBeCalled();
 
     $this->configFactory->get(Argument::cetera())->shouldNotBeCalled();
diff --git a/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityTypeTest.php b/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityTypeTest.php
index 9b22d95d0b6c..b3b29d0d5172 100644
--- a/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityTypeTest.php
+++ b/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityTypeTest.php
@@ -60,7 +60,7 @@ protected function setUpConfigEntityType($definition) {
    *
    * @covers ::getConfigPrefix
    */
-  public function testConfigPrefixLengthExceeds() {
+  public function testConfigPrefixLengthExceeds(): void {
     // A provider length of 24 and config_prefix length of 59 (+1 for the .)
     // results in a config length of 84, which is too long.
     $definition = [
@@ -81,7 +81,7 @@ public function testConfigPrefixLengthExceeds() {
    *
    * @covers ::getConfigPrefix
    */
-  public function testConfigPrefixLengthValid() {
+  public function testConfigPrefixLengthValid(): void {
     // A provider length of 24 and config_prefix length of 58 (+1 for the .)
     // results in a config length of 83, which is right at the limit.
     $definition = [
@@ -96,7 +96,7 @@ public function testConfigPrefixLengthValid() {
   /**
    * @covers ::__construct
    */
-  public function testConstruct() {
+  public function testConstruct(): void {
     $config_entity = new ConfigEntityType([
       'id' => 'example_config_entity_type',
     ]);
@@ -106,7 +106,7 @@ public function testConstruct() {
   /**
    * @covers ::__construct
    */
-  public function testConstructBadStorage() {
+  public function testConstructBadStorage(): void {
     $this->expectException(ConfigEntityStorageClassException::class);
     $this->expectExceptionMessage('\Drupal\Core\Entity\KeyValueStore\KeyValueEntityStorage is not \Drupal\Core\Config\Entity\ConfigEntityStorage or it does not extend it');
     new ConfigEntityType([
@@ -118,7 +118,7 @@ public function testConstructBadStorage() {
   /**
    * @covers ::setStorageClass
    */
-  public function testSetStorageClass() {
+  public function testSetStorageClass(): void {
     $config_entity = $this->setUpConfigEntityType([]);
     $this->expectException(ConfigEntityStorageClassException::class);
     $this->expectExceptionMessage('\Drupal\Core\Entity\KeyValueStore\KeyValueEntityStorage is not \Drupal\Core\Config\Entity\ConfigEntityStorage or it does not extend it');
@@ -132,7 +132,7 @@ public function testSetStorageClass() {
    *
    * @covers ::getConfigPrefix
    */
-  public function testGetConfigPrefix($definition, $expected) {
+  public function testGetConfigPrefix($definition, $expected): void {
     $entity_type = $this->setUpConfigEntityType($definition);
     $this->assertSame($expected, $entity_type->getConfigPrefix());
   }
@@ -152,7 +152,7 @@ public static function providerTestGetConfigPrefix() {
    *
    * @dataProvider providerGetPropertiesToExport
    */
-  public function testGetPropertiesToExport($definition, $expected) {
+  public function testGetPropertiesToExport($definition, $expected): void {
     $entity_type = $this->setUpConfigEntityType($definition);
     $properties_to_export = $entity_type->getPropertiesToExport();
     $this->assertSame($expected, $properties_to_export);
@@ -202,7 +202,7 @@ public static function providerGetPropertiesToExport() {
   /**
    * @covers ::getPropertiesToExport
    */
-  public function testGetPropertiesToExportNoFallback() {
+  public function testGetPropertiesToExportNoFallback(): void {
     $config_entity_type = new ConfigEntityType([
       'id' => 'example_config_entity_type',
     ]);
diff --git a/core/tests/Drupal/Tests/Core/Config/Entity/EntityDisplayBaseTest.php b/core/tests/Drupal/Tests/Core/Config/Entity/EntityDisplayBaseTest.php
index 010bc319174c..a45e3d10bd2a 100644
--- a/core/tests/Drupal/Tests/Core/Config/Entity/EntityDisplayBaseTest.php
+++ b/core/tests/Drupal/Tests/Core/Config/Entity/EntityDisplayBaseTest.php
@@ -34,7 +34,7 @@ protected function setUp(): void {
   /**
    * @covers ::getTargetEntityTypeId
    */
-  public function testGetTargetEntityTypeId() {
+  public function testGetTargetEntityTypeId(): void {
     $reflection = new \ReflectionProperty($this->entityDisplay, 'targetEntityType');
     $reflection->setValue($this->entityDisplay, 'test');
     $this->assertEquals('test', $this->entityDisplay->getTargetEntityTypeId());
@@ -43,7 +43,7 @@ public function testGetTargetEntityTypeId() {
   /**
    * @covers ::getMode
    */
-  public function testGetMode() {
+  public function testGetMode(): void {
     $reflection = new \ReflectionProperty($this->entityDisplay, 'mode');
     $reflection->setValue($this->entityDisplay, 'test');
     $this->assertEquals('test', $this->entityDisplay->getMode());
@@ -52,7 +52,7 @@ public function testGetMode() {
   /**
    * @covers ::getOriginalMode
    */
-  public function testGetOriginalMode() {
+  public function testGetOriginalMode(): void {
     $reflection = new \ReflectionProperty($this->entityDisplay, 'originalMode');
     $reflection->setValue($this->entityDisplay, 'test');
     $this->assertEquals('test', $this->entityDisplay->getOriginalMode());
@@ -61,7 +61,7 @@ public function testGetOriginalMode() {
   /**
    * @covers ::getTargetBundle
    */
-  public function testGetTargetBundle() {
+  public function testGetTargetBundle(): void {
     $reflection = new \ReflectionProperty($this->entityDisplay, 'bundle');
     $reflection->setValue($this->entityDisplay, 'test');
     $this->assertEquals('test', $this->entityDisplay->getTargetBundle());
@@ -70,7 +70,7 @@ public function testGetTargetBundle() {
   /**
    * @covers ::setTargetBundle
    */
-  public function testSetTargetBundle() {
+  public function testSetTargetBundle(): void {
     $reflection = new \ReflectionProperty($this->entityDisplay, 'bundle');
     $this->entityDisplay->setTargetBundle('test');
     $this->assertEquals('test', $reflection->getValue($this->entityDisplay));
diff --git a/core/tests/Drupal/Tests/Core/Config/Entity/EntityDisplayModeBaseUnitTest.php b/core/tests/Drupal/Tests/Core/Config/Entity/EntityDisplayModeBaseUnitTest.php
index c71a84836c3b..8cf5161535a7 100644
--- a/core/tests/Drupal/Tests/Core/Config/Entity/EntityDisplayModeBaseUnitTest.php
+++ b/core/tests/Drupal/Tests/Core/Config/Entity/EntityDisplayModeBaseUnitTest.php
@@ -77,7 +77,7 @@ protected function setUp(): void {
   /**
    * @covers ::calculateDependencies
    */
-  public function testCalculateDependencies() {
+  public function testCalculateDependencies(): void {
     $target_entity_type_id = $this->randomMachineName(16);
 
     $target_entity_type = $this->createMock('\Drupal\Core\Entity\EntityTypeInterface');
@@ -101,7 +101,7 @@ public function testCalculateDependencies() {
   /**
    * @covers ::setTargetType
    */
-  public function testSetTargetType() {
+  public function testSetTargetType(): void {
     // Generate mock.
     $mock = $this->getMockBuilder('Drupal\Core\Entity\EntityDisplayModeBase')
       ->onlyMethods([])
@@ -128,7 +128,7 @@ public function testSetTargetType() {
   /**
    * @covers ::getTargetType
    */
-  public function testGetTargetType() {
+  public function testGetTargetType(): void {
     // Generate mock.
     $mock = $this->getMockBuilder('Drupal\Core\Entity\EntityDisplayModeBase')
       ->onlyMethods([])
diff --git a/core/tests/Drupal/Tests/Core/Config/Entity/Query/QueryFactoryTest.php b/core/tests/Drupal/Tests/Core/Config/Entity/Query/QueryFactoryTest.php
index f46f41db5137..f8a36d4cc206 100644
--- a/core/tests/Drupal/Tests/Core/Config/Entity/Query/QueryFactoryTest.php
+++ b/core/tests/Drupal/Tests/Core/Config/Entity/Query/QueryFactoryTest.php
@@ -105,7 +105,7 @@ public static function providerTestGetKeys(): \Generator {
    * @covers ::getKeys
    * @covers ::getValues
    */
-  public function testGetKeysWildCardEnd() {
+  public function testGetKeysWildCardEnd(): void {
     $config_factory = $this->createMock('Drupal\Core\Config\ConfigFactoryInterface');
     $key_value_factory = $this->createMock('Drupal\Core\KeyValueStore\KeyValueFactoryInterface');
     $config_manager = $this->createMock('Drupal\Core\Config\ConfigManagerInterface');
diff --git a/core/tests/Drupal/Tests/Core/Config/ExtensionInstallStorageTest.php b/core/tests/Drupal/Tests/Core/Config/ExtensionInstallStorageTest.php
index 4444073b0873..94254800e37d 100644
--- a/core/tests/Drupal/Tests/Core/Config/ExtensionInstallStorageTest.php
+++ b/core/tests/Drupal/Tests/Core/Config/ExtensionInstallStorageTest.php
@@ -19,7 +19,7 @@ class ExtensionInstallStorageTest extends UnitTestCase {
   /**
    * @covers ::createCollection
    */
-  public function testCreateCollection() {
+  public function testCreateCollection(): void {
     $memory = new MemoryStorage();
     $include_profile = FALSE;
     $profile = $this->randomMachineName();
diff --git a/core/tests/Drupal/Tests/Core/Config/ImmutableConfigTest.php b/core/tests/Drupal/Tests/Core/Config/ImmutableConfigTest.php
index 29375c3e5254..0b32fdbc7185 100644
--- a/core/tests/Drupal/Tests/Core/Config/ImmutableConfigTest.php
+++ b/core/tests/Drupal/Tests/Core/Config/ImmutableConfigTest.php
@@ -35,7 +35,7 @@ protected function setUp(): void {
   /**
    * @covers ::set
    */
-  public function testSet() {
+  public function testSet(): void {
     $this->expectException(ImmutableConfigException::class);
     $this->expectExceptionMessage('Can not set values on immutable configuration test:name. Use \Drupal\Core\Config\ConfigFactoryInterface::getEditable() to retrieve a mutable configuration object');
     $this->config->set('name', 'value');
@@ -44,7 +44,7 @@ public function testSet() {
   /**
    * @covers ::clear
    */
-  public function testClear() {
+  public function testClear(): void {
     $this->expectException(ImmutableConfigException::class);
     $this->expectExceptionMessage('Can not clear name key in immutable configuration test. Use \Drupal\Core\Config\ConfigFactoryInterface::getEditable() to retrieve a mutable configuration object');
     $this->config->clear('name');
@@ -53,7 +53,7 @@ public function testClear() {
   /**
    * @covers ::save
    */
-  public function testSave() {
+  public function testSave(): void {
     $this->expectException(ImmutableConfigException::class);
     $this->expectExceptionMessage('Can not save immutable configuration test. Use \Drupal\Core\Config\ConfigFactoryInterface::getEditable() to retrieve a mutable configuration object');
     $this->config->save();
@@ -62,7 +62,7 @@ public function testSave() {
   /**
    * @covers ::delete
    */
-  public function testDelete() {
+  public function testDelete(): void {
     $this->expectException(ImmutableConfigException::class);
     $this->expectExceptionMessage('Can not delete immutable configuration test. Use \Drupal\Core\Config\ConfigFactoryInterface::getEditable() to retrieve a mutable configuration object');
     $this->config->delete();
diff --git a/core/tests/Drupal/Tests/Core/Config/NullStorageTest.php b/core/tests/Drupal/Tests/Core/Config/NullStorageTest.php
index 1a8f92287879..b81cf2c24fc8 100644
--- a/core/tests/Drupal/Tests/Core/Config/NullStorageTest.php
+++ b/core/tests/Drupal/Tests/Core/Config/NullStorageTest.php
@@ -18,7 +18,7 @@ class NullStorageTest extends UnitTestCase {
   /**
    * Tests createCollection.
    */
-  public function testCollection() {
+  public function testCollection(): void {
     $nullStorage = new NullStorage();
     $collection = $nullStorage->createCollection('test');
     $this->assertInstanceOf(StorageInterface::class, $collection);
diff --git a/core/tests/Drupal/Tests/Core/Config/ReadOnlyStorageTest.php b/core/tests/Drupal/Tests/Core/Config/ReadOnlyStorageTest.php
index 980d5fd47210..7d5dc0eed6bf 100644
--- a/core/tests/Drupal/Tests/Core/Config/ReadOnlyStorageTest.php
+++ b/core/tests/Drupal/Tests/Core/Config/ReadOnlyStorageTest.php
@@ -53,7 +53,7 @@ protected function setUp(): void {
    *
    * @dataProvider readMethodsProvider
    */
-  public function testReadOperations($method, $arguments, $fixture) {
+  public function testReadOperations($method, $arguments, $fixture): void {
     $this->setRandomFixtureConfig($fixture);
 
     $expected = call_user_func_array([$this->memory, $method], $arguments);
@@ -93,7 +93,7 @@ public static function readMethodsProvider() {
    *
    * @dataProvider writeMethodsProvider
    */
-  public function testWriteOperations($method, $arguments, $fixture) {
+  public function testWriteOperations($method, $arguments, $fixture): void {
     $this->setRandomFixtureConfig($fixture);
 
     // Create an independent memory storage as a backup.
@@ -143,7 +143,7 @@ public static function writeMethodsProvider() {
    * @covers ::getCollectionName
    * @covers ::createCollection
    */
-  public function testCollections() {
+  public function testCollections(): void {
     $fixture = [
       StorageInterface::DEFAULT_COLLECTION => [$this->randomMachineName()],
       'A' => [$this->randomMachineName()],
@@ -165,7 +165,7 @@ public function testCollections() {
    * @covers ::encode
    * @covers ::decode
    */
-  public function testEncodeDecode() {
+  public function testEncodeDecode(): void {
     $array = (array) $this->getRandomGenerator()->object();
     $string = $this->getRandomGenerator()->string();
 
diff --git a/core/tests/Drupal/Tests/Core/Config/StorageComparerTest.php b/core/tests/Drupal/Tests/Core/Config/StorageComparerTest.php
index a3c7e63fea22..a9f0a881ce12 100644
--- a/core/tests/Drupal/Tests/Core/Config/StorageComparerTest.php
+++ b/core/tests/Drupal/Tests/Core/Config/StorageComparerTest.php
@@ -110,7 +110,7 @@ protected function getConfigData() {
   /**
    * @covers ::createChangelist
    */
-  public function testCreateChangelistNoChange() {
+  public function testCreateChangelistNoChange(): void {
     $config_data = $this->getConfigData();
     $config_files = array_keys($config_data);
     $this->sourceStorage->expects($this->once())
@@ -141,7 +141,7 @@ public function testCreateChangelistNoChange() {
   /**
    * @covers ::createChangelist
    */
-  public function testCreateChangelistCreate() {
+  public function testCreateChangelistCreate(): void {
     $target_data = $source_data = $this->getConfigData();
     unset($target_data['field.storage.node.body']);
     unset($target_data['field.field.node.article.body']);
@@ -180,7 +180,7 @@ public function testCreateChangelistCreate() {
   /**
    * @covers ::createChangelist
    */
-  public function testCreateChangelistDelete() {
+  public function testCreateChangelistDelete(): void {
     $target_data = $source_data = $this->getConfigData();
     unset($source_data['field.storage.node.body']);
     unset($source_data['field.field.node.article.body']);
@@ -219,7 +219,7 @@ public function testCreateChangelistDelete() {
   /**
    * @covers ::createChangelist
    */
-  public function testCreateChangelistUpdate() {
+  public function testCreateChangelistUpdate(): void {
     $target_data = $source_data = $this->getConfigData();
     $source_data['system.site']['title'] = 'Drupal New!';
     $source_data['field.field.node.article.body']['new_config_key'] = 'new data';
@@ -258,7 +258,7 @@ public function testCreateChangelistUpdate() {
   /**
    * @covers ::createChangelist
    */
-  public function testDifferentCollections() {
+  public function testDifferentCollections(): void {
     $source = new MemoryStorage();
     $target = new MemoryStorage();
 
diff --git a/core/tests/Drupal/Tests/Core/Config/StorageCopyTraitTest.php b/core/tests/Drupal/Tests/Core/Config/StorageCopyTraitTest.php
index 2dc0b1fd0cac..ef2e486a54d7 100644
--- a/core/tests/Drupal/Tests/Core/Config/StorageCopyTraitTest.php
+++ b/core/tests/Drupal/Tests/Core/Config/StorageCopyTraitTest.php
@@ -26,7 +26,7 @@ class StorageCopyTraitTest extends UnitTestCase {
    *
    * @dataProvider providerTestReplaceStorageContents
    */
-  public function testReplaceStorageContents($source_collections, $target_collections) {
+  public function testReplaceStorageContents($source_collections, $target_collections): void {
     $source = new MemoryStorage();
     $target = new MemoryStorage();
     // Empty the storage should be the same.
@@ -121,7 +121,7 @@ protected function generateRandomData(StorageInterface $storage, $collections =
    *
    * @covers ::replaceStorageContents
    */
-  public function testWithInvalidConfiguration() {
+  public function testWithInvalidConfiguration(): void {
     $source = new TestStorage();
     $this->generateRandomData($source);
 
diff --git a/core/tests/Drupal/Tests/Core/Controller/AjaxRendererTest.php b/core/tests/Drupal/Tests/Core/Controller/AjaxRendererTest.php
index a1d4e38e27fd..c6e1e92df258 100644
--- a/core/tests/Drupal/Tests/Core/Controller/AjaxRendererTest.php
+++ b/core/tests/Drupal/Tests/Core/Controller/AjaxRendererTest.php
@@ -68,7 +68,7 @@ protected function setUp(): void {
    *
    * @covers ::renderResponse
    */
-  public function testRenderWithFragmentObject() {
+  public function testRenderWithFragmentObject(): void {
     $main_content = ['#markup' => 'example content'];
     $request = new Request();
     $route_match = $this->createMock('Drupal\Core\Routing\RouteMatchInterface');
diff --git a/core/tests/Drupal/Tests/Core/Controller/ControllerBaseTest.php b/core/tests/Drupal/Tests/Core/Controller/ControllerBaseTest.php
index 0ddb46e121a1..6e58e56896af 100644
--- a/core/tests/Drupal/Tests/Core/Controller/ControllerBaseTest.php
+++ b/core/tests/Drupal/Tests/Core/Controller/ControllerBaseTest.php
@@ -32,7 +32,7 @@ protected function setUp(): void {
   /**
    * Tests the config method.
    */
-  public function testGetConfig() {
+  public function testGetConfig(): void {
     $config_factory = $this->getConfigFactoryStub([
       'config_name' => [
         'key' => 'value',
diff --git a/core/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php b/core/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php
index bfc368dd08db..4634e966fe98 100644
--- a/core/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php
+++ b/core/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php
@@ -52,7 +52,7 @@ protected function setUp(): void {
    *
    * @dataProvider providerTestCreateController
    */
-  public function testCreateController($controller, $class, $output) {
+  public function testCreateController($controller, $class, $output): void {
     $this->container->set('some_service', new MockController());
     $result = $this->controllerResolver->getControllerFromDefinition($controller);
     $this->assertCallableController($result, $class, $output);
@@ -75,7 +75,7 @@ public static function providerTestCreateController() {
   /**
    * Tests createController() with a non-existent class.
    */
-  public function testCreateControllerNonExistentClass() {
+  public function testCreateControllerNonExistentClass(): void {
     $this->expectException(\InvalidArgumentException::class);
     $this->controllerResolver->getControllerFromDefinition('Class::method');
   }
@@ -83,7 +83,7 @@ public function testCreateControllerNonExistentClass() {
   /**
    * Tests createController() with an invalid name.
    */
-  public function testCreateControllerInvalidName() {
+  public function testCreateControllerInvalidName(): void {
     $this->expectException(\LogicException::class);
     $this->controllerResolver->getControllerFromDefinition('ClassWithoutMethod');
   }
@@ -93,7 +93,7 @@ public function testCreateControllerInvalidName() {
    *
    * @dataProvider providerTestGetController
    */
-  public function testGetController($attributes, $class, $output = NULL) {
+  public function testGetController($attributes, $class, $output = NULL): void {
     $request = new Request([], [], $attributes);
     $result = $this->controllerResolver->getController($request);
     if ($class) {
@@ -125,7 +125,7 @@ public static function providerTestGetController() {
    *
    * @dataProvider providerTestGetControllerFromDefinition
    */
-  public function testGetControllerFromDefinition($definition, $output) {
+  public function testGetControllerFromDefinition($definition, $output): void {
     $this->container->set('invoke_service', new MockInvokeController());
     $controller = $this->controllerResolver->getControllerFromDefinition($definition);
     $this->assertCallableController($controller, NULL, $output);
@@ -152,7 +152,7 @@ public static function providerTestGetControllerFromDefinition() {
   /**
    * Tests getControllerFromDefinition() without a callable.
    */
-  public function testGetControllerFromDefinitionNotCallable() {
+  public function testGetControllerFromDefinitionNotCallable(): void {
     $this->expectException(\InvalidArgumentException::class);
     $this->controllerResolver->getControllerFromDefinition('Drupal\Tests\Core\Controller\MockController::bananas');
   }
diff --git a/core/tests/Drupal/Tests/Core/Controller/TitleResolverTest.php b/core/tests/Drupal/Tests/Core/Controller/TitleResolverTest.php
index 7ce370711b83..f27c647a047c 100644
--- a/core/tests/Drupal/Tests/Core/Controller/TitleResolverTest.php
+++ b/core/tests/Drupal/Tests/Core/Controller/TitleResolverTest.php
@@ -63,7 +63,7 @@ protected function setUp(): void {
    *
    * @see \Drupal\Core\Controller\TitleResolver::getTitle()
    */
-  public function testStaticTitle() {
+  public function testStaticTitle(): void {
     $request = new Request();
     $route = new Route('/test-route', ['_title' => 'static title']);
     $this->assertEquals(new TranslatableMarkup('static title', [], [], $this->translationManager), $this->titleResolver->getTitle($request, $route));
@@ -74,7 +74,7 @@ public function testStaticTitle() {
    *
    * @see \Drupal\Core\Controller\TitleResolver::getTitle()
    */
-  public function testStaticTitleZero() {
+  public function testStaticTitleZero(): void {
     $request = new Request();
     $route = new Route('/test-route', ['_title' => '0', '_title_context' => '0']);
     $this->assertEquals(new TranslatableMarkup('0', [], ['context' => '0'], $this->translationManager), $this->titleResolver->getTitle($request, $route));
@@ -85,7 +85,7 @@ public function testStaticTitleZero() {
    *
    * @see \Drupal\Core\Controller\TitleResolver::getTitle()
    */
-  public function testStaticTitleWithContext() {
+  public function testStaticTitleWithContext(): void {
     $request = new Request();
     $route = new Route('/test-route', ['_title' => 'static title', '_title_context' => 'context']);
     $this->assertEquals(new TranslatableMarkup('static title', [], ['context' => 'context'], $this->translationManager), $this->titleResolver->getTitle($request, $route));
@@ -96,7 +96,7 @@ public function testStaticTitleWithContext() {
    *
    * @see \Drupal\Core\Controller\TitleResolver::getTitle()
    */
-  public function testStaticTitleWithParameter() {
+  public function testStaticTitleWithParameter(): void {
     $raw_variables = new InputBag(['test' => 'value', 'test2' => 'value2']);
     $request = new Request();
     $request->attributes->set('_raw_variables', $raw_variables);
@@ -113,7 +113,7 @@ public function testStaticTitleWithParameter() {
    *
    * @see \Drupal\Core\Controller\TitleResolver::getTitle()
    */
-  public function testStaticTitleWithNullAndArrayValueParameter() {
+  public function testStaticTitleWithNullAndArrayValueParameter(): void {
     $raw_variables = new InputBag(['test1' => NULL, 'test2' => ['foo' => 'bar'], 'test3' => 'value']);
     $request = new Request();
     $request->attributes->set('_raw_variables', $raw_variables);
@@ -134,7 +134,7 @@ public function testStaticTitleWithNullAndArrayValueParameter() {
    *
    * @see \Drupal\Core\Controller\TitleResolver::getTitle()
    */
-  public function testDynamicTitle() {
+  public function testDynamicTitle(): void {
     $request = new Request();
     $route = new Route('/test-route', ['_title' => 'static title', '_title_callback' => 'Drupal\Tests\Core\Controller\TitleCallback::example']);
 
diff --git a/core/tests/Drupal/Tests/Core/CronTest.php b/core/tests/Drupal/Tests/Core/CronTest.php
index d10be2b26f08..6326f4c38d6c 100644
--- a/core/tests/Drupal/Tests/Core/CronTest.php
+++ b/core/tests/Drupal/Tests/Core/CronTest.php
@@ -192,7 +192,7 @@ public static function processQueuesTestData() {
    * @covers ::processQueues
    * @dataProvider processQueuesTestData
    */
-  public function testProcessQueues($item, $message_logged_assertion, $count_post_run) {
+  public function testProcessQueues($item, $message_logged_assertion, $count_post_run): void {
     $this->resetTestingState();
     $this->queue->createItem($item);
     $this->assertFalse($this->state->get('cron_test.message_logged'));
@@ -205,7 +205,7 @@ public function testProcessQueues($item, $message_logged_assertion, $count_post_
   /**
    * Verify that RequeueException causes an item to be processed multiple times.
    */
-  public function testRequeueException() {
+  public function testRequeueException(): void {
     $this->resetTestingState();
     $this->queue->createItem('RequeueException');
     $this->cron->run();
diff --git a/core/tests/Drupal/Tests/Core/Database/ConditionTest.php b/core/tests/Drupal/Tests/Core/Database/ConditionTest.php
index 908b62650283..9cda46bd7b30 100644
--- a/core/tests/Drupal/Tests/Core/Database/ConditionTest.php
+++ b/core/tests/Drupal/Tests/Core/Database/ConditionTest.php
@@ -39,7 +39,7 @@ public static function providerSimpleCondition() {
    * @covers ::compile
    * @dataProvider providerSimpleCondition
    */
-  public function testSimpleCondition($expected, $field_name) {
+  public function testSimpleCondition($expected, $field_name): void {
     $connection = $this->prophesize(Connection::class);
     $connection->escapeField($field_name)->will(function ($args) {
       return preg_replace('/[^A-Za-z0-9_.]+/', '', $args[0]);
@@ -81,7 +81,7 @@ public function testSimpleCondition($expected, $field_name) {
    * @param mixed $expected_arguments
    *   (optional) The expected set arguments.
    */
-  public function testCompileWithKnownOperators($expected, $field, $value, $operator, $expected_arguments = NULL) {
+  public function testCompileWithKnownOperators($expected, $field, $value, $operator, $expected_arguments = NULL): void {
     $connection = $this->prophesize(Connection::class);
     $connection->escapeField(Argument::any())->will(function ($args) {
       return preg_replace('/[^A-Za-z0-9_.]+/', '', $args[0]);
@@ -150,7 +150,7 @@ public static function dataProviderTestCompileWithKnownOperators() {
    *
    * @dataProvider providerTestCompileWithSqlInjectionForOperator
    */
-  public function testCompileWithSqlInjectionForOperator($operator) {
+  public function testCompileWithSqlInjectionForOperator($operator): void {
     $connection = $this->prophesize(Connection::class);
     $connection->escapeField(Argument::any())->will(function ($args) {
       return preg_replace('/[^A-Za-z0-9_.]+/', '', $args[0]);
@@ -188,7 +188,7 @@ public static function providerTestCompileWithSqlInjectionForOperator() {
   /**
    * Tests that the core Condition can be overridden.
    */
-  public function testContribCondition() {
+  public function testContribCondition(): void {
     $connection = new StubConnection($this->createMock(StubPDO::class), [
       'namespace' => 'Drupal\mock\Driver\Database\mock',
       'prefix' => '',
diff --git a/core/tests/Drupal/Tests/Core/Database/ConnectionTest.php b/core/tests/Drupal/Tests/Core/Database/ConnectionTest.php
index fc3a4ddb5190..7e9ae828063d 100644
--- a/core/tests/Drupal/Tests/Core/Database/ConnectionTest.php
+++ b/core/tests/Drupal/Tests/Core/Database/ConnectionTest.php
@@ -50,7 +50,7 @@ public static function providerPrefixRoundTrip() {
    *
    * @dataProvider providerPrefixRoundTrip
    */
-  public function testPrefixRoundTrip($expected, $prefix_info) {
+  public function testPrefixRoundTrip($expected, $prefix_info): void {
     $mock_pdo = $this->createMock('Drupal\Tests\Core\Database\Stub\StubPDO');
     $connection = new StubConnection($mock_pdo, []);
 
@@ -110,7 +110,7 @@ public static function providerTestPrefixTables() {
    *
    * @dataProvider providerTestPrefixTables
    */
-  public function testPrefixTables($expected, $prefix_info, $query, array $quote_identifier = ['"', '"']) {
+  public function testPrefixTables($expected, $prefix_info, $query, array $quote_identifier = ['"', '"']): void {
     $mock_pdo = $this->createMock('Drupal\Tests\Core\Database\Stub\StubPDO');
     $connection = new StubConnection($mock_pdo, ['prefix' => $prefix_info], $quote_identifier);
     $this->assertEquals($expected, $connection->prefixTables($query));
@@ -319,7 +319,7 @@ public static function providerGetDriverClass() {
    * @dataProvider providerGetDriverClass
    * @group legacy
    */
-  public function testGetDriverClass($expected, $namespace, $class) {
+  public function testGetDriverClass($expected, $namespace, $class): void {
     $additional_class_loader = new ClassLoader();
     $additional_class_loader->addPsr4("Drupal\\core_fake\\Driver\\Database\\CoreFake\\", __DIR__ . "/../../../../../tests/fixtures/database_drivers/module/core_fake/src/Driver/Database/CoreFake");
     $additional_class_loader->addPsr4("Drupal\\core_fake\\Driver\\Database\\CoreFakeWithAllCustomClasses\\", __DIR__ . "/../../../../../tests/fixtures/database_drivers/module/core_fake/src/Driver/Database/CoreFakeWithAllCustomClasses");
@@ -369,7 +369,7 @@ public static function providerSchema() {
    *
    * @dataProvider providerSchema
    */
-  public function testSchema($expected, $driver, $namespace) {
+  public function testSchema($expected, $driver, $namespace): void {
     $mock_pdo = $this->createMock('Drupal\Tests\Core\Database\Stub\StubPDO');
     $connection = new StubConnection($mock_pdo, ['namespace' => $namespace]);
     $connection->driver = $driver;
@@ -406,7 +406,7 @@ public static function providerMakeComments() {
    *
    * @dataProvider providerMakeComments
    */
-  public function testMakeComments($expected, $comment_array) {
+  public function testMakeComments($expected, $comment_array): void {
     $mock_pdo = $this->createMock('Drupal\Tests\Core\Database\Stub\StubPDO');
     $connection = new StubConnection($mock_pdo, []);
     $this->assertEquals($expected, $connection->makeComment($comment_array));
@@ -433,7 +433,7 @@ public static function providerFilterComments() {
    *
    * @dataProvider providerFilterComments
    */
-  public function testFilterComments($expected, $comment) {
+  public function testFilterComments($expected, $comment): void {
     $mock_pdo = $this->createMock('Drupal\Tests\Core\Database\Stub\StubPDO');
     $connection = new StubConnection($mock_pdo, []);
 
@@ -475,7 +475,7 @@ public static function providerEscapeTables() {
    * @covers ::escapeTable
    * @dataProvider providerEscapeTables
    */
-  public function testEscapeTable($expected, $name, array $identifier_quote = ['"', '"']) {
+  public function testEscapeTable($expected, $name, array $identifier_quote = ['"', '"']): void {
     $mock_pdo = $this->createMock(StubPDO::class);
     $connection = new StubConnection($mock_pdo, [], $identifier_quote);
 
@@ -506,7 +506,7 @@ public static function providerEscapeAlias() {
    * @covers ::escapeAlias
    * @dataProvider providerEscapeAlias
    */
-  public function testEscapeAlias($expected, $name, array $identifier_quote = ['"', '"']) {
+  public function testEscapeAlias($expected, $name, array $identifier_quote = ['"', '"']): void {
     $mock_pdo = $this->createMock(StubPDO::class);
     $connection = new StubConnection($mock_pdo, [], $identifier_quote);
 
@@ -540,7 +540,7 @@ public static function providerEscapeFields() {
    * @covers ::escapeField
    * @dataProvider providerEscapeFields
    */
-  public function testEscapeField($expected, $name, array $identifier_quote = ['"', '"']) {
+  public function testEscapeField($expected, $name, array $identifier_quote = ['"', '"']): void {
     $mock_pdo = $this->createMock(StubPDO::class);
     $connection = new StubConnection($mock_pdo, [], $identifier_quote);
 
@@ -569,7 +569,7 @@ public static function providerEscapeDatabase() {
    * @covers ::escapeDatabase
    * @dataProvider providerEscapeDatabase
    */
-  public function testEscapeDatabase($expected, $name, array $identifier_quote = ['"', '"']) {
+  public function testEscapeDatabase($expected, $name, array $identifier_quote = ['"', '"']): void {
     $mock_pdo = $this->createMock(StubPDO::class);
     $connection = new StubConnection($mock_pdo, [], $identifier_quote);
 
@@ -579,7 +579,7 @@ public function testEscapeDatabase($expected, $name, array $identifier_quote = [
   /**
    * @covers ::__construct
    */
-  public function testIdentifierQuotesAssertCount() {
+  public function testIdentifierQuotesAssertCount(): void {
     $this->expectException(\AssertionError::class);
     $this->expectExceptionMessage('\Drupal\Core\Database\Connection::$identifierQuotes must contain 2 string values');
     $mock_pdo = $this->createMock(StubPDO::class);
@@ -589,7 +589,7 @@ public function testIdentifierQuotesAssertCount() {
   /**
    * @covers ::__construct
    */
-  public function testIdentifierQuotesAssertString() {
+  public function testIdentifierQuotesAssertString(): void {
     $this->expectException(\AssertionError::class);
     $this->expectExceptionMessage('\Drupal\Core\Database\Connection::$identifierQuotes must contain 2 string values');
     $mock_pdo = $this->createMock(StubPDO::class);
@@ -599,7 +599,7 @@ public function testIdentifierQuotesAssertString() {
   /**
    * @covers ::__construct
    */
-  public function testNamespaceDefault() {
+  public function testNamespaceDefault(): void {
     $mock_pdo = $this->createMock(StubPDO::class);
     $connection = new StubConnection($mock_pdo, []);
     $this->assertSame('Drupal\Tests\Core\Database\Stub', $connection->getConnectionOptions()['namespace']);
@@ -610,7 +610,7 @@ public function testNamespaceDefault() {
    *
    * @dataProvider provideQueriesToTrim
    */
-  public function testQueryTrim($expected, $query, $options) {
+  public function testQueryTrim($expected, $query, $options): void {
     $mock_pdo = $this->getMockBuilder(StubPdo::class)->getMock();
     $connection = new StubConnection($mock_pdo, []);
 
@@ -669,7 +669,7 @@ public static function provideQueriesToTrim() {
    * @covers ::removeDatabaseEntriesFromDebugBacktrace
    * @covers ::getDebugBacktrace
    */
-  public function testFindCallerFromDebugBacktrace() {
+  public function testFindCallerFromDebugBacktrace(): void {
     Database::addConnectionInfo('default', 'default', [
       'driver' => 'test',
       'namespace' => 'Drupal\Tests\Core\Database\Stub',
diff --git a/core/tests/Drupal/Tests/Core/Database/OrderByTest.php b/core/tests/Drupal/Tests/Core/Database/OrderByTest.php
index f6b21a04c24c..a031d24d495f 100644
--- a/core/tests/Drupal/Tests/Core/Database/OrderByTest.php
+++ b/core/tests/Drupal/Tests/Core/Database/OrderByTest.php
@@ -37,7 +37,7 @@ protected function setUp(): void {
   /**
    * Checks that invalid sort directions in ORDER BY get converted to ASC.
    */
-  public function testInvalidDirection() {
+  public function testInvalidDirection(): void {
     $this->query->orderBy('test', 'invalid direction');
     $order_bys = $this->query->getOrderBy();
     $this->assertEquals('ASC', $order_bys['test'], 'Invalid order by direction is converted to ASC.');
@@ -46,7 +46,7 @@ public function testInvalidDirection() {
   /**
    * Tests that fields passed for ordering get escaped properly.
    */
-  public function testFieldEscaping() {
+  public function testFieldEscaping(): void {
     $this->query->orderBy('x; DROP table node; --');
     $sql = $this->query->__toString();
     $this->assertStringEndsWith('ORDER BY xDROPtablenode ASC', $sql, 'Order by field is escaped correctly.');
diff --git a/core/tests/Drupal/Tests/Core/Database/RowCountExceptionTest.php b/core/tests/Drupal/Tests/Core/Database/RowCountExceptionTest.php
index aa978be52e60..411bec228eaf 100644
--- a/core/tests/Drupal/Tests/Core/Database/RowCountExceptionTest.php
+++ b/core/tests/Drupal/Tests/Core/Database/RowCountExceptionTest.php
@@ -35,7 +35,7 @@ public static function providerTestExceptionMessage() {
    * @covers ::__construct
    * @dataProvider providerTestExceptionMessage
    */
-  public function testExceptionMessage($expected, $message) {
+  public function testExceptionMessage($expected, $message): void {
     $e = new RowCountException($message);
     $this->assertSame($expected, $e->getMessage());
   }
@@ -44,7 +44,7 @@ public function testExceptionMessage($expected, $message) {
    * @covers ::__construct
    * @group legacy
    */
-  public function testExceptionMessageNull() {
+  public function testExceptionMessageNull(): void {
     $e = new RowCountException(NULL);
     $this->assertSame(static::DEFAULT_EXCEPTION_MESSAGE, $e->getMessage());
   }
diff --git a/core/tests/Drupal/Tests/Core/Database/UrlConversionTest.php b/core/tests/Drupal/Tests/Core/Database/UrlConversionTest.php
index c2e8f1352332..4548ed42c3d9 100644
--- a/core/tests/Drupal/Tests/Core/Database/UrlConversionTest.php
+++ b/core/tests/Drupal/Tests/Core/Database/UrlConversionTest.php
@@ -28,7 +28,7 @@ class UrlConversionTest extends UnitTestCase {
    *
    * @dataProvider providerConvertDbUrlToConnectionInfo
    */
-  public function testDbUrlToConnectionConversion($url, $database_array, $include_test_drivers) {
+  public function testDbUrlToConnectionConversion($url, $database_array, $include_test_drivers): void {
     $result = Database::convertDbUrlToConnectionInfo($url, $this->root, $include_test_drivers);
     $this->assertEquals($database_array, $result);
   }
@@ -278,7 +278,7 @@ public static function providerConvertDbUrlToConnectionInfo() {
    *
    * @dataProvider providerInvalidArgumentsUrlConversion
    */
-  public function testGetInvalidArgumentExceptionInUrlConversion($url, $root, $expected_exception_message) {
+  public function testGetInvalidArgumentExceptionInUrlConversion($url, $root, $expected_exception_message): void {
     $this->expectException(\InvalidArgumentException::class);
     $this->expectExceptionMessage($expected_exception_message);
     Database::convertDbUrlToConnectionInfo($url, $root);
@@ -310,7 +310,7 @@ public static function providerInvalidArgumentsUrlConversion() {
    *
    * @dataProvider providerGetConnectionInfoAsUrl
    */
-  public function testGetConnectionInfoAsUrl(array $info, $expected_url) {
+  public function testGetConnectionInfoAsUrl(array $info, $expected_url): void {
     Database::addConnectionInfo('default', 'default', $info);
     $url = Database::getConnectionInfoAsUrl();
     $this->assertEquals($expected_url, $url);
@@ -461,7 +461,7 @@ public static function providerGetConnectionInfoAsUrl() {
    *
    * @dataProvider providerInvalidArgumentGetConnectionInfoAsUrl
    */
-  public function testGetInvalidArgumentGetConnectionInfoAsUrl(array $connection_options, $expected_exception_message) {
+  public function testGetInvalidArgumentGetConnectionInfoAsUrl(array $connection_options, $expected_exception_message): void {
     Database::addConnectionInfo('default', 'default', $connection_options);
     $this->expectException(\InvalidArgumentException::class);
     $this->expectExceptionMessage($expected_exception_message);
@@ -493,7 +493,7 @@ public static function providerInvalidArgumentGetConnectionInfoAsUrl() {
   /**
    * @covers ::convertDbUrlToConnectionInfo
    */
-  public function testDriverModuleDoesNotExist() {
+  public function testDriverModuleDoesNotExist(): void {
     $url = 'foo_bar_mysql://test_user:test_pass@test_host:3306/test_database?module=foo_bar';
     $this->expectException(UnknownExtensionException::class);
     $this->expectExceptionMessage("The database_driver Drupal\\foo_bar\\Driver\\Database\\foo_bar_mysql does not exist.");
@@ -503,7 +503,7 @@ public function testDriverModuleDoesNotExist() {
   /**
    * @covers ::convertDbUrlToConnectionInfo
    */
-  public function testModuleDriverDoesNotExist() {
+  public function testModuleDriverDoesNotExist(): void {
     $url = 'driver_test_mysql://test_user:test_pass@test_host:3306/test_database?module=driver_test';
     $this->expectException(UnknownExtensionException::class);
     $this->expectExceptionMessage("The database_driver Drupal\\driver_test\\Driver\\Database\\driver_test_mysql does not exist.");
diff --git a/core/tests/Drupal/Tests/Core/Datetime/DateHelperTest.php b/core/tests/Drupal/Tests/Core/Datetime/DateHelperTest.php
index 40111e41eec7..432b9bc083d9 100644
--- a/core/tests/Drupal/Tests/Core/Datetime/DateHelperTest.php
+++ b/core/tests/Drupal/Tests/Core/Datetime/DateHelperTest.php
@@ -49,7 +49,7 @@ protected function setUp(): void {
    * @covers ::weekDaysOrdered
    * @dataProvider providerTestWeekDaysOrdered
    */
-  public function testWeekDaysOrdered($first_day, $expected) {
+  public function testWeekDaysOrdered($first_day, $expected): void {
     $container = new ContainerBuilder();
     $config = ['system.date' => ['first_day' => $first_day]];
     $container->set('config.factory', $this->getConfigFactoryStub($config));
@@ -164,7 +164,7 @@ public static function providerTestWeekDaysOrdered() {
   /**
    * @covers ::daysInMonth
    */
-  public function testDaysInMonth() {
+  public function testDaysInMonth(): void {
     // @todo Consider deprecating passing NULL in
     //   https://www.drupal.org/project/drupal/issues/3299788
     // Passing NULL, FALSE, or an empty string should default to now. Just
@@ -189,7 +189,7 @@ public function testDaysInMonth() {
   /**
    * @covers ::daysInYear
    */
-  public function testDaysInYear() {
+  public function testDaysInYear(): void {
     // Passing NULL, FALSE, or an empty string should default to now. Just
     // check these are NOT null to avoid copying the implementation here.
     $this->assertNotNull(DateHelper::daysInYear());
@@ -213,7 +213,7 @@ public function testDaysInYear() {
   /**
    * @covers ::dayOfWeek
    */
-  public function testDayOfWeek() {
+  public function testDayOfWeek(): void {
     // Passing NULL, FALSE, or an empty string should default to now. Just
     // check these are NOT null to avoid copying the implementation here.
     $this->assertNotNull(DateHelper::dayOfWeek());
@@ -238,7 +238,7 @@ public function testDayOfWeek() {
   /**
    * @covers ::dayOfWeekName
    */
-  public function testDayOfWeekName() {
+  public function testDayOfWeekName(): void {
     // Passing NULL, FALSE, or an empty string should default to now. Just
     // check these are NOT null to avoid copying the implementation here.
     $this->assertNotNull(DateHelper::dayOfWeekName());
diff --git a/core/tests/Drupal/Tests/Core/Datetime/DateTest.php b/core/tests/Drupal/Tests/Core/Datetime/DateTest.php
index a31757d9ef85..f049ecf5a4c7 100644
--- a/core/tests/Drupal/Tests/Core/Datetime/DateTest.php
+++ b/core/tests/Drupal/Tests/Core/Datetime/DateTest.php
@@ -102,7 +102,7 @@ protected function setUp(): void {
    *
    * @covers ::formatInterval
    */
-  public function testFormatInterval($interval, $granularity, $expected, $langcode = NULL) {
+  public function testFormatInterval($interval, $granularity, $expected, $langcode = NULL): void {
     // Mocks a simple formatPlural implementation.
     $this->stringTranslation->expects($this->any())
       ->method('translateString')
@@ -159,7 +159,7 @@ public static function providerTestFormatInterval() {
   /**
    * Tests the formatInterval method for 0 second.
    */
-  public function testFormatIntervalZeroSecond() {
+  public function testFormatIntervalZeroSecond(): void {
     $result = $this->dateFormatter->formatInterval(0, 1, 'xxx-lolspeak');
     $this->assertEquals(new TranslatableMarkup('0 sec', [], ['langcode' => 'xxx-lolspeak'], $this->stringTranslation), $result);
   }
@@ -169,7 +169,7 @@ public function testFormatIntervalZeroSecond() {
    *
    * @covers \Drupal\Core\Datetime\DateFormatter::getSampleDateFormats
    */
-  public function testGetSampleDateFormats() {
+  public function testGetSampleDateFormats(): void {
     $timestamp = strtotime('2015-03-22 14:23:00');
     $expected = $this->dateFormatter->getSampleDateFormats('en', $timestamp, 'Australia/Sydney');
 
@@ -189,7 +189,7 @@ public function testGetSampleDateFormats() {
    *
    * @covers ::formatTimeDiffUntil
    */
-  public function testFormatTimeDiffUntil() {
+  public function testFormatTimeDiffUntil(): void {
     $expected = '1 second';
     $request_time = self::createTimestamp('2013-12-11 10:09:08');
     $timestamp = self::createTimestamp('2013-12-11 10:09:09');
@@ -222,7 +222,7 @@ public function testFormatTimeDiffUntil() {
    *
    * @covers ::formatTimeDiffSince
    */
-  public function testFormatTimeDiffSince() {
+  public function testFormatTimeDiffSince(): void {
     $expected = '1 second';
     $timestamp = self::createTimestamp('2013-12-11 10:09:07');
     $request_time = self::createTimestamp('2013-12-11 10:09:08');
@@ -404,7 +404,7 @@ public static function providerTestFormatDiff(): array {
    * @covers \Drupal\Core\Datetime\FormattedDateDiff::getString
    * @covers \Drupal\Core\Datetime\FormattedDateDiff::getCacheMaxAge
    */
-  public function testFormattedDateDiff() {
+  public function testFormattedDateDiff(): void {
     $string = '10 minutes';
     $max_age = 60;
     $object = new FormattedDateDiff($string, $max_age);
diff --git a/core/tests/Drupal/Tests/Core/Datetime/DrupalDateTimeTest.php b/core/tests/Drupal/Tests/Core/Datetime/DrupalDateTimeTest.php
index b523f4e0aaf9..150c3b2d4ed1 100644
--- a/core/tests/Drupal/Tests/Core/Datetime/DrupalDateTimeTest.php
+++ b/core/tests/Drupal/Tests/Core/Datetime/DrupalDateTimeTest.php
@@ -30,7 +30,7 @@ class DrupalDateTimeTest extends UnitTestCase {
    *
    * @dataProvider providerTestDateDiff
    */
-  public function testDateDiff($input1, $input2, $absolute, \DateInterval $expected) {
+  public function testDateDiff($input1, $input2, $absolute, \DateInterval $expected): void {
     $interval = $input1->diff($input2, $absolute);
     $this->assertEquals($interval, $expected);
   }
@@ -47,7 +47,7 @@ public function testDateDiff($input1, $input2, $absolute, \DateInterval $expecte
    *
    * @dataProvider providerTestInvalidDateDiff
    */
-  public function testInvalidDateDiff($input1, $input2, $absolute) {
+  public function testInvalidDateDiff($input1, $input2, $absolute): void {
     $this->expectException(\BadMethodCallException::class);
     $this->expectExceptionMessage('Method Drupal\Component\Datetime\DateTimePlus::diff expects parameter 1 to be a \DateTime or \Drupal\Component\Datetime\DateTimePlus object');
     $interval = $input1->diff($input2, $absolute);
@@ -165,7 +165,7 @@ public static function providerTestInvalidDateDiff() {
   /**
    * Tests setting the default time for date-only objects.
    */
-  public function testDefaultDateTime() {
+  public function testDefaultDateTime(): void {
     $utc = new \DateTimeZone('UTC');
 
     $date = DrupalDateTime::createFromFormat('Y-m-d H:i:s', '2017-05-23 22:58:00', $utc, ['langcode' => 'en']);
@@ -179,7 +179,7 @@ public function testDefaultDateTime() {
    *
    * @covers ::__call
    */
-  public function testChainable() {
+  public function testChainable(): void {
     $tz = new \DateTimeZone(date_default_timezone_get());
     $date = new DrupalDateTime('now', $tz, ['langcode' => 'en']);
 
@@ -197,7 +197,7 @@ public function testChainable() {
    *
    * @covers ::__call
    */
-  public function testChainableNonChainable() {
+  public function testChainableNonChainable(): void {
     $tz = new \DateTimeZone(date_default_timezone_get());
     $datetime1 = new DrupalDateTime('2009-10-11 12:00:00', $tz, ['langcode' => 'en']);
     $datetime2 = new DrupalDateTime('2009-10-13 12:00:00', $tz, ['langcode' => 'en']);
@@ -211,7 +211,7 @@ public function testChainableNonChainable() {
    *
    * @covers ::__call
    */
-  public function testChainableNonCallable() {
+  public function testChainableNonCallable(): void {
     $this->expectException(\BadMethodCallException::class);
     $this->expectExceptionMessage('Call to undefined method Drupal\Core\Datetime\DrupalDateTime::nonexistent()');
     $tz = new \DateTimeZone(date_default_timezone_get());
@@ -222,7 +222,7 @@ public function testChainableNonCallable() {
   /**
    * @covers ::getPhpDateTime
    */
-  public function testGetPhpDateTime() {
+  public function testGetPhpDateTime(): void {
     $new_york = new \DateTimeZone('America/New_York');
     $berlin = new \DateTimeZone('Europe/Berlin');
 
@@ -251,7 +251,7 @@ public function testGetPhpDateTime() {
    *
    * @covers ::format
    */
-  public function testRfc2822DateFormat() {
+  public function testRfc2822DateFormat(): void {
     $language_manager = $this->createMock(LanguageManager::class);
     $language_manager->expects($this->any())
       ->method('getCurrentLanguage')
diff --git a/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/AuthenticationProviderPassTest.php b/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/AuthenticationProviderPassTest.php
index 7e106cefcc65..5e8ab648e60a 100644
--- a/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/AuthenticationProviderPassTest.php
+++ b/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/AuthenticationProviderPassTest.php
@@ -19,7 +19,7 @@ class AuthenticationProviderPassTest extends UnitTestCase {
   /**
    * @covers ::process
    */
-  public function testEncoders() {
+  public function testEncoders(): void {
     $container = new ContainerBuilder();
     $definition = new Definition(Serializer::class, [[], []]);
     $definition->setPublic(TRUE);
diff --git a/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/BackendCompilerPassTest.php b/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/BackendCompilerPassTest.php
index a906bd949ae9..1edc10dbe649 100644
--- a/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/BackendCompilerPassTest.php
+++ b/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/BackendCompilerPassTest.php
@@ -37,7 +37,7 @@ protected function setUp(): void {
    *
    * @covers ::process
    */
-  public function testProcess() {
+  public function testProcess(): void {
     // Add a container with no set default_backend.
     $prefix = __NAMESPACE__ . '\\ServiceClass';
     $service = (new Definition($prefix . 'Default'))->addTag('backend_overridable');
diff --git a/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/ProxyServicesPassTest.php b/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/ProxyServicesPassTest.php
index 8936501d590b..63aa1f55d002 100644
--- a/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/ProxyServicesPassTest.php
+++ b/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/ProxyServicesPassTest.php
@@ -35,7 +35,7 @@ protected function setUp(): void {
   /**
    * @covers ::process
    */
-  public function testContainerWithoutLazyServices() {
+  public function testContainerWithoutLazyServices(): void {
     $container = new ContainerBuilder();
     $container->register('lock', 'Drupal\Core\Lock\DatabaseLockBackend');
 
@@ -48,7 +48,7 @@ public function testContainerWithoutLazyServices() {
   /**
    * @covers ::process
    */
-  public function testContainerWithLazyServices() {
+  public function testContainerWithLazyServices(): void {
     $container = new ContainerBuilder();
     $container->register('lock', 'Drupal\Core\Lock\DatabaseLockBackend')
       ->setLazy(TRUE);
@@ -68,7 +68,7 @@ public function testContainerWithLazyServices() {
   /**
    * @covers ::process
    */
-  public function testContainerWithLazyServicesWithoutProxyClass() {
+  public function testContainerWithLazyServicesWithoutProxyClass(): void {
     $container = new ContainerBuilder();
     $container->register('path.current', CurrentPathStack::class)
       ->setLazy(TRUE);
diff --git a/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/StackedKernelPassTest.php b/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/StackedKernelPassTest.php
index ec95f2801992..2443817c8d2f 100644
--- a/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/StackedKernelPassTest.php
+++ b/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/StackedKernelPassTest.php
@@ -46,7 +46,7 @@ protected function setUp(): void {
   /**
    * @covers ::process
    */
-  public function testProcessWithStackedKernel() {
+  public function testProcessWithStackedKernel(): void {
     $stacked_kernel = new Definition(StackedHttpKernel::class);
     $stacked_kernel->setPublic(TRUE);
     $this->containerBuilder->setDefinition('http_kernel', $stacked_kernel);
@@ -88,7 +88,7 @@ public function testProcessWithStackedKernel() {
   /**
    * @covers ::process
    */
-  public function testProcessWithHttpKernel() {
+  public function testProcessWithHttpKernel(): void {
     $kernel = new Definition('Symfony\Component\HttpKernel\HttpKernelInterface');
     $kernel->setPublic(TRUE);
     $this->containerBuilder->setDefinition('http_kernel', $kernel);
diff --git a/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/TaggedHandlersPassTest.php b/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/TaggedHandlersPassTest.php
index ed07b2fb7cee..e61dd318b15a 100644
--- a/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/TaggedHandlersPassTest.php
+++ b/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/TaggedHandlersPassTest.php
@@ -27,7 +27,7 @@ protected function buildContainer($environment = 'dev') {
    *
    * @covers ::process
    */
-  public function testProcessNoConsumers() {
+  public function testProcessNoConsumers(): void {
     $container = $this->buildContainer();
     $container
       ->register('consumer_id', __NAMESPACE__ . '\ValidConsumer');
@@ -44,7 +44,7 @@ public function testProcessNoConsumers() {
    *
    * @covers ::process
    */
-  public function testProcessRequiredHandlers() {
+  public function testProcessRequiredHandlers(): void {
     $container = $this->buildContainer();
     $container
       ->register('consumer_id', __NAMESPACE__ . '\ValidConsumer')
@@ -64,7 +64,7 @@ public function testProcessRequiredHandlers() {
    * @covers ::process
    * @covers ::processServiceIdCollectorPass
    */
-  public function testIdCollectorProcessRequiredHandlers() {
+  public function testIdCollectorProcessRequiredHandlers(): void {
     $this->expectException(LogicException::class);
     $this->expectExceptionMessage("At least one service tagged with 'consumer_id' is required.");
     $container = $this->buildContainer();
@@ -83,7 +83,7 @@ public function testIdCollectorProcessRequiredHandlers() {
    *
    * @covers ::process
    */
-  public function testProcessMissingInterface() {
+  public function testProcessMissingInterface(): void {
     $container = $this->buildContainer();
     $container
       ->register('consumer_id0', __NAMESPACE__ . '\ValidConsumer')
@@ -103,7 +103,7 @@ public function testProcessMissingInterface() {
    *
    * @covers ::process
    */
-  public function testProcess() {
+  public function testProcess(): void {
     $container = $this->buildContainer();
     $container
       ->register('consumer_id', __NAMESPACE__ . '\ValidConsumer')
@@ -128,7 +128,7 @@ public function testProcess() {
    *
    * @covers ::process
    */
-  public function testServiceIdProcess() {
+  public function testServiceIdProcess(): void {
     $container = $this->buildContainer();
     $container
       ->register('consumer_id', __NAMESPACE__ . '\ValidConsumer')
@@ -154,7 +154,7 @@ public function testServiceIdProcess() {
    *
    * @covers ::process
    */
-  public function testProcessPriority() {
+  public function testProcessPriority(): void {
     $container = $this->buildContainer();
     $container
       ->register('consumer_id', __NAMESPACE__ . '\ValidConsumer')
@@ -185,7 +185,7 @@ public function testProcessPriority() {
    *
    * @covers ::process
    */
-  public function testServiceIdProcessPriority() {
+  public function testServiceIdProcessPriority(): void {
     $container = $this->buildContainer();
     $container
       ->register('consumer_id', __NAMESPACE__ . '\ValidConsumer')
@@ -218,7 +218,7 @@ public function testServiceIdProcessPriority() {
    *
    * @covers ::process
    */
-  public function testProcessNoPriorityParam() {
+  public function testProcessNoPriorityParam(): void {
     $container = $this->buildContainer();
     $container
       ->register('consumer_id', __NAMESPACE__ . '\ValidConsumer')
@@ -251,7 +251,7 @@ public function testProcessNoPriorityParam() {
    *
    * @covers ::process
    */
-  public function testProcessWithIdParameter() {
+  public function testProcessWithIdParameter(): void {
     $container = $this->buildContainer();
     $container
       ->register('consumer_id', __NAMESPACE__ . '\ValidConsumer')
@@ -286,7 +286,7 @@ public function testProcessWithIdParameter() {
    *
    * @covers ::process
    */
-  public function testProcessInterfaceMismatch() {
+  public function testProcessInterfaceMismatch(): void {
     $container = $this->buildContainer();
 
     $container
@@ -311,7 +311,7 @@ public function testProcessInterfaceMismatch() {
    *
    * @covers ::process
    */
-  public function testProcessWithExtraArguments() {
+  public function testProcessWithExtraArguments(): void {
     $container = $this->buildContainer();
 
     $container
@@ -341,7 +341,7 @@ public function testProcessWithExtraArguments() {
    *
    * @covers ::process
    */
-  public function testProcessNoPriorityAndExtraArguments() {
+  public function testProcessNoPriorityAndExtraArguments(): void {
     $container = $this->buildContainer();
 
     $container
@@ -370,7 +370,7 @@ public function testProcessNoPriorityAndExtraArguments() {
    *
    * @covers ::process
    */
-  public function testProcessWithIdAndExtraArguments() {
+  public function testProcessWithIdAndExtraArguments(): void {
     $container = $this->buildContainer();
 
     $container
@@ -402,7 +402,7 @@ public function testProcessWithIdAndExtraArguments() {
    *
    * @covers ::process
    */
-  public function testProcessWithDifferentArgumentsOrderAndDefaultValue() {
+  public function testProcessWithDifferentArgumentsOrderAndDefaultValue(): void {
     $container = $this->buildContainer();
 
     $container
diff --git a/core/tests/Drupal/Tests/Core/DependencyInjection/ContainerBuilderTest.php b/core/tests/Drupal/Tests/Core/DependencyInjection/ContainerBuilderTest.php
index 32f4c3cfaf80..dd45b97b6ce2 100644
--- a/core/tests/Drupal/Tests/Core/DependencyInjection/ContainerBuilderTest.php
+++ b/core/tests/Drupal/Tests/Core/DependencyInjection/ContainerBuilderTest.php
@@ -18,7 +18,7 @@ class ContainerBuilderTest extends UnitTestCase {
   /**
    * @covers ::get
    */
-  public function testGet() {
+  public function testGet(): void {
     $container = new ContainerBuilder();
     $container->register('bar', 'Drupal\Tests\Core\DependencyInjection\Fixture\BarClass');
 
@@ -29,7 +29,7 @@ public function testGet() {
   /**
    * @covers ::setParameter
    */
-  public function testSetParameterException() {
+  public function testSetParameterException(): void {
     $container = new ContainerBuilder();
     $this->expectException(\InvalidArgumentException::class);
     $this->expectExceptionMessage('Parameter names must be lowercase: Buzz');
@@ -39,7 +39,7 @@ public function testSetParameterException() {
   /**
    * @covers ::register
    */
-  public function testRegister() {
+  public function testRegister(): void {
     $container = new ContainerBuilder();
     $service = $container->register('bar');
     $this->assertTrue($service->isPublic());
@@ -48,7 +48,7 @@ public function testRegister() {
   /**
    * @covers ::setDefinition
    */
-  public function testSetDefinition() {
+  public function testSetDefinition(): void {
     // Test a service with public set to true.
     $container = new ContainerBuilder();
     $definition = new Definition();
@@ -66,7 +66,7 @@ public function testSetDefinition() {
   /**
    * @covers ::setAlias
    */
-  public function testSetAlias() {
+  public function testSetAlias(): void {
     $container = new ContainerBuilder();
     $container->register('bar');
     $alias = $container->setAlias('foo', 'bar');
@@ -76,7 +76,7 @@ public function testSetAlias() {
   /**
    * Tests serialization.
    */
-  public function testSerialize() {
+  public function testSerialize(): void {
     $container = new ContainerBuilder();
     $this->expectException(\AssertionError::class);
     serialize($container);
@@ -91,7 +91,7 @@ public function testSerialize() {
    * @runInSeparateProcess
    * @preserveGlobalState disabled
    */
-  public function testConstructor() {
+  public function testConstructor(): void {
     class_alias(TestInterface::class, 'Symfony\Component\Config\Resource\ResourceInterface');
     $container = new ContainerBuilder();
     $this->assertFalse($container->isTrackingResources());
diff --git a/core/tests/Drupal/Tests/Core/DependencyInjection/ContainerTest.php b/core/tests/Drupal/Tests/Core/DependencyInjection/ContainerTest.php
index 426d392bf304..367574517678 100644
--- a/core/tests/Drupal/Tests/Core/DependencyInjection/ContainerTest.php
+++ b/core/tests/Drupal/Tests/Core/DependencyInjection/ContainerTest.php
@@ -16,7 +16,7 @@ class ContainerTest extends UnitTestCase {
   /**
    * Tests serialization.
    */
-  public function testSerialize() {
+  public function testSerialize(): void {
     $container = new Container();
     $this->expectException(\AssertionError::class);
     serialize($container);
diff --git a/core/tests/Drupal/Tests/Core/DependencyInjection/DependencySerializationTest.php b/core/tests/Drupal/Tests/Core/DependencyInjection/DependencySerializationTest.php
index 085f8a01846a..d41703afe305 100644
--- a/core/tests/Drupal/Tests/Core/DependencyInjection/DependencySerializationTest.php
+++ b/core/tests/Drupal/Tests/Core/DependencyInjection/DependencySerializationTest.php
@@ -20,7 +20,7 @@ class DependencySerializationTest extends UnitTestCase {
    * @covers ::__sleep
    * @covers ::__wakeup
    */
-  public function testSerialization() {
+  public function testSerialization(): void {
     // Create a pseudo service and dependency injected object.
     $service = new \stdClass();
     $container = TestKernel::setContainerWithKernel();
diff --git a/core/tests/Drupal/Tests/Core/DependencyInjection/YamlFileLoaderTest.php b/core/tests/Drupal/Tests/Core/DependencyInjection/YamlFileLoaderTest.php
index 0fc5c0203e85..b4ed2ca57c3a 100644
--- a/core/tests/Drupal/Tests/Core/DependencyInjection/YamlFileLoaderTest.php
+++ b/core/tests/Drupal/Tests/Core/DependencyInjection/YamlFileLoaderTest.php
@@ -28,7 +28,7 @@ protected function setUp(): void {
     FileCacheFactory::setPrefix('example');
   }
 
-  public function testParseDefinitionsWithProvider() {
+  public function testParseDefinitionsWithProvider(): void {
     $yml = <<<YAML
 services:
   example_service_1:
@@ -80,7 +80,7 @@ class: \Drupal\Core\ExampleClass
   /**
    * @dataProvider providerTestExceptions
    */
-  public function testExceptions($yml, $message) {
+  public function testExceptions($yml, $message): void {
     vfsStream::setup('drupal', NULL, [
       'modules' => [
         'example' => [
diff --git a/core/tests/Drupal/Tests/Core/Discovery/YamlDiscoveryTest.php b/core/tests/Drupal/Tests/Core/Discovery/YamlDiscoveryTest.php
index b5094f067596..78b1840320e1 100644
--- a/core/tests/Drupal/Tests/Core/Discovery/YamlDiscoveryTest.php
+++ b/core/tests/Drupal/Tests/Core/Discovery/YamlDiscoveryTest.php
@@ -30,7 +30,7 @@ protected function setUp(): void {
   /**
    * Tests if filename is output for a broken YAML file.
    */
-  public function testFilenameForBrokenYml() {
+  public function testFilenameForBrokenYml(): void {
     vfsStreamWrapper::register();
     $root = new vfsStreamDirectory('modules');
     vfsStreamWrapper::setRoot($root);
diff --git a/core/tests/Drupal/Tests/Core/Display/DisplayVariantTest.php b/core/tests/Drupal/Tests/Core/Display/DisplayVariantTest.php
index e8555b9bc3f8..56b5ad551da9 100644
--- a/core/tests/Drupal/Tests/Core/Display/DisplayVariantTest.php
+++ b/core/tests/Drupal/Tests/Core/Display/DisplayVariantTest.php
@@ -36,7 +36,7 @@ public function setUpDisplayVariant($configuration = [], $definition = []) {
    *
    * @covers ::label
    */
-  public function testLabel() {
+  public function testLabel(): void {
     $display_variant = $this->setUpDisplayVariant(['label' => 'foo']);
     $this->assertSame('foo', $display_variant->label());
   }
@@ -46,7 +46,7 @@ public function testLabel() {
    *
    * @covers ::label
    */
-  public function testLabelDefault() {
+  public function testLabelDefault(): void {
     $display_variant = $this->setUpDisplayVariant();
     $this->assertSame('', $display_variant->label());
   }
@@ -56,7 +56,7 @@ public function testLabelDefault() {
    *
    * @covers ::getWeight
    */
-  public function testGetWeight() {
+  public function testGetWeight(): void {
     $display_variant = $this->setUpDisplayVariant(['weight' => 5]);
     $this->assertSame(5, $display_variant->getWeight());
   }
@@ -66,7 +66,7 @@ public function testGetWeight() {
    *
    * @covers ::getWeight
    */
-  public function testGetWeightDefault() {
+  public function testGetWeightDefault(): void {
     $display_variant = $this->setUpDisplayVariant();
     $this->assertSame(0, $display_variant->getWeight());
   }
@@ -78,7 +78,7 @@ public function testGetWeightDefault() {
    *
    * @dataProvider providerTestGetConfiguration
    */
-  public function testGetConfiguration($configuration, $expected) {
+  public function testGetConfiguration($configuration, $expected): void {
     $display_variant = $this->setUpDisplayVariant($configuration);
 
     $this->assertSame($expected, $display_variant->getConfiguration());
@@ -124,7 +124,7 @@ public static function providerTestGetConfiguration() {
    *
    * @covers ::access
    */
-  public function testAccess() {
+  public function testAccess(): void {
     $display_variant = $this->setUpDisplayVariant();
     $this->assertTrue($display_variant->access());
   }
@@ -134,7 +134,7 @@ public function testAccess() {
    *
    * @covers ::submitConfigurationForm
    */
-  public function testSubmitConfigurationForm() {
+  public function testSubmitConfigurationForm(): void {
     $display_variant = $this->setUpDisplayVariant();
     $this->assertSame('', $display_variant->label());
 
diff --git a/core/tests/Drupal/Tests/Core/DrupalKernel/DiscoverServiceProvidersTest.php b/core/tests/Drupal/Tests/Core/DrupalKernel/DiscoverServiceProvidersTest.php
index 2763f40b530e..50954cafa433 100644
--- a/core/tests/Drupal/Tests/Core/DrupalKernel/DiscoverServiceProvidersTest.php
+++ b/core/tests/Drupal/Tests/Core/DrupalKernel/DiscoverServiceProvidersTest.php
@@ -20,7 +20,7 @@ class DiscoverServiceProvidersTest extends UnitTestCase {
    *
    * @covers ::discoverServiceProviders
    */
-  public function testDiscoverServiceCustom() {
+  public function testDiscoverServiceCustom(): void {
     new Settings([
       'container_yamls' => [
         __DIR__ . '/fixtures/custom.yml',
@@ -46,7 +46,7 @@ public function testDiscoverServiceCustom() {
   /**
    * Tests the exception when container_yamls is not set.
    */
-  public function testDiscoverServiceNoContainerYamls() {
+  public function testDiscoverServiceNoContainerYamls(): void {
     new Settings([]);
     $kernel = new DrupalKernel('prod', new ClassLoader());
     $kernel->discoverServiceProviders();
diff --git a/core/tests/Drupal/Tests/Core/DrupalKernel/DrupalKernelTest.php b/core/tests/Drupal/Tests/Core/DrupalKernel/DrupalKernelTest.php
index ab15a6a71e7e..e01add014774 100644
--- a/core/tests/Drupal/Tests/Core/DrupalKernel/DrupalKernelTest.php
+++ b/core/tests/Drupal/Tests/Core/DrupalKernel/DrupalKernelTest.php
@@ -23,7 +23,7 @@ class DrupalKernelTest extends UnitTestCase {
    * @covers ::setupTrustedHosts
    * @dataProvider providerTestTrustedHosts
    */
-  public function testTrustedHosts($host, $server_name, $message, $expected = FALSE) {
+  public function testTrustedHosts($host, $server_name, $message, $expected = FALSE): void {
     $request = new Request();
 
     $trusted_host_patterns = [
@@ -114,7 +114,7 @@ public static function providerTestTrustedHosts() {
    * @covers ::findSitePath
    * @runInSeparateProcess
    */
-  public function testFindSitePath() {
+  public function testFindSitePath(): void {
     $vfs_root = vfsStream::setup('drupal_root');
     $sites_php = <<<'EOD'
 <?php
@@ -143,7 +143,7 @@ public function testFindSitePath() {
    * @covers ::terminate
    * @runInSeparateProcess
    */
-  public function testUnBootedTerminate() {
+  public function testUnBootedTerminate(): void {
     $kernel = new DrupalKernel('test', new ClassLoader());
     $kernel->terminate(new Request(), new Response());
     $this->assertTrue(TRUE, "\Drupal\Core\DrupalKernel::terminate() called without error on kernel which has not booted");
diff --git a/core/tests/Drupal/Tests/Core/DrupalKernel/ValidateHostnameTest.php b/core/tests/Drupal/Tests/Core/DrupalKernel/ValidateHostnameTest.php
index 4be76598eeb1..2c2ad89f4c9b 100644
--- a/core/tests/Drupal/Tests/Core/DrupalKernel/ValidateHostnameTest.php
+++ b/core/tests/Drupal/Tests/Core/DrupalKernel/ValidateHostnameTest.php
@@ -18,7 +18,7 @@ class ValidateHostnameTest extends UnitTestCase {
    * @covers ::validateHostname
    * @dataProvider providerTestValidateHostname
    */
-  public function testValidateHostname($hostname, $message, $expected = FALSE) {
+  public function testValidateHostname($hostname, $message, $expected = FALSE): void {
     $server = ['HTTP_HOST' => $hostname];
     $request = new Request([], [], [], [], [], $server);
     $validated_hostname = DrupalKernel::validateHostname($request);
diff --git a/core/tests/Drupal/Tests/Core/DrupalTest.php b/core/tests/Drupal/Tests/Core/DrupalTest.php
index 49c6226f6aee..a009151df0b1 100644
--- a/core/tests/Drupal/Tests/Core/DrupalTest.php
+++ b/core/tests/Drupal/Tests/Core/DrupalTest.php
@@ -43,7 +43,7 @@ protected function setUp(): void {
    *
    * @covers ::getContainer
    */
-  public function testSetContainer() {
+  public function testSetContainer(): void {
     \Drupal::setContainer($this->container);
     $this->assertSame($this->container, \Drupal::getContainer());
   }
@@ -51,7 +51,7 @@ public function testSetContainer() {
   /**
    * @covers ::getContainer
    */
-  public function testGetContainerException() {
+  public function testGetContainerException(): void {
     $this->expectException(ContainerNotInitializedException::class);
     $this->expectExceptionMessage('\Drupal::$container is not initialized yet. \Drupal::setContainer() must be called with a real container.');
     \Drupal::getContainer();
@@ -62,7 +62,7 @@ public function testGetContainerException() {
    *
    * @covers ::service
    */
-  public function testService() {
+  public function testService(): void {
     $this->setMockContainerService('test_service');
     $this->assertNotNull(\Drupal::service('test_service'));
   }
@@ -72,7 +72,7 @@ public function testService() {
    *
    * @covers ::currentUser
    */
-  public function testCurrentUser() {
+  public function testCurrentUser(): void {
     $this->setMockContainerService('current_user');
     $this->assertNotNull(\Drupal::currentUser());
   }
@@ -82,7 +82,7 @@ public function testCurrentUser() {
    *
    * @covers ::entityTypeManager
    */
-  public function testEntityTypeManager() {
+  public function testEntityTypeManager(): void {
     $this->setMockContainerService('entity_type.manager');
     $this->assertNotNull(\Drupal::entityTypeManager());
   }
@@ -92,7 +92,7 @@ public function testEntityTypeManager() {
    *
    * @covers ::database
    */
-  public function testDatabase() {
+  public function testDatabase(): void {
     $this->setMockContainerService('database');
     $this->assertNotNull(\Drupal::database());
   }
@@ -102,7 +102,7 @@ public function testDatabase() {
    *
    * @covers ::cache
    */
-  public function testCache() {
+  public function testCache(): void {
     $this->setMockContainerService('cache.test');
     $this->assertNotNull(\Drupal::cache('test'));
   }
@@ -112,7 +112,7 @@ public function testCache() {
    *
    * @covers ::classResolver
    */
-  public function testClassResolver() {
+  public function testClassResolver(): void {
     $class_resolver = $this->prophesize(ClassResolverInterface::class);
     $this->setMockContainerService('class_resolver', $class_resolver->reveal());
     $this->assertInstanceOf(ClassResolverInterface::class, \Drupal::classResolver());
@@ -123,7 +123,7 @@ public function testClassResolver() {
    *
    * @covers ::classResolver
    */
-  public function testClassResolverWithClass() {
+  public function testClassResolverWithClass(): void {
     $class_resolver = $this->prophesize(ClassResolverInterface::class);
     $class_resolver->getInstanceFromDefinition(static::class)->willReturn($this);
     $this->setMockContainerService('class_resolver', $class_resolver->reveal());
@@ -135,7 +135,7 @@ public function testClassResolverWithClass() {
    *
    * @covers ::keyValueExpirable
    */
-  public function testKeyValueExpirable() {
+  public function testKeyValueExpirable(): void {
     $keyvalue = $this->getMockBuilder('Drupal\Core\KeyValueStore\KeyValueExpirableFactory')
       ->disableOriginalConstructor()
       ->getMock();
@@ -153,7 +153,7 @@ public function testKeyValueExpirable() {
    *
    * @covers ::lock
    */
-  public function testLock() {
+  public function testLock(): void {
     $this->setMockContainerService('lock');
     $this->assertNotNull(\Drupal::lock());
   }
@@ -163,7 +163,7 @@ public function testLock() {
    *
    * @covers ::config
    */
-  public function testConfig() {
+  public function testConfig(): void {
     $config = $this->createMock('Drupal\Core\Config\ConfigFactoryInterface');
     $config->expects($this->once())
       ->method('get')
@@ -180,7 +180,7 @@ public function testConfig() {
    *
    * @covers ::queue
    */
-  public function testQueue() {
+  public function testQueue(): void {
     $queue = $this->getMockBuilder('Drupal\Core\Queue\QueueFactory')
       ->disableOriginalConstructor()
       ->getMock();
@@ -198,7 +198,7 @@ public function testQueue() {
    *
    * @covers ::requestStack
    */
-  public function testRequestStack() {
+  public function testRequestStack(): void {
     $request_stack = new RequestStack();
     $this->setMockContainerService('request_stack', $request_stack);
 
@@ -210,7 +210,7 @@ public function testRequestStack() {
    *
    * @covers ::keyValue
    */
-  public function testKeyValue() {
+  public function testKeyValue(): void {
     $keyvalue = $this->getMockBuilder('Drupal\Core\KeyValueStore\KeyValueFactory')
       ->disableOriginalConstructor()
       ->getMock();
@@ -228,7 +228,7 @@ public function testKeyValue() {
    *
    * @covers ::state
    */
-  public function testState() {
+  public function testState(): void {
     $this->setMockContainerService('state');
     $this->assertNotNull(\Drupal::state());
   }
@@ -238,7 +238,7 @@ public function testState() {
    *
    * @covers ::httpClient
    */
-  public function testHttpClient() {
+  public function testHttpClient(): void {
     $this->setMockContainerService('http_client');
     $this->assertNotNull(\Drupal::httpClient());
   }
@@ -248,7 +248,7 @@ public function testHttpClient() {
    *
    * @covers ::entityQuery
    */
-  public function testEntityQuery() {
+  public function testEntityQuery(): void {
     $query = $this->createMock(QueryInterface::class);
     $storage = $this->createMock(EntityStorageInterface::class);
     $storage
@@ -274,7 +274,7 @@ public function testEntityQuery() {
    *
    * @covers ::entityQueryAggregate
    */
-  public function testEntityQueryAggregate() {
+  public function testEntityQueryAggregate(): void {
     $query = $this->createMock(QueryAggregateInterface::class);
     $storage = $this->createMock(EntityStorageInterface::class);
     $storage
@@ -300,7 +300,7 @@ public function testEntityQueryAggregate() {
    *
    * @covers ::flood
    */
-  public function testFlood() {
+  public function testFlood(): void {
     $this->setMockContainerService('flood');
     $this->assertNotNull(\Drupal::flood());
   }
@@ -310,7 +310,7 @@ public function testFlood() {
    *
    * @covers ::moduleHandler
    */
-  public function testModuleHandler() {
+  public function testModuleHandler(): void {
     $this->setMockContainerService('module_handler');
     $this->assertNotNull(\Drupal::moduleHandler());
   }
@@ -320,7 +320,7 @@ public function testModuleHandler() {
    *
    * @covers ::typedDataManager
    */
-  public function testTypedDataManager() {
+  public function testTypedDataManager(): void {
     $this->setMockContainerService('typed_data_manager');
     $this->assertNotNull(\Drupal::typedDataManager());
   }
@@ -330,7 +330,7 @@ public function testTypedDataManager() {
    *
    * @covers ::token
    */
-  public function testToken() {
+  public function testToken(): void {
     $this->setMockContainerService('token');
     $this->assertNotNull(\Drupal::token());
   }
@@ -340,7 +340,7 @@ public function testToken() {
    *
    * @covers ::urlGenerator
    */
-  public function testUrlGenerator() {
+  public function testUrlGenerator(): void {
     $this->setMockContainerService('url_generator');
     $this->assertNotNull(\Drupal::urlGenerator());
   }
@@ -350,7 +350,7 @@ public function testUrlGenerator() {
    *
    * @covers ::linkGenerator
    */
-  public function testLinkGenerator() {
+  public function testLinkGenerator(): void {
     $this->setMockContainerService('link_generator');
     $this->assertNotNull(\Drupal::linkGenerator());
   }
@@ -360,7 +360,7 @@ public function testLinkGenerator() {
    *
    * @covers ::translation
    */
-  public function testTranslation() {
+  public function testTranslation(): void {
     $this->setMockContainerService('string_translation');
     $this->assertNotNull(\Drupal::translation());
   }
@@ -370,7 +370,7 @@ public function testTranslation() {
    *
    * @covers ::languageManager
    */
-  public function testLanguageManager() {
+  public function testLanguageManager(): void {
     $this->setMockContainerService('language_manager');
     $this->assertNotNull(\Drupal::languageManager());
   }
@@ -380,7 +380,7 @@ public function testLanguageManager() {
    *
    * @covers ::csrfToken
    */
-  public function testCsrfToken() {
+  public function testCsrfToken(): void {
     $this->setMockContainerService('csrf_token');
     $this->assertNotNull(\Drupal::csrfToken());
   }
@@ -390,7 +390,7 @@ public function testCsrfToken() {
    *
    * @covers ::transliteration
    */
-  public function testTransliteration() {
+  public function testTransliteration(): void {
     $this->setMockContainerService('transliteration');
     $this->assertNotNull(\Drupal::transliteration());
   }
@@ -400,7 +400,7 @@ public function testTransliteration() {
    *
    * @covers ::formBuilder
    */
-  public function testFormBuilder() {
+  public function testFormBuilder(): void {
     $this->setMockContainerService('form_builder');
     $this->assertNotNull(\Drupal::formBuilder());
   }
@@ -410,7 +410,7 @@ public function testFormBuilder() {
    *
    * @covers ::menuTree
    */
-  public function testMenuTree() {
+  public function testMenuTree(): void {
     $this->setMockContainerService('menu.link_tree');
     $this->assertNotNull(\Drupal::menuTree());
   }
@@ -420,7 +420,7 @@ public function testMenuTree() {
    *
    * @covers ::pathValidator
    */
-  public function testPathValidator() {
+  public function testPathValidator(): void {
     $this->setMockContainerService('path.validator');
     $this->assertNotNull(\Drupal::pathValidator());
   }
@@ -430,7 +430,7 @@ public function testPathValidator() {
    *
    * @covers ::accessManager
    */
-  public function testAccessManager() {
+  public function testAccessManager(): void {
     $this->setMockContainerService('access_manager');
     $this->assertNotNull(\Drupal::accessManager());
   }
@@ -438,7 +438,7 @@ public function testAccessManager() {
   /**
    * Tests the PHP constants have consistent values.
    */
-  public function testPhpConstants() {
+  public function testPhpConstants(): void {
     // RECOMMENDED_PHP can be just MAJOR.MINOR so normalize it to allow using
     // version_compare().
     $normalizer = function (string $version): string {
diff --git a/core/tests/Drupal/Tests/Core/Enhancer/EntityRevisionRouteEnhancerTest.php b/core/tests/Drupal/Tests/Core/Enhancer/EntityRevisionRouteEnhancerTest.php
index d5a691dd951b..f1a68f6b8ab2 100644
--- a/core/tests/Drupal/Tests/Core/Enhancer/EntityRevisionRouteEnhancerTest.php
+++ b/core/tests/Drupal/Tests/Core/Enhancer/EntityRevisionRouteEnhancerTest.php
@@ -34,7 +34,7 @@ protected function setUp(): void {
   /**
    * @covers ::enhance
    */
-  public function testEnhanceWithoutParameter() {
+  public function testEnhanceWithoutParameter(): void {
     $route = new Route('/test-path/{entity_test}');
 
     $request = Request::create('/test-path');
@@ -47,7 +47,7 @@ public function testEnhanceWithoutParameter() {
   /**
    * @covers ::enhance
    */
-  public function testEnhanceWithoutEntityRevision() {
+  public function testEnhanceWithoutEntityRevision(): void {
     $route = new Route('/test-path/{entity_test}', [], [], ['parameters' => ['entity_test' => ['type' => 'entity:entity_test']]]);
     $request = Request::create('/test-path/123');
     $entity = $this->prophesize(EntityInterface::class);
@@ -61,7 +61,7 @@ public function testEnhanceWithoutEntityRevision() {
   /**
    * @covers ::enhance
    */
-  public function testEnhanceWithEntityRevision() {
+  public function testEnhanceWithEntityRevision(): void {
     $route = new Route('/test-path/{entity_test_revision}', [], [], ['parameters' => ['entity_test_revision' => ['type' => 'entity_revision:entity_test']]]);
     $request = Request::create('/test-path/123');
     $entity = $this->prophesize(EntityInterface::class);
diff --git a/core/tests/Drupal/Tests/Core/Enhancer/ParamConversionEnhancerTest.php b/core/tests/Drupal/Tests/Core/Enhancer/ParamConversionEnhancerTest.php
index 261a93590a61..2f6bb549e86b 100644
--- a/core/tests/Drupal/Tests/Core/Enhancer/ParamConversionEnhancerTest.php
+++ b/core/tests/Drupal/Tests/Core/Enhancer/ParamConversionEnhancerTest.php
@@ -40,7 +40,7 @@ protected function setUp(): void {
   /**
    * @covers ::enhance
    */
-  public function testEnhance() {
+  public function testEnhance(): void {
     $route = new Route('/test/{id}/{literal}/{null}');
 
     $raw_variables = [
@@ -75,7 +75,7 @@ public function testEnhance() {
   /**
    * @covers ::copyRawVariables
    */
-  public function testCopyRawVariables() {
+  public function testCopyRawVariables(): void {
     $route = new Route('/test/{id}');
     $route->setDefault('node_type', 'page');
     $defaults = [
diff --git a/core/tests/Drupal/Tests/Core/Entity/Access/EntityFormDisplayAccessControlHandlerTest.php b/core/tests/Drupal/Tests/Core/Entity/Access/EntityFormDisplayAccessControlHandlerTest.php
index df0e46e0d9db..01216173fce0 100644
--- a/core/tests/Drupal/Tests/Core/Entity/Access/EntityFormDisplayAccessControlHandlerTest.php
+++ b/core/tests/Drupal/Tests/Core/Entity/Access/EntityFormDisplayAccessControlHandlerTest.php
@@ -215,7 +215,7 @@ public function assertAllowOperations(array $allow_operations, AccountInterface
    * @covers ::access
    * @covers ::checkAccess
    */
-  public function testAccess() {
+  public function testAccess(): void {
     $this->assertAllowOperations([], $this->anon);
     $this->assertAllowOperations(['view', 'update', 'delete'], $this->member);
     $this->assertAllowOperations(['view', 'update', 'delete'], $this->parentMember);
diff --git a/core/tests/Drupal/Tests/Core/Entity/BaseFieldDefinitionTest.php b/core/tests/Drupal/Tests/Core/Entity/BaseFieldDefinitionTest.php
index 43c436c475c9..a70c9b4c8ce2 100644
--- a/core/tests/Drupal/Tests/Core/Entity/BaseFieldDefinitionTest.php
+++ b/core/tests/Drupal/Tests/Core/Entity/BaseFieldDefinitionTest.php
@@ -79,7 +79,7 @@ protected function setUp(): void {
    *
    * @covers ::getName
    */
-  public function testFieldName() {
+  public function testFieldName(): void {
     $definition = BaseFieldDefinition::create($this->fieldType);
     $field_name = $this->randomMachineName();
     $definition->setName($field_name);
@@ -91,7 +91,7 @@ public function testFieldName() {
    *
    * @covers ::getLabel
    */
-  public function testFieldLabel() {
+  public function testFieldLabel(): void {
     $definition = BaseFieldDefinition::create($this->fieldType);
     $label = $this->randomMachineName();
     $definition->setLabel($label);
@@ -103,7 +103,7 @@ public function testFieldLabel() {
    *
    * @covers ::getDescription
    */
-  public function testFieldDescription() {
+  public function testFieldDescription(): void {
     $definition = BaseFieldDefinition::create($this->fieldType);
     $description = $this->randomMachineName();
     $definition->setDescription($description);
@@ -115,7 +115,7 @@ public function testFieldDescription() {
    *
    * @covers ::getType
    */
-  public function testFieldType() {
+  public function testFieldType(): void {
     $definition = BaseFieldDefinition::create($this->fieldType);
     $this->assertEquals($this->fieldType, $definition->getType());
   }
@@ -127,7 +127,7 @@ public function testFieldType() {
    * @covers ::setSetting
    * @covers ::getSettings
    */
-  public function testFieldSettings() {
+  public function testFieldSettings(): void {
     $definition = BaseFieldDefinition::create($this->fieldType);
     $setting = $this->randomMachineName();
     $value = $this->randomMachineName();
@@ -144,7 +144,7 @@ public function testFieldSettings() {
    * @covers ::setSetting
    * @covers ::getSettings
    */
-  public function testDefaultFieldSettings() {
+  public function testDefaultFieldSettings(): void {
     $definition = BaseFieldDefinition::create($this->fieldType);
     $expected_settings = $this->fieldTypeDefinition['storage_settings'] + $this->fieldTypeDefinition['field_settings'];
     $this->assertEquals($expected_settings, $definition->getSettings());
@@ -159,7 +159,7 @@ public function testDefaultFieldSettings() {
    * @covers ::getDefaultValue
    * @covers ::setDefaultValue
    */
-  public function testFieldDefaultValue() {
+  public function testFieldDefaultValue(): void {
     $definition = BaseFieldDefinition::create($this->fieldType);
     $default_value = [
       'value' => $this->randomMachineName(),
@@ -207,7 +207,7 @@ public function testFieldDefaultValue() {
    * @covers ::getInitialValue
    * @covers ::setInitialValue
    */
-  public function testFieldInitialValue() {
+  public function testFieldInitialValue(): void {
     $definition = BaseFieldDefinition::create($this->fieldType);
     $definition->setItemDefinition(DataDefinition::createFromDataType('string')->setClass(FieldItemBase::class));
     $default_value = [
@@ -255,7 +255,7 @@ public function testFieldInitialValue() {
    * @covers ::isTranslatable
    * @covers ::setTranslatable
    */
-  public function testFieldTranslatable() {
+  public function testFieldTranslatable(): void {
     $definition = BaseFieldDefinition::create($this->fieldType);
     $this->assertFalse($definition->isTranslatable());
     $definition->setTranslatable(TRUE);
@@ -270,7 +270,7 @@ public function testFieldTranslatable() {
    * @covers ::isRevisionable
    * @covers ::setRevisionable
    */
-  public function testFieldRevisionable() {
+  public function testFieldRevisionable(): void {
     $definition = BaseFieldDefinition::create($this->fieldType);
     $this->assertFalse($definition->isRevisionable());
     $definition->setRevisionable(TRUE);
@@ -285,7 +285,7 @@ public function testFieldRevisionable() {
    * @covers ::getCardinality
    * @covers ::setCardinality
    */
-  public function testFieldCardinality() {
+  public function testFieldCardinality(): void {
     $definition = BaseFieldDefinition::create($this->fieldType);
     $this->assertEquals(1, $definition->getCardinality());
     $definition->setCardinality(2);
@@ -300,7 +300,7 @@ public function testFieldCardinality() {
    * @covers ::isRequired
    * @covers ::setRequired
    */
-  public function testFieldRequired() {
+  public function testFieldRequired(): void {
     $definition = BaseFieldDefinition::create($this->fieldType);
     $this->assertFalse($definition->isRequired());
     $definition->setRequired(TRUE);
@@ -315,7 +315,7 @@ public function testFieldRequired() {
    * @covers ::isStorageRequired
    * @covers ::setStorageRequired
    */
-  public function testFieldStorageRequired() {
+  public function testFieldStorageRequired(): void {
     $definition = BaseFieldDefinition::create($this->fieldType);
     $this->assertFalse($definition->isStorageRequired());
     $definition->setStorageRequired(TRUE);
@@ -330,7 +330,7 @@ public function testFieldStorageRequired() {
    * @covers ::getProvider
    * @covers ::setProvider
    */
-  public function testFieldProvider() {
+  public function testFieldProvider(): void {
     $definition = BaseFieldDefinition::create($this->fieldType);
     $provider = $this->randomMachineName();
     $definition->setProvider($provider);
@@ -343,7 +343,7 @@ public function testFieldProvider() {
    * @covers ::hasCustomStorage
    * @covers ::setCustomStorage
    */
-  public function testCustomStorage() {
+  public function testCustomStorage(): void {
     $definition = BaseFieldDefinition::create($this->fieldType);
     $this->assertFalse($definition->hasCustomStorage());
     $definition->setCustomStorage(TRUE);
@@ -357,7 +357,7 @@ public function testCustomStorage() {
    *
    * @covers ::setDefaultValueCallback
    */
-  public function testDefaultValueCallback() {
+  public function testDefaultValueCallback(): void {
     $definition = BaseFieldDefinition::create($this->fieldType);
     $callback = static::class . '::mockDefaultValueCallback';
     // setDefaultValueCallback returns $this.
@@ -369,7 +369,7 @@ public function testDefaultValueCallback() {
    *
    * @covers ::setDefaultValueCallback
    */
-  public function testInvalidDefaultValueCallback() {
+  public function testInvalidDefaultValueCallback(): void {
     $definition = BaseFieldDefinition::create($this->fieldType);
     // setDefaultValueCallback returns $this.
     $this->expectException(\InvalidArgumentException::class);
@@ -381,7 +381,7 @@ public function testInvalidDefaultValueCallback() {
    *
    * @covers ::setDefaultValueCallback
    */
-  public function testNullDefaultValueCallback() {
+  public function testNullDefaultValueCallback(): void {
     $definition = BaseFieldDefinition::create($this->fieldType);
     // setDefaultValueCallback returns $this.
     $this->assertSame($definition, $definition->setDefaultValueCallback(NULL));
diff --git a/core/tests/Drupal/Tests/Core/Entity/ContentEntityBaseUnitTest.php b/core/tests/Drupal/Tests/Core/Entity/ContentEntityBaseUnitTest.php
index d5a79f8b8a5e..785443b1f654 100644
--- a/core/tests/Drupal/Tests/Core/Entity/ContentEntityBaseUnitTest.php
+++ b/core/tests/Drupal/Tests/Core/Entity/ContentEntityBaseUnitTest.php
@@ -227,7 +227,7 @@ protected function setUp(): void {
    * @covers ::isNewRevision
    * @covers ::setNewRevision
    */
-  public function testIsNewRevision() {
+  public function testIsNewRevision(): void {
     // Set up the entity type so that on the first call there is no revision key
     // and on the second call there is one.
     $this->entityType->expects($this->exactly(4))
@@ -262,7 +262,7 @@ public function testIsNewRevision() {
   /**
    * @covers ::setNewRevision
    */
-  public function testSetNewRevisionException() {
+  public function testSetNewRevisionException(): void {
     $this->entityType->expects($this->once())
       ->method('hasKey')
       ->with('revision')
@@ -275,7 +275,7 @@ public function testSetNewRevisionException() {
   /**
    * @covers ::isDefaultRevision
    */
-  public function testIsDefaultRevision() {
+  public function testIsDefaultRevision(): void {
     // The default value is TRUE.
     $this->assertTrue($this->entity->isDefaultRevision());
     // Change the default revision, verify that the old value is returned.
@@ -293,7 +293,7 @@ public function testIsDefaultRevision() {
   /**
    * @covers ::getRevisionId
    */
-  public function testGetRevisionId() {
+  public function testGetRevisionId(): void {
     // The default getRevisionId() implementation returns NULL.
     $this->assertNull($this->entity->getRevisionId());
   }
@@ -301,7 +301,7 @@ public function testGetRevisionId() {
   /**
    * @covers ::isTranslatable
    */
-  public function testIsTranslatable() {
+  public function testIsTranslatable(): void {
     $this->entityTypeBundleInfo->expects($this->any())
       ->method('getBundleInfo')
       ->with($this->entityTypeId)
@@ -325,7 +325,7 @@ public function testIsTranslatable() {
   /**
    * @covers ::isTranslatable
    */
-  public function testIsTranslatableForMonolingual() {
+  public function testIsTranslatableForMonolingual(): void {
     $this->languageManager->expects($this->any())
       ->method('isMultilingual')
       ->willReturn(FALSE);
@@ -335,7 +335,7 @@ public function testIsTranslatableForMonolingual() {
   /**
    * @covers ::preSaveRevision
    */
-  public function testPreSaveRevision() {
+  public function testPreSaveRevision(): void {
     // This method is internal, so check for errors on calling it only.
     $storage = $this->createMock('\Drupal\Core\Entity\EntityStorageInterface');
     $record = new \stdClass();
@@ -424,7 +424,7 @@ public function testTypedData(bool $bundle_typed_data_definition, bool $entity_t
   /**
    * @covers ::validate
    */
-  public function testValidate() {
+  public function testValidate(): void {
     $validator = $this->createMock(ValidatorInterface::class);
     /** @var \Symfony\Component\Validator\ConstraintViolationList $empty_violation_list */
     $empty_violation_list = new ConstraintViolationList();
@@ -451,7 +451,7 @@ public function testValidate() {
    * @covers ::save
    * @covers ::preSave
    */
-  public function testRequiredValidation() {
+  public function testRequiredValidation(): void {
     $validator = $this->createMock(ValidatorInterface::class);
     /** @var \Symfony\Component\Validator\ConstraintViolationList $empty_violation_list */
     $empty_violation_list = new ConstraintViolationList();
@@ -500,14 +500,14 @@ public function testRequiredValidation() {
   /**
    * @covers ::bundle
    */
-  public function testBundle() {
+  public function testBundle(): void {
     $this->assertSame($this->bundle, $this->entity->bundle());
   }
 
   /**
    * @covers ::access
    */
-  public function testAccess() {
+  public function testAccess(): void {
     $access = $this->createMock('\Drupal\Core\Entity\EntityAccessControlHandlerInterface');
     $operation = $this->randomMachineName();
     $access->expects($this->exactly(2))
@@ -550,7 +550,7 @@ public static function providerGet() {
    * @covers ::get
    * @dataProvider providerGet
    */
-  public function testGet($expected, $field_name, $active_langcode, $fields) {
+  public function testGet($expected, $field_name, $active_langcode, $fields): void {
     // Mock ContentEntityBase.
     $mock_base = $this->getMockBuilder(ContentEntityBaseMockableClass::class)
       ->disableOriginalConstructor()
@@ -610,7 +610,7 @@ public static function providerGetFields() {
    * @covers ::getFields
    * @dataProvider providerGetFields
    */
-  public function testGetFields($expected, $include_computed, $is_computed, $field_definitions) {
+  public function testGetFields($expected, $include_computed, $is_computed, $field_definitions): void {
     // Mock ContentEntityBase.
     $mock_base = $this->getMockBuilder(ContentEntityBaseMockableClass::class)
       ->disableOriginalConstructor()
@@ -660,7 +660,7 @@ public function testGetFields($expected, $include_computed, $is_computed, $field
   /**
    * @covers ::set
    */
-  public function testSet() {
+  public function testSet(): void {
     // Exercise set(), check if it returns $this
     $this->assertSame(
       $this->entity,
diff --git a/core/tests/Drupal/Tests/Core/Entity/Enhancer/EntityRouteEnhancerTest.php b/core/tests/Drupal/Tests/Core/Entity/Enhancer/EntityRouteEnhancerTest.php
index 5df0b8c7a6e5..7f38aecf8da7 100644
--- a/core/tests/Drupal/Tests/Core/Entity/Enhancer/EntityRouteEnhancerTest.php
+++ b/core/tests/Drupal/Tests/Core/Entity/Enhancer/EntityRouteEnhancerTest.php
@@ -21,7 +21,7 @@ class EntityRouteEnhancerTest extends UnitTestCase {
    *
    * @see \Drupal\Core\Entity\Enhancer\EntityRouteEnhancer::enhancer()
    */
-  public function testEnhancer() {
+  public function testEnhancer(): void {
     $route_enhancer = new EntityRouteEnhancer();
 
     // Set a controller to ensure it is not overridden.
diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityAccessCheckTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityAccessCheckTest.php
index c5028fc654cb..f3cf79f51184 100644
--- a/core/tests/Drupal/Tests/Core/Entity/EntityAccessCheckTest.php
+++ b/core/tests/Drupal/Tests/Core/Entity/EntityAccessCheckTest.php
@@ -43,7 +43,7 @@ protected function setUp(): void {
   /**
    * Tests the method for checking access to routes.
    */
-  public function testAccess() {
+  public function testAccess(): void {
     $route = new Route('/foo/{var_name}', [], ['_entity_access' => 'var_name.update'], ['parameters' => ['var_name' => ['type' => 'entity:node']]]);
     /** @var \Drupal\Core\Session\AccountInterface $account */
     $account = $this->prophesize(AccountInterface::class)->reveal();
@@ -66,7 +66,7 @@ public function testAccess() {
   /**
    * @covers ::access
    */
-  public function testAccessWithTypePlaceholder() {
+  public function testAccessWithTypePlaceholder(): void {
     $route = new Route('/foo/{entity_type}/{var_name}', [], ['_entity_access' => 'var_name.update'], ['parameters' => ['var_name' => ['type' => 'entity:{entity_type}']]]);
     /** @var \Drupal\Core\Session\AccountInterface $account */
     $account = $this->prophesize(AccountInterface::class)->reveal();
@@ -86,7 +86,7 @@ public function testAccessWithTypePlaceholder() {
   /**
    * @covers ::access
    */
-  public function testAccessWithDifferentRouteParameters() {
+  public function testAccessWithDifferentRouteParameters(): void {
     $route = new Route(
       '/foo/{var_name}',
       [],
diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityConstraintViolationListTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityConstraintViolationListTest.php
index 6aeda12d3d5c..47de82b7100a 100644
--- a/core/tests/Drupal/Tests/Core/Entity/EntityConstraintViolationListTest.php
+++ b/core/tests/Drupal/Tests/Core/Entity/EntityConstraintViolationListTest.php
@@ -20,7 +20,7 @@ class EntityConstraintViolationListTest extends UnitTestCase {
   /**
    * @covers ::filterByFields
    */
-  public function testFilterByFields() {
+  public function testFilterByFields(): void {
     $account = $this->prophesize('\Drupal\Core\Session\AccountInterface')->reveal();
     $entity = $this->setupEntity($account);
 
@@ -35,7 +35,7 @@ public function testFilterByFields() {
   /**
    * @covers ::filterByFields
    */
-  public function testFilterByFieldsWithCompositeConstraints() {
+  public function testFilterByFieldsWithCompositeConstraints(): void {
     $account = $this->prophesize('\Drupal\Core\Session\AccountInterface')->reveal();
     $entity = $this->setupEntity($account);
 
@@ -50,7 +50,7 @@ public function testFilterByFieldsWithCompositeConstraints() {
   /**
    * @covers ::filterByFieldAccess
    */
-  public function testFilterByFieldAccess() {
+  public function testFilterByFieldAccess(): void {
     $account = $this->prophesize('\Drupal\Core\Session\AccountInterface')->reveal();
     $entity = $this->setupEntity($account);
 
@@ -65,7 +65,7 @@ public function testFilterByFieldAccess() {
   /**
    * @covers ::filterByFieldAccess
    */
-  public function testFilterByFieldAccessWithCompositeConstraint() {
+  public function testFilterByFieldAccessWithCompositeConstraint(): void {
     $account = $this->prophesize('\Drupal\Core\Session\AccountInterface')->reveal();
     $entity = $this->setupEntity($account);
 
@@ -80,7 +80,7 @@ public function testFilterByFieldAccessWithCompositeConstraint() {
   /**
    * @covers ::findByCodes
    */
-  public function testFindByCodes() {
+  public function testFindByCodes(): void {
     $account = $this->prophesize('\Drupal\Core\Session\AccountInterface')->reveal();
     $entity = $this->setupEntity($account);
 
diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityCreateAccessCheckTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityCreateAccessCheckTest.php
index 66b4e94d0cdf..f2868d22ab7f 100644
--- a/core/tests/Drupal/Tests/Core/Entity/EntityCreateAccessCheckTest.php
+++ b/core/tests/Drupal/Tests/Core/Entity/EntityCreateAccessCheckTest.php
@@ -70,7 +70,7 @@ public static function providerTestAccess() {
    *
    * @dataProvider providerTestAccess
    */
-  public function testAccess($entity_bundle, $requirement, $access, $expected, $expect_permission_context = TRUE) {
+  public function testAccess($entity_bundle, $requirement, $access, $expected, $expect_permission_context = TRUE): void {
 
     // Set up the access result objects for allowing or denying access.
     $access_result = $access ? AccessResult::allowed()->cachePerPermissions() : AccessResult::neutral()->cachePerPermissions();
diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityFieldManagerTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityFieldManagerTest.php
index 08c3823c0bbf..8a56ad19a8a1 100644
--- a/core/tests/Drupal/Tests/Core/Entity/EntityFieldManagerTest.php
+++ b/core/tests/Drupal/Tests/Core/Entity/EntityFieldManagerTest.php
@@ -223,7 +223,7 @@ protected function setUpEntityTypeDefinitions($definitions = []) {
    * @covers ::getBaseFieldDefinitions
    * @covers ::buildBaseFieldDefinitions
    */
-  public function testGetBaseFieldDefinitions() {
+  public function testGetBaseFieldDefinitions(): void {
     $field_definition = $this->setUpEntityWithFieldDefinition();
 
     $expected = ['id' => $field_definition];
@@ -236,7 +236,7 @@ public function testGetBaseFieldDefinitions() {
    * @covers ::getFieldDefinitions
    * @covers ::buildBundleFieldDefinitions
    */
-  public function testGetFieldDefinitions() {
+  public function testGetFieldDefinitions(): void {
     $field_definition = $this->setUpEntityWithFieldDefinition();
 
     $bundle_field_definition = $this->prophesize()
@@ -295,7 +295,7 @@ public function testGetFieldDefinitions() {
    * @covers ::getFieldStorageDefinitions
    * @covers ::buildFieldStorageDefinitions
    */
-  public function testGetFieldStorageDefinitions() {
+  public function testGetFieldStorageDefinitions(): void {
     $field_definition = $this->setUpEntityWithFieldDefinition(TRUE);
     $field_storage_definition = $this->prophesize(FieldStorageDefinitionInterface::class);
     $field_storage_definition->getName()->willReturn('field_storage');
@@ -339,7 +339,7 @@ function () use ($definitions) {
    *
    * @dataProvider providerTestGetBaseFieldDefinitionsTranslatableEntityTypeDefaultLangcode
    */
-  public function testGetBaseFieldDefinitionsTranslatableEntityTypeDefaultLangcode($default_langcode_key) {
+  public function testGetBaseFieldDefinitionsTranslatableEntityTypeDefaultLangcode($default_langcode_key): void {
     $this->setUpEntityWithFieldDefinition(FALSE, 'id', ['langcode' => 'langcode', 'default_langcode' => $default_langcode_key]);
 
     $field_definition = $this->prophesize()->willImplement(FieldDefinitionInterface::class)->willImplement(FieldStorageDefinitionInterface::class);
@@ -376,7 +376,7 @@ public static function providerTestGetBaseFieldDefinitionsTranslatableEntityType
    *
    * @dataProvider providerTestGetBaseFieldDefinitionsTranslatableEntityTypeLangcode
    */
-  public function testGetBaseFieldDefinitionsTranslatableEntityTypeLangcode($provide_key, $provide_field, $translatable) {
+  public function testGetBaseFieldDefinitionsTranslatableEntityTypeLangcode($provide_key, $provide_field, $translatable): void {
     $keys = $provide_key ? ['langcode' => 'langcode'] : [];
     $this->setUpEntityWithFieldDefinition(FALSE, 'id', $keys);
 
@@ -418,7 +418,7 @@ public static function providerTestGetBaseFieldDefinitionsTranslatableEntityType
    *
    * @covers ::getBaseFieldDefinitions
    */
-  public function testGetBaseFieldDefinitionsWithCaching() {
+  public function testGetBaseFieldDefinitionsWithCaching(): void {
     $field_definition = $this->setUpEntityWithFieldDefinition();
 
     $expected = ['id' => $field_definition];
@@ -446,7 +446,7 @@ public function testGetBaseFieldDefinitionsWithCaching() {
    *
    * @covers ::getFieldDefinitions
    */
-  public function testGetFieldDefinitionsWithCaching() {
+  public function testGetFieldDefinitionsWithCaching(): void {
     $field_definition = $this->setUpEntityWithFieldDefinition(FALSE, 'id');
 
     $expected = ['id' => $field_definition];
@@ -477,7 +477,7 @@ public function testGetFieldDefinitionsWithCaching() {
    *
    * @covers ::getFieldStorageDefinitions
    */
-  public function testGetFieldStorageDefinitionsWithCaching() {
+  public function testGetFieldStorageDefinitionsWithCaching(): void {
     $field_definition = $this->setUpEntityWithFieldDefinition(TRUE, 'id');
     $field_storage_definition = $this->prophesize(FieldStorageDefinitionInterface::class);
     $field_storage_definition->getName()->willReturn('field_storage');
@@ -526,7 +526,7 @@ function () use ($definitions) {
    * @covers ::getBaseFieldDefinitions
    * @covers ::buildBaseFieldDefinitions
    */
-  public function testGetBaseFieldDefinitionsInvalidDefinition() {
+  public function testGetBaseFieldDefinitionsInvalidDefinition(): void {
     $this->setUpEntityWithFieldDefinition(FALSE, 'langcode', ['langcode' => 'langcode']);
 
     $this->entityType->isTranslatable()->willReturn(TRUE);
@@ -542,7 +542,7 @@ public function testGetBaseFieldDefinitionsInvalidDefinition() {
    * @covers ::getFieldDefinitions
    * @covers ::buildBundleFieldDefinitions
    */
-  public function testGetFieldDefinitionsProvider() {
+  public function testGetFieldDefinitionsProvider(): void {
     $this->setUpEntityWithFieldDefinition(TRUE);
 
     $module = 'entity_field_manager_test_module';
@@ -646,7 +646,7 @@ protected function setUpEntityWithFieldDefinition($custom_invoke_all = FALSE, $f
    *
    * @covers ::clearCachedFieldDefinitions
    */
-  public function testClearCachedFieldDefinitions() {
+  public function testClearCachedFieldDefinitions(): void {
     $this->setUpEntityTypeDefinitions();
 
     $this->cacheTagsInvalidator->invalidateTags(['entity_field_info'])->shouldBeCalled();
@@ -660,7 +660,7 @@ public function testClearCachedFieldDefinitions() {
   /**
    * @covers ::getExtraFields
    */
-  public function testGetExtraFields() {
+  public function testGetExtraFields(): void {
     $this->setUpEntityTypeDefinitions();
 
     $entity_type_id = $this->randomMachineName();
@@ -701,7 +701,7 @@ public function testGetExtraFields() {
   /**
    * @covers ::getFieldMap
    */
-  public function testGetFieldMap() {
+  public function testGetFieldMap(): void {
     $this->entityTypeBundleInfo->getBundleInfo('test_entity_type')->willReturn([])->shouldBeCalled();
 
     // Set up a content entity type.
@@ -777,7 +777,7 @@ public function testGetFieldMap() {
   /**
    * @covers ::getFieldMap
    */
-  public function testGetFieldMapFromCache() {
+  public function testGetFieldMapFromCache(): void {
     $expected = [
       'test_entity_type' => [
         'id' => [
@@ -801,7 +801,7 @@ public function testGetFieldMapFromCache() {
   /**
    * @covers ::getFieldMapByFieldType
    */
-  public function testGetFieldMapByFieldType() {
+  public function testGetFieldMapByFieldType(): void {
     // Set up a content entity type.
     $entity_type = $this->prophesize(ContentEntityTypeInterface::class);
     $entity_class = EntityTypeManagerTestEntity::class;
@@ -871,7 +871,7 @@ class TestEntityFieldManager extends EntityFieldManager {
   /**
    * Allows the static caches to be cleared.
    */
-  public function testClearEntityFieldInfo() {
+  public function testClearEntityFieldInfo(): void {
     $this->baseFieldDefinitions = [];
     $this->fieldDefinitions = [];
     $this->fieldStorageDefinitions = [];
diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityFormBuilderTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityFormBuilderTest.php
index aecf223435e3..5709fc3b375e 100644
--- a/core/tests/Drupal/Tests/Core/Entity/EntityFormBuilderTest.php
+++ b/core/tests/Drupal/Tests/Core/Entity/EntityFormBuilderTest.php
@@ -50,7 +50,7 @@ protected function setUp(): void {
    *
    * @covers ::getForm
    */
-  public function testGetForm() {
+  public function testGetForm(): void {
     $form_controller = $this->createMock('Drupal\Core\Entity\EntityFormInterface');
     $form_controller->expects($this->any())
       ->method('getFormId')
diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityFormTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityFormTest.php
index 8e30610eab4c..b16345420ddf 100644
--- a/core/tests/Drupal/Tests/Core/Entity/EntityFormTest.php
+++ b/core/tests/Drupal/Tests/Core/Entity/EntityFormTest.php
@@ -51,7 +51,7 @@ protected function setUp(): void {
    *
    * @dataProvider providerTestFormIds
    */
-  public function testFormId($expected, $definition) {
+  public function testFormId($expected, $definition): void {
     $this->entityType->set('entity_keys', ['bundle' => $definition['bundle']]);
 
     $entity = $this->getMockForAbstractClass('Drupal\Core\Entity\EntityBase', [[], $definition['entity_type']], '', TRUE, TRUE, TRUE, ['getEntityType', 'bundle']);
@@ -120,7 +120,7 @@ public static function providerTestFormIds() {
   /**
    * @covers ::copyFormValuesToEntity
    */
-  public function testCopyFormValuesToEntity() {
+  public function testCopyFormValuesToEntity(): void {
     $entity_id = 'test_config_entity_id';
     $values = ['id' => $entity_id];
     $entity = $this->getMockBuilder('\Drupal\Tests\Core\Config\Entity\Fixtures\ConfigEntityBaseWithPluginCollections')
@@ -150,7 +150,7 @@ public function testCopyFormValuesToEntity() {
    *
    * @covers ::getEntityFromRouteMatch
    */
-  public function testGetEntityFromRouteMatchEditDelete() {
+  public function testGetEntityFromRouteMatchEditDelete(): void {
     $entity = $this->prophesize(EntityInterface::class)->reveal();
     $id = $this->entityType->id();
     $route_match = new RouteMatch(
@@ -168,7 +168,7 @@ public function testGetEntityFromRouteMatchEditDelete() {
    *
    * @covers ::getEntityFromRouteMatch
    */
-  public function testGetEntityFromRouteMatchAdd() {
+  public function testGetEntityFromRouteMatchAdd(): void {
     $entity = $this->prophesize(EntityInterface::class)->reveal();
     $this->setUpStorage()->create([])->willReturn($entity);
     $route_match = new RouteMatch('test_route', new Route('/entity-test/add'));
@@ -181,7 +181,7 @@ public function testGetEntityFromRouteMatchAdd() {
    *
    * @covers ::getEntityFromRouteMatch
    */
-  public function testGetEntityFromRouteMatchAddStatic() {
+  public function testGetEntityFromRouteMatchAddStatic(): void {
     $entity = $this->prophesize(EntityInterface::class)->reveal();
     $bundle_key = 'bundle';
     $bundle = 'test_bundle';
@@ -211,7 +211,7 @@ public function testGetEntityFromRouteMatchAddStatic() {
    *
    * @covers ::getEntityFromRouteMatch
    */
-  public function testGetEntityFromRouteMatchAddEntity() {
+  public function testGetEntityFromRouteMatchAddEntity(): void {
     $entity = $this->prophesize(EntityInterface::class)->reveal();
     $bundle_entity_type_id = 'entity_test_bundle';
     $bundle = 'test_entity_bundle';
diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityLinkTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityLinkTest.php
index 745e78cc07ed..6e59c4270887 100644
--- a/core/tests/Drupal/Tests/Core/Entity/EntityLinkTest.php
+++ b/core/tests/Drupal/Tests/Core/Entity/EntityLinkTest.php
@@ -62,7 +62,7 @@ protected function setUp(): void {
    *
    * @dataProvider providerTestLink
    */
-  public function testToLink($entity_label, $link_text, $expected_text, $link_rel = 'canonical', array $link_options = []) {
+  public function testToLink($entity_label, $link_text, $expected_text, $link_rel = 'canonical', array $link_options = []): void {
     $language = new Language(['id' => 'es']);
     $link_options += ['language' => $language];
     $this->languageManager->expects($this->any())
diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityListBuilderTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityListBuilderTest.php
index 4ab0e17c0bae..9a7531d5f2cd 100644
--- a/core/tests/Drupal/Tests/Core/Entity/EntityListBuilderTest.php
+++ b/core/tests/Drupal/Tests/Core/Entity/EntityListBuilderTest.php
@@ -95,7 +95,7 @@ protected function setUp(): void {
   /**
    * @covers ::getOperations
    */
-  public function testGetOperations() {
+  public function testGetOperations(): void {
     $operation_name = $this->randomMachineName();
     $operations = [
       $operation_name => [
diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityRepositoryTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityRepositoryTest.php
index 7048f2fbac76..d06cfa7335ab 100644
--- a/core/tests/Drupal/Tests/Core/Entity/EntityRepositoryTest.php
+++ b/core/tests/Drupal/Tests/Core/Entity/EntityRepositoryTest.php
@@ -66,7 +66,7 @@ protected function setUp(): void {
    *
    * @covers ::getTranslationFromContext
    */
-  public function testGetTranslationFromContext() {
+  public function testGetTranslationFromContext(): void {
     $language = new Language(['id' => 'en']);
     $this->languageManager->getCurrentLanguage(LanguageInterface::TYPE_CONTENT)
       ->willReturn($language)
diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityResolverManagerTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityResolverManagerTest.php
index f148e18af832..1c34d09d194a 100644
--- a/core/tests/Drupal/Tests/Core/Entity/EntityResolverManagerTest.php
+++ b/core/tests/Drupal/Tests/Core/Entity/EntityResolverManagerTest.php
@@ -72,7 +72,7 @@ protected function setUp(): void {
    *
    * @dataProvider providerTestSetRouteOptionsWithStandardRoute
    */
-  public function testSetRouteOptionsWithStandardRoute($controller) {
+  public function testSetRouteOptionsWithStandardRoute($controller): void {
     $route = new Route('/example', [
       '_controller' => $controller,
     ]);
@@ -101,7 +101,7 @@ public static function providerTestSetRouteOptionsWithStandardRoute() {
    *
    * @dataProvider providerTestSetRouteOptionsWithStandardRouteWithArgument
    */
-  public function testSetRouteOptionsWithStandardRouteWithArgument($controller) {
+  public function testSetRouteOptionsWithStandardRouteWithArgument($controller): void {
     $route = new Route('/example/{argument}', [
       '_controller' => $controller,
       'argument' => 'test',
@@ -131,7 +131,7 @@ public static function providerTestSetRouteOptionsWithStandardRouteWithArgument(
    *
    * @dataProvider providerTestSetRouteOptionsWithContentController
    */
-  public function testSetRouteOptionsWithContentController($controller) {
+  public function testSetRouteOptionsWithContentController($controller): void {
     $route = new Route('/example/{argument}', [
       '_controller' => $controller,
       'argument' => 'test',
@@ -163,7 +163,7 @@ public static function providerTestSetRouteOptionsWithContentController() {
    *
    * @dataProvider providerTestSetRouteOptionsWithEntityTypeNoUpcasting
    */
-  public function testSetRouteOptionsWithEntityTypeNoUpcasting($controller) {
+  public function testSetRouteOptionsWithEntityTypeNoUpcasting($controller): void {
     $this->setupEntityTypes();
 
     $route = new Route('/example/{entity_test}', [
@@ -196,7 +196,7 @@ public static function providerTestSetRouteOptionsWithEntityTypeNoUpcasting() {
    *
    * @dataProvider providerTestSetRouteOptionsWithEntityTypeUpcasting
    */
-  public function testSetRouteOptionsWithEntityTypeUpcasting($controller) {
+  public function testSetRouteOptionsWithEntityTypeUpcasting($controller): void {
     $this->setupEntityTypes();
 
     $route = new Route('/example/{entity_test}', [
@@ -228,7 +228,7 @@ public static function providerTestSetRouteOptionsWithEntityTypeUpcasting() {
    * @covers ::getEntityTypes
    * @covers ::setParametersFromReflection
    */
-  public function testSetRouteOptionsWithEntityFormUpcasting() {
+  public function testSetRouteOptionsWithEntityFormUpcasting(): void {
     $this->setupEntityTypes();
 
     $route = new Route('/example/{entity_test}', [
@@ -250,7 +250,7 @@ public function testSetRouteOptionsWithEntityFormUpcasting() {
    * @covers ::getEntityTypes
    * @covers ::setParametersFromReflection
    */
-  public function testSetRouteOptionsWithEntityUpcastingNoCreate() {
+  public function testSetRouteOptionsWithEntityUpcastingNoCreate(): void {
     $this->setupEntityTypes();
 
     $route = new Route('/example/{entity_test}', [
@@ -272,7 +272,7 @@ public function testSetRouteOptionsWithEntityUpcastingNoCreate() {
    * @covers ::getEntityTypes
    * @covers ::setParametersFromReflection
    */
-  public function testSetRouteOptionsWithEntityFormNoUpcasting() {
+  public function testSetRouteOptionsWithEntityFormNoUpcasting(): void {
     $this->setupEntityTypes();
 
     $route = new Route('/example/{entity_test}', [
@@ -294,7 +294,7 @@ public function testSetRouteOptionsWithEntityFormNoUpcasting() {
    * @covers ::setParametersFromReflection
    * @covers ::setParametersFromEntityInformation
    */
-  public function testSetRouteOptionsWithEntityViewRouteAndManualParameters() {
+  public function testSetRouteOptionsWithEntityViewRouteAndManualParameters(): void {
     $this->setupEntityTypes();
     $route = new Route('/example/{foo}',
       [
@@ -326,7 +326,7 @@ public function testSetRouteOptionsWithEntityViewRouteAndManualParameters() {
    * @covers ::setParametersFromReflection
    * @covers ::setParametersFromEntityInformation
    */
-  public function testSetRouteOptionsWithEntityViewRoute() {
+  public function testSetRouteOptionsWithEntityViewRoute(): void {
     $this->setupEntityTypes();
     $route = new Route('/example/{entity_test}', [
       '_entity_view' => 'entity_test.view',
@@ -348,7 +348,7 @@ public function testSetRouteOptionsWithEntityViewRoute() {
    * @covers ::setParametersFromReflection
    * @covers ::setParametersFromEntityInformation
    */
-  public function testSetRouteOptionsWithEntityListRoute() {
+  public function testSetRouteOptionsWithEntityListRoute(): void {
     $this->setupEntityTypes();
     $route = new Route('/example/{entity_test}', [
       '_entity_list' => 'entity_test',
@@ -370,7 +370,7 @@ public function testSetRouteOptionsWithEntityListRoute() {
    * @covers ::setParametersFromReflection
    * @covers ::setParametersFromEntityInformation
    */
-  public function testSetRouteOptionsWithEntityFormRoute() {
+  public function testSetRouteOptionsWithEntityFormRoute(): void {
     $this->setupEntityTypes();
     $route = new Route('/example/{entity_test}', [
       '_entity_form' => 'entity_test.edit',
@@ -395,7 +395,7 @@ public function testSetRouteOptionsWithEntityFormRoute() {
    * @covers ::setParametersFromReflection
    * @covers ::setParametersFromEntityInformation
    */
-  public function testSetRouteOptionsWithEntityFormRouteAndArgument() {
+  public function testSetRouteOptionsWithEntityFormRouteAndArgument(): void {
     $this->setupEntityTypes();
     $route = new Route('/example/{argument}/{entity_test}', [
       '_entity_form' => 'entity_test.edit',
@@ -424,7 +424,7 @@ public function testSetRouteOptionsWithEntityFormRouteAndArgument() {
    * @covers ::setParametersFromReflection
    * @covers ::setParametersFromEntityInformation
    */
-  public function testSetRouteOptionsWithEntityAddFormRoute() {
+  public function testSetRouteOptionsWithEntityAddFormRoute(): void {
     $this->setupEntityTypes();
     $route = new Route('/example/add', [
       '_entity_form' => 'entity_test.add',
diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityTypeBundleInfoTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityTypeBundleInfoTest.php
index 256a06e94488..55742942e03c 100644
--- a/core/tests/Drupal/Tests/Core/Entity/EntityTypeBundleInfoTest.php
+++ b/core/tests/Drupal/Tests/Core/Entity/EntityTypeBundleInfoTest.php
@@ -145,7 +145,7 @@ protected function setUpEntityTypeDefinitions($definitions = []) {
    *
    * @covers ::clearCachedBundles
    */
-  public function testClearCachedBundles() {
+  public function testClearCachedBundles(): void {
     $this->setUpEntityTypeDefinitions();
 
     $this->typedDataManager->clearCachedDefinitions()->shouldBeCalled();
@@ -162,7 +162,7 @@ public function testClearCachedBundles() {
    *
    * @dataProvider providerTestGetBundleInfo
    */
-  public function testGetBundleInfo($entity_type_id, $expected) {
+  public function testGetBundleInfo($entity_type_id, $expected): void {
     $this->moduleHandler->invokeAll('entity_bundle_info')->willReturn([]);
     $this->moduleHandler->alter('entity_bundle_info', Argument::type('array'))->willReturn(NULL);
 
@@ -212,7 +212,7 @@ public static function providerTestGetBundleInfo() {
    *
    * @covers ::getAllBundleInfo
    */
-  public function testGetAllBundleInfo() {
+  public function testGetAllBundleInfo(): void {
     $this->moduleHandler->invokeAll('entity_bundle_info')->willReturn([]);
     $this->moduleHandler->alter('entity_bundle_info', Argument::type('array'))->willReturn(NULL);
 
@@ -270,7 +270,7 @@ public function testGetAllBundleInfo() {
   /**
    * @covers ::getAllBundleInfo
    */
-  public function testGetAllBundleInfoWithEntityBundleInfo() {
+  public function testGetAllBundleInfoWithEntityBundleInfo(): void {
     // Ensure that EntityTypeBundleInfo::getAllBundleInfo() does not add
     // additional bundles if hook_entity_bundle_info() defines some and the
     // entity_type does not define a bundle entity type.
diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityTypeManagerTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityTypeManagerTest.php
index bf2ce4b160db..a3e5953ea580 100644
--- a/core/tests/Drupal/Tests/Core/Entity/EntityTypeManagerTest.php
+++ b/core/tests/Drupal/Tests/Core/Entity/EntityTypeManagerTest.php
@@ -135,7 +135,7 @@ protected function setUpEntityTypeDefinitions($definitions = []) {
    *
    * @dataProvider providerTestHasHandler
    */
-  public function testHasHandler($entity_type_id, $expected) {
+  public function testHasHandler($entity_type_id, $expected): void {
     $apple = $this->prophesize(EntityTypeInterface::class);
     $apple->hasHandlerClass('storage')->willReturn(TRUE);
 
@@ -170,7 +170,7 @@ public static function providerTestHasHandler() {
    *
    * @covers ::getStorage
    */
-  public function testGetStorage() {
+  public function testGetStorage(): void {
     $class = $this->getTestHandlerClass();
     $entity = $this->prophesize(EntityTypeInterface::class);
     $entity->getHandlerClass('storage')->willReturn($class);
@@ -184,7 +184,7 @@ public function testGetStorage() {
    *
    * @covers ::getListBuilder
    */
-  public function testGetListBuilder() {
+  public function testGetListBuilder(): void {
     $class = $this->getTestHandlerClass();
     $entity = $this->prophesize(EntityTypeInterface::class);
     $entity->getHandlerClass('list_builder')->willReturn($class);
@@ -198,7 +198,7 @@ public function testGetListBuilder() {
    *
    * @covers ::getViewBuilder
    */
-  public function testGetViewBuilder() {
+  public function testGetViewBuilder(): void {
     $class = $this->getTestHandlerClass();
     $entity = $this->prophesize(EntityTypeInterface::class);
     $entity->getHandlerClass('view_builder')->willReturn($class);
@@ -212,7 +212,7 @@ public function testGetViewBuilder() {
    *
    * @covers ::getAccessControlHandler
    */
-  public function testGetAccessControlHandler() {
+  public function testGetAccessControlHandler(): void {
     $class = $this->getTestHandlerClass();
     $entity = $this->prophesize(EntityTypeInterface::class);
     $entity->getHandlerClass('access')->willReturn($class);
@@ -226,7 +226,7 @@ public function testGetAccessControlHandler() {
    *
    * @covers ::getFormObject
    */
-  public function testGetFormObject() {
+  public function testGetFormObject(): void {
     $apple = $this->prophesize(EntityTypeInterface::class);
     $apple->getFormClass('default')->willReturn(TestEntityForm::class);
 
@@ -301,7 +301,7 @@ public function testGetFormObjectInvalidOperation(string $entity_type_id, string
    *
    * @covers ::getHandler
    */
-  public function testGetHandler() {
+  public function testGetHandler(): void {
     $class = get_class($this->getMockForAbstractClass(TestEntityHandlerBase::class));
     $apple = $this->prophesize(EntityTypeInterface::class);
     $apple->getHandlerClass('storage')->willReturn($class);
@@ -364,7 +364,7 @@ public function testGetHandlerMissingHandler(string $entity_type, string $handle
   /**
    * @covers ::getRouteProviders
    */
-  public function testGetRouteProviders() {
+  public function testGetRouteProviders(): void {
     $apple = $this->prophesize(EntityTypeInterface::class);
     $apple->getRouteProviderClasses()->willReturn(['default' => TestRouteProvider::class]);
 
@@ -383,7 +383,7 @@ public function testGetRouteProviders() {
    *
    * @covers ::processDefinition
    */
-  public function testProcessDefinition() {
+  public function testProcessDefinition(): void {
     $apple = $this->prophesize(EntityTypeInterface::class);
     $this->setUpEntityTypeDefinitions(['apple' => $apple]);
 
@@ -402,7 +402,7 @@ public function testProcessDefinition() {
    *
    * @dataProvider providerTestGetDefinition
    */
-  public function testGetDefinition($entity_type_id, $expected) {
+  public function testGetDefinition($entity_type_id, $expected): void {
     $entity = $this->prophesize(EntityTypeInterface::class);
 
     $this->setUpEntityTypeDefinitions([
@@ -438,7 +438,7 @@ public static function providerTestGetDefinition() {
    *
    * @covers ::getDefinition
    */
-  public function testGetDefinitionInvalidException() {
+  public function testGetDefinitionInvalidException(): void {
     $this->setUpEntityTypeDefinitions();
 
     $this->expectException(PluginNotFoundException::class);
diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityTypeRepositoryTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityTypeRepositoryTest.php
index 5afc6db038ff..a5d46ebb761d 100644
--- a/core/tests/Drupal/Tests/Core/Entity/EntityTypeRepositoryTest.php
+++ b/core/tests/Drupal/Tests/Core/Entity/EntityTypeRepositoryTest.php
@@ -97,7 +97,7 @@ protected function setUpEntityTypeDefinitions($definitions = []) {
    *
    * @covers ::getEntityTypeLabels
    */
-  public function testGetEntityTypeLabels() {
+  public function testGetEntityTypeLabels(): void {
     $apple = $this->prophesize(EntityTypeInterface::class);
     $apple->getLabel()->willReturn('Apple');
     $apple->getBundleOf()->willReturn(NULL);
@@ -121,7 +121,7 @@ public function testGetEntityTypeLabels() {
   /**
    * @covers ::getEntityTypeFromClass
    */
-  public function testGetEntityTypeFromClass() {
+  public function testGetEntityTypeFromClass(): void {
     $apple = $this->prophesize(EntityTypeInterface::class);
     $banana = $this->prophesize(EntityTypeInterface::class);
 
@@ -147,7 +147,7 @@ public function testGetEntityTypeFromClass() {
   /**
    * @covers ::getEntityTypeFromClass
    */
-  public function testGetEntityTypeFromClassNoMatch() {
+  public function testGetEntityTypeFromClassNoMatch(): void {
     $apple = $this->prophesize(EntityTypeInterface::class);
     $banana = $this->prophesize(EntityTypeInterface::class);
 
@@ -167,7 +167,7 @@ public function testGetEntityTypeFromClassNoMatch() {
   /**
    * @covers ::getEntityTypeFromClass
    */
-  public function testGetEntityTypeFromClassAmbiguous() {
+  public function testGetEntityTypeFromClassAmbiguous(): void {
     $jazz = $this->prophesize(EntityTypeInterface::class);
     $jazz->getOriginalClass()->willReturn('\Drupal\apple\Entity\Apple');
     $jazz->id()->willReturn('jazz');
diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityTypeTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityTypeTest.php
index 071b5d419126..c70a98aded4f 100644
--- a/core/tests/Drupal/Tests/Core/Entity/EntityTypeTest.php
+++ b/core/tests/Drupal/Tests/Core/Entity/EntityTypeTest.php
@@ -37,7 +37,7 @@ protected function setUpEntityType($definition) {
    *
    * @dataProvider providerTestGet
    */
-  public function testGet(array $definition, $key, $expected) {
+  public function testGet(array $definition, $key, $expected): void {
     $entity_type = $this->setUpEntityType($definition);
     $this->assertSame($expected, $entity_type->get($key));
   }
@@ -48,7 +48,7 @@ public function testGet(array $definition, $key, $expected) {
    *
    * @dataProvider providerTestSet
    */
-  public function testSet($key, $value) {
+  public function testSet($key, $value): void {
     $entity_type = $this->setUpEntityType([]);
     $this->assertInstanceOf('Drupal\Core\Entity\EntityTypeInterface', $entity_type->set($key, $value));
     $this->assertSame($value, $entity_type->get($key));
@@ -60,7 +60,7 @@ public function testSet($key, $value) {
    *
    * @dataProvider providerTestGetKeys
    */
-  public function testGetKeys($entity_keys, $expected) {
+  public function testGetKeys($entity_keys, $expected): void {
     $entity_type = $this->setUpEntityType(['entity_keys' => $entity_keys]);
     $expected += [
       'default_langcode' => 'default_langcode',
@@ -74,7 +74,7 @@ public function testGetKeys($entity_keys, $expected) {
    *
    * @dataProvider providerTestGetKeys
    */
-  public function testGetKey($entity_keys, $expected) {
+  public function testGetKey($entity_keys, $expected): void {
     $entity_type = $this->setUpEntityType(['entity_keys' => $entity_keys]);
     $this->assertSame($expected['bundle'], $entity_type->getKey('bundle'));
     $this->assertFalse($entity_type->getKey('bananas'));
@@ -85,7 +85,7 @@ public function testGetKey($entity_keys, $expected) {
    *
    * @dataProvider providerTestGetKeys
    */
-  public function testHasKey($entity_keys, $expected) {
+  public function testHasKey($entity_keys, $expected): void {
     $entity_type = $this->setUpEntityType(['entity_keys' => $entity_keys]);
     $this->assertSame(!empty($expected['bundle']), $entity_type->hasKey('bundle'));
     $this->assertSame(!empty($expected['id']), $entity_type->hasKey('id'));
@@ -134,7 +134,7 @@ public static function providerTestGetKeys() {
   /**
    * Tests the isInternal() method.
    */
-  public function testIsInternal() {
+  public function testIsInternal(): void {
     $entity_type = $this->setUpEntityType(['internal' => TRUE]);
     $this->assertTrue($entity_type->isInternal());
     $entity_type = $this->setUpEntityType(['internal' => FALSE]);
@@ -146,7 +146,7 @@ public function testIsInternal() {
   /**
    * Tests the isRevisionable() method.
    */
-  public function testIsRevisionable() {
+  public function testIsRevisionable(): void {
     $entity_type = $this->setUpEntityType(['entity_keys' => ['id' => 'id']]);
     $this->assertFalse($entity_type->isRevisionable());
     $entity_type = $this->setUpEntityType(['entity_keys' => ['id' => 'id', 'revision' => FALSE]]);
@@ -158,7 +158,7 @@ public function testIsRevisionable() {
   /**
    * Tests the getHandler() method.
    */
-  public function testGetHandler() {
+  public function testGetHandler(): void {
     $controller = $this->getTestHandlerClass();
     $entity_type = $this->setUpEntityType([
       'handlers' => [
@@ -177,7 +177,7 @@ public function testGetHandler() {
   /**
    * Tests the getStorageClass() method.
    */
-  public function testGetStorageClass() {
+  public function testGetStorageClass(): void {
     $controller = $this->getTestHandlerClass();
     $entity_type = $this->setUpEntityType([
       'handlers' => [
@@ -190,7 +190,7 @@ public function testGetStorageClass() {
   /**
    * Tests the setStorageClass() method.
    */
-  public function testSetStorageClass() {
+  public function testSetStorageClass(): void {
     $controller = $this->getTestHandlerClass();
     $entity_type = $this->setUpEntityType([]);
     $this->assertSame($entity_type, $entity_type->setStorageClass($controller));
@@ -199,7 +199,7 @@ public function testSetStorageClass() {
   /**
    * Tests the getListBuilderClass() method.
    */
-  public function testGetListBuilderClass() {
+  public function testGetListBuilderClass(): void {
     $controller = $this->getTestHandlerClass();
     $entity_type = $this->setUpEntityType([
       'handlers' => [
@@ -212,7 +212,7 @@ public function testGetListBuilderClass() {
   /**
    * Tests the getAccessControlClass() method.
    */
-  public function testGetAccessControlClass() {
+  public function testGetAccessControlClass(): void {
     $controller = $this->getTestHandlerClass();
     $entity_type = $this->setUpEntityType([
       'handlers' => [
@@ -225,7 +225,7 @@ public function testGetAccessControlClass() {
   /**
    * Tests the getFormClass() method.
    */
-  public function testGetFormClass() {
+  public function testGetFormClass(): void {
     $controller = $this->getTestHandlerClass();
     $operation = 'default';
     $entity_type = $this->setUpEntityType([
@@ -241,7 +241,7 @@ public function testGetFormClass() {
   /**
    * Tests the hasFormClasses() method.
    */
-  public function testHasFormClasses() {
+  public function testHasFormClasses(): void {
     $controller = $this->getTestHandlerClass();
     $operation = 'default';
     $entity_type1 = $this->setUpEntityType([
@@ -261,7 +261,7 @@ public function testHasFormClasses() {
   /**
    * Tests the getViewBuilderClass() method.
    */
-  public function testGetViewBuilderClass() {
+  public function testGetViewBuilderClass(): void {
     $controller = $this->getTestHandlerClass();
     $entity_type = $this->setUpEntityType([
       'handlers' => [
@@ -274,7 +274,7 @@ public function testGetViewBuilderClass() {
   /**
    * @covers ::__construct
    */
-  public function testIdExceedsMaxLength() {
+  public function testIdExceedsMaxLength(): void {
     $id = $this->randomMachineName(33);
     $message = 'Attempt to create an entity type with an ID longer than 32 characters: ' . $id;
     $this->expectException('Drupal\Core\Entity\Exception\EntityTypeIdLengthException');
@@ -285,7 +285,7 @@ public function testIdExceedsMaxLength() {
   /**
    * @covers ::getOriginalClass
    */
-  public function testGetOriginalClassUnchanged() {
+  public function testGetOriginalClassUnchanged(): void {
     $class = $this->randomMachineName();
     $entity_type = $this->setUpEntityType(['class' => $class]);
     $this->assertEquals($class, $entity_type->getOriginalClass());
@@ -295,7 +295,7 @@ public function testGetOriginalClassUnchanged() {
    * @covers ::setClass
    * @covers ::getOriginalClass
    */
-  public function testGetOriginalClassChanged() {
+  public function testGetOriginalClassChanged(): void {
     $class = $this->randomMachineName();
     $entity_type = $this->setUpEntityType(['class' => $class]);
     $entity_type->setClass($this->randomMachineName());
@@ -305,7 +305,7 @@ public function testGetOriginalClassChanged() {
   /**
    * @covers ::id
    */
-  public function testId() {
+  public function testId(): void {
     $id = $this->randomMachineName(32);
     $entity_type = $this->setUpEntityType(['id' => $id]);
     $this->assertEquals($id, $entity_type->id());
@@ -314,7 +314,7 @@ public function testId() {
   /**
    * @covers ::getLabel
    */
-  public function testGetLabel() {
+  public function testGetLabel(): void {
     $translatable_label = new TranslatableMarkup($this->randomMachineName());
     $entity_type = $this->setUpEntityType(['label' => $translatable_label]);
     $this->assertSame($translatable_label, $entity_type->getLabel());
@@ -327,7 +327,7 @@ public function testGetLabel() {
   /**
    * @covers ::getGroupLabel
    */
-  public function testGetGroupLabel() {
+  public function testGetGroupLabel(): void {
     $translatable_group_label = new TranslatableMarkup($this->randomMachineName());
     $entity_type = $this->setUpEntityType(['group_label' => $translatable_group_label]);
     $this->assertSame($translatable_group_label, $entity_type->getGroupLabel());
@@ -344,7 +344,7 @@ public function testGetGroupLabel() {
   /**
    * @covers ::getCollectionLabel
    */
-  public function testGetCollectionLabel() {
+  public function testGetCollectionLabel(): void {
     $translatable_label = new TranslatableMarkup('Entity test collection', [], [], $this->getStringTranslationStub());
     $entity_type = $this->setUpEntityType(['label_collection' => $translatable_label]);
     $entity_type->setStringTranslation($this->getStringTranslationStub());
@@ -354,7 +354,7 @@ public function testGetCollectionLabel() {
   /**
    * @covers ::getSingularLabel
    */
-  public function testGetSingularLabel() {
+  public function testGetSingularLabel(): void {
     $translatable_label = new TranslatableMarkup('entity test singular', [], [], $this->getStringTranslationStub());
     $entity_type = $this->setUpEntityType(['label_singular' => $translatable_label]);
     $entity_type->setStringTranslation($this->getStringTranslationStub());
@@ -364,7 +364,7 @@ public function testGetSingularLabel() {
   /**
    * @covers ::getSingularLabel
    */
-  public function testGetSingularLabelDefault() {
+  public function testGetSingularLabelDefault(): void {
     $entity_type = $this->setUpEntityType(['label' => 'Entity test Singular']);
     $entity_type->setStringTranslation($this->getStringTranslationStub());
     $this->assertEquals('entity test singular', $entity_type->getSingularLabel());
@@ -373,7 +373,7 @@ public function testGetSingularLabelDefault() {
   /**
    * @covers ::getPluralLabel
    */
-  public function testGetPluralLabel() {
+  public function testGetPluralLabel(): void {
     $translatable_label = new TranslatableMarkup('entity test plural', [], [], $this->getStringTranslationStub());
     $entity_type = $this->setUpEntityType(['label_plural' => $translatable_label]);
     $entity_type->setStringTranslation($this->getStringTranslationStub());
@@ -383,7 +383,7 @@ public function testGetPluralLabel() {
   /**
    * @covers ::getPluralLabel
    */
-  public function testGetPluralLabelDefault() {
+  public function testGetPluralLabelDefault(): void {
     $entity_type = $this->setUpEntityType(['label' => 'Entity test Plural']);
     $entity_type->setStringTranslation($this->getStringTranslationStub());
     $this->assertEquals('entity test plural entities', $entity_type->getPluralLabel());
@@ -392,7 +392,7 @@ public function testGetPluralLabelDefault() {
   /**
    * @covers ::getCountLabel
    */
-  public function testGetCountLabel() {
+  public function testGetCountLabel(): void {
     $entity_type = $this->setUpEntityType(['label_count' => ['singular' => 'one entity test', 'plural' => '@count entity test']]);
     $entity_type->setStringTranslation($this->getStringTranslationStub());
     $this->assertEquals('one entity test', $entity_type->getCountLabel(1));
@@ -409,7 +409,7 @@ public function testGetCountLabel() {
   /**
    * @covers ::getCountLabel
    */
-  public function testGetCountLabelDefault() {
+  public function testGetCountLabelDefault(): void {
     $entity_type = $this->setUpEntityType(['label' => 'Entity test Plural']);
     $entity_type->setStringTranslation($this->getStringTranslationStub());
     $this->assertEquals('1 entity test plural', $entity_type->getCountLabel(1));
@@ -424,7 +424,7 @@ public function testGetCountLabelDefault() {
    * @covers ::getBundleLabel
    * @dataProvider providerTestGetBundleLabel
    */
-  public function testGetBundleLabel($definition, $expected) {
+  public function testGetBundleLabel($definition, $expected): void {
     $entity_type = $this->setUpEntityType($definition);
     $entity_type->setStringTranslation($this->getStringTranslationStub());
     $this->assertEquals($expected, $entity_type->getBundleLabel());
@@ -453,7 +453,7 @@ protected function getTestHandlerClass() {
   /**
    * @covers ::setLinkTemplate
    */
-  public function testSetLinkTemplateWithInvalidPath() {
+  public function testSetLinkTemplateWithInvalidPath(): void {
     $entity_type = $this->setUpEntityType(['id' => $this->randomMachineName()]);
     $this->expectException(\InvalidArgumentException::class);
     $entity_type->setLinkTemplate('test', 'invalid-path');
@@ -466,7 +466,7 @@ public function testSetLinkTemplateWithInvalidPath() {
    * @covers ::setConstraints
    * @covers ::addConstraint
    */
-  public function testConstraintMethods() {
+  public function testConstraintMethods(): void {
     $definition = [
       'constraints' => [
         'EntityChanged' => [],
@@ -496,7 +496,7 @@ protected function assertNoPublicProperties(EntityTypeInterface $entity_type): v
   /**
    * @covers ::entityClassImplements
    */
-  public function testEntityClassImplements() {
+  public function testEntityClassImplements(): void {
     $entity_type = $this->setUpEntityType(['class' => EntityFormMode::class]);
     $this->assertTrue($entity_type->entityClassImplements(ConfigEntityInterface::class));
     $this->assertFalse($entity_type->entityClassImplements(\DateTimeInterface::class));
diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityUnitTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityUnitTest.php
index cfc633fa1d25..43816924d151 100644
--- a/core/tests/Drupal/Tests/Core/Entity/EntityUnitTest.php
+++ b/core/tests/Drupal/Tests/Core/Entity/EntityUnitTest.php
@@ -133,14 +133,14 @@ protected function setUp(): void {
   /**
    * @covers ::id
    */
-  public function testId() {
+  public function testId(): void {
     $this->assertSame($this->values['id'], $this->entity->id());
   }
 
   /**
    * @covers ::uuid
    */
-  public function testUuid() {
+  public function testUuid(): void {
     $this->assertSame($this->values['uuid'], $this->entity->uuid());
   }
 
@@ -148,7 +148,7 @@ public function testUuid() {
    * @covers ::isNew
    * @covers ::enforceIsNew
    */
-  public function testIsNew() {
+  public function testIsNew(): void {
     // We provided an ID, so the entity is not new.
     $this->assertFalse($this->entity->isNew());
     // Force it to be new.
@@ -159,21 +159,21 @@ public function testIsNew() {
   /**
    * @covers ::getEntityType
    */
-  public function testGetEntityType() {
+  public function testGetEntityType(): void {
     $this->assertSame($this->entityType, $this->entity->getEntityType());
   }
 
   /**
    * @covers ::bundle
    */
-  public function testBundle() {
+  public function testBundle(): void {
     $this->assertSame($this->entityTypeId, $this->entity->bundle());
   }
 
   /**
    * @covers ::label
    */
-  public function testLabel() {
+  public function testLabel(): void {
     $property_label = $this->randomMachineName();
     $this->entityType->expects($this->atLeastOnce())
       ->method('getKey')
@@ -198,7 +198,7 @@ public function testLabel() {
   /**
    * @covers ::access
    */
-  public function testAccess() {
+  public function testAccess(): void {
     $access = $this->createMock('\Drupal\Core\Entity\EntityAccessControlHandlerInterface');
     $operation = $this->randomMachineName();
     $access->expects($this->once())
@@ -219,7 +219,7 @@ public function testAccess() {
   /**
    * @covers ::language
    */
-  public function testLanguage() {
+  public function testLanguage(): void {
     $this->entityType->expects($this->any())
       ->method('getKey')
       ->willReturnMap([
@@ -253,7 +253,7 @@ public function setupTestLoad() {
    *
    * @covers ::load
    */
-  public function testLoad() {
+  public function testLoad(): void {
     $this->setupTestLoad();
 
     $class_name = get_class($this->entity);
@@ -288,7 +288,7 @@ public function testLoad() {
    *
    * @covers ::loadMultiple
    */
-  public function testLoadMultiple() {
+  public function testLoadMultiple(): void {
     $this->setupTestLoad();
 
     $class_name = get_class($this->entity);
@@ -320,7 +320,7 @@ public function testLoadMultiple() {
   /**
    * @covers ::create
    */
-  public function testCreate() {
+  public function testCreate(): void {
     $this->setupTestLoad();
 
     $class_name = get_class($this->entity);
@@ -352,7 +352,7 @@ public function testCreate() {
   /**
    * @covers ::save
    */
-  public function testSave() {
+  public function testSave(): void {
     $storage = $this->createMock('\Drupal\Core\Entity\EntityStorageInterface');
     $storage->expects($this->once())
       ->method('save')
@@ -369,7 +369,7 @@ public function testSave() {
   /**
    * @covers ::delete
    */
-  public function testDelete() {
+  public function testDelete(): void {
     $this->entity->id = $this->randomMachineName();
     $storage = $this->createMock('\Drupal\Core\Entity\EntityStorageInterface');
     // Testing the argument of the delete() method consumes too much memory.
@@ -387,14 +387,14 @@ public function testDelete() {
   /**
    * @covers ::getEntityTypeId
    */
-  public function testGetEntityTypeId() {
+  public function testGetEntityTypeId(): void {
     $this->assertSame($this->entityTypeId, $this->entity->getEntityTypeId());
   }
 
   /**
    * @covers ::preSave
    */
-  public function testPreSave() {
+  public function testPreSave(): void {
     // This method is internal, so check for errors on calling it only.
     $storage = $this->createMock('\Drupal\Core\Entity\EntityStorageInterface');
     // Our mocked entity->preSave() returns NULL, so assert that.
@@ -404,7 +404,7 @@ public function testPreSave() {
   /**
    * @covers ::postSave
    */
-  public function testPostSave() {
+  public function testPostSave(): void {
     // This method is internal, so check for errors on calling it only.
     $storage = $this->createMock('\Drupal\Core\Entity\EntityStorageInterface');
 
@@ -426,7 +426,7 @@ public function testPostSave() {
   /**
    * @covers ::postSave
    */
-  public function testPostSaveBundle() {
+  public function testPostSaveBundle(): void {
     $this->entityType->expects($this->atLeastOnce())
       ->method('hasKey')
       ->with('bundle')
@@ -456,7 +456,7 @@ public function testPostSaveBundle() {
   /**
    * @covers ::preCreate
    */
-  public function testPreCreate() {
+  public function testPreCreate(): void {
     // This method is internal, so check for errors on calling it only.
     $storage = $this->createMock('\Drupal\Core\Entity\EntityStorageInterface');
     $values = [];
@@ -467,7 +467,7 @@ public function testPreCreate() {
   /**
    * @covers ::postCreate
    */
-  public function testPostCreate() {
+  public function testPostCreate(): void {
     // This method is internal, so check for errors on calling it only.
     $storage = $this->createMock('\Drupal\Core\Entity\EntityStorageInterface');
     // Our mocked entity->postCreate() returns NULL, so assert that.
@@ -477,7 +477,7 @@ public function testPostCreate() {
   /**
    * @covers ::preDelete
    */
-  public function testPreDelete() {
+  public function testPreDelete(): void {
     // This method is internal, so check for errors on calling it only.
     $storage = $this->createMock('\Drupal\Core\Entity\EntityStorageInterface');
     // Our mocked entity->preDelete() returns NULL, so assert that.
@@ -487,7 +487,7 @@ public function testPreDelete() {
   /**
    * @covers ::postDelete
    */
-  public function testPostDelete() {
+  public function testPostDelete(): void {
     $storage = $this->createMock('\Drupal\Core\Entity\EntityStorageInterface');
     $storage->expects($this->once())
       ->method('getEntityType')
@@ -505,7 +505,7 @@ public function testPostDelete() {
   /**
    * @covers ::postDelete
    */
-  public function testPostDeleteBundle() {
+  public function testPostDeleteBundle(): void {
     $this->entityType->expects($this->atLeastOnce())
       ->method('hasKey')
       ->with('bundle')
@@ -530,7 +530,7 @@ public function testPostDeleteBundle() {
   /**
    * @covers ::postLoad
    */
-  public function testPostLoad() {
+  public function testPostLoad(): void {
     // This method is internal, so check for errors on calling it only.
     $storage = $this->createMock('\Drupal\Core\Entity\EntityStorageInterface');
     $entities = [$this->entity];
@@ -541,7 +541,7 @@ public function testPostLoad() {
   /**
    * @covers ::referencedEntities
    */
-  public function testReferencedEntities() {
+  public function testReferencedEntities(): void {
     $this->assertSame([], $this->entity->referencedEntities());
   }
 
@@ -550,7 +550,7 @@ public function testReferencedEntities() {
    * @covers ::getCacheTagsToInvalidate
    * @covers ::addCacheTags
    */
-  public function testCacheTags() {
+  public function testCacheTags(): void {
     // Ensure that both methods return the same by default.
     $this->assertEqualsCanonicalizing([$this->entityTypeId . ':' . 1], $this->entity->getCacheTags());
     $this->assertEqualsCanonicalizing([$this->entityTypeId . ':' . 1], $this->entity->getCacheTagsToInvalidate());
@@ -570,7 +570,7 @@ public function testCacheTags() {
    * @covers ::getCacheContexts
    * @covers ::addCacheContexts
    */
-  public function testCacheContexts() {
+  public function testCacheContexts(): void {
     $cache_contexts_manager = $this->getMockBuilder('Drupal\Core\Cache\Context\CacheContextsManager')
       ->disableOriginalConstructor()
       ->getMock();
@@ -592,7 +592,7 @@ public function testCacheContexts() {
    * @covers ::getCacheMaxAge
    * @covers ::mergeCacheMaxAge
    */
-  public function testCacheMaxAge() {
+  public function testCacheMaxAge(): void {
     // Cache max age is permanent by default.
     $this->assertEquals(Cache::PERMANENT, $this->entity->getCacheMaxAge());
 
diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityUrlTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityUrlTest.php
index d9278aea237f..378efcbb5937 100644
--- a/core/tests/Drupal/Tests/Core/Entity/EntityUrlTest.php
+++ b/core/tests/Drupal/Tests/Core/Entity/EntityUrlTest.php
@@ -95,7 +95,7 @@ class EntityUrlTest extends UnitTestCase {
    *
    * @covers ::toUrl
    */
-  public function testToUrlNoId() {
+  public function testToUrlNoId(): void {
     $entity = $this->getEntity(UrlTestEntity::class, []);
 
     $this->expectException(EntityMalformedException::class);
@@ -166,7 +166,7 @@ public function testToUrlDefaultFallback(): void {
    * @covers ::linkTemplates
    * @covers ::urlRouteParameters
    */
-  public function testToUrlLinkTemplates($link_template, $expected_route_name) {
+  public function testToUrlLinkTemplates($link_template, $expected_route_name): void {
     $values = ['id' => static::ENTITY_ID, 'langcode' => $this->langcode];
     $entity = $this->getEntity(UrlTestEntity::class, $values);
     $this->registerLinkTemplate($link_template);
@@ -264,7 +264,7 @@ public static function providerTestToUrlLinkTemplateRevision(): array {
    * @covers ::linkTemplates
    * @covers ::urlRouteParameters
    */
-  public function testToUrlLinkTemplateNoId($link_template, $expected_route_name) {
+  public function testToUrlLinkTemplateNoId($link_template, $expected_route_name): void {
     $entity = $this->getEntity(UrlTestEntity::class, ['id' => static::ENTITY_ID]);
     $this->registerLinkTemplate($link_template);
 
@@ -354,7 +354,7 @@ public static function providerTestToUrlLinkTemplateAddForm(): array {
    * @covers ::toUrl
    * @covers ::linkTemplates
    */
-  public function testToUrlUriCallbackUndefined(array $bundle_info, $uri_callback) {
+  public function testToUrlUriCallbackUndefined(array $bundle_info, $uri_callback): void {
     $entity = $this->getEntity(UrlTestEntity::class, ['id' => static::ENTITY_ID]);
 
     $this->registerBundleInfo($bundle_info);
@@ -432,7 +432,7 @@ public static function providerTestToUrlUriCallback(): array {
    *
    * @covers ::uriRelationships
    */
-  public function testUriRelationships() {
+  public function testUriRelationships(): void {
     $entity = $this->getEntity(UrlTestEntity::class, ['id' => static::ENTITY_ID]);
 
     $container_builder = new ContainerBuilder();
diff --git a/core/tests/Drupal/Tests/Core/Entity/FieldDefinitionTest.php b/core/tests/Drupal/Tests/Core/Entity/FieldDefinitionTest.php
index ea7f1f36b707..0ba944f287c6 100644
--- a/core/tests/Drupal/Tests/Core/Entity/FieldDefinitionTest.php
+++ b/core/tests/Drupal/Tests/Core/Entity/FieldDefinitionTest.php
@@ -102,7 +102,7 @@ protected function setUp(): void {
    * @covers ::getName
    * @dataProvider factoryTypeProvider
    */
-  public function testFieldName($factory_name) {
+  public function testFieldName($factory_name): void {
     $definition = $this->initializeFieldUsingFactory($factory_name);
     $this->assertEquals($this->storageDefinition->getName(), $definition->getName());
   }
@@ -111,7 +111,7 @@ public function testFieldName($factory_name) {
    * @covers ::getLabel
    * @dataProvider factoryTypeProvider
    */
-  public function testFieldLabel($factory_name) {
+  public function testFieldLabel($factory_name): void {
     $definition = $this->initializeFieldUsingFactory($factory_name);
     $label = $this->randomMachineName();
     $definition->setLabel($label);
@@ -123,7 +123,7 @@ public function testFieldLabel($factory_name) {
    * @covers ::getTargetBundle
    * @dataProvider factoryTypeProvider
    */
-  public function testBundle($factory_name) {
+  public function testBundle($factory_name): void {
     $definition = $this->initializeFieldUsingFactory($factory_name);
     $bundle = $this->randomMachineName();
     $definition->setTargetBundle($bundle);
@@ -134,7 +134,7 @@ public function testBundle($factory_name) {
    * @covers ::getDescription
    * @dataProvider factoryTypeProvider
    */
-  public function testFieldDescription($factory_name) {
+  public function testFieldDescription($factory_name): void {
     $definition = $this->initializeFieldUsingFactory($factory_name);
     $description = $this->randomMachineName();
     $definition->setDescription($description);
@@ -145,7 +145,7 @@ public function testFieldDescription($factory_name) {
    * @covers ::getType
    * @dataProvider factoryTypeProvider
    */
-  public function testFieldType($factory_name) {
+  public function testFieldType($factory_name): void {
     $definition = $this->initializeFieldUsingFactory($factory_name);
     $this->assertEquals($this->fieldType, $definition->getType());
   }
@@ -156,7 +156,7 @@ public function testFieldType($factory_name) {
    * @covers ::getSettings
    * @dataProvider factoryTypeProvider
    */
-  public function testFieldSettings($factory_name) {
+  public function testFieldSettings($factory_name): void {
     $definition = $this->initializeFieldUsingFactory($factory_name);
     $setting = $this->randomMachineName();
     $value = $this->randomMachineName();
@@ -172,7 +172,7 @@ public function testFieldSettings($factory_name) {
    * @covers ::getSettings
    * @dataProvider factoryTypeProvider
    */
-  public function testDefaultFieldSettings($factory_name) {
+  public function testDefaultFieldSettings($factory_name): void {
     $definition = $this->initializeFieldUsingFactory($factory_name);
     $expected_settings = $this->fieldTypeDefinition['field_settings'] + $this->fieldTypeDefinition['storage_settings'];
     $this->assertEquals($expected_settings, $definition->getSettings());
@@ -186,7 +186,7 @@ public function testDefaultFieldSettings($factory_name) {
    * @covers ::setDefaultValue
    * @dataProvider factoryTypeProvider
    */
-  public function testFieldDefaultValue($factory_name) {
+  public function testFieldDefaultValue($factory_name): void {
     $definition = $this->initializeFieldUsingFactory($factory_name);
 
     $this->assertEquals([], $definition->getDefaultValueLiteral());
@@ -236,7 +236,7 @@ public function testFieldDefaultValue($factory_name) {
    * @covers ::setTranslatable
    * @dataProvider factoryTypeProvider
    */
-  public function testFieldTranslatable($factory_name) {
+  public function testFieldTranslatable($factory_name): void {
     $definition = $this->initializeFieldUsingFactory($factory_name);
     $this->assertFalse($definition->isTranslatable());
     $definition->setTranslatable(TRUE);
@@ -257,7 +257,7 @@ public function testFieldTranslatable($factory_name) {
    * @covers ::setRequired
    * @dataProvider factoryTypeProvider
    */
-  public function testFieldRequired($factory_name) {
+  public function testFieldRequired($factory_name): void {
     $definition = $this->initializeFieldUsingFactory($factory_name);
     $this->assertFalse($definition->isRequired());
     $definition->setRequired(TRUE);
@@ -272,7 +272,7 @@ public function testFieldRequired($factory_name) {
    * @covers ::setDefaultValueCallback
    * @dataProvider factoryTypeProvider
    */
-  public function testDefaultValueCallback($factory_name) {
+  public function testDefaultValueCallback($factory_name): void {
     $definition = $this->initializeFieldUsingFactory($factory_name);
     $callback = static::class . '::mockDefaultValueCallback';
     // setDefaultValueCallback returns $this.
@@ -286,7 +286,7 @@ public function testDefaultValueCallback($factory_name) {
    * @covers ::setDefaultValueCallback
    * @dataProvider factoryTypeProvider
    */
-  public function testInvalidDefaultValueCallback($factory_name) {
+  public function testInvalidDefaultValueCallback($factory_name): void {
     $definition = $this->initializeFieldUsingFactory($factory_name);
     // setDefaultValueCallback returns $this.
     $this->expectException(\InvalidArgumentException::class);
@@ -299,7 +299,7 @@ public function testInvalidDefaultValueCallback($factory_name) {
    * @covers ::setDefaultValueCallback
    * @dataProvider factoryTypeProvider
    */
-  public function testNullDefaultValueCallback($factory_name) {
+  public function testNullDefaultValueCallback($factory_name): void {
     $definition = $this->initializeFieldUsingFactory($factory_name);
     // setDefaultValueCallback returns $this.
     $this->assertSame($definition, $definition->setDefaultValueCallback(NULL));
@@ -313,7 +313,7 @@ public function testNullDefaultValueCallback($factory_name) {
    * @covers ::getDisplayOptions
    * @dataProvider factoryTypeProvider
    */
-  public function testDisplayConfigurationSettings($factory_name) {
+  public function testDisplayConfigurationSettings($factory_name): void {
     $definition = $this->initializeFieldUsingFactory($factory_name);
     $this->assertEquals(FALSE, $definition->isDisplayConfigurable('foo'));
     $this->assertEquals(NULL, $definition->getDisplayOptions('foo'));
diff --git a/core/tests/Drupal/Tests/Core/Entity/KeyValueStore/KeyValueEntityStorageTest.php b/core/tests/Drupal/Tests/Core/Entity/KeyValueStore/KeyValueEntityStorageTest.php
index 0a25eabc8451..d7c944852d20 100644
--- a/core/tests/Drupal/Tests/Core/Entity/KeyValueStore/KeyValueEntityStorageTest.php
+++ b/core/tests/Drupal/Tests/Core/Entity/KeyValueStore/KeyValueEntityStorageTest.php
@@ -153,7 +153,7 @@ protected function setUpKeyValueEntityStorage($uuid_key = 'uuid') {
    * @covers ::create
    * @covers ::doCreate
    */
-  public function testCreateWithPredefinedUuid() {
+  public function testCreateWithPredefinedUuid(): void {
     $this->entityType->expects($this->once())
       ->method('getClass')
       ->willReturn(get_class($this->getMockEntity()));
@@ -178,7 +178,7 @@ public function testCreateWithPredefinedUuid() {
    * @covers ::create
    * @covers ::doCreate
    */
-  public function testCreateWithoutUuidKey() {
+  public function testCreateWithoutUuidKey(): void {
     // Set up the entity storage to expect no UUID key.
     $this->entityType->expects($this->once())
       ->method('getClass')
@@ -358,7 +358,7 @@ public function testSaveConfigEntity() {
    *
    * @depends testSaveConfigEntity
    */
-  public function testSaveRenameConfigEntity(ConfigEntityInterface $entity) {
+  public function testSaveRenameConfigEntity(ConfigEntityInterface $entity): void {
     $this->entityType->expects($this->once())
       ->method('getClass')
       ->willReturn(get_class($entity));
@@ -397,7 +397,7 @@ public function testSaveRenameConfigEntity(ConfigEntityInterface $entity) {
    * @covers ::save
    * @covers ::doSave
    */
-  public function testSaveContentEntity() {
+  public function testSaveContentEntity(): void {
     $this->entityType->expects($this->any())
       ->method('getKeys')
       ->willReturn([
@@ -432,7 +432,7 @@ public function testSaveContentEntity() {
    * @covers ::save
    * @covers ::doSave
    */
-  public function testSaveInvalid() {
+  public function testSaveInvalid(): void {
     $this->setUpKeyValueEntityStorage();
 
     $entity = $this->getMockEntity('Drupal\Core\Config\Entity\ConfigEntityBase');
@@ -451,7 +451,7 @@ public function testSaveInvalid() {
    * @covers ::save
    * @covers ::doSave
    */
-  public function testSaveDuplicate() {
+  public function testSaveDuplicate(): void {
     $this->setUpKeyValueEntityStorage();
 
     $entity = $this->getMockEntity(EntityBaseTest::class, [['id' => 'foo']]);
@@ -472,7 +472,7 @@ public function testSaveDuplicate() {
    * @covers ::load
    * @covers ::postLoad
    */
-  public function testLoad() {
+  public function testLoad(): void {
     $entity = $this->getMockEntity();
     $this->entityType->expects($this->once())
       ->method('getClass')
@@ -491,7 +491,7 @@ public function testLoad() {
   /**
    * @covers ::load
    */
-  public function testLoadMissingEntity() {
+  public function testLoadMissingEntity(): void {
     $this->setUpKeyValueEntityStorage();
 
     $this->keyValueStore->expects($this->once())
@@ -508,7 +508,7 @@ public function testLoadMissingEntity() {
    * @covers ::mapFromStorageRecords
    * @covers ::doLoadMultiple
    */
-  public function testLoadMultipleAll() {
+  public function testLoadMultipleAll(): void {
     $expected['foo'] = $this->getMockEntity(EntityBaseTest::class, [['id' => 'foo']]);
     $expected['bar'] = $this->getMockEntity(EntityBaseTest::class, [['id' => 'bar']]);
     $this->entityType->expects($this->once())
@@ -533,7 +533,7 @@ public function testLoadMultipleAll() {
    * @covers ::mapFromStorageRecords
    * @covers ::doLoadMultiple
    */
-  public function testLoadMultipleIds() {
+  public function testLoadMultipleIds(): void {
     $entity = $this->getMockEntity(EntityBaseTest::class, [['id' => 'foo']]);
     $this->entityType->expects($this->once())
       ->method('getClass')
@@ -556,7 +556,7 @@ public function testLoadMultipleIds() {
    * @covers ::delete
    * @covers ::doDelete
    */
-  public function testDelete() {
+  public function testDelete(): void {
     $entities['foo'] = $this->getMockEntity(EntityBaseTest::class, [['id' => 'foo']]);
     $entities['bar'] = $this->getMockEntity(EntityBaseTest::class, [['id' => 'bar']]);
     $this->setUpKeyValueEntityStorage();
@@ -587,7 +587,7 @@ public function testDelete() {
    * @covers ::delete
    * @covers ::doDelete
    */
-  public function testDeleteNothing() {
+  public function testDeleteNothing(): void {
     $this->setUpKeyValueEntityStorage();
 
     $this->moduleHandler->expects($this->never())
diff --git a/core/tests/Drupal/Tests/Core/Entity/Query/Sql/QueryTest.php b/core/tests/Drupal/Tests/Core/Entity/Query/Sql/QueryTest.php
index fcaa9b6a0a7a..0c721ac908d3 100644
--- a/core/tests/Drupal/Tests/Core/Entity/Query/Sql/QueryTest.php
+++ b/core/tests/Drupal/Tests/Core/Entity/Query/Sql/QueryTest.php
@@ -49,7 +49,7 @@ protected function setUp(): void {
    *
    * @covers ::prepare
    */
-  public function testNoBaseTable() {
+  public function testNoBaseTable(): void {
     $this->expectException(QueryException::class);
     $this->expectExceptionMessage('No base table for example_entity_query, invalid query.');
     $this->query->execute();
@@ -60,7 +60,7 @@ public function testNoBaseTable() {
    *
    * @covers ::prepare
    */
-  public function testNoRevisionTable() {
+  public function testNoRevisionTable(): void {
     $this->expectException(QueryException::class);
     $this->expectExceptionMessage('No revision table for example_entity_query, invalid query.');
     $this->query->allRevisions()->execute();
diff --git a/core/tests/Drupal/Tests/Core/Entity/Routing/DefaultHtmlRouteProviderTest.php b/core/tests/Drupal/Tests/Core/Entity/Routing/DefaultHtmlRouteProviderTest.php
index db044f7e35d3..c66e726693df 100644
--- a/core/tests/Drupal/Tests/Core/Entity/Routing/DefaultHtmlRouteProviderTest.php
+++ b/core/tests/Drupal/Tests/Core/Entity/Routing/DefaultHtmlRouteProviderTest.php
@@ -61,7 +61,7 @@ protected function setUp(): void {
    * @covers ::getAddPageRoute
    * @dataProvider providerTestGetAddPageRoute
    */
-  public function testGetAddPageRoute(?Route $expected, EntityTypeInterface $entity_type) {
+  public function testGetAddPageRoute(?Route $expected, EntityTypeInterface $entity_type): void {
     $route = $this->routeProvider->getAddPageRoute($entity_type);
     $this->assertEquals($expected, $route);
   }
@@ -99,7 +99,7 @@ public static function providerTestGetAddPageRoute() {
    * @covers ::getAddFormRoute
    * @dataProvider providerTestGetAddFormRoute
    */
-  public function testGetAddFormRoute(?Route $expected, EntityTypeInterface $entity_type, ?EntityTypeInterface $bundle_entity_type = NULL, ?FieldStorageDefinitionInterface $field_storage_definition = NULL) {
+  public function testGetAddFormRoute(?Route $expected, EntityTypeInterface $entity_type, ?EntityTypeInterface $bundle_entity_type = NULL, ?FieldStorageDefinitionInterface $field_storage_definition = NULL): void {
     if ($bundle_entity_type) {
       $this->entityTypeManager->getDefinition('the_bundle_entity_type_id')->willReturn($bundle_entity_type);
 
@@ -200,7 +200,7 @@ public static function providerTestGetAddFormRoute() {
    * @covers ::getCanonicalRoute
    * @dataProvider providerTestGetCanonicalRoute
    */
-  public function testGetCanonicalRoute(?Route $expected, EntityTypeInterface $entity_type, ?FieldStorageDefinitionInterface $field_storage_definition = NULL) {
+  public function testGetCanonicalRoute(?Route $expected, EntityTypeInterface $entity_type, ?FieldStorageDefinitionInterface $field_storage_definition = NULL): void {
     if ($field_storage_definition) {
       $this->entityFieldManager->getFieldStorageDefinitions($entity_type->id())
         ->willReturn([$entity_type->getKey('id') => $field_storage_definition]);
@@ -260,7 +260,7 @@ public static function providerTestGetCanonicalRoute() {
    * @covers ::getCollectionRoute
    * @dataProvider providerTestGetCollectionRoute
    */
-  public function testGetCollectionRoute(?Route $expected, EntityTypeInterface $entity_type) {
+  public function testGetCollectionRoute(?Route $expected, EntityTypeInterface $entity_type): void {
     $route = $this->routeProvider->getCollectionRoute($entity_type);
     $this->assertEquals($expected, $route);
   }
@@ -352,7 +352,7 @@ public static function providerTestGetCollectionRoute() {
   /**
    * @covers ::getEntityTypeIdKeyType
    */
-  public function testGetEntityTypeIdKeyType() {
+  public function testGetEntityTypeIdKeyType(): void {
     $entity_type = $this->prophesize(EntityTypeInterface::class);
     $entity_type->entityClassImplements(FieldableEntityInterface::class)->willReturn(TRUE);
     $entity_type->id()->willReturn('the_entity_type_id');
@@ -369,7 +369,7 @@ public function testGetEntityTypeIdKeyType() {
   /**
    * @covers ::getEntityTypeIdKeyType
    */
-  public function testGetEntityTypeIdKeyTypeNotFieldable() {
+  public function testGetEntityTypeIdKeyTypeNotFieldable(): void {
     $entity_type = $this->prophesize(EntityTypeInterface::class);
     $entity_type->entityClassImplements(FieldableEntityInterface::class)->willReturn(FALSE);
     $this->entityFieldManager->getFieldStorageDefinitions(Argument::any())->shouldNotBeCalled();
diff --git a/core/tests/Drupal/Tests/Core/Entity/Sql/DefaultTableMappingTest.php b/core/tests/Drupal/Tests/Core/Entity/Sql/DefaultTableMappingTest.php
index 7351ae894391..4d468847ac8e 100644
--- a/core/tests/Drupal/Tests/Core/Entity/Sql/DefaultTableMappingTest.php
+++ b/core/tests/Drupal/Tests/Core/Entity/Sql/DefaultTableMappingTest.php
@@ -39,7 +39,7 @@ protected function setUp(): void {
    *
    * @covers ::getTableNames
    */
-  public function testGetTableNames() {
+  public function testGetTableNames(): void {
     // The storage definitions are only used in getColumnNames() so we do not
     // need to provide any here.
     $table_mapping = new TestDefaultTableMapping($this->entityType, []);
@@ -70,7 +70,7 @@ public function testGetTableNames() {
    * @covers ::getExtraColumns
    * @covers ::setExtraColumns
    */
-  public function testGetAllColumns() {
+  public function testGetAllColumns(): void {
     // Set up single-column and multi-column definitions.
     $definitions['id'] = $this->setUpDefinition('id', ['value']);
     $definitions['name'] = $this->setUpDefinition('name', ['value']);
@@ -176,7 +176,7 @@ public function testGetAllColumns() {
    * @covers ::getFieldNames
    * @covers ::setFieldNames
    */
-  public function testGetFieldNames() {
+  public function testGetFieldNames(): void {
     // The storage definitions are only used in getColumnNames() so we do not
     // need to provide any here.
     $table_mapping = new TestDefaultTableMapping($this->entityType, []);
@@ -206,7 +206,7 @@ public function testGetFieldNames() {
    * @covers ::__construct
    * @covers ::getColumnNames
    */
-  public function testGetColumnNames() {
+  public function testGetColumnNames(): void {
     $definitions['test'] = $this->setUpDefinition('test', []);
     $table_mapping = new TestDefaultTableMapping($this->entityType, $definitions);
     $expected = [];
@@ -238,7 +238,7 @@ public function testGetColumnNames() {
    * @covers ::getExtraColumns
    * @covers ::setExtraColumns
    */
-  public function testGetExtraColumns() {
+  public function testGetExtraColumns(): void {
     // The storage definitions are only used in getColumnNames() so we do not
     // need to provide any here.
     $table_mapping = new TestDefaultTableMapping($this->entityType, []);
@@ -279,7 +279,7 @@ public function testGetExtraColumns() {
    *
    * @dataProvider providerTestGetFieldColumnName
    */
-  public function testGetFieldColumnName($base_field, $columns, $column, $expected) {
+  public function testGetFieldColumnName($base_field, $columns, $column, $expected): void {
     $definitions['test'] = $this->setUpDefinition('test', $columns, $base_field);
     $table_mapping = new TestDefaultTableMapping($this->entityType, $definitions);
     $result = $table_mapping->getFieldColumnName($definitions['test'], $column);
@@ -301,7 +301,7 @@ public function testGetFieldColumnName($base_field, $columns, $column, $expected
    *
    * @dataProvider providerTestGetFieldColumnName
    */
-  public function testGetFieldColumnNameInvalid($base_field, $columns, $column) {
+  public function testGetFieldColumnNameInvalid($base_field, $columns, $column): void {
     $definitions['test'] = $this->setUpDefinition('test', $columns, $base_field);
 
     // Mark field storage definition as custom storage.
@@ -355,7 +355,7 @@ public static function providerTestGetFieldColumnName() {
    *
    * @dataProvider providerTestGetFieldTableName
    */
-  public function testGetFieldTableName($table_names, $expected) {
+  public function testGetFieldTableName($table_names, $expected): void {
     $field_name = 'test';
     $columns = ['test'];
 
@@ -444,7 +444,7 @@ public static function providerTestGetFieldTableName() {
    *
    * @covers ::getFieldTableName
    */
-  public function testGetFieldTableNameInvalid() {
+  public function testGetFieldTableNameInvalid(): void {
     $table_mapping = new TestDefaultTableMapping($this->entityType, []);
     $this->expectException(SqlContentEntityStorageException::class);
     $this->expectExceptionMessage("Table information not available for the 'invalid_field_name' field.");
@@ -457,7 +457,7 @@ public function testGetFieldTableNameInvalid() {
    *
    * @dataProvider providerTestGetDedicatedTableName
    */
-  public function testGetDedicatedTableName($info, $expected_data_table, $expected_revision_table) {
+  public function testGetDedicatedTableName($info, $expected_data_table, $expected_revision_table): void {
     $entity_type_id = $info['entity_type_id'];
     $field_name = $info['field_name'];
 
diff --git a/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageSchemaTest.php b/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageSchemaTest.php
index 5a20b34b6c45..e37afd82ab23 100644
--- a/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageSchemaTest.php
+++ b/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageSchemaTest.php
@@ -117,7 +117,7 @@ protected function setUp(): void {
    * @covers ::getFieldSchemaData
    * @covers ::processIdentifierSchema
    */
-  public function testGetSchemaBase() {
+  public function testGetSchemaBase(): void {
     $this->entityType = new ContentEntityType([
       'id' => 'entity_test',
       'entity_keys' => ['id' => 'id'],
@@ -410,7 +410,7 @@ public function testGetSchemaBase() {
    * @covers ::getEntityIndexName
    * @covers ::processIdentifierSchema
    */
-  public function testGetSchemaRevisionable() {
+  public function testGetSchemaRevisionable(): void {
     $this->entityType = $this->getMockBuilder('Drupal\Core\Entity\ContentEntityType')
       ->setConstructorArgs([
         [
@@ -514,7 +514,7 @@ public function testGetSchemaRevisionable() {
    * @covers ::getEntityIndexName
    * @covers ::processDataTable
    */
-  public function testGetSchemaTranslatable() {
+  public function testGetSchemaTranslatable(): void {
     $this->entityType = new ContentEntityType([
       'id' => 'entity_test',
       'entity_keys' => [
@@ -626,7 +626,7 @@ public function testGetSchemaTranslatable() {
    * @covers ::initializeRevisionDataTable
    * @covers ::processRevisionDataTable
    */
-  public function testGetSchemaRevisionableTranslatable() {
+  public function testGetSchemaRevisionableTranslatable(): void {
     $this->entityType = $this->getMockBuilder('Drupal\Core\Entity\ContentEntityType')
       ->setConstructorArgs([
         [
@@ -838,7 +838,7 @@ public function testGetSchemaRevisionableTranslatable() {
    * @covers ::getDedicatedTableSchema
    * @covers ::createDedicatedTableSchema
    */
-  public function testDedicatedTableSchema() {
+  public function testDedicatedTableSchema(): void {
     $entity_type_id = 'entity_test';
     $this->entityType = new ContentEntityType([
       'id' => 'entity_test',
@@ -1015,7 +1015,7 @@ public function testDedicatedTableSchema() {
    * @covers ::getDedicatedTableSchema
    * @covers ::createDedicatedTableSchema
    */
-  public function testDedicatedTableSchemaForEntityWithStringIdentifier() {
+  public function testDedicatedTableSchemaForEntityWithStringIdentifier(): void {
     $entity_type_id = 'entity_test';
     $this->entityType = new ContentEntityType([
       'id' => 'entity_test',
@@ -1453,7 +1453,7 @@ public function setUpStorageDefinition($field_name, array $schema) {
   /**
    * ::onEntityTypeUpdate.
    */
-  public function testonEntityTypeUpdateWithNewIndex() {
+  public function testonEntityTypeUpdateWithNewIndex(): void {
     $this->entityType = $original_entity_type = new ContentEntityType([
       'id' => 'entity_test',
       'entity_keys' => ['id' => 'id'],
@@ -1554,7 +1554,7 @@ public function testonEntityTypeUpdateWithNewIndex() {
    * @dataProvider providerSchemaCastValue
    * @covers ::castValue
    */
-  public function testCastValue($expected, $value, array $schema) {
+  public function testCastValue($expected, $value, array $schema): void {
     $this->assertSame($expected, SqlContentEntityStorageSchema::castValue($schema, $value));
   }
 
diff --git a/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php b/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php
index 998795a95005..e27a27dbed72 100644
--- a/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php
+++ b/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php
@@ -155,7 +155,7 @@ protected function setUp(): void {
    *
    * @dataProvider providerTestGetBaseTable
    */
-  public function testGetBaseTable($base_table, $expected) {
+  public function testGetBaseTable($base_table, $expected): void {
     $this->entityType->expects($this->once())
       ->method('getBaseTable')
       ->willReturn($base_table);
@@ -197,7 +197,7 @@ public static function providerTestGetBaseTable() {
    *
    * @dataProvider providerTestGetRevisionTable
    */
-  public function testGetRevisionTable($revision_table, $expected) {
+  public function testGetRevisionTable($revision_table, $expected): void {
     $this->entityType->expects($this->any())
       ->method('isRevisionable')
       ->willReturn(TRUE);
@@ -238,7 +238,7 @@ public static function providerTestGetRevisionTable() {
    * @covers ::__construct
    * @covers ::getDataTable
    */
-  public function testGetDataTable() {
+  public function testGetDataTable(): void {
     $this->entityType->expects($this->any())
       ->method('isTranslatable')
       ->willReturn(TRUE);
@@ -268,7 +268,7 @@ public function testGetDataTable() {
    *
    * @dataProvider providerTestGetRevisionDataTable
    */
-  public function testGetRevisionDataTable($revision_data_table, $expected) {
+  public function testGetRevisionDataTable($revision_data_table, $expected): void {
     $this->entityType->expects($this->any())
       ->method('isRevisionable')
       ->willReturn(TRUE);
@@ -315,7 +315,7 @@ public static function providerTestGetRevisionDataTable() {
    *
    * @covers ::setTableMapping
    */
-  public function testSetTableMapping() {
+  public function testSetTableMapping(): void {
     $this->entityType->expects($this->any())
       ->method('isRevisionable')
       ->willReturn(FALSE);
@@ -362,7 +362,7 @@ public function testSetTableMapping() {
    * @covers ::onEntityTypeCreate
    * @covers ::getTableMapping
    */
-  public function testOnEntityTypeCreate() {
+  public function testOnEntityTypeCreate(): void {
     $columns = [
       'value' => [
         'type' => 'int',
@@ -456,7 +456,7 @@ public function testOnEntityTypeCreate() {
    * @covers ::__construct
    * @covers ::getTableMapping
    */
-  public function testGetTableMappingEmpty() {
+  public function testGetTableMappingEmpty(): void {
     $this->setUpEntityStorage();
 
     $mapping = $this->entityStorage->getTableMapping();
@@ -476,7 +476,7 @@ public function testGetTableMappingEmpty() {
    *
    * @dataProvider providerTestGetTableMappingSimple
    */
-  public function testGetTableMappingSimple(array $entity_keys) {
+  public function testGetTableMappingSimple(array $entity_keys): void {
     $this->entityType->expects($this->any())
       ->method('getKey')
       ->willReturnMap([
@@ -508,7 +508,7 @@ public function testGetTableMappingSimple(array $entity_keys) {
    *
    * @dataProvider providerTestGetTableMappingSimple
    */
-  public function testGetTableMappingSimpleWithFields(array $entity_keys) {
+  public function testGetTableMappingSimpleWithFields(array $entity_keys): void {
     $base_field_names = ['title', 'description', 'owner'];
     $field_names = array_merge(array_values(array_filter($entity_keys)), $base_field_names);
     $this->fieldDefinitions = $this->mockFieldDefinitions($field_names);
@@ -542,7 +542,7 @@ public static function providerTestGetTableMappingSimple() {
    * @covers ::__construct
    * @covers ::getTableMapping
    */
-  public function testGetTableMappingSimpleWithDedicatedStorageFields() {
+  public function testGetTableMappingSimpleWithDedicatedStorageFields(): void {
     $base_field_names = ['multi_valued_base_field'];
 
     // Set up one entity key in order to have a base table.
@@ -583,7 +583,7 @@ public function testGetTableMappingSimpleWithDedicatedStorageFields() {
    *
    * @dataProvider providerTestGetTableMappingSimple
    */
-  public function testGetTableMappingRevisionable(array $entity_keys) {
+  public function testGetTableMappingRevisionable(array $entity_keys): void {
     // This allows to re-use the data provider.
     $entity_keys = [
       'id' => $entity_keys['id'],
@@ -634,7 +634,7 @@ public function testGetTableMappingRevisionable(array $entity_keys) {
    *
    * @dataProvider providerTestGetTableMappingSimple
    */
-  public function testGetTableMappingRevisionableWithFields(array $entity_keys) {
+  public function testGetTableMappingRevisionableWithFields(array $entity_keys): void {
     // This allows to re-use the data provider.
     $entity_keys = [
       'id' => $entity_keys['id'],
@@ -712,7 +712,7 @@ public function testGetTableMappingRevisionableWithFields(array $entity_keys) {
    *
    * @dataProvider providerTestGetTableMappingSimple
    */
-  public function testGetTableMappingTranslatable(array $entity_keys) {
+  public function testGetTableMappingTranslatable(array $entity_keys): void {
     // This allows to re-use the data provider.
     $entity_keys['langcode'] = 'langcode';
 
@@ -768,7 +768,7 @@ public function testGetTableMappingTranslatable(array $entity_keys) {
    *
    * @dataProvider providerTestGetTableMappingSimple
    */
-  public function testGetTableMappingTranslatableWithFields(array $entity_keys) {
+  public function testGetTableMappingTranslatableWithFields(array $entity_keys): void {
     // This allows to re-use the data provider.
     $entity_keys['langcode'] = 'langcode';
 
@@ -828,7 +828,7 @@ public function testGetTableMappingTranslatableWithFields(array $entity_keys) {
    *
    * @dataProvider providerTestGetTableMappingSimple
    */
-  public function testGetTableMappingRevisionableTranslatable(array $entity_keys) {
+  public function testGetTableMappingRevisionableTranslatable(array $entity_keys): void {
     // This allows to re-use the data provider.
     $entity_keys = [
       'id' => $entity_keys['id'],
@@ -939,7 +939,7 @@ public function testGetTableMappingRevisionableTranslatable(array $entity_keys)
    *
    * @dataProvider providerTestGetTableMappingSimple
    */
-  public function testGetTableMappingRevisionableTranslatableWithFields(array $entity_keys) {
+  public function testGetTableMappingRevisionableTranslatableWithFields(array $entity_keys): void {
     // This allows to re-use the data provider.
     $entity_keys = [
       'id' => $entity_keys['id'],
@@ -1064,7 +1064,7 @@ public function testGetTableMappingRevisionableTranslatableWithFields(array $ent
   /**
    * @covers ::create
    */
-  public function testCreate() {
+  public function testCreate(): void {
     $language_manager = $this->createMock('Drupal\Core\Language\LanguageManagerInterface');
 
     $language = new Language(['id' => 'en']);
@@ -1186,7 +1186,7 @@ protected function setUpEntityStorage() {
    * @covers ::buildCacheId
    * @covers ::getFromPersistentCache
    */
-  public function testLoadMultiplePersistentCached() {
+  public function testLoadMultiplePersistentCached(): void {
     $this->setUpModuleHandlerNoImplementations();
 
     $key = 'values:' . $this->entityTypeId . ':1';
@@ -1222,7 +1222,7 @@ public function testLoadMultiplePersistentCached() {
    * @covers ::getFromPersistentCache
    * @covers ::setPersistentCache
    */
-  public function testLoadMultipleNoPersistentCache() {
+  public function testLoadMultipleNoPersistentCache(): void {
     $this->setUpModuleHandlerNoImplementations();
 
     $id = 1;
@@ -1273,7 +1273,7 @@ public function testLoadMultipleNoPersistentCache() {
    * @covers ::getFromPersistentCache
    * @covers ::setPersistentCache
    */
-  public function testLoadMultiplePersistentCacheMiss() {
+  public function testLoadMultiplePersistentCacheMiss(): void {
     $this->setUpModuleHandlerNoImplementations();
 
     $id = 1;
@@ -1330,7 +1330,7 @@ public function testLoadMultiplePersistentCacheMiss() {
   /**
    * @covers ::hasData
    */
-  public function testHasData() {
+  public function testHasData(): void {
     $query = $this->createMock('Drupal\Core\Entity\Query\QueryInterface');
     $query->expects(($this->once()))
       ->method('accessCheck')
@@ -1382,7 +1382,7 @@ public function testHasData() {
   /**
    * Tests entity ID sanitization.
    */
-  public function testCleanIds() {
+  public function testCleanIds(): void {
     $valid_ids = [
       -1,
       0,
diff --git a/core/tests/Drupal/Tests/Core/Entity/TypedData/EntityAdapterUnitTest.php b/core/tests/Drupal/Tests/Core/Entity/TypedData/EntityAdapterUnitTest.php
index c3ec63df95ec..e921327e0bef 100644
--- a/core/tests/Drupal/Tests/Core/Entity/TypedData/EntityAdapterUnitTest.php
+++ b/core/tests/Drupal/Tests/Core/Entity/TypedData/EntityAdapterUnitTest.php
@@ -226,42 +226,42 @@ protected function setUp(): void {
   /**
    * @covers ::getConstraints
    */
-  public function testGetConstraints() {
+  public function testGetConstraints(): void {
     $this->assertIsArray($this->entityAdapter->getConstraints());
   }
 
   /**
    * @covers ::getName
    */
-  public function testGetName() {
+  public function testGetName(): void {
     $this->assertNull($this->entityAdapter->getName());
   }
 
   /**
    * @covers ::getRoot
    */
-  public function testGetRoot() {
+  public function testGetRoot(): void {
     $this->assertSame(spl_object_hash($this->entityAdapter), spl_object_hash($this->entityAdapter->getRoot()));
   }
 
   /**
    * @covers ::getPropertyPath
    */
-  public function testGetPropertyPath() {
+  public function testGetPropertyPath(): void {
     $this->assertSame('', $this->entityAdapter->getPropertyPath());
   }
 
   /**
    * @covers ::getParent
    */
-  public function testGetParent() {
+  public function testGetParent(): void {
     $this->assertNull($this->entityAdapter->getParent());
   }
 
   /**
    * @covers ::setContext
    */
-  public function testSetContext() {
+  public function testSetContext(): void {
     $name = $this->randomMachineName();
     $parent = $this->createMock('\Drupal\Core\TypedData\TraversableTypedDataInterface');
     // Our mocked entity->setContext() returns NULL, so assert that.
@@ -273,21 +273,21 @@ public function testSetContext() {
   /**
    * @covers ::getValue
    */
-  public function testGetValue() {
+  public function testGetValue(): void {
     $this->assertEquals($this->entity, $this->entityAdapter->getValue());
   }
 
   /**
    * @covers ::getEntity
    */
-  public function testGetEntity() {
+  public function testGetEntity(): void {
     $this->assertSame($this->entity, $this->entityAdapter->getEntity());
   }
 
   /**
    * @covers ::setValue
    */
-  public function testSetValue() {
+  public function testSetValue(): void {
     $this->entityAdapter->setValue(NULL);
     $this->assertNull($this->entityAdapter->getValue());
   }
@@ -295,14 +295,14 @@ public function testSetValue() {
   /**
    * @covers ::get
    */
-  public function testGet() {
+  public function testGet(): void {
     $this->assertInstanceOf('\Drupal\Core\Field\FieldItemListInterface', $this->entityAdapter->get('id'));
   }
 
   /**
    * @covers ::get
    */
-  public function testGetInvalidField() {
+  public function testGetInvalidField(): void {
     $this->expectException(\InvalidArgumentException::class);
     $this->entityAdapter->get('invalid');
   }
@@ -310,7 +310,7 @@ public function testGetInvalidField() {
   /**
    * @covers ::get
    */
-  public function testGetWithoutData() {
+  public function testGetWithoutData(): void {
     $this->entityAdapter->setValue(NULL);
     $this->expectException(MissingDataException::class);
     $this->entityAdapter->get('id');
@@ -319,7 +319,7 @@ public function testGetWithoutData() {
   /**
    * @covers ::set
    */
-  public function testSet() {
+  public function testSet(): void {
     $id_items = [['value' => $this->id + 1]];
 
     $this->fieldItemList->expects($this->once())
@@ -332,7 +332,7 @@ public function testSet() {
   /**
    * @covers ::set
    */
-  public function testSetWithoutData() {
+  public function testSetWithoutData(): void {
     $this->entityAdapter->setValue(NULL);
     $id_items = [['value' => $this->id + 1]];
     $this->expectException(MissingDataException::class);
@@ -342,7 +342,7 @@ public function testSetWithoutData() {
   /**
    * @covers ::getProperties
    */
-  public function testGetProperties() {
+  public function testGetProperties(): void {
     $fields = $this->entityAdapter->getProperties();
     $this->assertInstanceOf('Drupal\Core\Field\FieldItemListInterface', $fields['id']);
     $this->assertInstanceOf('Drupal\Core\Field\FieldItemListInterface', $fields['revision_id']);
@@ -351,7 +351,7 @@ public function testGetProperties() {
   /**
    * @covers ::toArray
    */
-  public function testToArray() {
+  public function testToArray(): void {
     $array = $this->entityAdapter->toArray();
     // Mock field objects return NULL values, so test keys only.
     $this->assertArrayHasKey('id', $array);
@@ -362,7 +362,7 @@ public function testToArray() {
   /**
    * @covers ::toArray
    */
-  public function testToArrayWithoutData() {
+  public function testToArrayWithoutData(): void {
     $this->entityAdapter->setValue(NULL);
     $this->expectException(MissingDataException::class);
     $this->entityAdapter->toArray();
@@ -371,7 +371,7 @@ public function testToArrayWithoutData() {
   /**
    * @covers ::isEmpty
    */
-  public function testIsEmpty() {
+  public function testIsEmpty(): void {
     $this->assertFalse($this->entityAdapter->isEmpty());
     $this->entityAdapter->setValue(NULL);
     $this->assertTrue($this->entityAdapter->isEmpty());
@@ -380,7 +380,7 @@ public function testIsEmpty() {
   /**
    * @covers ::onChange
    */
-  public function testOnChange() {
+  public function testOnChange(): void {
     $entity = $this->createMock('\Drupal\Core\Entity\ContentEntityInterface');
     $entity->expects($this->once())
       ->method('onChange')
@@ -393,7 +393,7 @@ public function testOnChange() {
   /**
    * @covers ::getDataDefinition
    */
-  public function testGetDataDefinition() {
+  public function testGetDataDefinition(): void {
     $definition = $this->entityAdapter->getDataDefinition();
     $this->assertInstanceOf('\Drupal\Core\Entity\TypedData\EntityDataDefinitionInterface', $definition);
     $this->assertEquals($definition->getEntityTypeId(), $this->entityTypeId);
@@ -403,7 +403,7 @@ public function testGetDataDefinition() {
   /**
    * @covers ::getString
    */
-  public function testGetString() {
+  public function testGetString(): void {
     $entity = $this->createMock('\Drupal\Core\Entity\ContentEntityInterface');
     $entity->expects($this->once())
       ->method('label')
@@ -417,7 +417,7 @@ public function testGetString() {
   /**
    * @covers ::applyDefaultValue
    */
-  public function testApplyDefaultValue() {
+  public function testApplyDefaultValue(): void {
     // For each field on the entity the mock method has to be invoked once.
     $this->fieldItemList->expects($this->exactly(2))
       ->method('applyDefaultValue');
@@ -427,7 +427,7 @@ public function testApplyDefaultValue() {
   /**
    * @covers ::getIterator
    */
-  public function testGetIterator() {
+  public function testGetIterator(): void {
     // Content entity test.
     $iterator = $this->entityAdapter->getIterator();
     $fields = iterator_to_array($iterator);
diff --git a/core/tests/Drupal/Tests/Core/EventSubscriber/ActiveLinkResponseFilterTest.php b/core/tests/Drupal/Tests/Core/EventSubscriber/ActiveLinkResponseFilterTest.php
index e25dd83077c9..cdd08cfbf431 100644
--- a/core/tests/Drupal/Tests/Core/EventSubscriber/ActiveLinkResponseFilterTest.php
+++ b/core/tests/Drupal/Tests/Core/EventSubscriber/ActiveLinkResponseFilterTest.php
@@ -401,7 +401,7 @@ public static function providerTestSetLinkActiveClass() {
    * @dataProvider providerTestSetLinkActiveClass
    * @covers ::setLinkActiveClass
    */
-  public function testSetLinkActiveClass($html_markup, $current_path, $is_front, $url_language, array $query, $expected_html_markup) {
+  public function testSetLinkActiveClass($html_markup, $current_path, $is_front, $url_language, array $query, $expected_html_markup): void {
     $this->assertSame($expected_html_markup, ActiveLinkResponseFilter::setLinkActiveClass($html_markup, $current_path, $is_front, $url_language, $query));
   }
 
@@ -410,7 +410,7 @@ public function testSetLinkActiveClass($html_markup, $current_path, $is_front, $
    *
    * @covers ::onResponse
    */
-  public function testOnlyHtml() {
+  public function testOnlyHtml(): void {
     $session = new AnonymousUserSession();
     $language_manager = new LanguageManager(new LanguageDefault([]));
     $request_stack = new RequestStack();
@@ -449,7 +449,7 @@ public function testOnlyHtml() {
    *
    * @covers ::onResponse
    */
-  public function testSkipCertainResponseTypes() {
+  public function testSkipCertainResponseTypes(): void {
     $session = new AnonymousUserSession();
     $language_manager = new LanguageManager(new LanguageDefault([]));
     $request_stack = new RequestStack();
diff --git a/core/tests/Drupal/Tests/Core/EventSubscriber/CustomPageExceptionHtmlSubscriberTest.php b/core/tests/Drupal/Tests/Core/EventSubscriber/CustomPageExceptionHtmlSubscriberTest.php
index 50cbfb2e147f..1560d4671411 100644
--- a/core/tests/Drupal/Tests/Core/EventSubscriber/CustomPageExceptionHtmlSubscriberTest.php
+++ b/core/tests/Drupal/Tests/Core/EventSubscriber/CustomPageExceptionHtmlSubscriberTest.php
@@ -130,7 +130,7 @@ protected function tearDown(): void {
   /**
    * Tests onHandleException with a POST request.
    */
-  public function testHandleWithPostRequest() {
+  public function testHandleWithPostRequest(): void {
     $request = Request::create('/test', 'POST', ['name' => 'druplicon', 'pass' => '12345']);
 
     $request_context = new RequestContext();
@@ -156,7 +156,7 @@ public function testHandleWithPostRequest() {
   /**
    * Tests onHandleException with a GET request.
    */
-  public function testHandleWithGetRequest() {
+  public function testHandleWithGetRequest(): void {
     $request = Request::create('/test', 'GET', ['name' => 'druplicon', 'pass' => '12345']);
     $request->attributes->set(AccessAwareRouterInterface::ACCESS_RESULT, AccessResult::forbidden()->addCacheTags(['druplicon']));
 
diff --git a/core/tests/Drupal/Tests/Core/EventSubscriber/ExceptionJsonSubscriberTest.php b/core/tests/Drupal/Tests/Core/EventSubscriber/ExceptionJsonSubscriberTest.php
index db86952b9508..12a1e02d97d1 100644
--- a/core/tests/Drupal/Tests/Core/EventSubscriber/ExceptionJsonSubscriberTest.php
+++ b/core/tests/Drupal/Tests/Core/EventSubscriber/ExceptionJsonSubscriberTest.php
@@ -26,7 +26,7 @@ class ExceptionJsonSubscriberTest extends UnitTestCase {
    * @covers ::on4xx
    * @dataProvider providerTestOn4xx
    */
-  public function testOn4xx(HttpExceptionInterface $exception, $expected_response_class) {
+  public function testOn4xx(HttpExceptionInterface $exception, $expected_response_class): void {
     $kernel = $this->prophesize(HttpKernelInterface::class);
     $request = Request::create('/test');
     $event = new ExceptionEvent($kernel->reveal(), $request, HttpKernelInterface::MAIN_REQUEST, $exception);
diff --git a/core/tests/Drupal/Tests/Core/EventSubscriber/FinalExceptionSubscriberTest.php b/core/tests/Drupal/Tests/Core/EventSubscriber/FinalExceptionSubscriberTest.php
index 5ed6330240d0..b871ebedeac8 100644
--- a/core/tests/Drupal/Tests/Core/EventSubscriber/FinalExceptionSubscriberTest.php
+++ b/core/tests/Drupal/Tests/Core/EventSubscriber/FinalExceptionSubscriberTest.php
@@ -21,7 +21,7 @@ class FinalExceptionSubscriberTest extends UnitTestCase {
   /**
    * @covers ::onException
    */
-  public function testOnExceptionWithUnknownFormat() {
+  public function testOnExceptionWithUnknownFormat(): void {
     $config_factory = $this->getConfigFactoryStub();
 
     $kernel = $this->prophesize(HttpKernelInterface::class);
diff --git a/core/tests/Drupal/Tests/Core/EventSubscriber/FinishResponseSubscriberTest.php b/core/tests/Drupal/Tests/Core/EventSubscriber/FinishResponseSubscriberTest.php
index bcab1e7c65e9..9c927c4da3d1 100644
--- a/core/tests/Drupal/Tests/Core/EventSubscriber/FinishResponseSubscriberTest.php
+++ b/core/tests/Drupal/Tests/Core/EventSubscriber/FinishResponseSubscriberTest.php
@@ -82,7 +82,7 @@ protected function setUp(): void {
    *
    * @covers ::onRespond
    */
-  public function testDefaultHeaders() {
+  public function testDefaultHeaders(): void {
     $finishSubscriber = new FinishResponseSubscriber(
       $this->languageManager,
       $this->getConfigFactoryStub(),
@@ -113,7 +113,7 @@ public function testDefaultHeaders() {
    *
    * @covers ::onRespond
    */
-  public function testExistingHeaders() {
+  public function testExistingHeaders(): void {
     $finishSubscriber = new FinishResponseSubscriber(
       $this->languageManager,
       $this->getConfigFactoryStub(),
diff --git a/core/tests/Drupal/Tests/Core/EventSubscriber/ModuleRouteSubscriberTest.php b/core/tests/Drupal/Tests/Core/EventSubscriber/ModuleRouteSubscriberTest.php
index 6b9b68be9b78..008a1b2008e1 100644
--- a/core/tests/Drupal/Tests/Core/EventSubscriber/ModuleRouteSubscriberTest.php
+++ b/core/tests/Drupal/Tests/Core/EventSubscriber/ModuleRouteSubscriberTest.php
@@ -54,7 +54,7 @@ protected function setUp(): void {
    * @param bool $removed
    *   Whether or not the route is expected to be removed from the collection.
    */
-  public function testRemoveRoute($route_name, array $requirements, $removed) {
+  public function testRemoveRoute($route_name, array $requirements, $removed): void {
     $collection = new RouteCollection();
     $route = new Route('', [], $requirements);
     $collection->add($route_name, $route);
diff --git a/core/tests/Drupal/Tests/Core/EventSubscriber/OptionsRequestSubscriberTest.php b/core/tests/Drupal/Tests/Core/EventSubscriber/OptionsRequestSubscriberTest.php
index 23d8fcd1878e..9aa556a63da0 100644
--- a/core/tests/Drupal/Tests/Core/EventSubscriber/OptionsRequestSubscriberTest.php
+++ b/core/tests/Drupal/Tests/Core/EventSubscriber/OptionsRequestSubscriberTest.php
@@ -22,7 +22,7 @@ class OptionsRequestSubscriberTest extends UnitTestCase {
   /**
    * @covers ::onRequest
    */
-  public function testWithNonOptionRequest() {
+  public function testWithNonOptionRequest(): void {
     $kernel = $this->prophesize(HttpKernelInterface::class);
     $request = Request::create('/example', 'GET');
 
@@ -39,7 +39,7 @@ public function testWithNonOptionRequest() {
   /**
    * @covers ::onRequest
    */
-  public function testWithoutMatchingRoutes() {
+  public function testWithoutMatchingRoutes(): void {
     $kernel = $this->prophesize(HttpKernelInterface::class);
     $request = Request::create('/example', 'OPTIONS');
 
@@ -57,7 +57,7 @@ public function testWithoutMatchingRoutes() {
    * @covers ::onRequest
    * @dataProvider providerTestOnRequestWithOptionsRequest
    */
-  public function testWithOptionsRequest(RouteCollection $collection, $expected_header) {
+  public function testWithOptionsRequest(RouteCollection $collection, $expected_header): void {
     $kernel = $this->prophesize(HttpKernelInterface::class);
     $request = Request::create('/example', 'OPTIONS');
 
diff --git a/core/tests/Drupal/Tests/Core/EventSubscriber/PathRootsSubscriberTest.php b/core/tests/Drupal/Tests/Core/EventSubscriber/PathRootsSubscriberTest.php
index 705de8068140..75c73a7ef148 100644
--- a/core/tests/Drupal/Tests/Core/EventSubscriber/PathRootsSubscriberTest.php
+++ b/core/tests/Drupal/Tests/Core/EventSubscriber/PathRootsSubscriberTest.php
@@ -46,7 +46,7 @@ protected function setUp(): void {
    * @covers ::onRouteAlter
    * @covers ::onRouteFinished
    */
-  public function testSubscribing() {
+  public function testSubscribing(): void {
 
     // Ensure that onRouteFinished can be called without throwing notices
     // when no path roots got set.
diff --git a/core/tests/Drupal/Tests/Core/EventSubscriber/PsrResponseSubscriberTest.php b/core/tests/Drupal/Tests/Core/EventSubscriber/PsrResponseSubscriberTest.php
index e8fbd62b3f80..de743a1bdc2b 100644
--- a/core/tests/Drupal/Tests/Core/EventSubscriber/PsrResponseSubscriberTest.php
+++ b/core/tests/Drupal/Tests/Core/EventSubscriber/PsrResponseSubscriberTest.php
@@ -55,7 +55,7 @@ protected function setUp(): void {
    *
    * @covers ::onKernelView
    */
-  public function testConvertsControllerResult() {
+  public function testConvertsControllerResult(): void {
     $event = $this->createEvent($this->createMock('Psr\Http\Message\ResponseInterface'));
     $this->psrResponseSubscriber->onKernelView($event);
     $this->assertInstanceOf(Response::class, $event->getResponse());
@@ -66,7 +66,7 @@ public function testConvertsControllerResult() {
    *
    * @covers ::onKernelView
    */
-  public function testDoesNotConvertControllerResult() {
+  public function testDoesNotConvertControllerResult(): void {
     $event = $this->createEvent([]);
     $this->psrResponseSubscriber->onKernelView($event);
     $this->assertNull($event->getResponse());
diff --git a/core/tests/Drupal/Tests/Core/EventSubscriber/RedirectResponseSubscriberTest.php b/core/tests/Drupal/Tests/Core/EventSubscriber/RedirectResponseSubscriberTest.php
index c567bc039800..92049c110983 100644
--- a/core/tests/Drupal/Tests/Core/EventSubscriber/RedirectResponseSubscriberTest.php
+++ b/core/tests/Drupal/Tests/Core/EventSubscriber/RedirectResponseSubscriberTest.php
@@ -86,7 +86,7 @@ protected function setUp(): void {
    * @covers ::checkRedirectUrl
    * @dataProvider providerTestDestinationRedirect
    */
-  public function testDestinationRedirect(Request $request, $expected) {
+  public function testDestinationRedirect(Request $request, $expected): void {
     $dispatcher = new EventDispatcher();
     $kernel = $this->createMock('Symfony\Component\HttpKernel\HttpKernelInterface');
     $response = new RedirectResponse('http://example.com/drupal');
@@ -127,7 +127,7 @@ public static function providerTestDestinationRedirect() {
   /**
    * @dataProvider providerTestDestinationRedirectToExternalUrl
    */
-  public function testDestinationRedirectToExternalUrl($request, $expected) {
+  public function testDestinationRedirectToExternalUrl($request, $expected): void {
     $dispatcher = new EventDispatcher();
     $kernel = $this->createMock('Symfony\Component\HttpKernel\HttpKernelInterface');
     $response = new RedirectResponse('http://other-example.com');
@@ -142,7 +142,7 @@ public function testDestinationRedirectToExternalUrl($request, $expected) {
   /**
    * @covers ::checkRedirectUrl
    */
-  public function testRedirectWithOptInExternalUrl() {
+  public function testRedirectWithOptInExternalUrl(): void {
     $dispatcher = new EventDispatcher();
     $kernel = $this->createMock('Symfony\Component\HttpKernel\HttpKernelInterface');
     $response = new TrustedRedirectResponse('http://external-url.com');
@@ -175,7 +175,7 @@ public static function providerTestDestinationRedirectToExternalUrl() {
   /**
    * @dataProvider providerTestDestinationRedirectWithInvalidUrl
    */
-  public function testDestinationRedirectWithInvalidUrl(Request $request) {
+  public function testDestinationRedirectWithInvalidUrl(Request $request): void {
     $dispatcher = new EventDispatcher();
     $kernel = $this->createMock('Symfony\Component\HttpKernel\HttpKernelInterface');
     $response = new RedirectResponse('http://example.com/drupal');
diff --git a/core/tests/Drupal/Tests/Core/EventSubscriber/RssResponseRelativeUrlFilterTest.php b/core/tests/Drupal/Tests/Core/EventSubscriber/RssResponseRelativeUrlFilterTest.php
index debe1fa9daf0..b4727398e9a4 100644
--- a/core/tests/Drupal/Tests/Core/EventSubscriber/RssResponseRelativeUrlFilterTest.php
+++ b/core/tests/Drupal/Tests/Core/EventSubscriber/RssResponseRelativeUrlFilterTest.php
@@ -114,7 +114,7 @@ public static function providerTestOnResponse() {
    * @param string $expected_content
    *   The expected content from the response.
    */
-  public function testOnResponse($content, $expected_content) {
+  public function testOnResponse($content, $expected_content): void {
     $event = new ResponseEvent(
       $this->prophesize(HttpKernelInterface::class)->reveal(),
       Request::create('/'),
diff --git a/core/tests/Drupal/Tests/Core/EventSubscriber/SpecialAttributesRouteSubscriberTest.php b/core/tests/Drupal/Tests/Core/EventSubscriber/SpecialAttributesRouteSubscriberTest.php
index 1317ad61af22..eda539762b2b 100644
--- a/core/tests/Drupal/Tests/Core/EventSubscriber/SpecialAttributesRouteSubscriberTest.php
+++ b/core/tests/Drupal/Tests/Core/EventSubscriber/SpecialAttributesRouteSubscriberTest.php
@@ -76,7 +76,7 @@ public static function providerTestOnRouteBuildingValidVariables() {
    *
    * @covers ::onAlterRoutes
    */
-  public function testOnRouteBuildingValidVariables(Route $route) {
+  public function testOnRouteBuildingValidVariables(Route $route): void {
     $route_collection = new RouteCollection();
     $route_collection->add('test', $route);
 
@@ -94,7 +94,7 @@ public function testOnRouteBuildingValidVariables(Route $route) {
    * @dataProvider providerTestOnRouteBuildingInvalidVariables
    * @covers ::onAlterRoutes
    */
-  public function testOnRouteBuildingInvalidVariables(Route $route) {
+  public function testOnRouteBuildingInvalidVariables(Route $route): void {
     $route_collection = new RouteCollection();
     $route_collection->add('test', $route);
 
diff --git a/core/tests/Drupal/Tests/Core/Extension/DefaultConfigTest.php b/core/tests/Drupal/Tests/Core/Extension/DefaultConfigTest.php
index 5818422fdcdd..e05fcf107011 100644
--- a/core/tests/Drupal/Tests/Core/Extension/DefaultConfigTest.php
+++ b/core/tests/Drupal/Tests/Core/Extension/DefaultConfigTest.php
@@ -24,7 +24,7 @@ class DefaultConfigTest extends UnitTestCase {
    * that were never installed. The default configuration of such extensions
    * would not exist. Installation hooks would never be executed.
    */
-  public function testConfigIsEmpty() {
+  public function testConfigIsEmpty(): void {
     $config = Yaml::parse(file_get_contents($this->root . '/core/config/install/core.extension.yml'));
     $expected = [
       'module' => [],
diff --git a/core/tests/Drupal/Tests/Core/Extension/DependencyTest.php b/core/tests/Drupal/Tests/Core/Extension/DependencyTest.php
index b3f81fd2977f..345a9ff7fc76 100644
--- a/core/tests/Drupal/Tests/Core/Extension/DependencyTest.php
+++ b/core/tests/Drupal/Tests/Core/Extension/DependencyTest.php
@@ -18,7 +18,7 @@ class DependencyTest extends UnitTestCase {
    * @covers ::createFromString
    * @dataProvider providerCreateFromString
    */
-  public function testCreateFromString($string, $expected_name, $expected_project, $expected_constraint) {
+  public function testCreateFromString($string, $expected_name, $expected_project, $expected_constraint): void {
     $dependency = Dependency::createFromString($string);
     $this->assertSame($expected_name, $dependency->getName());
     $this->assertSame($expected_project, $dependency->getProject());
@@ -40,7 +40,7 @@ public static function providerCreateFromString() {
   /**
    * @covers ::isCompatible
    */
-  public function testIsCompatible() {
+  public function testIsCompatible(): void {
     $dependency = new Dependency('paragraphs_demo', 'paragraphs', '>8.x-1.1');
     $this->assertFalse($dependency->isCompatible('1.1'));
     $this->assertTrue($dependency->isCompatible('1.2'));
@@ -51,7 +51,7 @@ public function testIsCompatible() {
    *
    * @covers ::__sleep
    */
-  public function testSerialization() {
+  public function testSerialization(): void {
     $dependency = new Dependency('paragraphs_demo', 'paragraphs', '>8.x-1.1');
     $this->assertTrue($dependency->isCompatible('1.2'));
     $reflected_constraint = (new \ReflectionObject($dependency))->getProperty('constraint');
diff --git a/core/tests/Drupal/Tests/Core/Extension/ExtensionDiscoveryTest.php b/core/tests/Drupal/Tests/Core/Extension/ExtensionDiscoveryTest.php
index 75d14c6c9386..ff9d1a7d0505 100644
--- a/core/tests/Drupal/Tests/Core/Extension/ExtensionDiscoveryTest.php
+++ b/core/tests/Drupal/Tests/Core/Extension/ExtensionDiscoveryTest.php
@@ -24,7 +24,7 @@ class ExtensionDiscoveryTest extends UnitTestCase {
    *
    * @covers ::scan
    */
-  public function testExtensionDiscoveryVfs() {
+  public function testExtensionDiscoveryVfs(): void {
 
     // Set up the file system.
     $filesystem = [];
@@ -72,7 +72,7 @@ public function testExtensionDiscoveryVfs() {
    * @covers ::scan
    * @runInSeparateProcess
    */
-  public function testExtensionDiscoveryCache() {
+  public function testExtensionDiscoveryCache(): void {
     // Set up an extension object in the cache to mimic site prior to changing
     // \Drupal\Core\Extension\ExtensionDiscovery::scanDirectory() to cache an
     // array instead of an object. Note we cannot use the VFS file system
diff --git a/core/tests/Drupal/Tests/Core/Extension/ExtensionListTest.php b/core/tests/Drupal/Tests/Core/Extension/ExtensionListTest.php
index c5f1f4b7f5da..bdacfc99a14d 100644
--- a/core/tests/Drupal/Tests/Core/Extension/ExtensionListTest.php
+++ b/core/tests/Drupal/Tests/Core/Extension/ExtensionListTest.php
@@ -26,7 +26,7 @@ class ExtensionListTest extends UnitTestCase {
   /**
    * @covers ::getName
    */
-  public function testGetNameWithNonExistingExtension() {
+  public function testGetNameWithNonExistingExtension(): void {
     [$cache, $info_parser, $module_handler, $state] = $this->getMocks();
     $test_extension_list = new TestExtension($this->randomMachineName(), 'test_extension', $cache->reveal(), $info_parser->reveal(), $module_handler->reveal(), $state->reveal(), 'testing');
 
@@ -41,7 +41,7 @@ public function testGetNameWithNonExistingExtension() {
   /**
    * @covers ::getName
    */
-  public function testGetName() {
+  public function testGetName(): void {
     $test_extension_list = $this->setupTestExtensionList();
 
     $this->assertEquals('test name', $test_extension_list->getName('test_name'));
@@ -50,7 +50,7 @@ public function testGetName() {
   /**
    * @covers ::get
    */
-  public function testGetWithNonExistingExtension() {
+  public function testGetWithNonExistingExtension(): void {
     [$cache, $info_parser, $module_handler, $state] = $this->getMocks();
     $test_extension_list = new TestExtension($this->randomMachineName(), 'test_extension', $cache->reveal(), $info_parser->reveal(), $module_handler->reveal(), $state->reveal(), 'testing');
 
@@ -65,7 +65,7 @@ public function testGetWithNonExistingExtension() {
   /**
    * @covers ::get
    */
-  public function testGet() {
+  public function testGet(): void {
     $test_extension_list = $this->setupTestExtensionList();
 
     $extension = $test_extension_list->get('test_name');
@@ -76,7 +76,7 @@ public function testGet() {
   /**
    * @covers ::getList
    */
-  public function testGetList() {
+  public function testGetList(): void {
     $test_extension_list = $this->setupTestExtensionList();
 
     $extensions = $test_extension_list->getList();
@@ -88,7 +88,7 @@ public function testGetList() {
    * @covers ::getExtensionInfo
    * @covers ::getAllInstalledInfo
    */
-  public function testGetExtensionInfo() {
+  public function testGetExtensionInfo(): void {
     $test_extension_list = $this->setupTestExtensionList();
     $test_extension_list->setInstalledExtensions(['test_name']);
 
@@ -104,7 +104,7 @@ public function testGetExtensionInfo() {
   /**
    * @covers ::getAllAvailableInfo
    */
-  public function testGetAllAvailableInfo() {
+  public function testGetAllAvailableInfo(): void {
     $test_extension_list = $this->setupTestExtensionList();
 
     $infos = $test_extension_list->getAllAvailableInfo();
@@ -121,7 +121,7 @@ public function testGetAllAvailableInfo() {
   /**
    * @covers ::getAllInstalledInfo
    */
-  public function testGetAllInstalledInfo() {
+  public function testGetAllInstalledInfo(): void {
     $test_extension_list = $this->setupTestExtensionList(['test_name', 'test_name_2']);
     $test_extension_list->setInstalledExtensions(['test_name_2']);
 
@@ -139,7 +139,7 @@ public function testGetAllInstalledInfo() {
   /**
    * @covers ::getPathNames
    */
-  public function testGetPathNames() {
+  public function testGetPathNames(): void {
     $test_extension_list = $this->setupTestExtensionList();
 
     $filenames = $test_extension_list->getPathNames();
@@ -151,7 +151,7 @@ public function testGetPathNames() {
   /**
    * @covers ::getPathname
    */
-  public function testGetPathname() {
+  public function testGetPathname(): void {
     $test_extension_list = $this->setupTestExtensionList();
 
     $pathname = $test_extension_list->getPathname('test_name');
@@ -162,7 +162,7 @@ public function testGetPathname() {
    * @covers ::setPathname
    * @covers ::getPathname
    */
-  public function testSetPathname() {
+  public function testSetPathname(): void {
     $test_extension_list = $this->setupTestExtensionList();
 
     $test_extension_list->setPathname('test_name', 'vfs://drupal_root/example2/test_name/test_name.info.yml');
@@ -172,7 +172,7 @@ public function testSetPathname() {
   /**
    * @covers ::getPath
    */
-  public function testGetPath() {
+  public function testGetPath(): void {
     $test_extension_list = $this->setupTestExtensionList();
 
     $path = $test_extension_list->getPath('test_name');
@@ -182,7 +182,7 @@ public function testGetPath() {
   /**
    * @covers ::reset
    */
-  public function testReset() {
+  public function testReset(): void {
     $test_extension_list = $this->setupTestExtensionList();
 
     $path = $test_extension_list->getPath('test_name');
@@ -212,7 +212,7 @@ public function testReset() {
    *
    * @dataProvider providerCheckIncompatibility
    */
-  public function testCheckIncompatibility($additional_settings, $expected) {
+  public function testCheckIncompatibility($additional_settings, $expected): void {
     $test_extension_list = $this->setupTestExtensionList(['test_name'], $additional_settings);
     $this->assertSame($expected, $test_extension_list->checkIncompatibility('test_name'));
   }
diff --git a/core/tests/Drupal/Tests/Core/Extension/ExtensionSerializationTest.php b/core/tests/Drupal/Tests/Core/Extension/ExtensionSerializationTest.php
index 8016d36ed1c4..d939774a769d 100644
--- a/core/tests/Drupal/Tests/Core/Extension/ExtensionSerializationTest.php
+++ b/core/tests/Drupal/Tests/Core/Extension/ExtensionSerializationTest.php
@@ -45,7 +45,7 @@ protected function setUp(): void {
    * @covers ::__sleep
    * @covers ::__wakeup
    */
-  public function testServiceAppRouteUsage() {
+  public function testServiceAppRouteUsage(): void {
     $container = new ContainerBuilder();
     // Set a dummy container app.root to test against.
     $container->setParameter('app.root', 'vfs://dummy_app_root');
@@ -70,7 +70,7 @@ public function testServiceAppRouteUsage() {
    * @covers ::__sleep
    * @covers ::__wakeup
    */
-  public function testPublicProperties() {
+  public function testPublicProperties(): void {
     $container = new ContainerBuilder();
     // Set a dummy container app.root to test against.
     $container->setParameter('app.root', 'vfs://dummy_app_root');
diff --git a/core/tests/Drupal/Tests/Core/Extension/InfoParserUnitTest.php b/core/tests/Drupal/Tests/Core/Extension/InfoParserUnitTest.php
index 4709d288b19b..ebe81790854d 100644
--- a/core/tests/Drupal/Tests/Core/Extension/InfoParserUnitTest.php
+++ b/core/tests/Drupal/Tests/Core/Extension/InfoParserUnitTest.php
@@ -46,7 +46,7 @@ protected function setUp(): void {
    *
    * @covers ::parse
    */
-  public function testInfoParserNonExisting() {
+  public function testInfoParserNonExisting(): void {
     vfsStream::setup('modules');
     $this->expectException('\Drupal\Core\Extension\InfoParserException');
     $this->expectExceptionMessage('Unable to parse vfs://modules/does_not_exist.info.txt as it does not exist');
@@ -128,7 +128,7 @@ public static function providerInfoException(): array {
    *
    * @covers ::parse
    */
-  public function testInfoParserBroken() {
+  public function testInfoParserBroken(): void {
     $broken_info = <<<BROKEN_INFO
 # info.yml for testing broken YAML parsing exception handling.
 name: File
@@ -158,7 +158,7 @@ public function testInfoParserBroken() {
    *
    * @covers ::parse
    */
-  public function testTestingPackageMissingCoreVersionRequirement() {
+  public function testTestingPackageMissingCoreVersionRequirement(): void {
     $missing_core_version_requirement = <<<MISSING_CORE_VERSION_REQUIREMENT
 # info.yml for testing core_version_requirement.
 package: Testing
@@ -182,7 +182,7 @@ public function testTestingPackageMissingCoreVersionRequirement() {
    *
    * @covers ::parse
    */
-  public function testInfoParserCommonInfo() {
+  public function testInfoParserCommonInfo(): void {
     $common = <<<COMMON
 core_version_requirement: '*'
 name: common_test
@@ -215,7 +215,7 @@ public function testInfoParserCommonInfo() {
    *
    * @covers ::parse
    */
-  public function testInfoParserCoreInfo() {
+  public function testInfoParserCoreInfo(): void {
     $common = <<<CORE
 name: core_test
 type: module
@@ -242,7 +242,7 @@ public function testInfoParserCoreInfo() {
    *
    * @dataProvider providerCoreIncompatibility
    */
-  public function testCoreIncompatibility($test_case, $constraint, $expected) {
+  public function testCoreIncompatibility($test_case, $constraint, $expected): void {
     $core_incompatibility = <<<CORE_INCOMPATIBILITY
 core_version_requirement: $constraint
 name: common_test
@@ -303,7 +303,7 @@ public static function providerCoreIncompatibility() {
   /**
    * Tests a profile info file.
    */
-  public function testProfile() {
+  public function testProfile(): void {
     $profile = <<<PROFILE_TEST
 core_version_requirement: '*'
 name: The Perfect Profile
@@ -326,7 +326,7 @@ public function testProfile() {
    *
    * @covers ::parse
    */
-  public function testUnparsableCoreVersionRequirement() {
+  public function testUnparsableCoreVersionRequirement(): void {
     $unparsable_core_version_requirement = <<<UNPARSABLE_CORE_VERSION_REQUIREMENT
 # info.yml for testing invalid core_version_requirement value.
 name: Not this module
@@ -355,7 +355,7 @@ public function testUnparsableCoreVersionRequirement() {
    *
    * @dataProvider providerValidLifecycle
    */
-  public function testValidLifecycle($lifecycle, $expected) {
+  public function testValidLifecycle($lifecycle, $expected): void {
     $info = <<<INFO
 package: Core
 core_version_requirement: '*'
@@ -415,7 +415,7 @@ public static function providerValidLifecycle() {
    *
    * @dataProvider providerInvalidLifecycle
    */
-  public function testInvalidLifecycle($lifecycle, $exception_message) {
+  public function testInvalidLifecycle($lifecycle, $exception_message): void {
     $info = <<<INFO
 package: Core
 core_version_requirement: '*'
@@ -464,7 +464,7 @@ public static function providerInvalidLifecycle() {
    *
    * @dataProvider providerLifecycleLink
    */
-  public function testLifecycleLink($lifecycle, $lifecycle_link = NULL, $exception_message = NULL) {
+  public function testLifecycleLink($lifecycle, $lifecycle_link = NULL, $exception_message = NULL): void {
     $info = <<<INFO
 package: Core
 core_version_requirement: '*'
diff --git a/core/tests/Drupal/Tests/Core/Extension/ModuleHandlerTest.php b/core/tests/Drupal/Tests/Core/Extension/ModuleHandlerTest.php
index e411229d8bde..384a7ffc5643 100644
--- a/core/tests/Drupal/Tests/Core/Extension/ModuleHandlerTest.php
+++ b/core/tests/Drupal/Tests/Core/Extension/ModuleHandlerTest.php
@@ -65,7 +65,7 @@ protected function getModuleHandler() {
    *
    * @covers ::load
    */
-  public function testLoadModule() {
+  public function testLoadModule(): void {
     $module_handler = $this->getModuleHandler();
     $this->assertFalse(function_exists('module_handler_test_hook'));
     $this->assertTrue($module_handler->load('module_handler_test'));
@@ -85,7 +85,7 @@ public function testLoadModule() {
    *
    * @covers ::loadAll
    */
-  public function testLoadAllModules() {
+  public function testLoadAllModules(): void {
     $module_handler = $this->getModuleHandler();
     $module_handler->addModule('module_handler_test_all1', 'core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test_all1');
     $module_handler->addModule('module_handler_test_all2', 'core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test_all2');
@@ -101,7 +101,7 @@ public function testLoadAllModules() {
    *
    * @covers ::reload
    */
-  public function testModuleReloading() {
+  public function testModuleReloading(): void {
     $module_handler = $this->getMockBuilder(ModuleHandler::class)
       ->setConstructorArgs([
         $this->root,
@@ -137,7 +137,7 @@ public function testModuleReloading() {
    *
    * @covers ::isLoaded
    */
-  public function testIsLoaded() {
+  public function testIsLoaded(): void {
     $module_handler = $this->getModuleHandler();
     $this->assertFalse($module_handler->isLoaded());
     $module_handler->loadAll();
@@ -149,7 +149,7 @@ public function testIsLoaded() {
    *
    * @covers ::getModuleList
    */
-  public function testGetModuleList() {
+  public function testGetModuleList(): void {
     $this->assertEquals($this->getModuleHandler()->getModuleList(), [
       'module_handler_test' => new Extension($this->root, 'module', 'core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test/module_handler_test.info.yml', 'module_handler_test.module'),
     ]);
@@ -160,14 +160,14 @@ public function testGetModuleList() {
    *
    * @covers ::getModule
    */
-  public function testGetModuleWithExistingModule() {
+  public function testGetModuleWithExistingModule(): void {
     $this->assertEquals($this->getModuleHandler()->getModule('module_handler_test'), new Extension($this->root, 'module', 'core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test/module_handler_test.info.yml', 'module_handler_test.module'));
   }
 
   /**
    * @covers ::getModule
    */
-  public function testGetModuleWithNonExistingModule() {
+  public function testGetModuleWithNonExistingModule(): void {
     $this->expectException(UnknownExtensionException::class);
     $this->getModuleHandler()->getModule('claire_alice_watch_my_little_pony_module_that_does_not_exist');
   }
@@ -177,7 +177,7 @@ public function testGetModuleWithNonExistingModule() {
    *
    * @covers ::setModuleList
    */
-  public function testSetModuleList() {
+  public function testSetModuleList(): void {
     $fixture_module_handler = $this->getModuleHandler();
     $module_handler = $this->getMockBuilder(ModuleHandler::class)
       ->setConstructorArgs([
@@ -205,7 +205,7 @@ public function testSetModuleList() {
    * @covers ::addModule
    * @covers ::add
    */
-  public function testAddModule() {
+  public function testAddModule(): void {
 
     $module_handler = $this->getMockBuilder(ModuleHandler::class)
       ->setConstructorArgs([
@@ -227,7 +227,7 @@ public function testAddModule() {
    * @covers ::addProfile
    * @covers ::add
    */
-  public function testAddProfile() {
+  public function testAddProfile(): void {
 
     $module_handler = $this->getMockBuilder(ModuleHandler::class)
       ->setConstructorArgs([
@@ -249,7 +249,7 @@ public function testAddProfile() {
    *
    * @covers ::moduleExists
    */
-  public function testModuleExists() {
+  public function testModuleExists(): void {
     $module_handler = $this->getModuleHandler();
     $this->assertTrue($module_handler->moduleExists('module_handler_test'));
     $this->assertFalse($module_handler->moduleExists('module_handler_test_added'));
@@ -258,7 +258,7 @@ public function testModuleExists() {
   /**
    * @covers ::loadAllIncludes
    */
-  public function testLoadAllIncludes() {
+  public function testLoadAllIncludes(): void {
     $this->assertTrue(TRUE);
     $module_handler = $this->getMockBuilder(ModuleHandler::class)
       ->setConstructorArgs([
@@ -288,7 +288,7 @@ public function testLoadAllIncludes() {
    * @runInSeparateProcess
    * @preserveGlobalState disabled
    */
-  public function testLoadInclude() {
+  public function testLoadInclude(): void {
     $module_handler = $this->getModuleHandler();
     // Include exists.
     $this->assertEquals(__DIR__ . '/modules/module_handler_test/hook_include.inc', $module_handler->loadInclude('module_handler_test', 'inc', 'hook_include'));
@@ -302,7 +302,7 @@ public function testLoadInclude() {
    *
    * @covers ::invoke
    */
-  public function testInvokeModuleEnabled() {
+  public function testInvokeModuleEnabled(): void {
     $module_handler = $this->getModuleHandler();
     $this->assertTrue($module_handler->invoke('module_handler_test', 'hook', [TRUE]), 'Installed module runs hook.');
     $this->assertFalse($module_handler->invoke('module_handler_test', 'hook', [FALSE]), 'Installed module runs hook.');
@@ -315,7 +315,7 @@ public function testInvokeModuleEnabled() {
    * @covers ::hasImplementations
    * @covers ::loadAllIncludes
    */
-  public function testImplementsHookModuleEnabled() {
+  public function testImplementsHookModuleEnabled(): void {
     $module_handler = $this->getModuleHandler();
     $this->assertTrue($module_handler->hasImplementations('hook', 'module_handler_test'), 'Installed module implementation found.');
 
@@ -331,7 +331,7 @@ public function testImplementsHookModuleEnabled() {
    *
    * @covers ::hasImplementations
    */
-  public function testHasImplementations() {
+  public function testHasImplementations(): void {
     $module_handler = $this->getMockBuilder(ModuleHandler::class)
       ->setConstructorArgs([$this->root, [], $this->cacheBackend])
       ->onlyMethods(['buildImplementationInfo'])
@@ -359,7 +359,7 @@ public function testHasImplementations() {
    *
    * @covers ::invokeAllWith
    */
-  public function testCachedGetImplementations() {
+  public function testCachedGetImplementations(): void {
     $this->cacheBackend->expects($this->exactly(1))
       ->method('get')
       ->willReturn((object) ['data' => ['hook' => ['module_handler_test' => 'test']]]);
@@ -396,7 +396,7 @@ function (callable $hook, string $module) use (&$implementors) {
    *
    * @covers ::invokeAllWith
    */
-  public function testCachedGetImplementationsMissingMethod() {
+  public function testCachedGetImplementationsMissingMethod(): void {
     $this->cacheBackend->expects($this->exactly(1))
       ->method('get')
       ->willReturn((object) [
@@ -439,7 +439,7 @@ function (callable $hook, string $module) use (&$implementors) {
    *
    * @covers ::invokeAll
    */
-  public function testInvokeAll() {
+  public function testInvokeAll(): void {
     $module_handler = $this->getModuleHandler();
     $module_handler->addModule('module_handler_test_all1', 'core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test_all1');
     $module_handler->addModule('module_handler_test_all2', 'core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test_all2');
@@ -451,7 +451,7 @@ public function testInvokeAll() {
    *
    * @covers ::writeCache
    */
-  public function testWriteCache() {
+  public function testWriteCache(): void {
     $module_handler = $this->getModuleHandler();
     $this->cacheBackend
       ->expects($this->exactly(2))
@@ -471,7 +471,7 @@ public function testWriteCache() {
    * @covers ::getHookInfo
    * @covers ::buildHookInfo
    */
-  public function testGetHookInfo() {
+  public function testGetHookInfo(): void {
     $module_handler = $this->getModuleHandler();
     // Set up some synthetic results.
     $this->cacheBackend
@@ -499,7 +499,7 @@ public function testGetHookInfo() {
    *
    * @covers ::resetImplementations
    */
-  public function testResetImplementations() {
+  public function testResetImplementations(): void {
     $module_handler = $this->getModuleHandler();
     // Prime caches
     $module_handler->invokeAllWith('hook', function (callable $hook, string $module) {});
@@ -530,7 +530,7 @@ public function testResetImplementations() {
   /**
    * @covers ::getModuleDirectories
    */
-  public function testGetModuleDirectories() {
+  public function testGetModuleDirectories(): void {
     $module_handler = $this->getModuleHandler();
     $module_handler->setModuleList([]);
     $module_handler->addModule('node', 'core/modules/node');
diff --git a/core/tests/Drupal/Tests/Core/Extension/ModuleInfoTest.php b/core/tests/Drupal/Tests/Core/Extension/ModuleInfoTest.php
index af1c33a56d77..1b13648aa142 100644
--- a/core/tests/Drupal/Tests/Core/Extension/ModuleInfoTest.php
+++ b/core/tests/Drupal/Tests/Core/Extension/ModuleInfoTest.php
@@ -22,7 +22,7 @@ class ModuleInfoTest extends UnitTestCase {
    *
    * @dataProvider coreModuleListDataProvider
    */
-  public function testModuleInfo($module) {
+  public function testModuleInfo($module): void {
     $module_directory = __DIR__ . '/../../../../../modules/' . $module;
     $info = Yaml::decode(file_get_contents($module_directory . '/' . $module . '.info.yml'));
     $this->assertArrayHasKey('version', $info);
diff --git a/core/tests/Drupal/Tests/Core/Extension/ModuleRequiredByThemesUninstallValidatorTest.php b/core/tests/Drupal/Tests/Core/Extension/ModuleRequiredByThemesUninstallValidatorTest.php
index d1900369c26c..438fc0d759ad 100644
--- a/core/tests/Drupal/Tests/Core/Extension/ModuleRequiredByThemesUninstallValidatorTest.php
+++ b/core/tests/Drupal/Tests/Core/Extension/ModuleRequiredByThemesUninstallValidatorTest.php
@@ -49,7 +49,7 @@ protected function setUp(): void {
   /**
    * @covers ::validate
    */
-  public function testValidateNoThemeDependency() {
+  public function testValidateNoThemeDependency(): void {
     $this->themeExtensionList->getAllInstalledInfo()->willReturn([
       'stable9' => [
         'name' => 'Stable 9',
@@ -70,7 +70,7 @@ public function testValidateNoThemeDependency() {
   /**
    * @covers ::validate
    */
-  public function testValidateOneThemeDependency() {
+  public function testValidateOneThemeDependency(): void {
     $module = 'single_module';
     $module_name = 'Single Module';
     $theme = 'one_theme';
@@ -109,7 +109,7 @@ public function testValidateOneThemeDependency() {
   /**
    * @covers ::validate
    */
-  public function testValidateTwoThemeDependencies() {
+  public function testValidateTwoThemeDependencies(): void {
     $module = 'popular_module';
     $module_name = 'Popular Module';
     $theme1 = 'first_theme';
diff --git a/core/tests/Drupal/Tests/Core/Extension/RequiredModuleUninstallValidatorTest.php b/core/tests/Drupal/Tests/Core/Extension/RequiredModuleUninstallValidatorTest.php
index 2e00d9e74812..93ac524facab 100644
--- a/core/tests/Drupal/Tests/Core/Extension/RequiredModuleUninstallValidatorTest.php
+++ b/core/tests/Drupal/Tests/Core/Extension/RequiredModuleUninstallValidatorTest.php
@@ -32,7 +32,7 @@ protected function setUp(): void {
   /**
    * @covers ::validate
    */
-  public function testValidateNoModule() {
+  public function testValidateNoModule(): void {
     $this->uninstallValidator->expects($this->once())
       ->method('getModuleInfoByModule')
       ->willReturn([]);
@@ -46,7 +46,7 @@ public function testValidateNoModule() {
   /**
    * @covers ::validate
    */
-  public function testValidateNotRequired() {
+  public function testValidateNotRequired(): void {
     $module = $this->randomMachineName();
 
     $this->uninstallValidator->expects($this->once())
@@ -61,7 +61,7 @@ public function testValidateNotRequired() {
   /**
    * @covers ::validate
    */
-  public function testValidateRequired() {
+  public function testValidateRequired(): void {
     $module = $this->randomMachineName();
 
     $this->uninstallValidator->expects($this->once())
diff --git a/core/tests/Drupal/Tests/Core/Extension/ThemeExtensionListTest.php b/core/tests/Drupal/Tests/Core/Extension/ThemeExtensionListTest.php
index 0dc1de5b8b65..37cfa0f62c1c 100644
--- a/core/tests/Drupal/Tests/Core/Extension/ThemeExtensionListTest.php
+++ b/core/tests/Drupal/Tests/Core/Extension/ThemeExtensionListTest.php
@@ -27,7 +27,7 @@ class ThemeExtensionListTest extends UnitTestCase {
   /**
    * Tests rebuild the theme data with theme parents.
    */
-  public function testRebuildThemeDataWithThemeParents() {
+  public function testRebuildThemeDataWithThemeParents(): void {
     $extension_discovery = $this->prophesize(ExtensionDiscovery::class);
     $extension_discovery
       ->scan('theme')
@@ -121,7 +121,7 @@ public function testRebuildThemeDataWithThemeParents() {
    *
    * @group legacy
    */
-  public function testGetBaseThemes(array $themes, $theme, array $expected) {
+  public function testGetBaseThemes(array $themes, $theme, array $expected): void {
     // Mocks and stubs.
     $module_handler = $this->prophesize(ModuleHandlerInterface::class);
     $state = new State(new KeyValueMemoryFactory(), new NullBackend('bin'), new NullLockBackend());
diff --git a/core/tests/Drupal/Tests/Core/Extension/ThemeHandlerTest.php b/core/tests/Drupal/Tests/Core/Extension/ThemeHandlerTest.php
index b8c71ba4d778..576815f249bd 100644
--- a/core/tests/Drupal/Tests/Core/Extension/ThemeHandlerTest.php
+++ b/core/tests/Drupal/Tests/Core/Extension/ThemeHandlerTest.php
@@ -71,7 +71,7 @@ protected function setUp(): void {
    * @see \Drupal\Core\Extension\ThemeHandler::rebuildThemeData()
    * @group legacy
    */
-  public function testRebuildThemeData() {
+  public function testRebuildThemeData(): void {
     $this->expectDeprecation("\Drupal\Core\Extension\ThemeHandlerInterface::rebuildThemeData() is deprecated in drupal:10.3.0 and is removed from drupal:12.0.0. Use \Drupal::service('extension.list.theme')->reset()->getList() instead. See https://www.drupal.org/node/3413196");
     $this->themeList->expects($this->once())
       ->method('reset')
@@ -97,7 +97,7 @@ public function testRebuildThemeData() {
   /**
    * Tests empty libraries in theme.info.yml file.
    */
-  public function testThemeLibrariesEmpty() {
+  public function testThemeLibrariesEmpty(): void {
     $theme = new Extension($this->root, 'theme', 'core/modules/system/tests/themes/test_theme_libraries_empty', 'test_theme_libraries_empty.info.yml');
     try {
       $this->themeHandler->addTheme($theme);
diff --git a/core/tests/Drupal/Tests/Core/Field/FieldDefinitionListenerTest.php b/core/tests/Drupal/Tests/Core/Field/FieldDefinitionListenerTest.php
index 614969324281..7486fb1c3b8e 100644
--- a/core/tests/Drupal/Tests/Core/Field/FieldDefinitionListenerTest.php
+++ b/core/tests/Drupal/Tests/Core/Field/FieldDefinitionListenerTest.php
@@ -108,7 +108,7 @@ protected function setUpEntityTypeManager($definitions = []) {
   /**
    * @covers ::onFieldDefinitionCreate
    */
-  public function testOnFieldDefinitionCreateNewField() {
+  public function testOnFieldDefinitionCreateNewField(): void {
     $field_definition = $this->prophesize(FieldDefinitionInterface::class);
     $field_definition->getTargetEntityTypeId()->willReturn('test_entity_type');
     $field_definition->getTargetBundle()->willReturn('test_bundle');
@@ -139,7 +139,7 @@ public function testOnFieldDefinitionCreateNewField() {
   /**
    * @covers ::onFieldDefinitionCreate
    */
-  public function testOnFieldDefinitionCreateExistingField() {
+  public function testOnFieldDefinitionCreateExistingField(): void {
     $field_definition = $this->prophesize(FieldDefinitionInterface::class);
     $field_definition->getTargetEntityTypeId()->willReturn('test_entity_type');
     $field_definition->getTargetBundle()->willReturn('test_bundle');
@@ -175,7 +175,7 @@ public function testOnFieldDefinitionCreateExistingField() {
   /**
    * @covers ::onFieldDefinitionUpdate
    */
-  public function testOnFieldDefinitionUpdate() {
+  public function testOnFieldDefinitionUpdate(): void {
     $field_definition = $this->prophesize(FieldDefinitionInterface::class);
     $field_definition->getTargetEntityTypeId()->willReturn('test_entity_type');
 
@@ -192,7 +192,7 @@ public function testOnFieldDefinitionUpdate() {
   /**
    * @covers ::onFieldDefinitionDelete
    */
-  public function testOnFieldDefinitionDeleteMultipleBundles() {
+  public function testOnFieldDefinitionDeleteMultipleBundles(): void {
     $field_definition = $this->prophesize(FieldDefinitionInterface::class);
     $field_definition->getTargetEntityTypeId()->willReturn('test_entity_type');
     $field_definition->getTargetBundle()->willReturn('test_bundle');
@@ -232,7 +232,7 @@ public function testOnFieldDefinitionDeleteMultipleBundles() {
   /**
    * @covers ::onFieldDefinitionDelete
    */
-  public function testOnFieldDefinitionDeleteSingleBundles() {
+  public function testOnFieldDefinitionDeleteSingleBundles(): void {
     $field_definition = $this->prophesize(FieldDefinitionInterface::class);
     $field_definition->getTargetEntityTypeId()->willReturn('test_entity_type');
     $field_definition->getTargetBundle()->willReturn('test_bundle');
diff --git a/core/tests/Drupal/Tests/Core/Field/FieldFilteredMarkupTest.php b/core/tests/Drupal/Tests/Core/Field/FieldFilteredMarkupTest.php
index 645c67f5fbc6..d82fda322d32 100644
--- a/core/tests/Drupal/Tests/Core/Field/FieldFilteredMarkupTest.php
+++ b/core/tests/Drupal/Tests/Core/Field/FieldFilteredMarkupTest.php
@@ -19,7 +19,7 @@ class FieldFilteredMarkupTest extends UnitTestCase {
    * @covers ::create
    * @dataProvider providerTestCreate
    */
-  public function testCreate($string, $expected, $instance_of_check) {
+  public function testCreate($string, $expected, $instance_of_check): void {
     $filtered_string = FieldFilteredMarkup::create($string);
 
     if ($instance_of_check) {
@@ -52,7 +52,7 @@ public static function providerTestCreate() {
   /**
    * @covers ::displayAllowedTags
    */
-  public function testDisplayAllowedTags() {
+  public function testDisplayAllowedTags(): void {
     $expected = '<a> <b> <big> <code> <del> <em> <i> <ins> <pre> <q> <small> <span> <strong> <sub> <sup> <tt> <ol> <ul> <li> <p> <br> <img>';
 
     $this->assertSame($expected, FieldFilteredMarkup::displayAllowedTags());
diff --git a/core/tests/Drupal/Tests/Core/Field/FieldInputValueNormalizerTraitTest.php b/core/tests/Drupal/Tests/Core/Field/FieldInputValueNormalizerTraitTest.php
index b846f9686c9c..631e31374c4e 100644
--- a/core/tests/Drupal/Tests/Core/Field/FieldInputValueNormalizerTraitTest.php
+++ b/core/tests/Drupal/Tests/Core/Field/FieldInputValueNormalizerTraitTest.php
@@ -19,7 +19,7 @@ class FieldInputValueNormalizerTraitTest extends UnitTestCase {
    * @dataProvider keyValueByDeltaTestCases
    * @covers ::normalizeValue
    */
-  public function testKeyValueByDelta($input_value, $expected_value, $main_property_name = 'value') {
+  public function testKeyValueByDelta($input_value, $expected_value, $main_property_name = 'value'): void {
     $this->assertEquals($expected_value, $this->normalizeValue($input_value, $main_property_name));
   }
 
@@ -85,7 +85,7 @@ public static function keyValueByDeltaTestCases() {
   /**
    * @covers ::normalizeValue
    */
-  public function testScalarWithNoMainProperty() {
+  public function testScalarWithNoMainProperty(): void {
     $this->expectException(\InvalidArgumentException::class);
     $this->expectExceptionMessage('A main property is required when normalizing scalar field values.');
     $value = 'foo';
@@ -95,7 +95,7 @@ public function testScalarWithNoMainProperty() {
   /**
    * @covers ::normalizeValue
    */
-  public function testKeyValueByDeltaUndefinedVariables() {
+  public function testKeyValueByDeltaUndefinedVariables(): void {
     $this->assertEquals([], $this->normalizeValue($undefined_variable, 'value'));
     $this->assertEquals([], $this->normalizeValue($undefined_variable['undefined_key'], 'value'));
   }
diff --git a/core/tests/Drupal/Tests/Core/Field/FieldItemListTest.php b/core/tests/Drupal/Tests/Core/Field/FieldItemListTest.php
index 629ebc8dc2e1..5662ea0f3be7 100644
--- a/core/tests/Drupal/Tests/Core/Field/FieldItemListTest.php
+++ b/core/tests/Drupal/Tests/Core/Field/FieldItemListTest.php
@@ -25,7 +25,7 @@ class FieldItemListTest extends UnitTestCase {
    *
    * @dataProvider providerTestEquals
    */
-  public function testEquals($expected, ?FieldItemInterface $first_field_item = NULL, ?FieldItemInterface $second_field_item = NULL) {
+  public function testEquals($expected, ?FieldItemInterface $first_field_item = NULL, ?FieldItemInterface $second_field_item = NULL): void {
 
     // Mock the field type manager and place it in the container.
     $field_type_manager = $this->createMock('Drupal\Core\Field\FieldTypePluginManagerInterface');
@@ -167,7 +167,7 @@ public static function providerTestEquals() {
    *
    * @dataProvider providerTestEquals
    */
-  public function testHasAffectingChanges($expected, ?FieldItemInterface $first_field_item = NULL, ?FieldItemInterface $second_field_item = NULL) {
+  public function testHasAffectingChanges($expected, ?FieldItemInterface $first_field_item = NULL, ?FieldItemInterface $second_field_item = NULL): void {
     // Mock the field type manager and place it in the container.
     $field_type_manager = $this->createMock(FieldTypePluginManagerInterface::class);
     $container = new ContainerBuilder();
@@ -228,7 +228,7 @@ public function testHasAffectingChanges($expected, ?FieldItemInterface $first_fi
   /**
    * @covers ::equals
    */
-  public function testEqualsEmptyItems() {
+  public function testEqualsEmptyItems(): void {
     /** @var \Drupal\Core\Field\FieldItemBase  $fv */
     $first_field_item = new FieldItemTestClass();
     $first_field_item->setValue(['0' => 1, '1' => 2]);
@@ -292,7 +292,7 @@ public function testEqualsEmptyItems() {
   /**
    * @covers ::defaultValuesForm
    */
-  public function testDefaultValuesForm() {
+  public function testDefaultValuesForm(): void {
     $field_definition = $this->createMock(FieldDefinitionInterface::class);
     $field_definition->expects($this->any())
       ->method('getType')
@@ -316,7 +316,7 @@ public function testDefaultValuesForm() {
   /**
    * @covers ::defaultValuesFormValidate
    */
-  public function testDefaultValuesFormValidate() {
+  public function testDefaultValuesFormValidate(): void {
     $field_definition = $this->createMock(FieldDefinitionInterface::class);
     /** @var \Drupal\Core\Field\FieldItemList|\PHPUnit\Framework\MockObject\MockObject $field_list */
     $field_list = $this->getMockBuilder(FieldItemList::class)
@@ -337,7 +337,7 @@ public function testDefaultValuesFormValidate() {
   /**
    * @covers ::defaultValuesFormSubmit
    */
-  public function testDefaultValuesFormSubmit() {
+  public function testDefaultValuesFormSubmit(): void {
     $field_definition = $this->createMock(FieldDefinitionInterface::class);
     /** @var \Drupal\Core\Field\FieldItemList|\PHPUnit\Framework\MockObject\MockObject $field_list */
     $field_list = $this->getMockBuilder(FieldItemList::class)
diff --git a/core/tests/Drupal/Tests/Core/Field/FieldTypePluginManagerTest.php b/core/tests/Drupal/Tests/Core/Field/FieldTypePluginManagerTest.php
index 5e8aef87c08d..38513190d113 100644
--- a/core/tests/Drupal/Tests/Core/Field/FieldTypePluginManagerTest.php
+++ b/core/tests/Drupal/Tests/Core/Field/FieldTypePluginManagerTest.php
@@ -79,7 +79,7 @@ protected function setUp(): void {
   /**
    * @covers ::getGroupedDefinitions
    */
-  public function testGetGroupedDefinitions() {
+  public function testGetGroupedDefinitions(): void {
     $this->discovery->getDefinitions()->willReturn([
       'telephone' => [
         'category' => 'general',
@@ -132,7 +132,7 @@ public function testGetGroupedDefinitions() {
   /**
    * @covers ::getGroupedDefinitions
    */
-  public function testGetGroupedDefinitionsInvalid() {
+  public function testGetGroupedDefinitionsInvalid(): void {
     $this->discovery->getDefinitions()->willReturn([
       'string' => [
         'category' => 'text',
@@ -172,7 +172,7 @@ public function testGetGroupedDefinitionsInvalid() {
   /**
    * @covers ::getGroupedDefinitions
    */
-  public function testGetGroupedDefinitionsEmpty() {
+  public function testGetGroupedDefinitionsEmpty(): void {
     $this->fieldTypeCategoryManager->getDefinitions()->willReturn([]);
     $this->assertEquals([], $this->fieldTypeManager->getGroupedDefinitions([]));
   }
diff --git a/core/tests/Drupal/Tests/Core/Field/PluginSettingsBaseTest.php b/core/tests/Drupal/Tests/Core/Field/PluginSettingsBaseTest.php
index b743c692b0fd..0d3fc0aeeea1 100644
--- a/core/tests/Drupal/Tests/Core/Field/PluginSettingsBaseTest.php
+++ b/core/tests/Drupal/Tests/Core/Field/PluginSettingsBaseTest.php
@@ -16,7 +16,7 @@ class PluginSettingsBaseTest extends UnitTestCase {
   /**
    * @covers ::getThirdPartySettings
    */
-  public function testGetThirdPartySettings() {
+  public function testGetThirdPartySettings(): void {
     $plugin_settings = new TestPluginSettingsBase();
     $this->assertSame([], $plugin_settings->getThirdPartySettings());
     $this->assertSame([], $plugin_settings->getThirdPartySettings('test'));
diff --git a/core/tests/Drupal/Tests/Core/File/FileSystemTest.php b/core/tests/Drupal/Tests/Core/File/FileSystemTest.php
index 12b049d9c703..7d159125731f 100644
--- a/core/tests/Drupal/Tests/Core/File/FileSystemTest.php
+++ b/core/tests/Drupal/Tests/Core/File/FileSystemTest.php
@@ -51,7 +51,7 @@ protected function setUp(): void {
   /**
    * @covers ::chmod
    */
-  public function testChmodFile() {
+  public function testChmodFile(): void {
     vfsStream::setup('dir');
     vfsStream::create(['test.txt' => 'asdf']);
     $uri = 'vfs://dir/test.txt';
@@ -65,7 +65,7 @@ public function testChmodFile() {
   /**
    * @covers ::chmod
    */
-  public function testChmodDir() {
+  public function testChmodDir(): void {
     vfsStream::setup('dir');
     vfsStream::create(['nested_dir' => []]);
     $uri = 'vfs://dir/nested_dir';
@@ -79,7 +79,7 @@ public function testChmodDir() {
   /**
    * @covers ::chmod
    */
-  public function testChmodUnsuccessful() {
+  public function testChmodUnsuccessful(): void {
     vfsStream::setup('dir');
     $this->assertFalse($this->fileSystem->chmod('vfs://dir/test.txt'));
   }
@@ -87,7 +87,7 @@ public function testChmodUnsuccessful() {
   /**
    * @covers ::unlink
    */
-  public function testUnlink() {
+  public function testUnlink(): void {
     vfsStream::setup('dir');
     vfsStream::create(['test.txt' => 'asdf']);
     $uri = 'vfs://dir/test.txt';
@@ -106,7 +106,7 @@ public function testUnlink() {
    *
    * @dataProvider providerTestBasename
    */
-  public function testBasename($uri, $expected, $suffix = NULL) {
+  public function testBasename($uri, $expected, $suffix = NULL): void {
     $this->assertSame($expected, $this->fileSystem->basename($uri, $suffix));
   }
 
@@ -151,7 +151,7 @@ protected function assertFilePermissions(int $expected_mode, string $uri, string
    *
    * @covers ::createFilename
    */
-  public function testInvalidUTF8() {
+  public function testInvalidUTF8(): void {
     vfsStream::setup('dir');
     // cspell:disable-next-line
     $filename = "a\xFFsdf\x80€" . '.txt';
diff --git a/core/tests/Drupal/Tests/Core/File/FileUploadSanitizeNameEventTest.php b/core/tests/Drupal/Tests/Core/File/FileUploadSanitizeNameEventTest.php
index 17e7bbe1f5b4..7f69faabf680 100644
--- a/core/tests/Drupal/Tests/Core/File/FileUploadSanitizeNameEventTest.php
+++ b/core/tests/Drupal/Tests/Core/File/FileUploadSanitizeNameEventTest.php
@@ -21,7 +21,7 @@ class FileUploadSanitizeNameEventTest extends UnitTestCase {
    * @covers ::setFilename
    * @covers ::getFilename
    */
-  public function testSetFilename() {
+  public function testSetFilename(): void {
     $event = new FileUploadSanitizeNameEvent('foo.txt', '');
     $this->assertSame('foo.txt', $event->getFilename());
     $event->setFilename('foo.html');
@@ -31,7 +31,7 @@ public function testSetFilename() {
   /**
    * @covers ::setFilename
    */
-  public function testSetFilenameException() {
+  public function testSetFilenameException(): void {
     $event = new FileUploadSanitizeNameEvent('foo.txt', '');
     $this->assertSame('foo.txt', $event->getFilename());
     $this->expectException(\InvalidArgumentException::class);
@@ -43,7 +43,7 @@ public function testSetFilenameException() {
    * @covers ::__construct
    * @covers ::setFilename
    */
-  public function testConstructorException() {
+  public function testConstructorException(): void {
     $this->expectException(\InvalidArgumentException::class);
     $this->expectExceptionMessage('$filename must be a filename with no path information, "bar/foo.txt" provided');
     new FileUploadSanitizeNameEvent('bar/foo.txt', '');
@@ -52,7 +52,7 @@ public function testConstructorException() {
   /**
    * @covers ::getAllowedExtensions
    */
-  public function testAllowedExtensions() {
+  public function testAllowedExtensions(): void {
     $event = new FileUploadSanitizeNameEvent('foo.txt', '');
     $this->assertSame([], $event->getAllowedExtensions());
 
@@ -70,7 +70,7 @@ public function testAllowedExtensions() {
    * @param string $filename
    *   The filename to test
    */
-  public function testEventFilenameFunctions(string $filename) {
+  public function testEventFilenameFunctions(string $filename): void {
     $event = new FileUploadSanitizeNameEvent($filename, '');
     $this->assertSame($filename, $event->getFilename());
   }
@@ -104,7 +104,7 @@ public static function provideFilenames() {
   /**
    * @covers ::stopPropagation
    */
-  public function testStopPropagation() {
+  public function testStopPropagation(): void {
     $this->expectException(\RuntimeException::class);
     $event = new FileUploadSanitizeNameEvent('test.txt', '');
     $event->stopPropagation();
diff --git a/core/tests/Drupal/Tests/Core/Flood/MemoryBackendTest.php b/core/tests/Drupal/Tests/Core/Flood/MemoryBackendTest.php
index 74d9fe20ddf2..1f078f2618a0 100644
--- a/core/tests/Drupal/Tests/Core/Flood/MemoryBackendTest.php
+++ b/core/tests/Drupal/Tests/Core/Flood/MemoryBackendTest.php
@@ -38,7 +38,7 @@ protected function setUp(): void {
   /**
    * Tests an allowed flood event.
    */
-  public function testAllowedProceeding() {
+  public function testAllowedProceeding(): void {
     $threshold = 2;
     $window_expired = -1;
 
@@ -49,7 +49,7 @@ public function testAllowedProceeding() {
   /**
    * Tests a flood event with more than the allowed calls.
    */
-  public function testNotAllowedProceeding() {
+  public function testNotAllowedProceeding(): void {
     $threshold = 1;
     $window_expired = -1;
 
@@ -65,7 +65,7 @@ public function testNotAllowedProceeding() {
    *
    * @medium
    */
-  public function testExpiring() {
+  public function testExpiring(): void {
     $threshold = 1;
     $window_expired = -1;
 
@@ -83,7 +83,7 @@ public function testExpiring() {
   /**
    * Tests a flood event with no expiring, so cron will not allow to proceed.
    */
-  public function testNotExpiring() {
+  public function testNotExpiring(): void {
     $threshold = 2;
 
     $this->flood->register('test_event', 1);
@@ -100,7 +100,7 @@ public function testNotExpiring() {
   /**
    * Tests memory backend records events to the nearest microsecond.
    */
-  public function testMemoryBackendThreshold() {
+  public function testMemoryBackendThreshold(): void {
     $this->flood->register('new event');
     $this->assertTrue($this->flood->isAllowed('new event', '2'));
     $this->flood->register('new event');
diff --git a/core/tests/Drupal/Tests/Core/Form/ConfigFormBaseTraitTest.php b/core/tests/Drupal/Tests/Core/Form/ConfigFormBaseTraitTest.php
index 0604fda0b4b7..318127b121b4 100644
--- a/core/tests/Drupal/Tests/Core/Form/ConfigFormBaseTraitTest.php
+++ b/core/tests/Drupal/Tests/Core/Form/ConfigFormBaseTraitTest.php
@@ -16,7 +16,7 @@ class ConfigFormBaseTraitTest extends UnitTestCase {
   /**
    * @covers ::config
    */
-  public function testConfig() {
+  public function testConfig(): void {
 
     $trait = $this->createPartialMock(ConfiguredTrait::class, ['getEditableConfigNames']);
     // Set up some configuration in a mocked config factory.
@@ -44,7 +44,7 @@ public function testConfig() {
   /**
    * @covers ::config
    */
-  public function testConfigFactoryException() {
+  public function testConfigFactoryException(): void {
     $testObject = new ConfiguredTrait();
 
     // There is no config factory available this should result in an exception.
@@ -57,7 +57,7 @@ public function testConfigFactoryException() {
   /**
    * @covers ::config
    */
-  public function testConfigFactoryExceptionInvalidProperty() {
+  public function testConfigFactoryExceptionInvalidProperty(): void {
     $testObject = new ConfiguredTrait();
 
     // There is no config factory available this should result in an exception.
diff --git a/core/tests/Drupal/Tests/Core/Form/ConfigTargetTest.php b/core/tests/Drupal/Tests/Core/Form/ConfigTargetTest.php
index ba24a8515410..a2588857886d 100644
--- a/core/tests/Drupal/Tests/Core/Form/ConfigTargetTest.php
+++ b/core/tests/Drupal/Tests/Core/Form/ConfigTargetTest.php
@@ -114,7 +114,7 @@ public static function providerTestFormCacheable(): array {
    * @covers ::fromForm
    * @covers ::fromString
    */
-  public function testFromFormString() {
+  public function testFromFormString(): void {
     $form = [
       'group' => [
         '#type' => 'details',
@@ -136,7 +136,7 @@ public function testFromFormString() {
   /**
    * @covers ::fromForm
    */
-  public function testFromFormConfigTarget() {
+  public function testFromFormConfigTarget(): void {
     $form = [
       'test' => [
         '#type' => 'text',
@@ -158,7 +158,7 @@ public function testFromFormConfigTarget() {
    * @covers ::fromForm
    * @dataProvider providerTestFromFormException
    */
-  public function testFromFormException(array $form, array $array_parents, string $exception_message) {
+  public function testFromFormException(array $form, array $array_parents, string $exception_message): void {
     $this->expectException(\LogicException::class);
     $this->expectExceptionMessage($exception_message);
     ConfigTarget::fromForm($array_parents, $form);
diff --git a/core/tests/Drupal/Tests/Core/Form/ConfirmFormHelperTest.php b/core/tests/Drupal/Tests/Core/Form/ConfirmFormHelperTest.php
index aa597ec73bd3..449964fd5730 100644
--- a/core/tests/Drupal/Tests/Core/Form/ConfirmFormHelperTest.php
+++ b/core/tests/Drupal/Tests/Core/Form/ConfirmFormHelperTest.php
@@ -21,7 +21,7 @@ class ConfirmFormHelperTest extends UnitTestCase {
    *
    * @covers ::buildCancelLink
    */
-  public function testCancelLinkTitle() {
+  public function testCancelLinkTitle(): void {
     $cancel_text = 'Cancel text';
     $form = $this->createMock('Drupal\Core\Form\ConfirmFormInterface');
     $form->expects($this->any())
@@ -38,7 +38,7 @@ public function testCancelLinkTitle() {
    *
    * @covers ::buildCancelLink
    */
-  public function testCancelLinkRoute() {
+  public function testCancelLinkRoute(): void {
     $route_name = 'foo_bar';
     $cancel_route = new Url($route_name);
     $form = $this->createMock('Drupal\Core\Form\ConfirmFormInterface');
@@ -55,7 +55,7 @@ public function testCancelLinkRoute() {
    *
    * @covers ::buildCancelLink
    */
-  public function testCancelLinkRouteWithParams() {
+  public function testCancelLinkRouteWithParams(): void {
     $expected = Url::fromRoute('foo_bar.baz', ['baz' => 'banana'], ['absolute' => TRUE]);
     $form = $this->createMock('Drupal\Core\Form\ConfirmFormInterface');
     $form->expects($this->any())
@@ -71,7 +71,7 @@ public function testCancelLinkRouteWithParams() {
    *
    * @covers ::buildCancelLink
    */
-  public function testCancelLinkRouteWithUrl() {
+  public function testCancelLinkRouteWithUrl(): void {
     $cancel_route = new Url(
       'foo_bar.baz', [
         'baz' => 'banana',
@@ -95,7 +95,7 @@ public function testCancelLinkRouteWithUrl() {
    * @covers ::buildCancelLink
    * @dataProvider providerTestCancelLinkDestination
    */
-  public function testCancelLinkDestination($destination) {
+  public function testCancelLinkDestination($destination): void {
     $query = ['destination' => $destination];
     $form = $this->createMock('Drupal\Core\Form\ConfirmFormInterface');
 
diff --git a/core/tests/Drupal/Tests/Core/Form/EventSubscriber/FormAjaxSubscriberTest.php b/core/tests/Drupal/Tests/Core/Form/EventSubscriber/FormAjaxSubscriberTest.php
index 32b928b18961..4aea9f25bed8 100644
--- a/core/tests/Drupal/Tests/Core/Form/EventSubscriber/FormAjaxSubscriberTest.php
+++ b/core/tests/Drupal/Tests/Core/Form/EventSubscriber/FormAjaxSubscriberTest.php
@@ -76,7 +76,7 @@ protected function setUp(): void {
   /**
    * @covers ::onException
    */
-  public function testOnException() {
+  public function testOnException(): void {
     $form = ['#type' => 'form', '#build_id' => 'the_build_id'];
     $expected_form = $form + [
       '#build_id_old' => 'the_build_id',
@@ -101,7 +101,7 @@ public function testOnException() {
   /**
    * @covers ::onException
    */
-  public function testOnExceptionNewBuildId() {
+  public function testOnExceptionNewBuildId(): void {
     $form = ['#type' => 'form', '#build_id' => 'the_build_id'];
     $expected_form = $form + [
       '#build_id_old' => 'a_new_build_id',
@@ -126,7 +126,7 @@ public function testOnExceptionNewBuildId() {
   /**
    * @covers ::onException
    */
-  public function testOnExceptionOtherClass() {
+  public function testOnExceptionOtherClass(): void {
     $request = new Request();
     $exception = new \Exception();
 
@@ -139,7 +139,7 @@ public function testOnExceptionOtherClass() {
   /**
    * @covers ::onException
    */
-  public function testOnExceptionResponseBuilderException() {
+  public function testOnExceptionResponseBuilderException(): void {
     $form = ['#type' => 'form', '#build_id' => 'the_build_id'];
     $expected_form = $form + [
       '#build_id_old' => 'the_build_id',
@@ -162,7 +162,7 @@ public function testOnExceptionResponseBuilderException() {
   /**
    * @covers ::onException
    */
-  public function testOnExceptionBrokenPostRequest() {
+  public function testOnExceptionBrokenPostRequest(): void {
     $this->formAjaxResponseBuilder->expects($this->never())
       ->method('buildResponse');
 
@@ -209,7 +209,7 @@ public function testOnExceptionBrokenPostRequest() {
    * @covers ::onException
    * @covers ::getFormAjaxException
    */
-  public function testOnExceptionNestedException() {
+  public function testOnExceptionNestedException(): void {
     $form = ['#type' => 'form', '#build_id' => 'the_build_id'];
     $expected_form = $form + [
       '#build_id_old' => 'the_build_id',
@@ -233,7 +233,7 @@ public function testOnExceptionNestedException() {
   /**
    * @covers ::getFormAjaxException
    */
-  public function testOnExceptionNestedWrongException() {
+  public function testOnExceptionNestedWrongException(): void {
     $nested_exception = new \Exception();
     $exception = new \Exception('', 0, $nested_exception);
     $request = new Request();
diff --git a/core/tests/Drupal/Tests/Core/Form/FormAjaxResponseBuilderTest.php b/core/tests/Drupal/Tests/Core/Form/FormAjaxResponseBuilderTest.php
index 67ea24184478..92b91a582d60 100644
--- a/core/tests/Drupal/Tests/Core/Form/FormAjaxResponseBuilderTest.php
+++ b/core/tests/Drupal/Tests/Core/Form/FormAjaxResponseBuilderTest.php
@@ -47,7 +47,7 @@ protected function setUp(): void {
   /**
    * @covers ::buildResponse
    */
-  public function testBuildResponseNoTriggeringElement() {
+  public function testBuildResponseNoTriggeringElement(): void {
     $this->renderer->expects($this->never())
       ->method('renderResponse');
 
@@ -63,7 +63,7 @@ public function testBuildResponseNoTriggeringElement() {
   /**
    * @covers ::buildResponse
    */
-  public function testBuildResponseNoCallable() {
+  public function testBuildResponseNoCallable(): void {
     $this->renderer->expects($this->never())
       ->method('renderResponse');
 
@@ -81,7 +81,7 @@ public function testBuildResponseNoCallable() {
   /**
    * @covers ::buildResponse
    */
-  public function testBuildResponseRenderArray() {
+  public function testBuildResponseRenderArray(): void {
     $triggering_element = [
       '#ajax' => [
         'callback' => function (array $form, FormStateInterface $form_state) {
@@ -112,7 +112,7 @@ public function testBuildResponseRenderArray() {
   /**
    * @covers ::buildResponse
    */
-  public function testBuildResponseResponse() {
+  public function testBuildResponseResponse(): void {
     $triggering_element = [
       '#ajax' => [
         'callback' => function (array $form, FormStateInterface $form_state) {
@@ -137,7 +137,7 @@ public function testBuildResponseResponse() {
   /**
    * @covers ::buildResponse
    */
-  public function testBuildResponseWithCommands() {
+  public function testBuildResponseWithCommands(): void {
     $triggering_element = [
       '#ajax' => [
         'callback' => function (array $form, FormStateInterface $form_state) {
@@ -170,7 +170,7 @@ public function testBuildResponseWithCommands() {
   /**
    * @covers ::buildResponse
    */
-  public function testBuildResponseWithUpdateCommand() {
+  public function testBuildResponseWithUpdateCommand(): void {
     $triggering_element = [
       '#ajax' => [
         'callback' => function (array $form, FormStateInterface $form_state) {
diff --git a/core/tests/Drupal/Tests/Core/Form/FormBuilderTest.php b/core/tests/Drupal/Tests/Core/Form/FormBuilderTest.php
index 7e6590b797de..3137681d18e6 100644
--- a/core/tests/Drupal/Tests/Core/Form/FormBuilderTest.php
+++ b/core/tests/Drupal/Tests/Core/Form/FormBuilderTest.php
@@ -55,7 +55,7 @@ protected function setUp(): void {
    *
    * @covers ::getFormId
    */
-  public function testGetFormIdWithString() {
+  public function testGetFormIdWithString(): void {
     $form_arg = 'foo';
     $form_state = new FormState();
     $this->expectException(\InvalidArgumentException::class);
@@ -66,7 +66,7 @@ public function testGetFormIdWithString() {
   /**
    * @covers ::getFormId
    */
-  public function testGetFormIdWithNonFormClass() {
+  public function testGetFormIdWithNonFormClass(): void {
     $form_arg = \stdClass::class;
     $form_state = new FormState();
     $this->expectException(\InvalidArgumentException::class);
@@ -77,7 +77,7 @@ public function testGetFormIdWithNonFormClass() {
   /**
    * Tests the getFormId() method with a class name form ID.
    */
-  public function testGetFormIdWithClassName() {
+  public function testGetFormIdWithClassName(): void {
     $form_arg = 'Drupal\Tests\Core\Form\TestForm';
 
     $form_state = new FormState();
@@ -90,7 +90,7 @@ public function testGetFormIdWithClassName() {
   /**
    * Tests the getFormId() method with an injected class name form ID.
    */
-  public function testGetFormIdWithInjectedClassName() {
+  public function testGetFormIdWithInjectedClassName(): void {
     $container = $this->createMock('Symfony\Component\DependencyInjection\ContainerInterface');
     \Drupal::setContainer($container);
 
@@ -106,7 +106,7 @@ public function testGetFormIdWithInjectedClassName() {
   /**
    * Tests the getFormId() method with a form object.
    */
-  public function testGetFormIdWithObject() {
+  public function testGetFormIdWithObject(): void {
     $expected_form_id = 'my_module_form_id';
 
     $form_arg = $this->getMockForm($expected_form_id);
@@ -121,7 +121,7 @@ public function testGetFormIdWithObject() {
   /**
    * Tests the getFormId() method with a base form object.
    */
-  public function testGetFormIdWithBaseForm() {
+  public function testGetFormIdWithBaseForm(): void {
     $expected_form_id = 'my_module_form_id';
     $base_form_id = 'my_module';
 
@@ -146,7 +146,7 @@ public function testGetFormIdWithBaseForm() {
    *
    * @dataProvider formStateResponseProvider
    */
-  public function testHandleFormStateResponse($class, $form_state_key) {
+  public function testHandleFormStateResponse($class, $form_state_key): void {
     $form_id = 'test_form_id';
     $expected_form = $form_id();
 
@@ -187,7 +187,7 @@ public static function formStateResponseProvider() {
   /**
    * Tests the handling of a redirect when FormStateInterface::$response exists.
    */
-  public function testHandleRedirectWithResponse() {
+  public function testHandleRedirectWithResponse(): void {
     $form_id = 'test_form_id';
     $expected_form = $form_id();
 
@@ -226,7 +226,7 @@ public function testHandleRedirectWithResponse() {
   /**
    * Tests the getForm() method with a string based form ID.
    */
-  public function testGetFormWithString() {
+  public function testGetFormWithString(): void {
     $form_id = 'test_form_id';
     $this->expectException(\InvalidArgumentException::class);
     $this->expectExceptionMessage('The form class test_form_id could not be found or loaded.');
@@ -236,7 +236,7 @@ public function testGetFormWithString() {
   /**
    * Tests the getForm() method with a form object.
    */
-  public function testGetFormWithObject() {
+  public function testGetFormWithObject(): void {
     $form_id = 'test_form_id';
     $expected_form = $form_id();
 
@@ -250,7 +250,7 @@ public function testGetFormWithObject() {
   /**
    * Tests the getForm() method with a class name based form ID.
    */
-  public function testGetFormWithClassString() {
+  public function testGetFormWithClassString(): void {
     $form_id = '\Drupal\Tests\Core\Form\TestForm';
     $object = new TestForm();
     $form = [];
@@ -265,7 +265,7 @@ public function testGetFormWithClassString() {
   /**
    * Tests the buildForm() method with a string based form ID.
    */
-  public function testBuildFormWithString() {
+  public function testBuildFormWithString(): void {
     $form_id = 'test_form_id';
     $this->expectException(\InvalidArgumentException::class);
     $this->expectExceptionMessage('The form class test_form_id could not be found or loaded.');
@@ -275,7 +275,7 @@ public function testBuildFormWithString() {
   /**
    * Tests the buildForm() method with a class name based form ID.
    */
-  public function testBuildFormWithClassString() {
+  public function testBuildFormWithClassString(): void {
     $form_id = '\Drupal\Tests\Core\Form\TestForm';
     $object = new TestForm();
     $form = [];
@@ -290,7 +290,7 @@ public function testBuildFormWithClassString() {
   /**
    * Tests the buildForm() method with a form object.
    */
-  public function testBuildFormWithObject() {
+  public function testBuildFormWithObject(): void {
     $form_id = 'test_form_id';
     $expected_form = $form_id();
 
@@ -315,7 +315,7 @@ public function testBuildFormWithObject() {
    *
    * @dataProvider providerTestBuildFormWithTriggeringElement
    */
-  public function testBuildFormWithTriggeringElement($element_value, $input_value) {
+  public function testBuildFormWithTriggeringElement($element_value, $input_value): void {
     $form_id = 'test_form_id';
     $expected_form = $form_id();
 
@@ -353,7 +353,7 @@ public static function providerTestBuildFormWithTriggeringElement() {
   /**
    * Tests the rebuildForm() method for a POST submission.
    */
-  public function testRebuildForm() {
+  public function testRebuildForm(): void {
     $form_id = 'test_form_id';
     $expected_form = $form_id();
 
@@ -393,7 +393,7 @@ public function testRebuildForm() {
   /**
    * Tests the rebuildForm() method for a GET submission.
    */
-  public function testRebuildFormOnGetRequest() {
+  public function testRebuildFormOnGetRequest(): void {
     $form_id = 'test_form_id';
     $expected_form = $form_id();
 
@@ -431,7 +431,7 @@ public function testRebuildFormOnGetRequest() {
   /**
    * Tests the getCache() method.
    */
-  public function testGetCache() {
+  public function testGetCache(): void {
     $form_id = 'test_form_id';
     $expected_form = $form_id();
     $expected_form['#token'] = FALSE;
@@ -474,7 +474,7 @@ public function testGetCache() {
   /**
    * Tests that HTML IDs are unique when rebuilding a form with errors.
    */
-  public function testUniqueHtmlId() {
+  public function testUniqueHtmlId(): void {
     $form_id = 'test_form_id';
     $expected_form = $form_id();
     $expected_form['test']['#required'] = TRUE;
@@ -500,7 +500,7 @@ public function testUniqueHtmlId() {
   /**
    * Tests that HTML IDs are unique between 2 forms with the same element names.
    */
-  public function testUniqueElementHtmlId() {
+  public function testUniqueElementHtmlId(): void {
     $form_id_1 = 'test_form_id';
     $form_id_2 = 'test_form_id_2';
     $expected_form = $form_id_1();
@@ -530,7 +530,7 @@ public function testUniqueElementHtmlId() {
   /**
    * Tests that a cached form is deleted after submit.
    */
-  public function testFormCacheDeletionCached() {
+  public function testFormCacheDeletionCached(): void {
     $form_id = 'test_form_id';
     $form_build_id = $this->randomMachineName();
 
@@ -557,7 +557,7 @@ public function testFormCacheDeletionCached() {
   /**
    * Tests that an uncached form does not trigger cache set or delete.
    */
-  public function testFormCacheDeletionUncached() {
+  public function testFormCacheDeletionUncached(): void {
     $form_id = 'test_form_id';
     $form_build_id = $this->randomMachineName();
 
@@ -575,7 +575,7 @@ public function testFormCacheDeletionUncached() {
   /**
    * @covers ::buildForm
    */
-  public function testExceededFileSize() {
+  public function testExceededFileSize(): void {
     $request = new Request([FormBuilderInterface::AJAX_FORM_REQUEST => TRUE]);
     $request->setSession(new Session(new MockArraySessionStorage()));
     $request_stack = new RequestStack();
@@ -649,7 +649,7 @@ public function testGetAjaxRequest(): void {
    *
    * @dataProvider providerTestChildAccessInheritance
    */
-  public function testChildAccessInheritance($element, $access_checks) {
+  public function testChildAccessInheritance($element, $access_checks): void {
     $form_arg = new TestFormWithPredefinedForm();
     $form_arg->setForm($element);
 
@@ -812,7 +812,7 @@ public static function providerTestChildAccessInheritance() {
    *
    * @dataProvider providerTestValueCallableIsSafe
    */
-  public function testValueCallableIsSafe($callback, $expected) {
+  public function testValueCallableIsSafe($callback, $expected): void {
     $method = new \ReflectionMethod(FormBuilder::class, 'valueCallableIsSafe');
     $is_safe = $method->invoke($this->formBuilder, $callback);
     $this->assertSame($expected, $is_safe);
@@ -848,7 +848,7 @@ function () {},
    *
    * @dataProvider providerTestInvalidToken
    */
-  public function testInvalidToken($expected, $valid_token, $user_is_authenticated) {
+  public function testInvalidToken($expected, $valid_token, $user_is_authenticated): void {
     $form_token = 'the_form_token';
     $form_id = 'test_form_id';
 
@@ -909,7 +909,7 @@ public static function providerTestInvalidToken() {
    *
    * @dataProvider providerTestFormTokenCacheability
    */
-  public function testFormTokenCacheability($token, $is_authenticated, $expected_form_cacheability, $expected_token_cacheability, $method) {
+  public function testFormTokenCacheability($token, $is_authenticated, $expected_form_cacheability, $expected_token_cacheability, $method): void {
     $user = $this->prophesize(AccountProxyInterface::class);
     $user->isAuthenticated()
       ->willReturn($is_authenticated);
diff --git a/core/tests/Drupal/Tests/Core/Form/FormCacheTest.php b/core/tests/Drupal/Tests/Core/Form/FormCacheTest.php
index e83d5705c443..b59fb9ce55e8 100644
--- a/core/tests/Drupal/Tests/Core/Form/FormCacheTest.php
+++ b/core/tests/Drupal/Tests/Core/Form/FormCacheTest.php
@@ -117,7 +117,7 @@ protected function setUp(): void {
   /**
    * @covers ::getCache
    */
-  public function testGetCacheValidToken() {
+  public function testGetCacheValidToken(): void {
     $form_build_id = 'the_form_build_id';
     $form_state = new FormState();
     $cache_token = 'the_cache_token';
@@ -141,7 +141,7 @@ public function testGetCacheValidToken() {
   /**
    * @covers ::getCache
    */
-  public function testGetCacheInvalidToken() {
+  public function testGetCacheInvalidToken(): void {
     $form_build_id = 'the_form_build_id';
     $form_state = new FormState();
     $cache_token = 'the_cache_token';
@@ -165,7 +165,7 @@ public function testGetCacheInvalidToken() {
   /**
    * @covers ::getCache
    */
-  public function testGetCacheAnonUser() {
+  public function testGetCacheAnonUser(): void {
     $form_build_id = 'the_form_build_id';
     $form_state = new FormState();
     $cached_form = ['#cache_token' => NULL];
@@ -187,7 +187,7 @@ public function testGetCacheAnonUser() {
   /**
    * @covers ::getCache
    */
-  public function testGetCacheAuthUser() {
+  public function testGetCacheAuthUser(): void {
     $form_build_id = 'the_form_build_id';
     $form_state = new FormState();
     $cached_form = ['#cache_token' => NULL];
@@ -207,7 +207,7 @@ public function testGetCacheAuthUser() {
   /**
    * @covers ::getCache
    */
-  public function testGetCacheNoForm() {
+  public function testGetCacheNoForm(): void {
     $form_build_id = 'the_form_build_id';
     $form_state = new FormState();
     $cached_form = NULL;
@@ -226,7 +226,7 @@ public function testGetCacheNoForm() {
   /**
    * @covers ::getCache
    */
-  public function testGetCacheImmutableForm() {
+  public function testGetCacheImmutableForm(): void {
     $form_build_id = 'the_form_build_id';
     $form_state = (new FormState())
       ->addBuildInfo('immutable', TRUE);
@@ -252,7 +252,7 @@ public function testGetCacheImmutableForm() {
   /**
    * @covers ::loadCachedFormState
    */
-  public function testLoadCachedFormState() {
+  public function testLoadCachedFormState(): void {
     $form_build_id = 'the_form_build_id';
     $form_state = new FormState();
     $cached_form = ['#cache_token' => NULL];
@@ -278,7 +278,7 @@ public function testLoadCachedFormState() {
   /**
    * @covers ::loadCachedFormState
    */
-  public function testLoadCachedFormStateWithFiles() {
+  public function testLoadCachedFormStateWithFiles(): void {
     $form_build_id = 'the_form_build_id';
     $form_state = new FormState();
     $cached_form = ['#cache_token' => NULL];
@@ -318,7 +318,7 @@ public function testLoadCachedFormStateWithFiles() {
   /**
    * @covers ::setCache
    */
-  public function testSetCacheWithForm() {
+  public function testSetCacheWithForm(): void {
     $form_build_id = 'the_form_build_id';
     $form = [
       '#form_id' => 'the_form_id',
@@ -340,7 +340,7 @@ public function testSetCacheWithForm() {
   /**
    * @covers ::setCache
    */
-  public function testSetCacheWithoutForm() {
+  public function testSetCacheWithoutForm(): void {
     $form_build_id = 'the_form_build_id';
     $form = NULL;
     $form_state = new FormState();
@@ -359,7 +359,7 @@ public function testSetCacheWithoutForm() {
   /**
    * @covers ::setCache
    */
-  public function testSetCacheAuthUser() {
+  public function testSetCacheAuthUser(): void {
     $form_build_id = 'the_form_build_id';
     $form = [];
     $form_state = new FormState();
@@ -389,7 +389,7 @@ public function testSetCacheAuthUser() {
   /**
    * @covers ::setCache
    */
-  public function testSetCacheBuildIdMismatch() {
+  public function testSetCacheBuildIdMismatch(): void {
     $form_build_id = 'the_form_build_id';
     $form = [
       '#form_id' => 'the_form_id',
@@ -410,7 +410,7 @@ public function testSetCacheBuildIdMismatch() {
   /**
    * @covers ::deleteCache
    */
-  public function testDeleteCache() {
+  public function testDeleteCache(): void {
     $form_build_id = 'the_form_build_id';
 
     $this->formCacheStore->expects($this->once())
diff --git a/core/tests/Drupal/Tests/Core/Form/FormElementHelperTest.php b/core/tests/Drupal/Tests/Core/Form/FormElementHelperTest.php
index 7eedb6d440b8..535623e1f607 100644
--- a/core/tests/Drupal/Tests/Core/Form/FormElementHelperTest.php
+++ b/core/tests/Drupal/Tests/Core/Form/FormElementHelperTest.php
@@ -24,7 +24,7 @@ class FormElementHelperTest extends UnitTestCase {
    *
    * @dataProvider getElementByNameProvider
    */
-  public function testGetElementByName($name, $form, $expected) {
+  public function testGetElementByName($name, $form, $expected): void {
     $this->assertSame($expected, FormElementHelper::getElementByName($name, $form));
   }
 
@@ -109,7 +109,7 @@ public static function getElementByNameProvider() {
    *
    * @dataProvider getElementTitleProvider
    */
-  public function testGetElementTitle($name, $form, $expected) {
+  public function testGetElementTitle($name, $form, $expected): void {
     $element = FormElementHelper::getElementByName($name, $form);
     $this->assertSame($expected, FormElementHelper::getElementTitle($element));
   }
diff --git a/core/tests/Drupal/Tests/Core/Form/FormErrorHandlerTest.php b/core/tests/Drupal/Tests/Core/Form/FormErrorHandlerTest.php
index f60ab6d0dff6..e319d52b1174 100644
--- a/core/tests/Drupal/Tests/Core/Form/FormErrorHandlerTest.php
+++ b/core/tests/Drupal/Tests/Core/Form/FormErrorHandlerTest.php
@@ -49,7 +49,7 @@ protected function setUp(): void {
    * @covers ::handleFormErrors
    * @covers ::displayErrorMessages
    */
-  public function testDisplayErrorMessages() {
+  public function testDisplayErrorMessages(): void {
     $messages = [
       'invalid',
       'invalid',
@@ -125,7 +125,7 @@ public function testDisplayErrorMessages() {
    * @covers ::handleFormErrors
    * @covers ::setElementErrorsFromFormState
    */
-  public function testSetElementErrorsFromFormState() {
+  public function testSetElementErrorsFromFormState(): void {
     $form = [
       '#parents' => [],
       '#array_parents' => [],
diff --git a/core/tests/Drupal/Tests/Core/Form/FormHelperTest.php b/core/tests/Drupal/Tests/Core/Form/FormHelperTest.php
index e39c3973a32a..2da73b861e10 100644
--- a/core/tests/Drupal/Tests/Core/Form/FormHelperTest.php
+++ b/core/tests/Drupal/Tests/Core/Form/FormHelperTest.php
@@ -19,7 +19,7 @@ class FormHelperTest extends UnitTestCase {
    *
    * @covers ::rewriteStatesSelector
    */
-  public function testRewriteStatesSelector() {
+  public function testRewriteStatesSelector(): void {
 
     // Simple selectors.
     $value = ['value' => 'medium'];
@@ -89,7 +89,7 @@ public function testRewriteStatesSelector() {
    * @covers ::processStates
    * @dataProvider providerElements
    */
-  public function testProcessStates($elements, $key) {
+  public function testProcessStates($elements, $key): void {
     $json = Json::encode($elements['#states']);
     FormHelper::processStates($elements);
     $this->assertEquals(['core/drupal.states'], $elements['#attached']['library']);
diff --git a/core/tests/Drupal/Tests/Core/Form/FormStateDecoratorBaseTest.php b/core/tests/Drupal/Tests/Core/Form/FormStateDecoratorBaseTest.php
index 3924855fd97d..0594c733b157 100644
--- a/core/tests/Drupal/Tests/Core/Form/FormStateDecoratorBaseTest.php
+++ b/core/tests/Drupal/Tests/Core/Form/FormStateDecoratorBaseTest.php
@@ -58,7 +58,7 @@ public static function providerSingleBooleanArgument() {
   /**
    * @covers ::setFormState
    */
-  public function testSetFormState() {
+  public function testSetFormState(): void {
     $form_state_additions = [
       'foo' => 'bar',
     ];
@@ -74,7 +74,7 @@ public function testSetFormState() {
    *
    * @dataProvider providerSingleBooleanArgument
    */
-  public function testSetAlwaysProcess($always_process) {
+  public function testSetAlwaysProcess($always_process): void {
     $this->decoratedFormState->setAlwaysProcess($always_process)
       ->shouldBeCalled();
 
@@ -86,7 +86,7 @@ public function testSetAlwaysProcess($always_process) {
    *
    * @dataProvider providerSingleBooleanArgument
    */
-  public function testGetAlwaysProcess($always_process) {
+  public function testGetAlwaysProcess($always_process): void {
     $this->decoratedFormState->getAlwaysProcess()
       ->willReturn($always_process)
       ->shouldBeCalled();
@@ -97,7 +97,7 @@ public function testGetAlwaysProcess($always_process) {
   /**
    * @covers ::setButtons
    */
-  public function testSetButtons() {
+  public function testSetButtons(): void {
     $buttons = [
       'FOO' => 'BAR',
     ];
@@ -111,7 +111,7 @@ public function testSetButtons() {
   /**
    * @covers ::getButtons
    */
-  public function testGetButtons() {
+  public function testGetButtons(): void {
     $buttons = [
       'FOO' => 'BAR',
     ];
@@ -128,7 +128,7 @@ public function testGetButtons() {
    *
    * @dataProvider providerSingleBooleanArgument
    */
-  public function testSetCached($cache) {
+  public function testSetCached($cache): void {
     $this->decoratedFormState->setCached($cache)
       ->shouldBeCalled();
 
@@ -140,7 +140,7 @@ public function testSetCached($cache) {
    *
    * @dataProvider providerSingleBooleanArgument
    */
-  public function testIsCached($cache) {
+  public function testIsCached($cache): void {
     $this->decoratedFormState->isCached()
       ->willReturn($cache)
       ->shouldBeCalled();
@@ -152,7 +152,7 @@ public function testIsCached($cache) {
    *
    * @dataProvider providerSingleBooleanArgument
    */
-  public function testSetCachedWithLogicException($cache) {
+  public function testSetCachedWithLogicException($cache): void {
     $this->decoratedFormState->setCached($cache)
       ->willThrow(\LogicException::class);
     $this->expectException(\LogicException::class);
@@ -162,7 +162,7 @@ public function testSetCachedWithLogicException($cache) {
   /**
    * @covers ::disableCache
    */
-  public function testDisableCache() {
+  public function testDisableCache(): void {
     $this->decoratedFormState->disableCache()
       ->shouldBeCalled();
 
@@ -172,7 +172,7 @@ public function testDisableCache() {
   /**
    * @covers ::setExecuted
    */
-  public function testSetExecuted() {
+  public function testSetExecuted(): void {
     $this->decoratedFormState->setExecuted()
       ->shouldBeCalled();
 
@@ -188,7 +188,7 @@ public function testSetExecuted() {
    *   Any valid value for \Drupal\Core\Form\FormStateInterface::isExecuted()'s
    *   return value.
    */
-  public function testIsExecuted($executed) {
+  public function testIsExecuted($executed): void {
     $this->decoratedFormState->isExecuted()
       ->willReturn($executed)
       ->shouldBeCalled();
@@ -199,7 +199,7 @@ public function testIsExecuted($executed) {
   /**
    * @covers ::setGroups
    */
-  public function testSetGroups() {
+  public function testSetGroups(): void {
     $groups = [
       'FOO' => 'BAR',
     ];
@@ -213,7 +213,7 @@ public function testSetGroups() {
   /**
    * @covers ::getGroups
    */
-  public function testGetGroups() {
+  public function testGetGroups(): void {
     $groups = [
       'FOO' => 'BAR',
     ];
@@ -235,7 +235,7 @@ public function testGetGroups() {
    *
    * @dataProvider providerSingleBooleanArgument
    */
-  public function testSetHasFileElement($has_file_element) {
+  public function testSetHasFileElement($has_file_element): void {
     $this->decoratedFormState->setHasFileElement($has_file_element)
       ->shouldBeCalled();
 
@@ -247,7 +247,7 @@ public function testSetHasFileElement($has_file_element) {
    *
    * @dataProvider providerSingleBooleanArgument
    */
-  public function testHasFileElement($has_file_element) {
+  public function testHasFileElement($has_file_element): void {
     $this->decoratedFormState->hasFileElement()
       ->willReturn($has_file_element)
       ->shouldBeCalled();
@@ -260,7 +260,7 @@ public function testHasFileElement($has_file_element) {
    *
    * @dataProvider providerLimitValidationErrors
    */
-  public function testSetLimitValidationErrors($limit_validation_errors) {
+  public function testSetLimitValidationErrors($limit_validation_errors): void {
     $this->decoratedFormState->setLimitValidationErrors($limit_validation_errors)
       ->shouldBeCalled();
 
@@ -272,7 +272,7 @@ public function testSetLimitValidationErrors($limit_validation_errors) {
    *
    * @dataProvider providerLimitValidationErrors
    */
-  public function testGetLimitValidationErrors($limit_validation_errors) {
+  public function testGetLimitValidationErrors($limit_validation_errors): void {
     $this->decoratedFormState->getLimitValidationErrors()
       ->willReturn($limit_validation_errors)
       ->shouldBeCalled();
@@ -299,7 +299,7 @@ public static function providerLimitValidationErrors() {
    *
    * @dataProvider providerSingleBooleanArgument
    */
-  public function testSetMethod($method) {
+  public function testSetMethod($method): void {
     $this->decoratedFormState->setMethod($method)
       ->shouldBeCalled();
 
@@ -311,7 +311,7 @@ public function testSetMethod($method) {
    *
    * @dataProvider providerIsMethodType
    */
-  public function testIsMethodType($expected_return_value, $method_type) {
+  public function testIsMethodType($expected_return_value, $method_type): void {
     $this->decoratedFormState->isMethodType($method_type)
       ->willReturn($expected_return_value)
       ->shouldBeCalled();
@@ -336,7 +336,7 @@ public static function providerIsMethodType() {
    *
    * @dataProvider providerSetRequestMethod
    */
-  public function testSetRequestMethod($method) {
+  public function testSetRequestMethod($method): void {
     $this->decoratedFormState->setRequestMethod($method)
       ->shouldBeCalled();
 
@@ -358,7 +358,7 @@ public static function providerSetRequestMethod() {
    *
    * @dataProvider providerSingleBooleanArgument
    */
-  public function testSetValidationEnforced($must_validate) {
+  public function testSetValidationEnforced($must_validate): void {
     $this->decoratedFormState->setValidationEnforced($must_validate)
       ->shouldBeCalled();
 
@@ -370,7 +370,7 @@ public function testSetValidationEnforced($must_validate) {
    *
    * @dataProvider providerSingleBooleanArgument
    */
-  public function testIsValidationEnforced($must_validate) {
+  public function testIsValidationEnforced($must_validate): void {
     $this->decoratedFormState->isValidationEnforced()
       ->willReturn($must_validate)
       ->shouldBeCalled();
@@ -383,7 +383,7 @@ public function testIsValidationEnforced($must_validate) {
    *
    * @dataProvider providerSingleBooleanArgument
    */
-  public function testDisableRedirect($no_redirect) {
+  public function testDisableRedirect($no_redirect): void {
     $this->decoratedFormState->disableRedirect($no_redirect)
       ->shouldBeCalled();
 
@@ -395,7 +395,7 @@ public function testDisableRedirect($no_redirect) {
    *
    * @dataProvider providerSingleBooleanArgument
    */
-  public function testIsRedirectDisabled($no_redirect) {
+  public function testIsRedirectDisabled($no_redirect): void {
     $this->decoratedFormState->isRedirectDisabled()
       ->willReturn($no_redirect)
       ->shouldBeCalled();
@@ -408,7 +408,7 @@ public function testIsRedirectDisabled($no_redirect) {
    *
    * @dataProvider providerSingleBooleanArgument
    */
-  public function testSetProcessInput($process_input) {
+  public function testSetProcessInput($process_input): void {
     $this->decoratedFormState->setProcessInput($process_input)
       ->shouldBeCalled();
 
@@ -420,7 +420,7 @@ public function testSetProcessInput($process_input) {
    *
    * @dataProvider providerSingleBooleanArgument
    */
-  public function testIsProcessingInput($process_input) {
+  public function testIsProcessingInput($process_input): void {
     $this->decoratedFormState->isProcessingInput()
       ->willReturn($process_input)
       ->shouldBeCalled();
@@ -433,7 +433,7 @@ public function testIsProcessingInput($process_input) {
    *
    * @dataProvider providerSingleBooleanArgument
    */
-  public function testSetProgrammed($programmed) {
+  public function testSetProgrammed($programmed): void {
     $this->decoratedFormState->setProgrammed($programmed)
       ->shouldBeCalled();
 
@@ -445,7 +445,7 @@ public function testSetProgrammed($programmed) {
    *
    * @dataProvider providerSingleBooleanArgument
    */
-  public function testIsProgrammed($programmed) {
+  public function testIsProgrammed($programmed): void {
     $this->decoratedFormState->isProgrammed()
       ->willReturn($programmed)
       ->shouldBeCalled();
@@ -458,7 +458,7 @@ public function testIsProgrammed($programmed) {
    *
    * @dataProvider providerSingleBooleanArgument
    */
-  public function testSetProgrammedBypassAccessCheck($programmed_bypass_access_check) {
+  public function testSetProgrammedBypassAccessCheck($programmed_bypass_access_check): void {
     $this->decoratedFormState->setProgrammedBypassAccessCheck($programmed_bypass_access_check)
       ->shouldBeCalled();
 
@@ -470,7 +470,7 @@ public function testSetProgrammedBypassAccessCheck($programmed_bypass_access_che
    *
    * @dataProvider providerSingleBooleanArgument
    */
-  public function testIsBypassingProgrammedAccessChecks($programmed_bypass_access_check) {
+  public function testIsBypassingProgrammedAccessChecks($programmed_bypass_access_check): void {
     $this->decoratedFormState->isBypassingProgrammedAccessChecks()
       ->willReturn($programmed_bypass_access_check)
       ->shouldBeCalled();
@@ -481,7 +481,7 @@ public function testIsBypassingProgrammedAccessChecks($programmed_bypass_access_
   /**
    * @covers ::setRebuildInfo
    */
-  public function testSetRebuildInfo() {
+  public function testSetRebuildInfo(): void {
     $rebuild_info = [
       'FOO' => 'BAR',
     ];
@@ -495,7 +495,7 @@ public function testSetRebuildInfo() {
   /**
    * @covers ::getRebuildInfo
    */
-  public function testGetRebuildInfo() {
+  public function testGetRebuildInfo(): void {
     $rebuild_info = [
       'FOO' => 'BAR',
     ];
@@ -510,7 +510,7 @@ public function testGetRebuildInfo() {
   /**
    * @covers ::addRebuildInfo
    */
-  public function testAddRebuildInfo() {
+  public function testAddRebuildInfo(): void {
     $property = 'FOO';
     $value = 'BAR';
 
@@ -522,7 +522,7 @@ public function testAddRebuildInfo() {
   /**
    * @covers ::setStorage
    */
-  public function testSetStorage() {
+  public function testSetStorage(): void {
     $storage = [
       'FOO' => 'BAR',
     ];
@@ -536,7 +536,7 @@ public function testSetStorage() {
   /**
    * @covers ::getStorage
    */
-  public function testGetStorage() {
+  public function testGetStorage(): void {
     $storage = [
       'FOO' => 'BAR',
     ];
@@ -556,7 +556,7 @@ public function testGetStorage() {
   /**
    * @covers ::setSubmitHandlers
    */
-  public function testSetSubmitHandlers() {
+  public function testSetSubmitHandlers(): void {
     $submit_handlers = [
       'FOO' => 'BAR',
     ];
@@ -570,7 +570,7 @@ public function testSetSubmitHandlers() {
   /**
    * @covers ::getSubmitHandlers
    */
-  public function testGetSubmitHandlers() {
+  public function testGetSubmitHandlers(): void {
     $submit_handlers = [
       'FOO' => 'BAR',
     ];
@@ -585,7 +585,7 @@ public function testGetSubmitHandlers() {
   /**
    * @covers ::setSubmitted
    */
-  public function testSetSubmitted() {
+  public function testSetSubmitted(): void {
     $this->decoratedFormState->setSubmitted()
       ->shouldBeCalled();
 
@@ -602,7 +602,7 @@ public function testSetSubmitted() {
    *   \Drupal\Core\Form\FormStateInterface::isSubmitted()'s return
    *   value.
    */
-  public function testIsSubmitted($submitted) {
+  public function testIsSubmitted($submitted): void {
     $this->decoratedFormState->isSubmitted()
       ->willReturn($submitted);
 
@@ -612,7 +612,7 @@ public function testIsSubmitted($submitted) {
   /**
    * @covers ::setTemporary
    */
-  public function testSetTemporary() {
+  public function testSetTemporary(): void {
     $temporary = [
       'FOO' => 'BAR',
     ];
@@ -626,7 +626,7 @@ public function testSetTemporary() {
   /**
    * @covers ::getTemporary
    */
-  public function testGetTemporary() {
+  public function testGetTemporary(): void {
     $temporary = [
       'FOO' => 'BAR',
     ];
@@ -652,7 +652,7 @@ public function testGetTemporary() {
    *   \Drupal\Core\Form\FormStateInterface::setTemporaryValue()'s $value
    *   argument.
    */
-  public function testSetTemporaryValue($key, $value) {
+  public function testSetTemporaryValue($key, $value): void {
     $this->decoratedFormState->setTemporaryValue($key, $value)
       ->shouldBeCalled();
 
@@ -683,7 +683,7 @@ public static function providerSetTemporaryValue() {
    *   \Drupal\Core\Form\FormStateInterface::getTemporaryValue()'s return
    *   value.
    */
-  public function testGetTemporaryValue($key, $value = NULL) {
+  public function testGetTemporaryValue($key, $value = NULL): void {
     // Use PHPUnit for mocking, because Prophecy cannot mock methods that return
     // by reference. See \Prophecy\Doubler\Generator\Node::getCode().
     $decorated_form_state = $this->createMock(FormStateInterface::class);
@@ -721,7 +721,7 @@ public static function providerGetTemporaryValue() {
    *   \Drupal\Core\Form\FormStateInterface::hasTemporaryValue()'s $key
    *   argument.
    */
-  public function testHasTemporaryValue($exists, $key) {
+  public function testHasTemporaryValue($exists, $key): void {
     $this->decoratedFormState->hasTemporaryValue($key)
       ->willReturn($exists)
       ->shouldBeCalled();
@@ -742,7 +742,7 @@ public static function providerHasTemporaryValue() {
   /**
    * @covers ::setTriggeringElement
    */
-  public function testSetTriggeringElement() {
+  public function testSetTriggeringElement(): void {
     $triggering_element = [
       'FOO' => 'BAR',
     ];
@@ -756,7 +756,7 @@ public function testSetTriggeringElement() {
   /**
    * @covers ::getTriggeringElement
    */
-  public function testGetTriggeringElement() {
+  public function testGetTriggeringElement(): void {
     $triggering_element = [
       'FOO' => 'BAR',
     ];
@@ -776,7 +776,7 @@ public function testGetTriggeringElement() {
   /**
    * @covers ::setValidateHandlers
    */
-  public function testSetValidateHandlers() {
+  public function testSetValidateHandlers(): void {
     $validate_handlers = [
       'FOO' => 'BAR',
     ];
@@ -790,7 +790,7 @@ public function testSetValidateHandlers() {
   /**
    * @covers ::getValidateHandlers
    */
-  public function testGetValidateHandlers() {
+  public function testGetValidateHandlers(): void {
     $validate_handlers = [
       'FOO' => 'BAR',
     ];
@@ -812,7 +812,7 @@ public function testGetValidateHandlers() {
    *   \Drupal\Core\Form\FormStateInterface::setValidationComplete()'s $complete
    *   argument.
    */
-  public function testSetValidationComplete($complete) {
+  public function testSetValidationComplete($complete): void {
     $this->decoratedFormState->setValidationComplete($complete)
       ->shouldBeCalled();
 
@@ -829,7 +829,7 @@ public function testSetValidationComplete($complete) {
    *   \Drupal\Core\Form\FormStateInterface::isValidationComplete()'s return
    *   value.
    */
-  public function testIsValidationComplete($complete) {
+  public function testIsValidationComplete($complete): void {
     $this->decoratedFormState->isValidationComplete()
       ->willReturn($complete)
       ->shouldBeCalled();
@@ -855,7 +855,7 @@ public function testIsValidationComplete($complete) {
    *   Any valid value for \Drupal\Core\Form\FormStateInterface::loadInclude()'s
    *   $name argument.
    */
-  public function testLoadInclude($expected, $module, $type, $name) {
+  public function testLoadInclude($expected, $module, $type, $name): void {
     $this->decoratedFormState->loadInclude($module, $type, $name)
       ->willReturn($expected)
       ->shouldBeCalled();
@@ -881,7 +881,7 @@ public static function providerLoadInclude() {
   /**
    * @covers ::getCacheableArray
    */
-  public function testGetCacheableArray() {
+  public function testGetCacheableArray(): void {
     $cacheable_array = [
       'foo' => 'bar',
     ];
@@ -896,7 +896,7 @@ public function testGetCacheableArray() {
   /**
    * @covers ::setCompleteForm
    */
-  public function testSetCompleteForm() {
+  public function testSetCompleteForm(): void {
     $complete_form = [
       'FOO' => 'BAR',
     ];
@@ -910,7 +910,7 @@ public function testSetCompleteForm() {
   /**
    * @covers ::getCompleteForm
    */
-  public function testGetCompleteForm() {
+  public function testGetCompleteForm(): void {
     $complete_form = [
       'FOO' => 'BAR',
     ];
@@ -940,7 +940,7 @@ public function testGetCompleteForm() {
    *   Any valid value for \Drupal\Core\Form\FormStateInterface::set()'s $value
    *   argument.
    */
-  public function testSet($key, $value) {
+  public function testSet($key, $value): void {
     $this->decoratedFormState->set($key, $value)
       ->shouldBeCalled();
 
@@ -969,7 +969,7 @@ public static function providerSet(): array {
    *   (optional) Any valid value for
    *   \Drupal\Core\Form\FormStateInterface::get()'s return value.
    */
-  public function testGet($key, $value = NULL) {
+  public function testGet($key, $value = NULL): void {
 
     // Use PHPUnit for mocking, because Prophecy cannot mock methods that return
     // by reference. See \Prophecy\Doubler\Generator\Node::getCode().
@@ -1006,7 +1006,7 @@ public static function providerGet(): array {
    *   Any valid value for \Drupal\Core\Form\FormStateInterface::has()'s $key
    *   argument.
    */
-  public function testHas($exists, $key) {
+  public function testHas($exists, $key): void {
     $this->decoratedFormState->has($key)
       ->willReturn($exists)
       ->shouldBeCalled();
@@ -1027,7 +1027,7 @@ public static function providerHas(): array {
   /**
    * @covers ::setBuildInfo
    */
-  public function testSetBuildInfo() {
+  public function testSetBuildInfo(): void {
     $build_info = [
       'FOO' => 'BAR',
     ];
@@ -1041,7 +1041,7 @@ public function testSetBuildInfo() {
   /**
    * @covers ::getBuildInfo
    */
-  public function testGetBuildInfo() {
+  public function testGetBuildInfo(): void {
     $build_info = [
       'FOO' => 'BAR',
     ];
@@ -1056,7 +1056,7 @@ public function testGetBuildInfo() {
   /**
    * @covers ::addBuildInfo
    */
-  public function testAddBuildInfo() {
+  public function testAddBuildInfo(): void {
     $property = 'FOO';
     $value = 'BAR';
 
@@ -1069,7 +1069,7 @@ public function testAddBuildInfo() {
   /**
    * @covers ::setUserInput
    */
-  public function testSetUserInput() {
+  public function testSetUserInput(): void {
     $user_input = [
       'FOO' => 'BAR',
     ];
@@ -1083,7 +1083,7 @@ public function testSetUserInput() {
   /**
    * @covers ::getUserInput
    */
-  public function testGetUserInput() {
+  public function testGetUserInput(): void {
     $user_input = [
       'FOO' => 'BAR',
     ];
@@ -1103,7 +1103,7 @@ public function testGetUserInput() {
   /**
    * @covers ::getValues
    */
-  public function testGetValues() {
+  public function testGetValues(): void {
     $values = [
       'FOO' => 'BAR',
     ];
@@ -1123,7 +1123,7 @@ public function testGetValues() {
   /**
    * @covers ::getValue
    */
-  public function testGetValue() {
+  public function testGetValue(): void {
     $key = 'FOO';
     $value = 'BAR';
 
@@ -1143,7 +1143,7 @@ public function testGetValue() {
   /**
    * @covers ::setValues
    */
-  public function testSetValues() {
+  public function testSetValues(): void {
     $values = [
       'foo' => 'Foo',
       'bar' => ['Bar'],
@@ -1158,7 +1158,7 @@ public function testSetValues() {
   /**
    * @covers ::setValue
    */
-  public function testSetValue() {
+  public function testSetValue(): void {
     $key = 'FOO';
     $value = 'BAR';
 
@@ -1171,7 +1171,7 @@ public function testSetValue() {
   /**
    * @covers ::unsetValue
    */
-  public function testUnsetValue() {
+  public function testUnsetValue(): void {
     $key = 'FOO';
 
     $this->decoratedFormState->unsetValue($key)
@@ -1183,7 +1183,7 @@ public function testUnsetValue() {
   /**
    * @covers ::hasValue
    */
-  public function testHasValue() {
+  public function testHasValue(): void {
     $key = ['foo', 'bar'];
     $has = TRUE;
 
@@ -1197,7 +1197,7 @@ public function testHasValue() {
   /**
    * @covers ::isValueEmpty
    */
-  public function testIsValueEmpty() {
+  public function testIsValueEmpty(): void {
     $key = ['foo', 'bar'];
     $is_empty = TRUE;
 
@@ -1211,7 +1211,7 @@ public function testIsValueEmpty() {
   /**
    * @covers ::setValueForElement
    */
-  public function testSetValueForElement() {
+  public function testSetValueForElement(): void {
     $element = [
       '#type' => 'foo',
     ];
@@ -1226,7 +1226,7 @@ public function testSetValueForElement() {
   /**
    * @covers ::setResponse
    */
-  public function testSetResponse() {
+  public function testSetResponse(): void {
     $response = $this->createMock(Response::class);
 
     $this->decoratedFormState->setResponse($response)
@@ -1238,7 +1238,7 @@ public function testSetResponse() {
   /**
    * @covers ::getResponse
    */
-  public function testGetResponse() {
+  public function testGetResponse(): void {
     $response = $this->createMock(Response::class);
 
     $this->decoratedFormState->getResponse()
@@ -1251,7 +1251,7 @@ public function testGetResponse() {
   /**
    * @covers ::setRedirect
    */
-  public function testSetRedirect() {
+  public function testSetRedirect(): void {
     $route_name = 'foo';
     $route_parameters = [
       'bar' => 'baz',
@@ -1269,7 +1269,7 @@ public function testSetRedirect() {
   /**
    * @covers ::setRedirectUrl
    */
-  public function testSetRedirectUrl() {
+  public function testSetRedirectUrl(): void {
     $url = new Url('foo');
 
     $this->decoratedFormState->setRedirectUrl($url)
@@ -1287,7 +1287,7 @@ public function testSetRedirectUrl() {
    *   Any valid value for \Drupal\Core\Form\FormStateInterface::getRedirect()'s
    *   return value.
    */
-  public function testGetRedirect($expected) {
+  public function testGetRedirect($expected): void {
     $this->decoratedFormState->getRedirect()
       ->willReturn($expected)
       ->shouldBeCalled();
@@ -1310,7 +1310,7 @@ public static function providerGetRedirect() {
   /**
    * @covers ::setErrorByName
    */
-  public function testSetErrorByName() {
+  public function testSetErrorByName(): void {
     $name = 'foo';
     $message = 'bar';
 
@@ -1323,7 +1323,7 @@ public function testSetErrorByName() {
   /**
    * @covers ::setError
    */
-  public function testSetError() {
+  public function testSetError(): void {
     $element = [
       '#foo' => 'bar',
     ];
@@ -1338,7 +1338,7 @@ public function testSetError() {
   /**
    * @covers ::clearErrors
    */
-  public function testClearErrors() {
+  public function testClearErrors(): void {
     $this->decoratedFormState->clearErrors()
       ->shouldBeCalled();
 
@@ -1348,7 +1348,7 @@ public function testClearErrors() {
   /**
    * @covers ::getError
    */
-  public function testGetError() {
+  public function testGetError(): void {
     $element = [
       '#foo' => 'bar',
     ];
@@ -1364,7 +1364,7 @@ public function testGetError() {
   /**
    * @covers ::getErrors
    */
-  public function testGetErrors() {
+  public function testGetErrors(): void {
     $errors = [
       'foo' => 'bar',
     ];
@@ -1384,7 +1384,7 @@ public function testGetErrors() {
    *   Any valid value for \Drupal\Core\Form\FormStateInterface::setRebuild()'s
    *   $rebuild argument.
    */
-  public function testSetRebuild($rebuild) {
+  public function testSetRebuild($rebuild): void {
     $this->decoratedFormState->setRebuild($rebuild)
       ->shouldBeCalled();
 
@@ -1396,7 +1396,7 @@ public function testSetRebuild($rebuild) {
    *
    * @dataProvider providerSingleBooleanArgument
    */
-  public function testIsRebuilding($rebuild) {
+  public function testIsRebuilding($rebuild): void {
     $this->decoratedFormState->isRebuilding()
       ->willReturn($rebuild)
       ->shouldBeCalled();
@@ -1409,7 +1409,7 @@ public function testIsRebuilding($rebuild) {
    *
    * @dataProvider providerSingleBooleanArgument
    */
-  public function testSetInvalidToken($expected) {
+  public function testSetInvalidToken($expected): void {
     $this->decoratedFormState->setInvalidToken($expected)
       ->shouldBeCalled();
 
@@ -1421,7 +1421,7 @@ public function testSetInvalidToken($expected) {
    *
    * @dataProvider providerSingleBooleanArgument
    */
-  public function testHasInvalidToken($expected) {
+  public function testHasInvalidToken($expected): void {
     $this->decoratedFormState->hasInvalidToken()
       ->willReturn($expected)
       ->shouldBeCalled();
@@ -1434,7 +1434,7 @@ public function testHasInvalidToken($expected) {
    *
    * @dataProvider providerPrepareCallback
    */
-  public function testPrepareCallback($unprepared_callback, callable $prepared_callback) {
+  public function testPrepareCallback($unprepared_callback, callable $prepared_callback): void {
     $this->decoratedFormState->prepareCallback(Argument::is($unprepared_callback))
       ->willReturn($prepared_callback)
       ->shouldBeCalled();
@@ -1468,7 +1468,7 @@ public static function providerPrepareCallback(): array {
   /**
    * @covers ::setFormObject
    */
-  public function testSetFormObject() {
+  public function testSetFormObject(): void {
     $form = $this->createMock(FormInterface::class);
 
     $this->decoratedFormState->setFormObject($form)
@@ -1480,7 +1480,7 @@ public function testSetFormObject() {
   /**
    * @covers ::getFormObject
    */
-  public function testGetFormObject() {
+  public function testGetFormObject(): void {
     $form = $this->createMock(FormInterface::class);
 
     $this->decoratedFormState->getFormObject()
@@ -1493,7 +1493,7 @@ public function testGetFormObject() {
   /**
    * @covers ::setCleanValueKeys
    */
-  public function testSetCleanValueKeys() {
+  public function testSetCleanValueKeys(): void {
     $keys = ['BAR'];
 
     $this->decoratedFormState->setCleanValueKeys($keys)
@@ -1505,7 +1505,7 @@ public function testSetCleanValueKeys() {
   /**
    * @covers ::getCleanValueKeys
    */
-  public function testGetCleanValueKeys() {
+  public function testGetCleanValueKeys(): void {
     $keys = ['BAR'];
 
     $this->decoratedFormState->getCleanValueKeys()
@@ -1518,7 +1518,7 @@ public function testGetCleanValueKeys() {
   /**
    * @covers ::addCleanValueKey
    */
-  public function testAddCleanValueKey() {
+  public function testAddCleanValueKey(): void {
     $key = 'BAR';
 
     $this->decoratedFormState->addCleanValueKey($key)
@@ -1530,7 +1530,7 @@ public function testAddCleanValueKey() {
   /**
    * @covers ::cleanValues
    */
-  public function testCleanValues() {
+  public function testCleanValues(): void {
     $this->decoratedFormState->cleanValues()
       ->shouldBeCalled();
 
diff --git a/core/tests/Drupal/Tests/Core/Form/FormStateTest.php b/core/tests/Drupal/Tests/Core/Form/FormStateTest.php
index 3aadbc411d43..708e2b32b8d5 100644
--- a/core/tests/Drupal/Tests/Core/Form/FormStateTest.php
+++ b/core/tests/Drupal/Tests/Core/Form/FormStateTest.php
@@ -25,7 +25,7 @@ class FormStateTest extends UnitTestCase {
    *
    * @dataProvider providerTestGetRedirect
    */
-  public function testGetRedirect($form_state_additions, $expected) {
+  public function testGetRedirect($form_state_additions, $expected): void {
     $form_state = (new FormState())->setFormState($form_state_additions);
     $redirect = $form_state->getRedirect();
     $this->assertEquals($expected, $redirect);
@@ -58,7 +58,7 @@ public static function providerTestGetRedirect() {
    *
    * @covers ::setError
    */
-  public function testSetError() {
+  public function testSetError(): void {
     $form_state = new FormState();
     $element['#parents'] = ['foo', 'bar'];
     $form_state->setError($element, 'Fail');
@@ -72,7 +72,7 @@ public function testSetError() {
    *
    * @dataProvider providerTestGetError
    */
-  public function testGetError($errors, $parents, $error = NULL) {
+  public function testGetError($errors, $parents, $error = NULL): void {
     $element['#parents'] = $parents;
     $form_state = (new FormState())->setFormState([
       'errors' => $errors,
@@ -100,7 +100,7 @@ public static function providerTestGetError() {
    *
    * @dataProvider providerTestSetErrorByName
    */
-  public function testSetErrorByName($limit_validation_errors, $expected_errors) {
+  public function testSetErrorByName($limit_validation_errors, $expected_errors): void {
     $form_state = new FormState();
     $form_state->setLimitValidationErrors($limit_validation_errors);
     $form_state->clearErrors();
@@ -130,7 +130,7 @@ public static function providerTestSetErrorByName() {
    *
    * @covers ::setErrorByName
    */
-  public function testFormErrorsDuringSubmission() {
+  public function testFormErrorsDuringSubmission(): void {
     $form_state = new FormState();
     $form_state->setValidationComplete();
     $this->expectException(\LogicException::class);
@@ -141,7 +141,7 @@ public function testFormErrorsDuringSubmission() {
   /**
    * @covers ::prepareCallback
    */
-  public function testPrepareCallbackValidMethod() {
+  public function testPrepareCallbackValidMethod(): void {
     $form_state = new FormState();
     $form_state->setFormObject(new PrepareCallbackTestForm());
     $processed_callback = $form_state->prepareCallback('::buildForm');
@@ -151,7 +151,7 @@ public function testPrepareCallbackValidMethod() {
   /**
    * @covers ::prepareCallback
    */
-  public function testPrepareCallbackInValidMethod() {
+  public function testPrepareCallbackInValidMethod(): void {
     $form_state = new FormState();
     $form_state->setFormObject(new PrepareCallbackTestForm());
     $processed_callback = $form_state->prepareCallback('not_a_method');
@@ -162,7 +162,7 @@ public function testPrepareCallbackInValidMethod() {
   /**
    * @covers ::prepareCallback
    */
-  public function testPrepareCallbackArray() {
+  public function testPrepareCallbackArray(): void {
     $form_state = new FormState();
     $form_state->setFormObject(new PrepareCallbackTestForm());
     $callback = [$form_state->getFormObject(), 'buildForm'];
@@ -173,7 +173,7 @@ public function testPrepareCallbackArray() {
   /**
    * @covers ::loadInclude
    */
-  public function testLoadInclude() {
+  public function testLoadInclude(): void {
     $type = 'some_type';
     $module = 'some_module';
     $name = 'some_name';
@@ -190,7 +190,7 @@ public function testLoadInclude() {
   /**
    * @covers ::loadInclude
    */
-  public function testLoadIncludeNoName() {
+  public function testLoadIncludeNoName(): void {
     $type = 'some_type';
     $module = 'some_module';
     $form_state = $this->getMockBuilder('Drupal\Core\Form\FormState')
@@ -206,7 +206,7 @@ public function testLoadIncludeNoName() {
   /**
    * @covers ::loadInclude
    */
-  public function testLoadIncludeNotFound() {
+  public function testLoadIncludeNotFound(): void {
     $type = 'some_type';
     $module = 'some_module';
     $form_state = $this->getMockBuilder('Drupal\Core\Form\FormState')
@@ -222,7 +222,7 @@ public function testLoadIncludeNotFound() {
   /**
    * @covers ::loadInclude
    */
-  public function testLoadIncludeAlreadyLoaded() {
+  public function testLoadIncludeAlreadyLoaded(): void {
     $type = 'some_type';
     $module = 'some_module';
     $name = 'some_name';
@@ -248,7 +248,7 @@ public function testLoadIncludeAlreadyLoaded() {
    *
    * @dataProvider providerTestIsCached
    */
-  public function testIsCached($cache_key, $no_cache_key, $expected) {
+  public function testIsCached($cache_key, $no_cache_key, $expected): void {
     $form_state = (new FormState())->setFormState([
       'cache' => $cache_key,
       'no_cache' => $no_cache_key,
@@ -302,7 +302,7 @@ public static function providerTestIsCached() {
   /**
    * @covers ::setCached
    */
-  public function testSetCachedPost() {
+  public function testSetCachedPost(): void {
     $form_state = new FormState();
     $form_state->setRequestMethod('POST');
     $form_state->setCached();
@@ -312,7 +312,7 @@ public function testSetCachedPost() {
   /**
    * @covers ::setCached
    */
-  public function testSetCachedGet() {
+  public function testSetCachedGet(): void {
     $form_state = new FormState();
     $form_state->setRequestMethod('GET');
     $this->expectException(\LogicException::class);
@@ -326,7 +326,7 @@ public function testSetCachedGet() {
    *
    * @dataProvider providerTestIsMethodType
    */
-  public function testIsMethodType($set_method_type, $input, $expected) {
+  public function testIsMethodType($set_method_type, $input, $expected): void {
     $form_state = (new FormState())
       ->setMethod($set_method_type);
     $this->assertSame($expected, $form_state->isMethodType($input));
@@ -365,7 +365,7 @@ public static function providerTestIsMethodType() {
    * @covers ::hasTemporaryValue
    * @covers ::setTemporaryValue
    */
-  public function testTemporaryValue() {
+  public function testTemporaryValue(): void {
     $form_state = new FormState();
     $this->assertFalse($form_state->hasTemporaryValue('rainbow_sparkles'));
     $form_state->setTemporaryValue('rainbow_sparkles', 'yes');
@@ -379,7 +379,7 @@ public function testTemporaryValue() {
   /**
    * @covers ::getCleanValueKeys
    */
-  public function testGetCleanValueKeys() {
+  public function testGetCleanValueKeys(): void {
     $form_state = new FormState();
     $this->assertSame($form_state->getCleanValueKeys(), ['form_id', 'form_token', 'form_build_id', 'op']);
   }
@@ -387,7 +387,7 @@ public function testGetCleanValueKeys() {
   /**
    * @covers ::setCleanValueKeys
    */
-  public function testSetCleanValueKeys() {
+  public function testSetCleanValueKeys(): void {
     $form_state = new FormState();
     $form_state->setCleanValueKeys(['key1', 'key2']);
     $this->assertSame($form_state->getCleanValueKeys(), ['key1', 'key2']);
@@ -409,7 +409,7 @@ public function testAddCleanValueKey() {
    *
    * @covers ::cleanValues
    */
-  public function testCleanValues($form_state) {
+  public function testCleanValues($form_state): void {
     $form_state->setValue('value_to_keep', 'magic_ponies');
     $this->assertSame($form_state->cleanValues()->getValues(), ['value_to_keep' => 'magic_ponies']);
   }
@@ -418,7 +418,7 @@ public function testCleanValues($form_state) {
    * @covers ::setValues
    * @covers ::getValues
    */
-  public function testGetValues() {
+  public function testGetValues(): void {
     $values = [
       'foo' => 'bar',
     ];
diff --git a/core/tests/Drupal/Tests/Core/Form/FormStateValuesTraitTest.php b/core/tests/Drupal/Tests/Core/Form/FormStateValuesTraitTest.php
index 1b931f3027d5..d99a939d42ad 100644
--- a/core/tests/Drupal/Tests/Core/Form/FormStateValuesTraitTest.php
+++ b/core/tests/Drupal/Tests/Core/Form/FormStateValuesTraitTest.php
@@ -19,7 +19,7 @@ class FormStateValuesTraitTest extends UnitTestCase {
    *
    * @covers ::setValueForElement
    */
-  public function testSetValueForElement() {
+  public function testSetValueForElement(): void {
     $element = [
       '#parents' => [
         'foo',
@@ -43,7 +43,7 @@ public function testSetValueForElement() {
    *
    * @dataProvider providerGetValue
    */
-  public function testGetValue($key, $expected, $default = NULL) {
+  public function testGetValue($key, $expected, $default = NULL): void {
     $form_state = (new FormStateValuesTraitStub())->setValues([
       'foo' => 'one',
       'bar' => [
@@ -91,7 +91,7 @@ public static function providerGetValue() {
   /**
    * @covers ::getValue
    */
-  public function testGetValueModifyReturn() {
+  public function testGetValueModifyReturn(): void {
     $initial_values = $values = [
       'foo' => 'one',
       'bar' => [
@@ -113,7 +113,7 @@ public function testGetValueModifyReturn() {
    *
    * @dataProvider providerSetValue
    */
-  public function testSetValue($key, $value, $expected) {
+  public function testSetValue($key, $value, $expected): void {
     $form_state = (new FormStateValuesTraitStub())->setValues([
       'bar' => 'wrong',
     ]);
@@ -149,7 +149,7 @@ public static function providerSetValue() {
    *
    * @dataProvider providerHasValue
    */
-  public function testHasValue($key, $expected) {
+  public function testHasValue($key, $expected): void {
     $form_state = (new FormStateValuesTraitStub())->setValues([
       'foo' => 'one',
       'bar' => [
@@ -198,7 +198,7 @@ public static function providerHasValue() {
    *
    * @dataProvider providerIsValueEmpty
    */
-  public function testIsValueEmpty($key, $expected) {
+  public function testIsValueEmpty($key, $expected): void {
     $form_state = (new FormStateValuesTraitStub())->setValues([
       'foo' => 'one',
       'bar' => [
diff --git a/core/tests/Drupal/Tests/Core/Form/FormSubmitterTest.php b/core/tests/Drupal/Tests/Core/Form/FormSubmitterTest.php
index 83dbfec7378a..ebeffbc8f17c 100644
--- a/core/tests/Drupal/Tests/Core/Form/FormSubmitterTest.php
+++ b/core/tests/Drupal/Tests/Core/Form/FormSubmitterTest.php
@@ -56,7 +56,7 @@ protected function setUp(): void {
   /**
    * @covers ::doSubmitForm
    */
-  public function testHandleFormSubmissionNotSubmitted() {
+  public function testHandleFormSubmissionNotSubmitted(): void {
     $form_submitter = $this->getFormSubmitter();
     $form = [];
     $form_state = new FormState();
@@ -69,7 +69,7 @@ public function testHandleFormSubmissionNotSubmitted() {
   /**
    * @covers ::doSubmitForm
    */
-  public function testHandleFormSubmissionNoRedirect() {
+  public function testHandleFormSubmissionNoRedirect(): void {
     $form_submitter = $this->getFormSubmitter();
     $form = [];
     $form_state = (new FormState())
@@ -86,7 +86,7 @@ public function testHandleFormSubmissionNoRedirect() {
    *
    * @dataProvider providerTestHandleFormSubmissionWithResponses
    */
-  public function testHandleFormSubmissionWithResponses($class, $form_state_key) {
+  public function testHandleFormSubmissionWithResponses($class, $form_state_key): void {
     $response = $this->getMockBuilder($class)
       ->disableOriginalConstructor()
       ->getMock();
@@ -117,7 +117,7 @@ public static function providerTestHandleFormSubmissionWithResponses() {
    *
    * @covers ::redirectForm
    */
-  public function testRedirectWithNull() {
+  public function testRedirectWithNull(): void {
     $form_submitter = $this->getFormSubmitter();
 
     $form_state = $this->createMock('Drupal\Core\Form\FormStateInterface');
@@ -143,7 +143,7 @@ public function testRedirectWithNull() {
    *
    * @dataProvider providerTestRedirectWithUrl
    */
-  public function testRedirectWithUrl(Url $redirect_value, $result, $status = 303) {
+  public function testRedirectWithUrl(Url $redirect_value, $result, $status = 303): void {
     $container = new ContainerBuilder();
     $container->set('url_generator', $this->urlGenerator);
     \Drupal::setContainer($container);
@@ -190,7 +190,7 @@ public static function providerTestRedirectWithUrl() {
    *
    * @covers ::redirectForm
    */
-  public function testRedirectWithResponseObject() {
+  public function testRedirectWithResponseObject(): void {
     $form_submitter = $this->getFormSubmitter();
     $redirect = new RedirectResponse('/example');
     $form_state = $this->createMock('Drupal\Core\Form\FormStateInterface');
@@ -208,7 +208,7 @@ public function testRedirectWithResponseObject() {
    *
    * @covers ::redirectForm
    */
-  public function testRedirectWithoutResult() {
+  public function testRedirectWithoutResult(): void {
     $form_submitter = $this->getFormSubmitter();
     $this->urlGenerator->expects($this->never())
       ->method('generateFromRoute');
@@ -229,7 +229,7 @@ public function testRedirectWithoutResult() {
   /**
    * @covers ::executeSubmitHandlers
    */
-  public function testExecuteSubmitHandlers() {
+  public function testExecuteSubmitHandlers(): void {
     $form_submitter = $this->getFormSubmitter();
     $mock = $this->prophesize(MockFormBase::class);
     $mock
diff --git a/core/tests/Drupal/Tests/Core/Form/FormValidatorTest.php b/core/tests/Drupal/Tests/Core/Form/FormValidatorTest.php
index b80768cf5310..18952cecd8ca 100644
--- a/core/tests/Drupal/Tests/Core/Form/FormValidatorTest.php
+++ b/core/tests/Drupal/Tests/Core/Form/FormValidatorTest.php
@@ -56,7 +56,7 @@ protected function setUp(): void {
    * @covers ::validateForm
    * @covers ::finalizeValidation
    */
-  public function testValidationComplete() {
+  public function testValidationComplete(): void {
     $form_validator = new FormValidator(new RequestStack(), $this->getStringTranslationStub(), $this->csrfToken, $this->logger, $this->formErrorHandler);
 
     $form = [];
@@ -71,7 +71,7 @@ public function testValidationComplete() {
    *
    * @covers ::validateForm
    */
-  public function testPreventDuplicateValidation() {
+  public function testPreventDuplicateValidation(): void {
     $form_validator = $this->getMockBuilder('Drupal\Core\Form\FormValidator')
       ->setConstructorArgs([new RequestStack(), $this->getStringTranslationStub(), $this->csrfToken, $this->logger, $this->formErrorHandler])
       ->onlyMethods(['doValidateForm'])
@@ -91,7 +91,7 @@ public function testPreventDuplicateValidation() {
    *
    * @covers ::validateForm
    */
-  public function testMustValidate() {
+  public function testMustValidate(): void {
     $form_validator = $this->getMockBuilder('Drupal\Core\Form\FormValidator')
       ->setConstructorArgs([new RequestStack(), $this->getStringTranslationStub(), $this->csrfToken, $this->logger, $this->formErrorHandler])
       ->onlyMethods(['doValidateForm'])
@@ -111,7 +111,7 @@ public function testMustValidate() {
   /**
    * @covers ::validateForm
    */
-  public function testValidateInvalidFormToken() {
+  public function testValidateInvalidFormToken(): void {
     $request_stack = new RequestStack();
     $request = new Request([], [], [], [], [], ['REQUEST_URI' => '/test/example?foo=bar']);
     $request_stack->push($request);
@@ -141,7 +141,7 @@ public function testValidateInvalidFormToken() {
   /**
    * @covers ::validateForm
    */
-  public function testValidateValidFormToken() {
+  public function testValidateValidFormToken(): void {
     $request_stack = new RequestStack();
     $this->csrfToken->expects($this->once())
       ->method('validate')
@@ -170,7 +170,7 @@ public function testValidateValidFormToken() {
    *
    * @dataProvider providerTestHandleErrorsWithLimitedValidation
    */
-  public function testHandleErrorsWithLimitedValidation($sections, $triggering_element, $values, $expected) {
+  public function testHandleErrorsWithLimitedValidation($sections, $triggering_element, $values, $expected): void {
     $form_validator = new FormValidator(new RequestStack(), $this->getStringTranslationStub(), $this->csrfToken, $this->logger, $this->formErrorHandler);
 
     $triggering_element['#limit_validation_errors'] = $sections;
@@ -263,7 +263,7 @@ public static function providerTestHandleErrorsWithLimitedValidation() {
   /**
    * @covers ::executeValidateHandlers
    */
-  public function testExecuteValidateHandlers() {
+  public function testExecuteValidateHandlers(): void {
     $form_validator = new FormValidator(new RequestStack(), $this->getStringTranslationStub(), $this->csrfToken, $this->logger, $this->formErrorHandler);
 
     $mock = $this->getMockBuilder(FormValidatorTestMockInterface::class)
@@ -294,7 +294,7 @@ public function testExecuteValidateHandlers() {
    *
    * @dataProvider providerTestRequiredErrorMessage
    */
-  public function testRequiredErrorMessage($element, $expected_message) {
+  public function testRequiredErrorMessage($element, $expected_message): void {
     $form_validator = $this->getMockBuilder('Drupal\Core\Form\FormValidator')
       ->setConstructorArgs([new RequestStack(), $this->getStringTranslationStub(), $this->csrfToken, $this->logger, $this->formErrorHandler])
       ->onlyMethods(['executeValidateHandlers'])
@@ -342,7 +342,7 @@ public static function providerTestRequiredErrorMessage() {
   /**
    * @covers ::doValidateForm
    */
-  public function testElementValidate() {
+  public function testElementValidate(): void {
     $form_validator = $this->getMockBuilder('Drupal\Core\Form\FormValidator')
       ->setConstructorArgs([new RequestStack(), $this->getStringTranslationStub(), $this->csrfToken, $this->logger, $this->formErrorHandler])
       ->onlyMethods(['executeValidateHandlers'])
@@ -372,7 +372,7 @@ public function testElementValidate() {
    *
    * @dataProvider providerTestPerformRequiredValidation
    */
-  public function testPerformRequiredValidation($element, $expected_message, $call_watchdog) {
+  public function testPerformRequiredValidation($element, $expected_message, $call_watchdog): void {
     $form_validator = new FormValidator(new RequestStack(), $this->getStringTranslationStub(), $this->csrfToken, $this->logger, $this->formErrorHandler);
 
     if ($call_watchdog) {
diff --git a/core/tests/Drupal/Tests/Core/Form/OptGroupTest.php b/core/tests/Drupal/Tests/Core/Form/OptGroupTest.php
index 25f6bf5668aa..bdba83a68910 100644
--- a/core/tests/Drupal/Tests/Core/Form/OptGroupTest.php
+++ b/core/tests/Drupal/Tests/Core/Form/OptGroupTest.php
@@ -18,7 +18,7 @@ class OptGroupTest extends UnitTestCase {
    *
    * @dataProvider providerTestFlattenOptions
    */
-  public function testFlattenOptions($options) {
+  public function testFlattenOptions($options): void {
     $this->assertSame(['foo' => 'foo'], OptGroup::flattenOptions($options));
   }
 
diff --git a/core/tests/Drupal/Tests/Core/Form/SubformStateTest.php b/core/tests/Drupal/Tests/Core/Form/SubformStateTest.php
index 6bd6bab57e32..b0efd7279a67 100644
--- a/core/tests/Drupal/Tests/Core/Form/SubformStateTest.php
+++ b/core/tests/Drupal/Tests/Core/Form/SubformStateTest.php
@@ -68,7 +68,7 @@ class SubformStateTest extends UnitTestCase {
    * @param string $expected
    *   The expected state values.
    */
-  public function testGetValues(array $parents, $expected) {
+  public function testGetValues(array $parents, $expected): void {
     $parent_form_state = new FormState();
     $parent_form_state->setValues(static::$formStateValues);
 
@@ -107,7 +107,7 @@ public static function providerGetValues(): array {
    * @param string $expected
    *   The expected state values.
    */
-  public function testGetValuesBroken(array $parents, $expected) {
+  public function testGetValuesBroken(array $parents, $expected): void {
     $this->expectException(\UnexpectedValueException::class);
     $this->testGetValues($parents, $expected);
   }
@@ -134,7 +134,7 @@ public static function providerGetValuesBroken(): array {
    *
    * @dataProvider providerTestGetValue
    */
-  public function testGetValue($parents, $key, $expected, $default = NULL) {
+  public function testGetValue($parents, $key, $expected, $default = NULL): void {
     $parent_form_state = new FormState();
     $parent_form_state->setValues(static::$formStateValues);
 
@@ -168,7 +168,7 @@ public static function providerTestGetValue() {
    *
    * @dataProvider providerTestGetValueBroken
    */
-  public function testGetValueBroken(array $parents, $key, $expected, $default = NULL) {
+  public function testGetValueBroken(array $parents, $key, $expected, $default = NULL): void {
     $this->expectException(\UnexpectedValueException::class);
     $this->testGetValue($parents, $key, $expected, $default);
   }
@@ -192,7 +192,7 @@ public static function providerTestGetValueBroken() {
    *
    * @dataProvider providerTestSetValues
    */
-  public function testSetValues($parents, $new_values, $expected) {
+  public function testSetValues($parents, $new_values, $expected): void {
     $parent_form_state = new FormState();
     $parent_form_state->setValues(static::$formStateValues);
 
@@ -223,7 +223,7 @@ public static function providerTestSetValues() {
    *
    * @dataProvider providerTestSetValuesBroken
    */
-  public function testSetValuesBroken($parents, $new_values, $expected) {
+  public function testSetValuesBroken($parents, $new_values, $expected): void {
     $this->expectException(\UnexpectedValueException::class);
     $this->testSetValues($parents, $new_values, $expected);
   }
@@ -247,7 +247,7 @@ public static function providerTestSetValuesBroken(): array {
   /**
    * @covers ::getCompleteFormState
    */
-  public function testGetCompleteFormStateWithParentCompleteForm() {
+  public function testGetCompleteFormStateWithParentCompleteForm(): void {
     $parent_form_state = $this->prophesize(FormStateInterface::class);
     $subform_state = SubformState::createForSubform($this->parentForm['dog'], $this->parentForm, $parent_form_state->reveal());
     $this->assertSame($parent_form_state->reveal(), $subform_state->getCompleteFormState());
@@ -256,7 +256,7 @@ public function testGetCompleteFormStateWithParentCompleteForm() {
   /**
    * @covers ::getCompleteFormState
    */
-  public function testGetCompleteFormStateWithParentSubform() {
+  public function testGetCompleteFormStateWithParentSubform(): void {
     $complete_form_state = $this->prophesize(FormStateInterface::class);
     $parent_form_state = $this->prophesize(SubformStateInterface::class);
     $parent_form_state->getCompleteFormState()
@@ -269,7 +269,7 @@ public function testGetCompleteFormStateWithParentSubform() {
   /**
    * @covers ::setLimitValidationErrors
    */
-  public function testSetLimitValidationErrors() {
+  public function testSetLimitValidationErrors(): void {
     $parent_limit_validation_errors = ['dog', 'name'];
     $limit_validation_errors = ['name'];
 
@@ -284,7 +284,7 @@ public function testSetLimitValidationErrors() {
   /**
    * @covers ::getLimitValidationErrors
    */
-  public function testGetLimitValidationErrors() {
+  public function testGetLimitValidationErrors(): void {
     $parent_limit_validation_errors = ['dog', 'name'];
     $limit_validation_errors = ['name'];
 
@@ -300,7 +300,7 @@ public function testGetLimitValidationErrors() {
   /**
    * @covers ::setErrorByName
    */
-  public function testSetErrorByName() {
+  public function testSetErrorByName(): void {
     $parent_form_error_name = 'dog][name';
     $subform_error_name = 'name';
     // cSpell:disable-next-line
@@ -317,7 +317,7 @@ public function testSetErrorByName() {
   /**
    * @covers ::getFormObject
    */
-  public function testFormObject() {
+  public function testFormObject(): void {
     $parent_form_state = $this->prophesize(FormStateInterface::class);
     $parent_form_object = $this->prophesize(FormInterface::class)->reveal();
     $parent_form_state->getFormObject()->willReturn($parent_form_object)->shouldBeCalledOnce();
diff --git a/core/tests/Drupal/Tests/Core/Http/CacheableExceptionTest.php b/core/tests/Drupal/Tests/Core/Http/CacheableExceptionTest.php
index edd771a7408d..91587fd52031 100644
--- a/core/tests/Drupal/Tests/Core/Http/CacheableExceptionTest.php
+++ b/core/tests/Drupal/Tests/Core/Http/CacheableExceptionTest.php
@@ -31,7 +31,7 @@ class CacheableExceptionTest extends UnitTestCase {
   /**
    * @covers \Drupal\Core\Http\Exception\CacheableHttpException
    */
-  public function testCacheableHttpException() {
+  public function testCacheableHttpException(): void {
     $exception = new CacheableHttpException((new CacheableMetadata())->setCacheContexts(['route']), 500, 'test message', NULL, ['X-Drupal-Exception' => 'Test'], 123);
     $this->assertSame(['route'], $exception->getCacheContexts());
     $this->assertSame(500, $exception->getStatusCode());
@@ -43,7 +43,7 @@ public function testCacheableHttpException() {
   /**
    * @dataProvider providerTestExceptions
    */
-  public function testExceptions($status_code, $class, $argument = NULL, $expected_headers = []) {
+  public function testExceptions($status_code, $class, $argument = NULL, $expected_headers = []): void {
     $cacheable_metadata = (new CacheableMetadata())->setCacheContexts(['route']);
     $message = "$class test message";
     if ($argument) {
diff --git a/core/tests/Drupal/Tests/Core/Http/ClientFactoryTest.php b/core/tests/Drupal/Tests/Core/Http/ClientFactoryTest.php
index d880ee1d6452..527258fc75b1 100644
--- a/core/tests/Drupal/Tests/Core/Http/ClientFactoryTest.php
+++ b/core/tests/Drupal/Tests/Core/Http/ClientFactoryTest.php
@@ -44,7 +44,7 @@ protected function setUp(): void {
    * @param array $expected_config_keys
    *   The expected config keys.
    */
-  public function testCreateFromOptions($settings_config, $parameter_config, $expected_config_keys) {
+  public function testCreateFromOptions($settings_config, $parameter_config, $expected_config_keys): void {
     if ($settings_config) {
       new Settings(['http_client_config' => $settings_config]);
     }
diff --git a/core/tests/Drupal/Tests/Core/Http/TrustedHostsRequestFactoryTest.php b/core/tests/Drupal/Tests/Core/Http/TrustedHostsRequestFactoryTest.php
index 57530376ee2b..1bc4abd3c665 100644
--- a/core/tests/Drupal/Tests/Core/Http/TrustedHostsRequestFactoryTest.php
+++ b/core/tests/Drupal/Tests/Core/Http/TrustedHostsRequestFactoryTest.php
@@ -29,7 +29,7 @@ class TrustedHostsRequestFactoryTest extends UnitTestCase {
    * @covers ::createRequest
    * @dataProvider providerTestCreateRequest
    */
-  public function testCreateRequest($host, $server, $expected) {
+  public function testCreateRequest($host, $server, $expected): void {
     $request_factory = new TrustedHostsRequestFactory($host);
     $request = $request_factory->createRequest([], [], [], [], [], $server, []);
     $this->assertEquals($expected, $request->getHost());
diff --git a/core/tests/Drupal/Tests/Core/Image/ImageTest.php b/core/tests/Drupal/Tests/Core/Image/ImageTest.php
index 57ac5de1064a..673aeb534eb6 100644
--- a/core/tests/Drupal/Tests/Core/Image/ImageTest.php
+++ b/core/tests/Drupal/Tests/Core/Image/ImageTest.php
@@ -153,7 +153,7 @@ protected function getTestImageForOperation($class_name) {
   /**
    * Tests \Drupal\Core\Image\Image::getHeight().
    */
-  public function testGetHeight() {
+  public function testGetHeight(): void {
     $this->getTestImage(FALSE);
     $this->assertEquals(100, $this->image->getHeight());
   }
@@ -161,7 +161,7 @@ public function testGetHeight() {
   /**
    * Tests \Drupal\Core\Image\Image::getWidth().
    */
-  public function testGetWidth() {
+  public function testGetWidth(): void {
     $this->getTestImage(FALSE);
     $this->assertEquals(88, $this->image->getWidth());
   }
@@ -169,7 +169,7 @@ public function testGetWidth() {
   /**
    * Tests \Drupal\Core\Image\Image::getFileSize.
    */
-  public function testGetFileSize() {
+  public function testGetFileSize(): void {
     $this->getTestImage(FALSE);
     $this->assertEquals(3905, $this->image->getFileSize());
   }
@@ -177,7 +177,7 @@ public function testGetFileSize() {
   /**
    * Tests \Drupal\Core\Image\Image::getToolkit()->getType().
    */
-  public function testGetType() {
+  public function testGetType(): void {
     $this->getTestImage(FALSE);
     $this->assertEquals(IMAGETYPE_PNG, $this->image->getToolkit()->getType());
   }
@@ -185,7 +185,7 @@ public function testGetType() {
   /**
    * Tests \Drupal\Core\Image\Image::getMimeType().
    */
-  public function testGetMimeType() {
+  public function testGetMimeType(): void {
     $this->getTestImage(FALSE);
     $this->assertEquals('image/png', $this->image->getMimeType());
   }
@@ -193,7 +193,7 @@ public function testGetMimeType() {
   /**
    * Tests \Drupal\Core\Image\Image::isValid().
    */
-  public function testIsValid() {
+  public function testIsValid(): void {
     $this->getTestImage(FALSE);
     $this->assertTrue($this->image->isValid());
     $this->assertFileIsReadable($this->image->getSource());
@@ -202,7 +202,7 @@ public function testIsValid() {
   /**
    * Tests \Drupal\Core\Image\Image::getToolkitId().
    */
-  public function testGetToolkitId() {
+  public function testGetToolkitId(): void {
     $this->getTestImage(FALSE);
     $this->assertEquals('gd', $this->image->getToolkitId());
   }
@@ -210,7 +210,7 @@ public function testGetToolkitId() {
   /**
    * Tests \Drupal\Core\Image\Image::save().
    */
-  public function testSave() {
+  public function testSave(): void {
     $this->getTestImage();
     // This will fail if save() method isn't called on the toolkit.
     $toolkit = $this->getToolkitMock();
@@ -239,7 +239,7 @@ public function testSave() {
   /**
    * Tests \Drupal\Core\Image\Image::save().
    */
-  public function testSaveFails() {
+  public function testSaveFails(): void {
     $this->getTestImage();
     // This will fail if save() method isn't called on the toolkit.
     $this->toolkit->expects($this->once())
@@ -252,7 +252,7 @@ public function testSaveFails() {
   /**
    * Tests \Drupal\Core\Image\Image::save().
    */
-  public function testChmodFails() {
+  public function testChmodFails(): void {
     $this->getTestImage();
     // This will fail if save() method isn't called on the toolkit.
     $toolkit = $this->getToolkitMock();
@@ -281,7 +281,7 @@ public function testChmodFails() {
   /**
    * Tests \Drupal\Core\Image\Image::parseFile().
    */
-  public function testParseFileFails() {
+  public function testParseFileFails(): void {
     $toolkit = $this->getToolkitMock();
     $image = new Image($toolkit, 'magic-foobar.png');
 
@@ -292,7 +292,7 @@ public function testParseFileFails() {
   /**
    * Tests \Drupal\Core\Image\Image::scale().
    */
-  public function testScaleWidth() {
+  public function testScaleWidth(): void {
     $this->getTestImageForOperation('Scale');
     $this->toolkitOperation->expects($this->once())
       ->method('execute')
@@ -305,7 +305,7 @@ public function testScaleWidth() {
   /**
    * Tests \Drupal\Core\Image\Image::scale().
    */
-  public function testScaleHeight() {
+  public function testScaleHeight(): void {
     $this->getTestImageForOperation('Scale');
     $this->toolkitOperation->expects($this->once())
       ->method('execute')
@@ -318,7 +318,7 @@ public function testScaleHeight() {
   /**
    * Tests \Drupal\Core\Image\Image::scale().
    */
-  public function testScaleSame() {
+  public function testScaleSame(): void {
     $this->getTestImageForOperation('Scale');
     // Dimensions are the same, resize should not be called.
     $this->toolkitOperation->expects($this->once())
@@ -333,7 +333,7 @@ public function testScaleSame() {
   /**
    * Tests \Drupal\Core\Image\Image::scaleAndCrop().
    */
-  public function testScaleAndCropWidth() {
+  public function testScaleAndCropWidth(): void {
     $this->getTestImageForOperation('ScaleAndCrop');
     $this->toolkitOperation->expects($this->once())
       ->method('execute')
@@ -346,7 +346,7 @@ public function testScaleAndCropWidth() {
   /**
    * Tests \Drupal\Core\Image\Image::scaleAndCrop().
    */
-  public function testScaleAndCropHeight() {
+  public function testScaleAndCropHeight(): void {
     $this->getTestImageForOperation('ScaleAndCrop');
     $this->toolkitOperation->expects($this->once())
       ->method('execute')
@@ -359,7 +359,7 @@ public function testScaleAndCropHeight() {
   /**
    * Tests \Drupal\Core\Image\Image::scaleAndCrop().
    */
-  public function testScaleAndCropFails() {
+  public function testScaleAndCropFails(): void {
     $this->getTestImageForOperation('ScaleAndCrop');
     $this->toolkitOperation->expects($this->once())
       ->method('execute')
@@ -375,7 +375,7 @@ public function testScaleAndCropFails() {
   /**
    * Tests \Drupal\Core\Image\Image::crop().
    */
-  public function testCropWidth() {
+  public function testCropWidth(): void {
     $this->getTestImageForOperation('Crop');
     $this->toolkitOperation->expects($this->once())
       ->method('execute')
@@ -389,7 +389,7 @@ public function testCropWidth() {
   /**
    * Tests \Drupal\Core\Image\Image::crop().
    */
-  public function testCropHeight() {
+  public function testCropHeight(): void {
     $this->getTestImageForOperation('Crop');
     $this->toolkitOperation->expects($this->once())
       ->method('execute')
@@ -403,7 +403,7 @@ public function testCropHeight() {
   /**
    * Tests \Drupal\Core\Image\Image::crop().
    */
-  public function testCrop() {
+  public function testCrop(): void {
     $this->getTestImageForOperation('Crop');
     $this->toolkitOperation->expects($this->once())
       ->method('execute')
@@ -416,7 +416,7 @@ public function testCrop() {
   /**
    * Tests \Drupal\Core\Image\Image::convert().
    */
-  public function testConvert() {
+  public function testConvert(): void {
     $this->getTestImageForOperation('Convert');
     $this->toolkitOperation->expects($this->once())
       ->method('execute')
@@ -429,7 +429,7 @@ public function testConvert() {
   /**
    * Tests \Drupal\Core\Image\Image::resize().
    */
-  public function testResize() {
+  public function testResize(): void {
     $this->getTestImageForOperation('Resize');
     $this->toolkitOperation->expects($this->once())
       ->method('execute')
@@ -444,7 +444,7 @@ public function testResize() {
   /**
    * Tests \Drupal\Core\Image\Image::resize().
    */
-  public function testFloatResize() {
+  public function testFloatResize(): void {
     $this->getTestImageForOperation('Resize');
     $this->toolkitOperation->expects($this->once())
       ->method('execute')
@@ -459,7 +459,7 @@ public function testFloatResize() {
   /**
    * Tests \Drupal\Core\Image\Image::desaturate().
    */
-  public function testDesaturate() {
+  public function testDesaturate(): void {
     $this->getTestImageForOperation('Desaturate');
     $this->toolkitOperation->expects($this->once())
       ->method('execute')
@@ -471,7 +471,7 @@ public function testDesaturate() {
   /**
    * Tests \Drupal\Core\Image\Image::rotate().
    */
-  public function testRotate() {
+  public function testRotate(): void {
     $this->getTestImageForOperation('Rotate');
     $this->toolkitOperation->expects($this->once())
       ->method('execute')
diff --git a/core/tests/Drupal/Tests/Core/Language/LanguageUnitTest.php b/core/tests/Drupal/Tests/Core/Language/LanguageUnitTest.php
index e347ed5fe25c..a3692788c17c 100644
--- a/core/tests/Drupal/Tests/Core/Language/LanguageUnitTest.php
+++ b/core/tests/Drupal/Tests/Core/Language/LanguageUnitTest.php
@@ -17,7 +17,7 @@ class LanguageUnitTest extends UnitTestCase {
   /**
    * @covers ::__construct
    */
-  public function testConstruct() {
+  public function testConstruct(): void {
     $name = $this->randomMachineName();
     $language_code = $this->randomMachineName(2);
     $uuid = $this->randomMachineName();
@@ -31,7 +31,7 @@ public function testConstruct() {
   /**
    * @covers ::getName
    */
-  public function testGetName() {
+  public function testGetName(): void {
     $name = $this->randomMachineName();
     $language_code = $this->randomMachineName(2);
     $language = new Language(['id' => $language_code, 'name' => $name]);
@@ -41,7 +41,7 @@ public function testGetName() {
   /**
    * @covers ::getId
    */
-  public function testGetLangcode() {
+  public function testGetLangcode(): void {
     $language_code = $this->randomMachineName(2);
     $language = new Language(['id' => $language_code]);
     $this->assertSame($language_code, $language->getId());
@@ -50,7 +50,7 @@ public function testGetLangcode() {
   /**
    * @covers ::getDirection
    */
-  public function testGetDirection() {
+  public function testGetDirection(): void {
     $language_code = $this->randomMachineName(2);
     $language = new Language(['id' => $language_code, 'direction' => LanguageInterface::DIRECTION_RTL]);
     $this->assertSame(LanguageInterface::DIRECTION_RTL, $language->getDirection());
@@ -59,7 +59,7 @@ public function testGetDirection() {
   /**
    * @covers ::isDefault
    */
-  public function testIsDefault() {
+  public function testIsDefault(): void {
     $language_default = $this->getMockBuilder('Drupal\Core\Language\LanguageDefault')->disableOriginalConstructor()->getMock();
     $container = $this->createMock('Symfony\Component\DependencyInjection\ContainerInterface');
     $container->expects($this->any())
@@ -94,7 +94,7 @@ public function testIsDefault() {
    * @param array $expected
    *   The expected array of keys.
    */
-  public function testSortArrayOfLanguages(array $languages, array $expected) {
+  public function testSortArrayOfLanguages(array $languages, array $expected): void {
     Language::sort($languages);
     $this->assertSame($expected, array_keys($languages));
   }
diff --git a/core/tests/Drupal/Tests/Core/Layout/LayoutDefaultTest.php b/core/tests/Drupal/Tests/Core/Layout/LayoutDefaultTest.php
index 9bb982c9f127..7ab62f52c142 100644
--- a/core/tests/Drupal/Tests/Core/Layout/LayoutDefaultTest.php
+++ b/core/tests/Drupal/Tests/Core/Layout/LayoutDefaultTest.php
@@ -18,7 +18,7 @@ class LayoutDefaultTest extends UnitTestCase {
    * @covers ::build
    * @dataProvider providerTestBuild
    */
-  public function testBuild($regions, $expected) {
+  public function testBuild($regions, $expected): void {
     $definition = new LayoutDefinition([
       'theme_hook' => 'layout',
       'library' => 'core/drupal',
diff --git a/core/tests/Drupal/Tests/Core/Layout/LayoutPluginManagerTest.php b/core/tests/Drupal/Tests/Core/Layout/LayoutPluginManagerTest.php
index 7610bf16bf58..62547d63c976 100644
--- a/core/tests/Drupal/Tests/Core/Layout/LayoutPluginManagerTest.php
+++ b/core/tests/Drupal/Tests/Core/Layout/LayoutPluginManagerTest.php
@@ -104,7 +104,7 @@ protected function setUp(): void {
    * @covers ::getDefinitions
    * @covers ::providerExists
    */
-  public function testGetDefinitions() {
+  public function testGetDefinitions(): void {
     $expected = [
       'module_a_provided_layout',
       'theme_a_provided_layout',
@@ -121,7 +121,7 @@ public function testGetDefinitions() {
    * @covers ::getDefinition
    * @covers ::processDefinition
    */
-  public function testGetDefinition() {
+  public function testGetDefinition(): void {
     $layout_definition = $this->layoutPluginManager->getDefinition('theme_a_provided_layout');
     $this->assertSame('theme_a_provided_layout', $layout_definition->id());
     $this->assertSame('2 column layout', (string) $layout_definition->getLabel());
@@ -243,7 +243,7 @@ public function testGetDefinition() {
   /**
    * @covers ::processDefinition
    */
-  public function testProcessDefinition() {
+  public function testProcessDefinition(): void {
     $this->moduleHandler->alter('layout', Argument::type('array'))->shouldNotBeCalled();
     $this->expectException(InvalidPluginDefinitionException::class);
     $this->expectExceptionMessage('The "module_a_derived_layout:array_based" layout definition must extend ' . LayoutDefinition::class);
@@ -265,7 +265,7 @@ public function testProcessDefinition() {
   /**
    * @covers ::getThemeImplementations
    */
-  public function testGetThemeImplementations() {
+  public function testGetThemeImplementations(): void {
     $core_path = '/core/lib/Drupal/Core';
     $expected = [
       'layout' => [
@@ -297,7 +297,7 @@ public function testGetThemeImplementations() {
   /**
    * @covers ::getCategories
    */
-  public function testGetCategories() {
+  public function testGetCategories(): void {
     $expected = [
       'Columns: 1',
       'Columns: 2',
@@ -309,7 +309,7 @@ public function testGetCategories() {
   /**
    * @covers ::getSortedDefinitions
    */
-  public function testGetSortedDefinitions() {
+  public function testGetSortedDefinitions(): void {
     // Sorted by category first, then label.
     $expected = [
       'module_a_provided_layout',
@@ -326,7 +326,7 @@ public function testGetSortedDefinitions() {
   /**
    * @covers ::getGroupedDefinitions
    */
-  public function testGetGroupedDefinitions() {
+  public function testGetGroupedDefinitions(): void {
     $category_expected = [
       'Columns: 1' => [
         'module_a_provided_layout',
diff --git a/core/tests/Drupal/Tests/Core/Listeners/DrupalStandardsListenerDeprecationTest.php b/core/tests/Drupal/Tests/Core/Listeners/DrupalStandardsListenerDeprecationTest.php
index 6c54105dc267..634a9c23a236 100644
--- a/core/tests/Drupal/Tests/Core/Listeners/DrupalStandardsListenerDeprecationTest.php
+++ b/core/tests/Drupal/Tests/Core/Listeners/DrupalStandardsListenerDeprecationTest.php
@@ -33,7 +33,7 @@ class DrupalStandardsListenerDeprecationTest extends UnitTestCase {
    *
    * @covers ::testFunction
    */
-  public function testDeprecation() {
+  public function testDeprecation(): void {
     // Meaningless assertion so this test is not risky.
     $this->assertTrue(TRUE);
   }
diff --git a/core/tests/Drupal/Tests/Core/Lock/LockBackendAbstractTest.php b/core/tests/Drupal/Tests/Core/Lock/LockBackendAbstractTest.php
index 0fcefcd0a8b1..8796ed8b6a11 100644
--- a/core/tests/Drupal/Tests/Core/Lock/LockBackendAbstractTest.php
+++ b/core/tests/Drupal/Tests/Core/Lock/LockBackendAbstractTest.php
@@ -31,7 +31,7 @@ protected function setUp(): void {
   /**
    * Tests the wait() method when lockMayBeAvailable() returns TRUE.
    */
-  public function testWaitFalse() {
+  public function testWaitFalse(): void {
     $this->lock->expects($this->any())
       ->method('lockMayBeAvailable')
       ->with($this->equalTo('test_name'))
@@ -46,7 +46,7 @@ public function testWaitFalse() {
    * Waiting could take 1 second so we need to extend the possible runtime.
    * @medium
    */
-  public function testWaitTrue() {
+  public function testWaitTrue(): void {
     $this->lock->expects($this->any())
       ->method('lockMayBeAvailable')
       ->with($this->equalTo('test_name'))
@@ -58,7 +58,7 @@ public function testWaitTrue() {
   /**
    * Tests the getLockId() method.
    */
-  public function testGetLockId() {
+  public function testGetLockId(): void {
     $lock_id = $this->lock->getLockId();
     $this->assertIsString($lock_id);
     // Example lock ID would be '7213141505232b6ee2cb967.27683891'.
diff --git a/core/tests/Drupal/Tests/Core/Logger/LogMessageParserTest.php b/core/tests/Drupal/Tests/Core/Logger/LogMessageParserTest.php
index 5e88cd9be7cc..0b63b0fadac5 100644
--- a/core/tests/Drupal/Tests/Core/Logger/LogMessageParserTest.php
+++ b/core/tests/Drupal/Tests/Core/Logger/LogMessageParserTest.php
@@ -29,7 +29,7 @@ class LogMessageParserTest extends UnitTestCase {
    * @dataProvider providerTestParseMessagePlaceholders
    * @covers ::parseMessagePlaceholders
    */
-  public function testParseMessagePlaceholders(array $value, array $expected) {
+  public function testParseMessagePlaceholders(array $value, array $expected): void {
     $parser = new LogMessageParser();
     $message_placeholders = $parser->parseMessagePlaceholders($value['message'], $value['context']);
     $this->assertEquals($expected['message'], $value['message']);
diff --git a/core/tests/Drupal/Tests/Core/Logger/LoggerChannelFactoryTest.php b/core/tests/Drupal/Tests/Core/Logger/LoggerChannelFactoryTest.php
index 6ff5700fe955..1d0cc3e84285 100644
--- a/core/tests/Drupal/Tests/Core/Logger/LoggerChannelFactoryTest.php
+++ b/core/tests/Drupal/Tests/Core/Logger/LoggerChannelFactoryTest.php
@@ -20,7 +20,7 @@ class LoggerChannelFactoryTest extends UnitTestCase {
    *
    * @covers ::get
    */
-  public function testGet() {
+  public function testGet(): void {
     $factory = new LoggerChannelFactory(
       $this->createMock(RequestStack::class),
       $this->createMock(AccountInterface::class),
diff --git a/core/tests/Drupal/Tests/Core/Logger/LoggerChannelTest.php b/core/tests/Drupal/Tests/Core/Logger/LoggerChannelTest.php
index 2028dcff1ee4..718fa92f3ed6 100644
--- a/core/tests/Drupal/Tests/Core/Logger/LoggerChannelTest.php
+++ b/core/tests/Drupal/Tests/Core/Logger/LoggerChannelTest.php
@@ -35,7 +35,7 @@ class LoggerChannelTest extends UnitTestCase {
    * @covers ::setCurrentUser
    * @covers ::setRequestStack
    */
-  public function testLog(callable $expected, bool $request = FALSE, bool $account = FALSE) {
+  public function testLog(callable $expected, bool $request = FALSE, bool $account = FALSE): void {
     $channel = new LoggerChannel('test');
     $message = $this->randomMachineName();
     $logger = $this->createMock('Psr\Log\LoggerInterface');
@@ -72,7 +72,7 @@ public function testLog(callable $expected, bool $request = FALSE, bool $account
    *
    * @covers ::log
    */
-  public function testLogRecursionProtection() {
+  public function testLogRecursionProtection(): void {
     $channel = new LoggerChannel('test');
     $logger = $this->createMock('Psr\Log\LoggerInterface');
     $logger->expects($this->exactly(LoggerChannel::MAX_CALL_DEPTH))
@@ -88,7 +88,7 @@ public function testLogRecursionProtection() {
    * @covers ::addLogger
    * @covers ::sortLoggers
    */
-  public function testSortLoggers() {
+  public function testSortLoggers(): void {
     $channel = new LoggerChannel($this->randomMachineName());
     $index_order = '';
     for ($i = 0; $i < 4; $i++) {
diff --git a/core/tests/Drupal/Tests/Core/Mail/MailFormatHelperTest.php b/core/tests/Drupal/Tests/Core/Mail/MailFormatHelperTest.php
index f0cac252767c..4dc849147638 100644
--- a/core/tests/Drupal/Tests/Core/Mail/MailFormatHelperTest.php
+++ b/core/tests/Drupal/Tests/Core/Mail/MailFormatHelperTest.php
@@ -18,7 +18,7 @@ class MailFormatHelperTest extends UnitTestCase {
   /**
    * @covers ::wrapMail
    */
-  public function testWrapMail() {
+  public function testWrapMail(): void {
     $delimiter = "End of header\n";
     $long_file_name = $this->randomMachineName(64) . '.docx';
     $headers_in_body = 'Content-Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document; name="' . $long_file_name . "\"\n";
diff --git a/core/tests/Drupal/Tests/Core/Mail/MailManagerTest.php b/core/tests/Drupal/Tests/Core/Mail/MailManagerTest.php
index c4640b90ae54..bbb7efb12065 100644
--- a/core/tests/Drupal/Tests/Core/Mail/MailManagerTest.php
+++ b/core/tests/Drupal/Tests/Core/Mail/MailManagerTest.php
@@ -154,7 +154,7 @@ protected function setUpMailManager($interface = []) {
    *
    * @covers ::getInstance
    */
-  public function testGetInstance() {
+  public function testGetInstance(): void {
     $interface = [
       'default' => 'php_mail',
       'example_testkey' => 'test_mail_collector',
@@ -177,7 +177,7 @@ public function testGetInstance() {
    *
    * @covers ::mail
    */
-  public function testMailInRenderContext() {
+  public function testMailInRenderContext(): void {
     $interface = [
       'default' => 'php_mail',
       'example_testkey' => 'test_mail_collector',
diff --git a/core/tests/Drupal/Tests/Core/Mail/Plugin/Mail/PhpMailTest.php b/core/tests/Drupal/Tests/Core/Mail/Plugin/Mail/PhpMailTest.php
index 35d783e7725c..760e2a0199d0 100644
--- a/core/tests/Drupal/Tests/Core/Mail/Plugin/Mail/PhpMailTest.php
+++ b/core/tests/Drupal/Tests/Core/Mail/Plugin/Mail/PhpMailTest.php
@@ -109,7 +109,7 @@ protected function createPhpMailInstance(): PhpMail {
    *
    * @covers ::mail
    */
-  public function testMail() {
+  public function testMail(): void {
     // Setup a mail message.
     $message = [
       'id' => 'example_key',
diff --git a/core/tests/Drupal/Tests/Core/Mail/Plugin/Mail/SymfonyMailerTest.php b/core/tests/Drupal/Tests/Core/Mail/Plugin/Mail/SymfonyMailerTest.php
index 40fa0911daab..169d6cc2853b 100644
--- a/core/tests/Drupal/Tests/Core/Mail/Plugin/Mail/SymfonyMailerTest.php
+++ b/core/tests/Drupal/Tests/Core/Mail/Plugin/Mail/SymfonyMailerTest.php
@@ -23,7 +23,7 @@ class SymfonyMailerTest extends UnitTestCase {
    *
    * @covers ::format
    */
-  public function testFormatResemblesHtml() {
+  public function testFormatResemblesHtml(): void {
     // Populate global $base_path to avoid notices generated by
     // MailFormatHelper::htmlToMailUrls()
     global $base_path;
@@ -67,7 +67,7 @@ public function testFormatResemblesHtml() {
    *
    * @covers ::mail
    */
-  public function testMail() {
+  public function testMail(): void {
     // Setup a mail message.
     $message = [
       'id' => 'example_key',
diff --git a/core/tests/Drupal/Tests/Core/Menu/ContextualLinkDefaultTest.php b/core/tests/Drupal/Tests/Core/Menu/ContextualLinkDefaultTest.php
index ccba55d707e3..00663971b364 100644
--- a/core/tests/Drupal/Tests/Core/Menu/ContextualLinkDefaultTest.php
+++ b/core/tests/Drupal/Tests/Core/Menu/ContextualLinkDefaultTest.php
@@ -68,7 +68,7 @@ protected function setupContextualLinkDefault() {
   /**
    * @covers ::getTitle
    */
-  public function testGetTitle() {
+  public function testGetTitle(): void {
     $title = 'Example';
     $this->pluginDefinition['title'] = (new TranslatableMarkup($title, [], [], $this->stringTranslation));
     $this->stringTranslation->expects($this->once())
@@ -83,7 +83,7 @@ public function testGetTitle() {
   /**
    * @covers ::getTitle
    */
-  public function testGetTitleWithContext() {
+  public function testGetTitleWithContext(): void {
     $title = 'Example';
     $this->pluginDefinition['title'] = (new TranslatableMarkup($title, [], ['context' => 'context'], $this->stringTranslation));
     $this->stringTranslation->expects($this->once())
@@ -98,7 +98,7 @@ public function testGetTitleWithContext() {
   /**
    * @covers ::getTitle
    */
-  public function testGetTitleWithTitleArguments() {
+  public function testGetTitleWithTitleArguments(): void {
     $title = 'Example @test';
     $this->pluginDefinition['title'] = (new TranslatableMarkup($title, ['@test' => 'value'], [], $this->stringTranslation));
     $this->stringTranslation->expects($this->once())
@@ -114,7 +114,7 @@ public function testGetTitleWithTitleArguments() {
   /**
    * @covers ::getRouteName
    */
-  public function testGetRouteName($route_name = 'test_route_name') {
+  public function testGetRouteName($route_name = 'test_route_name'): void {
     $this->pluginDefinition['route_name'] = $route_name;
     $this->setupContextualLinkDefault();
 
@@ -124,7 +124,7 @@ public function testGetRouteName($route_name = 'test_route_name') {
   /**
    * @covers ::getGroup
    */
-  public function testGetGroup($group_name = 'test_group') {
+  public function testGetGroup($group_name = 'test_group'): void {
     $this->pluginDefinition['group'] = $group_name;
     $this->setupContextualLinkDefault();
 
@@ -134,7 +134,7 @@ public function testGetGroup($group_name = 'test_group') {
   /**
    * @covers ::getOptions
    */
-  public function testGetOptions($options = ['key' => 'value']) {
+  public function testGetOptions($options = ['key' => 'value']): void {
     $this->pluginDefinition['options'] = $options;
     $this->setupContextualLinkDefault();
 
@@ -144,7 +144,7 @@ public function testGetOptions($options = ['key' => 'value']) {
   /**
    * @covers ::getWeight
    */
-  public function testGetWeight($weight = 5) {
+  public function testGetWeight($weight = 5): void {
     $this->pluginDefinition['weight'] = $weight;
     $this->setupContextualLinkDefault();
 
diff --git a/core/tests/Drupal/Tests/Core/Menu/ContextualLinkManagerTest.php b/core/tests/Drupal/Tests/Core/Menu/ContextualLinkManagerTest.php
index 4d235bec59b4..0780db15ee24 100644
--- a/core/tests/Drupal/Tests/Core/Menu/ContextualLinkManagerTest.php
+++ b/core/tests/Drupal/Tests/Core/Menu/ContextualLinkManagerTest.php
@@ -100,7 +100,7 @@ protected function setUp(): void {
    *
    * @see \Drupal\Core\Menu\ContextualLinkManager::getContextualLinkPluginsByGroup()
    */
-  public function testGetContextualLinkPluginsByGroup() {
+  public function testGetContextualLinkPluginsByGroup(): void {
     $definitions = [
       'test_plugin1' => [
         'id' => 'test_plugin1',
@@ -139,7 +139,7 @@ public function testGetContextualLinkPluginsByGroup() {
   /**
    * Tests the getContextualLinkPluginsByGroup method with a prefilled cache.
    */
-  public function testGetContextualLinkPluginsByGroupWithCache() {
+  public function testGetContextualLinkPluginsByGroupWithCache(): void {
     $definitions = [
       'test_plugin1' => [
         'id' => 'test_plugin1',
@@ -174,7 +174,7 @@ public function testGetContextualLinkPluginsByGroupWithCache() {
    *
    * @see \Drupal\Core\Menu\ContextualLinkManager::processDefinition()
    */
-  public function testProcessDefinitionWithoutRoute() {
+  public function testProcessDefinitionWithoutRoute(): void {
     $definition = [
       'class' => '\Drupal\Core\Menu\ContextualLinkDefault',
       'group' => 'example',
@@ -189,7 +189,7 @@ public function testProcessDefinitionWithoutRoute() {
    *
    * @see \Drupal\Core\Menu\ContextualLinkManager::processDefinition()
    */
-  public function testProcessDefinitionWithoutGroup() {
+  public function testProcessDefinitionWithoutGroup(): void {
     $definition = [
       'class' => '\Drupal\Core\Menu\ContextualLinkDefault',
       'route_name' => 'example',
@@ -204,7 +204,7 @@ public function testProcessDefinitionWithoutGroup() {
    *
    * @see \Drupal\Core\Menu\ContextualLinkManager::getContextualLinksArrayByGroup()
    */
-  public function testGetContextualLinksArrayByGroup() {
+  public function testGetContextualLinksArrayByGroup(): void {
     $definitions = [
       'test_plugin1' => [
         'id' => 'test_plugin1',
@@ -264,7 +264,7 @@ public function testGetContextualLinksArrayByGroup() {
    *
    * @see \Drupal\Core\Menu\ContextualLinkManager::getContextualLinksArrayByGroup()
    */
-  public function testGetContextualLinksArrayByGroupAccessCheck() {
+  public function testGetContextualLinksArrayByGroupAccessCheck(): void {
     $definitions = [
       'test_plugin1' => [
         'id' => 'test_plugin1',
@@ -307,7 +307,7 @@ public function testGetContextualLinksArrayByGroupAccessCheck() {
   /**
    * Tests the plugins alter hook.
    */
-  public function testPluginDefinitionAlter() {
+  public function testPluginDefinitionAlter(): void {
     $definitions['test_plugin'] = [
       'id' => 'test_plugin',
       'class' => ContextualLinkDefault::class,
diff --git a/core/tests/Drupal/Tests/Core/Menu/DefaultMenuLinkTreeManipulatorsTest.php b/core/tests/Drupal/Tests/Core/Menu/DefaultMenuLinkTreeManipulatorsTest.php
index 8d0eba684e64..367d08d5d8de 100644
--- a/core/tests/Drupal/Tests/Core/Menu/DefaultMenuLinkTreeManipulatorsTest.php
+++ b/core/tests/Drupal/Tests/Core/Menu/DefaultMenuLinkTreeManipulatorsTest.php
@@ -150,7 +150,7 @@ protected function mockTree() {
    *
    * @covers ::generateIndexAndSort
    */
-  public function testGenerateIndexAndSort() {
+  public function testGenerateIndexAndSort(): void {
     $this->mockTree();
     $tree = $this->originalTree;
     $tree = $this->defaultMenuTreeManipulators->generateIndexAndSort($tree);
@@ -174,7 +174,7 @@ public function testGenerateIndexAndSort() {
    * @covers ::checkAccess
    * @covers ::menuLinkCheckAccess
    */
-  public function testCheckAccess() {
+  public function testCheckAccess(): void {
     // Those menu links that are non-external will have their access checks
     // performed. 9 routes, but 1 is external, 2 already have their 'access'
     // property set, and 1 is a child if an inaccessible menu link, so only 5
@@ -282,7 +282,7 @@ public function testCheckAccessTreeManipulator(): void {
    *
    * @covers ::flatten
    */
-  public function testFlatten() {
+  public function testFlatten(): void {
     $this->mockTree();
     $tree = $this->defaultMenuTreeManipulators->flatten($this->originalTree);
     $this->assertEquals([1, 2, 5, 6, 8, 9], array_keys($this->originalTree));
@@ -296,7 +296,7 @@ public function testFlatten() {
    * @covers ::collectNodeLinks
    * @covers ::checkAccess
    */
-  public function testCheckNodeAccess() {
+  public function testCheckNodeAccess(): void {
     $links = [
       1 => MenuLinkMock::create(['id' => 'node.1', 'route_name' => 'entity.node.canonical', 'title' => 'foo', 'parent' => '', 'route_parameters' => ['node' => 1]]),
       2 => MenuLinkMock::create(['id' => 'node.2', 'route_name' => 'entity.node.canonical', 'title' => 'bar', 'parent' => '', 'route_parameters' => ['node' => 2]]),
diff --git a/core/tests/Drupal/Tests/Core/Menu/LocalActionDefaultTest.php b/core/tests/Drupal/Tests/Core/Menu/LocalActionDefaultTest.php
index 09bf2b601e1a..85d1c6989da0 100644
--- a/core/tests/Drupal/Tests/Core/Menu/LocalActionDefaultTest.php
+++ b/core/tests/Drupal/Tests/Core/Menu/LocalActionDefaultTest.php
@@ -81,7 +81,7 @@ protected function setupLocalActionDefault() {
    *
    * @see \Drupal\Core\Menu\LocalTaskDefault::getTitle()
    */
-  public function testGetTitle() {
+  public function testGetTitle(): void {
     $this->pluginDefinition['title'] = (new TranslatableMarkup('Example', [], [], $this->stringTranslation));
     $this->stringTranslation->expects($this->once())
       ->method('translateString')
@@ -97,7 +97,7 @@ public function testGetTitle() {
    *
    * @see \Drupal\Core\Menu\LocalTaskDefault::getTitle()
    */
-  public function testGetTitleWithContext() {
+  public function testGetTitleWithContext(): void {
     $this->pluginDefinition['title'] = (new TranslatableMarkup('Example', [], ['context' => 'context'], $this->stringTranslation));
     $this->stringTranslation->expects($this->once())
       ->method('translateString')
@@ -111,7 +111,7 @@ public function testGetTitleWithContext() {
   /**
    * Tests the getTitle method with title arguments.
    */
-  public function testGetTitleWithTitleArguments() {
+  public function testGetTitleWithTitleArguments(): void {
     $this->pluginDefinition['title'] = (new TranslatableMarkup('Example @test', ['@test' => 'value'], [], $this->stringTranslation));
     $this->stringTranslation->expects($this->once())
       ->method('translateString')
diff --git a/core/tests/Drupal/Tests/Core/Menu/LocalActionManagerTest.php b/core/tests/Drupal/Tests/Core/Menu/LocalActionManagerTest.php
index b2ab4446e9b3..d3198aa31016 100644
--- a/core/tests/Drupal/Tests/Core/Menu/LocalActionManagerTest.php
+++ b/core/tests/Drupal/Tests/Core/Menu/LocalActionManagerTest.php
@@ -137,7 +137,7 @@ protected function setUp(): void {
   /**
    * @covers ::getTitle
    */
-  public function testGetTitle() {
+  public function testGetTitle(): void {
     $local_action = $this->createMock('Drupal\Core\Menu\LocalActionInterface');
     $local_action->expects($this->once())
       ->method('getTitle')
@@ -156,7 +156,7 @@ public function testGetTitle() {
    *
    * @dataProvider getActionsForRouteProvider
    */
-  public function testGetActionsForRoute($route_appears, array $plugin_definitions, array $expected_actions) {
+  public function testGetActionsForRoute($route_appears, array $plugin_definitions, array $expected_actions): void {
     $this->discovery->expects($this->any())
       ->method('getDefinitions')
       ->willReturn($plugin_definitions);
diff --git a/core/tests/Drupal/Tests/Core/Menu/LocalTaskDefaultTest.php b/core/tests/Drupal/Tests/Core/Menu/LocalTaskDefaultTest.php
index 223fb5a6d6cc..8548e3cee16d 100644
--- a/core/tests/Drupal/Tests/Core/Menu/LocalTaskDefaultTest.php
+++ b/core/tests/Drupal/Tests/Core/Menu/LocalTaskDefaultTest.php
@@ -83,7 +83,7 @@ protected function setupLocalTaskDefault() {
   /**
    * @covers ::getRouteParameters
    */
-  public function testGetRouteParametersForStaticRoute() {
+  public function testGetRouteParametersForStaticRoute(): void {
     $this->pluginDefinition = [
       'route_name' => 'test_route',
     ];
@@ -102,7 +102,7 @@ public function testGetRouteParametersForStaticRoute() {
   /**
    * @covers ::getRouteParameters
    */
-  public function testGetRouteParametersInPluginDefinitions() {
+  public function testGetRouteParametersInPluginDefinitions(): void {
     $this->pluginDefinition = [
       'route_name' => 'test_route',
       'route_parameters' => ['parameter' => 'example'],
@@ -122,7 +122,7 @@ public function testGetRouteParametersInPluginDefinitions() {
   /**
    * @covers ::getRouteParameters
    */
-  public function testGetRouteParametersForDynamicRouteWithNonUpcastedParameters() {
+  public function testGetRouteParametersForDynamicRouteWithNonUpcastedParameters(): void {
     $this->pluginDefinition = [
       'route_name' => 'test_route',
     ];
@@ -145,7 +145,7 @@ public function testGetRouteParametersForDynamicRouteWithNonUpcastedParameters()
    *
    * @covers ::getRouteParameters
    */
-  public function testGetRouteParametersForDynamicRouteWithUpcastedParameters() {
+  public function testGetRouteParametersForDynamicRouteWithUpcastedParameters(): void {
     $this->pluginDefinition = [
       'route_name' => 'test_route',
     ];
@@ -167,7 +167,7 @@ public function testGetRouteParametersForDynamicRouteWithUpcastedParameters() {
    *
    * @covers ::getRouteParameters
    */
-  public function testGetRouteParametersForDynamicRouteWithUpcastedParametersEmptyRawParameters() {
+  public function testGetRouteParametersForDynamicRouteWithUpcastedParametersEmptyRawParameters(): void {
     $this->pluginDefinition = [
       'route_name' => 'test_route',
     ];
@@ -231,7 +231,7 @@ public static function providerTestGetWeight() {
    * @dataProvider providerTestGetWeight
    * @covers ::getWeight
    */
-  public function testGetWeight($plugin_definition, $plugin_id, $expected_weight) {
+  public function testGetWeight($plugin_definition, $plugin_id, $expected_weight): void {
     $this->pluginDefinition = $plugin_definition;
     $this->pluginId = $plugin_id;
     $this->setupLocalTaskDefault();
@@ -243,7 +243,7 @@ public function testGetWeight($plugin_definition, $plugin_id, $expected_weight)
    * @covers ::getActive
    * @covers ::setActive
    */
-  public function testActive() {
+  public function testActive(): void {
     $this->setupLocalTaskDefault();
 
     $this->assertFalse($this->localTaskBase->getActive());
@@ -254,7 +254,7 @@ public function testActive() {
   /**
    * @covers ::getTitle
    */
-  public function testGetTitle() {
+  public function testGetTitle(): void {
     $this->pluginDefinition['title'] = (new TranslatableMarkup('Example', [], [], $this->stringTranslation));
     $this->stringTranslation->expects($this->once())
       ->method('translateString')
@@ -268,7 +268,7 @@ public function testGetTitle() {
   /**
    * @covers ::getTitle
    */
-  public function testGetTitleWithContext() {
+  public function testGetTitleWithContext(): void {
     $title = 'Example';
     $this->pluginDefinition['title'] = (new TranslatableMarkup($title, [], ['context' => 'context'], $this->stringTranslation));
     $this->stringTranslation->expects($this->once())
@@ -283,7 +283,7 @@ public function testGetTitleWithContext() {
   /**
    * @covers ::getTitle
    */
-  public function testGetTitleWithTitleArguments() {
+  public function testGetTitleWithTitleArguments(): void {
     $this->pluginDefinition['title'] = (new TranslatableMarkup('Example @test', ['@test' => 'value'], [], $this->stringTranslation));
     $this->stringTranslation->expects($this->once())
       ->method('translateString')
@@ -297,7 +297,7 @@ public function testGetTitleWithTitleArguments() {
   /**
    * @covers ::getOptions
    */
-  public function testGetOptions() {
+  public function testGetOptions(): void {
     $this->pluginDefinition['options'] = [
       'attributes' => ['class' => ['example']],
     ];
@@ -324,7 +324,7 @@ public function testGetOptions() {
    * @covers ::getCacheTags
    * @covers ::getCacheMaxAge
    */
-  public function testCacheabilityMetadata() {
+  public function testCacheabilityMetadata(): void {
     $this->pluginDefinition['cache_contexts'] = ['route'];
     $this->pluginDefinition['cache_tags'] = ['kitten'];
     $this->pluginDefinition['cache_max_age'] = 3600;
diff --git a/core/tests/Drupal/Tests/Core/Menu/LocalTaskManagerTest.php b/core/tests/Drupal/Tests/Core/Menu/LocalTaskManagerTest.php
index 5ee43089ad2a..582faf10d554 100644
--- a/core/tests/Drupal/Tests/Core/Menu/LocalTaskManagerTest.php
+++ b/core/tests/Drupal/Tests/Core/Menu/LocalTaskManagerTest.php
@@ -120,7 +120,7 @@ protected function setUp(): void {
    *
    * @see \Drupal\system\Plugin\Type\MenuLocalTaskManager::getLocalTasksForRoute()
    */
-  public function testGetLocalTasksForRouteSingleLevelTitle() {
+  public function testGetLocalTasksForRouteSingleLevelTitle(): void {
     $definitions = $this->getLocalTaskFixtures();
 
     $this->pluginDiscovery->expects($this->once())
@@ -144,7 +144,7 @@ public function testGetLocalTasksForRouteSingleLevelTitle() {
    *
    * @see \Drupal\system\Plugin\Type\MenuLocalTaskManager::getLocalTasksForRoute()
    */
-  public function testGetLocalTasksForRouteForChild() {
+  public function testGetLocalTasksForRouteForChild(): void {
     $definitions = $this->getLocalTaskFixtures();
 
     $this->pluginDiscovery->expects($this->once())
@@ -166,7 +166,7 @@ public function testGetLocalTasksForRouteForChild() {
   /**
    * Tests the cache of the local task manager with an empty initial cache.
    */
-  public function testGetLocalTaskForRouteWithEmptyCache() {
+  public function testGetLocalTaskForRouteWithEmptyCache(): void {
     $definitions = $this->getLocalTaskFixtures();
 
     $this->pluginDiscovery->expects($this->once())
@@ -197,7 +197,7 @@ public function testGetLocalTaskForRouteWithEmptyCache() {
   /**
    * Tests the cache of the local task manager with a filled initial cache.
    */
-  public function testGetLocalTaskForRouteWithFilledCache() {
+  public function testGetLocalTaskForRouteWithFilledCache(): void {
     $this->pluginDiscovery->expects($this->never())
       ->method('getDefinitions');
 
@@ -224,7 +224,7 @@ public function testGetLocalTaskForRouteWithFilledCache() {
    *
    * @see \Drupal\system\Plugin\Type\MenuLocalTaskManager::getTitle()
    */
-  public function testGetTitle() {
+  public function testGetTitle(): void {
     $menu_local_task = $this->createMock('Drupal\Core\Menu\LocalTaskInterface');
     $menu_local_task->expects($this->once())
       ->method('getTitle');
@@ -396,7 +396,7 @@ protected function getLocalTasksCache() {
   /**
    * @covers ::getTasksBuild
    */
-  public function testGetTasksBuildWithCacheabilityMetadata() {
+  public function testGetTasksBuildWithCacheabilityMetadata(): void {
     $definitions = $this->getLocalTaskFixtures();
 
     $this->pluginDiscovery->expects($this->once())
diff --git a/core/tests/Drupal/Tests/Core/Menu/MenuActiveTrailTest.php b/core/tests/Drupal/Tests/Core/Menu/MenuActiveTrailTest.php
index 54c2d22eb6b8..75727693a80a 100644
--- a/core/tests/Drupal/Tests/Core/Menu/MenuActiveTrailTest.php
+++ b/core/tests/Drupal/Tests/Core/Menu/MenuActiveTrailTest.php
@@ -142,7 +142,7 @@ public static function provider() {
    * @covers ::getActiveLink
    * @dataProvider provider
    */
-  public function testGetActiveLink(Request $request, $links, $menu_name, $expected_link) {
+  public function testGetActiveLink(Request $request, $links, $menu_name, $expected_link): void {
     $this->requestStack->push($request);
     if ($links !== FALSE) {
       $this->menuLinkManager->expects($this->exactly(2))
@@ -162,7 +162,7 @@ public function testGetActiveLink(Request $request, $links, $menu_name, $expecte
    * @covers ::getActiveTrailIds
    * @dataProvider provider
    */
-  public function testGetActiveTrailIds(Request $request, $links, $menu_name, $expected_link, $expected_trail) {
+  public function testGetActiveTrailIds(Request $request, $links, $menu_name, $expected_link, $expected_trail): void {
     $expected_trail_ids = array_combine($expected_trail, $expected_trail);
 
     $this->requestStack->push($request);
@@ -195,7 +195,7 @@ public function testGetActiveTrailIds(Request $request, $links, $menu_name, $exp
    *
    * @covers ::getCid
    */
-  public function testGetCid() {
+  public function testGetCid(): void {
     $data = $this->provider()[1];
     /** @var \Symfony\Component\HttpFoundation\Request $request */
     $request = $data[0];
diff --git a/core/tests/Drupal/Tests/Core/Menu/MenuLinkDefaultFormTest.php b/core/tests/Drupal/Tests/Core/Menu/MenuLinkDefaultFormTest.php
index f1ab40a3bfe0..c7aa74483695 100644
--- a/core/tests/Drupal/Tests/Core/Menu/MenuLinkDefaultFormTest.php
+++ b/core/tests/Drupal/Tests/Core/Menu/MenuLinkDefaultFormTest.php
@@ -24,7 +24,7 @@ class MenuLinkDefaultFormTest extends UnitTestCase {
   /**
    * @covers ::extractFormValues
    */
-  public function testExtractFormValues() {
+  public function testExtractFormValues(): void {
     $menu_link_manager = $this->prophesize(MenuLinkManagerInterface::class);
     $menu_parent_form_selector = $this->prophesize(MenuParentFormSelectorInterface::class);
     $module_handler = $this->prophesize(ModuleHandlerInterface::class);
diff --git a/core/tests/Drupal/Tests/Core/Menu/MenuLinkDefaultTest.php b/core/tests/Drupal/Tests/Core/Menu/MenuLinkDefaultTest.php
index 2e300cfffad8..11519f5a6f04 100644
--- a/core/tests/Drupal/Tests/Core/Menu/MenuLinkDefaultTest.php
+++ b/core/tests/Drupal/Tests/Core/Menu/MenuLinkDefaultTest.php
@@ -17,7 +17,7 @@ class MenuLinkDefaultTest extends UnitTestCase {
   /**
    * @covers ::updateLink
    */
-  public function testUpdateLink() {
+  public function testUpdateLink(): void {
     $plugin_definition = [
       'title' => 'Hey jude',
       'enabled' => 1,
@@ -41,7 +41,7 @@ public function testUpdateLink() {
   /**
    * @covers ::updateLink
    */
-  public function testUpdateLinkWithoutPersist() {
+  public function testUpdateLinkWithoutPersist(): void {
     $plugin_definition = [
       'title' => 'Hey jude',
       'enabled' => 1,
diff --git a/core/tests/Drupal/Tests/Core/Menu/MenuLinkTreeElementTest.php b/core/tests/Drupal/Tests/Core/Menu/MenuLinkTreeElementTest.php
index 720b0da0381c..c378ea39951b 100644
--- a/core/tests/Drupal/Tests/Core/Menu/MenuLinkTreeElementTest.php
+++ b/core/tests/Drupal/Tests/Core/Menu/MenuLinkTreeElementTest.php
@@ -21,7 +21,7 @@ class MenuLinkTreeElementTest extends UnitTestCase {
    *
    * @covers ::__construct
    */
-  public function testConstruction() {
+  public function testConstruction(): void {
     $link = MenuLinkMock::create(['id' => 'test']);
     $item = new MenuLinkTreeElement($link, FALSE, 3, FALSE, []);
     $this->assertSame($link, $item->link);
@@ -36,7 +36,7 @@ public function testConstruction() {
    *
    * @covers ::count
    */
-  public function testCount() {
+  public function testCount(): void {
     $link_1 = MenuLinkMock::create(['id' => 'test_1']);
     $link_2 = MenuLinkMock::create(['id' => 'test_2']);
     $child_item = new MenuLinkTreeElement($link_2, FALSE, 2, FALSE, []);
diff --git a/core/tests/Drupal/Tests/Core/Menu/MenuTreeParametersTest.php b/core/tests/Drupal/Tests/Core/Menu/MenuTreeParametersTest.php
index bc63907c88ee..cd467b61f62e 100644
--- a/core/tests/Drupal/Tests/Core/Menu/MenuTreeParametersTest.php
+++ b/core/tests/Drupal/Tests/Core/Menu/MenuTreeParametersTest.php
@@ -46,7 +46,7 @@ public static function providerTestSetMinDepth() {
    * @covers ::setMinDepth
    * @dataProvider providerTestSetMinDepth
    */
-  public function testSetMinDepth($min_depth, $expected) {
+  public function testSetMinDepth($min_depth, $expected): void {
     $parameters = new MenuTreeParameters();
     $parameters->setMinDepth($min_depth);
     $this->assertEquals($expected, $parameters->minDepth);
@@ -57,7 +57,7 @@ public function testSetMinDepth($min_depth, $expected) {
    *
    * @covers ::addExpandedParents
    */
-  public function testAddExpanded() {
+  public function testAddExpanded(): void {
     $parameters = new MenuTreeParameters();
 
     // Verify default value.
@@ -83,7 +83,7 @@ public function testAddExpanded() {
    *
    * @covers ::addCondition
    */
-  public function testAddCondition() {
+  public function testAddCondition(): void {
     $parameters = new MenuTreeParameters();
 
     // Verify default value.
@@ -116,7 +116,7 @@ public function testAddCondition() {
    *
    * @covers ::onlyEnabledLinks
    */
-  public function testOnlyEnabledLinks() {
+  public function testOnlyEnabledLinks(): void {
     $parameters = new MenuTreeParameters();
     $parameters->onlyEnabledLinks();
     $this->assertEquals(1, $parameters->conditions['enabled']);
@@ -127,7 +127,7 @@ public function testOnlyEnabledLinks() {
    *
    * @covers ::setTopLevelOnly
    */
-  public function testSetTopLevelOnly() {
+  public function testSetTopLevelOnly(): void {
     $parameters = new MenuTreeParameters();
     $parameters->setTopLevelOnly();
     $this->assertEquals(1, $parameters->maxDepth);
@@ -138,7 +138,7 @@ public function testSetTopLevelOnly() {
    *
    * @covers ::excludeRoot
    */
-  public function testExcludeRoot() {
+  public function testExcludeRoot(): void {
     $parameters = new MenuTreeParameters();
     $parameters->excludeRoot();
     $this->assertEquals(1, $parameters->minDepth);
@@ -148,7 +148,7 @@ public function testExcludeRoot() {
    * @covers ::serialize
    * @covers ::unserialize
    */
-  public function testSerialize() {
+  public function testSerialize(): void {
     $parameters = new MenuTreeParameters();
     $parameters->setRoot(1);
     $parameters->setMinDepth('2');
diff --git a/core/tests/Drupal/Tests/Core/Menu/StaticMenuLinkOverridesTest.php b/core/tests/Drupal/Tests/Core/Menu/StaticMenuLinkOverridesTest.php
index 7e5acedecc64..f934071037c7 100644
--- a/core/tests/Drupal/Tests/Core/Menu/StaticMenuLinkOverridesTest.php
+++ b/core/tests/Drupal/Tests/Core/Menu/StaticMenuLinkOverridesTest.php
@@ -18,7 +18,7 @@ class StaticMenuLinkOverridesTest extends UnitTestCase {
    *
    * @covers ::reload
    */
-  public function testReload() {
+  public function testReload(): void {
     $config_factory = $this->createMock('Drupal\Core\Config\ConfigFactoryInterface');
     $config_factory->expects($this->once())
       ->method('reset')
@@ -37,7 +37,7 @@ public function testReload() {
    * @covers ::loadOverride
    * @covers ::getConfig
    */
-  public function testLoadOverride($overrides, $id, $expected) {
+  public function testLoadOverride($overrides, $id, $expected): void {
     $config_factory = $this->getConfigFactoryStub(['core.menu.static_menu_link_overrides' => ['definitions' => $overrides]]);
     $static_override = new StaticMenuLinkOverrides($config_factory);
 
@@ -65,7 +65,7 @@ public static function providerTestLoadOverride() {
    * @covers ::loadMultipleOverrides
    * @covers ::getConfig
    */
-  public function testLoadMultipleOverrides() {
+  public function testLoadMultipleOverrides(): void {
     $overrides = [];
     $overrides['test1'] = ['parent' => 'test0'];
     $overrides['test2'] = ['parent' => 'test1'];
@@ -84,7 +84,7 @@ public function testLoadMultipleOverrides() {
    * @covers ::loadOverride
    * @covers ::getConfig
    */
-  public function testSaveOverride() {
+  public function testSaveOverride(): void {
     $config = $this->getMockBuilder('Drupal\Core\Config\Config')
       ->disableOriginalConstructor()
       ->getMock();
@@ -146,7 +146,7 @@ public function testSaveOverride() {
    *
    * @dataProvider providerTestDeleteOverrides
    */
-  public function testDeleteOverrides($ids, array $old_definitions, array $new_definitions) {
+  public function testDeleteOverrides($ids, array $old_definitions, array $new_definitions): void {
     $config = $this->getMockBuilder('Drupal\Core\Config\Config')
       ->disableOriginalConstructor()
       ->getMock();
diff --git a/core/tests/Drupal/Tests/Core/PageCache/ChainRequestPolicyTest.php b/core/tests/Drupal/Tests/Core/PageCache/ChainRequestPolicyTest.php
index 227cfc835332..2b143781956a 100644
--- a/core/tests/Drupal/Tests/Core/PageCache/ChainRequestPolicyTest.php
+++ b/core/tests/Drupal/Tests/Core/PageCache/ChainRequestPolicyTest.php
@@ -44,7 +44,7 @@ protected function setUp(): void {
    *
    * @covers ::check
    */
-  public function testEmptyChain() {
+  public function testEmptyChain(): void {
     $result = $this->policy->check($this->request);
     $this->assertNull($result);
   }
@@ -54,7 +54,7 @@ public function testEmptyChain() {
    *
    * @covers ::check
    */
-  public function testNullRuleChain() {
+  public function testNullRuleChain(): void {
     $rule = $this->createMock('Drupal\Core\PageCache\RequestPolicyInterface');
     $rule->expects($this->once())
       ->method('check')
@@ -73,7 +73,7 @@ public function testNullRuleChain() {
    * @dataProvider providerChainExceptionOnInvalidReturnValue
    * @covers ::check
    */
-  public function testChainExceptionOnInvalidReturnValue($return_value) {
+  public function testChainExceptionOnInvalidReturnValue($return_value): void {
     $rule = $this->createMock('Drupal\Core\PageCache\RequestPolicyInterface');
     $rule->expects($this->once())
       ->method('check')
@@ -109,7 +109,7 @@ public static function providerChainExceptionOnInvalidReturnValue() {
    * @dataProvider providerAllowIfAnyRuleReturnedAllow
    * @covers ::check
    */
-  public function testAllowIfAnyRuleReturnedAllow($return_values) {
+  public function testAllowIfAnyRuleReturnedAllow($return_values): void {
     foreach ($return_values as $return_value) {
       $rule = $this->createMock('Drupal\Core\PageCache\RequestPolicyInterface');
       $rule->expects($this->once())
@@ -140,7 +140,7 @@ public static function providerAllowIfAnyRuleReturnedAllow() {
   /**
    * Asserts that check() returns immediately when a rule returned DENY.
    */
-  public function testStopChainOnFirstDeny() {
+  public function testStopChainOnFirstDeny(): void {
     $rule1 = $this->createMock('Drupal\Core\PageCache\RequestPolicyInterface');
     $rule1->expects($this->once())
       ->method('check')
diff --git a/core/tests/Drupal/Tests/Core/PageCache/ChainResponsePolicyTest.php b/core/tests/Drupal/Tests/Core/PageCache/ChainResponsePolicyTest.php
index 377d5a16d5fa..9b4d77d78594 100644
--- a/core/tests/Drupal/Tests/Core/PageCache/ChainResponsePolicyTest.php
+++ b/core/tests/Drupal/Tests/Core/PageCache/ChainResponsePolicyTest.php
@@ -53,7 +53,7 @@ protected function setUp(): void {
    *
    * @covers ::check
    */
-  public function testEmptyChain() {
+  public function testEmptyChain(): void {
     $result = $this->policy->check($this->response, $this->request);
     $this->assertNull($result);
   }
@@ -63,7 +63,7 @@ public function testEmptyChain() {
    *
    * @covers ::check
    */
-  public function testNullRuleChain() {
+  public function testNullRuleChain(): void {
     $rule = $this->createMock('Drupal\Core\PageCache\ResponsePolicyInterface');
     $rule->expects($this->once())
       ->method('check')
@@ -82,7 +82,7 @@ public function testNullRuleChain() {
    * @dataProvider providerChainExceptionOnInvalidReturnValue
    * @covers ::check
    */
-  public function testChainExceptionOnInvalidReturnValue($return_value) {
+  public function testChainExceptionOnInvalidReturnValue($return_value): void {
     $rule = $this->createMock('Drupal\Core\PageCache\ResponsePolicyInterface');
     $rule->expects($this->once())
       ->method('check')
@@ -115,7 +115,7 @@ public static function providerChainExceptionOnInvalidReturnValue() {
   /**
    * Asserts that check() returns immediately when a rule returned DENY.
    */
-  public function testStopChainOnFirstDeny() {
+  public function testStopChainOnFirstDeny(): void {
     $rule1 = $this->createMock('Drupal\Core\PageCache\ResponsePolicyInterface');
     $rule1->expects($this->once())
       ->method('check')
diff --git a/core/tests/Drupal/Tests/Core/PageCache/CommandLineOrUnsafeMethodTest.php b/core/tests/Drupal/Tests/Core/PageCache/CommandLineOrUnsafeMethodTest.php
index 99eb53cd7332..ca09b31d162d 100644
--- a/core/tests/Drupal/Tests/Core/PageCache/CommandLineOrUnsafeMethodTest.php
+++ b/core/tests/Drupal/Tests/Core/PageCache/CommandLineOrUnsafeMethodTest.php
@@ -40,7 +40,7 @@ protected function setUp(): void {
    * @dataProvider providerTestHttpMethod
    * @covers ::check
    */
-  public function testHttpMethod($expected_result, $method) {
+  public function testHttpMethod($expected_result, $method): void {
     $this->policy->expects($this->once())
       ->method('isCli')
       ->willReturn(FALSE);
@@ -74,7 +74,7 @@ public static function providerTestHttpMethod() {
    *
    * @covers ::check
    */
-  public function testIsCli() {
+  public function testIsCli(): void {
     $this->policy->expects($this->once())
       ->method('isCli')
       ->willReturn(TRUE);
diff --git a/core/tests/Drupal/Tests/Core/PageCache/NoSessionOpenTest.php b/core/tests/Drupal/Tests/Core/PageCache/NoSessionOpenTest.php
index 026705cc9863..2cff1b719840 100644
--- a/core/tests/Drupal/Tests/Core/PageCache/NoSessionOpenTest.php
+++ b/core/tests/Drupal/Tests/Core/PageCache/NoSessionOpenTest.php
@@ -44,7 +44,7 @@ protected function setUp(): void {
    *
    * @covers ::check
    */
-  public function testNoAllowUnlessSessionCookiePresent() {
+  public function testNoAllowUnlessSessionCookiePresent(): void {
     $request_without_session = new Request();
     $request_with_session = Request::create('/', 'GET', [], ['some-session-name' => 'some-session-id']);
 
diff --git a/core/tests/Drupal/Tests/Core/ParamConverter/EntityConverterTest.php b/core/tests/Drupal/Tests/Core/ParamConverter/EntityConverterTest.php
index c5717ffa231f..e0043a8467d9 100644
--- a/core/tests/Drupal/Tests/Core/ParamConverter/EntityConverterTest.php
+++ b/core/tests/Drupal/Tests/Core/ParamConverter/EntityConverterTest.php
@@ -148,7 +148,7 @@ protected function setUpMocks($service_map = []) {
    *
    * @covers ::applies
    */
-  public function testApplies(array $definition, $name, Route $route, $applies) {
+  public function testApplies(array $definition, $name, Route $route, $applies): void {
     $this->entityTypeManager->expects($this->any())
       ->method('hasDefinition')
       ->willReturnCallback(function ($entity_type) {
@@ -179,7 +179,7 @@ public static function providerTestApplies() {
    *
    * @covers ::convert
    */
-  public function testConvert($value, array $definition, array $defaults, $expected_result) {
+  public function testConvert($value, array $definition, array $defaults, $expected_result): void {
     $this->setUpMocks();
 
     $this->entityRepository->expects($this->any())
@@ -209,7 +209,7 @@ public static function providerTestConvert() {
   /**
    * Tests the convert() method with an invalid entity type.
    */
-  public function testConvertWithInvalidEntityType() {
+  public function testConvertWithInvalidEntityType(): void {
     $this->setUpMocks();
 
     $plugin_id = 'invalid_id';
@@ -227,7 +227,7 @@ public function testConvertWithInvalidEntityType() {
   /**
    * Tests the convert() method with an invalid dynamic entity type.
    */
-  public function testConvertWithInvalidDynamicEntityType() {
+  public function testConvertWithInvalidDynamicEntityType(): void {
     $this->expectException(ParamNotConvertedException::class);
     $this->expectExceptionMessage('The "foo" parameter was not converted because the "invalid_id" parameter is missing.');
     $this->entityConverter->convert('id', ['type' => 'entity:{invalid_id}'], 'foo', ['foo' => 'id']);
diff --git a/core/tests/Drupal/Tests/Core/ParamConverter/EntityRevisionParamConverterTest.php b/core/tests/Drupal/Tests/Core/ParamConverter/EntityRevisionParamConverterTest.php
index 37101bcdcc12..1b712bd7ebbc 100644
--- a/core/tests/Drupal/Tests/Core/ParamConverter/EntityRevisionParamConverterTest.php
+++ b/core/tests/Drupal/Tests/Core/ParamConverter/EntityRevisionParamConverterTest.php
@@ -51,7 +51,7 @@ protected function getTestRoute() {
   /**
    * @covers ::applies
    */
-  public function testNonApplyingRoute() {
+  public function testNonApplyingRoute(): void {
     $route = new Route('/test');
     $this->assertFalse($this->converter->applies([], 'test_revision', $route));
   }
@@ -59,7 +59,7 @@ public function testNonApplyingRoute() {
   /**
    * @covers ::applies
    */
-  public function testApplyingRoute() {
+  public function testApplyingRoute(): void {
     $route = $this->getTestRoute();
     $this->assertTrue($this->converter->applies($route->getOption('parameters')['test_revision'], 'test_revision', $route));
   }
@@ -71,7 +71,7 @@ public function testApplyingRoute() {
    *
    * @covers ::convert
    */
-  public function testConvert($value, array $definition, array $defaults, $expected_result) {
+  public function testConvert($value, array $definition, array $defaults, $expected_result): void {
     $storage = $this->prophesize(RevisionableStorageInterface::class);
     $storage->loadRevision('valid_id')->willReturn((object) ['revision_id' => 'valid_id']);
     $storage->loadRevision('invalid_id')->willReturn(NULL);
@@ -105,7 +105,7 @@ public static function providerTestConvert() {
    *
    * @covers ::convert
    */
-  public function testConvertWithInvalidEntityType() {
+  public function testConvertWithInvalidEntityType(): void {
     $entity_type_manager = $this->prophesize(EntityTypeManagerInterface::class);
     $entity_type_manager->getStorage('invalid_entity_type_id')->willThrow(new InvalidPluginDefinitionException('invalid_entity_type_id'));
     $entity_repository = $this->prophesize(EntityRepositoryInterface::class);
@@ -120,7 +120,7 @@ public function testConvertWithInvalidEntityType() {
    *
    * @covers ::convert
    */
-  public function testConvertWithInvalidType() {
+  public function testConvertWithInvalidType(): void {
     $this->expectException(ParamNotConvertedException::class);
     $this->expectExceptionMessage('The type definition "entity_revision_{entity_type_id}" is invalid. The expected format is "entity_revision:<entity_type_id>".');
     $this->converter->convert('valid_id', ['type' => 'entity_revision_{entity_type_id}'], 'foo', ['foo' => 'valid_id']);
@@ -131,7 +131,7 @@ public function testConvertWithInvalidType() {
    *
    * @covers ::convert
    */
-  public function testConvertWithInvalidDynamicEntityType() {
+  public function testConvertWithInvalidDynamicEntityType(): void {
     $this->expectException(ParamNotConvertedException::class);
     $this->expectExceptionMessage('The "foo" parameter was not converted because the "invalid_entity_type_id" parameter is missing.');
     $this->converter->convert('valid_id', ['type' => 'entity_revision:{invalid_entity_type_id}'], 'foo', ['foo' => 'valid_id']);
diff --git a/core/tests/Drupal/Tests/Core/ParamConverter/ParamConverterManagerTest.php b/core/tests/Drupal/Tests/Core/ParamConverter/ParamConverterManagerTest.php
index e518f99e6eff..f48e26295e17 100644
--- a/core/tests/Drupal/Tests/Core/ParamConverter/ParamConverterManagerTest.php
+++ b/core/tests/Drupal/Tests/Core/ParamConverter/ParamConverterManagerTest.php
@@ -38,7 +38,7 @@ protected function setUp(): void {
    *
    * @covers ::getConverter
    */
-  public function testGetConverter($name, $class) {
+  public function testGetConverter($name, $class): void {
     $converter = $this->getMockBuilder('Drupal\Core\ParamConverter\ParamConverterInterface')
       ->setMockClassName($class)
       ->getMock();
@@ -55,7 +55,7 @@ public function testGetConverter($name, $class) {
    *
    * @covers ::getConverter
    */
-  public function testGetConverterException() {
+  public function testGetConverterException(): void {
     $this->expectException(\InvalidArgumentException::class);
     $this->manager->getConverter('undefined.converter');
   }
@@ -129,7 +129,7 @@ public static function providerTestGetConverter() {
    *
    * @dataProvider providerTestSetRouteParameterConverters
    */
-  public function testSetRouteParameterConverters($path, $parameters = NULL, $expected = NULL) {
+  public function testSetRouteParameterConverters($path, $parameters = NULL, $expected = NULL): void {
     $converter = $this->createMock('Drupal\Core\ParamConverter\ParamConverterInterface');
     $converter->expects($this->any())
       ->method('applies')
@@ -170,7 +170,7 @@ public static function providerTestSetRouteParameterConverters() {
   /**
    * @covers ::convert
    */
-  public function testConvert() {
+  public function testConvert(): void {
     $route = new Route('/test/{id}/{literal}/{null}');
     $parameters = [
       'id' => [
@@ -207,7 +207,7 @@ public function testConvert() {
   /**
    * @covers ::convert
    */
-  public function testConvertNoConverting() {
+  public function testConvertNoConverting(): void {
     $route = new Route('/test');
     $defaults = [
       RouteObjectInterface::ROUTE_OBJECT => $route,
@@ -223,7 +223,7 @@ public function testConvertNoConverting() {
   /**
    * @covers ::convert
    */
-  public function testConvertMissingParam() {
+  public function testConvertMissingParam(): void {
     $route = new Route('/test/{id}');
     $parameters = [
       'id' => [
diff --git a/core/tests/Drupal/Tests/Core/Password/DefaultPasswordGeneratorTest.php b/core/tests/Drupal/Tests/Core/Password/DefaultPasswordGeneratorTest.php
index aa8db53413ef..43659958e1d8 100644
--- a/core/tests/Drupal/Tests/Core/Password/DefaultPasswordGeneratorTest.php
+++ b/core/tests/Drupal/Tests/Core/Password/DefaultPasswordGeneratorTest.php
@@ -18,7 +18,7 @@ class DefaultPasswordGeneratorTest extends UnitTestCase {
   /**
    * @covers ::generate
    */
-  public function testGenerate() {
+  public function testGenerate(): void {
     $generator = new DefaultPasswordGenerator();
     $password = $generator->generate();
     $this->assertEquals(10, strlen($password));
diff --git a/core/tests/Drupal/Tests/Core/Password/PhpPasswordTest.php b/core/tests/Drupal/Tests/Core/Password/PhpPasswordTest.php
index ec62177e9679..1cbfc0c7d603 100644
--- a/core/tests/Drupal/Tests/Core/Password/PhpPasswordTest.php
+++ b/core/tests/Drupal/Tests/Core/Password/PhpPasswordTest.php
@@ -47,7 +47,7 @@ protected function setUp(): void {
    * @covers ::hash
    * @covers ::needsRehash
    */
-  public function testPasswordNeedsUpdate() {
+  public function testPasswordNeedsUpdate(): void {
     $weakHash = (new PhpPassword(PASSWORD_BCRYPT, ['cost' => 4]))->hash($this->password);
     $this->assertTrue($this->passwordHasher->needsRehash($weakHash), 'Password hash with weak cost settings needs a new hash.');
   }
@@ -58,7 +58,7 @@ public function testPasswordNeedsUpdate() {
    * @covers ::check
    * @covers ::needsRehash
    */
-  public function testPasswordChecking() {
+  public function testPasswordChecking(): void {
     $this->assertTrue($this->passwordHasher->check($this->password, $this->passwordHash), 'Password check succeeds.');
     $this->assertFalse($this->passwordHasher->needsRehash($this->passwordHash), 'Does not need a new hash.');
   }
@@ -70,7 +70,7 @@ public function testPasswordChecking() {
    * @covers ::check
    * @covers ::needsRehash
    */
-  public function testPasswordRehashing() {
+  public function testPasswordRehashing(): void {
     // Increment the cost by one.
     $strongHasher = new PhpPassword(PASSWORD_BCRYPT, ['cost' => 6]);
     $this->assertTrue($strongHasher->needsRehash($this->passwordHash), 'Needs a new hash after incrementing the cost option.');
@@ -91,7 +91,7 @@ public function testPasswordRehashing() {
    *
    * @dataProvider providerLongPasswords
    */
-  public function testLongPassword($password, $allowed) {
+  public function testLongPassword($password, $allowed): void {
 
     $passwordHash = $this->passwordHasher->hash($password);
 
diff --git a/core/tests/Drupal/Tests/Core/Path/PathMatcherTest.php b/core/tests/Drupal/Tests/Core/Path/PathMatcherTest.php
index 1213e9e35095..13ab4f0b2c96 100644
--- a/core/tests/Drupal/Tests/Core/Path/PathMatcherTest.php
+++ b/core/tests/Drupal/Tests/Core/Path/PathMatcherTest.php
@@ -44,7 +44,7 @@ protected function setUp(): void {
    *
    * @dataProvider getMatchPathData
    */
-  public function testMatchPath($patterns, $paths) {
+  public function testMatchPath($patterns, $paths): void {
     foreach ($paths as $path => $expected_result) {
       $actual_result = $this->pathMatcher->matchPath($path, $patterns);
       $this->assertEquals($actual_result, $expected_result, "Tried matching the path '$path' to the pattern '$patterns'.");
diff --git a/core/tests/Drupal/Tests/Core/Path/PathValidatorTest.php b/core/tests/Drupal/Tests/Core/Path/PathValidatorTest.php
index 3391aeb94247..b7b25b5f85dc 100644
--- a/core/tests/Drupal/Tests/Core/Path/PathValidatorTest.php
+++ b/core/tests/Drupal/Tests/Core/Path/PathValidatorTest.php
@@ -71,7 +71,7 @@ protected function setUp(): void {
    *
    * @covers ::isValid
    */
-  public function testIsValidWithFrontpage() {
+  public function testIsValidWithFrontpage(): void {
     $this->accessAwareRouter->expects($this->never())
       ->method('match');
 
@@ -83,7 +83,7 @@ public function testIsValidWithFrontpage() {
    *
    * @covers ::isValid
    */
-  public function testIsValidWithNone() {
+  public function testIsValidWithNone(): void {
     $this->accessAwareRouter->expects($this->never())
       ->method('match');
 
@@ -95,7 +95,7 @@ public function testIsValidWithNone() {
    *
    * @covers ::isValid
    */
-  public function testIsValidWithExternalUrl() {
+  public function testIsValidWithExternalUrl(): void {
     $this->accessAwareRouter->expects($this->never())
       ->method('match');
 
@@ -107,7 +107,7 @@ public function testIsValidWithExternalUrl() {
    *
    * @covers ::isValid
    */
-  public function testIsValidWithInvalidExternalUrl() {
+  public function testIsValidWithInvalidExternalUrl(): void {
     $this->accessAwareRouter->expects($this->never())
       ->method('match');
 
@@ -120,7 +120,7 @@ public function testIsValidWithInvalidExternalUrl() {
    * @covers ::isValid
    * @covers ::getPathAttributes
    */
-  public function testIsValidWithLinkToAnyPageAccount() {
+  public function testIsValidWithLinkToAnyPageAccount(): void {
     $this->account->expects($this->once())
       ->method('hasPermission')
       ->with('link to any page')
@@ -143,7 +143,7 @@ public function testIsValidWithLinkToAnyPageAccount() {
    *
    * @covers ::isValid
    */
-  public function testIsValidWithoutLinkToAnyPageAccount() {
+  public function testIsValidWithoutLinkToAnyPageAccount(): void {
     $this->account->expects($this->once())
       ->method('hasPermission')
       ->with('link to any page')
@@ -166,7 +166,7 @@ public function testIsValidWithoutLinkToAnyPageAccount() {
    *
    * @covers ::isValid
    */
-  public function testIsValidWithPathAlias() {
+  public function testIsValidWithPathAlias(): void {
     $this->account->expects($this->once())
       ->method('hasPermission')
       ->with('link to any page')
@@ -191,7 +191,7 @@ public function testIsValidWithPathAlias() {
    * @covers ::isValid
    * @covers ::getPathAttributes
    */
-  public function testIsValidWithAccessDenied() {
+  public function testIsValidWithAccessDenied(): void {
     $this->account->expects($this->once())
       ->method('hasPermission')
       ->with('link to any page')
@@ -213,7 +213,7 @@ public function testIsValidWithAccessDenied() {
    * @covers ::isValid
    * @covers ::getPathAttributes
    */
-  public function testIsValidWithResourceNotFound() {
+  public function testIsValidWithResourceNotFound(): void {
     $this->account->expects($this->once())
       ->method('hasPermission')
       ->with('link to any page')
@@ -235,7 +235,7 @@ public function testIsValidWithResourceNotFound() {
    * @covers ::isValid
    * @covers ::getPathAttributes
    */
-  public function testIsValidWithParamNotConverted() {
+  public function testIsValidWithParamNotConverted(): void {
     $this->account->expects($this->once())
       ->method('hasPermission')
       ->with('link to any page')
@@ -257,7 +257,7 @@ public function testIsValidWithParamNotConverted() {
    * @covers ::isValid
    * @covers ::getPathAttributes
    */
-  public function testIsValidWithMethodNotAllowed() {
+  public function testIsValidWithMethodNotAllowed(): void {
     $this->account->expects($this->once())
       ->method('hasPermission')
       ->with('link to any page')
@@ -280,7 +280,7 @@ public function testIsValidWithMethodNotAllowed() {
    *
    * @covers ::isValid
    */
-  public function testIsValidWithFailingParameterConverting() {
+  public function testIsValidWithFailingParameterConverting(): void {
     $this->account->expects($this->once())
       ->method('hasPermission')
       ->with('link to any page')
@@ -303,7 +303,7 @@ public function testIsValidWithFailingParameterConverting() {
    *
    * @covers ::isValid
    */
-  public function testIsValidWithNotExistingPath() {
+  public function testIsValidWithNotExistingPath(): void {
     $this->account->expects($this->once())
       ->method('hasPermission')
       ->with('link to any page')
@@ -327,7 +327,7 @@ public function testIsValidWithNotExistingPath() {
    * @covers ::getUrlIfValid
    * @covers ::getPathAttributes
    */
-  public function testGetUrlIfValidWithAccess() {
+  public function testGetUrlIfValidWithAccess(): void {
     $this->account->expects($this->exactly(2))
       ->method('hasPermission')
       ->with('link to any page')
@@ -360,7 +360,7 @@ public function testGetUrlIfValidWithAccess() {
    *
    * @covers ::getUrlIfValid
    */
-  public function testGetUrlIfValidWithQuery() {
+  public function testGetUrlIfValidWithQuery(): void {
     $this->account->expects($this->once())
       ->method('hasPermission')
       ->with('link to any page')
@@ -386,7 +386,7 @@ public function testGetUrlIfValidWithQuery() {
    *
    * @covers ::getUrlIfValid
    */
-  public function testGetUrlIfValidWithoutAccess() {
+  public function testGetUrlIfValidWithoutAccess(): void {
     $this->account->expects($this->once())
       ->method('hasPermission')
       ->with('link to any page')
@@ -410,7 +410,7 @@ public function testGetUrlIfValidWithoutAccess() {
    *
    * @covers ::getUrlIfValid
    */
-  public function testGetUrlIfValidWithFrontPageAndQueryAndFragments() {
+  public function testGetUrlIfValidWithFrontPageAndQueryAndFragments(): void {
     $url = $this->pathValidator->getUrlIfValid('<front>?hei=sen#berg');
     $this->assertEquals('<front>', $url->getRouteName());
     $this->assertEquals(['hei' => 'sen'], $url->getOptions()['query']);
@@ -423,7 +423,7 @@ public function testGetUrlIfValidWithFrontPageAndQueryAndFragments() {
    * @covers ::getUrlIfValidWithoutAccessCheck
    * @covers ::getPathAttributes
    */
-  public function testGetUrlIfValidWithoutAccessCheck() {
+  public function testGetUrlIfValidWithoutAccessCheck(): void {
     $this->account->expects($this->never())
       ->method('hasPermission')
       ->with('link to any page');
diff --git a/core/tests/Drupal/Tests/Core/PathProcessor/PathProcessorFrontTest.php b/core/tests/Drupal/Tests/Core/PathProcessor/PathProcessorFrontTest.php
index 9cdd35e54e9a..9fbee0465dc2 100644
--- a/core/tests/Drupal/Tests/Core/PathProcessor/PathProcessorFrontTest.php
+++ b/core/tests/Drupal/Tests/Core/PathProcessor/PathProcessorFrontTest.php
@@ -25,7 +25,7 @@ class PathProcessorFrontTest extends UnitTestCase {
    * @covers ::processInbound
    * @dataProvider providerProcessInbound
    */
-  public function testProcessInbound($frontpage_path, $path, $expected, array $expected_query = []) {
+  public function testProcessInbound($frontpage_path, $path, $expected, array $expected_query = []): void {
     $config_factory = $this->prophesize(ConfigFactoryInterface::class);
     $config = $this->prophesize(ImmutableConfig::class);
     $config_factory->get('system.site')
@@ -58,7 +58,7 @@ public static function providerProcessInbound() {
    *
    * @covers ::processInbound
    */
-  public function testProcessInboundBadConfig() {
+  public function testProcessInboundBadConfig(): void {
     $config_factory = $this->prophesize(ConfigFactoryInterface::class);
     $config = $this->prophesize(ImmutableConfig::class);
     $config_factory->get('system.site')
diff --git a/core/tests/Drupal/Tests/Core/PathProcessor/PathProcessorTest.php b/core/tests/Drupal/Tests/Core/PathProcessor/PathProcessorTest.php
index a7018c32b520..b5b80a1bf0e4 100644
--- a/core/tests/Drupal/Tests/Core/PathProcessor/PathProcessorTest.php
+++ b/core/tests/Drupal/Tests/Core/PathProcessor/PathProcessorTest.php
@@ -78,7 +78,7 @@ protected function setUp(): void {
   /**
    * Tests resolving the inbound path to the system path.
    */
-  public function testProcessInbound() {
+  public function testProcessInbound(): void {
 
     // Create an alias manager stub.
     $alias_manager = $this->getMockBuilder(AliasManager::class)
diff --git a/core/tests/Drupal/Tests/Core/Plugin/CategorizingPluginManagerTraitTest.php b/core/tests/Drupal/Tests/Core/Plugin/CategorizingPluginManagerTraitTest.php
index 6ea9efd4ea2f..a7de9884d9c5 100644
--- a/core/tests/Drupal/Tests/Core/Plugin/CategorizingPluginManagerTraitTest.php
+++ b/core/tests/Drupal/Tests/Core/Plugin/CategorizingPluginManagerTraitTest.php
@@ -52,7 +52,7 @@ protected function setUp(): void {
   /**
    * @covers ::getCategories
    */
-  public function testGetCategories() {
+  public function testGetCategories(): void {
     $this->assertSame([
       'fruits',
       'vegetables',
@@ -62,7 +62,7 @@ public function testGetCategories() {
   /**
    * @covers ::getSortedDefinitions
    */
-  public function testGetSortedDefinitions() {
+  public function testGetSortedDefinitions(): void {
     $sorted = $this->pluginManager->getSortedDefinitions();
     $this->assertSame(['apple', 'mango', 'cucumber'], array_keys($sorted));
   }
@@ -70,7 +70,7 @@ public function testGetSortedDefinitions() {
   /**
    * @covers ::getGroupedDefinitions
    */
-  public function testGetGroupedDefinitions() {
+  public function testGetGroupedDefinitions(): void {
     $grouped = $this->pluginManager->getGroupedDefinitions();
     $this->assertSame(['fruits', 'vegetables'], array_keys($grouped));
     $this->assertSame(['apple', 'mango'], array_keys($grouped['fruits']));
@@ -80,7 +80,7 @@ public function testGetGroupedDefinitions() {
   /**
    * @covers ::processDefinitionCategory
    */
-  public function testProcessDefinitionCategory() {
+  public function testProcessDefinitionCategory(): void {
     // Existing category.
     $definition = [
       'label' => 'some',
diff --git a/core/tests/Drupal/Tests/Core/Plugin/Context/ContextDefinitionIsSatisfiedTest.php b/core/tests/Drupal/Tests/Core/Plugin/Context/ContextDefinitionIsSatisfiedTest.php
index 1fd6da4f1ac4..abb88f016042 100644
--- a/core/tests/Drupal/Tests/Core/Plugin/Context/ContextDefinitionIsSatisfiedTest.php
+++ b/core/tests/Drupal/Tests/Core/Plugin/Context/ContextDefinitionIsSatisfiedTest.php
@@ -74,7 +74,7 @@ protected function setUp(): void {
    *
    * @dataProvider providerTestIsSatisfiedBy
    */
-  public function testIsSatisfiedBy($expected, ContextDefinition $requirement, ContextDefinition $definition, $value = NULL) {
+  public function testIsSatisfiedBy($expected, ContextDefinition $requirement, ContextDefinition $definition, $value = NULL): void {
     $context = new Context($definition, $value);
     $this->assertSame($expected, $requirement->isSatisfiedBy($context));
   }
diff --git a/core/tests/Drupal/Tests/Core/Plugin/Context/ContextDefinitionTest.php b/core/tests/Drupal/Tests/Core/Plugin/Context/ContextDefinitionTest.php
index 9758a52f958a..588124f84037 100644
--- a/core/tests/Drupal/Tests/Core/Plugin/Context/ContextDefinitionTest.php
+++ b/core/tests/Drupal/Tests/Core/Plugin/Context/ContextDefinitionTest.php
@@ -33,7 +33,7 @@ public static function providerGetDataDefinition() {
    * @covers ::getDataDefinition
    * @uses \Drupal
    */
-  public function testGetDataDefinition($is_multiple) {
+  public function testGetDataDefinition($is_multiple): void {
     $data_type = 'valid';
     $mock_data_definition = $this->createMock(ContextDefinitionInterface::class);
     $mock_data_definition->expects($this->once())
@@ -106,7 +106,7 @@ public function testGetDataDefinition($is_multiple) {
    * @covers ::getDataDefinition
    * @uses \Drupal
    */
-  public function testGetDataDefinitionInvalidType($is_multiple) {
+  public function testGetDataDefinitionInvalidType($is_multiple): void {
     // Since we're trying to make getDataDefinition() throw an exception in
     // isolation, we use a data type which is not valid.
     $data_type = 'not_valid';
@@ -172,7 +172,7 @@ public static function providerGetConstraint() {
    * @covers ::getConstraint
    * @uses \Drupal
    */
-  public function testGetConstraint($expected, $constraint_array, $constraint) {
+  public function testGetConstraint($expected, $constraint_array, $constraint): void {
     $mock_context_definition = $this->getMockBuilder('Drupal\Core\Plugin\Context\ContextDefinition')
       ->disableOriginalConstructor()
       ->onlyMethods([
@@ -190,7 +190,7 @@ public function testGetConstraint($expected, $constraint_array, $constraint) {
    * @covers ::getDefaultValue
    * @covers ::setDefaultValue
    */
-  public function testDefaultValue() {
+  public function testDefaultValue(): void {
     $context_definition = new ContextDefinition();
     $this->assertNull($context_definition->getDefaultValue());
     $context_definition->setDefaultValue('test');
diff --git a/core/tests/Drupal/Tests/Core/Plugin/Context/ContextTest.php b/core/tests/Drupal/Tests/Core/Plugin/Context/ContextTest.php
index ba24da9008c2..fef689c098c2 100644
--- a/core/tests/Drupal/Tests/Core/Plugin/Context/ContextTest.php
+++ b/core/tests/Drupal/Tests/Core/Plugin/Context/ContextTest.php
@@ -50,7 +50,7 @@ protected function setUp(): void {
   /**
    * @covers ::getContextValue
    */
-  public function testDefaultValue() {
+  public function testDefaultValue(): void {
     $this->setUpDefaultValue('test');
 
     $context = new Context($this->contextDefinition);
@@ -61,7 +61,7 @@ public function testDefaultValue() {
   /**
    * @covers ::getContextData
    */
-  public function testDefaultDataValue() {
+  public function testDefaultDataValue(): void {
     $this->setUpDefaultValue('test');
 
     $context = new Context($this->contextDefinition);
@@ -72,7 +72,7 @@ public function testDefaultDataValue() {
   /**
    * @covers ::getContextData
    */
-  public function testNullDataValue() {
+  public function testNullDataValue(): void {
     $this->setUpDefaultValue(NULL);
 
     $context = new Context($this->contextDefinition);
@@ -83,7 +83,7 @@ public function testNullDataValue() {
   /**
    * @covers ::setContextValue
    */
-  public function testSetContextValueTypedData() {
+  public function testSetContextValueTypedData(): void {
 
     $this->contextDefinition = $this->createMock('Drupal\Core\Plugin\Context\ContextDefinitionInterface');
 
@@ -95,7 +95,7 @@ public function testSetContextValueTypedData() {
   /**
    * @covers ::setContextValue
    */
-  public function testSetContextValueCacheableDependency() {
+  public function testSetContextValueCacheableDependency(): void {
     $container = new Container();
     $cache_context_manager = $this->getMockBuilder('Drupal\Core\Cache\Context\CacheContextsManager')
       ->disableOriginalConstructor()
diff --git a/core/tests/Drupal/Tests/Core/Plugin/Context/EntityContextDefinitionIsSatisfiedTest.php b/core/tests/Drupal/Tests/Core/Plugin/Context/EntityContextDefinitionIsSatisfiedTest.php
index c1f253096a11..6a1a14e49469 100644
--- a/core/tests/Drupal/Tests/Core/Plugin/Context/EntityContextDefinitionIsSatisfiedTest.php
+++ b/core/tests/Drupal/Tests/Core/Plugin/Context/EntityContextDefinitionIsSatisfiedTest.php
@@ -108,7 +108,7 @@ protected function assertRequirementIsSatisfied(bool $expected, ContextDefinitio
    *
    * @dataProvider providerTestIsSatisfiedBy
    */
-  public function testIsSatisfiedBy($expected, ContextDefinition $requirement, ContextDefinition $definition, $value = NULL) {
+  public function testIsSatisfiedBy($expected, ContextDefinition $requirement, ContextDefinition $definition, $value = NULL): void {
     $entity_storage = $this->prophesize(EntityStorageInterface::class);
     $content_entity_storage = $this->prophesize(ContentEntityStorageInterface::class);
     $this->entityTypeManager->getStorage('test_config')->willReturn($entity_storage->reveal());
@@ -192,7 +192,7 @@ public static function providerTestIsSatisfiedBy() {
    *
    * @dataProvider providerTestIsSatisfiedByGenerateBundledEntity
    */
-  public function testIsSatisfiedByGenerateBundledEntity($expected, array $requirement_bundles, array $candidate_bundles, ?array $bundles_to_instantiate = NULL) {
+  public function testIsSatisfiedByGenerateBundledEntity($expected, array $requirement_bundles, array $candidate_bundles, ?array $bundles_to_instantiate = NULL): void {
     // If no bundles are explicitly specified, instantiate all bundles.
     if (!$bundles_to_instantiate) {
       $bundles_to_instantiate = $candidate_bundles;
@@ -289,7 +289,7 @@ public static function providerTestIsSatisfiedByGenerateBundledEntity() {
    *
    * @dataProvider providerTestIsSatisfiedByPassBundledEntity
    */
-  public function testIsSatisfiedByPassBundledEntity($expected, $requirement_constraint) {
+  public function testIsSatisfiedByPassBundledEntity($expected, $requirement_constraint): void {
     $entity_type = new EntityType(['id' => 'test_content']);
     $this->entityTypeManager->getDefinitions()->willReturn([
       'test_content' => $entity_type,
diff --git a/core/tests/Drupal/Tests/Core/Plugin/Context/LazyContextRepositoryTest.php b/core/tests/Drupal/Tests/Core/Plugin/Context/LazyContextRepositoryTest.php
index 82240491a19f..da4130d7611f 100644
--- a/core/tests/Drupal/Tests/Core/Plugin/Context/LazyContextRepositoryTest.php
+++ b/core/tests/Drupal/Tests/Core/Plugin/Context/LazyContextRepositoryTest.php
@@ -35,7 +35,7 @@ protected function setUp(): void {
   /**
    * @covers ::getRuntimeContexts
    */
-  public function testGetRuntimeContextsSingle() {
+  public function testGetRuntimeContextsSingle(): void {
     $contexts = $this->setupContextAndProvider('test_provider', ['test_context']);
 
     $lazy_context_repository = new LazyContextRepository($this->container, ['test_provider']);
@@ -46,7 +46,7 @@ public function testGetRuntimeContextsSingle() {
   /**
    * @covers ::getRuntimeContexts
    */
-  public function testGetRuntimeMultipleContextsPerService() {
+  public function testGetRuntimeMultipleContextsPerService(): void {
     $contexts = $this->setupContextAndProvider('test_provider', ['test_context0', 'test_context1']);
 
     $lazy_context_repository = new LazyContextRepository($this->container, ['test_provider']);
@@ -57,7 +57,7 @@ public function testGetRuntimeMultipleContextsPerService() {
   /**
    * @covers ::getRuntimeContexts
    */
-  public function testGetRuntimeMultipleContextProviders() {
+  public function testGetRuntimeMultipleContextProviders(): void {
     $contexts0 = $this->setupContextAndProvider('test_provider', ['test_context0', 'test_context1'], ['test_context0']);
     $contexts1 = $this->setupContextAndProvider('test_provider2', ['test1_context0', 'test1_context1'], ['test1_context0']);
 
@@ -69,7 +69,7 @@ public function testGetRuntimeMultipleContextProviders() {
   /**
    * @covers ::getRuntimeContexts
    */
-  public function testInvalidContextId() {
+  public function testInvalidContextId(): void {
     $lazy_context_repository = new LazyContextRepository($this->container, ['test_provider']);
     $this->expectException(\AssertionError::class);
     $this->expectExceptionMessage('You must provide the context IDs in the @{service_id}:{unqualified_context_id} format.');
@@ -79,7 +79,7 @@ public function testInvalidContextId() {
   /**
    * @covers ::getRuntimeContexts
    */
-  public function testGetRuntimeStaticCache() {
+  public function testGetRuntimeStaticCache(): void {
     $context0 = new Context(new ContextDefinition('example'));
     $context1 = new Context(new ContextDefinition('example'));
 
@@ -98,7 +98,7 @@ public function testGetRuntimeStaticCache() {
   /**
    * @covers ::getAvailableContexts
    */
-  public function testGetAvailableContexts() {
+  public function testGetAvailableContexts(): void {
     $contexts0 = $this->setupContextAndProvider('test_provider0', ['test0_context0', 'test0_context1']);
     $contexts1 = $this->setupContextAndProvider('test_provider1', ['test1_context0', 'test1_context1']);
 
diff --git a/core/tests/Drupal/Tests/Core/Plugin/ContextHandlerTest.php b/core/tests/Drupal/Tests/Core/Plugin/ContextHandlerTest.php
index cff3e9bc65e0..221293855b93 100644
--- a/core/tests/Drupal/Tests/Core/Plugin/ContextHandlerTest.php
+++ b/core/tests/Drupal/Tests/Core/Plugin/ContextHandlerTest.php
@@ -70,7 +70,7 @@ protected function setUp(): void {
    *
    * @dataProvider providerTestCheckRequirements
    */
-  public function testCheckRequirements($contexts, $requirements, $expected) {
+  public function testCheckRequirements($contexts, $requirements, $expected): void {
     $contexts = array_map(function ($context) {
       $mock = $this->createMock('Drupal\Core\Plugin\Context\ContextInterface');
       $mock->expects($this->atLeastOnce())
@@ -121,7 +121,7 @@ public static function providerTestCheckRequirements() {
    *
    * @dataProvider providerTestGetMatchingContexts
    */
-  public function testGetMatchingContexts($contexts, $requirement, $expected = NULL) {
+  public function testGetMatchingContexts($contexts, $requirement, $expected = NULL): void {
     $contexts = array_map(function ($context) {
       $mock = $this->createMock('Drupal\Core\Plugin\Context\ContextInterface');
       $mock->expects($this->atLeastOnce())
@@ -172,7 +172,7 @@ public static function providerTestGetMatchingContexts() {
    *
    * @dataProvider providerTestFilterPluginDefinitionsByContexts
    */
-  public function testFilterPluginDefinitionsByContexts($has_context, $definitions, $expected) {
+  public function testFilterPluginDefinitionsByContexts($has_context, $definitions, $expected): void {
     if ($has_context) {
       $context = $this->createMock('Drupal\Core\Plugin\Context\ContextInterface');
       $expected_context_definition = (new ContextDefinition('string'))->setConstraints(['Blank' => []]);
@@ -299,7 +299,7 @@ public static function providerTestFilterPluginDefinitionsByContexts() {
   /**
    * @covers ::applyContextMapping
    */
-  public function testApplyContextMapping() {
+  public function testApplyContextMapping(): void {
     $context_hit = $this->createMock('Drupal\Core\Plugin\Context\ContextInterface');
     $context_hit->expects($this->atLeastOnce())
       ->method('hasContextValue')
@@ -340,7 +340,7 @@ public function testApplyContextMapping() {
   /**
    * @covers ::applyContextMapping
    */
-  public function testApplyContextMappingMissingRequired() {
+  public function testApplyContextMappingMissingRequired(): void {
     $context = $this->createMock('Drupal\Core\Plugin\Context\ContextInterface');
     $context->expects($this->never())
       ->method('getContextValue');
@@ -377,7 +377,7 @@ public function testApplyContextMappingMissingRequired() {
   /**
    * @covers ::applyContextMapping
    */
-  public function testApplyContextMappingMissingNotRequired() {
+  public function testApplyContextMappingMissingNotRequired(): void {
     $context = $this->createMock('Drupal\Core\Plugin\Context\ContextInterface');
     $context->expects($this->never())
       ->method('getContextValue');
@@ -412,7 +412,7 @@ public function testApplyContextMappingMissingNotRequired() {
   /**
    * @covers ::applyContextMapping
    */
-  public function testApplyContextMappingNoValueRequired() {
+  public function testApplyContextMappingNoValueRequired(): void {
     $context = $this->createMock('Drupal\Core\Plugin\Context\ContextInterface');
     $context->expects($this->never())
       ->method('getContextValue');
@@ -447,7 +447,7 @@ public function testApplyContextMappingNoValueRequired() {
   /**
    * @covers ::applyContextMapping
    */
-  public function testApplyContextMappingNoValueNonRequired() {
+  public function testApplyContextMappingNoValueNonRequired(): void {
     $context = $this->createMock('Drupal\Core\Plugin\Context\ContextInterface');
     $context->expects($this->never())
       ->method('getContextValue');
@@ -480,7 +480,7 @@ public function testApplyContextMappingNoValueNonRequired() {
   /**
    * @covers ::applyContextMapping
    */
-  public function testApplyContextMappingConfigurableAssigned() {
+  public function testApplyContextMappingConfigurableAssigned(): void {
     $context = $this->createMock('Drupal\Core\Plugin\Context\ContextInterface');
     $context->expects($this->atLeastOnce())
       ->method('hasContextValue')
@@ -519,7 +519,7 @@ public function testApplyContextMappingConfigurableAssigned() {
   /**
    * @covers ::applyContextMapping
    */
-  public function testApplyContextMappingConfigurableAssignedMiss() {
+  public function testApplyContextMappingConfigurableAssignedMiss(): void {
     $context = $this->createMock('Drupal\Core\Plugin\Context\ContextInterface');
     $context->expects($this->never())
       ->method('getContextValue');
diff --git a/core/tests/Drupal/Tests/Core/Plugin/DefaultLazyPluginCollectionTest.php b/core/tests/Drupal/Tests/Core/Plugin/DefaultLazyPluginCollectionTest.php
index a4b9e379caa9..f957384a702d 100644
--- a/core/tests/Drupal/Tests/Core/Plugin/DefaultLazyPluginCollectionTest.php
+++ b/core/tests/Drupal/Tests/Core/Plugin/DefaultLazyPluginCollectionTest.php
@@ -27,7 +27,7 @@ class DefaultLazyPluginCollectionTest extends LazyPluginCollectionTestBase {
   /**
    * @covers ::has
    */
-  public function testHas() {
+  public function testHas(): void {
     $this->setupPluginCollection();
     $definitions = $this->getPluginDefinitions();
 
@@ -41,7 +41,7 @@ public function testHas() {
   /**
    * @covers ::get
    */
-  public function testGet() {
+  public function testGet(): void {
     $this->setupPluginCollection($this->once());
     $apple = $this->pluginInstances['apple'];
 
@@ -51,7 +51,7 @@ public function testGet() {
   /**
    * @covers ::get
    */
-  public function testGetNotExistingPlugin() {
+  public function testGetNotExistingPlugin(): void {
     $this->setupPluginCollection();
     $this->expectException(PluginNotFoundException::class);
     $this->expectExceptionMessage("Plugin ID 'pear' was not found.");
@@ -84,7 +84,7 @@ public static function providerTestSortHelper() {
    * @covers ::sortHelper
    * @dataProvider providerTestSortHelper
    */
-  public function testSortHelper($plugin_id_1, $plugin_id_2, $expected) {
+  public function testSortHelper($plugin_id_1, $plugin_id_2, $expected): void {
     $this->setupPluginCollection($this->any());
     if ($expected != 0) {
       $expected = $expected > 0 ? 1 : -1;
@@ -95,7 +95,7 @@ public function testSortHelper($plugin_id_1, $plugin_id_2, $expected) {
   /**
    * @covers ::getConfiguration
    */
-  public function testGetConfiguration() {
+  public function testGetConfiguration(): void {
     $this->setupPluginCollection($this->exactly(3));
     // The expected order matches $this->config.
     $expected = ['banana', 'cherry', 'apple'];
@@ -118,7 +118,7 @@ public function testGetConfiguration() {
   /**
    * @covers ::addInstanceId
    */
-  public function testAddInstanceId() {
+  public function testAddInstanceId(): void {
     $this->setupPluginCollection($this->exactly(4));
     $expected = [
       'banana' => 'banana',
@@ -146,7 +146,7 @@ public function testAddInstanceId() {
   /**
    * @covers ::removeInstanceId
    */
-  public function testRemoveInstanceId() {
+  public function testRemoveInstanceId(): void {
     $this->setupPluginCollection($this->exactly(2));
     $this->defaultPluginCollection->removeInstanceId('cherry');
     $config = $this->defaultPluginCollection->getConfiguration();
@@ -156,7 +156,7 @@ public function testRemoveInstanceId() {
   /**
    * @covers ::setInstanceConfiguration
    */
-  public function testSetInstanceConfiguration() {
+  public function testSetInstanceConfiguration(): void {
     $this->setupPluginCollection($this->exactly(3));
     $expected = [
       'id' => 'cherry',
@@ -173,7 +173,7 @@ public function testSetInstanceConfiguration() {
    *
    * @covers ::setInstanceConfiguration
    */
-  public function testSetInstanceConfigurationPluginChange() {
+  public function testSetInstanceConfigurationPluginChange(): void {
     $configurable_plugin = $this->prophesize(ConfigurableInterface::class);
     $configurable_config = ['id' => 'configurable', 'foo' => 'bar'];
     $configurable_plugin->getConfiguration()->willReturn($configurable_config);
@@ -202,7 +202,7 @@ public function testSetInstanceConfigurationPluginChange() {
   /**
    * @covers ::count
    */
-  public function testCount() {
+  public function testCount(): void {
     $this->setupPluginCollection();
     $this->assertCount(3, $this->defaultPluginCollection);
   }
@@ -210,7 +210,7 @@ public function testCount() {
   /**
    * @covers ::clear
    */
-  public function testClear() {
+  public function testClear(): void {
     $this->setupPluginCollection($this->exactly(6));
     $this->defaultPluginCollection->getConfiguration();
     $this->defaultPluginCollection->getConfiguration();
@@ -221,7 +221,7 @@ public function testClear() {
   /**
    * @covers ::set
    */
-  public function testSet() {
+  public function testSet(): void {
     $this->setupPluginCollection($this->exactly(4));
     $instance = $this->pluginManager->createInstance('cherry', $this->config['cherry']);
     $this->defaultPluginCollection->set('cherry2', $instance);
@@ -247,7 +247,7 @@ protected function getPluginMock($plugin_id, array $definition) {
   /**
    * @covers ::getConfiguration
    */
-  public function testConfigurableGetConfiguration() {
+  public function testConfigurableGetConfiguration(): void {
     $this->setupPluginCollection($this->exactly(3));
     $config = $this->defaultPluginCollection->getConfiguration();
     $this->assertSame($this->config, $config);
@@ -256,7 +256,7 @@ public function testConfigurableGetConfiguration() {
   /**
    * @covers ::setConfiguration
    */
-  public function testConfigurableSetConfiguration() {
+  public function testConfigurableSetConfiguration(): void {
     $this->setupPluginCollection($this->exactly(2));
 
     $this->defaultPluginCollection->setConfiguration(['apple' => ['value' => 'pineapple', 'id' => 'apple']]);
@@ -279,7 +279,7 @@ public function testConfigurableSetConfiguration() {
    *
    * @covers ::getConfiguration
    */
-  public function testConfigurableInterface() {
+  public function testConfigurableInterface(): void {
     $configurable_plugin = $this->prophesize(ConfigurableInterface::class);
     $configurable_config = ['id' => 'configurable', 'foo' => 'bar'];
     $configurable_plugin->getConfiguration()->willReturn($configurable_config);
diff --git a/core/tests/Drupal/Tests/Core/Plugin/DefaultPluginManagerTest.php b/core/tests/Drupal/Tests/Core/Plugin/DefaultPluginManagerTest.php
index 5a03eb56c9cd..0a7f41cc03ae 100644
--- a/core/tests/Drupal/Tests/Core/Plugin/DefaultPluginManagerTest.php
+++ b/core/tests/Drupal/Tests/Core/Plugin/DefaultPluginManagerTest.php
@@ -70,7 +70,7 @@ protected function setUp(): void {
   /**
    * Tests the plugin manager with a plugin that extends a non-installed class.
    */
-  public function testDefaultPluginManagerWithPluginExtendingNonInstalledClass() {
+  public function testDefaultPluginManagerWithPluginExtendingNonInstalledClass(): void {
     $definitions = [];
     $definitions['extending_non_installed_class'] = [
       'id' => 'extending_non_installed_class',
@@ -89,7 +89,7 @@ public function testDefaultPluginManagerWithPluginExtendingNonInstalledClass() {
   /**
    * Tests the plugin manager with a disabled module.
    */
-  public function testDefaultPluginManagerWithDisabledModule() {
+  public function testDefaultPluginManagerWithDisabledModule(): void {
     $definitions = $this->expectedDefinitions;
     $definitions['cherry'] = [
       'id' => 'cherry',
@@ -114,7 +114,7 @@ public function testDefaultPluginManagerWithDisabledModule() {
   /**
    * Tests the plugin manager and object plugin definitions.
    */
-  public function testDefaultPluginManagerWithObjects() {
+  public function testDefaultPluginManagerWithObjects(): void {
     $definitions = $this->expectedDefinitions;
     $definitions['cherry'] = (object) [
       'id' => 'cherry',
@@ -139,7 +139,7 @@ public function testDefaultPluginManagerWithObjects() {
   /**
    * Tests the plugin manager behavior for a missing plugin ID.
    */
-  public function testGetDefinitionPluginNotFoundException() {
+  public function testGetDefinitionPluginNotFoundException(): void {
     $plugin_manager = new TestPluginManager($this->namespaces, $this->expectedDefinitions);
 
     $this->expectException(PluginNotFoundException::class);
@@ -150,7 +150,7 @@ public function testGetDefinitionPluginNotFoundException() {
   /**
    * Tests the plugin manager with no cache and altering.
    */
-  public function testDefaultPluginManager() {
+  public function testDefaultPluginManager(): void {
     $plugin_manager = new TestPluginManager($this->namespaces, $this->expectedDefinitions, NULL, NULL, '\Drupal\plugin_test\Plugin\plugin_test\fruit\FruitInterface');
     $this->assertEquals($this->expectedDefinitions, $plugin_manager->getDefinitions());
     $this->assertEquals($this->expectedDefinitions['banana'], $plugin_manager->getDefinition('banana'));
@@ -159,7 +159,7 @@ public function testDefaultPluginManager() {
   /**
    * Tests the plugin manager with no cache and altering.
    */
-  public function testDefaultPluginManagerWithAlter() {
+  public function testDefaultPluginManagerWithAlter(): void {
     $module_handler = $this->getMockBuilder('Drupal\Core\Extension\ModuleHandler')
       ->disableOriginalConstructor()
       ->getMock();
@@ -179,7 +179,7 @@ public function testDefaultPluginManagerWithAlter() {
   /**
    * Tests the plugin manager with caching and altering.
    */
-  public function testDefaultPluginManagerWithEmptyCache() {
+  public function testDefaultPluginManagerWithEmptyCache(): void {
     $cid = $this->randomMachineName();
     $cache_backend = $this->getMockBuilder('Drupal\Core\Cache\MemoryBackend')
       ->disableOriginalConstructor()
@@ -204,7 +204,7 @@ public function testDefaultPluginManagerWithEmptyCache() {
   /**
    * Tests the plugin manager with caching and altering.
    */
-  public function testDefaultPluginManagerWithFilledCache() {
+  public function testDefaultPluginManagerWithFilledCache(): void {
     $cid = $this->randomMachineName();
     $cache_backend = $this->getMockBuilder('Drupal\Core\Cache\MemoryBackend')
       ->disableOriginalConstructor()
@@ -227,7 +227,7 @@ public function testDefaultPluginManagerWithFilledCache() {
   /**
    * Tests the plugin manager with caching disabled.
    */
-  public function testDefaultPluginManagerNoCache() {
+  public function testDefaultPluginManagerNoCache(): void {
     $plugin_manager = new TestPluginManager($this->namespaces, $this->expectedDefinitions, NULL, NULL, '\Drupal\plugin_test\Plugin\plugin_test\fruit\FruitInterface');
 
     $cid = $this->randomMachineName();
@@ -251,7 +251,7 @@ public function testDefaultPluginManagerNoCache() {
   /**
    * Tests the plugin manager cache clear with tags.
    */
-  public function testCacheClearWithTags() {
+  public function testCacheClearWithTags(): void {
     $cid = $this->randomMachineName();
     $cache_backend = $this->createMock('Drupal\Core\Cache\CacheBackendInterface');
     $cache_tags_invalidator = $this->createMock('Drupal\Core\Cache\CacheTagsInvalidatorInterface');
@@ -276,7 +276,7 @@ public function testCacheClearWithTags() {
    *
    * @covers ::createInstance
    */
-  public function testCreateInstanceWithJustValidInterfaces() {
+  public function testCreateInstanceWithJustValidInterfaces(): void {
     $plugin_manager = new TestPluginManager($this->namespaces, $this->expectedDefinitions, NULL, NULL, '\Drupal\plugin_test\Plugin\plugin_test\fruit\FruitInterface');
 
     foreach ($this->expectedDefinitions as $plugin_id => $definition) {
@@ -289,7 +289,7 @@ public function testCreateInstanceWithJustValidInterfaces() {
    *
    * @covers ::createInstance
    */
-  public function testCreateInstanceWithInvalidInterfaces() {
+  public function testCreateInstanceWithInvalidInterfaces(): void {
     $module_handler = $this->createMock('Drupal\Core\Extension\ModuleHandlerInterface');
 
     $module_handler->expects($this->any())
@@ -318,7 +318,7 @@ public function testCreateInstanceWithInvalidInterfaces() {
    *
    * @covers ::getDefinitions
    */
-  public function testGetDefinitionsWithoutRequiredInterface() {
+  public function testGetDefinitionsWithoutRequiredInterface(): void {
     $module_handler = $this->createMock('Drupal\Core\Extension\ModuleHandlerInterface');
 
     $module_handler->expects($this->any())
@@ -343,7 +343,7 @@ public function testGetDefinitionsWithoutRequiredInterface() {
   /**
    * @covers ::getCacheContexts
    */
-  public function testGetCacheContexts() {
+  public function testGetCacheContexts(): void {
     $module_handler = $this->prophesize(ModuleHandlerInterface::class);
     $plugin_manager = new TestPluginManager($this->namespaces, $this->expectedDefinitions, $module_handler->reveal(), NULL);
     $cache_contexts = $plugin_manager->getCacheContexts();
@@ -356,7 +356,7 @@ public function testGetCacheContexts() {
   /**
    * @covers ::getCacheTags
    */
-  public function testGetCacheTags() {
+  public function testGetCacheTags(): void {
     $module_handler = $this->prophesize(ModuleHandlerInterface::class);
     $plugin_manager = new TestPluginManager($this->namespaces, $this->expectedDefinitions, $module_handler->reveal(), NULL);
     $cache_tags = $plugin_manager->getCacheTags();
@@ -369,7 +369,7 @@ public function testGetCacheTags() {
   /**
    * @covers ::getCacheMaxAge
    */
-  public function testGetCacheMaxAge() {
+  public function testGetCacheMaxAge(): void {
     $module_handler = $this->prophesize(ModuleHandlerInterface::class);
     $plugin_manager = new TestPluginManager($this->namespaces, $this->expectedDefinitions, $module_handler->reveal(), NULL);
     $cache_max_age = $plugin_manager->getCacheMaxAge();
@@ -380,7 +380,7 @@ public function testGetCacheMaxAge() {
    * @covers ::findDefinitions
    * @covers ::extractProviderFromDefinition
    */
-  public function testProviderExists() {
+  public function testProviderExists(): void {
     $definitions = [];
     $definitions['array_based_found'] = ['provider' => 'module_found'];
     $definitions['array_based_missing'] = ['provider' => 'module_missing'];
@@ -406,7 +406,7 @@ public function testProviderExists() {
    * @covers ::processDefinition
    * @dataProvider providerTestProcessDefinition
    */
-  public function testProcessDefinition($definition, $expected) {
+  public function testProcessDefinition($definition, $expected): void {
     $module_handler = $this->prophesize(ModuleHandlerInterface::class);
     $plugin_manager = new TestPluginManagerWithDefaults($this->namespaces, $this->expectedDefinitions, $module_handler->reveal(), NULL);
 
diff --git a/core/tests/Drupal/Tests/Core/Plugin/DefaultSingleLazyPluginCollectionTest.php b/core/tests/Drupal/Tests/Core/Plugin/DefaultSingleLazyPluginCollectionTest.php
index 43ccb8fd864e..c428a9c78dba 100644
--- a/core/tests/Drupal/Tests/Core/Plugin/DefaultSingleLazyPluginCollectionTest.php
+++ b/core/tests/Drupal/Tests/Core/Plugin/DefaultSingleLazyPluginCollectionTest.php
@@ -36,7 +36,7 @@ protected function setupPluginCollection(?InvocationOrder $create_count = NULL)
   /**
    * Tests the get() method.
    */
-  public function testGet() {
+  public function testGet(): void {
     $this->setupPluginCollection($this->once());
     $apple = $this->pluginInstances['apple'];
 
@@ -48,7 +48,7 @@ public function testGet() {
    * @covers ::getConfiguration
    * @covers ::setConfiguration
    */
-  public function testAddInstanceId() {
+  public function testAddInstanceId(): void {
     $this->setupPluginCollection($this->any());
 
     $this->assertEquals(['id' => 'apple', 'key' => 'value'], $this->defaultPluginCollection->get('apple')->getConfiguration());
@@ -64,7 +64,7 @@ public function testAddInstanceId() {
   /**
    * @covers ::getInstanceIds
    */
-  public function testGetInstanceIds() {
+  public function testGetInstanceIds(): void {
     $this->setupPluginCollection($this->any());
     $this->assertEquals(['apple' => 'apple'], $this->defaultPluginCollection->getInstanceIds());
 
@@ -75,7 +75,7 @@ public function testGetInstanceIds() {
   /**
    * @covers ::setConfiguration
    */
-  public function testConfigurableSetConfiguration() {
+  public function testConfigurableSetConfiguration(): void {
     $this->setupPluginCollection($this->any());
 
     $this->defaultPluginCollection->setConfiguration(['apple' => ['value' => 'pineapple', 'id' => 'apple']]);
diff --git a/core/tests/Drupal/Tests/Core/Plugin/Discovery/ContainerDerivativeDiscoveryDecoratorTest.php b/core/tests/Drupal/Tests/Core/Plugin/Discovery/ContainerDerivativeDiscoveryDecoratorTest.php
index b1bebdd43ade..14c56887280a 100644
--- a/core/tests/Drupal/Tests/Core/Plugin/Discovery/ContainerDerivativeDiscoveryDecoratorTest.php
+++ b/core/tests/Drupal/Tests/Core/Plugin/Discovery/ContainerDerivativeDiscoveryDecoratorTest.php
@@ -16,7 +16,7 @@ class ContainerDerivativeDiscoveryDecoratorTest extends UnitTestCase {
   /**
    * @covers ::getDefinitions
    */
-  public function testGetDefinitions() {
+  public function testGetDefinitions(): void {
     $example_service = $this->createMock('Symfony\Contracts\EventDispatcher\EventDispatcherInterface');
     $example_container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerBuilder')
       ->onlyMethods(['get'])
diff --git a/core/tests/Drupal/Tests/Core/Plugin/Discovery/DerivativeDiscoveryDecoratorTest.php b/core/tests/Drupal/Tests/Core/Plugin/Discovery/DerivativeDiscoveryDecoratorTest.php
index 2e3fd33f05a0..e82f496b3acb 100644
--- a/core/tests/Drupal/Tests/Core/Plugin/Discovery/DerivativeDiscoveryDecoratorTest.php
+++ b/core/tests/Drupal/Tests/Core/Plugin/Discovery/DerivativeDiscoveryDecoratorTest.php
@@ -39,7 +39,7 @@ protected function setUp(): void {
    *
    * @see \Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator::getDerivativeFetcher()
    */
-  public function testGetDerivativeFetcher() {
+  public function testGetDerivativeFetcher(): void {
     $definitions = [];
     $definitions['non_container_aware_discovery'] = [
       'id' => 'non_container_aware_discovery',
@@ -65,7 +65,7 @@ public function testGetDerivativeFetcher() {
   /**
    * Tests the getDerivativeFetcher method with objects instead of arrays.
    */
-  public function testGetDerivativeFetcherWithAnnotationObjects() {
+  public function testGetDerivativeFetcherWithAnnotationObjects(): void {
     $definitions = [];
     $definitions['non_container_aware_discovery'] = (object) [
       'id' => 'non_container_aware_discovery',
@@ -95,7 +95,7 @@ public function testGetDerivativeFetcherWithAnnotationObjects() {
    *
    * @covers ::getDeriverClass
    */
-  public function testGetDeriverClassWithClassedDefinitions() {
+  public function testGetDeriverClassWithClassedDefinitions(): void {
     $definitions = [];
     $definition = $this->prophesize(DerivablePluginDefinitionInterface::class);
     $definition->id()->willReturn('non_container_aware_discovery');
@@ -117,7 +117,7 @@ public function testGetDeriverClassWithClassedDefinitions() {
   /**
    * @covers ::getDeriverClass
    */
-  public function testGetDeriverClassWithInvalidClassedDefinitions() {
+  public function testGetDeriverClassWithInvalidClassedDefinitions(): void {
     $definition = $this->prophesize(DerivablePluginDefinitionInterface::class);
     $definition->id()->willReturn('non_existent_discovery');
     $definition->getDeriver()->willReturn('\Drupal\system\Tests\Plugin\NonExistentDeriver');
@@ -140,7 +140,7 @@ public function testGetDeriverClassWithInvalidClassedDefinitions() {
    *
    * @see \Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator::getDeriver().\
    */
-  public function testNonExistentDerivativeFetcher() {
+  public function testNonExistentDerivativeFetcher(): void {
     $definitions = [];
     // Do this with a class that doesn't exist.
     $definitions['non_existent_discovery'] = [
@@ -162,7 +162,7 @@ public function testNonExistentDerivativeFetcher() {
    *
    * @see \Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator::getDeriver().\
    */
-  public function testInvalidDerivativeFetcher() {
+  public function testInvalidDerivativeFetcher(): void {
     $definitions = [];
     // Do this with a class that doesn't implement the interface.
     $definitions['invalid_discovery'] = [
@@ -182,7 +182,7 @@ public function testInvalidDerivativeFetcher() {
   /**
    * Tests derivative definitions when a definition already exists.
    */
-  public function testExistingDerivative() {
+  public function testExistingDerivative(): void {
     $definitions = [];
     $definitions['non_container_aware_discovery'] = [
       'id' => 'non_container_aware_discovery',
@@ -222,7 +222,7 @@ public function testExistingDerivative() {
   /**
    * Tests a single definition when a derivative already exists.
    */
-  public function testSingleExistingDerivative() {
+  public function testSingleExistingDerivative(): void {
     $base_definition = [
       'id' => 'non_container_aware_discovery',
       'deriver' => '\Drupal\Tests\Core\Plugin\Discovery\TestDerivativeDiscovery',
diff --git a/core/tests/Drupal/Tests/Core/Plugin/Discovery/HookDiscoveryTest.php b/core/tests/Drupal/Tests/Core/Plugin/Discovery/HookDiscoveryTest.php
index f5020d85706c..8b60c5215a58 100644
--- a/core/tests/Drupal/Tests/Core/Plugin/Discovery/HookDiscoveryTest.php
+++ b/core/tests/Drupal/Tests/Core/Plugin/Discovery/HookDiscoveryTest.php
@@ -43,7 +43,7 @@ protected function setUp(): void {
    *
    * @see \Drupal\Core\Plugin\Discovery::getDefinitions()
    */
-  public function testGetDefinitionsWithoutPlugins() {
+  public function testGetDefinitionsWithoutPlugins(): void {
     $this->assertCount(0, $this->hookDiscovery->getDefinitions());
   }
 
@@ -52,7 +52,7 @@ public function testGetDefinitionsWithoutPlugins() {
    *
    * @see \Drupal\Core\Plugin\Discovery::getDefinitions()
    */
-  public function testGetDefinitions() {
+  public function testGetDefinitions(): void {
     $this->moduleHandler->expects($this->atLeastOnce())
       ->method('invokeAllWith')
       ->with('test_plugin')
@@ -81,7 +81,7 @@ public function testGetDefinitions() {
    *
    * @see \Drupal\Core\Plugin\Discovery::getDefinition()
    */
-  public function testGetDefinition() {
+  public function testGetDefinition(): void {
     $this->moduleHandler->expects($this->exactly(4))
       ->method('invokeAllWith')
       ->with('test_plugin')
@@ -110,7 +110,7 @@ public function testGetDefinition() {
    *
    * @see \Drupal\Core\Plugin\Discovery::getDefinition()
    */
-  public function testGetDefinitionWithUnknownID() {
+  public function testGetDefinitionWithUnknownID(): void {
     $this->expectException(PluginNotFoundException::class);
     $this->hookDiscovery->getDefinition('test_non_existent', TRUE);
   }
diff --git a/core/tests/Drupal/Tests/Core/Plugin/Discovery/YamlDirectoryDiscoveryTest.php b/core/tests/Drupal/Tests/Core/Plugin/Discovery/YamlDirectoryDiscoveryTest.php
index 8f5d9dad20a5..8b8b1c7c9191 100644
--- a/core/tests/Drupal/Tests/Core/Plugin/Discovery/YamlDirectoryDiscoveryTest.php
+++ b/core/tests/Drupal/Tests/Core/Plugin/Discovery/YamlDirectoryDiscoveryTest.php
@@ -20,7 +20,7 @@ class YamlDirectoryDiscoveryTest extends UnitTestCase {
   /**
    * @covers ::getDefinitions
    */
-  public function testGetDefinitions() {
+  public function testGetDefinitions(): void {
     vfsStream::setup('modules', NULL, [
       'module_a' => [
         'subdir1' => [
@@ -68,7 +68,7 @@ public function testGetDefinitions() {
   /**
    * @covers ::getDefinitions
    */
-  public function testGetDefinitionsWithTranslatableDefinitions() {
+  public function testGetDefinitionsWithTranslatableDefinitions(): void {
     vfsStream::setup('modules', NULL, [
       'module_a' => [
         'subdir1' => [
diff --git a/core/tests/Drupal/Tests/Core/Plugin/Discovery/YamlDiscoveryDecoratorTest.php b/core/tests/Drupal/Tests/Core/Plugin/Discovery/YamlDiscoveryDecoratorTest.php
index 634979c8d51d..cac65e81d824 100644
--- a/core/tests/Drupal/Tests/Core/Plugin/Discovery/YamlDiscoveryDecoratorTest.php
+++ b/core/tests/Drupal/Tests/Core/Plugin/Discovery/YamlDiscoveryDecoratorTest.php
@@ -72,7 +72,7 @@ protected function setUp(): void {
   /**
    * Tests the getDefinitions() method.
    */
-  public function testGetDefinitions() {
+  public function testGetDefinitions(): void {
     $definitions = $this->discoveryDecorator->getDefinitions();
 
     $this->assertIsArray($definitions);
diff --git a/core/tests/Drupal/Tests/Core/Plugin/Discovery/YamlDiscoveryTest.php b/core/tests/Drupal/Tests/Core/Plugin/Discovery/YamlDiscoveryTest.php
index fe41eb82a230..6ed2aca673b9 100644
--- a/core/tests/Drupal/Tests/Core/Plugin/Discovery/YamlDiscoveryTest.php
+++ b/core/tests/Drupal/Tests/Core/Plugin/Discovery/YamlDiscoveryTest.php
@@ -53,7 +53,7 @@ protected function setUp(): void {
   /**
    * Tests the getDefinitions() method.
    */
-  public function testGetDefinitions() {
+  public function testGetDefinitions(): void {
     $definitions = $this->discovery->getDefinitions();
 
     $this->assertIsArray($definitions);
@@ -75,7 +75,7 @@ public function testGetDefinitions() {
   /**
    * @covers ::getDefinitions
    */
-  public function testGetDefinitionsWithTranslatableDefinitions() {
+  public function testGetDefinitionsWithTranslatableDefinitions(): void {
     vfsStream::setup('root');
 
     $file_1 = <<<'EOS'
@@ -113,7 +113,7 @@ public function testGetDefinitionsWithTranslatableDefinitions() {
   /**
    * Tests the getDefinition() method.
    */
-  public function testGetDefinition() {
+  public function testGetDefinition(): void {
     $definitions = $this->discovery->getDefinitions();
     // Test the getDefinition() method.
     foreach ($this->expectedKeys as $expected_key) {
diff --git a/core/tests/Drupal/Tests/Core/Plugin/FilteredPluginManagerTraitTest.php b/core/tests/Drupal/Tests/Core/Plugin/FilteredPluginManagerTraitTest.php
index 15896ffb7ca4..93a4e1942e87 100644
--- a/core/tests/Drupal/Tests/Core/Plugin/FilteredPluginManagerTraitTest.php
+++ b/core/tests/Drupal/Tests/Core/Plugin/FilteredPluginManagerTraitTest.php
@@ -22,7 +22,7 @@ class FilteredPluginManagerTraitTest extends UnitTestCase {
    * @covers ::getFilteredDefinitions
    * @dataProvider providerTestGetFilteredDefinitions
    */
-  public function testGetFilteredDefinitions($contexts, $expected) {
+  public function testGetFilteredDefinitions($contexts, $expected): void {
     // Start with two plugins.
     $definitions = [];
     $definitions['plugin1'] = ['id' => 'plugin1'];
diff --git a/core/tests/Drupal/Tests/Core/Plugin/PluginDependencyTraitTest.php b/core/tests/Drupal/Tests/Core/Plugin/PluginDependencyTraitTest.php
index 0befb6181f42..ac07454f5762 100644
--- a/core/tests/Drupal/Tests/Core/Plugin/PluginDependencyTraitTest.php
+++ b/core/tests/Drupal/Tests/Core/Plugin/PluginDependencyTraitTest.php
@@ -26,7 +26,7 @@ class PluginDependencyTraitTest extends UnitTestCase {
    *
    * @dataProvider providerTestPluginDependencies
    */
-  public function testGetPluginDependencies(ProphecyInterface $plugin, $definition, array $expected) {
+  public function testGetPluginDependencies(ProphecyInterface $plugin, $definition, array $expected): void {
     $test_class = new TestPluginDependency();
 
     $module_handler = $this->prophesize(ModuleHandlerInterface::class);
@@ -58,7 +58,7 @@ public function testGetPluginDependencies(ProphecyInterface $plugin, $definition
    * @param array $expected
    *   The expected dependencies.
    */
-  public function testCalculatePluginDependencies(ProphecyInterface $plugin, $definition, array $expected) {
+  public function testCalculatePluginDependencies(ProphecyInterface $plugin, $definition, array $expected): void {
     $test_class = new TestPluginDependency();
 
     $module_handler = $this->prophesize(ModuleHandlerInterface::class);
diff --git a/core/tests/Drupal/Tests/Core/Plugin/PluginFormFactoryTest.php b/core/tests/Drupal/Tests/Core/Plugin/PluginFormFactoryTest.php
index cc1da0d5809b..b987a2bdafb2 100644
--- a/core/tests/Drupal/Tests/Core/Plugin/PluginFormFactoryTest.php
+++ b/core/tests/Drupal/Tests/Core/Plugin/PluginFormFactoryTest.php
@@ -46,7 +46,7 @@ protected function setUp(): void {
   /**
    * @covers ::createInstance
    */
-  public function testCreateInstance() {
+  public function testCreateInstance(): void {
     $plugin_form = $this->prophesize(PluginFormInterface::class);
     $expected = $plugin_form->reveal();
 
@@ -63,7 +63,7 @@ public function testCreateInstance() {
   /**
    * @covers ::createInstance
    */
-  public function testCreateInstanceUsingPlugin() {
+  public function testCreateInstanceUsingPlugin(): void {
     $this->classResolver->getInstanceFromDefinition(Argument::cetera())->shouldNotBeCalled();
 
     $plugin = $this->prophesize(PluginWithFormsInterface::class)->willImplement(PluginFormInterface::class);
@@ -77,7 +77,7 @@ public function testCreateInstanceUsingPlugin() {
   /**
    * @covers ::createInstance
    */
-  public function testCreateInstanceUsingPluginWithSlashes() {
+  public function testCreateInstanceUsingPluginWithSlashes(): void {
     $this->classResolver->getInstanceFromDefinition(Argument::cetera())->shouldNotBeCalled();
 
     $plugin = $this->prophesize(PluginWithFormsInterface::class)->willImplement(PluginFormInterface::class);
@@ -91,7 +91,7 @@ public function testCreateInstanceUsingPluginWithSlashes() {
   /**
    * @covers ::createInstance
    */
-  public function testCreateInstanceDefaultFallback() {
+  public function testCreateInstanceDefaultFallback(): void {
     $this->classResolver->getInstanceFromDefinition(Argument::cetera())->shouldNotBeCalled();
 
     $plugin = $this->prophesize(PluginWithFormsInterface::class)->willImplement(PluginFormInterface::class);
@@ -106,7 +106,7 @@ public function testCreateInstanceDefaultFallback() {
   /**
    * @covers ::createInstance
    */
-  public function testCreateInstancePluginAware() {
+  public function testCreateInstancePluginAware(): void {
     $plugin_form = $this->prophesize(PluginFormInterface::class)->willImplement(PluginAwareInterface::class);
 
     $expected = $plugin_form->reveal();
@@ -126,7 +126,7 @@ public function testCreateInstancePluginAware() {
   /**
    * @covers ::createInstance
    */
-  public function testCreateInstanceDefinitionException() {
+  public function testCreateInstanceDefinitionException(): void {
     $this->expectException(InvalidPluginDefinitionException::class);
     $this->expectExceptionMessage('The "the_plugin_id" plugin did not specify a "anything" form class');
 
@@ -141,7 +141,7 @@ public function testCreateInstanceDefinitionException() {
   /**
    * @covers ::createInstance
    */
-  public function testCreateInstanceInvalidException() {
+  public function testCreateInstanceInvalidException(): void {
     $this->expectException(InvalidPluginDefinitionException::class);
     $this->expectExceptionMessage('The "the_plugin_id" plugin did not specify a valid "invalid" form class, must implement \Drupal\Core\Plugin\PluginFormInterface');
 
diff --git a/core/tests/Drupal/Tests/Core/Plugin/PluginWithFormsTraitTest.php b/core/tests/Drupal/Tests/Core/Plugin/PluginWithFormsTraitTest.php
index 46ede2cb185b..459d26de709a 100644
--- a/core/tests/Drupal/Tests/Core/Plugin/PluginWithFormsTraitTest.php
+++ b/core/tests/Drupal/Tests/Core/Plugin/PluginWithFormsTraitTest.php
@@ -22,7 +22,7 @@ class PluginWithFormsTraitTest extends UnitTestCase {
    * @covers ::hasFormClass
    * @dataProvider providerGetFormClass
    */
-  public function testGetFormClass(PluginWithFormsInterface $block_plugin, $operation, $expected_class) {
+  public function testGetFormClass(PluginWithFormsInterface $block_plugin, $operation, $expected_class): void {
     $this->assertSame($expected_class, $block_plugin->getFormClass($operation));
     $this->assertSame($expected_class !== NULL, $block_plugin->hasFormClass($operation));
   }
diff --git a/core/tests/Drupal/Tests/Core/PrivateKeyTest.php b/core/tests/Drupal/Tests/Core/PrivateKeyTest.php
index 7a0c86f02e40..c78304372c6b 100644
--- a/core/tests/Drupal/Tests/Core/PrivateKeyTest.php
+++ b/core/tests/Drupal/Tests/Core/PrivateKeyTest.php
@@ -51,7 +51,7 @@ protected function setUp(): void {
   /**
    * Tests PrivateKey::get().
    */
-  public function testGet() {
+  public function testGet(): void {
     $this->state->expects($this->once())
       ->method('get')
       ->with('system.private_key')
@@ -63,14 +63,14 @@ public function testGet() {
   /**
    * Tests PrivateKey::get() with no private key from state.
    */
-  public function testGetNoState() {
+  public function testGetNoState(): void {
     $this->assertIsString($this->privateKey->get());
   }
 
   /**
    * Tests PrivateKey::setPrivateKey().
    */
-  public function testSet() {
+  public function testSet(): void {
     $random_name = $this->randomMachineName();
 
     $this->state->expects($this->once())
diff --git a/core/tests/Drupal/Tests/Core/ProxyBuilder/ProxyBuilderTest.php b/core/tests/Drupal/Tests/Core/ProxyBuilder/ProxyBuilderTest.php
index 8f2c03d76d74..b3d291118b27 100644
--- a/core/tests/Drupal/Tests/Core/ProxyBuilder/ProxyBuilderTest.php
+++ b/core/tests/Drupal/Tests/Core/ProxyBuilder/ProxyBuilderTest.php
@@ -34,7 +34,7 @@ protected function setUp(): void {
    * @covers ::buildParameter
    * @covers ::buildMethodBody
    */
-  public function testBuildComplexMethod() {
+  public function testBuildComplexMethod(): void {
     $class = 'Drupal\Tests\Core\ProxyBuilder\TestServiceComplexMethod';
 
     $result = $this->proxyBuilder->build($class);
diff --git a/core/tests/Drupal/Tests/Core/Render/BubbleableMetadataTest.php b/core/tests/Drupal/Tests/Core/Render/BubbleableMetadataTest.php
index 2e25d3e54cae..2307b355e7ba 100644
--- a/core/tests/Drupal/Tests/Core/Render/BubbleableMetadataTest.php
+++ b/core/tests/Drupal/Tests/Core/Render/BubbleableMetadataTest.php
@@ -35,7 +35,7 @@ class BubbleableMetadataTest extends UnitTestCase {
    * @covers ::merge
    * @dataProvider providerTestMerge
    */
-  public function testMerge(BubbleableMetadata $a, CacheableMetadata $b, BubbleableMetadata $expected) {
+  public function testMerge(BubbleableMetadata $a, CacheableMetadata $b, BubbleableMetadata $expected): void {
     // Verify that if the second operand is a CacheableMetadata object, not a
     // BubbleableMetadata object, that BubbleableMetadata::merge() doesn't
     // attempt to merge assets.
@@ -113,7 +113,7 @@ public static function providerTestMerge() {
    * @covers ::setAttachments
    * @dataProvider providerTestAddAttachments
    */
-  public function testAddAttachments(BubbleableMetadata $initial, $attachments, BubbleableMetadata $expected) {
+  public function testAddAttachments(BubbleableMetadata $initial, $attachments, BubbleableMetadata $expected): void {
     $test = $initial;
     $test->addAttachments($attachments);
     $this->assertEquals($expected, $test);
@@ -134,7 +134,7 @@ public static function providerTestAddAttachments() {
    * @covers ::applyTo
    * @dataProvider providerTestApplyTo
    */
-  public function testApplyTo(BubbleableMetadata $metadata, array $render_array, array $expected) {
+  public function testApplyTo(BubbleableMetadata $metadata, array $render_array, array $expected): void {
     $this->assertNull($metadata->applyTo($render_array));
     $this->assertEquals($expected, $render_array);
   }
@@ -199,7 +199,7 @@ public static function providerTestApplyTo() {
    * @covers ::createFromRenderArray
    * @dataProvider providerTestCreateFromRenderArray
    */
-  public function testCreateFromRenderArray(array $render_array, BubbleableMetadata $expected) {
+  public function testCreateFromRenderArray(array $render_array, BubbleableMetadata $expected): void {
     $this->assertEquals($expected, BubbleableMetadata::createFromRenderArray($render_array));
   }
 
@@ -242,7 +242,7 @@ public static function providerTestCreateFromRenderArray() {
    *
    * @covers ::mergeAttachments
    */
-  public function testMergeAttachmentsLibraryMerging() {
+  public function testMergeAttachmentsLibraryMerging(): void {
     $a['#attached'] = [
       'library' => [
         'core/drupal',
@@ -393,7 +393,7 @@ public function testMergeAttachmentsLibraryMerging() {
    *
    * @dataProvider providerTestMergeAttachmentsHtmlHeadMerging
    */
-  public function testMergeAttachmentsHtmlHeadMerging($a, $b, $expected) {
+  public function testMergeAttachmentsHtmlHeadMerging($a, $b, $expected): void {
     $this->assertSame($expected, BubbleableMetadata::mergeAttachments($a, $b));
   }
 
@@ -466,7 +466,7 @@ public static function providerTestMergeAttachmentsHtmlHeadMerging() {
    *
    * @dataProvider providerTestMergeAttachmentsHtmlHeadLinkMerging
    */
-  public function testMergeAttachmentsHtmlHeadLinkMerging($a, $b, $expected) {
+  public function testMergeAttachmentsHtmlHeadLinkMerging($a, $b, $expected): void {
     $this->assertSame($expected, BubbleableMetadata::mergeAttachments($a, $b));
   }
 
@@ -532,7 +532,7 @@ public static function providerTestMergeAttachmentsHtmlHeadLinkMerging() {
    *
    * @dataProvider providerTestMergeAttachmentsHttpHeaderMerging
    */
-  public function testMergeAttachmentsHttpHeaderMerging($a, $b, $expected) {
+  public function testMergeAttachmentsHttpHeaderMerging($a, $b, $expected): void {
     $this->assertSame($expected, BubbleableMetadata::mergeAttachments($a, $b));
   }
 
@@ -598,7 +598,7 @@ public static function providerTestMergeAttachmentsHttpHeaderMerging() {
    * @covers ::addCacheableDependency
    * @dataProvider providerTestMerge
    */
-  public function testAddCacheableDependency(BubbleableMetadata $a, $b, BubbleableMetadata $expected) {
+  public function testAddCacheableDependency(BubbleableMetadata $a, $b, BubbleableMetadata $expected): void {
     $cache_contexts_manager = $this->getMockBuilder('Drupal\Core\Cache\Context\CacheContextsManager')
       ->disableOriginalConstructor()
       ->getMock();
diff --git a/core/tests/Drupal/Tests/Core/Render/Element/HtmlTagTest.php b/core/tests/Drupal/Tests/Core/Render/Element/HtmlTagTest.php
index 104f0fec1403..d0c09e97fc53 100644
--- a/core/tests/Drupal/Tests/Core/Render/Element/HtmlTagTest.php
+++ b/core/tests/Drupal/Tests/Core/Render/Element/HtmlTagTest.php
@@ -17,7 +17,7 @@ class HtmlTagTest extends RendererTestBase {
   /**
    * @covers ::getInfo
    */
-  public function testGetInfo() {
+  public function testGetInfo(): void {
     $htmlTag = new HtmlTag([], 'test', 'test');
     $info = $htmlTag->getInfo();
     $this->assertArrayHasKey('#pre_render', $info);
@@ -29,7 +29,7 @@ public function testGetInfo() {
    * @covers ::preRenderHtmlTag
    * @dataProvider providerPreRenderHtmlTag
    */
-  public function testPreRenderHtmlTag($element, $expected) {
+  public function testPreRenderHtmlTag($element, $expected): void {
     $result = HtmlTag::preRenderHtmlTag($element);
     foreach ($result as &$child) {
       if (is_array($child) && isset($child['#tag'])) {
diff --git a/core/tests/Drupal/Tests/Core/Render/Element/MachineNameTest.php b/core/tests/Drupal/Tests/Core/Render/Element/MachineNameTest.php
index 1361a55ee1d6..32acfc715401 100644
--- a/core/tests/Drupal/Tests/Core/Render/Element/MachineNameTest.php
+++ b/core/tests/Drupal/Tests/Core/Render/Element/MachineNameTest.php
@@ -25,7 +25,7 @@ class MachineNameTest extends UnitTestCase {
    *
    * @dataProvider providerTestValueCallback
    */
-  public function testValueCallback($expected, $input) {
+  public function testValueCallback($expected, $input): void {
     $element = [];
     $form_state = $this->prophesize(FormStateInterface::class)->reveal();
     $this->assertSame($expected, MachineName::valueCallback($element, $input, $form_state));
@@ -48,7 +48,7 @@ public static function providerTestValueCallback() {
   /**
    * @covers ::processMachineName
    */
-  public function testProcessMachineName() {
+  public function testProcessMachineName(): void {
     $form_state = new FormState();
 
     $element = [
diff --git a/core/tests/Drupal/Tests/Core/Render/Element/PasswordConfirmTest.php b/core/tests/Drupal/Tests/Core/Render/Element/PasswordConfirmTest.php
index 1862a3a343e3..d1e20b098f72 100644
--- a/core/tests/Drupal/Tests/Core/Render/Element/PasswordConfirmTest.php
+++ b/core/tests/Drupal/Tests/Core/Render/Element/PasswordConfirmTest.php
@@ -19,7 +19,7 @@ class PasswordConfirmTest extends UnitTestCase {
    *
    * @dataProvider providerTestValueCallback
    */
-  public function testValueCallback($expected, $element, $input) {
+  public function testValueCallback($expected, $element, $input): void {
     $form_state = $this->prophesize(FormStateInterface::class)->reveal();
     $this->assertSame($expected, PasswordConfirm::valueCallback($element, $input, $form_state));
   }
diff --git a/core/tests/Drupal/Tests/Core/Render/Element/PasswordTest.php b/core/tests/Drupal/Tests/Core/Render/Element/PasswordTest.php
index 9085722c3ec3..32bd56d52d1f 100644
--- a/core/tests/Drupal/Tests/Core/Render/Element/PasswordTest.php
+++ b/core/tests/Drupal/Tests/Core/Render/Element/PasswordTest.php
@@ -19,7 +19,7 @@ class PasswordTest extends UnitTestCase {
    *
    * @dataProvider providerTestValueCallback
    */
-  public function testValueCallback($expected, $input) {
+  public function testValueCallback($expected, $input): void {
     $element = [];
     $form_state = $this->prophesize(FormStateInterface::class)->reveal();
     $this->assertSame($expected, Password::valueCallback($element, $input, $form_state));
diff --git a/core/tests/Drupal/Tests/Core/Render/Element/RenderElementTest.php b/core/tests/Drupal/Tests/Core/Render/Element/RenderElementTest.php
index 4e9a0667398a..7c078c61d5ad 100644
--- a/core/tests/Drupal/Tests/Core/Render/Element/RenderElementTest.php
+++ b/core/tests/Drupal/Tests/Core/Render/Element/RenderElementTest.php
@@ -47,7 +47,7 @@ protected function setUp(): void {
   /**
    * @covers ::preRenderAjaxForm
    */
-  public function testPreRenderAjaxForm() {
+  public function testPreRenderAjaxForm(): void {
     $request = Request::create('/test');
     $request->query->set('foo', 'bar');
     $this->requestStack->push($request);
@@ -78,7 +78,7 @@ public function testPreRenderAjaxForm() {
   /**
    * @covers ::preRenderAjaxForm
    */
-  public function testPreRenderAjaxFormWithQueryOptions() {
+  public function testPreRenderAjaxFormWithQueryOptions(): void {
     $request = Request::create('/test');
     $request->query->set('foo', 'bar');
     $this->requestStack->push($request);
diff --git a/core/tests/Drupal/Tests/Core/Render/Element/TableSelectTest.php b/core/tests/Drupal/Tests/Core/Render/Element/TableSelectTest.php
index 95d7bcb952c7..fc58c1db4efe 100644
--- a/core/tests/Drupal/Tests/Core/Render/Element/TableSelectTest.php
+++ b/core/tests/Drupal/Tests/Core/Render/Element/TableSelectTest.php
@@ -20,7 +20,7 @@ class TableSelectTest extends UnitTestCase {
   /**
    * @covers ::processTableselect
    */
-  public function testProcessTableselectWithLinkTitle() {
+  public function testProcessTableselectWithLinkTitle(): void {
     $element = [];
     $form_state = new FormState();
     $complete_form = [];
@@ -45,7 +45,7 @@ public function testProcessTableselectWithLinkTitle() {
   /**
    * @covers ::processTableselect
    */
-  public function testProcessTableselectWithStringTitle() {
+  public function testProcessTableselectWithStringTitle(): void {
     $element = [];
     $form_state = new FormState();
     $complete_form = [];
diff --git a/core/tests/Drupal/Tests/Core/Render/Element/TextareaTest.php b/core/tests/Drupal/Tests/Core/Render/Element/TextareaTest.php
index e66a2819a40e..f2b971eab606 100644
--- a/core/tests/Drupal/Tests/Core/Render/Element/TextareaTest.php
+++ b/core/tests/Drupal/Tests/Core/Render/Element/TextareaTest.php
@@ -19,7 +19,7 @@ class TextareaTest extends UnitTestCase {
    *
    * @dataProvider providerTestValueCallback
    */
-  public function testValueCallback($expected, $input) {
+  public function testValueCallback($expected, $input): void {
     $element = [];
     $form_state = $this->prophesize(FormStateInterface::class)->reveal();
     $this->assertSame($expected, Textarea::valueCallback($element, $input, $form_state));
diff --git a/core/tests/Drupal/Tests/Core/Render/Element/TextfieldTest.php b/core/tests/Drupal/Tests/Core/Render/Element/TextfieldTest.php
index 5ec874b2d924..2459a87092c7 100644
--- a/core/tests/Drupal/Tests/Core/Render/Element/TextfieldTest.php
+++ b/core/tests/Drupal/Tests/Core/Render/Element/TextfieldTest.php
@@ -19,7 +19,7 @@ class TextfieldTest extends UnitTestCase {
    *
    * @dataProvider providerTestValueCallback
    */
-  public function testValueCallback($expected, $input) {
+  public function testValueCallback($expected, $input): void {
     $element = [];
     $form_state = $this->prophesize(FormStateInterface::class)->reveal();
     $this->assertSame($expected, Textfield::valueCallback($element, $input, $form_state));
diff --git a/core/tests/Drupal/Tests/Core/Render/Element/TokenTest.php b/core/tests/Drupal/Tests/Core/Render/Element/TokenTest.php
index 40f1bea21ab6..25dc52631607 100644
--- a/core/tests/Drupal/Tests/Core/Render/Element/TokenTest.php
+++ b/core/tests/Drupal/Tests/Core/Render/Element/TokenTest.php
@@ -19,7 +19,7 @@ class TokenTest extends UnitTestCase {
    *
    * @dataProvider providerTestValueCallback
    */
-  public function testValueCallback($expected, $input) {
+  public function testValueCallback($expected, $input): void {
     $element = [];
     $form_state = $this->prophesize(FormStateInterface::class)->reveal();
     $this->assertSame($expected, Token::valueCallback($element, $input, $form_state));
diff --git a/core/tests/Drupal/Tests/Core/Render/ElementInfoManagerTest.php b/core/tests/Drupal/Tests/Core/Render/ElementInfoManagerTest.php
index 601b2a43bc9a..a9ede9f13c8e 100644
--- a/core/tests/Drupal/Tests/Core/Render/ElementInfoManagerTest.php
+++ b/core/tests/Drupal/Tests/Core/Render/ElementInfoManagerTest.php
@@ -74,7 +74,7 @@ protected function setUp(): void {
    *
    * @dataProvider providerTestGetInfoElementPlugin
    */
-  public function testGetInfoElementPlugin($plugin_class, $expected_info) {
+  public function testGetInfoElementPlugin($plugin_class, $expected_info): void {
     $this->moduleHandler->expects($this->once())
       ->method('alter')
       ->with('element_info', $this->anything())
@@ -141,7 +141,7 @@ public static function providerTestGetInfoElementPlugin() {
   /**
    * @covers ::getInfoProperty
    */
-  public function testGetInfoProperty() {
+  public function testGetInfoProperty(): void {
     $this->themeManager
       ->method('getActiveTheme')
       ->willReturn(new ActiveTheme(['name' => 'test']));
diff --git a/core/tests/Drupal/Tests/Core/Render/ElementTest.php b/core/tests/Drupal/Tests/Core/Render/ElementTest.php
index 709793dff076..fd71a85a59dc 100644
--- a/core/tests/Drupal/Tests/Core/Render/ElementTest.php
+++ b/core/tests/Drupal/Tests/Core/Render/ElementTest.php
@@ -17,7 +17,7 @@ class ElementTest extends UnitTestCase {
   /**
    * Tests the property() method.
    */
-  public function testProperty() {
+  public function testProperty(): void {
     $this->assertTrue(Element::property('#property'));
     $this->assertFalse(Element::property('property'));
     $this->assertFalse(Element::property('property#'));
@@ -27,7 +27,7 @@ public function testProperty() {
   /**
    * Tests the properties() method.
    */
-  public function testProperties() {
+  public function testProperties(): void {
     $element = [
       '#property1' => 'property1',
       '#property2' => 'property2',
@@ -43,7 +43,7 @@ public function testProperties() {
   /**
    * Tests the child() method.
    */
-  public function testChild() {
+  public function testChild(): void {
     $this->assertFalse(Element::child('#property'));
     $this->assertTrue(Element::child('property'));
     $this->assertTrue(Element::child('property#'));
@@ -52,7 +52,7 @@ public function testChild() {
   /**
    * Tests the children() method.
    */
-  public function testChildren() {
+  public function testChildren(): void {
     $element = [
       'child2' => ['#weight' => 10],
       'child1' => ['#weight' => 0],
@@ -104,7 +104,7 @@ public function testChildren() {
   /**
    * Tests the children() method with an invalid key.
    */
-  public function testInvalidChildren() {
+  public function testInvalidChildren(): void {
     $element = [
       'foo' => 'bar',
     ];
@@ -116,7 +116,7 @@ public function testInvalidChildren() {
   /**
    * Tests the children() method with an ignored key/value pair.
    */
-  public function testIgnoredChildren() {
+  public function testIgnoredChildren(): void {
     $element = [
       'foo' => NULL,
     ];
@@ -133,7 +133,7 @@ public function testIgnoredChildren() {
    *
    * @dataProvider providerVisibleChildren
    */
-  public function testVisibleChildren(array $element, array $expected_keys) {
+  public function testVisibleChildren(array $element, array $expected_keys): void {
     $this->assertSame($expected_keys, Element::getVisibleChildren($element));
   }
 
@@ -161,7 +161,7 @@ public static function providerVisibleChildren() {
    *
    * @dataProvider providerTestSetAttributes
    */
-  public function testSetAttributes($element, $map, $expected_element) {
+  public function testSetAttributes($element, $map, $expected_element): void {
     Element::setAttributes($element, $map);
     $this->assertSame($expected_element, $element);
   }
@@ -183,7 +183,7 @@ public static function providerTestSetAttributes() {
    *
    * @dataProvider providerTestIsEmpty
    */
-  public function testIsEmpty(array $element, $expected) {
+  public function testIsEmpty(array $element, $expected): void {
     $this->assertSame(Element::isEmpty($element), $expected);
   }
 
@@ -229,7 +229,7 @@ public static function providerTestIsEmpty() {
    * @covers ::isRenderArray
    * @dataProvider dataProviderIsRenderArray
    */
-  public function testIsRenderArray($build, $expected) {
+  public function testIsRenderArray($build, $expected): void {
     $this->assertSame(
       $expected,
       Element::isRenderArray($build)
diff --git a/core/tests/Drupal/Tests/Core/Render/MetadataBubblingUrlGeneratorTest.php b/core/tests/Drupal/Tests/Core/Render/MetadataBubblingUrlGeneratorTest.php
index 2c54d6146bce..64e0d2423188 100644
--- a/core/tests/Drupal/Tests/Core/Render/MetadataBubblingUrlGeneratorTest.php
+++ b/core/tests/Drupal/Tests/Core/Render/MetadataBubblingUrlGeneratorTest.php
@@ -52,7 +52,7 @@ protected function setUp(): void {
    *
    * @dataProvider providerUrlBubbleableMetadataBubbling
    */
-  public function testUrlBubbleableMetadataBubbling($collect_bubbleable_metadata, $invocations, array $options) {
+  public function testUrlBubbleableMetadataBubbling($collect_bubbleable_metadata, $invocations, array $options): void {
     $self = $this;
 
     $this->renderer->expects($this->exactly($invocations))
diff --git a/core/tests/Drupal/Tests/Core/Render/Placeholder/ChainedPlaceholderStrategyTest.php b/core/tests/Drupal/Tests/Core/Render/Placeholder/ChainedPlaceholderStrategyTest.php
index 3d9282d60e69..34e2f44b88d4 100644
--- a/core/tests/Drupal/Tests/Core/Render/Placeholder/ChainedPlaceholderStrategyTest.php
+++ b/core/tests/Drupal/Tests/Core/Render/Placeholder/ChainedPlaceholderStrategyTest.php
@@ -20,7 +20,7 @@ class ChainedPlaceholderStrategyTest extends UnitTestCase {
    *
    * @dataProvider providerProcessPlaceholders
    */
-  public function testProcessPlaceholders($strategies, $placeholders, $result) {
+  public function testProcessPlaceholders($strategies, $placeholders, $result): void {
     $chained_placeholder_strategy = new ChainedPlaceholderStrategy();
 
     foreach ($strategies as $strategy) {
@@ -125,7 +125,7 @@ public static function providerProcessPlaceholders() {
   /**
    * @covers ::processPlaceholders
    */
-  public function testProcessPlaceholdersNoStrategies() {
+  public function testProcessPlaceholdersNoStrategies(): void {
     // Placeholders but no strategies defined.
     $placeholders = [
       'assert-me' => ['#markup' => 'I-am-a-llama-that-will-lead-to-an-assertion-by-the-chained-placeholder-strategy.'],
@@ -140,7 +140,7 @@ public function testProcessPlaceholdersNoStrategies() {
   /**
    * @covers ::processPlaceholders
    */
-  public function testProcessPlaceholdersWithRoguePlaceholderStrategy() {
+  public function testProcessPlaceholdersWithRoguePlaceholderStrategy(): void {
     // Placeholders but no strategies defined.
     $placeholders = [
       'assert-me' => ['#markup' => 'llama'],
diff --git a/core/tests/Drupal/Tests/Core/Render/PlaceholderGeneratorTest.php b/core/tests/Drupal/Tests/Core/Render/PlaceholderGeneratorTest.php
index def952bb9ded..065cdc6d15a2 100644
--- a/core/tests/Drupal/Tests/Core/Render/PlaceholderGeneratorTest.php
+++ b/core/tests/Drupal/Tests/Core/Render/PlaceholderGeneratorTest.php
@@ -32,7 +32,7 @@ class PlaceholderGeneratorTest extends RendererTestBase {
    * @covers ::createPlaceholder
    * @dataProvider providerCreatePlaceholderGeneratesValidHtmlMarkup
    */
-  public function testCreatePlaceholderGeneratesValidHtmlMarkup(array $element) {
+  public function testCreatePlaceholderGeneratesValidHtmlMarkup(array $element): void {
     $build = $this->placeholderGenerator->createPlaceholder($element);
 
     $original_placeholder_markup = (string) $build['#markup'];
@@ -49,7 +49,7 @@ public function testCreatePlaceholderGeneratesValidHtmlMarkup(array $element) {
    *
    * @covers ::createPlaceholder
    */
-  public function testRenderPlaceholdersDifferentSortedContextsTags() {
+  public function testRenderPlaceholdersDifferentSortedContextsTags(): void {
     $contexts_1 = ['user', 'foo'];
     $contexts_2 = ['foo', 'user'];
     $tags_1 = ['current-temperature', 'foo'];
diff --git a/core/tests/Drupal/Tests/Core/Render/RendererBubblingTest.php b/core/tests/Drupal/Tests/Core/Render/RendererBubblingTest.php
index cc4088d3da23..52944069309c 100644
--- a/core/tests/Drupal/Tests/Core/Render/RendererBubblingTest.php
+++ b/core/tests/Drupal/Tests/Core/Render/RendererBubblingTest.php
@@ -35,7 +35,7 @@ protected function setUp(): void {
   /**
    * Tests bubbling of assets when NOT using #pre_render callbacks.
    */
-  public function testBubblingWithoutPreRender() {
+  public function testBubblingWithoutPreRender(): void {
     $this->setUpRequest();
     $this->setUpMemoryCache();
 
@@ -79,7 +79,7 @@ public function testBubblingWithoutPreRender() {
   /**
    * Tests cache context bubbling with a custom cache bin.
    */
-  public function testContextBubblingCustomCacheBin() {
+  public function testContextBubblingCustomCacheBin(): void {
     $bin = $this->randomMachineName();
 
     $this->setUpRequest();
@@ -135,7 +135,7 @@ public function testContextBubblingCustomCacheBin() {
    *
    * @dataProvider providerTestContextBubblingEdgeCases
    */
-  public function testContextBubblingEdgeCases(array $element, array $expected_top_level_contexts, $expected_cache_item) {
+  public function testContextBubblingEdgeCases(array $element, array $expected_top_level_contexts, $expected_cache_item): void {
     $this->setUpRequest();
     $this->setUpMemoryCache();
     $this->cacheContextsManager->expects($this->any())
@@ -314,7 +314,7 @@ public static function providerTestContextBubblingEdgeCases() {
    * @todo Revisit now that we have self-healing tests for VariationCache. This
    * is essentially a clone of the other bubbling tests now.
    */
-  public function testConditionalCacheContextBubblingSelfHealing() {
+  public function testConditionalCacheContextBubblingSelfHealing(): void {
     $current_user_role = &$this->currentUserRole;
 
     $this->setUpRequest();
@@ -445,7 +445,7 @@ public function testConditionalCacheContextBubblingSelfHealing() {
    *
    * @dataProvider providerTestBubblingWithPrerender
    */
-  public function testBubblingWithPrerender($test_element) {
+  public function testBubblingWithPrerender($test_element): void {
     $this->setUpRequest();
     $this->setUpMemoryCache();
 
@@ -529,7 +529,7 @@ public static function providerTestBubblingWithPrerender() {
   /**
    * Tests that an element's cache keys cannot be changed during its rendering.
    */
-  public function testOverWriteCacheKeys() {
+  public function testOverWriteCacheKeys(): void {
     $this->setUpRequest();
     $this->setUpMemoryCache();
 
diff --git a/core/tests/Drupal/Tests/Core/Render/RendererDebugTest.php b/core/tests/Drupal/Tests/Core/Render/RendererDebugTest.php
index f8c506ac8bd0..d365bae0d5e8 100644
--- a/core/tests/Drupal/Tests/Core/Render/RendererDebugTest.php
+++ b/core/tests/Drupal/Tests/Core/Render/RendererDebugTest.php
@@ -24,7 +24,7 @@ protected function setUp(): void {
   /**
    * Test render debug output.
    */
-  public function testDebugOutput() {
+  public function testDebugOutput(): void {
     $this->setUpRequest();
     $this->setUpMemoryCache();
 
diff --git a/core/tests/Drupal/Tests/Core/Render/RendererPlaceholdersTest.php b/core/tests/Drupal/Tests/Core/Render/RendererPlaceholdersTest.php
index 4d8c52d82e6a..874ae1350db0 100644
--- a/core/tests/Drupal/Tests/Core/Render/RendererPlaceholdersTest.php
+++ b/core/tests/Drupal/Tests/Core/Render/RendererPlaceholdersTest.php
@@ -803,7 +803,7 @@ public function testPlaceholderingDisabledForPostRequests(array $test_element, a
    * @covers ::doRender
    * @covers ::replacePlaceholders
    */
-  public function testRecursivePlaceholder() {
+  public function testRecursivePlaceholder(): void {
     $args = [static::randomContextValue()];
     $element = [];
     $element['#create_placeholder'] = TRUE;
@@ -822,7 +822,7 @@ public function testRecursivePlaceholder() {
    * @covers ::render
    * @covers ::doRender
    */
-  public function testInvalidLazyBuilder() {
+  public function testInvalidLazyBuilder(): void {
     $element = [];
     $element['#lazy_builder'] = '\Drupal\Tests\Core\Render\PlaceholdersTest::callback';
 
@@ -835,7 +835,7 @@ public function testInvalidLazyBuilder() {
    * @covers ::render
    * @covers ::doRender
    */
-  public function testInvalidLazyBuilderArguments() {
+  public function testInvalidLazyBuilderArguments(): void {
     $element = [];
     $element['#lazy_builder'] = ['\Drupal\Tests\Core\Render\PlaceholdersTest::callback', 'arg1', 'arg2'];
 
@@ -850,7 +850,7 @@ public function testInvalidLazyBuilderArguments() {
    *
    * @see testNonScalarLazyBuilderCallbackContext
    */
-  public function testScalarLazyBuilderCallbackContext() {
+  public function testScalarLazyBuilderCallbackContext(): void {
     $element = [];
     $element['#lazy_builder'] = [
       '\Drupal\Tests\Core\Render\PlaceholdersTest::callback',
@@ -872,7 +872,7 @@ public function testScalarLazyBuilderCallbackContext() {
    * @covers ::render
    * @covers ::doRender
    */
-  public function testNonScalarLazyBuilderCallbackContext() {
+  public function testNonScalarLazyBuilderCallbackContext(): void {
     $element = [];
     $element['#lazy_builder'] = [
       '\Drupal\Tests\Core\Render\PlaceholdersTest::callback',
@@ -896,7 +896,7 @@ public function testNonScalarLazyBuilderCallbackContext() {
    * @covers ::render
    * @covers ::doRender
    */
-  public function testChildrenPlusBuilder() {
+  public function testChildrenPlusBuilder(): void {
     $element = [];
     $element['#lazy_builder'] = ['Drupal\Tests\Core\Render\RecursivePlaceholdersTest::callback', []];
     $element['child_a']['#markup'] = 'Oh hai!';
@@ -911,7 +911,7 @@ public function testChildrenPlusBuilder() {
    * @covers ::render
    * @covers ::doRender
    */
-  public function testPropertiesPlusBuilder() {
+  public function testPropertiesPlusBuilder(): void {
     $element = [];
     $element['#lazy_builder'] = ['Drupal\Tests\Core\Render\RecursivePlaceholdersTest::callback', []];
     $element['#llama'] = '#awesome';
@@ -926,7 +926,7 @@ public function testPropertiesPlusBuilder() {
    * @covers ::render
    * @covers ::doRender
    */
-  public function testCreatePlaceholderPropertyWithoutLazyBuilder() {
+  public function testCreatePlaceholderPropertyWithoutLazyBuilder(): void {
     $element = [];
     $element['#create_placeholder'] = TRUE;
 
@@ -958,7 +958,7 @@ public function testNonArrayReturnFromLazyBuilder(): void {
    * @covers \Drupal\Core\Render\RenderCache::get
    * @covers ::replacePlaceholders
    */
-  public function testRenderChildrenPlaceholdersDifferentArguments() {
+  public function testRenderChildrenPlaceholdersDifferentArguments(): void {
     $this->setUpRequest();
     $this->setupMemoryCache();
     $this->cacheContextsManager->expects($this->any())
@@ -1057,7 +1057,7 @@ public function testRenderChildrenPlaceholdersDifferentArguments() {
    * @covers \Drupal\Core\Render\RenderCache::get
    * @covers ::replacePlaceholders
    */
-  public function testRenderLazyBuilderPreview() {
+  public function testRenderLazyBuilderPreview(): void {
     $this->setUpRequest();
     $this->setupMemoryCache();
     $this->renderCache = new TestPlaceholderingRenderCache($this->requestStack, $this->cacheFactory, $this->cacheContextsManager, $this->placeholderGenerator);
diff --git a/core/tests/Drupal/Tests/Core/Render/RendererRecursionTest.php b/core/tests/Drupal/Tests/Core/Render/RendererRecursionTest.php
index ba74ff893f37..98afe1484c82 100644
--- a/core/tests/Drupal/Tests/Core/Render/RendererRecursionTest.php
+++ b/core/tests/Drupal/Tests/Core/Render/RendererRecursionTest.php
@@ -34,7 +34,7 @@ protected function setUpRenderRecursionComplexElements() {
    * @covers ::render
    * @covers ::doRender
    */
-  public function testRenderRecursionWithNestedRenderRoot() {
+  public function testRenderRecursionWithNestedRenderRoot(): void {
     [$complex_child_markup, $parent_markup, $complex_child_template] = $this->setUpRenderRecursionComplexElements();
     $renderer = $this->renderer;
     $this->setUpRequest();
@@ -66,7 +66,7 @@ public function testRenderRecursionWithNestedRenderRoot() {
    * @covers ::render
    * @covers ::doRender
    */
-  public function testRenderRecursionWithNestedRender() {
+  public function testRenderRecursionWithNestedRender(): void {
     [$complex_child_markup, $parent_markup, $complex_child_template] = $this->setUpRenderRecursionComplexElements();
     $renderer = $this->renderer;
     $this->setUpRequest();
@@ -100,7 +100,7 @@ public function testRenderRecursionWithNestedRender() {
    * @covers ::renderRoot
    * @covers ::renderInIsolation
    */
-  public function testRenderRecursionWithNestedRenderInIsolation() {
+  public function testRenderRecursionWithNestedRenderInIsolation(): void {
     [$complex_child_markup, $parent_markup, $complex_child_template] = $this->setUpRenderRecursionComplexElements();
     $renderer = $this->renderer;
     $this->setUpRequest();
diff --git a/core/tests/Drupal/Tests/Core/Render/RendererTest.php b/core/tests/Drupal/Tests/Core/Render/RendererTest.php
index d14a083c177c..bdbc2fa87d98 100644
--- a/core/tests/Drupal/Tests/Core/Render/RendererTest.php
+++ b/core/tests/Drupal/Tests/Core/Render/RendererTest.php
@@ -41,7 +41,7 @@ class RendererTest extends RendererTestBase {
    *
    * @dataProvider providerTestRenderBasic
    */
-  public function testRenderBasic($build, $expected, ?callable $setup_code = NULL) {
+  public function testRenderBasic($build, $expected, ?callable $setup_code = NULL): void {
     if (isset($setup_code)) {
       $setup_code = $setup_code->bindTo($this);
       $setup_code($this->themeManager);
@@ -487,7 +487,7 @@ function ($elements) {
    * @covers ::render
    * @covers ::doRender
    */
-  public function testRenderSorting() {
+  public function testRenderSorting(): void {
     $first = $this->randomMachineName();
     $second = $this->randomMachineName();
     // Build an array with '#weight' set for each element.
@@ -522,7 +522,7 @@ public function testRenderSorting() {
    * @covers ::render
    * @covers ::doRender
    */
-  public function testRenderSortingWithSetHashSorted() {
+  public function testRenderSortingWithSetHashSorted(): void {
     $first = $this->randomMachineName();
     $second = $this->randomMachineName();
     // The same array structure again, but with #sorted set to TRUE.
@@ -549,7 +549,7 @@ public function testRenderSortingWithSetHashSorted() {
    *
    * @dataProvider providerAccessValues
    */
-  public function testRenderWithPresetAccess($access) {
+  public function testRenderWithPresetAccess($access): void {
     $build = [
       '#access' => $access,
     ];
@@ -563,7 +563,7 @@ public function testRenderWithPresetAccess($access) {
    *
    * @dataProvider providerAccessValues
    */
-  public function testRenderWithAccessCallbackCallable($access) {
+  public function testRenderWithAccessCallbackCallable($access): void {
     $build = [
       '#access_callback' => function () use ($access) {
         return $access;
@@ -581,7 +581,7 @@ public function testRenderWithAccessCallbackCallable($access) {
    *
    * @dataProvider providerAccessValues
    */
-  public function testRenderWithAccessPropertyAndCallback($access) {
+  public function testRenderWithAccessPropertyAndCallback($access): void {
     $build = [
       '#access' => $access,
       '#access_callback' => function () {
@@ -598,7 +598,7 @@ public function testRenderWithAccessPropertyAndCallback($access) {
    *
    * @dataProvider providerAccessValues
    */
-  public function testRenderWithAccessControllerResolved($access) {
+  public function testRenderWithAccessControllerResolved($access): void {
 
     switch ($access) {
       case AccessResult::allowed():
@@ -629,7 +629,7 @@ public function testRenderWithAccessControllerResolved($access) {
    * @covers ::render
    * @covers ::doRender
    */
-  public function testRenderAccessCacheabilityDependencyInheritance() {
+  public function testRenderAccessCacheabilityDependencyInheritance(): void {
     $build = [
       '#access' => AccessResult::allowed()->addCacheContexts(['user']),
     ];
@@ -651,7 +651,7 @@ public function testRenderAccessCacheabilityDependencyInheritance() {
    *
    * @dataProvider providerRenderTwice
    */
-  public function testRenderTwice($build) {
+  public function testRenderTwice($build): void {
     $this->assertEquals('kittens', $this->renderer->renderRoot($build));
     $this->assertEquals('kittens', $build['#markup']);
     $this->assertEquals(['kittens-147'], $build['#cache']['tags']);
@@ -703,7 +703,7 @@ public static function providerRenderTwice() {
   /**
    * Ensures that #access is taken in account when rendering #render_children.
    */
-  public function testRenderChildrenAccess() {
+  public function testRenderChildrenAccess(): void {
     $build = [
       '#access' => FALSE,
       '#render_children' => TRUE,
@@ -754,7 +754,7 @@ protected function assertAccess(array $build, $access): void {
    * @covers ::render
    * @covers ::doRender
    */
-  public function testRenderWithoutThemeArguments() {
+  public function testRenderWithoutThemeArguments(): void {
     $element = [
       '#theme' => 'common_test_foo',
     ];
@@ -772,7 +772,7 @@ public function testRenderWithoutThemeArguments() {
    * @covers ::render
    * @covers ::doRender
    */
-  public function testRenderWithThemeArguments() {
+  public function testRenderWithThemeArguments(): void {
     $element = [
       '#theme' => 'common_test_foo',
       '#foo' => $this->randomMachineName(),
@@ -830,7 +830,7 @@ public static function providerRenderCache() {
    *
    * @dataProvider providerRenderCache
    */
-  public function testRenderCache($child_access, $expected_tags) {
+  public function testRenderCache($child_access, $expected_tags): void {
     $this->setUpRequest();
     $this->setUpMemoryCache();
 
@@ -880,7 +880,7 @@ public function testRenderCache($child_access, $expected_tags) {
    *
    * @dataProvider providerTestRenderCacheMaxAge
    */
-  public function testRenderCacheMaxAge($max_age, $is_render_cached, $render_cache_item_expire) {
+  public function testRenderCacheMaxAge($max_age, $is_render_cached, $render_cache_item_expire): void {
     $this->setUpRequest();
     $this->setUpMemoryCache();
 
@@ -925,7 +925,7 @@ public static function providerTestRenderCacheMaxAge() {
    *
    * @dataProvider providerTestRenderCacheProperties
    */
-  public function testRenderCacheProperties(array $expected_results) {
+  public function testRenderCacheProperties(array $expected_results): void {
     $this->setUpRequest();
     $this->setUpMemoryCache();
 
@@ -993,7 +993,7 @@ public static function providerTestRenderCacheProperties() {
    *
    * @dataProvider providerTestAddCacheableDependency
    */
-  public function testAddCacheableDependency(array $build, $object, array $expected) {
+  public function testAddCacheableDependency(array $build, $object, array $expected): void {
     $this->renderer->addCacheableDependency($build, $object);
     $this->assertEquals($build, $expected);
   }
diff --git a/core/tests/Drupal/Tests/Core/Route/RoleAccessCheckTest.php b/core/tests/Drupal/Tests/Core/Route/RoleAccessCheckTest.php
index 647a1819ef02..451fdad716ab 100644
--- a/core/tests/Drupal/Tests/Core/Route/RoleAccessCheckTest.php
+++ b/core/tests/Drupal/Tests/Core/Route/RoleAccessCheckTest.php
@@ -141,7 +141,7 @@ public static function roleAccessProvider() {
    *
    * @dataProvider roleAccessProvider
    */
-  public function testRoleAccess($path, $grant_accounts, $deny_accounts) {
+  public function testRoleAccess($path, $grant_accounts, $deny_accounts): void {
     $cache_contexts_manager = $this->prophesize(CacheContextsManager::class);
     $cache_contexts_manager->assertValidTokens()->willReturn(TRUE);
     $cache_contexts_manager->reveal();
diff --git a/core/tests/Drupal/Tests/Core/RouteProcessor/RouteProcessorManagerTest.php b/core/tests/Drupal/Tests/Core/RouteProcessor/RouteProcessorManagerTest.php
index 7541dbd687e0..625814a39c9e 100644
--- a/core/tests/Drupal/Tests/Core/RouteProcessor/RouteProcessorManagerTest.php
+++ b/core/tests/Drupal/Tests/Core/RouteProcessor/RouteProcessorManagerTest.php
@@ -35,7 +35,7 @@ protected function setUp(): void {
   /**
    * Tests the Route process manager functionality.
    */
-  public function testRouteProcessorManager() {
+  public function testRouteProcessorManager(): void {
     $route = new Route('');
     $parameters = ['test' => 'test'];
     $route_name = 'test_name';
diff --git a/core/tests/Drupal/Tests/Core/Routing/AcceptHeaderMatcherTest.php b/core/tests/Drupal/Tests/Core/Routing/AcceptHeaderMatcherTest.php
index 3b62244155c5..af5f10d6f3af 100644
--- a/core/tests/Drupal/Tests/Core/Routing/AcceptHeaderMatcherTest.php
+++ b/core/tests/Drupal/Tests/Core/Routing/AcceptHeaderMatcherTest.php
@@ -70,7 +70,7 @@ public static function acceptFilterProvider() {
    *
    * @dataProvider acceptFilterProvider
    */
-  public function testAcceptFiltering($accept_header, $format, $included_route, $excluded_route) {
+  public function testAcceptFiltering($accept_header, $format, $included_route, $excluded_route): void {
     $collection = $this->fixtures->sampleRouteCollection();
 
     $request = Request::create('path/two', 'GET');
@@ -89,7 +89,7 @@ public function testAcceptFiltering($accept_header, $format, $included_route, $e
   /**
    * Confirms that the AcceptHeaderMatcher throws an exception for no-route.
    */
-  public function testNoRouteFound() {
+  public function testNoRouteFound(): void {
     // Remove the sample routes that would match any method.
     $routes = $this->fixtures->sampleRouteCollection();
     $routes->remove('route_a');
diff --git a/core/tests/Drupal/Tests/Core/Routing/AccessAwareRouterTest.php b/core/tests/Drupal/Tests/Core/Routing/AccessAwareRouterTest.php
index 95e0bb96a8f4..1b7aaa748810 100644
--- a/core/tests/Drupal/Tests/Core/Routing/AccessAwareRouterTest.php
+++ b/core/tests/Drupal/Tests/Core/Routing/AccessAwareRouterTest.php
@@ -77,7 +77,7 @@ protected function setupRouter() {
   /**
    * Tests the matchRequest() function for access allowed.
    */
-  public function testMatchRequestAllowed() {
+  public function testMatchRequestAllowed(): void {
     $this->setupRouter();
     $request = new Request();
     $access_result = AccessResult::allowed();
@@ -97,7 +97,7 @@ public function testMatchRequestAllowed() {
   /**
    * Tests the matchRequest() function for access denied.
    */
-  public function testMatchRequestDenied() {
+  public function testMatchRequestDenied(): void {
     $this->setupRouter();
     $request = new Request();
     $access_result = AccessResult::forbidden();
@@ -112,7 +112,7 @@ public function testMatchRequestDenied() {
   /**
    * Tests the matchRequest() function for access denied with reason message.
    */
-  public function testCheckAccessResultWithReason() {
+  public function testCheckAccessResultWithReason(): void {
     $this->setupRouter();
     $request = new Request();
     $reason = $this->getRandomGenerator()->string();
@@ -131,7 +131,7 @@ public function testCheckAccessResultWithReason() {
    *
    * @covers ::__call
    */
-  public function testCall() {
+  public function testCall(): void {
     $mock_router = $this->createMock(RouterInterface::class);
 
     $this->router = $this->getMockBuilder(MockRouterInterface::class)
diff --git a/core/tests/Drupal/Tests/Core/Routing/ContentTypeHeaderMatcherTest.php b/core/tests/Drupal/Tests/Core/Routing/ContentTypeHeaderMatcherTest.php
index e22aeebf65cd..c04de3315602 100644
--- a/core/tests/Drupal/Tests/Core/Routing/ContentTypeHeaderMatcherTest.php
+++ b/core/tests/Drupal/Tests/Core/Routing/ContentTypeHeaderMatcherTest.php
@@ -48,7 +48,7 @@ protected function setUp(): void {
    *
    * @dataProvider providerTestSafeRequestFilter
    */
-  public function testSafeRequestFilter($method) {
+  public function testSafeRequestFilter($method): void {
     $collection = $this->fixtures->sampleRouteCollection();
     $collection->addCollection($this->fixtures->contentRouteCollection());
 
@@ -70,7 +70,7 @@ public static function providerTestSafeRequestFilter() {
   /**
    * Tests that XML-restricted routes get filtered out on JSON requests.
    */
-  public function testJsonRequest() {
+  public function testJsonRequest(): void {
     $collection = $this->fixtures->sampleRouteCollection();
     $collection->addCollection($this->fixtures->contentRouteCollection());
 
@@ -89,7 +89,7 @@ public function testJsonRequest() {
   /**
    * Tests route filtering on POST form submission requests.
    */
-  public function testPostForm() {
+  public function testPostForm(): void {
     $collection = $this->fixtures->sampleRouteCollection();
     $collection->addCollection($this->fixtures->contentRouteCollection());
 
@@ -108,7 +108,7 @@ public function testPostForm() {
    *
    * @covers ::filter
    */
-  public function testNoRouteFound() {
+  public function testNoRouteFound(): void {
     $matcher = new ContentTypeHeaderMatcher();
 
     $routes = $this->fixtures->contentRouteCollection();
@@ -124,7 +124,7 @@ public function testNoRouteFound() {
    *
    * @covers ::filter
    */
-  public function testContentTypeRequestHeaderMissing() {
+  public function testContentTypeRequestHeaderMissing(): void {
     $matcher = new ContentTypeHeaderMatcher();
 
     $routes = $this->fixtures->contentRouteCollection();
diff --git a/core/tests/Drupal/Tests/Core/Routing/CurrentRouteMatchTest.php b/core/tests/Drupal/Tests/Core/Routing/CurrentRouteMatchTest.php
index 92e5b705e55c..5ec49e529268 100644
--- a/core/tests/Drupal/Tests/Core/Routing/CurrentRouteMatchTest.php
+++ b/core/tests/Drupal/Tests/Core/Routing/CurrentRouteMatchTest.php
@@ -41,7 +41,7 @@ protected static function getRouteMatch(string $name, Route $route, array $param
    * @covers ::getCurrentRouteMatch
    * @covers ::getRouteMatch
    */
-  public function testGetCurrentRouteObject() {
+  public function testGetCurrentRouteObject(): void {
 
     $request_stack = new RequestStack();
     $request = new Request();
@@ -78,7 +78,7 @@ public function testGetCurrentRouteObject() {
   /**
    * @covers ::getRouteMatchFromRequest
    */
-  public function testGetRouteMatchFromRequestWithRouting() {
+  public function testGetRouteMatchFromRequestWithRouting(): void {
     $request_stack = new RequestStack();
     $request = new Request();
     $request_stack->push($request);
@@ -93,7 +93,7 @@ public function testGetRouteMatchFromRequestWithRouting() {
   /**
    * @covers ::getRouteMatchFromRequest
    */
-  public function testGetRouteMatchFromRequest() {
+  public function testGetRouteMatchFromRequest(): void {
     $request_stack = new RequestStack();
     $request = new Request();
     $request_stack->push($request);
@@ -112,7 +112,7 @@ public function testGetRouteMatchFromRequest() {
   /**
    * @covers ::resetRouteMatch
    */
-  public function testResetRouteMatch() {
+  public function testResetRouteMatch(): void {
     $route = new Route('/test-route/{foo}');
     $request = new Request();
     $request->attributes->set(RouteObjectInterface::ROUTE_NAME, 'test_route');
diff --git a/core/tests/Drupal/Tests/Core/Routing/LazyRouteCollectionTest.php b/core/tests/Drupal/Tests/Core/Routing/LazyRouteCollectionTest.php
index 54df9e2b819a..c34e9afde609 100644
--- a/core/tests/Drupal/Tests/Core/Routing/LazyRouteCollectionTest.php
+++ b/core/tests/Drupal/Tests/Core/Routing/LazyRouteCollectionTest.php
@@ -47,7 +47,7 @@ protected function setUp(): void {
    * @covers ::getIterator
    * @covers ::all
    */
-  public function testGetIterator() {
+  public function testGetIterator(): void {
     $this->routeProvider->expects($this->exactly(2))
       ->method('getRoutesByNames')
       ->with(NULL)
@@ -60,7 +60,7 @@ public function testGetIterator() {
   /**
    * @covers ::count
    */
-  public function testCount() {
+  public function testCount(): void {
     $this->routeProvider
       ->method('getRoutesByNames')
       ->with(NULL)
@@ -74,7 +74,7 @@ public function testCount() {
    *
    * @covers ::get
    */
-  public function testGetName() {
+  public function testGetName(): void {
     // Hit.
     $this->routeProvider
       ->method('getRouteByName')
diff --git a/core/tests/Drupal/Tests/Core/Routing/MethodFilterTest.php b/core/tests/Drupal/Tests/Core/Routing/MethodFilterTest.php
index 31ac253a4dfc..0f6bf9fb2268 100644
--- a/core/tests/Drupal/Tests/Core/Routing/MethodFilterTest.php
+++ b/core/tests/Drupal/Tests/Core/Routing/MethodFilterTest.php
@@ -20,7 +20,7 @@ class MethodFilterTest extends UnitTestCase {
   /**
    * @covers ::filter
    */
-  public function testWithAllowedMethod() {
+  public function testWithAllowedMethod(): void {
     $request = Request::create('/test', 'GET');
     $collection = new RouteCollection();
     $collection->add('test_route.get', new Route('/test', [], [], [], '', [], ['GET']));
@@ -35,7 +35,7 @@ public function testWithAllowedMethod() {
   /**
    * @covers ::filter
    */
-  public function testWithAllowedMethodAndMultipleMatchingRoutes() {
+  public function testWithAllowedMethodAndMultipleMatchingRoutes(): void {
     $request = Request::create('/test', 'GET');
     $collection = new RouteCollection();
     $collection->add('test_route.get', new Route('/test', [], [], [], '', [], ['GET']));
@@ -53,7 +53,7 @@ public function testWithAllowedMethodAndMultipleMatchingRoutes() {
   /**
    * @covers ::filter
    */
-  public function testMethodNotAllowedException() {
+  public function testMethodNotAllowedException(): void {
     $request = Request::create('/test', 'PATCH');
     $collection = new RouteCollection();
     $collection->add('test_route.get', new Route('/test', [], [], [], '', [], ['GET']));
@@ -67,7 +67,7 @@ public function testMethodNotAllowedException() {
   /**
    * @covers ::filter
    */
-  public function testMethodNotAllowedExceptionWithMultipleRoutes() {
+  public function testMethodNotAllowedExceptionWithMultipleRoutes(): void {
     $request = Request::create('/test', 'PATCH');
     $collection = new RouteCollection();
     $collection->add('test_route.get', new Route('/test', [], [], [], '', [], ['GET']));
@@ -83,7 +83,7 @@ public function testMethodNotAllowedExceptionWithMultipleRoutes() {
   /**
    * @covers ::filter
    */
-  public function testFilteredMethods() {
+  public function testFilteredMethods(): void {
     $request = Request::create('/test', 'PATCH');
     $collection = new RouteCollection();
     $collection->add('test_route.get', new Route('/test', [], [], [], '', [], ['GET']));
@@ -104,7 +104,7 @@ public function testFilteredMethods() {
    *
    * @covers ::filter
    */
-  public function testCollectionOrder() {
+  public function testCollectionOrder(): void {
     $request = Request::create('/test', 'GET');
 
     $collection = new RouteCollection();
diff --git a/core/tests/Drupal/Tests/Core/Routing/PathChangedHelperTest.php b/core/tests/Drupal/Tests/Core/Routing/PathChangedHelperTest.php
index ce07c2fc9311..9018d058fa19 100644
--- a/core/tests/Drupal/Tests/Core/Routing/PathChangedHelperTest.php
+++ b/core/tests/Drupal/Tests/Core/Routing/PathChangedHelperTest.php
@@ -20,7 +20,7 @@ class PathChangedHelperTest extends UnitTestCase {
    *
    * @covers ::__construct
    */
-  public function testPathChangedHelperException() {
+  public function testPathChangedHelperException(): void {
     $route_match = $this->prophesize(RouteMatchInterface::class);
     $route_match->getRouteName()->willReturn('path.changed.not-bc');
 
diff --git a/core/tests/Drupal/Tests/Core/Routing/RedirectDestinationTest.php b/core/tests/Drupal/Tests/Core/Routing/RedirectDestinationTest.php
index 2bf84130126c..199262f3f3fc 100644
--- a/core/tests/Drupal/Tests/Core/Routing/RedirectDestinationTest.php
+++ b/core/tests/Drupal/Tests/Core/Routing/RedirectDestinationTest.php
@@ -73,7 +73,7 @@ protected function setupUrlGenerator() {
    *
    * @covers ::get
    */
-  public function testGet(Request $request, $expected_destination) {
+  public function testGet(Request $request, $expected_destination): void {
     $this->requestStack->push($request);
     $this->setupUrlGenerator();
 
@@ -87,7 +87,7 @@ public function testGet(Request $request, $expected_destination) {
    *
    * @covers ::getAsArray
    */
-  public function testGetAsArray(Request $request, $expected_destination) {
+  public function testGetAsArray(Request $request, $expected_destination): void {
     $this->requestStack->push($request);
     $this->setupUrlGenerator();
 
@@ -125,7 +125,7 @@ public static function providerGet() {
    * @covers ::set
    * @covers ::get
    */
-  public function testSetBeforeGetCall() {
+  public function testSetBeforeGetCall(): void {
     $this->redirectDestination->set('/example');
     $this->assertEquals('/example', $this->redirectDestination->get());
   }
@@ -134,7 +134,7 @@ public function testSetBeforeGetCall() {
    * @covers ::set
    * @covers ::get
    */
-  public function testSetAfterGetCall() {
+  public function testSetAfterGetCall(): void {
     $request = Request::create('/');
     $request->query->set('destination', '/other-example');
     $this->requestStack->push($request);
diff --git a/core/tests/Drupal/Tests/Core/Routing/RequestFormatRouteFilterTest.php b/core/tests/Drupal/Tests/Core/Routing/RequestFormatRouteFilterTest.php
index af9c6199a8c6..fb0157a58c6c 100644
--- a/core/tests/Drupal/Tests/Core/Routing/RequestFormatRouteFilterTest.php
+++ b/core/tests/Drupal/Tests/Core/Routing/RequestFormatRouteFilterTest.php
@@ -24,7 +24,7 @@ class RequestFormatRouteFilterTest extends UnitTestCase {
    * @covers ::filter
    * @dataProvider filterProvider
    */
-  public function testFilter(RouteCollection $collection, $request_format, array $expected_filtered_collection) {
+  public function testFilter(RouteCollection $collection, $request_format, array $expected_filtered_collection): void {
     $route_filter = new RequestFormatRouteFilter();
 
     $request = new Request();
@@ -63,7 +63,7 @@ public static function filterProvider() {
   /**
    * @covers ::filter
    */
-  public function testNoRouteFound() {
+  public function testNoRouteFound(): void {
     $url = $this->prophesize(GeneratedUrl::class);
     $url_assembler = $this->prophesize(UnroutedUrlAssemblerInterface::class);
     $url_assembler->assemble('http://localhost/test?_format=xml', ['query' => ['_format' => 'json'], 'external' => TRUE], TRUE)
@@ -89,7 +89,7 @@ public function testNoRouteFound() {
   /**
    * @covers ::filter
    */
-  public function testNoRouteFoundWhenNoRequestFormatAndSingleRouteWithMultipleFormats() {
+  public function testNoRouteFoundWhenNoRequestFormatAndSingleRouteWithMultipleFormats(): void {
     $this->expectException(NotAcceptableHttpException::class);
     $this->expectExceptionMessage('No route found for the specified format html.');
 
diff --git a/core/tests/Drupal/Tests/Core/Routing/RouteBuilderTest.php b/core/tests/Drupal/Tests/Core/Routing/RouteBuilderTest.php
index bf108cd2c42a..325a0319b48f 100644
--- a/core/tests/Drupal/Tests/Core/Routing/RouteBuilderTest.php
+++ b/core/tests/Drupal/Tests/Core/Routing/RouteBuilderTest.php
@@ -99,7 +99,7 @@ protected function setUp(): void {
   /**
    * Tests that the route rebuilding both locks and unlocks.
    */
-  public function testRebuildLockingUnlocking() {
+  public function testRebuildLockingUnlocking(): void {
     $this->lock->expects($this->once())
       ->method('acquire')
       ->with('router_rebuild')
@@ -119,7 +119,7 @@ public function testRebuildLockingUnlocking() {
   /**
    * Tests route rebuilding with a blocking lock.
    */
-  public function testRebuildBlockingLock() {
+  public function testRebuildBlockingLock(): void {
     $this->lock->expects($this->once())
       ->method('acquire')
       ->with('router_rebuild')
@@ -143,7 +143,7 @@ public function testRebuildBlockingLock() {
    *
    * @see \Drupal\Core\Routing\RouteBuilder::rebuild()
    */
-  public function testRebuildWithStaticModuleRoutes() {
+  public function testRebuildWithStaticModuleRoutes(): void {
     $this->lock->expects($this->once())
       ->method('acquire')
       ->with('router_rebuild')
@@ -189,7 +189,7 @@ public function testRebuildWithStaticModuleRoutes() {
    *
    * @see \Drupal\Core\Routing\RouteBuilder::rebuild()
    */
-  public function testRebuildWithProviderBasedRoutes() {
+  public function testRebuildWithProviderBasedRoutes(): void {
     $this->lock->expects($this->once())
       ->method('acquire')
       ->with('router_rebuild')
@@ -254,7 +254,7 @@ public function testRebuildWithProviderBasedRoutes() {
   /**
    * Tests \Drupal\Core\Routing\RouteBuilder::rebuildIfNeeded() method.
    */
-  public function testRebuildIfNeeded() {
+  public function testRebuildIfNeeded(): void {
     $this->lock->expects($this->once())
       ->method('acquire')
       ->with('router_rebuild')
@@ -282,7 +282,7 @@ public function testRebuildIfNeeded() {
    *
    * @see \Drupal\Core\Routing\RouteBuilder::rebuild()
    */
-  public function testRebuildWithOverriddenRouteClass() {
+  public function testRebuildWithOverriddenRouteClass(): void {
     $this->lock->expects($this->once())
       ->method('acquire')
       ->with('router_rebuild')
diff --git a/core/tests/Drupal/Tests/Core/Routing/RouteCompilerTest.php b/core/tests/Drupal/Tests/Core/Routing/RouteCompilerTest.php
index 9c282fac1ff0..5b34e6319580 100644
--- a/core/tests/Drupal/Tests/Core/Routing/RouteCompilerTest.php
+++ b/core/tests/Drupal/Tests/Core/Routing/RouteCompilerTest.php
@@ -25,7 +25,7 @@ class RouteCompilerTest extends UnitTestCase {
    *
    * @dataProvider providerTestGetFit
    */
-  public function testGetFit($path, $expected) {
+  public function testGetFit($path, $expected): void {
     $route_compiler = new RouteCompiler();
     $result = $route_compiler->getFit($path);
     $this->assertSame($expected, $result);
@@ -54,7 +54,7 @@ public static function providerTestGetFit() {
   /**
    * Confirms that a route compiles properly with the necessary data.
    */
-  public function testCompilation() {
+  public function testCompilation(): void {
     $route = new Route('/test/{something}/more');
     $route->setOption('compiler_class', RouteCompiler::class);
     $compiled = $route->compile();
@@ -66,7 +66,7 @@ public function testCompilation() {
   /**
    * Confirms that a compiled route with default values has the correct outline.
    */
-  public function testCompilationDefaultValue() {
+  public function testCompilationDefaultValue(): void {
     // Because "here" has a default value, it should not factor into the outline
     // or the fitness.
     $route = new Route('/test/{something}/more/{here}', [
diff --git a/core/tests/Drupal/Tests/Core/Routing/RouteMatchTest.php b/core/tests/Drupal/Tests/Core/Routing/RouteMatchTest.php
index 47ebf10829e1..85fa3e400fce 100644
--- a/core/tests/Drupal/Tests/Core/Routing/RouteMatchTest.php
+++ b/core/tests/Drupal/Tests/Core/Routing/RouteMatchTest.php
@@ -28,7 +28,7 @@ protected static function getRouteMatch(string $name, Route $route, array $param
    * @covers ::createFromRequest
    * @covers ::__construct
    */
-  public function testRouteMatchFromRequest() {
+  public function testRouteMatchFromRequest(): void {
     $request = new Request();
 
     // A request that hasn't been routed yet.
diff --git a/core/tests/Drupal/Tests/Core/Routing/RoutePreloaderTest.php b/core/tests/Drupal/Tests/Core/Routing/RoutePreloaderTest.php
index a18b0a80af33..41e1eb9dc488 100644
--- a/core/tests/Drupal/Tests/Core/Routing/RoutePreloaderTest.php
+++ b/core/tests/Drupal/Tests/Core/Routing/RoutePreloaderTest.php
@@ -52,7 +52,7 @@ protected function setUp(): void {
   /**
    * Tests onAlterRoutes with just admin routes.
    */
-  public function testOnAlterRoutesWithAdminRoutes() {
+  public function testOnAlterRoutesWithAdminRoutes(): void {
     $event = $this->getMockBuilder('Drupal\Core\Routing\RouteBuildEvent')
       ->disableOriginalConstructor()
       ->getMock();
@@ -73,7 +73,7 @@ public function testOnAlterRoutesWithAdminRoutes() {
   /**
    * Tests onAlterRoutes with "admin" appearing in the path.
    */
-  public function testOnAlterRoutesWithAdminPathNoAdminRoute() {
+  public function testOnAlterRoutesWithAdminPathNoAdminRoute(): void {
     $event = $this->getMockBuilder('Drupal\Core\Routing\RouteBuildEvent')
       ->disableOriginalConstructor()
       ->getMock();
@@ -96,7 +96,7 @@ public function testOnAlterRoutesWithAdminPathNoAdminRoute() {
   /**
    * Tests onAlterRoutes with admin routes and non admin routes.
    */
-  public function testOnAlterRoutesWithNonAdminRoutes() {
+  public function testOnAlterRoutesWithNonAdminRoutes(): void {
     $event = $this->getMockBuilder('Drupal\Core\Routing\RouteBuildEvent')
       ->disableOriginalConstructor()
       ->getMock();
@@ -134,7 +134,7 @@ public function testOnAlterRoutesWithNonAdminRoutes() {
   /**
    * Tests onRequest on a non html request.
    */
-  public function testOnRequestNonHtml() {
+  public function testOnRequestNonHtml(): void {
     $event = $this->getMockBuilder('\Symfony\Component\HttpKernel\Event\KernelEvent')
       ->disableOriginalConstructor()
       ->getMock();
@@ -155,7 +155,7 @@ public function testOnRequestNonHtml() {
   /**
    * Tests onRequest on a html request.
    */
-  public function testOnRequestOnHtml() {
+  public function testOnRequestOnHtml(): void {
     $event = $this->getMockBuilder('\Symfony\Component\HttpKernel\Event\KernelEvent')
       ->disableOriginalConstructor()
       ->getMock();
diff --git a/core/tests/Drupal/Tests/Core/Routing/RouterTest.php b/core/tests/Drupal/Tests/Core/Routing/RouterTest.php
index cdee3b81c353..254cf4669313 100644
--- a/core/tests/Drupal/Tests/Core/Routing/RouterTest.php
+++ b/core/tests/Drupal/Tests/Core/Routing/RouterTest.php
@@ -24,7 +24,7 @@ class RouterTest extends UnitTestCase {
   /**
    * @covers ::applyFitOrder
    */
-  public function testMatchesWithDifferentFitOrder() {
+  public function testMatchesWithDifferentFitOrder(): void {
     $route_provider = $this->prophesize(RouteProviderInterface::class);
 
     $route_collection = new RouteCollection();
diff --git a/core/tests/Drupal/Tests/Core/Routing/RouterUnsupportedTest.php b/core/tests/Drupal/Tests/Core/Routing/RouterUnsupportedTest.php
index cc306b0812e7..4996d76988ff 100644
--- a/core/tests/Drupal/Tests/Core/Routing/RouterUnsupportedTest.php
+++ b/core/tests/Drupal/Tests/Core/Routing/RouterUnsupportedTest.php
@@ -21,7 +21,7 @@ class RouterUnsupportedTest extends UnitTestCase {
   /**
    * @covers ::generate
    */
-  public function testGenerateUnsupported() {
+  public function testGenerateUnsupported(): void {
     $this->expectException(\BadMethodCallException::class);
     $route_provider = $this->prophesize(RouteProviderInterface::class);
     $current_path_stack = $this->prophesize(CurrentPathStack::class);
diff --git a/core/tests/Drupal/Tests/Core/Routing/TrustedRedirectResponseTest.php b/core/tests/Drupal/Tests/Core/Routing/TrustedRedirectResponseTest.php
index 440904c014b6..fb6183466a5c 100644
--- a/core/tests/Drupal/Tests/Core/Routing/TrustedRedirectResponseTest.php
+++ b/core/tests/Drupal/Tests/Core/Routing/TrustedRedirectResponseTest.php
@@ -22,7 +22,7 @@ class TrustedRedirectResponseTest extends UnitTestCase {
   /**
    * @covers ::setTargetUrl
    */
-  public function testSetTargetUrlWithInternalUrl() {
+  public function testSetTargetUrlWithInternalUrl(): void {
     $redirect_response = new TrustedRedirectResponse('/example');
     $redirect_response->setTargetUrl('/example2');
 
@@ -32,7 +32,7 @@ public function testSetTargetUrlWithInternalUrl() {
   /**
    * @covers ::setTargetUrl
    */
-  public function testSetTargetUrlWithUntrustedUrl() {
+  public function testSetTargetUrlWithUntrustedUrl(): void {
     $request_context = new RequestContext();
     $request_context->setCompleteBaseUrl('https://www.drupal.org');
     $container = new ContainerBuilder();
@@ -48,7 +48,7 @@ public function testSetTargetUrlWithUntrustedUrl() {
   /**
    * @covers ::setTargetUrl
    */
-  public function testSetTargetUrlWithTrustedUrl() {
+  public function testSetTargetUrlWithTrustedUrl(): void {
     $redirect_response = new TrustedRedirectResponse('/example');
 
     $redirect_response->setTrustedTargetUrl('http://good-external-url.com/example');
@@ -59,7 +59,7 @@ public function testSetTargetUrlWithTrustedUrl() {
    * @covers ::createFromRedirectResponse
    * @dataProvider providerCreateFromRedirectResponse
    */
-  public function testCreateFromRedirectResponse($redirect_response) {
+  public function testCreateFromRedirectResponse($redirect_response): void {
     $trusted_redirect_response = TrustedRedirectResponse::createFromRedirectResponse($redirect_response);
 
     // The trusted redirect response is always a CacheableResponseInterface instance.
diff --git a/core/tests/Drupal/Tests/Core/Routing/UrlGeneratorTest.php b/core/tests/Drupal/Tests/Core/Routing/UrlGeneratorTest.php
index 068f13f23b78..26c3b7663a56 100644
--- a/core/tests/Drupal/Tests/Core/Routing/UrlGeneratorTest.php
+++ b/core/tests/Drupal/Tests/Core/Routing/UrlGeneratorTest.php
@@ -207,7 +207,7 @@ public function aliasManagerCallback() {
   /**
    * Confirms that generated routes will have aliased paths.
    */
-  public function testAliasGeneration() {
+  public function testAliasGeneration(): void {
     $url = $this->generator->generate('test_1');
     $this->assertEquals('/hello/world', $url);
     // No cacheability to test; UrlGenerator::generate() doesn't support
@@ -227,7 +227,7 @@ public function testAliasGeneration() {
   /**
    * Confirms that generated routes will have aliased paths using interface constants.
    */
-  public function testAliasGenerationUsingInterfaceConstants() {
+  public function testAliasGenerationUsingInterfaceConstants(): void {
     $url = $this->generator->generate('test_1', [], UrlGenerator::ABSOLUTE_PATH);
     $this->assertEquals('/hello/world', $url);
     // No cacheability to test; UrlGenerator::generate() doesn't support
@@ -247,7 +247,7 @@ public function testAliasGenerationUsingInterfaceConstants() {
   /**
    * @covers ::generateFromRoute
    */
-  public function testUrlGenerationWithDisabledPathProcessing() {
+  public function testUrlGenerationWithDisabledPathProcessing(): void {
     $path_processor = $this->prophesize(OutboundPathProcessorInterface::class);
     $path_processor->processOutbound(Argument::cetera())->shouldNotBeCalled();
 
@@ -261,7 +261,7 @@ public function testUrlGenerationWithDisabledPathProcessing() {
   /**
    * @covers ::generateFromRoute
    */
-  public function testUrlGenerationWithDisabledPathProcessingByRoute() {
+  public function testUrlGenerationWithDisabledPathProcessingByRoute(): void {
     $path_processor = $this->prophesize(OutboundPathProcessorInterface::class);
     $path_processor->processOutbound(Argument::cetera())->shouldNotBeCalled();
 
@@ -278,7 +278,7 @@ public function testUrlGenerationWithDisabledPathProcessingByRoute() {
   /**
    * @covers ::generateFromRoute
    */
-  public function testUrlGenerationWithDisabledPathProcessingByRouteAndOptedInPathProcessing() {
+  public function testUrlGenerationWithDisabledPathProcessingByRouteAndOptedInPathProcessing(): void {
     $path_processor = $this->prophesize(OutboundPathProcessorInterface::class);
     $path_processor->processOutbound('/test/one', Argument::cetera())->willReturn('/hello/world')->shouldBeCalled();
 
@@ -295,7 +295,7 @@ public function testUrlGenerationWithDisabledPathProcessingByRouteAndOptedInPath
   /**
    * Tests URL generation in a subdirectory.
    */
-  public function testGetPathFromRouteWithSubdirectory() {
+  public function testGetPathFromRouteWithSubdirectory(): void {
     $this->routeProcessorManager->expects($this->once())
       ->method('processOutbound');
 
@@ -306,7 +306,7 @@ public function testGetPathFromRouteWithSubdirectory() {
   /**
    * Confirms that generated routes will have aliased paths.
    */
-  public function testAliasGenerationWithParameters() {
+  public function testAliasGenerationWithParameters(): void {
     $url = $this->generator->generate('test_2', ['Lassie' => '5']);
     $this->assertEquals('/goodbye/cruel/world', $url);
     // No cacheability to test; UrlGenerator::generate() doesn't support
@@ -339,7 +339,7 @@ public function testAliasGenerationWithParameters() {
    *
    * @dataProvider providerTestAliasGenerationWithOptions
    */
-  public function testAliasGenerationWithOptions($route_name, $route_parameters, $options, $expected) {
+  public function testAliasGenerationWithOptions($route_name, $route_parameters, $options, $expected): void {
     $this->assertGenerateFromRoute($route_name, $route_parameters, $options, $expected, (new BubbleableMetadata())->setCacheMaxAge(Cache::PERMANENT));
   }
 
@@ -388,7 +388,7 @@ public static function providerTestAliasGenerationWithOptions() {
   /**
    * Tests URL generation from route with trailing start and end slashes.
    */
-  public function testGetPathFromRouteTrailing() {
+  public function testGetPathFromRouteTrailing(): void {
     $this->routeProcessorManager->expects($this->once())
       ->method('processOutbound');
 
@@ -399,7 +399,7 @@ public function testGetPathFromRouteTrailing() {
   /**
    * Confirms that absolute URLs work with generated routes.
    */
-  public function testAbsoluteURLGeneration() {
+  public function testAbsoluteURLGeneration(): void {
     $url = $this->generator->generate('test_1', [], TRUE);
     $this->assertEquals('http://localhost/hello/world', $url);
     // No cacheability to test; UrlGenerator::generate() doesn't support
@@ -417,7 +417,7 @@ public function testAbsoluteURLGeneration() {
   /**
    * Confirms that absolute URLs work with generated routes using interface constants.
    */
-  public function testAbsoluteURLGenerationUsingInterfaceConstants() {
+  public function testAbsoluteURLGenerationUsingInterfaceConstants(): void {
     $url = $this->generator->generate('test_1', [], UrlGenerator::ABSOLUTE_URL);
     $this->assertEquals('http://localhost/hello/world', $url);
     // No cacheability to test; UrlGenerator::generate() doesn't support
@@ -435,7 +435,7 @@ public function testAbsoluteURLGenerationUsingInterfaceConstants() {
   /**
    * Confirms that explicitly setting the base_url works with generated routes.
    */
-  public function testBaseURLGeneration() {
+  public function testBaseURLGeneration(): void {
     $options = ['base_url' => 'http://www.example.com:8888'];
     $this->assertGenerateFromRoute('test_1', [], $options, 'http://www.example.com:8888/hello/world', (new BubbleableMetadata())->setCacheMaxAge(Cache::PERMANENT));
 
@@ -457,7 +457,7 @@ public function testBaseURLGeneration() {
   /**
    * Tests the 'scheme' route requirement during URL generation.
    */
-  public function testUrlGenerationWithHttpsRequirement() {
+  public function testUrlGenerationWithHttpsRequirement(): void {
     $url = $this->generator->generate('test_4', [], TRUE);
     $this->assertEquals('https://localhost/test/four', $url);
     // No cacheability to test; UrlGenerator::generate() doesn't support
@@ -483,7 +483,7 @@ public function testUrlGenerationWithHttpsRequirement() {
    *
    * @dataProvider providerTestNoPath
    */
-  public function testNoPath($options, $expected_url) {
+  public function testNoPath($options, $expected_url): void {
     $url = $this->generator->generateFromRoute('<none>', [], $options);
     $this->assertEquals($expected_url, $url);
   }
@@ -511,7 +511,7 @@ public static function providerTestNoPath() {
   /**
    * @covers \Drupal\Core\Routing\UrlGenerator::generateFromRoute
    */
-  public function testGenerateWithPathProcessorChangingOptions() {
+  public function testGenerateWithPathProcessorChangingOptions(): void {
     $path_processor = $this->createMock(OutboundPathProcessorInterface::CLASS);
     $path_processor->expects($this->atLeastOnce())
       ->method('processOutbound')
diff --git a/core/tests/Drupal/Tests/Core/Security/DoTrustedCallbackTraitTest.php b/core/tests/Drupal/Tests/Core/Security/DoTrustedCallbackTraitTest.php
index 60b454ac5fff..0b6e0c4d49b4 100644
--- a/core/tests/Drupal/Tests/Core/Security/DoTrustedCallbackTraitTest.php
+++ b/core/tests/Drupal/Tests/Core/Security/DoTrustedCallbackTraitTest.php
@@ -21,7 +21,7 @@ class DoTrustedCallbackTraitTest extends UnitTestCase {
    * @covers ::doTrustedCallback
    * @dataProvider providerTestTrustedCallbacks
    */
-  public function testTrustedCallbacks(callable $callback, $extra_trusted_interface = NULL) {
+  public function testTrustedCallbacks(callable $callback, $extra_trusted_interface = NULL): void {
     $return = $this->doTrustedCallback($callback, [], '%s is not trusted', TrustedCallbackInterface::THROW_EXCEPTION, $extra_trusted_interface);
     $this->assertSame('test', $return);
   }
@@ -50,7 +50,7 @@ public static function providerTestTrustedCallbacks() {
    * @covers ::doTrustedCallback
    * @dataProvider providerTestUntrustedCallbacks
    */
-  public function testUntrustedCallbacks(callable $callback, $extra_trusted_interface = NULL) {
+  public function testUntrustedCallbacks(callable $callback, $extra_trusted_interface = NULL): void {
     $this->expectException(UntrustedCallbackException::class);
     $this->doTrustedCallback($callback, [], '%s is not trusted', TrustedCallbackInterface::THROW_EXCEPTION, $extra_trusted_interface);
   }
@@ -72,7 +72,7 @@ public static function providerTestUntrustedCallbacks() {
   /**
    * @dataProvider errorTypeProvider
    */
-  public function testException($callback) {
+  public function testException($callback): void {
     $this->expectException(UntrustedCallbackException::class);
     $this->expectExceptionMessage('Drupal\Tests\Core\Security\UntrustedObject::callback is not trusted');
     $this->doTrustedCallback($callback, [], '%s is not trusted');
@@ -82,7 +82,7 @@ public function testException($callback) {
    * @dataProvider errorTypeProvider
    * @group legacy
    */
-  public function testSilencedDeprecation($callback) {
+  public function testSilencedDeprecation($callback): void {
     $this->expectDeprecation('Drupal\Tests\Core\Security\UntrustedObject::callback is not trusted');
     $this->doTrustedCallback($callback, [], '%s is not trusted', TrustedCallbackInterface::TRIGGER_SILENCED_DEPRECATION);
   }
diff --git a/core/tests/Drupal/Tests/Core/Security/RequestSanitizerTest.php b/core/tests/Drupal/Tests/Core/Security/RequestSanitizerTest.php
index b7f55934346b..ee3394b6391d 100644
--- a/core/tests/Drupal/Tests/Core/Security/RequestSanitizerTest.php
+++ b/core/tests/Drupal/Tests/Core/Security/RequestSanitizerTest.php
@@ -60,7 +60,7 @@ protected function tearDown(): void {
    *
    * @dataProvider providerTestRequestSanitization
    */
-  public function testRequestSanitization(Request $request, array $expected = [], ?array $expected_errors = NULL, array $whitelist = []) {
+  public function testRequestSanitization(Request $request, array $expected = [], ?array $expected_errors = NULL, array $whitelist = []): void {
     // Set up globals.
     $_GET = $request->query->all();
     $_POST = $request->request->all();
@@ -215,7 +215,7 @@ public static function providerTestRequestSanitization() {
    *
    * @dataProvider providerTestAcceptableDestinations
    */
-  public function testAcceptableDestinationGet($destination) {
+  public function testAcceptableDestinationGet($destination): void {
     // Set up a GET request.
     $request = $this->createRequestForTesting(['destination' => $destination]);
 
@@ -237,7 +237,7 @@ public function testAcceptableDestinationGet($destination) {
    *
    * @dataProvider providerTestSanitizedDestinations
    */
-  public function testSanitizedDestinationGet($destination) {
+  public function testSanitizedDestinationGet($destination): void {
     // Set up a GET request.
     $request = $this->createRequestForTesting(['destination' => $destination]);
 
@@ -259,7 +259,7 @@ public function testSanitizedDestinationGet($destination) {
    *
    * @dataProvider providerTestAcceptableDestinations
    */
-  public function testAcceptableDestinationPost($destination) {
+  public function testAcceptableDestinationPost($destination): void {
     // Set up a POST request.
     $request = $this->createRequestForTesting([], ['destination' => $destination]);
 
@@ -281,7 +281,7 @@ public function testAcceptableDestinationPost($destination) {
    *
    * @dataProvider providerTestSanitizedDestinations
    */
-  public function testSanitizedDestinationPost($destination) {
+  public function testSanitizedDestinationPost($destination): void {
     // Set up a POST request.
     $request = $this->createRequestForTesting([], ['destination' => $destination]);
 
diff --git a/core/tests/Drupal/Tests/Core/Session/AccessPolicyProcessorTest.php b/core/tests/Drupal/Tests/Core/Session/AccessPolicyProcessorTest.php
index ebd6002999ce..9f14175e85db 100644
--- a/core/tests/Drupal/Tests/Core/Session/AccessPolicyProcessorTest.php
+++ b/core/tests/Drupal/Tests/Core/Session/AccessPolicyProcessorTest.php
@@ -48,7 +48,7 @@ public function setUp(): void {
   /**
    * Tests that access policies are properly processed.
    */
-  public function testCalculatePermissions() {
+  public function testCalculatePermissions(): void {
     $account = $this->prophesize(AccountInterface::class)->reveal();
     $access_policy = new BarAccessPolicy();
 
@@ -63,7 +63,7 @@ public function testCalculatePermissions() {
   /**
    * Tests that access policies that do not apply are not processed.
    */
-  public function testCalculatePermissionsNoApply() {
+  public function testCalculatePermissionsNoApply(): void {
     $account = $this->prophesize(AccountInterface::class)->reveal();
     $access_policy = new BarAccessPolicy();
 
@@ -79,7 +79,7 @@ public function testCalculatePermissionsNoApply() {
   /**
    * Tests that access policies can alter the final result.
    */
-  public function testAlterPermissions() {
+  public function testAlterPermissions(): void {
     $account = $this->prophesize(AccountInterface::class)->reveal();
 
     $processor = $this->setUpAccessPolicyProcessor();
@@ -97,7 +97,7 @@ public function testAlterPermissions() {
   /**
    * Tests that alters that do not apply are not processed.
    */
-  public function testAlterPermissionsNoApply() {
+  public function testAlterPermissionsNoApply(): void {
     $account = $this->prophesize(AccountInterface::class)->reveal();
 
     $processor = $this->setUpAccessPolicyProcessor();
@@ -112,7 +112,7 @@ public function testAlterPermissionsNoApply() {
   /**
    * Tests that access policies which do nothing are properly processed.
    */
-  public function testEmptyCalculator() {
+  public function testEmptyCalculator(): void {
     $account = $this->prophesize(AccountInterface::class)->reveal();
     $access_policy = new EmptyAccessPolicy();
 
@@ -128,7 +128,7 @@ public function testEmptyCalculator() {
   /**
    * Tests that everything works if no access policies are present.
    */
-  public function testNoCalculators() {
+  public function testNoCalculators(): void {
     $account = $this->prophesize(AccountInterface::class)->reveal();
     $processor = $this->setUpAccessPolicyProcessor();
 
@@ -141,7 +141,7 @@ public function testNoCalculators() {
   /**
    * Tests the wrong scope exception.
    */
-  public function testWrongScopeException() {
+  public function testWrongScopeException(): void {
     $processor = $this->setUpAccessPolicyProcessor();
     $processor->addAccessPolicy(new AlwaysAddsAccessPolicy());
 
@@ -153,7 +153,7 @@ public function testWrongScopeException() {
   /**
    * Tests the multiple scopes exception.
    */
-  public function testMultipleScopeException() {
+  public function testMultipleScopeException(): void {
     $processor = $this->setUpAccessPolicyProcessor();
     $processor->addAccessPolicy(new FooAccessPolicy());
     $processor->addAccessPolicy(new AlwaysAddsAccessPolicy());
@@ -166,7 +166,7 @@ public function testMultipleScopeException() {
   /**
    * Tests the multiple scopes exception.
    */
-  public function testMultipleScopeAlterException() {
+  public function testMultipleScopeAlterException(): void {
     $processor = $this->setUpAccessPolicyProcessor();
     $processor->addAccessPolicy(new FooAccessPolicy());
     $processor->addAccessPolicy(new AlwaysAltersAccessPolicy());
@@ -188,7 +188,7 @@ public function testMultipleScopeAlterException() {
    *
    * @dataProvider accountSwitcherProvider
    */
-  public function testAccountSwitcher(bool $has_user_context, bool $is_current_user, bool $should_call_switcher) {
+  public function testAccountSwitcher(bool $has_user_context, bool $is_current_user, bool $should_call_switcher): void {
     $account = $this->prophesize(AccountInterface::class);
     $account->id()->willReturn(2);
     $account = $account->reveal();
@@ -253,7 +253,7 @@ public static function accountSwitcherProvider() {
    *
    * @dataProvider cachingProvider
    */
-  public function testCaching(bool $db_cache_hit, bool $static_cache_hit) {
+  public function testCaching(bool $db_cache_hit, bool $static_cache_hit): void {
     if ($static_cache_hit) {
       $this->assertFalse($db_cache_hit, 'DB cache should never be checked when there is a static hit.');
     }
@@ -313,7 +313,7 @@ public static function cachingProvider() {
   /**
    * Tests that only the cache contexts for policies that apply are added.
    */
-  public function testCacheContexts() {
+  public function testCacheContexts(): void {
     // BazAccessPolicy and BarAlterAccessPolicy shouldn't add any contexts.
     $initial_cacheability = (new CacheableMetadata())->addCacheContexts(['foo', 'bar']);
     $final_cacheability = (new CacheableMetadata())->addCacheContexts(['foo', 'bar'])->addCacheTags(['access_policies']);
@@ -336,7 +336,7 @@ public function testCacheContexts() {
   /**
    * Tests that the persistent cache contexts are added properly.
    */
-  public function testCacheContextCaching() {
+  public function testCacheContextCaching(): void {
     $cache_entry = new \stdClass();
     $cache_entry->data = ['baz'];
 
diff --git a/core/tests/Drupal/Tests/Core/Session/AccountProxyTest.php b/core/tests/Drupal/Tests/Core/Session/AccountProxyTest.php
index 770a732fcebb..98a35b8fcf83 100644
--- a/core/tests/Drupal/Tests/Core/Session/AccountProxyTest.php
+++ b/core/tests/Drupal/Tests/Core/Session/AccountProxyTest.php
@@ -23,7 +23,7 @@ class AccountProxyTest extends UnitTestCase {
    * @covers ::id
    * @covers ::setInitialAccountId
    */
-  public function testId() {
+  public function testId(): void {
     $dispatcher = $this->prophesize(EventDispatcherInterface::class);
     $dispatcher->dispatch(Argument::any(), Argument::any())->willReturn(new Event());
     $account_proxy = new AccountProxy($dispatcher->reveal());
@@ -43,7 +43,7 @@ public function testId() {
   /**
    * @covers ::setInitialAccountId
    */
-  public function testSetInitialAccountIdException() {
+  public function testSetInitialAccountIdException(): void {
     $this->expectException(\LogicException::class);
     $dispatcher = $this->prophesize(EventDispatcherInterface::class);
     $dispatcher->dispatch(Argument::any(), Argument::any())->willReturn(new Event());
@@ -56,7 +56,7 @@ public function testSetInitialAccountIdException() {
   /**
    * @covers ::hasRole
    */
-  public function testHasRole() {
+  public function testHasRole(): void {
     $dispatcher = $this->prophesize(EventDispatcherInterface::class);
     $dispatcher->dispatch(Argument::any(), Argument::any())->willReturn(new Event());
     $account_proxy = new AccountProxy($dispatcher->reveal());
diff --git a/core/tests/Drupal/Tests/Core/Session/AnonymousUserSessionTest.php b/core/tests/Drupal/Tests/Core/Session/AnonymousUserSessionTest.php
index 23631aa86ddf..18783b852602 100644
--- a/core/tests/Drupal/Tests/Core/Session/AnonymousUserSessionTest.php
+++ b/core/tests/Drupal/Tests/Core/Session/AnonymousUserSessionTest.php
@@ -20,7 +20,7 @@ class AnonymousUserSessionTest extends UnitTestCase {
    * @covers ::getRoles
    * @todo Move roles constants to a class/interface
    */
-  public function testUserGetRoles() {
+  public function testUserGetRoles(): void {
     $anonymous_user = new AnonymousUserSession();
     $this->assertEquals([RoleInterface::ANONYMOUS_ID], $anonymous_user->getRoles());
     $this->assertEquals([], $anonymous_user->getRoles(TRUE));
diff --git a/core/tests/Drupal/Tests/Core/Session/CalculatedPermissionsItemTest.php b/core/tests/Drupal/Tests/Core/Session/CalculatedPermissionsItemTest.php
index 85cd51e2de58..15a4a904208a 100644
--- a/core/tests/Drupal/Tests/Core/Session/CalculatedPermissionsItemTest.php
+++ b/core/tests/Drupal/Tests/Core/Session/CalculatedPermissionsItemTest.php
@@ -24,7 +24,7 @@ class CalculatedPermissionsItemTest extends UnitTestCase {
    * @covers ::getPermissions
    * @covers ::isAdmin
    */
-  public function testConstructor() {
+  public function testConstructor(): void {
     $scope = 'some_scope';
 
     $item = new CalculatedPermissionsItem(['bar', 'baz', 'bar'], FALSE, $scope, 'foo');
@@ -44,7 +44,7 @@ public function testConstructor() {
    * @covers ::hasPermission
    * @depends testConstructor
    */
-  public function testHasPermission() {
+  public function testHasPermission(): void {
     $item = new CalculatedPermissionsItem(['bar'], FALSE, 'some_scope', 'foo');
     $this->assertFalse($item->hasPermission('baz'), 'Missing permission was not found.');
     $this->assertTrue($item->hasPermission('bar'), 'Existing permission was found.');
@@ -56,7 +56,7 @@ public function testHasPermission() {
    * @covers ::hasPermission
    * @depends testConstructor
    */
-  public function testHasPermissionWithAdminFlag() {
+  public function testHasPermissionWithAdminFlag(): void {
     $item = new CalculatedPermissionsItem(['bar'], TRUE, 'some_scope', 'foo');
     $this->assertTrue($item->hasPermission('baz'), 'Missing permission was found.');
     $this->assertTrue($item->hasPermission('bar'), 'Existing permission was found.');
diff --git a/core/tests/Drupal/Tests/Core/Session/CalculatedPermissionsTest.php b/core/tests/Drupal/Tests/Core/Session/CalculatedPermissionsTest.php
index d24d3bfc539d..fa5f4a62dff7 100644
--- a/core/tests/Drupal/Tests/Core/Session/CalculatedPermissionsTest.php
+++ b/core/tests/Drupal/Tests/Core/Session/CalculatedPermissionsTest.php
@@ -21,7 +21,7 @@ class CalculatedPermissionsTest extends UnitTestCase {
   /**
    * Tests that the object values were set in the constructor.
    */
-  public function testConstructor() {
+  public function testConstructor(): void {
     $item_a = new CalculatedPermissionsItem(['baz'], FALSE, 'scope_a', 'foo');
     $item_b = new CalculatedPermissionsItem(['bob', 'charlie'], FALSE, 'scope_b', 1);
 
diff --git a/core/tests/Drupal/Tests/Core/Session/MetadataBagTest.php b/core/tests/Drupal/Tests/Core/Session/MetadataBagTest.php
index 379b434379da..f9a796ece37c 100644
--- a/core/tests/Drupal/Tests/Core/Session/MetadataBagTest.php
+++ b/core/tests/Drupal/Tests/Core/Session/MetadataBagTest.php
@@ -17,7 +17,7 @@ class MetadataBagTest extends UnitTestCase {
   /**
    * @covers ::stampNew
    */
-  public function testStampNew() {
+  public function testStampNew(): void {
     $metadata = new MetadataBag(new Settings([]));
     $metadata->setCsrfTokenSeed('a_cryptographically_secure_long_random_string_should_used_here');
     $metadata->stampNew();
diff --git a/core/tests/Drupal/Tests/Core/Session/PermissionsHashGeneratorTest.php b/core/tests/Drupal/Tests/Core/Session/PermissionsHashGeneratorTest.php
index 067472b3b05f..3d9050516951 100644
--- a/core/tests/Drupal/Tests/Core/Session/PermissionsHashGeneratorTest.php
+++ b/core/tests/Drupal/Tests/Core/Session/PermissionsHashGeneratorTest.php
@@ -96,7 +96,7 @@ protected function setUp(): void {
    *
    * @covers ::generate
    */
-  public function testGenerateRegular() {
+  public function testGenerateRegular(): void {
     $permissions = new CalculatedPermissions(
       (new RefinableCalculatedPermissions())->addItem(new CalculatedPermissionsItem([
         'permission foo',
@@ -117,7 +117,7 @@ public function testGenerateRegular() {
    *
    * @covers ::generate
    */
-  public function testGenerateAdmin() {
+  public function testGenerateAdmin(): void {
     $permissions = new CalculatedPermissions((new RefinableCalculatedPermissions())->addItem(new CalculatedPermissionsItem([], TRUE)));
     $this->processor->processAccessPolicies($this->account1)->willReturn($permissions);
     $this->processor->processAccessPolicies($this->account2)->willReturn($permissions);
@@ -136,7 +136,7 @@ public function testGenerateAdmin() {
    *
    * @covers ::generate
    */
-  public function testGenerateNoAccessPolicies() {
+  public function testGenerateNoAccessPolicies(): void {
     $permissions = new CalculatedPermissions(new RefinableCalculatedPermissions());
     $this->processor->processAccessPolicies($this->account1)->willReturn($permissions);
     $this->processor->processAccessPolicies($this->account2)->willReturn($permissions);
@@ -155,7 +155,7 @@ public function testGenerateNoAccessPolicies() {
    *
    * @covers ::generate
    */
-  public function testGenerateCache() {
+  public function testGenerateCache(): void {
     $permissions = new CalculatedPermissions(new RefinableCalculatedPermissions());
     $this->processor->processAccessPolicies($this->account1)->willReturn($permissions);
     $this->processor->processAccessPolicies($this->account2)->willReturn($permissions);
diff --git a/core/tests/Drupal/Tests/Core/Session/RefinableCalculatedPermissionsTest.php b/core/tests/Drupal/Tests/Core/Session/RefinableCalculatedPermissionsTest.php
index 454a86741836..43b6d127094a 100644
--- a/core/tests/Drupal/Tests/Core/Session/RefinableCalculatedPermissionsTest.php
+++ b/core/tests/Drupal/Tests/Core/Session/RefinableCalculatedPermissionsTest.php
@@ -23,7 +23,7 @@ class RefinableCalculatedPermissionsTest extends UnitTestCase {
   /**
    * Tests the addition of a calculated permissions item.
    */
-  public function testAddItem() {
+  public function testAddItem(): void {
     $calculated_permissions = new RefinableCalculatedPermissions();
     $scope = 'some_scope';
 
@@ -46,7 +46,7 @@ public function testAddItem() {
    *
    * @depends testAddItem
    */
-  public function testAddItemOverwrite() {
+  public function testAddItemOverwrite(): void {
     $calculated_permissions = new RefinableCalculatedPermissions();
     $scope = 'some_scope';
 
@@ -63,7 +63,7 @@ public function testAddItemOverwrite() {
    *
    * @depends testAddItem
    */
-  public function testRemoveItem() {
+  public function testRemoveItem(): void {
     $scope = 'some_scope';
     $item = new CalculatedPermissionsItem(['bar'], FALSE, $scope, 'foo');
 
@@ -78,7 +78,7 @@ public function testRemoveItem() {
    *
    * @depends testAddItem
    */
-  public function testRemoveItems() {
+  public function testRemoveItems(): void {
     $scope = 'some_scope';
     $item = new CalculatedPermissionsItem(['bar'], FALSE, $scope, 'foo');
 
@@ -94,7 +94,7 @@ public function testRemoveItems() {
    *
    * @depends testAddItem
    */
-  public function testRemoveItemsByScope() {
+  public function testRemoveItemsByScope(): void {
     $scope_a = 'cat';
     $scope_b = 'dog';
 
@@ -115,7 +115,7 @@ public function testRemoveItemsByScope() {
    *
    * @depends testAddItem
    */
-  public function testMerge() {
+  public function testMerge(): void {
     $scope = 'some_scope';
 
     $cache_context_manager = $this->prophesize(CacheContextsManager::class);
diff --git a/core/tests/Drupal/Tests/Core/Session/SessionConfigurationTest.php b/core/tests/Drupal/Tests/Core/Session/SessionConfigurationTest.php
index fd85368f4c44..aa03d6b5dc3c 100644
--- a/core/tests/Drupal/Tests/Core/Session/SessionConfigurationTest.php
+++ b/core/tests/Drupal/Tests/Core/Session/SessionConfigurationTest.php
@@ -32,7 +32,7 @@ protected function createSessionConfiguration($options = []) {
    *
    * @dataProvider providerTestGeneratedCookieDomain
    */
-  public function testGeneratedCookieDomain($uri, $expected_domain) {
+  public function testGeneratedCookieDomain($uri, $expected_domain): void {
     $config = $this->createSessionConfiguration();
 
     $request = Request::create($uri);
@@ -71,7 +71,7 @@ public static function providerTestGeneratedCookieDomain() {
    *
    * @dataProvider providerTestEnforcedCookieDomain
    */
-  public function testEnforcedCookieDomain($uri, $expected_domain) {
+  public function testEnforcedCookieDomain($uri, $expected_domain): void {
     $config = $this->createSessionConfiguration(['cookie_domain' => '.example.com']);
 
     $request = Request::create($uri);
@@ -109,7 +109,7 @@ public static function providerTestEnforcedCookieDomain() {
    *
    * @dataProvider providerTestCookieSecure
    */
-  public function testCookieSecure($uri, $expected_secure) {
+  public function testCookieSecure($uri, $expected_secure): void {
     $config = $this->createSessionConfiguration();
 
     $request = Request::create($uri);
@@ -121,7 +121,7 @@ public function testCookieSecure($uri, $expected_secure) {
   /**
    * Test that session.cookie_samesite is configured correctly.
    */
-  public function testSameSiteCookie() {
+  public function testSameSiteCookie(): void {
     $request = Request::create('https://example.com');
 
     $config = $this->createSessionConfiguration(['cookie_samesite' => 'Strict']);
@@ -137,7 +137,7 @@ public function testSameSiteCookie() {
    *
    * @dataProvider providerTestCookieSecure
    */
-  public function testCookieSecureNotOverridable($uri, $expected_secure) {
+  public function testCookieSecureNotOverridable($uri, $expected_secure): void {
     $config = $this->createSessionConfiguration(['cookie_secure' => FALSE]);
 
     $request = Request::create($uri);
@@ -170,7 +170,7 @@ public static function providerTestCookieSecure() {
    *
    * @dataProvider providerTestGeneratedSessionName
    */
-  public function testGeneratedSessionName($uri, $expected_name) {
+  public function testGeneratedSessionName($uri, $expected_name): void {
     $config = $this->createSessionConfiguration();
 
     $request = Request::create($uri);
@@ -218,7 +218,7 @@ public static function providerTestGeneratedSessionName() {
    *
    * @dataProvider providerTestEnforcedSessionName
    */
-  public function testEnforcedSessionNameViaCookieDomain($uri, $expected_name) {
+  public function testEnforcedSessionNameViaCookieDomain($uri, $expected_name): void {
     $config = $this->createSessionConfiguration(['cookie_domain' => '.example.com']);
 
     $request = Request::create($uri);
@@ -266,7 +266,7 @@ public static function providerTestEnforcedSessionName() {
    *
    * @dataProvider providerTestConstructorDefaultSettings
    */
-  public function testConstructorDefaultSettings(array $options, int $expected_sid_length, int $expected_sid_bits_per_character, string $expected_name_suffix) {
+  public function testConstructorDefaultSettings(array $options, int $expected_sid_length, int $expected_sid_bits_per_character, string $expected_name_suffix): void {
     $config = $this->createSessionConfiguration($options);
     $options = $config->getOptions(Request::createFromGlobals());
     $this->assertSame($expected_sid_length, $options['sid_length']);
diff --git a/core/tests/Drupal/Tests/Core/Session/UserSessionTest.php b/core/tests/Drupal/Tests/Core/Session/UserSessionTest.php
index 2957033911cc..db79fca4b17e 100644
--- a/core/tests/Drupal/Tests/Core/Session/UserSessionTest.php
+++ b/core/tests/Drupal/Tests/Core/Session/UserSessionTest.php
@@ -57,7 +57,7 @@ public function testHasPermission(): void {
    * @covers ::getRoles
    * @todo Move roles constants to a class/interface
    */
-  public function testUserGetRoles() {
+  public function testUserGetRoles(): void {
     $user = $this->createUserSession(['role_two'], TRUE);
     $this->assertEquals([RoleInterface::AUTHENTICATED_ID, 'role_two'], $user->getRoles());
     $this->assertEquals(['role_two'], $user->getRoles(TRUE));
@@ -68,7 +68,7 @@ public function testUserGetRoles() {
    *
    * @covers ::hasRole
    */
-  public function testHasRole() {
+  public function testHasRole(): void {
     $user1 = $this->createUserSession(['role_one']);
     $user2 = $this->createUserSession(['role_one', 'role_two']);
     $user3 = $this->createUserSession(['role_two'], TRUE);
diff --git a/core/tests/Drupal/Tests/Core/Session/WriteSafeSessionHandlerTest.php b/core/tests/Drupal/Tests/Core/Session/WriteSafeSessionHandlerTest.php
index 0f2c7498d759..27c3a0e0741f 100644
--- a/core/tests/Drupal/Tests/Core/Session/WriteSafeSessionHandlerTest.php
+++ b/core/tests/Drupal/Tests/Core/Session/WriteSafeSessionHandlerTest.php
@@ -46,7 +46,7 @@ protected function setUp(): void {
    * @covers ::isSessionWritable
    * @covers ::write
    */
-  public function testConstructWriteSafeSessionHandlerDefaultArgs() {
+  public function testConstructWriteSafeSessionHandlerDefaultArgs(): void {
     $session_id = 'some-id';
     $session_data = 'serialized-session-data';
 
@@ -72,7 +72,7 @@ public function testConstructWriteSafeSessionHandlerDefaultArgs() {
    * @covers ::isSessionWritable
    * @covers ::write
    */
-  public function testConstructWriteSafeSessionHandlerDisableWriting() {
+  public function testConstructWriteSafeSessionHandlerDisableWriting(): void {
     $session_id = 'some-id';
     $session_data = 'serialized-session-data';
 
@@ -91,7 +91,7 @@ public function testConstructWriteSafeSessionHandlerDisableWriting() {
    * @covers ::setSessionWritable
    * @covers ::write
    */
-  public function testSetSessionWritable() {
+  public function testSetSessionWritable(): void {
     $session_id = 'some-id';
     $session_data = 'serialized-session-data';
 
@@ -136,7 +136,7 @@ public function testSetSessionWritable() {
    * @covers ::gc
    * @dataProvider providerTestOtherMethods
    */
-  public function testOtherMethods($method, $expected_result, $args) {
+  public function testOtherMethods($method, $expected_result, $args): void {
     $invocation = $this->wrappedSessionHandler->expects($this->exactly(2))
       ->method($method)
       ->willReturn($expected_result);
diff --git a/core/tests/Drupal/Tests/Core/Site/SettingsTest.php b/core/tests/Drupal/Tests/Core/Site/SettingsTest.php
index a2908c00e690..d378dcf983c3 100644
--- a/core/tests/Drupal/Tests/Core/Site/SettingsTest.php
+++ b/core/tests/Drupal/Tests/Core/Site/SettingsTest.php
@@ -48,7 +48,7 @@ protected function setUp(): void {
   /**
    * @covers ::get
    */
-  public function testGet() {
+  public function testGet(): void {
     // Test stored settings.
     $this->assertEquals($this->config['one'], Settings::get('one'), 'The correct setting was not returned.');
     $this->assertEquals($this->config['two'], Settings::get('two'), 'The correct setting was not returned.');
@@ -61,14 +61,14 @@ public function testGet() {
   /**
    * @covers ::getAll
    */
-  public function testGetAll() {
+  public function testGetAll(): void {
     $this->assertEquals($this->config, Settings::getAll());
   }
 
   /**
    * @covers ::getInstance
    */
-  public function testGetInstance() {
+  public function testGetInstance(): void {
     $singleton = $this->settings->getInstance();
     $this->assertEquals($singleton, $this->settings);
   }
@@ -78,7 +78,7 @@ public function testGetInstance() {
    *
    * @covers ::getHashSalt
    */
-  public function testGetHashSalt() {
+  public function testGetHashSalt(): void {
     $this->assertSame($this->config['hash_salt'], $this->settings->getHashSalt());
   }
 
@@ -89,7 +89,7 @@ public function testGetHashSalt() {
    *
    * @dataProvider providerTestGetHashSaltEmpty
    */
-  public function testGetHashSaltEmpty(array $config) {
+  public function testGetHashSaltEmpty(array $config): void {
     // Re-create settings with no 'hash_salt' key.
     $settings = new Settings($config);
     $this->expectException(\RuntimeException::class);
@@ -114,7 +114,7 @@ public static function providerTestGetHashSaltEmpty() {
    *
    * @covers ::__sleep
    */
-  public function testSerialize() {
+  public function testSerialize(): void {
     $this->expectException(\LogicException::class);
     serialize(new Settings([]));
   }
@@ -124,7 +124,7 @@ public function testSerialize() {
    *
    * @covers ::getApcuPrefix
    */
-  public function testGetApcuPrefix() {
+  public function testGetApcuPrefix(): void {
     $settings = new Settings([
       'hash_salt' => 123,
       'apcu_ensure_unique_prefix' => TRUE,
@@ -143,7 +143,7 @@ public function testGetApcuPrefix() {
    *
    * @covers ::getInstance
    */
-  public function testGetInstanceReflection() {
+  public function testGetInstanceReflection(): void {
     $settings = new Settings([]);
 
     $class = new \ReflectionClass(Settings::class);
diff --git a/core/tests/Drupal/Tests/Core/StackMiddleware/ContentLengthTest.php b/core/tests/Drupal/Tests/Core/StackMiddleware/ContentLengthTest.php
index e406d11a02ab..f88be207f401 100644
--- a/core/tests/Drupal/Tests/Core/StackMiddleware/ContentLengthTest.php
+++ b/core/tests/Drupal/Tests/Core/StackMiddleware/ContentLengthTest.php
@@ -21,7 +21,7 @@ class ContentLengthTest extends UnitTestCase {
    * @covers ::handle
    * @dataProvider providerTestSetContentLengthHeader
    */
-  public function testHandle(false|int $expected_header, Response $response) {
+  public function testHandle(false|int $expected_header, Response $response): void {
     $kernel = $this->prophesize(HttpKernelInterface::class);
     $request = Request::create('/');
     $kernel->handle($request, HttpKernelInterface::MAIN_REQUEST, TRUE)->willReturn($response);
diff --git a/core/tests/Drupal/Tests/Core/StackMiddleware/NegotiationMiddlewareTest.php b/core/tests/Drupal/Tests/Core/StackMiddleware/NegotiationMiddlewareTest.php
index 594d6075db0e..b5d76f38d27c 100644
--- a/core/tests/Drupal/Tests/Core/StackMiddleware/NegotiationMiddlewareTest.php
+++ b/core/tests/Drupal/Tests/Core/StackMiddleware/NegotiationMiddlewareTest.php
@@ -42,7 +42,7 @@ protected function setUp(): void {
    *
    * @covers ::getContentType
    */
-  public function testAjaxIframeUpload() {
+  public function testAjaxIframeUpload(): void {
     $request = new Request();
     $request->request->set('ajax_iframe_upload', '1');
 
@@ -54,7 +54,7 @@ public function testAjaxIframeUpload() {
    *
    * @covers ::getContentType
    */
-  public function testFormatViaQueryParameter() {
+  public function testFormatViaQueryParameter(): void {
     $request = new Request();
     $request->query->set('_format', 'bob');
 
@@ -66,7 +66,7 @@ public function testFormatViaQueryParameter() {
    *
    * @covers ::getContentType
    */
-  public function testUnknownContentTypeReturnsNull() {
+  public function testUnknownContentTypeReturnsNull(): void {
     $request = new Request();
 
     $this->assertNull($this->contentNegotiation->getContentType($request));
@@ -77,7 +77,7 @@ public function testUnknownContentTypeReturnsNull() {
    *
    * @covers ::getContentType
    */
-  public function testUnknownContentTypeButAjaxRequest() {
+  public function testUnknownContentTypeButAjaxRequest(): void {
     $request = new Request();
     $request->headers->set('X-Requested-With', 'XMLHttpRequest');
 
@@ -89,7 +89,7 @@ public function testUnknownContentTypeButAjaxRequest() {
    *
    * @covers ::handle
    */
-  public function testHandle() {
+  public function testHandle(): void {
     $request = $this->prophesize(Request::class);
 
     // Default empty format list should not set any formats.
@@ -122,7 +122,7 @@ public function testHandle() {
   /**
    * @covers ::registerFormat
    */
-  public function testSetFormat() {
+  public function testSetFormat(): void {
     $app = $this->createMock(HttpKernelInterface::class);
     $app->expects($this->once())
       ->method('handle')
diff --git a/core/tests/Drupal/Tests/Core/StackMiddleware/ReverseProxyMiddlewareTest.php b/core/tests/Drupal/Tests/Core/StackMiddleware/ReverseProxyMiddlewareTest.php
index dbc4e54de26f..84af0968d8eb 100644
--- a/core/tests/Drupal/Tests/Core/StackMiddleware/ReverseProxyMiddlewareTest.php
+++ b/core/tests/Drupal/Tests/Core/StackMiddleware/ReverseProxyMiddlewareTest.php
@@ -38,7 +38,7 @@ protected function setUp(): void {
   /**
    * Tests that subscriber does not act when reverse proxy is not set.
    */
-  public function testNoProxy() {
+  public function testNoProxy(): void {
     $settings = new Settings([]);
     $this->assertEquals(0, $settings->get('reverse_proxy'));
 
@@ -59,7 +59,7 @@ public function testNoProxy() {
    *
    * @dataProvider reverseProxyEnabledProvider
    */
-  public function testReverseProxyEnabled($provided_settings, $expected_trusted_header_set) {
+  public function testReverseProxyEnabled($provided_settings, $expected_trusted_header_set): void {
     // Enable reverse proxy and add test values.
     $settings = new Settings(['reverse_proxy' => 1] + $provided_settings);
     $this->trustedHeadersAreSet($settings, $expected_trusted_header_set);
diff --git a/core/tests/Drupal/Tests/Core/StringTranslation/ByteSizeMarkupTest.php b/core/tests/Drupal/Tests/Core/StringTranslation/ByteSizeMarkupTest.php
index a125ef27fb75..8f597af977fd 100644
--- a/core/tests/Drupal/Tests/Core/StringTranslation/ByteSizeMarkupTest.php
+++ b/core/tests/Drupal/Tests/Core/StringTranslation/ByteSizeMarkupTest.php
@@ -20,7 +20,7 @@ class ByteSizeMarkupTest extends UnitTestCase {
    * @covers ::create
    * @dataProvider providerTestCommonFormatSize
    */
-  public function testCommonFormatSize($expected, $input) {
+  public function testCommonFormatSize($expected, $input): void {
     $size = ByteSizeMarkup::create($input, NULL, $this->getStringTranslationStub());
     $this->assertInstanceOf(TranslatableMarkup::class, $size);
     $this->assertEquals($expected, $size);
diff --git a/core/tests/Drupal/Tests/Core/StringTranslation/PluralTranslatableMarkupTest.php b/core/tests/Drupal/Tests/Core/StringTranslation/PluralTranslatableMarkupTest.php
index b1af945cad2c..15833c74b5e5 100644
--- a/core/tests/Drupal/Tests/Core/StringTranslation/PluralTranslatableMarkupTest.php
+++ b/core/tests/Drupal/Tests/Core/StringTranslation/PluralTranslatableMarkupTest.php
@@ -21,7 +21,7 @@ class PluralTranslatableMarkupTest extends UnitTestCase {
    *
    * @dataProvider providerPluralTranslatableMarkupSerialization
    */
-  public function testPluralTranslatableMarkupSerialization($count, $expected_text) {
+  public function testPluralTranslatableMarkupSerialization($count, $expected_text): void {
     // Add a mock string translation service to the container.
     $container = new ContainerBuilder();
     $container->set('string_translation', $this->getStringTranslationStub());
@@ -46,7 +46,7 @@ public static function providerPluralTranslatableMarkupSerialization() {
   /**
    * Tests when the plural translation is missing.
    */
-  public function testMissingPluralTranslation() {
+  public function testMissingPluralTranslation(): void {
     $markup = PluralTranslatableMarkup::createFromTranslatedString(2, 'There is no plural delimiter @count');
     $this->assertEquals('There is no plural delimiter 2', $markup->render());
   }
diff --git a/core/tests/Drupal/Tests/Core/StringTranslation/TranslatableMarkupTest.php b/core/tests/Drupal/Tests/Core/StringTranslation/TranslatableMarkupTest.php
index 338c21a5c77a..f3aca4a2466a 100644
--- a/core/tests/Drupal/Tests/Core/StringTranslation/TranslatableMarkupTest.php
+++ b/core/tests/Drupal/Tests/Core/StringTranslation/TranslatableMarkupTest.php
@@ -53,7 +53,7 @@ public function errorHandler($error_number, $error_message) {
    *
    * @covers ::__toString
    */
-  public function testToString() {
+  public function testToString(): void {
     $translation = $this->createMock(TranslationInterface::class);
 
     $string = 'May I have an exception?';
@@ -86,7 +86,7 @@ public function testToString() {
   /**
    * @covers ::__construct
    */
-  public function testIsStringAssertion() {
+  public function testIsStringAssertion(): void {
     $translation = $this->getStringTranslationStub();
     $this->expectException(\InvalidArgumentException::class);
     $this->expectExceptionMessage('$string ("foo") must be a string.');
@@ -96,7 +96,7 @@ public function testIsStringAssertion() {
   /**
    * @covers ::__construct
    */
-  public function testIsStringAssertionWithFormattableMarkup() {
+  public function testIsStringAssertionWithFormattableMarkup(): void {
     $formattable_string = new FormattableMarkup('@bar', ['@bar' => 'foo']);
     $this->expectException(\InvalidArgumentException::class);
     $this->expectExceptionMessage('$string ("foo") must be a string.');
diff --git a/core/tests/Drupal/Tests/Core/StringTranslation/TranslationManagerTest.php b/core/tests/Drupal/Tests/Core/StringTranslation/TranslationManagerTest.php
index 5d8f7ca9bc8a..70d0a96e7a30 100644
--- a/core/tests/Drupal/Tests/Core/StringTranslation/TranslationManagerTest.php
+++ b/core/tests/Drupal/Tests/Core/StringTranslation/TranslationManagerTest.php
@@ -49,7 +49,7 @@ public static function providerTestFormatPlural() {
   /**
    * @dataProvider providerTestFormatPlural
    */
-  public function testFormatPlural($count, $singular, $plural, array $args, array $options, $expected) {
+  public function testFormatPlural($count, $singular, $plural, array $args, array $options, $expected): void {
     $langcode = empty($options['langcode']) ? 'fr' : $options['langcode'];
     $translator = $this->createMock('\Drupal\Core\StringTranslation\Translator\TranslatorInterface');
     $translator->expects($this->once())
@@ -77,7 +77,7 @@ public function testFormatPlural($count, $singular, $plural, array $args, array
    *
    * @dataProvider providerTestTranslatePlaceholder
    */
-  public function testTranslatePlaceholder($string, array $args, $expected_string) {
+  public function testTranslatePlaceholder($string, array $args, $expected_string): void {
     $actual = $this->translationManager->translate($string, $args);
     $this->assertInstanceOf(MarkupInterface::class, $actual);
     $this->assertEquals($expected_string, (string) $actual);
diff --git a/core/tests/Drupal/Tests/Core/StringTranslation/TranslationWrapperTest.php b/core/tests/Drupal/Tests/Core/StringTranslation/TranslationWrapperTest.php
index 148503090764..e013aaed8cdb 100644
--- a/core/tests/Drupal/Tests/Core/StringTranslation/TranslationWrapperTest.php
+++ b/core/tests/Drupal/Tests/Core/StringTranslation/TranslationWrapperTest.php
@@ -19,7 +19,7 @@ class TranslationWrapperTest extends UnitTestCase {
   /**
    * @covers ::__construct
    */
-  public function testTranslationWrapper() {
+  public function testTranslationWrapper(): void {
     $object = new TranslationWrapper('Backward compatibility');
     $this->assertInstanceOf(TranslatableMarkup::class, $object);
   }
diff --git a/core/tests/Drupal/Tests/Core/TempStore/PrivateTempStoreTest.php b/core/tests/Drupal/Tests/Core/TempStore/PrivateTempStoreTest.php
index 1a0222733904..5bf7cd35f3aa 100644
--- a/core/tests/Drupal/Tests/Core/TempStore/PrivateTempStoreTest.php
+++ b/core/tests/Drupal/Tests/Core/TempStore/PrivateTempStoreTest.php
@@ -101,7 +101,7 @@ protected function setUp(): void {
    *
    * @covers ::get
    */
-  public function testGet() {
+  public function testGet(): void {
     $calls = ['1:test_2', '1:test', '1:test'];
     $this->keyValue->expects($this->exactly(count($calls)))
       ->method('get')
@@ -124,7 +124,7 @@ public function testGet() {
    *
    * @covers ::set
    */
-  public function testSetWithNoLockAvailable() {
+  public function testSetWithNoLockAvailable(): void {
     $this->lock->expects($this->exactly(2))
       ->method('acquire')
       ->with('1:test')
@@ -145,7 +145,7 @@ public function testSetWithNoLockAvailable() {
    *
    * @covers ::set
    */
-  public function testSet() {
+  public function testSet(): void {
     $this->lock->expects($this->once())
       ->method('acquire')
       ->with('1:test')
@@ -168,7 +168,7 @@ public function testSet() {
    *
    * @covers ::getMetadata
    */
-  public function testGetMetadata() {
+  public function testGetMetadata(): void {
     $this->keyValue->expects($this->exactly(2))
       ->method('get')
       ->with('1:test')
@@ -189,7 +189,7 @@ public function testGetMetadata() {
    *
    * @covers ::delete
    */
-  public function testDeleteLocking() {
+  public function testDeleteLocking(): void {
     $this->keyValue->expects($this->once())
       ->method('get')
       ->with('1:test')
@@ -216,7 +216,7 @@ public function testDeleteLocking() {
    *
    * @covers ::delete
    */
-  public function testDeleteWithNoLockAvailable() {
+  public function testDeleteWithNoLockAvailable(): void {
     $this->keyValue->expects($this->once())
       ->method('get')
       ->with('1:test')
@@ -241,7 +241,7 @@ public function testDeleteWithNoLockAvailable() {
    *
    * @covers ::delete
    */
-  public function testDelete() {
+  public function testDelete(): void {
     $this->lock->expects($this->once())
       ->method('acquire')
       ->with('1:test_2')
diff --git a/core/tests/Drupal/Tests/Core/TempStore/SharedTempStoreTest.php b/core/tests/Drupal/Tests/Core/TempStore/SharedTempStoreTest.php
index f0d474c534ac..78b70369831a 100644
--- a/core/tests/Drupal/Tests/Core/TempStore/SharedTempStoreTest.php
+++ b/core/tests/Drupal/Tests/Core/TempStore/SharedTempStoreTest.php
@@ -100,7 +100,7 @@ protected function setUp(): void {
   /**
    * @covers ::get
    */
-  public function testGet() {
+  public function testGet(): void {
     $calls = ['test_2', 'test'];
     $this->keyValue->expects($this->exactly(count($calls)))
       ->method('get')
@@ -121,7 +121,7 @@ public function testGet() {
    *
    * @covers ::getIfOwner
    */
-  public function testGetIfOwner() {
+  public function testGetIfOwner(): void {
     $calls = ['test_2', 'test', 'test'];
     $this->keyValue->expects($this->exactly(count($calls)))
       ->method('get')
@@ -144,7 +144,7 @@ public function testGetIfOwner() {
    *
    * @covers ::set
    */
-  public function testSetWithNoLockAvailable() {
+  public function testSetWithNoLockAvailable(): void {
     $this->lock->expects($this->exactly(2))
       ->method('acquire')
       ->with('test')
@@ -165,7 +165,7 @@ public function testSetWithNoLockAvailable() {
    *
    * @covers ::set
    */
-  public function testSet() {
+  public function testSet(): void {
     $this->lock->expects($this->once())
       ->method('acquire')
       ->with('test')
@@ -188,7 +188,7 @@ public function testSet() {
    *
    * @covers ::setIfNotExists
    */
-  public function testSetIfNotExists() {
+  public function testSetIfNotExists(): void {
     $this->keyValue->expects($this->once())
       ->method('setWithExpireIfNotExists')
       ->with('test', $this->ownObject, 604800)
@@ -202,7 +202,7 @@ public function testSetIfNotExists() {
    *
    * @covers ::setIfOwner
    */
-  public function testSetIfOwnerWhenNotExists() {
+  public function testSetIfOwnerWhenNotExists(): void {
     $this->keyValue->expects($this->once())
       ->method('setWithExpireIfNotExists')
       ->willReturn(TRUE);
@@ -215,7 +215,7 @@ public function testSetIfOwnerWhenNotExists() {
    *
    * @covers ::setIfOwner
    */
-  public function testSetIfOwnerNoObject() {
+  public function testSetIfOwnerNoObject(): void {
     $this->keyValue->expects($this->once())
       ->method('setWithExpireIfNotExists')
       ->willReturn(FALSE);
@@ -233,7 +233,7 @@ public function testSetIfOwnerNoObject() {
    *
    * @covers ::setIfOwner
    */
-  public function testSetIfOwner() {
+  public function testSetIfOwner(): void {
     $this->lock->expects($this->once())
       ->method('acquire')
       ->with('test')
@@ -257,7 +257,7 @@ public function testSetIfOwner() {
    *
    * @covers ::getMetadata
    */
-  public function testGetMetadata() {
+  public function testGetMetadata(): void {
     $this->keyValue->expects($this->exactly(2))
       ->method('get')
       ->with('test')
@@ -277,7 +277,7 @@ public function testGetMetadata() {
    *
    * @covers ::delete
    */
-  public function testDelete() {
+  public function testDelete(): void {
     $this->lock->expects($this->once())
       ->method('acquire')
       ->with('test')
@@ -300,7 +300,7 @@ public function testDelete() {
    *
    * @covers ::delete
    */
-  public function testDeleteWithNoLockAvailable() {
+  public function testDeleteWithNoLockAvailable(): void {
     $this->lock->expects($this->exactly(2))
       ->method('acquire')
       ->with('test')
@@ -321,7 +321,7 @@ public function testDeleteWithNoLockAvailable() {
    *
    * @covers ::deleteIfOwner
    */
-  public function testDeleteIfOwner() {
+  public function testDeleteIfOwner(): void {
     $this->lock->expects($this->once())
       ->method('acquire')
       ->with('test_2')
@@ -350,7 +350,7 @@ public function testDeleteIfOwner() {
   /**
    * Tests the serialization of a shared temp store.
    */
-  public function testSerialization() {
+  public function testSerialization(): void {
     // Add an unserializable request to the request stack. If the tempstore
     // didn't use DependencySerializationTrait, an exception would be thrown
     // when we try to serialize the tempstore.
diff --git a/core/tests/Drupal/Tests/Core/Template/AttributeHelperTest.php b/core/tests/Drupal/Tests/Core/Template/AttributeHelperTest.php
index 4590a145b44f..6de70227fa5d 100644
--- a/core/tests/Drupal/Tests/Core/Template/AttributeHelperTest.php
+++ b/core/tests/Drupal/Tests/Core/Template/AttributeHelperTest.php
@@ -35,7 +35,7 @@ public static function providerTestAttributeExists() {
    * @covers ::attributeExists
    * @dataProvider providerTestAttributeExists
    */
-  public function testAttributeExists(array $test_data, $test_attribute, $expected) {
+  public function testAttributeExists(array $test_data, $test_attribute, $expected): void {
     $this->assertSame($expected, AttributeHelper::attributeExists($test_attribute, $test_data));
     $attributes = new Attribute($test_data);
     $this->assertSame($expected, AttributeHelper::attributeExists($test_attribute, $attributes));
@@ -63,7 +63,7 @@ public static function providerTestMergeCollections() {
    * @covers ::mergeCollections
    * @dataProvider providerTestMergeCollections
    */
-  public function testMergeCollections($original, $merge, $expected) {
+  public function testMergeCollections($original, $merge, $expected): void {
     $this->assertEquals($expected, AttributeHelper::mergeCollections($original, $merge));
     $this->assertEquals(new Attribute($expected), AttributeHelper::mergeCollections(new Attribute($original), $merge));
   }
@@ -71,7 +71,7 @@ public function testMergeCollections($original, $merge, $expected) {
   /**
    * @covers ::mergeCollections
    */
-  public function testMergeCollectionsArgumentException() {
+  public function testMergeCollectionsArgumentException(): void {
     $attributes = new Attribute(['class' => ['example-class']]);
     $this->expectException(\InvalidArgumentException::class);
     $this->expectExceptionMessage('Invalid collection argument');
diff --git a/core/tests/Drupal/Tests/Core/Template/AttributeTest.php b/core/tests/Drupal/Tests/Core/Template/AttributeTest.php
index 4b708c239484..f76bc92c7576 100644
--- a/core/tests/Drupal/Tests/Core/Template/AttributeTest.php
+++ b/core/tests/Drupal/Tests/Core/Template/AttributeTest.php
@@ -23,7 +23,7 @@ class AttributeTest extends UnitTestCase {
   /**
    * Tests the constructor of the attribute class.
    */
-  public function testConstructor() {
+  public function testConstructor(): void {
     $attribute = new Attribute(['class' => ['example-class']]);
     $this->assertTrue(isset($attribute['class']));
     $this->assertEquals(new AttributeArray('class', ['example-class']), $attribute['class']);
@@ -49,7 +49,7 @@ public function testConstructor() {
   /**
    * Tests set of values.
    */
-  public function testSet() {
+  public function testSet(): void {
     $attribute = new Attribute();
     $attribute['class'] = ['example-class'];
 
@@ -60,7 +60,7 @@ public function testSet() {
   /**
    * Tests adding new values to an existing part of the attribute.
    */
-  public function testAdd() {
+  public function testAdd(): void {
     $attribute = new Attribute(['class' => ['example-class']]);
 
     $attribute['class'][] = 'other-class';
@@ -70,7 +70,7 @@ public function testAdd() {
   /**
    * Tests removing of values.
    */
-  public function testRemove() {
+  public function testRemove(): void {
     $attribute = new Attribute(['class' => ['example-class']]);
     unset($attribute['class']);
     $this->assertFalse(isset($attribute['class']));
@@ -80,7 +80,7 @@ public function testRemove() {
    * Tests setting attributes.
    * @covers ::setAttribute
    */
-  public function testSetAttribute() {
+  public function testSetAttribute(): void {
     $attribute = new Attribute();
 
     // Test adding various attributes.
@@ -108,7 +108,7 @@ public function testSetAttribute() {
    * Tests removing attributes.
    * @covers ::removeAttribute
    */
-  public function testRemoveAttribute() {
+  public function testRemoveAttribute(): void {
     $attributes = [
       'alt' => 'Alternative text',
       'id' => 'bunny',
@@ -147,7 +147,7 @@ public function testRemoveAttribute() {
    * Tests adding class attributes with the AttributeArray helper method.
    * @covers ::addClass
    */
-  public function testAddClasses() {
+  public function testAddClasses(): void {
     // Add empty Attribute object with no classes.
     $attribute = new Attribute();
 
@@ -199,7 +199,7 @@ public function testAddClasses() {
    * Tests removing class attributes with the AttributeArray helper method.
    * @covers ::removeClass
    */
-  public function testRemoveClasses() {
+  public function testRemoveClasses(): void {
     // Add duplicate class to ensure that both duplicates are removed.
     $classes = ['example-class', 'aa', 'xx', 'yy', 'red', 'green', 'blue', 'red'];
     $attribute = new Attribute(['class' => $classes]);
@@ -230,7 +230,7 @@ public function testRemoveClasses() {
    * Tests checking for class names with the Attribute method.
    * @covers ::hasClass
    */
-  public function testHasClass() {
+  public function testHasClass(): void {
     // Test an attribute without any classes.
     $attribute = new Attribute();
     $this->assertFalse($attribute->hasClass('a-class-nowhere-to-be-found'));
@@ -246,7 +246,7 @@ public function testHasClass() {
    * @covers ::removeClass
    * @covers ::addClass
    */
-  public function testChainAddRemoveClasses() {
+  public function testChainAddRemoveClasses(): void {
     $attribute = new Attribute(
       ['class' => ['example-class', 'red', 'green', 'blue']]
     );
@@ -266,7 +266,7 @@ public function testChainAddRemoveClasses() {
    * @covers ::removeClass
    * @covers ::addClass
    */
-  public function testTwigAddRemoveClasses($template, $expected, $seed_attributes = []) {
+  public function testTwigAddRemoveClasses($template, $expected, $seed_attributes = []): void {
     $loader = new StringLoader();
     $twig = new Environment($loader);
     $data = ['attributes' => new Attribute($seed_attributes)];
@@ -322,7 +322,7 @@ public static function providerTestAttributeClassHelpers() {
   /**
    * Tests iterating on the values of the attribute.
    */
-  public function testIterate() {
+  public function testIterate(): void {
     $attribute = new Attribute(['class' => ['example-class'], 'id' => 'example-id']);
 
     $counter = 0;
@@ -342,7 +342,7 @@ public function testIterate() {
   /**
    * Tests printing of an attribute.
    */
-  public function testPrint() {
+  public function testPrint(): void {
     $attribute = new Attribute(['class' => ['example-class'], 'id' => 'example-id', 'enabled' => TRUE]);
 
     $content = $this->randomMachineName();
@@ -360,7 +360,7 @@ public function testPrint() {
    * @covers ::createAttributeValue
    * @dataProvider providerTestAttributeValues
    */
-  public function testAttributeValues(array $attributes, $expected) {
+  public function testAttributeValues(array $attributes, $expected): void {
     $this->assertEquals($expected, (new Attribute($attributes))->__toString());
   }
 
@@ -458,7 +458,7 @@ protected function getXPathResultCount($query, $html) {
   /**
    * Tests the storage method.
    */
-  public function testStorage() {
+  public function testStorage(): void {
     $attribute = new Attribute(['class' => ['example-class']]);
 
     $this->assertEquals(['class' => new AttributeArray('class', ['example-class'])], $attribute->storage());
@@ -485,7 +485,7 @@ public static function providerTestHasAttribute() {
    * @covers ::hasAttribute
    * @dataProvider providerTestHasAttribute
    */
-  public function testHasAttribute(array $test_data, $test_attribute, $expected) {
+  public function testHasAttribute(array $test_data, $test_attribute, $expected): void {
     $attributes = new Attribute($test_data);
     $this->assertSame($expected, $attributes->hasAttribute($test_attribute));
   }
@@ -509,14 +509,14 @@ public static function providerTestMerge() {
    * @covers ::merge
    * @dataProvider providerTestMerge
    */
-  public function testMerge($original, $merge, $expected) {
+  public function testMerge($original, $merge, $expected): void {
     $this->assertEquals($expected, $original->merge($merge));
   }
 
   /**
    * @covers ::merge
    */
-  public function testMergeArgumentException() {
+  public function testMergeArgumentException(): void {
     $attributes = new Attribute(['class' => ['example-class']]);
     $this->expectException(\TypeError::class);
     $attributes->merge('not an array');
diff --git a/core/tests/Drupal/Tests/Core/Template/Loader/ThemeRegistryLoaderTest.php b/core/tests/Drupal/Tests/Core/Template/Loader/ThemeRegistryLoaderTest.php
index 861d1d4c0fec..bd7cfe96638c 100644
--- a/core/tests/Drupal/Tests/Core/Template/Loader/ThemeRegistryLoaderTest.php
+++ b/core/tests/Drupal/Tests/Core/Template/Loader/ThemeRegistryLoaderTest.php
@@ -16,7 +16,7 @@ class ThemeRegistryLoaderTest extends UnitTestCase {
   /**
    * @covers ::findTemplate
    */
-  public function testLoaderReturnsFalseForExistsOnNonexistent() {
+  public function testLoaderReturnsFalseForExistsOnNonexistent(): void {
     $registry = $this->prophesize('Drupal\Core\Theme\Registry');
     $runtime = $this->prophesize('Drupal\Core\Utility\ThemeRegistry');
     $runtime->has('foo')
diff --git a/core/tests/Drupal/Tests/Core/Template/TwigExtensionTest.php b/core/tests/Drupal/Tests/Core/Template/TwigExtensionTest.php
index cfa4c6ba0019..e89c0c12fc75 100644
--- a/core/tests/Drupal/Tests/Core/Template/TwigExtensionTest.php
+++ b/core/tests/Drupal/Tests/Core/Template/TwigExtensionTest.php
@@ -96,7 +96,7 @@ protected function setUp(): void {
    *
    * @dataProvider providerTestEscaping
    */
-  public function testEscaping($template, $expected) {
+  public function testEscaping($template, $expected): void {
     $loader = new FilesystemLoader();
     $twig = new Environment($loader, [
       'debug' => TRUE,
@@ -148,7 +148,7 @@ public static function providerTestEscaping() {
   /**
    * Tests the active_theme function.
    */
-  public function testActiveTheme() {
+  public function testActiveTheme(): void {
     $active_theme = $this->getMockBuilder('\Drupal\Core\Theme\ActiveTheme')
       ->disableOriginalConstructor()
       ->getMock();
@@ -169,7 +169,7 @@ public function testActiveTheme() {
   /**
    * Tests the format_date filter.
    */
-  public function testFormatDate() {
+  public function testFormatDate(): void {
     $this->dateFormatter->expects($this->exactly(1))
       ->method('format')
       ->willReturnCallback(function ($timestamp) {
@@ -187,7 +187,7 @@ public function testFormatDate() {
   /**
    * Tests the file_url filter.
    */
-  public function testFileUrl() {
+  public function testFileUrl(): void {
     $this->fileUrlGenerator->expects($this->once())
       ->method('generateString')
       ->with('public://picture.jpg')
@@ -203,7 +203,7 @@ public function testFileUrl() {
   /**
    * Tests the active_theme_path function.
    */
-  public function testActiveThemePath() {
+  public function testActiveThemePath(): void {
     $active_theme = $this->getMockBuilder('\Drupal\Core\Theme\ActiveTheme')
       ->disableOriginalConstructor()
       ->getMock();
@@ -227,7 +227,7 @@ public function testActiveThemePath() {
    *
    * @covers ::escapeFilter
    */
-  public function testSafeStringEscaping() {
+  public function testSafeStringEscaping(): void {
     $loader = new FilesystemLoader();
     $twig = new Environment($loader, [
       'debug' => TRUE,
@@ -249,7 +249,7 @@ public function testSafeStringEscaping() {
   /**
    * @covers ::safeJoin
    */
-  public function testSafeJoin() {
+  public function testSafeJoin(): void {
     $this->renderer->expects($this->any())
       ->method('render')
       ->with(['#markup' => '<strong>will be rendered</strong>', '#printed' => FALSE])
@@ -288,7 +288,7 @@ public function testSafeJoin() {
   /**
    * @dataProvider providerTestRenderVar
    */
-  public function testRenderVar($result, $input) {
+  public function testRenderVar($result, $input): void {
     $this->renderer->expects($this->any())
       ->method('render')
       ->with($result += ['#printed' => FALSE])
@@ -312,7 +312,7 @@ public static function providerTestRenderVar() {
    * @covers ::escapeFilter
    * @covers ::bubbleArgMetadata
    */
-  public function testEscapeWithGeneratedLink() {
+  public function testEscapeWithGeneratedLink(): void {
     $loader = new FilesystemLoader();
     $twig = new Environment($loader, [
       'debug' => TRUE,
@@ -345,7 +345,7 @@ public function testEscapeWithGeneratedLink() {
    * @covers ::renderVar
    * @covers ::bubbleArgMetadata
    */
-  public function testRenderVarWithGeneratedLink() {
+  public function testRenderVarWithGeneratedLink(): void {
     $link = new GeneratedLink();
     $link->setGeneratedLink('<a href="http://example.com"></a>');
     $link->addCacheTags(['foo']);
@@ -369,7 +369,7 @@ public function testRenderVarWithGeneratedLink() {
    * @covers ::renderVar
    * @dataProvider providerTestRenderVarEarlyReturn
    */
-  public function testRenderVarEarlyReturn($expected, $input) {
+  public function testRenderVarEarlyReturn($expected, $input): void {
     $result = $this->systemUnderTest->renderVar($input);
     $this->assertSame($expected, $result);
   }
@@ -397,7 +397,7 @@ public static function providerTestRenderVarEarlyReturn() {
    *
    * @covers ::createAttribute
    */
-  public function testCreateAttribute() {
+  public function testCreateAttribute(): void {
     $name = '__string_template_test_1__';
     $loader = new ArrayLoader([$name => "{% for iteration in iterations %}<div{{ create_attribute(iteration) }}></div>{% endfor %}"]);
     $twig = new Environment($loader);
@@ -425,7 +425,7 @@ public function testCreateAttribute() {
   /**
    * @covers ::getLink
    */
-  public function testLinkWithOverriddenAttributes() {
+  public function testLinkWithOverriddenAttributes(): void {
     $url = Url::fromRoute('<front>', [], ['attributes' => ['class' => ['foo']]]);
 
     $build = $this->systemUnderTest->getLink('test', $url, ['class' => ['bar']]);
@@ -439,7 +439,7 @@ public function testLinkWithOverriddenAttributes() {
    * @covers ::suggestThemeHook
    * @dataProvider providerTestTwigAddSuggestionFilter
    */
-  public function testTwigAddSuggestionFilter($original_render_array, $suggestion, $expected_render_array) {
+  public function testTwigAddSuggestionFilter($original_render_array, $suggestion, $expected_render_array): void {
     $processed_render_array = $this->systemUnderTest->suggestThemeHook($original_render_array, $suggestion);
     $this->assertEquals($expected_render_array, $processed_render_array);
   }
@@ -555,7 +555,7 @@ public static function providerTestTwigAddSuggestionFilter(): \Iterator {
    * @covers ::addClass
    * @dataProvider providerTestTwigAddClass
    */
-  public function testTwigAddClass($element, $classes, $expected_result) {
+  public function testTwigAddClass($element, $classes, $expected_result): void {
     $processed = $this->systemUnderTest->addClass($element, $classes);
     $this->assertEquals($expected_result, $processed);
   }
@@ -605,7 +605,7 @@ public static function providerTestTwigAddClass(): \Iterator {
    * @covers ::setAttribute
    * @dataProvider providerTestTwigSetAttribute
    */
-  public function testTwigSetAttribute($element, $key, $value, $expected_result) {
+  public function testTwigSetAttribute($element, $key, $value, $expected_result): void {
     $processed = $this->systemUnderTest->setAttribute($element, $key, $value);
     $this->assertEquals($expected_result, $processed);
   }
diff --git a/core/tests/Drupal/Tests/Core/Template/TwigSandboxTest.php b/core/tests/Drupal/Tests/Core/Template/TwigSandboxTest.php
index 82400aab7c5d..9af863dcc858 100644
--- a/core/tests/Drupal/Tests/Core/Template/TwigSandboxTest.php
+++ b/core/tests/Drupal/Tests/Core/Template/TwigSandboxTest.php
@@ -47,7 +47,7 @@ protected function setUp(): void {
    *
    * @dataProvider getTwigEntityDangerousMethods
    */
-  public function testEntityDangerousMethods($template) {
+  public function testEntityDangerousMethods($template): void {
     $entity = $this->createMock('Drupal\Core\Entity\EntityInterface');
     $this->expectException(SecurityError::class);
     $this->twig->render($template, ['entity' => $entity]);
@@ -69,7 +69,7 @@ public static function getTwigEntityDangerousMethods() {
   /**
    * Tests that white listed classes can be extended.
    */
-  public function testExtendedClass() {
+  public function testExtendedClass(): void {
     $this->assertEquals(' class=&quot;kitten&quot;', $this->twig->render('{{ attribute.addClass("kitten") }}', ['attribute' => new TestAttribute()]));
   }
 
@@ -78,7 +78,7 @@ public function testExtendedClass() {
    *
    * Currently "get", "has", and "is" are the only allowed prefixes.
    */
-  public function testEntitySafePrefixes() {
+  public function testEntitySafePrefixes(): void {
     $entity = $this->createMock('Drupal\Core\Entity\EntityInterface');
     $entity->expects($this->atLeastOnce())
       ->method('hasLinkTemplate')
@@ -108,7 +108,7 @@ public function testEntitySafePrefixes() {
    * Currently the following methods are whitelisted: id, label, bundle, and
    * get.
    */
-  public function testEntitySafeMethods() {
+  public function testEntitySafeMethods(): void {
     $entity = $this->getMockBuilder(ContentEntityBaseMockableClass::class)
       ->disableOriginalConstructor()
       ->getMock();
@@ -144,7 +144,7 @@ public function testEntitySafeMethods() {
   /**
    * Tests that safe methods inside Url objects can be called.
    */
-  public function testUrlSafeMethods() {
+  public function testUrlSafeMethods(): void {
     $url = $this->getMockBuilder('Drupal\Core\Url')
       ->disableOriginalConstructor()
       ->getMock();
diff --git a/core/tests/Drupal/Tests/Core/Test/AssertContentTraitTest.php b/core/tests/Drupal/Tests/Core/Test/AssertContentTraitTest.php
index 2b388facd23f..9951d3970aab 100644
--- a/core/tests/Drupal/Tests/Core/Test/AssertContentTraitTest.php
+++ b/core/tests/Drupal/Tests/Core/Test/AssertContentTraitTest.php
@@ -18,7 +18,7 @@ class AssertContentTraitTest extends UnitTestCase {
   /**
    * @covers ::getTextContent
    */
-  public function testGetTextContent() {
+  public function testGetTextContent(): void {
 
     $raw_content = <<<EOT
 
diff --git a/core/tests/Drupal/Tests/Core/Test/BrowserTestBaseTest.php b/core/tests/Drupal/Tests/Core/Test/BrowserTestBaseTest.php
index ad8e2eeba542..43ff47406ecc 100644
--- a/core/tests/Drupal/Tests/Core/Test/BrowserTestBaseTest.php
+++ b/core/tests/Drupal/Tests/Core/Test/BrowserTestBaseTest.php
@@ -39,7 +39,7 @@ protected function mockBrowserTestBaseWithDriver($driver) {
   /**
    * @covers ::getHttpClient
    */
-  public function testGetHttpClient() {
+  public function testGetHttpClient(): void {
     // Our stand-in for the Guzzle client object.
     $expected = new \stdClass();
 
@@ -62,7 +62,7 @@ public function testGetHttpClient() {
   /**
    * @covers ::getHttpClient
    */
-  public function testGetHttpClientException() {
+  public function testGetHttpClientException(): void {
     // A driver type that isn't BrowserKitDriver. This should cause a
     // RuntimeException.
     $btb = $this->mockBrowserTestBaseWithDriver(new \stdClass());
@@ -79,7 +79,7 @@ public function testGetHttpClientException() {
    *
    * @covers ::tearDown
    */
-  public function testTearDownWithoutSetUp() {
+  public function testTearDownWithoutSetUp(): void {
     $method = 'cleanupEnvironment';
     $this->assertTrue(method_exists(BrowserTestBase::class, $method));
     $btb = $this->getMockBuilder(BrowserTestBaseMockableClass::class)
diff --git a/core/tests/Drupal/Tests/Core/Test/JUnitConverterTest.php b/core/tests/Drupal/Tests/Core/Test/JUnitConverterTest.php
index 2eaebb14c5be..49599b0e4ae9 100644
--- a/core/tests/Drupal/Tests/Core/Test/JUnitConverterTest.php
+++ b/core/tests/Drupal/Tests/Core/Test/JUnitConverterTest.php
@@ -27,7 +27,7 @@ class JUnitConverterTest extends UnitTestCase {
    * Tests errors reported.
    * @covers ::xmlToRows
    */
-  public function testXmlToRowsWithErrors() {
+  public function testXmlToRowsWithErrors(): void {
     $phpunit_error_xml = __DIR__ . '/fixtures/phpunit_error.xml';
 
     $res = JUnitConverter::xmlToRows(1, $phpunit_error_xml);
@@ -48,7 +48,7 @@ public function testXmlToRowsWithErrors() {
   /**
    * @covers ::xmlToRows
    */
-  public function testXmlToRowsEmptyFile() {
+  public function testXmlToRowsEmptyFile(): void {
     // File system with an empty XML file.
     vfsStream::setup('junit_test', NULL, ['empty.xml' => '']);
     $this->assertSame([], JUnitConverter::xmlToRows(23, vfsStream::url('junit_test/empty.xml')));
@@ -57,7 +57,7 @@ public function testXmlToRowsEmptyFile() {
   /**
    * @covers ::xmlElementToRows
    */
-  public function testXmlElementToRows() {
+  public function testXmlElementToRows(): void {
     $junit = <<<EOD
 <?xml version="1.0" encoding="UTF-8"?>
 <testsuites>
@@ -84,7 +84,7 @@ public function testXmlElementToRows() {
   /**
    * @covers ::convertTestCaseToSimpletestRow
    */
-  public function testConvertTestCaseToSimpletestRow() {
+  public function testConvertTestCaseToSimpletestRow(): void {
     $junit = <<<EOD
     <testcase name="testGetTestClasses" class="Drupal\Tests\simpletest\Unit\TestDiscoveryTest" classname="Drupal.Tests.simpletest.Unit.TestDiscoveryTest" file="/Users/paul/projects/drupal/core/modules/simpletest/tests/src/Unit/TestDiscoveryTest.php" line="108" assertions="2" time="0.100787"/>
 EOD;
diff --git a/core/tests/Drupal/Tests/Core/Test/PhpUnitAutoloaderTest.php b/core/tests/Drupal/Tests/Core/Test/PhpUnitAutoloaderTest.php
index 1620a8970c09..98322cfcfb54 100644
--- a/core/tests/Drupal/Tests/Core/Test/PhpUnitAutoloaderTest.php
+++ b/core/tests/Drupal/Tests/Core/Test/PhpUnitAutoloaderTest.php
@@ -16,7 +16,7 @@ class PhpUnitAutoloaderTest extends UnitTestCase {
   /**
    * Tests loading of classes provided by test sub modules.
    */
-  public function testPhpUnitTestClassesLoading() {
+  public function testPhpUnitTestClassesLoading(): void {
     $this->assertTrue(class_exists('\Drupal\phpunit_test\PhpUnitTestDummyClass'), 'Class provided by test module was not autoloaded.');
   }
 
diff --git a/core/tests/Drupal/Tests/Core/Test/PhpUnitBridgeIsolatedTest.php b/core/tests/Drupal/Tests/Core/Test/PhpUnitBridgeIsolatedTest.php
index 92fa96d2a165..f62d39d185eb 100644
--- a/core/tests/Drupal/Tests/Core/Test/PhpUnitBridgeIsolatedTest.php
+++ b/core/tests/Drupal/Tests/Core/Test/PhpUnitBridgeIsolatedTest.php
@@ -18,7 +18,7 @@
  */
 class PhpUnitBridgeIsolatedTest extends UnitTestCase {
 
-  public function testDeprecatedClass() {
+  public function testDeprecatedClass(): void {
     $this->expectDeprecation('Drupal\deprecation_test\Deprecation\FixtureDeprecatedClass is deprecated.');
     $deprecated = new FixtureDeprecatedClass();
     $this->assertEquals('test', $deprecated->testFunction());
diff --git a/core/tests/Drupal/Tests/Core/Test/PhpUnitBridgeTest.php b/core/tests/Drupal/Tests/Core/Test/PhpUnitBridgeTest.php
index 79420875f4e8..d964a2f42be4 100644
--- a/core/tests/Drupal/Tests/Core/Test/PhpUnitBridgeTest.php
+++ b/core/tests/Drupal/Tests/Core/Test/PhpUnitBridgeTest.php
@@ -18,13 +18,13 @@ class PhpUnitBridgeTest extends UnitTestCase {
   /**
    * Tests class-level deprecation.
    */
-  public function testDeprecatedClass() {
+  public function testDeprecatedClass(): void {
     $this->expectDeprecation('Drupal\deprecation_test\Deprecation\FixtureDeprecatedClass is deprecated.');
     $deprecated = new FixtureDeprecatedClass();
     $this->assertEquals('test', $deprecated->testFunction());
   }
 
-  public function testDeprecatedFunction() {
+  public function testDeprecatedFunction(): void {
     $this->markTestIncomplete('Modules are not loaded for unit tests, so deprecated_test_function() will not be available.');
     $this->assertEquals('known_return_value', \deprecation_test_function());
   }
diff --git a/core/tests/Drupal/Tests/Core/Test/PhpUnitCliTest.php b/core/tests/Drupal/Tests/Core/Test/PhpUnitCliTest.php
index 926a7cdedc5c..5ec76e7820fc 100644
--- a/core/tests/Drupal/Tests/Core/Test/PhpUnitCliTest.php
+++ b/core/tests/Drupal/Tests/Core/Test/PhpUnitCliTest.php
@@ -22,7 +22,7 @@ class PhpUnitCliTest extends UnitTestCase {
    * us from committing tests which don't break under run-tests.sh, but do
    * break under the PHPUnit CLI test runner tool.
    */
-  public function testPhpUnitListTests() {
+  public function testPhpUnitListTests(): void {
     $command = [
       'vendor/bin/phpunit',
       '--configuration',
diff --git a/core/tests/Drupal/Tests/Core/Test/PhpUnitTestRunnerTest.php b/core/tests/Drupal/Tests/Core/Test/PhpUnitTestRunnerTest.php
index c8dc2cd27b62..8047ece4fc41 100644
--- a/core/tests/Drupal/Tests/Core/Test/PhpUnitTestRunnerTest.php
+++ b/core/tests/Drupal/Tests/Core/Test/PhpUnitTestRunnerTest.php
@@ -23,7 +23,7 @@ class PhpUnitTestRunnerTest extends UnitTestCase {
    *
    * @covers ::execute
    */
-  public function testRunTestsError() {
+  public function testRunTestsError(): void {
     $test_id = 23;
     $log_path = 'test_log_path';
 
@@ -86,7 +86,7 @@ function (string $test_class_name, string $log_junit_file_path, int &$status): s
   /**
    * @covers ::phpUnitCommand
    */
-  public function testPhpUnitCommand() {
+  public function testPhpUnitCommand(): void {
     $runner = new PhpUnitTestRunner($this->root, sys_get_temp_dir());
     $this->assertMatchesRegularExpression('/phpunit/', $runner->phpUnitCommand());
   }
@@ -94,7 +94,7 @@ public function testPhpUnitCommand() {
   /**
    * @covers ::xmlLogFilePath
    */
-  public function testXmlLogFilePath() {
+  public function testXmlLogFilePath(): void {
     $runner = new PhpUnitTestRunner($this->root, sys_get_temp_dir());
     $this->assertStringEndsWith('phpunit-23.xml', $runner->xmlLogFilePath(23));
   }
@@ -144,7 +144,7 @@ public static function providerTestSummarizeResults() {
    * @dataProvider providerTestSummarizeResults
    * @covers ::summarizeResults
    */
-  public function testSummarizeResults($results, $has_status) {
+  public function testSummarizeResults($results, $has_status): void {
     $runner = new PhpUnitTestRunner($this->root, sys_get_temp_dir());
     $summary = $runner->summarizeResults($results);
 
diff --git a/core/tests/Drupal/Tests/Core/Test/RunTests/TestFileParserTest.php b/core/tests/Drupal/Tests/Core/Test/RunTests/TestFileParserTest.php
index dbcb853143d9..957b2f61f97b 100644
--- a/core/tests/Drupal/Tests/Core/Test/RunTests/TestFileParserTest.php
+++ b/core/tests/Drupal/Tests/Core/Test/RunTests/TestFileParserTest.php
@@ -69,7 +69,7 @@ class AnotherClass {}
    * @covers ::parseContents
    * @dataProvider provideTestFileContents
    */
-  public function testParseContents($expected, $contents) {
+  public function testParseContents($expected, $contents): void {
     $parser = new TestFileParser();
 
     $ref_parse = new \ReflectionMethod($parser, 'parseContents');
@@ -80,7 +80,7 @@ public function testParseContents($expected, $contents) {
   /**
    * @covers ::getTestListFromFile
    */
-  public function testGetTestListFromFile() {
+  public function testGetTestListFromFile(): void {
     $parser = new TestFileParser();
     $this->assertEquals(
       ['Drupal\Tests\Core\Test\RunTests\TestFileParserTest'],
diff --git a/core/tests/Drupal/Tests/Core/Test/TestDatabaseTest.php b/core/tests/Drupal/Tests/Core/Test/TestDatabaseTest.php
index a96d79e38a66..1660ac381eda 100644
--- a/core/tests/Drupal/Tests/Core/Test/TestDatabaseTest.php
+++ b/core/tests/Drupal/Tests/Core/Test/TestDatabaseTest.php
@@ -19,7 +19,7 @@ class TestDatabaseTest extends UnitTestCase {
   /**
    * @covers ::__construct
    */
-  public function testConstructorException() {
+  public function testConstructorException(): void {
     $this->expectException(\InvalidArgumentException::class);
     $this->expectExceptionMessage("Invalid database prefix: blah1253");
     new TestDatabase('blah1253');
@@ -33,7 +33,7 @@ public function testConstructorException() {
    *
    * @dataProvider providerTestConstructor
    */
-  public function testConstructor($db_prefix, $expected_db_prefix, $expected_site_path) {
+  public function testConstructor($db_prefix, $expected_db_prefix, $expected_site_path): void {
     $test_db = new TestDatabase($db_prefix);
     $this->assertEquals($expected_db_prefix, $test_db->getDatabasePrefix());
     $this->assertEquals($expected_site_path, $test_db->getTestSitePath());
@@ -58,7 +58,7 @@ public static function providerTestConstructor() {
    * @covers ::getTestSitePath
    * @covers ::getPhpErrorLogPath
    */
-  public function testConstructorNullPrefix() {
+  public function testConstructorNullPrefix(): void {
     // We use a stub class here because we can't mock getTestLock() so that it's
     // available before the constructor is called.
     $test_db = new TestTestDatabase(NULL);
diff --git a/core/tests/Drupal/Tests/Core/Test/TestDiscoveryTest.php b/core/tests/Drupal/Tests/Core/Test/TestDiscoveryTest.php
index 9b9053c3ba86..c747e896eee4 100644
--- a/core/tests/Drupal/Tests/Core/Test/TestDiscoveryTest.php
+++ b/core/tests/Drupal/Tests/Core/Test/TestDiscoveryTest.php
@@ -24,7 +24,7 @@ class TestDiscoveryTest extends UnitTestCase {
    * @covers ::getTestInfo
    * @dataProvider infoParserProvider
    */
-  public function testTestInfoParser($expected, $classname, $doc_comment = NULL) {
+  public function testTestInfoParser($expected, $classname, $doc_comment = NULL): void {
     $info = TestDiscovery::getTestInfo($classname, $doc_comment);
     $this->assertEquals($expected, $info);
   }
@@ -205,7 +205,7 @@ public static function infoParserProvider() {
   /**
    * @covers ::getTestInfo
    */
-  public function testTestInfoParserMissingGroup() {
+  public function testTestInfoParserMissingGroup(): void {
     $classname = 'Drupal\KernelTests\field\BulkDeleteTest';
     $doc_comment = <<<EOT
 /**
@@ -220,7 +220,7 @@ public function testTestInfoParserMissingGroup() {
   /**
    * @covers ::getTestInfo
    */
-  public function testTestInfoParserMissingSummary() {
+  public function testTestInfoParserMissingSummary(): void {
     $classname = 'Drupal\KernelTests\field\BulkDeleteTest';
     $doc_comment = <<<EOT
 /**
@@ -299,7 +299,7 @@ class FunctionalExampleTest {}
   /**
    * @covers ::getTestClasses
    */
-  public function testGetTestClasses() {
+  public function testGetTestClasses(): void {
     $this->setupVfsWithTestClasses();
     $extensions = [
       'test_module' => new Extension('vfs://drupal', 'module', 'modules/test_module/test_module.info.yml'),
@@ -368,7 +368,7 @@ protected function getTestDiscoveryMock($app_root, $extensions) {
   /**
    * @covers ::getTestClasses
    */
-  public function testGetTestClassesWithSelectedTypes() {
+  public function testGetTestClassesWithSelectedTypes(): void {
     $this->setupVfsWithTestClasses();
     $extensions = [
       'test_module' => new Extension('vfs://drupal', 'module', 'modules/test_module/test_module.info.yml'),
@@ -413,7 +413,7 @@ public function testGetTestClassesWithSelectedTypes() {
   /**
    * @covers ::getTestClasses
    */
-  public function testGetTestsInProfiles() {
+  public function testGetTestsInProfiles(): void {
     $this->setupVfsWithTestClasses();
     $class_loader = $this->prophesize(ClassLoader::class);
 
@@ -443,7 +443,7 @@ public function testGetTestsInProfiles() {
    * @covers ::getPhpunitTestSuite
    * @dataProvider providerTestGetPhpunitTestSuite
    */
-  public function testGetPhpunitTestSuite($classname, $expected) {
+  public function testGetPhpunitTestSuite($classname, $expected): void {
     $this->assertEquals($expected, TestDiscovery::getPhpunitTestSuite($classname));
   }
 
@@ -470,7 +470,7 @@ public static function providerTestGetPhpunitTestSuite() {
    *
    * @covers ::getTestInfo
    */
-  public function testGetTestInfoEmptyDocblock() {
+  public function testGetTestInfoEmptyDocblock(): void {
     // If getTestInfo() performed reflection, it won't be able to find the
     // class we asked it to analyze, so it will throw a ReflectionException.
     // We want to make sure it didn't do that, because we already did some
@@ -485,7 +485,7 @@ public function testGetTestInfoEmptyDocblock() {
    *
    * @covers ::scanDirectory
    */
-  public function testScanDirectoryNoAbstract() {
+  public function testScanDirectoryNoAbstract(): void {
     $this->setupVfsWithTestClasses();
     $files = TestDiscovery::scanDirectory('Drupal\\Tests\\test_module\\Kernel\\', vfsStream::url('drupal/modules/test_module/tests/src/Kernel'));
     $this->assertNotEmpty($files);
diff --git a/core/tests/Drupal/Tests/Core/Test/TestSetupTraitTest.php b/core/tests/Drupal/Tests/Core/Test/TestSetupTraitTest.php
index b6f74c017f49..ba1d28a50c6d 100644
--- a/core/tests/Drupal/Tests/Core/Test/TestSetupTraitTest.php
+++ b/core/tests/Drupal/Tests/Core/Test/TestSetupTraitTest.php
@@ -26,7 +26,7 @@ class TestSetupTraitTest extends UnitTestCase {
    *
    * @covers ::changeDatabasePrefix
    */
-  public function testChangeDatabasePrefix() {
+  public function testChangeDatabasePrefix(): void {
     $root = dirname(__FILE__, 7);
     putenv('SIMPLETEST_DB=pgsql://user:pass@127.0.0.1/db');
     $connection_info = Database::convertDbUrlToConnectionInfo('mysql://user:pass@localhost/db', $root);
diff --git a/core/tests/Drupal/Tests/Core/Test/TestSuiteBaseTest.php b/core/tests/Drupal/Tests/Core/Test/TestSuiteBaseTest.php
index 13fdffbb7906..db4ccefa9cb3 100644
--- a/core/tests/Drupal/Tests/Core/Test/TestSuiteBaseTest.php
+++ b/core/tests/Drupal/Tests/Core/Test/TestSuiteBaseTest.php
@@ -14,7 +14,7 @@ class TestSuiteBaseTest extends TestCase {
   /**
    * Tests the assumption that local time is in 'Australia/Sydney'.
    */
-  public function testLocalTimeZone() {
+  public function testLocalTimeZone(): void {
     // The 'Australia/Sydney' time zone is set in core/tests/bootstrap.php
     $this->assertEquals('Australia/Sydney', date_default_timezone_get());
   }
diff --git a/core/tests/Drupal/Tests/Core/Theme/AjaxBasePageNegotiatorTest.php b/core/tests/Drupal/Tests/Core/Theme/AjaxBasePageNegotiatorTest.php
index 612dbb107973..4d38efb908d5 100644
--- a/core/tests/Drupal/Tests/Core/Theme/AjaxBasePageNegotiatorTest.php
+++ b/core/tests/Drupal/Tests/Core/Theme/AjaxBasePageNegotiatorTest.php
@@ -56,7 +56,7 @@ protected function setUp(): void {
    * @covers ::applies
    * @dataProvider providerTestApplies
    */
-  public function testApplies($request_data, $expected) {
+  public function testApplies($request_data, $expected): void {
     $request = new Request();
     foreach ($request_data as $key => $data) {
       $request->query->set($key, $data);
@@ -80,7 +80,7 @@ public static function providerTestApplies() {
   /**
    * @covers ::determineActiveTheme
    */
-  public function testDetermineActiveThemeValidToken() {
+  public function testDetermineActiveThemeValidToken(): void {
     $theme = 'claro';
     $theme_token = 'valid_theme_token';
 
@@ -98,7 +98,7 @@ public function testDetermineActiveThemeValidToken() {
   /**
    * @covers ::determineActiveTheme
    */
-  public function testDetermineActiveThemeInvalidToken() {
+  public function testDetermineActiveThemeInvalidToken(): void {
     $theme = 'claro';
     $theme_token = 'invalid_theme_token';
     $request = new Request();
@@ -116,7 +116,7 @@ public function testDetermineActiveThemeInvalidToken() {
   /**
    * @covers ::determineActiveTheme
    */
-  public function testDetermineActiveThemeDefaultTheme() {
+  public function testDetermineActiveThemeDefaultTheme(): void {
     $theme = 'stark';
     // When the theme is the system default, an empty string is provided as the
     // theme token. See system_js_settings_alter().
diff --git a/core/tests/Drupal/Tests/Core/Theme/Component/ComponentMetadataTest.php b/core/tests/Drupal/Tests/Core/Theme/Component/ComponentMetadataTest.php
index 8eec15748d4c..4e0555eb2ae8 100644
--- a/core/tests/Drupal/Tests/Core/Theme/Component/ComponentMetadataTest.php
+++ b/core/tests/Drupal/Tests/Core/Theme/Component/ComponentMetadataTest.php
@@ -21,7 +21,7 @@ class ComponentMetadataTest extends UnitTestCaseTest {
    *
    * @dataProvider dataProviderMetadata
    */
-  public function testMetadata(array $metadata_info, array $expectations) {
+  public function testMetadata(array $metadata_info, array $expectations): void {
     $metadata = new ComponentMetadata($metadata_info, 'foo/', FALSE);
     $this->assertSame($expectations['path'], $metadata->path);
     $this->assertSame($expectations['status'], $metadata->status);
@@ -34,7 +34,7 @@ public function testMetadata(array $metadata_info, array $expectations) {
    *
    * @dataProvider dataProviderMetadata
    */
-  public function testMetadataEnforceSchema(array $metadata_info, array $expectations, bool $missing_schema) {
+  public function testMetadataEnforceSchema(array $metadata_info, array $expectations, bool $missing_schema): void {
     if ($missing_schema) {
       $this->expectException(InvalidComponentException::class);
       $this->expectExceptionMessage('The component "' . $metadata_info['id'] . '" does not provide schema information. Schema definitions are mandatory for components declared in modules. For components declared in themes, schema definitions are only mandatory if the "enforce_prop_schemas" key is set to "true" in the theme info file.');
diff --git a/core/tests/Drupal/Tests/Core/Theme/Component/ComponentPluginManagerTest.php b/core/tests/Drupal/Tests/Core/Theme/Component/ComponentPluginManagerTest.php
index f962d50de020..b36717f3a241 100644
--- a/core/tests/Drupal/Tests/Core/Theme/Component/ComponentPluginManagerTest.php
+++ b/core/tests/Drupal/Tests/Core/Theme/Component/ComponentPluginManagerTest.php
@@ -44,7 +44,7 @@ public function testFindEmptyMetadataFile(): void {
    *
    * And not from the enclosing directory.
    */
-  public function testMismatchingFolderName() {
+  public function testMismatchingFolderName(): void {
     $this->expectException(ComponentNotFoundException::class);
     $this->manager->find('sdc_theme_test:mismatching-folder-name');
   }
diff --git a/core/tests/Drupal/Tests/Core/Theme/CoreThemesAutoloadedForTests.php b/core/tests/Drupal/Tests/Core/Theme/CoreThemesAutoloadedForTests.php
index dbd6ee688511..b00a01663b4d 100644
--- a/core/tests/Drupal/Tests/Core/Theme/CoreThemesAutoloadedForTests.php
+++ b/core/tests/Drupal/Tests/Core/Theme/CoreThemesAutoloadedForTests.php
@@ -17,7 +17,7 @@ class CoreThemesAutoloadedForTests extends UnitTestCase {
   /**
    * Confirms that core/themes is autoloaded for tests.
    */
-  public function testCoreThemesAutoloadedForTests() {
+  public function testCoreThemesAutoloadedForTests(): void {
     $this->assertTrue(class_exists(ClaroPreRender::class), 'core/themes (ClaroPreRender) is registered with the tests autoloader');
   }
 
diff --git a/core/tests/Drupal/Tests/Core/Theme/RegistryTest.php b/core/tests/Drupal/Tests/Core/Theme/RegistryTest.php
index 7f6a63ab81b2..a7f14c67bb5e 100644
--- a/core/tests/Drupal/Tests/Core/Theme/RegistryTest.php
+++ b/core/tests/Drupal/Tests/Core/Theme/RegistryTest.php
@@ -123,7 +123,7 @@ protected function tearDown(): void {
   /**
    * Tests getting the theme registry defined by a module.
    */
-  public function testGetRegistryForModule() {
+  public function testGetRegistryForModule(): void {
     $test_theme = new ActiveTheme([
       'name' => 'test_theme',
       'path' => 'core/modules/system/tests/themes/test_theme/test_theme.info.yml',
@@ -205,7 +205,7 @@ public function testGetRegistryForModule() {
    * @param array $expected
    *   The expected results.
    */
-  public function testPostProcessExtension($defined_functions, $hooks, $expected) {
+  public function testPostProcessExtension($defined_functions, $hooks, $expected): void {
     static::$functions['user'] = $defined_functions;
 
     $theme = $this->prophesize(ActiveTheme::class);
diff --git a/core/tests/Drupal/Tests/Core/Theme/ThemeNegotiatorTest.php b/core/tests/Drupal/Tests/Core/Theme/ThemeNegotiatorTest.php
index bda597a2b059..62ebf8d1ccbe 100644
--- a/core/tests/Drupal/Tests/Core/Theme/ThemeNegotiatorTest.php
+++ b/core/tests/Drupal/Tests/Core/Theme/ThemeNegotiatorTest.php
@@ -62,7 +62,7 @@ protected function setUp(): void {
    *
    * @see \Drupal\Core\Theme\ThemeNegotiator::determineActiveTheme()
    */
-  public function testDetermineActiveTheme() {
+  public function testDetermineActiveTheme(): void {
     $negotiator = $this->createMock('Drupal\Core\Theme\ThemeNegotiatorInterface');
     $negotiator->expects($this->once())
       ->method('determineActiveTheme')
@@ -90,7 +90,7 @@ public function testDetermineActiveTheme() {
    *
    * @see \Drupal\Core\Theme\ThemeNegotiator::determineActiveTheme()
    */
-  public function testDetermineActiveThemeWithPriority() {
+  public function testDetermineActiveThemeWithPriority(): void {
     $negotiators = [];
 
     $negotiator = $this->createMock('Drupal\Core\Theme\ThemeNegotiatorInterface');
@@ -130,7 +130,7 @@ public function testDetermineActiveThemeWithPriority() {
    *
    * @see \Drupal\Core\Theme\ThemeNegotiator::determineActiveTheme()
    */
-  public function testDetermineActiveThemeWithAccessCheck() {
+  public function testDetermineActiveThemeWithAccessCheck(): void {
     $negotiators = [];
 
     $negotiator = $this->createMock('Drupal\Core\Theme\ThemeNegotiatorInterface');
@@ -175,7 +175,7 @@ public function testDetermineActiveThemeWithAccessCheck() {
    *
    * @see \Drupal\Core\Theme\ThemeNegotiatorInterface
    */
-  public function testDetermineActiveThemeWithNotApplyingNegotiator() {
+  public function testDetermineActiveThemeWithNotApplyingNegotiator(): void {
     $negotiators = [];
 
     $negotiator = $this->createMock('Drupal\Core\Theme\ThemeNegotiatorInterface');
diff --git a/core/tests/Drupal/Tests/Core/Transliteration/PhpTransliterationTest.php b/core/tests/Drupal/Tests/Core/Transliteration/PhpTransliterationTest.php
index b395c49ed9ff..088e70325f47 100644
--- a/core/tests/Drupal/Tests/Core/Transliteration/PhpTransliterationTest.php
+++ b/core/tests/Drupal/Tests/Core/Transliteration/PhpTransliterationTest.php
@@ -32,7 +32,7 @@ class PhpTransliterationTest extends UnitTestCase {
    *
    * @dataProvider providerTestPhpTransliterationWithAlter
    */
-  public function testPhpTransliterationWithAlter($langcode, $original, $expected, $printable = NULL) {
+  public function testPhpTransliterationWithAlter($langcode, $original, $expected, $printable = NULL): void {
     if ($printable === NULL) {
       $printable = $original;
     }
diff --git a/core/tests/Drupal/Tests/Core/TypedData/RecursiveContextualValidatorTest.php b/core/tests/Drupal/Tests/Core/TypedData/RecursiveContextualValidatorTest.php
index c1a049408014..f43d9bcd7dca 100644
--- a/core/tests/Drupal/Tests/Core/TypedData/RecursiveContextualValidatorTest.php
+++ b/core/tests/Drupal/Tests/Core/TypedData/RecursiveContextualValidatorTest.php
@@ -94,7 +94,7 @@ protected function setUp(): void {
    *
    * @covers ::validate
    */
-  public function testValidateWithGroups() {
+  public function testValidateWithGroups(): void {
     $this->expectException(\LogicException::class);
     $this->recursiveValidator->validate('test', NULL, 'test group');
   }
@@ -104,7 +104,7 @@ public function testValidateWithGroups() {
    *
    * @covers ::validate
    */
-  public function testValidateWithoutTypedData() {
+  public function testValidateWithoutTypedData(): void {
     $this->expectException(\InvalidArgumentException::class);
     $this->recursiveValidator->validate('test');
   }
@@ -112,7 +112,7 @@ public function testValidateWithoutTypedData() {
   /**
    * @covers ::validate
    */
-  public function testBasicValidateWithoutConstraints() {
+  public function testBasicValidateWithoutConstraints(): void {
     $typed_data = $this->typedDataManager->create(DataDefinition::create('string'));
     $violations = $this->recursiveValidator->validate($typed_data);
     $this->assertCount(0, $violations);
@@ -121,7 +121,7 @@ public function testBasicValidateWithoutConstraints() {
   /**
    * @covers ::validate
    */
-  public function testBasicValidateWithConstraint() {
+  public function testBasicValidateWithConstraint(): void {
     $typed_data = $this->typedDataManager->create(
       DataDefinition::create('string')
         ->addConstraint('Callback', [
@@ -141,7 +141,7 @@ public function testBasicValidateWithConstraint() {
   /**
    * @covers ::validate
    */
-  public function testBasicValidateWithMultipleConstraints() {
+  public function testBasicValidateWithMultipleConstraints(): void {
     $options = [
       'callback' => function ($value, ExecutionContextInterface $context) {
         $context->addViolation('test violation');
@@ -159,7 +159,7 @@ public function testBasicValidateWithMultipleConstraints() {
   /**
    * @covers ::validate
    */
-  public function testPropertiesValidateWithMultipleLevels() {
+  public function testPropertiesValidateWithMultipleLevels(): void {
 
     $typed_data = $this->buildExampleTypedDataWithProperties();
 
@@ -227,7 +227,7 @@ protected function setupTypedData(array $tree, $name = '') {
   /**
    * @covers ::validateProperty
    */
-  public function testValidatePropertyWithCustomGroup() {
+  public function testValidatePropertyWithCustomGroup(): void {
     $tree = [
       'value' => [],
       'properties' => [
@@ -244,7 +244,7 @@ public function testValidatePropertyWithCustomGroup() {
    *
    * @dataProvider providerTestValidatePropertyWithInvalidObjects
    */
-  public function testValidatePropertyWithInvalidObjects($object) {
+  public function testValidatePropertyWithInvalidObjects($object): void {
     $this->expectException(\InvalidArgumentException::class);
     $this->recursiveValidator->validateProperty($object, 'key1', NULL);
   }
@@ -263,7 +263,7 @@ public static function providerTestValidatePropertyWithInvalidObjects(): \Genera
   /**
    * @covers ::validateProperty
    */
-  public function testValidateProperty() {
+  public function testValidateProperty(): void {
     $typed_data = $this->buildExampleTypedDataWithProperties();
 
     $violations = $this->recursiveValidator->validateProperty($typed_data, 'key_with_properties');
@@ -283,7 +283,7 @@ public function testValidateProperty() {
    *
    * @dataProvider providerTestValidatePropertyWithInvalidObjects
    */
-  public function testValidatePropertyValueWithInvalidObjects($object) {
+  public function testValidatePropertyValueWithInvalidObjects($object): void {
     $this->expectException(\InvalidArgumentException::class);
     $this->recursiveValidator->validatePropertyValue($object, 'key1', [], NULL);
   }
@@ -291,7 +291,7 @@ public function testValidatePropertyValueWithInvalidObjects($object) {
   /**
    * @covers ::validatePropertyValue
    */
-  public function testValidatePropertyValue() {
+  public function testValidatePropertyValue(): void {
     $typed_data = $this->buildExampleTypedDataWithProperties(['subkey1' => 'subvalue11', 'subkey2' => 'subvalue22']);
 
     $violations = $this->recursiveValidator->validatePropertyValue($typed_data, 'key_with_properties', $typed_data->get('key_with_properties'));
diff --git a/core/tests/Drupal/Tests/Core/UnroutedUrlTest.php b/core/tests/Drupal/Tests/Core/UnroutedUrlTest.php
index 801d52de5bac..46fb739c7e12 100644
--- a/core/tests/Drupal/Tests/Core/UnroutedUrlTest.php
+++ b/core/tests/Drupal/Tests/Core/UnroutedUrlTest.php
@@ -69,7 +69,7 @@ protected function setUp(): void {
    *
    * @dataProvider providerFromUri
    */
-  public function testFromUri($uri, $is_external) {
+  public function testFromUri($uri, $is_external): void {
     $url = Url::fromUri($uri);
 
     $this->assertInstanceOf('Drupal\Core\Url', $url);
@@ -104,7 +104,7 @@ public static function providerFromUri() {
    * @covers ::fromUri
    * @dataProvider providerFromInvalidUri
    */
-  public function testFromInvalidUri($uri) {
+  public function testFromInvalidUri($uri): void {
     $this->expectException(\InvalidArgumentException::class);
     $url = Url::fromUri($uri);
   }
@@ -134,7 +134,7 @@ public static function providerFromInvalidUri() {
    *
    * @covers ::createFromRequest
    */
-  public function testCreateFromRequest() {
+  public function testCreateFromRequest(): void {
     $request = Request::create('/test-path');
 
     $this->router->expects($this->once())
@@ -154,7 +154,7 @@ public function testCreateFromRequest() {
    *
    * @covers ::isExternal
    */
-  public function testIsExternal($uri, $is_external) {
+  public function testIsExternal($uri, $is_external): void {
     $url = Url::fromUri($uri);
     $this->assertSame($url->isExternal(), $is_external);
   }
@@ -167,7 +167,7 @@ public function testIsExternal($uri, $is_external) {
    *
    * @covers ::toString
    */
-  public function testToString($uri) {
+  public function testToString($uri): void {
     $url = Url::fromUri($uri);
     $this->assertSame($uri, $url->toString());
   }
@@ -180,7 +180,7 @@ public function testToString($uri) {
    *
    * @covers ::getRouteName
    */
-  public function testGetRouteName($uri) {
+  public function testGetRouteName($uri): void {
     $url = Url::fromUri($uri);
     $this->expectException(\UnexpectedValueException::class);
     $url->getRouteName();
@@ -194,7 +194,7 @@ public function testGetRouteName($uri) {
    *
    * @covers ::getRouteParameters
    */
-  public function testGetRouteParameters($uri) {
+  public function testGetRouteParameters($uri): void {
     $url = Url::fromUri($uri);
     $this->expectException(\UnexpectedValueException::class);
     $url->getRouteParameters();
@@ -208,7 +208,7 @@ public function testGetRouteParameters($uri) {
    *
    * @covers ::getInternalPath
    */
-  public function testGetInternalPath($uri) {
+  public function testGetInternalPath($uri): void {
     $url = Url::fromUri($uri);
     $this->expectException(\Exception::class);
     $url->getInternalPath();
@@ -222,7 +222,7 @@ public function testGetInternalPath($uri) {
    *
    * @covers ::getUri
    */
-  public function testGetUri($uri) {
+  public function testGetUri($uri): void {
     $url = Url::fromUri($uri);
     $this->assertNotNull($url->getUri());
   }
@@ -235,7 +235,7 @@ public function testGetUri($uri) {
    *
    * @covers ::getOptions
    */
-  public function testGetOptions($uri) {
+  public function testGetOptions($uri): void {
     $url = Url::fromUri($uri);
     $this->assertIsArray($url->getOptions());
   }
diff --git a/core/tests/Drupal/Tests/Core/Update/UpdateHookRegistryTest.php b/core/tests/Drupal/Tests/Core/Update/UpdateHookRegistryTest.php
index a39e9f66aea0..9ee418937da6 100644
--- a/core/tests/Drupal/Tests/Core/Update/UpdateHookRegistryTest.php
+++ b/core/tests/Drupal/Tests/Core/Update/UpdateHookRegistryTest.php
@@ -90,7 +90,7 @@ protected function setUp(): void {
   /**
    * @covers ::getAvailableUpdates
    */
-  public function testGetVersions() {
+  public function testGetVersions(): void {
     $module_name = 'drupal\tests\core\update\under_test';
 
     $update_registry = new UpdateHookRegistry([], $this->keyValueFactory);
@@ -108,7 +108,7 @@ public function testGetVersions() {
    * @covers ::setInstalledVersion
    * @covers ::deleteInstalledVersion
    */
-  public function testGetInstalledVersion() {
+  public function testGetInstalledVersion(): void {
     $versions = [
       'module1' => 1,
       'module2' => 20,
diff --git a/core/tests/Drupal/Tests/Core/Update/UpdateRegistryTest.php b/core/tests/Drupal/Tests/Core/Update/UpdateRegistryTest.php
index 72d2ef35eabf..d183cd752d17 100644
--- a/core/tests/Drupal/Tests/Core/Update/UpdateRegistryTest.php
+++ b/core/tests/Drupal/Tests/Core/Update/UpdateRegistryTest.php
@@ -183,7 +183,7 @@ function theme_d_removed_post_updates() {
   /**
    * @covers ::getPendingUpdateFunctions
    */
-  public function testGetPendingUpdateFunctionsNoExistingUpdates() {
+  public function testGetPendingUpdateFunctionsNoExistingUpdates(): void {
     $this->setupBasicExtensions();
 
     $key_value = $this->prophesize(KeyValueStoreInterface::class);
@@ -227,7 +227,7 @@ public function testGetPendingUpdateFunctionsNoExistingUpdates() {
   /**
    * @covers ::getPendingUpdateFunctions
    */
-  public function testGetPendingUpdateFunctionsWithLoadedModulesButNotEnabled() {
+  public function testGetPendingUpdateFunctionsWithLoadedModulesButNotEnabled(): void {
     $this->setupBasicExtensions();
 
     $key_value = $this->prophesize(KeyValueStoreInterface::class);
@@ -262,7 +262,7 @@ public function testGetPendingUpdateFunctionsWithLoadedModulesButNotEnabled() {
   /**
    * @covers ::getPendingUpdateFunctions
    */
-  public function testGetPendingUpdateFunctionsExistingUpdates() {
+  public function testGetPendingUpdateFunctionsExistingUpdates(): void {
     $this->setupBasicExtensions();
 
     $key_value = $this->prophesize(KeyValueStoreInterface::class);
@@ -309,7 +309,7 @@ public function testGetPendingUpdateFunctionsExistingUpdates() {
   /**
    * @covers ::getPendingUpdateInformation
    */
-  public function testGetPendingUpdateInformation() {
+  public function testGetPendingUpdateInformation(): void {
     $this->setupBasicExtensions();
 
     $key_value = $this->prophesize(KeyValueStoreInterface::class);
@@ -357,7 +357,7 @@ public function testGetPendingUpdateInformation() {
   /**
    * @covers ::getPendingUpdateInformation
    */
-  public function testGetPendingUpdateInformationWithExistingUpdates() {
+  public function testGetPendingUpdateInformationWithExistingUpdates(): void {
     $this->setupBasicExtensions();
 
     $key_value = $this->prophesize(KeyValueStoreInterface::class);
@@ -407,7 +407,7 @@ public function testGetPendingUpdateInformationWithExistingUpdates() {
   /**
    * @covers ::getPendingUpdateInformation
    */
-  public function testGetPendingUpdateInformationWithRemovedUpdates() {
+  public function testGetPendingUpdateInformationWithRemovedUpdates(): void {
     $this->setupBasicExtensions();
 
     $key_value = $this->prophesize(KeyValueStoreInterface::class);
@@ -434,7 +434,7 @@ public function testGetPendingUpdateInformationWithRemovedUpdates() {
   /**
    * @covers ::getUpdateFunctions
    */
-  public function testGetUpdateFunctions() {
+  public function testGetUpdateFunctions(): void {
     $this->setupBasicExtensions();
     $key_value = $this->prophesize(KeyValueStoreInterface::class)->reveal();
 
@@ -470,7 +470,7 @@ public function testGetUpdateFunctions() {
   /**
    * @covers ::registerInvokedUpdates
    */
-  public function testRegisterInvokedUpdatesWithoutExistingUpdates() {
+  public function testRegisterInvokedUpdatesWithoutExistingUpdates(): void {
     $this->setupBasicExtensions();
     $key_value = $this->prophesize(KeyValueStoreInterface::class);
     $key_value->get('existing_updates', [])
@@ -510,7 +510,7 @@ public function testRegisterInvokedUpdatesWithoutExistingUpdates() {
   /**
    * @covers ::registerInvokedUpdates
    */
-  public function testRegisterInvokedUpdatesWithMultiple() {
+  public function testRegisterInvokedUpdatesWithMultiple(): void {
     $this->setupBasicExtensions();
     $key_value = $this->prophesize(KeyValueStoreInterface::class);
     $key_value->get('existing_updates', [])
@@ -550,7 +550,7 @@ public function testRegisterInvokedUpdatesWithMultiple() {
   /**
    * @covers ::registerInvokedUpdates
    */
-  public function testRegisterInvokedUpdatesWithExistingUpdates() {
+  public function testRegisterInvokedUpdatesWithExistingUpdates(): void {
     $this->setupBasicExtensions();
     $key_value = $this->prophesize(KeyValueStoreInterface::class);
     $key_value->get('existing_updates', [])
@@ -585,7 +585,7 @@ public function testRegisterInvokedUpdatesWithExistingUpdates() {
   /**
    * @covers ::filterOutInvokedUpdatesByExtension
    */
-  public function testFilterOutInvokedUpdatesByExtension() {
+  public function testFilterOutInvokedUpdatesByExtension(): void {
     $this->setupBasicExtensions();
     $key_value = $this->prophesize(KeyValueStoreInterface::class);
     $key_value->get('existing_updates', [])
@@ -625,7 +625,7 @@ public function testFilterOutInvokedUpdatesByExtension() {
   /**
    * @covers ::getPendingUpdateFunctions
    */
-  public function testGetPendingCustomUpdateFunctions() {
+  public function testGetPendingCustomUpdateFunctions(): void {
     // Set up a simplified module structure with custom update hooks.
     $info_a = <<<'EOS'
 type: module
diff --git a/core/tests/Drupal/Tests/Core/UrlTest.php b/core/tests/Drupal/Tests/Core/UrlTest.php
index be30899f53f4..1693234623d5 100644
--- a/core/tests/Drupal/Tests/Core/UrlTest.php
+++ b/core/tests/Drupal/Tests/Core/UrlTest.php
@@ -148,7 +148,7 @@ public function testUrlFromRequest() {
    *
    * @covers ::fromRoute
    */
-  public function testFromRouteFront() {
+  public function testFromRouteFront(): void {
     $url = Url::fromRoute('<front>');
     $this->assertSame('<front>', $url->getRouteName());
   }
@@ -159,7 +159,7 @@ public function testFromRouteFront() {
    * @covers ::fromUserInput
    * @dataProvider providerFromValidInternalUri
    */
-  public function testFromUserInput($path) {
+  public function testFromUserInput($path): void {
     $url = Url::fromUserInput($path);
     $uri = $url->getUri();
 
@@ -191,7 +191,7 @@ public function testFromUserInput($path) {
    * @covers ::fromUserInput
    * @dataProvider providerFromInvalidInternalUri
    */
-  public function testFromInvalidUserInput($path) {
+  public function testFromInvalidUserInput($path): void {
     $this->expectException(\InvalidArgumentException::class);
     $url = Url::fromUserInput($path);
   }
@@ -201,7 +201,7 @@ public function testFromInvalidUserInput($path) {
    *
    * @covers ::fromUri
    */
-  public function testFromRoutedPathWithInvalidRoute() {
+  public function testFromRoutedPathWithInvalidRoute(): void {
     $this->pathValidator->expects($this->once())
       ->method('getUrlIfValidWithoutAccessCheck')
       ->with('invalid-path')
@@ -216,7 +216,7 @@ public function testFromRoutedPathWithInvalidRoute() {
    *
    * @covers ::fromUri
    */
-  public function testFromRoutedPathWithValidRoute() {
+  public function testFromRoutedPathWithValidRoute(): void {
     $url = Url::fromRoute('test_route');
     $this->pathValidator->expects($this->once())
       ->method('getUrlIfValidWithoutAccessCheck')
@@ -231,7 +231,7 @@ public function testFromRoutedPathWithValidRoute() {
    *
    * @covers ::createFromRequest
    */
-  public function testCreateFromRequest() {
+  public function testCreateFromRequest(): void {
     $attributes = [
       '_raw_variables' => new InputBag([
         'color' => 'chartreuse',
@@ -255,7 +255,7 @@ public function testCreateFromRequest() {
    *
    * @covers ::createFromRequest
    */
-  public function testUrlFromRequestInvalid() {
+  public function testUrlFromRequestInvalid(): void {
     $request = Request::create('/test-path');
 
     $this->router->expects($this->once())
@@ -274,7 +274,7 @@ public function testUrlFromRequestInvalid() {
    *
    * @covers ::isExternal
    */
-  public function testIsExternal($urls) {
+  public function testIsExternal($urls): void {
     foreach ($urls as $url) {
       $this->assertFalse($url->isExternal());
     }
@@ -290,7 +290,7 @@ public function testIsExternal($urls) {
    *
    * @covers ::getUri
    */
-  public function testGetUriForInternalUrl($urls) {
+  public function testGetUriForInternalUrl($urls): void {
     $this->expectException(\UnexpectedValueException::class);
     foreach ($urls as $url) {
       $url->getUri();
@@ -302,7 +302,7 @@ public function testGetUriForInternalUrl($urls) {
    *
    * @covers ::getUri
    */
-  public function testGetUriForExternalUrl() {
+  public function testGetUriForExternalUrl(): void {
     $url = Url::fromUri('http://example.com/test');
     $this->assertEquals('http://example.com/test', $url->getUri());
   }
@@ -313,7 +313,7 @@ public function testGetUriForExternalUrl() {
    * @covers ::getUri
    * @covers ::isExternal
    */
-  public function testGetUriForProtocolRelativeUrl() {
+  public function testGetUriForProtocolRelativeUrl(): void {
     $url = Url::fromUri('//example.com/test');
     $this->assertEquals('//example.com/test', $url->getUri());
     $this->assertTrue($url->isExternal());
@@ -329,7 +329,7 @@ public function testGetUriForProtocolRelativeUrl() {
    *
    * @depends testUrlFromRequest
    */
-  public function testGetInternalPath($urls) {
+  public function testGetInternalPath($urls): void {
     $map = [];
     $map[] = ['view.frontpage.page_1', [], '/node'];
     $map[] = ['node_view', ['node' => '1'], '/node/1'];
@@ -360,7 +360,7 @@ public function testGetInternalPath($urls) {
    *
    * @covers ::toString
    */
-  public function testToString($urls) {
+  public function testToString($urls): void {
     foreach ($urls as $index => $url) {
       $path = array_pop($this->map[$index]);
       $this->assertSame($path, $url->toString());
@@ -380,7 +380,7 @@ public function testToString($urls) {
    *
    * @covers ::getRouteName
    */
-  public function testGetRouteName($urls) {
+  public function testGetRouteName($urls): void {
     foreach ($urls as $index => $url) {
       $this->assertSame($this->map[$index][0], $url->getRouteName());
     }
@@ -391,7 +391,7 @@ public function testGetRouteName($urls) {
    *
    * @covers ::getRouteName
    */
-  public function testGetRouteNameWithExternalUrl() {
+  public function testGetRouteNameWithExternalUrl(): void {
     $url = Url::fromUri('http://example.com');
     $this->expectException(\UnexpectedValueException::class);
     $url->getRouteName();
@@ -407,7 +407,7 @@ public function testGetRouteNameWithExternalUrl() {
    *
    * @covers ::getRouteParameters
    */
-  public function testGetRouteParameters($urls) {
+  public function testGetRouteParameters($urls): void {
     foreach ($urls as $index => $url) {
       $this->assertSame($this->map[$index][1], $url->getRouteParameters());
     }
@@ -418,7 +418,7 @@ public function testGetRouteParameters($urls) {
    *
    * @covers ::getRouteParameters
    */
-  public function testGetRouteParametersWithExternalUrl() {
+  public function testGetRouteParametersWithExternalUrl(): void {
     $url = Url::fromUri('http://example.com');
     $this->expectException(\UnexpectedValueException::class);
     $url->getRouteParameters();
@@ -434,7 +434,7 @@ public function testGetRouteParametersWithExternalUrl() {
    *
    * @covers ::getOptions
    */
-  public function testGetOptions($urls) {
+  public function testGetOptions($urls): void {
     foreach ($urls as $index => $url) {
       $this->assertSame($this->map[$index][2], $url->getOptions());
     }
@@ -445,7 +445,7 @@ public function testGetOptions($urls) {
    *
    * @covers ::setOptions
    */
-  public function testSetOptions() {
+  public function testSetOptions(): void {
     $url = Url::fromRoute('test_route', []);
     $this->assertEquals([], $url->getOptions());
     $url->setOptions(['foo' => 'bar']);
@@ -459,7 +459,7 @@ public function testSetOptions() {
    *
    * @covers ::mergeOptions
    */
-  public function testMergeOptions() {
+  public function testMergeOptions(): void {
     $url = Url::fromRoute('test_route', [], ['foo' => 'bar', 'bar' => ['key' => 'value']]);
     $url->mergeOptions(['bar' => ['key' => 'value1', 'key2' => 'value2']]);
     $this->assertEquals(['foo' => 'bar', 'bar' => ['key' => 'value1', 'key2' => 'value2']], $url->getOptions());
@@ -475,7 +475,7 @@ public function testMergeOptions() {
    * @covers ::accessManager
    * @dataProvider accessProvider
    */
-  public function testAccessRouted($access) {
+  public function testAccessRouted($access): void {
     $account = $this->createMock('Drupal\Core\Session\AccountInterface');
     $url = new TestUrl('entity.node.canonical', ['node' => 3]);
     $url->setAccessManager($this->getMockAccessManager($access, $account));
@@ -487,7 +487,7 @@ public function testAccessRouted($access) {
    *
    * @covers ::access
    */
-  public function testAccessUnrouted() {
+  public function testAccessUnrouted(): void {
     $account = $this->createMock('Drupal\Core\Session\AccountInterface');
     $url = TestUrl::fromUri('base:kittens');
     $access_manager = $this->createMock('Drupal\Core\Access\AccessManagerInterface');
@@ -500,7 +500,7 @@ public function testAccessUnrouted() {
   /**
    * Tests the fromRouteMatch() method.
    */
-  public function testFromRouteMatch() {
+  public function testFromRouteMatch(): void {
     $route = new Route('/test-route/{foo}');
     $route_match = new RouteMatch('test_route', $route, ['foo' => (object) [1]], ['foo' => 1]);
     $url = Url::fromRouteMatch($route_match);
@@ -574,7 +574,7 @@ public static function providerTestEntityUris() {
    *
    * @dataProvider providerTestEntityUris
    */
-  public function testEntityUris($uri, $options, $route_name, $route_parameters, $query, $fragment) {
+  public function testEntityUris($uri, $options, $route_name, $route_parameters, $query, $fragment): void {
     $url = Url::fromUri($uri, $options);
     $this->assertSame($route_name, $url->getRouteName());
     $this->assertEquals($route_parameters, $url->getRouteParameters());
@@ -587,7 +587,7 @@ public function testEntityUris($uri, $options, $route_name, $route_parameters, $
    *
    * @covers ::fromUri
    */
-  public function testInvalidEntityUriParameter() {
+  public function testInvalidEntityUriParameter(): void {
     // Make the mocked URL generator behave like the actual one.
     $this->urlGenerator->expects($this->once())
       ->method('generateFromRoute')
@@ -605,7 +605,7 @@ public function testInvalidEntityUriParameter() {
    *
    * @dataProvider providerTestToUriStringForEntity
    */
-  public function testToUriStringForEntity($uri, $options, $uri_string) {
+  public function testToUriStringForEntity($uri, $options, $uri_string): void {
     $url = Url::fromUri($uri, $options);
     $this->assertSame($url->toUriString(), $uri_string);
   }
@@ -628,7 +628,7 @@ public static function providerTestToUriStringForEntity() {
    *
    * @dataProvider providerTestToUriStringForInternal
    */
-  public function testToUriStringForInternal($uri, $options, $uri_string) {
+  public function testToUriStringForInternal($uri, $options, $uri_string): void {
     $url = Url::fromRoute('entity.test_entity.canonical', ['test_entity' => '1']);
     $this->pathValidator->expects($this->any())
       ->method('getUrlIfValidWithoutAccessCheck')
@@ -672,7 +672,7 @@ public static function providerTestToUriStringForInternal() {
    * @covers ::fromUri
    * @dataProvider providerFromValidInternalUri
    */
-  public function testFromValidInternalUri($path) {
+  public function testFromValidInternalUri($path): void {
     $url = Url::fromUri('internal:' . $path);
     $this->assertInstanceOf('Drupal\Core\Url', $url);
   }
@@ -712,7 +712,7 @@ public static function providerFromValidInternalUri() {
    * @covers ::fromUri
    * @dataProvider providerFromInvalidInternalUri
    */
-  public function testFromInvalidInternalUri($path) {
+  public function testFromInvalidInternalUri($path): void {
     $this->expectException(\InvalidArgumentException::class);
     Url::fromUri('internal:' . $path);
   }
@@ -747,7 +747,7 @@ public static function providerFromInvalidInternalUri() {
    *
    * @covers ::fromUri
    */
-  public function testFromUriNumber() {
+  public function testFromUriNumber(): void {
     $url = Url::fromUri('base:2015/10/06');
     $this->assertSame($url->toUriString(), 'base:/2015/10/06');
   }
@@ -759,7 +759,7 @@ public function testFromUriNumber() {
    *
    * @dataProvider providerTestToUriStringForRoute
    */
-  public function testToUriStringForRoute($uri, $options, $uri_string) {
+  public function testToUriStringForRoute($uri, $options, $uri_string): void {
     $url = Url::fromUri($uri, $options);
     $this->assertSame($url->toUriString(), $uri_string);
   }
@@ -784,7 +784,7 @@ public static function providerTestToUriStringForRoute() {
   /**
    * @covers ::fromUri
    */
-  public function testFromRouteUriWithMissingRouteName() {
+  public function testFromRouteUriWithMissingRouteName(): void {
     $this->expectException(\InvalidArgumentException::class);
     $this->expectExceptionMessage("The route URI 'route:' is invalid.");
     Url::fromUri('route:');
diff --git a/core/tests/Drupal/Tests/Core/Utility/CallableResolverTest.php b/core/tests/Drupal/Tests/Core/Utility/CallableResolverTest.php
index 01bb1b972724..ed94cd09ff4c 100644
--- a/core/tests/Drupal/Tests/Core/Utility/CallableResolverTest.php
+++ b/core/tests/Drupal/Tests/Core/Utility/CallableResolverTest.php
@@ -41,7 +41,7 @@ protected function setUp(): void {
   /**
    * @covers ::getCallableFromDefinition
    */
-  public function testCallbackResolver() {
+  public function testCallbackResolver(): void {
     $cases = [
       'Inline function' => [
         function ($suffix) {
@@ -109,7 +109,7 @@ function ($suffix) {
    * @dataProvider callableResolverExceptionHandlingTestCases
    * @covers ::getCallableFromDefinition
    */
-  public function testCallbackResolverExceptionHandling($definition, $exception_class, $exception_message) {
+  public function testCallbackResolverExceptionHandling($definition, $exception_class, $exception_message): void {
     $this->expectException($exception_class);
     $this->expectExceptionMessage($exception_message);
     $this->resolver->getCallableFromDefinition($definition);
diff --git a/core/tests/Drupal/Tests/Core/Utility/LinkGeneratorTest.php b/core/tests/Drupal/Tests/Core/Utility/LinkGeneratorTest.php
index 4ff0cdfe8816..67afbed60bfb 100644
--- a/core/tests/Drupal/Tests/Core/Utility/LinkGeneratorTest.php
+++ b/core/tests/Drupal/Tests/Core/Utility/LinkGeneratorTest.php
@@ -110,7 +110,7 @@ public static function providerTestGenerateHrefs() {
    *
    * @dataProvider providerTestGenerateHrefs
    */
-  public function testGenerateHrefs($route_name, array $parameters, $absolute, $expected_url) {
+  public function testGenerateHrefs($route_name, array $parameters, $absolute, $expected_url): void {
     $this->urlGenerator->expects($this->once())
       ->method('generateFromRoute')
       ->with($route_name, $parameters, ['absolute' => $absolute] + $this->defaultOptions)
@@ -131,7 +131,7 @@ public function testGenerateHrefs($route_name, array $parameters, $absolute, $ex
    *
    * @covers ::generate
    */
-  public function testGenerate() {
+  public function testGenerate(): void {
     $this->urlGenerator->expects($this->once())
       ->method('generateFromRoute')
       ->with('test_route_1', [], ['fragment' => 'the-fragment'] + $this->defaultOptions)
@@ -161,7 +161,7 @@ public function testGenerate() {
    *
    * @covers ::generate
    */
-  public function testGenerateNoLink() {
+  public function testGenerateNoLink(): void {
     $this->urlGenerator->expects($this->never())
       ->method('generateFromRoute');
     $this->moduleHandler->expects($this->exactly(2))
@@ -193,7 +193,7 @@ public function testGenerateNoLink() {
    *
    * @covers ::generate
    */
-  public function testGenerateNone() {
+  public function testGenerateNone(): void {
     $this->urlGenerator->expects($this->once())
       ->method('generateFromRoute')
       ->with('<none>', [], ['set_active_class' => TRUE] + $this->defaultOptions)
@@ -216,7 +216,7 @@ public function testGenerateNone() {
    *
    * @covers ::generate
    */
-  public function testGenerateButton() {
+  public function testGenerateButton(): void {
     $this->urlGenerator->expects($this->never())
       ->method('generateFromRoute');
     $this->moduleHandler->expects($this->exactly(2))
@@ -247,7 +247,7 @@ public function testGenerateButton() {
    *
    * @covers ::generate
    */
-  public function testGenerateExternal() {
+  public function testGenerateExternal(): void {
     $this->urlAssembler->expects($this->once())
       ->method('assemble')
       ->with('https://www.drupal.org', ['set_active_class' => TRUE, 'external' => TRUE] + $this->defaultOptions)
@@ -281,7 +281,7 @@ public function testGenerateExternal() {
    *
    * @covers ::generate
    */
-  public function testGenerateUrlWithQuotes() {
+  public function testGenerateUrlWithQuotes(): void {
     $this->urlAssembler->expects($this->once())
       ->method('assemble')
       ->with('base:example', ['query' => ['foo' => '"bar"', 'zoo' => 'baz']] + $this->defaultOptions)
@@ -312,7 +312,7 @@ public function testGenerateUrlWithQuotes() {
    *
    * @see \Drupal\Core\Utility\LinkGenerator::generate()
    */
-  public function testGenerateAttributes() {
+  public function testGenerateAttributes(): void {
     $this->urlGenerator->expects($this->once())
       ->method('generateFromRoute')
       ->with('test_route_1', [], $this->defaultOptions)
@@ -337,7 +337,7 @@ public function testGenerateAttributes() {
    *
    * @see \Drupal\Core\Utility\LinkGenerator::generate()
    */
-  public function testGenerateQuery() {
+  public function testGenerateQuery(): void {
     $this->urlGenerator->expects($this->once())
       ->method('generateFromRoute')
       ->with('test_route_1', [], ['query' => ['test' => 'value']] + $this->defaultOptions)
@@ -360,7 +360,7 @@ public function testGenerateQuery() {
    *
    * @see \Drupal\Core\Utility\LinkGenerator::generate()
    */
-  public function testGenerateParametersAsQuery() {
+  public function testGenerateParametersAsQuery(): void {
     $this->urlGenerator->expects($this->once())
       ->method('generateFromRoute')
       ->with('test_route_1', ['test' => 'value'], $this->defaultOptions)
@@ -381,7 +381,7 @@ public function testGenerateParametersAsQuery() {
    *
    * @see \Drupal\Core\Utility\LinkGenerator::generate()
    */
-  public function testGenerateOptions() {
+  public function testGenerateOptions(): void {
     $this->urlGenerator->expects($this->once())
       ->method('generateFromRoute')
       ->with('test_route_1', [], ['key' => 'value'] + $this->defaultOptions)
@@ -403,7 +403,7 @@ public function testGenerateOptions() {
    *
    * @see \Drupal\Core\Utility\LinkGenerator::generate()
    */
-  public function testGenerateXss() {
+  public function testGenerateXss(): void {
     $this->urlGenerator->expects($this->once())
       ->method('generateFromRoute')
       ->with('test_route_4', [], $this->defaultOptions)
@@ -421,7 +421,7 @@ public function testGenerateXss() {
    *
    * @see \Drupal\Core\Utility\LinkGenerator::generate()
    */
-  public function testGenerateWithHtml() {
+  public function testGenerateWithHtml(): void {
     $this->urlGenerator->expects($this->exactly(2))
       ->method('generateFromRoute')
       ->with('test_route_5', [], $this->defaultOptions)
@@ -460,7 +460,7 @@ public function testGenerateWithHtml() {
    *
    * @see \Drupal\Core\Utility\LinkGenerator::generate()
    */
-  public function testGenerateActive() {
+  public function testGenerateActive(): void {
     $this->urlGenerator->expects($this->exactly(5))
       ->method('generateFromRoute')
       ->willReturnCallback(function ($name, $parameters = [], $options = [], $collect_bubbleable_metadata = FALSE) {
@@ -551,7 +551,7 @@ public function testGenerateActive() {
    *
    * @see \Drupal\Core\Utility\LinkGenerator::generate()
    */
-  public function testGenerateBubbleableMetadata() {
+  public function testGenerateBubbleableMetadata(): void {
     $options = ['query' => [], 'language' => NULL, 'set_active_class' => FALSE, 'absolute' => FALSE];
     $this->urlGenerator->expects($this->any())
       ->method('generateFromRoute')
@@ -582,7 +582,7 @@ public function testGenerateBubbleableMetadata() {
    *
    * @covers ::generate
    */
-  public function testGenerateWithAlterHook() {
+  public function testGenerateWithAlterHook(): void {
     $options = ['query' => [], 'language' => NULL, 'set_active_class' => FALSE, 'absolute' => FALSE];
     $this->urlGenerator->expects($this->any())
       ->method('generateFromRoute')
@@ -621,7 +621,7 @@ public function testGenerateWithAlterHook() {
    *
    * This is a regression test for https://www.drupal.org/node/2842399.
    */
-  public function testGenerateTwice() {
+  public function testGenerateTwice(): void {
     $this->urlGenerator->expects($this->any())
       ->method('generateFromRoute')
       ->willReturn((new GeneratedUrl())->setGeneratedUrl('/'));
diff --git a/core/tests/Drupal/Tests/Core/Utility/TokenTest.php b/core/tests/Drupal/Tests/Core/Utility/TokenTest.php
index 1aa30dba0668..df3ede5da3b1 100644
--- a/core/tests/Drupal/Tests/Core/Utility/TokenTest.php
+++ b/core/tests/Drupal/Tests/Core/Utility/TokenTest.php
@@ -107,7 +107,7 @@ protected function setUp(): void {
   /**
    * @covers ::getInfo
    */
-  public function testGetInfo() {
+  public function testGetInfo(): void {
     $token_info = [
       'types' => [
         'foo' => [
@@ -153,7 +153,7 @@ public function testGetInfo() {
   /**
    * @covers ::replace
    */
-  public function testReplaceWithBubbleableMetadataObject() {
+  public function testReplaceWithBubbleableMetadataObject(): void {
     $this->moduleHandler->expects($this->any())
       ->method('invokeAll')
       ->willReturn(['[node:title]' => 'hello world']);
@@ -182,7 +182,7 @@ public function testReplaceWithBubbleableMetadataObject() {
   /**
    * @covers ::replace
    */
-  public function testReplaceWithHookTokensWithBubbleableMetadata() {
+  public function testReplaceWithHookTokensWithBubbleableMetadata(): void {
     $this->moduleHandler->expects($this->any())
       ->method('invokeAll')
       ->willReturnCallback(function ($hook_name, $args) {
@@ -218,7 +218,7 @@ public function testReplaceWithHookTokensWithBubbleableMetadata() {
    * @covers ::replace
    * @covers ::replace
    */
-  public function testReplaceWithHookTokensAlterWithBubbleableMetadata() {
+  public function testReplaceWithHookTokensAlterWithBubbleableMetadata(): void {
     $this->moduleHandler->expects($this->any())
       ->method('invokeAll')
       ->willReturn([]);
@@ -255,7 +255,7 @@ public function testReplaceWithHookTokensAlterWithBubbleableMetadata() {
   /**
    * @covers ::resetInfo
    */
-  public function testResetInfo() {
+  public function testResetInfo(): void {
     $this->cacheTagsInvalidator->expects($this->once())
       ->method('invalidateTags')
       ->with(['token_info']);
@@ -267,7 +267,7 @@ public function testResetInfo() {
    * @covers ::replace
    * @dataProvider providerTestReplaceEscaping
    */
-  public function testReplaceEscaping($string, array $tokens, $expected) {
+  public function testReplaceEscaping($string, array $tokens, $expected): void {
     $this->moduleHandler->expects($this->any())
       ->method('invokeAll')
       ->willReturnCallback(function ($type, $args) {
@@ -301,7 +301,7 @@ public static function providerTestReplaceEscaping() {
   /**
    * @covers ::replacePlain
    */
-  public function testReplacePlain() {
+  public function testReplacePlain(): void {
     $this->setupSiteTokens();
     $base = 'Wow, great "[site:name]" has a slogan "[site:slogan]"';
     $plain = $this->token->replacePlain($base);
@@ -311,7 +311,7 @@ public function testReplacePlain() {
   /**
    * Scans dummy text, then tests the output.
    */
-  public function testScan() {
+  public function testScan(): void {
     // Define text with valid and not valid, fake and existing token-like
     // strings.
     $text = 'First a [valid:simple], but dummy token, and a dummy [valid:token with: spaces].';
diff --git a/core/tests/Drupal/Tests/Core/Utility/UnroutedUrlAssemblerTest.php b/core/tests/Drupal/Tests/Core/Utility/UnroutedUrlAssemblerTest.php
index d0eb9c871a78..a323484a68fa 100644
--- a/core/tests/Drupal/Tests/Core/Utility/UnroutedUrlAssemblerTest.php
+++ b/core/tests/Drupal/Tests/Core/Utility/UnroutedUrlAssemblerTest.php
@@ -59,7 +59,7 @@ protected function setUp(): void {
   /**
    * @covers ::assemble
    */
-  public function testAssembleWithNeitherExternalNorDomainLocalUri() {
+  public function testAssembleWithNeitherExternalNorDomainLocalUri(): void {
     $this->expectException(\InvalidArgumentException::class);
     $this->unroutedUrlAssembler->assemble('wrong-url');
   }
@@ -67,7 +67,7 @@ public function testAssembleWithNeitherExternalNorDomainLocalUri() {
   /**
    * @covers ::assemble
    */
-  public function testAssembleWithLeadingSlash() {
+  public function testAssembleWithLeadingSlash(): void {
     $this->expectException(\InvalidArgumentException::class);
     $this->unroutedUrlAssembler->assemble('/drupal.org');
   }
@@ -78,7 +78,7 @@ public function testAssembleWithLeadingSlash() {
    *
    * @dataProvider providerTestAssembleWithExternalUrl
    */
-  public function testAssembleWithExternalUrl($uri, array $options, $expected) {
+  public function testAssembleWithExternalUrl($uri, array $options, $expected): void {
     $this->setupRequestStack(FALSE);
     $this->assertEquals($expected, $this->unroutedUrlAssembler->assemble($uri, $options));
     $generated_url = $this->unroutedUrlAssembler->assemble($uri, $options, TRUE);
@@ -113,7 +113,7 @@ public static function providerTestAssembleWithExternalUrl() {
    *
    * @dataProvider providerTestAssembleWithLocalUri
    */
-  public function testAssembleWithLocalUri($uri, array $options, $subdir, $expected) {
+  public function testAssembleWithLocalUri($uri, array $options, $subdir, $expected): void {
     $this->setupRequestStack($subdir);
 
     $this->assertEquals($expected, $this->unroutedUrlAssembler->assemble($uri, $options));
@@ -139,7 +139,7 @@ public static function providerTestAssembleWithLocalUri() {
   /**
    * @covers ::assemble
    */
-  public function testAssembleWithNotEnabledProcessing() {
+  public function testAssembleWithNotEnabledProcessing(): void {
     $this->setupRequestStack(FALSE);
     $this->pathProcessor->expects($this->never())
       ->method('processOutbound');
@@ -150,7 +150,7 @@ public function testAssembleWithNotEnabledProcessing() {
   /**
    * @covers ::assemble
    */
-  public function testAssembleWithEnabledProcessing() {
+  public function testAssembleWithEnabledProcessing(): void {
     $this->setupRequestStack(FALSE);
     $this->pathProcessor->expects($this->exactly(2))
       ->method('processOutbound')
@@ -174,7 +174,7 @@ public function testAssembleWithEnabledProcessing() {
   /**
    * @covers ::assemble
    */
-  public function testAssembleWithStartingSlashEnabledProcessing() {
+  public function testAssembleWithStartingSlashEnabledProcessing(): void {
     $this->setupRequestStack(FALSE);
     $this->pathProcessor->expects($this->exactly(2))
       ->method('processOutbound')
diff --git a/core/tests/Drupal/Tests/ExpectDeprecationTest.php b/core/tests/Drupal/Tests/ExpectDeprecationTest.php
index 349a34f015f1..df6045b075d3 100644
--- a/core/tests/Drupal/Tests/ExpectDeprecationTest.php
+++ b/core/tests/Drupal/Tests/ExpectDeprecationTest.php
@@ -19,7 +19,7 @@ class ExpectDeprecationTest extends TestCase {
   /**
    * Tests expectDeprecation.
    */
-  public function testExpectDeprecation() {
+  public function testExpectDeprecation(): void {
     $this->expectDeprecation('Test deprecation');
     // phpcs:ignore Drupal.Semantics.FunctionTriggerError
     @trigger_error('Test deprecation', E_USER_DEPRECATED);
@@ -31,7 +31,7 @@ public function testExpectDeprecation() {
    * @runInSeparateProcess
    * @preserveGlobalState disabled
    */
-  public function testExpectDeprecationInIsolation() {
+  public function testExpectDeprecationInIsolation(): void {
     $this->expectDeprecation('Test isolated deprecation');
     // phpcs:ignore Drupal.Semantics.FunctionTriggerError
     @trigger_error('Test isolated deprecation', E_USER_DEPRECATED);
diff --git a/core/tests/Drupal/Tests/PhpCs/SortTest.php b/core/tests/Drupal/Tests/PhpCs/SortTest.php
index 6927f442ccd7..ec8b04eb5af8 100644
--- a/core/tests/Drupal/Tests/PhpCs/SortTest.php
+++ b/core/tests/Drupal/Tests/PhpCs/SortTest.php
@@ -31,14 +31,14 @@ protected function setUp(): void {
   /**
    * Tests that the phpcs.xml.dist file exists.
    */
-  public function testFileExists() {
+  public function testFileExists(): void {
     $this->assertFileExists($this->filePath);
   }
 
   /**
    * Tests that the phpcs.xml.dist file is properly sorted.
    */
-  public function testSorted() {
+  public function testSorted(): void {
     $content = file_get_contents($this->filePath);
     $xml_encoder = new XmlEncoder();
     $xml_encoded = $xml_encoder->decode($content, 'xml');
diff --git a/core/tests/Drupal/Tests/Scripts/TestSiteApplicationTest.php b/core/tests/Drupal/Tests/Scripts/TestSiteApplicationTest.php
index 42d6c78fb457..893a55e93092 100644
--- a/core/tests/Drupal/Tests/Scripts/TestSiteApplicationTest.php
+++ b/core/tests/Drupal/Tests/Scripts/TestSiteApplicationTest.php
@@ -50,7 +50,7 @@ protected function setUp(): void {
   /**
    * @coversNothing
    */
-  public function testInstallWithNonExistingFile() {
+  public function testInstallWithNonExistingFile(): void {
     $command_line = $this->php . ' core/scripts/test-site.php install --setup-file "this-class-does-not-exist" --db-url "' . getenv('SIMPLETEST_DB') . '"';
     $process = Process::fromShellCommandline($command_line, $this->root);
     $process->run();
@@ -61,7 +61,7 @@ public function testInstallWithNonExistingFile() {
   /**
    * @coversNothing
    */
-  public function testInstallWithFileWithNoClass() {
+  public function testInstallWithFileWithNoClass(): void {
     $command_line = $this->php . ' core/scripts/test-site.php install --setup-file core/tests/fixtures/empty_file.php.module --db-url "' . getenv('SIMPLETEST_DB') . '"';
     $process = Process::fromShellCommandline($command_line, $this->root);
     $process->run();
@@ -72,7 +72,7 @@ public function testInstallWithFileWithNoClass() {
   /**
    * @coversNothing
    */
-  public function testInstallWithNonSetupClass() {
+  public function testInstallWithNonSetupClass(): void {
     $this->markTestIncomplete('Fix this test in https://www.drupal.org/project/drupal/issues/2962157.');
 
     // Use __FILE__ to test absolute paths.
@@ -87,7 +87,7 @@ public function testInstallWithNonSetupClass() {
   /**
    * @coversNothing
    */
-  public function testInstallScript() {
+  public function testInstallScript(): void {
     $simpletest_path = $this->root . DIRECTORY_SEPARATOR . 'sites' . DIRECTORY_SEPARATOR . 'simpletest';
     if (!is_writable($simpletest_path)) {
       $this->markTestSkipped("Requires the directory $simpletest_path to exist and be writable");
@@ -187,7 +187,7 @@ public function testInstallScript() {
   /**
    * @coversNothing
    */
-  public function testInstallInDifferentLanguage() {
+  public function testInstallInDifferentLanguage(): void {
     $simpletest_path = $this->root . DIRECTORY_SEPARATOR . 'sites' . DIRECTORY_SEPARATOR . 'simpletest';
     if (!is_writable($simpletest_path)) {
       $this->markTestSkipped("Requires the directory $simpletest_path to exist and be writable");
@@ -224,7 +224,7 @@ public function testInstallInDifferentLanguage() {
   /**
    * @coversNothing
    */
-  public function testTearDownDbPrefixValidation() {
+  public function testTearDownDbPrefixValidation(): void {
     $command_line = $this->php . ' core/scripts/test-site.php tear-down not-a-valid-prefix';
     $process = Process::fromShellCommandline($command_line, $this->root);
     $process->setTimeout(500);
@@ -236,7 +236,7 @@ public function testTearDownDbPrefixValidation() {
   /**
    * @coversNothing
    */
-  public function testUserLogin() {
+  public function testUserLogin(): void {
     $this->markTestIncomplete('Fix this test in https://www.drupal.org/project/drupal/issues/2962157.');
     $simpletest_path = $this->root . DIRECTORY_SEPARATOR . 'sites' . DIRECTORY_SEPARATOR . 'simpletest';
     if (!is_writable($simpletest_path)) {
diff --git a/core/tests/Drupal/Tests/Traits/Core/Config/SchemaConfigListenerTestTrait.php b/core/tests/Drupal/Tests/Traits/Core/Config/SchemaConfigListenerTestTrait.php
index 89493d5ef4aa..8dd7e2398c48 100644
--- a/core/tests/Drupal/Tests/Traits/Core/Config/SchemaConfigListenerTestTrait.php
+++ b/core/tests/Drupal/Tests/Traits/Core/Config/SchemaConfigListenerTestTrait.php
@@ -14,7 +14,7 @@ trait SchemaConfigListenerTestTrait {
   /**
    * Tests \Drupal\Core\Config\Development\ConfigSchemaChecker.
    */
-  public function testConfigSchemaChecker() {
+  public function testConfigSchemaChecker(): void {
     // Test a non-existing schema.
     $message = 'Expected SchemaIncompleteException thrown';
     try {
diff --git a/core/tests/Drupal/Tests/UnitTestCaseTest.php b/core/tests/Drupal/Tests/UnitTestCaseTest.php
index ec22b183ab3f..0ceeea843c5b 100644
--- a/core/tests/Drupal/Tests/UnitTestCaseTest.php
+++ b/core/tests/Drupal/Tests/UnitTestCaseTest.php
@@ -14,7 +14,7 @@ class UnitTestCaseTest extends UnitTestCase {
   /**
    * Tests the dump() function in a test run in the same process.
    */
-  public function testVarDumpSameProcess() {
+  public function testVarDumpSameProcess(): void {
     // Append the stream capturer to the STDERR stream, so that we can test the
     // dump() output and also prevent it from actually outputting in this
     // particular test.
@@ -37,7 +37,7 @@ public function testVarDumpSameProcess() {
    *
    * @runInSeparateProcess
    */
-  public function testVarDumpSeparateProcess() {
+  public function testVarDumpSeparateProcess(): void {
     // Append the stream capturer to the STDERR stream, so that we can test the
     // dump() output and also prevent it from actually outputting in this
     // particular test.
-- 
GitLab