diff --git a/core/modules/action/tests/src/Functional/ActionListTest.php b/core/modules/action/tests/src/Functional/ActionListTest.php
index 10e6637af6a873143cf486477771b1c4cb5d951d..7cb3def4a7d165062de0215b9ce41dd180fce709 100644
--- a/core/modules/action/tests/src/Functional/ActionListTest.php
+++ b/core/modules/action/tests/src/Functional/ActionListTest.php
@@ -16,7 +16,7 @@ class ActionListTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['action'];
+  protected static $modules = ['action'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/action/tests/src/Functional/ActionUninstallTest.php b/core/modules/action/tests/src/Functional/ActionUninstallTest.php
index 58e652b791c0c0c191c95d5c9a985d18114a0bfe..4b393c28176257f118a2ea04fddf79957e0b5f9a 100644
--- a/core/modules/action/tests/src/Functional/ActionUninstallTest.php
+++ b/core/modules/action/tests/src/Functional/ActionUninstallTest.php
@@ -18,7 +18,7 @@ class ActionUninstallTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['views', 'action'];
+  protected static $modules = ['views', 'action'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/action/tests/src/Functional/ConfigurationTest.php b/core/modules/action/tests/src/Functional/ConfigurationTest.php
index 05421b7b0d0ac480905f83effb573d343924535a..c178ca68fe2247cb1b390cbe921d4fd18128eebc 100644
--- a/core/modules/action/tests/src/Functional/ConfigurationTest.php
+++ b/core/modules/action/tests/src/Functional/ConfigurationTest.php
@@ -18,7 +18,7 @@ class ConfigurationTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['action'];
+  protected static $modules = ['action'];
 
 
   /**
diff --git a/core/modules/action/tests/src/Kernel/Migrate/d6/MigrateActionConfigsTest.php b/core/modules/action/tests/src/Kernel/Migrate/d6/MigrateActionConfigsTest.php
index 20deed073514739f0e238f5599c80883a00c4588..71f675085e1713de71c98d117e160ab31efe7a25 100644
--- a/core/modules/action/tests/src/Kernel/Migrate/d6/MigrateActionConfigsTest.php
+++ b/core/modules/action/tests/src/Kernel/Migrate/d6/MigrateActionConfigsTest.php
@@ -17,7 +17,7 @@ class MigrateActionConfigsTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['action'];
+  protected static $modules = ['action'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/action/tests/src/Kernel/Migrate/d6/MigrateActionsTest.php b/core/modules/action/tests/src/Kernel/Migrate/d6/MigrateActionsTest.php
index 784f8b9770330a02954603242f980d88966d238b..a55bfd54c94793b372369c294236af822dc8d58b 100644
--- a/core/modules/action/tests/src/Kernel/Migrate/d6/MigrateActionsTest.php
+++ b/core/modules/action/tests/src/Kernel/Migrate/d6/MigrateActionsTest.php
@@ -12,7 +12,7 @@
  */
 class MigrateActionsTest extends MigrateDrupal6TestBase {
 
-  public static $modules = ['action', 'comment', 'node'];
+  protected static $modules = ['action', 'comment', 'node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/action/tests/src/Kernel/Migrate/d7/MigrateActionConfigsTest.php b/core/modules/action/tests/src/Kernel/Migrate/d7/MigrateActionConfigsTest.php
index b4d0545d6fdeccb7aefdecf131f1ad5ff8fd2c49..93401c5402b48432d69d0e465ea755378a610308 100644
--- a/core/modules/action/tests/src/Kernel/Migrate/d7/MigrateActionConfigsTest.php
+++ b/core/modules/action/tests/src/Kernel/Migrate/d7/MigrateActionConfigsTest.php
@@ -17,7 +17,7 @@ class MigrateActionConfigsTest extends MigrateDrupal7TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['action'];
+  protected static $modules = ['action'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/action/tests/src/Kernel/Migrate/d7/MigrateActionsTest.php b/core/modules/action/tests/src/Kernel/Migrate/d7/MigrateActionsTest.php
index 0159a57a0f9e534e6bb6c4cb39a30cfa810dd59c..ba48d30f9bfd09edae39f8932196a9b7d76fdf9b 100644
--- a/core/modules/action/tests/src/Kernel/Migrate/d7/MigrateActionsTest.php
+++ b/core/modules/action/tests/src/Kernel/Migrate/d7/MigrateActionsTest.php
@@ -12,7 +12,7 @@
  */
 class MigrateActionsTest extends MigrateDrupal7TestBase {
 
-  public static $modules = ['action', 'comment', 'node'];
+  protected static $modules = ['action', 'comment', 'node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/action/tests/src/Kernel/Plugin/migrate/source/ActionTest.php b/core/modules/action/tests/src/Kernel/Plugin/migrate/source/ActionTest.php
index 938752ad4d61e49c78b9a34460ee6f7bdd617ddb..e70f88e43a8f8c0faeb3754154acbf8f2bbbe615 100644
--- a/core/modules/action/tests/src/Kernel/Plugin/migrate/source/ActionTest.php
+++ b/core/modules/action/tests/src/Kernel/Plugin/migrate/source/ActionTest.php
@@ -15,7 +15,7 @@ class ActionTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['action', 'migrate_drupal', 'system'];
+  protected static $modules = ['action', 'migrate_drupal', 'system'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/aggregator/tests/src/Functional/AggregatorRenderingTest.php b/core/modules/aggregator/tests/src/Functional/AggregatorRenderingTest.php
index 67e0b6070e4ecc772497ec007ecdf914c685fca8..faebea4a27eabbd690fadc6e1dd6327f6b3b2556 100644
--- a/core/modules/aggregator/tests/src/Functional/AggregatorRenderingTest.php
+++ b/core/modules/aggregator/tests/src/Functional/AggregatorRenderingTest.php
@@ -17,7 +17,7 @@ class AggregatorRenderingTest extends AggregatorTestBase {
    *
    * @var array
    */
-  public static $modules = ['block', 'test_page_test'];
+  protected static $modules = ['block', 'test_page_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/aggregator/tests/src/Functional/AggregatorTestBase.php b/core/modules/aggregator/tests/src/Functional/AggregatorTestBase.php
index baac8f69bf8d5440428c46940314cba15812e6c0..71ad076a1a09d809a4725ad474d7472e8b4d3a58 100644
--- a/core/modules/aggregator/tests/src/Functional/AggregatorTestBase.php
+++ b/core/modules/aggregator/tests/src/Functional/AggregatorTestBase.php
@@ -27,7 +27,7 @@ abstract class AggregatorTestBase extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['block', 'node', 'aggregator', 'aggregator_test', 'views'];
+  protected static $modules = ['block', 'node', 'aggregator', 'aggregator_test', 'views'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/aggregator/tests/src/Functional/DeleteFeedTest.php b/core/modules/aggregator/tests/src/Functional/DeleteFeedTest.php
index 9ff7b3435ba1642412f377dedf343f71443c504f..ceecc857078d86816cf3e3b2cea0e8b4d778c3ac 100644
--- a/core/modules/aggregator/tests/src/Functional/DeleteFeedTest.php
+++ b/core/modules/aggregator/tests/src/Functional/DeleteFeedTest.php
@@ -14,7 +14,7 @@ class DeleteFeedTest extends AggregatorTestBase {
    *
    * @var array
    */
-  public static $modules = ['block'];
+  protected static $modules = ['block'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/aggregator/tests/src/Functional/FeedCacheTagsTest.php b/core/modules/aggregator/tests/src/Functional/FeedCacheTagsTest.php
index 3e3d3f4bc50aa7fc97792dd2232825797b26f665..a4ded2b02e8bc79c678212cc90bfcf444e7e75df 100644
--- a/core/modules/aggregator/tests/src/Functional/FeedCacheTagsTest.php
+++ b/core/modules/aggregator/tests/src/Functional/FeedCacheTagsTest.php
@@ -17,7 +17,7 @@ class FeedCacheTagsTest extends EntityWithUriCacheTagsTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['aggregator'];
+  protected static $modules = ['aggregator'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/aggregator/tests/src/Functional/FeedLanguageTest.php b/core/modules/aggregator/tests/src/Functional/FeedLanguageTest.php
index 0d37815839cd128caf288862abee2474621faaa2..504bbd5f2c5d832f7a7377ad8bfc1125be8f1c12 100644
--- a/core/modules/aggregator/tests/src/Functional/FeedLanguageTest.php
+++ b/core/modules/aggregator/tests/src/Functional/FeedLanguageTest.php
@@ -19,7 +19,7 @@ class FeedLanguageTest extends AggregatorTestBase {
    *
    * @var array
    */
-  public static $modules = ['language'];
+  protected static $modules = ['language'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/aggregator/tests/src/Functional/Hal/FeedHalJsonBasicAuthTest.php b/core/modules/aggregator/tests/src/Functional/Hal/FeedHalJsonBasicAuthTest.php
index a1d36b3240098464e457a001963ec0b58bc67e58..4085a9a50ccfe4974f3ea07628d8206233f8f6b4 100644
--- a/core/modules/aggregator/tests/src/Functional/Hal/FeedHalJsonBasicAuthTest.php
+++ b/core/modules/aggregator/tests/src/Functional/Hal/FeedHalJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class FeedHalJsonBasicAuthTest extends FeedHalJsonTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/aggregator/tests/src/Functional/Hal/FeedHalJsonTestBase.php b/core/modules/aggregator/tests/src/Functional/Hal/FeedHalJsonTestBase.php
index 7fa28700122c2834109feaefeeb8d1cc46311b2e..22357bf0f4b9b7ff77f227bc25ee17ade6cd21e9 100644
--- a/core/modules/aggregator/tests/src/Functional/Hal/FeedHalJsonTestBase.php
+++ b/core/modules/aggregator/tests/src/Functional/Hal/FeedHalJsonTestBase.php
@@ -12,7 +12,7 @@ abstract class FeedHalJsonTestBase extends FeedResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/aggregator/tests/src/Functional/Hal/ItemHalJsonAnonTest.php b/core/modules/aggregator/tests/src/Functional/Hal/ItemHalJsonAnonTest.php
index 629e794a9e38afc133cded730f406c95a1a9e35c..fe6018133e0581beb863cb50cf2a5b71cc9d3907 100644
--- a/core/modules/aggregator/tests/src/Functional/Hal/ItemHalJsonAnonTest.php
+++ b/core/modules/aggregator/tests/src/Functional/Hal/ItemHalJsonAnonTest.php
@@ -14,7 +14,7 @@ class ItemHalJsonAnonTest extends ItemHalJsonTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/aggregator/tests/src/Functional/Hal/ItemHalJsonBasicAuthTest.php b/core/modules/aggregator/tests/src/Functional/Hal/ItemHalJsonBasicAuthTest.php
index f8792f5d753c9498b4f34bd23f05db6d22fcf0d6..2e696760f60ec16c4aecf7938c182a9a58b71d5d 100644
--- a/core/modules/aggregator/tests/src/Functional/Hal/ItemHalJsonBasicAuthTest.php
+++ b/core/modules/aggregator/tests/src/Functional/Hal/ItemHalJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class ItemHalJsonBasicAuthTest extends ItemHalJsonTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal', 'basic_auth'];
+  protected static $modules = ['hal', 'basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/aggregator/tests/src/Functional/Hal/ItemHalJsonCookieTest.php b/core/modules/aggregator/tests/src/Functional/Hal/ItemHalJsonCookieTest.php
index d180934ab989f57a068c50f9f127f038c1eb2f17..da07a955948cccd3278d91638d24ca246c8ad244 100644
--- a/core/modules/aggregator/tests/src/Functional/Hal/ItemHalJsonCookieTest.php
+++ b/core/modules/aggregator/tests/src/Functional/Hal/ItemHalJsonCookieTest.php
@@ -14,7 +14,7 @@ class ItemHalJsonCookieTest extends ItemHalJsonTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/aggregator/tests/src/Functional/Hal/ItemHalJsonTestBase.php b/core/modules/aggregator/tests/src/Functional/Hal/ItemHalJsonTestBase.php
index c786b7b181a4f5cd744166356070ae49f65fc5a7..5c5120b945dbc3b4ab277d43dba0a1a3199c31e1 100644
--- a/core/modules/aggregator/tests/src/Functional/Hal/ItemHalJsonTestBase.php
+++ b/core/modules/aggregator/tests/src/Functional/Hal/ItemHalJsonTestBase.php
@@ -18,7 +18,7 @@ abstract class ItemHalJsonTestBase extends ItemResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/aggregator/tests/src/Functional/ImportOpmlTest.php b/core/modules/aggregator/tests/src/Functional/ImportOpmlTest.php
index 36955e8cd2564f9cfc5c54309ffa387d92eb4e84..ece1634c0daeeeac1a14403a7f4cad1a521c9e9f 100644
--- a/core/modules/aggregator/tests/src/Functional/ImportOpmlTest.php
+++ b/core/modules/aggregator/tests/src/Functional/ImportOpmlTest.php
@@ -16,7 +16,7 @@ class ImportOpmlTest extends AggregatorTestBase {
    *
    * @var array
    */
-  public static $modules = ['block', 'help'];
+  protected static $modules = ['block', 'help'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/aggregator/tests/src/Functional/ItemCacheTagsTest.php b/core/modules/aggregator/tests/src/Functional/ItemCacheTagsTest.php
index 86ad13ff4bff71bec0276e39e9bf5347dbc357e5..c7bce98ff211446982b68f96dfaa0fb8d2db1b28 100644
--- a/core/modules/aggregator/tests/src/Functional/ItemCacheTagsTest.php
+++ b/core/modules/aggregator/tests/src/Functional/ItemCacheTagsTest.php
@@ -19,7 +19,7 @@ class ItemCacheTagsTest extends EntityCacheTagsTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['aggregator'];
+  protected static $modules = ['aggregator'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/aggregator/tests/src/Functional/Rest/FeedJsonBasicAuthTest.php b/core/modules/aggregator/tests/src/Functional/Rest/FeedJsonBasicAuthTest.php
index 6018df892144ec124002803635fd1c1d49090c6a..620fd2f91d4f98d825ac3cd53708e62675ffa3f2 100644
--- a/core/modules/aggregator/tests/src/Functional/Rest/FeedJsonBasicAuthTest.php
+++ b/core/modules/aggregator/tests/src/Functional/Rest/FeedJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class FeedJsonBasicAuthTest extends FeedResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/aggregator/tests/src/Functional/Rest/FeedResourceTestBase.php b/core/modules/aggregator/tests/src/Functional/Rest/FeedResourceTestBase.php
index c515a058f121dff097302da09e4ddaca1d9cd0a7..e17c0573f07205a5a3bc1f69c8f148864582b9dc 100644
--- a/core/modules/aggregator/tests/src/Functional/Rest/FeedResourceTestBase.php
+++ b/core/modules/aggregator/tests/src/Functional/Rest/FeedResourceTestBase.php
@@ -10,7 +10,7 @@ abstract class FeedResourceTestBase extends EntityResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['aggregator'];
+  protected static $modules = ['aggregator'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/aggregator/tests/src/Functional/Rest/FeedXmlBasicAuthTest.php b/core/modules/aggregator/tests/src/Functional/Rest/FeedXmlBasicAuthTest.php
index c4bb7426d1a17f5f38552eab8f08b2a220b7ad8d..c5aab0b7309daf9d7b36b89283310dbbf70268c2 100644
--- a/core/modules/aggregator/tests/src/Functional/Rest/FeedXmlBasicAuthTest.php
+++ b/core/modules/aggregator/tests/src/Functional/Rest/FeedXmlBasicAuthTest.php
@@ -16,7 +16,7 @@ class FeedXmlBasicAuthTest extends FeedResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/aggregator/tests/src/Functional/Rest/ItemJsonBasicAuthTest.php b/core/modules/aggregator/tests/src/Functional/Rest/ItemJsonBasicAuthTest.php
index 383e8b59b3bcd8eb066da7bc0baac11737bb6bfd..e9fc9f54f946841fa6580315ebb056baf93cf781 100644
--- a/core/modules/aggregator/tests/src/Functional/Rest/ItemJsonBasicAuthTest.php
+++ b/core/modules/aggregator/tests/src/Functional/Rest/ItemJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class ItemJsonBasicAuthTest extends ItemResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/aggregator/tests/src/Functional/Rest/ItemResourceTestBase.php b/core/modules/aggregator/tests/src/Functional/Rest/ItemResourceTestBase.php
index ef9a05d72e99b506377967fceea2ae9f814e5fd0..bcfddce6fa204bc13284fbb25ee5a6f96f146c80 100644
--- a/core/modules/aggregator/tests/src/Functional/Rest/ItemResourceTestBase.php
+++ b/core/modules/aggregator/tests/src/Functional/Rest/ItemResourceTestBase.php
@@ -14,7 +14,7 @@ abstract class ItemResourceTestBase extends EntityResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['aggregator'];
+  protected static $modules = ['aggregator'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/aggregator/tests/src/Functional/Rest/ItemXmlBasicAuthTest.php b/core/modules/aggregator/tests/src/Functional/Rest/ItemXmlBasicAuthTest.php
index 4de90303d127f57cce3102aa99c0525438440002..f883cf126bdc4bdf29403f80bd48b74f23448cf7 100644
--- a/core/modules/aggregator/tests/src/Functional/Rest/ItemXmlBasicAuthTest.php
+++ b/core/modules/aggregator/tests/src/Functional/Rest/ItemXmlBasicAuthTest.php
@@ -16,7 +16,7 @@ class ItemXmlBasicAuthTest extends ItemResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/aggregator/tests/src/Kernel/AggregatorPluginManagerTest.php b/core/modules/aggregator/tests/src/Kernel/AggregatorPluginManagerTest.php
index 01e69b51c78cdc103811655d9d9d5c21f1ad8627..9871a0465eda9f3816540536ff94cc2752c75238 100644
--- a/core/modules/aggregator/tests/src/Kernel/AggregatorPluginManagerTest.php
+++ b/core/modules/aggregator/tests/src/Kernel/AggregatorPluginManagerTest.php
@@ -16,7 +16,7 @@ class AggregatorPluginManagerTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['aggregator', 'aggregator_test'];
+  protected static $modules = ['aggregator', 'aggregator_test'];
 
   /**
    * Tests that the fetcher info alter hook works.
diff --git a/core/modules/aggregator/tests/src/Kernel/AggregatorTitleTest.php b/core/modules/aggregator/tests/src/Kernel/AggregatorTitleTest.php
index e8e41eb730a020ae13b78412c1f0c63094002308..e10f481e13ac63181f93b29ee78b91a7dde2bbc3 100644
--- a/core/modules/aggregator/tests/src/Kernel/AggregatorTitleTest.php
+++ b/core/modules/aggregator/tests/src/Kernel/AggregatorTitleTest.php
@@ -18,7 +18,7 @@ class AggregatorTitleTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['file', 'field', 'options', 'aggregator', 'system'];
+  protected static $modules = ['file', 'field', 'options', 'aggregator', 'system'];
 
   /**
    * The field name that is tested.
diff --git a/core/modules/aggregator/tests/src/Kernel/FeedValidationTest.php b/core/modules/aggregator/tests/src/Kernel/FeedValidationTest.php
index 92fcc8dc81a1f7e7e972c49381a6cf67a08210ff..1d0f6792dda180e4e7d309293ec3e7b2499b68c4 100644
--- a/core/modules/aggregator/tests/src/Kernel/FeedValidationTest.php
+++ b/core/modules/aggregator/tests/src/Kernel/FeedValidationTest.php
@@ -17,7 +17,7 @@ class FeedValidationTest extends EntityKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['aggregator', 'options'];
+  protected static $modules = ['aggregator', 'options'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/aggregator/tests/src/Kernel/ItemWithoutFeedTest.php b/core/modules/aggregator/tests/src/Kernel/ItemWithoutFeedTest.php
index ace38c3c34ce31f373b4d36619e4c3bc1a38a3f7..f4a5e8f3f34dffa5349b20bfe491e6208f6f0bbb 100644
--- a/core/modules/aggregator/tests/src/Kernel/ItemWithoutFeedTest.php
+++ b/core/modules/aggregator/tests/src/Kernel/ItemWithoutFeedTest.php
@@ -15,7 +15,7 @@ class ItemWithoutFeedTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['aggregator', 'options'];
+  protected static $modules = ['aggregator', 'options'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/aggregator/tests/src/Kernel/Migrate/MigrateAggregatorStubTest.php b/core/modules/aggregator/tests/src/Kernel/Migrate/MigrateAggregatorStubTest.php
index 20f1ee90215178ee6e115b7ae378021e23b94b07..99c708e392c7b19f56677a71bd25f8b181a0869f 100644
--- a/core/modules/aggregator/tests/src/Kernel/Migrate/MigrateAggregatorStubTest.php
+++ b/core/modules/aggregator/tests/src/Kernel/Migrate/MigrateAggregatorStubTest.php
@@ -17,7 +17,7 @@ class MigrateAggregatorStubTest extends MigrateDrupalTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['aggregator'];
+  protected static $modules = ['aggregator'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/aggregator/tests/src/Kernel/Migrate/d6/MigrateAggregatorConfigsTest.php b/core/modules/aggregator/tests/src/Kernel/Migrate/d6/MigrateAggregatorConfigsTest.php
index a6925d4c6287144e48698e772740050889546016..519c608542d3bb395804a98fdc044a0b56f54d4c 100644
--- a/core/modules/aggregator/tests/src/Kernel/Migrate/d6/MigrateAggregatorConfigsTest.php
+++ b/core/modules/aggregator/tests/src/Kernel/Migrate/d6/MigrateAggregatorConfigsTest.php
@@ -17,7 +17,7 @@ class MigrateAggregatorConfigsTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['aggregator'];
+  protected static $modules = ['aggregator'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/aggregator/tests/src/Kernel/Migrate/d6/MigrateAggregatorFeedTest.php b/core/modules/aggregator/tests/src/Kernel/Migrate/d6/MigrateAggregatorFeedTest.php
index d01c826e531e809d088a54623cca5937b4bcd62a..1b702cbe52dcc338436360ec162a413b3800b859 100644
--- a/core/modules/aggregator/tests/src/Kernel/Migrate/d6/MigrateAggregatorFeedTest.php
+++ b/core/modules/aggregator/tests/src/Kernel/Migrate/d6/MigrateAggregatorFeedTest.php
@@ -15,7 +15,7 @@ class MigrateAggregatorFeedTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['aggregator'];
+  protected static $modules = ['aggregator'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/aggregator/tests/src/Kernel/Migrate/d6/MigrateAggregatorItemTest.php b/core/modules/aggregator/tests/src/Kernel/Migrate/d6/MigrateAggregatorItemTest.php
index aa439d9103d8df9007ebd23226f1f5beb0384087..c3bec74be2f2ed785867c8752a3ba635fe42f657 100644
--- a/core/modules/aggregator/tests/src/Kernel/Migrate/d6/MigrateAggregatorItemTest.php
+++ b/core/modules/aggregator/tests/src/Kernel/Migrate/d6/MigrateAggregatorItemTest.php
@@ -15,7 +15,7 @@ class MigrateAggregatorItemTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['aggregator'];
+  protected static $modules = ['aggregator'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/aggregator/tests/src/Kernel/Migrate/d7/MigrateAggregatorFeedTest.php b/core/modules/aggregator/tests/src/Kernel/Migrate/d7/MigrateAggregatorFeedTest.php
index e6dfde728864b137caf6fa91eea31d76834c9ba0..6ee4231b09dd3dceddd047957c05286e17bdb39c 100644
--- a/core/modules/aggregator/tests/src/Kernel/Migrate/d7/MigrateAggregatorFeedTest.php
+++ b/core/modules/aggregator/tests/src/Kernel/Migrate/d7/MigrateAggregatorFeedTest.php
@@ -15,7 +15,7 @@ class MigrateAggregatorFeedTest extends MigrateDrupal7TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['aggregator'];
+  protected static $modules = ['aggregator'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/aggregator/tests/src/Kernel/Migrate/d7/MigrateAggregatorItemTest.php b/core/modules/aggregator/tests/src/Kernel/Migrate/d7/MigrateAggregatorItemTest.php
index 3b90af24ce5933f62a4f563acdd1d869fc3c38d7..8e20f5fe6aea4d2e692dab3e0796a7eca6a19e2d 100644
--- a/core/modules/aggregator/tests/src/Kernel/Migrate/d7/MigrateAggregatorItemTest.php
+++ b/core/modules/aggregator/tests/src/Kernel/Migrate/d7/MigrateAggregatorItemTest.php
@@ -15,7 +15,7 @@ class MigrateAggregatorItemTest extends MigrateDrupal7TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['aggregator'];
+  protected static $modules = ['aggregator'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/aggregator/tests/src/Kernel/Migrate/d7/MigrateAggregatorSettingsTest.php b/core/modules/aggregator/tests/src/Kernel/Migrate/d7/MigrateAggregatorSettingsTest.php
index daff18eb1fbb85820b39179a88a33da6c26ecac2..666a979c27ffa723345a9b9a74358eeb3866d2a3 100644
--- a/core/modules/aggregator/tests/src/Kernel/Migrate/d7/MigrateAggregatorSettingsTest.php
+++ b/core/modules/aggregator/tests/src/Kernel/Migrate/d7/MigrateAggregatorSettingsTest.php
@@ -11,7 +11,7 @@
  */
 class MigrateAggregatorSettingsTest extends MigrateDrupal7TestBase {
 
-  public static $modules = ['aggregator'];
+  protected static $modules = ['aggregator'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/aggregator/tests/src/Kernel/Plugin/migrate/source/AggregatorFeedTest.php b/core/modules/aggregator/tests/src/Kernel/Plugin/migrate/source/AggregatorFeedTest.php
index d41f4f4b38a10cbccbe76f1722d65206f5b0dff2..67fe136808c66aec5c913113652d8a1918824d5e 100644
--- a/core/modules/aggregator/tests/src/Kernel/Plugin/migrate/source/AggregatorFeedTest.php
+++ b/core/modules/aggregator/tests/src/Kernel/Plugin/migrate/source/AggregatorFeedTest.php
@@ -15,7 +15,7 @@ class AggregatorFeedTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['aggregator', 'migrate_drupal'];
+  protected static $modules = ['aggregator', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/aggregator/tests/src/Kernel/Plugin/migrate/source/AggregatorItemTest.php b/core/modules/aggregator/tests/src/Kernel/Plugin/migrate/source/AggregatorItemTest.php
index 09101f7cd4da9c3a01de63c951ccd6ba3f8c7bff..ea9206a44b0f8a152e4c181f99cec84a29f16f9f 100644
--- a/core/modules/aggregator/tests/src/Kernel/Plugin/migrate/source/AggregatorItemTest.php
+++ b/core/modules/aggregator/tests/src/Kernel/Plugin/migrate/source/AggregatorItemTest.php
@@ -15,7 +15,7 @@ class AggregatorItemTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['aggregator', 'migrate_drupal'];
+  protected static $modules = ['aggregator', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/aggregator/tests/src/Kernel/Views/AggregatorFeedViewsFieldAccessTest.php b/core/modules/aggregator/tests/src/Kernel/Views/AggregatorFeedViewsFieldAccessTest.php
index 686db1ed67fd1c2b9779c86305f0de18219d0189..26320d6022129c766ae1bdf663a88c365ad12f7f 100644
--- a/core/modules/aggregator/tests/src/Kernel/Views/AggregatorFeedViewsFieldAccessTest.php
+++ b/core/modules/aggregator/tests/src/Kernel/Views/AggregatorFeedViewsFieldAccessTest.php
@@ -15,7 +15,7 @@ class AggregatorFeedViewsFieldAccessTest extends FieldFieldAccessTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['aggregator', 'entity_test', 'options'];
+  protected static $modules = ['aggregator', 'entity_test', 'options'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/aggregator/tests/src/Kernel/Views/AggregatorItemViewsFieldAccessTest.php b/core/modules/aggregator/tests/src/Kernel/Views/AggregatorItemViewsFieldAccessTest.php
index c68ec5148f7b9b488a7982d11272b58268d675a7..19843d5e973a0938e84a3a2eac37d9c5b26ebd59 100644
--- a/core/modules/aggregator/tests/src/Kernel/Views/AggregatorItemViewsFieldAccessTest.php
+++ b/core/modules/aggregator/tests/src/Kernel/Views/AggregatorItemViewsFieldAccessTest.php
@@ -16,7 +16,7 @@ class AggregatorItemViewsFieldAccessTest extends FieldFieldAccessTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['aggregator', 'entity_test', 'options'];
+  protected static $modules = ['aggregator', 'entity_test', 'options'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/aggregator/tests/src/Kernel/Views/IntegrationTest.php b/core/modules/aggregator/tests/src/Kernel/Views/IntegrationTest.php
index 4f9d59fec710468fb81368dfad15619b4420c0a2..4b7739eb4de34bc558492a7d4ed660860a0a0bef 100644
--- a/core/modules/aggregator/tests/src/Kernel/Views/IntegrationTest.php
+++ b/core/modules/aggregator/tests/src/Kernel/Views/IntegrationTest.php
@@ -22,7 +22,7 @@ class IntegrationTest extends ViewsKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['aggregator', 'aggregator_test_views', 'system', 'field', 'options', 'user'];
+  protected static $modules = ['aggregator', 'aggregator_test_views', 'system', 'field', 'options', 'user'];
 
   /**
    * Views used by this test.
diff --git a/core/modules/ban/tests/src/Functional/IpAddressBlockingTest.php b/core/modules/ban/tests/src/Functional/IpAddressBlockingTest.php
index 344678c30e9bef761945392b740e2d26174234b3..6963759c3f3af60ab763973977146ee852c29bac 100644
--- a/core/modules/ban/tests/src/Functional/IpAddressBlockingTest.php
+++ b/core/modules/ban/tests/src/Functional/IpAddressBlockingTest.php
@@ -18,7 +18,7 @@ class IpAddressBlockingTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['ban'];
+  protected static $modules = ['ban'];
 
   /**
    * {@inheritdoc}
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 58c8603c51e3d68e5b07008fca84bac76133a738..f814e1962793d0f3ef0ff22098ec5fdec644502f 100644
--- a/core/modules/ban/tests/src/Kernel/Migrate/d7/MigrateBlockedIpsTest.php
+++ b/core/modules/ban/tests/src/Kernel/Migrate/d7/MigrateBlockedIpsTest.php
@@ -19,7 +19,7 @@ class MigrateBlockedIpsTest extends MigrateDrupal7TestBase {
    *
    * @var array
    */
-  public static $modules = ['ban'];
+  protected static $modules = ['ban'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/ban/tests/src/Kernel/Plugin/migrate/source/d7/BlockedIpsTest.php b/core/modules/ban/tests/src/Kernel/Plugin/migrate/source/d7/BlockedIpsTest.php
index 2ce7820a7dbe85abc56c0ca525839fcbf8449330..80adf4ec548dba64fe4c3ce94c24ba07afb7a0ee 100644
--- a/core/modules/ban/tests/src/Kernel/Plugin/migrate/source/d7/BlockedIpsTest.php
+++ b/core/modules/ban/tests/src/Kernel/Plugin/migrate/source/d7/BlockedIpsTest.php
@@ -15,7 +15,7 @@ class BlockedIpsTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['ban', 'migrate_drupal'];
+  protected static $modules = ['ban', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/basic_auth/tests/src/Functional/BasicAuthTest.php b/core/modules/basic_auth/tests/src/Functional/BasicAuthTest.php
index 16446ad33222964f85092d094f04225227bb52ea..e4afa690dc9bac40e52d0be3033bcecb1063ecab 100644
--- a/core/modules/basic_auth/tests/src/Functional/BasicAuthTest.php
+++ b/core/modules/basic_auth/tests/src/Functional/BasicAuthTest.php
@@ -23,7 +23,7 @@ class BasicAuthTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['basic_auth', 'router_test', 'locale', 'basic_auth_test'];
+  protected static $modules = ['basic_auth', 'router_test', 'locale', 'basic_auth_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/big_pipe/tests/src/Functional/BigPipeTest.php b/core/modules/big_pipe/tests/src/Functional/BigPipeTest.php
index 7a276b4247d96fe0c0649cd53ad913fc1017d22a..f9282eb08e6b77b211d370686df2e176c70a2025 100644
--- a/core/modules/big_pipe/tests/src/Functional/BigPipeTest.php
+++ b/core/modules/big_pipe/tests/src/Functional/BigPipeTest.php
@@ -31,7 +31,7 @@ class BigPipeTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['big_pipe', 'big_pipe_test', 'dblog'];
+  protected static $modules = ['big_pipe', 'big_pipe_test', 'dblog'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/big_pipe/tests/src/FunctionalJavascript/BigPipeRegressionTest.php b/core/modules/big_pipe/tests/src/FunctionalJavascript/BigPipeRegressionTest.php
index 211b0842399726748fa8fe4199492a94861207f6..8534051a8eb7eca80c6a872ef38f0fa9dbbf3df2 100644
--- a/core/modules/big_pipe/tests/src/FunctionalJavascript/BigPipeRegressionTest.php
+++ b/core/modules/big_pipe/tests/src/FunctionalJavascript/BigPipeRegressionTest.php
@@ -29,7 +29,7 @@ class BigPipeRegressionTest extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'big_pipe',
     'big_pipe_regression_test',
   ];
diff --git a/core/modules/block/tests/src/Functional/BlockAdminThemeTest.php b/core/modules/block/tests/src/Functional/BlockAdminThemeTest.php
index 52dbc4d4c5bd9441a9117c93dfdb2d596f86a23b..fe248420cb21c3d94b218254cd9811613f58ce2a 100644
--- a/core/modules/block/tests/src/Functional/BlockAdminThemeTest.php
+++ b/core/modules/block/tests/src/Functional/BlockAdminThemeTest.php
@@ -16,7 +16,7 @@ class BlockAdminThemeTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['block', 'contextual'];
+  protected static $modules = ['block', 'contextual'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/block/tests/src/Functional/BlockCacheTest.php b/core/modules/block/tests/src/Functional/BlockCacheTest.php
index c004e23a1c06738cffa044cb0438033e239cddbb..cca0be87c775bd89969f0b56b6dc0aa375e33c97 100644
--- a/core/modules/block/tests/src/Functional/BlockCacheTest.php
+++ b/core/modules/block/tests/src/Functional/BlockCacheTest.php
@@ -17,7 +17,7 @@ class BlockCacheTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['block', 'block_test', 'test_page_test'];
+  protected static $modules = ['block', 'block_test', 'test_page_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/block/tests/src/Functional/BlockDemoTest.php b/core/modules/block/tests/src/Functional/BlockDemoTest.php
index 313fc93c47e162dc7f5d3c9068c19e7e933770a3..818280aa5b9f3c67aad247b5d2119f0af475bcfe 100644
--- a/core/modules/block/tests/src/Functional/BlockDemoTest.php
+++ b/core/modules/block/tests/src/Functional/BlockDemoTest.php
@@ -16,7 +16,7 @@ class BlockDemoTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['block'];
+  protected static $modules = ['block'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/block/tests/src/Functional/BlockFormInBlockTest.php b/core/modules/block/tests/src/Functional/BlockFormInBlockTest.php
index 6b54b8a484043d8b794fad892fb69ee899220620..a536500fa7722dbc439a3eec827a22292866eed7 100644
--- a/core/modules/block/tests/src/Functional/BlockFormInBlockTest.php
+++ b/core/modules/block/tests/src/Functional/BlockFormInBlockTest.php
@@ -17,7 +17,7 @@ class BlockFormInBlockTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['block', 'block_test', 'test_page_test'];
+  protected static $modules = ['block', 'block_test', 'test_page_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/block/tests/src/Functional/BlockHiddenRegionTest.php b/core/modules/block/tests/src/Functional/BlockHiddenRegionTest.php
index de0f2d6a76cd03e4519a37251b9dd290373a39a6..0e3f3ff0831c44732802951aadf69ce3d6d24f5e 100644
--- a/core/modules/block/tests/src/Functional/BlockHiddenRegionTest.php
+++ b/core/modules/block/tests/src/Functional/BlockHiddenRegionTest.php
@@ -22,7 +22,7 @@ class BlockHiddenRegionTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['block', 'block_test', 'search'];
+  protected static $modules = ['block', 'block_test', 'search'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/block/tests/src/Functional/BlockHookOperationTest.php b/core/modules/block/tests/src/Functional/BlockHookOperationTest.php
index 9f5c62728d71a1b60047234a84cd4849f23ece72..0770191e840b975a7bddcf38e65e2b3c32bce91a 100644
--- a/core/modules/block/tests/src/Functional/BlockHookOperationTest.php
+++ b/core/modules/block/tests/src/Functional/BlockHookOperationTest.php
@@ -16,7 +16,7 @@ class BlockHookOperationTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['block', 'entity_test'];
+  protected static $modules = ['block', 'entity_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/block/tests/src/Functional/BlockHtmlTest.php b/core/modules/block/tests/src/Functional/BlockHtmlTest.php
index d6d63459068fd2c4cf9586f8e74492a8f64ce7e4..8944c7a3cbf218cf173edaa9fe7f2e35c4cc2534 100644
--- a/core/modules/block/tests/src/Functional/BlockHtmlTest.php
+++ b/core/modules/block/tests/src/Functional/BlockHtmlTest.php
@@ -16,7 +16,7 @@ class BlockHtmlTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['block', 'block_test'];
+  protected static $modules = ['block', 'block_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/block/tests/src/Functional/BlockInvalidRegionTest.php b/core/modules/block/tests/src/Functional/BlockInvalidRegionTest.php
index e71db7095eb2f45eb76db683131493717e130d68..0389375b8c4d686f7691de1c77efca3e263cf887 100644
--- a/core/modules/block/tests/src/Functional/BlockInvalidRegionTest.php
+++ b/core/modules/block/tests/src/Functional/BlockInvalidRegionTest.php
@@ -18,7 +18,7 @@ class BlockInvalidRegionTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['block', 'block_test'];
+  protected static $modules = ['block', 'block_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/block/tests/src/Functional/BlockLanguageCacheTest.php b/core/modules/block/tests/src/Functional/BlockLanguageCacheTest.php
index 787293fb1046b592295de786fbb6987cd7d808df..5a6aeef95bf7da0e1894bc612c251d8452c326d2 100644
--- a/core/modules/block/tests/src/Functional/BlockLanguageCacheTest.php
+++ b/core/modules/block/tests/src/Functional/BlockLanguageCacheTest.php
@@ -17,7 +17,7 @@ class BlockLanguageCacheTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['block', 'language', 'menu_ui'];
+  protected static $modules = ['block', 'language', 'menu_ui'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/block/tests/src/Functional/BlockLanguageTest.php b/core/modules/block/tests/src/Functional/BlockLanguageTest.php
index 1aa993e24ef258329e25f129f78a0fa721ef64dc..b3be64f3fd7d21ee4a3de5f624f73f9726c806c1 100644
--- a/core/modules/block/tests/src/Functional/BlockLanguageTest.php
+++ b/core/modules/block/tests/src/Functional/BlockLanguageTest.php
@@ -23,7 +23,7 @@ class BlockLanguageTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['language', 'block', 'content_translation'];
+  protected static $modules = ['language', 'block', 'content_translation'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/block/tests/src/Functional/BlockRenderOrderTest.php b/core/modules/block/tests/src/Functional/BlockRenderOrderTest.php
index 53df55fcb8d856d99bc0d1b9ef91ec8c4c88be36..fd64b65bd827420db5c689bd0af8dbaf641fd3e0 100644
--- a/core/modules/block/tests/src/Functional/BlockRenderOrderTest.php
+++ b/core/modules/block/tests/src/Functional/BlockRenderOrderTest.php
@@ -17,7 +17,7 @@ class BlockRenderOrderTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'block'];
+  protected static $modules = ['node', 'block'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/block/tests/src/Functional/BlockSystemBrandingTest.php b/core/modules/block/tests/src/Functional/BlockSystemBrandingTest.php
index ad7a53f5b3b925b4adbcbefe0ca8ee81ff90e972..b652ec8060cc1319350e69ea4444ad4262c08d43 100644
--- a/core/modules/block/tests/src/Functional/BlockSystemBrandingTest.php
+++ b/core/modules/block/tests/src/Functional/BlockSystemBrandingTest.php
@@ -14,7 +14,7 @@ class BlockSystemBrandingTest extends BlockTestBase {
    *
    * @var array
    */
-  public static $modules = ['block', 'system'];
+  protected static $modules = ['block', 'system'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/block/tests/src/Functional/BlockTestBase.php b/core/modules/block/tests/src/Functional/BlockTestBase.php
index e1ccd1a3658ca580d782eb4f1952fab15e50be60..725c04d6fca31c26221ca7332418955cba5edd7f 100644
--- a/core/modules/block/tests/src/Functional/BlockTestBase.php
+++ b/core/modules/block/tests/src/Functional/BlockTestBase.php
@@ -15,7 +15,7 @@ abstract class BlockTestBase extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['block', 'filter', 'test_page_test', 'help', 'block_test'];
+  protected static $modules = ['block', 'filter', 'test_page_test', 'help', 'block_test'];
 
   /**
    * A list of theme regions to test.
diff --git a/core/modules/block/tests/src/Functional/BlockUiTest.php b/core/modules/block/tests/src/Functional/BlockUiTest.php
index 3b8730b11324f041aac53cba8507cfabb12c6985..484062ed6d88987417fb977b8cc4f40dde769f61 100644
--- a/core/modules/block/tests/src/Functional/BlockUiTest.php
+++ b/core/modules/block/tests/src/Functional/BlockUiTest.php
@@ -19,7 +19,7 @@ class BlockUiTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['block', 'block_test', 'help', 'condition_test'];
+  protected static $modules = ['block', 'block_test', 'help', 'condition_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/block/tests/src/Functional/BlockXssTest.php b/core/modules/block/tests/src/Functional/BlockXssTest.php
index 72d38e1ee3c9512021e2b47e773a24d07d4740cf..77db1b404c9e20b53929e77a437c469ed5f66242 100644
--- a/core/modules/block/tests/src/Functional/BlockXssTest.php
+++ b/core/modules/block/tests/src/Functional/BlockXssTest.php
@@ -21,7 +21,7 @@ class BlockXssTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['block', 'block_content', 'menu_ui', 'views'];
+  protected static $modules = ['block', 'block_content', 'menu_ui', 'views'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/block/tests/src/Functional/Hal/BlockHalJsonAnonTest.php b/core/modules/block/tests/src/Functional/Hal/BlockHalJsonAnonTest.php
index 8e43483cd4639200be01d42b212d8674eb9abcad..8de609d11e6843a687872e1b7adae0ea5388c135 100644
--- a/core/modules/block/tests/src/Functional/Hal/BlockHalJsonAnonTest.php
+++ b/core/modules/block/tests/src/Functional/Hal/BlockHalJsonAnonTest.php
@@ -15,7 +15,7 @@ class BlockHalJsonAnonTest extends BlockResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/block/tests/src/Functional/Hal/BlockHalJsonBasicAuthTest.php b/core/modules/block/tests/src/Functional/Hal/BlockHalJsonBasicAuthTest.php
index 2fb4416e84320a46d630599dd71130c94580220e..7cea1b6f8452d3168593735e244e672117033c72 100644
--- a/core/modules/block/tests/src/Functional/Hal/BlockHalJsonBasicAuthTest.php
+++ b/core/modules/block/tests/src/Functional/Hal/BlockHalJsonBasicAuthTest.php
@@ -15,7 +15,7 @@ class BlockHalJsonBasicAuthTest extends BlockResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal', 'basic_auth'];
+  protected static $modules = ['hal', 'basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/block/tests/src/Functional/Hal/BlockHalJsonCookieTest.php b/core/modules/block/tests/src/Functional/Hal/BlockHalJsonCookieTest.php
index 2b907217cfcb24575dfc4821bf57fd0a44bf2996..5d7725671f45e95a4805deee13c0f24799691aef 100644
--- a/core/modules/block/tests/src/Functional/Hal/BlockHalJsonCookieTest.php
+++ b/core/modules/block/tests/src/Functional/Hal/BlockHalJsonCookieTest.php
@@ -15,7 +15,7 @@ class BlockHalJsonCookieTest extends BlockResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/block/tests/src/Functional/NonDefaultBlockAdminTest.php b/core/modules/block/tests/src/Functional/NonDefaultBlockAdminTest.php
index b89bb9e574250b476bfa172797c8a26bc3f46f64..fefe432161433260f62058e3d77ac5f92ec74a5a 100644
--- a/core/modules/block/tests/src/Functional/NonDefaultBlockAdminTest.php
+++ b/core/modules/block/tests/src/Functional/NonDefaultBlockAdminTest.php
@@ -16,7 +16,7 @@ class NonDefaultBlockAdminTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['block'];
+  protected static $modules = ['block'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/block/tests/src/Functional/Rest/BlockJsonBasicAuthTest.php b/core/modules/block/tests/src/Functional/Rest/BlockJsonBasicAuthTest.php
index c0deb450a5eaf0bba3f175a2912a8255d8808997..6f5008751f9b93cd9aac0be4b4dbb15889b5d65f 100644
--- a/core/modules/block/tests/src/Functional/Rest/BlockJsonBasicAuthTest.php
+++ b/core/modules/block/tests/src/Functional/Rest/BlockJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class BlockJsonBasicAuthTest extends BlockResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/block/tests/src/Functional/Rest/BlockResourceTestBase.php b/core/modules/block/tests/src/Functional/Rest/BlockResourceTestBase.php
index 61727010bf80e260acf600e71c973c3ed5c0f8d5..916e2d950b9e58472f266ae9a7f76620499effb8 100644
--- a/core/modules/block/tests/src/Functional/Rest/BlockResourceTestBase.php
+++ b/core/modules/block/tests/src/Functional/Rest/BlockResourceTestBase.php
@@ -11,7 +11,7 @@ abstract class BlockResourceTestBase extends EntityResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['block'];
+  protected static $modules = ['block'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/block/tests/src/Functional/Rest/BlockXmlBasicAuthTest.php b/core/modules/block/tests/src/Functional/Rest/BlockXmlBasicAuthTest.php
index 0caf4c8b7544df4a482bb051589db05d572e7e4c..34794f020b74785c0a4b492f2a8f91ba6710eea7 100644
--- a/core/modules/block/tests/src/Functional/Rest/BlockXmlBasicAuthTest.php
+++ b/core/modules/block/tests/src/Functional/Rest/BlockXmlBasicAuthTest.php
@@ -16,7 +16,7 @@ class BlockXmlBasicAuthTest extends BlockResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/block/tests/src/Functional/Views/DisplayBlockTest.php b/core/modules/block/tests/src/Functional/Views/DisplayBlockTest.php
index e9ff84169d00779a90bc4db25dc71b7d3662bf2f..a02967099426beae254168f57521862e8c84bda8 100644
--- a/core/modules/block/tests/src/Functional/Views/DisplayBlockTest.php
+++ b/core/modules/block/tests/src/Functional/Views/DisplayBlockTest.php
@@ -31,7 +31,7 @@ class DisplayBlockTest extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'block_test_views', 'test_page_test', 'contextual', 'views_ui'];
+  protected static $modules = ['node', 'block_test_views', 'test_page_test', 'contextual', 'views_ui'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/block/tests/src/FunctionalJavascript/BlockFilterTest.php b/core/modules/block/tests/src/FunctionalJavascript/BlockFilterTest.php
index a3ff008416dbb8748c2d5f9b8b1368d97102f8b7..fa9a78160f68478dd1c09cecbd7ed1849d34322a 100644
--- a/core/modules/block/tests/src/FunctionalJavascript/BlockFilterTest.php
+++ b/core/modules/block/tests/src/FunctionalJavascript/BlockFilterTest.php
@@ -15,7 +15,7 @@ class BlockFilterTest extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['user', 'block'];
+  protected static $modules = ['user', 'block'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/block/tests/src/Kernel/BlockConfigSchemaTest.php b/core/modules/block/tests/src/Kernel/BlockConfigSchemaTest.php
index eb19f47d2155f2c56dce3a25290ea96f3905e447..a6a736f5d95755b839f9cd69ae71d915c6ef1f11 100644
--- a/core/modules/block/tests/src/Kernel/BlockConfigSchemaTest.php
+++ b/core/modules/block/tests/src/Kernel/BlockConfigSchemaTest.php
@@ -18,7 +18,7 @@ class BlockConfigSchemaTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'block',
     'aggregator',
     'book',
diff --git a/core/modules/block/tests/src/Kernel/BlockInterfaceTest.php b/core/modules/block/tests/src/Kernel/BlockInterfaceTest.php
index 48d63a302d2e54c36d2eb6e98dc3711bc14284e8..6e1a4d25451000bab8e7ca92f7886e6fc160ced4 100644
--- a/core/modules/block/tests/src/Kernel/BlockInterfaceTest.php
+++ b/core/modules/block/tests/src/Kernel/BlockInterfaceTest.php
@@ -13,7 +13,7 @@
  */
 class BlockInterfaceTest extends KernelTestBase {
 
-  public static $modules = ['system', 'block', 'block_test', 'user'];
+  protected static $modules = ['system', 'block', 'block_test', 'user'];
 
   /**
    * Test configuration and subsequent form() and build() method calls.
diff --git a/core/modules/block/tests/src/Kernel/BlockRebuildTest.php b/core/modules/block/tests/src/Kernel/BlockRebuildTest.php
index 431cdcbaa6c6e2d0ed7c21b09022fdb4a192614c..0772065fe84c4519100075c3646df1f4639e61fd 100644
--- a/core/modules/block/tests/src/Kernel/BlockRebuildTest.php
+++ b/core/modules/block/tests/src/Kernel/BlockRebuildTest.php
@@ -19,7 +19,7 @@ class BlockRebuildTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['block', 'system'];
+  protected static $modules = ['block', 'system'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/block/tests/src/Kernel/BlockStorageUnitTest.php b/core/modules/block/tests/src/Kernel/BlockStorageUnitTest.php
index ff27b9f6406e4be6b01c864bf8bc28e4577a1e24..4c69f0deb5dcd84c6edbda54a366879bf4bf48fa 100644
--- a/core/modules/block/tests/src/Kernel/BlockStorageUnitTest.php
+++ b/core/modules/block/tests/src/Kernel/BlockStorageUnitTest.php
@@ -21,7 +21,7 @@ class BlockStorageUnitTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['block', 'block_test', 'system'];
+  protected static $modules = ['block', 'block_test', 'system'];
 
   /**
    * The block storage.
diff --git a/core/modules/block/tests/src/Kernel/BlockViewBuilderTest.php b/core/modules/block/tests/src/Kernel/BlockViewBuilderTest.php
index 44e5646b828c84b9bd6d40fe56110f812026c787..056888677a4174659df93d6f10bd8e6447608bdc 100644
--- a/core/modules/block/tests/src/Kernel/BlockViewBuilderTest.php
+++ b/core/modules/block/tests/src/Kernel/BlockViewBuilderTest.php
@@ -20,7 +20,7 @@ class BlockViewBuilderTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['block', 'block_test', 'system', 'user'];
+  protected static $modules = ['block', 'block_test', 'system', 'user'];
 
   /**
    * The block being tested.
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 1f9780602eb7e70317161f0e0e8fdff6420214ab..1801de87802c01f455606a4a8e9037e5d091305c 100644
--- a/core/modules/block/tests/src/Kernel/Migrate/d6/MigrateBlockContentTranslationTest.php
+++ b/core/modules/block/tests/src/Kernel/Migrate/d6/MigrateBlockContentTranslationTest.php
@@ -14,7 +14,7 @@ class MigrateBlockContentTranslationTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'aggregator',
     'book',
     'block',
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 cf0c464c519d6cd6c6ae20bd0a0e186c810e9dd7..d139b35f91c23ec07077898ee3e8f7132aef49f8 100644
--- a/core/modules/block/tests/src/Kernel/Migrate/d6/MigrateBlockTest.php
+++ b/core/modules/block/tests/src/Kernel/Migrate/d6/MigrateBlockTest.php
@@ -15,7 +15,7 @@ class MigrateBlockTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'block',
     'views',
     'comment',
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 8b5a4a0e765250e7c093b82f6f78047fa602147d..9789b19913b5f725de23f0a465f7cc1be714159c 100644
--- a/core/modules/block/tests/src/Kernel/Migrate/d7/MigrateBlockContentTranslationTest.php
+++ b/core/modules/block/tests/src/Kernel/Migrate/d7/MigrateBlockContentTranslationTest.php
@@ -14,7 +14,7 @@ class MigrateBlockContentTranslationTest extends MigrateDrupal7TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'node',
     'text',
     'aggregator',
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 c7cb825bd6dc0be23af435c1cd15e1cd4d8bed8f..150f340f2a739395793d66b07458d62b067ae282 100644
--- a/core/modules/block/tests/src/Kernel/Migrate/d7/MigrateBlockTest.php
+++ b/core/modules/block/tests/src/Kernel/Migrate/d7/MigrateBlockTest.php
@@ -16,7 +16,7 @@ class MigrateBlockTest extends MigrateDrupal7TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'block',
     'views',
     'comment',
diff --git a/core/modules/block/tests/src/Kernel/Plugin/migrate/source/BlockTest.php b/core/modules/block/tests/src/Kernel/Plugin/migrate/source/BlockTest.php
index 66c2679bb052e9f684bf8213ff56959237282b84..b0f507e126ec49db624cab04847958366f41e80f 100644
--- a/core/modules/block/tests/src/Kernel/Plugin/migrate/source/BlockTest.php
+++ b/core/modules/block/tests/src/Kernel/Plugin/migrate/source/BlockTest.php
@@ -15,7 +15,7 @@ class BlockTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['block', 'migrate_drupal'];
+  protected static $modules = ['block', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/block/tests/src/Kernel/Plugin/migrate/source/d6/BlockTranslationTest.php b/core/modules/block/tests/src/Kernel/Plugin/migrate/source/d6/BlockTranslationTest.php
index 445f32cec50e79d840988b46039bf5eead3c41f0..18dd8041350b7cd9eb464cd7edf21e29ebe52fab 100644
--- a/core/modules/block/tests/src/Kernel/Plugin/migrate/source/d6/BlockTranslationTest.php
+++ b/core/modules/block/tests/src/Kernel/Plugin/migrate/source/d6/BlockTranslationTest.php
@@ -16,7 +16,7 @@ class BlockTranslationTest extends BlockTest {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['block'];
+  protected static $modules = ['block'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/block/tests/src/Kernel/Plugin/migrate/source/d7/BlockTranslationTest.php b/core/modules/block/tests/src/Kernel/Plugin/migrate/source/d7/BlockTranslationTest.php
index 3559f74d8d72585f339caa76695e4ee69d8c4593..fad8f7d4e5458a3c819d4c91fc7041fdcf6c2ab0 100644
--- a/core/modules/block/tests/src/Kernel/Plugin/migrate/source/d7/BlockTranslationTest.php
+++ b/core/modules/block/tests/src/Kernel/Plugin/migrate/source/d7/BlockTranslationTest.php
@@ -16,7 +16,7 @@ class BlockTranslationTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['block', 'migrate_drupal'];
+  protected static $modules = ['block', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/block_content/tests/src/Functional/BlockContentCacheTagsTest.php b/core/modules/block_content/tests/src/Functional/BlockContentCacheTagsTest.php
index c6778cab987b7dd5b44a7b28301ab69d10c64885..4e217c9513510da7b055bb38f037378895f378b7 100644
--- a/core/modules/block_content/tests/src/Functional/BlockContentCacheTagsTest.php
+++ b/core/modules/block_content/tests/src/Functional/BlockContentCacheTagsTest.php
@@ -20,7 +20,7 @@ class BlockContentCacheTagsTest extends EntityCacheTagsTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['block_content'];
+  protected static $modules = ['block_content'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/block_content/tests/src/Functional/BlockContentContextualLinksTest.php b/core/modules/block_content/tests/src/Functional/BlockContentContextualLinksTest.php
index e81078e9ccfbf4cb195b534f77aba47455639389..16e147d99cb5a9ad4b171b803de7bb3f588800aa 100644
--- a/core/modules/block_content/tests/src/Functional/BlockContentContextualLinksTest.php
+++ b/core/modules/block_content/tests/src/Functional/BlockContentContextualLinksTest.php
@@ -12,7 +12,7 @@ class BlockContentContextualLinksTest extends BlockContentTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'contextual',
   ];
 
diff --git a/core/modules/block_content/tests/src/Functional/BlockContentCreationTest.php b/core/modules/block_content/tests/src/Functional/BlockContentCreationTest.php
index 8ba11c8a800be936ce721ceb27eb8a68b9234378..d12c3833a738aecd9acad75b27bb3e566af20824 100644
--- a/core/modules/block_content/tests/src/Functional/BlockContentCreationTest.php
+++ b/core/modules/block_content/tests/src/Functional/BlockContentCreationTest.php
@@ -21,7 +21,7 @@ class BlockContentCreationTest extends BlockContentTestBase {
    *
    * @var array
    */
-  public static $modules = ['block_content_test', 'dblog', 'field_ui'];
+  protected static $modules = ['block_content_test', 'dblog', 'field_ui'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/block_content/tests/src/Functional/BlockContentListTest.php b/core/modules/block_content/tests/src/Functional/BlockContentListTest.php
index 61edfdaefd747e7406af6e3ca8101947f70bf159..a865e7e83130375e7192b7537370901f4fe96ee1 100644
--- a/core/modules/block_content/tests/src/Functional/BlockContentListTest.php
+++ b/core/modules/block_content/tests/src/Functional/BlockContentListTest.php
@@ -20,7 +20,7 @@ class BlockContentListTest extends BlockContentTestBase {
    *
    * @var array
    */
-  public static $modules = ['block', 'block_content', 'config_translation'];
+  protected static $modules = ['block', 'block_content', 'config_translation'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/block_content/tests/src/Functional/BlockContentListViewsTest.php b/core/modules/block_content/tests/src/Functional/BlockContentListViewsTest.php
index 61f298471859f53f5fccf47b3465b05f7f6da822..5088d08463966e63f5b3564a0defdafdca1964f8 100644
--- a/core/modules/block_content/tests/src/Functional/BlockContentListViewsTest.php
+++ b/core/modules/block_content/tests/src/Functional/BlockContentListViewsTest.php
@@ -18,7 +18,7 @@ class BlockContentListViewsTest extends BlockContentTestBase {
    *
    * @var array
    */
-  public static $modules = ['block', 'block_content', 'config_translation', 'views'];
+  protected static $modules = ['block', 'block_content', 'config_translation', 'views'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/block_content/tests/src/Functional/BlockContentPageViewTest.php b/core/modules/block_content/tests/src/Functional/BlockContentPageViewTest.php
index c9bc68b0f3c18abd5f0da9ed39f21ebc8449ef3a..79771cc82a427ebbedc6e759291fd512e425388c 100644
--- a/core/modules/block_content/tests/src/Functional/BlockContentPageViewTest.php
+++ b/core/modules/block_content/tests/src/Functional/BlockContentPageViewTest.php
@@ -14,7 +14,7 @@ class BlockContentPageViewTest extends BlockContentTestBase {
    *
    * @var array
    */
-  public static $modules = ['block_content_test'];
+  protected static $modules = ['block_content_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/block_content/tests/src/Functional/BlockContentSaveTest.php b/core/modules/block_content/tests/src/Functional/BlockContentSaveTest.php
index 424eb9ad7c53d73177f9761c22bb2d7908bd3f6b..bda95fea25625e5a1e67e685ebfa55295e994358 100644
--- a/core/modules/block_content/tests/src/Functional/BlockContentSaveTest.php
+++ b/core/modules/block_content/tests/src/Functional/BlockContentSaveTest.php
@@ -17,7 +17,7 @@ class BlockContentSaveTest extends BlockContentTestBase {
    *
    * @var array
    */
-  public static $modules = ['block_content_test'];
+  protected static $modules = ['block_content_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/block_content/tests/src/Functional/BlockContentTestBase.php b/core/modules/block_content/tests/src/Functional/BlockContentTestBase.php
index c8c32fdacfb03018858b7fb9bcb90d007cffeaf9..50bf4fc8f16e6a9d786da0ac83ac56b37cd35d31 100644
--- a/core/modules/block_content/tests/src/Functional/BlockContentTestBase.php
+++ b/core/modules/block_content/tests/src/Functional/BlockContentTestBase.php
@@ -39,7 +39,7 @@ abstract class BlockContentTestBase extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['block', 'block_content'];
+  protected static $modules = ['block', 'block_content'];
 
   /**
    * Whether or not to auto-create the basic block type during setup.
diff --git a/core/modules/block_content/tests/src/Functional/BlockContentTranslationUITest.php b/core/modules/block_content/tests/src/Functional/BlockContentTranslationUITest.php
index 5a2abc0251bcf19e67601ff382103fc50df666de..73f3a9a06b4660326fe275e91d70b8c69307b11d 100644
--- a/core/modules/block_content/tests/src/Functional/BlockContentTranslationUITest.php
+++ b/core/modules/block_content/tests/src/Functional/BlockContentTranslationUITest.php
@@ -19,7 +19,7 @@ class BlockContentTranslationUITest extends ContentTranslationUITestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'language',
     'content_translation',
     'block',
diff --git a/core/modules/block_content/tests/src/Functional/BlockContentTypeTest.php b/core/modules/block_content/tests/src/Functional/BlockContentTypeTest.php
index c0de6452f66a13dab37011efc5f9d429967b8317..50028e12bd12665a258c7c4ac939da6e05dab6af 100644
--- a/core/modules/block_content/tests/src/Functional/BlockContentTypeTest.php
+++ b/core/modules/block_content/tests/src/Functional/BlockContentTypeTest.php
@@ -21,7 +21,7 @@ class BlockContentTypeTest extends BlockContentTestBase {
    *
    * @var array
    */
-  public static $modules = ['field_ui'];
+  protected static $modules = ['field_ui'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/block_content/tests/src/Functional/Hal/BlockContentHalJsonAnonTest.php b/core/modules/block_content/tests/src/Functional/Hal/BlockContentHalJsonAnonTest.php
index 6f7a1b6147c9f81d078f92bfaea879a42f392b11..9e8d0ff2affc5aa6e2f94903e7843e879bd6e556 100644
--- a/core/modules/block_content/tests/src/Functional/Hal/BlockContentHalJsonAnonTest.php
+++ b/core/modules/block_content/tests/src/Functional/Hal/BlockContentHalJsonAnonTest.php
@@ -18,7 +18,7 @@ class BlockContentHalJsonAnonTest extends BlockContentResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/block_content/tests/src/Functional/Hal/BlockContentHalJsonBasicAuthTest.php b/core/modules/block_content/tests/src/Functional/Hal/BlockContentHalJsonBasicAuthTest.php
index 074eadd81fc9074906a994c744345cffb75d905a..d8716a185b58713546e0b40cc1c006e6cdcb3688 100644
--- a/core/modules/block_content/tests/src/Functional/Hal/BlockContentHalJsonBasicAuthTest.php
+++ b/core/modules/block_content/tests/src/Functional/Hal/BlockContentHalJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class BlockContentHalJsonBasicAuthTest extends BlockContentHalJsonAnonTest {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/block_content/tests/src/Functional/Hal/BlockContentTypeHalJsonAnonTest.php b/core/modules/block_content/tests/src/Functional/Hal/BlockContentTypeHalJsonAnonTest.php
index 1a7d4e7056d60d85665dfdcb0dd0377e68cf2f8a..2213bda7f4ee756407b4daabfc38e49ac3bbbc98 100644
--- a/core/modules/block_content/tests/src/Functional/Hal/BlockContentTypeHalJsonAnonTest.php
+++ b/core/modules/block_content/tests/src/Functional/Hal/BlockContentTypeHalJsonAnonTest.php
@@ -15,7 +15,7 @@ class BlockContentTypeHalJsonAnonTest extends BlockContentTypeResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/block_content/tests/src/Functional/Hal/BlockContentTypeHalJsonBasicAuthTest.php b/core/modules/block_content/tests/src/Functional/Hal/BlockContentTypeHalJsonBasicAuthTest.php
index 41eeb87328ed19d4405940ebca411d6bc1af4056..e823dcf23f9f6ca7a8fce9ffc9da5f6792bc26c1 100644
--- a/core/modules/block_content/tests/src/Functional/Hal/BlockContentTypeHalJsonBasicAuthTest.php
+++ b/core/modules/block_content/tests/src/Functional/Hal/BlockContentTypeHalJsonBasicAuthTest.php
@@ -15,7 +15,7 @@ class BlockContentTypeHalJsonBasicAuthTest extends BlockContentTypeResourceTestB
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal', 'basic_auth'];
+  protected static $modules = ['hal', 'basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/block_content/tests/src/Functional/Hal/BlockContentTypeHalJsonCookieTest.php b/core/modules/block_content/tests/src/Functional/Hal/BlockContentTypeHalJsonCookieTest.php
index 006d08bfbae9a2b6274ea99bfcfbba5c0f09f90d..86ed15cc96bbf59eb1ede716a3bb67846ca1d84f 100644
--- a/core/modules/block_content/tests/src/Functional/Hal/BlockContentTypeHalJsonCookieTest.php
+++ b/core/modules/block_content/tests/src/Functional/Hal/BlockContentTypeHalJsonCookieTest.php
@@ -15,7 +15,7 @@ class BlockContentTypeHalJsonCookieTest extends BlockContentTypeResourceTestBase
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/block_content/tests/src/Functional/Rest/BlockContentJsonBasicAuthTest.php b/core/modules/block_content/tests/src/Functional/Rest/BlockContentJsonBasicAuthTest.php
index f87ce906d76da62af8544f1b6e6d3648d30dd730..95ef367a1e680a5086d7193c579306949e155c4b 100644
--- a/core/modules/block_content/tests/src/Functional/Rest/BlockContentJsonBasicAuthTest.php
+++ b/core/modules/block_content/tests/src/Functional/Rest/BlockContentJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class BlockContentJsonBasicAuthTest extends BlockContentResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/block_content/tests/src/Functional/Rest/BlockContentResourceTestBase.php b/core/modules/block_content/tests/src/Functional/Rest/BlockContentResourceTestBase.php
index ea19be0ed2f6ebc8bfb8e62b2060e05a2f2f4e3a..fb7739f2557cfc09b2c9f3f57edd1a7545cf59d1 100644
--- a/core/modules/block_content/tests/src/Functional/Rest/BlockContentResourceTestBase.php
+++ b/core/modules/block_content/tests/src/Functional/Rest/BlockContentResourceTestBase.php
@@ -15,7 +15,7 @@ abstract class BlockContentResourceTestBase extends EntityResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['block_content'];
+  protected static $modules = ['block_content'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/block_content/tests/src/Functional/Rest/BlockContentTypeJsonBasicAuthTest.php b/core/modules/block_content/tests/src/Functional/Rest/BlockContentTypeJsonBasicAuthTest.php
index 709dcfd5d47bcaf2d99ade6b1beca775ac0bc2c3..68598eb9ea5845429cd7c56d63d5ad1222a67931 100644
--- a/core/modules/block_content/tests/src/Functional/Rest/BlockContentTypeJsonBasicAuthTest.php
+++ b/core/modules/block_content/tests/src/Functional/Rest/BlockContentTypeJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class BlockContentTypeJsonBasicAuthTest extends BlockContentTypeResourceTestBase
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/block_content/tests/src/Functional/Rest/BlockContentTypeResourceTestBase.php b/core/modules/block_content/tests/src/Functional/Rest/BlockContentTypeResourceTestBase.php
index 13d6ed2d00d7f36aa2517e31c8549632b208618c..46fe436be607f41bd779d4914bbd15203a9969b9 100644
--- a/core/modules/block_content/tests/src/Functional/Rest/BlockContentTypeResourceTestBase.php
+++ b/core/modules/block_content/tests/src/Functional/Rest/BlockContentTypeResourceTestBase.php
@@ -10,7 +10,7 @@ abstract class BlockContentTypeResourceTestBase extends EntityResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['block_content'];
+  protected static $modules = ['block_content'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/block_content/tests/src/Functional/Rest/BlockContentTypeXmlBasicAuthTest.php b/core/modules/block_content/tests/src/Functional/Rest/BlockContentTypeXmlBasicAuthTest.php
index 17b834700d6eeb919d2c5b9dfb721fe106e38456..d66ea07eb834dbf197123d0981804305164c15e5 100644
--- a/core/modules/block_content/tests/src/Functional/Rest/BlockContentTypeXmlBasicAuthTest.php
+++ b/core/modules/block_content/tests/src/Functional/Rest/BlockContentTypeXmlBasicAuthTest.php
@@ -16,7 +16,7 @@ class BlockContentTypeXmlBasicAuthTest extends BlockContentTypeResourceTestBase
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/block_content/tests/src/Functional/Rest/BlockContentXmlBasicAuthTest.php b/core/modules/block_content/tests/src/Functional/Rest/BlockContentXmlBasicAuthTest.php
index 9b593c9049fdeff3f6c6f89edc80a52fe4dece46..a25108d59fbcefa0f36686a0f4d405d14ce118b5 100644
--- a/core/modules/block_content/tests/src/Functional/Rest/BlockContentXmlBasicAuthTest.php
+++ b/core/modules/block_content/tests/src/Functional/Rest/BlockContentXmlBasicAuthTest.php
@@ -16,7 +16,7 @@ class BlockContentXmlBasicAuthTest extends BlockContentResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/block_content/tests/src/Functional/UnpublishedBlockTest.php b/core/modules/block_content/tests/src/Functional/UnpublishedBlockTest.php
index 62e41dd327315db0e148e0c66a03334116a202a0..59fbd9317af46c682c4656f70bbde7315b671bbb 100644
--- a/core/modules/block_content/tests/src/Functional/UnpublishedBlockTest.php
+++ b/core/modules/block_content/tests/src/Functional/UnpublishedBlockTest.php
@@ -18,7 +18,7 @@ class UnpublishedBlockTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['block_content'];
+  protected static $modules = ['block_content'];
 
   /**
    * {@inheritdoc}
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 75e7a65a550f6cc49f177a0dad7e954372bf5ba8..45401a8983b655fefe2daae58157d9098dde68ea 100644
--- a/core/modules/block_content/tests/src/Functional/Views/BlockContentFieldFilterTest.php
+++ b/core/modules/block_content/tests/src/Functional/Views/BlockContentFieldFilterTest.php
@@ -15,7 +15,7 @@ class BlockContentFieldFilterTest extends BlockContentTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['language'];
+  protected static $modules = ['language'];
 
   /**
    * {@inheritdoc}
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 81b206cccf317158a027eca5e33a17b704afb56f..853d2746146588e7b2eeebaa929585b49dfb8de6 100644
--- a/core/modules/block_content/tests/src/Functional/Views/BlockContentRedirectTest.php
+++ b/core/modules/block_content/tests/src/Functional/Views/BlockContentRedirectTest.php
@@ -21,7 +21,7 @@ class BlockContentRedirectTest extends BlockContentTestBase {
    *
    * @var array
    */
-  public static $modules = ['block', 'block_content', 'views'];
+  protected static $modules = ['block', 'block_content', 'views'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/block_content/tests/src/Functional/Views/BlockContentTestBase.php b/core/modules/block_content/tests/src/Functional/Views/BlockContentTestBase.php
index 254fc408f87ae303268f4e6da4cfe49c2058f5a2..6dc07ab8f1ff045b6085dd792011846bdb95a32f 100644
--- a/core/modules/block_content/tests/src/Functional/Views/BlockContentTestBase.php
+++ b/core/modules/block_content/tests/src/Functional/Views/BlockContentTestBase.php
@@ -34,7 +34,7 @@ abstract class BlockContentTestBase extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = ['block', 'block_content', 'block_content_test_views'];
+  protected static $modules = ['block', 'block_content', 'block_content_test_views'];
 
   protected function setUp($import_test_views = TRUE) {
     parent::setUp($import_test_views);
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 b25e5c4113015c7e6e975334334c3e9b13e4ffa0..7e8f03727ed65151056029ad0b4cf560b8c25313 100644
--- a/core/modules/block_content/tests/src/Functional/Views/BlockContentWizardTest.php
+++ b/core/modules/block_content/tests/src/Functional/Views/BlockContentWizardTest.php
@@ -14,7 +14,7 @@ class BlockContentWizardTest extends BlockContentTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['block_content', 'views_ui'];
+  protected static $modules = ['block_content', 'views_ui'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/block_content/tests/src/Kernel/BlockContentAccessHandlerTest.php b/core/modules/block_content/tests/src/Kernel/BlockContentAccessHandlerTest.php
index 9695f5eab944e43083b0644d84aaea5004f940af..0f7e66c5c6332a9193f519f02de7e1c2f3c69dc6 100644
--- a/core/modules/block_content/tests/src/Kernel/BlockContentAccessHandlerTest.php
+++ b/core/modules/block_content/tests/src/Kernel/BlockContentAccessHandlerTest.php
@@ -23,7 +23,7 @@ class BlockContentAccessHandlerTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'block',
     'block_content',
     'system',
diff --git a/core/modules/block_content/tests/src/Kernel/BlockContentDeletionTest.php b/core/modules/block_content/tests/src/Kernel/BlockContentDeletionTest.php
index c388552533485e2319cdb1d32e8db25dbebe6c12..14833adff6079366b4339285f3e6f56a11026400 100644
--- a/core/modules/block_content/tests/src/Kernel/BlockContentDeletionTest.php
+++ b/core/modules/block_content/tests/src/Kernel/BlockContentDeletionTest.php
@@ -17,7 +17,7 @@ class BlockContentDeletionTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['block', 'block_content', 'system', 'user'];
+  protected static $modules = ['block', 'block_content', 'system', 'user'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/block_content/tests/src/Kernel/BlockContentDeriverTest.php b/core/modules/block_content/tests/src/Kernel/BlockContentDeriverTest.php
index a0120af82ed7495a3ce2bf1a449a15d406da58d0..640bbb1eda05325f760028f084a2912b229adfeb 100644
--- a/core/modules/block_content/tests/src/Kernel/BlockContentDeriverTest.php
+++ b/core/modules/block_content/tests/src/Kernel/BlockContentDeriverTest.php
@@ -17,7 +17,7 @@ class BlockContentDeriverTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['block', 'block_content', 'system', 'user'];
+  protected static $modules = ['block', 'block_content', 'system', 'user'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/block_content/tests/src/Kernel/BlockContentEntityReferenceSelectionTest.php b/core/modules/block_content/tests/src/Kernel/BlockContentEntityReferenceSelectionTest.php
index 211fd773c81d4d9de7c5ce89692c9f4050652b26..2e38db42ef4d6bd2876c2f753515aac0eb249da1 100644
--- a/core/modules/block_content/tests/src/Kernel/BlockContentEntityReferenceSelectionTest.php
+++ b/core/modules/block_content/tests/src/Kernel/BlockContentEntityReferenceSelectionTest.php
@@ -19,7 +19,7 @@ class BlockContentEntityReferenceSelectionTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'block',
     'block_content',
     'block_content_test',
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 147296acc5d45f80f7abe9c59954627afa080682..5a78ea58d25ffaaad4186fe5c0bc968ffc0c3e2e 100644
--- a/core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentBodyFieldTest.php
+++ b/core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentBodyFieldTest.php
@@ -15,7 +15,7 @@
  */
 class MigrateBlockContentBodyFieldTest extends MigrateDrupal7TestBase {
 
-  public static $modules = ['block', 'block_content', 'filter', 'text'];
+  protected static $modules = ['block', 'block_content', 'filter', 'text'];
 
   /**
    * {@inheritdoc}
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 bb5e0f26912cdba958d0eb7f1b3e4950b338409f..509230d98f138ac1736159605c174a5fbc567a3c 100644
--- a/core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentEntityDisplayTest.php
+++ b/core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentEntityDisplayTest.php
@@ -15,7 +15,7 @@ class MigrateBlockContentEntityDisplayTest extends MigrateDrupal7TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['block', 'block_content', 'filter', 'text'];
+  protected static $modules = ['block', 'block_content', 'filter', 'text'];
 
   /**
    * {@inheritdoc}
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 f9e9ec10a6738bf853150d6d331677b7b75f98de..eb424395c8dba075dff706c4a6e43514b32f77e0 100644
--- a/core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentEntityFormDisplayTest.php
+++ b/core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentEntityFormDisplayTest.php
@@ -15,7 +15,7 @@ class MigrateBlockContentEntityFormDisplayTest extends MigrateDrupal7TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['block', 'block_content', 'filter', 'text'];
+  protected static $modules = ['block', 'block_content', 'filter', 'text'];
 
   /**
    * {@inheritdoc}
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 a2c6e209259d7427315cc3fab2cd6071b3e53fa6..3fef6b9ab5ca43855c83fca0d3e6e71a4bc88e9b 100644
--- a/core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentStubTest.php
+++ b/core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentStubTest.php
@@ -19,7 +19,7 @@ class MigrateBlockContentStubTest extends MigrateDrupalTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['block_content'];
+  protected static $modules = ['block_content'];
 
   /**
    * {@inheritdoc}
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 55213048338cdcc4c6bfe72ab5cf2e21e21d99b4..63dbe5e47e782f87b977a1556d5b3ff4f95115a4 100644
--- a/core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentTypeTest.php
+++ b/core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentTypeTest.php
@@ -13,7 +13,7 @@
  */
 class MigrateBlockContentTypeTest extends MigrateDrupal7TestBase {
 
-  public static $modules = ['block', 'block_content', 'filter', 'text'];
+  protected static $modules = ['block', 'block_content', 'filter', 'text'];
 
   /**
    * {@inheritdoc}
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 8a23c662ab801c3d019b132ef6ff6f96a871d798..b2df21206bb414edfe4d5f7a3df3f9dde79f0447 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
@@ -15,7 +15,7 @@ class MigrateBlockContentTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['block', 'block_content'];
+  protected static $modules = ['block', 'block_content'];
 
   /**
    * {@inheritdoc}
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 930bbd2f0202209090a1be7bb38f03f8c22a7035..dc8ace7577472fea5126284d7100384cdee5500c 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
@@ -15,7 +15,7 @@ class MigrateCustomBlockContentTranslationTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'block_content',
     'content_translation',
     'language',
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 359a7c5bca70baca9a7d1309b0fe9c10052fc669..b7c49d52732a9a275bb9440d42a13bc43dfde08d 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
@@ -15,7 +15,7 @@ class MigrateCustomBlockContentTranslationTest extends MigrateDrupal7TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'block_content',
     'content_translation',
     'filter',
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 9baec69b0a165652ff3b03951329e791d3f1a32a..03e56070c37f21974808822e0e55e1f3787693ef 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
@@ -13,7 +13,7 @@
  */
 class MigrateCustomBlockTest extends MigrateDrupal7TestBase {
 
-  public static $modules = [
+  protected static $modules = [
     'block_content',
     'filter',
     'text',
diff --git a/core/modules/block_content/tests/src/Kernel/Plugin/migrate/source/d6/BoxTest.php b/core/modules/block_content/tests/src/Kernel/Plugin/migrate/source/d6/BoxTest.php
index 22ab03c1f9de86ef5dffafbdbbe3dd854227b833..7f84eb582020101341e1018354aacb56e6847270 100644
--- a/core/modules/block_content/tests/src/Kernel/Plugin/migrate/source/d6/BoxTest.php
+++ b/core/modules/block_content/tests/src/Kernel/Plugin/migrate/source/d6/BoxTest.php
@@ -15,7 +15,7 @@ class BoxTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['block_content', 'migrate_drupal'];
+  protected static $modules = ['block_content', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/block_content/tests/src/Kernel/Plugin/migrate/source/d6/BoxTranslationTest.php b/core/modules/block_content/tests/src/Kernel/Plugin/migrate/source/d6/BoxTranslationTest.php
index 3c3b89e30dd899c04ef780d53487fa791e5d70bd..6bf50176fd8e9b71d7fc3674dda3bf832546761c 100644
--- a/core/modules/block_content/tests/src/Kernel/Plugin/migrate/source/d6/BoxTranslationTest.php
+++ b/core/modules/block_content/tests/src/Kernel/Plugin/migrate/source/d6/BoxTranslationTest.php
@@ -16,7 +16,7 @@ class BoxTranslationTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['block_content', 'migrate_drupal'];
+  protected static $modules = ['block_content', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/block_content/tests/src/Kernel/Plugin/migrate/source/d7/BlockCustomTest.php b/core/modules/block_content/tests/src/Kernel/Plugin/migrate/source/d7/BlockCustomTest.php
index 55419e38788bfc5b73a5fac36cd4f0a17342dbb4..3a2e02d534fc19a51cba00d98e118545e9e6011d 100644
--- a/core/modules/block_content/tests/src/Kernel/Plugin/migrate/source/d7/BlockCustomTest.php
+++ b/core/modules/block_content/tests/src/Kernel/Plugin/migrate/source/d7/BlockCustomTest.php
@@ -15,7 +15,7 @@ class BlockCustomTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['block_content', 'migrate_drupal'];
+  protected static $modules = ['block_content', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/block_content/tests/src/Kernel/Plugin/migrate/source/d7/BlockCustomTranslationTest.php b/core/modules/block_content/tests/src/Kernel/Plugin/migrate/source/d7/BlockCustomTranslationTest.php
index f69893654bda4b09865648962a5113613f449508..ea956caafaee89dd6299552e26fd6e4bc9f95521 100644
--- a/core/modules/block_content/tests/src/Kernel/Plugin/migrate/source/d7/BlockCustomTranslationTest.php
+++ b/core/modules/block_content/tests/src/Kernel/Plugin/migrate/source/d7/BlockCustomTranslationTest.php
@@ -16,7 +16,7 @@ class BlockCustomTranslationTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['block_content', 'migrate_drupal'];
+  protected static $modules = ['block_content', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/book/tests/src/Functional/BookBreadcrumbTest.php b/core/modules/book/tests/src/Functional/BookBreadcrumbTest.php
index 37e457af741de60156ca51b88d878e9da5348440..59c15d441a1d6c929fc15e4d673372bf6111a246 100644
--- a/core/modules/book/tests/src/Functional/BookBreadcrumbTest.php
+++ b/core/modules/book/tests/src/Functional/BookBreadcrumbTest.php
@@ -16,7 +16,7 @@ class BookBreadcrumbTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['book', 'block', 'book_breadcrumb_test'];
+  protected static $modules = ['book', 'block', 'book_breadcrumb_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/book/tests/src/Functional/BookContentModerationTest.php b/core/modules/book/tests/src/Functional/BookContentModerationTest.php
index af4e75dd87fd3b0c1afcf2f8e765a7da8f83d9e5..1c44a535d17e7e446223561dadb6541fefefa3d7 100644
--- a/core/modules/book/tests/src/Functional/BookContentModerationTest.php
+++ b/core/modules/book/tests/src/Functional/BookContentModerationTest.php
@@ -20,7 +20,7 @@ class BookContentModerationTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['book', 'block', 'book_test', 'content_moderation'];
+  protected static $modules = ['book', 'block', 'book_test', 'content_moderation'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/book/tests/src/Functional/BookTest.php b/core/modules/book/tests/src/Functional/BookTest.php
index e0091c732af6339b3b2e9468eb154f1960ae692f..d8fbbce0a3a5348a8b083323a063fec2c0d79775 100644
--- a/core/modules/book/tests/src/Functional/BookTest.php
+++ b/core/modules/book/tests/src/Functional/BookTest.php
@@ -21,7 +21,7 @@ class BookTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['book', 'block', 'node_access_test', 'book_test'];
+  protected static $modules = ['book', 'block', 'node_access_test', 'book_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/book/tests/src/Functional/Views/BookRelationshipTest.php b/core/modules/book/tests/src/Functional/Views/BookRelationshipTest.php
index 8558421a3ac6400be4ad42ff9cc3abe74f2e0037..38423490f16dc826db4b44742785dcae10d85c70 100644
--- a/core/modules/book/tests/src/Functional/Views/BookRelationshipTest.php
+++ b/core/modules/book/tests/src/Functional/Views/BookRelationshipTest.php
@@ -26,7 +26,7 @@ class BookRelationshipTest extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = ['book_test_views', 'book', 'views'];
+  protected static $modules = ['book_test_views', 'book', 'views'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/book/tests/src/FunctionalJavascript/BookJavascriptTest.php b/core/modules/book/tests/src/FunctionalJavascript/BookJavascriptTest.php
index 7f42954a4e4bfc293e12af0a14eaa526c9beede1..bdeb1fa90f79094c837a3154f08a95bf5bdf1841 100644
--- a/core/modules/book/tests/src/FunctionalJavascript/BookJavascriptTest.php
+++ b/core/modules/book/tests/src/FunctionalJavascript/BookJavascriptTest.php
@@ -17,7 +17,7 @@ class BookJavascriptTest extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['book'];
+  protected static $modules = ['book'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/book/tests/src/Kernel/BookPendingRevisionTest.php b/core/modules/book/tests/src/Kernel/BookPendingRevisionTest.php
index 6eddc614c3cbd378b8742ecf4c2099ecf4e32455..0433e310d39d048a8e2e32b6b378e0f169139386 100644
--- a/core/modules/book/tests/src/Kernel/BookPendingRevisionTest.php
+++ b/core/modules/book/tests/src/Kernel/BookPendingRevisionTest.php
@@ -18,7 +18,7 @@ class BookPendingRevisionTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['system', 'user', 'field', 'filter', 'text', 'node', 'book'];
+  protected static $modules = ['system', 'user', 'field', 'filter', 'text', 'node', 'book'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/book/tests/src/Kernel/BookUninstallTest.php b/core/modules/book/tests/src/Kernel/BookUninstallTest.php
index 747e07373a4f3416be54183055a1e87fac1b7692..003f86dac71d34434536b7dd06c0b13c87078253 100644
--- a/core/modules/book/tests/src/Kernel/BookUninstallTest.php
+++ b/core/modules/book/tests/src/Kernel/BookUninstallTest.php
@@ -18,7 +18,7 @@ class BookUninstallTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['system', 'user', 'field', 'filter', 'text', 'node', 'book'];
+  protected static $modules = ['system', 'user', 'field', 'filter', 'text', 'node', 'book'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/book/tests/src/Kernel/Migrate/d6/MigrateBookConfigsTest.php b/core/modules/book/tests/src/Kernel/Migrate/d6/MigrateBookConfigsTest.php
index 7498638455a583fbf5a63173a739cdd8d34ba6bf..98f3e74f786f2d2c958a835325d309e96aa87950 100644
--- a/core/modules/book/tests/src/Kernel/Migrate/d6/MigrateBookConfigsTest.php
+++ b/core/modules/book/tests/src/Kernel/Migrate/d6/MigrateBookConfigsTest.php
@@ -17,7 +17,7 @@ class MigrateBookConfigsTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['book'];
+  protected static $modules = ['book'];
 
   /**
    * Data provider for testBookSettings().
diff --git a/core/modules/book/tests/src/Kernel/Migrate/d6/MigrateBookTest.php b/core/modules/book/tests/src/Kernel/Migrate/d6/MigrateBookTest.php
index 5469842e8dded70cf5113faac391f3cf92bb3e1e..c21d45666cee88d367896cfce746213064aa7415 100644
--- a/core/modules/book/tests/src/Kernel/Migrate/d6/MigrateBookTest.php
+++ b/core/modules/book/tests/src/Kernel/Migrate/d6/MigrateBookTest.php
@@ -15,7 +15,7 @@ class MigrateBookTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['book', 'node', 'menu_ui'];
+  protected static $modules = ['book', 'node', 'menu_ui'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/book/tests/src/Kernel/Migrate/d7/MigrateBookConfigsTest.php b/core/modules/book/tests/src/Kernel/Migrate/d7/MigrateBookConfigsTest.php
index b8cb1b5f582cb5c1aa586701233294ad85d9deaf..cb6e7de168f382ae7403479c33d7a236eb784866 100644
--- a/core/modules/book/tests/src/Kernel/Migrate/d7/MigrateBookConfigsTest.php
+++ b/core/modules/book/tests/src/Kernel/Migrate/d7/MigrateBookConfigsTest.php
@@ -17,7 +17,7 @@ class MigrateBookConfigsTest extends MigrateDrupal7TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['book', 'node'];
+  protected static $modules = ['book', 'node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/book/tests/src/Kernel/Migrate/d7/MigrateBookTest.php b/core/modules/book/tests/src/Kernel/Migrate/d7/MigrateBookTest.php
index 67987feb7e55034b0dd60091386c2097288bf2fa..7001e85c87553401d99acd27f8659835f97b10b0 100644
--- a/core/modules/book/tests/src/Kernel/Migrate/d7/MigrateBookTest.php
+++ b/core/modules/book/tests/src/Kernel/Migrate/d7/MigrateBookTest.php
@@ -15,7 +15,7 @@ class MigrateBookTest extends MigrateDrupal7TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'book',
     'menu_ui',
     'node',
diff --git a/core/modules/book/tests/src/Kernel/Plugin/migrate/source/BookTest.php b/core/modules/book/tests/src/Kernel/Plugin/migrate/source/BookTest.php
index 8af89b9f8e08340aa244fe3383f430d3dfc54bae..116e4582ba5965fce8197c8ca77caabaaed45ddb 100644
--- a/core/modules/book/tests/src/Kernel/Plugin/migrate/source/BookTest.php
+++ b/core/modules/book/tests/src/Kernel/Plugin/migrate/source/BookTest.php
@@ -14,7 +14,7 @@ class BookTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['book', 'migrate_drupal', 'node'];
+  protected static $modules = ['book', 'migrate_drupal', 'node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/breakpoint/tests/src/Kernel/BreakpointDiscoveryTest.php b/core/modules/breakpoint/tests/src/Kernel/BreakpointDiscoveryTest.php
index 35a1c733862a026f3b9b60ef12b033ab4e1f7a0f..9bbe072673afa10df8d2623b2b2ae3eb79f38169 100644
--- a/core/modules/breakpoint/tests/src/Kernel/BreakpointDiscoveryTest.php
+++ b/core/modules/breakpoint/tests/src/Kernel/BreakpointDiscoveryTest.php
@@ -16,7 +16,7 @@ class BreakpointDiscoveryTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['system', 'breakpoint', 'breakpoint_module_test'];
+  protected static $modules = ['system', 'breakpoint', 'breakpoint_module_test'];
 
   protected function setUp(): void {
     parent::setUp();
diff --git a/core/modules/ckeditor/tests/src/Functional/CKEditorAdminTest.php b/core/modules/ckeditor/tests/src/Functional/CKEditorAdminTest.php
index d7f25a794e8ee649006abf35ed02038b1c2de187..f3bb05a58e83521b6bcd76fee5a031139c1dcd0f 100644
--- a/core/modules/ckeditor/tests/src/Functional/CKEditorAdminTest.php
+++ b/core/modules/ckeditor/tests/src/Functional/CKEditorAdminTest.php
@@ -20,7 +20,7 @@ class CKEditorAdminTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['filter', 'editor', 'ckeditor'];
+  protected static $modules = ['filter', 'editor', 'ckeditor'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/ckeditor/tests/src/Functional/CKEditorLoadingTest.php b/core/modules/ckeditor/tests/src/Functional/CKEditorLoadingTest.php
index ca37b62d3362d261464d41780676503a6ac8f2e6..f1c25b0c03b772888940c50e8b0d130320cfe858 100644
--- a/core/modules/ckeditor/tests/src/Functional/CKEditorLoadingTest.php
+++ b/core/modules/ckeditor/tests/src/Functional/CKEditorLoadingTest.php
@@ -18,7 +18,7 @@ class CKEditorLoadingTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['filter', 'editor', 'ckeditor', 'node'];
+  protected static $modules = ['filter', 'editor', 'ckeditor', 'node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/ckeditor/tests/src/Functional/CKEditorStylesComboAdminTest.php b/core/modules/ckeditor/tests/src/Functional/CKEditorStylesComboAdminTest.php
index 6b6c05ab35b4c6e544966e1ef9e2eb06b664e7d6..d2d1186ffcfd4c32fcec397c0d96375ff14e1d6f 100644
--- a/core/modules/ckeditor/tests/src/Functional/CKEditorStylesComboAdminTest.php
+++ b/core/modules/ckeditor/tests/src/Functional/CKEditorStylesComboAdminTest.php
@@ -18,7 +18,7 @@ class CKEditorStylesComboAdminTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['filter', 'editor', 'ckeditor'];
+  protected static $modules = ['filter', 'editor', 'ckeditor'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/ckeditor/tests/src/Functional/CKEditorStylesComboTranslationTest.php b/core/modules/ckeditor/tests/src/Functional/CKEditorStylesComboTranslationTest.php
index 5dce59287e2042e7aaaae24ce6a938e3f09ed112..dcd259b946379d812e498d2aa23478e40dbaacc0 100644
--- a/core/modules/ckeditor/tests/src/Functional/CKEditorStylesComboTranslationTest.php
+++ b/core/modules/ckeditor/tests/src/Functional/CKEditorStylesComboTranslationTest.php
@@ -17,7 +17,7 @@ class CKEditorStylesComboTranslationTest extends BrowserTestBase {
   /**
    * {inheritdoc}
    */
-  public static $modules = ['ckeditor', 'config_translation'];
+  protected static $modules = ['ckeditor', 'config_translation'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/ckeditor/tests/src/Functional/CKEditorToolbarButtonTest.php b/core/modules/ckeditor/tests/src/Functional/CKEditorToolbarButtonTest.php
index 64f547f619153141354202e87c6d06836610e9f8..1ce136a905df7681489831dcdef4c22e8460d91f 100644
--- a/core/modules/ckeditor/tests/src/Functional/CKEditorToolbarButtonTest.php
+++ b/core/modules/ckeditor/tests/src/Functional/CKEditorToolbarButtonTest.php
@@ -19,7 +19,7 @@ class CKEditorToolbarButtonTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['filter', 'editor', 'ckeditor', 'locale'];
+  protected static $modules = ['filter', 'editor', 'ckeditor', 'locale'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/ckeditor/tests/src/FunctionalJavascript/AjaxCssTest.php b/core/modules/ckeditor/tests/src/FunctionalJavascript/AjaxCssTest.php
index bd5afd7f67b4a83118b97f0e151ecb171e275ec9..421d85f53d460b8f0789200902de68ad581ddee0 100644
--- a/core/modules/ckeditor/tests/src/FunctionalJavascript/AjaxCssTest.php
+++ b/core/modules/ckeditor/tests/src/FunctionalJavascript/AjaxCssTest.php
@@ -16,7 +16,7 @@ class AjaxCssTest extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['ckeditor', 'ckeditor_test'];
+  protected static $modules = ['ckeditor', 'ckeditor_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/ckeditor/tests/src/FunctionalJavascript/CKEditorIntegrationTest.php b/core/modules/ckeditor/tests/src/FunctionalJavascript/CKEditorIntegrationTest.php
index df07a8fc7e06248c41bb8350dc290e6f83cb9901..d7a831f951dfa22077961e66a51b55d1f6262160 100644
--- a/core/modules/ckeditor/tests/src/FunctionalJavascript/CKEditorIntegrationTest.php
+++ b/core/modules/ckeditor/tests/src/FunctionalJavascript/CKEditorIntegrationTest.php
@@ -42,7 +42,7 @@ class CKEditorIntegrationTest extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'ckeditor', 'filter', 'ckeditor_test'];
+  protected static $modules = ['node', 'ckeditor', 'filter', 'ckeditor_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/ckeditor/tests/src/Kernel/CKEditorPluginManagerTest.php b/core/modules/ckeditor/tests/src/Kernel/CKEditorPluginManagerTest.php
index d24506751a338e987f9cba0c8e3579188542c77a..9e1f11afe49cef22eb3893adf0a4790eb0fe3185 100644
--- a/core/modules/ckeditor/tests/src/Kernel/CKEditorPluginManagerTest.php
+++ b/core/modules/ckeditor/tests/src/Kernel/CKEditorPluginManagerTest.php
@@ -18,7 +18,7 @@ class CKEditorPluginManagerTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['system', 'user', 'filter', 'editor', 'ckeditor'];
+  protected static $modules = ['system', 'user', 'filter', 'editor', 'ckeditor'];
 
   /**
    * The manager for "CKEditor plugin" plugins.
diff --git a/core/modules/ckeditor/tests/src/Kernel/CKEditorTest.php b/core/modules/ckeditor/tests/src/Kernel/CKEditorTest.php
index 18f3331278ad34d0cbe80c2399ae87a61f6b6498..c2f61722f73931f56bbe73078edfd1c10cfcb633 100644
--- a/core/modules/ckeditor/tests/src/Kernel/CKEditorTest.php
+++ b/core/modules/ckeditor/tests/src/Kernel/CKEditorTest.php
@@ -19,7 +19,7 @@ class CKEditorTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['system', 'user', 'filter', 'editor', 'ckeditor', 'filter_test'];
+  protected static $modules = ['system', 'user', 'filter', 'editor', 'ckeditor', 'filter_test'];
 
   /**
    * An instance of the "CKEditor" text editor plugin.
diff --git a/core/modules/ckeditor/tests/src/Kernel/Plugin/CKEditorPlugin/InternalTest.php b/core/modules/ckeditor/tests/src/Kernel/Plugin/CKEditorPlugin/InternalTest.php
index dea1e6b708d4ffd71ed9e85bd93e75864e28ef6f..2565807db588bf82deab3052d65375d526ca69f0 100644
--- a/core/modules/ckeditor/tests/src/Kernel/Plugin/CKEditorPlugin/InternalTest.php
+++ b/core/modules/ckeditor/tests/src/Kernel/Plugin/CKEditorPlugin/InternalTest.php
@@ -18,7 +18,7 @@ class InternalTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'ckeditor',
     'ckeditor_test',
     'filter',
diff --git a/core/modules/color/tests/src/Functional/ColorConfigSchemaTest.php b/core/modules/color/tests/src/Functional/ColorConfigSchemaTest.php
index 08644c42a62c0ca851f3ce967c93e899a2b17eda..8249604e37f519d0d5f5625923f48141ab8ba7db 100644
--- a/core/modules/color/tests/src/Functional/ColorConfigSchemaTest.php
+++ b/core/modules/color/tests/src/Functional/ColorConfigSchemaTest.php
@@ -16,7 +16,7 @@ class ColorConfigSchemaTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['color'];
+  protected static $modules = ['color'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/color/tests/src/Functional/ColorSafePreviewTest.php b/core/modules/color/tests/src/Functional/ColorSafePreviewTest.php
index 653541ac0699f05171878601cc8c75c29ff374f7..5802e58ca759c59b49aecce6749a9abdc7473b43 100644
--- a/core/modules/color/tests/src/Functional/ColorSafePreviewTest.php
+++ b/core/modules/color/tests/src/Functional/ColorSafePreviewTest.php
@@ -17,7 +17,7 @@ class ColorSafePreviewTest extends BrowserTestBase {
    *
    * @var string[]
    */
-  public static $modules = ['color', 'color_test'];
+  protected static $modules = ['color', 'color_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/color/tests/src/Functional/ColorTest.php b/core/modules/color/tests/src/Functional/ColorTest.php
index 631b85d099e815f1ba0870939df4b07b123c5afe..18745413f7b037a8279898e22dfdb4bb1540c1fc 100644
--- a/core/modules/color/tests/src/Functional/ColorTest.php
+++ b/core/modules/color/tests/src/Functional/ColorTest.php
@@ -17,7 +17,7 @@ class ColorTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['color', 'color_test', 'block', 'file'];
+  protected static $modules = ['color', 'color_test', 'block', 'file'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/color/tests/src/Kernel/Migrate/d7/MigrateColorTest.php b/core/modules/color/tests/src/Kernel/Migrate/d7/MigrateColorTest.php
index 66b6f7e2b338cbbbfb2550380312737fbcab1d51..d603149f132d3de272bdc173014d5b9a884653d1 100644
--- a/core/modules/color/tests/src/Kernel/Migrate/d7/MigrateColorTest.php
+++ b/core/modules/color/tests/src/Kernel/Migrate/d7/MigrateColorTest.php
@@ -14,7 +14,7 @@ class MigrateColorTest extends MigrateDrupal7TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['color'];
+  protected static $modules = ['color'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/color/tests/src/Kernel/Plugin/migrate/source/d7/ColorTest.php b/core/modules/color/tests/src/Kernel/Plugin/migrate/source/d7/ColorTest.php
index cb634a9c63fa9ea289826f960b141cbcd703426a..a2ed9b80ba7cd355b54f55c3d11c5d2d78fd1466 100644
--- a/core/modules/color/tests/src/Kernel/Plugin/migrate/source/d7/ColorTest.php
+++ b/core/modules/color/tests/src/Kernel/Plugin/migrate/source/d7/ColorTest.php
@@ -16,7 +16,7 @@ class ColorTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['color', 'migrate_drupal'];
+  protected static $modules = ['color', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/comment/tests/src/Functional/CommentAccessTest.php b/core/modules/comment/tests/src/Functional/CommentAccessTest.php
index 47f99c21eead8b6b75383cd26333fa9417e9d3ec..004675479c81400fe10c229aa99b6ae4376b0f65 100644
--- a/core/modules/comment/tests/src/Functional/CommentAccessTest.php
+++ b/core/modules/comment/tests/src/Functional/CommentAccessTest.php
@@ -19,7 +19,7 @@ class CommentAccessTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'node',
     'comment',
   ];
diff --git a/core/modules/comment/tests/src/Functional/CommentActionsTest.php b/core/modules/comment/tests/src/Functional/CommentActionsTest.php
index 21e1e2dfa6562ca4fe94d928d8a511d758aab727..aa7b0da40827d32d541c7c72452940f7378410ad 100644
--- a/core/modules/comment/tests/src/Functional/CommentActionsTest.php
+++ b/core/modules/comment/tests/src/Functional/CommentActionsTest.php
@@ -17,7 +17,7 @@ class CommentActionsTest extends CommentTestBase {
    *
    * @var array
    */
-  public static $modules = ['dblog', 'action'];
+  protected static $modules = ['dblog', 'action'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/comment/tests/src/Functional/CommentBlockTest.php b/core/modules/comment/tests/src/Functional/CommentBlockTest.php
index 4cd18b495b45a65c3a7e567afc5336c8eecddd82..2a3ff3e6a80e6a5dba48c22223de4b96ff8cddbd 100644
--- a/core/modules/comment/tests/src/Functional/CommentBlockTest.php
+++ b/core/modules/comment/tests/src/Functional/CommentBlockTest.php
@@ -17,7 +17,7 @@ class CommentBlockTest extends CommentTestBase {
    *
    * @var array
    */
-  public static $modules = ['block', 'views'];
+  protected static $modules = ['block', 'views'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/comment/tests/src/Functional/CommentBookTest.php b/core/modules/comment/tests/src/Functional/CommentBookTest.php
index 92f27b4f5b999a6379a3f820aca0d064885d9ac2..0cc97faf6e981454b30ee9f821f8df475dd32f9b 100644
--- a/core/modules/comment/tests/src/Functional/CommentBookTest.php
+++ b/core/modules/comment/tests/src/Functional/CommentBookTest.php
@@ -22,7 +22,7 @@ class CommentBookTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['book', 'comment'];
+  protected static $modules = ['book', 'comment'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/comment/tests/src/Functional/CommentCacheTagsTest.php b/core/modules/comment/tests/src/Functional/CommentCacheTagsTest.php
index 47236ef69e5f5e2ebf97de680b21efb2d48c098e..5277a317c089fe88299fc69638c800e82230c072 100644
--- a/core/modules/comment/tests/src/Functional/CommentCacheTagsTest.php
+++ b/core/modules/comment/tests/src/Functional/CommentCacheTagsTest.php
@@ -25,7 +25,7 @@ class CommentCacheTagsTest extends EntityWithUriCacheTagsTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['comment'];
+  protected static $modules = ['comment'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/comment/tests/src/Functional/CommentEntityTest.php b/core/modules/comment/tests/src/Functional/CommentEntityTest.php
index 4aaaf7f2948607356ff9e7c6719ce839dded678c..a235e98351fabc418c982007ce62fa721c06298a 100644
--- a/core/modules/comment/tests/src/Functional/CommentEntityTest.php
+++ b/core/modules/comment/tests/src/Functional/CommentEntityTest.php
@@ -23,7 +23,7 @@ class CommentEntityTest extends CommentTestBase {
    *
    * @var array
    */
-  public static $modules = ['block', 'comment', 'node', 'history', 'field_ui', 'datetime', 'taxonomy'];
+  protected static $modules = ['block', 'comment', 'node', 'history', 'field_ui', 'datetime', 'taxonomy'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/comment/tests/src/Functional/CommentFieldsTest.php b/core/modules/comment/tests/src/Functional/CommentFieldsTest.php
index 1dd250d506883c0bf57d48875cbb16548e0fd624..809b06457567cf56dd345dff4ce27fce02a0bb8f 100644
--- a/core/modules/comment/tests/src/Functional/CommentFieldsTest.php
+++ b/core/modules/comment/tests/src/Functional/CommentFieldsTest.php
@@ -20,7 +20,7 @@ class CommentFieldsTest extends CommentTestBase {
    *
    * @var array
    */
-  public static $modules = ['field_ui'];
+  protected static $modules = ['field_ui'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/comment/tests/src/Functional/CommentLanguageTest.php b/core/modules/comment/tests/src/Functional/CommentLanguageTest.php
index ab696cc92c178781aad888ff16dc20385d620193..6802af6e1dc5e90960ab6c1346a186331718c897 100644
--- a/core/modules/comment/tests/src/Functional/CommentLanguageTest.php
+++ b/core/modules/comment/tests/src/Functional/CommentLanguageTest.php
@@ -27,7 +27,7 @@ class CommentLanguageTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'language', 'language_test', 'comment_test'];
+  protected static $modules = ['node', 'language', 'language_test', 'comment_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/comment/tests/src/Functional/CommentLinksAlterTest.php b/core/modules/comment/tests/src/Functional/CommentLinksAlterTest.php
index 71a0958f61fb40c3c3716849182744e508b0855a..54cb17147ffcd64b0602eab90fbfbe76d577560a 100644
--- a/core/modules/comment/tests/src/Functional/CommentLinksAlterTest.php
+++ b/core/modules/comment/tests/src/Functional/CommentLinksAlterTest.php
@@ -9,7 +9,7 @@
  */
 class CommentLinksAlterTest extends CommentTestBase {
 
-  public static $modules = ['comment_test'];
+  protected static $modules = ['comment_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/comment/tests/src/Functional/CommentLinksTest.php b/core/modules/comment/tests/src/Functional/CommentLinksTest.php
index 34a815c0287bbbee3414f0e98856f9c045dbe2f5..9e47de4e6977cc92ad763d9e8067d738bf85f7a2 100644
--- a/core/modules/comment/tests/src/Functional/CommentLinksTest.php
+++ b/core/modules/comment/tests/src/Functional/CommentLinksTest.php
@@ -36,7 +36,7 @@ class CommentLinksTest extends CommentTestBase {
    *
    * @todo Remove this dependency.
    */
-  public static $modules = ['views'];
+  protected static $modules = ['views'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/comment/tests/src/Functional/CommentNewIndicatorTest.php b/core/modules/comment/tests/src/Functional/CommentNewIndicatorTest.php
index 99219f1fccaf5df89f9e64b5bd3d1ce849d62334..2380f176beb3c2bc76bb027a19f94d79fa0f69ae 100644
--- a/core/modules/comment/tests/src/Functional/CommentNewIndicatorTest.php
+++ b/core/modules/comment/tests/src/Functional/CommentNewIndicatorTest.php
@@ -22,7 +22,7 @@ class CommentNewIndicatorTest extends CommentTestBase {
    *
    * @todo Remove this dependency.
    */
-  public static $modules = ['views'];
+  protected static $modules = ['views'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/comment/tests/src/Functional/CommentNodeAccessTest.php b/core/modules/comment/tests/src/Functional/CommentNodeAccessTest.php
index ecd46fdb0cdc3e7c343050bce27e0053061c9bc6..3ad58a7093ea93e0bb351eb18c0ff0e831e38e68 100644
--- a/core/modules/comment/tests/src/Functional/CommentNodeAccessTest.php
+++ b/core/modules/comment/tests/src/Functional/CommentNodeAccessTest.php
@@ -19,7 +19,7 @@ class CommentNodeAccessTest extends CommentTestBase {
    *
    * @var array
    */
-  public static $modules = ['node_access_test'];
+  protected static $modules = ['node_access_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/comment/tests/src/Functional/CommentNonNodeTest.php b/core/modules/comment/tests/src/Functional/CommentNonNodeTest.php
index f6022cfd09a08c6956c1408dac16d8a6b884e1b3..09f0faf8858b28584f9301f8412949fba6c4a8e7 100644
--- a/core/modules/comment/tests/src/Functional/CommentNonNodeTest.php
+++ b/core/modules/comment/tests/src/Functional/CommentNonNodeTest.php
@@ -26,7 +26,7 @@ class CommentNonNodeTest extends BrowserTestBase {
   use FieldUiTestTrait;
   use CommentTestTrait;
 
-  public static $modules = ['comment', 'user', 'field_ui', 'entity_test', 'block'];
+  protected static $modules = ['comment', 'user', 'field_ui', 'entity_test', 'block'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/comment/tests/src/Functional/CommentRssTest.php b/core/modules/comment/tests/src/Functional/CommentRssTest.php
index 8b06b50d44472c3504981dabd4d8547709bc3fc7..b05bfc2c7dd0a10cf66244d52fe0febbf87ca50d 100644
--- a/core/modules/comment/tests/src/Functional/CommentRssTest.php
+++ b/core/modules/comment/tests/src/Functional/CommentRssTest.php
@@ -21,7 +21,7 @@ class CommentRssTest extends CommentTestBase {
    *
    * @var array
    */
-  public static $modules = ['views'];
+  protected static $modules = ['views'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/comment/tests/src/Functional/CommentStatusFieldAccessTest.php b/core/modules/comment/tests/src/Functional/CommentStatusFieldAccessTest.php
index 851c125efda231287a7e20121a4d779bb9935bfe..a558cda9389d0ce472a37663a1df564f0e747724 100644
--- a/core/modules/comment/tests/src/Functional/CommentStatusFieldAccessTest.php
+++ b/core/modules/comment/tests/src/Functional/CommentStatusFieldAccessTest.php
@@ -42,7 +42,7 @@ class CommentStatusFieldAccessTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'node',
     'comment',
     'user',
diff --git a/core/modules/comment/tests/src/Functional/CommentTestBase.php b/core/modules/comment/tests/src/Functional/CommentTestBase.php
index 245228de0dd31ea443b7c25f85a730b192d77253..e4920c4aac2e0e62f022ad6644814fcf08afd81c 100644
--- a/core/modules/comment/tests/src/Functional/CommentTestBase.php
+++ b/core/modules/comment/tests/src/Functional/CommentTestBase.php
@@ -24,7 +24,7 @@ abstract class CommentTestBase extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['block', 'comment', 'node', 'history', 'field_ui', 'datetime'];
+  protected static $modules = ['block', 'comment', 'node', 'history', 'field_ui', 'datetime'];
 
   /**
    * An administrative user with permission to configure comment settings.
diff --git a/core/modules/comment/tests/src/Functional/CommentTokenReplaceTest.php b/core/modules/comment/tests/src/Functional/CommentTokenReplaceTest.php
index b402da57f851b3eeecbd012e6a1ed4df2f4950e0..e11618980ad35217d6c70627ea035ffcef1b6a43 100644
--- a/core/modules/comment/tests/src/Functional/CommentTokenReplaceTest.php
+++ b/core/modules/comment/tests/src/Functional/CommentTokenReplaceTest.php
@@ -24,7 +24,7 @@ class CommentTokenReplaceTest extends CommentTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['taxonomy'];
+  protected static $modules = ['taxonomy'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/comment/tests/src/Functional/CommentTranslationUITest.php b/core/modules/comment/tests/src/Functional/CommentTranslationUITest.php
index a7c9cf0bcb0822fbd605c1f3bacd7afff6102aef..b88704e785beb94819657608e2a4073b8fec2e4c 100644
--- a/core/modules/comment/tests/src/Functional/CommentTranslationUITest.php
+++ b/core/modules/comment/tests/src/Functional/CommentTranslationUITest.php
@@ -55,7 +55,7 @@ class CommentTranslationUITest extends ContentTranslationUITestBase {
    *
    * @var array
    */
-  public static $modules = ['language', 'content_translation', 'node', 'comment'];
+  protected static $modules = ['language', 'content_translation', 'node', 'comment'];
 
   protected function setUp(): void {
     $this->entityTypeId = 'comment';
diff --git a/core/modules/comment/tests/src/Functional/Hal/CommentHalJsonBasicAuthTest.php b/core/modules/comment/tests/src/Functional/Hal/CommentHalJsonBasicAuthTest.php
index 0062fe5a406906706f241f31e2a9c8a716e4ac2e..ee0ea2ee7fc6d18329cad0e6bb2b1ec616d24211 100644
--- a/core/modules/comment/tests/src/Functional/Hal/CommentHalJsonBasicAuthTest.php
+++ b/core/modules/comment/tests/src/Functional/Hal/CommentHalJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class CommentHalJsonBasicAuthTest extends CommentHalJsonTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/comment/tests/src/Functional/Hal/CommentHalJsonTestBase.php b/core/modules/comment/tests/src/Functional/Hal/CommentHalJsonTestBase.php
index ca19d31cf527a59f9d2ab59544a94a2001ac33e9..3f13633896239a333b3db8d116c970d672e0edfd 100644
--- a/core/modules/comment/tests/src/Functional/Hal/CommentHalJsonTestBase.php
+++ b/core/modules/comment/tests/src/Functional/Hal/CommentHalJsonTestBase.php
@@ -14,7 +14,7 @@ abstract class CommentHalJsonTestBase extends CommentResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/comment/tests/src/Functional/Hal/CommentTypeHalJsonAnonTest.php b/core/modules/comment/tests/src/Functional/Hal/CommentTypeHalJsonAnonTest.php
index b3a254f8c1328db04a3ff3b24f554ec827b43f8b..38c4ea3243833f4cae9a119db84886a1a8643dd9 100644
--- a/core/modules/comment/tests/src/Functional/Hal/CommentTypeHalJsonAnonTest.php
+++ b/core/modules/comment/tests/src/Functional/Hal/CommentTypeHalJsonAnonTest.php
@@ -15,7 +15,7 @@ class CommentTypeHalJsonAnonTest extends CommentTypeResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/comment/tests/src/Functional/Hal/CommentTypeHalJsonBasicAuthTest.php b/core/modules/comment/tests/src/Functional/Hal/CommentTypeHalJsonBasicAuthTest.php
index ff21f3489c7cceaee289a83342d805e7fcf467f9..ca9b1c90f60a063b1f06d02ac077aa533efb25b5 100644
--- a/core/modules/comment/tests/src/Functional/Hal/CommentTypeHalJsonBasicAuthTest.php
+++ b/core/modules/comment/tests/src/Functional/Hal/CommentTypeHalJsonBasicAuthTest.php
@@ -15,7 +15,7 @@ class CommentTypeHalJsonBasicAuthTest extends CommentTypeResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal', 'basic_auth'];
+  protected static $modules = ['hal', 'basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/comment/tests/src/Functional/Hal/CommentTypeHalJsonCookieTest.php b/core/modules/comment/tests/src/Functional/Hal/CommentTypeHalJsonCookieTest.php
index 0abdeefb67b8144774bf474f22ff17a2aefc9ff7..a5568ab4ef68ca726d79c493e27ceb236831ce85 100644
--- a/core/modules/comment/tests/src/Functional/Hal/CommentTypeHalJsonCookieTest.php
+++ b/core/modules/comment/tests/src/Functional/Hal/CommentTypeHalJsonCookieTest.php
@@ -15,7 +15,7 @@ class CommentTypeHalJsonCookieTest extends CommentTypeResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/comment/tests/src/Functional/Rest/CommentJsonBasicAuthTest.php b/core/modules/comment/tests/src/Functional/Rest/CommentJsonBasicAuthTest.php
index 92d16fb4b188f60307c54677964c603ca5fcdb0d..ae1dd425354588c6a5d527d0a2a94f4e1925ad58 100644
--- a/core/modules/comment/tests/src/Functional/Rest/CommentJsonBasicAuthTest.php
+++ b/core/modules/comment/tests/src/Functional/Rest/CommentJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class CommentJsonBasicAuthTest extends CommentResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/comment/tests/src/Functional/Rest/CommentResourceTestBase.php b/core/modules/comment/tests/src/Functional/Rest/CommentResourceTestBase.php
index 1edbb7b30296c7da3973bd7d4cfaabc34fd19b5f..c6a96eff0019d6a2679294a68c34dc40ebb55b1a 100644
--- a/core/modules/comment/tests/src/Functional/Rest/CommentResourceTestBase.php
+++ b/core/modules/comment/tests/src/Functional/Rest/CommentResourceTestBase.php
@@ -18,7 +18,7 @@ abstract class CommentResourceTestBase extends EntityResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['comment', 'entity_test'];
+  protected static $modules = ['comment', 'entity_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/comment/tests/src/Functional/Rest/CommentTypeJsonBasicAuthTest.php b/core/modules/comment/tests/src/Functional/Rest/CommentTypeJsonBasicAuthTest.php
index 14fb9c9a050b3bf46f894c5119b46412da4a84e3..ba5485d696c94f11be7728b299531fb1d874f279 100644
--- a/core/modules/comment/tests/src/Functional/Rest/CommentTypeJsonBasicAuthTest.php
+++ b/core/modules/comment/tests/src/Functional/Rest/CommentTypeJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class CommentTypeJsonBasicAuthTest extends CommentTypeResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/comment/tests/src/Functional/Rest/CommentTypeResourceTestBase.php b/core/modules/comment/tests/src/Functional/Rest/CommentTypeResourceTestBase.php
index 5d9b4133620cc85431c7723fe3d57b521f2f5180..eb4574f9a0957271644f1df14867e3bda2b68dbc 100644
--- a/core/modules/comment/tests/src/Functional/Rest/CommentTypeResourceTestBase.php
+++ b/core/modules/comment/tests/src/Functional/Rest/CommentTypeResourceTestBase.php
@@ -13,7 +13,7 @@ abstract class CommentTypeResourceTestBase extends EntityResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'comment'];
+  protected static $modules = ['node', 'comment'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/comment/tests/src/Functional/Rest/CommentTypeXmlBasicAuthTest.php b/core/modules/comment/tests/src/Functional/Rest/CommentTypeXmlBasicAuthTest.php
index a1fc840eec4ea303ac46e6bdcebae026e75f826d..5b6462951450bd35d978fa9966ee15be4228803d 100644
--- a/core/modules/comment/tests/src/Functional/Rest/CommentTypeXmlBasicAuthTest.php
+++ b/core/modules/comment/tests/src/Functional/Rest/CommentTypeXmlBasicAuthTest.php
@@ -16,7 +16,7 @@ class CommentTypeXmlBasicAuthTest extends CommentTypeResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/comment/tests/src/Functional/Rest/CommentXmlBasicAuthTest.php b/core/modules/comment/tests/src/Functional/Rest/CommentXmlBasicAuthTest.php
index 90f4eacdd64e65d346d18eb718436d353e496477..be155e35cdf976fdbbb34b5d71e3bb1d519627ad 100644
--- a/core/modules/comment/tests/src/Functional/Rest/CommentXmlBasicAuthTest.php
+++ b/core/modules/comment/tests/src/Functional/Rest/CommentXmlBasicAuthTest.php
@@ -16,7 +16,7 @@ class CommentXmlBasicAuthTest extends CommentResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/comment/tests/src/Functional/Views/CommentFieldFilterTest.php b/core/modules/comment/tests/src/Functional/Views/CommentFieldFilterTest.php
index 3cbb186959923548514879400a20df574ddc32aa..65025de3c2e1820e9dc93366c6053dcbb64cc59e 100644
--- a/core/modules/comment/tests/src/Functional/Views/CommentFieldFilterTest.php
+++ b/core/modules/comment/tests/src/Functional/Views/CommentFieldFilterTest.php
@@ -15,7 +15,7 @@ class CommentFieldFilterTest extends CommentTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['language'];
+  protected static $modules = ['language'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/comment/tests/src/Functional/Views/CommentRestExportTest.php b/core/modules/comment/tests/src/Functional/Views/CommentRestExportTest.php
index 0dfb35cdd6f2dfcd0f9d0832a3a863d218ac6f16..45de2bb0d2c55a7c43bea60dd7d35427110eb980 100644
--- a/core/modules/comment/tests/src/Functional/Views/CommentRestExportTest.php
+++ b/core/modules/comment/tests/src/Functional/Views/CommentRestExportTest.php
@@ -27,7 +27,7 @@ class CommentRestExportTest extends CommentTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'comment', 'comment_test_views', 'rest', 'hal'];
+  protected static $modules = ['node', 'comment', 'comment_test_views', 'rest', 'hal'];
 
   protected function setUp($import_test_views = TRUE): void {
     parent::setUp($import_test_views);
diff --git a/core/modules/comment/tests/src/Functional/Views/CommentTestBase.php b/core/modules/comment/tests/src/Functional/Views/CommentTestBase.php
index a9444a232025eebc912156eb8f6cffc13297f13f..b3995af09810f0cc13d7fd1bcd94c9731785669c 100644
--- a/core/modules/comment/tests/src/Functional/Views/CommentTestBase.php
+++ b/core/modules/comment/tests/src/Functional/Views/CommentTestBase.php
@@ -19,7 +19,7 @@ abstract class CommentTestBase extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'comment', 'comment_test_views'];
+  protected static $modules = ['node', 'comment', 'comment_test_views'];
 
   /**
    * A normal user with permission to post comments (without approval).
diff --git a/core/modules/comment/tests/src/Functional/Views/DefaultViewRecentCommentsTest.php b/core/modules/comment/tests/src/Functional/Views/DefaultViewRecentCommentsTest.php
index c1258aca5055d7b5ed589a7eef6de9715926144d..c984dc3b39e7cf1091c769cb1c95b7b4d2768a7a 100644
--- a/core/modules/comment/tests/src/Functional/Views/DefaultViewRecentCommentsTest.php
+++ b/core/modules/comment/tests/src/Functional/Views/DefaultViewRecentCommentsTest.php
@@ -23,7 +23,7 @@ class DefaultViewRecentCommentsTest extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'comment', 'block'];
+  protected static $modules = ['node', 'comment', 'block'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/comment/tests/src/Functional/Views/NodeCommentsTest.php b/core/modules/comment/tests/src/Functional/Views/NodeCommentsTest.php
index 02c91f4ed5d6aeec223b5ccca58c0723fd82171e..6b98377cf88150cbff6b0aba4b3992490e613907 100644
--- a/core/modules/comment/tests/src/Functional/Views/NodeCommentsTest.php
+++ b/core/modules/comment/tests/src/Functional/Views/NodeCommentsTest.php
@@ -14,7 +14,7 @@ class NodeCommentsTest extends CommentTestBase {
    *
    * @var array
    */
-  public static $modules = ['history'];
+  protected static $modules = ['history'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/comment/tests/src/Functional/Views/WizardTest.php b/core/modules/comment/tests/src/Functional/Views/WizardTest.php
index fd5be63808f2e9c383ef8fef7725958816156c5a..933c4d5d45bcf31b57490cf1fa4e2f5d8461f286 100644
--- a/core/modules/comment/tests/src/Functional/Views/WizardTest.php
+++ b/core/modules/comment/tests/src/Functional/Views/WizardTest.php
@@ -21,7 +21,7 @@ class WizardTest extends WizardTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'comment'];
+  protected static $modules = ['node', 'comment'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/comment/tests/src/Kernel/CommentBundlesTest.php b/core/modules/comment/tests/src/Kernel/CommentBundlesTest.php
index f879b7d3d23e6bbb454b306cbbdb47b205384948..d6393f4e8a82f19df39562f96fe258d1bc29d6dd 100644
--- a/core/modules/comment/tests/src/Kernel/CommentBundlesTest.php
+++ b/core/modules/comment/tests/src/Kernel/CommentBundlesTest.php
@@ -15,7 +15,7 @@ class CommentBundlesTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['comment', 'node', 'taxonomy', 'user'];
+  protected static $modules = ['comment', 'node', 'taxonomy', 'user'];
 
   /**
    * Entity type ids to use for target_entity_type_id on comment bundles.
diff --git a/core/modules/comment/tests/src/Kernel/CommentDefaultFormatterCacheTagsTest.php b/core/modules/comment/tests/src/Kernel/CommentDefaultFormatterCacheTagsTest.php
index 12f5696e5f46cfa51958365f63ef9b1ae8a715b2..0874af0f0ed96ecccb77318cacffcc56da32e575 100644
--- a/core/modules/comment/tests/src/Kernel/CommentDefaultFormatterCacheTagsTest.php
+++ b/core/modules/comment/tests/src/Kernel/CommentDefaultFormatterCacheTagsTest.php
@@ -26,7 +26,7 @@ class CommentDefaultFormatterCacheTagsTest extends EntityKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['entity_test', 'comment'];
+  protected static $modules = ['entity_test', 'comment'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/comment/tests/src/Kernel/CommentFieldAccessTest.php b/core/modules/comment/tests/src/Kernel/CommentFieldAccessTest.php
index 79bbfc304f6cbef0cb2f9ae18aa21e9cbefbc31d..15bace911a665855fee39a5aa3d822a9d6f18e1c 100644
--- a/core/modules/comment/tests/src/Kernel/CommentFieldAccessTest.php
+++ b/core/modules/comment/tests/src/Kernel/CommentFieldAccessTest.php
@@ -31,7 +31,7 @@ class CommentFieldAccessTest extends EntityKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['comment', 'entity_test', 'user'];
+  protected static $modules = ['comment', 'entity_test', 'user'];
 
   /**
    * Fields that only users with administer comments permissions can change.
diff --git a/core/modules/comment/tests/src/Kernel/CommentIntegrationTest.php b/core/modules/comment/tests/src/Kernel/CommentIntegrationTest.php
index 3f9a01e291f653843aed7a1dd8cead34afce1449..124a2a61e8356cf46f65349c9fac4a31bfe0fcf3 100644
--- a/core/modules/comment/tests/src/Kernel/CommentIntegrationTest.php
+++ b/core/modules/comment/tests/src/Kernel/CommentIntegrationTest.php
@@ -24,7 +24,7 @@ class CommentIntegrationTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['comment', 'field', 'entity_test', 'user', 'system', 'dblog'];
+  protected static $modules = ['comment', 'field', 'entity_test', 'user', 'system', 'dblog'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/comment/tests/src/Kernel/CommentItemTest.php b/core/modules/comment/tests/src/Kernel/CommentItemTest.php
index 893abe1dde05f515b66bda7343939e825ffcef94..cec4e0be37c2bb8aeeee1b78c6aec5d01a67ec34 100644
--- a/core/modules/comment/tests/src/Kernel/CommentItemTest.php
+++ b/core/modules/comment/tests/src/Kernel/CommentItemTest.php
@@ -23,7 +23,7 @@ class CommentItemTest extends FieldKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['comment', 'entity_test', 'user'];
+  protected static $modules = ['comment', 'entity_test', 'user'];
 
   protected function setUp(): void {
     parent::setUp();
diff --git a/core/modules/comment/tests/src/Kernel/CommentStringIdEntitiesTest.php b/core/modules/comment/tests/src/Kernel/CommentStringIdEntitiesTest.php
index 0d28bc3087dcc8cc8e787cc0f2ebdc807e672542..79c434c16c58644f4f310791af03065085b1ef67 100644
--- a/core/modules/comment/tests/src/Kernel/CommentStringIdEntitiesTest.php
+++ b/core/modules/comment/tests/src/Kernel/CommentStringIdEntitiesTest.php
@@ -18,7 +18,7 @@ class CommentStringIdEntitiesTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'comment',
     'user',
     'field',
diff --git a/core/modules/comment/tests/src/Kernel/CommentValidationTest.php b/core/modules/comment/tests/src/Kernel/CommentValidationTest.php
index b0884464d94b670e49626746c1ec5b4e529ee79e..8b9a68727c8d5709648802c881279d0b5616a71c 100644
--- a/core/modules/comment/tests/src/Kernel/CommentValidationTest.php
+++ b/core/modules/comment/tests/src/Kernel/CommentValidationTest.php
@@ -19,7 +19,7 @@ class CommentValidationTest extends EntityKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['comment', 'node'];
+  protected static $modules = ['comment', 'node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/comment/tests/src/Kernel/Migrate/MigrateCommentStubTest.php b/core/modules/comment/tests/src/Kernel/Migrate/MigrateCommentStubTest.php
index 2102071890aee6a4d8a44d8de9a68fb390033091..c906281836e817821bc5569610c7a0327bd0e533 100644
--- a/core/modules/comment/tests/src/Kernel/Migrate/MigrateCommentStubTest.php
+++ b/core/modules/comment/tests/src/Kernel/Migrate/MigrateCommentStubTest.php
@@ -19,7 +19,7 @@ class MigrateCommentStubTest extends MigrateDrupalTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['comment', 'node'];
+  protected static $modules = ['comment', 'node'];
 
   /**
    * {@inheritdoc}
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 c47c11ce3aa41387b04d296e35edac42be0291d6..b4a670562f1c7a011191b61417f5acf643422fa5 100644
--- a/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentEntityDisplayTest.php
+++ b/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentEntityDisplayTest.php
@@ -16,7 +16,7 @@ class MigrateCommentEntityDisplayTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['comment', 'menu_ui'];
+  protected static $modules = ['comment', 'menu_ui'];
 
   /**
    * {@inheritdoc}
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 470f8d75e80feed512c718797c6a37d92aa85977..a57c2250fb420cf9b13c750a7837f95919e87104 100644
--- a/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentEntityFormDisplaySubjectTest.php
+++ b/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentEntityFormDisplaySubjectTest.php
@@ -16,7 +16,7 @@ class MigrateCommentEntityFormDisplaySubjectTest extends MigrateDrupal6TestBase
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['comment'];
+  protected static $modules = ['comment'];
 
   /**
    * {@inheritdoc}
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 b47f2e4474105323acca049fe349ac4c9a12025d..5438c938c25b44d5b1d06e0d6d2f1013e3584c85 100644
--- a/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentEntityFormDisplayTest.php
+++ b/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentEntityFormDisplayTest.php
@@ -16,7 +16,7 @@ class MigrateCommentEntityFormDisplayTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['comment', 'menu_ui'];
+  protected static $modules = ['comment', 'menu_ui'];
 
   /**
    * {@inheritdoc}
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 681e6f4f377d92f02fc2a2b3b9a660565565b7b5..57c34b2293ec43ce34ebf306f882ee410f98aec6 100644
--- a/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentFieldInstanceTest.php
+++ b/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentFieldInstanceTest.php
@@ -16,7 +16,7 @@ class MigrateCommentFieldInstanceTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['comment', 'menu_ui'];
+  protected static $modules = ['comment', 'menu_ui'];
 
   /**
    * {@inheritdoc}
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 6a778b7d478d9b550ead6896a4730093f65a59b5..e2a865cd7c98f71e9ec30b9ddb2b51e4fbf3b0ad 100644
--- a/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentFieldTest.php
+++ b/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentFieldTest.php
@@ -16,7 +16,7 @@ class MigrateCommentFieldTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['comment', 'menu_ui'];
+  protected static $modules = ['comment', 'menu_ui'];
 
   /**
    * {@inheritdoc}
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 2783ddeb55545fc6c311614eaaa43d472c8b14c8..1388405072bbe682de1d6e41276e54065e318706 100644
--- a/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentTest.php
+++ b/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentTest.php
@@ -20,7 +20,7 @@ class MigrateCommentTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'comment',
     'content_translation',
     'language',
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 ed90a91beeaeed249ed752fd0cf6d7ea5949adad..58dc428d8962ef398c03b7b970f21594157eecb7 100644
--- a/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentTypeTest.php
+++ b/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentTypeTest.php
@@ -16,7 +16,7 @@ class MigrateCommentTypeTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['comment'];
+  protected static $modules = ['comment'];
 
   /**
    * {@inheritdoc}
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 40318a2ac4c62fc3f0ab882b032f5519e3f9208f..1ace7293f0f8067b4909e76729bdf0e9cbbc6c29 100644
--- a/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentEntityDisplayTest.php
+++ b/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentEntityDisplayTest.php
@@ -16,7 +16,7 @@ class MigrateCommentEntityDisplayTest extends MigrateDrupal7TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'comment', 'text', 'menu_ui'];
+  protected static $modules = ['node', 'comment', 'text', 'menu_ui'];
 
   /**
    * {@inheritdoc}
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 882ff60ad8de5a2e460697b7fcd74ee8aeebde22..c0a1de628cd4ad70c57e0f7a3dcc60a60898f1f1 100644
--- a/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentEntityFormDisplaySubjectTest.php
+++ b/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentEntityFormDisplaySubjectTest.php
@@ -16,7 +16,7 @@ class MigrateCommentEntityFormDisplaySubjectTest extends MigrateDrupal7TestBase
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'comment', 'text', 'menu_ui'];
+  protected static $modules = ['node', 'comment', 'text', 'menu_ui'];
 
   /**
    * {@inheritdoc}
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 688d1d1bdc6305bb8a7fbd309ed39a5652b3b2ea..05d1651bc97387a5976534fe0bccf36169cbf895 100644
--- a/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentEntityFormDisplayTest.php
+++ b/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentEntityFormDisplayTest.php
@@ -16,7 +16,7 @@ class MigrateCommentEntityFormDisplayTest extends MigrateDrupal7TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'comment', 'text', 'menu_ui'];
+  protected static $modules = ['node', 'comment', 'text', 'menu_ui'];
 
   /**
    * {@inheritdoc}
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 bf4506c1ab9cf474f2d03696c8faf2637f426321..2e2881f71078e3d06cffbe06b6a28c2b1a5b6e58 100644
--- a/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentFieldInstanceTest.php
+++ b/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentFieldInstanceTest.php
@@ -16,7 +16,7 @@ class MigrateCommentFieldInstanceTest extends MigrateDrupal7TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'comment', 'text', 'menu_ui'];
+  protected static $modules = ['node', 'comment', 'text', 'menu_ui'];
 
   /**
    * {@inheritdoc}
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 794675ea66c68fe15dc71f45a28665032842ccf7..734bb69e934992542d0f2e30a361dd3d935d7de0 100644
--- a/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentFieldTest.php
+++ b/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentFieldTest.php
@@ -16,7 +16,7 @@ class MigrateCommentFieldTest extends MigrateDrupal7TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'comment', 'text'];
+  protected static $modules = ['node', 'comment', 'text'];
 
   /**
    * {@inheritdoc}
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 7533aec88795e02abfd2fc1edbbe55f842180c5f..a0a8aa8e5138757d67e5abf0e715f63129303392 100644
--- a/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentTest.php
+++ b/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentTest.php
@@ -17,7 +17,7 @@ class MigrateCommentTest extends MigrateDrupal7TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'comment',
     'content_translation',
     'datetime',
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 4a17866048d9008becb5179bb6ce9e4913067393..565075a5680ab62ebbdbf08405430f8f2f96a1e6 100644
--- a/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentTypeTest.php
+++ b/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentTypeTest.php
@@ -16,7 +16,7 @@ class MigrateCommentTypeTest extends MigrateDrupal7TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'comment', 'text'];
+  protected static $modules = ['node', 'comment', 'text'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/comment/tests/src/Kernel/Plugin/migrate/source/d6/CommentSourceWithHighWaterTest.php b/core/modules/comment/tests/src/Kernel/Plugin/migrate/source/d6/CommentSourceWithHighWaterTest.php
index 26b95d7fcedef3050170100c33702e3fffe4cc4f..290550cdb432a1d0e52c1e0b98ed4fc8c1a6a963 100644
--- a/core/modules/comment/tests/src/Kernel/Plugin/migrate/source/d6/CommentSourceWithHighWaterTest.php
+++ b/core/modules/comment/tests/src/Kernel/Plugin/migrate/source/d6/CommentSourceWithHighWaterTest.php
@@ -16,7 +16,7 @@ class CommentSourceWithHighWaterTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['comment', 'migrate_drupal'];
+  protected static $modules = ['comment', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/comment/tests/src/Kernel/Plugin/migrate/source/d6/CommentTest.php b/core/modules/comment/tests/src/Kernel/Plugin/migrate/source/d6/CommentTest.php
index d5a4aa3e30851f900f9cc6a2fc81880c94e8f025..90c31cfdb3d0dcecd01cffce536e1041b092989d 100644
--- a/core/modules/comment/tests/src/Kernel/Plugin/migrate/source/d6/CommentTest.php
+++ b/core/modules/comment/tests/src/Kernel/Plugin/migrate/source/d6/CommentTest.php
@@ -15,7 +15,7 @@ class CommentTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['comment', 'migrate_drupal'];
+  protected static $modules = ['comment', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/comment/tests/src/Kernel/Plugin/migrate/source/d7/CommentEntityTranslationTest.php b/core/modules/comment/tests/src/Kernel/Plugin/migrate/source/d7/CommentEntityTranslationTest.php
index 548e7fc25d44506c8a1f182fdcb9e6b3cbcafb24..cf09667423c0af3ec77a37be8faf4ad77c881d84 100644
--- a/core/modules/comment/tests/src/Kernel/Plugin/migrate/source/d7/CommentEntityTranslationTest.php
+++ b/core/modules/comment/tests/src/Kernel/Plugin/migrate/source/d7/CommentEntityTranslationTest.php
@@ -15,7 +15,7 @@ class CommentEntityTranslationTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['comment', 'migrate_drupal'];
+  protected static $modules = ['comment', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/comment/tests/src/Kernel/Plugin/migrate/source/d7/CommentTest.php b/core/modules/comment/tests/src/Kernel/Plugin/migrate/source/d7/CommentTest.php
index dc9948956318cc2ded877a85b4c2126e46ee2f74..b40e974d7c650eca6d35d823584cd8a5e65338a9 100644
--- a/core/modules/comment/tests/src/Kernel/Plugin/migrate/source/d7/CommentTest.php
+++ b/core/modules/comment/tests/src/Kernel/Plugin/migrate/source/d7/CommentTest.php
@@ -15,7 +15,7 @@ class CommentTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['comment', 'migrate_drupal'];
+  protected static $modules = ['comment', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/comment/tests/src/Kernel/Views/CommentAdminViewTest.php b/core/modules/comment/tests/src/Kernel/Views/CommentAdminViewTest.php
index c00116d4f04f25ae2163dc4d08703018bda074ed..fe23816543a9f4195f4712a31d1db1fadcc0e8f2 100644
--- a/core/modules/comment/tests/src/Kernel/Views/CommentAdminViewTest.php
+++ b/core/modules/comment/tests/src/Kernel/Views/CommentAdminViewTest.php
@@ -34,7 +34,7 @@ class CommentAdminViewTest extends ViewsKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'user',
     'comment',
     'entity_test',
diff --git a/core/modules/comment/tests/src/Kernel/Views/CommentLinksTest.php b/core/modules/comment/tests/src/Kernel/Views/CommentLinksTest.php
index f7f0610b9b0bd10d227955df1b18b2ddcb3d5927..be5c14606ff6db5a002960135966b2fd95578c35 100644
--- a/core/modules/comment/tests/src/Kernel/Views/CommentLinksTest.php
+++ b/core/modules/comment/tests/src/Kernel/Views/CommentLinksTest.php
@@ -23,7 +23,7 @@ class CommentLinksTest extends CommentViewsKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['entity_test'];
+  protected static $modules = ['entity_test'];
 
   /**
    * Views used by this test.
diff --git a/core/modules/comment/tests/src/Kernel/Views/CommentUserNameTest.php b/core/modules/comment/tests/src/Kernel/Views/CommentUserNameTest.php
index 58c0e841462d4f172e340b526739abbc3249bd43..d10a3b91fe80de5b356c7914bfbb0f30b2100fd0 100644
--- a/core/modules/comment/tests/src/Kernel/Views/CommentUserNameTest.php
+++ b/core/modules/comment/tests/src/Kernel/Views/CommentUserNameTest.php
@@ -27,7 +27,7 @@ class CommentUserNameTest extends ViewsKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['user', 'comment', 'entity_test'];
+  protected static $modules = ['user', 'comment', 'entity_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/comment/tests/src/Kernel/Views/CommentViewsFieldAccessTest.php b/core/modules/comment/tests/src/Kernel/Views/CommentViewsFieldAccessTest.php
index 100285766e8716e63441f688296e673a406fd4e3..f4fc987dcfb6ae9cdae4b40c70ad2fa5eece47fc 100644
--- a/core/modules/comment/tests/src/Kernel/Views/CommentViewsFieldAccessTest.php
+++ b/core/modules/comment/tests/src/Kernel/Views/CommentViewsFieldAccessTest.php
@@ -17,7 +17,7 @@ class CommentViewsFieldAccessTest extends FieldFieldAccessTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['comment', 'entity_test'];
+  protected static $modules = ['comment', 'entity_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/comment/tests/src/Kernel/Views/CommentViewsKernelTestBase.php b/core/modules/comment/tests/src/Kernel/Views/CommentViewsKernelTestBase.php
index e9c3f57a16557dd4b4c373290116f16307443f34..902bd32962ed3d74405f6384ea76eef05b06e214 100644
--- a/core/modules/comment/tests/src/Kernel/Views/CommentViewsKernelTestBase.php
+++ b/core/modules/comment/tests/src/Kernel/Views/CommentViewsKernelTestBase.php
@@ -16,7 +16,7 @@ abstract class CommentViewsKernelTestBase extends ViewsKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['comment_test_views', 'user', 'comment'];
+  protected static $modules = ['comment_test_views', 'user', 'comment'];
 
   /**
    * Admin user.
diff --git a/core/modules/config/tests/config_test/tests/src/Functional/Hal/ConfigTestHalJsonAnonTest.php b/core/modules/config/tests/config_test/tests/src/Functional/Hal/ConfigTestHalJsonAnonTest.php
index 8e20d7259115d876fc4cd8ae36b4235727000dfc..5f2b25974f3346972d2702f8c902449658dbca61 100644
--- a/core/modules/config/tests/config_test/tests/src/Functional/Hal/ConfigTestHalJsonAnonTest.php
+++ b/core/modules/config/tests/config_test/tests/src/Functional/Hal/ConfigTestHalJsonAnonTest.php
@@ -15,7 +15,7 @@ class ConfigTestHalJsonAnonTest extends ConfigTestResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/config/tests/config_test/tests/src/Functional/Hal/ConfigTestHalJsonBasicAuthTest.php b/core/modules/config/tests/config_test/tests/src/Functional/Hal/ConfigTestHalJsonBasicAuthTest.php
index f8adc1d563fde77d2d2727a4a9b17b2e4daa2aaf..990c6fb84c7b75cf7d0a134abba99698dd2191cb 100644
--- a/core/modules/config/tests/config_test/tests/src/Functional/Hal/ConfigTestHalJsonBasicAuthTest.php
+++ b/core/modules/config/tests/config_test/tests/src/Functional/Hal/ConfigTestHalJsonBasicAuthTest.php
@@ -15,7 +15,7 @@ class ConfigTestHalJsonBasicAuthTest extends ConfigTestResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal', 'basic_auth'];
+  protected static $modules = ['hal', 'basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/config/tests/config_test/tests/src/Functional/Hal/ConfigTestHalJsonCookieTest.php b/core/modules/config/tests/config_test/tests/src/Functional/Hal/ConfigTestHalJsonCookieTest.php
index a0f8dc1f3c204e9f6e8d5722cc240313873bbb19..07025015b328427e2e805f9959c31f926b141b3c 100644
--- a/core/modules/config/tests/config_test/tests/src/Functional/Hal/ConfigTestHalJsonCookieTest.php
+++ b/core/modules/config/tests/config_test/tests/src/Functional/Hal/ConfigTestHalJsonCookieTest.php
@@ -15,7 +15,7 @@ class ConfigTestHalJsonCookieTest extends ConfigTestResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/config/tests/config_test/tests/src/Functional/Rest/ConfigTestJsonBasicAuthTest.php b/core/modules/config/tests/config_test/tests/src/Functional/Rest/ConfigTestJsonBasicAuthTest.php
index 724effcc9ab1ac468f0fdee79cb9ba2b056cab5a..bd847b700eb951ba454a1321ea03c40bfd32560f 100644
--- a/core/modules/config/tests/config_test/tests/src/Functional/Rest/ConfigTestJsonBasicAuthTest.php
+++ b/core/modules/config/tests/config_test/tests/src/Functional/Rest/ConfigTestJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class ConfigTestJsonBasicAuthTest extends ConfigTestResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/config/tests/config_test/tests/src/Functional/Rest/ConfigTestResourceTestBase.php b/core/modules/config/tests/config_test/tests/src/Functional/Rest/ConfigTestResourceTestBase.php
index dbd71b77781f34d09eadf150f146bc462dc7407b..d1ae8f5d86aab2a5d4b7985ec33b3c1b1152fe3b 100644
--- a/core/modules/config/tests/config_test/tests/src/Functional/Rest/ConfigTestResourceTestBase.php
+++ b/core/modules/config/tests/config_test/tests/src/Functional/Rest/ConfigTestResourceTestBase.php
@@ -10,7 +10,7 @@ abstract class ConfigTestResourceTestBase extends EntityResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['config_test', 'config_test_rest'];
+  protected static $modules = ['config_test', 'config_test_rest'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/config/tests/config_test/tests/src/Functional/Rest/ConfigTestXmlBasicAuthTest.php b/core/modules/config/tests/config_test/tests/src/Functional/Rest/ConfigTestXmlBasicAuthTest.php
index f253c383472e072cb980721519e9765a58ccaa88..22019b9054d86ca04391697106e973003df477e3 100644
--- a/core/modules/config/tests/config_test/tests/src/Functional/Rest/ConfigTestXmlBasicAuthTest.php
+++ b/core/modules/config/tests/config_test/tests/src/Functional/Rest/ConfigTestXmlBasicAuthTest.php
@@ -16,7 +16,7 @@ class ConfigTestXmlBasicAuthTest extends ConfigTestResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/config/tests/src/Functional/CacheabilityMetadataConfigOverrideIntegrationTest.php b/core/modules/config/tests/src/Functional/CacheabilityMetadataConfigOverrideIntegrationTest.php
index 1b0dd44dc036cf273113bf1038b2d7647d60ba41..0b0fb9e968f5a3d556b4cee124cc1f68d2f1dc5a 100644
--- a/core/modules/config/tests/src/Functional/CacheabilityMetadataConfigOverrideIntegrationTest.php
+++ b/core/modules/config/tests/src/Functional/CacheabilityMetadataConfigOverrideIntegrationTest.php
@@ -17,7 +17,7 @@ class CacheabilityMetadataConfigOverrideIntegrationTest extends BrowserTestBase
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'block_test',
     'config_override_integration_test',
   ];
diff --git a/core/modules/config/tests/src/Functional/ConfigDependencyWebTest.php b/core/modules/config/tests/src/Functional/ConfigDependencyWebTest.php
index cce78346b71567cef65c3c170968c8d149a4e498..c9ea2a67ebf355857a54d7acd1544f2fe4ede3c6 100644
--- a/core/modules/config/tests/src/Functional/ConfigDependencyWebTest.php
+++ b/core/modules/config/tests/src/Functional/ConfigDependencyWebTest.php
@@ -22,7 +22,7 @@ class ConfigDependencyWebTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['config_test'];
+  protected static $modules = ['config_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/config/tests/src/Functional/ConfigDraggableListBuilderTest.php b/core/modules/config/tests/src/Functional/ConfigDraggableListBuilderTest.php
index a9effb4b0fcf4369816e64b02a5c8635bb9fccda..00f3ce083a07642fb5b39675661688cd568339d2 100644
--- a/core/modules/config/tests/src/Functional/ConfigDraggableListBuilderTest.php
+++ b/core/modules/config/tests/src/Functional/ConfigDraggableListBuilderTest.php
@@ -15,7 +15,7 @@ class ConfigDraggableListBuilderTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['config_test'];
+  protected static $modules = ['config_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/config/tests/src/Functional/ConfigEntityFormOverrideTest.php b/core/modules/config/tests/src/Functional/ConfigEntityFormOverrideTest.php
index 628fb4bf826d043b03d4bd27d949e687ec9d175a..ae30d0a120f26b401c103f1529fa5dae387b7452 100644
--- a/core/modules/config/tests/src/Functional/ConfigEntityFormOverrideTest.php
+++ b/core/modules/config/tests/src/Functional/ConfigEntityFormOverrideTest.php
@@ -14,7 +14,7 @@ class ConfigEntityFormOverrideTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['config_test'];
+  protected static $modules = ['config_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/config/tests/src/Functional/ConfigEntityListMultilingualTest.php b/core/modules/config/tests/src/Functional/ConfigEntityListMultilingualTest.php
index b6150f65ab4b6e7667e35c8eb1829b7b4d97f367..057d7e71a81669ba64ca14a69556b082d53fa04e 100644
--- a/core/modules/config/tests/src/Functional/ConfigEntityListMultilingualTest.php
+++ b/core/modules/config/tests/src/Functional/ConfigEntityListMultilingualTest.php
@@ -17,7 +17,7 @@ class ConfigEntityListMultilingualTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['config_test', 'language', 'block'];
+  protected static $modules = ['config_test', 'language', 'block'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/config/tests/src/Functional/ConfigEntityListTest.php b/core/modules/config/tests/src/Functional/ConfigEntityListTest.php
index 5256be314d015f3a872dd49c3483992a3217cc7f..0715c3cfade73cc4e9775a2aa36ad02adf5013c9 100644
--- a/core/modules/config/tests/src/Functional/ConfigEntityListTest.php
+++ b/core/modules/config/tests/src/Functional/ConfigEntityListTest.php
@@ -21,7 +21,7 @@ class ConfigEntityListTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['block', 'config_test'];
+  protected static $modules = ['block', 'config_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/config/tests/src/Functional/ConfigEntityStatusUITest.php b/core/modules/config/tests/src/Functional/ConfigEntityStatusUITest.php
index c987551449b1271566a3f0336b1d50b275588c84..f43e7a009a0482112e9dc018c00a55484118dff7 100644
--- a/core/modules/config/tests/src/Functional/ConfigEntityStatusUITest.php
+++ b/core/modules/config/tests/src/Functional/ConfigEntityStatusUITest.php
@@ -16,7 +16,7 @@ class ConfigEntityStatusUITest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['config_test'];
+  protected static $modules = ['config_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/config/tests/src/Functional/ConfigEntityTest.php b/core/modules/config/tests/src/Functional/ConfigEntityTest.php
index b1998320296c64595c5a84d8a3abc4ad5412850d..c79ddc2142f265f605d7f35658e3be3ac1f92b27 100644
--- a/core/modules/config/tests/src/Functional/ConfigEntityTest.php
+++ b/core/modules/config/tests/src/Functional/ConfigEntityTest.php
@@ -28,7 +28,7 @@ class ConfigEntityTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['config_test'];
+  protected static $modules = ['config_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/config/tests/src/Functional/ConfigExportImportUITest.php b/core/modules/config/tests/src/Functional/ConfigExportImportUITest.php
index 9998ad05dfc0eb9887d27a095c83dec015dff855..d65fd286353ac46696cf3aa6e4dd966a3a91bf4d 100644
--- a/core/modules/config/tests/src/Functional/ConfigExportImportUITest.php
+++ b/core/modules/config/tests/src/Functional/ConfigExportImportUITest.php
@@ -66,7 +66,7 @@ class ConfigExportImportUITest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['config', 'node', 'field'];
+  protected static $modules = ['config', 'node', 'field'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/config/tests/src/Functional/ConfigExportUITest.php b/core/modules/config/tests/src/Functional/ConfigExportUITest.php
index 5fd4bef5d2a18e08d11634e0ca905ef96ae28b79..46afdf6479c472763ad005aaa324937610282785 100644
--- a/core/modules/config/tests/src/Functional/ConfigExportUITest.php
+++ b/core/modules/config/tests/src/Functional/ConfigExportUITest.php
@@ -19,7 +19,7 @@ class ConfigExportUITest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['config', 'config_test'];
+  protected static $modules = ['config', 'config_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/config/tests/src/Functional/ConfigImportInstallProfileTest.php b/core/modules/config/tests/src/Functional/ConfigImportInstallProfileTest.php
index f71c26a6c99c8b7207d23dd69766096d8efa76a1..dca10e46765f5673853cc948905e955d8b6efcbb 100644
--- a/core/modules/config/tests/src/Functional/ConfigImportInstallProfileTest.php
+++ b/core/modules/config/tests/src/Functional/ConfigImportInstallProfileTest.php
@@ -23,7 +23,7 @@ class ConfigImportInstallProfileTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['config'];
+  protected static $modules = ['config'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/config/tests/src/Functional/ConfigImportUITest.php b/core/modules/config/tests/src/Functional/ConfigImportUITest.php
index 73c59b926bbf200be8b94aff9a9e5d0fdd4d9d5e..24f88dc590b9e8a2b8d1c735ba31a19e07cb6ca3 100644
--- a/core/modules/config/tests/src/Functional/ConfigImportUITest.php
+++ b/core/modules/config/tests/src/Functional/ConfigImportUITest.php
@@ -19,7 +19,7 @@ class ConfigImportUITest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['config', 'config_test', 'config_import_test', 'text', 'options'];
+  protected static $modules = ['config', 'config_test', 'config_import_test', 'text', 'options'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/config/tests/src/Functional/ConfigImportUploadTest.php b/core/modules/config/tests/src/Functional/ConfigImportUploadTest.php
index 55f3245c3bb5980fff26523452124e5aa2968436..02146c41de5160346c2fbdc87bf09850c1a12439 100644
--- a/core/modules/config/tests/src/Functional/ConfigImportUploadTest.php
+++ b/core/modules/config/tests/src/Functional/ConfigImportUploadTest.php
@@ -27,7 +27,7 @@ class ConfigImportUploadTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['config'];
+  protected static $modules = ['config'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/config/tests/src/Functional/ConfigLanguageOverrideWebTest.php b/core/modules/config/tests/src/Functional/ConfigLanguageOverrideWebTest.php
index 7287f67394caffead333353fe61c94fc979c69e4..79bb74e60811f240013127888f295d9668311fdc 100644
--- a/core/modules/config/tests/src/Functional/ConfigLanguageOverrideWebTest.php
+++ b/core/modules/config/tests/src/Functional/ConfigLanguageOverrideWebTest.php
@@ -18,7 +18,7 @@ class ConfigLanguageOverrideWebTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'block',
     'language',
     'system',
diff --git a/core/modules/config/tests/src/Functional/ConfigSingleImportExportTest.php b/core/modules/config/tests/src/Functional/ConfigSingleImportExportTest.php
index baaf2ed6a30a39146c307e25d904714113f5ddab..f4276b44b9d7fe4026cc37a5291c06fc9baff95e 100644
--- a/core/modules/config/tests/src/Functional/ConfigSingleImportExportTest.php
+++ b/core/modules/config/tests/src/Functional/ConfigSingleImportExportTest.php
@@ -17,7 +17,7 @@ class ConfigSingleImportExportTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'block',
     'config',
     'config_test',
diff --git a/core/modules/config/tests/src/Functional/LanguageNegotiationFormOverrideTest.php b/core/modules/config/tests/src/Functional/LanguageNegotiationFormOverrideTest.php
index 0aa15ea1ea3828d707cea65664a2c81213093a2f..f47510fe19ff2951181c52bcf0b65263f18d0806 100644
--- a/core/modules/config/tests/src/Functional/LanguageNegotiationFormOverrideTest.php
+++ b/core/modules/config/tests/src/Functional/LanguageNegotiationFormOverrideTest.php
@@ -12,7 +12,7 @@
  */
 class LanguageNegotiationFormOverrideTest extends BrowserTestBase {
 
-  public static $modules = ['language', 'locale', 'locale_test'];
+  protected static $modules = ['language', 'locale', 'locale_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/config/tests/src/Functional/SchemaConfigListenerWebTest.php b/core/modules/config/tests/src/Functional/SchemaConfigListenerWebTest.php
index 588db76a331e34473579d364da8d17046e597025..ecc1a7d174bf908832cfaef1d0e50a414dcacfeb 100644
--- a/core/modules/config/tests/src/Functional/SchemaConfigListenerWebTest.php
+++ b/core/modules/config/tests/src/Functional/SchemaConfigListenerWebTest.php
@@ -15,7 +15,7 @@ class SchemaConfigListenerWebTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['config_test'];
+  protected static $modules = ['config_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/config/tests/src/Functional/TransformedConfigExportImportUITest.php b/core/modules/config/tests/src/Functional/TransformedConfigExportImportUITest.php
index fa75797abbb09adbe44d1590ae8e2fd97096c5f3..5ad7bd3f6bffed36972ac43e3ddad3683c897e6b 100644
--- a/core/modules/config/tests/src/Functional/TransformedConfigExportImportUITest.php
+++ b/core/modules/config/tests/src/Functional/TransformedConfigExportImportUITest.php
@@ -15,7 +15,7 @@ class TransformedConfigExportImportUITest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'config',
     'config_transformer_test',
   ];
diff --git a/core/modules/config/tests/src/FunctionalJavascript/ConfigEntityTest.php b/core/modules/config/tests/src/FunctionalJavascript/ConfigEntityTest.php
index 7ea62e2e90f114e011571561787451b8a335d586..5918de512cebf2a6dd89fe249c28af3133721609 100644
--- a/core/modules/config/tests/src/FunctionalJavascript/ConfigEntityTest.php
+++ b/core/modules/config/tests/src/FunctionalJavascript/ConfigEntityTest.php
@@ -14,7 +14,7 @@ class ConfigEntityTest extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['config_test'];
+  protected static $modules = ['config_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/config/tests/src/Kernel/ConfigUninstallViaCliImportTest.php b/core/modules/config/tests/src/Kernel/ConfigUninstallViaCliImportTest.php
index 70b714d842615d61737c7b1150c35532f49e5749..1a0486ed3ee441f450d25fe8cb1f796bd0c3bbb1 100644
--- a/core/modules/config/tests/src/Kernel/ConfigUninstallViaCliImportTest.php
+++ b/core/modules/config/tests/src/Kernel/ConfigUninstallViaCliImportTest.php
@@ -24,7 +24,7 @@ class ConfigUninstallViaCliImportTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['system', 'config'];
+  protected static $modules = ['system', 'config'];
 
   protected function setUp(): void {
     parent::setUp();
diff --git a/core/modules/config_translation/tests/src/Functional/ConfigTranslationCacheTest.php b/core/modules/config_translation/tests/src/Functional/ConfigTranslationCacheTest.php
index 87a8ec25bdd27e89be2e7e0a63b59c65e55b2485..c2501e6002df889ba85fe608cb74760925de8272 100644
--- a/core/modules/config_translation/tests/src/Functional/ConfigTranslationCacheTest.php
+++ b/core/modules/config_translation/tests/src/Functional/ConfigTranslationCacheTest.php
@@ -20,7 +20,7 @@ class ConfigTranslationCacheTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'block',
     'config_translation',
     'config_translation_test',
diff --git a/core/modules/config_translation/tests/src/Functional/ConfigTranslationDateFormatUiTest.php b/core/modules/config_translation/tests/src/Functional/ConfigTranslationDateFormatUiTest.php
index 41a1849a19aaf835c39b20e85762a165616efc6d..d82492f96675e81adedf845adccbfd2369d69633 100644
--- a/core/modules/config_translation/tests/src/Functional/ConfigTranslationDateFormatUiTest.php
+++ b/core/modules/config_translation/tests/src/Functional/ConfigTranslationDateFormatUiTest.php
@@ -12,7 +12,7 @@
  */
 class ConfigTranslationDateFormatUiTest extends BrowserTestBase {
 
-  public static $modules = [
+  protected static $modules = [
     'language',
     'config_translation',
     'system',
diff --git a/core/modules/config_translation/tests/src/Functional/ConfigTranslationListUiTest.php b/core/modules/config_translation/tests/src/Functional/ConfigTranslationListUiTest.php
index 226e4752482ce06695f3ff369aeae746372c67d1..8de59f805a42e566f189f80a75a2d4daeb52d11f 100644
--- a/core/modules/config_translation/tests/src/Functional/ConfigTranslationListUiTest.php
+++ b/core/modules/config_translation/tests/src/Functional/ConfigTranslationListUiTest.php
@@ -25,7 +25,7 @@ class ConfigTranslationListUiTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'block',
     'config_translation',
     'contact',
diff --git a/core/modules/config_translation/tests/src/Functional/ConfigTranslationOverviewTest.php b/core/modules/config_translation/tests/src/Functional/ConfigTranslationOverviewTest.php
index a4115a8e223ac6f874d5c2bd31c856390b31da29..2d0cca7a0f057db0812ea54e6aee5ec47e72c2b5 100644
--- a/core/modules/config_translation/tests/src/Functional/ConfigTranslationOverviewTest.php
+++ b/core/modules/config_translation/tests/src/Functional/ConfigTranslationOverviewTest.php
@@ -18,7 +18,7 @@ class ConfigTranslationOverviewTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'block',
     'config_test',
     'config_translation',
diff --git a/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiTest.php b/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiTest.php
index 3546f73b2b08dbcfc38af74e228fb7b717462eb3..5966b788aaa23886779069b32823b5f54989f98d 100644
--- a/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiTest.php
+++ b/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiTest.php
@@ -29,7 +29,7 @@ class ConfigTranslationUiTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'block',
     'config_translation',
     'config_translation_test',
diff --git a/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiThemeTest.php b/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiThemeTest.php
index 35c126baf56bbdfe5243202f27aaf13d171b8edf..fbb5a64f3b26f1e690663903d0a8f59aedac628a 100644
--- a/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiThemeTest.php
+++ b/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiThemeTest.php
@@ -17,7 +17,7 @@ class ConfigTranslationUiThemeTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['config_translation', 'config_translation_test'];
+  protected static $modules = ['config_translation', 'config_translation_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/config_translation/tests/src/Functional/ConfigTranslationViewListUiTest.php b/core/modules/config_translation/tests/src/Functional/ConfigTranslationViewListUiTest.php
index 2f9e33b1e76bea88dcd5b1d2fd7aae2553f447bf..50e169f09f5506bd263846cc9f81bd6912b9bc5f 100644
--- a/core/modules/config_translation/tests/src/Functional/ConfigTranslationViewListUiTest.php
+++ b/core/modules/config_translation/tests/src/Functional/ConfigTranslationViewListUiTest.php
@@ -23,7 +23,7 @@ class ConfigTranslationViewListUiTest extends UITestBase {
    *
    * @var array
    */
-  public static $modules = ['config_translation', 'views_ui'];
+  protected static $modules = ['config_translation', 'views_ui'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/config_translation/tests/src/FunctionalJavascript/ConfigTranslationUiTest.php b/core/modules/config_translation/tests/src/FunctionalJavascript/ConfigTranslationUiTest.php
index 0261663a460b8285f0c55a52520af8a1d95312a7..b8e66757ab0ee1e01504a7951456212c671f7b06 100644
--- a/core/modules/config_translation/tests/src/FunctionalJavascript/ConfigTranslationUiTest.php
+++ b/core/modules/config_translation/tests/src/FunctionalJavascript/ConfigTranslationUiTest.php
@@ -14,7 +14,7 @@ class ConfigTranslationUiTest extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'config_translation',
     'contextual',
     'node',
diff --git a/core/modules/config_translation/tests/src/Kernel/ConfigMapperTest.php b/core/modules/config_translation/tests/src/Kernel/ConfigMapperTest.php
index 773246cba97454f4fd0670965d3782ba057b1ca1..aec2a2650d7f1bc2dfd4bced498474bc6385e74f 100644
--- a/core/modules/config_translation/tests/src/Kernel/ConfigMapperTest.php
+++ b/core/modules/config_translation/tests/src/Kernel/ConfigMapperTest.php
@@ -16,7 +16,7 @@ class ConfigMapperTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'config_translation',
     'config_translation_test',
     'language',
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 0c56bab64e9bd09d20e384f01ffc01a2215f8550..576ad75264c6cb794c03d38e009a04409ad21c3c 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
@@ -12,7 +12,7 @@
  */
 class MigrateSystemMaintenanceTranslationTest extends MigrateDrupal6TestBase {
 
-  public static $modules = [
+  protected static $modules = [
     'language',
     'config_translation',
   ];
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 86ccace2c36f55771d1e879aa66912bc522ec9af..a01dc46df92776c6af8d812efcaebb4ee48a520c 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
@@ -12,7 +12,7 @@
  */
 class MigrateSystemSiteTranslationTest extends MigrateDrupal6TestBase {
 
-  public static $modules = [
+  protected static $modules = [
     'language',
     'config_translation',
   ];
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 9c0ee58d4db5fed2c71eff6ff79386e5ccbcc30d..6a813e1cde04333740f56d4f4ccfa922e224cc3d 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
@@ -15,7 +15,7 @@ class MigrateUserConfigsTranslationTest extends MigrateDrupal6TestBase {
 
   use SchemaCheckTestTrait;
 
-  public static $modules = [
+  protected static $modules = [
     'language',
     'locale',
     'config_translation',
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 de0094c6447069fc648fb3ce7320b333f4af7826..ad0033540e55466d0822fe0241e306f754fce8bd 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
@@ -15,7 +15,7 @@ class MigrateUserProfileFieldInstanceTranslationTest extends MigrateDrupal6TestB
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'config_translation',
     'locale',
     'language',
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 d56e72c8e5a32124e1d2788205de1f4b2a9c37dc..1c1ca9d4361b6ea76e92b154dd591cfca98bee39 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
@@ -11,7 +11,7 @@
  */
 class MigrateSystemMaintenanceTranslationTest extends MigrateDrupal7TestBase {
 
-  public static $modules = [
+  protected static $modules = [
     'language',
     'config_translation',
   ];
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 69f1e3ea3461fe7deb8ab976392191fe5f3cdccb..0d051355ecbbb3cb181c6e9e07b4fa42e267c463 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
@@ -14,7 +14,7 @@ class MigrateSystemSiteTranslationTest extends MigrateDrupal7TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'language',
     'config_translation',
   ];
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 3928249fbcc28cd631e84447c18feb1550f2de49..c99db8c6fd3a5e2bf89feac1378c631e64824968 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
@@ -17,7 +17,7 @@ class MigrateUserConfigsTranslationTest extends MigrateDrupal7TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'language',
     'locale',
     'config_translation',
diff --git a/core/modules/config_translation/tests/src/Kernel/Plugin/migrate/source/d6/ProfileFieldTranslationTest.php b/core/modules/config_translation/tests/src/Kernel/Plugin/migrate/source/d6/ProfileFieldTranslationTest.php
index 706dc2f1d98ebbe12a0c1c2804b7428b9dc4e170..6c21d2386a9023a8e139f9aa0faa318f992d2375 100644
--- a/core/modules/config_translation/tests/src/Kernel/Plugin/migrate/source/d6/ProfileFieldTranslationTest.php
+++ b/core/modules/config_translation/tests/src/Kernel/Plugin/migrate/source/d6/ProfileFieldTranslationTest.php
@@ -15,7 +15,7 @@ class ProfileFieldTranslationTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['config_translation', 'migrate_drupal', 'user'];
+  protected static $modules = ['config_translation', 'migrate_drupal', 'user'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/contact/tests/src/Functional/ContactLanguageTest.php b/core/modules/contact/tests/src/Functional/ContactLanguageTest.php
index dda82c8068e3737f623e20ad3e459cf67a8ce581..7b3afeefe4df7f2e27864272b1a61d9671f3d5bd 100644
--- a/core/modules/contact/tests/src/Functional/ContactLanguageTest.php
+++ b/core/modules/contact/tests/src/Functional/ContactLanguageTest.php
@@ -20,7 +20,7 @@ class ContactLanguageTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'contact',
     'language',
     'contact_test',
diff --git a/core/modules/contact/tests/src/Functional/ContactPersonalTest.php b/core/modules/contact/tests/src/Functional/ContactPersonalTest.php
index ce3742f814adae11fc4aa42e385c6434c773f2b7..4ffd3573b8bb68dec399abbc0abded63859505f6 100644
--- a/core/modules/contact/tests/src/Functional/ContactPersonalTest.php
+++ b/core/modules/contact/tests/src/Functional/ContactPersonalTest.php
@@ -25,7 +25,7 @@ class ContactPersonalTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['contact', 'dblog'];
+  protected static $modules = ['contact', 'dblog'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/contact/tests/src/Functional/ContactSitewideTest.php b/core/modules/contact/tests/src/Functional/ContactSitewideTest.php
index 20dac96684ee47426996dce81b1675a01eabc596..f2f40ba6dd0c775e6f59bd968e75b98a6a59ac03 100644
--- a/core/modules/contact/tests/src/Functional/ContactSitewideTest.php
+++ b/core/modules/contact/tests/src/Functional/ContactSitewideTest.php
@@ -29,7 +29,7 @@ class ContactSitewideTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['text', 'contact', 'field_ui', 'contact_test', 'block', 'error_service_test', 'dblog'];
+  protected static $modules = ['text', 'contact', 'field_ui', 'contact_test', 'block', 'error_service_test', 'dblog'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/contact/tests/src/Functional/ContactStorageTest.php b/core/modules/contact/tests/src/Functional/ContactStorageTest.php
index ac964f935362b4ca61518e6f87e75afb4fa6586e..3ef5ccc47db3a44bad8bbb40e44103243d2f50cd 100644
--- a/core/modules/contact/tests/src/Functional/ContactStorageTest.php
+++ b/core/modules/contact/tests/src/Functional/ContactStorageTest.php
@@ -22,7 +22,7 @@ class ContactStorageTest extends ContactSitewideTest {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'block',
     'text',
     'contact',
diff --git a/core/modules/contact/tests/src/Functional/Hal/ContactFormHalJsonAnonTest.php b/core/modules/contact/tests/src/Functional/Hal/ContactFormHalJsonAnonTest.php
index 4a9babde3378b905963c6758d3987300de5c91f5..0f36180d6dd2ad655ed0dfc30879dc910d56bee0 100644
--- a/core/modules/contact/tests/src/Functional/Hal/ContactFormHalJsonAnonTest.php
+++ b/core/modules/contact/tests/src/Functional/Hal/ContactFormHalJsonAnonTest.php
@@ -15,7 +15,7 @@ class ContactFormHalJsonAnonTest extends ContactFormResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/contact/tests/src/Functional/Hal/ContactFormHalJsonBasicAuthTest.php b/core/modules/contact/tests/src/Functional/Hal/ContactFormHalJsonBasicAuthTest.php
index 36d867235fcf63a1cf908e12fe9016bf4cf3dfc1..8fdc3218687106a7100ff11e4ce5a248f1f9eea1 100644
--- a/core/modules/contact/tests/src/Functional/Hal/ContactFormHalJsonBasicAuthTest.php
+++ b/core/modules/contact/tests/src/Functional/Hal/ContactFormHalJsonBasicAuthTest.php
@@ -15,7 +15,7 @@ class ContactFormHalJsonBasicAuthTest extends ContactFormResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal', 'basic_auth'];
+  protected static $modules = ['hal', 'basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/contact/tests/src/Functional/Hal/ContactFormHalJsonCookieTest.php b/core/modules/contact/tests/src/Functional/Hal/ContactFormHalJsonCookieTest.php
index d61e132a1abd6cbd4724f482e505984c09de29c7..35866c0e82449a9d3b82975cc912730c0172b7d3 100644
--- a/core/modules/contact/tests/src/Functional/Hal/ContactFormHalJsonCookieTest.php
+++ b/core/modules/contact/tests/src/Functional/Hal/ContactFormHalJsonCookieTest.php
@@ -15,7 +15,7 @@ class ContactFormHalJsonCookieTest extends ContactFormResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/contact/tests/src/Functional/Hal/MessageHalJsonAnonTest.php b/core/modules/contact/tests/src/Functional/Hal/MessageHalJsonAnonTest.php
index a95841f29962280c186f5c782df6791a98c6540e..5dc42402c7427540d9d88721c97e3afc270beffc 100644
--- a/core/modules/contact/tests/src/Functional/Hal/MessageHalJsonAnonTest.php
+++ b/core/modules/contact/tests/src/Functional/Hal/MessageHalJsonAnonTest.php
@@ -17,7 +17,7 @@ class MessageHalJsonAnonTest extends MessageResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/contact/tests/src/Functional/Hal/MessageHalJsonBasicAuthTest.php b/core/modules/contact/tests/src/Functional/Hal/MessageHalJsonBasicAuthTest.php
index 4da136e45e9aebd2ed58ca6c07695e6048d356ac..961b99237f2b9ebaaf6c735dd986b1a40a51fc10 100644
--- a/core/modules/contact/tests/src/Functional/Hal/MessageHalJsonBasicAuthTest.php
+++ b/core/modules/contact/tests/src/Functional/Hal/MessageHalJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class MessageHalJsonBasicAuthTest extends MessageHalJsonAnonTest {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/contact/tests/src/Functional/Rest/ContactFormJsonBasicAuthTest.php b/core/modules/contact/tests/src/Functional/Rest/ContactFormJsonBasicAuthTest.php
index f5047081bdb55ee1ea7b71923c3c86636ea4c5a0..af53106c09bfc4b38a977ca9c321a053c2e1a0d4 100644
--- a/core/modules/contact/tests/src/Functional/Rest/ContactFormJsonBasicAuthTest.php
+++ b/core/modules/contact/tests/src/Functional/Rest/ContactFormJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class ContactFormJsonBasicAuthTest extends ContactFormResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/contact/tests/src/Functional/Rest/ContactFormResourceTestBase.php b/core/modules/contact/tests/src/Functional/Rest/ContactFormResourceTestBase.php
index 3ade2b36f46b3a6cd372086be6cdf71c7d066658..5bfba6fb8e4b3e170139e5c5bba98237ca163749 100644
--- a/core/modules/contact/tests/src/Functional/Rest/ContactFormResourceTestBase.php
+++ b/core/modules/contact/tests/src/Functional/Rest/ContactFormResourceTestBase.php
@@ -10,7 +10,7 @@ abstract class ContactFormResourceTestBase extends EntityResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['contact'];
+  protected static $modules = ['contact'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/contact/tests/src/Functional/Rest/ContactFormXmlBasicAuthTest.php b/core/modules/contact/tests/src/Functional/Rest/ContactFormXmlBasicAuthTest.php
index a2588c9f3b1d21b4849c922de9c09b0cebb0d4a5..2e17550a8f8883176623fb4743d6aa1b78014c1f 100644
--- a/core/modules/contact/tests/src/Functional/Rest/ContactFormXmlBasicAuthTest.php
+++ b/core/modules/contact/tests/src/Functional/Rest/ContactFormXmlBasicAuthTest.php
@@ -16,7 +16,7 @@ class ContactFormXmlBasicAuthTest extends ContactFormResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/contact/tests/src/Functional/Rest/MessageJsonBasicAuthTest.php b/core/modules/contact/tests/src/Functional/Rest/MessageJsonBasicAuthTest.php
index 0d281630b078f758dfd903ff780fbcca16e456ed..53ec8bb7a58f725049eec6890aa7d6d651f39620 100644
--- a/core/modules/contact/tests/src/Functional/Rest/MessageJsonBasicAuthTest.php
+++ b/core/modules/contact/tests/src/Functional/Rest/MessageJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class MessageJsonBasicAuthTest extends MessageResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/contact/tests/src/Functional/Rest/MessageResourceTestBase.php b/core/modules/contact/tests/src/Functional/Rest/MessageResourceTestBase.php
index 3645da3cd82e7a1c4a98f079c239f19071f803a7..cf37c75cc0525d761078837d2352359ad3e5ed6e 100644
--- a/core/modules/contact/tests/src/Functional/Rest/MessageResourceTestBase.php
+++ b/core/modules/contact/tests/src/Functional/Rest/MessageResourceTestBase.php
@@ -13,7 +13,7 @@ abstract class MessageResourceTestBase extends EntityResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['contact'];
+  protected static $modules = ['contact'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/contact/tests/src/Functional/Rest/MessageXmlBasicAuthTest.php b/core/modules/contact/tests/src/Functional/Rest/MessageXmlBasicAuthTest.php
index 64547a5a720a8f91bebd52d209ac93efe1ed3bf7..41d417283ba406f4fbdd7effbeccde2f960802b8 100644
--- a/core/modules/contact/tests/src/Functional/Rest/MessageXmlBasicAuthTest.php
+++ b/core/modules/contact/tests/src/Functional/Rest/MessageXmlBasicAuthTest.php
@@ -16,7 +16,7 @@ class MessageXmlBasicAuthTest extends MessageResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/contact/tests/src/Functional/Views/ContactLinkTest.php b/core/modules/contact/tests/src/Functional/Views/ContactLinkTest.php
index bcc58f168c0bcd17ae80eea043768c9435f63567..298b9774edc73ccac0ead40464c8604ab0067e85 100644
--- a/core/modules/contact/tests/src/Functional/Views/ContactLinkTest.php
+++ b/core/modules/contact/tests/src/Functional/Views/ContactLinkTest.php
@@ -27,7 +27,7 @@ class ContactLinkTest extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = ['contact_test_views'];
+  protected static $modules = ['contact_test_views'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/contact/tests/src/Kernel/MessageEntityTest.php b/core/modules/contact/tests/src/Kernel/MessageEntityTest.php
index a70dc0f89b8a6670ee991dbc8c6110ecc670bd79..191dd828a1d22281b2c7f8755c1f33f4c9c9d2fd 100644
--- a/core/modules/contact/tests/src/Kernel/MessageEntityTest.php
+++ b/core/modules/contact/tests/src/Kernel/MessageEntityTest.php
@@ -17,7 +17,7 @@ class MessageEntityTest extends EntityKernelTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'system',
     'contact',
     'field',
diff --git a/core/modules/contact/tests/src/Kernel/Migrate/MigrateContactCategoryTest.php b/core/modules/contact/tests/src/Kernel/Migrate/MigrateContactCategoryTest.php
index 72eee9a7efb484132fd4f112d7ed8b25ce53415e..a55f14b3bbf34513eebfc2b88e617bd77f4fe49d 100644
--- a/core/modules/contact/tests/src/Kernel/Migrate/MigrateContactCategoryTest.php
+++ b/core/modules/contact/tests/src/Kernel/Migrate/MigrateContactCategoryTest.php
@@ -18,7 +18,7 @@ class MigrateContactCategoryTest extends MigrateDrupal6TestBase {
    *
    * @var array
    */
-  public static $modules = ['contact'];
+  protected static $modules = ['contact'];
 
   /**
    * {@inheritdoc}
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 90a3ed1e06643cf823e309fe46c9bd2b64131503..a9c5cac74daecf1080de878470d9b7fcd5c49a0e 100644
--- a/core/modules/contact/tests/src/Kernel/Migrate/d6/MigrateContactSettingsTest.php
+++ b/core/modules/contact/tests/src/Kernel/Migrate/d6/MigrateContactSettingsTest.php
@@ -17,7 +17,7 @@ class MigrateContactSettingsTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['contact'];
+  protected static $modules = ['contact'];
 
   /**
    * {@inheritdoc}
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 bc4d2b6ab4f61c5c297b44957fe039d369e96ed3..e61863c273266aba776a5c806cf483f969f7bab4 100644
--- a/core/modules/contact/tests/src/Kernel/Migrate/d7/MigrateContactSettingsTest.php
+++ b/core/modules/contact/tests/src/Kernel/Migrate/d7/MigrateContactSettingsTest.php
@@ -14,7 +14,7 @@ class MigrateContactSettingsTest extends MigrateDrupal7TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['contact'];
+  protected static $modules = ['contact'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/contact/tests/src/Kernel/Plugin/migrate/source/ContactCategoryTest.php b/core/modules/contact/tests/src/Kernel/Plugin/migrate/source/ContactCategoryTest.php
index 619e0cd10bb5f9be3f9e964a10ccb51c21340d46..1ea9b337f23987215e20bd34b68fa92b7ec49eb7 100644
--- a/core/modules/contact/tests/src/Kernel/Plugin/migrate/source/ContactCategoryTest.php
+++ b/core/modules/contact/tests/src/Kernel/Plugin/migrate/source/ContactCategoryTest.php
@@ -15,7 +15,7 @@ class ContactCategoryTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['contact', 'migrate_drupal', 'user'];
+  protected static $modules = ['contact', 'migrate_drupal', 'user'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/contact/tests/src/Kernel/Plugin/migrate/source/d6/ContactSettingsTest.php b/core/modules/contact/tests/src/Kernel/Plugin/migrate/source/d6/ContactSettingsTest.php
index 6d6afa36d3e4185e3c0da8c535f42a249f7320b3..1d294709849a7f31b7338b14984d15fc863db8a7 100644
--- a/core/modules/contact/tests/src/Kernel/Plugin/migrate/source/d6/ContactSettingsTest.php
+++ b/core/modules/contact/tests/src/Kernel/Plugin/migrate/source/d6/ContactSettingsTest.php
@@ -15,7 +15,7 @@ class ContactSettingsTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['contact', 'migrate_drupal', 'user'];
+  protected static $modules = ['contact', 'migrate_drupal', 'user'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/content_moderation/tests/src/Functional/ContentModerationAdminPathEntityConverterLanguageTest.php b/core/modules/content_moderation/tests/src/Functional/ContentModerationAdminPathEntityConverterLanguageTest.php
index 01cb98a1ffa7a8041e5bd780c0e105795b4e7a4f..9b677ff65a3d19afc7706034d90eeaa30c09237e 100644
--- a/core/modules/content_moderation/tests/src/Functional/ContentModerationAdminPathEntityConverterLanguageTest.php
+++ b/core/modules/content_moderation/tests/src/Functional/ContentModerationAdminPathEntityConverterLanguageTest.php
@@ -14,7 +14,7 @@ class ContentModerationAdminPathEntityConverterLanguageTest extends AdminPathEnt
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['language', 'language_test', 'content_moderation'];
+  protected static $modules = ['language', 'language_test', 'content_moderation'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/content_moderation/tests/src/Functional/ContentModerationWorkflowTypeTest.php b/core/modules/content_moderation/tests/src/Functional/ContentModerationWorkflowTypeTest.php
index aa8cbcdfb936079a5201f0063349db1dcab0092b..1d6f6be159aa462468c12766c293fa4361717e4d 100644
--- a/core/modules/content_moderation/tests/src/Functional/ContentModerationWorkflowTypeTest.php
+++ b/core/modules/content_moderation/tests/src/Functional/ContentModerationWorkflowTypeTest.php
@@ -16,7 +16,7 @@ class ContentModerationWorkflowTypeTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'content_moderation',
     'node',
     'entity_test',
diff --git a/core/modules/content_moderation/tests/src/Functional/ModeratedContentViewTest.php b/core/modules/content_moderation/tests/src/Functional/ModeratedContentViewTest.php
index 1a4481cb84a7c1ec13c190cb17c16c0b1666491d..84db0e9535596a04af0626f72f7ef4055ba34172 100644
--- a/core/modules/content_moderation/tests/src/Functional/ModeratedContentViewTest.php
+++ b/core/modules/content_moderation/tests/src/Functional/ModeratedContentViewTest.php
@@ -26,7 +26,7 @@ class ModeratedContentViewTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'content_moderation',
     'node',
     'views',
diff --git a/core/modules/content_moderation/tests/src/Functional/ModerationActionsTest.php b/core/modules/content_moderation/tests/src/Functional/ModerationActionsTest.php
index d9ef4fb71941ce11bc0a90f2ed825305c9e36a49..3ad35c86eb994f6a157fe6aaaa16ab9725ee0dab 100644
--- a/core/modules/content_moderation/tests/src/Functional/ModerationActionsTest.php
+++ b/core/modules/content_moderation/tests/src/Functional/ModerationActionsTest.php
@@ -22,7 +22,7 @@ class ModerationActionsTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'content_moderation',
     'node',
     'views',
diff --git a/core/modules/content_moderation/tests/src/Functional/ModerationContentTranslationTest.php b/core/modules/content_moderation/tests/src/Functional/ModerationContentTranslationTest.php
index f0dbc3d5268345d7f26c50918e987959c1674258..824e041ae86df62e72c153ce3a00eb04821c28f8 100644
--- a/core/modules/content_moderation/tests/src/Functional/ModerationContentTranslationTest.php
+++ b/core/modules/content_moderation/tests/src/Functional/ModerationContentTranslationTest.php
@@ -26,7 +26,7 @@ class ModerationContentTranslationTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'node',
     'locale',
     'content_translation',
diff --git a/core/modules/content_moderation/tests/src/Functional/ModerationFormTest.php b/core/modules/content_moderation/tests/src/Functional/ModerationFormTest.php
index cc43ae634eca84c279f14071eefd919daa613e2d..4346ea6d8866be947b322c479991ec726e116c46 100644
--- a/core/modules/content_moderation/tests/src/Functional/ModerationFormTest.php
+++ b/core/modules/content_moderation/tests/src/Functional/ModerationFormTest.php
@@ -17,7 +17,7 @@ class ModerationFormTest extends ModerationStateTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'node',
     'content_moderation',
     'locale',
diff --git a/core/modules/content_moderation/tests/src/Functional/ModerationLocaleTest.php b/core/modules/content_moderation/tests/src/Functional/ModerationLocaleTest.php
index 75fa61a93fadee3ec377886e4b574bdb8c11f5d1..f92dcc3d88f7eb07fafedd57cbda2087db99ec70 100644
--- a/core/modules/content_moderation/tests/src/Functional/ModerationLocaleTest.php
+++ b/core/modules/content_moderation/tests/src/Functional/ModerationLocaleTest.php
@@ -16,7 +16,7 @@ class ModerationLocaleTest extends ModerationStateTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'node',
     'content_moderation',
     'locale',
diff --git a/core/modules/content_moderation/tests/src/Functional/ModerationRevisionRevertTest.php b/core/modules/content_moderation/tests/src/Functional/ModerationRevisionRevertTest.php
index 05571d163de4fe44415c13da2adec4e90152bf66..217df4cdb53b2ba5b89f1916d81eb81940a5e86d 100644
--- a/core/modules/content_moderation/tests/src/Functional/ModerationRevisionRevertTest.php
+++ b/core/modules/content_moderation/tests/src/Functional/ModerationRevisionRevertTest.php
@@ -21,7 +21,7 @@ class ModerationRevisionRevertTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'content_moderation',
     'node',
   ];
diff --git a/core/modules/content_moderation/tests/src/Functional/ModerationStateAccessTest.php b/core/modules/content_moderation/tests/src/Functional/ModerationStateAccessTest.php
index efcc7762c120c7d192298d99a8f63dab623ee103..39b7a2e2a2bd98c1d07ed2734cddfd1d737caf3c 100644
--- a/core/modules/content_moderation/tests/src/Functional/ModerationStateAccessTest.php
+++ b/core/modules/content_moderation/tests/src/Functional/ModerationStateAccessTest.php
@@ -19,7 +19,7 @@ class ModerationStateAccessTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'content_moderation',
     'node',
   ];
diff --git a/core/modules/content_moderation/tests/src/Functional/ModerationStateTestBase.php b/core/modules/content_moderation/tests/src/Functional/ModerationStateTestBase.php
index a2600abd7896437a073fbd9ae4b29d05fd7e8b92..5c7c68e34da41fc9ce5a20b478f760267a630aea 100644
--- a/core/modules/content_moderation/tests/src/Functional/ModerationStateTestBase.php
+++ b/core/modules/content_moderation/tests/src/Functional/ModerationStateTestBase.php
@@ -61,7 +61,7 @@ abstract class ModerationStateTestBase extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'content_moderation',
     'block',
     'block_content',
diff --git a/core/modules/content_moderation/tests/src/Functional/NodeAccessTest.php b/core/modules/content_moderation/tests/src/Functional/NodeAccessTest.php
index 328c2a5aa276dc7e52486828d4caccbf45db082a..cb2cb0323047dd057d7552e58c7d556a6acd6fd5 100644
--- a/core/modules/content_moderation/tests/src/Functional/NodeAccessTest.php
+++ b/core/modules/content_moderation/tests/src/Functional/NodeAccessTest.php
@@ -16,7 +16,7 @@ class NodeAccessTest extends ModerationStateTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'content_moderation',
     'block',
     'block_content',
diff --git a/core/modules/content_moderation/tests/src/Functional/ViewsModerationStateFilterTest.php b/core/modules/content_moderation/tests/src/Functional/ViewsModerationStateFilterTest.php
index b5ff61865bc90fcbd352303bd1a6b9c2d8773841..0d3ade65c09f3f2b968b1ff472c633f59d968049 100644
--- a/core/modules/content_moderation/tests/src/Functional/ViewsModerationStateFilterTest.php
+++ b/core/modules/content_moderation/tests/src/Functional/ViewsModerationStateFilterTest.php
@@ -23,7 +23,7 @@ class ViewsModerationStateFilterTest extends ViewTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'node',
     'content_moderation',
     'workflows',
diff --git a/core/modules/content_moderation/tests/src/Functional/WorkspaceContentModerationIntegrationTest.php b/core/modules/content_moderation/tests/src/Functional/WorkspaceContentModerationIntegrationTest.php
index 41c9a0c34f5f12ca24fd7fc9e4b868e18b12fa84..5ad27a011ccce91d12d5e0c5620e032c4cb5cd7d 100644
--- a/core/modules/content_moderation/tests/src/Functional/WorkspaceContentModerationIntegrationTest.php
+++ b/core/modules/content_moderation/tests/src/Functional/WorkspaceContentModerationIntegrationTest.php
@@ -18,7 +18,7 @@ class WorkspaceContentModerationIntegrationTest extends ModerationStateTestBase
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'workspaces'];
+  protected static $modules = ['node', 'workspaces'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/content_moderation/tests/src/Kernel/ContentModerationAccessTest.php b/core/modules/content_moderation/tests/src/Kernel/ContentModerationAccessTest.php
index 2ca795084370fbbb7b51132935c894e90c11df39..6925bc4d149315207b467a0329bc23e1aeeae3f1 100644
--- a/core/modules/content_moderation/tests/src/Kernel/ContentModerationAccessTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/ContentModerationAccessTest.php
@@ -25,7 +25,7 @@ class ContentModerationAccessTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'content_moderation',
     'filter',
     'node',
diff --git a/core/modules/content_moderation/tests/src/Kernel/ContentModerationPermissionsTest.php b/core/modules/content_moderation/tests/src/Kernel/ContentModerationPermissionsTest.php
index 633367415deebfd5c19579c71722fb0f736e050f..e07a0187bbad2e74cdadac4c3779256facf226aa 100644
--- a/core/modules/content_moderation/tests/src/Kernel/ContentModerationPermissionsTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/ContentModerationPermissionsTest.php
@@ -18,7 +18,7 @@ class ContentModerationPermissionsTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'workflows',
     'content_moderation',
     'workflow_type_test',
diff --git a/core/modules/content_moderation/tests/src/Kernel/ContentModerationStateAccessControlHandlerTest.php b/core/modules/content_moderation/tests/src/Kernel/ContentModerationStateAccessControlHandlerTest.php
index 4b7888ee5d7576bf4e4e1a11d35eb5f72dedc1c2..02ea8d37db64789de065add93ba5695b30cf85e2 100644
--- a/core/modules/content_moderation/tests/src/Kernel/ContentModerationStateAccessControlHandlerTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/ContentModerationStateAccessControlHandlerTest.php
@@ -16,7 +16,7 @@ class ContentModerationStateAccessControlHandlerTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'content_moderation',
     'workflows',
     'user',
diff --git a/core/modules/content_moderation/tests/src/Kernel/ContentModerationStateResourceTest.php b/core/modules/content_moderation/tests/src/Kernel/ContentModerationStateResourceTest.php
index a54cb2c1e15a44e95e3fd79a30c023707f84e204..ce85869b0b214fc049dcd671ec2bb19f5bc19f65 100644
--- a/core/modules/content_moderation/tests/src/Kernel/ContentModerationStateResourceTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/ContentModerationStateResourceTest.php
@@ -15,7 +15,7 @@ class ContentModerationStateResourceTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['serialization', 'rest', 'content_moderation'];
+  protected static $modules = ['serialization', 'rest', 'content_moderation'];
 
   /**
    * @see \Drupal\content_moderation\Entity\ContentModerationState
diff --git a/core/modules/content_moderation/tests/src/Kernel/ContentModerationStateStorageSchemaTest.php b/core/modules/content_moderation/tests/src/Kernel/ContentModerationStateStorageSchemaTest.php
index f5d15ab3b122829cb89f3492aaf9f5b770d13cca..a5255d0429bf23bbbc418ac3ace5e387e90dc695 100644
--- a/core/modules/content_moderation/tests/src/Kernel/ContentModerationStateStorageSchemaTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/ContentModerationStateStorageSchemaTest.php
@@ -21,7 +21,7 @@ class ContentModerationStateStorageSchemaTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'node',
     'content_moderation',
     'user',
diff --git a/core/modules/content_moderation/tests/src/Kernel/ContentModerationSyncingTest.php b/core/modules/content_moderation/tests/src/Kernel/ContentModerationSyncingTest.php
index 4d8e75c685ad12a5050774ef14b8c018c46dfea2..5825ed2863901a1eccc249a2ce3323d8824840b9 100644
--- a/core/modules/content_moderation/tests/src/Kernel/ContentModerationSyncingTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/ContentModerationSyncingTest.php
@@ -18,7 +18,7 @@ class ContentModerationSyncingTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'user',
     'workflows',
     'content_moderation',
diff --git a/core/modules/content_moderation/tests/src/Kernel/ContentModerationWorkflowConfigTest.php b/core/modules/content_moderation/tests/src/Kernel/ContentModerationWorkflowConfigTest.php
index 94fdcad0e2b529b927cd549e34aa0dbda311bf73..3351ff421574d94664c73d546d1ec1fe226dcdce 100644
--- a/core/modules/content_moderation/tests/src/Kernel/ContentModerationWorkflowConfigTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/ContentModerationWorkflowConfigTest.php
@@ -20,7 +20,7 @@ class ContentModerationWorkflowConfigTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'node',
     'content_moderation',
     'user',
diff --git a/core/modules/content_moderation/tests/src/Kernel/ContentModerationWorkflowTypeApiTest.php b/core/modules/content_moderation/tests/src/Kernel/ContentModerationWorkflowTypeApiTest.php
index 847245c25b0b7abdc5168c60502354176043fbaf..321ca8f8ddc6c05738527a58e30e77d7fdb0dff9 100644
--- a/core/modules/content_moderation/tests/src/Kernel/ContentModerationWorkflowTypeApiTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/ContentModerationWorkflowTypeApiTest.php
@@ -26,7 +26,7 @@ class ContentModerationWorkflowTypeApiTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'workflows',
     'content_moderation',
   ];
diff --git a/core/modules/content_moderation/tests/src/Kernel/DefaultRevisionStateTest.php b/core/modules/content_moderation/tests/src/Kernel/DefaultRevisionStateTest.php
index 08b72791e64f10ae023777e39bbaac3e5f47c33d..795007042335b6d7a469454b9a07c7fb2d7dbab4 100644
--- a/core/modules/content_moderation/tests/src/Kernel/DefaultRevisionStateTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/DefaultRevisionStateTest.php
@@ -20,7 +20,7 @@ class DefaultRevisionStateTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'entity_test',
     'node',
     'block_content',
diff --git a/core/modules/content_moderation/tests/src/Kernel/EntityOperationsTest.php b/core/modules/content_moderation/tests/src/Kernel/EntityOperationsTest.php
index fe2a0b49518abf2c091bb9ddbc71022218b08294..042de79eed92486bfc70894b9448bb622cbebe50 100644
--- a/core/modules/content_moderation/tests/src/Kernel/EntityOperationsTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/EntityOperationsTest.php
@@ -19,7 +19,7 @@ class EntityOperationsTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'content_moderation',
     'node',
     'user',
diff --git a/core/modules/content_moderation/tests/src/Kernel/EntityStateChangeValidationTest.php b/core/modules/content_moderation/tests/src/Kernel/EntityStateChangeValidationTest.php
index 4b3531e47c50e641457462309cce5beb597d37e8..0c4c504ecfbf30b12563e4432e4a26ba8143cf58 100644
--- a/core/modules/content_moderation/tests/src/Kernel/EntityStateChangeValidationTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/EntityStateChangeValidationTest.php
@@ -21,7 +21,7 @@ class EntityStateChangeValidationTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'node',
     'content_moderation',
     'user',
diff --git a/core/modules/content_moderation/tests/src/Kernel/EntityTypeInfoTest.php b/core/modules/content_moderation/tests/src/Kernel/EntityTypeInfoTest.php
index 958347db621118cc34170f69bfe8d214d1816156..c977f1bf21cbfa17655f595a283751b49db1b8e9 100644
--- a/core/modules/content_moderation/tests/src/Kernel/EntityTypeInfoTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/EntityTypeInfoTest.php
@@ -22,7 +22,7 @@ class EntityTypeInfoTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'content_moderation',
     'workflows',
     'entity_test',
diff --git a/core/modules/content_moderation/tests/src/Kernel/InitialStateTest.php b/core/modules/content_moderation/tests/src/Kernel/InitialStateTest.php
index ef6f140f48079d7e60138ca92810906436142614..bf6b2dc0c31446b0a0f9df30c4b6e7b6da025350 100644
--- a/core/modules/content_moderation/tests/src/Kernel/InitialStateTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/InitialStateTest.php
@@ -20,7 +20,7 @@ class InitialStateTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'entity_test',
     'node',
     'user',
diff --git a/core/modules/content_moderation/tests/src/Kernel/ModerationInformationTest.php b/core/modules/content_moderation/tests/src/Kernel/ModerationInformationTest.php
index 79d7371d6cecee6fd3dfe2de2197d761deb203c6..786e2b8924dcd2bae681e2b990c91f736bb819e9 100644
--- a/core/modules/content_moderation/tests/src/Kernel/ModerationInformationTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/ModerationInformationTest.php
@@ -19,7 +19,7 @@ class ModerationInformationTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'content_moderation',
     'entity_test',
     'user',
diff --git a/core/modules/content_moderation/tests/src/Kernel/ModerationStateFieldItemListTest.php b/core/modules/content_moderation/tests/src/Kernel/ModerationStateFieldItemListTest.php
index 762acffc530c72db6dd2f731c64e2133266985ef..941f34d7a593ce34a51b61e9a2769f7773292391 100644
--- a/core/modules/content_moderation/tests/src/Kernel/ModerationStateFieldItemListTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/ModerationStateFieldItemListTest.php
@@ -21,7 +21,7 @@ class ModerationStateFieldItemListTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'node',
     'content_moderation',
     'user',
diff --git a/core/modules/content_moderation/tests/src/Kernel/ModerationStateWidgetTest.php b/core/modules/content_moderation/tests/src/Kernel/ModerationStateWidgetTest.php
index 42f78dafa1b3769c6404e7ac6654f93ec79c1e1f..a22119f1ac826f95c1a8ef9c683b7d236d3ef272 100644
--- a/core/modules/content_moderation/tests/src/Kernel/ModerationStateWidgetTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/ModerationStateWidgetTest.php
@@ -23,7 +23,7 @@ class ModerationStateWidgetTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'system',
     'user',
     'workflows',
diff --git a/core/modules/content_moderation/tests/src/Kernel/NodeAccessTest.php b/core/modules/content_moderation/tests/src/Kernel/NodeAccessTest.php
index 5bd2a19b94ba811e712b7f20c3f1ad88123b167f..34fcd3c89b5170d8d7469e310fcafefceae5e36f 100644
--- a/core/modules/content_moderation/tests/src/Kernel/NodeAccessTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/NodeAccessTest.php
@@ -29,7 +29,7 @@ class NodeAccessTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'content_moderation',
     'filter',
     'node',
diff --git a/core/modules/content_moderation/tests/src/Kernel/StateFormatterTest.php b/core/modules/content_moderation/tests/src/Kernel/StateFormatterTest.php
index a40444ce6be0e6773356a6dc8bfdf4d9f25ad2d0..c4c38d0d243dbd1106e3d1de01a7e558c937cc81 100644
--- a/core/modules/content_moderation/tests/src/Kernel/StateFormatterTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/StateFormatterTest.php
@@ -21,7 +21,7 @@ class StateFormatterTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'workflows',
     'content_moderation',
     'entity_test',
diff --git a/core/modules/content_moderation/tests/src/Kernel/ViewsDataIntegrationTest.php b/core/modules/content_moderation/tests/src/Kernel/ViewsDataIntegrationTest.php
index 13c00143b48b3b24aff1c5757389a79bde187ec0..96e5aaee40b0afe233e4a23e5b4a2c15637d1daf 100644
--- a/core/modules/content_moderation/tests/src/Kernel/ViewsDataIntegrationTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/ViewsDataIntegrationTest.php
@@ -21,7 +21,7 @@ class ViewsDataIntegrationTest extends ViewsKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'content_moderation_test_views',
     'node',
     'content_moderation',
diff --git a/core/modules/content_moderation/tests/src/Kernel/ViewsModerationStateFilterTest.php b/core/modules/content_moderation/tests/src/Kernel/ViewsModerationStateFilterTest.php
index ab1ff21f978e1a7b0af6267c779c3a979c0ca315..983b20d73347432b253f031d0cfab0f1fb32ba2d 100644
--- a/core/modules/content_moderation/tests/src/Kernel/ViewsModerationStateFilterTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/ViewsModerationStateFilterTest.php
@@ -25,7 +25,7 @@ class ViewsModerationStateFilterTest extends ViewsKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'content_moderation_test_views',
     'node',
     'content_moderation',
diff --git a/core/modules/content_moderation/tests/src/Kernel/ViewsModerationStateSortTest.php b/core/modules/content_moderation/tests/src/Kernel/ViewsModerationStateSortTest.php
index 4a9841fe8415ee80339693fc36c4d355eef1058d..c70480f1badc3490f5f0027117dd28b581e2a97d 100644
--- a/core/modules/content_moderation/tests/src/Kernel/ViewsModerationStateSortTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/ViewsModerationStateSortTest.php
@@ -22,7 +22,7 @@ class ViewsModerationStateSortTest extends ViewsKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'node',
     'content_moderation',
     'workflows',
diff --git a/core/modules/content_translation/tests/src/Functional/ContentTestTranslationUITest.php b/core/modules/content_translation/tests/src/Functional/ContentTestTranslationUITest.php
index bccd3b3821d4d814cd1be6a4520cfc9664c2ef4f..e16aae64b344b21d25b8f36c2fa0249aada9524a 100644
--- a/core/modules/content_translation/tests/src/Functional/ContentTestTranslationUITest.php
+++ b/core/modules/content_translation/tests/src/Functional/ContentTestTranslationUITest.php
@@ -19,7 +19,7 @@ class ContentTestTranslationUITest extends ContentTranslationUITestBase {
    *
    * @var array
    */
-  public static $modules = ['language', 'content_translation', 'entity_test'];
+  protected static $modules = ['language', 'content_translation', 'entity_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationContextualLinksTest.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationContextualLinksTest.php
index 505dc1b440e99ba3f99d57028c82a6d08b4c56c0..b958fa1af644da87b314fd82139a93189aec9102 100644
--- a/core/modules/content_translation/tests/src/Functional/ContentTranslationContextualLinksTest.php
+++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationContextualLinksTest.php
@@ -52,7 +52,7 @@ class ContentTranslationContextualLinksTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['content_translation', 'contextual', 'node'];
+  protected static $modules = ['content_translation', 'contextual', 'node'];
 
   /**
    * The profile to install as a basis for testing.
diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationDisableSettingTest.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationDisableSettingTest.php
index 5b56f880c7d73cbdb7c85a5ea17725c2fe364493..69170c32b1cd39b2bbf886995ed0d14de2a4bb22 100644
--- a/core/modules/content_translation/tests/src/Functional/ContentTranslationDisableSettingTest.php
+++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationDisableSettingTest.php
@@ -14,7 +14,7 @@ class ContentTranslationDisableSettingTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'content_translation',
     'menu_link_content',
     'language',
diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationEnableTest.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationEnableTest.php
index 7ae73a8fd73dfa54bd21de8d1a3e7a40a32f7748..bf9c41b9398a842a9b834cbcd02b7e62ccb7b708 100644
--- a/core/modules/content_translation/tests/src/Functional/ContentTranslationEnableTest.php
+++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationEnableTest.php
@@ -14,7 +14,7 @@ class ContentTranslationEnableTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['entity_test', 'menu_link_content', 'node'];
+  protected static $modules = ['entity_test', 'menu_link_content', 'node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationEntityBundleUITest.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationEntityBundleUITest.php
index 4bf0017295faae13a5095f8eb708b4eb5bf0b114..6044cff296d60546c993a64bc8e342e0d17c7ee2 100644
--- a/core/modules/content_translation/tests/src/Functional/ContentTranslationEntityBundleUITest.php
+++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationEntityBundleUITest.php
@@ -11,7 +11,7 @@
  */
 class ContentTranslationEntityBundleUITest extends BrowserTestBase {
 
-  public static $modules = ['language', 'content_translation', 'node', 'comment', 'field_ui'];
+  protected static $modules = ['language', 'content_translation', 'node', 'comment', 'field_ui'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationLanguageChangeTest.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationLanguageChangeTest.php
index 2e17be6a58f99a38a7086b0c9ecf5abd5c419c2e..083d8a1f2d1f9aa393e1c90ea8f2dbbe8dc6b9eb 100644
--- a/core/modules/content_translation/tests/src/Functional/ContentTranslationLanguageChangeTest.php
+++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationLanguageChangeTest.php
@@ -22,7 +22,7 @@ class ContentTranslationLanguageChangeTest extends NodeTestBase {
    *
    * @var array
    */
-  public static $modules = ['language', 'content_translation', 'content_translation_test', 'node', 'block', 'field_ui', 'image'];
+  protected static $modules = ['language', 'content_translation', 'content_translation_test', 'node', 'block', 'field_ui', 'image'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationLinkTagTest.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationLinkTagTest.php
index d6c687b3ce15e99ff7630a92d2a468ecbcbbf806..395c70a8be268327fa4ce70b0432a8e0331cd6a9 100644
--- a/core/modules/content_translation/tests/src/Functional/ContentTranslationLinkTagTest.php
+++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationLinkTagTest.php
@@ -17,7 +17,7 @@ class ContentTranslationLinkTagTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['entity_test', 'content_translation', 'content_translation_test', 'language'];
+  protected static $modules = ['entity_test', 'content_translation', 'content_translation_test', 'language'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationMetadataFieldsTest.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationMetadataFieldsTest.php
index fd84d571db1d5cea6e7458bf7f97aa94130667cd..cd9205562349ee4f460cc0aa5e4015024abfe349 100644
--- a/core/modules/content_translation/tests/src/Functional/ContentTranslationMetadataFieldsTest.php
+++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationMetadataFieldsTest.php
@@ -28,7 +28,7 @@ class ContentTranslationMetadataFieldsTest extends ContentTranslationTestBase {
    *
    * @var array
    */
-  public static $modules = ['language', 'content_translation', 'node'];
+  protected static $modules = ['language', 'content_translation', 'node'];
 
   /**
    * The profile to install as a basis for testing.
diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationOperationsTest.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationOperationsTest.php
index aca5b6dd07ad9c10ee82c20de0270d77bb8e3f8b..a509660407e28321ab87df810d69bdacfaa493f6 100644
--- a/core/modules/content_translation/tests/src/Functional/ContentTranslationOperationsTest.php
+++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationOperationsTest.php
@@ -37,7 +37,7 @@ class ContentTranslationOperationsTest extends NodeTestBase {
    *
    * @var array
    */
-  public static $modules = ['language', 'content_translation', 'node', 'views', 'block'];
+  protected static $modules = ['language', 'content_translation', 'node', 'views', 'block'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationPendingRevisionTestBase.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationPendingRevisionTestBase.php
index ef0f54aeca44dd8b94130b4c9ccbb7fd780bd80a..50c462eaac83a6e9b903bb8c2eb39e06b02bae2f 100644
--- a/core/modules/content_translation/tests/src/Functional/ContentTranslationPendingRevisionTestBase.php
+++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationPendingRevisionTestBase.php
@@ -17,7 +17,7 @@ abstract class ContentTranslationPendingRevisionTestBase extends ContentTranslat
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['language', 'content_translation', 'content_moderation', 'node'];
+  protected static $modules = ['language', 'content_translation', 'content_moderation', 'node'];
 
   /**
    * The entity storage.
diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationSettingsTest.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationSettingsTest.php
index b9dd35ea3c50a0557e07a07fcfcded6d902a8d7b..72ee6fe20a5b8297743fdd6fa8e2b2839cbcb137 100644
--- a/core/modules/content_translation/tests/src/Functional/ContentTranslationSettingsTest.php
+++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationSettingsTest.php
@@ -25,7 +25,7 @@ class ContentTranslationSettingsTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['language', 'content_translation', 'node', 'comment', 'field_ui', 'entity_test'];
+  protected static $modules = ['language', 'content_translation', 'node', 'comment', 'field_ui', 'entity_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationStandardFieldsTest.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationStandardFieldsTest.php
index 0c5436072a567282a7feb873e168b3091cd95ad4..727d59701465e22706beadf660853ee11acea31c 100644
--- a/core/modules/content_translation/tests/src/Functional/ContentTranslationStandardFieldsTest.php
+++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationStandardFieldsTest.php
@@ -16,7 +16,7 @@ class ContentTranslationStandardFieldsTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'language',
     'content_translation',
     'node',
diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationSyncImageTest.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationSyncImageTest.php
index f3abc3f6b4e2c76af0c79c614a7e78e7085c8cf4..a0442629f7db32fe07db43eaec45e2c51a15828f 100644
--- a/core/modules/content_translation/tests/src/Functional/ContentTranslationSyncImageTest.php
+++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationSyncImageTest.php
@@ -44,7 +44,7 @@ class ContentTranslationSyncImageTest extends ContentTranslationTestBase {
    *
    * @var array
    */
-  public static $modules = ['language', 'content_translation', 'entity_test', 'image', 'field_ui'];
+  protected static $modules = ['language', 'content_translation', 'entity_test', 'image', 'field_ui'];
 
   protected function setUp(): void {
     parent::setUp();
diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationTestBase.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationTestBase.php
index 65bb9aef3dde8a13569e47d4ebc1542b52640149..0c9cd65612f4f44bb456466b9dd52763b1057c47 100644
--- a/core/modules/content_translation/tests/src/Functional/ContentTranslationTestBase.php
+++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationTestBase.php
@@ -19,7 +19,7 @@ abstract class ContentTranslationTestBase extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['text'];
+  protected static $modules = ['text'];
 
   /**
    * The entity type being tested.
diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationUISkipTest.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationUISkipTest.php
index 7f3582d207c25f1fb111312a3da05cdc17982649..765a4bac6dda69fb9bf3705b0cb3da43a39a3462 100644
--- a/core/modules/content_translation/tests/src/Functional/ContentTranslationUISkipTest.php
+++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationUISkipTest.php
@@ -16,7 +16,7 @@ class ContentTranslationUISkipTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['content_translation_test', 'user', 'node'];
+  protected static $modules = ['content_translation_test', 'user', 'node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationUntranslatableFieldsTest.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationUntranslatableFieldsTest.php
index b1166c55a64094e7412ba19bb853d322a38502e3..deb27f96a10fa2e1fe3818590c5b395c2ff701fd 100644
--- a/core/modules/content_translation/tests/src/Functional/ContentTranslationUntranslatableFieldsTest.php
+++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationUntranslatableFieldsTest.php
@@ -17,7 +17,7 @@ class ContentTranslationUntranslatableFieldsTest extends ContentTranslationPendi
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['field_test'];
+  protected static $modules = ['field_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationWorkflowsTest.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationWorkflowsTest.php
index d004b69fe28ea2c7af05001d992729692ab7ded5..848bc951a879e47d5dd87f1113e14262ed7f93b8 100644
--- a/core/modules/content_translation/tests/src/Functional/ContentTranslationWorkflowsTest.php
+++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationWorkflowsTest.php
@@ -29,7 +29,7 @@ class ContentTranslationWorkflowsTest extends ContentTranslationTestBase {
    *
    * @var array
    */
-  public static $modules = ['language', 'content_translation', 'entity_test'];
+  protected static $modules = ['language', 'content_translation', 'entity_test'];
 
   /**
    * {@inheritdoc}
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 351ff78de72416cf832b7432122c431d8d600902..41c82ce01aa7af39c7098902d55afbf251d114e9 100644
--- a/core/modules/content_translation/tests/src/Functional/Views/ContentTranslationViewsUITest.php
+++ b/core/modules/content_translation/tests/src/Functional/Views/ContentTranslationViewsUITest.php
@@ -23,7 +23,7 @@ class ContentTranslationViewsUITest extends UITestBase {
    *
    * @var array
    */
-  public static $modules = ['content_translation'];
+  protected static $modules = ['content_translation'];
 
   /**
    * {@inheritdoc}
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 0109932fd859b2c1c093f93e82cd961ba0723507..7e83fe24e5fcbec6c4a2fee8430ddf0f3b155ef2 100644
--- a/core/modules/content_translation/tests/src/Functional/Views/TranslationLinkTest.php
+++ b/core/modules/content_translation/tests/src/Functional/Views/TranslationLinkTest.php
@@ -27,7 +27,7 @@ class TranslationLinkTest extends ContentTranslationTestBase {
    *
    * @var array
    */
-  public static $modules = ['content_translation_test_views'];
+  protected static $modules = ['content_translation_test_views'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/content_translation/tests/src/FunctionalJavascript/ContentTranslationContextualLinksTest.php b/core/modules/content_translation/tests/src/FunctionalJavascript/ContentTranslationContextualLinksTest.php
index e224bbb61c89a46b181247690b0d934579cc1677..5a3bb717872b2da875675b61ffa696a57024f28d 100644
--- a/core/modules/content_translation/tests/src/FunctionalJavascript/ContentTranslationContextualLinksTest.php
+++ b/core/modules/content_translation/tests/src/FunctionalJavascript/ContentTranslationContextualLinksTest.php
@@ -22,7 +22,7 @@ class ContentTranslationContextualLinksTest extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['content_translation', 'contextual', 'node'];
+  protected static $modules = ['content_translation', 'contextual', 'node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/content_translation/tests/src/Kernel/ContentTranslationConfigImportTest.php b/core/modules/content_translation/tests/src/Kernel/ContentTranslationConfigImportTest.php
index 220c7efd8c00b9035229fef5fcbd1f6ad3c647ba..5371a3eafe6da30f0a1138cfed054f122cdd4e9e 100644
--- a/core/modules/content_translation/tests/src/Kernel/ContentTranslationConfigImportTest.php
+++ b/core/modules/content_translation/tests/src/Kernel/ContentTranslationConfigImportTest.php
@@ -25,7 +25,7 @@ class ContentTranslationConfigImportTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['system', 'user', 'entity_test', 'language', 'content_translation'];
+  protected static $modules = ['system', 'user', 'entity_test', 'language', 'content_translation'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/content_translation/tests/src/Kernel/ContentTranslationEntityBundleInfoTest.php b/core/modules/content_translation/tests/src/Kernel/ContentTranslationEntityBundleInfoTest.php
index de14bd22631e091cd14ca7907363f6a56dc932fa..7972f502a91afb2a673371d8ac6f694a56480491 100644
--- a/core/modules/content_translation/tests/src/Kernel/ContentTranslationEntityBundleInfoTest.php
+++ b/core/modules/content_translation/tests/src/Kernel/ContentTranslationEntityBundleInfoTest.php
@@ -18,7 +18,7 @@ class ContentTranslationEntityBundleInfoTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'system',
     'node',
     'user',
diff --git a/core/modules/content_translation/tests/src/Kernel/ContentTranslationFieldSyncRevisionTest.php b/core/modules/content_translation/tests/src/Kernel/ContentTranslationFieldSyncRevisionTest.php
index 5764b1eaa5da7b263be379d00117073899909b62..43fb2576081af49e3cc711448923e2397cf27a1c 100644
--- a/core/modules/content_translation/tests/src/Kernel/ContentTranslationFieldSyncRevisionTest.php
+++ b/core/modules/content_translation/tests/src/Kernel/ContentTranslationFieldSyncRevisionTest.php
@@ -26,7 +26,7 @@ class ContentTranslationFieldSyncRevisionTest extends EntityKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['file', 'image', 'language', 'content_translation', 'content_translation_test'];
+  protected static $modules = ['file', 'image', 'language', 'content_translation', 'content_translation_test'];
 
   /**
    * The synchronized field name.
diff --git a/core/modules/content_translation/tests/src/Kernel/ContentTranslationSettingsApiTest.php b/core/modules/content_translation/tests/src/Kernel/ContentTranslationSettingsApiTest.php
index 1b41917d04f1938249d11fd3216b3197f10e8e87..285d0d4db141df737cdb0e6ef285322f3d154343 100644
--- a/core/modules/content_translation/tests/src/Kernel/ContentTranslationSettingsApiTest.php
+++ b/core/modules/content_translation/tests/src/Kernel/ContentTranslationSettingsApiTest.php
@@ -17,7 +17,7 @@ class ContentTranslationSettingsApiTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['language', 'content_translation', 'user', 'entity_test'];
+  protected static $modules = ['language', 'content_translation', 'user', 'entity_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/content_translation/tests/src/Kernel/ContentTranslationSyncUnitTest.php b/core/modules/content_translation/tests/src/Kernel/ContentTranslationSyncUnitTest.php
index e46efafb275d5b457cbe5cc925b48e17a563d8fc..88fc0b468fab90ac740817bf2a1731dffd0ed16e 100644
--- a/core/modules/content_translation/tests/src/Kernel/ContentTranslationSyncUnitTest.php
+++ b/core/modules/content_translation/tests/src/Kernel/ContentTranslationSyncUnitTest.php
@@ -54,7 +54,7 @@ class ContentTranslationSyncUnitTest extends KernelTestBase {
    */
   protected $unchangedFieldValues;
 
-  public static $modules = ['language', 'content_translation'];
+  protected static $modules = ['language', 'content_translation'];
 
   protected function setUp(): void {
     parent::setUp();
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 0ae9dd6cfe04fba6faf75b5cd28719660a6163f4..70b961c52a135391f889435f028bbea5337487e9 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
@@ -16,7 +16,7 @@ class MigrateTaxonomyTermTranslationTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'content_translation',
     'language',
     'menu_ui',
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 ba99e0f9b15c9802d969fa091618e4ab76014fe1..34d0954fae3abc0b7fa470dd05058eb101bc46fe 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
@@ -15,7 +15,7 @@ class MigrateEntityTranslationSettingsTest extends MigrateDrupal7TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'comment',
     'content_translation',
     'language',
diff --git a/core/modules/content_translation/tests/src/Kernel/Plugin/migrate/source/d7/EntityTranslationSettingsTest.php b/core/modules/content_translation/tests/src/Kernel/Plugin/migrate/source/d7/EntityTranslationSettingsTest.php
index db0d33292769047ccac994773534ae01dab6964c..7a25bf599da28e245c7c794619fef7af9fcc4ac4 100644
--- a/core/modules/content_translation/tests/src/Kernel/Plugin/migrate/source/d7/EntityTranslationSettingsTest.php
+++ b/core/modules/content_translation/tests/src/Kernel/Plugin/migrate/source/d7/EntityTranslationSettingsTest.php
@@ -16,7 +16,7 @@ class EntityTranslationSettingsTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'content_translation',
     'language',
     'migrate_drupal',
diff --git a/core/modules/contextual/tests/src/Functional/ContextualDynamicContextTest.php b/core/modules/contextual/tests/src/Functional/ContextualDynamicContextTest.php
index 13aa6bd0160204982cf5923fa7917a3d821bea23..f519ef713fb901d9fa84e7bd873053248f4f1e85 100644
--- a/core/modules/contextual/tests/src/Functional/ContextualDynamicContextTest.php
+++ b/core/modules/contextual/tests/src/Functional/ContextualDynamicContextTest.php
@@ -48,7 +48,7 @@ class ContextualDynamicContextTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['contextual', 'node', 'views', 'views_ui', 'language', 'menu_test'];
+  protected static $modules = ['contextual', 'node', 'views', 'views_ui', 'language', 'menu_test'];
 
   protected function setUp(): void {
     parent::setUp();
diff --git a/core/modules/contextual/tests/src/FunctionalJavascript/ContextualLinksTest.php b/core/modules/contextual/tests/src/FunctionalJavascript/ContextualLinksTest.php
index ecfbcb9ac219b2a33d72bd1837bed36824253745..c53325ed502246dc338c31b789838186e8f90be8 100644
--- a/core/modules/contextual/tests/src/FunctionalJavascript/ContextualLinksTest.php
+++ b/core/modules/contextual/tests/src/FunctionalJavascript/ContextualLinksTest.php
@@ -17,7 +17,7 @@ class ContextualLinksTest extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['block', 'contextual'];
+  protected static $modules = ['block', 'contextual'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/contextual/tests/src/FunctionalJavascript/EditModeTest.php b/core/modules/contextual/tests/src/FunctionalJavascript/EditModeTest.php
index a91181ee0d74a7d3f2ac4bbf145b52383924f819..f80a2803ec7517d757d20de74c53b0b57a27a7d0 100644
--- a/core/modules/contextual/tests/src/FunctionalJavascript/EditModeTest.php
+++ b/core/modules/contextual/tests/src/FunctionalJavascript/EditModeTest.php
@@ -19,7 +19,7 @@ class EditModeTest extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'node',
     'block',
     'user',
diff --git a/core/modules/contextual/tests/src/Kernel/ContextualUnitTest.php b/core/modules/contextual/tests/src/Kernel/ContextualUnitTest.php
index 0e5f721375fc04495e6cc8985c7ee81997245a4b..84f5ba8c266c04eb06b8cec05b4162d9327bd45e 100644
--- a/core/modules/contextual/tests/src/Kernel/ContextualUnitTest.php
+++ b/core/modules/contextual/tests/src/Kernel/ContextualUnitTest.php
@@ -17,7 +17,7 @@ class ContextualUnitTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['contextual'];
+  protected static $modules = ['contextual'];
 
   /**
    * Provides testcases for testContextualLinksToId() and
diff --git a/core/modules/datetime/tests/src/Functional/DateFilterTest.php b/core/modules/datetime/tests/src/Functional/DateFilterTest.php
index 0d9c956ec4cd348e29179de5ae3f321a16f83af4..14053070a9b1fce529ba515299ef95d7566aa9cc 100644
--- a/core/modules/datetime/tests/src/Functional/DateFilterTest.php
+++ b/core/modules/datetime/tests/src/Functional/DateFilterTest.php
@@ -34,7 +34,7 @@ class DateFilterTest extends ViewTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'datetime_test',
     'node',
     'datetime',
diff --git a/core/modules/datetime/tests/src/Functional/DateTestBase.php b/core/modules/datetime/tests/src/Functional/DateTestBase.php
index fffeabdad2fc1e92223dc9cbed3680b43426a0ba..0a85d7a60bb0a3c1edeb0f58f55671601b68a3d5 100644
--- a/core/modules/datetime/tests/src/Functional/DateTestBase.php
+++ b/core/modules/datetime/tests/src/Functional/DateTestBase.php
@@ -21,7 +21,7 @@ abstract class DateTestBase extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'entity_test', 'datetime', 'field_ui'];
+  protected static $modules = ['node', 'entity_test', 'datetime', 'field_ui'];
 
   /**
    * An array of display options.
diff --git a/core/modules/datetime/tests/src/Functional/DateTimeTimeAgoFormatterTest.php b/core/modules/datetime/tests/src/Functional/DateTimeTimeAgoFormatterTest.php
index 04c6e902293de2da4cbf37f7a8f30712177f4768..266187122f8a14233755ad09d7c0ebc22a9e85df 100644
--- a/core/modules/datetime/tests/src/Functional/DateTimeTimeAgoFormatterTest.php
+++ b/core/modules/datetime/tests/src/Functional/DateTimeTimeAgoFormatterTest.php
@@ -39,7 +39,7 @@ class DateTimeTimeAgoFormatterTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['datetime', 'entity_test', 'field_ui'];
+  protected static $modules = ['datetime', 'entity_test', 'field_ui'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/datetime/tests/src/Functional/EntityResource/EntityTest/EntityTestDateonlyTest.php b/core/modules/datetime/tests/src/Functional/EntityResource/EntityTest/EntityTestDateonlyTest.php
index 4e72d23ced5bce4c6246dcfd49f8fb118ebb02f0..9439f8cf4a23188577b9700861093c60f4bef40f 100644
--- a/core/modules/datetime/tests/src/Functional/EntityResource/EntityTest/EntityTestDateonlyTest.php
+++ b/core/modules/datetime/tests/src/Functional/EntityResource/EntityTest/EntityTestDateonlyTest.php
@@ -42,7 +42,7 @@ class EntityTestDateonlyTest extends EntityTestResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['datetime', 'entity_test'];
+  protected static $modules = ['datetime', 'entity_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/datetime/tests/src/Functional/EntityResource/EntityTest/EntityTestDatetimeTest.php b/core/modules/datetime/tests/src/Functional/EntityResource/EntityTest/EntityTestDatetimeTest.php
index a8e86a0c2b3d5142f905c945a22e8cf305b16ec0..f9313f112265d0a46a17d9e47fc6ff0556040fb3 100644
--- a/core/modules/datetime/tests/src/Functional/EntityResource/EntityTest/EntityTestDatetimeTest.php
+++ b/core/modules/datetime/tests/src/Functional/EntityResource/EntityTest/EntityTestDatetimeTest.php
@@ -42,7 +42,7 @@ class EntityTestDatetimeTest extends EntityTestResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['datetime', 'entity_test'];
+  protected static $modules = ['datetime', 'entity_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/datetime/tests/src/Functional/Views/FilterDateTest.php b/core/modules/datetime/tests/src/Functional/Views/FilterDateTest.php
index 17d29be85135953bc09f2766879f19b5c939db40..7a42aead14b0752368821947bc10612daba0fc79 100644
--- a/core/modules/datetime/tests/src/Functional/Views/FilterDateTest.php
+++ b/core/modules/datetime/tests/src/Functional/Views/FilterDateTest.php
@@ -41,7 +41,7 @@ class FilterDateTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'datetime',
     'datetime_test',
     'node',
diff --git a/core/modules/datetime/tests/src/Kernel/DateTimeFormInjectionTest.php b/core/modules/datetime/tests/src/Kernel/DateTimeFormInjectionTest.php
index da565b13b8d3402c4be338573c7d37a007dfb187..7b9bc90d1436f3f57afe27898a5dc7e6572762b5 100644
--- a/core/modules/datetime/tests/src/Kernel/DateTimeFormInjectionTest.php
+++ b/core/modules/datetime/tests/src/Kernel/DateTimeFormInjectionTest.php
@@ -30,7 +30,7 @@ class DateTimeFormInjectionTest extends KernelTestBase implements FormInterface
    *
    * @var array
    */
-  public static $modules = ['system', 'datetime'];
+  protected static $modules = ['system', 'datetime'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/datetime/tests/src/Kernel/DateTimeItemTest.php b/core/modules/datetime/tests/src/Kernel/DateTimeItemTest.php
index 613d67a74adeae4794a05a7cbe936cc0d5f3810d..b43ee81605ae1d592307d32053b55f5b2e3c5409 100644
--- a/core/modules/datetime/tests/src/Kernel/DateTimeItemTest.php
+++ b/core/modules/datetime/tests/src/Kernel/DateTimeItemTest.php
@@ -38,7 +38,7 @@ class DateTimeItemTest extends FieldKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['datetime'];
+  protected static $modules = ['datetime'];
 
   protected function setUp(): void {
     parent::setUp();
diff --git a/core/modules/datetime/tests/src/Kernel/Views/DateTimeHandlerTestBase.php b/core/modules/datetime/tests/src/Kernel/Views/DateTimeHandlerTestBase.php
index 82c54def0405199f6d8400265980bb0651c8e14c..b7f47f5e89e69239fc3c405202691b1272e3e738 100644
--- a/core/modules/datetime/tests/src/Kernel/Views/DateTimeHandlerTestBase.php
+++ b/core/modules/datetime/tests/src/Kernel/Views/DateTimeHandlerTestBase.php
@@ -19,7 +19,7 @@ abstract class DateTimeHandlerTestBase extends ViewsKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['datetime_test', 'node', 'datetime', 'field'];
+  protected static $modules = ['datetime_test', 'node', 'datetime', 'field'];
 
   /**
    * Name of the field.
diff --git a/core/modules/datetime_range/tests/src/Functional/DateRangeFieldTest.php b/core/modules/datetime_range/tests/src/Functional/DateRangeFieldTest.php
index 58d92c0e0a4c1cfb7555dc1ab14dcd6d80f21919..bc412837de9a307f33b75eea95fe9ea0c99d8907 100644
--- a/core/modules/datetime_range/tests/src/Functional/DateRangeFieldTest.php
+++ b/core/modules/datetime_range/tests/src/Functional/DateRangeFieldTest.php
@@ -25,7 +25,7 @@ class DateRangeFieldTest extends DateTestBase {
    *
    * @var array
    */
-  public static $modules = ['datetime_range'];
+  protected static $modules = ['datetime_range'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/datetime_range/tests/src/Functional/EntityResource/EntityTest/EntityTestDateRangeTest.php b/core/modules/datetime_range/tests/src/Functional/EntityResource/EntityTest/EntityTestDateRangeTest.php
index f9b15c06b773b5f93478b03b6e9470e116d7fc2c..15bc8174459389461776d6c11d6a8780aea943ca 100644
--- a/core/modules/datetime_range/tests/src/Functional/EntityResource/EntityTest/EntityTestDateRangeTest.php
+++ b/core/modules/datetime_range/tests/src/Functional/EntityResource/EntityTest/EntityTestDateRangeTest.php
@@ -37,7 +37,7 @@ class EntityTestDateRangeTest extends EntityTestResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['datetime_range', 'entity_test'];
+  protected static $modules = ['datetime_range', 'entity_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/datetime_range/tests/src/Kernel/DateRangeItemTest.php b/core/modules/datetime_range/tests/src/Kernel/DateRangeItemTest.php
index b8a409e8a244e5ad90ad5b06d3898141ff6d8f19..9620f5cf8dcee77cf30c73c262c664cca7a5cba1 100644
--- a/core/modules/datetime_range/tests/src/Kernel/DateRangeItemTest.php
+++ b/core/modules/datetime_range/tests/src/Kernel/DateRangeItemTest.php
@@ -33,7 +33,7 @@ class DateRangeItemTest extends FieldKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'datetime',
     'datetime_range',
   ];
diff --git a/core/modules/datetime_range/tests/src/Kernel/SeparatorTranslationTest.php b/core/modules/datetime_range/tests/src/Kernel/SeparatorTranslationTest.php
index 9bd3dd24d653e8bdb5900e2cf5b3202ac1a7bbb5..0558f60af581b2ee07bba412b0d35bcedd5ad997 100644
--- a/core/modules/datetime_range/tests/src/Kernel/SeparatorTranslationTest.php
+++ b/core/modules/datetime_range/tests/src/Kernel/SeparatorTranslationTest.php
@@ -35,7 +35,7 @@ class SeparatorTranslationTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'datetime',
     'datetime_range',
     'entity_test',
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 e46cf485887804e716abc3279a134b9f8826f8b8..e118af5fd7a8c102c8ff72fbc4389fa789b2e3ef 100644
--- a/core/modules/datetime_range/tests/src/Kernel/Views/FilterDateTest.php
+++ b/core/modules/datetime_range/tests/src/Kernel/Views/FilterDateTest.php
@@ -18,7 +18,7 @@ class FilterDateTest extends DateTimeHandlerTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['datetime_test', 'node', 'datetime_range', 'field'];
+  protected static $modules = ['datetime_test', 'node', 'datetime_range', 'field'];
 
   /**
    * Type of the field.
diff --git a/core/modules/dblog/tests/src/Functional/DbLogResourceTest.php b/core/modules/dblog/tests/src/Functional/DbLogResourceTest.php
index ed18adbce0a4169ea21a3fb34babb70845afd887..5f820375000e796f380a0aa747bcf7f55df5d027 100644
--- a/core/modules/dblog/tests/src/Functional/DbLogResourceTest.php
+++ b/core/modules/dblog/tests/src/Functional/DbLogResourceTest.php
@@ -45,7 +45,7 @@ class DbLogResourceTest extends ResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal', 'dblog'];
+  protected static $modules = ['hal', 'dblog'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/dblog/tests/src/Functional/DbLogTest.php b/core/modules/dblog/tests/src/Functional/DbLogTest.php
index 803114054ac2176efe185d0c9b480e33a073985d..79e06a854e416b4397dbc511f93d0b541463c9d0 100644
--- a/core/modules/dblog/tests/src/Functional/DbLogTest.php
+++ b/core/modules/dblog/tests/src/Functional/DbLogTest.php
@@ -27,7 +27,7 @@ class DbLogTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'dblog',
     'error_test',
     'node',
diff --git a/core/modules/dblog/tests/src/Functional/DbLogViewsTest.php b/core/modules/dblog/tests/src/Functional/DbLogViewsTest.php
index cbb86f8c54e0859653061b669addb3d69130f76f..2ac4c1ee807e7e2cb6f2d38c7567b784c957d07d 100644
--- a/core/modules/dblog/tests/src/Functional/DbLogViewsTest.php
+++ b/core/modules/dblog/tests/src/Functional/DbLogViewsTest.php
@@ -19,7 +19,7 @@ class DbLogViewsTest extends DbLogTest {
    *
    * @var array
    */
-  public static $modules = ['dblog', 'node', 'forum', 'help', 'block', 'views'];
+  protected static $modules = ['dblog', 'node', 'forum', 'help', 'block', 'views'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/dblog/tests/src/Kernel/DbLogControllerTest.php b/core/modules/dblog/tests/src/Kernel/DbLogControllerTest.php
index 19dc72583556513e2d45f2b536a27c374aa65c9d..2aac3efe53c1b2a4227a149a6a3fd49eb26a71e0 100644
--- a/core/modules/dblog/tests/src/Kernel/DbLogControllerTest.php
+++ b/core/modules/dblog/tests/src/Kernel/DbLogControllerTest.php
@@ -15,7 +15,7 @@ class DbLogControllerTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['dblog', 'user'];
+  protected static $modules = ['dblog', 'user'];
 
   public function setUp(): void {
     parent::setUp();
diff --git a/core/modules/dblog/tests/src/Kernel/DbLogFormInjectionTest.php b/core/modules/dblog/tests/src/Kernel/DbLogFormInjectionTest.php
index f1804c9c7148215d659fbdfcae78058a4917757f..2b9a67a0fc051ddd99e2b983fd79e45634732a02 100644
--- a/core/modules/dblog/tests/src/Kernel/DbLogFormInjectionTest.php
+++ b/core/modules/dblog/tests/src/Kernel/DbLogFormInjectionTest.php
@@ -30,7 +30,7 @@ class DbLogFormInjectionTest extends KernelTestBase implements FormInterface {
    *
    * @var array
    */
-  public static $modules = ['system', 'dblog', 'user'];
+  protected static $modules = ['system', 'dblog', 'user'];
 
   /**
    * {@inheritdoc}
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 489d64f8dd1f55373f7360b9db41ce81dfb2b8fe..486b2176891647d52d0b2898376be3ecd27a6d7c 100644
--- a/core/modules/dblog/tests/src/Kernel/Migrate/d6/MigrateDblogConfigsTest.php
+++ b/core/modules/dblog/tests/src/Kernel/Migrate/d6/MigrateDblogConfigsTest.php
@@ -17,7 +17,7 @@ class MigrateDblogConfigsTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['dblog'];
+  protected static $modules = ['dblog'];
 
   /**
    * {@inheritdoc}
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 3bc424dbb9d680b5f694d6918e957682afedb3e4..f5fca40ec6db4d5b9f0a5e9391b24968df677545 100644
--- a/core/modules/dblog/tests/src/Kernel/Migrate/d7/MigrateDblogConfigsTest.php
+++ b/core/modules/dblog/tests/src/Kernel/Migrate/d7/MigrateDblogConfigsTest.php
@@ -14,7 +14,7 @@ class MigrateDblogConfigsTest extends MigrateDrupal7TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['dblog'];
+  protected static $modules = ['dblog'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/dblog/tests/src/Kernel/Views/ViewsIntegrationTest.php b/core/modules/dblog/tests/src/Kernel/Views/ViewsIntegrationTest.php
index 2d9780f9ff13c0555b3edeb4ac938ec016cd0e47..715920f20dce876c83111c244cea2e3734ff6857 100644
--- a/core/modules/dblog/tests/src/Kernel/Views/ViewsIntegrationTest.php
+++ b/core/modules/dblog/tests/src/Kernel/Views/ViewsIntegrationTest.php
@@ -26,7 +26,7 @@ class ViewsIntegrationTest extends ViewsKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['dblog', 'dblog_test_views', 'user'];
+  protected static $modules = ['dblog', 'dblog_test_views', 'user'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/editor/tests/src/Functional/EditorAdminTest.php b/core/modules/editor/tests/src/Functional/EditorAdminTest.php
index 43a0b8e9c403302bc71c3244d29be707313163a0..c8f9588a01fb7ff83bbd7f2f79866a88205a2bd2 100644
--- a/core/modules/editor/tests/src/Functional/EditorAdminTest.php
+++ b/core/modules/editor/tests/src/Functional/EditorAdminTest.php
@@ -20,7 +20,7 @@ class EditorAdminTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['filter', 'editor'];
+  protected static $modules = ['filter', 'editor'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/editor/tests/src/Functional/EditorDialogAccessTest.php b/core/modules/editor/tests/src/Functional/EditorDialogAccessTest.php
index c317366ec9ccc632588d0811940c1f20d7b3be15..c3c264e5a1d65efb087cd51a3648662082686442 100644
--- a/core/modules/editor/tests/src/Functional/EditorDialogAccessTest.php
+++ b/core/modules/editor/tests/src/Functional/EditorDialogAccessTest.php
@@ -18,7 +18,7 @@ class EditorDialogAccessTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['editor', 'filter', 'ckeditor'];
+  protected static $modules = ['editor', 'filter', 'ckeditor'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/editor/tests/src/Functional/EditorLoadingTest.php b/core/modules/editor/tests/src/Functional/EditorLoadingTest.php
index 7662e14cc1d9b50237669734259fa88bdc19fa09..969efdc1612c8dc9a20214e59f7693a165c414f1 100644
--- a/core/modules/editor/tests/src/Functional/EditorLoadingTest.php
+++ b/core/modules/editor/tests/src/Functional/EditorLoadingTest.php
@@ -20,7 +20,7 @@ class EditorLoadingTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['filter', 'editor', 'editor_test', 'node'];
+  protected static $modules = ['filter', 'editor', 'editor_test', 'node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/editor/tests/src/Functional/EditorPrivateFileReferenceFilterTest.php b/core/modules/editor/tests/src/Functional/EditorPrivateFileReferenceFilterTest.php
index 20a9969170b4f340fb87056bd1b3d635fb95e8b1..fa93aafd99b499802185458728d59295801c894e 100644
--- a/core/modules/editor/tests/src/Functional/EditorPrivateFileReferenceFilterTest.php
+++ b/core/modules/editor/tests/src/Functional/EditorPrivateFileReferenceFilterTest.php
@@ -20,7 +20,7 @@ class EditorPrivateFileReferenceFilterTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     // Needed for the config: this is the only module in core that utilizes the
     // functionality in editor.module to be tested, and depends on that.
     'ckeditor',
diff --git a/core/modules/editor/tests/src/Functional/EditorSecurityTest.php b/core/modules/editor/tests/src/Functional/EditorSecurityTest.php
index 1dbcb7e6019aefbdb74a2b2db65372a482bf03c9..38df20dd41c34f2ebe4ea8df401eeca6e3669aa4 100644
--- a/core/modules/editor/tests/src/Functional/EditorSecurityTest.php
+++ b/core/modules/editor/tests/src/Functional/EditorSecurityTest.php
@@ -46,7 +46,7 @@ class EditorSecurityTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['filter', 'editor', 'editor_test', 'node'];
+  protected static $modules = ['filter', 'editor', 'editor_test', 'node'];
 
   /**
    * User with access to Restricted HTML text format without text editor.
diff --git a/core/modules/editor/tests/src/Functional/EditorUploadImageScaleTest.php b/core/modules/editor/tests/src/Functional/EditorUploadImageScaleTest.php
index 4ae56bcc94af41e22cda1e9866c93fe8b1f1a967..e054ae743d24dd603cee6aebe0bbef8c6d07cfd3 100644
--- a/core/modules/editor/tests/src/Functional/EditorUploadImageScaleTest.php
+++ b/core/modules/editor/tests/src/Functional/EditorUploadImageScaleTest.php
@@ -22,7 +22,7 @@ class EditorUploadImageScaleTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['editor', 'editor_test'];
+  protected static $modules = ['editor', 'editor_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/editor/tests/src/Functional/Hal/EditorHalJsonAnonTest.php b/core/modules/editor/tests/src/Functional/Hal/EditorHalJsonAnonTest.php
index 473e3c9255df4e943cb2e9d0e7172a203046479e..d4523d5273dd0efbb20ad5f7ea10c561a99833cb 100644
--- a/core/modules/editor/tests/src/Functional/Hal/EditorHalJsonAnonTest.php
+++ b/core/modules/editor/tests/src/Functional/Hal/EditorHalJsonAnonTest.php
@@ -15,7 +15,7 @@ class EditorHalJsonAnonTest extends EditorResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/editor/tests/src/Functional/Hal/EditorHalJsonBasicAuthTest.php b/core/modules/editor/tests/src/Functional/Hal/EditorHalJsonBasicAuthTest.php
index 57042e58b4508ed3d9bac9fbef02d05b78230c65..21ef9b701b5507fe411e72be9b5e08d4327b650c 100644
--- a/core/modules/editor/tests/src/Functional/Hal/EditorHalJsonBasicAuthTest.php
+++ b/core/modules/editor/tests/src/Functional/Hal/EditorHalJsonBasicAuthTest.php
@@ -15,7 +15,7 @@ class EditorHalJsonBasicAuthTest extends EditorResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal', 'basic_auth'];
+  protected static $modules = ['hal', 'basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/editor/tests/src/Functional/Hal/EditorHalJsonCookieTest.php b/core/modules/editor/tests/src/Functional/Hal/EditorHalJsonCookieTest.php
index b2db5fb34ac7fa5b439ef1a5286fa71b95051dd2..5bb6f2215e363a905e9ca1a706e060f1588e4f3c 100644
--- a/core/modules/editor/tests/src/Functional/Hal/EditorHalJsonCookieTest.php
+++ b/core/modules/editor/tests/src/Functional/Hal/EditorHalJsonCookieTest.php
@@ -15,7 +15,7 @@ class EditorHalJsonCookieTest extends EditorResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/editor/tests/src/Functional/QuickEditIntegrationLoadingTest.php b/core/modules/editor/tests/src/Functional/QuickEditIntegrationLoadingTest.php
index 9a92f4a8322c5555d0d4f3e117517995bd2e8690..4f4365e03b0e496f94779205b8eaa94c2cf6965c 100644
--- a/core/modules/editor/tests/src/Functional/QuickEditIntegrationLoadingTest.php
+++ b/core/modules/editor/tests/src/Functional/QuickEditIntegrationLoadingTest.php
@@ -19,7 +19,7 @@ class QuickEditIntegrationLoadingTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['quickedit', 'filter', 'node', 'editor'];
+  protected static $modules = ['quickedit', 'filter', 'node', 'editor'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/editor/tests/src/Functional/Rest/EditorJsonBasicAuthTest.php b/core/modules/editor/tests/src/Functional/Rest/EditorJsonBasicAuthTest.php
index 3b39696a963740d9c632ac8fbdde63f8031823b6..ff009855859341c4cb422f755900db651492f8b1 100644
--- a/core/modules/editor/tests/src/Functional/Rest/EditorJsonBasicAuthTest.php
+++ b/core/modules/editor/tests/src/Functional/Rest/EditorJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class EditorJsonBasicAuthTest extends EditorResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/editor/tests/src/Functional/Rest/EditorResourceTestBase.php b/core/modules/editor/tests/src/Functional/Rest/EditorResourceTestBase.php
index 161f6692ebb3b245f72b51abcd260719eadea4eb..8efe00002c1f51f76ee684e4024feeb0f1140d99 100644
--- a/core/modules/editor/tests/src/Functional/Rest/EditorResourceTestBase.php
+++ b/core/modules/editor/tests/src/Functional/Rest/EditorResourceTestBase.php
@@ -14,7 +14,7 @@ abstract class EditorResourceTestBase extends EntityResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['ckeditor', 'editor'];
+  protected static $modules = ['ckeditor', 'editor'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/editor/tests/src/Functional/Rest/EditorXmlBasicAuthTest.php b/core/modules/editor/tests/src/Functional/Rest/EditorXmlBasicAuthTest.php
index 5e5aa467f5061416d41093f59b61aa8734a825b7..17ebb9317efa28eb1c6192d45bd5bea643042e4c 100644
--- a/core/modules/editor/tests/src/Functional/Rest/EditorXmlBasicAuthTest.php
+++ b/core/modules/editor/tests/src/Functional/Rest/EditorXmlBasicAuthTest.php
@@ -16,7 +16,7 @@ class EditorXmlBasicAuthTest extends EditorResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/editor/tests/src/Kernel/EditorFileReferenceFilterTest.php b/core/modules/editor/tests/src/Kernel/EditorFileReferenceFilterTest.php
index 8beea2ee21cbc86ca7d13f6660e92d8410f1a682..d0923e28ebfd3c3ee62daadce27b743cceb08087 100644
--- a/core/modules/editor/tests/src/Kernel/EditorFileReferenceFilterTest.php
+++ b/core/modules/editor/tests/src/Kernel/EditorFileReferenceFilterTest.php
@@ -19,7 +19,7 @@ class EditorFileReferenceFilterTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['system', 'filter', 'editor', 'field', 'file', 'user'];
+  protected static $modules = ['system', 'filter', 'editor', 'field', 'file', 'user'];
 
   /**
    * @var \Drupal\filter\Plugin\FilterInterface[]
diff --git a/core/modules/editor/tests/src/Kernel/EditorFileUsageTest.php b/core/modules/editor/tests/src/Kernel/EditorFileUsageTest.php
index c39d6ef55c51e986d3fa9efbd51a33444ee2b689..9c62c3b0348deb1f69c6eb564bd11b1c62f9d5ba 100644
--- a/core/modules/editor/tests/src/Kernel/EditorFileUsageTest.php
+++ b/core/modules/editor/tests/src/Kernel/EditorFileUsageTest.php
@@ -23,7 +23,7 @@ class EditorFileUsageTest extends EntityKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['editor', 'editor_test', 'node', 'file'];
+  protected static $modules = ['editor', 'editor_test', 'node', 'file'];
 
   protected function setUp(): void {
     parent::setUp();
diff --git a/core/modules/editor/tests/src/Kernel/EditorFilterIntegrationTest.php b/core/modules/editor/tests/src/Kernel/EditorFilterIntegrationTest.php
index c7a9b9ad5ba2b29bdf5b14b475baf05f1bd95d01..66c238e73ea1abe1f2d98a61cc4f5b45d555ea0f 100644
--- a/core/modules/editor/tests/src/Kernel/EditorFilterIntegrationTest.php
+++ b/core/modules/editor/tests/src/Kernel/EditorFilterIntegrationTest.php
@@ -16,7 +16,7 @@ class EditorFilterIntegrationTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['filter', 'editor', 'editor_test'];
+  protected static $modules = ['filter', 'editor', 'editor_test'];
 
   /**
    * Tests text format removal or disabling.
diff --git a/core/modules/editor/tests/src/Kernel/EditorImageDialogTest.php b/core/modules/editor/tests/src/Kernel/EditorImageDialogTest.php
index 3623e1b8ff315ca64bd26afb371c66d2ca580e00..caeef84cf854cd4c8d99bfa2d0cf890a5871960f 100644
--- a/core/modules/editor/tests/src/Kernel/EditorImageDialogTest.php
+++ b/core/modules/editor/tests/src/Kernel/EditorImageDialogTest.php
@@ -28,7 +28,7 @@ class EditorImageDialogTest extends EntityKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'file', 'editor', 'editor_test', 'user', 'system'];
+  protected static $modules = ['node', 'file', 'editor', 'editor_test', 'user', 'system'];
 
   /**
    * Sets up the test.
diff --git a/core/modules/editor/tests/src/Kernel/EditorManagerTest.php b/core/modules/editor/tests/src/Kernel/EditorManagerTest.php
index bf58618b13d2a576e1acefd9104331ceec5f23ff..0e9e8b5be053741aa79915a3fe35eb703336522c 100644
--- a/core/modules/editor/tests/src/Kernel/EditorManagerTest.php
+++ b/core/modules/editor/tests/src/Kernel/EditorManagerTest.php
@@ -18,7 +18,7 @@ class EditorManagerTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['system', 'user', 'filter', 'editor'];
+  protected static $modules = ['system', 'user', 'filter', 'editor'];
 
   /**
    * The manager for text editor plugins.
diff --git a/core/modules/editor/tests/src/Kernel/QuickEditIntegrationTest.php b/core/modules/editor/tests/src/Kernel/QuickEditIntegrationTest.php
index c4daec83e6c1a035a280202e3ba5c22cb9183ed7..22e67e8c0db129a62f2ab5690447287252833426 100644
--- a/core/modules/editor/tests/src/Kernel/QuickEditIntegrationTest.php
+++ b/core/modules/editor/tests/src/Kernel/QuickEditIntegrationTest.php
@@ -26,7 +26,7 @@ class QuickEditIntegrationTest extends QuickEditTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['editor', 'editor_test'];
+  protected static $modules = ['editor', 'editor_test'];
 
   /**
    * The manager for editor plug-ins.
diff --git a/core/modules/field/tests/src/Functional/Boolean/BooleanFieldTest.php b/core/modules/field/tests/src/Functional/Boolean/BooleanFieldTest.php
index 30d60308c265c76d8c5e266fc1158f1d7cc5ae06..b34504e955d51e4e64b347533f51d631138b4376 100644
--- a/core/modules/field/tests/src/Functional/Boolean/BooleanFieldTest.php
+++ b/core/modules/field/tests/src/Functional/Boolean/BooleanFieldTest.php
@@ -19,7 +19,7 @@ class BooleanFieldTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'entity_test',
     'field_ui',
     'options',
diff --git a/core/modules/field/tests/src/Functional/Boolean/BooleanFormatterSettingsTest.php b/core/modules/field/tests/src/Functional/Boolean/BooleanFormatterSettingsTest.php
index be55b1560ab659926797de6bfd40a5dceb9d2588..4d8998dedbcabf1edfecea4f76454506d631f35c 100644
--- a/core/modules/field/tests/src/Functional/Boolean/BooleanFormatterSettingsTest.php
+++ b/core/modules/field/tests/src/Functional/Boolean/BooleanFormatterSettingsTest.php
@@ -18,7 +18,7 @@ class BooleanFormatterSettingsTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['field', 'field_ui', 'text', 'node', 'user'];
+  protected static $modules = ['field', 'field_ui', 'text', 'node', 'user'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/field/tests/src/Functional/Email/EmailFieldTest.php b/core/modules/field/tests/src/Functional/Email/EmailFieldTest.php
index 18c49b1222c9eade5a535e86ed3c4b3538c36fcd..11b63426330fe1eba0f3b5cd0d9a1bfd9e746739 100644
--- a/core/modules/field/tests/src/Functional/Email/EmailFieldTest.php
+++ b/core/modules/field/tests/src/Functional/Email/EmailFieldTest.php
@@ -19,7 +19,7 @@ class EmailFieldTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'entity_test', 'field_ui'];
+  protected static $modules = ['node', 'entity_test', 'field_ui'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceAdminTest.php b/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceAdminTest.php
index a7fcd2ae63c325dc11ee2409ac6d9a5d8bb70822..9f096d54fc59f654eba124d363ec0683066b01d7 100644
--- a/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceAdminTest.php
+++ b/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceAdminTest.php
@@ -28,7 +28,7 @@ class EntityReferenceAdminTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'field_ui', 'path', 'taxonomy', 'block', 'views_ui'];
+  protected static $modules = ['node', 'field_ui', 'path', 'taxonomy', 'block', 'views_ui'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceAutoCreateTest.php b/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceAutoCreateTest.php
index 5bf35fad8b202ea4846144f961ff7c5d91ab45af..a962aa92e34e471b455c49a3113d8cb64cd8efd9 100644
--- a/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceAutoCreateTest.php
+++ b/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceAutoCreateTest.php
@@ -19,7 +19,7 @@ class EntityReferenceAutoCreateTest extends BrowserTestBase {
 
   use EntityReferenceTestTrait;
 
-  public static $modules = ['node', 'taxonomy'];
+  protected static $modules = ['node', 'taxonomy'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceFieldDefaultValueTest.php b/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceFieldDefaultValueTest.php
index 1b25129cf5dc874329d6d2f1c4f3679cd2f071a6..f315f1c568bc56f385e826cb74e469e1ea7e4ba2 100644
--- a/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceFieldDefaultValueTest.php
+++ b/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceFieldDefaultValueTest.php
@@ -22,7 +22,7 @@ class EntityReferenceFieldDefaultValueTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['field_ui', 'node'];
+  protected static $modules = ['field_ui', 'node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceFieldTranslatedReferenceViewTest.php b/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceFieldTranslatedReferenceViewTest.php
index 48d5d8bca8cc19383166d5dbfbc7ac594c26e441..404d672fd4f1ea1004b76b447962ce34f4c2c75b 100644
--- a/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceFieldTranslatedReferenceViewTest.php
+++ b/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceFieldTranslatedReferenceViewTest.php
@@ -118,7 +118,7 @@ class EntityReferenceFieldTranslatedReferenceViewTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'language',
     'content_translation',
     'node',
diff --git a/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceFileUploadTest.php b/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceFileUploadTest.php
index fec017df2bfd1ddbe0882a5adfa4253ffff9fcd7..fcdf561c0a2a0d53befbfbe5144c0f75943f4033 100644
--- a/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceFileUploadTest.php
+++ b/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceFileUploadTest.php
@@ -17,7 +17,7 @@ class EntityReferenceFileUploadTest extends BrowserTestBase {
 
   use TestFileCreationTrait;
 
-  public static $modules = ['entity_reference', 'node', 'file'];
+  protected static $modules = ['entity_reference', 'node', 'file'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceIntegrationTest.php b/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceIntegrationTest.php
index cb47f1903b294e256bd3aea53f2e1bb0c5c4fb64..89cdc2ac96af577caf5b979c93873f5647f006cf 100644
--- a/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceIntegrationTest.php
+++ b/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceIntegrationTest.php
@@ -45,7 +45,7 @@ class EntityReferenceIntegrationTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['config_test', 'entity_test', 'field_ui'];
+  protected static $modules = ['config_test', 'entity_test', 'field_ui'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/field/tests/src/Functional/FieldAccessTest.php b/core/modules/field/tests/src/Functional/FieldAccessTest.php
index 73f791aa4aa04363eb122ccad46f7c1cc100a6c2..4070f6eb3907468ec41268edb8e9e8234b022a1e 100644
--- a/core/modules/field/tests/src/Functional/FieldAccessTest.php
+++ b/core/modules/field/tests/src/Functional/FieldAccessTest.php
@@ -17,7 +17,7 @@ class FieldAccessTest extends FieldTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'field_test'];
+  protected static $modules = ['node', 'field_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/field/tests/src/Functional/FieldDefaultValueCallbackTest.php b/core/modules/field/tests/src/Functional/FieldDefaultValueCallbackTest.php
index 420dc299b3864a171cafd9ab4a06345376e87d73..b5cc91415d6d9fee9520c4892bd949ce2821d0b7 100644
--- a/core/modules/field/tests/src/Functional/FieldDefaultValueCallbackTest.php
+++ b/core/modules/field/tests/src/Functional/FieldDefaultValueCallbackTest.php
@@ -18,7 +18,7 @@ class FieldDefaultValueCallbackTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'field_test', 'field_ui'];
+  protected static $modules = ['node', 'field_test', 'field_ui'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/field/tests/src/Functional/FieldHelpTest.php b/core/modules/field/tests/src/Functional/FieldHelpTest.php
index 4ccd8e8a5390d1d79b64fa8ceffd1593468ea27c..7ed4bfb6bd461ae94b00181e18ef2ee891d6326a 100644
--- a/core/modules/field/tests/src/Functional/FieldHelpTest.php
+++ b/core/modules/field/tests/src/Functional/FieldHelpTest.php
@@ -16,7 +16,7 @@ class FieldHelpTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['field', 'help'];
+  protected static $modules = ['field', 'help'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/field/tests/src/Functional/FieldImportDeleteUninstallUiTest.php b/core/modules/field/tests/src/Functional/FieldImportDeleteUninstallUiTest.php
index db9b3c2e491d1c504f857e329085ba027c470d64..ee76243b33e841998da0380e304eaaa81ac5a715 100644
--- a/core/modules/field/tests/src/Functional/FieldImportDeleteUninstallUiTest.php
+++ b/core/modules/field/tests/src/Functional/FieldImportDeleteUninstallUiTest.php
@@ -22,7 +22,7 @@ class FieldImportDeleteUninstallUiTest extends FieldTestBase {
    *
    * @var array
    */
-  public static $modules = ['entity_test', 'telephone', 'config', 'filter', 'datetime'];
+  protected static $modules = ['entity_test', 'telephone', 'config', 'filter', 'datetime'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/field/tests/src/Functional/FormTest.php b/core/modules/field/tests/src/Functional/FormTest.php
index b7c99e7ad2ff2c032b33a522a407648321763585..4b5b1cab7cc1bde48c33c8e9e819b7c2d100e4b1 100644
--- a/core/modules/field/tests/src/Functional/FormTest.php
+++ b/core/modules/field/tests/src/Functional/FormTest.php
@@ -25,7 +25,7 @@ class FormTest extends FieldTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'field_test', 'options', 'entity_test', 'locale'];
+  protected static $modules = ['node', 'field_test', 'options', 'entity_test', 'locale'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/field/tests/src/Functional/Hal/FieldConfigHalJsonAnonTest.php b/core/modules/field/tests/src/Functional/Hal/FieldConfigHalJsonAnonTest.php
index b32f25e5bf2d67a8603ae5686a808c12f8a1cf1d..aabf6bd5c6b670e551361f33045c04c51e3ecf4f 100644
--- a/core/modules/field/tests/src/Functional/Hal/FieldConfigHalJsonAnonTest.php
+++ b/core/modules/field/tests/src/Functional/Hal/FieldConfigHalJsonAnonTest.php
@@ -15,7 +15,7 @@ class FieldConfigHalJsonAnonTest extends FieldConfigResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/field/tests/src/Functional/Hal/FieldConfigHalJsonBasicAuthTest.php b/core/modules/field/tests/src/Functional/Hal/FieldConfigHalJsonBasicAuthTest.php
index ce8838c1f33bfdc27ce8c950154db9417dd771e4..458f0d5cb175ccde42199c5dfb823c3458e3bdd8 100644
--- a/core/modules/field/tests/src/Functional/Hal/FieldConfigHalJsonBasicAuthTest.php
+++ b/core/modules/field/tests/src/Functional/Hal/FieldConfigHalJsonBasicAuthTest.php
@@ -15,7 +15,7 @@ class FieldConfigHalJsonBasicAuthTest extends FieldConfigResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal', 'basic_auth'];
+  protected static $modules = ['hal', 'basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/field/tests/src/Functional/Hal/FieldConfigHalJsonCookieTest.php b/core/modules/field/tests/src/Functional/Hal/FieldConfigHalJsonCookieTest.php
index b482ab03186d317425912a172c8b5e943bdf079a..5bb1dd9056218f8c9867abb321c811168cec878f 100644
--- a/core/modules/field/tests/src/Functional/Hal/FieldConfigHalJsonCookieTest.php
+++ b/core/modules/field/tests/src/Functional/Hal/FieldConfigHalJsonCookieTest.php
@@ -15,7 +15,7 @@ class FieldConfigHalJsonCookieTest extends FieldConfigResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/field/tests/src/Functional/Hal/FieldStorageConfigHalJsonAnonTest.php b/core/modules/field/tests/src/Functional/Hal/FieldStorageConfigHalJsonAnonTest.php
index 72bc55058e250e4c00c9d772e373db9dc756fe1a..2423375d32a88f0b9e84dbb2254d2f30c469d0cb 100644
--- a/core/modules/field/tests/src/Functional/Hal/FieldStorageConfigHalJsonAnonTest.php
+++ b/core/modules/field/tests/src/Functional/Hal/FieldStorageConfigHalJsonAnonTest.php
@@ -15,7 +15,7 @@ class FieldStorageConfigHalJsonAnonTest extends FieldStorageConfigResourceTestBa
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/field/tests/src/Functional/Hal/FieldStorageConfigHalJsonBasicAuthTest.php b/core/modules/field/tests/src/Functional/Hal/FieldStorageConfigHalJsonBasicAuthTest.php
index 498589412afe01c34892564869f5437e2e914d9e..94c2d8a4d450ce01c0aaee2e2dc3abd2c7867436 100644
--- a/core/modules/field/tests/src/Functional/Hal/FieldStorageConfigHalJsonBasicAuthTest.php
+++ b/core/modules/field/tests/src/Functional/Hal/FieldStorageConfigHalJsonBasicAuthTest.php
@@ -15,7 +15,7 @@ class FieldStorageConfigHalJsonBasicAuthTest extends FieldStorageConfigResourceT
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal', 'basic_auth'];
+  protected static $modules = ['hal', 'basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/field/tests/src/Functional/Hal/FieldStorageConfigHalJsonCookieTest.php b/core/modules/field/tests/src/Functional/Hal/FieldStorageConfigHalJsonCookieTest.php
index 313e6ba7e269a59ed5e3d55a661f1d7c1deedaa8..a8a70850353450975d5ba517e979996ba886ce38 100644
--- a/core/modules/field/tests/src/Functional/Hal/FieldStorageConfigHalJsonCookieTest.php
+++ b/core/modules/field/tests/src/Functional/Hal/FieldStorageConfigHalJsonCookieTest.php
@@ -15,7 +15,7 @@ class FieldStorageConfigHalJsonCookieTest extends FieldStorageConfigResourceTest
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/field/tests/src/Functional/NestedFormTest.php b/core/modules/field/tests/src/Functional/NestedFormTest.php
index 549f5651f7a5461a6476b8ed250a820863810941..d8f388e44f5f4cdb3852f2b49a624149662d0c14 100644
--- a/core/modules/field/tests/src/Functional/NestedFormTest.php
+++ b/core/modules/field/tests/src/Functional/NestedFormTest.php
@@ -18,7 +18,7 @@ class NestedFormTest extends FieldTestBase {
    *
    * @var array
    */
-  public static $modules = ['field_test', 'entity_test'];
+  protected static $modules = ['field_test', 'entity_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/field/tests/src/Functional/Number/NumberFieldTest.php b/core/modules/field/tests/src/Functional/Number/NumberFieldTest.php
index 8ffe5f4e8acb5c3953884644c89168c5550362dd..e4e9358c71639a44a55426e269f7cdc74a51bc86 100644
--- a/core/modules/field/tests/src/Functional/Number/NumberFieldTest.php
+++ b/core/modules/field/tests/src/Functional/Number/NumberFieldTest.php
@@ -18,7 +18,7 @@ class NumberFieldTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'entity_test', 'field_ui'];
+  protected static $modules = ['node', 'entity_test', 'field_ui'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/field/tests/src/Functional/Rest/FieldConfigJsonBasicAuthTest.php b/core/modules/field/tests/src/Functional/Rest/FieldConfigJsonBasicAuthTest.php
index 376c752ee0e65bc2f40f285debfc44fe9ebd8cfe..18e4446f94a636e89b72edb910412e506b3e20bc 100644
--- a/core/modules/field/tests/src/Functional/Rest/FieldConfigJsonBasicAuthTest.php
+++ b/core/modules/field/tests/src/Functional/Rest/FieldConfigJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class FieldConfigJsonBasicAuthTest extends FieldConfigResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/field/tests/src/Functional/Rest/FieldConfigResourceTestBase.php b/core/modules/field/tests/src/Functional/Rest/FieldConfigResourceTestBase.php
index af0d9df8835ec879982b4c8a3b5c1b687db5483f..def98a89e3185153c9e694007c8eafbbd6fb098a 100644
--- a/core/modules/field/tests/src/Functional/Rest/FieldConfigResourceTestBase.php
+++ b/core/modules/field/tests/src/Functional/Rest/FieldConfigResourceTestBase.php
@@ -12,7 +12,7 @@ abstract class FieldConfigResourceTestBase extends EntityResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['field', 'node'];
+  protected static $modules = ['field', 'node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/field/tests/src/Functional/Rest/FieldConfigXmlBasicAuthTest.php b/core/modules/field/tests/src/Functional/Rest/FieldConfigXmlBasicAuthTest.php
index 13b42d3eab65180092927c62de4b9f1fbd828953..cded0f9616b73c0d2733e8449beb9b93ae7bd6db 100644
--- a/core/modules/field/tests/src/Functional/Rest/FieldConfigXmlBasicAuthTest.php
+++ b/core/modules/field/tests/src/Functional/Rest/FieldConfigXmlBasicAuthTest.php
@@ -16,7 +16,7 @@ class FieldConfigXmlBasicAuthTest extends FieldConfigResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/field/tests/src/Functional/Rest/FieldStorageConfigJsonBasicAuthTest.php b/core/modules/field/tests/src/Functional/Rest/FieldStorageConfigJsonBasicAuthTest.php
index 5256b06203624084b97a46e440a4b10959787369..f11b8d8769a601c13b43fa106298aa19f271af0c 100644
--- a/core/modules/field/tests/src/Functional/Rest/FieldStorageConfigJsonBasicAuthTest.php
+++ b/core/modules/field/tests/src/Functional/Rest/FieldStorageConfigJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class FieldStorageConfigJsonBasicAuthTest extends FieldStorageConfigResourceTest
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/field/tests/src/Functional/Rest/FieldStorageConfigResourceTestBase.php b/core/modules/field/tests/src/Functional/Rest/FieldStorageConfigResourceTestBase.php
index 54a97dc4ea6a514780885d63f0e1fc4655bf625d..43f0273e9b992bf01b70d6f6741891f1c7208c1b 100644
--- a/core/modules/field/tests/src/Functional/Rest/FieldStorageConfigResourceTestBase.php
+++ b/core/modules/field/tests/src/Functional/Rest/FieldStorageConfigResourceTestBase.php
@@ -10,7 +10,7 @@ abstract class FieldStorageConfigResourceTestBase extends EntityResourceTestBase
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node'];
+  protected static $modules = ['node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/field/tests/src/Functional/Rest/FieldStorageConfigXmlBasicAuthTest.php b/core/modules/field/tests/src/Functional/Rest/FieldStorageConfigXmlBasicAuthTest.php
index cea708147044035942ec3d8075db3ebe06555c1f..da7b133c6ae3b1ccd21cd98b30f14526683df646 100644
--- a/core/modules/field/tests/src/Functional/Rest/FieldStorageConfigXmlBasicAuthTest.php
+++ b/core/modules/field/tests/src/Functional/Rest/FieldStorageConfigXmlBasicAuthTest.php
@@ -16,7 +16,7 @@ class FieldStorageConfigXmlBasicAuthTest extends FieldStorageConfigResourceTestB
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/field/tests/src/Functional/String/StringFieldTest.php b/core/modules/field/tests/src/Functional/String/StringFieldTest.php
index c3bd0a73cc146eedc56f22a06ec56841b2bee644..15c0f43644e2ec906f5e47dd54ff025dd7fc51b9 100644
--- a/core/modules/field/tests/src/Functional/String/StringFieldTest.php
+++ b/core/modules/field/tests/src/Functional/String/StringFieldTest.php
@@ -20,7 +20,7 @@ class StringFieldTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['entity_test', 'file'];
+  protected static $modules = ['entity_test', 'file'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/field/tests/src/Functional/TranslationWebTest.php b/core/modules/field/tests/src/Functional/TranslationWebTest.php
index 76ed8e0dbc0335275bf25f7ee3836fb1e7c0b34b..f97d7e5c8069c5562c2b5da48f11314f14c030d0 100644
--- a/core/modules/field/tests/src/Functional/TranslationWebTest.php
+++ b/core/modules/field/tests/src/Functional/TranslationWebTest.php
@@ -19,7 +19,7 @@ class TranslationWebTest extends FieldTestBase {
    *
    * @var array
    */
-  public static $modules = ['language', 'field_test', 'entity_test'];
+  protected static $modules = ['language', 'field_test', 'entity_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/field/tests/src/Functional/Views/FieldTestBase.php b/core/modules/field/tests/src/Functional/Views/FieldTestBase.php
index 4b70fe2471630bb07125b77739c6996f37833bf8..5978824fddfb74ad572fa8e0111beb4aea2c2d7b 100644
--- a/core/modules/field/tests/src/Functional/Views/FieldTestBase.php
+++ b/core/modules/field/tests/src/Functional/Views/FieldTestBase.php
@@ -25,7 +25,7 @@ abstract class FieldTestBase extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'field_test_views'];
+  protected static $modules = ['node', 'field_test_views'];
 
   /**
    * Stores the field definitions used by the test.
diff --git a/core/modules/field/tests/src/Functional/Views/FieldUITest.php b/core/modules/field/tests/src/Functional/Views/FieldUITest.php
index 44daa68b30e4a3b210d7d5ecdbcd3d307d7ae9aa..d3d595fe2eac8e5d3b87e7eed83e29bc19db039b 100644
--- a/core/modules/field/tests/src/Functional/Views/FieldUITest.php
+++ b/core/modules/field/tests/src/Functional/Views/FieldUITest.php
@@ -26,7 +26,7 @@ class FieldUITest extends FieldTestBase {
    *
    * @var array
    */
-  public static $modules = ['views_ui'];
+  protected static $modules = ['views_ui'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/field/tests/src/Functional/reEnableModuleFieldTest.php b/core/modules/field/tests/src/Functional/reEnableModuleFieldTest.php
index 85d6703cc03ce4c817aee5a8f08a56d65229a697..51f2523225716af9a0f9308a9030953ca448e867 100644
--- a/core/modules/field/tests/src/Functional/reEnableModuleFieldTest.php
+++ b/core/modules/field/tests/src/Functional/reEnableModuleFieldTest.php
@@ -21,7 +21,7 @@ class reEnableModuleFieldTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'field',
     'node',
     // We use telephone module instead of test_field because test_field is
diff --git a/core/modules/field/tests/src/FunctionalJavascript/Boolean/BooleanFormatterSettingsTest.php b/core/modules/field/tests/src/FunctionalJavascript/Boolean/BooleanFormatterSettingsTest.php
index b8ab65ac3be46f9f447bff65d82d5e659713637a..a8629e0a8ce29c67caef8eb59cffa2d9d3b85b07 100644
--- a/core/modules/field/tests/src/FunctionalJavascript/Boolean/BooleanFormatterSettingsTest.php
+++ b/core/modules/field/tests/src/FunctionalJavascript/Boolean/BooleanFormatterSettingsTest.php
@@ -18,7 +18,7 @@ class BooleanFormatterSettingsTest extends WebDriverTestBase {
    *
    * @var array
    */
-  public static $modules = ['field', 'field_ui', 'text', 'node', 'user'];
+  protected static $modules = ['field', 'field_ui', 'text', 'node', 'user'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/field/tests/src/FunctionalJavascript/EntityReference/EntityReferenceAdminTest.php b/core/modules/field/tests/src/FunctionalJavascript/EntityReference/EntityReferenceAdminTest.php
index f9f699a51970ca43cc78213e4bebf2a8c48bd2a5..6029e10c43557ff4a41feeb975849765295be799 100644
--- a/core/modules/field/tests/src/FunctionalJavascript/EntityReference/EntityReferenceAdminTest.php
+++ b/core/modules/field/tests/src/FunctionalJavascript/EntityReference/EntityReferenceAdminTest.php
@@ -25,7 +25,7 @@ class EntityReferenceAdminTest extends WebDriverTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'field_ui', 'path', 'taxonomy', 'block', 'views_ui'];
+  protected static $modules = ['node', 'field_ui', 'path', 'taxonomy', 'block', 'views_ui'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/field/tests/src/FunctionalJavascript/FormJSAddMoreTest.php b/core/modules/field/tests/src/FunctionalJavascript/FormJSAddMoreTest.php
index a194cbc652bbf12bdd8ac64e8b072d3a92e4503b..ea953c64febfde342d2050629d88586d084e24b4 100644
--- a/core/modules/field/tests/src/FunctionalJavascript/FormJSAddMoreTest.php
+++ b/core/modules/field/tests/src/FunctionalJavascript/FormJSAddMoreTest.php
@@ -18,7 +18,7 @@ class FormJSAddMoreTest extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['field_test', 'entity_test'];
+  protected static $modules = ['field_test', 'entity_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/field/tests/src/Kernel/Boolean/BooleanFormatterTest.php b/core/modules/field/tests/src/Kernel/Boolean/BooleanFormatterTest.php
index 2edb3c6721b668aef728ab946e92c424352599af..9d177dc423c8b4eadd18b134d26532844475ccd3 100644
--- a/core/modules/field/tests/src/Kernel/Boolean/BooleanFormatterTest.php
+++ b/core/modules/field/tests/src/Kernel/Boolean/BooleanFormatterTest.php
@@ -21,7 +21,7 @@ class BooleanFormatterTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['field', 'text', 'entity_test', 'user', 'system'];
+  protected static $modules = ['field', 'text', 'entity_test', 'user', 'system'];
 
   /**
    * @var string
diff --git a/core/modules/field/tests/src/Kernel/DisplayApiTest.php b/core/modules/field/tests/src/Kernel/DisplayApiTest.php
index 67d876952c39f84a2e670583761453625acd01f3..b1fc135308e40caa183f230a0808995af815ed4f 100644
--- a/core/modules/field/tests/src/Kernel/DisplayApiTest.php
+++ b/core/modules/field/tests/src/Kernel/DisplayApiTest.php
@@ -60,7 +60,7 @@ class DisplayApiTest extends FieldKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system'];
+  protected static $modules = ['system'];
 
   protected function setUp(): void {
     parent::setUp();
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 7b627ab46c20c92571124ab0b73dd4418c07f8a3..d1e9fd24fd763041df2bedeaef19d516616553b1 100644
--- a/core/modules/field/tests/src/Kernel/Entity/Update/SqlContentEntityStorageSchemaColumnTest.php
+++ b/core/modules/field/tests/src/Kernel/Entity/Update/SqlContentEntityStorageSchemaColumnTest.php
@@ -21,7 +21,7 @@ class SqlContentEntityStorageSchemaColumnTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['entity_test', 'field', 'text', 'user'];
+  protected static $modules = ['entity_test', 'field', 'text', 'user'];
 
   /**
    * The created entity.
diff --git a/core/modules/field/tests/src/Kernel/EntityReference/EntityReferenceItemTest.php b/core/modules/field/tests/src/Kernel/EntityReference/EntityReferenceItemTest.php
index 3f3d466ef398243db4973b39081afacb0a692e89..95842859859e54bacaaabb7a5504b9737197b61e 100644
--- a/core/modules/field/tests/src/Kernel/EntityReference/EntityReferenceItemTest.php
+++ b/core/modules/field/tests/src/Kernel/EntityReference/EntityReferenceItemTest.php
@@ -39,7 +39,7 @@ class EntityReferenceItemTest extends FieldKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'comment', 'file', 'taxonomy', 'text', 'filter', 'views', 'field'];
+  protected static $modules = ['node', 'comment', 'file', 'taxonomy', 'text', 'filter', 'views', 'field'];
 
   /**
    * The taxonomy vocabulary to test with.
diff --git a/core/modules/field/tests/src/Kernel/EntityReference/EntityReferenceSettingsTest.php b/core/modules/field/tests/src/Kernel/EntityReference/EntityReferenceSettingsTest.php
index d51499d50c1416e54e99b68b7303ab4e9f11f22d..b2638662fd65b7111194ab860d102c752e4741c1 100644
--- a/core/modules/field/tests/src/Kernel/EntityReference/EntityReferenceSettingsTest.php
+++ b/core/modules/field/tests/src/Kernel/EntityReference/EntityReferenceSettingsTest.php
@@ -23,7 +23,7 @@ class EntityReferenceSettingsTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'taxonomy', 'field', 'user', 'text', 'entity_reference', 'entity_test', 'system'];
+  protected static $modules = ['node', 'taxonomy', 'field', 'user', 'text', 'entity_reference', 'entity_test', 'system'];
 
   /**
    * Testing node type.
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 c689e2e3a5f7d8f84ebcd88c87b13d36b37a10fc..cced629622b7484f9c0bf04d7f2603fde6e51429 100644
--- a/core/modules/field/tests/src/Kernel/EntityReference/Views/EntityReferenceRelationshipTest.php
+++ b/core/modules/field/tests/src/Kernel/EntityReference/Views/EntityReferenceRelationshipTest.php
@@ -41,7 +41,7 @@ class EntityReferenceRelationshipTest extends ViewsKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['user', 'field', 'entity_test', 'views', 'entity_reference_test_views'];
+  protected static $modules = ['user', 'field', 'entity_test', 'views', 'entity_reference_test_views'];
 
   /**
    * The entity_test entities used by the test.
diff --git a/core/modules/field/tests/src/Kernel/FieldDefinitionIntegrityTest.php b/core/modules/field/tests/src/Kernel/FieldDefinitionIntegrityTest.php
index 7f8d94ec2772af607c50a6c014e5ed12d0e0fa1f..c5ffe1b883f421305091540d7afba5a2f89d222e 100644
--- a/core/modules/field/tests/src/Kernel/FieldDefinitionIntegrityTest.php
+++ b/core/modules/field/tests/src/Kernel/FieldDefinitionIntegrityTest.php
@@ -20,7 +20,7 @@ class FieldDefinitionIntegrityTest extends KernelTestBase {
   /**
    * @var array
    */
-  public static $modules = ['system', 'path_alias'];
+  protected static $modules = ['system', 'path_alias'];
 
   /**
    * Tests the integrity of field plugin definitions.
diff --git a/core/modules/field/tests/src/Kernel/FieldDisplayTest.php b/core/modules/field/tests/src/Kernel/FieldDisplayTest.php
index 89ab7248cfd38768cb84e8794547bedfef225037..3d81d09d56549007c34f35b07f7b59659077c112 100644
--- a/core/modules/field/tests/src/Kernel/FieldDisplayTest.php
+++ b/core/modules/field/tests/src/Kernel/FieldDisplayTest.php
@@ -20,7 +20,7 @@ class FieldDisplayTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'entity_test',
     'field',
     'system',
diff --git a/core/modules/field/tests/src/Kernel/FieldImportChangeTest.php b/core/modules/field/tests/src/Kernel/FieldImportChangeTest.php
index 9b8391961e8ce6537ac9bf86864d07843f1fea3b..a8aac0d87a0fafdf3408dbc143698c5c99a98262 100644
--- a/core/modules/field/tests/src/Kernel/FieldImportChangeTest.php
+++ b/core/modules/field/tests/src/Kernel/FieldImportChangeTest.php
@@ -20,7 +20,7 @@ class FieldImportChangeTest extends FieldKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['field_test_config'];
+  protected static $modules = ['field_test_config'];
 
   /**
    * Tests importing an updated field.
diff --git a/core/modules/field/tests/src/Kernel/FieldImportDeleteTest.php b/core/modules/field/tests/src/Kernel/FieldImportDeleteTest.php
index ddf31f64d3668ee51054b782e214072f32369239..e1fa9fdbfd0abe4086c26d0e7f9d87e17ac288c9 100644
--- a/core/modules/field/tests/src/Kernel/FieldImportDeleteTest.php
+++ b/core/modules/field/tests/src/Kernel/FieldImportDeleteTest.php
@@ -23,7 +23,7 @@ class FieldImportDeleteTest extends FieldKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['field_test_config'];
+  protected static $modules = ['field_test_config'];
 
   /**
    * Tests deleting field storages and fields as part of config import.
diff --git a/core/modules/field/tests/src/Kernel/FieldImportDeleteUninstallTest.php b/core/modules/field/tests/src/Kernel/FieldImportDeleteUninstallTest.php
index 3bfb8b985ffb94aa900100e8b5e6a7385829901f..ea080abd0e78ad5c9fb5ff56badbae493a0a7b36 100644
--- a/core/modules/field/tests/src/Kernel/FieldImportDeleteUninstallTest.php
+++ b/core/modules/field/tests/src/Kernel/FieldImportDeleteUninstallTest.php
@@ -21,7 +21,7 @@ class FieldImportDeleteUninstallTest extends FieldKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['telephone'];
+  protected static $modules = ['telephone'];
 
   protected function setUp(): void {
     parent::setUp();
diff --git a/core/modules/field/tests/src/Kernel/FieldKernelTestBase.php b/core/modules/field/tests/src/Kernel/FieldKernelTestBase.php
index fdc8940fd65bb49b098522bcc4d767c1356a5158..ec462df51ea7931004f80074228bb67997672041 100644
--- a/core/modules/field/tests/src/Kernel/FieldKernelTestBase.php
+++ b/core/modules/field/tests/src/Kernel/FieldKernelTestBase.php
@@ -19,7 +19,7 @@ abstract class FieldKernelTestBase extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['user', 'system', 'field', 'text', 'entity_test', 'field_test'];
+  protected static $modules = ['user', 'system', 'field', 'text', 'entity_test', 'field_test'];
 
   /**
    * Bag of created field storages and fields.
diff --git a/core/modules/field/tests/src/Kernel/FieldStorageCrudTest.php b/core/modules/field/tests/src/Kernel/FieldStorageCrudTest.php
index fe2514fd2c0c3d3775d7108b66772c0d085648d9..52da007d0c7b21b596f99110285086ee02428f5d 100644
--- a/core/modules/field/tests/src/Kernel/FieldStorageCrudTest.php
+++ b/core/modules/field/tests/src/Kernel/FieldStorageCrudTest.php
@@ -21,7 +21,7 @@ class FieldStorageCrudTest extends FieldKernelTestBase {
    *
    * @var array
    */
-  public static $modules = [];
+  protected static $modules = [];
 
   // TODO : test creation with
   // - a full fledged $field structure, check that all the values are there
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 9a71116334d975e7dd460805bcfa52dab0cfa5c4..d93d79b49a767b4ab0d1f2a69ee2d6d19a4c5f89 100644
--- a/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldFormatterSettingsTest.php
+++ b/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldFormatterSettingsTest.php
@@ -15,7 +15,7 @@ class MigrateFieldFormatterSettingsTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['menu_ui', 'node'];
+  protected static $modules = ['menu_ui', 'node'];
 
   /**
    * {@inheritdoc}
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 400506e99e5134275729ab64fb983c5719ee5351..f53c87128087ff744f09b54c95776912809f781e 100644
--- a/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldInstanceLabelDescriptionTest.php
+++ b/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldInstanceLabelDescriptionTest.php
@@ -18,7 +18,7 @@ class MigrateFieldInstanceLabelDescriptionTest extends MigrateDrupal6TestBase im
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'config_translation',
     'locale',
     'language',
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 e4dcc6d8228baf4f2afbd4c3806d1e5abafb49c3..6981a4a54f1543063946279fcebe6ee70404ca38 100644
--- a/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldInstanceOptionTranslationTest.php
+++ b/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldInstanceOptionTranslationTest.php
@@ -14,8 +14,7 @@ class MigrateFieldInstanceOptionTranslationTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules =
-    [
+  protected static $modules = [
       'config_translation',
       'language',
       'locale',
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 6f2ef1d32a98f57f5b1cec1909f61f663dd19c1a..fd33e56b2445d8ddf4375d3a81d16f79a02960db 100644
--- a/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldInstanceTest.php
+++ b/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldInstanceTest.php
@@ -17,7 +17,7 @@ class MigrateFieldInstanceTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['menu_ui', 'node'];
+  protected static $modules = ['menu_ui', 'node'];
 
   /**
    * Tests migration of file variables to file.settings.yml.
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 5311b3653daf7cfd152641f30a47fe6e36cf5355..5ae19a5f0cb8900322f366e095ab125d4253748f 100644
--- a/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldOptionTranslationTest.php
+++ b/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldOptionTranslationTest.php
@@ -14,7 +14,7 @@ class MigrateFieldOptionTranslationTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'config_translation',
     'language',
     'locale',
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 16c62ad4d535cd2d0725fb8cc88f2d12c5be362f..ba2d1326b17f1d1604d7a8394f24a306d2b4ff9b 100644
--- a/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldWidgetSettingsTest.php
+++ b/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldWidgetSettingsTest.php
@@ -15,7 +15,7 @@ class MigrateFieldWidgetSettingsTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['menu_ui'];
+  protected static $modules = ['menu_ui'];
 
   /**
    * {@inheritdoc}
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 c7d43df2913b7a9ff0b232c8eaadad7ee8f53cba..9df7d20dc5b1eb3fcaf530cea8442905166999a3 100644
--- a/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldFormatterSettingsTest.php
+++ b/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldFormatterSettingsTest.php
@@ -13,7 +13,7 @@
  */
 class MigrateFieldFormatterSettingsTest extends MigrateDrupal7TestBase {
 
-  public static $modules = [
+  protected static $modules = [
     'comment',
     'datetime',
     'image',
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 aef68679b55a471f1b434f7054e6282d276e39e6..615243822055d92564faff0a755efc708d4971be 100644
--- a/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceLabelDescriptionTest.php
+++ b/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceLabelDescriptionTest.php
@@ -18,7 +18,7 @@ class MigrateFieldInstanceLabelDescriptionTest extends MigrateDrupal7TestBase im
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'comment',
     'config_translation',
     'datetime',
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 57089fc7bf53339d38e908799d1f0b820c8812dd..832ebe2151fe2e84e7769c4893a87693f308a7cb 100644
--- a/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceTest.php
+++ b/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceTest.php
@@ -16,7 +16,7 @@ class MigrateFieldInstanceTest extends MigrateDrupal7TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'comment',
     'datetime',
     'image',
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 02f128ac01af1a66b34138121459cade341720b8..31fe823cdc0b1e2d3f636202cfdbf35f78abc833 100644
--- a/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceWidgetSettingsTest.php
+++ b/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceWidgetSettingsTest.php
@@ -18,7 +18,7 @@ class MigrateFieldInstanceWidgetSettingsTest extends MigrateDrupal7TestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'comment',
     'datetime',
     'image',
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 0338cbbadc6444098ab9706ce6af7f8b7f08faa9..8edf5d4c89ebcbc757cc0beb86c5c6b1de7bd606 100644
--- a/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldOptionTranslationTest.php
+++ b/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldOptionTranslationTest.php
@@ -14,7 +14,7 @@ class MigrateFieldOptionTranslationTest extends MigrateDrupal7TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'comment',
     'config_translation',
     'datetime',
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 ae4bc301c1a123c4bc87ac60b313769b1fb746ce..eacb368c0fdb8d334fda7d7238ae6a290b2ce264 100644
--- a/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldTest.php
+++ b/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldTest.php
@@ -18,7 +18,7 @@ class MigrateFieldTest extends MigrateDrupal7TestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'comment',
     'datetime',
     'file',
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 da296ee0d7e1a72298d03577722c08e8ad538ebe..3e5649653cf3dcbca271b3c88ed40016c63d13ac 100644
--- a/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateViewModesTest.php
+++ b/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateViewModesTest.php
@@ -13,7 +13,7 @@
  */
 class MigrateViewModesTest extends MigrateDrupal7TestBase {
 
-  public static $modules = ['comment', 'node', 'taxonomy', 'text'];
+  protected static $modules = ['comment', 'node', 'taxonomy', 'text'];
 
   /**
    * {@inheritdoc}
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 8c454792d0e8301b690c564a607e335a0fb0322a..cd931eebe19b36651b6368b61ffb5a5dfea7e61d 100644
--- a/core/modules/field/tests/src/Kernel/Migrate/d7/RollbackViewModesTest.php
+++ b/core/modules/field/tests/src/Kernel/Migrate/d7/RollbackViewModesTest.php
@@ -15,7 +15,7 @@ class RollbackViewModesTest extends MigrateViewModesTest {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['text'];
+  protected static $modules = ['text'];
 
   /**
    * Tests migrating D7 view modes, then rolling back.
diff --git a/core/modules/field/tests/src/Kernel/Number/NumberItemTest.php b/core/modules/field/tests/src/Kernel/Number/NumberItemTest.php
index 0c145747166c3827297092c75a802dd2663d13b9..bf34b6439db5cea72aa5d9264cba7f54dc4d5a0a 100644
--- a/core/modules/field/tests/src/Kernel/Number/NumberItemTest.php
+++ b/core/modules/field/tests/src/Kernel/Number/NumberItemTest.php
@@ -21,7 +21,7 @@ class NumberItemTest extends FieldKernelTestBase {
    *
    * @var array
    */
-  public static $modules = [];
+  protected static $modules = [];
 
   protected function setUp(): void {
     parent::setUp();
diff --git a/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldInstanceLabelDescriptionTranslationTest.php b/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldInstanceLabelDescriptionTranslationTest.php
index c7dbf27790e87d19d30bafefd74a006604b9b8c9..801650d5ece5b38d53813f5bf5191c999eeeef07 100644
--- a/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldInstanceLabelDescriptionTranslationTest.php
+++ b/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldInstanceLabelDescriptionTranslationTest.php
@@ -15,7 +15,7 @@ class FieldInstanceLabelDescriptionTranslationTest extends MigrateSqlSourceTestB
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['config_translation', 'migrate_drupal', 'field'];
+  protected static $modules = ['config_translation', 'migrate_drupal', 'field'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldInstanceOptionTranslationTest.php b/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldInstanceOptionTranslationTest.php
index ee6548853ec711c0e50301bb5d5773563f2b6b63..3ec153949a4ea4021573868e4f456dde3dcbbed8 100644
--- a/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldInstanceOptionTranslationTest.php
+++ b/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldInstanceOptionTranslationTest.php
@@ -13,7 +13,7 @@ class FieldInstanceOptionTranslationTest extends FieldOptionTranslationTest {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['field', 'migrate_drupal'];
+  protected static $modules = ['field', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldInstancePerFormDisplayTest.php b/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldInstancePerFormDisplayTest.php
index dfbcc9f866f89722ac0ad40ee65d3735dada348f..39619abc9124cb1efbe80fceb282fc9b161aa27a 100644
--- a/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldInstancePerFormDisplayTest.php
+++ b/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldInstancePerFormDisplayTest.php
@@ -15,7 +15,7 @@ class FieldInstancePerFormDisplayTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['field', 'migrate_drupal'];
+  protected static $modules = ['field', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldInstancePerViewModeTest.php b/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldInstancePerViewModeTest.php
index baea562ee74704ef36d2e6cb50bce11e86afed73..e46d00b15c100875c872d803e39ed0064b3094c1 100644
--- a/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldInstancePerViewModeTest.php
+++ b/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldInstancePerViewModeTest.php
@@ -15,7 +15,7 @@ class FieldInstancePerViewModeTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['field', 'migrate_drupal', 'node', 'user'];
+  protected static $modules = ['field', 'migrate_drupal', 'node', 'user'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldInstanceTest.php b/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldInstanceTest.php
index bfbddcaef53151c4f6ac05b46f75e1a40f73871b..2fd757f771a508cf3ab685694beb02ba01e6a4cf 100644
--- a/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldInstanceTest.php
+++ b/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldInstanceTest.php
@@ -15,7 +15,7 @@ class FieldInstanceTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['field', 'migrate_drupal'];
+  protected static $modules = ['field', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldOptionTranslationTest.php b/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldOptionTranslationTest.php
index ec44954a1e382fbe5efa7102e5fb4e9752488206..05c93ae2d223e9622fa2fceecae0efcdda17c4bd 100644
--- a/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldOptionTranslationTest.php
+++ b/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldOptionTranslationTest.php
@@ -15,7 +15,7 @@ class FieldOptionTranslationTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['field', 'migrate_drupal'];
+  protected static $modules = ['field', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldTest.php b/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldTest.php
index 06026414a0e58abc32e3ba64b9bea401aca6907a..e83d05e7c43c7ea92241aa9520ec65dd96f6cb5b 100644
--- a/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldTest.php
+++ b/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldTest.php
@@ -15,7 +15,7 @@ class FieldTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['field', 'migrate_drupal'];
+  protected static $modules = ['field', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/FieldInstanceLabelDescriptionTranslationTest.php b/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/FieldInstanceLabelDescriptionTranslationTest.php
index 1070c32d75d9ca16a37cbd7009e837cdec3262d6..ff22ab2e85000af8b6383a04c6dd4b0280f92d53 100644
--- a/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/FieldInstanceLabelDescriptionTranslationTest.php
+++ b/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/FieldInstanceLabelDescriptionTranslationTest.php
@@ -15,7 +15,7 @@ class FieldInstanceLabelDescriptionTranslationTest extends MigrateSqlSourceTestB
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['config_translation', 'migrate_drupal', 'field'];
+  protected static $modules = ['config_translation', 'migrate_drupal', 'field'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/FieldInstancePerFormDisplayTest.php b/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/FieldInstancePerFormDisplayTest.php
index f0f1f0890da86846ac18997017f2ee54b401db5f..0482ce8afdbcd86e307279f682249604c9b9bad1 100644
--- a/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/FieldInstancePerFormDisplayTest.php
+++ b/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/FieldInstancePerFormDisplayTest.php
@@ -15,7 +15,7 @@ class FieldInstancePerFormDisplayTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['field', 'migrate_drupal'];
+  protected static $modules = ['field', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/FieldInstancePerViewModeTest.php b/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/FieldInstancePerViewModeTest.php
index 129026435336de3e289a22b86934f46f505631ac..64c7d50ad9fa21582c7f022a12c3688b859e9978 100644
--- a/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/FieldInstancePerViewModeTest.php
+++ b/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/FieldInstancePerViewModeTest.php
@@ -15,7 +15,7 @@ class FieldInstancePerViewModeTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['field', 'migrate_drupal'];
+  protected static $modules = ['field', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/FieldInstanceTest.php b/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/FieldInstanceTest.php
index 942391ebd64d4f1f9898e7d8aa3aec8fbff0ff74..8cd0316603114ab53b82aefc9d66587ca2ca5532 100644
--- a/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/FieldInstanceTest.php
+++ b/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/FieldInstanceTest.php
@@ -15,7 +15,7 @@ class FieldInstanceTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['field', 'migrate_drupal'];
+  protected static $modules = ['field', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/FieldOptionTranslationTest.php b/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/FieldOptionTranslationTest.php
index 61a2828ce2d07d037c7b19c7e3a5896796af0558..c505c20915b460a5421ba8d887e3e2933ff0bf6c 100644
--- a/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/FieldOptionTranslationTest.php
+++ b/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/FieldOptionTranslationTest.php
@@ -15,7 +15,7 @@ class FieldOptionTranslationTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['field', 'migrate_drupal'];
+  protected static $modules = ['field', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/FieldTest.php b/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/FieldTest.php
index f904429d8906270cdafdd1bb7eb3ee3cff90c1c1..6be4de53d2507728dfe3ab183ea8f54cf91fb4af 100644
--- a/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/FieldTest.php
+++ b/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/FieldTest.php
@@ -15,7 +15,7 @@ class FieldTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['field', 'migrate_drupal'];
+  protected static $modules = ['field', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/ViewModeTest.php b/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/ViewModeTest.php
index deab0668c905ea2d5a3f1eb04dfac36aa67f9a31..15f6a4c5219a6d77cf00d4e55a387b30553b16c1 100644
--- a/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/ViewModeTest.php
+++ b/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/ViewModeTest.php
@@ -15,7 +15,7 @@ class ViewModeTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['field', 'migrate_drupal'];
+  protected static $modules = ['field', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/field/tests/src/Kernel/ShapeItemTest.php b/core/modules/field/tests/src/Kernel/ShapeItemTest.php
index fc605138b8aea32558c61deedf463e61b9ee4306..a179e96d95f1f617cfceaeac4d6fde6a863265b4 100644
--- a/core/modules/field/tests/src/Kernel/ShapeItemTest.php
+++ b/core/modules/field/tests/src/Kernel/ShapeItemTest.php
@@ -20,7 +20,7 @@ class ShapeItemTest extends FieldKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['field_test'];
+  protected static $modules = ['field_test'];
 
   /**
    * The name of the field to use in this test.
diff --git a/core/modules/field/tests/src/Kernel/String/RawStringFormatterTest.php b/core/modules/field/tests/src/Kernel/String/RawStringFormatterTest.php
index 5e35952610440d9f67026a88acd161fe5b9adf60..6c7d44d32b02ce7909b7b79f91187e24416caaa8 100644
--- a/core/modules/field/tests/src/Kernel/String/RawStringFormatterTest.php
+++ b/core/modules/field/tests/src/Kernel/String/RawStringFormatterTest.php
@@ -22,7 +22,7 @@ class RawStringFormatterTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['field', 'text', 'entity_test', 'system', 'filter', 'user'];
+  protected static $modules = ['field', 'text', 'entity_test', 'system', 'filter', 'user'];
 
   /**
    * @var string
diff --git a/core/modules/field/tests/src/Kernel/String/StringFormatterTest.php b/core/modules/field/tests/src/Kernel/String/StringFormatterTest.php
index 205e8535cc4523c3fc528ed23976b79b0f0fb43a..4f8a2781ad743a595a259332b7d39f0caf2257b6 100644
--- a/core/modules/field/tests/src/Kernel/String/StringFormatterTest.php
+++ b/core/modules/field/tests/src/Kernel/String/StringFormatterTest.php
@@ -22,7 +22,7 @@ class StringFormatterTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['field', 'text', 'entity_test', 'system', 'filter', 'user'];
+  protected static $modules = ['field', 'text', 'entity_test', 'system', 'filter', 'user'];
 
   /**
    * The entity type manager.
diff --git a/core/modules/field/tests/src/Kernel/String/UuidFormatterTest.php b/core/modules/field/tests/src/Kernel/String/UuidFormatterTest.php
index a61b80621a21197d40df73483e0d152084e68430..cd5a0a0bb77f9f7753829394dc8e8faf4b4e02a1 100644
--- a/core/modules/field/tests/src/Kernel/String/UuidFormatterTest.php
+++ b/core/modules/field/tests/src/Kernel/String/UuidFormatterTest.php
@@ -18,7 +18,7 @@ class UuidFormatterTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['field', 'entity_test', 'system', 'user'];
+  protected static $modules = ['field', 'entity_test', 'system', 'user'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/field/tests/src/Kernel/TestItemTest.php b/core/modules/field/tests/src/Kernel/TestItemTest.php
index 16f17d696c68da11b1f97a2cf657b742ba4cb091..92f453ac1266c08e0fc857185a0f98c095a609f4 100644
--- a/core/modules/field/tests/src/Kernel/TestItemTest.php
+++ b/core/modules/field/tests/src/Kernel/TestItemTest.php
@@ -21,7 +21,7 @@ class TestItemTest extends FieldKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['field_test'];
+  protected static $modules = ['field_test'];
 
   /**
    * The name of the field to use in this test.
diff --git a/core/modules/field/tests/src/Kernel/TestItemWithDependenciesTest.php b/core/modules/field/tests/src/Kernel/TestItemWithDependenciesTest.php
index 4e52b75965459d10cc1a22bcc7db2ec2a3d363bb..60607c731e5c77d461279b6d1740b49ff752dff9 100644
--- a/core/modules/field/tests/src/Kernel/TestItemWithDependenciesTest.php
+++ b/core/modules/field/tests/src/Kernel/TestItemWithDependenciesTest.php
@@ -17,7 +17,7 @@ class TestItemWithDependenciesTest extends FieldKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['field_test'];
+  protected static $modules = ['field_test'];
 
   /**
    * The name of the field to use in this test.
diff --git a/core/modules/field/tests/src/Kernel/TestObjectItemTest.php b/core/modules/field/tests/src/Kernel/TestObjectItemTest.php
index 2fe9e3cde158e47609d59d3639523e58c304f6cc..f2dc17cf81f2e1101b23e3fbd0b4fccbed1bba6b 100644
--- a/core/modules/field/tests/src/Kernel/TestObjectItemTest.php
+++ b/core/modules/field/tests/src/Kernel/TestObjectItemTest.php
@@ -18,7 +18,7 @@ class TestObjectItemTest extends FieldKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['field_test'];
+  protected static $modules = ['field_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/field/tests/src/Kernel/Timestamp/TimestampFormatterTest.php b/core/modules/field/tests/src/Kernel/Timestamp/TimestampFormatterTest.php
index 13f350326246d4d5fe0c14c149f3ad0a3754f028..b7a90aa7e86629b7144b8f12243981dd40749394 100644
--- a/core/modules/field/tests/src/Kernel/Timestamp/TimestampFormatterTest.php
+++ b/core/modules/field/tests/src/Kernel/Timestamp/TimestampFormatterTest.php
@@ -20,7 +20,7 @@ class TimestampFormatterTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system', 'field', 'text', 'entity_test', 'user'];
+  protected static $modules = ['system', 'field', 'text', 'entity_test', 'user'];
 
   /**
    * @var string
diff --git a/core/modules/field/tests/src/Kernel/TranslationTest.php b/core/modules/field/tests/src/Kernel/TranslationTest.php
index 02501e388910a0023b0d264d417026b501880c87..5cdf010664fd0d2f8c770a289b50d776aff2920f 100644
--- a/core/modules/field/tests/src/Kernel/TranslationTest.php
+++ b/core/modules/field/tests/src/Kernel/TranslationTest.php
@@ -23,7 +23,7 @@ class TranslationTest extends FieldKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['language', 'node'];
+  protected static $modules = ['language', 'node'];
 
   /**
    * The name of the field to use in this test.
diff --git a/core/modules/field_layout/tests/src/Functional/FieldLayoutTest.php b/core/modules/field_layout/tests/src/Functional/FieldLayoutTest.php
index 3e277070308cb93199e59cf1129170027d937591..fa9209e503b6fea5c33e48e57009d24b10eb9ebe 100644
--- a/core/modules/field_layout/tests/src/Functional/FieldLayoutTest.php
+++ b/core/modules/field_layout/tests/src/Functional/FieldLayoutTest.php
@@ -14,7 +14,7 @@ class FieldLayoutTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['field_layout', 'field_ui', 'node', 'field_layout_test'];
+  protected static $modules = ['field_layout', 'field_ui', 'node', 'field_layout_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/field_layout/tests/src/FunctionalJavascript/FieldLayoutTest.php b/core/modules/field_layout/tests/src/FunctionalJavascript/FieldLayoutTest.php
index 3738de185167c54e6574688799fc64850683ee3e..34fca5da825b17e266b12b96212907d016790a2c 100644
--- a/core/modules/field_layout/tests/src/FunctionalJavascript/FieldLayoutTest.php
+++ b/core/modules/field_layout/tests/src/FunctionalJavascript/FieldLayoutTest.php
@@ -15,7 +15,7 @@ class FieldLayoutTest extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['field_layout', 'field_ui', 'field_layout_test', 'layout_test'];
+  protected static $modules = ['field_layout', 'field_ui', 'field_layout_test', 'layout_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/field_ui/tests/src/Functional/EntityDisplayModeTest.php b/core/modules/field_ui/tests/src/Functional/EntityDisplayModeTest.php
index 1f6db258f62f7ec438e72c6a2eb120cfb7a9df6c..af983850af0fadd9486ea29b11d33846777f24e0 100644
--- a/core/modules/field_ui/tests/src/Functional/EntityDisplayModeTest.php
+++ b/core/modules/field_ui/tests/src/Functional/EntityDisplayModeTest.php
@@ -19,7 +19,7 @@ class EntityDisplayModeTest extends BrowserTestBase {
    *
    * @var string[]
    */
-  public static $modules = ['block', 'entity_test', 'field_ui', 'node'];
+  protected static $modules = ['block', 'entity_test', 'field_ui', 'node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/field_ui/tests/src/Functional/EntityDisplayTest.php b/core/modules/field_ui/tests/src/Functional/EntityDisplayTest.php
index d44cf5831d6e32aa214a16ce10fe321afd6e4958..d02ba07de4d128d3bea924b99e3c35b5ff5f2c72 100644
--- a/core/modules/field_ui/tests/src/Functional/EntityDisplayTest.php
+++ b/core/modules/field_ui/tests/src/Functional/EntityDisplayTest.php
@@ -14,7 +14,7 @@ class EntityDisplayTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['field_ui', 'entity_test'];
+  protected static $modules = ['field_ui', 'entity_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/field_ui/tests/src/Functional/FieldUIDeleteTest.php b/core/modules/field_ui/tests/src/Functional/FieldUIDeleteTest.php
index 62b98f33c81c4f8e875d1ee8748ec66d0d69da68..4b3e62801cf5fb17f1b0f1aea1f19fb681aad95d 100644
--- a/core/modules/field_ui/tests/src/Functional/FieldUIDeleteTest.php
+++ b/core/modules/field_ui/tests/src/Functional/FieldUIDeleteTest.php
@@ -23,7 +23,7 @@ class FieldUIDeleteTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'field_ui', 'field_test', 'block', 'field_test_views'];
+  protected static $modules = ['node', 'field_ui', 'field_test', 'block', 'field_test_views'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/field_ui/tests/src/Functional/FieldUIIndentationTest.php b/core/modules/field_ui/tests/src/Functional/FieldUIIndentationTest.php
index b7920c45e41afb6d9fee42e3b823202f2c1628f7..a3cb5e61646fdd4f72b838e4a62084edc062d62e 100644
--- a/core/modules/field_ui/tests/src/Functional/FieldUIIndentationTest.php
+++ b/core/modules/field_ui/tests/src/Functional/FieldUIIndentationTest.php
@@ -16,7 +16,7 @@ class FieldUIIndentationTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'field_ui', 'field_ui_test'];
+  protected static $modules = ['node', 'field_ui', 'field_ui_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/field_ui/tests/src/Functional/FieldUIRouteTest.php b/core/modules/field_ui/tests/src/Functional/FieldUIRouteTest.php
index 5db0abc94df2e281016841c22ce559d595864bbf..fc00b5b5ffd4a247373ead81f53a75f8ab2f67cd 100644
--- a/core/modules/field_ui/tests/src/Functional/FieldUIRouteTest.php
+++ b/core/modules/field_ui/tests/src/Functional/FieldUIRouteTest.php
@@ -18,7 +18,7 @@ class FieldUIRouteTest extends BrowserTestBase {
    *
    * @var string[]
    */
-  public static $modules = ['block', 'entity_test', 'field_ui'];
+  protected static $modules = ['block', 'entity_test', 'field_ui'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/field_ui/tests/src/Functional/ManageDisplayTest.php b/core/modules/field_ui/tests/src/Functional/ManageDisplayTest.php
index 054e6aa2406db6d00c05babf3057384b542bbbac..2d642800cbfef4b04692e5518c5b7b9dcf6a0bf5 100644
--- a/core/modules/field_ui/tests/src/Functional/ManageDisplayTest.php
+++ b/core/modules/field_ui/tests/src/Functional/ManageDisplayTest.php
@@ -25,7 +25,7 @@ class ManageDisplayTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'field_ui', 'taxonomy', 'search', 'field_test', 'field_third_party_test', 'block'];
+  protected static $modules = ['node', 'field_ui', 'taxonomy', 'search', 'field_test', 'field_third_party_test', 'block'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/field_ui/tests/src/Functional/ManageFieldsFunctionalTest.php b/core/modules/field_ui/tests/src/Functional/ManageFieldsFunctionalTest.php
index 9057d30f974655a68fb83c57dc2f9ba075ead215..c226636206b42bf54379d8ee9978ad474f9476c0 100644
--- a/core/modules/field_ui/tests/src/Functional/ManageFieldsFunctionalTest.php
+++ b/core/modules/field_ui/tests/src/Functional/ManageFieldsFunctionalTest.php
@@ -27,7 +27,7 @@ class ManageFieldsFunctionalTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'field_ui', 'field_test', 'taxonomy', 'image', 'block'];
+  protected static $modules = ['node', 'field_ui', 'field_test', 'taxonomy', 'image', 'block'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/field_ui/tests/src/Functional/ManageFieldsTest.php b/core/modules/field_ui/tests/src/Functional/ManageFieldsTest.php
index d69e7553f35ede2bfbc115cb1edb0977a1cadcc5..3f9891e63026295004d7a7ea51ae0c4b8da8a1ac 100644
--- a/core/modules/field_ui/tests/src/Functional/ManageFieldsTest.php
+++ b/core/modules/field_ui/tests/src/Functional/ManageFieldsTest.php
@@ -14,7 +14,7 @@ class ManageFieldsTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'field_ui',
     'field_ui_test',
     'node',
diff --git a/core/modules/field_ui/tests/src/FunctionalJavascript/EntityDisplayTest.php b/core/modules/field_ui/tests/src/FunctionalJavascript/EntityDisplayTest.php
index 54230313b38cd3d42649eaa74f59261257bc0b49..61c65769b84399e1fb8575aef396464dc10b5f97 100644
--- a/core/modules/field_ui/tests/src/FunctionalJavascript/EntityDisplayTest.php
+++ b/core/modules/field_ui/tests/src/FunctionalJavascript/EntityDisplayTest.php
@@ -15,7 +15,7 @@ class EntityDisplayTest extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['field_ui', 'entity_test'];
+  protected static $modules = ['field_ui', 'entity_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/field_ui/tests/src/FunctionalJavascript/ManageDisplayTest.php b/core/modules/field_ui/tests/src/FunctionalJavascript/ManageDisplayTest.php
index 709f63fc1e1361a54258d02c66dac8191769033a..634163a81a1ab3551d72b6e1ee7baac12238dba2 100644
--- a/core/modules/field_ui/tests/src/FunctionalJavascript/ManageDisplayTest.php
+++ b/core/modules/field_ui/tests/src/FunctionalJavascript/ManageDisplayTest.php
@@ -15,7 +15,7 @@ class ManageDisplayTest extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'node',
     'field_ui',
     'field_test',
diff --git a/core/modules/field_ui/tests/src/Kernel/EntityDisplayTest.php b/core/modules/field_ui/tests/src/Kernel/EntityDisplayTest.php
index e9e08c533d8afc4562f99a09fbb6d8de91193ac5..2babbe82441610c5f2096c4426681f803cc89b7a 100644
--- a/core/modules/field_ui/tests/src/Kernel/EntityDisplayTest.php
+++ b/core/modules/field_ui/tests/src/Kernel/EntityDisplayTest.php
@@ -28,7 +28,7 @@ class EntityDisplayTest extends KernelTestBase {
    *
    * @var string[]
    */
-  public static $modules = ['field_ui', 'field', 'entity_test', 'user', 'text', 'field_test', 'node', 'system'];
+  protected static $modules = ['field_ui', 'field', 'entity_test', 'user', 'text', 'field_test', 'node', 'system'];
 
   protected function setUp(): void {
     parent::setUp();
diff --git a/core/modules/field_ui/tests/src/Kernel/EntityFormDisplayTest.php b/core/modules/field_ui/tests/src/Kernel/EntityFormDisplayTest.php
index 6a9eacf4904c056f961662006186b86f4d3cde50..eb3e0be5190d212d15e642d11d7634266a78389c 100644
--- a/core/modules/field_ui/tests/src/Kernel/EntityFormDisplayTest.php
+++ b/core/modules/field_ui/tests/src/Kernel/EntityFormDisplayTest.php
@@ -20,7 +20,7 @@ class EntityFormDisplayTest extends KernelTestBase {
    *
    * @var string[]
    */
-  public static $modules = ['field_ui', 'field', 'entity_test', 'field_test', 'user', 'text'];
+  protected static $modules = ['field_ui', 'field', 'entity_test', 'field_test', 'user', 'text'];
 
   protected function setUp(): void {
     parent::setUp();
diff --git a/core/modules/file/tests/src/Functional/FileFieldFormatterAccessTest.php b/core/modules/file/tests/src/Functional/FileFieldFormatterAccessTest.php
index 4dc6aedf5dd201dd51fab4f87f12fb9769061c48..0e8100c154542aed74f2b46a2503c72f4f0dd42b 100644
--- a/core/modules/file/tests/src/Functional/FileFieldFormatterAccessTest.php
+++ b/core/modules/file/tests/src/Functional/FileFieldFormatterAccessTest.php
@@ -13,7 +13,7 @@ class FileFieldFormatterAccessTest extends FileFieldTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'file', 'field_ui', 'file_test'];
+  protected static $modules = ['node', 'file', 'field_ui', 'file_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/file/tests/src/Functional/FileFieldRSSContentTest.php b/core/modules/file/tests/src/Functional/FileFieldRSSContentTest.php
index 73f94047a068c5719a14dc499309c2f271041467..0a0400ce25aa4609e2d61a484b013869091f30dc 100644
--- a/core/modules/file/tests/src/Functional/FileFieldRSSContentTest.php
+++ b/core/modules/file/tests/src/Functional/FileFieldRSSContentTest.php
@@ -16,7 +16,7 @@ class FileFieldRSSContentTest extends FileFieldTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'views'];
+  protected static $modules = ['node', 'views'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/file/tests/src/Functional/FileListingTest.php b/core/modules/file/tests/src/Functional/FileListingTest.php
index 4ec0f04887c99a776f38da35b4f3b2f384088bcd..766456bb3f4cf24f1200e125614ecd8df8b441dd 100644
--- a/core/modules/file/tests/src/Functional/FileListingTest.php
+++ b/core/modules/file/tests/src/Functional/FileListingTest.php
@@ -18,7 +18,7 @@ class FileListingTest extends FileFieldTestBase {
    *
    * @var array
    */
-  public static $modules = ['views', 'file', 'image', 'entity_test'];
+  protected static $modules = ['views', 'file', 'image', 'entity_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/file/tests/src/Functional/FileManagedTestBase.php b/core/modules/file/tests/src/Functional/FileManagedTestBase.php
index 61099ea1c3044813c7f551d3dd3e0089fd7f33fc..cc4bb9f05c1f39e95edd539e9ad82bfe6e951453 100644
--- a/core/modules/file/tests/src/Functional/FileManagedTestBase.php
+++ b/core/modules/file/tests/src/Functional/FileManagedTestBase.php
@@ -18,7 +18,7 @@ abstract class FileManagedTestBase extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['file_test', 'file'];
+  protected static $modules = ['file_test', 'file'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/file/tests/src/Functional/FileOnTranslatedEntityTest.php b/core/modules/file/tests/src/Functional/FileOnTranslatedEntityTest.php
index 8208bf974085f3b3aaec0e124c911a8d05314c43..b36fe78683b304cb47dfbcbdcafd6ceca3a9c470 100644
--- a/core/modules/file/tests/src/Functional/FileOnTranslatedEntityTest.php
+++ b/core/modules/file/tests/src/Functional/FileOnTranslatedEntityTest.php
@@ -14,7 +14,7 @@ class FileOnTranslatedEntityTest extends FileFieldTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['language', 'content_translation'];
+  protected static $modules = ['language', 'content_translation'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/file/tests/src/Functional/FilePrivateTest.php b/core/modules/file/tests/src/Functional/FilePrivateTest.php
index 26e7a548013e80ec29bc7259d6c963e9c422c56f..69f540662b0899b8bfe4d5a769a7492e6a6e8672 100644
--- a/core/modules/file/tests/src/Functional/FilePrivateTest.php
+++ b/core/modules/file/tests/src/Functional/FilePrivateTest.php
@@ -20,7 +20,7 @@ class FilePrivateTest extends FileFieldTestBase {
    *
    * @var array
    */
-  public static $modules = ['node_access_test', 'field_test'];
+  protected static $modules = ['node_access_test', 'field_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/file/tests/src/Functional/FileUploadJsonBasicAuthTest.php b/core/modules/file/tests/src/Functional/FileUploadJsonBasicAuthTest.php
index 49f50f6614a2e7bceb1be42a3b853ffdc9fb76e6..8a3e880921ec963a6d1d4ab5f6ba7c388d09a0a1 100644
--- a/core/modules/file/tests/src/Functional/FileUploadJsonBasicAuthTest.php
+++ b/core/modules/file/tests/src/Functional/FileUploadJsonBasicAuthTest.php
@@ -15,7 +15,7 @@ class FileUploadJsonBasicAuthTest extends FileUploadResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/file/tests/src/Functional/Hal/FileHalJsonAnonTest.php b/core/modules/file/tests/src/Functional/Hal/FileHalJsonAnonTest.php
index bf24dadd9d2f6bd4c06e3cdc94c3cde2036bed63..c40dd8a53a41c93ef8e8f73a6ffd3644d87d71df 100644
--- a/core/modules/file/tests/src/Functional/Hal/FileHalJsonAnonTest.php
+++ b/core/modules/file/tests/src/Functional/Hal/FileHalJsonAnonTest.php
@@ -17,7 +17,7 @@ class FileHalJsonAnonTest extends FileResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/file/tests/src/Functional/Hal/FileHalJsonBasicAuthTest.php b/core/modules/file/tests/src/Functional/Hal/FileHalJsonBasicAuthTest.php
index 5fbf7678eb7889782a5970a96d37fb348c479c62..494fbf1ae972b5b1165ff29fcd80a89a01857b6b 100644
--- a/core/modules/file/tests/src/Functional/Hal/FileHalJsonBasicAuthTest.php
+++ b/core/modules/file/tests/src/Functional/Hal/FileHalJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class FileHalJsonBasicAuthTest extends FileHalJsonAnonTest {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/file/tests/src/Functional/Hal/FileUploadHalJsonBasicAuthTest.php b/core/modules/file/tests/src/Functional/Hal/FileUploadHalJsonBasicAuthTest.php
index 7cb3fb256b3e0ff046cd848075edb0529c1cd940..aa884d428b9157b9a0e272234b5f3d3204f72960 100644
--- a/core/modules/file/tests/src/Functional/Hal/FileUploadHalJsonBasicAuthTest.php
+++ b/core/modules/file/tests/src/Functional/Hal/FileUploadHalJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class FileUploadHalJsonBasicAuthTest extends FileUploadHalJsonTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/file/tests/src/Functional/Hal/FileUploadHalJsonTestBase.php b/core/modules/file/tests/src/Functional/Hal/FileUploadHalJsonTestBase.php
index 0b98c33f17bd2dccb1f004793a8174097fb9927c..c0e07720306532468064a7efeec5dca38f0d667b 100644
--- a/core/modules/file/tests/src/Functional/Hal/FileUploadHalJsonTestBase.php
+++ b/core/modules/file/tests/src/Functional/Hal/FileUploadHalJsonTestBase.php
@@ -15,7 +15,7 @@ abstract class FileUploadHalJsonTestBase extends FileUploadResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/file/tests/src/Functional/MultipleFileUploadTest.php b/core/modules/file/tests/src/Functional/MultipleFileUploadTest.php
index fe746318bfb67bd835d09422999879f783a55fc0..ce0b36c2cab320c38db73dbb39b544e439e5056d 100644
--- a/core/modules/file/tests/src/Functional/MultipleFileUploadTest.php
+++ b/core/modules/file/tests/src/Functional/MultipleFileUploadTest.php
@@ -14,7 +14,7 @@ class MultipleFileUploadTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['file'];
+  protected static $modules = ['file'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/file/tests/src/Functional/PrivateFileOnTranslatedEntityTest.php b/core/modules/file/tests/src/Functional/PrivateFileOnTranslatedEntityTest.php
index a706a62fd53ab1e33f2496391f8770d5504a65bc..20ea56bf18a0a2808d0d716231b1f5b038120c6d 100644
--- a/core/modules/file/tests/src/Functional/PrivateFileOnTranslatedEntityTest.php
+++ b/core/modules/file/tests/src/Functional/PrivateFileOnTranslatedEntityTest.php
@@ -15,7 +15,7 @@ class PrivateFileOnTranslatedEntityTest extends FileFieldTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['language', 'content_translation'];
+  protected static $modules = ['language', 'content_translation'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/file/tests/src/Functional/RemoteFileSaveUploadTest.php b/core/modules/file/tests/src/Functional/RemoteFileSaveUploadTest.php
index 9079c7638a89c2e6c3de7c0e0616b6c2317a0a49..65686d22ae267bf06851a60add57bc646bdab6f8 100644
--- a/core/modules/file/tests/src/Functional/RemoteFileSaveUploadTest.php
+++ b/core/modules/file/tests/src/Functional/RemoteFileSaveUploadTest.php
@@ -14,7 +14,7 @@ class RemoteFileSaveUploadTest extends SaveUploadTest {
    *
    * @var array
    */
-  public static $modules = ['file_test'];
+  protected static $modules = ['file_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/file/tests/src/Functional/Rest/FileJsonBasicAuthTest.php b/core/modules/file/tests/src/Functional/Rest/FileJsonBasicAuthTest.php
index a327a0d9d7ad08610dd1a540090a1fa022aa490d..c57bf523a01ba1255ba1eab7cf1061cf35ad6fbd 100644
--- a/core/modules/file/tests/src/Functional/Rest/FileJsonBasicAuthTest.php
+++ b/core/modules/file/tests/src/Functional/Rest/FileJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class FileJsonBasicAuthTest extends FileResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/file/tests/src/Functional/Rest/FileResourceTestBase.php b/core/modules/file/tests/src/Functional/Rest/FileResourceTestBase.php
index 855a9460509306e15a4581c05ed960d454668735..ebbf6ac5376dfa2d3dd6ee5142c5215a203107b0 100644
--- a/core/modules/file/tests/src/Functional/Rest/FileResourceTestBase.php
+++ b/core/modules/file/tests/src/Functional/Rest/FileResourceTestBase.php
@@ -11,7 +11,7 @@ abstract class FileResourceTestBase extends EntityResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['file', 'user'];
+  protected static $modules = ['file', 'user'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/file/tests/src/Functional/Rest/FileXmlBasicAuthTest.php b/core/modules/file/tests/src/Functional/Rest/FileXmlBasicAuthTest.php
index e0e0030239bedb6205d4b5d0c3779951456742c6..bde591e363c0a1d5d87aeadb3d3496db9db0f1ae 100644
--- a/core/modules/file/tests/src/Functional/Rest/FileXmlBasicAuthTest.php
+++ b/core/modules/file/tests/src/Functional/Rest/FileXmlBasicAuthTest.php
@@ -16,7 +16,7 @@ class FileXmlBasicAuthTest extends FileResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/file/tests/src/Functional/SaveUploadFormTest.php b/core/modules/file/tests/src/Functional/SaveUploadFormTest.php
index 30d2db078e897826c78c25684a2ee2bce3923b6c..92ce2d332e38ad3af8cac745f48d287513cf273d 100644
--- a/core/modules/file/tests/src/Functional/SaveUploadFormTest.php
+++ b/core/modules/file/tests/src/Functional/SaveUploadFormTest.php
@@ -24,7 +24,7 @@ class SaveUploadFormTest extends FileManagedTestBase {
    *
    * @var array
    */
-  public static $modules = ['dblog'];
+  protected static $modules = ['dblog'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/file/tests/src/Functional/SaveUploadTest.php b/core/modules/file/tests/src/Functional/SaveUploadTest.php
index 59a3fd3810ad4908f4e8f331a848b2f36db51694..891de3b71215f2c5884eaec031da79422906d9df 100644
--- a/core/modules/file/tests/src/Functional/SaveUploadTest.php
+++ b/core/modules/file/tests/src/Functional/SaveUploadTest.php
@@ -24,7 +24,7 @@ class SaveUploadTest extends FileManagedTestBase {
    *
    * @var array
    */
-  public static $modules = ['dblog'];
+  protected static $modules = ['dblog'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/file/tests/src/Functional/Views/RelationshipUserFileDataTest.php b/core/modules/file/tests/src/Functional/Views/RelationshipUserFileDataTest.php
index 40706f5763588998e5393cb67af99923815430df..2b5e5b8e161ff6f4557a220c1485d245676fe8af 100644
--- a/core/modules/file/tests/src/Functional/Views/RelationshipUserFileDataTest.php
+++ b/core/modules/file/tests/src/Functional/Views/RelationshipUserFileDataTest.php
@@ -21,7 +21,7 @@ class RelationshipUserFileDataTest extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = ['file', 'file_test_views', 'user'];
+  protected static $modules = ['file', 'file_test_views', 'user'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/file/tests/src/FunctionalJavascript/FileFieldValidateTest.php b/core/modules/file/tests/src/FunctionalJavascript/FileFieldValidateTest.php
index afbccbbcdde05afe0857572d04c7a950c261b5c0..44bf484561f39ec9d751a0b46109336aefe2c887 100644
--- a/core/modules/file/tests/src/FunctionalJavascript/FileFieldValidateTest.php
+++ b/core/modules/file/tests/src/FunctionalJavascript/FileFieldValidateTest.php
@@ -20,7 +20,7 @@ class FileFieldValidateTest extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'file'];
+  protected static $modules = ['node', 'file'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/file/tests/src/FunctionalJavascript/MaximumFileSizeExceededUploadTest.php b/core/modules/file/tests/src/FunctionalJavascript/MaximumFileSizeExceededUploadTest.php
index 5f7ca225af02fe8449f07591c86cdf940a4a42e5..6a7b8db6e8612ce00b68b63c886855a678f55285 100644
--- a/core/modules/file/tests/src/FunctionalJavascript/MaximumFileSizeExceededUploadTest.php
+++ b/core/modules/file/tests/src/FunctionalJavascript/MaximumFileSizeExceededUploadTest.php
@@ -20,7 +20,7 @@ class MaximumFileSizeExceededUploadTest extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'file'];
+  protected static $modules = ['node', 'file'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/file/tests/src/Kernel/AccessTest.php b/core/modules/file/tests/src/Kernel/AccessTest.php
index a53c9f580a7a38acd5e9dd04529103a1994de12d..5f9c0100c2ab4e95c1e74b24f62c2cabb51645f8 100644
--- a/core/modules/file/tests/src/Kernel/AccessTest.php
+++ b/core/modules/file/tests/src/Kernel/AccessTest.php
@@ -18,7 +18,7 @@ class AccessTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['file', 'system', 'user'];
+  protected static $modules = ['file', 'system', 'user'];
 
   /**
    * An authenticated user.
diff --git a/core/modules/file/tests/src/Kernel/FileItemTest.php b/core/modules/file/tests/src/Kernel/FileItemTest.php
index bddfbfcf30946a8e62aba664486b1ad54b6f47fe..2e37dea5aa2cdfab295c3da9c6fccd870556305c 100644
--- a/core/modules/file/tests/src/Kernel/FileItemTest.php
+++ b/core/modules/file/tests/src/Kernel/FileItemTest.php
@@ -24,7 +24,7 @@ class FileItemTest extends FieldKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['file'];
+  protected static $modules = ['file'];
 
   /**
    * Created file entity.
diff --git a/core/modules/file/tests/src/Kernel/FileItemValidationTest.php b/core/modules/file/tests/src/Kernel/FileItemValidationTest.php
index a6704a897f5734d15be6e62827b746a185addae7..6138d9beb76a02c254c2f8504f1db078b2685d34 100644
--- a/core/modules/file/tests/src/Kernel/FileItemValidationTest.php
+++ b/core/modules/file/tests/src/Kernel/FileItemValidationTest.php
@@ -20,7 +20,7 @@ class FileItemValidationTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['file', 'image', 'entity_test', 'field', 'user', 'system'];
+  protected static $modules = ['file', 'image', 'entity_test', 'field', 'user', 'system'];
 
   /**
    * A user.
diff --git a/core/modules/file/tests/src/Kernel/FileManagedUnitTestBase.php b/core/modules/file/tests/src/Kernel/FileManagedUnitTestBase.php
index da8194a8d6fc6f73522493c7b326b80f63c61582..76ca34563f11d66a2b469281368b2c89394964d0 100644
--- a/core/modules/file/tests/src/Kernel/FileManagedUnitTestBase.php
+++ b/core/modules/file/tests/src/Kernel/FileManagedUnitTestBase.php
@@ -19,7 +19,7 @@ abstract class FileManagedUnitTestBase extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['file_test', 'file', 'system', 'field', 'user'];
+  protected static $modules = ['file_test', 'file', 'system', 'field', 'user'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/file/tests/src/Kernel/FileModuleTest.php b/core/modules/file/tests/src/Kernel/FileModuleTest.php
index a1cfa2f51af4e6556a304e3279a3902bfc06ea52..7978cc861c27502f03a6ff75ec53f4b534f15882 100644
--- a/core/modules/file/tests/src/Kernel/FileModuleTest.php
+++ b/core/modules/file/tests/src/Kernel/FileModuleTest.php
@@ -17,7 +17,7 @@ class FileModuleTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['file'];
+  protected static $modules = ['file'];
 
   /**
    * Tests file size upload errors.
diff --git a/core/modules/file/tests/src/Kernel/Formatter/FileEntityFormatterTest.php b/core/modules/file/tests/src/Kernel/Formatter/FileEntityFormatterTest.php
index 3b2e066c8fb03656f391555ce42eac0660a792ea..b64a38b6f9857b9235e975e9415dbee6d67ff2ca 100644
--- a/core/modules/file/tests/src/Kernel/Formatter/FileEntityFormatterTest.php
+++ b/core/modules/file/tests/src/Kernel/Formatter/FileEntityFormatterTest.php
@@ -17,7 +17,7 @@ class FileEntityFormatterTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['file', 'user'];
+  protected static $modules = ['file', 'user'];
 
   /**
    * The files.
diff --git a/core/modules/file/tests/src/Kernel/Migrate/MigrateFileStubTest.php b/core/modules/file/tests/src/Kernel/Migrate/MigrateFileStubTest.php
index 204c666c74291d12bfcf7a80a17953cc259e3847..410fd0ae01bc9d3facaf4cbe2ad34d77a677b2df 100644
--- a/core/modules/file/tests/src/Kernel/Migrate/MigrateFileStubTest.php
+++ b/core/modules/file/tests/src/Kernel/Migrate/MigrateFileStubTest.php
@@ -17,7 +17,7 @@ class MigrateFileStubTest extends MigrateDrupalTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['file'];
+  protected static $modules = ['file'];
 
   /**
    * {@inheritdoc}
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 2b381fac76fc2fb2c9c57d8157799fb31cf0432d..d026ee12f1f8514242ca6d31d871551c2156f9cb 100644
--- a/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadEntityDisplayTest.php
+++ b/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadEntityDisplayTest.php
@@ -15,7 +15,7 @@ class MigrateUploadEntityDisplayTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['menu_ui'];
+  protected static $modules = ['menu_ui'];
 
   /**
    * {@inheritdoc}
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 e9c3e61e757f29ac24e7a01bd59eef78d07ae506..0ed44fefd35af9b4989e015f030dfcf76870563d 100644
--- a/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadEntityFormDisplayTest.php
+++ b/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadEntityFormDisplayTest.php
@@ -15,7 +15,7 @@ class MigrateUploadEntityFormDisplayTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['menu_ui'];
+  protected static $modules = ['menu_ui'];
 
   /**
    * {@inheritdoc}
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 5d8b825f13e0daaa7595450bbae98b62cb3caa2d..5f26c2dff57cca83888c9e434275b56142d25043 100644
--- a/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadFieldTest.php
+++ b/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadFieldTest.php
@@ -15,7 +15,7 @@ class MigrateUploadFieldTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['menu_ui'];
+  protected static $modules = ['menu_ui'];
 
   /**
    * {@inheritdoc}
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 38ff36178df3d50443689642010ee26ef043bf05..f37999cef5ca6c9a28410ba9fc43454aef34e6fd 100644
--- a/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadInstanceTest.php
+++ b/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadInstanceTest.php
@@ -15,7 +15,7 @@ class MigrateUploadInstanceTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['menu_ui'];
+  protected static $modules = ['menu_ui'];
 
   /**
    * {@inheritdoc}
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 f2459e5ac95dfa200ca085f1d1643f3b3d4f83f5..8facb60bb7ae351ddec4ae6286cb7cfb2c5ffa2c 100644
--- a/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadTest.php
+++ b/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadTest.php
@@ -16,7 +16,7 @@ class MigrateUploadTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'language',
     'content_translation',
     'menu_ui',
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 e3b234b93568e00580dc0e98f87e5c76b973829b..fcfe5adcfe6f92edf6763fdd29cc6f82c1d35c9e 100644
--- a/core/modules/file/tests/src/Kernel/Migrate/d7/MigrateFileTest.php
+++ b/core/modules/file/tests/src/Kernel/Migrate/d7/MigrateFileTest.php
@@ -17,7 +17,7 @@ class MigrateFileTest extends MigrateDrupal7TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['file'];
+  protected static $modules = ['file'];
 
   /**
    * {@inheritdoc}
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 39517772c872e7aa5f4268a09340ac07139804dc..f9ecfc7fb6ed08f0905fdf06f8b1727a53479533 100644
--- a/core/modules/file/tests/src/Kernel/Migrate/d7/MigratePrivateFileTest.php
+++ b/core/modules/file/tests/src/Kernel/Migrate/d7/MigratePrivateFileTest.php
@@ -17,7 +17,7 @@ class MigratePrivateFileTest extends MigrateDrupal7TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['file'];
+  protected static $modules = ['file'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/file/tests/src/Kernel/Plugin/migrate/source/d6/FileTest.php b/core/modules/file/tests/src/Kernel/Plugin/migrate/source/d6/FileTest.php
index 33c430e2fdf276d11a5fde7883030b53c5d77eee..f316f9035e1c96bf515000525876df3a934f65f9 100644
--- a/core/modules/file/tests/src/Kernel/Plugin/migrate/source/d6/FileTest.php
+++ b/core/modules/file/tests/src/Kernel/Plugin/migrate/source/d6/FileTest.php
@@ -16,7 +16,7 @@ class FileTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['file', 'migrate_drupal'];
+  protected static $modules = ['file', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/file/tests/src/Kernel/Plugin/migrate/source/d6/UploadInstanceTest.php b/core/modules/file/tests/src/Kernel/Plugin/migrate/source/d6/UploadInstanceTest.php
index 711b36fec32d104e2c749022017f2387398a5543..e2d34b4f0814be103082caba036b52b17466ddf9 100644
--- a/core/modules/file/tests/src/Kernel/Plugin/migrate/source/d6/UploadInstanceTest.php
+++ b/core/modules/file/tests/src/Kernel/Plugin/migrate/source/d6/UploadInstanceTest.php
@@ -16,7 +16,7 @@ class UploadInstanceTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['file', 'migrate_drupal'];
+  protected static $modules = ['file', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/file/tests/src/Kernel/Plugin/migrate/source/d6/UploadTest.php b/core/modules/file/tests/src/Kernel/Plugin/migrate/source/d6/UploadTest.php
index 1f950b40cd19bd66b0dfdae45f120dddf93de159..7d5a6cfa2c4dfd5b7fc9fb74fb2aa613483ae66b 100644
--- a/core/modules/file/tests/src/Kernel/Plugin/migrate/source/d6/UploadTest.php
+++ b/core/modules/file/tests/src/Kernel/Plugin/migrate/source/d6/UploadTest.php
@@ -16,7 +16,7 @@ class UploadTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['file', 'migrate_drupal'];
+  protected static $modules = ['file', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/file/tests/src/Kernel/Plugin/migrate/source/d7/FileTest.php b/core/modules/file/tests/src/Kernel/Plugin/migrate/source/d7/FileTest.php
index b588ad789ce5ad19fc99c6be45f4b8dd7b8a57d1..d5f76549f1d71e2709c8678467dd0f3beeea2e24 100644
--- a/core/modules/file/tests/src/Kernel/Plugin/migrate/source/d7/FileTest.php
+++ b/core/modules/file/tests/src/Kernel/Plugin/migrate/source/d7/FileTest.php
@@ -15,7 +15,7 @@ class FileTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['file', 'migrate_drupal'];
+  protected static $modules = ['file', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/file/tests/src/Kernel/Views/ExtensionViewsFieldTest.php b/core/modules/file/tests/src/Kernel/Views/ExtensionViewsFieldTest.php
index 57e79c292dd757465f6d704b04a3e67094740989..dc3701f00bae789df1a44ad61230c46ab42339c8 100644
--- a/core/modules/file/tests/src/Kernel/Views/ExtensionViewsFieldTest.php
+++ b/core/modules/file/tests/src/Kernel/Views/ExtensionViewsFieldTest.php
@@ -18,7 +18,7 @@ class ExtensionViewsFieldTest extends ViewsKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['file', 'file_test_views', 'user'];
+  protected static $modules = ['file', 'file_test_views', 'user'];
 
   /**
    * Views used by this test.
diff --git a/core/modules/file/tests/src/Kernel/Views/FileViewsFieldAccessTest.php b/core/modules/file/tests/src/Kernel/Views/FileViewsFieldAccessTest.php
index 31231d334584f0f60da094aa4cb50e73e8e2f124..1b85a74409c8c841ec46f56acc3f13f72860c343 100644
--- a/core/modules/file/tests/src/Kernel/Views/FileViewsFieldAccessTest.php
+++ b/core/modules/file/tests/src/Kernel/Views/FileViewsFieldAccessTest.php
@@ -17,7 +17,7 @@ class FileViewsFieldAccessTest extends FieldFieldAccessTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['file', 'entity_test', 'language', 'user'];
+  protected static $modules = ['file', 'entity_test', 'language', 'user'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/filter/tests/src/Functional/FilterAdminTest.php b/core/modules/filter/tests/src/Functional/FilterAdminTest.php
index dc5ecced7a4eac3a8008e98d20afe1c92a374966..dce9a905e21484d7dba09b15376f52d9afba237c 100644
--- a/core/modules/filter/tests/src/Functional/FilterAdminTest.php
+++ b/core/modules/filter/tests/src/Functional/FilterAdminTest.php
@@ -20,7 +20,7 @@ class FilterAdminTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['block', 'filter', 'node', 'filter_test_plugin', 'dblog'];
+  protected static $modules = ['block', 'filter', 'node', 'filter_test_plugin', 'dblog'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/filter/tests/src/Functional/FilterDefaultFormatTest.php b/core/modules/filter/tests/src/Functional/FilterDefaultFormatTest.php
index d74a14dc6fe85b5a689c2383110953b585f0e57c..d19808d5ffe889dc2ebbd74bbfbda917464ef9a8 100644
--- a/core/modules/filter/tests/src/Functional/FilterDefaultFormatTest.php
+++ b/core/modules/filter/tests/src/Functional/FilterDefaultFormatTest.php
@@ -17,7 +17,7 @@ class FilterDefaultFormatTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['filter'];
+  protected static $modules = ['filter'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/filter/tests/src/Functional/FilterFormatAccessTest.php b/core/modules/filter/tests/src/Functional/FilterFormatAccessTest.php
index f8f917e8686febefd8424c7797daf2adebdc4e12..d5eb8bb85381c70b58b2bdcc1da4bff3a619cf1a 100644
--- a/core/modules/filter/tests/src/Functional/FilterFormatAccessTest.php
+++ b/core/modules/filter/tests/src/Functional/FilterFormatAccessTest.php
@@ -19,7 +19,7 @@ class FilterFormatAccessTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['block', 'filter', 'node'];
+  protected static $modules = ['block', 'filter', 'node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/filter/tests/src/Functional/FilterHooksTest.php b/core/modules/filter/tests/src/Functional/FilterHooksTest.php
index a70a95f96502a9c103985721fffda6b06f54ee1f..8ed68af263780d5345d743f38f5e2315f279b5ed 100644
--- a/core/modules/filter/tests/src/Functional/FilterHooksTest.php
+++ b/core/modules/filter/tests/src/Functional/FilterHooksTest.php
@@ -17,7 +17,7 @@ class FilterHooksTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'filter_test'];
+  protected static $modules = ['node', 'filter_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/filter/tests/src/Functional/FilterHtmlImageSecureTest.php b/core/modules/filter/tests/src/Functional/FilterHtmlImageSecureTest.php
index 3e8a294926919f1ac95060da44fcf75e8fbd11bd..8a0ddb5f6895d58d9e6d3d68656f4709d7571072 100644
--- a/core/modules/filter/tests/src/Functional/FilterHtmlImageSecureTest.php
+++ b/core/modules/filter/tests/src/Functional/FilterHtmlImageSecureTest.php
@@ -24,7 +24,7 @@ class FilterHtmlImageSecureTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['filter', 'node', 'comment'];
+  protected static $modules = ['filter', 'node', 'comment'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/filter/tests/src/Functional/FilterSecurityTest.php b/core/modules/filter/tests/src/Functional/FilterSecurityTest.php
index 3b6d5d71a48093e7fe3e634314933b15f6ea580c..fc6085048e43b02b7f2436703617d4c0c3cb0157 100644
--- a/core/modules/filter/tests/src/Functional/FilterSecurityTest.php
+++ b/core/modules/filter/tests/src/Functional/FilterSecurityTest.php
@@ -21,7 +21,7 @@ class FilterSecurityTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'filter_test'];
+  protected static $modules = ['node', 'filter_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/filter/tests/src/Functional/Hal/FilterFormatHalJsonAnonTest.php b/core/modules/filter/tests/src/Functional/Hal/FilterFormatHalJsonAnonTest.php
index 8e59a6820d532eb2f182cf03d1cdc7853b92c0cc..d7425687c1829fb22cc905f852c3960318eac669 100644
--- a/core/modules/filter/tests/src/Functional/Hal/FilterFormatHalJsonAnonTest.php
+++ b/core/modules/filter/tests/src/Functional/Hal/FilterFormatHalJsonAnonTest.php
@@ -15,7 +15,7 @@ class FilterFormatHalJsonAnonTest extends FilterFormatResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/filter/tests/src/Functional/Hal/FilterFormatHalJsonBasicAuthTest.php b/core/modules/filter/tests/src/Functional/Hal/FilterFormatHalJsonBasicAuthTest.php
index 00a320cfa54a702d4470a6605779042d0f7efaf1..67e0fff94b08da658f77f7b1051cc7f3d00f5135 100644
--- a/core/modules/filter/tests/src/Functional/Hal/FilterFormatHalJsonBasicAuthTest.php
+++ b/core/modules/filter/tests/src/Functional/Hal/FilterFormatHalJsonBasicAuthTest.php
@@ -15,7 +15,7 @@ class FilterFormatHalJsonBasicAuthTest extends FilterFormatResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal', 'basic_auth'];
+  protected static $modules = ['hal', 'basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/filter/tests/src/Functional/Hal/FilterFormatHalJsonCookieTest.php b/core/modules/filter/tests/src/Functional/Hal/FilterFormatHalJsonCookieTest.php
index 262d0449aac6d70c47ca41339f05afec4294cef1..59906b475b0be80a083f22807bb42d1bbb12e53b 100644
--- a/core/modules/filter/tests/src/Functional/Hal/FilterFormatHalJsonCookieTest.php
+++ b/core/modules/filter/tests/src/Functional/Hal/FilterFormatHalJsonCookieTest.php
@@ -15,7 +15,7 @@ class FilterFormatHalJsonCookieTest extends FilterFormatResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/filter/tests/src/Functional/Rest/FilterFormatJsonBasicAuthTest.php b/core/modules/filter/tests/src/Functional/Rest/FilterFormatJsonBasicAuthTest.php
index 10267cf2d2b891dd958ed7996f76886a63b7004a..64eb119081e97834cbafb042bf0d9673238f817d 100644
--- a/core/modules/filter/tests/src/Functional/Rest/FilterFormatJsonBasicAuthTest.php
+++ b/core/modules/filter/tests/src/Functional/Rest/FilterFormatJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class FilterFormatJsonBasicAuthTest extends FilterFormatResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/filter/tests/src/Functional/Rest/FilterFormatResourceTestBase.php b/core/modules/filter/tests/src/Functional/Rest/FilterFormatResourceTestBase.php
index 5a0174a65a56691323b95613cb47dec4c55deae4..05a0c9fe190c36e0869b47927356507580c5d9a9 100644
--- a/core/modules/filter/tests/src/Functional/Rest/FilterFormatResourceTestBase.php
+++ b/core/modules/filter/tests/src/Functional/Rest/FilterFormatResourceTestBase.php
@@ -10,7 +10,7 @@ abstract class FilterFormatResourceTestBase extends EntityResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [];
+  protected static $modules = [];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/filter/tests/src/Functional/Rest/FilterFormatXmlBasicAuthTest.php b/core/modules/filter/tests/src/Functional/Rest/FilterFormatXmlBasicAuthTest.php
index 8f2c5be0db62004d5d19acc4b468e8afcfce96aa..ea388ee7dbe452daae66913bdfcc75c321968a60 100644
--- a/core/modules/filter/tests/src/Functional/Rest/FilterFormatXmlBasicAuthTest.php
+++ b/core/modules/filter/tests/src/Functional/Rest/FilterFormatXmlBasicAuthTest.php
@@ -16,7 +16,7 @@ class FilterFormatXmlBasicAuthTest extends FilterFormatResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/filter/tests/src/Kernel/FilterAPITest.php b/core/modules/filter/tests/src/Kernel/FilterAPITest.php
index a87f817a23d0befdf9fab482c413a4170a01510f..c820365487610643db563033d97dcdf39aa29e28 100644
--- a/core/modules/filter/tests/src/Kernel/FilterAPITest.php
+++ b/core/modules/filter/tests/src/Kernel/FilterAPITest.php
@@ -20,7 +20,7 @@
  */
 class FilterAPITest extends EntityKernelTestBase {
 
-  public static $modules = ['system', 'filter', 'filter_test', 'user'];
+  protected static $modules = ['system', 'filter', 'filter_test', 'user'];
 
   protected function setUp(): void {
     parent::setUp();
diff --git a/core/modules/filter/tests/src/Kernel/FilterCrudTest.php b/core/modules/filter/tests/src/Kernel/FilterCrudTest.php
index f42fff0ccb410a747f08ce21e51cad44b623717c..83509ee17620c7b3e0c0ecf6862a92f9d1cd3be7 100644
--- a/core/modules/filter/tests/src/Kernel/FilterCrudTest.php
+++ b/core/modules/filter/tests/src/Kernel/FilterCrudTest.php
@@ -18,7 +18,7 @@ class FilterCrudTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['filter', 'filter_test', 'system', 'user'];
+  protected static $modules = ['filter', 'filter_test', 'system', 'user'];
 
   /**
    * Tests CRUD operations for text formats and filters.
diff --git a/core/modules/filter/tests/src/Kernel/FilterDefaultConfigTest.php b/core/modules/filter/tests/src/Kernel/FilterDefaultConfigTest.php
index 047df9dc03cf7ad1ec6b56470f168445690e7059..2fa3511d9c98e5c4647a2a3ffbfa1ca17ca02b7b 100644
--- a/core/modules/filter/tests/src/Kernel/FilterDefaultConfigTest.php
+++ b/core/modules/filter/tests/src/Kernel/FilterDefaultConfigTest.php
@@ -13,7 +13,7 @@
  */
 class FilterDefaultConfigTest extends KernelTestBase {
 
-  public static $modules = ['system', 'user', 'filter', 'filter_test'];
+  protected static $modules = ['system', 'user', 'filter', 'filter_test'];
 
   protected function setUp(): void {
     parent::setUp();
diff --git a/core/modules/filter/tests/src/Kernel/FilterKernelTest.php b/core/modules/filter/tests/src/Kernel/FilterKernelTest.php
index 96e633125a80dd223d84b865ca2d8d980a7206f0..a7cd9843f90a2f5eeff8926af5f984b6b25b3771 100644
--- a/core/modules/filter/tests/src/Kernel/FilterKernelTest.php
+++ b/core/modules/filter/tests/src/Kernel/FilterKernelTest.php
@@ -23,7 +23,7 @@ class FilterKernelTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['system', 'filter'];
+  protected static $modules = ['system', 'filter'];
 
   /**
    * @var \Drupal\filter\Plugin\FilterInterface[]
diff --git a/core/modules/filter/tests/src/Kernel/FilterNoFormatTest.php b/core/modules/filter/tests/src/Kernel/FilterNoFormatTest.php
index bbe40b9e215a59b59fe430c35b17e716acd7348e..7ced2370cfcf60f1a1dfb3b26db3d5ab2d2d98f0 100644
--- a/core/modules/filter/tests/src/Kernel/FilterNoFormatTest.php
+++ b/core/modules/filter/tests/src/Kernel/FilterNoFormatTest.php
@@ -14,7 +14,7 @@ class FilterNoFormatTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['filter'];
+  protected static $modules = ['filter'];
 
   /**
    * Tests text without format.
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 9b22fa92302a99fd294e50e328a8a176c000506b..fde18a44337429fc50d0474019e5bdc5d89b5c92 100644
--- a/core/modules/filter/tests/src/Kernel/Migrate/d7/MigrateFilterFormatTest.php
+++ b/core/modules/filter/tests/src/Kernel/Migrate/d7/MigrateFilterFormatTest.php
@@ -16,7 +16,7 @@ class MigrateFilterFormatTest extends MigrateDrupal7TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['filter'];
+  protected static $modules = ['filter'];
 
   /**
    * {@inheritdoc}
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 deb2972c9b59a1ee55b88558867480cfb7215ebc..cca6f16644a38068a17a3bb8ec678fdb4d1f5390 100644
--- a/core/modules/filter/tests/src/Kernel/Migrate/d7/MigrateFilterSettingsTest.php
+++ b/core/modules/filter/tests/src/Kernel/Migrate/d7/MigrateFilterSettingsTest.php
@@ -11,7 +11,7 @@
  */
 class MigrateFilterSettingsTest extends MigrateDrupal7TestBase {
 
-  public static $modules = ['filter'];
+  protected static $modules = ['filter'];
 
   /**
    * {@inheritdoc}
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 2fe2a72216a704cc2dfc035b4e499d6491999849..f58eece75744f5ab7a50fbc9fb4b36a0eaec1b3e 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
@@ -20,7 +20,7 @@ class FilterIdTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['filter'];
+  protected static $modules = ['filter'];
 
   /**
    * The mocked MigrateExecutable.
diff --git a/core/modules/filter/tests/src/Kernel/Plugin/migrate/source/d6/FilterFormatTest.php b/core/modules/filter/tests/src/Kernel/Plugin/migrate/source/d6/FilterFormatTest.php
index a3e708b7b9a8dcf27cbb059f02cb8fd28321ab0e..18448d1f6e3bc855076152176e18a507680d401e 100644
--- a/core/modules/filter/tests/src/Kernel/Plugin/migrate/source/d6/FilterFormatTest.php
+++ b/core/modules/filter/tests/src/Kernel/Plugin/migrate/source/d6/FilterFormatTest.php
@@ -16,7 +16,7 @@ class FilterFormatTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['filter', 'migrate_drupal'];
+  protected static $modules = ['filter', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/filter/tests/src/Kernel/Plugin/migrate/source/d7/FilterFormatTest.php b/core/modules/filter/tests/src/Kernel/Plugin/migrate/source/d7/FilterFormatTest.php
index 2dc9ce7c51f97ec46f7944e1e461e8cf8096ebd4..d2a2d48b5fbf99558d6a96645552a78a76ea3d9c 100644
--- a/core/modules/filter/tests/src/Kernel/Plugin/migrate/source/d7/FilterFormatTest.php
+++ b/core/modules/filter/tests/src/Kernel/Plugin/migrate/source/d7/FilterFormatTest.php
@@ -16,7 +16,7 @@ class FilterFormatTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['filter', 'migrate_drupal'];
+  protected static $modules = ['filter', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/filter/tests/src/Kernel/TextFormatElementFormTest.php b/core/modules/filter/tests/src/Kernel/TextFormatElementFormTest.php
index 2478cd9ce3ac8b8dbbe1b89463d1ee05122cda70..b892e9b35dd1ba2ee565d8db19dc6bc66a43c4b2 100644
--- a/core/modules/filter/tests/src/Kernel/TextFormatElementFormTest.php
+++ b/core/modules/filter/tests/src/Kernel/TextFormatElementFormTest.php
@@ -28,7 +28,7 @@ class TextFormatElementFormTest extends KernelTestBase implements FormInterface
    *
    * @var array
    */
-  public static $modules = ['system', 'user', 'filter', 'filter_test', 'editor'];
+  protected static $modules = ['system', 'user', 'filter', 'filter_test', 'editor'];
 
   /**
    * Sets up the test.
diff --git a/core/modules/forum/tests/src/Functional/ForumBlockTest.php b/core/modules/forum/tests/src/Functional/ForumBlockTest.php
index 0e79cb26cfb45f9bb1b41e1a4ecd750fe15d2444..7545e49b3fb3070874e0d4392c64239c8c0a7e25 100644
--- a/core/modules/forum/tests/src/Functional/ForumBlockTest.php
+++ b/core/modules/forum/tests/src/Functional/ForumBlockTest.php
@@ -19,7 +19,7 @@ class ForumBlockTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['forum', 'block'];
+  protected static $modules = ['forum', 'block'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/forum/tests/src/Functional/ForumIndexTest.php b/core/modules/forum/tests/src/Functional/ForumIndexTest.php
index ec2cc56c2936ea99d6b0a0c70d38b075154046e2..b14a8e3719143c22bfc7247f78ab4af08e29e615 100644
--- a/core/modules/forum/tests/src/Functional/ForumIndexTest.php
+++ b/core/modules/forum/tests/src/Functional/ForumIndexTest.php
@@ -16,7 +16,7 @@ class ForumIndexTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['taxonomy', 'comment', 'forum'];
+  protected static $modules = ['taxonomy', 'comment', 'forum'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/forum/tests/src/Functional/ForumNodeAccessTest.php b/core/modules/forum/tests/src/Functional/ForumNodeAccessTest.php
index d60c2ba6df0923c64f4aa0d09e31d1e4ac22125b..18e80e4c610636b4eb07660c39a3cc5c6a6eac03 100644
--- a/core/modules/forum/tests/src/Functional/ForumNodeAccessTest.php
+++ b/core/modules/forum/tests/src/Functional/ForumNodeAccessTest.php
@@ -17,7 +17,7 @@ class ForumNodeAccessTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'comment', 'forum', 'taxonomy', 'tracker', 'node_access_test', 'block'];
+  protected static $modules = ['node', 'comment', 'forum', 'taxonomy', 'tracker', 'node_access_test', 'block'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/forum/tests/src/Functional/ForumTest.php b/core/modules/forum/tests/src/Functional/ForumTest.php
index d9f2c20cd06bd8ff84a36566826c47c2387d366f..1695ef5b26e06e5a3a7a7eefb798f1971ae0acd8 100644
--- a/core/modules/forum/tests/src/Functional/ForumTest.php
+++ b/core/modules/forum/tests/src/Functional/ForumTest.php
@@ -26,7 +26,7 @@ class ForumTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['taxonomy', 'comment', 'forum', 'node', 'block', 'menu_ui', 'help'];
+  protected static $modules = ['taxonomy', 'comment', 'forum', 'node', 'block', 'menu_ui', 'help'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/forum/tests/src/Functional/ForumUninstallTest.php b/core/modules/forum/tests/src/Functional/ForumUninstallTest.php
index 84c81c89337704a10315009df88b48dbae9d1577..177dbfb569080dae7c7b3a42b20fce29c215edea 100644
--- a/core/modules/forum/tests/src/Functional/ForumUninstallTest.php
+++ b/core/modules/forum/tests/src/Functional/ForumUninstallTest.php
@@ -21,7 +21,7 @@ class ForumUninstallTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['forum'];
+  protected static $modules = ['forum'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/forum/tests/src/Functional/Views/ForumIntegrationTest.php b/core/modules/forum/tests/src/Functional/Views/ForumIntegrationTest.php
index b3d2f5935de169b730bd73890ff190d9bb40bb0e..e09f3c0ef76878c56bfbcf545c24fb678a0a77e0 100644
--- a/core/modules/forum/tests/src/Functional/Views/ForumIntegrationTest.php
+++ b/core/modules/forum/tests/src/Functional/Views/ForumIntegrationTest.php
@@ -19,7 +19,7 @@ class ForumIntegrationTest extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = ['forum_test_views'];
+  protected static $modules = ['forum_test_views'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/forum/tests/src/Kernel/ForumValidationTest.php b/core/modules/forum/tests/src/Kernel/ForumValidationTest.php
index 9b9661b5a2c6254a827d30d46e97b492d809f50e..2bbac728250f61bb1c472424a646b95c6d34a6b0 100644
--- a/core/modules/forum/tests/src/Kernel/ForumValidationTest.php
+++ b/core/modules/forum/tests/src/Kernel/ForumValidationTest.php
@@ -18,7 +18,7 @@ class ForumValidationTest extends EntityKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'options', 'comment', 'taxonomy', 'forum'];
+  protected static $modules = ['node', 'options', 'comment', 'taxonomy', 'forum'];
 
   /**
    * Tests the forum validation constraints.
diff --git a/core/modules/forum/tests/src/Kernel/Migrate/d6/MigrateForumConfigsTest.php b/core/modules/forum/tests/src/Kernel/Migrate/d6/MigrateForumConfigsTest.php
index 2b18de45f10c69bc28665237c674add5fbcaef49..b68f2f03367b246d1fbb2d650980d91260f9e4f8 100644
--- a/core/modules/forum/tests/src/Kernel/Migrate/d6/MigrateForumConfigsTest.php
+++ b/core/modules/forum/tests/src/Kernel/Migrate/d6/MigrateForumConfigsTest.php
@@ -17,7 +17,7 @@ class MigrateForumConfigsTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['comment', 'forum', 'taxonomy'];
+  protected static $modules = ['comment', 'forum', 'taxonomy'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/forum/tests/src/Kernel/Migrate/d6/MigrateForumTest.php b/core/modules/forum/tests/src/Kernel/Migrate/d6/MigrateForumTest.php
index 0d201efa9c70bf97f0228c021abf0aa6132b7c6a..9c17b145c4b1f25a31c231a7a6f927563f9a5ef3 100644
--- a/core/modules/forum/tests/src/Kernel/Migrate/d6/MigrateForumTest.php
+++ b/core/modules/forum/tests/src/Kernel/Migrate/d6/MigrateForumTest.php
@@ -19,7 +19,7 @@ class MigrateForumTest extends MigrateNodeTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'comment',
     'forum',
     'menu_ui',
diff --git a/core/modules/forum/tests/src/Kernel/Migrate/d7/MigrateForumSettingsTest.php b/core/modules/forum/tests/src/Kernel/Migrate/d7/MigrateForumSettingsTest.php
index 6f9e7772ca6907c9aa08d39fb1f21e0c18f1a788..6b1ab64b3c5ac2b13ae4e253c5cb477c975d9b48 100644
--- a/core/modules/forum/tests/src/Kernel/Migrate/d7/MigrateForumSettingsTest.php
+++ b/core/modules/forum/tests/src/Kernel/Migrate/d7/MigrateForumSettingsTest.php
@@ -12,7 +12,7 @@
 class MigrateForumSettingsTest extends MigrateDrupal7TestBase {
 
   // Don't alphabetize these. They're in dependency order.
-  public static $modules = [
+  protected static $modules = [
     'comment',
     'field',
     'filter',
diff --git a/core/modules/hal/tests/src/Kernel/EntityTranslationNormalizeTest.php b/core/modules/hal/tests/src/Kernel/EntityTranslationNormalizeTest.php
index d4249b547508f303591b70581f10bfb72c0fdba7..bd31f529cc47e3ee4f29f4538a67c5a77227dc57 100644
--- a/core/modules/hal/tests/src/Kernel/EntityTranslationNormalizeTest.php
+++ b/core/modules/hal/tests/src/Kernel/EntityTranslationNormalizeTest.php
@@ -19,7 +19,7 @@ class EntityTranslationNormalizeTest extends NormalizerTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'content_translation'];
+  protected static $modules = ['node', 'content_translation'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/hal/tests/src/Kernel/FileNormalizeTest.php b/core/modules/hal/tests/src/Kernel/FileNormalizeTest.php
index bfbfc1fb91597aa72450147a3555060bbd1a69f7..baae028582a2412f183a0783de6031a06f42eeaf 100644
--- a/core/modules/hal/tests/src/Kernel/FileNormalizeTest.php
+++ b/core/modules/hal/tests/src/Kernel/FileNormalizeTest.php
@@ -16,7 +16,7 @@ class FileNormalizeTest extends NormalizerTestBase {
    *
    * @var array
    */
-  public static $modules = ['file'];
+  protected static $modules = ['file'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/hal/tests/src/Kernel/HalLinkManagerTest.php b/core/modules/hal/tests/src/Kernel/HalLinkManagerTest.php
index dd861c3ca9e8781999c9b0b59c4d9387506738e9..937b036f48924658cd6e809b27791fd2288996d7 100644
--- a/core/modules/hal/tests/src/Kernel/HalLinkManagerTest.php
+++ b/core/modules/hal/tests/src/Kernel/HalLinkManagerTest.php
@@ -19,7 +19,7 @@ class HalLinkManagerTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal', 'hal_test', 'serialization', 'system', 'node', 'user', 'field'];
+  protected static $modules = ['hal', 'hal_test', 'serialization', 'system', 'node', 'user', 'field'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/hal/tests/src/Kernel/NormalizerTestBase.php b/core/modules/hal/tests/src/Kernel/NormalizerTestBase.php
index ef51a077c94f72977e95814c66e5293e75a67e53..5eaa671711bf5db4d9f596295a8d6042cfa2ff66 100644
--- a/core/modules/hal/tests/src/Kernel/NormalizerTestBase.php
+++ b/core/modules/hal/tests/src/Kernel/NormalizerTestBase.php
@@ -17,7 +17,7 @@ abstract class NormalizerTestBase extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['entity_test', 'field', 'hal', 'language', 'serialization', 'system', 'text', 'user', 'filter'];
+  protected static $modules = ['entity_test', 'field', 'hal', 'language', 'serialization', 'system', 'text', 'user', 'filter'];
 
   /**
    * The mock serializer.
diff --git a/core/modules/help/tests/src/Functional/ExperimentalHelpTest.php b/core/modules/help/tests/src/Functional/ExperimentalHelpTest.php
index f0e7c82de0ef4fd672639ae62a5858bfab08a5b0..c185df1b9f85bb2118c147a02522b40fff03eeda 100644
--- a/core/modules/help/tests/src/Functional/ExperimentalHelpTest.php
+++ b/core/modules/help/tests/src/Functional/ExperimentalHelpTest.php
@@ -19,7 +19,7 @@ class ExperimentalHelpTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['help', 'experimental_module_test', 'help_page_test'];
+  protected static $modules = ['help', 'experimental_module_test', 'help_page_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/help/tests/src/Functional/HelpBlockTest.php b/core/modules/help/tests/src/Functional/HelpBlockTest.php
index c474270267b21ad17ff5f041459de80c75bd5692..6d98660000cd3f12e2dd38be45fcdb2eb51198dd 100644
--- a/core/modules/help/tests/src/Functional/HelpBlockTest.php
+++ b/core/modules/help/tests/src/Functional/HelpBlockTest.php
@@ -14,7 +14,7 @@ class HelpBlockTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['help', 'help_page_test', 'block', 'more_help_page_test'];
+  protected static $modules = ['help', 'help_page_test', 'block', 'more_help_page_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/help/tests/src/Functional/HelpTest.php b/core/modules/help/tests/src/Functional/HelpTest.php
index 7810092b187bc669c8e3785e812802f3e9da89ef..c89f5f33f4e3e4587035d7ba31803abe0fd2d088 100644
--- a/core/modules/help/tests/src/Functional/HelpTest.php
+++ b/core/modules/help/tests/src/Functional/HelpTest.php
@@ -21,7 +21,7 @@ class HelpTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['help_test', 'help_page_test'];
+  protected static $modules = ['help_test', 'help_page_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/help/tests/src/Functional/NoHelpTest.php b/core/modules/help/tests/src/Functional/NoHelpTest.php
index 120f3e85dd709299e9b54557c3e37c85231be2da..91f82c9d9dad6f4b3c220eb225bd0e7c68c65831 100644
--- a/core/modules/help/tests/src/Functional/NoHelpTest.php
+++ b/core/modules/help/tests/src/Functional/NoHelpTest.php
@@ -18,7 +18,7 @@ class NoHelpTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['help', 'menu_test'];
+  protected static $modules = ['help', 'menu_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/help/tests/src/Kernel/HelpEmptyPageTest.php b/core/modules/help/tests/src/Kernel/HelpEmptyPageTest.php
index 5e5e740080be1fce7d257bea5d78951ed7808b8b..663d168005f4eb4e22c1f5330d859d61f1cc008c 100644
--- a/core/modules/help/tests/src/Kernel/HelpEmptyPageTest.php
+++ b/core/modules/help/tests/src/Kernel/HelpEmptyPageTest.php
@@ -17,7 +17,7 @@ class HelpEmptyPageTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system', 'help_test', 'user', 'path_alias'];
+  protected static $modules = ['system', 'help_test', 'user', 'path_alias'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/help_topics/tests/src/Functional/HelpTopicTest.php b/core/modules/help_topics/tests/src/Functional/HelpTopicTest.php
index 6238f933ebb3a022b3e019a48a1a9442fbddff38..e70d8fd6e9e6dd7257e35972c2ec466768e050eb 100644
--- a/core/modules/help_topics/tests/src/Functional/HelpTopicTest.php
+++ b/core/modules/help_topics/tests/src/Functional/HelpTopicTest.php
@@ -18,7 +18,7 @@ class HelpTopicTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'help_topics_test',
     'help',
     'help_topics',
diff --git a/core/modules/history/tests/src/Functional/HistoryTest.php b/core/modules/history/tests/src/Functional/HistoryTest.php
index c3a6bec10c7bb9dcd74c2902f2f9dc77b01fdcd7..71588ff7bfb711fd7ad49b44ba0bf13b65eb8d32 100644
--- a/core/modules/history/tests/src/Functional/HistoryTest.php
+++ b/core/modules/history/tests/src/Functional/HistoryTest.php
@@ -21,7 +21,7 @@ class HistoryTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'history'];
+  protected static $modules = ['node', 'history'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/history/tests/src/Kernel/Views/HistoryTimestampTest.php b/core/modules/history/tests/src/Kernel/Views/HistoryTimestampTest.php
index 2c6a6502cbde265a4663f935c83dedde2cd731c7..6a5e7121f6f2a4662c3f144f4b3468a74242cf82 100644
--- a/core/modules/history/tests/src/Kernel/Views/HistoryTimestampTest.php
+++ b/core/modules/history/tests/src/Kernel/Views/HistoryTimestampTest.php
@@ -22,7 +22,7 @@ class HistoryTimestampTest extends ViewsKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['history', 'node'];
+  protected static $modules = ['history', 'node'];
 
   /**
    * Views used by this test.
diff --git a/core/modules/image/tests/src/Functional/FileMoveTest.php b/core/modules/image/tests/src/Functional/FileMoveTest.php
index c2a3a1bbe4c944122c75059e15afee4de3954b3a..cd82844c6f2058e15fc80a6afafe2ea758d76e5a 100644
--- a/core/modules/image/tests/src/Functional/FileMoveTest.php
+++ b/core/modules/image/tests/src/Functional/FileMoveTest.php
@@ -25,7 +25,7 @@ class FileMoveTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['image'];
+  protected static $modules = ['image'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/image/tests/src/Functional/Hal/ImageStyleHalJsonAnonTest.php b/core/modules/image/tests/src/Functional/Hal/ImageStyleHalJsonAnonTest.php
index a010f68f0b0c188b60ddba8860b8e4eb1fe1287e..3d470cd4d6dc335fe964118cde8e789af72beeb5 100644
--- a/core/modules/image/tests/src/Functional/Hal/ImageStyleHalJsonAnonTest.php
+++ b/core/modules/image/tests/src/Functional/Hal/ImageStyleHalJsonAnonTest.php
@@ -15,7 +15,7 @@ class ImageStyleHalJsonAnonTest extends ImageStyleResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/image/tests/src/Functional/Hal/ImageStyleHalJsonBasicAuthTest.php b/core/modules/image/tests/src/Functional/Hal/ImageStyleHalJsonBasicAuthTest.php
index 74a351663f46588e96b38c07fe64bd0f2236f5cd..c834b846ba5c18bacc30d44da1a89747ededdd4b 100644
--- a/core/modules/image/tests/src/Functional/Hal/ImageStyleHalJsonBasicAuthTest.php
+++ b/core/modules/image/tests/src/Functional/Hal/ImageStyleHalJsonBasicAuthTest.php
@@ -15,7 +15,7 @@ class ImageStyleHalJsonBasicAuthTest extends ImageStyleResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal', 'basic_auth'];
+  protected static $modules = ['hal', 'basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/image/tests/src/Functional/Hal/ImageStyleHalJsonCookieTest.php b/core/modules/image/tests/src/Functional/Hal/ImageStyleHalJsonCookieTest.php
index e899b6d13efdc2283c331cdba233c5f5cd871f1c..21801ebdbd40782f1c506b89672b7af4ea773188 100644
--- a/core/modules/image/tests/src/Functional/Hal/ImageStyleHalJsonCookieTest.php
+++ b/core/modules/image/tests/src/Functional/Hal/ImageStyleHalJsonCookieTest.php
@@ -15,7 +15,7 @@ class ImageStyleHalJsonCookieTest extends ImageStyleResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/image/tests/src/Functional/ImageDimensionsTest.php b/core/modules/image/tests/src/Functional/ImageDimensionsTest.php
index 6a969e5720a7858e948487d05baeb01a9bcb44c0..7f33af89e7489c217b78e466057525e746a3ba70 100644
--- a/core/modules/image/tests/src/Functional/ImageDimensionsTest.php
+++ b/core/modules/image/tests/src/Functional/ImageDimensionsTest.php
@@ -24,7 +24,7 @@ class ImageDimensionsTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['image', 'image_module_test'];
+  protected static $modules = ['image', 'image_module_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/image/tests/src/Functional/ImageEffectsTest.php b/core/modules/image/tests/src/Functional/ImageEffectsTest.php
index ab863aafa48af030a855781dc2f2c6cbed250683..d8c1500abeb2f01e7ea3745d4beee6d51236faa6 100644
--- a/core/modules/image/tests/src/Functional/ImageEffectsTest.php
+++ b/core/modules/image/tests/src/Functional/ImageEffectsTest.php
@@ -17,7 +17,7 @@ class ImageEffectsTest extends ToolkitTestBase {
    *
    * @var array
    */
-  public static $modules = ['image', 'image_test', 'image_module_test'];
+  protected static $modules = ['image', 'image_test', 'image_module_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/image/tests/src/Functional/ImageFieldDefaultImagesTest.php b/core/modules/image/tests/src/Functional/ImageFieldDefaultImagesTest.php
index f081982689c6d195dc0fa4e829c22674c2854771..3e2bce273af6533b506673cbe4116d85e4ddb7d1 100644
--- a/core/modules/image/tests/src/Functional/ImageFieldDefaultImagesTest.php
+++ b/core/modules/image/tests/src/Functional/ImageFieldDefaultImagesTest.php
@@ -31,7 +31,7 @@ class ImageFieldDefaultImagesTest extends ImageFieldTestBase {
    *
    * @var array
    */
-  public static $modules = ['field_ui'];
+  protected static $modules = ['field_ui'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/image/tests/src/Functional/ImageFieldDisplayTest.php b/core/modules/image/tests/src/Functional/ImageFieldDisplayTest.php
index 96baad54a2e06c7e2981d6287de5fef8ed32c7b5..9424eb253f070def3fc71a89686d8a0bbaacd531 100644
--- a/core/modules/image/tests/src/Functional/ImageFieldDisplayTest.php
+++ b/core/modules/image/tests/src/Functional/ImageFieldDisplayTest.php
@@ -32,7 +32,7 @@ class ImageFieldDisplayTest extends ImageFieldTestBase {
    *
    * @var array
    */
-  public static $modules = ['field_ui'];
+  protected static $modules = ['field_ui'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/image/tests/src/Functional/ImageFieldTestBase.php b/core/modules/image/tests/src/Functional/ImageFieldTestBase.php
index b736e8f4661455b80ba9f15616014b20daa24122..16f9da71bee6ea1d19dce013fc270fdb7aff29c5 100644
--- a/core/modules/image/tests/src/Functional/ImageFieldTestBase.php
+++ b/core/modules/image/tests/src/Functional/ImageFieldTestBase.php
@@ -31,7 +31,7 @@ abstract class ImageFieldTestBase extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'image', 'field_ui', 'image_module_test'];
+  protected static $modules = ['node', 'image', 'field_ui', 'image_module_test'];
 
   /**
    * An user with permissions to administer content types and image styles.
diff --git a/core/modules/image/tests/src/Functional/ImageOnTranslatedEntityTest.php b/core/modules/image/tests/src/Functional/ImageOnTranslatedEntityTest.php
index 18765e7fe49a2577bc8b210460a050c51a8775fe..6667c9e5cff476a085f75500e0e8a3feb42ed238 100644
--- a/core/modules/image/tests/src/Functional/ImageOnTranslatedEntityTest.php
+++ b/core/modules/image/tests/src/Functional/ImageOnTranslatedEntityTest.php
@@ -20,7 +20,7 @@ class ImageOnTranslatedEntityTest extends ImageFieldTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['language', 'content_translation', 'field_ui'];
+  protected static $modules = ['language', 'content_translation', 'field_ui'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/image/tests/src/Functional/ImageStylesPathAndUrlTest.php b/core/modules/image/tests/src/Functional/ImageStylesPathAndUrlTest.php
index e34d077453dd2d3bb72637fed39d3d1347c943bd..515687cd0f442eb1700f7682eb2f665c2cbf16e8 100644
--- a/core/modules/image/tests/src/Functional/ImageStylesPathAndUrlTest.php
+++ b/core/modules/image/tests/src/Functional/ImageStylesPathAndUrlTest.php
@@ -26,7 +26,7 @@ class ImageStylesPathAndUrlTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['image', 'image_module_test', 'language'];
+  protected static $modules = ['image', 'image_module_test', 'language'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/image/tests/src/Functional/QuickEditImageControllerTest.php b/core/modules/image/tests/src/Functional/QuickEditImageControllerTest.php
index 84fe1cfa8ecc7e6bf876e1f7b8e01c075fe506af..9e8cacd957dea1b6ff1f6df2cda4001d7f0e3014 100644
--- a/core/modules/image/tests/src/Functional/QuickEditImageControllerTest.php
+++ b/core/modules/image/tests/src/Functional/QuickEditImageControllerTest.php
@@ -22,7 +22,7 @@ class QuickEditImageControllerTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'image', 'quickedit'];
+  protected static $modules = ['node', 'image', 'quickedit'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/image/tests/src/Functional/Rest/ImageStyleJsonBasicAuthTest.php b/core/modules/image/tests/src/Functional/Rest/ImageStyleJsonBasicAuthTest.php
index 5d4ba8648e9d215a8d57df312039bbccfd679161..93bd8f896a8155d25b3a9c539cef772af33fd447 100644
--- a/core/modules/image/tests/src/Functional/Rest/ImageStyleJsonBasicAuthTest.php
+++ b/core/modules/image/tests/src/Functional/Rest/ImageStyleJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class ImageStyleJsonBasicAuthTest extends ImageStyleResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/image/tests/src/Functional/Rest/ImageStyleResourceTestBase.php b/core/modules/image/tests/src/Functional/Rest/ImageStyleResourceTestBase.php
index b19011071836acc5f538b1a0962c0f60503afce2..57cfcd9a4baafdbc859b259494b26dd9cba3047b 100644
--- a/core/modules/image/tests/src/Functional/Rest/ImageStyleResourceTestBase.php
+++ b/core/modules/image/tests/src/Functional/Rest/ImageStyleResourceTestBase.php
@@ -13,7 +13,7 @@ abstract class ImageStyleResourceTestBase extends EntityResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['image'];
+  protected static $modules = ['image'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/image/tests/src/Functional/Rest/ImageStyleXmlBasicAuthTest.php b/core/modules/image/tests/src/Functional/Rest/ImageStyleXmlBasicAuthTest.php
index 052a50e97a432b789794f66e2385aa7d7f8ddff9..fa07a2875ec23ef574fa2b7598ecfb91c4ce2d9a 100644
--- a/core/modules/image/tests/src/Functional/Rest/ImageStyleXmlBasicAuthTest.php
+++ b/core/modules/image/tests/src/Functional/Rest/ImageStyleXmlBasicAuthTest.php
@@ -16,7 +16,7 @@ class ImageStyleXmlBasicAuthTest extends ImageStyleResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/image/tests/src/FunctionalJavascript/ImageFieldTestBase.php b/core/modules/image/tests/src/FunctionalJavascript/ImageFieldTestBase.php
index 4e21f6aca7a24e1dbf56e13da05186d8ea16a41a..efe566a19a33b3010f68c991ee016362234a4d0f 100644
--- a/core/modules/image/tests/src/FunctionalJavascript/ImageFieldTestBase.php
+++ b/core/modules/image/tests/src/FunctionalJavascript/ImageFieldTestBase.php
@@ -21,7 +21,7 @@ abstract class ImageFieldTestBase extends WebDriverTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'node',
     'image',
     'field_ui',
diff --git a/core/modules/image/tests/src/FunctionalJavascript/QuickEditImageTest.php b/core/modules/image/tests/src/FunctionalJavascript/QuickEditImageTest.php
index b880cc4a7f701ae1c9d5116a427bbe463cb521d9..e810b7ffff508308dc61da15f5406196baa6f288 100644
--- a/core/modules/image/tests/src/FunctionalJavascript/QuickEditImageTest.php
+++ b/core/modules/image/tests/src/FunctionalJavascript/QuickEditImageTest.php
@@ -20,7 +20,7 @@ class QuickEditImageTest extends QuickEditJavascriptTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'image', 'field_ui'];
+  protected static $modules = ['node', 'image', 'field_ui'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/image/tests/src/Kernel/ImageFormatterTest.php b/core/modules/image/tests/src/Kernel/ImageFormatterTest.php
index b432b39f6ff8a90b8d4594e8fc9cf8a5c34cb60d..5c64b7309d05bcb333c95dfd7fae00dbe97343ac 100644
--- a/core/modules/image/tests/src/Kernel/ImageFormatterTest.php
+++ b/core/modules/image/tests/src/Kernel/ImageFormatterTest.php
@@ -23,7 +23,7 @@ class ImageFormatterTest extends FieldKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['file', 'image'];
+  protected static $modules = ['file', 'image'];
 
   /**
    * @var string
diff --git a/core/modules/image/tests/src/Kernel/ImageImportTest.php b/core/modules/image/tests/src/Kernel/ImageImportTest.php
index 9cf69570b68cb60d7a20ca39c4c099e13892a004..5d013d3135f30aaf004b32c8cdf8a995dd4c818a 100644
--- a/core/modules/image/tests/src/Kernel/ImageImportTest.php
+++ b/core/modules/image/tests/src/Kernel/ImageImportTest.php
@@ -15,7 +15,7 @@ class ImageImportTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system', 'image', 'image_module_test'];
+  protected static $modules = ['system', 'image', 'image_module_test'];
 
   /**
    * Tests importing image styles.
diff --git a/core/modules/image/tests/src/Kernel/ImageItemTest.php b/core/modules/image/tests/src/Kernel/ImageItemTest.php
index bea2f99924a8558f1749375a7d4b87cbc8b8f725..f7b079bdbb7db4ff61559b3ec426634ce78e936c 100644
--- a/core/modules/image/tests/src/Kernel/ImageItemTest.php
+++ b/core/modules/image/tests/src/Kernel/ImageItemTest.php
@@ -26,7 +26,7 @@ class ImageItemTest extends FieldKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['file', 'image'];
+  protected static $modules = ['file', 'image'];
 
   /**
    * Created file entity.
diff --git a/core/modules/image/tests/src/Kernel/ImageStyleCustomStreamWrappersTest.php b/core/modules/image/tests/src/Kernel/ImageStyleCustomStreamWrappersTest.php
index bbe4d577ea4519b3c418e23d8a1643a534f23182..2c781e425a474966f7a24d8c48ed27ebfaf6d0c7 100644
--- a/core/modules/image/tests/src/Kernel/ImageStyleCustomStreamWrappersTest.php
+++ b/core/modules/image/tests/src/Kernel/ImageStyleCustomStreamWrappersTest.php
@@ -24,7 +24,7 @@ class ImageStyleCustomStreamWrappersTest extends KernelTestBase {
    *
    * @var string[]
    */
-  public static $modules = ['system', 'image'];
+  protected static $modules = ['system', 'image'];
 
   /**
    * A testing image style entity.
diff --git a/core/modules/image/tests/src/Kernel/ImageStyleIntegrationTest.php b/core/modules/image/tests/src/Kernel/ImageStyleIntegrationTest.php
index 443fb36770a724b42cf0d958069f1e3f8098d041..235d1e5dc422ba61b0d223bcdab66b2b89996094 100644
--- a/core/modules/image/tests/src/Kernel/ImageStyleIntegrationTest.php
+++ b/core/modules/image/tests/src/Kernel/ImageStyleIntegrationTest.php
@@ -20,7 +20,7 @@ class ImageStyleIntegrationTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['image', 'file', 'field', 'system', 'user', 'node'];
+  protected static $modules = ['image', 'file', 'field', 'system', 'user', 'node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/image/tests/src/Kernel/ImageThemeFunctionTest.php b/core/modules/image/tests/src/Kernel/ImageThemeFunctionTest.php
index 8e48ec96eb3482dad0c987cc398b4106b4ee73dc..99854a8c5bd2f0cb68730ed9f967155b76aeed1b 100644
--- a/core/modules/image/tests/src/Kernel/ImageThemeFunctionTest.php
+++ b/core/modules/image/tests/src/Kernel/ImageThemeFunctionTest.php
@@ -30,7 +30,7 @@ class ImageThemeFunctionTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['entity_test', 'field', 'file', 'image', 'system', 'user'];
+  protected static $modules = ['entity_test', 'field', 'file', 'image', 'system', 'user'];
 
   /**
    * Created file entity.
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 d92384c20e65d421766dc86b0d32e99da2f04406..e4df819e87a6c267551d12a2f1f24ed99fbec149 100644
--- a/core/modules/image/tests/src/Kernel/Migrate/d6/MigrateImageTest.php
+++ b/core/modules/image/tests/src/Kernel/Migrate/d6/MigrateImageTest.php
@@ -21,7 +21,7 @@ class MigrateImageTest extends MigrateNodeTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['menu_ui'];
+  protected static $modules = ['menu_ui'];
 
   /**
    * {@inheritdoc}
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 81d0e566d494c7b0010db6c976d80765956e24a1..33729c3b9d8ba23a6c8da271d8a7f192c67b515c 100644
--- a/core/modules/image/tests/src/Kernel/Migrate/d7/MigrateImageSettingsTest.php
+++ b/core/modules/image/tests/src/Kernel/Migrate/d7/MigrateImageSettingsTest.php
@@ -11,7 +11,7 @@
  */
 class MigrateImageSettingsTest extends MigrateDrupal7TestBase {
 
-  public static $modules = ['image'];
+  protected static $modules = ['image'];
 
   /**
    * {@inheritdoc}
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 2b0b298046046b11ac4e312a7c55b9613b0310d1..6170caf9924794c988ba7e5e67b86dccd568cf6c 100644
--- a/core/modules/image/tests/src/Kernel/Migrate/d7/MigrateImageStylesTest.php
+++ b/core/modules/image/tests/src/Kernel/Migrate/d7/MigrateImageStylesTest.php
@@ -17,7 +17,7 @@ class MigrateImageStylesTest extends MigrateDrupal7TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['image'];
+  protected static $modules = ['image'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/image/tests/src/Kernel/Plugin/migrate/source/d6/ImageCachePresetTest.php b/core/modules/image/tests/src/Kernel/Plugin/migrate/source/d6/ImageCachePresetTest.php
index edd2ad3358414116eeadcfc4008b2d72b5c6330b..37abd1c2bcfb438498be8747197461e6262bae67 100644
--- a/core/modules/image/tests/src/Kernel/Plugin/migrate/source/d6/ImageCachePresetTest.php
+++ b/core/modules/image/tests/src/Kernel/Plugin/migrate/source/d6/ImageCachePresetTest.php
@@ -16,7 +16,7 @@ class ImageCachePresetTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['image', 'migrate_drupal'];
+  protected static $modules = ['image', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/image/tests/src/Kernel/Plugin/migrate/source/d7/ImageStylesTest.php b/core/modules/image/tests/src/Kernel/Plugin/migrate/source/d7/ImageStylesTest.php
index 55251d1fb2dcba23d1326432b7a6c413abd39e3c..198e3af690e31a5bf5a3a9f7011853635e88a9e9 100644
--- a/core/modules/image/tests/src/Kernel/Plugin/migrate/source/d7/ImageStylesTest.php
+++ b/core/modules/image/tests/src/Kernel/Plugin/migrate/source/d7/ImageStylesTest.php
@@ -16,7 +16,7 @@ class ImageStylesTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['image', 'migrate_drupal'];
+  protected static $modules = ['image', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/image/tests/src/Kernel/Views/ImageViewsDataTest.php b/core/modules/image/tests/src/Kernel/Views/ImageViewsDataTest.php
index 39c9b52338cfa2a35a2f9358cfc50fdfa4d31f22..dae2b52268d60729988b8fdf90a9b613ade9b823 100644
--- a/core/modules/image/tests/src/Kernel/Views/ImageViewsDataTest.php
+++ b/core/modules/image/tests/src/Kernel/Views/ImageViewsDataTest.php
@@ -19,7 +19,7 @@ class ImageViewsDataTest extends ViewsKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['image', 'file', 'views', 'entity_test', 'user', 'field'];
+  protected static $modules = ['image', 'file', 'views', 'entity_test', 'user', 'field'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/image/tests/src/Kernel/Views/RelationshipUserImageDataTest.php b/core/modules/image/tests/src/Kernel/Views/RelationshipUserImageDataTest.php
index 3cc31443cac425f0d5a7c3e098a99513a26a73b3..30d832986d3df1307dfd0181160f677c408b5c35 100644
--- a/core/modules/image/tests/src/Kernel/Views/RelationshipUserImageDataTest.php
+++ b/core/modules/image/tests/src/Kernel/Views/RelationshipUserImageDataTest.php
@@ -22,7 +22,7 @@ class RelationshipUserImageDataTest extends ViewsKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['file', 'field', 'image', 'image_test_views', 'system', 'user'];
+  protected static $modules = ['file', 'field', 'image', 'image_test_views', 'system', 'user'];
 
   /**
    * Views used by this test.
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 904178a14c6472b0c358fc99af147f80ab720f22..5ab55dd0d2e6e672e26118ddec99f10c37312e78 100644
--- a/core/modules/inline_form_errors/tests/src/Functional/FormErrorHandlerFileUploadTest.php
+++ b/core/modules/inline_form_errors/tests/src/Functional/FormErrorHandlerFileUploadTest.php
@@ -19,7 +19,7 @@ class FormErrorHandlerFileUploadTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'file', 'field_ui', 'inline_form_errors'];
+  protected static $modules = ['node', 'file', 'field_ui', 'inline_form_errors'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/inline_form_errors/tests/src/FunctionalJavascript/FormErrorHandlerCKEditorTest.php b/core/modules/inline_form_errors/tests/src/FunctionalJavascript/FormErrorHandlerCKEditorTest.php
index 6323e292476b883ec3d614ef0b1d9c437817f844..f00599dd3bb0d8a9817594141419ed0a2927daa7 100644
--- a/core/modules/inline_form_errors/tests/src/FunctionalJavascript/FormErrorHandlerCKEditorTest.php
+++ b/core/modules/inline_form_errors/tests/src/FunctionalJavascript/FormErrorHandlerCKEditorTest.php
@@ -20,7 +20,7 @@ class FormErrorHandlerCKEditorTest extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'ckeditor', 'inline_form_errors', 'filter'];
+  protected static $modules = ['node', 'ckeditor', 'inline_form_errors', 'filter'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/inline_form_errors/tests/src/FunctionalJavascript/FormErrorHandlerQuickEditTest.php b/core/modules/inline_form_errors/tests/src/FunctionalJavascript/FormErrorHandlerQuickEditTest.php
index f13de67e6c0c2b3177dfd8c4df63a08c8890cba4..b64ebf98cc16f3370d178fa42641b7cb907b5e23 100644
--- a/core/modules/inline_form_errors/tests/src/FunctionalJavascript/FormErrorHandlerQuickEditTest.php
+++ b/core/modules/inline_form_errors/tests/src/FunctionalJavascript/FormErrorHandlerQuickEditTest.php
@@ -17,7 +17,7 @@ class FormErrorHandlerQuickEditTest extends WebDriverTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'quickedit',
     'node',
     'inline_form_errors',
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 4bf389e60fb3cb2d3929a196f01d3a996a249cf3..8ce31a2fe978810edf2bf2cb459d5a69027d0895 100644
--- a/core/modules/inline_form_errors/tests/src/Kernel/FormElementInlineErrorTest.php
+++ b/core/modules/inline_form_errors/tests/src/Kernel/FormElementInlineErrorTest.php
@@ -15,7 +15,7 @@ class FormElementInlineErrorTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['inline_form_errors'];
+  protected static $modules = ['inline_form_errors'];
 
   /**
    * Tests that no inline form errors are shown when disabled for a form.
diff --git a/core/modules/jsonapi/tests/src/Functional/ActionTest.php b/core/modules/jsonapi/tests/src/Functional/ActionTest.php
index 724e08455b5898a4f90adb9eedc0ef3da75f7ac6..673b95df75a1618dfe34f8e8aca432a5388dba59 100644
--- a/core/modules/jsonapi/tests/src/Functional/ActionTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/ActionTest.php
@@ -16,7 +16,7 @@ class ActionTest extends ResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['user'];
+  protected static $modules = ['user'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/jsonapi/tests/src/Functional/BaseFieldOverrideTest.php b/core/modules/jsonapi/tests/src/Functional/BaseFieldOverrideTest.php
index 39bdd150cf7bbb71fcc5d5a115b63294cb826235..1b5ab2c8ba253377292a447affbc7b42d7e8e9b4 100644
--- a/core/modules/jsonapi/tests/src/Functional/BaseFieldOverrideTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/BaseFieldOverrideTest.php
@@ -16,7 +16,7 @@ class BaseFieldOverrideTest extends ResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['field', 'node'];
+  protected static $modules = ['field', 'node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/jsonapi/tests/src/Functional/BlockContentTest.php b/core/modules/jsonapi/tests/src/Functional/BlockContentTest.php
index d5e51e7a8d9214d429590acc9e24984b87e492cd..e4a71d21affea2b06ecaabf7d3ddec1f92271696 100644
--- a/core/modules/jsonapi/tests/src/Functional/BlockContentTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/BlockContentTest.php
@@ -20,7 +20,7 @@ class BlockContentTest extends ResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['block_content'];
+  protected static $modules = ['block_content'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/jsonapi/tests/src/Functional/BlockContentTypeTest.php b/core/modules/jsonapi/tests/src/Functional/BlockContentTypeTest.php
index 49268a986b935df1fadec513b3604a931fd8e9c8..feb40843449362ee08b64fcf2d724e9a617bfa16 100644
--- a/core/modules/jsonapi/tests/src/Functional/BlockContentTypeTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/BlockContentTypeTest.php
@@ -15,7 +15,7 @@ class BlockContentTypeTest extends ResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['block_content'];
+  protected static $modules = ['block_content'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/jsonapi/tests/src/Functional/BlockTest.php b/core/modules/jsonapi/tests/src/Functional/BlockTest.php
index 848dfa49f2e9da53921fa77ed77691da21833d7d..000c80d3a8606c2a9ae3ab51856dc6accc91fdb8 100644
--- a/core/modules/jsonapi/tests/src/Functional/BlockTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/BlockTest.php
@@ -16,7 +16,7 @@ class BlockTest extends ResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['block'];
+  protected static $modules = ['block'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/jsonapi/tests/src/Functional/CommentTest.php b/core/modules/jsonapi/tests/src/Functional/CommentTest.php
index 4fd1bb786e1e46c80aac3c42288ffab70e61fa81..085c0480c3e48fc92dae5fa65ef790694bf31b04 100644
--- a/core/modules/jsonapi/tests/src/Functional/CommentTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/CommentTest.php
@@ -29,7 +29,7 @@ class CommentTest extends ResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['comment', 'entity_test'];
+  protected static $modules = ['comment', 'entity_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/jsonapi/tests/src/Functional/CommentTypeTest.php b/core/modules/jsonapi/tests/src/Functional/CommentTypeTest.php
index fd8c73a990186b9bfd9dec58e86b289450b5077f..b9f6c52cdf6d5f5e6d32de23154940679f42736a 100644
--- a/core/modules/jsonapi/tests/src/Functional/CommentTypeTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/CommentTypeTest.php
@@ -15,7 +15,7 @@ class CommentTypeTest extends ResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'comment'];
+  protected static $modules = ['node', 'comment'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/jsonapi/tests/src/Functional/ConfigTestTest.php b/core/modules/jsonapi/tests/src/Functional/ConfigTestTest.php
index 3c6c7bd530d8a7d2e633d332573acdc6c6ce03b3..badffed05953266dd7e03fa8cf0730839ec8af08 100644
--- a/core/modules/jsonapi/tests/src/Functional/ConfigTestTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/ConfigTestTest.php
@@ -15,7 +15,7 @@ class ConfigTestTest extends ResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['config_test', 'config_test_rest'];
+  protected static $modules = ['config_test', 'config_test_rest'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/jsonapi/tests/src/Functional/ConfigurableLanguageTest.php b/core/modules/jsonapi/tests/src/Functional/ConfigurableLanguageTest.php
index fd03d5334943f939853a4678ab184502ea6dc226..5c9097df54d3b24b2b2828bff2543f3d3231be2e 100644
--- a/core/modules/jsonapi/tests/src/Functional/ConfigurableLanguageTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/ConfigurableLanguageTest.php
@@ -19,7 +19,7 @@ class ConfigurableLanguageTest extends ResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['language'];
+  protected static $modules = ['language'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/jsonapi/tests/src/Functional/ContactFormTest.php b/core/modules/jsonapi/tests/src/Functional/ContactFormTest.php
index 3153e1853c1f741a2132360677d01d7b78d91ccc..72ff0707b5e2c0b11a655ebb2a4be7454051c764 100644
--- a/core/modules/jsonapi/tests/src/Functional/ContactFormTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/ContactFormTest.php
@@ -15,7 +15,7 @@ class ContactFormTest extends ResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['contact'];
+  protected static $modules = ['contact'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/jsonapi/tests/src/Functional/ContentLanguageSettingsTest.php b/core/modules/jsonapi/tests/src/Functional/ContentLanguageSettingsTest.php
index 597bcbc794b422d73c33929c2fd845326045b7e9..babb74a4d48000a7bf4899d32b8641ed14d04717 100644
--- a/core/modules/jsonapi/tests/src/Functional/ContentLanguageSettingsTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/ContentLanguageSettingsTest.php
@@ -18,7 +18,7 @@ class ContentLanguageSettingsTest extends ResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['language', 'node'];
+  protected static $modules = ['language', 'node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/jsonapi/tests/src/Functional/DateFormatTest.php b/core/modules/jsonapi/tests/src/Functional/DateFormatTest.php
index 18b388e9107cdb3a882afda6f833f831fab7c455..a4d5aad169d301ca84d219d9f1c3b5b9f5aa061e 100644
--- a/core/modules/jsonapi/tests/src/Functional/DateFormatTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/DateFormatTest.php
@@ -15,7 +15,7 @@ class DateFormatTest extends ResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [];
+  protected static $modules = [];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/jsonapi/tests/src/Functional/EditorTest.php b/core/modules/jsonapi/tests/src/Functional/EditorTest.php
index 9b3c3805297921f383fd047bac8ad66109ad5d1f..a56f2c20e568ec650bf9f2c2604272e4b7814295 100644
--- a/core/modules/jsonapi/tests/src/Functional/EditorTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/EditorTest.php
@@ -18,7 +18,7 @@ class EditorTest extends ResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['filter', 'editor', 'ckeditor'];
+  protected static $modules = ['filter', 'editor', 'ckeditor'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/jsonapi/tests/src/Functional/EntityFormDisplayTest.php b/core/modules/jsonapi/tests/src/Functional/EntityFormDisplayTest.php
index 1f914fec0699e94b8d5d6012b279d69cbdb3afcc..7ea9f58d4ff3c1d27442654bb7e6ce3597f4f78d 100644
--- a/core/modules/jsonapi/tests/src/Functional/EntityFormDisplayTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/EntityFormDisplayTest.php
@@ -16,7 +16,7 @@ class EntityFormDisplayTest extends ResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node'];
+  protected static $modules = ['node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/jsonapi/tests/src/Functional/EntityFormModeTest.php b/core/modules/jsonapi/tests/src/Functional/EntityFormModeTest.php
index 637c77ea8f9a04f3ebc918b1d01e5abe0c5a2049..f0e0f9ae40bc9f5bafc56ef4b690d757e8ec21e5 100644
--- a/core/modules/jsonapi/tests/src/Functional/EntityFormModeTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/EntityFormModeTest.php
@@ -17,7 +17,7 @@ class EntityFormModeTest extends ResourceTestBase {
    *
    * @todo: Remove 'field_ui' when https://www.drupal.org/node/2867266.
    */
-  public static $modules = ['user', 'field_ui'];
+  protected static $modules = ['user', 'field_ui'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/jsonapi/tests/src/Functional/EntityTestMapFieldTest.php b/core/modules/jsonapi/tests/src/Functional/EntityTestMapFieldTest.php
index 82cea77007b5d368a3e98186ea5748606edf8ec2..703cc82794bc318ba004fb2f7d774c83bdf8b333 100644
--- a/core/modules/jsonapi/tests/src/Functional/EntityTestMapFieldTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/EntityTestMapFieldTest.php
@@ -16,7 +16,7 @@ class EntityTestMapFieldTest extends ResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['entity_test'];
+  protected static $modules = ['entity_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/jsonapi/tests/src/Functional/EntityTestTest.php b/core/modules/jsonapi/tests/src/Functional/EntityTestTest.php
index e828100b3d64ecc476b0071580df5f60ff34029a..da91b19811d4c3c17ff9fcc1197ed5162700d3ba 100644
--- a/core/modules/jsonapi/tests/src/Functional/EntityTestTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/EntityTestTest.php
@@ -18,7 +18,7 @@ class EntityTestTest extends ResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['entity_test'];
+  protected static $modules = ['entity_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/jsonapi/tests/src/Functional/EntityViewDisplayTest.php b/core/modules/jsonapi/tests/src/Functional/EntityViewDisplayTest.php
index 0026706d3f4e3bcf6fe24d59280b69256fdca30a..163bc91165b36421c96bd028af952bfce0de1334 100644
--- a/core/modules/jsonapi/tests/src/Functional/EntityViewDisplayTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/EntityViewDisplayTest.php
@@ -16,7 +16,7 @@ class EntityViewDisplayTest extends ResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node'];
+  protected static $modules = ['node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/jsonapi/tests/src/Functional/EntityViewModeTest.php b/core/modules/jsonapi/tests/src/Functional/EntityViewModeTest.php
index 839b1fae68ac4857eb1b6378f3bf1567e14192b0..d3e3cc824369af0be20cacc546f0bd032acc26f8 100644
--- a/core/modules/jsonapi/tests/src/Functional/EntityViewModeTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/EntityViewModeTest.php
@@ -17,7 +17,7 @@ class EntityViewModeTest extends ResourceTestBase {
    *
    * @todo: Remove 'field_ui' when https://www.drupal.org/node/2867266.
    */
-  public static $modules = ['user', 'field_ui'];
+  protected static $modules = ['user', 'field_ui'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/jsonapi/tests/src/Functional/FeedTest.php b/core/modules/jsonapi/tests/src/Functional/FeedTest.php
index 7944a95c604e6ab21ae701c59c5671f0f80b334f..b93c2649852e228057b9457969f608f342cfc358 100644
--- a/core/modules/jsonapi/tests/src/Functional/FeedTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/FeedTest.php
@@ -18,7 +18,7 @@ class FeedTest extends ResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['aggregator'];
+  protected static $modules = ['aggregator'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/jsonapi/tests/src/Functional/FieldConfigTest.php b/core/modules/jsonapi/tests/src/Functional/FieldConfigTest.php
index 25a3889f4573da1082666cd747523cf7a94f5552..a1cb1f002cf3ce78bf48e35f324b75bfb48e1120 100644
--- a/core/modules/jsonapi/tests/src/Functional/FieldConfigTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/FieldConfigTest.php
@@ -19,7 +19,7 @@ class FieldConfigTest extends ResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['field', 'node'];
+  protected static $modules = ['field', 'node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/jsonapi/tests/src/Functional/FieldStorageConfigTest.php b/core/modules/jsonapi/tests/src/Functional/FieldStorageConfigTest.php
index 6e03be1261540b8e048a51aacd9e401020de05b3..6fd39952256fdaf4ecd7c101cf03f3ee472f6d52 100644
--- a/core/modules/jsonapi/tests/src/Functional/FieldStorageConfigTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/FieldStorageConfigTest.php
@@ -15,7 +15,7 @@ class FieldStorageConfigTest extends ResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node'];
+  protected static $modules = ['node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/jsonapi/tests/src/Functional/FileTest.php b/core/modules/jsonapi/tests/src/Functional/FileTest.php
index 6ecb5c345dd729a479bdf9a97b0b875326d96754..aba91314559a40869b08e5bf9f8f36ea82af2ed4 100644
--- a/core/modules/jsonapi/tests/src/Functional/FileTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/FileTest.php
@@ -22,7 +22,7 @@ class FileTest extends ResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['file', 'user'];
+  protected static $modules = ['file', 'user'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/jsonapi/tests/src/Functional/FileUploadTest.php b/core/modules/jsonapi/tests/src/Functional/FileUploadTest.php
index 426be6c3a8f5482e8592b2df42125aec9dd9e6f2..aed6ebb791b2205501584e20b8d61f6cc59c0aa7 100644
--- a/core/modules/jsonapi/tests/src/Functional/FileUploadTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/FileUploadTest.php
@@ -25,7 +25,7 @@ class FileUploadTest extends ResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['entity_test', 'file'];
+  protected static $modules = ['entity_test', 'file'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/jsonapi/tests/src/Functional/FilterFormatTest.php b/core/modules/jsonapi/tests/src/Functional/FilterFormatTest.php
index c5b581d9ac7178d34bbed256dd5638ef43a516d9..5bdabd72bed358924c562aef1794a397ff293384 100644
--- a/core/modules/jsonapi/tests/src/Functional/FilterFormatTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/FilterFormatTest.php
@@ -15,7 +15,7 @@ class FilterFormatTest extends ResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['filter'];
+  protected static $modules = ['filter'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/jsonapi/tests/src/Functional/ImageStyleTest.php b/core/modules/jsonapi/tests/src/Functional/ImageStyleTest.php
index 47ec1ace8ccb9f2161d2e206508d2911be54dbaf..bce1a2fef9d34b70c5dfe8a71a5d6087b0c1d657 100644
--- a/core/modules/jsonapi/tests/src/Functional/ImageStyleTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/ImageStyleTest.php
@@ -15,7 +15,7 @@ class ImageStyleTest extends ResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['image'];
+  protected static $modules = ['image'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/jsonapi/tests/src/Functional/ItemTest.php b/core/modules/jsonapi/tests/src/Functional/ItemTest.php
index 0d0cd2b2ad588c2ee8139dd7756616d5d38aedf3..33bbf8b08020058bddfe5c401b33494830640e28 100644
--- a/core/modules/jsonapi/tests/src/Functional/ItemTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/ItemTest.php
@@ -15,7 +15,7 @@ class ItemTest extends ResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['aggregator'];
+  protected static $modules = ['aggregator'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/jsonapi/tests/src/Functional/JsonApiFunctionalMultilingualTest.php b/core/modules/jsonapi/tests/src/Functional/JsonApiFunctionalMultilingualTest.php
index ecb23ed667c4836d1801ed874f7d278078479ead..a6ca2fbb150e43ec74b89cb74232d5b6e5950e22 100644
--- a/core/modules/jsonapi/tests/src/Functional/JsonApiFunctionalMultilingualTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/JsonApiFunctionalMultilingualTest.php
@@ -23,7 +23,7 @@ class JsonApiFunctionalMultilingualTest extends JsonApiFunctionalTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'language',
     'content_translation',
   ];
diff --git a/core/modules/jsonapi/tests/src/Functional/JsonApiFunctionalTest.php b/core/modules/jsonapi/tests/src/Functional/JsonApiFunctionalTest.php
index 37d2c457178c00d4c280a01d2dc055b10f7d3de5..93375cd1f7f0e60117222202ba2a7797a68654c7 100644
--- a/core/modules/jsonapi/tests/src/Functional/JsonApiFunctionalTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/JsonApiFunctionalTest.php
@@ -19,7 +19,7 @@ class JsonApiFunctionalTest extends JsonApiFunctionalTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'basic_auth',
   ];
 
diff --git a/core/modules/jsonapi/tests/src/Functional/JsonApiFunctionalTestBase.php b/core/modules/jsonapi/tests/src/Functional/JsonApiFunctionalTestBase.php
index f907ccfc4de91dce28d4253bd4b7497d1d06a7f7..a444a85185c615f3c29f68e1aa1e3ab9d6e91f7e 100644
--- a/core/modules/jsonapi/tests/src/Functional/JsonApiFunctionalTestBase.php
+++ b/core/modules/jsonapi/tests/src/Functional/JsonApiFunctionalTestBase.php
@@ -33,7 +33,7 @@ abstract class JsonApiFunctionalTestBase extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'jsonapi',
     'serialization',
     'node',
diff --git a/core/modules/jsonapi/tests/src/Functional/JsonApiRegressionTest.php b/core/modules/jsonapi/tests/src/Functional/JsonApiRegressionTest.php
index 2aec3d96a56765c025817aa93232e445aaa31de8..7b4edccdcb12ade261308465041413247998b196 100644
--- a/core/modules/jsonapi/tests/src/Functional/JsonApiRegressionTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/JsonApiRegressionTest.php
@@ -39,7 +39,7 @@ class JsonApiRegressionTest extends JsonApiFunctionalTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'basic_auth',
   ];
 
diff --git a/core/modules/jsonapi/tests/src/Functional/MediaTest.php b/core/modules/jsonapi/tests/src/Functional/MediaTest.php
index f604ca60924d1103660df28c4e1466f6d8409c4e..38911ea95ec0f8da56bdd06cc490e7f4d6961562 100644
--- a/core/modules/jsonapi/tests/src/Functional/MediaTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/MediaTest.php
@@ -22,7 +22,7 @@ class MediaTest extends ResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['media'];
+  protected static $modules = ['media'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/jsonapi/tests/src/Functional/MediaTypeTest.php b/core/modules/jsonapi/tests/src/Functional/MediaTypeTest.php
index 8ae5e1bb78a53f1da2fc2932ca532a62b4312624..1239bf7814af0a4adc60d898a18865a9cc6946b0 100644
--- a/core/modules/jsonapi/tests/src/Functional/MediaTypeTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/MediaTypeTest.php
@@ -15,7 +15,7 @@ class MediaTypeTest extends ResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['media'];
+  protected static $modules = ['media'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/jsonapi/tests/src/Functional/MenuLinkContentTest.php b/core/modules/jsonapi/tests/src/Functional/MenuLinkContentTest.php
index 847c49ff93d579ada017d090f8533f6fb5492dd2..633d29a500070b08f253f6c77a9cd095818ae3a2 100644
Binary files a/core/modules/jsonapi/tests/src/Functional/MenuLinkContentTest.php and b/core/modules/jsonapi/tests/src/Functional/MenuLinkContentTest.php differ
diff --git a/core/modules/jsonapi/tests/src/Functional/MenuTest.php b/core/modules/jsonapi/tests/src/Functional/MenuTest.php
index 6a6d9946a347e223bb23af2c38448ce689311c23..3405d88b8aacea37910d7e71b93b9372e716cad3 100644
--- a/core/modules/jsonapi/tests/src/Functional/MenuTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/MenuTest.php
@@ -15,7 +15,7 @@ class MenuTest extends ResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [];
+  protected static $modules = [];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/jsonapi/tests/src/Functional/MessageTest.php b/core/modules/jsonapi/tests/src/Functional/MessageTest.php
index 5fcb72512bf9c7ce18a25a65f07b6de94bf04c6f..045848862f3c1dc3525ed6e7ba92e5a7305d761c 100644
--- a/core/modules/jsonapi/tests/src/Functional/MessageTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/MessageTest.php
@@ -19,7 +19,7 @@ class MessageTest extends ResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['contact'];
+  protected static $modules = ['contact'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/jsonapi/tests/src/Functional/NodeTest.php b/core/modules/jsonapi/tests/src/Functional/NodeTest.php
index 8493da6717af428c445f60e3e8ed2cc1c20b14ee..7ae2d1d650133f21713425ebd4bacb26e0acb604 100644
--- a/core/modules/jsonapi/tests/src/Functional/NodeTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/NodeTest.php
@@ -26,7 +26,7 @@ class NodeTest extends ResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'path'];
+  protected static $modules = ['node', 'path'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/jsonapi/tests/src/Functional/NodeTypeTest.php b/core/modules/jsonapi/tests/src/Functional/NodeTypeTest.php
index c7bc3e22230e90fc24788ad7270280542bb29e02..ecc8c5dd52db431c8e6d6c6be41e546acb0ef5c9 100644
--- a/core/modules/jsonapi/tests/src/Functional/NodeTypeTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/NodeTypeTest.php
@@ -15,7 +15,7 @@ class NodeTypeTest extends ResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node'];
+  protected static $modules = ['node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/jsonapi/tests/src/Functional/PathAliasTest.php b/core/modules/jsonapi/tests/src/Functional/PathAliasTest.php
index ce2e90465e7cf69deec3c4c51eaf13bad912b266..6e28be6186255a7e3bef1907d69a326fb8d95d08 100644
--- a/core/modules/jsonapi/tests/src/Functional/PathAliasTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/PathAliasTest.php
@@ -16,7 +16,7 @@ class PathAliasTest extends ResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['user'];
+  protected static $modules = ['user'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/jsonapi/tests/src/Functional/RdfMappingTest.php b/core/modules/jsonapi/tests/src/Functional/RdfMappingTest.php
index 0082d52a3f16d9265002bcb3fadb0840bb4e34f8..e9b2c40e0dc57bad2499df50f84da6330fcd53d7 100644
--- a/core/modules/jsonapi/tests/src/Functional/RdfMappingTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/RdfMappingTest.php
@@ -16,7 +16,7 @@ class RdfMappingTest extends ResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'rdf'];
+  protected static $modules = ['node', 'rdf'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/jsonapi/tests/src/Functional/ResponsiveImageStyleTest.php b/core/modules/jsonapi/tests/src/Functional/ResponsiveImageStyleTest.php
index d70d4b75ec5342a389bccdaf641e48627a353f48..3775b2758bf1b3cd419b6d920c3d6dcb7949a691 100644
--- a/core/modules/jsonapi/tests/src/Functional/ResponsiveImageStyleTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/ResponsiveImageStyleTest.php
@@ -15,7 +15,7 @@ class ResponsiveImageStyleTest extends ResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['responsive_image'];
+  protected static $modules = ['responsive_image'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/jsonapi/tests/src/Functional/RestExportJsonApiUnsupported.php b/core/modules/jsonapi/tests/src/Functional/RestExportJsonApiUnsupported.php
index eec12037d82113105ce7e474cd5f181aa931709e..f9a501929bc6a28c19f275d4d9fddb58b9cef0d9 100644
--- a/core/modules/jsonapi/tests/src/Functional/RestExportJsonApiUnsupported.php
+++ b/core/modules/jsonapi/tests/src/Functional/RestExportJsonApiUnsupported.php
@@ -22,7 +22,7 @@ class RestExportJsonApiUnsupported extends ViewTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['jsonapi', 'rest_test_views', 'views_ui'];
+  protected static $modules = ['jsonapi', 'rest_test_views', 'views_ui'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/jsonapi/tests/src/Functional/RestJsonApiUnsupported.php b/core/modules/jsonapi/tests/src/Functional/RestJsonApiUnsupported.php
index 73791753dad9c9e29acc1bfc1fb7c0463285c970..e1db4fe49e04236bd5aef03fbbf6b2b5630622b0 100644
--- a/core/modules/jsonapi/tests/src/Functional/RestJsonApiUnsupported.php
+++ b/core/modules/jsonapi/tests/src/Functional/RestJsonApiUnsupported.php
@@ -22,7 +22,7 @@ class RestJsonApiUnsupported extends ResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['jsonapi', 'node'];
+  protected static $modules = ['jsonapi', 'node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/jsonapi/tests/src/Functional/RestResourceConfigTest.php b/core/modules/jsonapi/tests/src/Functional/RestResourceConfigTest.php
index b1de33b048f7d99516657ca41565d9331d4d3bfc..15364d0cd0e5815bcf426c4b9ca787ddea5c9379 100644
--- a/core/modules/jsonapi/tests/src/Functional/RestResourceConfigTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/RestResourceConfigTest.php
@@ -15,7 +15,7 @@ class RestResourceConfigTest extends ResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['rest', 'dblog'];
+  protected static $modules = ['rest', 'dblog'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/jsonapi/tests/src/Functional/RoleTest.php b/core/modules/jsonapi/tests/src/Functional/RoleTest.php
index c3ad6e4608debc4473e8a1804ff51ea355faecf9..a540d46835fb3e6e314b03a46e196bf7fa569e96 100644
--- a/core/modules/jsonapi/tests/src/Functional/RoleTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/RoleTest.php
@@ -16,7 +16,7 @@ class RoleTest extends ResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['user'];
+  protected static $modules = ['user'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/jsonapi/tests/src/Functional/SearchPageTest.php b/core/modules/jsonapi/tests/src/Functional/SearchPageTest.php
index ebf9275f0b7c32ba9d6d140ec2db831f7b8c8c65..ddda93ba95dfab170583931fc629cb4d1a47075c 100644
--- a/core/modules/jsonapi/tests/src/Functional/SearchPageTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/SearchPageTest.php
@@ -15,7 +15,7 @@ class SearchPageTest extends ResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'search'];
+  protected static $modules = ['node', 'search'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/jsonapi/tests/src/Functional/ShortcutSetTest.php b/core/modules/jsonapi/tests/src/Functional/ShortcutSetTest.php
index a6bcce4ece2bb4abd98f9d47e022d6075c6f57dd..2bc2845d00787c3270bd90e458d43598f8619eae 100644
--- a/core/modules/jsonapi/tests/src/Functional/ShortcutSetTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/ShortcutSetTest.php
@@ -15,7 +15,7 @@ class ShortcutSetTest extends ResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['shortcut'];
+  protected static $modules = ['shortcut'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/jsonapi/tests/src/Functional/ShortcutTest.php b/core/modules/jsonapi/tests/src/Functional/ShortcutTest.php
index 925bef47382f8a3c53d090b482be4ac8451136d6..582a123890bc9cdf59e5dd6e862b78580a2fef77 100644
--- a/core/modules/jsonapi/tests/src/Functional/ShortcutTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/ShortcutTest.php
@@ -23,7 +23,7 @@ class ShortcutTest extends ResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['comment', 'shortcut'];
+  protected static $modules = ['comment', 'shortcut'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/jsonapi/tests/src/Functional/TermTest.php b/core/modules/jsonapi/tests/src/Functional/TermTest.php
index f5f20aeec2500470477864b1053000d7c1f4f786..2cae64dba6f482d377a4f1d2d6d1c81d151d23b0 100644
--- a/core/modules/jsonapi/tests/src/Functional/TermTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/TermTest.php
@@ -24,7 +24,7 @@ class TermTest extends ResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['taxonomy', 'path'];
+  protected static $modules = ['taxonomy', 'path'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/jsonapi/tests/src/Functional/TourTest.php b/core/modules/jsonapi/tests/src/Functional/TourTest.php
index 80b1ea8c3cddf04f81b6894fd092df4893eba31d..77c8b9e98be9dc024127ffe71d6b63b8eb7a6e10 100644
--- a/core/modules/jsonapi/tests/src/Functional/TourTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/TourTest.php
@@ -15,7 +15,7 @@ class TourTest extends ResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['tour'];
+  protected static $modules = ['tour'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/jsonapi/tests/src/Functional/UserTest.php b/core/modules/jsonapi/tests/src/Functional/UserTest.php
index f4ce93f2aa912e3f682bad159cc824c33f5e34ec..6279dd90318a2687329f268eb5dfcb935a7380d0 100644
--- a/core/modules/jsonapi/tests/src/Functional/UserTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/UserTest.php
@@ -22,7 +22,7 @@ class UserTest extends ResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['user', 'jsonapi_test_user'];
+  protected static $modules = ['user', 'jsonapi_test_user'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/jsonapi/tests/src/Functional/ViewTest.php b/core/modules/jsonapi/tests/src/Functional/ViewTest.php
index 3817541f1fc65f7987fc7a991680505493a7fb57..053d453a872a71d70a0242cb6cee141a1316f9f6 100644
--- a/core/modules/jsonapi/tests/src/Functional/ViewTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/ViewTest.php
@@ -15,7 +15,7 @@ class ViewTest extends ResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['views'];
+  protected static $modules = ['views'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/jsonapi/tests/src/Functional/VocabularyTest.php b/core/modules/jsonapi/tests/src/Functional/VocabularyTest.php
index a3e2a066cf7c7f53b1b870fe238996e87fdc0d9d..e500f3b8d7c089369e357078291d0c187c640b9d 100644
--- a/core/modules/jsonapi/tests/src/Functional/VocabularyTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/VocabularyTest.php
@@ -15,7 +15,7 @@ class VocabularyTest extends ResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['taxonomy'];
+  protected static $modules = ['taxonomy'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/jsonapi/tests/src/Functional/WorkflowTest.php b/core/modules/jsonapi/tests/src/Functional/WorkflowTest.php
index 50ffd46fb17a33c876c180cfca883b598113a54f..49e81d7a39fca36cc6e36b9fe46fb422aa11084e 100644
--- a/core/modules/jsonapi/tests/src/Functional/WorkflowTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/WorkflowTest.php
@@ -15,7 +15,7 @@ class WorkflowTest extends ResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['workflows', 'workflow_type_test'];
+  protected static $modules = ['workflows', 'workflow_type_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/jsonapi/tests/src/Kernel/Context/FieldResolverTest.php b/core/modules/jsonapi/tests/src/Kernel/Context/FieldResolverTest.php
index b0cb0631563081d5c80f440f46e9505d9553a65f..3c6350b2ae759683028c282e795025e3b7cb8bc2 100644
--- a/core/modules/jsonapi/tests/src/Kernel/Context/FieldResolverTest.php
+++ b/core/modules/jsonapi/tests/src/Kernel/Context/FieldResolverTest.php
@@ -16,7 +16,7 @@
  */
 class FieldResolverTest extends JsonapiKernelTestBase {
 
-  public static $modules = [
+  protected static $modules = [
     'entity_test',
     'jsonapi_test_field_aliasing',
     'jsonapi_test_field_filter_access',
diff --git a/core/modules/jsonapi/tests/src/Kernel/Controller/EntityResourceTest.php b/core/modules/jsonapi/tests/src/Kernel/Controller/EntityResourceTest.php
index 409ed8627ff4044c77b5132fb2887d0d35efae5b..e583518f76239e609a5764c12eccdc4939ece013 100644
--- a/core/modules/jsonapi/tests/src/Kernel/Controller/EntityResourceTest.php
+++ b/core/modules/jsonapi/tests/src/Kernel/Controller/EntityResourceTest.php
@@ -38,7 +38,7 @@ class EntityResourceTest extends JsonapiKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'node',
     'field',
     'jsonapi',
diff --git a/core/modules/jsonapi/tests/src/Kernel/JsonapiKernelTestBase.php b/core/modules/jsonapi/tests/src/Kernel/JsonapiKernelTestBase.php
index e53c43dc03d1c15fac1706ab85b430571efdf753..b0734b9e7441b07363f55b48a1b40d65118f0096 100644
--- a/core/modules/jsonapi/tests/src/Kernel/JsonapiKernelTestBase.php
+++ b/core/modules/jsonapi/tests/src/Kernel/JsonapiKernelTestBase.php
@@ -16,7 +16,7 @@ abstract class JsonapiKernelTestBase extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['jsonapi'];
+  protected static $modules = ['jsonapi'];
 
   /**
    * Creates a field of an entity reference field storage on the bundle.
diff --git a/core/modules/jsonapi/tests/src/Kernel/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php b/core/modules/jsonapi/tests/src/Kernel/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php
index 32dd9ec338a777c97b656f2063d9d11f3a970ea4..2cb4fb43852b579e7bbf2c44f208e788665f16f5 100644
--- a/core/modules/jsonapi/tests/src/Kernel/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php
+++ b/core/modules/jsonapi/tests/src/Kernel/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php
@@ -41,7 +41,7 @@ class JsonApiDocumentTopLevelNormalizerTest extends JsonapiKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'jsonapi',
     'field',
     'node',
diff --git a/core/modules/jsonapi/tests/src/Kernel/Normalizer/RelationshipNormalizerTest.php b/core/modules/jsonapi/tests/src/Kernel/Normalizer/RelationshipNormalizerTest.php
index 9d5a61fa8f69e0a164e46d34379007f41c90e429..ad40b8fc985515eb36942725c01dbce67b3e5f24 100644
--- a/core/modules/jsonapi/tests/src/Kernel/Normalizer/RelationshipNormalizerTest.php
+++ b/core/modules/jsonapi/tests/src/Kernel/Normalizer/RelationshipNormalizerTest.php
@@ -28,7 +28,7 @@ class RelationshipNormalizerTest extends JsonapiKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'field',
     'file',
     'image',
diff --git a/core/modules/jsonapi/tests/src/Kernel/Query/FilterTest.php b/core/modules/jsonapi/tests/src/Kernel/Query/FilterTest.php
index fdbd9858588a01d059e7d50d6fae52abd16ba41e..51f1a728af124db15b8a06b67065bb3294d2af0a 100644
--- a/core/modules/jsonapi/tests/src/Kernel/Query/FilterTest.php
+++ b/core/modules/jsonapi/tests/src/Kernel/Query/FilterTest.php
@@ -27,7 +27,7 @@ class FilterTest extends JsonapiKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'field',
     'file',
     'image',
diff --git a/core/modules/jsonapi/tests/src/Kernel/ResourceType/RelatedResourceTypesTest.php b/core/modules/jsonapi/tests/src/Kernel/ResourceType/RelatedResourceTypesTest.php
index 9299f06cb4b231cc6274c0f1ead08012a461a688..3777200d3d3ef8f87c84c1751da3f7ec33408991 100644
--- a/core/modules/jsonapi/tests/src/Kernel/ResourceType/RelatedResourceTypesTest.php
+++ b/core/modules/jsonapi/tests/src/Kernel/ResourceType/RelatedResourceTypesTest.php
@@ -17,7 +17,7 @@ class RelatedResourceTypesTest extends JsonapiKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'node',
     'jsonapi',
     'serialization',
diff --git a/core/modules/jsonapi/tests/src/Kernel/ResourceType/ResourceTypeRepositoryTest.php b/core/modules/jsonapi/tests/src/Kernel/ResourceType/ResourceTypeRepositoryTest.php
index 09a30a441994c6a23328e789bbc271215a027750..d4461fe9c956a069a5638605904aa28ec68e0b68 100644
--- a/core/modules/jsonapi/tests/src/Kernel/ResourceType/ResourceTypeRepositoryTest.php
+++ b/core/modules/jsonapi/tests/src/Kernel/ResourceType/ResourceTypeRepositoryTest.php
@@ -18,7 +18,7 @@ class ResourceTypeRepositoryTest extends JsonapiKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'field',
     'node',
     'serialization',
diff --git a/core/modules/jsonapi/tests/src/Kernel/Revisions/VersionNegotiatorTest.php b/core/modules/jsonapi/tests/src/Kernel/Revisions/VersionNegotiatorTest.php
index c05d690bee469f07e2de1930d9d55ddbdf7417f7..9614d2147c7ddb6aad29a27560892353fe4de49b 100644
--- a/core/modules/jsonapi/tests/src/Kernel/Revisions/VersionNegotiatorTest.php
+++ b/core/modules/jsonapi/tests/src/Kernel/Revisions/VersionNegotiatorTest.php
@@ -57,7 +57,7 @@ class VersionNegotiatorTest extends JsonapiKernelTestBase {
    */
   protected $node2;
 
-  public static $modules = [
+  protected static $modules = [
     'node',
     'field',
     'jsonapi',
diff --git a/core/modules/jsonapi/tests/src/Kernel/Serializer/SerializerTest.php b/core/modules/jsonapi/tests/src/Kernel/Serializer/SerializerTest.php
index 8e72e3b32351ee24a81df675731ca67accc69de6..3970bb0dd82cd562f66de5af1253ea6aa91b541f 100644
--- a/core/modules/jsonapi/tests/src/Kernel/Serializer/SerializerTest.php
+++ b/core/modules/jsonapi/tests/src/Kernel/Serializer/SerializerTest.php
@@ -24,7 +24,7 @@ class SerializerTest extends JsonapiKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'serialization',
     'system',
     'node',
diff --git a/core/modules/language/tests/src/Functional/AdminPathEntityConverterLanguageTest.php b/core/modules/language/tests/src/Functional/AdminPathEntityConverterLanguageTest.php
index e4da5a91e7256202e86895c9549dcaea443fc09b..621910a205cf3f8302c088276a9bea420b9a01c6 100644
--- a/core/modules/language/tests/src/Functional/AdminPathEntityConverterLanguageTest.php
+++ b/core/modules/language/tests/src/Functional/AdminPathEntityConverterLanguageTest.php
@@ -12,7 +12,7 @@
  */
 class AdminPathEntityConverterLanguageTest extends BrowserTestBase {
 
-  public static $modules = ['language', 'language_test'];
+  protected static $modules = ['language', 'language_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/language/tests/src/Functional/ConfigurableLanguageManagerTest.php b/core/modules/language/tests/src/Functional/ConfigurableLanguageManagerTest.php
index dec9bb9c65d58b1428e69b83e3d668dfc09bac13..f18b13f6c5be03e4ad4393a6a42d18eb837df8e7 100644
--- a/core/modules/language/tests/src/Functional/ConfigurableLanguageManagerTest.php
+++ b/core/modules/language/tests/src/Functional/ConfigurableLanguageManagerTest.php
@@ -24,7 +24,7 @@ class ConfigurableLanguageManagerTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'language',
     'content_translation',
     'node',
diff --git a/core/modules/language/tests/src/Functional/EntityTypeWithoutLanguageFormTest.php b/core/modules/language/tests/src/Functional/EntityTypeWithoutLanguageFormTest.php
index ec072b29f519dab56832419081962c80f6d256fb..b8f4173c7133d25e248744c7e2e8fc3242b9cee7 100644
--- a/core/modules/language/tests/src/Functional/EntityTypeWithoutLanguageFormTest.php
+++ b/core/modules/language/tests/src/Functional/EntityTypeWithoutLanguageFormTest.php
@@ -19,7 +19,7 @@ class EntityTypeWithoutLanguageFormTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'language',
     'language_test',
   ];
diff --git a/core/modules/language/tests/src/Functional/Hal/ConfigurableLanguageHalJsonAnonTest.php b/core/modules/language/tests/src/Functional/Hal/ConfigurableLanguageHalJsonAnonTest.php
index f2759d93f8fb680c3d2b51d4a83eb444a4135d27..06a98c75612052b3a3f999f2617eb5f38338de60 100644
--- a/core/modules/language/tests/src/Functional/Hal/ConfigurableLanguageHalJsonAnonTest.php
+++ b/core/modules/language/tests/src/Functional/Hal/ConfigurableLanguageHalJsonAnonTest.php
@@ -15,7 +15,7 @@ class ConfigurableLanguageHalJsonAnonTest extends ConfigurableLanguageResourceTe
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/language/tests/src/Functional/Hal/ConfigurableLanguageHalJsonBasicAuthTest.php b/core/modules/language/tests/src/Functional/Hal/ConfigurableLanguageHalJsonBasicAuthTest.php
index f0803aa55390f1d8fb7ec9d6eb50ff6b95a6e120..20c3d75d7707eab874f7bf204e32f795dca37853 100644
--- a/core/modules/language/tests/src/Functional/Hal/ConfigurableLanguageHalJsonBasicAuthTest.php
+++ b/core/modules/language/tests/src/Functional/Hal/ConfigurableLanguageHalJsonBasicAuthTest.php
@@ -15,7 +15,7 @@ class ConfigurableLanguageHalJsonBasicAuthTest extends ConfigurableLanguageResou
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal', 'basic_auth'];
+  protected static $modules = ['hal', 'basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/language/tests/src/Functional/Hal/ConfigurableLanguageHalJsonCookieTest.php b/core/modules/language/tests/src/Functional/Hal/ConfigurableLanguageHalJsonCookieTest.php
index 68fe2bf4524d499bace8fa86d1e8e1de10f53751..6af58e060b0c538324baa2cdbcddf162fb1de3fc 100644
--- a/core/modules/language/tests/src/Functional/Hal/ConfigurableLanguageHalJsonCookieTest.php
+++ b/core/modules/language/tests/src/Functional/Hal/ConfigurableLanguageHalJsonCookieTest.php
@@ -15,7 +15,7 @@ class ConfigurableLanguageHalJsonCookieTest extends ConfigurableLanguageResource
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/language/tests/src/Functional/Hal/ContentLanguageSettingsHalJsonAnonTest.php b/core/modules/language/tests/src/Functional/Hal/ContentLanguageSettingsHalJsonAnonTest.php
index 88bf96eb1d204de3f8995d4d49766243bc545290..8202050df78009ab9aa84f6769fb68edf1c5cfbd 100644
--- a/core/modules/language/tests/src/Functional/Hal/ContentLanguageSettingsHalJsonAnonTest.php
+++ b/core/modules/language/tests/src/Functional/Hal/ContentLanguageSettingsHalJsonAnonTest.php
@@ -15,7 +15,7 @@ class ContentLanguageSettingsHalJsonAnonTest extends ContentLanguageSettingsReso
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/language/tests/src/Functional/Hal/ContentLanguageSettingsHalJsonBasicAuthTest.php b/core/modules/language/tests/src/Functional/Hal/ContentLanguageSettingsHalJsonBasicAuthTest.php
index ec6f172a597f609489da3ef45ca1586a8309f5ed..f59e1b8442e90e477d06a7de0cb4670d886d34fd 100644
--- a/core/modules/language/tests/src/Functional/Hal/ContentLanguageSettingsHalJsonBasicAuthTest.php
+++ b/core/modules/language/tests/src/Functional/Hal/ContentLanguageSettingsHalJsonBasicAuthTest.php
@@ -15,7 +15,7 @@ class ContentLanguageSettingsHalJsonBasicAuthTest extends ContentLanguageSetting
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal', 'basic_auth'];
+  protected static $modules = ['hal', 'basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/language/tests/src/Functional/Hal/ContentLanguageSettingsHalJsonCookieTest.php b/core/modules/language/tests/src/Functional/Hal/ContentLanguageSettingsHalJsonCookieTest.php
index e9ed29cf3549243d15f0a71b0cbdb812af1418da..5a14838d78d88c73715b132a5af4bfefd02dd696 100644
--- a/core/modules/language/tests/src/Functional/Hal/ContentLanguageSettingsHalJsonCookieTest.php
+++ b/core/modules/language/tests/src/Functional/Hal/ContentLanguageSettingsHalJsonCookieTest.php
@@ -15,7 +15,7 @@ class ContentLanguageSettingsHalJsonCookieTest extends ContentLanguageSettingsRe
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/language/tests/src/Functional/LanguageBlockSettingsVisibilityTest.php b/core/modules/language/tests/src/Functional/LanguageBlockSettingsVisibilityTest.php
index 1511bf1f14915173f9f776316df5a37f63be7ed9..81baf61126d7ddc0c0ece8cc928456b30cf708b6 100644
--- a/core/modules/language/tests/src/Functional/LanguageBlockSettingsVisibilityTest.php
+++ b/core/modules/language/tests/src/Functional/LanguageBlockSettingsVisibilityTest.php
@@ -11,7 +11,7 @@
  */
 class LanguageBlockSettingsVisibilityTest extends BrowserTestBase {
 
-  public static $modules = ['block', 'language'];
+  protected static $modules = ['block', 'language'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/language/tests/src/Functional/LanguageBreadcrumbTest.php b/core/modules/language/tests/src/Functional/LanguageBreadcrumbTest.php
index 5ef474dad9935ae8225ec9e188e77385da8ab543..64028cf28c95f208c178563ef3b441f8b269f658 100644
--- a/core/modules/language/tests/src/Functional/LanguageBreadcrumbTest.php
+++ b/core/modules/language/tests/src/Functional/LanguageBreadcrumbTest.php
@@ -17,7 +17,7 @@ class LanguageBreadcrumbTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['language', 'block', 'filter'];
+  protected static $modules = ['language', 'block', 'filter'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/language/tests/src/Functional/LanguageBrowserDetectionAcceptLanguageTest.php b/core/modules/language/tests/src/Functional/LanguageBrowserDetectionAcceptLanguageTest.php
index b053f845d957c224b51e9055f06773bd183d3686..06d76892b69f3a0437a0e5eedbfe72f6cb38e47f 100644
--- a/core/modules/language/tests/src/Functional/LanguageBrowserDetectionAcceptLanguageTest.php
+++ b/core/modules/language/tests/src/Functional/LanguageBrowserDetectionAcceptLanguageTest.php
@@ -17,7 +17,7 @@ class LanguageBrowserDetectionAcceptLanguageTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['language', 'locale', 'content_translation', 'system_test'];
+  protected static $modules = ['language', 'locale', 'content_translation', 'system_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/language/tests/src/Functional/LanguageBrowserDetectionTest.php b/core/modules/language/tests/src/Functional/LanguageBrowserDetectionTest.php
index 6c76a021112e54befa268bc1145e0db76535657a..3d27415e1f0bfa87a2dd750e5126b33d08f46102 100644
--- a/core/modules/language/tests/src/Functional/LanguageBrowserDetectionTest.php
+++ b/core/modules/language/tests/src/Functional/LanguageBrowserDetectionTest.php
@@ -12,7 +12,7 @@
  */
 class LanguageBrowserDetectionTest extends BrowserTestBase {
 
-  public static $modules = ['language'];
+  protected static $modules = ['language'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/language/tests/src/Functional/LanguageConfigOverrideImportTest.php b/core/modules/language/tests/src/Functional/LanguageConfigOverrideImportTest.php
index 03f3df28b51870af14d8a36a5a7f93f73460961e..aade6159a269a1dacf624dd5d1b6d202ca45ed41 100644
--- a/core/modules/language/tests/src/Functional/LanguageConfigOverrideImportTest.php
+++ b/core/modules/language/tests/src/Functional/LanguageConfigOverrideImportTest.php
@@ -17,7 +17,7 @@ class LanguageConfigOverrideImportTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['language', 'config', 'locale', 'config_translation'];
+  protected static $modules = ['language', 'config', 'locale', 'config_translation'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/language/tests/src/Functional/LanguageConfigSchemaTest.php b/core/modules/language/tests/src/Functional/LanguageConfigSchemaTest.php
index 828d176f33b00e9910b3d6867cd5d2487e814b1f..a1e63570fac933f684891cd9703769cd86120799 100644
--- a/core/modules/language/tests/src/Functional/LanguageConfigSchemaTest.php
+++ b/core/modules/language/tests/src/Functional/LanguageConfigSchemaTest.php
@@ -19,7 +19,7 @@ class LanguageConfigSchemaTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['language', 'menu_link_content'];
+  protected static $modules = ['language', 'menu_link_content'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/language/tests/src/Functional/LanguageConfigurationElementTest.php b/core/modules/language/tests/src/Functional/LanguageConfigurationElementTest.php
index 13cacefa2324c5c4408d8807e388415491995b48..38a12396d57dea019a64017ff286bef03ac4f189 100644
--- a/core/modules/language/tests/src/Functional/LanguageConfigurationElementTest.php
+++ b/core/modules/language/tests/src/Functional/LanguageConfigurationElementTest.php
@@ -20,7 +20,7 @@ class LanguageConfigurationElementTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['taxonomy', 'node', 'language', 'language_elements_test', 'field_ui'];
+  protected static $modules = ['taxonomy', 'node', 'language', 'language_elements_test', 'field_ui'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/language/tests/src/Functional/LanguageConfigurationTest.php b/core/modules/language/tests/src/Functional/LanguageConfigurationTest.php
index 06f4cee3ba7111314b43ce064bf2ac5e0fec3513..91e892ebe7db9f1bd62d77daad038718b23f1cc0 100644
--- a/core/modules/language/tests/src/Functional/LanguageConfigurationTest.php
+++ b/core/modules/language/tests/src/Functional/LanguageConfigurationTest.php
@@ -20,7 +20,7 @@ class LanguageConfigurationTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['language'];
+  protected static $modules = ['language'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/language/tests/src/Functional/LanguageCustomLanguageConfigurationTest.php b/core/modules/language/tests/src/Functional/LanguageCustomLanguageConfigurationTest.php
index 52bbde11725ca10f793e9e40058ed40dc8cec7a2..03dad5c2335a9d5f0cf3005b5f12a35746f1dde3 100644
--- a/core/modules/language/tests/src/Functional/LanguageCustomLanguageConfigurationTest.php
+++ b/core/modules/language/tests/src/Functional/LanguageCustomLanguageConfigurationTest.php
@@ -19,7 +19,7 @@ class LanguageCustomLanguageConfigurationTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['language'];
+  protected static $modules = ['language'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/language/tests/src/Functional/LanguageEntityFieldAccessHookTest.php b/core/modules/language/tests/src/Functional/LanguageEntityFieldAccessHookTest.php
index fac20719d11825035e2e0924a8512aff3e340dc2..09c3728678bf6238548511d71aefdba9dacbb1da 100644
--- a/core/modules/language/tests/src/Functional/LanguageEntityFieldAccessHookTest.php
+++ b/core/modules/language/tests/src/Functional/LanguageEntityFieldAccessHookTest.php
@@ -16,7 +16,7 @@ class LanguageEntityFieldAccessHookTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'node',
     'text',
     'field',
diff --git a/core/modules/language/tests/src/Functional/LanguageListModuleInstallTest.php b/core/modules/language/tests/src/Functional/LanguageListModuleInstallTest.php
index e63c31726c393b9c9a2943838e6fadd8387ee98d..efd8db5c8caf2802d467b79b60daa0db93fa869b 100644
--- a/core/modules/language/tests/src/Functional/LanguageListModuleInstallTest.php
+++ b/core/modules/language/tests/src/Functional/LanguageListModuleInstallTest.php
@@ -17,7 +17,7 @@ class LanguageListModuleInstallTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['language_test'];
+  protected static $modules = ['language_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/language/tests/src/Functional/LanguageListTest.php b/core/modules/language/tests/src/Functional/LanguageListTest.php
index 45ec251ba2461728d6499dfbe8da2bf7d816a27b..ebd2fae80f8ed7c9d30f5e2e0badda00c1ff41bb 100644
--- a/core/modules/language/tests/src/Functional/LanguageListTest.php
+++ b/core/modules/language/tests/src/Functional/LanguageListTest.php
@@ -20,7 +20,7 @@ class LanguageListTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['language'];
+  protected static $modules = ['language'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/language/tests/src/Functional/LanguageLocaleListTest.php b/core/modules/language/tests/src/Functional/LanguageLocaleListTest.php
index 6d2979519b92ecafc4c1df19dae988683169bb6c..0fe4c1f6ae392c27e6f89d397f44920b09319871 100644
--- a/core/modules/language/tests/src/Functional/LanguageLocaleListTest.php
+++ b/core/modules/language/tests/src/Functional/LanguageLocaleListTest.php
@@ -17,7 +17,7 @@ class LanguageLocaleListTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['language', 'locale'];
+  protected static $modules = ['language', 'locale'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/language/tests/src/Functional/LanguageNegotiationContentEntityTest.php b/core/modules/language/tests/src/Functional/LanguageNegotiationContentEntityTest.php
index 8d7b683c3cd19bfce42d1674ff23d5cb18251c5c..a46d9cdf827bd3b4a3a5084fc9d3569862a1c5e8 100644
--- a/core/modules/language/tests/src/Functional/LanguageNegotiationContentEntityTest.php
+++ b/core/modules/language/tests/src/Functional/LanguageNegotiationContentEntityTest.php
@@ -25,7 +25,7 @@ class LanguageNegotiationContentEntityTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['language', 'language_test', 'entity_test', 'system'];
+  protected static $modules = ['language', 'language_test', 'entity_test', 'system'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/language/tests/src/Functional/LanguageNegotiationInfoTest.php b/core/modules/language/tests/src/Functional/LanguageNegotiationInfoTest.php
index 0d92a96a75e973a881ca69f3bad11ab4d44a89b8..d7cb1c970556d49dde5bf5e33302f3213a819c7a 100644
--- a/core/modules/language/tests/src/Functional/LanguageNegotiationInfoTest.php
+++ b/core/modules/language/tests/src/Functional/LanguageNegotiationInfoTest.php
@@ -19,7 +19,7 @@ class LanguageNegotiationInfoTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['language', 'content_translation'];
+  protected static $modules = ['language', 'content_translation'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/language/tests/src/Functional/LanguageNegotiationUrlTest.php b/core/modules/language/tests/src/Functional/LanguageNegotiationUrlTest.php
index 80219bd9effab758c1e0c7c6d5c0c9189ab1af7f..8cf44e0de8be75875df7a8b323430fe6d3e34997 100644
--- a/core/modules/language/tests/src/Functional/LanguageNegotiationUrlTest.php
+++ b/core/modules/language/tests/src/Functional/LanguageNegotiationUrlTest.php
@@ -16,7 +16,7 @@ class LanguageNegotiationUrlTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'language',
     'node',
     'path',
diff --git a/core/modules/language/tests/src/Functional/LanguagePathMonolingualTest.php b/core/modules/language/tests/src/Functional/LanguagePathMonolingualTest.php
index 20dcf476a33ef7f49473f63a69a17feba1212776..da5f1aefa7c08111147036cfa2f009bca2968aed 100644
--- a/core/modules/language/tests/src/Functional/LanguagePathMonolingualTest.php
+++ b/core/modules/language/tests/src/Functional/LanguagePathMonolingualTest.php
@@ -16,7 +16,7 @@ class LanguagePathMonolingualTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['block', 'language', 'path'];
+  protected static $modules = ['block', 'language', 'path'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/language/tests/src/Functional/LanguageSelectorTranslatableTest.php b/core/modules/language/tests/src/Functional/LanguageSelectorTranslatableTest.php
index bec094dca173bffea88927b978c349245e3a82ae..c58d135441529fd9c17467bede98951b7f178e53 100644
--- a/core/modules/language/tests/src/Functional/LanguageSelectorTranslatableTest.php
+++ b/core/modules/language/tests/src/Functional/LanguageSelectorTranslatableTest.php
@@ -16,7 +16,7 @@ class LanguageSelectorTranslatableTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'language',
     'content_translation',
     'node',
diff --git a/core/modules/language/tests/src/Functional/LanguageSwitchingTest.php b/core/modules/language/tests/src/Functional/LanguageSwitchingTest.php
index a5435b6c2d34f3b954a2e2466866263cd9effbf3..bf615efcedc66cf4de564c65bffd4f5b791616a5 100644
--- a/core/modules/language/tests/src/Functional/LanguageSwitchingTest.php
+++ b/core/modules/language/tests/src/Functional/LanguageSwitchingTest.php
@@ -20,7 +20,7 @@ class LanguageSwitchingTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['locale', 'locale_test', 'language', 'block', 'language_test', 'menu_ui'];
+  protected static $modules = ['locale', 'locale_test', 'language', 'block', 'language_test', 'menu_ui'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/language/tests/src/Functional/LanguageTourTest.php b/core/modules/language/tests/src/Functional/LanguageTourTest.php
index 2ec3ac78e9c9fdace3643abdff9ba77cd62988a6..07bcebb20738db8d507fdf7d3c5d0c7c1048c983 100644
--- a/core/modules/language/tests/src/Functional/LanguageTourTest.php
+++ b/core/modules/language/tests/src/Functional/LanguageTourTest.php
@@ -23,7 +23,7 @@ class LanguageTourTest extends TourTestBase {
    *
    * @var array
    */
-  public static $modules = ['block', 'language', 'tour'];
+  protected static $modules = ['block', 'language', 'tour'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/language/tests/src/Functional/LanguageUILanguageNegotiationTest.php b/core/modules/language/tests/src/Functional/LanguageUILanguageNegotiationTest.php
index 65022a1b767ccd11342619d2dff59c3d2dcc6a7b..1d13185b98905fd79c8cdc9dd49d21d3242b7724 100644
--- a/core/modules/language/tests/src/Functional/LanguageUILanguageNegotiationTest.php
+++ b/core/modules/language/tests/src/Functional/LanguageUILanguageNegotiationTest.php
@@ -58,7 +58,7 @@ class LanguageUILanguageNegotiationTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['locale', 'language_test', 'block', 'user', 'content_translation'];
+  protected static $modules = ['locale', 'language_test', 'block', 'user', 'content_translation'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/language/tests/src/Functional/LanguageUrlRewritingTest.php b/core/modules/language/tests/src/Functional/LanguageUrlRewritingTest.php
index b345a15024e0bff6f775f479fcb2c302b5a54d11..ba747fd951958aa129062da91918d326b5fdf08a 100644
--- a/core/modules/language/tests/src/Functional/LanguageUrlRewritingTest.php
+++ b/core/modules/language/tests/src/Functional/LanguageUrlRewritingTest.php
@@ -21,7 +21,7 @@ class LanguageUrlRewritingTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['language', 'language_test'];
+  protected static $modules = ['language', 'language_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/language/tests/src/Functional/Rest/ConfigurableLanguageJsonBasicAuthTest.php b/core/modules/language/tests/src/Functional/Rest/ConfigurableLanguageJsonBasicAuthTest.php
index e61892a299bffce3f31b9c4a32f533c1f3739225..a1ab65cee1223f50c452e3b2d48e3ee292cc0ba1 100644
--- a/core/modules/language/tests/src/Functional/Rest/ConfigurableLanguageJsonBasicAuthTest.php
+++ b/core/modules/language/tests/src/Functional/Rest/ConfigurableLanguageJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class ConfigurableLanguageJsonBasicAuthTest extends ConfigurableLanguageResource
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/language/tests/src/Functional/Rest/ConfigurableLanguageResourceTestBase.php b/core/modules/language/tests/src/Functional/Rest/ConfigurableLanguageResourceTestBase.php
index 2638d38c8acfb4d0d9b31a5c8f86921c328edc35..bae7788d4bda2cbedc8f4df441e47735cdb9ca3e 100644
--- a/core/modules/language/tests/src/Functional/Rest/ConfigurableLanguageResourceTestBase.php
+++ b/core/modules/language/tests/src/Functional/Rest/ConfigurableLanguageResourceTestBase.php
@@ -12,7 +12,7 @@ abstract class ConfigurableLanguageResourceTestBase extends EntityResourceTestBa
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['language'];
+  protected static $modules = ['language'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/language/tests/src/Functional/Rest/ConfigurableLanguageXmlBasicAuthTest.php b/core/modules/language/tests/src/Functional/Rest/ConfigurableLanguageXmlBasicAuthTest.php
index 7aff2d00fbb3e238800172e51e34cad6523a2339..be564187f2426eda7710b328ddad5c7af53c58cd 100644
--- a/core/modules/language/tests/src/Functional/Rest/ConfigurableLanguageXmlBasicAuthTest.php
+++ b/core/modules/language/tests/src/Functional/Rest/ConfigurableLanguageXmlBasicAuthTest.php
@@ -16,7 +16,7 @@ class ConfigurableLanguageXmlBasicAuthTest extends ConfigurableLanguageResourceT
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/language/tests/src/Functional/Rest/ContentLanguageSettingsJsonBasicAuthTest.php b/core/modules/language/tests/src/Functional/Rest/ContentLanguageSettingsJsonBasicAuthTest.php
index d68559fcd009a205f604a15604b199a61deeeedc..a95ec1c4e931facc8114c21f73d30c7db7c8052e 100644
--- a/core/modules/language/tests/src/Functional/Rest/ContentLanguageSettingsJsonBasicAuthTest.php
+++ b/core/modules/language/tests/src/Functional/Rest/ContentLanguageSettingsJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class ContentLanguageSettingsJsonBasicAuthTest extends ContentLanguageSettingsRe
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/language/tests/src/Functional/Rest/ContentLanguageSettingsResourceTestBase.php b/core/modules/language/tests/src/Functional/Rest/ContentLanguageSettingsResourceTestBase.php
index 62834843684b02ea86c3321f2ecf41e1f651e97e..79425367cda7b75decc28f3a59b1710ec9761ec2 100644
--- a/core/modules/language/tests/src/Functional/Rest/ContentLanguageSettingsResourceTestBase.php
+++ b/core/modules/language/tests/src/Functional/Rest/ContentLanguageSettingsResourceTestBase.php
@@ -11,7 +11,7 @@ abstract class ContentLanguageSettingsResourceTestBase extends EntityResourceTes
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['language', 'node'];
+  protected static $modules = ['language', 'node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/language/tests/src/Functional/Rest/ContentLanguageSettingsXmlBasicAuthTest.php b/core/modules/language/tests/src/Functional/Rest/ContentLanguageSettingsXmlBasicAuthTest.php
index 1d1fad462c91741075e41655577e932de5802410..e44f60bf41bbf916c140e8c5d5dad0616051d52b 100644
--- a/core/modules/language/tests/src/Functional/Rest/ContentLanguageSettingsXmlBasicAuthTest.php
+++ b/core/modules/language/tests/src/Functional/Rest/ContentLanguageSettingsXmlBasicAuthTest.php
@@ -16,7 +16,7 @@ class ContentLanguageSettingsXmlBasicAuthTest extends ContentLanguageSettingsRes
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/language/tests/src/Kernel/Condition/LanguageConditionTest.php b/core/modules/language/tests/src/Kernel/Condition/LanguageConditionTest.php
index f640c1e3a898684926f4f6ea8693c36ef153ba6c..8de07c20c5fefe66eafae8806b2708b9857b4b1a 100644
--- a/core/modules/language/tests/src/Kernel/Condition/LanguageConditionTest.php
+++ b/core/modules/language/tests/src/Kernel/Condition/LanguageConditionTest.php
@@ -32,7 +32,7 @@ class LanguageConditionTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['system', 'language'];
+  protected static $modules = ['system', 'language'];
 
   protected function setUp(): void {
     parent::setUp();
diff --git a/core/modules/language/tests/src/Kernel/ConfigurableLanguageManagerTest.php b/core/modules/language/tests/src/Kernel/ConfigurableLanguageManagerTest.php
index 90f224ff9ef0e1f9f393d12095d0cc87486d5eb3..848d15edb8b9ee0edc2beb410f6c93d9c4e2c8f6 100644
--- a/core/modules/language/tests/src/Kernel/ConfigurableLanguageManagerTest.php
+++ b/core/modules/language/tests/src/Kernel/ConfigurableLanguageManagerTest.php
@@ -16,7 +16,7 @@ class ConfigurableLanguageManagerTest extends LanguageTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['user'];
+  protected static $modules = ['user'];
 
   /**
    * The language negotiator.
diff --git a/core/modules/language/tests/src/Kernel/ConfigurableLanguageTest.php b/core/modules/language/tests/src/Kernel/ConfigurableLanguageTest.php
index 00af14cbd373645972f444cb4ce010074d9e0a43..1a717ddeb751712166da24fce96af71af7ed275f 100644
--- a/core/modules/language/tests/src/Kernel/ConfigurableLanguageTest.php
+++ b/core/modules/language/tests/src/Kernel/ConfigurableLanguageTest.php
@@ -18,7 +18,7 @@ class ConfigurableLanguageTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['language'];
+  protected static $modules = ['language'];
 
   /**
    * Tests configurable language name methods.
diff --git a/core/modules/language/tests/src/Kernel/EntityDefaultLanguageTest.php b/core/modules/language/tests/src/Kernel/EntityDefaultLanguageTest.php
index 27eccdc323727aa896d0eaae2a957183a3e7ab0d..045cd6d8829f0fb9abb6ef4fd137e54cdcacef5d 100644
--- a/core/modules/language/tests/src/Kernel/EntityDefaultLanguageTest.php
+++ b/core/modules/language/tests/src/Kernel/EntityDefaultLanguageTest.php
@@ -18,7 +18,7 @@ class EntityDefaultLanguageTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['language', 'node', 'field', 'text', 'user', 'system'];
+  protected static $modules = ['language', 'node', 'field', 'text', 'user', 'system'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/language/tests/src/Kernel/EntityUrlLanguageTest.php b/core/modules/language/tests/src/Kernel/EntityUrlLanguageTest.php
index 7dca23af2bbb17fa9b58e56f17a90952eb68f118..d38e2b36f5b68a9992bccdfdbeea781323ec5d1f 100644
--- a/core/modules/language/tests/src/Kernel/EntityUrlLanguageTest.php
+++ b/core/modules/language/tests/src/Kernel/EntityUrlLanguageTest.php
@@ -22,7 +22,7 @@ class EntityUrlLanguageTest extends LanguageTestBase {
    *
    * @var array
    */
-  public static $modules = ['entity_test', 'user'];
+  protected static $modules = ['entity_test', 'user'];
 
   /**
    * The entity being used for testing.
diff --git a/core/modules/language/tests/src/Kernel/LanguageConfigFactoryOverrideTest.php b/core/modules/language/tests/src/Kernel/LanguageConfigFactoryOverrideTest.php
index 3082697b04274f7a7a34dc3be107698374de99c5..722fcbc8addc6debd9c7acd48c72b43809dcbe01 100644
--- a/core/modules/language/tests/src/Kernel/LanguageConfigFactoryOverrideTest.php
+++ b/core/modules/language/tests/src/Kernel/LanguageConfigFactoryOverrideTest.php
@@ -17,7 +17,7 @@ class LanguageConfigFactoryOverrideTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['system', 'language'];
+  protected static $modules = ['system', 'language'];
 
   /**
    * Tests language.config_factory_override service has the default language.
diff --git a/core/modules/language/tests/src/Kernel/LanguageConfigOverrideInstallTest.php b/core/modules/language/tests/src/Kernel/LanguageConfigOverrideInstallTest.php
index 7d505baf78fbda7ee556b5e37fcb7057093a9e7e..2b12b549454ce3a5f97daf95d310dcb7407fa90f 100644
--- a/core/modules/language/tests/src/Kernel/LanguageConfigOverrideInstallTest.php
+++ b/core/modules/language/tests/src/Kernel/LanguageConfigOverrideInstallTest.php
@@ -17,7 +17,7 @@ class LanguageConfigOverrideInstallTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['language', 'config_events_test'];
+  protected static $modules = ['language', 'config_events_test'];
 
   /**
    * Tests the configuration events are not fired during install of overrides.
diff --git a/core/modules/language/tests/src/Kernel/LanguageTestBase.php b/core/modules/language/tests/src/Kernel/LanguageTestBase.php
index f4dcbd2f9df311d98f9a40b3631f06dff4f315ae..458eeaec53a2444a8ae6bab2ce97eeaa08d8813f 100644
--- a/core/modules/language/tests/src/Kernel/LanguageTestBase.php
+++ b/core/modules/language/tests/src/Kernel/LanguageTestBase.php
@@ -9,7 +9,7 @@
  */
 abstract class LanguageTestBase extends KernelTestBase {
 
-  public static $modules = ['system', 'language', 'language_test'];
+  protected static $modules = ['system', 'language', 'language_test'];
   /**
    * The language manager.
    *
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 16f723dfc5b12f60d2d133058723e15ef050e247..3272b5f7f84eb8e688526b640de01348a74df1c3 100644
--- a/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateDefaultLanguageTest.php
+++ b/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateDefaultLanguageTest.php
@@ -16,7 +16,7 @@ class MigrateDefaultLanguageTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['language'];
+  protected static $modules = ['language'];
 
   /**
    * Tests language_default migration with an existing language.
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 5ceb8fd515f90cbbee7e149938f6e0edf42cde85..0bddd96ae00c40590ac3795667346fed6d047d0d 100644
--- a/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateLanguageContentCommentSettingsTest.php
+++ b/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateLanguageContentCommentSettingsTest.php
@@ -15,7 +15,7 @@ class MigrateLanguageContentCommentSettingsTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'comment',
     'language',
     'content_translation',
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 37a54bbe42dc0761c5b05932c68b6dde2fe3a6c7..f30642b4d01fdc28ae4f2675262d79a23d0eeeb0 100644
--- a/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateLanguageContentMenuSettingsTest.php
+++ b/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateLanguageContentMenuSettingsTest.php
@@ -17,7 +17,7 @@ class MigrateLanguageContentMenuSettingsTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'language',
     'content_translation',
     'menu_link_content',
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 73f50c2246baddd1b45a413d8206f39476617169..9c5f70772691a4b4c259a28ea0c88928494e4b7b 100644
--- a/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateLanguageContentSettingsTest.php
+++ b/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateLanguageContentSettingsTest.php
@@ -16,7 +16,7 @@ class MigrateLanguageContentSettingsTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'text', 'language', 'content_translation', 'menu_ui'];
+  protected static $modules = ['node', 'text', 'language', 'content_translation', 'menu_ui'];
 
   /**
    * {@inheritdoc}
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 17e97f451b6c1af58aa3aaba2023738dcacb5e15..b7df98402bb363172b5d47c67cba3c39f2ad8cc6 100644
--- a/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateLanguageContentTaxonomyVocabularySettingsTest.php
+++ b/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateLanguageContentTaxonomyVocabularySettingsTest.php
@@ -16,7 +16,7 @@ class MigrateLanguageContentTaxonomyVocabularySettingsTest extends MigrateDrupal
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'language',
     'content_translation',
     'taxonomy',
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 96bc4a0d8cff0f0e90336307a7d208570516d222..1ad87bda7bbe922f63f46898928833ea04308e93 100644
--- a/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateLanguageNegotiationSettingsTest.php
+++ b/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateLanguageNegotiationSettingsTest.php
@@ -15,7 +15,7 @@ class MigrateLanguageNegotiationSettingsTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['language'];
+  protected static $modules = ['language'];
 
   /**
    * Tests the migration with LANGUAGE_NEGOTIATION_PATH_DEFAULT.
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 72d7ab8df388c8b16acb19d7adb3eec85c82c63f..cf753c4db98cc7aebb45be6cd50a55bd5bf828eb 100644
--- a/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateLanguageTest.php
+++ b/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateLanguageTest.php
@@ -14,7 +14,7 @@ class MigrateLanguageTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['language'];
+  protected static $modules = ['language'];
 
   /**
    * Asserts various properties of a configurable language entity.
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 9a1998b7c06b84166d2890fc9b0e9ac0d45b16df..7c5c1a973358b066dcc8f296f6479f13e349d887 100644
--- a/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateDefaultLanguageTest.php
+++ b/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateDefaultLanguageTest.php
@@ -16,7 +16,7 @@ class MigrateDefaultLanguageTest extends MigrateDrupal7TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['language'];
+  protected static $modules = ['language'];
 
   /**
    * Tests language_default migration with a non-existing language.
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 64af3c661647843cc98434c474091986f1bb55d1..44907518c40572b4ee944bc600257cb6f27649e6 100644
--- a/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateLanguageContentCommentSettingsNoEntityTranslationTest.php
+++ b/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateLanguageContentCommentSettingsNoEntityTranslationTest.php
@@ -18,7 +18,7 @@ class MigrateLanguageContentCommentSettingsNoEntityTranslationTest extends Migra
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'comment',
     'content_translation',
     'language',
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 416e2ce0c8366ecb73b84d77216fd70c37ef7782..216283b9162119d1fa5cdf7e120b0e44e6596505 100644
--- a/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateLanguageContentCommentSettingsTest.php
+++ b/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateLanguageContentCommentSettingsTest.php
@@ -15,7 +15,7 @@ class MigrateLanguageContentCommentSettingsTest extends MigrateDrupal7TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'comment',
     'content_translation',
     'language',
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 74cd7b6af57d0a27bde33b115ba68e1010b2e2c0..ae510b3197a3e87693858003e1f220db49a7c14b 100644
--- a/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateLanguageContentMenuSettingsTest.php
+++ b/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateLanguageContentMenuSettingsTest.php
@@ -16,7 +16,7 @@ class MigrateLanguageContentMenuSettingsTest extends MigrateDrupal7TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'content_translation',
     'language',
     'menu_link_content',
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 63845ac5fe564be758d864dd40832e28d80cb180..7264f27c98b569c02b56a3a7acc7451e52b2d917 100644
--- a/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateLanguageContentSettingsTest.php
+++ b/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateLanguageContentSettingsTest.php
@@ -16,7 +16,7 @@ class MigrateLanguageContentSettingsTest extends MigrateDrupal7TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'text', 'language', 'content_translation', 'menu_ui'];
+  protected static $modules = ['node', 'text', 'language', 'content_translation', 'menu_ui'];
 
   /**
    * {@inheritdoc}
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 1574eed4b67408d60b8e1e322eadce788604db78..591cb5d9f0e0d3eb77e95bdeb750aabde00ee28c 100644
--- a/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateLanguageContentTaxonomyVocabularySettingsTest.php
+++ b/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateLanguageContentTaxonomyVocabularySettingsTest.php
@@ -16,7 +16,7 @@ class MigrateLanguageContentTaxonomyVocabularySettingsTest extends MigrateDrupal
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'language',
     'content_translation',
     'taxonomy',
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 5ce0fc529435b016d72ff8b595ee55635e5d828a..446358d0d65dc278a242da2bcceb376fa8d321b1 100644
--- a/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateLanguageNegotiationSettingsTest.php
+++ b/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateLanguageNegotiationSettingsTest.php
@@ -15,7 +15,7 @@ class MigrateLanguageNegotiationSettingsTest extends MigrateDrupal7TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['language'];
+  protected static $modules = ['language'];
 
   /**
    * Tests migration of language types variables to language.types.yml.
diff --git a/core/modules/language/tests/src/Kernel/Plugin/migrate/source/LanguageTest.php b/core/modules/language/tests/src/Kernel/Plugin/migrate/source/LanguageTest.php
index 6aa318eb416bc82fd90f82cad19f9e31e057388e..d04b57af5b95d9b5202c244b7404de44ca6545e6 100644
--- a/core/modules/language/tests/src/Kernel/Plugin/migrate/source/LanguageTest.php
+++ b/core/modules/language/tests/src/Kernel/Plugin/migrate/source/LanguageTest.php
@@ -15,7 +15,7 @@ class LanguageTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['language', 'migrate_drupal'];
+  protected static $modules = ['language', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/language/tests/src/Kernel/Plugin/migrate/source/d6/LanguageContentSettingsTest.php b/core/modules/language/tests/src/Kernel/Plugin/migrate/source/d6/LanguageContentSettingsTest.php
index a4c7534e5ffeba8fcfa1efd82ccc09d61e613965..f4fa2dacce0066b9f4d0935a198f1544334a9df2 100644
--- a/core/modules/language/tests/src/Kernel/Plugin/migrate/source/d6/LanguageContentSettingsTest.php
+++ b/core/modules/language/tests/src/Kernel/Plugin/migrate/source/d6/LanguageContentSettingsTest.php
@@ -16,7 +16,7 @@ class LanguageContentSettingsTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['language', 'migrate_drupal'];
+  protected static $modules = ['language', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/language/tests/src/Kernel/Plugin/migrate/source/d6/LanguageContentTaxonomyVocabularySettingsTest.php b/core/modules/language/tests/src/Kernel/Plugin/migrate/source/d6/LanguageContentTaxonomyVocabularySettingsTest.php
index c709859f764e42438153ebcc974ba40a2b40e4a7..42d54a21677c9fe652c5c83787392359ab36354e 100644
--- a/core/modules/language/tests/src/Kernel/Plugin/migrate/source/d6/LanguageContentTaxonomyVocabularySettingsTest.php
+++ b/core/modules/language/tests/src/Kernel/Plugin/migrate/source/d6/LanguageContentTaxonomyVocabularySettingsTest.php
@@ -16,7 +16,7 @@ class LanguageContentTaxonomyVocabularySettingsTest extends MigrateSqlSourceTest
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['taxonomy', 'language', 'migrate_drupal'];
+  protected static $modules = ['taxonomy', 'language', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/language/tests/src/Kernel/Plugin/migrate/source/d7/LanguageContentMenuSettingsTest.php b/core/modules/language/tests/src/Kernel/Plugin/migrate/source/d7/LanguageContentMenuSettingsTest.php
index 479b6a5066e7ee7630a98ff7fc54695bc9cb5035..806239e8a21e5a50d6bc55360a241de718e91b92 100644
--- a/core/modules/language/tests/src/Kernel/Plugin/migrate/source/d7/LanguageContentMenuSettingsTest.php
+++ b/core/modules/language/tests/src/Kernel/Plugin/migrate/source/d7/LanguageContentMenuSettingsTest.php
@@ -16,7 +16,7 @@ class LanguageContentMenuSettingsTest extends MenuTest {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['menu_link_content', 'language', 'migrate_drupal'];
+  protected static $modules = ['menu_link_content', 'language', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/language/tests/src/Kernel/Plugin/migrate/source/d7/LanguageContentSettingsTest.php b/core/modules/language/tests/src/Kernel/Plugin/migrate/source/d7/LanguageContentSettingsTest.php
index 39d645081770d05d3bd2f4580c5cb5e669e42eaf..3fc1df57c334768fdf9a5ea11f3cfd7ce7077931 100644
--- a/core/modules/language/tests/src/Kernel/Plugin/migrate/source/d7/LanguageContentSettingsTest.php
+++ b/core/modules/language/tests/src/Kernel/Plugin/migrate/source/d7/LanguageContentSettingsTest.php
@@ -16,7 +16,7 @@ class LanguageContentSettingsTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['language', 'migrate_drupal'];
+  protected static $modules = ['language', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/language/tests/src/Kernel/Plugin/migrate/source/d7/LanguageContentTaxonomyVocabularySettingsTest.php b/core/modules/language/tests/src/Kernel/Plugin/migrate/source/d7/LanguageContentTaxonomyVocabularySettingsTest.php
index 39762b59e01c1e899a14fd2e3a668e6ba6f51eb8..c681cd1082a563ae0978d98be153fc168f4f4f65 100644
--- a/core/modules/language/tests/src/Kernel/Plugin/migrate/source/d7/LanguageContentTaxonomyVocabularySettingsTest.php
+++ b/core/modules/language/tests/src/Kernel/Plugin/migrate/source/d7/LanguageContentTaxonomyVocabularySettingsTest.php
@@ -16,7 +16,7 @@ class LanguageContentTaxonomyVocabularySettingsTest extends VocabularyTest {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['taxonomy', 'language', 'migrate_drupal'];
+  protected static $modules = ['taxonomy', 'language', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/language/tests/src/Kernel/Views/LanguageTestBase.php b/core/modules/language/tests/src/Kernel/Views/LanguageTestBase.php
index cab6fc84e0bd68557c05d40517d35062cde56f96..fc4cabf1ba82bba02ca7d2b7f5600828dcea2287 100644
--- a/core/modules/language/tests/src/Kernel/Views/LanguageTestBase.php
+++ b/core/modules/language/tests/src/Kernel/Views/LanguageTestBase.php
@@ -15,7 +15,7 @@ abstract class LanguageTestBase extends ViewsKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['system', 'language'];
+  protected static $modules = ['system', 'language'];
 
   protected function setUp($import_test_views = TRUE) {
     parent::setUp();
diff --git a/core/modules/layout_builder/tests/src/Functional/Hal/LayoutBuilderEntityViewDisplayHalJsonAnonTest.php b/core/modules/layout_builder/tests/src/Functional/Hal/LayoutBuilderEntityViewDisplayHalJsonAnonTest.php
index 73da4c9b11f010e742b0bd24126a4de708a68d29..95c66ddb09d8ba75a682c6a33115e64929507d9f 100644
--- a/core/modules/layout_builder/tests/src/Functional/Hal/LayoutBuilderEntityViewDisplayHalJsonAnonTest.php
+++ b/core/modules/layout_builder/tests/src/Functional/Hal/LayoutBuilderEntityViewDisplayHalJsonAnonTest.php
@@ -16,7 +16,7 @@ class LayoutBuilderEntityViewDisplayHalJsonAnonTest extends LayoutBuilderEntityV
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/layout_builder/tests/src/Functional/Hal/LayoutBuilderEntityViewDisplayHalJsonBasicAuthTest.php b/core/modules/layout_builder/tests/src/Functional/Hal/LayoutBuilderEntityViewDisplayHalJsonBasicAuthTest.php
index e008e042bd106b537c1de675e9cf367aedaef00b..6721bfaa02549a9b7b93ed33c48172b987e20cc9 100644
--- a/core/modules/layout_builder/tests/src/Functional/Hal/LayoutBuilderEntityViewDisplayHalJsonBasicAuthTest.php
+++ b/core/modules/layout_builder/tests/src/Functional/Hal/LayoutBuilderEntityViewDisplayHalJsonBasicAuthTest.php
@@ -16,7 +16,7 @@ class LayoutBuilderEntityViewDisplayHalJsonBasicAuthTest extends EntityViewDispl
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/layout_builder/tests/src/Functional/Jsonapi/LayoutBuilderEntityViewDisplayTest.php b/core/modules/layout_builder/tests/src/Functional/Jsonapi/LayoutBuilderEntityViewDisplayTest.php
index 628a014483fb9ccce7a4df22882ae9f768de93b3..e5f91a4aca8fed02c76fc876cee8e7303a09f8d5 100644
--- a/core/modules/layout_builder/tests/src/Functional/Jsonapi/LayoutBuilderEntityViewDisplayTest.php
+++ b/core/modules/layout_builder/tests/src/Functional/Jsonapi/LayoutBuilderEntityViewDisplayTest.php
@@ -16,7 +16,7 @@ class LayoutBuilderEntityViewDisplayTest extends EntityViewDisplayTest {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['layout_builder'];
+  protected static $modules = ['layout_builder'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/layout_builder/tests/src/Functional/LayoutBuilderTest.php b/core/modules/layout_builder/tests/src/Functional/LayoutBuilderTest.php
index bd157521348f267759a9e12ae999f5de37ce1ce0..5fee081fb955450d3fd02ccf6c424720395e0a88 100644
--- a/core/modules/layout_builder/tests/src/Functional/LayoutBuilderTest.php
+++ b/core/modules/layout_builder/tests/src/Functional/LayoutBuilderTest.php
@@ -18,7 +18,7 @@ class LayoutBuilderTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'views',
     'layout_builder',
     'layout_builder_views_test',
diff --git a/core/modules/layout_builder/tests/src/Functional/LayoutBuilderThemeSuggestionsTest.php b/core/modules/layout_builder/tests/src/Functional/LayoutBuilderThemeSuggestionsTest.php
index baf9b8175694776354c27ae27465f0ccbbe6deaa..dff76a9b91788c253072f5d5752e5551504dcb0c 100644
--- a/core/modules/layout_builder/tests/src/Functional/LayoutBuilderThemeSuggestionsTest.php
+++ b/core/modules/layout_builder/tests/src/Functional/LayoutBuilderThemeSuggestionsTest.php
@@ -14,7 +14,7 @@ class LayoutBuilderThemeSuggestionsTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'layout_builder',
     'node',
     'layout_builder_theme_suggestions_test',
diff --git a/core/modules/layout_builder/tests/src/Functional/LayoutBuilderTranslationTest.php b/core/modules/layout_builder/tests/src/Functional/LayoutBuilderTranslationTest.php
index 34b7b53db2b2397847982a1d171deae9f40e311d..16c15993e6e5a7341faa47fad843039c29c51471 100644
--- a/core/modules/layout_builder/tests/src/Functional/LayoutBuilderTranslationTest.php
+++ b/core/modules/layout_builder/tests/src/Functional/LayoutBuilderTranslationTest.php
@@ -16,7 +16,7 @@ class LayoutBuilderTranslationTest extends ContentTranslationTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'content_translation',
     'contextual',
     'entity_test',
diff --git a/core/modules/layout_builder/tests/src/Functional/LayoutSectionTest.php b/core/modules/layout_builder/tests/src/Functional/LayoutSectionTest.php
index 0773a021c4bce49fccb3b09ee0afe16425fd923a..df63b5342dff402ba2e7f32ceba2b4608f2faeb2 100644
--- a/core/modules/layout_builder/tests/src/Functional/LayoutSectionTest.php
+++ b/core/modules/layout_builder/tests/src/Functional/LayoutSectionTest.php
@@ -18,7 +18,7 @@ class LayoutSectionTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['field_ui', 'layout_builder', 'node', 'block_test'];
+  protected static $modules = ['field_ui', 'layout_builder', 'node', 'block_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/layout_builder/tests/src/Functional/Rest/LayoutBuilderEntityViewDisplayJsonBasicAuthTest.php b/core/modules/layout_builder/tests/src/Functional/Rest/LayoutBuilderEntityViewDisplayJsonBasicAuthTest.php
index 74fba46e5b210cccd63cf0acdeccd887e3a176b7..099e31ace021d41f4efa0425c3ad6f4f084fcf51 100644
--- a/core/modules/layout_builder/tests/src/Functional/Rest/LayoutBuilderEntityViewDisplayJsonBasicAuthTest.php
+++ b/core/modules/layout_builder/tests/src/Functional/Rest/LayoutBuilderEntityViewDisplayJsonBasicAuthTest.php
@@ -15,7 +15,7 @@ class LayoutBuilderEntityViewDisplayJsonBasicAuthTest extends LayoutBuilderEntit
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/layout_builder/tests/src/Functional/Rest/LayoutBuilderEntityViewDisplayResourceTestBase.php b/core/modules/layout_builder/tests/src/Functional/Rest/LayoutBuilderEntityViewDisplayResourceTestBase.php
index 7da257f4a7083e7b8c9ed0fcc4504781ab33249f..7d28bda9638874d7157a6da53e3c3989d99401c4 100644
--- a/core/modules/layout_builder/tests/src/Functional/Rest/LayoutBuilderEntityViewDisplayResourceTestBase.php
+++ b/core/modules/layout_builder/tests/src/Functional/Rest/LayoutBuilderEntityViewDisplayResourceTestBase.php
@@ -13,7 +13,7 @@ abstract class LayoutBuilderEntityViewDisplayResourceTestBase extends EntityView
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['layout_builder'];
+  protected static $modules = ['layout_builder'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/layout_builder/tests/src/Functional/Rest/LayoutBuilderEntityViewDisplayXmlBasicAuthTest.php b/core/modules/layout_builder/tests/src/Functional/Rest/LayoutBuilderEntityViewDisplayXmlBasicAuthTest.php
index 6b9b9e35d798fa5b35ef7ce208d34772392e4278..751e8ad3c5b74980cd6e604d82b017b56009fee5 100644
--- a/core/modules/layout_builder/tests/src/Functional/Rest/LayoutBuilderEntityViewDisplayXmlBasicAuthTest.php
+++ b/core/modules/layout_builder/tests/src/Functional/Rest/LayoutBuilderEntityViewDisplayXmlBasicAuthTest.php
@@ -17,7 +17,7 @@ class LayoutBuilderEntityViewDisplayXmlBasicAuthTest extends LayoutBuilderEntity
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/layout_builder/tests/src/Functional/Rest/LayoutRestTestBase.php b/core/modules/layout_builder/tests/src/Functional/Rest/LayoutRestTestBase.php
index 752289162ef1f9b567bae80646a8442a80945fcb..377084483683673c66459c2b98c00191976f1a37 100644
--- a/core/modules/layout_builder/tests/src/Functional/Rest/LayoutRestTestBase.php
+++ b/core/modules/layout_builder/tests/src/Functional/Rest/LayoutRestTestBase.php
@@ -19,7 +19,7 @@ abstract class LayoutRestTestBase extends ResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'node',
     'layout_builder',
     'serialization',
diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/AjaxBlockTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/AjaxBlockTest.php
index a84e827f0af0399f1a5b2968999793f3bd3e8b76..65d6e640074597d9a5566e2038cc25d71fe659a2 100644
--- a/core/modules/layout_builder/tests/src/FunctionalJavascript/AjaxBlockTest.php
+++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/AjaxBlockTest.php
@@ -14,7 +14,7 @@ class AjaxBlockTest extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'block',
     'node',
     'datetime',
diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/BlockFormMessagesTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/BlockFormMessagesTest.php
index c6a3d399f92d902d42476a892af5e0fd931c24f7..6f7069dedcf7e8e84ad0bb10c25c05173f181a2f 100644
--- a/core/modules/layout_builder/tests/src/FunctionalJavascript/BlockFormMessagesTest.php
+++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/BlockFormMessagesTest.php
@@ -19,7 +19,7 @@ class BlockFormMessagesTest extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'layout_builder',
     'block',
     'node',
diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockPrivateFilesTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockPrivateFilesTest.php
index 5e1a1ae8a623b96af15f7f9ee723a7108f4911ac..412f4ef77b0a127772bff2974e579632371986a7 100644
--- a/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockPrivateFilesTest.php
+++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockPrivateFilesTest.php
@@ -22,7 +22,7 @@ class InlineBlockPrivateFilesTest extends InlineBlockTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'file',
   ];
 
diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTestBase.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTestBase.php
index eba01b50f9aa5f2e82af69c34507727b264fb087..24e7f3ece564ef5afb8372398635a2a8ef5d8e58 100644
--- a/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTestBase.php
+++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTestBase.php
@@ -26,7 +26,7 @@ abstract class InlineBlockTestBase extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'block_content',
     'layout_builder',
     'block',
diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderNestedFormUiTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderNestedFormUiTest.php
index 06b59480b595048a5b49c7b1f21f71e913c929f2..cd87d98ab95745e2d287e99201317d7cd72cdeca 100644
--- a/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderNestedFormUiTest.php
+++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderNestedFormUiTest.php
@@ -23,7 +23,7 @@ class LayoutBuilderNestedFormUiTest extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'block',
     'node',
     'layout_builder',
diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderQuickEditTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderQuickEditTest.php
index 8bcb9f94a150f01093023a3eb2c4963dc2ad12ad..3288f9ba87f0cc4dae13edf1a92f4f484d335ed7 100644
--- a/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderQuickEditTest.php
+++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderQuickEditTest.php
@@ -23,7 +23,7 @@ class LayoutBuilderQuickEditTest extends QuickEditJavascriptTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'node',
     'layout_builder',
   ];
diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderToolbarTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderToolbarTest.php
index 99a7da6d23ffefc62e1a9bff10c8a91ea8c5244d..5291b2a78a63e413f9f3d62968eb738e2be50325 100644
--- a/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderToolbarTest.php
+++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderToolbarTest.php
@@ -14,7 +14,7 @@ class LayoutBuilderToolbarTest extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'block',
     'node',
     'layout_builder',
diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderUiTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderUiTest.php
index e0276b319f6cf5166616bbb36a6ace6fc5ca022c..cdec98269411e274e3cac1fbaca06afbe695133f 100644
--- a/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderUiTest.php
+++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderUiTest.php
@@ -22,7 +22,7 @@ class LayoutBuilderUiTest extends WebDriverTestBase {
    */
   const FIELD_UI_PREFIX = 'admin/structure/types/manage/bundle_with_section_field';
 
-  public static $modules = [
+  protected static $modules = [
     'layout_builder',
     'block',
     'node',
diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/TestMultiWidthLayoutsTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/TestMultiWidthLayoutsTest.php
index 26f777e21d17410edda81243d539e2492bdec9a4..5fcd38c5f32c5513715729a2b42fe12eb6434499 100644
--- a/core/modules/layout_builder/tests/src/FunctionalJavascript/TestMultiWidthLayoutsTest.php
+++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/TestMultiWidthLayoutsTest.php
@@ -18,7 +18,7 @@ class TestMultiWidthLayoutsTest extends WebDriverTestBase {
    */
   const FIELD_UI_PREFIX = 'admin/structure/types/manage/bundle_with_section_field';
 
-  public static $modules = [
+  protected static $modules = [
     'layout_builder',
     'block',
     'node',
diff --git a/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderCompatibilityTestBase.php b/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderCompatibilityTestBase.php
index fa1047c377aa61b6f99a60e2f9e86702c4e93a55..0a6a7e48439f29037cfbb335391320ad033e9bf8 100644
--- a/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderCompatibilityTestBase.php
+++ b/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderCompatibilityTestBase.php
@@ -16,7 +16,7 @@ abstract class LayoutBuilderCompatibilityTestBase extends EntityKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'layout_discovery',
   ];
 
diff --git a/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderFieldLayoutCompatibilityTest.php b/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderFieldLayoutCompatibilityTest.php
index 2a75aff51e9bf74f5f09823342afc75ea36e5985..00c56df97b10d3098d20849840a58d27dca1baa0 100644
--- a/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderFieldLayoutCompatibilityTest.php
+++ b/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderFieldLayoutCompatibilityTest.php
@@ -15,7 +15,7 @@ class LayoutBuilderFieldLayoutCompatibilityTest extends LayoutBuilderCompatibili
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'field_layout',
   ];
 
diff --git a/core/modules/layout_builder/tests/src/Kernel/LayoutSectionItemListTest.php b/core/modules/layout_builder/tests/src/Kernel/LayoutSectionItemListTest.php
index 07eba450e2d56b82c306a610354452a4f8b41c34..9a5ce86a52b2fc7fccc52f164d4538f1c69e203e 100644
--- a/core/modules/layout_builder/tests/src/Kernel/LayoutSectionItemListTest.php
+++ b/core/modules/layout_builder/tests/src/Kernel/LayoutSectionItemListTest.php
@@ -19,7 +19,7 @@ class LayoutSectionItemListTest extends SectionStorageTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'field',
     'text',
   ];
diff --git a/core/modules/layout_builder/tests/src/Kernel/SectionStorageTestBase.php b/core/modules/layout_builder/tests/src/Kernel/SectionStorageTestBase.php
index 65a06183cdc9153966b2d50d4c0690bd9730722f..567645ef768c653bf0fa522384a0e7449fe531e1 100644
--- a/core/modules/layout_builder/tests/src/Kernel/SectionStorageTestBase.php
+++ b/core/modules/layout_builder/tests/src/Kernel/SectionStorageTestBase.php
@@ -14,7 +14,7 @@ abstract class SectionStorageTestBase extends EntityKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'layout_builder',
     'layout_discovery',
     'layout_test',
diff --git a/core/modules/layout_builder/tests/src/Kernel/SimpleConfigSectionStorageTest.php b/core/modules/layout_builder/tests/src/Kernel/SimpleConfigSectionStorageTest.php
index 282bb2022c76b6d899272f6a4823d80c38d283e4..a3f2b8bd8d4e7f3421bd8060273aa33bcbbd0733 100644
--- a/core/modules/layout_builder/tests/src/Kernel/SimpleConfigSectionStorageTest.php
+++ b/core/modules/layout_builder/tests/src/Kernel/SimpleConfigSectionStorageTest.php
@@ -20,7 +20,7 @@ class SimpleConfigSectionStorageTest extends SectionStorageTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'layout_builder_test',
   ];
 
diff --git a/core/modules/layout_discovery/tests/src/Kernel/LayoutTest.php b/core/modules/layout_discovery/tests/src/Kernel/LayoutTest.php
index 8bd430f004b8e00d4849937f6539997a3b1200ba..19d3431fc433692147a2aa801d361fb2ec772963 100644
--- a/core/modules/layout_discovery/tests/src/Kernel/LayoutTest.php
+++ b/core/modules/layout_discovery/tests/src/Kernel/LayoutTest.php
@@ -15,7 +15,7 @@ class LayoutTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system', 'layout_discovery', 'layout_test'];
+  protected static $modules = ['system', 'layout_discovery', 'layout_test'];
 
   /**
    * The layout plugin manager.
diff --git a/core/modules/link/tests/src/Functional/LinkFieldTest.php b/core/modules/link/tests/src/Functional/LinkFieldTest.php
index 79ad5b2c4918effbdc893a6668b033d084dd6ee4..b78fe175bcc0524e3fd586619319bd81bf2674d1 100644
--- a/core/modules/link/tests/src/Functional/LinkFieldTest.php
+++ b/core/modules/link/tests/src/Functional/LinkFieldTest.php
@@ -29,7 +29,7 @@ class LinkFieldTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'entity_test',
     'link',
     'node',
diff --git a/core/modules/link/tests/src/Functional/LinkFieldUITest.php b/core/modules/link/tests/src/Functional/LinkFieldUITest.php
index 9fbd41ea9c8c9b5fc82c5c49ca6c9c4d0c9023b0..a2b7a7898f404bd4e349c89969f9164f6db75803 100644
--- a/core/modules/link/tests/src/Functional/LinkFieldUITest.php
+++ b/core/modules/link/tests/src/Functional/LinkFieldUITest.php
@@ -25,7 +25,7 @@ class LinkFieldUITest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'link', 'field_ui', 'block'];
+  protected static $modules = ['node', 'link', 'field_ui', 'block'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/link/tests/src/Functional/Views/LinkViewsTokensTest.php b/core/modules/link/tests/src/Functional/Views/LinkViewsTokensTest.php
index ffabe15a1af784cd05e3134a620c54f96fa2aa77..6a4227f78c0cd3dca982179f2bbd3cad4ed9eaa4 100644
--- a/core/modules/link/tests/src/Functional/Views/LinkViewsTokensTest.php
+++ b/core/modules/link/tests/src/Functional/Views/LinkViewsTokensTest.php
@@ -19,7 +19,7 @@ class LinkViewsTokensTest extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = ['link_test_views'];
+  protected static $modules = ['link_test_views'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/link/tests/src/Kernel/LinkItemSerializationTest.php b/core/modules/link/tests/src/Kernel/LinkItemSerializationTest.php
index d7c1e5f90a73de91be4ffbfc9508e659b849bb11..f0e71a659e628743ffae26f92acf6218fe7f2c40 100644
--- a/core/modules/link/tests/src/Kernel/LinkItemSerializationTest.php
+++ b/core/modules/link/tests/src/Kernel/LinkItemSerializationTest.php
@@ -19,7 +19,7 @@ class LinkItemSerializationTest extends FieldKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['link', 'serialization'];
+  protected static $modules = ['link', 'serialization'];
 
   /**
    * The serializer service.
diff --git a/core/modules/link/tests/src/Kernel/LinkItemTest.php b/core/modules/link/tests/src/Kernel/LinkItemTest.php
index 133acea5f6f9114e53f78c9c155333501e8d13df..8db4471d93011daabbeb77d34b2125666ada3444 100644
--- a/core/modules/link/tests/src/Kernel/LinkItemTest.php
+++ b/core/modules/link/tests/src/Kernel/LinkItemTest.php
@@ -24,7 +24,7 @@ class LinkItemTest extends FieldKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['link'];
+  protected static $modules = ['link'];
 
   protected function setUp(): void {
     parent::setUp();
diff --git a/core/modules/locale/tests/src/Functional/LocaleConfigTranslationImportTest.php b/core/modules/locale/tests/src/Functional/LocaleConfigTranslationImportTest.php
index 5ccd2518e32cb10af1ee43bdfb6a72584edfce7e..3197ff9ad65ae8c388c67437070dcaaeac1add28 100644
--- a/core/modules/locale/tests/src/Functional/LocaleConfigTranslationImportTest.php
+++ b/core/modules/locale/tests/src/Functional/LocaleConfigTranslationImportTest.php
@@ -18,7 +18,7 @@ class LocaleConfigTranslationImportTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['language', 'locale_test_translate'];
+  protected static $modules = ['language', 'locale_test_translate'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/locale/tests/src/Functional/LocaleConfigTranslationTest.php b/core/modules/locale/tests/src/Functional/LocaleConfigTranslationTest.php
index 063b558c7b93d10127d7a89790d9419a0d72d413..50432c5345513b1e04bc7e8f2536aecceef0c3f5 100644
--- a/core/modules/locale/tests/src/Functional/LocaleConfigTranslationTest.php
+++ b/core/modules/locale/tests/src/Functional/LocaleConfigTranslationTest.php
@@ -24,7 +24,7 @@ class LocaleConfigTranslationTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['locale', 'contact', 'contact_test'];
+  protected static $modules = ['locale', 'contact', 'contact_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/locale/tests/src/Functional/LocaleContentTest.php b/core/modules/locale/tests/src/Functional/LocaleContentTest.php
index 9ac40754f80763f03946456166dc19761ba95997..09459f9e8e1d23a88d55a344581033d8aea49c9c 100644
--- a/core/modules/locale/tests/src/Functional/LocaleContentTest.php
+++ b/core/modules/locale/tests/src/Functional/LocaleContentTest.php
@@ -19,7 +19,7 @@ class LocaleContentTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'locale'];
+  protected static $modules = ['node', 'locale'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/locale/tests/src/Functional/LocaleExportTest.php b/core/modules/locale/tests/src/Functional/LocaleExportTest.php
index 86b07f4951caf726694e2fb4088bf3d2c59e5bde..093e2e992d55507b3bb907d3dcc3a185357539d4 100644
--- a/core/modules/locale/tests/src/Functional/LocaleExportTest.php
+++ b/core/modules/locale/tests/src/Functional/LocaleExportTest.php
@@ -17,7 +17,7 @@ class LocaleExportTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['locale'];
+  protected static $modules = ['locale'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/locale/tests/src/Functional/LocaleFileSystemFormTest.php b/core/modules/locale/tests/src/Functional/LocaleFileSystemFormTest.php
index f648b1fa7500161885106f00b0be7dac0c890df2..4b6daa67a359d4b90bf8d56f06409cf236967b9e 100644
--- a/core/modules/locale/tests/src/Functional/LocaleFileSystemFormTest.php
+++ b/core/modules/locale/tests/src/Functional/LocaleFileSystemFormTest.php
@@ -16,7 +16,7 @@ class LocaleFileSystemFormTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['system'];
+  protected static $modules = ['system'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/locale/tests/src/Functional/LocaleImportFunctionalTest.php b/core/modules/locale/tests/src/Functional/LocaleImportFunctionalTest.php
index 9688fc14beb15ba55d677b1110c87e1eb78038a9..5ed2632e3e3f8c3d269ad287dc44faaec55d6fda 100644
--- a/core/modules/locale/tests/src/Functional/LocaleImportFunctionalTest.php
+++ b/core/modules/locale/tests/src/Functional/LocaleImportFunctionalTest.php
@@ -21,7 +21,7 @@ class LocaleImportFunctionalTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['locale', 'dblog'];
+  protected static $modules = ['locale', 'dblog'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/locale/tests/src/Functional/LocaleJavascriptTranslationTest.php b/core/modules/locale/tests/src/Functional/LocaleJavascriptTranslationTest.php
index 087052974c83607500befcc06793f0781a8f4b01..6b41adb08bd04e9bcb66dbd38b4bb79486b998e8 100644
--- a/core/modules/locale/tests/src/Functional/LocaleJavascriptTranslationTest.php
+++ b/core/modules/locale/tests/src/Functional/LocaleJavascriptTranslationTest.php
@@ -19,7 +19,7 @@ class LocaleJavascriptTranslationTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['locale', 'locale_test'];
+  protected static $modules = ['locale', 'locale_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/locale/tests/src/Functional/LocaleLocaleLookupTest.php b/core/modules/locale/tests/src/Functional/LocaleLocaleLookupTest.php
index c4af5ead588f451666ff1be127255494eb2fd637..c7b49e8c5b0c652c756183adc08fbb460705ac81 100644
--- a/core/modules/locale/tests/src/Functional/LocaleLocaleLookupTest.php
+++ b/core/modules/locale/tests/src/Functional/LocaleLocaleLookupTest.php
@@ -18,7 +18,7 @@ class LocaleLocaleLookupTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['locale', 'locale_test'];
+  protected static $modules = ['locale', 'locale_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/locale/tests/src/Functional/LocalePathTest.php b/core/modules/locale/tests/src/Functional/LocalePathTest.php
index 33f0447a6ec9e72a1d31300cac2d7cc123debefb..e1fbc15194bd7261e51172d122e4834ffcc2a7c8 100644
--- a/core/modules/locale/tests/src/Functional/LocalePathTest.php
+++ b/core/modules/locale/tests/src/Functional/LocalePathTest.php
@@ -22,7 +22,7 @@ class LocalePathTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'locale', 'path', 'views'];
+  protected static $modules = ['node', 'locale', 'path', 'views'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/locale/tests/src/Functional/LocalePluralFormatTest.php b/core/modules/locale/tests/src/Functional/LocalePluralFormatTest.php
index 7e6376638b17e0d4508ca0e12876f81a76a9ef2a..869496ef7c9f44563477c4624af9a1ca681e60b5 100644
--- a/core/modules/locale/tests/src/Functional/LocalePluralFormatTest.php
+++ b/core/modules/locale/tests/src/Functional/LocalePluralFormatTest.php
@@ -26,7 +26,7 @@ class LocalePluralFormatTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['locale'];
+  protected static $modules = ['locale'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/locale/tests/src/Functional/LocaleTranslateStringTourTest.php b/core/modules/locale/tests/src/Functional/LocaleTranslateStringTourTest.php
index 00ca2d4c5d4ad3b42ebc45e126799d046b7f3458..010dfd91b5d807ad38f506811c7d64b1e315a576 100644
--- a/core/modules/locale/tests/src/Functional/LocaleTranslateStringTourTest.php
+++ b/core/modules/locale/tests/src/Functional/LocaleTranslateStringTourTest.php
@@ -23,7 +23,7 @@ class LocaleTranslateStringTourTest extends TourTestBase {
    *
    * @var array
    */
-  public static $modules = ['locale', 'tour'];
+  protected static $modules = ['locale', 'tour'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/locale/tests/src/Functional/LocaleTranslatedSchemaDefinitionTest.php b/core/modules/locale/tests/src/Functional/LocaleTranslatedSchemaDefinitionTest.php
index 63a4a6d1ae8816fc51e0d4ea68b2003005902d92..d002423a0550ebd33219dab25cd28a67cd625aa5 100644
--- a/core/modules/locale/tests/src/Functional/LocaleTranslatedSchemaDefinitionTest.php
+++ b/core/modules/locale/tests/src/Functional/LocaleTranslatedSchemaDefinitionTest.php
@@ -20,7 +20,7 @@ class LocaleTranslatedSchemaDefinitionTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['language', 'locale', 'node'];
+  protected static $modules = ['language', 'locale', 'node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/locale/tests/src/Functional/LocaleTranslationUiTest.php b/core/modules/locale/tests/src/Functional/LocaleTranslationUiTest.php
index 4693a7885790830de60b6501539da25aec10582d..78a29d7e253b120341bcf302be8371c1cf702677 100644
--- a/core/modules/locale/tests/src/Functional/LocaleTranslationUiTest.php
+++ b/core/modules/locale/tests/src/Functional/LocaleTranslationUiTest.php
@@ -22,7 +22,7 @@ class LocaleTranslationUiTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['locale'];
+  protected static $modules = ['locale'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/locale/tests/src/Functional/LocaleUpdateBase.php b/core/modules/locale/tests/src/Functional/LocaleUpdateBase.php
index c344669cbbf7d2313a1b3e8f7a0d3f56194cfe3f..ccfe1baa46358eb1b9379f101cefed1df6a6b123 100644
--- a/core/modules/locale/tests/src/Functional/LocaleUpdateBase.php
+++ b/core/modules/locale/tests/src/Functional/LocaleUpdateBase.php
@@ -47,7 +47,7 @@ abstract class LocaleUpdateBase extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['locale', 'locale_test'];
+  protected static $modules = ['locale', 'locale_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/locale/tests/src/Functional/LocaleUpdateDevelopmentReleaseTest.php b/core/modules/locale/tests/src/Functional/LocaleUpdateDevelopmentReleaseTest.php
index ff7ce68317762176fd68993bb027d1c7b13396db..82973d8ca562737c7c0d2748b203a7ec381a1c55 100644
--- a/core/modules/locale/tests/src/Functional/LocaleUpdateDevelopmentReleaseTest.php
+++ b/core/modules/locale/tests/src/Functional/LocaleUpdateDevelopmentReleaseTest.php
@@ -11,7 +11,7 @@
  */
 class LocaleUpdateDevelopmentReleaseTest extends BrowserTestBase {
 
-  public static $modules = ['locale', 'locale_test_development_release'];
+  protected static $modules = ['locale', 'locale_test_development_release'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/locale/tests/src/Functional/LocaleUpdateInterfaceTest.php b/core/modules/locale/tests/src/Functional/LocaleUpdateInterfaceTest.php
index ca4a1142fd55befadd4248317803d804435d79c4..99114f56d56dcde0e2f5865c6c9dfb1ff4652e9c 100644
--- a/core/modules/locale/tests/src/Functional/LocaleUpdateInterfaceTest.php
+++ b/core/modules/locale/tests/src/Functional/LocaleUpdateInterfaceTest.php
@@ -17,7 +17,7 @@ class LocaleUpdateInterfaceTest extends LocaleUpdateBase {
    *
    * @var array
    */
-  public static $modules = ['locale_test_translate'];
+  protected static $modules = ['locale_test_translate'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/locale/tests/src/Kernel/LocaleConfigManagerTest.php b/core/modules/locale/tests/src/Kernel/LocaleConfigManagerTest.php
index 8389b6e9736a64069fa49f2d388a3da4ebe3ccfb..55e656e53c945ca13156f7b3ee86748e29455834 100644
--- a/core/modules/locale/tests/src/Kernel/LocaleConfigManagerTest.php
+++ b/core/modules/locale/tests/src/Kernel/LocaleConfigManagerTest.php
@@ -18,7 +18,7 @@ class LocaleConfigManagerTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['system', 'language', 'locale', 'locale_test', 'block'];
+  protected static $modules = ['system', 'language', 'locale', 'locale_test', 'block'];
 
   /**
    * This test creates simple config on the fly breaking schema checking.
diff --git a/core/modules/locale/tests/src/Kernel/LocaleConfigSubscriberTest.php b/core/modules/locale/tests/src/Kernel/LocaleConfigSubscriberTest.php
index 836753da9f649416dec8c1e0acdca526063da5fc..764a1b8d8ff94e323e1125d4da3560c2c114858f 100644
--- a/core/modules/locale/tests/src/Kernel/LocaleConfigSubscriberTest.php
+++ b/core/modules/locale/tests/src/Kernel/LocaleConfigSubscriberTest.php
@@ -18,7 +18,7 @@ class LocaleConfigSubscriberTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['language', 'locale', 'system', 'locale_test'];
+  protected static $modules = ['language', 'locale', 'system', 'locale_test'];
 
   /**
    * The configurable language manager used in this test.
diff --git a/core/modules/locale/tests/src/Kernel/LocaleConfigurableLanguageManagerTest.php b/core/modules/locale/tests/src/Kernel/LocaleConfigurableLanguageManagerTest.php
index 07909bacc4fa676865ea52ea1e7b47fd7f7854fc..0b257528543801729ab93ccffd475b752b4f238c 100644
--- a/core/modules/locale/tests/src/Kernel/LocaleConfigurableLanguageManagerTest.php
+++ b/core/modules/locale/tests/src/Kernel/LocaleConfigurableLanguageManagerTest.php
@@ -18,7 +18,7 @@ class LocaleConfigurableLanguageManagerTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['language', 'locale'];
+  protected static $modules = ['language', 'locale'];
 
   public function testGetLanguages() {
     $this->installSchema('locale', ['locales_source', 'locales_target', 'locales_location']);
diff --git a/core/modules/locale/tests/src/Kernel/LocaleStringIsSafeTest.php b/core/modules/locale/tests/src/Kernel/LocaleStringIsSafeTest.php
index 4129cdc8837139cc5d464caee191d9a944d3da1a..5cc4cde577dacef053d78da5e7fb2f5cb9b5aec7 100644
--- a/core/modules/locale/tests/src/Kernel/LocaleStringIsSafeTest.php
+++ b/core/modules/locale/tests/src/Kernel/LocaleStringIsSafeTest.php
@@ -16,7 +16,7 @@ class LocaleStringIsSafeTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['locale', 'locale_test'];
+  protected static $modules = ['locale', 'locale_test'];
 
   /**
    * Tests for locale_string_is_safe().
diff --git a/core/modules/locale/tests/src/Kernel/LocaleTranslationProjectsTest.php b/core/modules/locale/tests/src/Kernel/LocaleTranslationProjectsTest.php
index 5094df188d39b5b002dab0fe5a7267e64dc31531..5e8208c0ffd866760fead51bfca1a96d1f5a613e 100644
--- a/core/modules/locale/tests/src/Kernel/LocaleTranslationProjectsTest.php
+++ b/core/modules/locale/tests/src/Kernel/LocaleTranslationProjectsTest.php
@@ -14,7 +14,7 @@ class LocaleTranslationProjectsTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['locale', 'locale_test', 'system'];
+  protected static $modules = ['locale', 'locale_test', 'system'];
 
   /**
    * The module handler used in this test.
diff --git a/core/modules/locale/tests/src/Kernel/Migrate/MigrateLocaleConfigsTest.php b/core/modules/locale/tests/src/Kernel/Migrate/MigrateLocaleConfigsTest.php
index dfc1762aeecf334911fa0b3f92ad47e64a24efe7..2a4b4ec66e0f8925ac9ecea9b561d17525ec87e7 100644
--- a/core/modules/locale/tests/src/Kernel/Migrate/MigrateLocaleConfigsTest.php
+++ b/core/modules/locale/tests/src/Kernel/Migrate/MigrateLocaleConfigsTest.php
@@ -17,7 +17,7 @@ class MigrateLocaleConfigsTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['locale', 'language'];
+  protected static $modules = ['locale', 'language'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/media/tests/src/Functional/FieldFormatter/OEmbedFormatterTest.php b/core/modules/media/tests/src/Functional/FieldFormatter/OEmbedFormatterTest.php
index d25261736667efba223b1c5eb8ab96f6b6959626..4fdbd51cd3ebb8e95c43ae482eb04e210155ee16 100644
--- a/core/modules/media/tests/src/Functional/FieldFormatter/OEmbedFormatterTest.php
+++ b/core/modules/media/tests/src/Functional/FieldFormatter/OEmbedFormatterTest.php
@@ -21,7 +21,7 @@ class OEmbedFormatterTest extends MediaFunctionalTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'field_ui',
     'link',
     'media_test_oembed',
diff --git a/core/modules/media/tests/src/Functional/Hal/MediaHalJsonAnonTest.php b/core/modules/media/tests/src/Functional/Hal/MediaHalJsonAnonTest.php
index f8e4b3b4164c870167b18c15bb854af9ba83450c..ac4522eba5ca75b36a9eb82e20f41135353e0e55 100644
--- a/core/modules/media/tests/src/Functional/Hal/MediaHalJsonAnonTest.php
+++ b/core/modules/media/tests/src/Functional/Hal/MediaHalJsonAnonTest.php
@@ -19,7 +19,7 @@ class MediaHalJsonAnonTest extends MediaResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/media/tests/src/Functional/Hal/MediaHalJsonBasicAuthTest.php b/core/modules/media/tests/src/Functional/Hal/MediaHalJsonBasicAuthTest.php
index 92019bf75f5aed0061f14ec566c07e855a353ebd..d44534890a55a87c53cb5117073808aeabbf91a2 100644
--- a/core/modules/media/tests/src/Functional/Hal/MediaHalJsonBasicAuthTest.php
+++ b/core/modules/media/tests/src/Functional/Hal/MediaHalJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class MediaHalJsonBasicAuthTest extends MediaHalJsonAnonTest {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/media/tests/src/Functional/Hal/MediaTypeHalJsonAnonTest.php b/core/modules/media/tests/src/Functional/Hal/MediaTypeHalJsonAnonTest.php
index 4618e492c0af325c9e46e82cdf8a99df7e4340df..6d28e5d3a38ea746e59df37d12c8108963f2fdf9 100644
--- a/core/modules/media/tests/src/Functional/Hal/MediaTypeHalJsonAnonTest.php
+++ b/core/modules/media/tests/src/Functional/Hal/MediaTypeHalJsonAnonTest.php
@@ -15,7 +15,7 @@ class MediaTypeHalJsonAnonTest extends MediaTypeResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/media/tests/src/Functional/Hal/MediaTypeHalJsonBasicAuthTest.php b/core/modules/media/tests/src/Functional/Hal/MediaTypeHalJsonBasicAuthTest.php
index 3fc0aaba13378067c6465a2f833c57fc738834b4..80e12e66d19d95632e0e7f537618d2420bb624f7 100644
--- a/core/modules/media/tests/src/Functional/Hal/MediaTypeHalJsonBasicAuthTest.php
+++ b/core/modules/media/tests/src/Functional/Hal/MediaTypeHalJsonBasicAuthTest.php
@@ -15,7 +15,7 @@ class MediaTypeHalJsonBasicAuthTest extends MediaTypeResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal', 'basic_auth'];
+  protected static $modules = ['hal', 'basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/media/tests/src/Functional/Hal/MediaTypeHalJsonCookieTest.php b/core/modules/media/tests/src/Functional/Hal/MediaTypeHalJsonCookieTest.php
index 62de7a48b143840d224db320c5cfefa5aa560703..c50b78093d6884d29bbc2938c1bcbc62d70edfc4 100644
--- a/core/modules/media/tests/src/Functional/Hal/MediaTypeHalJsonCookieTest.php
+++ b/core/modules/media/tests/src/Functional/Hal/MediaTypeHalJsonCookieTest.php
@@ -15,7 +15,7 @@ class MediaTypeHalJsonCookieTest extends MediaTypeResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/media/tests/src/Functional/MediaAccessTest.php b/core/modules/media/tests/src/Functional/MediaAccessTest.php
index ec0e39a48d21e438932fcc7fbbf6c2c5a9c6e1dd..ae604fcfb5f724c6602fd9dcef9c74216c13b981 100644
--- a/core/modules/media/tests/src/Functional/MediaAccessTest.php
+++ b/core/modules/media/tests/src/Functional/MediaAccessTest.php
@@ -21,7 +21,7 @@ class MediaAccessTest extends MediaFunctionalTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'block',
     'media_test_source',
   ];
diff --git a/core/modules/media/tests/src/Functional/MediaBulkFormTest.php b/core/modules/media/tests/src/Functional/MediaBulkFormTest.php
index 0c584657565afcd012aeaa7ef4c81976782c61fa..d65f34e2b014cff54c6436f0779e319e1754ce5e 100644
--- a/core/modules/media/tests/src/Functional/MediaBulkFormTest.php
+++ b/core/modules/media/tests/src/Functional/MediaBulkFormTest.php
@@ -17,7 +17,7 @@ class MediaBulkFormTest extends MediaFunctionalTestBase {
    *
    * @var array
    */
-  public static $modules = ['media_test_views'];
+  protected static $modules = ['media_test_views'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/media/tests/src/Functional/MediaCacheTagsTest.php b/core/modules/media/tests/src/Functional/MediaCacheTagsTest.php
index 91ae304e64114c537bc73d470da6da010b6353d9..5cd6f9087283442ec50d4267bdb8bee7f5a644b3 100644
--- a/core/modules/media/tests/src/Functional/MediaCacheTagsTest.php
+++ b/core/modules/media/tests/src/Functional/MediaCacheTagsTest.php
@@ -19,7 +19,7 @@ class MediaCacheTagsTest extends EntityWithUriCacheTagsTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'media',
     'media_test_source',
   ];
diff --git a/core/modules/media/tests/src/Functional/MediaContextualLinksTest.php b/core/modules/media/tests/src/Functional/MediaContextualLinksTest.php
index 35c1224c7ed27fa738372d289f609f1ec7404522..f5cf9a81bca0b9b1c8862cba64f8255977ede206 100644
--- a/core/modules/media/tests/src/Functional/MediaContextualLinksTest.php
+++ b/core/modules/media/tests/src/Functional/MediaContextualLinksTest.php
@@ -14,7 +14,7 @@ class MediaContextualLinksTest extends MediaFunctionalTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'contextual',
   ];
 
diff --git a/core/modules/media/tests/src/Functional/MediaFunctionalTestBase.php b/core/modules/media/tests/src/Functional/MediaFunctionalTestBase.php
index b786d2e3a18be4e19d143deea0f5f714722d037b..2465695ff35baeaa873aa4b723dc59773cf5c6e2 100644
--- a/core/modules/media/tests/src/Functional/MediaFunctionalTestBase.php
+++ b/core/modules/media/tests/src/Functional/MediaFunctionalTestBase.php
@@ -18,7 +18,7 @@ abstract class MediaFunctionalTestBase extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'system',
     'node',
     'field_ui',
diff --git a/core/modules/media/tests/src/Functional/MediaInstallTest.php b/core/modules/media/tests/src/Functional/MediaInstallTest.php
index f44da769916d88e93d786e6646942389c87b1cea..4fef68fe7874a87d39e63189c1f434acfca33b9d 100644
--- a/core/modules/media/tests/src/Functional/MediaInstallTest.php
+++ b/core/modules/media/tests/src/Functional/MediaInstallTest.php
@@ -14,7 +14,7 @@ class MediaInstallTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['media'];
+  protected static $modules = ['media'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/media/tests/src/Functional/MediaTemplateSuggestionsTest.php b/core/modules/media/tests/src/Functional/MediaTemplateSuggestionsTest.php
index eef7ae34cd63fb20954c97ed14712aee2cdcecd3..099d1f4d3734d5dace28757dd7f989df8a1d66ca 100644
--- a/core/modules/media/tests/src/Functional/MediaTemplateSuggestionsTest.php
+++ b/core/modules/media/tests/src/Functional/MediaTemplateSuggestionsTest.php
@@ -16,7 +16,7 @@ class MediaTemplateSuggestionsTest extends MediaFunctionalTestBase {
    *
    * @var array
    */
-  public static $modules = ['media'];
+  protected static $modules = ['media'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/media/tests/src/Functional/MediaTranslationUITest.php b/core/modules/media/tests/src/Functional/MediaTranslationUITest.php
index f29d5d2da55fb34b2d23e74c6bb802301215520f..dca28d579f5f323504b60d64c785c33ce2ce1ac7 100644
--- a/core/modules/media/tests/src/Functional/MediaTranslationUITest.php
+++ b/core/modules/media/tests/src/Functional/MediaTranslationUITest.php
@@ -35,7 +35,7 @@ class MediaTranslationUITest extends ContentTranslationUITestBase {
   /**
    * {inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'language',
     'content_translation',
     'media',
diff --git a/core/modules/media/tests/src/Functional/MediaTypeCreationTest.php b/core/modules/media/tests/src/Functional/MediaTypeCreationTest.php
index 2ced87cf459f39b37f9738234d5d1a603aa83b5f..5fa83f4741153b8f03e3ede2440ce571cb173390 100644
--- a/core/modules/media/tests/src/Functional/MediaTypeCreationTest.php
+++ b/core/modules/media/tests/src/Functional/MediaTypeCreationTest.php
@@ -14,7 +14,7 @@ class MediaTypeCreationTest extends MediaFunctionalTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'media_test_source',
   ];
 
diff --git a/core/modules/media/tests/src/Functional/MediaUiFunctionalTest.php b/core/modules/media/tests/src/Functional/MediaUiFunctionalTest.php
index 5507847d515b9216602b6a4eba6fa617b763fac9..34c342a024d50e295a459a3f3dd1dd45487a8e21 100644
--- a/core/modules/media/tests/src/Functional/MediaUiFunctionalTest.php
+++ b/core/modules/media/tests/src/Functional/MediaUiFunctionalTest.php
@@ -20,7 +20,7 @@ class MediaUiFunctionalTest extends MediaFunctionalTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'block',
     'media_test_source',
   ];
diff --git a/core/modules/media/tests/src/Functional/Rest/MediaJsonBasicAuthTest.php b/core/modules/media/tests/src/Functional/Rest/MediaJsonBasicAuthTest.php
index c65a3b2fd6f376a7e63195da5a1ee27fa316a090..600b952558bcf8c3c8d5dc726d9ddec7120e4136 100644
--- a/core/modules/media/tests/src/Functional/Rest/MediaJsonBasicAuthTest.php
+++ b/core/modules/media/tests/src/Functional/Rest/MediaJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class MediaJsonBasicAuthTest extends MediaResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/media/tests/src/Functional/Rest/MediaResourceTestBase.php b/core/modules/media/tests/src/Functional/Rest/MediaResourceTestBase.php
index 7631edf48bd30f201ff8f3ac5f34f48581f42edf..98bab3f58beef9ea5ef877f354ed4a21c7228c33 100644
--- a/core/modules/media/tests/src/Functional/Rest/MediaResourceTestBase.php
+++ b/core/modules/media/tests/src/Functional/Rest/MediaResourceTestBase.php
@@ -19,7 +19,7 @@ abstract class MediaResourceTestBase extends EntityResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['media'];
+  protected static $modules = ['media'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/media/tests/src/Functional/Rest/MediaTypeJsonBasicAuthTest.php b/core/modules/media/tests/src/Functional/Rest/MediaTypeJsonBasicAuthTest.php
index 640ad42ef00da04c026f3edc01d6af91562ceafa..9f0af1db3cbc93d1c441432d19735ff522485b0b 100644
--- a/core/modules/media/tests/src/Functional/Rest/MediaTypeJsonBasicAuthTest.php
+++ b/core/modules/media/tests/src/Functional/Rest/MediaTypeJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class MediaTypeJsonBasicAuthTest extends MediaTypeResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/media/tests/src/Functional/Rest/MediaTypeResourceTestBase.php b/core/modules/media/tests/src/Functional/Rest/MediaTypeResourceTestBase.php
index a11f8ef54d0b67214f3dc7ef5ee030af4da8bbbb..7e3fb090692e2998c9ab1133cd81a5da9866cb05 100644
--- a/core/modules/media/tests/src/Functional/Rest/MediaTypeResourceTestBase.php
+++ b/core/modules/media/tests/src/Functional/Rest/MediaTypeResourceTestBase.php
@@ -10,7 +10,7 @@ abstract class MediaTypeResourceTestBase extends EntityResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['media'];
+  protected static $modules = ['media'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/media/tests/src/Functional/Rest/MediaTypeXmlBasicAuthTest.php b/core/modules/media/tests/src/Functional/Rest/MediaTypeXmlBasicAuthTest.php
index 6bd780977235562a6be757b631d846bde590a3bd..70d86c9135fbcfe40c39af64c87c24011a3c32c4 100644
--- a/core/modules/media/tests/src/Functional/Rest/MediaTypeXmlBasicAuthTest.php
+++ b/core/modules/media/tests/src/Functional/Rest/MediaTypeXmlBasicAuthTest.php
@@ -16,7 +16,7 @@ class MediaTypeXmlBasicAuthTest extends MediaTypeResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/media/tests/src/Functional/Rest/MediaXmlBasicAuthTest.php b/core/modules/media/tests/src/Functional/Rest/MediaXmlBasicAuthTest.php
index 9d41af515f928dec38ff5f9c6c2e77728eb32c7f..2eeaec38f190445124a63f590df982d4fd7df6c0 100644
--- a/core/modules/media/tests/src/Functional/Rest/MediaXmlBasicAuthTest.php
+++ b/core/modules/media/tests/src/Functional/Rest/MediaXmlBasicAuthTest.php
@@ -16,7 +16,7 @@ class MediaXmlBasicAuthTest extends MediaResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/media/tests/src/FunctionalJavascript/MediaJavascriptTestBase.php b/core/modules/media/tests/src/FunctionalJavascript/MediaJavascriptTestBase.php
index 390e22075ab8f815a49aa0816cf82a5a7f1e7372..88fc891ef606bf1d46a648319e1539f9859c07a9 100644
--- a/core/modules/media/tests/src/FunctionalJavascript/MediaJavascriptTestBase.php
+++ b/core/modules/media/tests/src/FunctionalJavascript/MediaJavascriptTestBase.php
@@ -19,7 +19,7 @@ abstract class MediaJavascriptTestBase extends WebDriverTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'system',
     'node',
     'field_ui',
diff --git a/core/modules/media/tests/src/FunctionalJavascript/MediaSourceOEmbedVideoTest.php b/core/modules/media/tests/src/FunctionalJavascript/MediaSourceOEmbedVideoTest.php
index 372b13009acf70c800263b70e5ab065c4776a584..ae9ab1416a6087e782e98201c541ba65be317227 100644
--- a/core/modules/media/tests/src/FunctionalJavascript/MediaSourceOEmbedVideoTest.php
+++ b/core/modules/media/tests/src/FunctionalJavascript/MediaSourceOEmbedVideoTest.php
@@ -19,7 +19,7 @@ class MediaSourceOEmbedVideoTest extends MediaSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['media_test_oembed'];
+  protected static $modules = ['media_test_oembed'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/media/tests/src/FunctionalJavascript/MediaStandardProfileTest.php b/core/modules/media/tests/src/FunctionalJavascript/MediaStandardProfileTest.php
index 5bd57a3d98d81594b2b3310918d89c8e5accb67d..e3293b591ead2f3d2eb6945276c4258b8754e2a4 100644
--- a/core/modules/media/tests/src/FunctionalJavascript/MediaStandardProfileTest.php
+++ b/core/modules/media/tests/src/FunctionalJavascript/MediaStandardProfileTest.php
@@ -26,7 +26,7 @@ class MediaStandardProfileTest extends MediaJavascriptTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['media_test_oembed'];
+  protected static $modules = ['media_test_oembed'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/media/tests/src/FunctionalJavascript/MediaUiJavascriptTest.php b/core/modules/media/tests/src/FunctionalJavascript/MediaUiJavascriptTest.php
index 5442307df3b865f083fb1e92e1b55eb0971fe763..c61c72a2d12674b1660980c77ce774afc932ce33 100644
--- a/core/modules/media/tests/src/FunctionalJavascript/MediaUiJavascriptTest.php
+++ b/core/modules/media/tests/src/FunctionalJavascript/MediaUiJavascriptTest.php
@@ -19,7 +19,7 @@ class MediaUiJavascriptTest extends MediaJavascriptTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'block',
     'media_test_source',
   ];
diff --git a/core/modules/media/tests/src/Kernel/MediaKernelTestBase.php b/core/modules/media/tests/src/Kernel/MediaKernelTestBase.php
index 1c6a879eeaae2eee939c0722839802162f14d960..164f12608f09378fba6c1e1f89a37a8a0dc910df 100644
--- a/core/modules/media/tests/src/Kernel/MediaKernelTestBase.php
+++ b/core/modules/media/tests/src/Kernel/MediaKernelTestBase.php
@@ -22,7 +22,7 @@ abstract class MediaKernelTestBase extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'media',
     'media_test_source',
     'image',
diff --git a/core/modules/media/tests/src/Kernel/MediaTranslationTest.php b/core/modules/media/tests/src/Kernel/MediaTranslationTest.php
index 32ef06c817f5d0a8b1ecf2df743d4669d4c52fac..64b9fcae08cac6e95adb430ac70a6085a537acce 100644
--- a/core/modules/media/tests/src/Kernel/MediaTranslationTest.php
+++ b/core/modules/media/tests/src/Kernel/MediaTranslationTest.php
@@ -18,7 +18,7 @@ class MediaTranslationTest extends MediaKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['language' , 'content_translation'];
+  protected static $modules = ['language' , 'content_translation'];
 
   /**
    * The test media translation type.
diff --git a/core/modules/menu_link_content/tests/src/Functional/Hal/MenuLinkContentHalJsonAnonTest.php b/core/modules/menu_link_content/tests/src/Functional/Hal/MenuLinkContentHalJsonAnonTest.php
index 1438c0cba2144fc933bd208d50b64e91ef1be0a7..d819850453c9f8353ae35fcd4e8fcc4b29d691b3 100644
--- a/core/modules/menu_link_content/tests/src/Functional/Hal/MenuLinkContentHalJsonAnonTest.php
+++ b/core/modules/menu_link_content/tests/src/Functional/Hal/MenuLinkContentHalJsonAnonTest.php
@@ -18,7 +18,7 @@ class MenuLinkContentHalJsonAnonTest extends MenuLinkContentResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/menu_link_content/tests/src/Functional/Hal/MenuLinkContentHalJsonBasicAuthTest.php b/core/modules/menu_link_content/tests/src/Functional/Hal/MenuLinkContentHalJsonBasicAuthTest.php
index d94f3e98a53f35a2af6cd64a28cab664df19e1de..dc4997261b948576cbdf5680c2af7dd973b881d0 100644
--- a/core/modules/menu_link_content/tests/src/Functional/Hal/MenuLinkContentHalJsonBasicAuthTest.php
+++ b/core/modules/menu_link_content/tests/src/Functional/Hal/MenuLinkContentHalJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class MenuLinkContentHalJsonBasicAuthTest extends MenuLinkContentHalJsonAnonTest
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
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 ccee134ac5a1fbec5968439eb0f2a796120692e3..3769a8dadb9481e0b7e80f8791283ca606af4b14 100644
--- a/core/modules/menu_link_content/tests/src/Functional/MenuLinkContentDeleteFormTest.php
+++ b/core/modules/menu_link_content/tests/src/Functional/MenuLinkContentDeleteFormTest.php
@@ -18,7 +18,7 @@ class MenuLinkContentDeleteFormTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['menu_link_content'];
+  protected static $modules = ['menu_link_content'];
 
   /**
    * {@inheritdoc}
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 8e01550083a14d69a6bb14c13b814275b0b03600..22ad314b42154d876324e2e4593e154686b4dd58 100644
--- a/core/modules/menu_link_content/tests/src/Functional/MenuLinkContentFormTest.php
+++ b/core/modules/menu_link_content/tests/src/Functional/MenuLinkContentFormTest.php
@@ -17,7 +17,7 @@ class MenuLinkContentFormTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'menu_link_content',
   ];
 
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 6f8ca59afe9ab6c1987f5d3c9fbc8b46f606aac9..0087b7902721698b18d5181cccbb69a67a9b78f7 100644
--- a/core/modules/menu_link_content/tests/src/Functional/MenuLinkContentTranslationUITest.php
+++ b/core/modules/menu_link_content/tests/src/Functional/MenuLinkContentTranslationUITest.php
@@ -22,7 +22,7 @@ class MenuLinkContentTranslationUITest extends ContentTranslationUITestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'language',
     'content_translation',
     'menu_link_content',
diff --git a/core/modules/menu_link_content/tests/src/Functional/Rest/MenuLinkContentJsonBasicAuthTest.php b/core/modules/menu_link_content/tests/src/Functional/Rest/MenuLinkContentJsonBasicAuthTest.php
index 620da15da24126a26656e19ff4d5389d0fc41974..ba3afdd7bbe8898724a8b8471c5d8cd6e5e1dacb 100644
--- a/core/modules/menu_link_content/tests/src/Functional/Rest/MenuLinkContentJsonBasicAuthTest.php
+++ b/core/modules/menu_link_content/tests/src/Functional/Rest/MenuLinkContentJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class MenuLinkContentJsonBasicAuthTest extends MenuLinkContentResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/menu_link_content/tests/src/Functional/Rest/MenuLinkContentResourceTestBase.php b/core/modules/menu_link_content/tests/src/Functional/Rest/MenuLinkContentResourceTestBase.php
index 0917ab1733f1d1a0f914b2b180418e68b3543764..3cdf2eff736e4145f2e2b0acb9187518c221f2d4 100644
--- a/core/modules/menu_link_content/tests/src/Functional/Rest/MenuLinkContentResourceTestBase.php
+++ b/core/modules/menu_link_content/tests/src/Functional/Rest/MenuLinkContentResourceTestBase.php
@@ -13,7 +13,7 @@ abstract class MenuLinkContentResourceTestBase extends EntityResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['menu_link_content'];
+  protected static $modules = ['menu_link_content'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/menu_link_content/tests/src/Functional/Rest/MenuLinkContentXmlBasicAuthTest.php b/core/modules/menu_link_content/tests/src/Functional/Rest/MenuLinkContentXmlBasicAuthTest.php
index 1e4999e6dea5db5279bbd0c7f9a8df8745de1330..53738c49189e7c988030ca6a3d11add95ca20217 100644
--- a/core/modules/menu_link_content/tests/src/Functional/Rest/MenuLinkContentXmlBasicAuthTest.php
+++ b/core/modules/menu_link_content/tests/src/Functional/Rest/MenuLinkContentXmlBasicAuthTest.php
@@ -16,7 +16,7 @@ class MenuLinkContentXmlBasicAuthTest extends MenuLinkContentResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
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 76e8877e4e8a900fd5d6800bb0a3a96be0a152bc..02749f17032270572a26a48e3d557df5af24a4c3 100644
--- a/core/modules/menu_link_content/tests/src/Kernel/MenuLinkContentCacheabilityBubblingTest.php
+++ b/core/modules/menu_link_content/tests/src/Kernel/MenuLinkContentCacheabilityBubblingTest.php
@@ -27,7 +27,7 @@ class MenuLinkContentCacheabilityBubblingTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['menu_link_content', 'system', 'link', 'outbound_processing_test', 'url_alter_test', 'user'];
+  protected static $modules = ['menu_link_content', 'system', 'link', 'outbound_processing_test', 'url_alter_test', 'user'];
 
   /**
    * {@inheritdoc}
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 2f82e8bcdcd20baa44a20a084d67f1f7de19d269..ea92849125184ff97263a67b9730405795611018 100644
--- a/core/modules/menu_link_content/tests/src/Kernel/MenuLinkContentDeriverTest.php
+++ b/core/modules/menu_link_content/tests/src/Kernel/MenuLinkContentDeriverTest.php
@@ -18,7 +18,7 @@ class MenuLinkContentDeriverTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['menu_link_content', 'link', 'system', 'menu_link_content_dynamic_route', 'user'];
+  protected static $modules = ['menu_link_content', 'link', 'system', 'menu_link_content_dynamic_route', 'user'];
 
   /**
    * {@inheritdoc}
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 a4d943455f1bbcb2c1cf554f585d1fc2fc93c5ae..0ceb9003e609b4192489787b56f9eebef3034a36 100644
--- a/core/modules/menu_link_content/tests/src/Kernel/MenuLinksTest.php
+++ b/core/modules/menu_link_content/tests/src/Kernel/MenuLinksTest.php
@@ -21,7 +21,7 @@ class MenuLinksTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['link', 'menu_link_content', 'router_test', 'system', 'user'];
+  protected static $modules = ['link', 'menu_link_content', 'router_test', 'system', 'user'];
 
   /**
    * The menu link plugin manager.
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 6e976289cc60675e350dc439fadd8db695a02e21..5f6ed5459ec8b11273fc941fe8e872f57ff97369 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
@@ -17,7 +17,7 @@ class MigrateMenuLinkContentStubTest extends MigrateDrupalTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['menu_link_content', 'link'];
+  protected static $modules = ['menu_link_content', 'link'];
 
   /**
    * {@inheritdoc}
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 1c415df978d1971f8f371114027ed6189c3ca8e0..5ffe4e6cc0365928b1845cd62e5c419dbfc09b16 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
@@ -19,7 +19,7 @@ class MigrateMenuLinkTest extends MigrateNodeTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'content_translation',
     'language',
     'menu_link_content',
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 3af579f2daee15dd3f01ed47561db66a3d0c5386..afdbd7d01215107085f263255ae890917bee3c4f 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
@@ -18,7 +18,7 @@ class MigrateMenuLinkTranslationTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'menu_ui',
     'menu_link_content',
     'language',
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 c65ade0bb4e069103a8b6cf14163fc41274b1184..ca9d3559c81fcbb776548c4907cc365bc468407b 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
@@ -21,7 +21,7 @@ class MigrateMenuLinkTest extends MigrateDrupal7TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'content_translation',
     'language',
     'link',
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 7b6e277877f88202dc198fbd9ee15c89c7ed72f1..4aaff3b8f1903846cc6a876177e2244df67906fe 100644
--- a/core/modules/menu_link_content/tests/src/Kernel/PathAliasMenuLinkContentTest.php
+++ b/core/modules/menu_link_content/tests/src/Kernel/PathAliasMenuLinkContentTest.php
@@ -21,7 +21,7 @@ class PathAliasMenuLinkContentTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['menu_link_content', 'system', 'link', 'path_alias', 'test_page_test', 'user'];
+  protected static $modules = ['menu_link_content', 'system', 'link', 'path_alias', 'test_page_test', 'user'];
 
   /**
    * {@inheritdoc}
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 6e5aa027efbd0b85176108aa090bc72b6e37bd96..b615d638a7cb8a3e45cef65bc8491029413966b1 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
@@ -26,7 +26,7 @@ class LinkUriTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'user'];
+  protected static $modules = ['node', 'user'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/menu_link_content/tests/src/Kernel/Plugin/migrate/source/MenuLinkTest.php b/core/modules/menu_link_content/tests/src/Kernel/Plugin/migrate/source/MenuLinkTest.php
index 7fb3a918f836e1485c193a4f6076b0c7c9ef0d3e..907a9da09a0762978c7f925f85dcc89412a80221 100644
--- a/core/modules/menu_link_content/tests/src/Kernel/Plugin/migrate/source/MenuLinkTest.php
+++ b/core/modules/menu_link_content/tests/src/Kernel/Plugin/migrate/source/MenuLinkTest.php
@@ -17,7 +17,7 @@ class MenuLinkTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['menu_link_content', 'migrate_drupal'];
+  protected static $modules = ['menu_link_content', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/menu_link_content/tests/src/Kernel/Plugin/migrate/source/d6/MenuLinkTranslationTest.php b/core/modules/menu_link_content/tests/src/Kernel/Plugin/migrate/source/d6/MenuLinkTranslationTest.php
index d373bb25873cd258fcc927a317a2609062e91ea0..303556c8584918d29ae0cf61796d7d5ac0d8f683 100644
--- a/core/modules/menu_link_content/tests/src/Kernel/Plugin/migrate/source/d6/MenuLinkTranslationTest.php
+++ b/core/modules/menu_link_content/tests/src/Kernel/Plugin/migrate/source/d6/MenuLinkTranslationTest.php
@@ -15,7 +15,7 @@ class MenuLinkTranslationTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['menu_link_content', 'migrate_drupal'];
+  protected static $modules = ['menu_link_content', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/menu_ui/tests/src/Functional/MenuCacheTagsTest.php b/core/modules/menu_ui/tests/src/Functional/MenuCacheTagsTest.php
index 4adf2a2e306030ea0d845287f872a1bdf8f6027b..c63a171548601b023b527f6137292ecec3fa4bd8 100644
--- a/core/modules/menu_ui/tests/src/Functional/MenuCacheTagsTest.php
+++ b/core/modules/menu_ui/tests/src/Functional/MenuCacheTagsTest.php
@@ -17,7 +17,7 @@ class MenuCacheTagsTest extends PageCacheTagsTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['menu_ui', 'block', 'test_page_test'];
+  protected static $modules = ['menu_ui', 'block', 'test_page_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/menu_ui/tests/src/Functional/MenuLinkReorderTest.php b/core/modules/menu_ui/tests/src/Functional/MenuLinkReorderTest.php
index 88e515857f15732fab412ef4fa33c19c92c7a926..f1107575bd0290ca25a5ca083be0516c62c705dc 100644
--- a/core/modules/menu_ui/tests/src/Functional/MenuLinkReorderTest.php
+++ b/core/modules/menu_ui/tests/src/Functional/MenuLinkReorderTest.php
@@ -23,7 +23,7 @@ class MenuLinkReorderTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['menu_ui', 'test_page_test', 'node', 'block'];
+  protected static $modules = ['menu_ui', 'test_page_test', 'node', 'block'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/menu_ui/tests/src/Functional/MenuUiContentModerationTest.php b/core/modules/menu_ui/tests/src/Functional/MenuUiContentModerationTest.php
index 8c6bfc0b773ea74d3f25553f7fa7631c4d4c868e..5c2b43264add354a400342f91d3ccc8bb1e3421b 100644
--- a/core/modules/menu_ui/tests/src/Functional/MenuUiContentModerationTest.php
+++ b/core/modules/menu_ui/tests/src/Functional/MenuUiContentModerationTest.php
@@ -19,7 +19,7 @@ class MenuUiContentModerationTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['block', 'content_moderation', 'node', 'menu_ui', 'test_page_test'];
+  protected static $modules = ['block', 'content_moderation', 'node', 'menu_ui', 'test_page_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/menu_ui/tests/src/Functional/MenuUiNodeTest.php b/core/modules/menu_ui/tests/src/Functional/MenuUiNodeTest.php
index 6a3efee15bb443ceb5b159ac018780f6629d1269..30efdebc314a85a933736b35a8ee969d29a193df 100644
--- a/core/modules/menu_ui/tests/src/Functional/MenuUiNodeTest.php
+++ b/core/modules/menu_ui/tests/src/Functional/MenuUiNodeTest.php
@@ -26,7 +26,7 @@ class MenuUiNodeTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['menu_ui', 'test_page_test', 'node', 'block', 'locale', 'language', 'content_translation'];
+  protected static $modules = ['menu_ui', 'test_page_test', 'node', 'block', 'locale', 'language', 'content_translation'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/menu_ui/tests/src/Functional/MenuUninstallTest.php b/core/modules/menu_ui/tests/src/Functional/MenuUninstallTest.php
index c176c51875797af1c78463501b942a90dd59ab53..ccaad86d2910985ab9730d734616360f8c8418f2 100644
--- a/core/modules/menu_ui/tests/src/Functional/MenuUninstallTest.php
+++ b/core/modules/menu_ui/tests/src/Functional/MenuUninstallTest.php
@@ -17,7 +17,7 @@ class MenuUninstallTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['menu_ui'];
+  protected static $modules = ['menu_ui'];
 
   /**
    * {@inheritdoc}
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 e1cf6c337a87f7151fd79bed0c79dc1144940388..8c2682242dd2015469e624b09341e0bbb0bef3e2 100644
--- a/core/modules/menu_ui/tests/src/Kernel/Migrate/MigrateMenuSettingsTest.php
+++ b/core/modules/menu_ui/tests/src/Kernel/Migrate/MigrateMenuSettingsTest.php
@@ -11,7 +11,7 @@
  */
 class MigrateMenuSettingsTest extends MigrateDrupal7TestBase {
 
-  public static $modules = ['menu_ui'];
+  protected static $modules = ['menu_ui'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/migrate/tests/src/Functional/process/DownloadFunctionalTest.php b/core/modules/migrate/tests/src/Functional/process/DownloadFunctionalTest.php
index e6d1249330d4cf33b005d5fb86a0ffd8e434489a..9ca3d992c13c2d1341786d264d78b0783399f1ec 100644
--- a/core/modules/migrate/tests/src/Functional/process/DownloadFunctionalTest.php
+++ b/core/modules/migrate/tests/src/Functional/process/DownloadFunctionalTest.php
@@ -17,7 +17,7 @@ class DownloadFunctionalTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['migrate', 'file'];
+  protected static $modules = ['migrate', 'file'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/migrate/tests/src/Kernel/HighWaterNotJoinableTest.php b/core/modules/migrate/tests/src/Kernel/HighWaterNotJoinableTest.php
index 4198579026724bae682847ae832d4c18287a7712..d8d7c1970ea82b99faae9429fd804ac81fd4c5a1 100644
--- a/core/modules/migrate/tests/src/Kernel/HighWaterNotJoinableTest.php
+++ b/core/modules/migrate/tests/src/Kernel/HighWaterNotJoinableTest.php
@@ -13,7 +13,7 @@ class HighWaterNotJoinableTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['migrate', 'migrate_drupal', 'migrate_high_water_test'];
+  protected static $modules = ['migrate', 'migrate_drupal', 'migrate_high_water_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/migrate/tests/src/Kernel/HighWaterTest.php b/core/modules/migrate/tests/src/Kernel/HighWaterTest.php
index 96e0f8067c76ce4ea46abe916b4e25a9720c1263..26cc7dcd3f9cffcfe0e14eb5560ead077a37c3de 100644
--- a/core/modules/migrate/tests/src/Kernel/HighWaterTest.php
+++ b/core/modules/migrate/tests/src/Kernel/HighWaterTest.php
@@ -12,7 +12,7 @@ class HighWaterTest extends MigrateTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'system',
     'user',
     'node',
diff --git a/core/modules/migrate/tests/src/Kernel/MigrateBundleTest.php b/core/modules/migrate/tests/src/Kernel/MigrateBundleTest.php
index ef7549fb20f445da7408d01016ed47d1b55f5327..2babdc1ab202580d539907e26ab01233edb5e740 100644
--- a/core/modules/migrate/tests/src/Kernel/MigrateBundleTest.php
+++ b/core/modules/migrate/tests/src/Kernel/MigrateBundleTest.php
@@ -18,7 +18,7 @@ class MigrateBundleTest extends MigrateTestBase {
    *
    * @var array
    */
-  public static $modules = ['taxonomy', 'text', 'user', 'system'];
+  protected static $modules = ['taxonomy', 'text', 'user', 'system'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/migrate/tests/src/Kernel/MigrateConfigRollbackTest.php b/core/modules/migrate/tests/src/Kernel/MigrateConfigRollbackTest.php
index 72abb0f287eb1dce1b99423458cf2f5d9efc4be3..d72ac4a925c9e19023ae24203875b1400d1ee51a 100644
--- a/core/modules/migrate/tests/src/Kernel/MigrateConfigRollbackTest.php
+++ b/core/modules/migrate/tests/src/Kernel/MigrateConfigRollbackTest.php
@@ -16,7 +16,7 @@ class MigrateConfigRollbackTest extends MigrateTestBase {
    *
    * @var array
    */
-  public static $modules = ['system', 'language', 'config_translation'];
+  protected static $modules = ['system', 'language', 'config_translation'];
 
   /**
    * Tests rolling back configuration.
diff --git a/core/modules/migrate/tests/src/Kernel/MigrateEmbeddedDataTest.php b/core/modules/migrate/tests/src/Kernel/MigrateEmbeddedDataTest.php
index 7be474e014e3384d96c0c040739709d08d17599b..eebd8f86dfaeae80c4a737f800a81093f56e527b 100644
--- a/core/modules/migrate/tests/src/Kernel/MigrateEmbeddedDataTest.php
+++ b/core/modules/migrate/tests/src/Kernel/MigrateEmbeddedDataTest.php
@@ -16,7 +16,7 @@ class MigrateEmbeddedDataTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['migrate'];
+  protected static $modules = ['migrate'];
 
   /**
    * Tests the embedded_data source plugin.
diff --git a/core/modules/migrate/tests/src/Kernel/MigrateEntityContentBaseTest.php b/core/modules/migrate/tests/src/Kernel/MigrateEntityContentBaseTest.php
index 4bd0e6372b64281cb56e551612e59c76fa615759..3e7c683060680b96546228a5733ff261a40b2ac0 100644
--- a/core/modules/migrate/tests/src/Kernel/MigrateEntityContentBaseTest.php
+++ b/core/modules/migrate/tests/src/Kernel/MigrateEntityContentBaseTest.php
@@ -24,7 +24,7 @@ class MigrateEntityContentBaseTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['migrate', 'user', 'language', 'entity_test'];
+  protected static $modules = ['migrate', 'user', 'language', 'entity_test'];
 
   /**
    * The storage for entity_test_mul.
diff --git a/core/modules/migrate/tests/src/Kernel/MigrateEventsTest.php b/core/modules/migrate/tests/src/Kernel/MigrateEventsTest.php
index f571fcd52a72e6d892c7a399801d869f1c71b2e6..91cf1b623040e9906c1ed1a7e7ae6dd5f98cebad 100644
--- a/core/modules/migrate/tests/src/Kernel/MigrateEventsTest.php
+++ b/core/modules/migrate/tests/src/Kernel/MigrateEventsTest.php
@@ -30,7 +30,7 @@ class MigrateEventsTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['migrate', 'migrate_events_test'];
+  protected static $modules = ['migrate', 'migrate_events_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/migrate/tests/src/Kernel/MigrateExecutableTest.php b/core/modules/migrate/tests/src/Kernel/MigrateExecutableTest.php
index d1f10c627d0bb2d799014dbbdd1f63df6f961cdd..a1dc4bb673408f3d8ba683c875d784ea88abf5ce 100644
--- a/core/modules/migrate/tests/src/Kernel/MigrateExecutableTest.php
+++ b/core/modules/migrate/tests/src/Kernel/MigrateExecutableTest.php
@@ -11,7 +11,7 @@
  */
 class MigrateExecutableTest extends MigrateTestBase {
 
-  public static $modules = [
+  protected static $modules = [
     'entity_test',
     'user',
   ];
diff --git a/core/modules/migrate/tests/src/Kernel/MigrateExternalTranslatedTest.php b/core/modules/migrate/tests/src/Kernel/MigrateExternalTranslatedTest.php
index 2da937fbeadf7bd8f54385b83e6d650058d68cd8..402ea2671a30eee76458e35f70cf2df8814e446c 100644
--- a/core/modules/migrate/tests/src/Kernel/MigrateExternalTranslatedTest.php
+++ b/core/modules/migrate/tests/src/Kernel/MigrateExternalTranslatedTest.php
@@ -19,7 +19,7 @@ class MigrateExternalTranslatedTest extends MigrateTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system', 'user', 'language', 'node', 'field', 'migrate_external_translated_test'];
+  protected static $modules = ['system', 'user', 'language', 'node', 'field', 'migrate_external_translated_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/migrate/tests/src/Kernel/MigrateInterruptionTest.php b/core/modules/migrate/tests/src/Kernel/MigrateInterruptionTest.php
index 76fd47d185a13a6fd855282b9fafd2f3410706fb..dc79983572619adc4c892607f4b31a44546c5950 100644
--- a/core/modules/migrate/tests/src/Kernel/MigrateInterruptionTest.php
+++ b/core/modules/migrate/tests/src/Kernel/MigrateInterruptionTest.php
@@ -20,7 +20,7 @@ class MigrateInterruptionTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['migrate', 'migrate_events_test'];
+  protected static $modules = ['migrate', 'migrate_events_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/migrate/tests/src/Kernel/MigrateLookupTest.php b/core/modules/migrate/tests/src/Kernel/MigrateLookupTest.php
index a3287f7c775eb2fcc8383c9f7c3b9d5f6838bf82..4affaa388465935f113e74d173206b085ace4dca 100644
--- a/core/modules/migrate/tests/src/Kernel/MigrateLookupTest.php
+++ b/core/modules/migrate/tests/src/Kernel/MigrateLookupTest.php
@@ -18,7 +18,7 @@ class MigrateLookupTest extends MigrateTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'system',
     'node',
     'field',
diff --git a/core/modules/migrate/tests/src/Kernel/MigrateMessageTest.php b/core/modules/migrate/tests/src/Kernel/MigrateMessageTest.php
index 3306bd9638c930956c6cafd8f415ae533c0e86c8..1ef0d752c8415b3f52d456463927d5405dd15086 100644
--- a/core/modules/migrate/tests/src/Kernel/MigrateMessageTest.php
+++ b/core/modules/migrate/tests/src/Kernel/MigrateMessageTest.php
@@ -22,7 +22,7 @@ class MigrateMessageTest extends KernelTestBase implements MigrateMessageInterfa
    *
    * @var array
    */
-  public static $modules = ['migrate', 'system'];
+  protected static $modules = ['migrate', 'system'];
 
   /**
    * Migration to run.
diff --git a/core/modules/migrate/tests/src/Kernel/MigrateRollbackEntityConfigTest.php b/core/modules/migrate/tests/src/Kernel/MigrateRollbackEntityConfigTest.php
index 7e77283f5484f9a3a6b5c27416b3d3271923f960..98d868b14e2a5525a4fbb57646d11aef9c06a036 100644
--- a/core/modules/migrate/tests/src/Kernel/MigrateRollbackEntityConfigTest.php
+++ b/core/modules/migrate/tests/src/Kernel/MigrateRollbackEntityConfigTest.php
@@ -17,7 +17,7 @@ class MigrateRollbackEntityConfigTest extends MigrateTestBase {
    *
    * @var array
    */
-  public static $modules = ['field', 'taxonomy', 'text', 'language', 'config_translation', 'user', 'system'];
+  protected static $modules = ['field', 'taxonomy', 'text', 'language', 'config_translation', 'user', 'system'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/migrate/tests/src/Kernel/MigrateRollbackTest.php b/core/modules/migrate/tests/src/Kernel/MigrateRollbackTest.php
index b41bd8bf1dff6f536cb147daa7938809a18cb804..2db8d826b4f0e1d3cebcbab6bf67cd0ca273c04d 100644
--- a/core/modules/migrate/tests/src/Kernel/MigrateRollbackTest.php
+++ b/core/modules/migrate/tests/src/Kernel/MigrateRollbackTest.php
@@ -20,7 +20,7 @@ class MigrateRollbackTest extends MigrateTestBase {
    *
    * @var array
    */
-  public static $modules = ['field', 'taxonomy', 'text', 'user', 'system'];
+  protected static $modules = ['field', 'taxonomy', 'text', 'user', 'system'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/migrate/tests/src/Kernel/MigrateSkipRowTest.php b/core/modules/migrate/tests/src/Kernel/MigrateSkipRowTest.php
index dd42f252fd091c4188d605c463160ebfa49dd9b5..c30577eb808c9e3150ab4710a2b5f4242828e5a5 100644
--- a/core/modules/migrate/tests/src/Kernel/MigrateSkipRowTest.php
+++ b/core/modules/migrate/tests/src/Kernel/MigrateSkipRowTest.php
@@ -19,7 +19,7 @@ class MigrateSkipRowTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['migrate', 'migrate_prepare_row_test'];
+  protected static $modules = ['migrate', 'migrate_prepare_row_test'];
 
   /**
    * Tests migration interruptions.
diff --git a/core/modules/migrate/tests/src/Kernel/MigrateSourceTestBase.php b/core/modules/migrate/tests/src/Kernel/MigrateSourceTestBase.php
index 7979fb96bb258157e0e9bc31c2f6f73cf33ad753..29bd2ca8578c9a370ae4dfa5a5de545ff066da32 100644
--- a/core/modules/migrate/tests/src/Kernel/MigrateSourceTestBase.php
+++ b/core/modules/migrate/tests/src/Kernel/MigrateSourceTestBase.php
@@ -15,7 +15,7 @@ abstract class MigrateSourceTestBase extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['migrate'];
+  protected static $modules = ['migrate'];
 
   /**
    * The mocked migration.
diff --git a/core/modules/migrate/tests/src/Kernel/MigrateStubTest.php b/core/modules/migrate/tests/src/Kernel/MigrateStubTest.php
index 5a94f243db916fd84d5321e00e4578a2d3b37dff..c4a5bd99c5676c81e008f1a04e90ce554f215fd9 100644
--- a/core/modules/migrate/tests/src/Kernel/MigrateStubTest.php
+++ b/core/modules/migrate/tests/src/Kernel/MigrateStubTest.php
@@ -16,7 +16,7 @@ class MigrateStubTest extends MigrateTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'system',
     'node',
     'field',
diff --git a/core/modules/migrate/tests/src/Kernel/MigrateTestBase.php b/core/modules/migrate/tests/src/Kernel/MigrateTestBase.php
index 896c7de7187356705dc8da385dab717d90987747..8fcef4a60ed158bd3509133cb600ec1aa227dbce 100644
--- a/core/modules/migrate/tests/src/Kernel/MigrateTestBase.php
+++ b/core/modules/migrate/tests/src/Kernel/MigrateTestBase.php
@@ -58,7 +58,7 @@ abstract class MigrateTestBase extends KernelTestBase implements MigrateMessageI
    */
   protected $logger;
 
-  public static $modules = ['migrate'];
+  protected static $modules = ['migrate'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/migrate/tests/src/Kernel/MigrationTest.php b/core/modules/migrate/tests/src/Kernel/MigrationTest.php
index 5fe56ecf9556f107cd4ec9951257e60d4e934233..72b5b2444d916e55ad42d1bbe4718935b432066c 100644
--- a/core/modules/migrate/tests/src/Kernel/MigrationTest.php
+++ b/core/modules/migrate/tests/src/Kernel/MigrationTest.php
@@ -18,7 +18,7 @@ class MigrationTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['migrate', 'field'];
+  protected static $modules = ['migrate', 'field'];
 
   /**
    * Tests Migration::set().
diff --git a/core/modules/migrate/tests/src/Kernel/Plugin/EntityExistsTest.php b/core/modules/migrate/tests/src/Kernel/Plugin/EntityExistsTest.php
index aacbe5c4b28a5968bdee083c5e2b73e02beebcef..63ab3626576726b43cba72f5f9f00a4074eed9bc 100644
--- a/core/modules/migrate/tests/src/Kernel/Plugin/EntityExistsTest.php
+++ b/core/modules/migrate/tests/src/Kernel/Plugin/EntityExistsTest.php
@@ -17,7 +17,7 @@ class EntityExistsTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['migrate', 'system', 'user'];
+  protected static $modules = ['migrate', 'system', 'user'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/migrate/tests/src/Kernel/Plugin/EntityRevisionTest.php b/core/modules/migrate/tests/src/Kernel/Plugin/EntityRevisionTest.php
index 2865f48c42c62d65b29506fc48a3cc543a57f975..b2eef6077af1007a31021c046ba9fdcfaab52fc9 100644
--- a/core/modules/migrate/tests/src/Kernel/Plugin/EntityRevisionTest.php
+++ b/core/modules/migrate/tests/src/Kernel/Plugin/EntityRevisionTest.php
@@ -19,7 +19,7 @@ class EntityRevisionTest extends MigrateTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'content_translation',
     'field',
     'filter',
diff --git a/core/modules/migrate/tests/src/Kernel/Plugin/LogTest.php b/core/modules/migrate/tests/src/Kernel/Plugin/LogTest.php
index bb5d04dbd17e11db055dd1839ee7bd0e198c9b13..85b125604ca09076e11a7114c5461c522347a7ce 100644
--- a/core/modules/migrate/tests/src/Kernel/Plugin/LogTest.php
+++ b/core/modules/migrate/tests/src/Kernel/Plugin/LogTest.php
@@ -16,7 +16,7 @@ class LogTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['migrate'];
+  protected static $modules = ['migrate'];
 
   /**
    * Test the Log plugin.
diff --git a/core/modules/migrate/tests/src/Kernel/Plugin/MigrationPluginConfigurationTest.php b/core/modules/migrate/tests/src/Kernel/Plugin/MigrationPluginConfigurationTest.php
index 56cc1f3acbf500c2cff84e218b5a32bda7221fe3..2e5a675e5d18211a7d4a853c89d20f341bdac1b9 100644
--- a/core/modules/migrate/tests/src/Kernel/Plugin/MigrationPluginConfigurationTest.php
+++ b/core/modules/migrate/tests/src/Kernel/Plugin/MigrationPluginConfigurationTest.php
@@ -15,7 +15,7 @@ class MigrationPluginConfigurationTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'migrate',
     'migrate_drupal',
     // Test with a simple migration.
diff --git a/core/modules/migrate/tests/src/Kernel/Plugin/MigrationPluginListTest.php b/core/modules/migrate/tests/src/Kernel/Plugin/MigrationPluginListTest.php
index 0bdf02b5c5445c0b01fbcff87a4bac70f6bc2ca2..10ed8755cfedbb02d6b25e8744c24bcc76c1beae 100644
--- a/core/modules/migrate/tests/src/Kernel/Plugin/MigrationPluginListTest.php
+++ b/core/modules/migrate/tests/src/Kernel/Plugin/MigrationPluginListTest.php
@@ -22,7 +22,7 @@ class MigrationPluginListTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'migrate',
     // Test with all modules containing Drupal migrations.
     'action',
diff --git a/core/modules/migrate/tests/src/Kernel/Plugin/MigrationTest.php b/core/modules/migrate/tests/src/Kernel/Plugin/MigrationTest.php
index aceb73e807de5bf3b1448cdea102b888ff4925d6..49b4ee1524626f0c0a8d8c4feab4d15d1f616dd4 100644
--- a/core/modules/migrate/tests/src/Kernel/Plugin/MigrationTest.php
+++ b/core/modules/migrate/tests/src/Kernel/Plugin/MigrationTest.php
@@ -17,7 +17,7 @@ class MigrationTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['migrate'];
+  protected static $modules = ['migrate'];
 
   /**
    * Tests Migration::getProcessPlugins()
diff --git a/core/modules/migrate/tests/src/Kernel/QueryBatchTest.php b/core/modules/migrate/tests/src/Kernel/QueryBatchTest.php
index 059387973332fe7d4659c13f0c750b970569b4a6..86dd2059dc883b46eb8498c3d67c8b9afe9d2297 100644
--- a/core/modules/migrate/tests/src/Kernel/QueryBatchTest.php
+++ b/core/modules/migrate/tests/src/Kernel/QueryBatchTest.php
@@ -26,7 +26,7 @@ class QueryBatchTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'migrate',
     'migrate_query_batch_test',
   ];
diff --git a/core/modules/migrate/tests/src/Kernel/TrackChangesTest.php b/core/modules/migrate/tests/src/Kernel/TrackChangesTest.php
index 48bc8e5cba304b01877e35b5333d5f48f511ac37..0c27bf29919477c694a3b69e4a45a81a0a590c5d 100644
--- a/core/modules/migrate/tests/src/Kernel/TrackChangesTest.php
+++ b/core/modules/migrate/tests/src/Kernel/TrackChangesTest.php
@@ -12,7 +12,7 @@ class TrackChangesTest extends MigrateTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'system',
     'user',
     'taxonomy',
diff --git a/core/modules/migrate/tests/src/Kernel/process/DownloadTest.php b/core/modules/migrate/tests/src/Kernel/process/DownloadTest.php
index 4dd3f11eccfac9a0c3812531e3a1a19855bf7452..9432c707eddbc92f70b0f41912afc6a31d94d7c7 100644
--- a/core/modules/migrate/tests/src/Kernel/process/DownloadTest.php
+++ b/core/modules/migrate/tests/src/Kernel/process/DownloadTest.php
@@ -20,7 +20,7 @@ class DownloadTest extends FileTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system'];
+  protected static $modules = ['system'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/migrate/tests/src/Kernel/process/ExtractTest.php b/core/modules/migrate/tests/src/Kernel/process/ExtractTest.php
index 9338b9e3c92321cb4380472e79f94843b3bc9e08..8dc73f492449c1db4097c19bf5eae6ffe656697b 100644
--- a/core/modules/migrate/tests/src/Kernel/process/ExtractTest.php
+++ b/core/modules/migrate/tests/src/Kernel/process/ExtractTest.php
@@ -16,7 +16,7 @@ class ExtractTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['migrate'];
+  protected static $modules = ['migrate'];
 
   /**
    * Returns test migration definition.
diff --git a/core/modules/migrate/tests/src/Kernel/process/FileCopyTest.php b/core/modules/migrate/tests/src/Kernel/process/FileCopyTest.php
index 1301ada352d8ff9bfcbcb41756bfda0f027238ba..22ac8f72a9f92157df515ebd364e468a6d0ba693 100644
--- a/core/modules/migrate/tests/src/Kernel/process/FileCopyTest.php
+++ b/core/modules/migrate/tests/src/Kernel/process/FileCopyTest.php
@@ -23,7 +23,7 @@ class FileCopyTest extends FileTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['migrate', 'system'];
+  protected static $modules = ['migrate', 'system'];
 
   /**
    * The file system service.
diff --git a/core/modules/migrate/tests/src/Kernel/process/HandleMultiplesTest.php b/core/modules/migrate/tests/src/Kernel/process/HandleMultiplesTest.php
index dc63de3db62282ea65afb2f5bed918980ddd16db..caae69de613ca621f7a518db9175f4d61a4e3092 100644
--- a/core/modules/migrate/tests/src/Kernel/process/HandleMultiplesTest.php
+++ b/core/modules/migrate/tests/src/Kernel/process/HandleMultiplesTest.php
@@ -16,7 +16,7 @@ class HandleMultiplesTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['migrate'];
+  protected static $modules = ['migrate'];
 
   /**
    * Provides the test migration definition.
diff --git a/core/modules/migrate/tests/src/Kernel/process/RouteTest.php b/core/modules/migrate/tests/src/Kernel/process/RouteTest.php
index b592fc3215c7bb4c89e163aede3b97faca7965ef..2e154b8664abd01181fa43c51a4d603de474fcd2 100644
--- a/core/modules/migrate/tests/src/Kernel/process/RouteTest.php
+++ b/core/modules/migrate/tests/src/Kernel/process/RouteTest.php
@@ -23,7 +23,7 @@ class RouteTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['user', 'system'];
+  protected static $modules = ['user', 'system'];
 
   /**
    * Tests Route plugin based on providerTestRoute() values.
diff --git a/core/modules/migrate_drupal/tests/src/Kernel/MigrateDrupalTestBase.php b/core/modules/migrate_drupal/tests/src/Kernel/MigrateDrupalTestBase.php
index f361fb16ef705203a1ea6130d3cff24fa06be5bf..0ff5e3a6d6cbebf950d5a4ce2bb21b879997a31d 100644
--- a/core/modules/migrate_drupal/tests/src/Kernel/MigrateDrupalTestBase.php
+++ b/core/modules/migrate_drupal/tests/src/Kernel/MigrateDrupalTestBase.php
@@ -15,7 +15,7 @@ abstract class MigrateDrupalTestBase extends MigrateTestBase {
    *
    * @var array
    */
-  public static $modules = ['system', 'user', 'field', 'migrate_drupal', 'options', 'file'];
+  protected static $modules = ['system', 'user', 'field', 'migrate_drupal', 'options', 'file'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/migrate_drupal/tests/src/Kernel/MigrateFieldPluginManagerTest.php b/core/modules/migrate_drupal/tests/src/Kernel/MigrateFieldPluginManagerTest.php
index 1ce47ce84f1059d223a478fdd5e9b645c09e6191..69bde8bfcac517a12e48b2c8573dca65e00139e8 100644
--- a/core/modules/migrate_drupal/tests/src/Kernel/MigrateFieldPluginManagerTest.php
+++ b/core/modules/migrate_drupal/tests/src/Kernel/MigrateFieldPluginManagerTest.php
@@ -22,7 +22,7 @@ class MigrateFieldPluginManagerTest extends MigrateDrupalTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'datetime',
     'system',
     'user',
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 139a45e2d0f4a9d5ba52b8f04b9e09c4f6d06b92..4a0645528e40248292721fd0362583ab0f0d84ed 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
@@ -32,7 +32,7 @@ class ContentEntityTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'user',
     'migrate',
     'migrate_drupal',
diff --git a/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/VariableMultiRowTest.php b/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/VariableMultiRowTest.php
index 932af990373c4549445c2a3b69a394bf3d98940e..bf72ed11b5cd535fa534181b260c636a587f3d91 100644
--- a/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/VariableMultiRowTest.php
+++ b/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/VariableMultiRowTest.php
@@ -16,7 +16,7 @@ class VariableMultiRowTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['migrate_drupal'];
+  protected static $modules = ['migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/VariableTest.php b/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/VariableTest.php
index 1a52b1df30de980efd6d1b33e4662993114cb734..66e9a5d5bd75e08ca8efc584a896b7edfeaa5a9d 100644
--- a/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/VariableTest.php
+++ b/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/VariableTest.php
@@ -16,7 +16,7 @@ class VariableTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['migrate_drupal'];
+  protected static $modules = ['migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/d6/VariableTranslationTest.php b/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/d6/VariableTranslationTest.php
index e723ce9b7182280e58db220a9a501762194efd95..85a47b24692f0ee4eb5f6721cff7074cf7bfb2d6 100644
--- a/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/d6/VariableTranslationTest.php
+++ b/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/d6/VariableTranslationTest.php
@@ -16,7 +16,7 @@ class VariableTranslationTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['migrate_drupal'];
+  protected static $modules = ['migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/d7/VariableTranslationTest.php b/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/d7/VariableTranslationTest.php
index 685590647b1c2b71859b8bf7c03d1e210e72d0ea..3a9eb244498c3a925881a40f5fd40cf18efdc5bf 100644
--- a/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/d7/VariableTranslationTest.php
+++ b/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/d7/VariableTranslationTest.php
@@ -16,7 +16,7 @@ class VariableTranslationTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['migrate_drupal'];
+  protected static $modules = ['migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/d8/ConfigTest.php b/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/d8/ConfigTest.php
index 3cf4031907387ff2536c041df636a2e89a4d645a..0cb0dcf5d8447d6ea79d63ae831b1853bc337e48 100644
--- a/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/d8/ConfigTest.php
+++ b/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/d8/ConfigTest.php
@@ -15,7 +15,7 @@ class ConfigTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['migrate_drupal'];
+  protected static $modules = ['migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/migrate_drupal/tests/src/Kernel/StateFileExists.php b/core/modules/migrate_drupal/tests/src/Kernel/StateFileExists.php
index 1940009eb3dda31617a5a1839b0dfa0af157c13a..affc56be38a25c5e5a46017e69f6ec32183aa975 100644
--- a/core/modules/migrate_drupal/tests/src/Kernel/StateFileExists.php
+++ b/core/modules/migrate_drupal/tests/src/Kernel/StateFileExists.php
@@ -24,7 +24,7 @@ class StateFileExists extends MigrateDrupalTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     // Test migrations states.
     'migrate_state_finished_test',
     'migrate_state_not_finished_test',
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 00135a120947bf23f7d9922b738a0ba67ee07ab7..89d32c1fe4e89217e398e59abf7f39461dfdaae0 100644
--- a/core/modules/migrate_drupal/tests/src/Kernel/d6/EntityContentBaseTest.php
+++ b/core/modules/migrate_drupal/tests/src/Kernel/d6/EntityContentBaseTest.php
@@ -17,7 +17,7 @@ class EntityContentBaseTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['migrate_overwrite_test'];
+  protected static $modules = ['migrate_overwrite_test'];
 
   /**
    * {@inheritdoc}
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 148a64873a2da360ae54a5283fd6f63827694e84..41562431e9df2811aa63c4d08c042fd45e1ca978 100644
--- a/core/modules/migrate_drupal/tests/src/Kernel/d6/FieldDiscoveryTest.php
+++ b/core/modules/migrate_drupal/tests/src/Kernel/d6/FieldDiscoveryTest.php
@@ -19,7 +19,7 @@ class FieldDiscoveryTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'menu_ui',
     'comment',
     'datetime',
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 e86a7b6d63f0f8b38e6de2311ef3c314879d04af..7a2c6c1b2ac697ef35cb99d83ea197e4ee6f7376 100644
--- a/core/modules/migrate_drupal/tests/src/Kernel/d6/FollowUpMigrationsTest.php
+++ b/core/modules/migrate_drupal/tests/src/Kernel/d6/FollowUpMigrationsTest.php
@@ -15,7 +15,7 @@ class FollowUpMigrationsTest extends MigrateNodeTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'content_translation',
     'language',
     'menu_ui',
diff --git a/core/modules/migrate_drupal/tests/src/Kernel/d6/MigrateDrupal6TestBase.php b/core/modules/migrate_drupal/tests/src/Kernel/d6/MigrateDrupal6TestBase.php
index 9bbd93316d25d83bf4f46f07bd6801cdc1c38fde..ac58395aafedc8827f2d8818affedaa343fa0946 100644
--- a/core/modules/migrate_drupal/tests/src/Kernel/d6/MigrateDrupal6TestBase.php
+++ b/core/modules/migrate_drupal/tests/src/Kernel/d6/MigrateDrupal6TestBase.php
@@ -15,7 +15,7 @@ abstract class MigrateDrupal6TestBase extends MigrateDrupalTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'datetime',
     'filter',
     'image',
diff --git a/core/modules/migrate_drupal/tests/src/Kernel/d6/ValidateMigrationStateTest.php b/core/modules/migrate_drupal/tests/src/Kernel/d6/ValidateMigrationStateTest.php
index b525dbdb726cee9c5a9331ccacc1a42cdd48178a..1ea12b175b7990ffbb2b3b99042d339826653b24 100644
--- a/core/modules/migrate_drupal/tests/src/Kernel/d6/ValidateMigrationStateTest.php
+++ b/core/modules/migrate_drupal/tests/src/Kernel/d6/ValidateMigrationStateTest.php
@@ -16,7 +16,7 @@ class ValidateMigrationStateTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     // Test migrations states.
     'migrate_state_finished_test',
     'migrate_state_not_finished_test',
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 2c43cb45ae419746ce64edb86d457d097365e05b..03ee60ef0a75f1f5352969b8b6904dec2283df24 100644
--- a/core/modules/migrate_drupal/tests/src/Kernel/d6/VariableTranslationCheckRequirementsTest.php
+++ b/core/modules/migrate_drupal/tests/src/Kernel/d6/VariableTranslationCheckRequirementsTest.php
@@ -14,7 +14,7 @@ class VariableTranslationCheckRequirementsTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['config_translation'];
+  protected static $modules = ['config_translation'];
 
   /**
    * {@inheritdoc}
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 0efa3f452b4f5ddf9754c8a602754c588eca2b8e..5c05d48726082d7c3f7ef6c088159b209ef00459 100644
--- a/core/modules/migrate_drupal/tests/src/Kernel/d7/FieldDiscoveryTest.php
+++ b/core/modules/migrate_drupal/tests/src/Kernel/d7/FieldDiscoveryTest.php
@@ -23,7 +23,7 @@ class FieldDiscoveryTest extends MigrateDrupal7TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'comment',
     'datetime',
     'file',
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 43ac8a99c6ee8e0d70132234309ee8393828a94b..cc0b309566251aa695acb7109497650eeb1a43ca 100644
--- a/core/modules/migrate_drupal/tests/src/Kernel/d7/FollowUpMigrationsTest.php
+++ b/core/modules/migrate_drupal/tests/src/Kernel/d7/FollowUpMigrationsTest.php
@@ -17,7 +17,7 @@ class FollowUpMigrationsTest extends MigrateDrupal7TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'content_translation',
     'comment',
     'datetime',
diff --git a/core/modules/migrate_drupal/tests/src/Kernel/d7/ValidateMigrationStateTest.php b/core/modules/migrate_drupal/tests/src/Kernel/d7/ValidateMigrationStateTest.php
index fcab11450ac8e1697d0dabc3042d430eb333e687..aa26170222d85825ead8842dea30e03813e0ff24 100644
--- a/core/modules/migrate_drupal/tests/src/Kernel/d7/ValidateMigrationStateTest.php
+++ b/core/modules/migrate_drupal/tests/src/Kernel/d7/ValidateMigrationStateTest.php
@@ -16,7 +16,7 @@ class ValidateMigrationStateTest extends MigrateDrupal7TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     // Test migrations states.
     'migrate_state_finished_test',
     'migrate_state_not_finished_test',
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 7d26ea135141d0c09f9d8a79d2be32addb33b4ff..c080f33e3d90bb48defad3b3fae10a89893afb98 100644
--- a/core/modules/migrate_drupal/tests/src/Kernel/dependencies/MigrateDependenciesTest.php
+++ b/core/modules/migrate_drupal/tests/src/Kernel/dependencies/MigrateDependenciesTest.php
@@ -17,7 +17,7 @@ class MigrateDependenciesTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['aggregator', 'comment'];
+  protected static $modules = ['aggregator', 'comment'];
 
   /**
    * Tests that the order is correct when loading several migrations.
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 5a568aec0f56e06a27e368d8ce2c62bbd6a809fb..0815b0e500fb394dc5441615e57ed095bf4736e2 100644
--- a/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateAccessTest.php
+++ b/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateAccessTest.php
@@ -16,7 +16,7 @@ class MigrateAccessTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['migrate_drupal_ui'];
+  protected static $modules = ['migrate_drupal_ui'];
 
   /**
    * {@inheritdoc}
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 49b4d04b5538dd867089cd47724971eca880c92d..84a7ba4ad82656c9af8ece9a5f364789c57c92cc 100644
--- a/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeFormStepsTest.php
+++ b/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeFormStepsTest.php
@@ -20,7 +20,7 @@ class MigrateUpgradeFormStepsTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['migrate_drupal_ui'];
+  protected static $modules = ['migrate_drupal_ui'];
 
   /**
    * {@inheritdoc}
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 b9f11b20e35508d5967c0f9b291077f275270aab..2946501e5c2184d784dea016d68f2922091c8a1d 100644
--- a/core/modules/migrate_drupal_ui/tests/src/Functional/MultilingualReviewPageTestBase.php
+++ b/core/modules/migrate_drupal_ui/tests/src/Functional/MultilingualReviewPageTestBase.php
@@ -23,7 +23,7 @@ abstract class MultilingualReviewPageTestBase extends MigrateUpgradeTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['migrate_drupal_ui'];
+  protected static $modules = ['migrate_drupal_ui'];
 
   /**
    * Tests the migrate upgrade review form.
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 df47e99d57473c23275d532482430c8080add68c..30df7b5a3355a68affca96b4b241714e603e3a06 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
@@ -14,7 +14,7 @@ class IdConflictTest extends MigrateUpgradeExecuteTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'language',
     'content_translation',
     'config_translation',
diff --git a/core/modules/migrate_drupal_ui/tests/src/Functional/d6/MultilingualReviewPageTest.php b/core/modules/migrate_drupal_ui/tests/src/Functional/d6/MultilingualReviewPageTest.php
index 7f00062fdecfa748cc880982b33b3343c7fd82a3..d1c69aac55418c9098ddfa328b5f4fb52983aea6 100644
--- a/core/modules/migrate_drupal_ui/tests/src/Functional/d6/MultilingualReviewPageTest.php
+++ b/core/modules/migrate_drupal_ui/tests/src/Functional/d6/MultilingualReviewPageTest.php
@@ -19,7 +19,7 @@ class MultilingualReviewPageTest extends MultilingualReviewPageTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'language',
     'content_translation',
     'config_translation',
diff --git a/core/modules/migrate_drupal_ui/tests/src/Functional/d6/NoMultilingualReviewPageTest.php b/core/modules/migrate_drupal_ui/tests/src/Functional/d6/NoMultilingualReviewPageTest.php
index 0150ac99b99749d63c770f39e5df908fe4e8c84e..52273bd4a298cc32a9dd21d78144ee011ec8ab05 100644
--- a/core/modules/migrate_drupal_ui/tests/src/Functional/d6/NoMultilingualReviewPageTest.php
+++ b/core/modules/migrate_drupal_ui/tests/src/Functional/d6/NoMultilingualReviewPageTest.php
@@ -20,7 +20,7 @@ class NoMultilingualReviewPageTest extends NoMultilingualReviewPageTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'language',
     'telephone',
     'aggregator',
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 e779aa3ac07d7e75c990ac152a92f3b91cf10bdb..1e5f4a32292e4b84382a19324ef42dda39df5776 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
@@ -21,7 +21,7 @@ class NodeClassicTest extends MigrateUpgradeExecuteTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'language',
     'content_translation',
     'config_translation',
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 8afec3ca4eaa345b27fbb399712f4d7bfc7a5422..d488394d075895a7c7fdb8c42e92cabf44100c06 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
@@ -22,7 +22,7 @@ class Upgrade6Test extends MigrateUpgradeExecuteTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'language',
     'content_translation',
     'config_translation',
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 8b8476d39c3fcbe4371643310f73c235f0955fb6..36f9aac39d24ef9f8ac66854df6deb7df622c872 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
@@ -14,7 +14,7 @@ class IdConflictTest extends MigrateUpgradeExecuteTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'file',
     'language',
     'config_translation',
diff --git a/core/modules/migrate_drupal_ui/tests/src/Functional/d7/MultilingualReviewPageTest.php b/core/modules/migrate_drupal_ui/tests/src/Functional/d7/MultilingualReviewPageTest.php
index 199e0c7ea3edb55aceac848f897d9002184380c8..00f33a36f9ec5369e0722a4d8d6b48f6c37914be 100644
--- a/core/modules/migrate_drupal_ui/tests/src/Functional/d7/MultilingualReviewPageTest.php
+++ b/core/modules/migrate_drupal_ui/tests/src/Functional/d7/MultilingualReviewPageTest.php
@@ -19,7 +19,7 @@ class MultilingualReviewPageTest extends MultilingualReviewPageTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'language',
     'content_translation',
     'telephone',
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 ed90a96c1538b1384cecc410bf800d85a0749012..95b26fcccf0bea443ea94e14372b7f90fa8e3a8c 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
@@ -22,7 +22,7 @@ class Upgrade7Test extends MigrateUpgradeExecuteTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'file',
     'language',
     'config_translation',
diff --git a/core/modules/node/tests/src/Functional/Hal/NodeHalJsonAnonTest.php b/core/modules/node/tests/src/Functional/Hal/NodeHalJsonAnonTest.php
index 10f101eb3ffa1e233354764bae650e3bb3684056..0f12461524ea9731705b7d9b67ecf9b3d3d991cd 100644
--- a/core/modules/node/tests/src/Functional/Hal/NodeHalJsonAnonTest.php
+++ b/core/modules/node/tests/src/Functional/Hal/NodeHalJsonAnonTest.php
@@ -18,7 +18,7 @@ class NodeHalJsonAnonTest extends NodeResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Functional/Hal/NodeHalJsonBasicAuthTest.php b/core/modules/node/tests/src/Functional/Hal/NodeHalJsonBasicAuthTest.php
index fd238757c888f7c2957d2ddd811af7f3c3af0ece..50851bbd14970bbf5fa910e411164ccb04c547c0 100644
--- a/core/modules/node/tests/src/Functional/Hal/NodeHalJsonBasicAuthTest.php
+++ b/core/modules/node/tests/src/Functional/Hal/NodeHalJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class NodeHalJsonBasicAuthTest extends NodeHalJsonAnonTest {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Functional/Hal/NodeTypeHalJsonAnonTest.php b/core/modules/node/tests/src/Functional/Hal/NodeTypeHalJsonAnonTest.php
index 8a7e8d9b6ba5416dd50d07e5eafa45b37872888f..e2920829a77c28fa35deaa92284215dc0921ae82 100644
--- a/core/modules/node/tests/src/Functional/Hal/NodeTypeHalJsonAnonTest.php
+++ b/core/modules/node/tests/src/Functional/Hal/NodeTypeHalJsonAnonTest.php
@@ -15,7 +15,7 @@ class NodeTypeHalJsonAnonTest extends NodeTypeResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Functional/Hal/NodeTypeHalJsonBasicAuthTest.php b/core/modules/node/tests/src/Functional/Hal/NodeTypeHalJsonBasicAuthTest.php
index 2c8760ba71a806d0d7a69c54ccb53ded3cda2f41..b1f90b68687c274eacbc710ab826b59003c62d95 100644
--- a/core/modules/node/tests/src/Functional/Hal/NodeTypeHalJsonBasicAuthTest.php
+++ b/core/modules/node/tests/src/Functional/Hal/NodeTypeHalJsonBasicAuthTest.php
@@ -15,7 +15,7 @@ class NodeTypeHalJsonBasicAuthTest extends NodeTypeResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal', 'basic_auth'];
+  protected static $modules = ['hal', 'basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Functional/Hal/NodeTypeHalJsonCookieTest.php b/core/modules/node/tests/src/Functional/Hal/NodeTypeHalJsonCookieTest.php
index 96c7046d0f2ebc971715cdf2236af939009c3dfd..3c5b821446ddc5c775413b0ef2d20cb9275b602c 100644
--- a/core/modules/node/tests/src/Functional/Hal/NodeTypeHalJsonCookieTest.php
+++ b/core/modules/node/tests/src/Functional/Hal/NodeTypeHalJsonCookieTest.php
@@ -15,7 +15,7 @@ class NodeTypeHalJsonCookieTest extends NodeTypeResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Functional/NodeAccessBaseTableTest.php b/core/modules/node/tests/src/Functional/NodeAccessBaseTableTest.php
index c888459c6f96c251a547d49eed8227ae05de4195..06f2bb8b4a7401a32154fb55a1ae1179ef3cfc13 100644
--- a/core/modules/node/tests/src/Functional/NodeAccessBaseTableTest.php
+++ b/core/modules/node/tests/src/Functional/NodeAccessBaseTableTest.php
@@ -17,7 +17,7 @@ class NodeAccessBaseTableTest extends NodeTestBase {
    *
    * @var array
    */
-  public static $modules = ['node_access_test', 'views'];
+  protected static $modules = ['node_access_test', 'views'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Functional/NodeAccessCacheabilityTest.php b/core/modules/node/tests/src/Functional/NodeAccessCacheabilityTest.php
index bb4f975f1cc382c220ed31690c03f7d399d34181..48362a5733c82dae478e6865e4cb2826d3afcfc9 100644
--- a/core/modules/node/tests/src/Functional/NodeAccessCacheabilityTest.php
+++ b/core/modules/node/tests/src/Functional/NodeAccessCacheabilityTest.php
@@ -21,7 +21,7 @@ class NodeAccessCacheabilityTest extends NodeTestBase {
    *
    * @var array
    */
-  public static $modules = ['node_access_test', 'node_access_test_auto_bubbling'];
+  protected static $modules = ['node_access_test', 'node_access_test_auto_bubbling'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Functional/NodeAccessFieldTest.php b/core/modules/node/tests/src/Functional/NodeAccessFieldTest.php
index 412a441c34404787fcc30de202c440d6938b45b2..53ac68709ca9a4a19e9e71f16a4515d28b148596 100644
--- a/core/modules/node/tests/src/Functional/NodeAccessFieldTest.php
+++ b/core/modules/node/tests/src/Functional/NodeAccessFieldTest.php
@@ -17,7 +17,7 @@ class NodeAccessFieldTest extends NodeTestBase {
    *
    * @var array
    */
-  public static $modules = ['node_access_test', 'field_ui'];
+  protected static $modules = ['node_access_test', 'field_ui'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Functional/NodeAccessGrantsCacheContextTest.php b/core/modules/node/tests/src/Functional/NodeAccessGrantsCacheContextTest.php
index 43d80409cae1b7575ba19fa9a78961c318f82557..bdc487e3395959c213f895b462ae9bbd3105b548 100644
--- a/core/modules/node/tests/src/Functional/NodeAccessGrantsCacheContextTest.php
+++ b/core/modules/node/tests/src/Functional/NodeAccessGrantsCacheContextTest.php
@@ -17,7 +17,7 @@ class NodeAccessGrantsCacheContextTest extends NodeTestBase {
    *
    * @var array
    */
-  public static $modules = ['node_access_test'];
+  protected static $modules = ['node_access_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Functional/NodeAccessLanguageFallbackTest.php b/core/modules/node/tests/src/Functional/NodeAccessLanguageFallbackTest.php
index 6961ddee35468baf8a0406bf00cb536d4ac28913..1a9aeef6e93b7eea3474f64b3ac903371431afcc 100644
--- a/core/modules/node/tests/src/Functional/NodeAccessLanguageFallbackTest.php
+++ b/core/modules/node/tests/src/Functional/NodeAccessLanguageFallbackTest.php
@@ -16,7 +16,7 @@ class NodeAccessLanguageFallbackTest extends NodeTestBase {
    *
    * @var array
    */
-  public static $modules = ['language', 'node_access_test', 'content_translation'];
+  protected static $modules = ['language', 'node_access_test', 'content_translation'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Functional/NodeAccessMenuLinkTest.php b/core/modules/node/tests/src/Functional/NodeAccessMenuLinkTest.php
index d79ebd011cd71286f139edbb314c52d1319d4cd2..ef1bdc0ef65c22dca248191dad45896403dd2b73 100644
--- a/core/modules/node/tests/src/Functional/NodeAccessMenuLinkTest.php
+++ b/core/modules/node/tests/src/Functional/NodeAccessMenuLinkTest.php
@@ -16,7 +16,7 @@ class NodeAccessMenuLinkTest extends NodeTestBase {
    *
    * @var array
    */
-  public static $modules = ['menu_ui', 'block'];
+  protected static $modules = ['menu_ui', 'block'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Functional/NodeAccessPagerTest.php b/core/modules/node/tests/src/Functional/NodeAccessPagerTest.php
index 6641040c78e8b6f1f242388009650ed9fde20c22..ffb2b77678215bd275678ad11adf057450145b6f 100644
--- a/core/modules/node/tests/src/Functional/NodeAccessPagerTest.php
+++ b/core/modules/node/tests/src/Functional/NodeAccessPagerTest.php
@@ -21,7 +21,7 @@ class NodeAccessPagerTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['node_access_test', 'comment', 'forum'];
+  protected static $modules = ['node_access_test', 'comment', 'forum'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Functional/NodeActionsConfigurationTest.php b/core/modules/node/tests/src/Functional/NodeActionsConfigurationTest.php
index c9f0949694e4d4d6f04d97f2796f98db82577429..132e4e159b3a07e4c05bd7f49985980cd1ddc627 100644
--- a/core/modules/node/tests/src/Functional/NodeActionsConfigurationTest.php
+++ b/core/modules/node/tests/src/Functional/NodeActionsConfigurationTest.php
@@ -17,7 +17,7 @@ class NodeActionsConfigurationTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['action', 'node'];
+  protected static $modules = ['action', 'node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Functional/NodeAdminTest.php b/core/modules/node/tests/src/Functional/NodeAdminTest.php
index 3074fca898f6955f7b48831cef7c3dc03ffc53b7..00663b6436a35757b5d34e0243a2fb5963e84139 100644
--- a/core/modules/node/tests/src/Functional/NodeAdminTest.php
+++ b/core/modules/node/tests/src/Functional/NodeAdminTest.php
@@ -50,7 +50,7 @@ class NodeAdminTest extends NodeTestBase {
    *
    * @var array
    */
-  public static $modules = ['views'];
+  protected static $modules = ['views'];
 
   protected function setUp(): void {
     parent::setUp();
diff --git a/core/modules/node/tests/src/Functional/NodeBlockFunctionalTest.php b/core/modules/node/tests/src/Functional/NodeBlockFunctionalTest.php
index 5a39ed42632271ef0641357fe28c39ac712fc964..1bf46d2aef91e67dedc782dd4a00d7cf78179181 100644
--- a/core/modules/node/tests/src/Functional/NodeBlockFunctionalTest.php
+++ b/core/modules/node/tests/src/Functional/NodeBlockFunctionalTest.php
@@ -41,7 +41,7 @@ class NodeBlockFunctionalTest extends NodeTestBase {
    *
    * @var array
    */
-  public static $modules = ['block', 'views'];
+  protected static $modules = ['block', 'views'];
 
   protected function setUp(): void {
     parent::setUp();
diff --git a/core/modules/node/tests/src/Functional/NodeCacheTagsTest.php b/core/modules/node/tests/src/Functional/NodeCacheTagsTest.php
index 14c02669da13fa6169acb96a4e22b2a906800a21..191955a83e06aa3dcaaab874e6a01302e3bcc65a 100644
--- a/core/modules/node/tests/src/Functional/NodeCacheTagsTest.php
+++ b/core/modules/node/tests/src/Functional/NodeCacheTagsTest.php
@@ -17,7 +17,7 @@ class NodeCacheTagsTest extends EntityWithUriCacheTagsTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node'];
+  protected static $modules = ['node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Functional/NodeContextualLinksTest.php b/core/modules/node/tests/src/Functional/NodeContextualLinksTest.php
index a27bdc0dec63e79127f49016760de139a3ee5e2e..0159ae8e9f8fe9d03986ded1b8c72bb175ff0479 100644
--- a/core/modules/node/tests/src/Functional/NodeContextualLinksTest.php
+++ b/core/modules/node/tests/src/Functional/NodeContextualLinksTest.php
@@ -14,7 +14,7 @@ class NodeContextualLinksTest extends NodeTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'contextual',
   ];
 
diff --git a/core/modules/node/tests/src/Functional/NodeCreationTest.php b/core/modules/node/tests/src/Functional/NodeCreationTest.php
index 6c0fa08f38e0b81af50ff79ee72a30b1bfd010fa..34bcc1f39dc4d69d2ee054f731d4d952ad3d1af3 100644
--- a/core/modules/node/tests/src/Functional/NodeCreationTest.php
+++ b/core/modules/node/tests/src/Functional/NodeCreationTest.php
@@ -21,7 +21,7 @@ class NodeCreationTest extends NodeTestBase {
    *
    * @var array
    */
-  public static $modules = ['node_test_exception', 'dblog', 'test_page_test'];
+  protected static $modules = ['node_test_exception', 'dblog', 'test_page_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Functional/NodeDisplayConfigurableTest.php b/core/modules/node/tests/src/Functional/NodeDisplayConfigurableTest.php
index 9193b6efc95568c03f77d7b4edda350790305856..f13f2c126d31f285bfd0fc88b8a6b2b221c15b57 100644
--- a/core/modules/node/tests/src/Functional/NodeDisplayConfigurableTest.php
+++ b/core/modules/node/tests/src/Functional/NodeDisplayConfigurableTest.php
@@ -16,7 +16,7 @@ class NodeDisplayConfigurableTest extends NodeTestBase {
    *
    * @var array
    */
-  public static $modules = ['quickedit', 'rdf'];
+  protected static $modules = ['quickedit', 'rdf'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Functional/NodeEditFormTest.php b/core/modules/node/tests/src/Functional/NodeEditFormTest.php
index 5c4b0f8f1b5d2e66386c045404934aac51f05a09..fea180f3ae605bcb119d9f7724ece79d45a5002f 100644
--- a/core/modules/node/tests/src/Functional/NodeEditFormTest.php
+++ b/core/modules/node/tests/src/Functional/NodeEditFormTest.php
@@ -43,7 +43,7 @@ class NodeEditFormTest extends NodeTestBase {
    *
    * @var string[]
    */
-  public static $modules = ['block', 'node', 'datetime'];
+  protected static $modules = ['block', 'node', 'datetime'];
 
   protected function setUp(): void {
     parent::setUp();
diff --git a/core/modules/node/tests/src/Functional/NodeEntityViewModeAlterTest.php b/core/modules/node/tests/src/Functional/NodeEntityViewModeAlterTest.php
index c51af5d42c2bb0a93e2250ae3f56e6566faa5377..1575e9cf0051846947944e40051f01c96bb54d00 100644
--- a/core/modules/node/tests/src/Functional/NodeEntityViewModeAlterTest.php
+++ b/core/modules/node/tests/src/Functional/NodeEntityViewModeAlterTest.php
@@ -17,7 +17,7 @@ class NodeEntityViewModeAlterTest extends NodeTestBase {
   /**
    * Enable dummy module that implements hook_ENTITY_TYPE_view() for nodes.
    */
-  public static $modules = ['node_test'];
+  protected static $modules = ['node_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Functional/NodeFieldMultilingualTest.php b/core/modules/node/tests/src/Functional/NodeFieldMultilingualTest.php
index e600e0f8547c119665d354d209fc36c85f07d333..61c7c5caa79f9ec0ef6a97d7f117f80f1a702e57 100644
--- a/core/modules/node/tests/src/Functional/NodeFieldMultilingualTest.php
+++ b/core/modules/node/tests/src/Functional/NodeFieldMultilingualTest.php
@@ -20,7 +20,7 @@ class NodeFieldMultilingualTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'language'];
+  protected static $modules = ['node', 'language'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Functional/NodeFormSaveChangedTimeTest.php b/core/modules/node/tests/src/Functional/NodeFormSaveChangedTimeTest.php
index 911dbf2f05a38145dd0b14db05cba6a8ded09cdf..a896dedf595944fd0073ad8bab4d3f9ba9b6bf3d 100644
--- a/core/modules/node/tests/src/Functional/NodeFormSaveChangedTimeTest.php
+++ b/core/modules/node/tests/src/Functional/NodeFormSaveChangedTimeTest.php
@@ -16,7 +16,7 @@ class NodeFormSaveChangedTimeTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'node',
   ];
 
diff --git a/core/modules/node/tests/src/Functional/NodeHelpTest.php b/core/modules/node/tests/src/Functional/NodeHelpTest.php
index e4faff14e50d5d8882c12071377b6b4fd1fd2a17..394a326f5e6705161487602b66e8c3fc18d046a5 100644
--- a/core/modules/node/tests/src/Functional/NodeHelpTest.php
+++ b/core/modules/node/tests/src/Functional/NodeHelpTest.php
@@ -16,7 +16,7 @@ class NodeHelpTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['block', 'node', 'help'];
+  protected static $modules = ['block', 'node', 'help'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Functional/NodeLinksTest.php b/core/modules/node/tests/src/Functional/NodeLinksTest.php
index 31b222d5aabfe0b470e6cc1a4ac5841bb62651fb..327704c7a0f4c395de4fb1050a22f12514b7f277 100644
--- a/core/modules/node/tests/src/Functional/NodeLinksTest.php
+++ b/core/modules/node/tests/src/Functional/NodeLinksTest.php
@@ -16,7 +16,7 @@ class NodeLinksTest extends NodeTestBase {
    *
    * @var array
    */
-  public static $modules = ['views'];
+  protected static $modules = ['views'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Functional/NodeLoadMultipleTest.php b/core/modules/node/tests/src/Functional/NodeLoadMultipleTest.php
index 9ef947abcb4d01e51601e345c1ed79d3b2a59ac2..8977278391748b11d890adab7581ff9e21548fdc 100644
--- a/core/modules/node/tests/src/Functional/NodeLoadMultipleTest.php
+++ b/core/modules/node/tests/src/Functional/NodeLoadMultipleTest.php
@@ -17,7 +17,7 @@ class NodeLoadMultipleTest extends NodeTestBase {
    *
    * @var array
    */
-  public static $modules = ['views'];
+  protected static $modules = ['views'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Functional/NodePreviewAnonymousTest.php b/core/modules/node/tests/src/Functional/NodePreviewAnonymousTest.php
index e7d6e4c128fd9a3a42797969958b3e3cea7608b8..64a7c1ab5305a96a232023282608648477c4c2aa 100644
--- a/core/modules/node/tests/src/Functional/NodePreviewAnonymousTest.php
+++ b/core/modules/node/tests/src/Functional/NodePreviewAnonymousTest.php
@@ -18,7 +18,7 @@ class NodePreviewAnonymousTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['node'];
+  protected static $modules = ['node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Functional/NodeQueryAlterTest.php b/core/modules/node/tests/src/Functional/NodeQueryAlterTest.php
index cf6e8167adac01de801169e2c33da61a76363825..01dee93391cfa3724a43378cf3f2e0cc1fc6465a 100644
--- a/core/modules/node/tests/src/Functional/NodeQueryAlterTest.php
+++ b/core/modules/node/tests/src/Functional/NodeQueryAlterTest.php
@@ -16,7 +16,7 @@ class NodeQueryAlterTest extends NodeTestBase {
    *
    * @var array
    */
-  public static $modules = ['node_access_test'];
+  protected static $modules = ['node_access_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Functional/NodeRSSContentTest.php b/core/modules/node/tests/src/Functional/NodeRSSContentTest.php
index 1260786e92ddcbf39871c2d56b6690bb471d9222..b36b0327355297ff449399b003ea9a55955e0294 100644
--- a/core/modules/node/tests/src/Functional/NodeRSSContentTest.php
+++ b/core/modules/node/tests/src/Functional/NodeRSSContentTest.php
@@ -20,7 +20,7 @@ class NodeRSSContentTest extends NodeTestBase {
    *
    * @var array
    */
-  public static $modules = ['node_test', 'views'];
+  protected static $modules = ['node_test', 'views'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Functional/NodeRevisionsTest.php b/core/modules/node/tests/src/Functional/NodeRevisionsTest.php
index f8da3b3fcf98c7dffc64f7168bf20d509742a3d4..19c2f7c0b5c5000420c855a17d49d34f2add439d 100644
--- a/core/modules/node/tests/src/Functional/NodeRevisionsTest.php
+++ b/core/modules/node/tests/src/Functional/NodeRevisionsTest.php
@@ -41,7 +41,7 @@ class NodeRevisionsTest extends NodeTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'contextual', 'datetime', 'language', 'content_translation'];
+  protected static $modules = ['node', 'contextual', 'datetime', 'language', 'content_translation'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Functional/NodeRevisionsUiBypassAccessTest.php b/core/modules/node/tests/src/Functional/NodeRevisionsUiBypassAccessTest.php
index 3632d0b6c338cef4eda1bd5e147d0509101b1c46..a74d2d75c8474a102668bd78155d4e512bcbeb8f 100644
--- a/core/modules/node/tests/src/Functional/NodeRevisionsUiBypassAccessTest.php
+++ b/core/modules/node/tests/src/Functional/NodeRevisionsUiBypassAccessTest.php
@@ -30,7 +30,7 @@ class NodeRevisionsUiBypassAccessTest extends NodeTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['block'];
+  protected static $modules = ['block'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Functional/NodeSaveTest.php b/core/modules/node/tests/src/Functional/NodeSaveTest.php
index 00e96e849adf6bfd3e51304902d464b6ce457b1c..79e7cbb6f61c3054437d5eb84b04337f6471a46b 100644
--- a/core/modules/node/tests/src/Functional/NodeSaveTest.php
+++ b/core/modules/node/tests/src/Functional/NodeSaveTest.php
@@ -23,7 +23,7 @@ class NodeSaveTest extends NodeTestBase {
    *
    * @var array
    */
-  public static $modules = ['node_test'];
+  protected static $modules = ['node_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Functional/NodeSyndicateBlockTest.php b/core/modules/node/tests/src/Functional/NodeSyndicateBlockTest.php
index e0a316e18a12716511e9fa7e18c0a5ccf3cfc554..2cf6e8bbc8e98848423d4de3558218bd94d29497 100644
--- a/core/modules/node/tests/src/Functional/NodeSyndicateBlockTest.php
+++ b/core/modules/node/tests/src/Functional/NodeSyndicateBlockTest.php
@@ -14,7 +14,7 @@ class NodeSyndicateBlockTest extends NodeTestBase {
    *
    * @var array
    */
-  public static $modules = ['block'];
+  protected static $modules = ['block'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Functional/NodeTestBase.php b/core/modules/node/tests/src/Functional/NodeTestBase.php
index a05552cccd2ef2d921382065b5da7a4d33199ac0..a10b3b29e47c053614222a9fdd49b4f27e04e518 100644
--- a/core/modules/node/tests/src/Functional/NodeTestBase.php
+++ b/core/modules/node/tests/src/Functional/NodeTestBase.php
@@ -17,7 +17,7 @@ abstract class NodeTestBase extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'datetime'];
+  protected static $modules = ['node', 'datetime'];
 
   /**
    * The node access control handler.
diff --git a/core/modules/node/tests/src/Functional/NodeTitleTest.php b/core/modules/node/tests/src/Functional/NodeTitleTest.php
index 1280cbd63e851c93ac23e2718bcac4372807aee1..c2401b4e978af27784e32df0752d290600c53e75 100644
--- a/core/modules/node/tests/src/Functional/NodeTitleTest.php
+++ b/core/modules/node/tests/src/Functional/NodeTitleTest.php
@@ -19,7 +19,7 @@ class NodeTitleTest extends NodeTestBase {
    *
    * @var array
    */
-  public static $modules = ['comment', 'views', 'block'];
+  protected static $modules = ['comment', 'views', 'block'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Functional/NodeTranslationUITest.php b/core/modules/node/tests/src/Functional/NodeTranslationUITest.php
index 62f13d7e934afae69f392d47864875de42d8e558..fb9d22d36b848d2cc8a1930ce97a12abf0f56799 100644
--- a/core/modules/node/tests/src/Functional/NodeTranslationUITest.php
+++ b/core/modules/node/tests/src/Functional/NodeTranslationUITest.php
@@ -46,7 +46,7 @@ class NodeTranslationUITest extends ContentTranslationUITestBase {
    *
    * @var array
    */
-  public static $modules = ['block', 'language', 'content_translation', 'node', 'datetime', 'field_ui', 'help'];
+  protected static $modules = ['block', 'language', 'content_translation', 'node', 'datetime', 'field_ui', 'help'];
 
   /**
    * The profile to install as a basis for testing.
diff --git a/core/modules/node/tests/src/Functional/NodeTypeInitialLanguageTest.php b/core/modules/node/tests/src/Functional/NodeTypeInitialLanguageTest.php
index 3961f912523b6f87a32953b11cd01790e0df9b7b..2546c5081cde093c7c55eb3d5ad4db451d90219e 100644
--- a/core/modules/node/tests/src/Functional/NodeTypeInitialLanguageTest.php
+++ b/core/modules/node/tests/src/Functional/NodeTypeInitialLanguageTest.php
@@ -16,7 +16,7 @@ class NodeTypeInitialLanguageTest extends NodeTestBase {
    *
    * @var array
    */
-  public static $modules = ['language', 'field_ui'];
+  protected static $modules = ['language', 'field_ui'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Functional/NodeTypeTest.php b/core/modules/node/tests/src/Functional/NodeTypeTest.php
index 2977c5970f1b117e9b64a8fdee22de1c01a9cd82..049f01c8bf6e8ba70f81c132ab90f6fb20f72098 100644
--- a/core/modules/node/tests/src/Functional/NodeTypeTest.php
+++ b/core/modules/node/tests/src/Functional/NodeTypeTest.php
@@ -23,7 +23,7 @@ class NodeTypeTest extends NodeTestBase {
    *
    * @var array
    */
-  public static $modules = ['field_ui', 'block'];
+  protected static $modules = ['field_ui', 'block'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Functional/NodeTypeTranslationTest.php b/core/modules/node/tests/src/Functional/NodeTypeTranslationTest.php
index a14b46cf42ba8464727faa9d42492fc23c933af8..5785e0e39418537b3e8b8dad66a2d455a8cd8a7b 100644
--- a/core/modules/node/tests/src/Functional/NodeTypeTranslationTest.php
+++ b/core/modules/node/tests/src/Functional/NodeTypeTranslationTest.php
@@ -21,7 +21,7 @@ class NodeTypeTranslationTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'block',
     'config_translation',
     'field_ui',
diff --git a/core/modules/node/tests/src/Functional/NodeViewLanguageTest.php b/core/modules/node/tests/src/Functional/NodeViewLanguageTest.php
index 5876175a76690a7adfb9a278354410e8a721fcc1..70612d83e56dabd15461876ca977c46bd5043148 100644
--- a/core/modules/node/tests/src/Functional/NodeViewLanguageTest.php
+++ b/core/modules/node/tests/src/Functional/NodeViewLanguageTest.php
@@ -16,7 +16,7 @@ class NodeViewLanguageTest extends NodeTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'datetime', 'language'];
+  protected static $modules = ['node', 'datetime', 'language'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Functional/PagePreviewTest.php b/core/modules/node/tests/src/Functional/PagePreviewTest.php
index e6b1c700e7bf81cf26427141e4afcf90e5d3066d..6b1e702370ae70e5884447a42d514fb0812e3e63 100644
--- a/core/modules/node/tests/src/Functional/PagePreviewTest.php
+++ b/core/modules/node/tests/src/Functional/PagePreviewTest.php
@@ -32,7 +32,7 @@ class PagePreviewTest extends NodeTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'taxonomy', 'comment', 'image', 'file', 'text', 'node_test', 'menu_ui'];
+  protected static $modules = ['node', 'taxonomy', 'comment', 'image', 'file', 'text', 'node_test', 'menu_ui'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Functional/Rest/NodeJsonBasicAuthTest.php b/core/modules/node/tests/src/Functional/Rest/NodeJsonBasicAuthTest.php
index a0bbdfef053e14f8aacde00e58c60b4bd78dc246..4ffe43cb8838163fec6c058547056df6bc9c69ed 100644
--- a/core/modules/node/tests/src/Functional/Rest/NodeJsonBasicAuthTest.php
+++ b/core/modules/node/tests/src/Functional/Rest/NodeJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class NodeJsonBasicAuthTest extends NodeResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Functional/Rest/NodeResourceTestBase.php b/core/modules/node/tests/src/Functional/Rest/NodeResourceTestBase.php
index 5796245e3925fbe5438a7fd6fcefe4dcceb3c0c8..ecfbc78c32b7706a80f504612def3a43d35b0ed7 100644
--- a/core/modules/node/tests/src/Functional/Rest/NodeResourceTestBase.php
+++ b/core/modules/node/tests/src/Functional/Rest/NodeResourceTestBase.php
@@ -13,7 +13,7 @@ abstract class NodeResourceTestBase extends EntityResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'path'];
+  protected static $modules = ['node', 'path'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Functional/Rest/NodeTypeJsonBasicAuthTest.php b/core/modules/node/tests/src/Functional/Rest/NodeTypeJsonBasicAuthTest.php
index 870f0d0be261defe9ff0268edfab8720bdd0ffa6..edc3ff8e09d5029cb8511f7b8b93d040e6ca56ec 100644
--- a/core/modules/node/tests/src/Functional/Rest/NodeTypeJsonBasicAuthTest.php
+++ b/core/modules/node/tests/src/Functional/Rest/NodeTypeJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class NodeTypeJsonBasicAuthTest extends NodeTypeResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Functional/Rest/NodeTypeResourceTestBase.php b/core/modules/node/tests/src/Functional/Rest/NodeTypeResourceTestBase.php
index 9f56d621c1959416804c92938d7f101a81748dfe..65cf81777926f5fa37532ede9bcc94b9df227809 100644
--- a/core/modules/node/tests/src/Functional/Rest/NodeTypeResourceTestBase.php
+++ b/core/modules/node/tests/src/Functional/Rest/NodeTypeResourceTestBase.php
@@ -13,7 +13,7 @@ abstract class NodeTypeResourceTestBase extends EntityResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node'];
+  protected static $modules = ['node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Functional/Rest/NodeTypeXmlBasicAuthTest.php b/core/modules/node/tests/src/Functional/Rest/NodeTypeXmlBasicAuthTest.php
index 05fb962d7d474b5dd2ef036b41b6e3c9373d1fa1..0f6af1b8cb0d3fdb3cc6c87b7af35c0b176673bb 100644
--- a/core/modules/node/tests/src/Functional/Rest/NodeTypeXmlBasicAuthTest.php
+++ b/core/modules/node/tests/src/Functional/Rest/NodeTypeXmlBasicAuthTest.php
@@ -16,7 +16,7 @@ class NodeTypeXmlBasicAuthTest extends NodeTypeResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Functional/Rest/NodeXmlBasicAuthTest.php b/core/modules/node/tests/src/Functional/Rest/NodeXmlBasicAuthTest.php
index 9c738ee6be9cb524bceb609a233131bb7f0669bc..486b9a68ab31ca781d4dd85ce9b7d289cb0fae74 100644
--- a/core/modules/node/tests/src/Functional/Rest/NodeXmlBasicAuthTest.php
+++ b/core/modules/node/tests/src/Functional/Rest/NodeXmlBasicAuthTest.php
@@ -16,7 +16,7 @@ class NodeXmlBasicAuthTest extends NodeResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Functional/Views/BulkFormAccessTest.php b/core/modules/node/tests/src/Functional/Views/BulkFormAccessTest.php
index 4b687b0262fd02f3ed847a039436e33ab126d82e..7c7561c337a5e670e62f7eec9a852403a62c0c8e 100644
--- a/core/modules/node/tests/src/Functional/Views/BulkFormAccessTest.php
+++ b/core/modules/node/tests/src/Functional/Views/BulkFormAccessTest.php
@@ -22,7 +22,7 @@ class BulkFormAccessTest extends NodeTestBase {
    *
    * @var array
    */
-  public static $modules = ['node_test_views', 'node_access_test'];
+  protected static $modules = ['node_test_views', 'node_access_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Functional/Views/BulkFormTest.php b/core/modules/node/tests/src/Functional/Views/BulkFormTest.php
index 32507680899ff68e86c76fd3342f875de36897d8..0b28c1f8447c87e320a4ec90ff481e1deb3ab5e9 100644
--- a/core/modules/node/tests/src/Functional/Views/BulkFormTest.php
+++ b/core/modules/node/tests/src/Functional/Views/BulkFormTest.php
@@ -19,7 +19,7 @@ class BulkFormTest extends NodeTestBase {
    *
    * @var array
    */
-  public static $modules = ['node_test_views', 'language'];
+  protected static $modules = ['node_test_views', 'language'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Functional/Views/FilterNodeAccessTest.php b/core/modules/node/tests/src/Functional/Views/FilterNodeAccessTest.php
index 7015540e0a96972da7a803ecd6062474ab65e351..ce0c4eb0509ba128fa495c6c8838e6578d9e4ab4 100644
--- a/core/modules/node/tests/src/Functional/Views/FilterNodeAccessTest.php
+++ b/core/modules/node/tests/src/Functional/Views/FilterNodeAccessTest.php
@@ -22,7 +22,7 @@ class FilterNodeAccessTest extends NodeTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node_access_test'];
+  protected static $modules = ['node_access_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Functional/Views/FrontPageTest.php b/core/modules/node/tests/src/Functional/Views/FrontPageTest.php
index 8dae59a601104bae01d71f8712e8657a0f02fc9f..642387e2dae646572e5b5f81ca56bf94f9de3386 100644
--- a/core/modules/node/tests/src/Functional/Views/FrontPageTest.php
+++ b/core/modules/node/tests/src/Functional/Views/FrontPageTest.php
@@ -43,7 +43,7 @@ class FrontPageTest extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'contextual'];
+  protected static $modules = ['node', 'contextual'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Functional/Views/NodeContextualLinksTest.php b/core/modules/node/tests/src/Functional/Views/NodeContextualLinksTest.php
index 9dad4459c64b915035d44c7c8327b976c0ef0907..ee09a931e0479160db02edbbd4a9e849364db72a 100644
--- a/core/modules/node/tests/src/Functional/Views/NodeContextualLinksTest.php
+++ b/core/modules/node/tests/src/Functional/Views/NodeContextualLinksTest.php
@@ -16,7 +16,7 @@ class NodeContextualLinksTest extends NodeTestBase {
    *
    * @var array
    */
-  public static $modules = ['contextual'];
+  protected static $modules = ['contextual'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Functional/Views/NodeFieldFilterTest.php b/core/modules/node/tests/src/Functional/Views/NodeFieldFilterTest.php
index 6bb83666f924b1acb8453d8c3cebcabd28a8697d..77e0eed915bbedfb441ee4005dbd3549be510980 100644
--- a/core/modules/node/tests/src/Functional/Views/NodeFieldFilterTest.php
+++ b/core/modules/node/tests/src/Functional/Views/NodeFieldFilterTest.php
@@ -14,7 +14,7 @@ class NodeFieldFilterTest extends NodeTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['language'];
+  protected static $modules = ['language'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Functional/Views/NodeLanguageTest.php b/core/modules/node/tests/src/Functional/Views/NodeLanguageTest.php
index 344f2645fad6dad3e7956c67cb7b8d75ff66c419..b5d97c5a738824659acb146f5c44b4ea8c97ae14 100644
--- a/core/modules/node/tests/src/Functional/Views/NodeLanguageTest.php
+++ b/core/modules/node/tests/src/Functional/Views/NodeLanguageTest.php
@@ -19,7 +19,7 @@ class NodeLanguageTest extends NodeTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['language', 'node_test_views'];
+  protected static $modules = ['language', 'node_test_views'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Functional/Views/NodeTestBase.php b/core/modules/node/tests/src/Functional/Views/NodeTestBase.php
index b98778c503c6a32211ed70fce1e4c375bb0d5458..f8a6a3c9d64d98ad497599ba5fa199eb43420aae 100644
--- a/core/modules/node/tests/src/Functional/Views/NodeTestBase.php
+++ b/core/modules/node/tests/src/Functional/Views/NodeTestBase.php
@@ -13,7 +13,7 @@ abstract class NodeTestBase extends ViewTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node_test_views'];
+  protected static $modules = ['node_test_views'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Functional/Views/PathPluginTest.php b/core/modules/node/tests/src/Functional/Views/PathPluginTest.php
index c79fe1acbac4eae2aa8e344af9cde25e573934fb..7852f2851249913450deb0dd3a6ef792c4f600e6 100644
--- a/core/modules/node/tests/src/Functional/Views/PathPluginTest.php
+++ b/core/modules/node/tests/src/Functional/Views/PathPluginTest.php
@@ -16,7 +16,7 @@ class PathPluginTest extends NodeTestBase {
    *
    * @var array
    */
-  public static $modules = ['node'];
+  protected static $modules = ['node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Functional/Views/RowPluginTest.php b/core/modules/node/tests/src/Functional/Views/RowPluginTest.php
index 8e433c305d233ba053ab7313507d10f74c9cb3a3..47d48140ccd63b70d73a714075eae510bd592edb 100644
--- a/core/modules/node/tests/src/Functional/Views/RowPluginTest.php
+++ b/core/modules/node/tests/src/Functional/Views/RowPluginTest.php
@@ -17,7 +17,7 @@ class RowPluginTest extends NodeTestBase {
    *
    * @var array
    */
-  public static $modules = ['node'];
+  protected static $modules = ['node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Functional/Views/StatusExtraTest.php b/core/modules/node/tests/src/Functional/Views/StatusExtraTest.php
index 0347038d36fd5221603287b70ef78951632d1602..a876ca3e039c15ea757e18bc3748921fe636b5d6 100644
--- a/core/modules/node/tests/src/Functional/Views/StatusExtraTest.php
+++ b/core/modules/node/tests/src/Functional/Views/StatusExtraTest.php
@@ -15,7 +15,7 @@ class StatusExtraTest extends NodeTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node_test_views', 'content_moderation'];
+  protected static $modules = ['node_test_views', 'content_moderation'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/FunctionalJavascript/NodePreviewLinkTest.php b/core/modules/node/tests/src/FunctionalJavascript/NodePreviewLinkTest.php
index 3709bc9a8faaf5e3d884c02c6b3b2d91f82d9705..8b25fd7df69637c247b806f04204822385a9257d 100644
--- a/core/modules/node/tests/src/FunctionalJavascript/NodePreviewLinkTest.php
+++ b/core/modules/node/tests/src/FunctionalJavascript/NodePreviewLinkTest.php
@@ -15,7 +15,7 @@ class NodePreviewLinkTest extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'filter'];
+  protected static $modules = ['node', 'filter'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/FunctionalJavascript/TestSettingSummariesContentType.php b/core/modules/node/tests/src/FunctionalJavascript/TestSettingSummariesContentType.php
index c4f318e6d234282f8948f590006dda080a987796..d5cea26457cdf14e7260e6cfeefe6f11cd3e2b8b 100644
--- a/core/modules/node/tests/src/FunctionalJavascript/TestSettingSummariesContentType.php
+++ b/core/modules/node/tests/src/FunctionalJavascript/TestSettingSummariesContentType.php
@@ -19,7 +19,7 @@ class TestSettingSummariesContentType extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node'];
+  protected static $modules = ['node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Kernel/Action/UnpublishByKeywordActionTest.php b/core/modules/node/tests/src/Kernel/Action/UnpublishByKeywordActionTest.php
index d9cac5556d8c0bc678c018d1cb110f08e69cef56..510ffaac9b064ac19a8f5724bb61e550e1bf4dc1 100644
--- a/core/modules/node/tests/src/Kernel/Action/UnpublishByKeywordActionTest.php
+++ b/core/modules/node/tests/src/Kernel/Action/UnpublishByKeywordActionTest.php
@@ -16,7 +16,7 @@ class UnpublishByKeywordActionTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['action', 'node', 'system', 'user', 'field'];
+  protected static $modules = ['action', 'node', 'system', 'user', 'field'];
 
   protected function setUp(): void {
     parent::setUp();
diff --git a/core/modules/node/tests/src/Kernel/Config/NodeImportChangeTest.php b/core/modules/node/tests/src/Kernel/Config/NodeImportChangeTest.php
index 88d6aa15db700c866bd7a341af9443a50a91c9d9..4ba44ced36b9a177df312405d2b3dbabec9d0235 100644
--- a/core/modules/node/tests/src/Kernel/Config/NodeImportChangeTest.php
+++ b/core/modules/node/tests/src/Kernel/Config/NodeImportChangeTest.php
@@ -17,7 +17,7 @@ class NodeImportChangeTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'field', 'text', 'system', 'node_test_config', 'user'];
+  protected static $modules = ['node', 'field', 'text', 'system', 'node_test_config', 'user'];
 
   /**
    * Set the default field storage backend for fields created during tests.
diff --git a/core/modules/node/tests/src/Kernel/Config/NodeImportCreateTest.php b/core/modules/node/tests/src/Kernel/Config/NodeImportCreateTest.php
index cf7bb30ce8cb3e98530fd50967536662e7469efc..eace19cc5308d609fe201ca116c21c3622a29be1 100644
--- a/core/modules/node/tests/src/Kernel/Config/NodeImportCreateTest.php
+++ b/core/modules/node/tests/src/Kernel/Config/NodeImportCreateTest.php
@@ -19,7 +19,7 @@ class NodeImportCreateTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'field', 'text', 'system', 'user'];
+  protected static $modules = ['node', 'field', 'text', 'system', 'user'];
 
   /**
    * Set the default field storage backend for fields created during tests.
diff --git a/core/modules/node/tests/src/Kernel/Migrate/MigrateNodeStubTest.php b/core/modules/node/tests/src/Kernel/Migrate/MigrateNodeStubTest.php
index 5f561c84e8ba814c151c4de4f67c976c54478691..e5c50e2474c5bdb6b068843de9b0d8f97b743887 100644
--- a/core/modules/node/tests/src/Kernel/Migrate/MigrateNodeStubTest.php
+++ b/core/modules/node/tests/src/Kernel/Migrate/MigrateNodeStubTest.php
@@ -18,7 +18,7 @@ class MigrateNodeStubTest extends MigrateDrupalTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node'];
+  protected static $modules = ['node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Kernel/Migrate/MigrationPluginAlterTest.php b/core/modules/node/tests/src/Kernel/Migrate/MigrationPluginAlterTest.php
index 956381845f80b634eaf4833d629664d18d12e964..e234ab153924a41d6e8c11a2eaa4527aade6bd28 100644
--- a/core/modules/node/tests/src/Kernel/Migrate/MigrationPluginAlterTest.php
+++ b/core/modules/node/tests/src/Kernel/Migrate/MigrationPluginAlterTest.php
@@ -18,7 +18,7 @@ class MigrationPluginAlterTest extends MigrateTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['migrate_drupal', 'node'];
+  protected static $modules = ['migrate_drupal', 'node'];
 
   /**
    * {@inheritdoc}
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 ab30fc2c492daa8db4984ecb7354ad06a3c62df0..b32e0973549e3dbbf683ec5889f742b168893ea5 100644
--- a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeBundleSettingsTest.php
+++ b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeBundleSettingsTest.php
@@ -16,7 +16,7 @@ class MigrateNodeBundleSettingsTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['menu_ui'];
+  protected static $modules = ['menu_ui'];
 
   /**
    * {@inheritdoc}
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 2232d3c3fca6013c2cf75a101c159942421c468c..4d6783c195ae86cbb326697ab74cfbb2b2f433c3 100644
--- a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeCompleteTest.php
+++ b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeCompleteTest.php
@@ -19,7 +19,7 @@ class MigrateNodeCompleteTest extends MigrateNodeTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'language',
     'content_translation',
     'menu_ui',
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 ab54ceeb475bdae1b7b1e1236813c9224f903922..fb195da3e8fbfe8b09c4c7a253e7b62c7c9abfb3 100644
--- a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeRevisionTest.php
+++ b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeRevisionTest.php
@@ -21,7 +21,7 @@ class MigrateNodeRevisionTest extends MigrateNodeTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['language', 'content_translation', 'menu_ui'];
+  protected static $modules = ['language', 'content_translation', 'menu_ui'];
 
   /**
    * {@inheritdoc}
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 7e5007c072751a2c3bfa906f63649c5da0eeed88..ff49befcda41380a9d08e85f5c846fc1872789cf 100644
--- a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeSettingPromoteTest.php
+++ b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeSettingPromoteTest.php
@@ -10,7 +10,7 @@
  */
 class MigrateNodeSettingPromoteTest extends MigrateDrupal6TestBase {
 
-  public static $modules = ['node', 'text', 'menu_ui'];
+  protected static $modules = ['node', 'text', 'menu_ui'];
 
   /**
    * {@inheritdoc}
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 a1f9d1b4696b857c55bafd6d000de4a98bb94379..9a958a3da5136a2257be13481c8c59c2f2471722 100644
--- a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeSettingStatusTest.php
+++ b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeSettingStatusTest.php
@@ -10,7 +10,7 @@
  */
 class MigrateNodeSettingStatusTest extends MigrateDrupal6TestBase {
 
-  public static $modules = ['node', 'text', 'menu_ui'];
+  protected static $modules = ['node', 'text', 'menu_ui'];
 
   /**
    * {@inheritdoc}
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 d2c5b8d031fb75c15f0e860c386193292f50997c..264ea204b68fd75cfa81b317517569de15043bbb 100644
--- a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeSettingStickyTest.php
+++ b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeSettingStickyTest.php
@@ -10,7 +10,7 @@
  */
 class MigrateNodeSettingStickyTest extends MigrateDrupal6TestBase {
 
-  public static $modules = ['node', 'text', 'menu_ui'];
+  protected static $modules = ['node', 'text', 'menu_ui'];
 
   /**
    * {@inheritdoc}
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 e58299a77bbf600ec296772d0f612d45bd2c0568..46d027c7df870ac5f3740da26ffe104e299f98e3 100644
--- a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeTest.php
+++ b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeTest.php
@@ -19,7 +19,7 @@ class MigrateNodeTest extends MigrateNodeTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'language',
     'content_translation',
     'menu_ui',
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 e8ccaf9e827b2e1ff4a1fe1d0b5901443551506c..67b33ade9d0e895f106c793691a7ca7171547b94 100644
--- a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeTypeTest.php
+++ b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeTypeTest.php
@@ -16,7 +16,7 @@ class MigrateNodeTypeTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['menu_ui'];
+  protected static $modules = ['menu_ui'];
 
   /**
    * {@inheritdoc}
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 c4ea62088566bad529fcd0c4035fdbff244c25ca..5baeff7a249bd8e7922b0250b863bd8e4aac08b5 100644
--- a/core/modules/node/tests/src/Kernel/Migrate/d6/NodeTranslationRedirectTest.php
+++ b/core/modules/node/tests/src/Kernel/Migrate/d6/NodeTranslationRedirectTest.php
@@ -19,7 +19,7 @@ class NodeTranslationRedirectTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'content_translation',
     'language',
     'menu_ui',
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 a966da06cd083cafb0b8a254b7d0105d0a2ef0b0..cb39c471d1f1df0fa22145d5569bf882f895a168 100644
--- a/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeCompleteTest.php
+++ b/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeCompleteTest.php
@@ -23,7 +23,7 @@ class MigrateNodeCompleteTest extends MigrateDrupal7TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'content_translation',
     'comment',
     'datetime',
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 50b4a4f6646d0a3891c78f06a297329b0ab34ee9..a690112577c3efd5bc4dde9966adccfe1f54a30e 100644
--- a/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeDeriverTest.php
+++ b/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeDeriverTest.php
@@ -14,7 +14,7 @@ class MigrateNodeDeriverTest extends MigrateDrupal7TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node'];
+  protected static $modules = ['node'];
 
   /**
    * Test node translation migrations with translation disabled.
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 495d83b0d43ee451caa376848e76c176ab6c24b8..0af06a0f204d81bfe0e806186e3fb44eb8e35217 100644
--- a/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeRevisionTest.php
+++ b/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeRevisionTest.php
@@ -25,7 +25,7 @@ class MigrateNodeRevisionTest extends MigrateDrupal7TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'content_translation',
     'comment',
     'datetime',
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 6186b7ec9a15c741a1eb2af53767e17bb96852d9..571d8a5a2b1dcc93920760292a54d8e451cf68c2 100644
--- a/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeSettingsTest.php
+++ b/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeSettingsTest.php
@@ -19,7 +19,7 @@ class MigrateNodeSettingsTest extends MigrateDrupal7TestBase {
    *
    * @var array
    */
-  public static $modules = ['node'];
+  protected static $modules = ['node'];
 
   /**
    * {@inheritdoc}
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 bbc284faa1cc731b6e9a35474f0f580393543d15..22ac405e1114c3705ead91ae80cd62418eaf8264 100644
--- a/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeTest.php
+++ b/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeTest.php
@@ -21,7 +21,7 @@ class MigrateNodeTest extends MigrateDrupal7TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'content_translation',
     'comment',
     'datetime',
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 9ae54bc6d89969987a16558dcc6c44fe6a118fb1..ca1f8f0e0e1db2e4b2b100dd9f202826906dc687 100644
--- a/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeTitleLabelTest.php
+++ b/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeTitleLabelTest.php
@@ -12,7 +12,7 @@
  */
 class MigrateNodeTitleLabelTest extends MigrateDrupal7TestBase {
 
-  public static $modules = ['node', 'text', 'menu_ui'];
+  protected static $modules = ['node', 'text', 'menu_ui'];
 
   /**
    * {@inheritdoc}
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 4e314f0b97250fd9ff6a4dc3dee764e1d4452a00..529ae5a0162f6167107009cad43d30a8936f902d 100644
--- a/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeTypeTest.php
+++ b/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeTypeTest.php
@@ -20,7 +20,7 @@ class MigrateNodeTypeTest extends MigrateDrupal7TestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'text', 'menu_ui'];
+  protected static $modules = ['node', 'text', 'menu_ui'];
 
   /**
    * {@inheritdoc}
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 c8b2274b095f1d5c31bbf9c9b884b777fb8c496d..614ee6bbbd8634243c35a8ba21d9846f17e8f48d 100644
--- a/core/modules/node/tests/src/Kernel/Migrate/d7/NodeTranslationRedirectTest.php
+++ b/core/modules/node/tests/src/Kernel/Migrate/d7/NodeTranslationRedirectTest.php
@@ -19,7 +19,7 @@ class NodeTranslationRedirectTest extends MigrateDrupal7TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'content_translation',
     'language',
     'menu_ui',
diff --git a/core/modules/node/tests/src/Kernel/NodeAccessLanguageAwareCombinationTest.php b/core/modules/node/tests/src/Kernel/NodeAccessLanguageAwareCombinationTest.php
index 32a5ce135973d24f826c52f99c6e38c9f5faaac7..bceb5864d2da1005a9d2662cb4baadbb7cac7c77 100644
--- a/core/modules/node/tests/src/Kernel/NodeAccessLanguageAwareCombinationTest.php
+++ b/core/modules/node/tests/src/Kernel/NodeAccessLanguageAwareCombinationTest.php
@@ -23,7 +23,7 @@ class NodeAccessLanguageAwareCombinationTest extends NodeAccessTestBase {
    *
    * @var array
    */
-  public static $modules = ['language', 'node_access_test_language', 'node_access_test'];
+  protected static $modules = ['language', 'node_access_test_language', 'node_access_test'];
 
   /**
    * A set of nodes to use in testing.
diff --git a/core/modules/node/tests/src/Kernel/NodeAccessLanguageAwareTest.php b/core/modules/node/tests/src/Kernel/NodeAccessLanguageAwareTest.php
index 0e4eb590fd0a234e2ec8f0e050ab79f70dae17b5..b4f8dde78abe20e24ef7b79d4af06a706285dc39 100644
--- a/core/modules/node/tests/src/Kernel/NodeAccessLanguageAwareTest.php
+++ b/core/modules/node/tests/src/Kernel/NodeAccessLanguageAwareTest.php
@@ -22,7 +22,7 @@ class NodeAccessLanguageAwareTest extends NodeAccessTestBase {
    *
    * @var array
    */
-  public static $modules = ['language', 'node_access_test_language'];
+  protected static $modules = ['language', 'node_access_test_language'];
 
   /**
    * A set of nodes to use in testing.
diff --git a/core/modules/node/tests/src/Kernel/NodeAccessRecordsTest.php b/core/modules/node/tests/src/Kernel/NodeAccessRecordsTest.php
index 714f18cb43b40d19de308cb4fcd56a6f84a1490a..547127d6ddff8a2b8fb28cb04ede1dbcf9856a16 100644
--- a/core/modules/node/tests/src/Kernel/NodeAccessRecordsTest.php
+++ b/core/modules/node/tests/src/Kernel/NodeAccessRecordsTest.php
@@ -18,7 +18,7 @@ class NodeAccessRecordsTest extends NodeAccessTestBase {
    *
    * @var array
    */
-  public static $modules = ['node_test'];
+  protected static $modules = ['node_test'];
 
   /**
    * Creates a node and tests the creation of node access rules.
diff --git a/core/modules/node/tests/src/Kernel/NodeBodyFieldStorageTest.php b/core/modules/node/tests/src/Kernel/NodeBodyFieldStorageTest.php
index 780cd3e53bc30fe3d37b7eb73e5363a965bbbb2a..49ecd6c04cc78bcc8e7050913d2d57bb64bd63ff 100644
--- a/core/modules/node/tests/src/Kernel/NodeBodyFieldStorageTest.php
+++ b/core/modules/node/tests/src/Kernel/NodeBodyFieldStorageTest.php
@@ -19,7 +19,7 @@ class NodeBodyFieldStorageTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['user', 'system', 'field', 'node', 'text', 'filter'];
+  protected static $modules = ['user', 'system', 'field', 'node', 'text', 'filter'];
 
   protected function setUp(): void {
     parent::setUp();
diff --git a/core/modules/node/tests/src/Kernel/NodeConditionTest.php b/core/modules/node/tests/src/Kernel/NodeConditionTest.php
index acd0642d435dd1cfa560499f3752f108a24fcc57..0a9c6f7e201e5e66e42e8459f838deaa8e01d0c9 100644
--- a/core/modules/node/tests/src/Kernel/NodeConditionTest.php
+++ b/core/modules/node/tests/src/Kernel/NodeConditionTest.php
@@ -13,7 +13,7 @@
  */
 class NodeConditionTest extends EntityKernelTestBase {
 
-  public static $modules = ['node'];
+  protected static $modules = ['node'];
 
   protected function setUp(): void {
     parent::setUp();
diff --git a/core/modules/node/tests/src/Kernel/NodeFieldAccessTest.php b/core/modules/node/tests/src/Kernel/NodeFieldAccessTest.php
index 812731fc612f420f31728698aaa2e8e5b6311429..7794326c3f396e07cafcfbe224def6e323ff90af 100644
--- a/core/modules/node/tests/src/Kernel/NodeFieldAccessTest.php
+++ b/core/modules/node/tests/src/Kernel/NodeFieldAccessTest.php
@@ -19,7 +19,7 @@ class NodeFieldAccessTest extends EntityKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['node'];
+  protected static $modules = ['node'];
 
   /**
    * Fields that only users with administer nodes permissions can change.
diff --git a/core/modules/node/tests/src/Kernel/NodeFieldOverridesTest.php b/core/modules/node/tests/src/Kernel/NodeFieldOverridesTest.php
index 66724bd6bb7f0075ff9381c01d68724106d0f8ae..47a5b5c9e01d424afd427362734b1edf5f951017 100644
--- a/core/modules/node/tests/src/Kernel/NodeFieldOverridesTest.php
+++ b/core/modules/node/tests/src/Kernel/NodeFieldOverridesTest.php
@@ -27,7 +27,7 @@ class NodeFieldOverridesTest extends EntityKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['user', 'system', 'field', 'node'];
+  protected static $modules = ['user', 'system', 'field', 'node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Kernel/NodeListBuilderTest.php b/core/modules/node/tests/src/Kernel/NodeListBuilderTest.php
index a2bfec5984232384d69f6dcf7de8b4c59675c261..2f6b86bb5ebae1ae9ad84db09fa97b717caf94a3 100644
--- a/core/modules/node/tests/src/Kernel/NodeListBuilderTest.php
+++ b/core/modules/node/tests/src/Kernel/NodeListBuilderTest.php
@@ -15,7 +15,7 @@ class NodeListBuilderTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'user'];
+  protected static $modules = ['node', 'user'];
 
   protected function setUp(): void {
     parent::setUp();
diff --git a/core/modules/node/tests/src/Kernel/NodeOwnerTest.php b/core/modules/node/tests/src/Kernel/NodeOwnerTest.php
index 01e0f0ed64c3062aa31051059610f7a2950a5f7b..2a1865da6918857d1e3428f4f8b70f0284a95175 100644
--- a/core/modules/node/tests/src/Kernel/NodeOwnerTest.php
+++ b/core/modules/node/tests/src/Kernel/NodeOwnerTest.php
@@ -20,7 +20,7 @@ class NodeOwnerTest extends EntityKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'language'];
+  protected static $modules = ['node', 'language'];
 
   protected function setUp(): void {
     parent::setUp();
diff --git a/core/modules/node/tests/src/Kernel/NodeTokenReplaceTest.php b/core/modules/node/tests/src/Kernel/NodeTokenReplaceTest.php
index df690854788d41238c7261ef9392d0c9fa0f5e40..ab2d0f8f62349abf8aeb61b4fb3ded0b61a4fd2b 100644
--- a/core/modules/node/tests/src/Kernel/NodeTokenReplaceTest.php
+++ b/core/modules/node/tests/src/Kernel/NodeTokenReplaceTest.php
@@ -22,7 +22,7 @@ class NodeTokenReplaceTest extends TokenReplaceKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'filter'];
+  protected static $modules = ['node', 'filter'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Kernel/NodeValidationTest.php b/core/modules/node/tests/src/Kernel/NodeValidationTest.php
index 1f8369d18caec04c886d7f1feee58e92bc029f05..29452ec37d82be3779865163b181e929454ff406 100644
--- a/core/modules/node/tests/src/Kernel/NodeValidationTest.php
+++ b/core/modules/node/tests/src/Kernel/NodeValidationTest.php
@@ -18,7 +18,7 @@ class NodeValidationTest extends EntityKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['node'];
+  protected static $modules = ['node'];
 
   /**
    * Set the default field storage backend for fields created during tests.
diff --git a/core/modules/node/tests/src/Kernel/NodeViewBuilderTest.php b/core/modules/node/tests/src/Kernel/NodeViewBuilderTest.php
index 442a1c3c8f7699d730edc87cda64e0778cb1b3cc..b95338fb50d390e18fd4830bc55cb575ed1be921 100644
--- a/core/modules/node/tests/src/Kernel/NodeViewBuilderTest.php
+++ b/core/modules/node/tests/src/Kernel/NodeViewBuilderTest.php
@@ -19,7 +19,7 @@ class NodeViewBuilderTest extends EntityKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node'];
+  protected static $modules = ['node'];
 
   /**
    * The node storage.
diff --git a/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/NodeByNodeTypeTest.php b/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/NodeByNodeTypeTest.php
index d5a8db09da654d176be6c3237c10873da36213af..d35d6fee30ea950378c05aa6dfa37690efe7b859 100644
--- a/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/NodeByNodeTypeTest.php
+++ b/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/NodeByNodeTypeTest.php
@@ -16,7 +16,7 @@ class NodeByNodeTypeTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'user', 'migrate_drupal'];
+  protected static $modules = ['node', 'user', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/NodeRevisionByNodeTypeTest.php b/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/NodeRevisionByNodeTypeTest.php
index 27e17cc41f9bdf605b3f6fa66780f83f00cc5334..75434abc3333dce0b7a0a1c7b8bf3abdae362d6c 100644
--- a/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/NodeRevisionByNodeTypeTest.php
+++ b/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/NodeRevisionByNodeTypeTest.php
@@ -16,7 +16,7 @@ class NodeRevisionByNodeTypeTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'user', 'migrate_drupal'];
+  protected static $modules = ['node', 'user', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/NodeRevisionTest.php b/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/NodeRevisionTest.php
index fbc28c5ce01971abe7dbf901380da966ff7c8a79..11d63decc442387a93ff72a5d3f0fc46a1def0aa 100644
--- a/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/NodeRevisionTest.php
+++ b/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/NodeRevisionTest.php
@@ -16,7 +16,7 @@ class NodeRevisionTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'user', 'migrate_drupal'];
+  protected static $modules = ['node', 'user', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/NodeTest.php b/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/NodeTest.php
index 4bc1be0afebdad9bb2202e61cc598994b9683b6e..9a78d61da3ff602041afaa898289197114886687 100644
--- a/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/NodeTest.php
+++ b/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/NodeTest.php
@@ -16,7 +16,7 @@ class NodeTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'user', 'migrate_drupal'];
+  protected static $modules = ['node', 'user', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/NodeTranslationTest.php b/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/NodeTranslationTest.php
index e7de62b07a45e714bad4132a0d7a4fb9864b9c9e..95addeb8a0c1e05118ff582b2f92ef9eb9fef397 100644
--- a/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/NodeTranslationTest.php
+++ b/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/NodeTranslationTest.php
@@ -14,7 +14,7 @@ class NodeTranslationTest extends NodeTest {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'user', 'migrate_drupal'];
+  protected static $modules = ['node', 'user', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/NodeTypeTest.php b/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/NodeTypeTest.php
index 9d59f43f0b7e0386085655d5ab6be47ebf56232e..bd349c6113c78af4ff4b8bb82363863112f10838 100644
--- a/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/NodeTypeTest.php
+++ b/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/NodeTypeTest.php
@@ -16,7 +16,7 @@ class NodeTypeTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'user', 'migrate_drupal'];
+  protected static $modules = ['node', 'user', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/ViewModeTest.php b/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/ViewModeTest.php
index 18d941c8a50581fe342d415445c22ba31ed775ff..e818cbee00009e7b3380a0751be119f16e5049ae 100644
--- a/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/ViewModeTest.php
+++ b/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/ViewModeTest.php
@@ -16,7 +16,7 @@ class ViewModeTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'user', 'migrate_drupal'];
+  protected static $modules = ['node', 'user', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d7/NodeEntityTranslationTest.php b/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d7/NodeEntityTranslationTest.php
index 79fedae640c68ed6ebe215dbed3a0afb682e83d7..637f42a5bf6e7f2d22cf305be1b21dc57f230159 100644
--- a/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d7/NodeEntityTranslationTest.php
+++ b/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d7/NodeEntityTranslationTest.php
@@ -16,7 +16,7 @@ class NodeEntityTranslationTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'user', 'migrate_drupal'];
+  protected static $modules = ['node', 'user', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d7/NodeTest.php b/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d7/NodeTest.php
index 3b75837a686230f0c4d73e9e35e219534c689624..b3729292f586901b196b92a2c727c205451939bd 100644
--- a/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d7/NodeTest.php
+++ b/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d7/NodeTest.php
@@ -16,7 +16,7 @@ class NodeTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'user', 'migrate_drupal'];
+  protected static $modules = ['node', 'user', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d7/NodeTranslationTest.php b/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d7/NodeTranslationTest.php
index d3229e420c50183c94ff24dcc2b254b393aed6ac..da73d9123c375783acd292e7662f530b1e94b89d 100644
--- a/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d7/NodeTranslationTest.php
+++ b/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d7/NodeTranslationTest.php
@@ -14,7 +14,7 @@ class NodeTranslationTest extends NodeTest {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'user', 'migrate_drupal'];
+  protected static $modules = ['node', 'user', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d7/NodeTypeTest.php b/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d7/NodeTypeTest.php
index 5e876b7d4a0ff326823c0521a60c874f5e620ede..45f054110af552956407bed5be5deabc41c2dab1 100644
--- a/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d7/NodeTypeTest.php
+++ b/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d7/NodeTypeTest.php
@@ -16,7 +16,7 @@ class NodeTypeTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'user', 'migrate_drupal'];
+  protected static $modules = ['node', 'user', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Kernel/SummaryLengthTest.php b/core/modules/node/tests/src/Kernel/SummaryLengthTest.php
index fd004ea25c75a141d011f16c5bc7ca6fea260826..97830c656b0fa69fc1c314e5cecd6a9a90a40fc1 100644
--- a/core/modules/node/tests/src/Kernel/SummaryLengthTest.php
+++ b/core/modules/node/tests/src/Kernel/SummaryLengthTest.php
@@ -36,7 +36,7 @@ class SummaryLengthTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'node',
     'datetime',
     'user',
diff --git a/core/modules/node/tests/src/Kernel/Views/ArgumentUidRevisionTest.php b/core/modules/node/tests/src/Kernel/Views/ArgumentUidRevisionTest.php
index bb7ad72a7969a15edf666294ac7d4f861172e094..c6d69f144b85ac1afd40f1729550ec72cd9fca8d 100644
--- a/core/modules/node/tests/src/Kernel/Views/ArgumentUidRevisionTest.php
+++ b/core/modules/node/tests/src/Kernel/Views/ArgumentUidRevisionTest.php
@@ -19,7 +19,7 @@ class ArgumentUidRevisionTest extends ViewsKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'field', 'text', 'user', 'node_test_views'];
+  protected static $modules = ['node', 'field', 'text', 'user', 'node_test_views'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Kernel/Views/NidArgumentTest.php b/core/modules/node/tests/src/Kernel/Views/NidArgumentTest.php
index 83e1033073f75492d393d1206519cf04216bfc7c..136931b0c6d9f9e26cfb90b1bede02883cdd8bfb 100644
--- a/core/modules/node/tests/src/Kernel/Views/NidArgumentTest.php
+++ b/core/modules/node/tests/src/Kernel/Views/NidArgumentTest.php
@@ -18,7 +18,7 @@ class NidArgumentTest extends ViewsKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'field', 'text', 'node_test_config', 'user', 'node_test_views'];
+  protected static $modules = ['node', 'field', 'text', 'node_test_config', 'user', 'node_test_views'];
 
   /**
    * Views used by this test.
diff --git a/core/modules/node/tests/src/Kernel/Views/NodeViewsFieldAccessTest.php b/core/modules/node/tests/src/Kernel/Views/NodeViewsFieldAccessTest.php
index 44be16227d2a53fe63e36fb0915f00d6499a7c14..0a6a56cf96b63eee469d3bc1fa88c126ad516244 100644
--- a/core/modules/node/tests/src/Kernel/Views/NodeViewsFieldAccessTest.php
+++ b/core/modules/node/tests/src/Kernel/Views/NodeViewsFieldAccessTest.php
@@ -17,7 +17,7 @@ class NodeViewsFieldAccessTest extends FieldFieldAccessTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'entity_test'];
+  protected static $modules = ['node', 'entity_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Kernel/Views/RevisionCreateTimestampTest.php b/core/modules/node/tests/src/Kernel/Views/RevisionCreateTimestampTest.php
index 7f23067b720e97d9ec77a280325125061953adbc..52b38b8e113963e4ee3b95775b441ed3b387c797 100644
--- a/core/modules/node/tests/src/Kernel/Views/RevisionCreateTimestampTest.php
+++ b/core/modules/node/tests/src/Kernel/Views/RevisionCreateTimestampTest.php
@@ -18,7 +18,7 @@ class RevisionCreateTimestampTest extends ViewsKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node_test_views', 'node', 'views', 'user'];
+  protected static $modules = ['node_test_views', 'node', 'views', 'user'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Kernel/Views/RevisionRelationshipsTest.php b/core/modules/node/tests/src/Kernel/Views/RevisionRelationshipsTest.php
index 2c917a4ebedd586267f99e757ff7677b839ac98d..8ae67a07a76490d280efc2dfd64886bfdc8ea2cd 100644
--- a/core/modules/node/tests/src/Kernel/Views/RevisionRelationshipsTest.php
+++ b/core/modules/node/tests/src/Kernel/Views/RevisionRelationshipsTest.php
@@ -21,7 +21,7 @@ class RevisionRelationshipsTest extends ViewsKernelTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'node',
     'node_test_views',
     'language',
diff --git a/core/modules/node/tests/src/Kernel/Views/RevisionUidTest.php b/core/modules/node/tests/src/Kernel/Views/RevisionUidTest.php
index 190ff46ef28097a25f07a28c7570e2244a967b60..7cad1ed92e4742a820aa2b915bae7a00cba04392 100644
--- a/core/modules/node/tests/src/Kernel/Views/RevisionUidTest.php
+++ b/core/modules/node/tests/src/Kernel/Views/RevisionUidTest.php
@@ -23,7 +23,7 @@ class RevisionUidTest extends ViewsKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'node',
     'node_test_views',
     'system',
diff --git a/core/modules/options/tests/src/Functional/OptionsDynamicValuesTestBase.php b/core/modules/options/tests/src/Functional/OptionsDynamicValuesTestBase.php
index e73611aba80861bd01f45d4abdff56dfd666c298..c188bba794ff0e4268ccec253a0ed144429a88a2 100644
--- a/core/modules/options/tests/src/Functional/OptionsDynamicValuesTestBase.php
+++ b/core/modules/options/tests/src/Functional/OptionsDynamicValuesTestBase.php
@@ -17,7 +17,7 @@ abstract class OptionsDynamicValuesTestBase extends FieldTestBase {
    *
    * @var array
    */
-  public static $modules = ['options', 'entity_test', 'options_test'];
+  protected static $modules = ['options', 'entity_test', 'options_test'];
 
   /**
    * The created entity.
diff --git a/core/modules/options/tests/src/Functional/OptionsFieldUITest.php b/core/modules/options/tests/src/Functional/OptionsFieldUITest.php
index 4edb16e7e0a08b31218858971a7b49a805e56eac..72838bfdf9a4bee9e5d22ab15c581d9e45783989 100644
--- a/core/modules/options/tests/src/Functional/OptionsFieldUITest.php
+++ b/core/modules/options/tests/src/Functional/OptionsFieldUITest.php
@@ -19,7 +19,7 @@ class OptionsFieldUITest extends FieldTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'options', 'field_test', 'taxonomy', 'field_ui'];
+  protected static $modules = ['node', 'options', 'field_test', 'taxonomy', 'field_ui'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/options/tests/src/Functional/OptionsFloatFieldImportTest.php b/core/modules/options/tests/src/Functional/OptionsFloatFieldImportTest.php
index 4a3376e0fb0a5c63c8a1bebe6f87df7d6bea5c5d..005f24407f55d3f9e5fdc446b0a34459a18367c6 100644
--- a/core/modules/options/tests/src/Functional/OptionsFloatFieldImportTest.php
+++ b/core/modules/options/tests/src/Functional/OptionsFloatFieldImportTest.php
@@ -18,7 +18,7 @@ class OptionsFloatFieldImportTest extends FieldTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'options', 'field_ui', 'config', 'options_config_install_test'];
+  protected static $modules = ['node', 'options', 'field_ui', 'config', 'options_config_install_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/options/tests/src/Functional/OptionsWidgetsTest.php b/core/modules/options/tests/src/Functional/OptionsWidgetsTest.php
index c1cd5d3849c0d4a24ee3fd090457408dfcd93c14..587f24654bd478671d1fd4d134e4fc9ee093990f 100644
--- a/core/modules/options/tests/src/Functional/OptionsWidgetsTest.php
+++ b/core/modules/options/tests/src/Functional/OptionsWidgetsTest.php
@@ -19,7 +19,7 @@ class OptionsWidgetsTest extends FieldTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'options', 'entity_test', 'options_test', 'taxonomy', 'field_ui'];
+  protected static $modules = ['node', 'options', 'entity_test', 'options_test', 'taxonomy', 'field_ui'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/options/tests/src/Kernel/OptionsFieldTest.php b/core/modules/options/tests/src/Kernel/OptionsFieldTest.php
index 6ed2fda2cb9ec1ff30793559e53a4721608ff875..55d8732479ca1c64c51e821f57a6ed7a9cefe44b 100644
--- a/core/modules/options/tests/src/Kernel/OptionsFieldTest.php
+++ b/core/modules/options/tests/src/Kernel/OptionsFieldTest.php
@@ -19,7 +19,7 @@ class OptionsFieldTest extends OptionsFieldUnitTestBase {
    *
    * @var array
    */
-  public static $modules = ['options'];
+  protected static $modules = ['options'];
 
   /**
    * Test that allowed values can be updated.
diff --git a/core/modules/options/tests/src/Kernel/OptionsFieldUnitTestBase.php b/core/modules/options/tests/src/Kernel/OptionsFieldUnitTestBase.php
index 05f0c64a490662fc6958a2330daaf19c1213c0c8..331dd33349fa1d4b59965e2bd907092f91daf736 100644
--- a/core/modules/options/tests/src/Kernel/OptionsFieldUnitTestBase.php
+++ b/core/modules/options/tests/src/Kernel/OptionsFieldUnitTestBase.php
@@ -16,7 +16,7 @@ abstract class OptionsFieldUnitTestBase extends FieldKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['options'];
+  protected static $modules = ['options'];
 
   /**
    * The field name used in the test.
diff --git a/core/modules/options/tests/src/Kernel/Views/FileViewsDataTest.php b/core/modules/options/tests/src/Kernel/Views/FileViewsDataTest.php
index c713863ff31b03b43b9d51b3a95b1c9c86ed22ab..2867dcddb6471ee848900bd60664c59e410b6f4a 100644
--- a/core/modules/options/tests/src/Kernel/Views/FileViewsDataTest.php
+++ b/core/modules/options/tests/src/Kernel/Views/FileViewsDataTest.php
@@ -19,7 +19,7 @@ class FileViewsDataTest extends ViewsKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['file', 'views', 'entity_test', 'user', 'field'];
+  protected static $modules = ['file', 'views', 'entity_test', 'user', 'field'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/options/tests/src/Kernel/Views/OptionsTestBase.php b/core/modules/options/tests/src/Kernel/Views/OptionsTestBase.php
index 9f53e63313fa75e64e38633ef2a17194698eebc0..4f612b6a5ee1714dc95b894728f903a969d03232 100644
--- a/core/modules/options/tests/src/Kernel/Views/OptionsTestBase.php
+++ b/core/modules/options/tests/src/Kernel/Views/OptionsTestBase.php
@@ -19,7 +19,7 @@ abstract class OptionsTestBase extends ViewsKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['options', 'options_test_views', 'node', 'user', 'field'];
+  protected static $modules = ['options', 'options_test_views', 'node', 'user', 'field'];
 
   /**
    * Stores the nodes used for the different tests.
diff --git a/core/modules/options/tests/src/Kernel/Views/ViewsDataTest.php b/core/modules/options/tests/src/Kernel/Views/ViewsDataTest.php
index a537378f489b8aa465ac917914b8acf2a8e7c370..be4f6a64c79a96f52cfb2b2fbb405c10117b2b77 100644
--- a/core/modules/options/tests/src/Kernel/Views/ViewsDataTest.php
+++ b/core/modules/options/tests/src/Kernel/Views/ViewsDataTest.php
@@ -15,7 +15,7 @@ class ViewsDataTest extends OptionsTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['options', 'options_test', 'entity_test', 'views'];
+  protected static $modules = ['options', 'options_test', 'entity_test', 'views'];
 
   /**
    * The field storage.
diff --git a/core/modules/page_cache/tests/src/Functional/PageCacheTest.php b/core/modules/page_cache/tests/src/Functional/PageCacheTest.php
index e45958a55caa9c3d22c5e3ce80134506b537aa03..b607560adc18259bb894d6098775dd8e6c7d6748 100644
--- a/core/modules/page_cache/tests/src/Functional/PageCacheTest.php
+++ b/core/modules/page_cache/tests/src/Functional/PageCacheTest.php
@@ -27,7 +27,7 @@ class PageCacheTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['test_page_test', 'system_test', 'entity_test'];
+  protected static $modules = ['test_page_test', 'system_test', 'entity_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/path/tests/src/Functional/PathAdminTest.php b/core/modules/path/tests/src/Functional/PathAdminTest.php
index 6dc3eb141b08091f206ab34b93370104d44fddb6..771853798eceb790c6cc4c2aaf753c0bf27d515e 100644
--- a/core/modules/path/tests/src/Functional/PathAdminTest.php
+++ b/core/modules/path/tests/src/Functional/PathAdminTest.php
@@ -14,7 +14,7 @@ class PathAdminTest extends PathTestBase {
    *
    * @var array
    */
-  public static $modules = ['path'];
+  protected static $modules = ['path'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/path/tests/src/Functional/PathAliasTest.php b/core/modules/path/tests/src/Functional/PathAliasTest.php
index faf5c30648a8df1d940ee0e871ac28c831190461..b4f6f8bed3a381790054becf44f42f0d2207680e 100644
--- a/core/modules/path/tests/src/Functional/PathAliasTest.php
+++ b/core/modules/path/tests/src/Functional/PathAliasTest.php
@@ -19,7 +19,7 @@ class PathAliasTest extends PathTestBase {
    *
    * @var array
    */
-  public static $modules = ['path'];
+  protected static $modules = ['path'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/path/tests/src/Functional/PathContentModerationTest.php b/core/modules/path/tests/src/Functional/PathContentModerationTest.php
index 02ba24f6004cda9ee7ef58db52e93052d296b63e..eebeb2cdb79b4dbd868b5f14ebd3ff5d8c56678e 100644
--- a/core/modules/path/tests/src/Functional/PathContentModerationTest.php
+++ b/core/modules/path/tests/src/Functional/PathContentModerationTest.php
@@ -21,7 +21,7 @@ class PathContentModerationTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'node',
     'path',
     'content_moderation',
diff --git a/core/modules/path/tests/src/Functional/PathLanguageTest.php b/core/modules/path/tests/src/Functional/PathLanguageTest.php
index 43f174bbc10b6b71737335a3865252344d8aefda..3ccb545de4c0c3e5f703330a74d52c49002c5e36 100644
--- a/core/modules/path/tests/src/Functional/PathLanguageTest.php
+++ b/core/modules/path/tests/src/Functional/PathLanguageTest.php
@@ -14,7 +14,7 @@ class PathLanguageTest extends PathTestBase {
    *
    * @var array
    */
-  public static $modules = ['path', 'locale', 'locale_test', 'content_translation'];
+  protected static $modules = ['path', 'locale', 'locale_test', 'content_translation'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/path/tests/src/Functional/PathLanguageUiTest.php b/core/modules/path/tests/src/Functional/PathLanguageUiTest.php
index ff9802e849e36fdf354eb7e22b4d9332064e452d..19c832791c7a7b7a9acee0d9ddd58e23e11bbc6d 100644
--- a/core/modules/path/tests/src/Functional/PathLanguageUiTest.php
+++ b/core/modules/path/tests/src/Functional/PathLanguageUiTest.php
@@ -16,7 +16,7 @@ class PathLanguageUiTest extends PathTestBase {
    *
    * @var array
    */
-  public static $modules = ['path', 'locale', 'locale_test'];
+  protected static $modules = ['path', 'locale', 'locale_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/path/tests/src/Functional/PathMediaFormTest.php b/core/modules/path/tests/src/Functional/PathMediaFormTest.php
index 128dbe030cec0df24550f4114a9912921d038403..aa6b9555e89024a720fe218653ff6cf14fa28d7c 100644
--- a/core/modules/path/tests/src/Functional/PathMediaFormTest.php
+++ b/core/modules/path/tests/src/Functional/PathMediaFormTest.php
@@ -14,7 +14,7 @@ class PathMediaFormTest extends PathTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['media', 'media_test_source'];
+  protected static $modules = ['media', 'media_test_source'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/path/tests/src/Functional/PathNodeFormTest.php b/core/modules/path/tests/src/Functional/PathNodeFormTest.php
index bd5d80e09d93a53fab8dcd3d871a922389ce6567..075fe4eada474fa75f242eec48272011bd5bfe03 100644
--- a/core/modules/path/tests/src/Functional/PathNodeFormTest.php
+++ b/core/modules/path/tests/src/Functional/PathNodeFormTest.php
@@ -14,7 +14,7 @@ class PathNodeFormTest extends PathTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'path'];
+  protected static $modules = ['node', 'path'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/path/tests/src/Functional/PathTaxonomyTermTest.php b/core/modules/path/tests/src/Functional/PathTaxonomyTermTest.php
index f786ee0b85575e897841355462c567b629dbe2f0..30c584e5aa417da35ffc48a2c3633ab81396f794 100644
--- a/core/modules/path/tests/src/Functional/PathTaxonomyTermTest.php
+++ b/core/modules/path/tests/src/Functional/PathTaxonomyTermTest.php
@@ -17,7 +17,7 @@ class PathTaxonomyTermTest extends PathTestBase {
    *
    * @var array
    */
-  public static $modules = ['taxonomy'];
+  protected static $modules = ['taxonomy'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/path/tests/src/Functional/PathTestBase.php b/core/modules/path/tests/src/Functional/PathTestBase.php
index ca6f03c9016754118af777f3baa0b7e82854f07f..3e448f2565a9c86169236283323922bcff14c4c8 100644
--- a/core/modules/path/tests/src/Functional/PathTestBase.php
+++ b/core/modules/path/tests/src/Functional/PathTestBase.php
@@ -17,7 +17,7 @@ abstract class PathTestBase extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'path'];
+  protected static $modules = ['node', 'path'];
 
   protected function setUp() {
     parent::setUp();
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 1728bb29364bb52ae6479f6e9fd45497511ac8e9..974cfd54e0b14bd3156f89114359c3b621afad94 100644
--- a/core/modules/path/tests/src/Kernel/Migrate/d6/MigrateUrlAliasTest.php
+++ b/core/modules/path/tests/src/Kernel/Migrate/d6/MigrateUrlAliasTest.php
@@ -20,7 +20,7 @@ class MigrateUrlAliasTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'language',
     'content_translation',
     'path',
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 b717d0d404d202c938fc9178568b4a57b870c3a7..a73d0e5d39445baa8dbbd7d0fb65f58a65176d56 100644
--- a/core/modules/path/tests/src/Kernel/Migrate/d7/MigrateUrlAliasTest.php
+++ b/core/modules/path/tests/src/Kernel/Migrate/d7/MigrateUrlAliasTest.php
@@ -12,7 +12,7 @@ class MigrateUrlAliasTest extends MigrateUrlAliasTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'path_alias',
     'content_translation',
     'migrate_drupal_multilingual',
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 86a11fe71dfce2127e3821f843144191c4e53dda..c1271fd68e540a2e5e93e63c5cd645eca531825a 100644
--- a/core/modules/path/tests/src/Kernel/Migrate/d7/MigrateUrlAliasTestBase.php
+++ b/core/modules/path/tests/src/Kernel/Migrate/d7/MigrateUrlAliasTestBase.php
@@ -17,7 +17,7 @@ abstract class MigrateUrlAliasTestBase extends MigrateDrupal7TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'language',
     'menu_ui',
     'node',
diff --git a/core/modules/path/tests/src/Kernel/PathItemTest.php b/core/modules/path/tests/src/Kernel/PathItemTest.php
index c46966b85676346d0a7f7b689d047e52ce5e7a01..bfb1c93b37d91c094eb7a8e38dcab5dbc8a70229 100644
--- a/core/modules/path/tests/src/Kernel/PathItemTest.php
+++ b/core/modules/path/tests/src/Kernel/PathItemTest.php
@@ -19,7 +19,7 @@ class PathItemTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['path', 'path_alias', 'node', 'user', 'system', 'language', 'content_translation'];
+  protected static $modules = ['path', 'path_alias', 'node', 'user', 'system', 'language', 'content_translation'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/path/tests/src/Kernel/PathNoCanonicalLinkTest.php b/core/modules/path/tests/src/Kernel/PathNoCanonicalLinkTest.php
index bb6790b3b7178a24e5d394b5645164bd6f67ad74..f8631f2b159aa05ddc99c3aaf894cebac44f1230 100644
--- a/core/modules/path/tests/src/Kernel/PathNoCanonicalLinkTest.php
+++ b/core/modules/path/tests/src/Kernel/PathNoCanonicalLinkTest.php
@@ -18,7 +18,7 @@ class PathNoCanonicalLinkTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['path', 'content_translation_test', 'language', 'entity_test', 'user', 'system'];
+  protected static $modules = ['path', 'content_translation_test', 'language', 'entity_test', 'user', 'system'];
 
   protected function setUp(): void {
     parent::setUp();
diff --git a/core/modules/path/tests/src/Kernel/Plugin/migrate/source/d6/UrlAliasTest.php b/core/modules/path/tests/src/Kernel/Plugin/migrate/source/d6/UrlAliasTest.php
index 1057dffbee66a725e646f647de54d5f4c572c285..4cfe6d12268f9871662866a22eb48248772d6cdb 100644
--- a/core/modules/path/tests/src/Kernel/Plugin/migrate/source/d6/UrlAliasTest.php
+++ b/core/modules/path/tests/src/Kernel/Plugin/migrate/source/d6/UrlAliasTest.php
@@ -15,7 +15,7 @@ class UrlAliasTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['migrate_drupal', 'path'];
+  protected static $modules = ['migrate_drupal', 'path'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/path/tests/src/Kernel/Plugin/migrate/source/d7/UrlAliasTest.php b/core/modules/path/tests/src/Kernel/Plugin/migrate/source/d7/UrlAliasTest.php
index 2fdfd361d66c2e101ef4715a695796dadffd278e..191b0794d962a90f4a60a735994e683d187ee81d 100644
--- a/core/modules/path/tests/src/Kernel/Plugin/migrate/source/d7/UrlAliasTest.php
+++ b/core/modules/path/tests/src/Kernel/Plugin/migrate/source/d7/UrlAliasTest.php
@@ -15,7 +15,7 @@ class UrlAliasTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['migrate_drupal', 'path'];
+  protected static $modules = ['migrate_drupal', 'path'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/path_alias/tests/src/Functional/Hal/PathAliasHalJsonAnonTest.php b/core/modules/path_alias/tests/src/Functional/Hal/PathAliasHalJsonAnonTest.php
index 60917af353cfd8db85a9686b4eba9dfa46012582..456d33d6161ea67156cd47f2d9f7c85a86d87c76 100644
--- a/core/modules/path_alias/tests/src/Functional/Hal/PathAliasHalJsonAnonTest.php
+++ b/core/modules/path_alias/tests/src/Functional/Hal/PathAliasHalJsonAnonTest.php
@@ -15,7 +15,7 @@ class PathAliasHalJsonAnonTest extends PathAliasHalJsonTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/path_alias/tests/src/Functional/Hal/PathAliasHalJsonBasicAuthTest.php b/core/modules/path_alias/tests/src/Functional/Hal/PathAliasHalJsonBasicAuthTest.php
index 3007a157e0deda91fe1a7f2edb29d333a0e107e5..23dc427ef9a74b424e3b15b547087de827caab6e 100644
--- a/core/modules/path_alias/tests/src/Functional/Hal/PathAliasHalJsonBasicAuthTest.php
+++ b/core/modules/path_alias/tests/src/Functional/Hal/PathAliasHalJsonBasicAuthTest.php
@@ -15,7 +15,7 @@ class PathAliasHalJsonBasicAuthTest extends PathAliasHalJsonTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal', 'basic_auth'];
+  protected static $modules = ['hal', 'basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/path_alias/tests/src/Functional/Hal/PathAliasHalJsonCookieTest.php b/core/modules/path_alias/tests/src/Functional/Hal/PathAliasHalJsonCookieTest.php
index 62f39885a364f2772bb6bc748395f83c3cdd760c..e4567cd2b5863061c39d19ef6ebd2b20de0c7758 100644
--- a/core/modules/path_alias/tests/src/Functional/Hal/PathAliasHalJsonCookieTest.php
+++ b/core/modules/path_alias/tests/src/Functional/Hal/PathAliasHalJsonCookieTest.php
@@ -15,7 +15,7 @@ class PathAliasHalJsonCookieTest extends PathAliasHalJsonTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/path_alias/tests/src/Functional/Rest/PathAliasJsonBasicAuthTest.php b/core/modules/path_alias/tests/src/Functional/Rest/PathAliasJsonBasicAuthTest.php
index 17cd95e8961f1ad09404e091e71b9c5a4c106c4a..cb09b37055581d6dce99cdd195c47e98cdc74258 100644
--- a/core/modules/path_alias/tests/src/Functional/Rest/PathAliasJsonBasicAuthTest.php
+++ b/core/modules/path_alias/tests/src/Functional/Rest/PathAliasJsonBasicAuthTest.php
@@ -16,7 +16,7 @@ class PathAliasJsonBasicAuthTest extends PathAliasResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/path_alias/tests/src/Functional/Rest/PathAliasResourceTestBase.php b/core/modules/path_alias/tests/src/Functional/Rest/PathAliasResourceTestBase.php
index 27747a171201365259cf0be44e202cb4612f12fe..1398159a4fe18d947c9efc64a792a3f08ca23372 100644
--- a/core/modules/path_alias/tests/src/Functional/Rest/PathAliasResourceTestBase.php
+++ b/core/modules/path_alias/tests/src/Functional/Rest/PathAliasResourceTestBase.php
@@ -14,7 +14,7 @@ abstract class PathAliasResourceTestBase extends EntityResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['path_alias'];
+  protected static $modules = ['path_alias'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/path_alias/tests/src/Functional/Rest/PathAliasXmlBasicAuthTest.php b/core/modules/path_alias/tests/src/Functional/Rest/PathAliasXmlBasicAuthTest.php
index eda55d9f03292da15773fdceed440099bbaf6e7b..c1700ed265c94adb117f23190f5cdf7a85da6152 100644
--- a/core/modules/path_alias/tests/src/Functional/Rest/PathAliasXmlBasicAuthTest.php
+++ b/core/modules/path_alias/tests/src/Functional/Rest/PathAliasXmlBasicAuthTest.php
@@ -18,7 +18,7 @@ class PathAliasXmlBasicAuthTest extends PathAliasResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/path_alias/tests/src/Functional/UrlAlterFunctionalTest.php b/core/modules/path_alias/tests/src/Functional/UrlAlterFunctionalTest.php
index 42f789db28e9c921a9fa8ae3688928bccb3b272e..835f034b1d99699f45f39bb82f79dab91a202a5a 100644
--- a/core/modules/path_alias/tests/src/Functional/UrlAlterFunctionalTest.php
+++ b/core/modules/path_alias/tests/src/Functional/UrlAlterFunctionalTest.php
@@ -23,7 +23,7 @@ class UrlAlterFunctionalTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['path', 'forum', 'url_alter_test'];
+  protected static $modules = ['path', 'forum', 'url_alter_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/path_alias/tests/src/Kernel/PathHooksTest.php b/core/modules/path_alias/tests/src/Kernel/PathHooksTest.php
index d3a6dc252288bf6f3f6f4bf62404afba56e8ff7a..0a4ca24426468f27fb9845c700a394bde099b03b 100644
--- a/core/modules/path_alias/tests/src/Kernel/PathHooksTest.php
+++ b/core/modules/path_alias/tests/src/Kernel/PathHooksTest.php
@@ -17,7 +17,7 @@ class PathHooksTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['path_alias'];
+  protected static $modules = ['path_alias'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/quickedit/tests/src/FunctionalJavascript/FieldTest.php b/core/modules/quickedit/tests/src/FunctionalJavascript/FieldTest.php
index e5e6ede2bf0f959eb402cec8a2bd98405dd6ee76..fae1a9fe087981453f1ca3caae54ce0643b02e37 100644
--- a/core/modules/quickedit/tests/src/FunctionalJavascript/FieldTest.php
+++ b/core/modules/quickedit/tests/src/FunctionalJavascript/FieldTest.php
@@ -21,7 +21,7 @@ class FieldTest extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'node',
     'ckeditor',
     'contextual',
diff --git a/core/modules/quickedit/tests/src/FunctionalJavascript/QuickEditAutocompleteTermTest.php b/core/modules/quickedit/tests/src/FunctionalJavascript/QuickEditAutocompleteTermTest.php
index 6bdd0db84f98974ca2c5c480b280fd9c147527da..6644107874fab44eaa585481a3551ab33b1f1068 100644
--- a/core/modules/quickedit/tests/src/FunctionalJavascript/QuickEditAutocompleteTermTest.php
+++ b/core/modules/quickedit/tests/src/FunctionalJavascript/QuickEditAutocompleteTermTest.php
@@ -23,7 +23,7 @@ class QuickEditAutocompleteTermTest extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'node',
     'taxonomy',
     'quickedit',
diff --git a/core/modules/quickedit/tests/src/FunctionalJavascript/QuickEditFileTest.php b/core/modules/quickedit/tests/src/FunctionalJavascript/QuickEditFileTest.php
index 69307fef834ed44f7f1bfe6b3d8bf724781dd1af..8def334f422aaffb63319d9961258ab3b2bd055d 100644
--- a/core/modules/quickedit/tests/src/FunctionalJavascript/QuickEditFileTest.php
+++ b/core/modules/quickedit/tests/src/FunctionalJavascript/QuickEditFileTest.php
@@ -18,7 +18,7 @@ class QuickEditFileTest extends QuickEditJavascriptTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'node',
     'file',
   ];
diff --git a/core/modules/quickedit/tests/src/FunctionalJavascript/QuickEditIntegrationTest.php b/core/modules/quickedit/tests/src/FunctionalJavascript/QuickEditIntegrationTest.php
index d1ba4afd0f58e67effb210133770eb3d915452c1..e00abf5a39300a5356a0a4cdb0efe0890a30e8ae 100644
--- a/core/modules/quickedit/tests/src/FunctionalJavascript/QuickEditIntegrationTest.php
+++ b/core/modules/quickedit/tests/src/FunctionalJavascript/QuickEditIntegrationTest.php
@@ -21,7 +21,7 @@ class QuickEditIntegrationTest extends QuickEditJavascriptTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'node',
     'editor',
     'ckeditor',
diff --git a/core/modules/quickedit/tests/src/FunctionalJavascript/QuickEditJavascriptTestBase.php b/core/modules/quickedit/tests/src/FunctionalJavascript/QuickEditJavascriptTestBase.php
index 8afc3242b6d251b74de13d5a7b1efcfd5b27cafe..c0955e3b087fa766452676979fb0825b9ccd818b 100644
--- a/core/modules/quickedit/tests/src/FunctionalJavascript/QuickEditJavascriptTestBase.php
+++ b/core/modules/quickedit/tests/src/FunctionalJavascript/QuickEditJavascriptTestBase.php
@@ -13,7 +13,7 @@ class QuickEditJavascriptTestBase extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['contextual', 'quickedit', 'toolbar'];
+  protected static $modules = ['contextual', 'quickedit', 'toolbar'];
 
   /**
    * A user with permissions to edit Articles and use Quick Edit.
diff --git a/core/modules/quickedit/tests/src/FunctionalJavascript/QuickEditLoadingTest.php b/core/modules/quickedit/tests/src/FunctionalJavascript/QuickEditLoadingTest.php
index 9606f535b4385f80dc2b8eeb59b8e84973262bbc..5668c3592e0f7f4f366a139d3665739616ab1c6b 100644
--- a/core/modules/quickedit/tests/src/FunctionalJavascript/QuickEditLoadingTest.php
+++ b/core/modules/quickedit/tests/src/FunctionalJavascript/QuickEditLoadingTest.php
@@ -33,7 +33,7 @@ class QuickEditLoadingTest extends WebDriverTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'contextual',
     'quickedit',
     'filter',
diff --git a/core/modules/quickedit/tests/src/Kernel/MetadataGeneratorTest.php b/core/modules/quickedit/tests/src/Kernel/MetadataGeneratorTest.php
index f43af46e9b61e8c54f5950af163dade83b80648c..fce2834a1d28ee348e51454b3226649dc479dbf9 100644
--- a/core/modules/quickedit/tests/src/Kernel/MetadataGeneratorTest.php
+++ b/core/modules/quickedit/tests/src/Kernel/MetadataGeneratorTest.php
@@ -18,7 +18,7 @@ class MetadataGeneratorTest extends QuickEditTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['quickedit_test'];
+  protected static $modules = ['quickedit_test'];
 
   /**
    * The manager for editor plugins.
diff --git a/core/modules/quickedit/tests/src/Kernel/QuickEditTestBase.php b/core/modules/quickedit/tests/src/Kernel/QuickEditTestBase.php
index 127ab62d8598c5e5dde60032472e32a7e42acb9c..c24874dac69e175aa195e8032593f3929be5d99e 100644
--- a/core/modules/quickedit/tests/src/Kernel/QuickEditTestBase.php
+++ b/core/modules/quickedit/tests/src/Kernel/QuickEditTestBase.php
@@ -16,7 +16,7 @@ abstract class QuickEditTestBase extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['system', 'entity_test', 'field', 'field_test', 'filter', 'user', 'text', 'quickedit'];
+  protected static $modules = ['system', 'entity_test', 'field', 'field_test', 'filter', 'user', 'text', 'quickedit'];
 
   /**
    * Bag of created fields.
diff --git a/core/modules/rdf/tests/src/Functional/CommentAttributesTest.php b/core/modules/rdf/tests/src/Functional/CommentAttributesTest.php
index 1007bcf16fb9287a315ce0022e39f66c90216290..eff01f14e0ced8c936086197fcf131ec94b2f0eb 100644
--- a/core/modules/rdf/tests/src/Functional/CommentAttributesTest.php
+++ b/core/modules/rdf/tests/src/Functional/CommentAttributesTest.php
@@ -24,7 +24,7 @@ class CommentAttributesTest extends CommentTestBase {
    *
    * @var array
    */
-  public static $modules = ['views', 'node', 'comment', 'rdf'];
+  protected static $modules = ['views', 'node', 'comment', 'rdf'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rdf/tests/src/Functional/EntityReferenceFieldAttributesTest.php b/core/modules/rdf/tests/src/Functional/EntityReferenceFieldAttributesTest.php
index 2dab6dcc80ad812a8f2013433114d6fba3261609..cebaaf3d183084a350b215430f2292d87bab6163 100644
--- a/core/modules/rdf/tests/src/Functional/EntityReferenceFieldAttributesTest.php
+++ b/core/modules/rdf/tests/src/Functional/EntityReferenceFieldAttributesTest.php
@@ -21,7 +21,7 @@ class EntityReferenceFieldAttributesTest extends TaxonomyTestBase {
    *
    * @var array
    */
-  public static $modules = ['rdf', 'field_test', 'file', 'image'];
+  protected static $modules = ['rdf', 'field_test', 'file', 'image'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rdf/tests/src/Functional/FileFieldAttributesTest.php b/core/modules/rdf/tests/src/Functional/FileFieldAttributesTest.php
index aa57099918f32b031cd242de1b19dcc87bd20f7e..d8e1030d754a6beb4116035ea4f3d254ce4b1f2c 100644
--- a/core/modules/rdf/tests/src/Functional/FileFieldAttributesTest.php
+++ b/core/modules/rdf/tests/src/Functional/FileFieldAttributesTest.php
@@ -21,7 +21,7 @@ class FileFieldAttributesTest extends FileFieldTestBase {
    *
    * @var array
    */
-  public static $modules = ['rdf', 'file'];
+  protected static $modules = ['rdf', 'file'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rdf/tests/src/Functional/GetRdfNamespacesTest.php b/core/modules/rdf/tests/src/Functional/GetRdfNamespacesTest.php
index aade6bc622a687ecb635b90b9878239823e949cb..6b3e8a670f7e94e351e11ff1651d5f1f0a0c91e8 100644
--- a/core/modules/rdf/tests/src/Functional/GetRdfNamespacesTest.php
+++ b/core/modules/rdf/tests/src/Functional/GetRdfNamespacesTest.php
@@ -16,7 +16,7 @@ class GetRdfNamespacesTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['rdf', 'rdf_test_namespaces'];
+  protected static $modules = ['rdf', 'rdf_test_namespaces'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rdf/tests/src/Functional/Hal/RdfMappingHalJsonAnonTest.php b/core/modules/rdf/tests/src/Functional/Hal/RdfMappingHalJsonAnonTest.php
index 17917981a2702633e1af37ad41ecc01fb8666d52..38d0ebeab635183219645a5159cbfef00e3dfb34 100644
--- a/core/modules/rdf/tests/src/Functional/Hal/RdfMappingHalJsonAnonTest.php
+++ b/core/modules/rdf/tests/src/Functional/Hal/RdfMappingHalJsonAnonTest.php
@@ -15,7 +15,7 @@ class RdfMappingHalJsonAnonTest extends RdfMappingResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rdf/tests/src/Functional/Hal/RdfMappingHalJsonBasicAuthTest.php b/core/modules/rdf/tests/src/Functional/Hal/RdfMappingHalJsonBasicAuthTest.php
index 3c9969900a86e568b7b5ad2667be152eed2487e6..308cedff6a9fec30e28ab59811cc7abe1d673a0a 100644
--- a/core/modules/rdf/tests/src/Functional/Hal/RdfMappingHalJsonBasicAuthTest.php
+++ b/core/modules/rdf/tests/src/Functional/Hal/RdfMappingHalJsonBasicAuthTest.php
@@ -15,7 +15,7 @@ class RdfMappingHalJsonBasicAuthTest extends RdfMappingResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal', 'basic_auth'];
+  protected static $modules = ['hal', 'basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rdf/tests/src/Functional/Hal/RdfMappingHalJsonCookieTest.php b/core/modules/rdf/tests/src/Functional/Hal/RdfMappingHalJsonCookieTest.php
index 8c5c47c0fd038e97ab668b0fc1a4f7c5fe2ce3e1..0d8f9e257c4cbd4c09e880d21e4e38d228be9e58 100644
--- a/core/modules/rdf/tests/src/Functional/Hal/RdfMappingHalJsonCookieTest.php
+++ b/core/modules/rdf/tests/src/Functional/Hal/RdfMappingHalJsonCookieTest.php
@@ -15,7 +15,7 @@ class RdfMappingHalJsonCookieTest extends RdfMappingResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rdf/tests/src/Functional/ImageFieldAttributesTest.php b/core/modules/rdf/tests/src/Functional/ImageFieldAttributesTest.php
index 8233dffa33b52707a0a4b7e24e67153e4d01f06d..5c2f67fa9252bb0a14a8a8e96a5a5bb5c4fc7226 100644
--- a/core/modules/rdf/tests/src/Functional/ImageFieldAttributesTest.php
+++ b/core/modules/rdf/tests/src/Functional/ImageFieldAttributesTest.php
@@ -28,7 +28,7 @@ class ImageFieldAttributesTest extends ImageFieldTestBase {
    *
    * @var array
    */
-  public static $modules = ['rdf', 'image'];
+  protected static $modules = ['rdf', 'image'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rdf/tests/src/Functional/NodeAttributesTest.php b/core/modules/rdf/tests/src/Functional/NodeAttributesTest.php
index a06274f6e9c8cea1f88cfc0f258b130dff7a73e0..3463d396525da4977c0206347e1f3ae826e416bd 100644
--- a/core/modules/rdf/tests/src/Functional/NodeAttributesTest.php
+++ b/core/modules/rdf/tests/src/Functional/NodeAttributesTest.php
@@ -20,7 +20,7 @@ class NodeAttributesTest extends NodeTestBase {
    *
    * @var array
    */
-  public static $modules = ['rdf'];
+  protected static $modules = ['rdf'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rdf/tests/src/Functional/Rest/RdfMappingJsonBasicAuthTest.php b/core/modules/rdf/tests/src/Functional/Rest/RdfMappingJsonBasicAuthTest.php
index 7727fedfaf25d17625a2be3d3ec7f747e1f68d90..e5d4c202a938f582d24b01becf20e7811ee25a22 100644
--- a/core/modules/rdf/tests/src/Functional/Rest/RdfMappingJsonBasicAuthTest.php
+++ b/core/modules/rdf/tests/src/Functional/Rest/RdfMappingJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class RdfMappingJsonBasicAuthTest extends RdfMappingResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rdf/tests/src/Functional/Rest/RdfMappingResourceTestBase.php b/core/modules/rdf/tests/src/Functional/Rest/RdfMappingResourceTestBase.php
index ffe5bd4fdad26f84ef6c819b22a1e3572612e511..bd528aaae72deb995a6adfec9590adcdafd9df52 100644
--- a/core/modules/rdf/tests/src/Functional/Rest/RdfMappingResourceTestBase.php
+++ b/core/modules/rdf/tests/src/Functional/Rest/RdfMappingResourceTestBase.php
@@ -11,7 +11,7 @@ abstract class RdfMappingResourceTestBase extends EntityResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'rdf'];
+  protected static $modules = ['node', 'rdf'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rdf/tests/src/Functional/Rest/RdfMappingXmlBasicAuthTest.php b/core/modules/rdf/tests/src/Functional/Rest/RdfMappingXmlBasicAuthTest.php
index d7a8c1918dc1b3ea82a3663a7ce5d266adeb7fb0..d4bbc3b175518fbefecfcedb06b2f92147588fa2 100644
--- a/core/modules/rdf/tests/src/Functional/Rest/RdfMappingXmlBasicAuthTest.php
+++ b/core/modules/rdf/tests/src/Functional/Rest/RdfMappingXmlBasicAuthTest.php
@@ -16,7 +16,7 @@ class RdfMappingXmlBasicAuthTest extends RdfMappingResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rdf/tests/src/Functional/TaxonomyAttributesTest.php b/core/modules/rdf/tests/src/Functional/TaxonomyAttributesTest.php
index 3d3fcc1c2e4f6347c3b1f2bc9f8dbf39ae446b72..465a4591567a32ea44b47e17ec45a084fdebf817 100644
--- a/core/modules/rdf/tests/src/Functional/TaxonomyAttributesTest.php
+++ b/core/modules/rdf/tests/src/Functional/TaxonomyAttributesTest.php
@@ -20,7 +20,7 @@ class TaxonomyAttributesTest extends TaxonomyTestBase {
    *
    * @var array
    */
-  public static $modules = ['rdf', 'views'];
+  protected static $modules = ['rdf', 'views'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rdf/tests/src/Functional/UserAttributesTest.php b/core/modules/rdf/tests/src/Functional/UserAttributesTest.php
index 59e32819923c22729190a19cea5798d95d2e6054..fefc752cdd917731dd87795a9baea2ec215f9896 100644
--- a/core/modules/rdf/tests/src/Functional/UserAttributesTest.php
+++ b/core/modules/rdf/tests/src/Functional/UserAttributesTest.php
@@ -20,7 +20,7 @@ class UserAttributesTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['rdf', 'node'];
+  protected static $modules = ['rdf', 'node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rdf/tests/src/Kernel/CrudTest.php b/core/modules/rdf/tests/src/Kernel/CrudTest.php
index d863734c64f5700a3634a5cd03b99eadf95ede70..d697a817d5216ee7689cc6a86b2a26c79d4ed7a3 100644
--- a/core/modules/rdf/tests/src/Kernel/CrudTest.php
+++ b/core/modules/rdf/tests/src/Kernel/CrudTest.php
@@ -16,7 +16,7 @@ class CrudTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['entity_test', 'rdf', 'system'];
+  protected static $modules = ['entity_test', 'rdf', 'system'];
 
   /**
    * @var string
diff --git a/core/modules/rdf/tests/src/Kernel/Field/DateTimeFieldRdfaTest.php b/core/modules/rdf/tests/src/Kernel/Field/DateTimeFieldRdfaTest.php
index 0a1363fab50e62e1ca1eed0d20bc52c22fd0383e..35911c755821b68b0674f4dffa032aee34117b7d 100644
--- a/core/modules/rdf/tests/src/Kernel/Field/DateTimeFieldRdfaTest.php
+++ b/core/modules/rdf/tests/src/Kernel/Field/DateTimeFieldRdfaTest.php
@@ -26,7 +26,7 @@ class DateTimeFieldRdfaTest extends FieldRdfaTestBase {
   /**
   * {@inheritdoc}
   */
-  public static $modules = ['datetime'];
+  protected static $modules = ['datetime'];
 
   protected function setUp(): void {
     parent::setUp();
diff --git a/core/modules/rdf/tests/src/Kernel/Field/EmailFieldRdfaTest.php b/core/modules/rdf/tests/src/Kernel/Field/EmailFieldRdfaTest.php
index b67119a2fddafcf4a20a507e744fba8d086a2404..7330ef0e4c85bf1b67add4e272d2961ecccd0b3c 100644
--- a/core/modules/rdf/tests/src/Kernel/Field/EmailFieldRdfaTest.php
+++ b/core/modules/rdf/tests/src/Kernel/Field/EmailFieldRdfaTest.php
@@ -19,7 +19,7 @@ class EmailFieldRdfaTest extends FieldRdfaTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['text'];
+  protected static $modules = ['text'];
 
   protected function setUp(): void {
     parent::setUp();
diff --git a/core/modules/rdf/tests/src/Kernel/Field/EntityReferenceRdfaTest.php b/core/modules/rdf/tests/src/Kernel/Field/EntityReferenceRdfaTest.php
index 19daf58b11f522955a7d943881d79d6d57cdf270..f4c85ab46b3d97cb164736a72c3f93408ab5f53b 100644
--- a/core/modules/rdf/tests/src/Kernel/Field/EntityReferenceRdfaTest.php
+++ b/core/modules/rdf/tests/src/Kernel/Field/EntityReferenceRdfaTest.php
@@ -44,7 +44,7 @@ class EntityReferenceRdfaTest extends FieldRdfaTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['text', 'filter'];
+  protected static $modules = ['text', 'filter'];
 
   protected function setUp(): void {
     parent::setUp();
diff --git a/core/modules/rdf/tests/src/Kernel/Field/FieldRdfaDatatypeCallbackTest.php b/core/modules/rdf/tests/src/Kernel/Field/FieldRdfaDatatypeCallbackTest.php
index e50fbcc79d7ab285e19e7aa6510e8e2b68e52fe8..59af0b67f6dcfde3fddb50a3eb0622048f2d35ed 100644
--- a/core/modules/rdf/tests/src/Kernel/Field/FieldRdfaDatatypeCallbackTest.php
+++ b/core/modules/rdf/tests/src/Kernel/Field/FieldRdfaDatatypeCallbackTest.php
@@ -19,7 +19,7 @@ class FieldRdfaDatatypeCallbackTest extends FieldRdfaTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['text', 'filter', 'rdf_test'];
+  protected static $modules = ['text', 'filter', 'rdf_test'];
 
   protected function setUp(): void {
     parent::setUp();
diff --git a/core/modules/rdf/tests/src/Kernel/Field/FieldRdfaTestBase.php b/core/modules/rdf/tests/src/Kernel/Field/FieldRdfaTestBase.php
index 6535d0bd4aaaa43fd4c928c4226e49f50a6a43de..cfe5782491d474a4137d3aaa77cefa598ab127b7 100644
--- a/core/modules/rdf/tests/src/Kernel/Field/FieldRdfaTestBase.php
+++ b/core/modules/rdf/tests/src/Kernel/Field/FieldRdfaTestBase.php
@@ -51,7 +51,7 @@ abstract class FieldRdfaTestBase extends FieldKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['rdf'];
+  protected static $modules = ['rdf'];
 
   /**
    * @var string
diff --git a/core/modules/rdf/tests/src/Kernel/Field/LinkFieldRdfaTest.php b/core/modules/rdf/tests/src/Kernel/Field/LinkFieldRdfaTest.php
index b00ad8e3e42e9c42ba10a07dc7d3fc5a0b54e914..96f85c745ddb1742878479f2e0df6aeda8193456 100644
--- a/core/modules/rdf/tests/src/Kernel/Field/LinkFieldRdfaTest.php
+++ b/core/modules/rdf/tests/src/Kernel/Field/LinkFieldRdfaTest.php
@@ -19,7 +19,7 @@ class LinkFieldRdfaTest extends FieldRdfaTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['link', 'text'];
+  protected static $modules = ['link', 'text'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rdf/tests/src/Kernel/Field/TelephoneFieldRdfaTest.php b/core/modules/rdf/tests/src/Kernel/Field/TelephoneFieldRdfaTest.php
index 0d375cea7afe6d27c7ab17e5515284bfbc521fd9..fec2227b5ff49b8770175bdd2c93088aed7d45d4 100644
--- a/core/modules/rdf/tests/src/Kernel/Field/TelephoneFieldRdfaTest.php
+++ b/core/modules/rdf/tests/src/Kernel/Field/TelephoneFieldRdfaTest.php
@@ -26,7 +26,7 @@ class TelephoneFieldRdfaTest extends FieldRdfaTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['telephone', 'text'];
+  protected static $modules = ['telephone', 'text'];
 
   protected function setUp(): void {
     parent::setUp();
diff --git a/core/modules/rdf/tests/src/Kernel/Field/TextFieldRdfaTest.php b/core/modules/rdf/tests/src/Kernel/Field/TextFieldRdfaTest.php
index 43b3631f80767206bbd02d67eb95e953e1349663..5f807448f862fc278eb4029c773360e745e09b06 100644
--- a/core/modules/rdf/tests/src/Kernel/Field/TextFieldRdfaTest.php
+++ b/core/modules/rdf/tests/src/Kernel/Field/TextFieldRdfaTest.php
@@ -33,7 +33,7 @@ class TextFieldRdfaTest extends FieldRdfaTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['text', 'filter'];
+  protected static $modules = ['text', 'filter'];
 
   protected function setUp(): void {
     parent::setUp();
diff --git a/core/modules/rdf/tests/src/Kernel/Migrate/d7/MigrateRdfMappingTest.php b/core/modules/rdf/tests/src/Kernel/Migrate/d7/MigrateRdfMappingTest.php
index 05447cb124a3be1e99e04557852ea3674f7f080f..59c2157e86c9d48cf06c46a95f935ddc793947d3 100644
--- a/core/modules/rdf/tests/src/Kernel/Migrate/d7/MigrateRdfMappingTest.php
+++ b/core/modules/rdf/tests/src/Kernel/Migrate/d7/MigrateRdfMappingTest.php
@@ -15,7 +15,7 @@ class MigrateRdfMappingTest extends MigrateDrupal7TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'menu_ui',
     'node',
     'rdf',
diff --git a/core/modules/rdf/tests/src/Kernel/Plugin/migrate/source/d7/RdfMappingTest.php b/core/modules/rdf/tests/src/Kernel/Plugin/migrate/source/d7/RdfMappingTest.php
index 82b0497d9b7ab903f37844c90715ae600bab6556..84a2e3b43c42b306ed608feaf891b699d5f5cd81 100644
--- a/core/modules/rdf/tests/src/Kernel/Plugin/migrate/source/d7/RdfMappingTest.php
+++ b/core/modules/rdf/tests/src/Kernel/Plugin/migrate/source/d7/RdfMappingTest.php
@@ -16,7 +16,7 @@ class RdfMappingTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'comment',
     'migrate_drupal',
     'node',
diff --git a/core/modules/rdf/tests/src/Kernel/RdfaAttributesTest.php b/core/modules/rdf/tests/src/Kernel/RdfaAttributesTest.php
index db8ea31672d41eaa17e785abae14b7381d03d3f1..f7efa345022b1bdefc04a169fd0c6936560b4127 100644
--- a/core/modules/rdf/tests/src/Kernel/RdfaAttributesTest.php
+++ b/core/modules/rdf/tests/src/Kernel/RdfaAttributesTest.php
@@ -16,7 +16,7 @@ class RdfaAttributesTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['rdf'];
+  protected static $modules = ['rdf'];
 
   /**
    * Test attribute creation for mappings which use 'property'.
diff --git a/core/modules/responsive_image/src/FunctionalJavascript/ResponsiveImageFieldUiTest.php b/core/modules/responsive_image/src/FunctionalJavascript/ResponsiveImageFieldUiTest.php
index 81d7f4a7b9be68be125a9570df3e4c5bd09b0ee7..aba60e47392ca39f6c5e7f3861205f42189dcb04 100644
--- a/core/modules/responsive_image/src/FunctionalJavascript/ResponsiveImageFieldUiTest.php
+++ b/core/modules/responsive_image/src/FunctionalJavascript/ResponsiveImageFieldUiTest.php
@@ -17,7 +17,7 @@ class ResponsiveImageFieldUiTest extends WebDriverTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'node',
     'field_ui',
     'image',
diff --git a/core/modules/responsive_image/tests/src/Functional/Hal/ResponsiveImageStyleHalJsonAnonTest.php b/core/modules/responsive_image/tests/src/Functional/Hal/ResponsiveImageStyleHalJsonAnonTest.php
index cff45272e3840e944235a1f2ff3724314b432f22..bed419e9f6aea33a2ad5ea63e5c9b67bae373f75 100644
--- a/core/modules/responsive_image/tests/src/Functional/Hal/ResponsiveImageStyleHalJsonAnonTest.php
+++ b/core/modules/responsive_image/tests/src/Functional/Hal/ResponsiveImageStyleHalJsonAnonTest.php
@@ -15,7 +15,7 @@ class ResponsiveImageStyleHalJsonAnonTest extends ResponsiveImageStyleResourceTe
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/responsive_image/tests/src/Functional/Hal/ResponsiveImageStyleHalJsonBasicAuthTest.php b/core/modules/responsive_image/tests/src/Functional/Hal/ResponsiveImageStyleHalJsonBasicAuthTest.php
index 17e896ee20bcdd26bf4481dc14fad850405d7862..44b3a82c40cbbc6da81382ced84c72e40413b209 100644
--- a/core/modules/responsive_image/tests/src/Functional/Hal/ResponsiveImageStyleHalJsonBasicAuthTest.php
+++ b/core/modules/responsive_image/tests/src/Functional/Hal/ResponsiveImageStyleHalJsonBasicAuthTest.php
@@ -15,7 +15,7 @@ class ResponsiveImageStyleHalJsonBasicAuthTest extends ResponsiveImageStyleResou
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal', 'basic_auth'];
+  protected static $modules = ['hal', 'basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/responsive_image/tests/src/Functional/Hal/ResponsiveImageStyleHalJsonCookieTest.php b/core/modules/responsive_image/tests/src/Functional/Hal/ResponsiveImageStyleHalJsonCookieTest.php
index 3d32819dbc1531a039e0575b4deab32d8b9a9529..c3bd2a0903714a1ceccf564cb01ecb7689b79deb 100644
--- a/core/modules/responsive_image/tests/src/Functional/Hal/ResponsiveImageStyleHalJsonCookieTest.php
+++ b/core/modules/responsive_image/tests/src/Functional/Hal/ResponsiveImageStyleHalJsonCookieTest.php
@@ -15,7 +15,7 @@ class ResponsiveImageStyleHalJsonCookieTest extends ResponsiveImageStyleResource
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/responsive_image/tests/src/Functional/ResponsiveImageAdminUITest.php b/core/modules/responsive_image/tests/src/Functional/ResponsiveImageAdminUITest.php
index 8015a242a351e0a3d51a8e15d652445ef440d029..160f4ec66f567c16aeb46e24a2c956b811c0a41e 100644
--- a/core/modules/responsive_image/tests/src/Functional/ResponsiveImageAdminUITest.php
+++ b/core/modules/responsive_image/tests/src/Functional/ResponsiveImageAdminUITest.php
@@ -17,7 +17,7 @@ class ResponsiveImageAdminUITest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['responsive_image', 'responsive_image_test_module'];
+  protected static $modules = ['responsive_image', 'responsive_image_test_module'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/responsive_image/tests/src/Functional/ResponsiveImageFieldDisplayTest.php b/core/modules/responsive_image/tests/src/Functional/ResponsiveImageFieldDisplayTest.php
index af86993f883473e122ec592790b063972c11b14e..a7a11461e827677389e15be4434c36c8881e0641 100644
--- a/core/modules/responsive_image/tests/src/Functional/ResponsiveImageFieldDisplayTest.php
+++ b/core/modules/responsive_image/tests/src/Functional/ResponsiveImageFieldDisplayTest.php
@@ -40,7 +40,7 @@ class ResponsiveImageFieldDisplayTest extends ImageFieldTestBase {
    *
    * @var array
    */
-  public static $modules = ['field_ui', 'responsive_image', 'responsive_image_test_module'];
+  protected static $modules = ['field_ui', 'responsive_image', 'responsive_image_test_module'];
 
   /**
    * Drupal\simpletest\WebTestBase\setUp().
diff --git a/core/modules/responsive_image/tests/src/Functional/Rest/ResponsiveImageStyleJsonBasicAuthTest.php b/core/modules/responsive_image/tests/src/Functional/Rest/ResponsiveImageStyleJsonBasicAuthTest.php
index 76eadc341eec797c013c8c4eac8993a06cce24cd..a4d745c794187efbb83d0a8b9060696e2ee867c8 100644
--- a/core/modules/responsive_image/tests/src/Functional/Rest/ResponsiveImageStyleJsonBasicAuthTest.php
+++ b/core/modules/responsive_image/tests/src/Functional/Rest/ResponsiveImageStyleJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class ResponsiveImageStyleJsonBasicAuthTest extends ResponsiveImageStyleResource
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/responsive_image/tests/src/Functional/Rest/ResponsiveImageStyleResourceTestBase.php b/core/modules/responsive_image/tests/src/Functional/Rest/ResponsiveImageStyleResourceTestBase.php
index 60516cde603a0c0a4038705907c3a0d636f673db..e675cd85dd30e05025adfadb7f0e3aa5f79ca183 100644
--- a/core/modules/responsive_image/tests/src/Functional/Rest/ResponsiveImageStyleResourceTestBase.php
+++ b/core/modules/responsive_image/tests/src/Functional/Rest/ResponsiveImageStyleResourceTestBase.php
@@ -13,7 +13,7 @@ abstract class ResponsiveImageStyleResourceTestBase extends EntityResourceTestBa
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['responsive_image'];
+  protected static $modules = ['responsive_image'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/responsive_image/tests/src/Functional/Rest/ResponsiveImageStyleXmlBasicAuthTest.php b/core/modules/responsive_image/tests/src/Functional/Rest/ResponsiveImageStyleXmlBasicAuthTest.php
index 75b6ead6be61d53beebfd558a8814c29a885e979..2e3241bd25a161a6ae642592245a902ac841754c 100644
--- a/core/modules/responsive_image/tests/src/Functional/Rest/ResponsiveImageStyleXmlBasicAuthTest.php
+++ b/core/modules/responsive_image/tests/src/Functional/Rest/ResponsiveImageStyleXmlBasicAuthTest.php
@@ -16,7 +16,7 @@ class ResponsiveImageStyleXmlBasicAuthTest extends ResponsiveImageStyleResourceT
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/responsive_image/tests/src/Functional/ViewsIntegrationTest.php b/core/modules/responsive_image/tests/src/Functional/ViewsIntegrationTest.php
index 489a4cdd8753e37580c3ca26728568d76bb02da5..5b3358521c951727a34c2fd5ec183e9273aa1a91 100644
--- a/core/modules/responsive_image/tests/src/Functional/ViewsIntegrationTest.php
+++ b/core/modules/responsive_image/tests/src/Functional/ViewsIntegrationTest.php
@@ -22,7 +22,7 @@ class ViewsIntegrationTest extends ViewTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'views',
     'views_ui',
     'responsive_image',
diff --git a/core/modules/responsive_image/tests/src/Kernel/ResponsiveImageIntegrationTest.php b/core/modules/responsive_image/tests/src/Kernel/ResponsiveImageIntegrationTest.php
index fedf81fa7c93157867c90da6d057db671adcb37c..39e84a6429cb3d53573b66760c15e90807e193a0 100644
--- a/core/modules/responsive_image/tests/src/Kernel/ResponsiveImageIntegrationTest.php
+++ b/core/modules/responsive_image/tests/src/Kernel/ResponsiveImageIntegrationTest.php
@@ -18,7 +18,7 @@ class ResponsiveImageIntegrationTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['responsive_image', 'field', 'image', 'file', 'entity_test', 'breakpoint', 'responsive_image_test_module', 'user'];
+  protected static $modules = ['responsive_image', 'field', 'image', 'file', 'entity_test', 'breakpoint', 'responsive_image_test_module', 'user'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php
index 3995fb5558afcfdd30a18079951b59bbd9d39a89..a8034294227d4dafd37e4b8606e6ec83f157d375 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php
@@ -155,7 +155,7 @@ abstract class EntityResourceTestBase extends ResourceTestBase {
    *
    * @var array
    */
-  public static $modules = ['rest_test', 'text'];
+  protected static $modules = ['rest_test', 'text'];
 
   /**
    * Provides an entity resource.
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/ModeratedNode/ModeratedNodeJsonBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/ModeratedNode/ModeratedNodeJsonBasicAuthTest.php
index e1051e94144bb6ad79d26c1f7dd6b2faffd56bee..934ff556190eaba7a6da05e67fbe5d4c373e663b 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/ModeratedNode/ModeratedNodeJsonBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/ModeratedNode/ModeratedNodeJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class ModeratedNodeJsonBasicAuthTest extends ModeratedNodeResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/ModeratedNode/ModeratedNodeResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/ModeratedNode/ModeratedNodeResourceTestBase.php
index 054259dbc5619b9bf56662f6f59fd4f5ec128e75..f36b8d1c429ed2682fd4ac518e1cbfcfece87a0a 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/ModeratedNode/ModeratedNodeResourceTestBase.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/ModeratedNode/ModeratedNodeResourceTestBase.php
@@ -15,7 +15,7 @@ abstract class ModeratedNodeResourceTestBase extends NodeResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['content_moderation'];
+  protected static $modules = ['content_moderation'];
 
   /**
    * The test editorial workflow.
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 9977177b7cd4744582592f97a8ae424b24a269d6..dea3be04be36760731ab91ab45bbddf9113004bd 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/ModeratedNode/ModeratedNodeXmlBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/ModeratedNode/ModeratedNodeXmlBasicAuthTest.php
@@ -16,7 +16,7 @@ class ModeratedNodeXmlBasicAuthTest extends ModeratedNodeResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rest/tests/src/Functional/FileUploadResourceTestBase.php b/core/modules/rest/tests/src/Functional/FileUploadResourceTestBase.php
index 754c800a629bf2271933e2e0175d8d6d4a515767..6ad560f5a1b74d38ed01535ee3cd8389d8c2d97c 100644
--- a/core/modules/rest/tests/src/Functional/FileUploadResourceTestBase.php
+++ b/core/modules/rest/tests/src/Functional/FileUploadResourceTestBase.php
@@ -23,7 +23,7 @@ abstract class FileUploadResourceTestBase extends ResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['rest_test', 'entity_test', 'file'];
+  protected static $modules = ['rest_test', 'entity_test', 'file'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rest/tests/src/Functional/Hal/RestResourceConfigHalJsonAnonTest.php b/core/modules/rest/tests/src/Functional/Hal/RestResourceConfigHalJsonAnonTest.php
index 7731048a858c251322476eae7d91904ad424aea4..6e67a9e0cbb7b814cf5cfcab1012adbd3129f291 100644
--- a/core/modules/rest/tests/src/Functional/Hal/RestResourceConfigHalJsonAnonTest.php
+++ b/core/modules/rest/tests/src/Functional/Hal/RestResourceConfigHalJsonAnonTest.php
@@ -15,7 +15,7 @@ class RestResourceConfigHalJsonAnonTest extends RestResourceConfigResourceTestBa
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rest/tests/src/Functional/Hal/RestResourceConfigHalJsonBasicAuthTest.php b/core/modules/rest/tests/src/Functional/Hal/RestResourceConfigHalJsonBasicAuthTest.php
index e220693e9f5c8253b8203ebaca17a213061092ea..22fbc9d687226d5a9e032f8b4fc79e82a90de19e 100644
--- a/core/modules/rest/tests/src/Functional/Hal/RestResourceConfigHalJsonBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/Hal/RestResourceConfigHalJsonBasicAuthTest.php
@@ -15,7 +15,7 @@ class RestResourceConfigHalJsonBasicAuthTest extends RestResourceConfigResourceT
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal', 'basic_auth'];
+  protected static $modules = ['hal', 'basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rest/tests/src/Functional/Hal/RestResourceConfigHalJsonCookieTest.php b/core/modules/rest/tests/src/Functional/Hal/RestResourceConfigHalJsonCookieTest.php
index d224369f6af8dc010a98c9406fcf65c8e961985c..062682638e856e416a0b8b4bd5927f828b4c1e66 100644
--- a/core/modules/rest/tests/src/Functional/Hal/RestResourceConfigHalJsonCookieTest.php
+++ b/core/modules/rest/tests/src/Functional/Hal/RestResourceConfigHalJsonCookieTest.php
@@ -15,7 +15,7 @@ class RestResourceConfigHalJsonCookieTest extends RestResourceConfigResourceTest
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rest/tests/src/Functional/ResourceTest.php b/core/modules/rest/tests/src/Functional/ResourceTest.php
index 063b6e46b35a5d56f0a71f1abc219c2ed5a27e34..c96fb1a4c4eb4afd3766b7c5bba6a45400590ac5 100644
--- a/core/modules/rest/tests/src/Functional/ResourceTest.php
+++ b/core/modules/rest/tests/src/Functional/ResourceTest.php
@@ -23,7 +23,7 @@ class ResourceTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['hal', 'rest', 'entity_test', 'rest_test'];
+  protected static $modules = ['hal', 'rest', 'entity_test', 'rest_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rest/tests/src/Functional/ResourceTestBase.php b/core/modules/rest/tests/src/Functional/ResourceTestBase.php
index 08b9e1c81b20bace71b6ab71bc7afa1684f25e29..cb4266fac793d1c1cf249f31e844a736500bf06d 100644
--- a/core/modules/rest/tests/src/Functional/ResourceTestBase.php
+++ b/core/modules/rest/tests/src/Functional/ResourceTestBase.php
@@ -93,7 +93,7 @@ abstract class ResourceTestBase extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['rest'];
+  protected static $modules = ['rest'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rest/tests/src/Functional/Rest/RestResourceConfigJsonBasicAuthTest.php b/core/modules/rest/tests/src/Functional/Rest/RestResourceConfigJsonBasicAuthTest.php
index 7a1f9c0a5848a5d94c7656d788e499bf5771501d..731ee931d6b18122b2abf233ef6ebf96952dca48 100644
--- a/core/modules/rest/tests/src/Functional/Rest/RestResourceConfigJsonBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/Rest/RestResourceConfigJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class RestResourceConfigJsonBasicAuthTest extends RestResourceConfigResourceTest
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rest/tests/src/Functional/Rest/RestResourceConfigResourceTestBase.php b/core/modules/rest/tests/src/Functional/Rest/RestResourceConfigResourceTestBase.php
index a0b0b2e428fd950903036d3ff8e795f6e519cd5c..2fdb03d81e067ff3713b3f0213769fd746a6016c 100644
--- a/core/modules/rest/tests/src/Functional/Rest/RestResourceConfigResourceTestBase.php
+++ b/core/modules/rest/tests/src/Functional/Rest/RestResourceConfigResourceTestBase.php
@@ -10,7 +10,7 @@ abstract class RestResourceConfigResourceTestBase extends EntityResourceTestBase
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['dblog'];
+  protected static $modules = ['dblog'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rest/tests/src/Functional/Rest/RestResourceConfigXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/Rest/RestResourceConfigXmlBasicAuthTest.php
index df9e46e251ce255da64dd1665498897baa1ab18a..e0467df64d69bb173ed7e8c4151266367f88d697 100644
--- a/core/modules/rest/tests/src/Functional/Rest/RestResourceConfigXmlBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/Rest/RestResourceConfigXmlBasicAuthTest.php
@@ -16,7 +16,7 @@ class RestResourceConfigXmlBasicAuthTest extends RestResourceConfigResourceTestB
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rest/tests/src/Functional/Views/ExcludedFieldTokenTest.php b/core/modules/rest/tests/src/Functional/Views/ExcludedFieldTokenTest.php
index ed60605358a65c9126f93715449e50c1838b836f..d4df0e93ba26aab7087686453d4b09052d826f0d 100644
--- a/core/modules/rest/tests/src/Functional/Views/ExcludedFieldTokenTest.php
+++ b/core/modules/rest/tests/src/Functional/Views/ExcludedFieldTokenTest.php
@@ -38,7 +38,7 @@ class ExcludedFieldTokenTest extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'entity_test',
     'rest_test_views',
     'node',
diff --git a/core/modules/rest/tests/src/Functional/Views/FieldCounterTest.php b/core/modules/rest/tests/src/Functional/Views/FieldCounterTest.php
index 4b6d9cb9524ac88978477b4965b5352cc98ff04e..80a3952b6879dd36a682ac9e8ade01862b64400e 100644
--- a/core/modules/rest/tests/src/Functional/Views/FieldCounterTest.php
+++ b/core/modules/rest/tests/src/Functional/Views/FieldCounterTest.php
@@ -38,7 +38,7 @@ class FieldCounterTest extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'entity_test',
     'rest_test_views',
     'node',
diff --git a/core/modules/rest/tests/src/Functional/Views/RestExportAuthTest.php b/core/modules/rest/tests/src/Functional/Views/RestExportAuthTest.php
index 2308f935f682270225f6e1a7fd5b27925b4863d1..69888bbab975e95dc1288a3a02b4bd8ae5195657 100644
--- a/core/modules/rest/tests/src/Functional/Views/RestExportAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/Views/RestExportAuthTest.php
@@ -15,7 +15,7 @@ class RestExportAuthTest extends ViewTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['rest', 'views_ui', 'basic_auth'];
+  protected static $modules = ['rest', 'views_ui', 'basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rest/tests/src/Functional/Views/StyleSerializerTest.php b/core/modules/rest/tests/src/Functional/Views/StyleSerializerTest.php
index 59a64be6af3cf2c7da36b83834c37010c2cd25e4..3d8651c14b041c5282c63778f323aff70c3de832 100644
--- a/core/modules/rest/tests/src/Functional/Views/StyleSerializerTest.php
+++ b/core/modules/rest/tests/src/Functional/Views/StyleSerializerTest.php
@@ -36,7 +36,7 @@ class StyleSerializerTest extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = ['views_ui', 'entity_test', 'hal', 'rest_test_views', 'node', 'text', 'field', 'language', 'basic_auth'];
+  protected static $modules = ['views_ui', 'entity_test', 'hal', 'rest_test_views', 'node', 'text', 'field', 'language', 'basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rest/tests/src/Kernel/Entity/ConfigDependenciesTest.php b/core/modules/rest/tests/src/Kernel/Entity/ConfigDependenciesTest.php
index 500f375ef95b40c0868bbb9340cfe65262032d3b..ca0bac7221a2a106be2c94f10e5900e7929d2248 100644
--- a/core/modules/rest/tests/src/Kernel/Entity/ConfigDependenciesTest.php
+++ b/core/modules/rest/tests/src/Kernel/Entity/ConfigDependenciesTest.php
@@ -17,7 +17,7 @@ class ConfigDependenciesTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['rest', 'entity_test', 'serialization'];
+  protected static $modules = ['rest', 'entity_test', 'serialization'];
 
   /**
    * @covers ::calculateDependencies
diff --git a/core/modules/rest/tests/src/Kernel/Entity/RestResourceConfigTest.php b/core/modules/rest/tests/src/Kernel/Entity/RestResourceConfigTest.php
index 89e9b1dec5bbdd4d1377e99264b0080ade57a53d..585743307eaba38b324f8eed91478dcb89d246fa 100644
--- a/core/modules/rest/tests/src/Kernel/Entity/RestResourceConfigTest.php
+++ b/core/modules/rest/tests/src/Kernel/Entity/RestResourceConfigTest.php
@@ -16,7 +16,7 @@ class RestResourceConfigTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['rest', 'entity_test', 'serialization', 'basic_auth', 'user', 'hal'];
+  protected static $modules = ['rest', 'entity_test', 'serialization', 'basic_auth', 'user', 'hal'];
 
   /**
    * @covers ::calculateDependencies
diff --git a/core/modules/rest/tests/src/Kernel/RequestHandlerTest.php b/core/modules/rest/tests/src/Kernel/RequestHandlerTest.php
index 716e4b46f34b395cb3815c663a22e12a7cd8b524..9897e8d2ad9414460b274b085bfee89da90dad6a 100644
--- a/core/modules/rest/tests/src/Kernel/RequestHandlerTest.php
+++ b/core/modules/rest/tests/src/Kernel/RequestHandlerTest.php
@@ -28,7 +28,7 @@ class RequestHandlerTest extends KernelTestBase {
    */
   protected $requestHandler;
 
-  public static $modules = ['serialization', 'rest'];
+  protected static $modules = ['serialization', 'rest'];
 
   /**
    * The entity storage.
diff --git a/core/modules/rest/tests/src/Kernel/Views/RestExportTest.php b/core/modules/rest/tests/src/Kernel/Views/RestExportTest.php
index 8d31e000bb0e6db1b1420afff774b9734effbba8..3aa30e719e454d72ed18bed3d975a01512cdfbf2 100644
--- a/core/modules/rest/tests/src/Kernel/Views/RestExportTest.php
+++ b/core/modules/rest/tests/src/Kernel/Views/RestExportTest.php
@@ -24,7 +24,7 @@ class RestExportTest extends ViewsKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['rest_test_views', 'serialization', 'rest', 'entity_test'];
+  protected static $modules = ['rest_test_views', 'serialization', 'rest', 'entity_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rest/tests/src/Kernel/Views/StyleSerializerKernelTest.php b/core/modules/rest/tests/src/Kernel/Views/StyleSerializerKernelTest.php
index 4109b15ee36408653d0f0a5bacde82485d9325be..21caa24a0ff3f0a491ef2c3dde9c751976cb351b 100644
--- a/core/modules/rest/tests/src/Kernel/Views/StyleSerializerKernelTest.php
+++ b/core/modules/rest/tests/src/Kernel/Views/StyleSerializerKernelTest.php
@@ -20,7 +20,7 @@ class StyleSerializerKernelTest extends ViewsKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['rest_test_views', 'serialization', 'rest'];
+  protected static $modules = ['rest_test_views', 'serialization', 'rest'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/search/tests/src/Functional/Hal/SearchPageHalJsonAnonTest.php b/core/modules/search/tests/src/Functional/Hal/SearchPageHalJsonAnonTest.php
index 833c59beed1bf5c743cc3b417c034af64fe1cc0c..8539bef5e510a054e78ab660309374a285dad69b 100644
--- a/core/modules/search/tests/src/Functional/Hal/SearchPageHalJsonAnonTest.php
+++ b/core/modules/search/tests/src/Functional/Hal/SearchPageHalJsonAnonTest.php
@@ -15,7 +15,7 @@ class SearchPageHalJsonAnonTest extends SearchPageResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/search/tests/src/Functional/Hal/SearchPageHalJsonBasicAuthTest.php b/core/modules/search/tests/src/Functional/Hal/SearchPageHalJsonBasicAuthTest.php
index d7e8a619bffec39f04739c81279648aa01f87f77..276ac6bdfb2b5ff6e86b369d9dc14bcd21d7ac68 100644
--- a/core/modules/search/tests/src/Functional/Hal/SearchPageHalJsonBasicAuthTest.php
+++ b/core/modules/search/tests/src/Functional/Hal/SearchPageHalJsonBasicAuthTest.php
@@ -15,7 +15,7 @@ class SearchPageHalJsonBasicAuthTest extends SearchPageResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal', 'basic_auth'];
+  protected static $modules = ['hal', 'basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/search/tests/src/Functional/Hal/SearchPageHalJsonCookieTest.php b/core/modules/search/tests/src/Functional/Hal/SearchPageHalJsonCookieTest.php
index 47ab4dd46b740aedee963d70bd875218c9c0cdfa..8051df57829698991548a4f9c1b75ea975f3cf1d 100644
--- a/core/modules/search/tests/src/Functional/Hal/SearchPageHalJsonCookieTest.php
+++ b/core/modules/search/tests/src/Functional/Hal/SearchPageHalJsonCookieTest.php
@@ -15,7 +15,7 @@ class SearchPageHalJsonCookieTest extends SearchPageResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/search/tests/src/Functional/Rest/SearchPageJsonBasicAuthTest.php b/core/modules/search/tests/src/Functional/Rest/SearchPageJsonBasicAuthTest.php
index 615393be6fba3387cd6270c19c4a0544a9bbe96a..d6c8278b5b7fd61453beb70212e88d72331cb041 100644
--- a/core/modules/search/tests/src/Functional/Rest/SearchPageJsonBasicAuthTest.php
+++ b/core/modules/search/tests/src/Functional/Rest/SearchPageJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class SearchPageJsonBasicAuthTest extends SearchPageResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/search/tests/src/Functional/Rest/SearchPageResourceTestBase.php b/core/modules/search/tests/src/Functional/Rest/SearchPageResourceTestBase.php
index 299779fc3f0e368530d1a36c1390728ef6c691cf..a5716355f6818dcd4080b4f120b05a66d833a332 100644
--- a/core/modules/search/tests/src/Functional/Rest/SearchPageResourceTestBase.php
+++ b/core/modules/search/tests/src/Functional/Rest/SearchPageResourceTestBase.php
@@ -10,7 +10,7 @@ abstract class SearchPageResourceTestBase extends EntityResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'search'];
+  protected static $modules = ['node', 'search'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/search/tests/src/Functional/Rest/SearchPageXmlBasicAuthTest.php b/core/modules/search/tests/src/Functional/Rest/SearchPageXmlBasicAuthTest.php
index 5381043bee9353ff2ba47b0597e1b3573b686f90..0d559135f46f35b367ff52ccfd6c1aa8f82c88cc 100644
--- a/core/modules/search/tests/src/Functional/Rest/SearchPageXmlBasicAuthTest.php
+++ b/core/modules/search/tests/src/Functional/Rest/SearchPageXmlBasicAuthTest.php
@@ -16,7 +16,7 @@ class SearchPageXmlBasicAuthTest extends SearchPageResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
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 5131a50a6f241243adbeaf5cbb78ac3d4fd93d5d..574e9c18c16e1c4c0481da5a27ce211380a2a4b6 100644
--- a/core/modules/search/tests/src/Kernel/Migrate/d6/MigrateSearchPageTest.php
+++ b/core/modules/search/tests/src/Kernel/Migrate/d6/MigrateSearchPageTest.php
@@ -16,7 +16,7 @@ class MigrateSearchPageTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['search'];
+  protected static $modules = ['search'];
 
   /**
    * {@inheritdoc}
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 a1dc1e64d165295cc71f77ad1f90fa0e3982a99e..59fd0a7d2e6e177ae6279d05d88302e311fd9784 100644
--- a/core/modules/search/tests/src/Kernel/Migrate/d6/MigrateSearchSettingsTest.php
+++ b/core/modules/search/tests/src/Kernel/Migrate/d6/MigrateSearchSettingsTest.php
@@ -17,7 +17,7 @@ class MigrateSearchSettingsTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['search'];
+  protected static $modules = ['search'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/search/tests/src/Kernel/Migrate/d6/SearchPageTest.php b/core/modules/search/tests/src/Kernel/Migrate/d6/SearchPageTest.php
index b37697277f4c9d1bdbf52cf1780c4a76193b1cfb..42eb9f6bf7b127080e1b5ef3869e6886cb6f445d 100644
--- a/core/modules/search/tests/src/Kernel/Migrate/d6/SearchPageTest.php
+++ b/core/modules/search/tests/src/Kernel/Migrate/d6/SearchPageTest.php
@@ -15,7 +15,7 @@ class SearchPageTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['search', 'migrate_drupal'];
+  protected static $modules = ['search', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
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 9e2e1a24fd19d2d3e21a7c571c70604278c42e3e..14585675d6c9f7fc2ba9d5e43f1977454e10b20d 100644
--- a/core/modules/search/tests/src/Kernel/Migrate/d7/MigrateSearchPageTest.php
+++ b/core/modules/search/tests/src/Kernel/Migrate/d7/MigrateSearchPageTest.php
@@ -18,7 +18,7 @@ class MigrateSearchPageTest extends MigrateDrupal7TestBase {
    *
    * {@inheritdoc}
    */
-  public static $modules = ['search'];
+  protected static $modules = ['search'];
 
   /**
    * Asserts various aspects of an SearchPage entity.
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 8831f4fd05bf0ec5faac29948f932228923cd9c0..32eaf216381893b02fc378919140018756f8eca6 100644
--- a/core/modules/search/tests/src/Kernel/Migrate/d7/MigrateSearchSettingsTest.php
+++ b/core/modules/search/tests/src/Kernel/Migrate/d7/MigrateSearchSettingsTest.php
@@ -11,7 +11,7 @@
  */
 class MigrateSearchSettingsTest extends MigrateDrupal7TestBase {
 
-  public static $modules = ['search'];
+  protected static $modules = ['search'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/search/tests/src/Kernel/Migrate/d7/SearchPageTest.php b/core/modules/search/tests/src/Kernel/Migrate/d7/SearchPageTest.php
index d506eafb28ead597edd7d1f1be256826b1a101f6..24f040d834e6eee42b7f9282ba33ef764d111715 100644
--- a/core/modules/search/tests/src/Kernel/Migrate/d7/SearchPageTest.php
+++ b/core/modules/search/tests/src/Kernel/Migrate/d7/SearchPageTest.php
@@ -15,7 +15,7 @@ class SearchPageTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['search', 'migrate_drupal'];
+  protected static $modules = ['search', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/search/tests/src/Kernel/SearchExcerptTest.php b/core/modules/search/tests/src/Kernel/SearchExcerptTest.php
index e10075d09ae15bc94ab34901725febed1dd09a80..035bf2dc31e37de0f929fd70402317d6bf3ebdb3 100644
--- a/core/modules/search/tests/src/Kernel/SearchExcerptTest.php
+++ b/core/modules/search/tests/src/Kernel/SearchExcerptTest.php
@@ -16,7 +16,7 @@ class SearchExcerptTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['search', 'search_langcode_test'];
+  protected static $modules = ['search', 'search_langcode_test'];
 
   /**
    * Tests search_excerpt() with several simulated search keywords.
diff --git a/core/modules/search/tests/src/Kernel/SearchMatchTest.php b/core/modules/search/tests/src/Kernel/SearchMatchTest.php
index 1fd3cad0250cd2e42b75047f59cc09f3e78b1169..629f91bf78e3a129cccdf11c39ed2c31c84ca4d2 100644
--- a/core/modules/search/tests/src/Kernel/SearchMatchTest.php
+++ b/core/modules/search/tests/src/Kernel/SearchMatchTest.php
@@ -25,7 +25,7 @@ class SearchMatchTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['search'];
+  protected static $modules = ['search'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/serialization/tests/src/Kernel/EntityResolverTest.php b/core/modules/serialization/tests/src/Kernel/EntityResolverTest.php
index ced2beb6dc4eba85f048394bfa78ff75be396288..357ef0ab745300df010c8c7692eee03b35f87506 100644
--- a/core/modules/serialization/tests/src/Kernel/EntityResolverTest.php
+++ b/core/modules/serialization/tests/src/Kernel/EntityResolverTest.php
@@ -19,7 +19,7 @@ class EntityResolverTest extends NormalizerTestBase {
    *
    * @var array
    */
-  public static $modules = ['hal', 'rest'];
+  protected static $modules = ['hal', 'rest'];
 
   /**
    * The format being tested.
diff --git a/core/modules/serialization/tests/src/Kernel/EntitySerializationTest.php b/core/modules/serialization/tests/src/Kernel/EntitySerializationTest.php
index 27e8c6fcbe8f7bb156b1f6861eefd91921a0db24..bb058a714e3397988fb05a250b3379b4c005e6b7 100644
--- a/core/modules/serialization/tests/src/Kernel/EntitySerializationTest.php
+++ b/core/modules/serialization/tests/src/Kernel/EntitySerializationTest.php
@@ -21,7 +21,7 @@ class EntitySerializationTest extends NormalizerTestBase {
    *
    * @var array
    */
-  public static $modules = ['serialization', 'system', 'field', 'entity_test', 'text', 'filter', 'user', 'entity_serialization_test'];
+  protected static $modules = ['serialization', 'system', 'field', 'entity_test', 'text', 'filter', 'user', 'entity_serialization_test'];
 
   /**
    * The test values.
diff --git a/core/modules/serialization/tests/src/Kernel/FieldItemSerializationTest.php b/core/modules/serialization/tests/src/Kernel/FieldItemSerializationTest.php
index c3bb1e9bb746399c92a08e9f7b3fe45c91edebb8..bae8d45e3657dca1f6b3b2c08637053c8410f750 100644
--- a/core/modules/serialization/tests/src/Kernel/FieldItemSerializationTest.php
+++ b/core/modules/serialization/tests/src/Kernel/FieldItemSerializationTest.php
@@ -17,7 +17,7 @@ class FieldItemSerializationTest extends NormalizerTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['serialization', 'system', 'field', 'entity_test', 'text', 'filter', 'user', 'field_normalization_test'];
+  protected static $modules = ['serialization', 'system', 'field', 'entity_test', 'text', 'filter', 'user', 'field_normalization_test'];
 
   /**
    * The class name of the test class.
diff --git a/core/modules/serialization/tests/src/Kernel/MapDataNormalizerTest.php b/core/modules/serialization/tests/src/Kernel/MapDataNormalizerTest.php
index ba76824997f6810784673ad83e463af5ddcfaf13..ce6683f0e5b6955972d651191b21d015552163fb 100644
--- a/core/modules/serialization/tests/src/Kernel/MapDataNormalizerTest.php
+++ b/core/modules/serialization/tests/src/Kernel/MapDataNormalizerTest.php
@@ -14,7 +14,7 @@ class MapDataNormalizerTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system', 'serialization'];
+  protected static $modules = ['system', 'serialization'];
 
   /**
    * The serializer service.
diff --git a/core/modules/serialization/tests/src/Kernel/NormalizerTestBase.php b/core/modules/serialization/tests/src/Kernel/NormalizerTestBase.php
index 25299b16f02389d5054d9d3a7b985cc0524e7b2c..9db09bbef9f1d124c7aff3f107864b8a3e2e7b8d 100644
--- a/core/modules/serialization/tests/src/Kernel/NormalizerTestBase.php
+++ b/core/modules/serialization/tests/src/Kernel/NormalizerTestBase.php
@@ -16,7 +16,7 @@ abstract class NormalizerTestBase extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['serialization', 'system', 'field', 'entity_test', 'text', 'filter', 'user'];
+  protected static $modules = ['serialization', 'system', 'field', 'entity_test', 'text', 'filter', 'user'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/serialization/tests/src/Kernel/SerializationTest.php b/core/modules/serialization/tests/src/Kernel/SerializationTest.php
index 06fffe02e69ca81f2e26eb9e8d7bb9149f4ee2f0..b4ac02e0812fe469175a124aec692e04757af33a 100644
--- a/core/modules/serialization/tests/src/Kernel/SerializationTest.php
+++ b/core/modules/serialization/tests/src/Kernel/SerializationTest.php
@@ -17,7 +17,7 @@ class SerializationTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['serialization', 'serialization_test'];
+  protected static $modules = ['serialization', 'serialization_test'];
 
   /**
    * The serializer service to test.
diff --git a/core/modules/settings_tray/tests/src/Functional/SettingsTrayTest.php b/core/modules/settings_tray/tests/src/Functional/SettingsTrayTest.php
index 2aa98363c63235e73c47cb5cba2d37057473c7d1..61d930e2e891a3f5b629f363b5c43f050e1755f5 100644
--- a/core/modules/settings_tray/tests/src/Functional/SettingsTrayTest.php
+++ b/core/modules/settings_tray/tests/src/Functional/SettingsTrayTest.php
@@ -15,7 +15,7 @@ class SettingsTrayTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'settings_tray',
     'settings_tray_test',
   ];
diff --git a/core/modules/settings_tray/tests/src/FunctionalJavascript/ConfigAccessTest.php b/core/modules/settings_tray/tests/src/FunctionalJavascript/ConfigAccessTest.php
index c441e95446348327b06c7275f67452df57e79a89..cce39b3a44b009079cdd35c94a3e0f8251885480 100644
--- a/core/modules/settings_tray/tests/src/FunctionalJavascript/ConfigAccessTest.php
+++ b/core/modules/settings_tray/tests/src/FunctionalJavascript/ConfigAccessTest.php
@@ -15,7 +15,7 @@ class ConfigAccessTest extends SettingsTrayTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'menu_link_content',
     'menu_ui',
   ];
diff --git a/core/modules/settings_tray/tests/src/FunctionalJavascript/OverriddenConfigurationTest.php b/core/modules/settings_tray/tests/src/FunctionalJavascript/OverriddenConfigurationTest.php
index 42f132ba52c76741ad2477474eb8ed3e30e8967d..f5959380b14c829fbf2400bf10430a5ab76e5769 100644
--- a/core/modules/settings_tray/tests/src/FunctionalJavascript/OverriddenConfigurationTest.php
+++ b/core/modules/settings_tray/tests/src/FunctionalJavascript/OverriddenConfigurationTest.php
@@ -16,7 +16,7 @@ class OverriddenConfigurationTest extends SettingsTrayTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'settings_tray_override_test',
     'menu_ui',
     'menu_link_content',
diff --git a/core/modules/settings_tray/tests/src/FunctionalJavascript/QuickEditIntegrationTest.php b/core/modules/settings_tray/tests/src/FunctionalJavascript/QuickEditIntegrationTest.php
index 6e0503311c7ff4cd36da158c19578cb7ca1436c5..e3c075465a764e2f38ad839f9a9aca5c803b1987 100644
--- a/core/modules/settings_tray/tests/src/FunctionalJavascript/QuickEditIntegrationTest.php
+++ b/core/modules/settings_tray/tests/src/FunctionalJavascript/QuickEditIntegrationTest.php
@@ -16,7 +16,7 @@ class QuickEditIntegrationTest extends SettingsTrayTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'node',
     'block_content',
     'quickedit',
diff --git a/core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayBlockFormTest.php b/core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayBlockFormTest.php
index e0569485621ec3408cf70050b27d5a2d0632e426..2abcd36a04485b88648ebec664064caef299d443 100644
--- a/core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayBlockFormTest.php
+++ b/core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayBlockFormTest.php
@@ -17,7 +17,7 @@ class SettingsTrayBlockFormTest extends SettingsTrayTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'node',
     'search',
     'settings_tray_test',
diff --git a/core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayTestBase.php b/core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayTestBase.php
index 2017accd88aa786262ad63ec79041a2a562fa54a..63692e954bb20165dff825290b41d6669d990ad3 100644
--- a/core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayTestBase.php
+++ b/core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayTestBase.php
@@ -16,7 +16,7 @@ class SettingsTrayTestBase extends OffCanvasTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'settings_tray',
     // Add test module to override CSS pointer-events properties because they
     // cause test failures.
diff --git a/core/modules/shortcut/tests/src/Functional/Hal/ShortcutHalJsonAnonTest.php b/core/modules/shortcut/tests/src/Functional/Hal/ShortcutHalJsonAnonTest.php
index 6dd633b7e0d695712913c646ee47fa4afabb679e..9d3006b2e9f9eb84714b7a25d5a3d328b682b49e 100644
--- a/core/modules/shortcut/tests/src/Functional/Hal/ShortcutHalJsonAnonTest.php
+++ b/core/modules/shortcut/tests/src/Functional/Hal/ShortcutHalJsonAnonTest.php
@@ -18,7 +18,7 @@ class ShortcutHalJsonAnonTest extends ShortcutResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/shortcut/tests/src/Functional/Hal/ShortcutHalJsonBasicAuthTest.php b/core/modules/shortcut/tests/src/Functional/Hal/ShortcutHalJsonBasicAuthTest.php
index 65923fdee342051914637cb37bafdfb05c18b5b1..09295a2f14a6f701f147ffefb418df1f6795aa41 100644
--- a/core/modules/shortcut/tests/src/Functional/Hal/ShortcutHalJsonBasicAuthTest.php
+++ b/core/modules/shortcut/tests/src/Functional/Hal/ShortcutHalJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class ShortcutHalJsonBasicAuthTest extends ShortcutHalJsonAnonTest {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/shortcut/tests/src/Functional/Hal/ShortcutSetHalJsonAnonTest.php b/core/modules/shortcut/tests/src/Functional/Hal/ShortcutSetHalJsonAnonTest.php
index 4f1948059523431f2f1abce06f8c81c86a1ff9c4..4782b18ea4cc336b55bf72e107dd719d5561d3a8 100644
--- a/core/modules/shortcut/tests/src/Functional/Hal/ShortcutSetHalJsonAnonTest.php
+++ b/core/modules/shortcut/tests/src/Functional/Hal/ShortcutSetHalJsonAnonTest.php
@@ -15,7 +15,7 @@ class ShortcutSetHalJsonAnonTest extends ShortcutSetResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/shortcut/tests/src/Functional/Hal/ShortcutSetHalJsonBasicAuthTest.php b/core/modules/shortcut/tests/src/Functional/Hal/ShortcutSetHalJsonBasicAuthTest.php
index 5d7b701489252ac08ce27ee487ba5d5eb9c98ad5..4ee80a0ce16a3ce6abbee579981521fb7522f4ff 100644
--- a/core/modules/shortcut/tests/src/Functional/Hal/ShortcutSetHalJsonBasicAuthTest.php
+++ b/core/modules/shortcut/tests/src/Functional/Hal/ShortcutSetHalJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class ShortcutSetHalJsonBasicAuthTest extends ShortcutSetHalJsonAnonTest {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/shortcut/tests/src/Functional/Rest/ShortcutJsonBasicAuthTest.php b/core/modules/shortcut/tests/src/Functional/Rest/ShortcutJsonBasicAuthTest.php
index c36716e58c243e937c6843d2ce37f7b3adbb9088..2d233dd94276d1208be76446509606cdf762b915 100644
--- a/core/modules/shortcut/tests/src/Functional/Rest/ShortcutJsonBasicAuthTest.php
+++ b/core/modules/shortcut/tests/src/Functional/Rest/ShortcutJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class ShortcutJsonBasicAuthTest extends ShortcutResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/shortcut/tests/src/Functional/Rest/ShortcutResourceTestBase.php b/core/modules/shortcut/tests/src/Functional/Rest/ShortcutResourceTestBase.php
index c2ed8422d8bb8da73824456c014118f352b5a43e..c64293bd4d18e869a9eabeea2295517edc18c202 100644
--- a/core/modules/shortcut/tests/src/Functional/Rest/ShortcutResourceTestBase.php
+++ b/core/modules/shortcut/tests/src/Functional/Rest/ShortcutResourceTestBase.php
@@ -14,7 +14,7 @@ abstract class ShortcutResourceTestBase extends EntityResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['comment', 'shortcut'];
+  protected static $modules = ['comment', 'shortcut'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/shortcut/tests/src/Functional/Rest/ShortcutSetJsonBasicAuthTest.php b/core/modules/shortcut/tests/src/Functional/Rest/ShortcutSetJsonBasicAuthTest.php
index 620f1f7220668483326832cc97b933bb15fc4022..d1f4dea530c5f35f9a297cc92c481b55349c3add 100644
--- a/core/modules/shortcut/tests/src/Functional/Rest/ShortcutSetJsonBasicAuthTest.php
+++ b/core/modules/shortcut/tests/src/Functional/Rest/ShortcutSetJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class ShortcutSetJsonBasicAuthTest extends ShortcutSetResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/shortcut/tests/src/Functional/Rest/ShortcutSetResourceTestBase.php b/core/modules/shortcut/tests/src/Functional/Rest/ShortcutSetResourceTestBase.php
index 1510df288ae8098a1268c862f1196b7c87cc0be6..580f35cd321070a871fca6eb1eb638aab4f924e2 100644
--- a/core/modules/shortcut/tests/src/Functional/Rest/ShortcutSetResourceTestBase.php
+++ b/core/modules/shortcut/tests/src/Functional/Rest/ShortcutSetResourceTestBase.php
@@ -13,7 +13,7 @@ abstract class ShortcutSetResourceTestBase extends EntityResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['shortcut'];
+  protected static $modules = ['shortcut'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/shortcut/tests/src/Functional/Rest/ShortcutSetXmlBasicAuthTest.php b/core/modules/shortcut/tests/src/Functional/Rest/ShortcutSetXmlBasicAuthTest.php
index 67b32991d55e4ff1d89eab700cefbaf9e1989601..f3d09e2d4a91a31cef1c17db204342109576ebcf 100644
--- a/core/modules/shortcut/tests/src/Functional/Rest/ShortcutSetXmlBasicAuthTest.php
+++ b/core/modules/shortcut/tests/src/Functional/Rest/ShortcutSetXmlBasicAuthTest.php
@@ -16,7 +16,7 @@ class ShortcutSetXmlBasicAuthTest extends ShortcutSetResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/shortcut/tests/src/Functional/Rest/ShortcutXmlBasicAuthTest.php b/core/modules/shortcut/tests/src/Functional/Rest/ShortcutXmlBasicAuthTest.php
index 209de30ae70e00e5ef3d1eb2ee3601bc953b03b1..8e5c64f1d842e81955ca9c4d489544b54083889f 100644
--- a/core/modules/shortcut/tests/src/Functional/Rest/ShortcutXmlBasicAuthTest.php
+++ b/core/modules/shortcut/tests/src/Functional/Rest/ShortcutXmlBasicAuthTest.php
@@ -16,7 +16,7 @@ class ShortcutXmlBasicAuthTest extends ShortcutResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/shortcut/tests/src/Functional/ShortcutCacheTagsTest.php b/core/modules/shortcut/tests/src/Functional/ShortcutCacheTagsTest.php
index fa5297f05924413d0ce19f9224ffd02829c2d0aa..a2de766e7022304db5f59783008f410e73c26ceb 100644
--- a/core/modules/shortcut/tests/src/Functional/ShortcutCacheTagsTest.php
+++ b/core/modules/shortcut/tests/src/Functional/ShortcutCacheTagsTest.php
@@ -21,7 +21,7 @@ class ShortcutCacheTagsTest extends EntityCacheTagsTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['toolbar', 'shortcut', 'test_page_test', 'block'];
+  protected static $modules = ['toolbar', 'shortcut', 'test_page_test', 'block'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/shortcut/tests/src/Functional/ShortcutLinksTest.php b/core/modules/shortcut/tests/src/Functional/ShortcutLinksTest.php
index 4a655f1fbd28e714e0d6c565fee1a05bb4f81717..a0b95b26119cf3c23a6637fe2e249d82e679bb56 100644
--- a/core/modules/shortcut/tests/src/Functional/ShortcutLinksTest.php
+++ b/core/modules/shortcut/tests/src/Functional/ShortcutLinksTest.php
@@ -26,7 +26,7 @@ class ShortcutLinksTest extends ShortcutTestBase {
    *
    * @var array
    */
-  public static $modules = ['router_test', 'views', 'block'];
+  protected static $modules = ['router_test', 'views', 'block'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/shortcut/tests/src/Functional/ShortcutSetsTest.php b/core/modules/shortcut/tests/src/Functional/ShortcutSetsTest.php
index b11293e6c3ab37cdb71eeacbcd4c5f0a41d80c69..b2971222e51b49ec2c88c148a5ef073a64a85406 100644
--- a/core/modules/shortcut/tests/src/Functional/ShortcutSetsTest.php
+++ b/core/modules/shortcut/tests/src/Functional/ShortcutSetsTest.php
@@ -16,7 +16,7 @@ class ShortcutSetsTest extends ShortcutTestBase {
    *
    * @var string[]
    */
-  public static $modules = ['block'];
+  protected static $modules = ['block'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/shortcut/tests/src/Functional/ShortcutTestBase.php b/core/modules/shortcut/tests/src/Functional/ShortcutTestBase.php
index c11c418ae9a33d19737bdc898ac2335b1583f545..d8fab49c0c2878f116ca6c94b24aeab7b30ff20e 100644
--- a/core/modules/shortcut/tests/src/Functional/ShortcutTestBase.php
+++ b/core/modules/shortcut/tests/src/Functional/ShortcutTestBase.php
@@ -17,7 +17,7 @@ abstract class ShortcutTestBase extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'toolbar', 'shortcut'];
+  protected static $modules = ['node', 'toolbar', 'shortcut'];
 
   /**
    * User with permission to administer shortcuts.
diff --git a/core/modules/shortcut/tests/src/Functional/ShortcutTranslationUITest.php b/core/modules/shortcut/tests/src/Functional/ShortcutTranslationUITest.php
index 0214c29fa505e7ce804c8bceaf7cb4c2580aa9a8..24f41259f1bbf729c8b59f7125250a4bbd92d63f 100644
--- a/core/modules/shortcut/tests/src/Functional/ShortcutTranslationUITest.php
+++ b/core/modules/shortcut/tests/src/Functional/ShortcutTranslationUITest.php
@@ -24,7 +24,7 @@ class ShortcutTranslationUITest extends ContentTranslationUITestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'language',
     'content_translation',
     'link',
diff --git a/core/modules/shortcut/tests/src/Kernel/Migrate/MigrateShortcutStubTest.php b/core/modules/shortcut/tests/src/Kernel/Migrate/MigrateShortcutStubTest.php
index f462e07956a9a9bf51b2cff59322123285c2fda4..bf3eb6b208b49b38638c162b0bfd12709503a291 100644
--- a/core/modules/shortcut/tests/src/Kernel/Migrate/MigrateShortcutStubTest.php
+++ b/core/modules/shortcut/tests/src/Kernel/Migrate/MigrateShortcutStubTest.php
@@ -17,7 +17,7 @@ class MigrateShortcutStubTest extends MigrateDrupalTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['shortcut', 'link'];
+  protected static $modules = ['shortcut', 'link'];
 
   /**
    * {@inheritdoc}
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 f3484ec7e6f544d918c2ac103701d8cb7a233a64..0e7bc8c7af8f50ab46769c0e806838923b182ca8 100644
--- a/core/modules/shortcut/tests/src/Kernel/Migrate/d7/MigrateShortcutSetTest.php
+++ b/core/modules/shortcut/tests/src/Kernel/Migrate/d7/MigrateShortcutSetTest.php
@@ -18,7 +18,7 @@ class MigrateShortcutSetTest extends MigrateDrupal7TestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'link',
     'field',
     'shortcut',
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 ff73880fd0ccf275807ada1de808310084c2308b..deca603a15061668f2fab5f5b77bb33bdc25be0e 100644
--- a/core/modules/shortcut/tests/src/Kernel/Migrate/d7/MigrateShortcutSetUsersTest.php
+++ b/core/modules/shortcut/tests/src/Kernel/Migrate/d7/MigrateShortcutSetUsersTest.php
@@ -17,7 +17,7 @@ class MigrateShortcutSetUsersTest extends MigrateDrupal7TestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'link',
     'field',
     'shortcut',
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 80b6dbd0f62346da53e22a514c3f40488ebd745e..6be47199c3e2217df4493d7af2710d86d20e0f50 100644
--- a/core/modules/shortcut/tests/src/Kernel/Migrate/d7/MigrateShortcutTest.php
+++ b/core/modules/shortcut/tests/src/Kernel/Migrate/d7/MigrateShortcutTest.php
@@ -18,7 +18,7 @@ class MigrateShortcutTest extends MigrateDrupal7TestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'link',
     'field',
     'shortcut',
diff --git a/core/modules/shortcut/tests/src/Kernel/Plugin/migrate/source/d7/ShortcutSetTest.php b/core/modules/shortcut/tests/src/Kernel/Plugin/migrate/source/d7/ShortcutSetTest.php
index e1982de648deef5c1d139983ab2fa38c177ce398..302f80dbe6589b85e3059afbe474de3d73ee24b6 100644
--- a/core/modules/shortcut/tests/src/Kernel/Plugin/migrate/source/d7/ShortcutSetTest.php
+++ b/core/modules/shortcut/tests/src/Kernel/Plugin/migrate/source/d7/ShortcutSetTest.php
@@ -16,7 +16,7 @@ class ShortcutSetTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['shortcut', 'migrate_drupal'];
+  protected static $modules = ['shortcut', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/shortcut/tests/src/Kernel/Plugin/migrate/source/d7/ShortcutSetUsersTest.php b/core/modules/shortcut/tests/src/Kernel/Plugin/migrate/source/d7/ShortcutSetUsersTest.php
index 035aec31c909e05d9c83328f27589444aa8372da..5dc83f79ef9bb9323b645ac39796710c0aa0baca 100644
--- a/core/modules/shortcut/tests/src/Kernel/Plugin/migrate/source/d7/ShortcutSetUsersTest.php
+++ b/core/modules/shortcut/tests/src/Kernel/Plugin/migrate/source/d7/ShortcutSetUsersTest.php
@@ -16,7 +16,7 @@ class ShortcutSetUsersTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['shortcut', 'migrate_drupal'];
+  protected static $modules = ['shortcut', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/shortcut/tests/src/Kernel/Plugin/migrate/source/d7/ShortcutTest.php b/core/modules/shortcut/tests/src/Kernel/Plugin/migrate/source/d7/ShortcutTest.php
index 4435e81b2fe0f5b3dbcb071f1ccbf007267f6583..afd1e1d9651e14d4ace6f2ef04c9cc5f121a3b2e 100644
--- a/core/modules/shortcut/tests/src/Kernel/Plugin/migrate/source/d7/ShortcutTest.php
+++ b/core/modules/shortcut/tests/src/Kernel/Plugin/migrate/source/d7/ShortcutTest.php
@@ -16,7 +16,7 @@ class ShortcutTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['shortcut', 'migrate_drupal'];
+  protected static $modules = ['shortcut', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/shortcut/tests/src/Kernel/ShortcutSevenIntegrationTest.php b/core/modules/shortcut/tests/src/Kernel/ShortcutSevenIntegrationTest.php
index 0d58c31659cf91a867bb364355955ce73842df73..2e43bf700c2abd707d1301e560a713ff0d3e6ffa 100644
--- a/core/modules/shortcut/tests/src/Kernel/ShortcutSevenIntegrationTest.php
+++ b/core/modules/shortcut/tests/src/Kernel/ShortcutSevenIntegrationTest.php
@@ -11,7 +11,7 @@
  */
 class ShortcutSevenIntegrationTest extends KernelTestBase {
 
-  public static $modules = ['system'];
+  protected static $modules = ['system'];
 
   /**
    * Tests shortcut_install() and shortcut_uninstall().
diff --git a/core/modules/statistics/tests/src/Functional/StatisticsAdminTest.php b/core/modules/statistics/tests/src/Functional/StatisticsAdminTest.php
index 5519aa7780b40a2208727bcb188082e3ee8f20c1..33ddb136c962c9834b92e77bbd2e43700df2b902 100644
--- a/core/modules/statistics/tests/src/Functional/StatisticsAdminTest.php
+++ b/core/modules/statistics/tests/src/Functional/StatisticsAdminTest.php
@@ -20,7 +20,7 @@ class StatisticsAdminTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'statistics'];
+  protected static $modules = ['node', 'statistics'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/statistics/tests/src/Functional/StatisticsAttachedTest.php b/core/modules/statistics/tests/src/Functional/StatisticsAttachedTest.php
index 95cd0ae8c2e0e59889fb43f1ce59d1980e7d12e8..719bc507be932af9ce91f727c5c77689fb1fa78c 100644
--- a/core/modules/statistics/tests/src/Functional/StatisticsAttachedTest.php
+++ b/core/modules/statistics/tests/src/Functional/StatisticsAttachedTest.php
@@ -17,7 +17,7 @@ class StatisticsAttachedTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'statistics'];
+  protected static $modules = ['node', 'statistics'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/statistics/tests/src/Functional/StatisticsLoggingTest.php b/core/modules/statistics/tests/src/Functional/StatisticsLoggingTest.php
index d76cd89584c21694782a9b505096a823b873d98f..b44155ff2240ff10e21a67097370a26353315221 100644
--- a/core/modules/statistics/tests/src/Functional/StatisticsLoggingTest.php
+++ b/core/modules/statistics/tests/src/Functional/StatisticsLoggingTest.php
@@ -21,7 +21,7 @@ class StatisticsLoggingTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'statistics', 'block', 'locale'];
+  protected static $modules = ['node', 'statistics', 'block', 'locale'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/statistics/tests/src/Functional/StatisticsTestBase.php b/core/modules/statistics/tests/src/Functional/StatisticsTestBase.php
index 3be95e2ab6eec54d19601d2bc39fa7a42bfbcea9..d55db184598b7119f74d300cb206d52caaccd2f6 100644
--- a/core/modules/statistics/tests/src/Functional/StatisticsTestBase.php
+++ b/core/modules/statistics/tests/src/Functional/StatisticsTestBase.php
@@ -14,7 +14,7 @@ abstract class StatisticsTestBase extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'block', 'ban', 'statistics'];
+  protected static $modules = ['node', 'block', 'ban', 'statistics'];
 
   /**
    * User with permissions to ban IP's.
diff --git a/core/modules/statistics/tests/src/Functional/Views/IntegrationTest.php b/core/modules/statistics/tests/src/Functional/Views/IntegrationTest.php
index 5e301bc52ab136b32ee7b3551ff991197728fa45..82b26162c4931cd3666a3821a688dcfba7447898 100644
--- a/core/modules/statistics/tests/src/Functional/Views/IntegrationTest.php
+++ b/core/modules/statistics/tests/src/Functional/Views/IntegrationTest.php
@@ -19,7 +19,7 @@ class IntegrationTest extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = ['statistics', 'statistics_test_views', 'node'];
+  protected static $modules = ['statistics', 'statistics_test_views', 'node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/statistics/tests/src/FunctionalJavascript/StatisticsLoggingTest.php b/core/modules/statistics/tests/src/FunctionalJavascript/StatisticsLoggingTest.php
index 211c0ec7593eeb528be2d2a9964320169151b691..f47492df0ae8ddade64385809282dcba7518f31f 100644
--- a/core/modules/statistics/tests/src/FunctionalJavascript/StatisticsLoggingTest.php
+++ b/core/modules/statistics/tests/src/FunctionalJavascript/StatisticsLoggingTest.php
@@ -17,7 +17,7 @@ class StatisticsLoggingTest extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'statistics', 'language'];
+  protected static $modules = ['node', 'statistics', 'language'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/statistics/tests/src/Kernel/Migrate/d6/MigrateNodeCounterTest.php b/core/modules/statistics/tests/src/Kernel/Migrate/d6/MigrateNodeCounterTest.php
index 2f8280b75cf5881e272514557b83334dec66b83c..7e31b6a308f9a837b534d98100741a41e335b693 100644
--- a/core/modules/statistics/tests/src/Kernel/Migrate/d6/MigrateNodeCounterTest.php
+++ b/core/modules/statistics/tests/src/Kernel/Migrate/d6/MigrateNodeCounterTest.php
@@ -14,7 +14,7 @@ class MigrateNodeCounterTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'content_translation',
     'language',
     'menu_ui',
diff --git a/core/modules/statistics/tests/src/Kernel/Migrate/d6/MigrateStatisticsConfigsTest.php b/core/modules/statistics/tests/src/Kernel/Migrate/d6/MigrateStatisticsConfigsTest.php
index f7941530985c5d5c9c961110d983fa7b6fe458df..3a698d8fc6822b7ecf11efd68a23115182a39334 100644
--- a/core/modules/statistics/tests/src/Kernel/Migrate/d6/MigrateStatisticsConfigsTest.php
+++ b/core/modules/statistics/tests/src/Kernel/Migrate/d6/MigrateStatisticsConfigsTest.php
@@ -17,7 +17,7 @@ class MigrateStatisticsConfigsTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['statistics'];
+  protected static $modules = ['statistics'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/statistics/tests/src/Kernel/Migrate/d7/MigrateNodeCounterTest.php b/core/modules/statistics/tests/src/Kernel/Migrate/d7/MigrateNodeCounterTest.php
index d32af299c7767fc24b5c5f856f52ab9d592813d0..f2041654f285b48033d8555c85ce9ba2b2733947 100644
--- a/core/modules/statistics/tests/src/Kernel/Migrate/d7/MigrateNodeCounterTest.php
+++ b/core/modules/statistics/tests/src/Kernel/Migrate/d7/MigrateNodeCounterTest.php
@@ -14,7 +14,7 @@ class MigrateNodeCounterTest extends MigrateDrupal7TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'content_translation',
     'language',
     'menu_ui',
diff --git a/core/modules/statistics/tests/src/Kernel/Migrate/d7/MigrateStatisticsConfigsTest.php b/core/modules/statistics/tests/src/Kernel/Migrate/d7/MigrateStatisticsConfigsTest.php
index 09cea6414a4261e7f1e092606fcb7251c5b6100b..a3d0298febe7783351fe696b91834e83cf59ef0d 100644
--- a/core/modules/statistics/tests/src/Kernel/Migrate/d7/MigrateStatisticsConfigsTest.php
+++ b/core/modules/statistics/tests/src/Kernel/Migrate/d7/MigrateStatisticsConfigsTest.php
@@ -17,7 +17,7 @@ class MigrateStatisticsConfigsTest extends MigrateDrupal7TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['statistics'];
+  protected static $modules = ['statistics'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/statistics/tests/src/Kernel/Plugin/migrate/source/NodeCounterTest.php b/core/modules/statistics/tests/src/Kernel/Plugin/migrate/source/NodeCounterTest.php
index 0cbc76afec3327e694cc2ed02dd32470f8eb3f26..f2a64c44161eb45d56f071530d6af4074639ddcd 100644
--- a/core/modules/statistics/tests/src/Kernel/Plugin/migrate/source/NodeCounterTest.php
+++ b/core/modules/statistics/tests/src/Kernel/Plugin/migrate/source/NodeCounterTest.php
@@ -16,7 +16,7 @@ class NodeCounterTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['migrate_drupal', 'statistics'];
+  protected static $modules = ['migrate_drupal', 'statistics'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/syslog/tests/src/Functional/SyslogTest.php b/core/modules/syslog/tests/src/Functional/SyslogTest.php
index 8348cb1ee27a83f5f395f796240a97eba339b21d..15aad39bfa705804a12ddcc540c4c891794d9ef0 100644
--- a/core/modules/syslog/tests/src/Functional/SyslogTest.php
+++ b/core/modules/syslog/tests/src/Functional/SyslogTest.php
@@ -16,7 +16,7 @@ class SyslogTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['syslog'];
+  protected static $modules = ['syslog'];
 
   /**
    * {@inheritdoc}
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 ac75c0e98ff8eb858ac829bb7f0c8f4c44d8d92a..d180db354e7eb573b05405ca4594a562ac0991f2 100644
--- a/core/modules/syslog/tests/src/Kernel/Migrate/d6/MigrateSyslogConfigsTest.php
+++ b/core/modules/syslog/tests/src/Kernel/Migrate/d6/MigrateSyslogConfigsTest.php
@@ -17,7 +17,7 @@ class MigrateSyslogConfigsTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['syslog'];
+  protected static $modules = ['syslog'];
 
   /**
    * {@inheritdoc}
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 e74744723850b5a084b121e935be4f0f7210f110..c60878eec787bec88da54b361052ddc83134cec5 100644
--- a/core/modules/syslog/tests/src/Kernel/Migrate/d7/MigrateSyslogConfigsTest.php
+++ b/core/modules/syslog/tests/src/Kernel/Migrate/d7/MigrateSyslogConfigsTest.php
@@ -19,7 +19,7 @@ class MigrateSyslogConfigsTest extends MigrateDrupal7TestBase {
    *
    * @var array
    */
-  public static $modules = ['syslog'];
+  protected static $modules = ['syslog'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/syslog/tests/src/Kernel/SyslogTest.php b/core/modules/syslog/tests/src/Kernel/SyslogTest.php
index 7fd6e8217eb2606245e429ac494781a923dcce7d..2ee04c7f5a10ca207345f00976b6e9b889695e15 100644
--- a/core/modules/syslog/tests/src/Kernel/SyslogTest.php
+++ b/core/modules/syslog/tests/src/Kernel/SyslogTest.php
@@ -13,7 +13,7 @@
  */
 class SyslogTest extends KernelTestBase {
 
-  public static $modules = ['syslog', 'syslog_test'];
+  protected static $modules = ['syslog', 'syslog_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/src/Tests/Ajax/AjaxTestBase.php b/core/modules/system/src/Tests/Ajax/AjaxTestBase.php
index 66e06c88a467147c0d616b876e186f6d2db1bd42..067569242ef97c19ecda7459ac4800614ce55419 100644
--- a/core/modules/system/src/Tests/Ajax/AjaxTestBase.php
+++ b/core/modules/system/src/Tests/Ajax/AjaxTestBase.php
@@ -14,7 +14,7 @@ abstract class AjaxTestBase extends WebTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'ajax_test', 'ajax_forms_test'];
+  protected static $modules = ['node', 'ajax_test', 'ajax_forms_test'];
 
   /**
    * Asserts the array of Ajax commands contains the searched command.
diff --git a/core/modules/system/tests/modules/entity_test/tests/src/Functional/Hal/EntityTestBundleHalJsonAnonTest.php b/core/modules/system/tests/modules/entity_test/tests/src/Functional/Hal/EntityTestBundleHalJsonAnonTest.php
index 2802bee928501b926124b5b2ee22979b3e766ef1..032b885aad74f6572079ad46c6d36933959ab792 100644
--- a/core/modules/system/tests/modules/entity_test/tests/src/Functional/Hal/EntityTestBundleHalJsonAnonTest.php
+++ b/core/modules/system/tests/modules/entity_test/tests/src/Functional/Hal/EntityTestBundleHalJsonAnonTest.php
@@ -17,7 +17,7 @@ class EntityTestBundleHalJsonAnonTest extends EntityTestBundleResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/modules/entity_test/tests/src/Functional/Hal/EntityTestBundleHalJsonBasicAuthTest.php b/core/modules/system/tests/modules/entity_test/tests/src/Functional/Hal/EntityTestBundleHalJsonBasicAuthTest.php
index 0557bfe740981d62143563c95295c222fbf153c4..7f7a502b3585431862e829c8f03bb703944d3261 100644
--- a/core/modules/system/tests/modules/entity_test/tests/src/Functional/Hal/EntityTestBundleHalJsonBasicAuthTest.php
+++ b/core/modules/system/tests/modules/entity_test/tests/src/Functional/Hal/EntityTestBundleHalJsonBasicAuthTest.php
@@ -15,7 +15,7 @@ class EntityTestBundleHalJsonBasicAuthTest extends EntityTestBundleResourceTestB
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal', 'basic_auth'];
+  protected static $modules = ['hal', 'basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/modules/entity_test/tests/src/Functional/Hal/EntityTestBundleHalJsonCookieTest.php b/core/modules/system/tests/modules/entity_test/tests/src/Functional/Hal/EntityTestBundleHalJsonCookieTest.php
index c604aa900eae1ad6c0fc453ea9e0179b6096309c..d1dc648911eab34a9f74167fc5757191d2781e4a 100644
--- a/core/modules/system/tests/modules/entity_test/tests/src/Functional/Hal/EntityTestBundleHalJsonCookieTest.php
+++ b/core/modules/system/tests/modules/entity_test/tests/src/Functional/Hal/EntityTestBundleHalJsonCookieTest.php
@@ -15,7 +15,7 @@ class EntityTestBundleHalJsonCookieTest extends EntityTestBundleResourceTestBase
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/modules/entity_test/tests/src/Functional/Hal/EntityTestHalJsonAnonTest.php b/core/modules/system/tests/modules/entity_test/tests/src/Functional/Hal/EntityTestHalJsonAnonTest.php
index c5eafbd5d2390fda9c6cb13de71c5e0d279b3f7d..bae772cbd94e674f462e1eb9c8822f02e42d2470 100644
--- a/core/modules/system/tests/modules/entity_test/tests/src/Functional/Hal/EntityTestHalJsonAnonTest.php
+++ b/core/modules/system/tests/modules/entity_test/tests/src/Functional/Hal/EntityTestHalJsonAnonTest.php
@@ -18,7 +18,7 @@ class EntityTestHalJsonAnonTest extends EntityTestResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/modules/entity_test/tests/src/Functional/Hal/EntityTestHalJsonBasicAuthTest.php b/core/modules/system/tests/modules/entity_test/tests/src/Functional/Hal/EntityTestHalJsonBasicAuthTest.php
index faef8d1cfc1ce06c68815a0a3ec96ee772929519..505251835c260dd094971ee8ab698ed64a9e19eb 100644
--- a/core/modules/system/tests/modules/entity_test/tests/src/Functional/Hal/EntityTestHalJsonBasicAuthTest.php
+++ b/core/modules/system/tests/modules/entity_test/tests/src/Functional/Hal/EntityTestHalJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class EntityTestHalJsonBasicAuthTest extends EntityTestHalJsonAnonTest {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/modules/entity_test/tests/src/Functional/Hal/EntityTestHalJsonInternalPropertyNormalizerTest.php b/core/modules/system/tests/modules/entity_test/tests/src/Functional/Hal/EntityTestHalJsonInternalPropertyNormalizerTest.php
index d68315ceb853170ea85c80abfce52d66598da7fc..65437c6b77ca92e32ae14fce39bb1a422ac9fd93 100644
--- a/core/modules/system/tests/modules/entity_test/tests/src/Functional/Hal/EntityTestHalJsonInternalPropertyNormalizerTest.php
+++ b/core/modules/system/tests/modules/entity_test/tests/src/Functional/Hal/EntityTestHalJsonInternalPropertyNormalizerTest.php
@@ -20,7 +20,7 @@ class EntityTestHalJsonInternalPropertyNormalizerTest extends EntityTestHalJsonA
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/modules/entity_test/tests/src/Functional/Hal/EntityTestLabelHalJsonAnonTest.php b/core/modules/system/tests/modules/entity_test/tests/src/Functional/Hal/EntityTestLabelHalJsonAnonTest.php
index 22c6212050498913aa7a8668d895e74270a5d89e..9a04335c0f921d506f407982fd1552cba5474560 100644
--- a/core/modules/system/tests/modules/entity_test/tests/src/Functional/Hal/EntityTestLabelHalJsonAnonTest.php
+++ b/core/modules/system/tests/modules/entity_test/tests/src/Functional/Hal/EntityTestLabelHalJsonAnonTest.php
@@ -18,7 +18,7 @@ class EntityTestLabelHalJsonAnonTest extends EntityTestLabelResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/modules/entity_test/tests/src/Functional/Hal/EntityTestLabelHalJsonBasicAuthTest.php b/core/modules/system/tests/modules/entity_test/tests/src/Functional/Hal/EntityTestLabelHalJsonBasicAuthTest.php
index 4af4063cb5fe72454e8fe90414a514b3ee4e3065..fd2a59c4a5e45ac4b88ca220a959f4e3cb8cc86b 100644
--- a/core/modules/system/tests/modules/entity_test/tests/src/Functional/Hal/EntityTestLabelHalJsonBasicAuthTest.php
+++ b/core/modules/system/tests/modules/entity_test/tests/src/Functional/Hal/EntityTestLabelHalJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class EntityTestLabelHalJsonBasicAuthTest extends EntityTestLabelHalJsonAnonTest
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/modules/entity_test/tests/src/Functional/Hal/EntityTestMapFieldHalJsonAnonTest.php b/core/modules/system/tests/modules/entity_test/tests/src/Functional/Hal/EntityTestMapFieldHalJsonAnonTest.php
index dfee26fbd619e43f9aeaf7bbeea7df1752593479..7502ef0fc7db8f9f358d60ec6b2c304ab1a20ddb 100644
--- a/core/modules/system/tests/modules/entity_test/tests/src/Functional/Hal/EntityTestMapFieldHalJsonAnonTest.php
+++ b/core/modules/system/tests/modules/entity_test/tests/src/Functional/Hal/EntityTestMapFieldHalJsonAnonTest.php
@@ -18,7 +18,7 @@ class EntityTestMapFieldHalJsonAnonTest extends EntityTestMapFieldResourceTestBa
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestBundleJsonBasicAuthTest.php b/core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestBundleJsonBasicAuthTest.php
index a6a437ada4587577a5e5adce021bc49d426c84cf..d1e2189a3c502e64f28951c1a729f67a55b81287 100644
--- a/core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestBundleJsonBasicAuthTest.php
+++ b/core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestBundleJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class EntityTestBundleJsonBasicAuthTest extends EntityTestBundleResourceTestBase
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestBundleResourceTestBase.php b/core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestBundleResourceTestBase.php
index 1d9aa31466c6c84335e2871f326861fe83c9634d..a7b885a7ee1c8c20a18d22641c87dc2a293ec288 100644
--- a/core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestBundleResourceTestBase.php
+++ b/core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestBundleResourceTestBase.php
@@ -10,7 +10,7 @@ abstract class EntityTestBundleResourceTestBase extends EntityResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['entity_test'];
+  protected static $modules = ['entity_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestBundleXmlBasicAuthTest.php b/core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestBundleXmlBasicAuthTest.php
index 059ca8efbd2c3f737f7f7f3d6f0e62a67a925009..4f9fcbbe8b5801e88448c71b048fd4d2a2aa03e3 100644
--- a/core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestBundleXmlBasicAuthTest.php
+++ b/core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestBundleXmlBasicAuthTest.php
@@ -16,7 +16,7 @@ class EntityTestBundleXmlBasicAuthTest extends EntityTestBundleResourceTestBase
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestJsonBasicAuthTest.php b/core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestJsonBasicAuthTest.php
index b79bf3cf0393e819677f8769d4a3a285b49cccde..891171fcafe712a5802a068a49ea138e65ec0964 100644
--- a/core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestJsonBasicAuthTest.php
+++ b/core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class EntityTestJsonBasicAuthTest extends EntityTestResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestLabelJsonBasicAuthTest.php b/core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestLabelJsonBasicAuthTest.php
index 1332774b4f488adb875c2bed6be4f176073541c9..b508a6dbd9aff92f69a5f48e27a0c459e960cf4d 100644
--- a/core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestLabelJsonBasicAuthTest.php
+++ b/core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestLabelJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class EntityTestLabelJsonBasicAuthTest extends EntityTestLabelResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestLabelResourceTestBase.php b/core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestLabelResourceTestBase.php
index 97c5a691350ecfb42d995a2c39146de8459fc65c..a13556dbf4b60fd25926c2e707e9113e56dcf2d8 100644
--- a/core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestLabelResourceTestBase.php
+++ b/core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestLabelResourceTestBase.php
@@ -11,7 +11,7 @@ abstract class EntityTestLabelResourceTestBase extends EntityResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['entity_test'];
+  protected static $modules = ['entity_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestLabelXmlBasicAuthTest.php b/core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestLabelXmlBasicAuthTest.php
index 067780894f360f0dda1afd1a827ba0fcf6177f93..0b89dff93568ac71b2299dfbbf56510f7f2a40b6 100644
--- a/core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestLabelXmlBasicAuthTest.php
+++ b/core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestLabelXmlBasicAuthTest.php
@@ -16,7 +16,7 @@ class EntityTestLabelXmlBasicAuthTest extends EntityTestLabelResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestMapFieldResourceTestBase.php b/core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestMapFieldResourceTestBase.php
index 03b9d903eb7be71e3ee64355d4910a62f65a0c55..7616fb7fb397abd6ca9b9a6ea1bf75d64e15756e 100644
--- a/core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestMapFieldResourceTestBase.php
+++ b/core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestMapFieldResourceTestBase.php
@@ -14,7 +14,7 @@ abstract class EntityTestMapFieldResourceTestBase extends EntityResourceTestBase
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['entity_test'];
+  protected static $modules = ['entity_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestResourceTestBase.php b/core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestResourceTestBase.php
index 585d1c1033fbbbd8421d6234dfe3bb120fa98e0d..b1b376eaa7c15a986093496aeab388d6f18cd838 100644
--- a/core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestResourceTestBase.php
+++ b/core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestResourceTestBase.php
@@ -16,7 +16,7 @@ abstract class EntityTestResourceTestBase extends EntityResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['entity_test'];
+  protected static $modules = ['entity_test'];
 
   /**
    * {@inheritdoc}
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 9c3b978cc4223e9e32944b72eff279005d9dca6c..836eeda53575f03e3e9bdbf0c4194157e7f32dbe 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
@@ -17,7 +17,7 @@ class EntityTestTextItemNormalizerTest extends EntityTestResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['filter_test'];
+  protected static $modules = ['filter_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestXmlBasicAuthTest.php b/core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestXmlBasicAuthTest.php
index 71f0e81fdac9159d6129c61739b57a5f01b7561e..f08fae7925cd2a6cda3a5911df9a0df69d21caaa 100644
--- a/core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestXmlBasicAuthTest.php
+++ b/core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestXmlBasicAuthTest.php
@@ -16,7 +16,7 @@ class EntityTestXmlBasicAuthTest extends EntityTestResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Ajax/OffCanvasDialogTest.php b/core/modules/system/tests/src/Functional/Ajax/OffCanvasDialogTest.php
index 919e1e7925d0a0909224f544cf82d2bbfe1dfbe9..1300abbb0d416006eae906ff5af4124fdfe82611 100644
--- a/core/modules/system/tests/src/Functional/Ajax/OffCanvasDialogTest.php
+++ b/core/modules/system/tests/src/Functional/Ajax/OffCanvasDialogTest.php
@@ -24,7 +24,7 @@ class OffCanvasDialogTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['ajax_test'];
+  protected static $modules = ['ajax_test'];
 
   /**
    * Test sending AJAX requests to open and manipulate off-canvas dialog.
diff --git a/core/modules/system/tests/src/Functional/Batch/PageTest.php b/core/modules/system/tests/src/Functional/Batch/PageTest.php
index 239b40c515f54c7f091ce22ce74e3267be3e6585..d63aa5acb9eeeb7fbb3501ec8a5a970c6d17b36f 100644
--- a/core/modules/system/tests/src/Functional/Batch/PageTest.php
+++ b/core/modules/system/tests/src/Functional/Batch/PageTest.php
@@ -16,7 +16,7 @@ class PageTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['batch_test'];
+  protected static $modules = ['batch_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Batch/ProcessingTest.php b/core/modules/system/tests/src/Functional/Batch/ProcessingTest.php
index 2c92d1a81e20672eb36337c812003bd4ce119ddb..c47fb921a841aac1eee05ce8e1b4528f74a7d1c2 100644
--- a/core/modules/system/tests/src/Functional/Batch/ProcessingTest.php
+++ b/core/modules/system/tests/src/Functional/Batch/ProcessingTest.php
@@ -17,7 +17,7 @@ class ProcessingTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['batch_test', 'test_page_test'];
+  protected static $modules = ['batch_test', 'test_page_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Bootstrap/DrupalMessengerServiceTest.php b/core/modules/system/tests/src/Functional/Bootstrap/DrupalMessengerServiceTest.php
index f617897f9c427a6b60f4a45b1d96f58d0a99fc50..be691a78a1ad7284c3bf932a0792ecc88bf98eb5 100644
--- a/core/modules/system/tests/src/Functional/Bootstrap/DrupalMessengerServiceTest.php
+++ b/core/modules/system/tests/src/Functional/Bootstrap/DrupalMessengerServiceTest.php
@@ -17,7 +17,7 @@ class DrupalMessengerServiceTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['system_test'];
+  protected static $modules = ['system_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Cache/SessionExistsCacheContextTest.php b/core/modules/system/tests/src/Functional/Cache/SessionExistsCacheContextTest.php
index 23ad7abaa18c02fa4a677c7ed608a003ca041d50..f2cdcf24d9dbae6604d48a3dceb8173acc33e6b3 100644
--- a/core/modules/system/tests/src/Functional/Cache/SessionExistsCacheContextTest.php
+++ b/core/modules/system/tests/src/Functional/Cache/SessionExistsCacheContextTest.php
@@ -17,7 +17,7 @@ class SessionExistsCacheContextTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['session_exists_cache_context_test'];
+  protected static $modules = ['session_exists_cache_context_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Common/AlterTest.php b/core/modules/system/tests/src/Functional/Common/AlterTest.php
index e96dd4c2da330634b34bb32e63496b6dd133095e..e4d07227fbdfa9231208d032098a82aba9590eb1 100644
--- a/core/modules/system/tests/src/Functional/Common/AlterTest.php
+++ b/core/modules/system/tests/src/Functional/Common/AlterTest.php
@@ -16,7 +16,7 @@ class AlterTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['block', 'common_test'];
+  protected static $modules = ['block', 'common_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Common/EarlyRenderingControllerTest.php b/core/modules/system/tests/src/Functional/Common/EarlyRenderingControllerTest.php
index 9595abbfaf7b44135eb6f0763f15e2fd9f4f9cf0..30e1ef992be7ea0ce48c1728e0793bcc059ff5c4 100644
--- a/core/modules/system/tests/src/Functional/Common/EarlyRenderingControllerTest.php
+++ b/core/modules/system/tests/src/Functional/Common/EarlyRenderingControllerTest.php
@@ -20,7 +20,7 @@ class EarlyRenderingControllerTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system', 'early_rendering_controller_test'];
+  protected static $modules = ['system', 'early_rendering_controller_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Common/RenderWebTest.php b/core/modules/system/tests/src/Functional/Common/RenderWebTest.php
index 5e64bfa92c292e980ecc1b73813de5624862f995..3d5a8760db6e81240bb03b6dfb8ad3992f41d624 100644
--- a/core/modules/system/tests/src/Functional/Common/RenderWebTest.php
+++ b/core/modules/system/tests/src/Functional/Common/RenderWebTest.php
@@ -21,7 +21,7 @@ class RenderWebTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['common_test'];
+  protected static $modules = ['common_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Common/UrlTest.php b/core/modules/system/tests/src/Functional/Common/UrlTest.php
index 7d3eadad42a9cd69cdfeb0d3bd940811df350009..9c648ff3b36c19091259c4b44b55cb109711050e 100644
--- a/core/modules/system/tests/src/Functional/Common/UrlTest.php
+++ b/core/modules/system/tests/src/Functional/Common/UrlTest.php
@@ -22,7 +22,7 @@
  */
 class UrlTest extends BrowserTestBase {
 
-  public static $modules = ['common_test', 'url_alter_test'];
+  protected static $modules = ['common_test', 'url_alter_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Condition/ConditionFormTest.php b/core/modules/system/tests/src/Functional/Condition/ConditionFormTest.php
index 2cdaabeb3ee0af96ed74c7d16b415c2b02b6c279..1500cd3db6073a637dd5de32e85b3414b70e82da 100644
--- a/core/modules/system/tests/src/Functional/Condition/ConditionFormTest.php
+++ b/core/modules/system/tests/src/Functional/Condition/ConditionFormTest.php
@@ -16,7 +16,7 @@
  */
 class ConditionFormTest extends BrowserTestBase {
 
-  public static $modules = ['node', 'condition_test'];
+  protected static $modules = ['node', 'condition_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/CsrfRequestHeaderTest.php b/core/modules/system/tests/src/Functional/CsrfRequestHeaderTest.php
index 154845ad531c0eb0b9f68e09a59a7ae44e05e2b4..68c4861d5c2eb275cfb0e89949a9cbb902338695 100644
--- a/core/modules/system/tests/src/Functional/CsrfRequestHeaderTest.php
+++ b/core/modules/system/tests/src/Functional/CsrfRequestHeaderTest.php
@@ -17,7 +17,7 @@ class CsrfRequestHeaderTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['system', 'csrf_test'];
+  protected static $modules = ['system', 'csrf_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Database/DatabaseTestBase.php b/core/modules/system/tests/src/Functional/Database/DatabaseTestBase.php
index a28c1dba2368faa1c2bc8a050d4c10123f74b1cf..9193ee1032f6e51a201c62c3809e32306309d820 100644
--- a/core/modules/system/tests/src/Functional/Database/DatabaseTestBase.php
+++ b/core/modules/system/tests/src/Functional/Database/DatabaseTestBase.php
@@ -13,7 +13,7 @@ abstract class DatabaseTestBase extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['database_test'];
+  protected static $modules = ['database_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Database/TemporaryQueryTest.php b/core/modules/system/tests/src/Functional/Database/TemporaryQueryTest.php
index c31b96bb5b98ce31ef41fef69178d553ddf57eae..9eb111e12473c249c41e648563a98ae221add315 100644
--- a/core/modules/system/tests/src/Functional/Database/TemporaryQueryTest.php
+++ b/core/modules/system/tests/src/Functional/Database/TemporaryQueryTest.php
@@ -14,7 +14,7 @@ class TemporaryQueryTest extends DatabaseTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['database_test'];
+  protected static $modules = ['database_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Datetime/DrupalDateTimeTest.php b/core/modules/system/tests/src/Functional/Datetime/DrupalDateTimeTest.php
index 27f6720fa0a459c13829b10a3a0915bc70a1e977..d9c9494f994d17b8970f5ddb710fd80b83c97d26 100644
--- a/core/modules/system/tests/src/Functional/Datetime/DrupalDateTimeTest.php
+++ b/core/modules/system/tests/src/Functional/Datetime/DrupalDateTimeTest.php
@@ -16,7 +16,7 @@ class DrupalDateTimeTest extends BrowserTestBase {
   /**
    * Set up required modules.
    */
-  public static $modules = [];
+  protected static $modules = [];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/DrupalKernel/ContainerRebuildWebTest.php b/core/modules/system/tests/src/Functional/DrupalKernel/ContainerRebuildWebTest.php
index 93deab12b8e0b39e8961a3cf059183ebebada710..4a7fad4e7284801a73a8acc60536293acc81f7da 100644
--- a/core/modules/system/tests/src/Functional/DrupalKernel/ContainerRebuildWebTest.php
+++ b/core/modules/system/tests/src/Functional/DrupalKernel/ContainerRebuildWebTest.php
@@ -14,7 +14,7 @@ class ContainerRebuildWebTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['service_provider_test'];
+  protected static $modules = ['service_provider_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Entity/EntityAddUITest.php b/core/modules/system/tests/src/Functional/Entity/EntityAddUITest.php
index 3e8d187dbe0dec5ce38d3d1b3cbd867c8eac3c4b..5cfdeacef634233669806794694069d71b304f8a 100644
--- a/core/modules/system/tests/src/Functional/Entity/EntityAddUITest.php
+++ b/core/modules/system/tests/src/Functional/Entity/EntityAddUITest.php
@@ -17,7 +17,7 @@ class EntityAddUITest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['entity_test'];
+  protected static $modules = ['entity_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Entity/EntityCacheTagsTestBase.php b/core/modules/system/tests/src/Functional/Entity/EntityCacheTagsTestBase.php
index a5555aa157c5f82b01512dfd9e863ca22cbb909f..82c33514df4f9188b6dc3891a8a62389387bf5af 100644
--- a/core/modules/system/tests/src/Functional/Entity/EntityCacheTagsTestBase.php
+++ b/core/modules/system/tests/src/Functional/Entity/EntityCacheTagsTestBase.php
@@ -24,7 +24,7 @@ abstract class EntityCacheTagsTestBase extends PageCacheTagsTestBase {
    *
    * @var array
    */
-  public static $modules = ['entity_test', 'field_test'];
+  protected static $modules = ['entity_test', 'field_test'];
 
   /**
    * The main entity used for testing.
diff --git a/core/modules/system/tests/src/Functional/Entity/EntityFormTest.php b/core/modules/system/tests/src/Functional/Entity/EntityFormTest.php
index 20703e46230a299b4f509d65ab39e612199fcc6b..836186c5073764d64ca0c107511846d7b8e37f18 100644
--- a/core/modules/system/tests/src/Functional/Entity/EntityFormTest.php
+++ b/core/modules/system/tests/src/Functional/Entity/EntityFormTest.php
@@ -18,7 +18,7 @@ class EntityFormTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['entity_test', 'language'];
+  protected static $modules = ['entity_test', 'language'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Entity/EntityListBuilderTest.php b/core/modules/system/tests/src/Functional/Entity/EntityListBuilderTest.php
index c73e9282d1de4eff5799bd7f924a4f2927013ba8..a97ee330a5e01bea594b6ffe3939b9b45392ecff 100644
--- a/core/modules/system/tests/src/Functional/Entity/EntityListBuilderTest.php
+++ b/core/modules/system/tests/src/Functional/Entity/EntityListBuilderTest.php
@@ -16,7 +16,7 @@ class EntityListBuilderTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['entity_test'];
+  protected static $modules = ['entity_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Entity/EntityOperationsTest.php b/core/modules/system/tests/src/Functional/Entity/EntityOperationsTest.php
index b1e1c16485e22ade583108543a1769e392b0d00d..d09718c5cd9a7e5b902dc12fdc4bbd907a28c325 100644
--- a/core/modules/system/tests/src/Functional/Entity/EntityOperationsTest.php
+++ b/core/modules/system/tests/src/Functional/Entity/EntityOperationsTest.php
@@ -17,7 +17,7 @@ class EntityOperationsTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['entity_test'];
+  protected static $modules = ['entity_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Entity/EntityReferenceSelection/EntityReferenceSelectionAccessTest.php b/core/modules/system/tests/src/Functional/Entity/EntityReferenceSelection/EntityReferenceSelectionAccessTest.php
index 5e7f49e3e7898127f93523a31eab2a08613722bb..b1cd68d7b67aab8ba9225c00c0436a8dcc517dc6 100644
--- a/core/modules/system/tests/src/Functional/Entity/EntityReferenceSelection/EntityReferenceSelectionAccessTest.php
+++ b/core/modules/system/tests/src/Functional/Entity/EntityReferenceSelection/EntityReferenceSelectionAccessTest.php
@@ -36,7 +36,7 @@ class EntityReferenceSelectionAccessTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['comment', 'field', 'file', 'image', 'node', 'media', 'system', 'taxonomy', 'text', 'user'];
+  protected static $modules = ['comment', 'field', 'file', 'image', 'node', 'media', 'system', 'taxonomy', 'text', 'user'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Entity/EntityRevisionsTest.php b/core/modules/system/tests/src/Functional/Entity/EntityRevisionsTest.php
index 6f857e71631a4b6d9acc68adae8f8d6456429f16..90bf02763e88a26a518dfa5e1112d2d91f0857f2 100644
--- a/core/modules/system/tests/src/Functional/Entity/EntityRevisionsTest.php
+++ b/core/modules/system/tests/src/Functional/Entity/EntityRevisionsTest.php
@@ -22,7 +22,7 @@ class EntityRevisionsTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['entity_test', 'language'];
+  protected static $modules = ['entity_test', 'language'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Entity/EntityTranslationFormTest.php b/core/modules/system/tests/src/Functional/Entity/EntityTranslationFormTest.php
index 892b013f012a79bae7b06242b9839adcd4892c9b..e2fec632d2030dda638372258c6304bd601d5868 100644
--- a/core/modules/system/tests/src/Functional/Entity/EntityTranslationFormTest.php
+++ b/core/modules/system/tests/src/Functional/Entity/EntityTranslationFormTest.php
@@ -20,7 +20,7 @@ class EntityTranslationFormTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['entity_test', 'language', 'node'];
+  protected static $modules = ['entity_test', 'language', 'node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Entity/EntityViewControllerTest.php b/core/modules/system/tests/src/Functional/Entity/EntityViewControllerTest.php
index ceaa184f50644faf26d7717733212881cfea1736..ac73ebcfa64cb0d3204ad0d00a524705e70fe8a4 100644
--- a/core/modules/system/tests/src/Functional/Entity/EntityViewControllerTest.php
+++ b/core/modules/system/tests/src/Functional/Entity/EntityViewControllerTest.php
@@ -17,7 +17,7 @@ class EntityViewControllerTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['entity_test'];
+  protected static $modules = ['entity_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Form/AlterTest.php b/core/modules/system/tests/src/Functional/Form/AlterTest.php
index d1f9667acbdbcf81a70f84bb0b19f7b2ff79f38f..de6cd8425590e32db3efcd018442210af904245a 100644
--- a/core/modules/system/tests/src/Functional/Form/AlterTest.php
+++ b/core/modules/system/tests/src/Functional/Form/AlterTest.php
@@ -17,7 +17,7 @@ class AlterTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['block', 'form_test'];
+  protected static $modules = ['block', 'form_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Form/ArbitraryRebuildTest.php b/core/modules/system/tests/src/Functional/Form/ArbitraryRebuildTest.php
index 934db3d0dcb54f755104bb1d2568978d5355c262..6d277d187893189f68cc90f03c9aaa54b124ce43 100644
--- a/core/modules/system/tests/src/Functional/Form/ArbitraryRebuildTest.php
+++ b/core/modules/system/tests/src/Functional/Form/ArbitraryRebuildTest.php
@@ -18,7 +18,7 @@ class ArbitraryRebuildTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['text', 'form_test'];
+  protected static $modules = ['text', 'form_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Form/CheckboxTest.php b/core/modules/system/tests/src/Functional/Form/CheckboxTest.php
index 66f7eab1d1acfc3d5170839e4e8516f296d05968..dd00fd588fb1bd7d8e9ff81f7505447e0d0cef8d 100644
--- a/core/modules/system/tests/src/Functional/Form/CheckboxTest.php
+++ b/core/modules/system/tests/src/Functional/Form/CheckboxTest.php
@@ -18,7 +18,7 @@ class CheckboxTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['form_test'];
+  protected static $modules = ['form_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Form/ConfirmFormTest.php b/core/modules/system/tests/src/Functional/Form/ConfirmFormTest.php
index 421ef4196e07e207c6399b79f6998ab502de413e..b22be0bf7d66936f1b62bd534aed0585b86735b1 100644
--- a/core/modules/system/tests/src/Functional/Form/ConfirmFormTest.php
+++ b/core/modules/system/tests/src/Functional/Form/ConfirmFormTest.php
@@ -18,7 +18,7 @@ class ConfirmFormTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['form_test'];
+  protected static $modules = ['form_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Form/ElementTest.php b/core/modules/system/tests/src/Functional/Form/ElementTest.php
index 4d256f3c03c342622cfa68a1deff582376b128b7..88a14a3a0002fb97920539fa63c2e0100fed37a8 100644
--- a/core/modules/system/tests/src/Functional/Form/ElementTest.php
+++ b/core/modules/system/tests/src/Functional/Form/ElementTest.php
@@ -17,7 +17,7 @@ class ElementTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['form_test'];
+  protected static $modules = ['form_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Form/ElementsAccessTest.php b/core/modules/system/tests/src/Functional/Form/ElementsAccessTest.php
index 2167cbb58f6badc972f526cff3fd01207174a91b..84ae3f79b174cc6ece17d296b5267662e9050ce0 100644
--- a/core/modules/system/tests/src/Functional/Form/ElementsAccessTest.php
+++ b/core/modules/system/tests/src/Functional/Form/ElementsAccessTest.php
@@ -16,7 +16,7 @@ class ElementsAccessTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['form_test'];
+  protected static $modules = ['form_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Form/ElementsContainerTest.php b/core/modules/system/tests/src/Functional/Form/ElementsContainerTest.php
index 874cee6dcaa77e103499cda032b9b1461c236fd1..44396a1c7eb2099572853a44a909d5878152fcd1 100644
--- a/core/modules/system/tests/src/Functional/Form/ElementsContainerTest.php
+++ b/core/modules/system/tests/src/Functional/Form/ElementsContainerTest.php
@@ -16,7 +16,7 @@ class ElementsContainerTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['form_test'];
+  protected static $modules = ['form_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Form/ElementsLabelsTest.php b/core/modules/system/tests/src/Functional/Form/ElementsLabelsTest.php
index 0065110ee6cd94392b9139deffb731e677c2a126..ea9cc48ba24947139fa9682497bcbba207b47c95 100644
--- a/core/modules/system/tests/src/Functional/Form/ElementsLabelsTest.php
+++ b/core/modules/system/tests/src/Functional/Form/ElementsLabelsTest.php
@@ -17,7 +17,7 @@ class ElementsLabelsTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['form_test'];
+  protected static $modules = ['form_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Form/ElementsTableSelectTest.php b/core/modules/system/tests/src/Functional/Form/ElementsTableSelectTest.php
index 7ea6be2fc49ece8e24d20aec98433d29d00f7229..29d92db02d84bd6f111c8955531cdd8d72257150 100644
--- a/core/modules/system/tests/src/Functional/Form/ElementsTableSelectTest.php
+++ b/core/modules/system/tests/src/Functional/Form/ElementsTableSelectTest.php
@@ -17,7 +17,7 @@ class ElementsTableSelectTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['form_test'];
+  protected static $modules = ['form_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Form/ElementsVerticalTabsTest.php b/core/modules/system/tests/src/Functional/Form/ElementsVerticalTabsTest.php
index 6a84f401260df70681a00e3db5b9daa22e90f337..0541cb1a02c3764cca5c8e6a4120b61f1b29f9be 100644
--- a/core/modules/system/tests/src/Functional/Form/ElementsVerticalTabsTest.php
+++ b/core/modules/system/tests/src/Functional/Form/ElementsVerticalTabsTest.php
@@ -18,7 +18,7 @@ class ElementsVerticalTabsTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['form_test'];
+  protected static $modules = ['form_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Form/EmailTest.php b/core/modules/system/tests/src/Functional/Form/EmailTest.php
index 678f081ebe16a1ae6adbdcf9f51f844e122092d4..a19e6f9ee95a58fd4dd2d2784afd45ba50758629 100644
--- a/core/modules/system/tests/src/Functional/Form/EmailTest.php
+++ b/core/modules/system/tests/src/Functional/Form/EmailTest.php
@@ -17,7 +17,7 @@ class EmailTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['form_test'];
+  protected static $modules = ['form_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Form/FormObjectTest.php b/core/modules/system/tests/src/Functional/Form/FormObjectTest.php
index c2f89735c90036087a68f36977bfddd33596eea7..50ffdaddd7a1878fb5b1aec98c21eea45d0fd253 100644
--- a/core/modules/system/tests/src/Functional/Form/FormObjectTest.php
+++ b/core/modules/system/tests/src/Functional/Form/FormObjectTest.php
@@ -16,7 +16,7 @@ class FormObjectTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['form_test'];
+  protected static $modules = ['form_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Form/FormStoragePageCacheTest.php b/core/modules/system/tests/src/Functional/Form/FormStoragePageCacheTest.php
index cec6aa22a6b44e14d99569eb3c17707af99c2464..abfe8467fda053490a487285cdc2fa398ab5bae7 100644
--- a/core/modules/system/tests/src/Functional/Form/FormStoragePageCacheTest.php
+++ b/core/modules/system/tests/src/Functional/Form/FormStoragePageCacheTest.php
@@ -14,7 +14,7 @@ class FormStoragePageCacheTest extends BrowserTestBase {
   /**
    * @var array
    */
-  public static $modules = ['form_test'];
+  protected static $modules = ['form_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Form/FormTest.php b/core/modules/system/tests/src/Functional/Form/FormTest.php
index 3d63fbeb2523ecec106b83f824da108235f2aa77..bf5fb276464541ea2dc1a76cf556827022daafc3 100644
--- a/core/modules/system/tests/src/Functional/Form/FormTest.php
+++ b/core/modules/system/tests/src/Functional/Form/FormTest.php
@@ -26,7 +26,7 @@ class FormTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['filter', 'form_test', 'file', 'datetime'];
+  protected static $modules = ['filter', 'form_test', 'file', 'datetime'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Form/LanguageSelectElementTest.php b/core/modules/system/tests/src/Functional/Form/LanguageSelectElementTest.php
index f9f10ca8b8b9ffc121a2b06e0d99903c2c110630..e48ba65a2421fb229275cc2b422036ed9bd40ad2 100644
--- a/core/modules/system/tests/src/Functional/Form/LanguageSelectElementTest.php
+++ b/core/modules/system/tests/src/Functional/Form/LanguageSelectElementTest.php
@@ -21,7 +21,7 @@ class LanguageSelectElementTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['form_test', 'language'];
+  protected static $modules = ['form_test', 'language'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Form/ModulesListFormWebTest.php b/core/modules/system/tests/src/Functional/Form/ModulesListFormWebTest.php
index 9a4970aaceacd12b27e6a6bb355d22c2343cda66..ca5b5aa92255f404c2a967c7b5273ad69f26f5a5 100644
--- a/core/modules/system/tests/src/Functional/Form/ModulesListFormWebTest.php
+++ b/core/modules/system/tests/src/Functional/Form/ModulesListFormWebTest.php
@@ -14,7 +14,7 @@ class ModulesListFormWebTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system_test', 'help'];
+  protected static $modules = ['system_test', 'help'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Form/RebuildTest.php b/core/modules/system/tests/src/Functional/Form/RebuildTest.php
index ecd5fb0fda25a005d0420ba96be5ad1819f1e8b6..e40a4d29b316c04ab654b9cb2f9616fca31dc528 100644
--- a/core/modules/system/tests/src/Functional/Form/RebuildTest.php
+++ b/core/modules/system/tests/src/Functional/Form/RebuildTest.php
@@ -16,7 +16,7 @@ class RebuildTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'form_test'];
+  protected static $modules = ['node', 'form_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Form/RedirectTest.php b/core/modules/system/tests/src/Functional/Form/RedirectTest.php
index e66cc3830873aff79cb4f7b35cc813b3842d11b7..57ee31867e51220553651e071e6e6e18c384db55 100644
--- a/core/modules/system/tests/src/Functional/Form/RedirectTest.php
+++ b/core/modules/system/tests/src/Functional/Form/RedirectTest.php
@@ -17,7 +17,7 @@ class RedirectTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['form_test', 'block'];
+  protected static $modules = ['form_test', 'block'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Form/ResponseTest.php b/core/modules/system/tests/src/Functional/Form/ResponseTest.php
index 4707a47e501e8f79863e339fa7f083af544fe41b..bbeac92cdc122dcf89f847c165db6f6118c59849 100644
--- a/core/modules/system/tests/src/Functional/Form/ResponseTest.php
+++ b/core/modules/system/tests/src/Functional/Form/ResponseTest.php
@@ -17,7 +17,7 @@ class ResponseTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['form_test'];
+  protected static $modules = ['form_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Form/StateValuesCleanAdvancedTest.php b/core/modules/system/tests/src/Functional/Form/StateValuesCleanAdvancedTest.php
index 56dab576c1ce4337b9db7fc7fbc0a19b682fa0a7..59cda249780112bb6941423ba13a656b475e4d7b 100644
--- a/core/modules/system/tests/src/Functional/Form/StateValuesCleanAdvancedTest.php
+++ b/core/modules/system/tests/src/Functional/Form/StateValuesCleanAdvancedTest.php
@@ -23,7 +23,7 @@ class StateValuesCleanAdvancedTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['file', 'form_test'];
+  protected static $modules = ['file', 'form_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Form/StateValuesCleanTest.php b/core/modules/system/tests/src/Functional/Form/StateValuesCleanTest.php
index b5bd856de1c96329fe773014e92e661ff231882c..917ae1af90c797e6cfeb11d5734c4587654ce058 100644
--- a/core/modules/system/tests/src/Functional/Form/StateValuesCleanTest.php
+++ b/core/modules/system/tests/src/Functional/Form/StateValuesCleanTest.php
@@ -19,7 +19,7 @@ class StateValuesCleanTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['form_test'];
+  protected static $modules = ['form_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Form/StorageTest.php b/core/modules/system/tests/src/Functional/Form/StorageTest.php
index 2ad8bb24c280117254b32ba73838c7e6c8fb2df2..1bcea67ef78ae0344df4c0c453643af35e639158 100644
--- a/core/modules/system/tests/src/Functional/Form/StorageTest.php
+++ b/core/modules/system/tests/src/Functional/Form/StorageTest.php
@@ -25,7 +25,7 @@ class StorageTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['form_test', 'dblog'];
+  protected static $modules = ['form_test', 'dblog'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Form/SystemConfigFormTest.php b/core/modules/system/tests/src/Functional/Form/SystemConfigFormTest.php
index ca56d2e6d8aa08dfb32c4181f50b37127d460bf8..9beba1fc7d552a40e001f5453009a3e55c950c16 100644
--- a/core/modules/system/tests/src/Functional/Form/SystemConfigFormTest.php
+++ b/core/modules/system/tests/src/Functional/Form/SystemConfigFormTest.php
@@ -16,7 +16,7 @@ class SystemConfigFormTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['form_test'];
+  protected static $modules = ['form_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Form/UrlTest.php b/core/modules/system/tests/src/Functional/Form/UrlTest.php
index 02197602f78153767a8927fa9d0ec00c7684b20d..0e99a7255905c4d862ac00bcc8e5fe97648ef3bf 100644
--- a/core/modules/system/tests/src/Functional/Form/UrlTest.php
+++ b/core/modules/system/tests/src/Functional/Form/UrlTest.php
@@ -17,7 +17,7 @@ class UrlTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['form_test'];
+  protected static $modules = ['form_test'];
 
   protected $profile = 'testing';
 
diff --git a/core/modules/system/tests/src/Functional/Form/ValidationTest.php b/core/modules/system/tests/src/Functional/Form/ValidationTest.php
index cadf427581ebbf94959fdf0ca26c837dea879830..3ae3ffee1ac67fdd30d011ed2499f05d27e7e954 100644
--- a/core/modules/system/tests/src/Functional/Form/ValidationTest.php
+++ b/core/modules/system/tests/src/Functional/Form/ValidationTest.php
@@ -18,7 +18,7 @@ class ValidationTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['form_test'];
+  protected static $modules = ['form_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Hal/ActionHalJsonAnonTest.php b/core/modules/system/tests/src/Functional/Hal/ActionHalJsonAnonTest.php
index 6c0ad70cbcd891ed49eae39e3019bf12933d077c..b425aec37e26a0488d36ad9ac1d09db7e3840c13 100644
--- a/core/modules/system/tests/src/Functional/Hal/ActionHalJsonAnonTest.php
+++ b/core/modules/system/tests/src/Functional/Hal/ActionHalJsonAnonTest.php
@@ -15,7 +15,7 @@ class ActionHalJsonAnonTest extends ActionResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Hal/ActionHalJsonBasicAuthTest.php b/core/modules/system/tests/src/Functional/Hal/ActionHalJsonBasicAuthTest.php
index 13daf5b04121d259558c824d95d35681614e7a07..55c84bf60635690abcc2e78658ed5248339df949 100644
--- a/core/modules/system/tests/src/Functional/Hal/ActionHalJsonBasicAuthTest.php
+++ b/core/modules/system/tests/src/Functional/Hal/ActionHalJsonBasicAuthTest.php
@@ -15,7 +15,7 @@ class ActionHalJsonBasicAuthTest extends ActionResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal', 'basic_auth'];
+  protected static $modules = ['hal', 'basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Hal/ActionHalJsonCookieTest.php b/core/modules/system/tests/src/Functional/Hal/ActionHalJsonCookieTest.php
index 2a9c6178b950159712a9f2f9730930ab76f9696c..8a35bc8ad3dfd4c92b5e45ccb3bbaf512a308eb0 100644
--- a/core/modules/system/tests/src/Functional/Hal/ActionHalJsonCookieTest.php
+++ b/core/modules/system/tests/src/Functional/Hal/ActionHalJsonCookieTest.php
@@ -15,7 +15,7 @@ class ActionHalJsonCookieTest extends ActionResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Hal/MenuHalJsonAnonTest.php b/core/modules/system/tests/src/Functional/Hal/MenuHalJsonAnonTest.php
index 04dd30e6ce2d6df3464531c884989d693d9f9b84..356447e141bcd5137ef568bdd348b9bb98c38b46 100644
--- a/core/modules/system/tests/src/Functional/Hal/MenuHalJsonAnonTest.php
+++ b/core/modules/system/tests/src/Functional/Hal/MenuHalJsonAnonTest.php
@@ -15,7 +15,7 @@ class MenuHalJsonAnonTest extends MenuResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Hal/MenuHalJsonBasicAuthTest.php b/core/modules/system/tests/src/Functional/Hal/MenuHalJsonBasicAuthTest.php
index 3aaa10a0c91c11f47d632a88ecce3e0b3e0ec865..c5ea4652fd24ca79bf4fd7909152a1a423654f5c 100644
--- a/core/modules/system/tests/src/Functional/Hal/MenuHalJsonBasicAuthTest.php
+++ b/core/modules/system/tests/src/Functional/Hal/MenuHalJsonBasicAuthTest.php
@@ -15,7 +15,7 @@ class MenuHalJsonBasicAuthTest extends MenuResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal', 'basic_auth'];
+  protected static $modules = ['hal', 'basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Hal/MenuHalJsonCookieTest.php b/core/modules/system/tests/src/Functional/Hal/MenuHalJsonCookieTest.php
index 0d706f4585abe83ac2d85ea30d66cc162f746997..4a064dfce4041294d81b3b6d210df1958d3cc48d 100644
--- a/core/modules/system/tests/src/Functional/Hal/MenuHalJsonCookieTest.php
+++ b/core/modules/system/tests/src/Functional/Hal/MenuHalJsonCookieTest.php
@@ -15,7 +15,7 @@ class MenuHalJsonCookieTest extends MenuResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Lock/LockFunctionalTest.php b/core/modules/system/tests/src/Functional/Lock/LockFunctionalTest.php
index 766e81f7b7acac6fac10489a722686d4a62bbf47..8dcb88ce03dafa1079deefd08c41ec55c2bb57bd 100644
--- a/core/modules/system/tests/src/Functional/Lock/LockFunctionalTest.php
+++ b/core/modules/system/tests/src/Functional/Lock/LockFunctionalTest.php
@@ -16,7 +16,7 @@ class LockFunctionalTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['system_test'];
+  protected static $modules = ['system_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Menu/BreadcrumbFrontCacheContextsTest.php b/core/modules/system/tests/src/Functional/Menu/BreadcrumbFrontCacheContextsTest.php
index 1e06691b00a1b3440be9124b0a8874c0e79342b9..6cf3cc06c415bbe1e8e43e7a16a7d43a615ad63f 100644
--- a/core/modules/system/tests/src/Functional/Menu/BreadcrumbFrontCacheContextsTest.php
+++ b/core/modules/system/tests/src/Functional/Menu/BreadcrumbFrontCacheContextsTest.php
@@ -18,7 +18,7 @@ class BreadcrumbFrontCacheContextsTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'block',
     'node',
     'path',
diff --git a/core/modules/system/tests/src/Functional/Menu/BreadcrumbTest.php b/core/modules/system/tests/src/Functional/Menu/BreadcrumbTest.php
index 60d2db1570f7d7b2caae731dc1a76fb35fed9368..8f4a461810e45cd3892e9e6b4de3fd788cb19eea 100644
--- a/core/modules/system/tests/src/Functional/Menu/BreadcrumbTest.php
+++ b/core/modules/system/tests/src/Functional/Menu/BreadcrumbTest.php
@@ -23,7 +23,7 @@ class BreadcrumbTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['menu_test', 'block'];
+  protected static $modules = ['menu_test', 'block'];
 
   /**
    * An administrative user.
diff --git a/core/modules/system/tests/src/Functional/Menu/LocalActionTest.php b/core/modules/system/tests/src/Functional/Menu/LocalActionTest.php
index 3686e47e9c0e14f5e428dcac55014bf1433493a0..b4a7375b2e7e0a184d93747bd8948459693908dc 100644
--- a/core/modules/system/tests/src/Functional/Menu/LocalActionTest.php
+++ b/core/modules/system/tests/src/Functional/Menu/LocalActionTest.php
@@ -18,7 +18,7 @@ class LocalActionTest extends BrowserTestBase {
    *
    * @var string[]
    */
-  public static $modules = ['block', 'menu_test'];
+  protected static $modules = ['block', 'menu_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Menu/LocalTasksTest.php b/core/modules/system/tests/src/Functional/Menu/LocalTasksTest.php
index 5bfa25bd15fd114a7c666c079f26914d82155512..60ebdca1e98d56ceb75a8afc7c9ff1e95fcfa1f7 100644
--- a/core/modules/system/tests/src/Functional/Menu/LocalTasksTest.php
+++ b/core/modules/system/tests/src/Functional/Menu/LocalTasksTest.php
@@ -19,7 +19,7 @@ class LocalTasksTest extends BrowserTestBase {
    *
    * @var string[]
    */
-  public static $modules = ['block', 'menu_test', 'entity_test', 'node'];
+  protected static $modules = ['block', 'menu_test', 'entity_test', 'node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Menu/MenuAccessTest.php b/core/modules/system/tests/src/Functional/Menu/MenuAccessTest.php
index 65ef6c97c62b10ea68e3efce013a1ce1a81880f2..62fd82dd809ac4ac4f7059d088c40f241b39ccbf 100644
--- a/core/modules/system/tests/src/Functional/Menu/MenuAccessTest.php
+++ b/core/modules/system/tests/src/Functional/Menu/MenuAccessTest.php
@@ -17,7 +17,7 @@ class MenuAccessTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['block', 'menu_test'];
+  protected static $modules = ['block', 'menu_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Menu/MenuLinkSecurityTest.php b/core/modules/system/tests/src/Functional/Menu/MenuLinkSecurityTest.php
index d9433be31fa442138c9772c44015ae9324fd46d8..c94befbae524c262cce478d28d6388a29aba5d21 100644
--- a/core/modules/system/tests/src/Functional/Menu/MenuLinkSecurityTest.php
+++ b/core/modules/system/tests/src/Functional/Menu/MenuLinkSecurityTest.php
@@ -15,7 +15,7 @@ class MenuLinkSecurityTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['menu_link_content', 'block', 'menu_test'];
+  protected static $modules = ['menu_link_content', 'block', 'menu_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Menu/MenuRouterTest.php b/core/modules/system/tests/src/Functional/Menu/MenuRouterTest.php
index b5ad4ceb886bea5194be855d8130cbe264401e79..37645b1f4373bcd84d155f0ccec3ad602dbbdd1c 100644
--- a/core/modules/system/tests/src/Functional/Menu/MenuRouterTest.php
+++ b/core/modules/system/tests/src/Functional/Menu/MenuRouterTest.php
@@ -17,7 +17,7 @@ class MenuRouterTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['block', 'menu_test', 'test_page_test'];
+  protected static $modules = ['block', 'menu_test', 'test_page_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Module/InstallTest.php b/core/modules/system/tests/src/Functional/Module/InstallTest.php
index 08acec5b4cc223e1fc6091fbbd1bbbb4f12fcc10..b3b86e7ab3d9a8ce602b898673fed94b53438347 100644
--- a/core/modules/system/tests/src/Functional/Module/InstallTest.php
+++ b/core/modules/system/tests/src/Functional/Module/InstallTest.php
@@ -19,7 +19,7 @@ class InstallTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['module_test'];
+  protected static $modules = ['module_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Module/InstallUninstallTest.php b/core/modules/system/tests/src/Functional/Module/InstallUninstallTest.php
index 355612099e94e6085b7a1a092bc744e0f4a72881..f5caf8ac86481aeffe01100c6b09783458184185 100644
--- a/core/modules/system/tests/src/Functional/Module/InstallUninstallTest.php
+++ b/core/modules/system/tests/src/Functional/Module/InstallUninstallTest.php
@@ -22,7 +22,7 @@ class InstallUninstallTest extends ModuleTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system_test', 'dblog', 'taxonomy', 'update_test_postupdate'];
+  protected static $modules = ['system_test', 'dblog', 'taxonomy', 'update_test_postupdate'];
 
   /**
    * Tests that a fixed set of modules can be installed and uninstalled.
diff --git a/core/modules/system/tests/src/Functional/Module/ModuleTestBase.php b/core/modules/system/tests/src/Functional/Module/ModuleTestBase.php
index 1e681859b6dc85322e90aa602b83c79810a91446..e83f558df1e9e70a1fc34ad72a0c99a332863b98 100644
--- a/core/modules/system/tests/src/Functional/Module/ModuleTestBase.php
+++ b/core/modules/system/tests/src/Functional/Module/ModuleTestBase.php
@@ -19,7 +19,7 @@ abstract class ModuleTestBase extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['system_test'];
+  protected static $modules = ['system_test'];
 
   protected $adminUser;
 
diff --git a/core/modules/system/tests/src/Functional/Module/PrepareUninstallTest.php b/core/modules/system/tests/src/Functional/Module/PrepareUninstallTest.php
index 0a84977d673f5b9a6d5ed64148f15ba6bea4beb9..6acdb9541c926e06757ad94e41ca3d7a453c8812 100644
--- a/core/modules/system/tests/src/Functional/Module/PrepareUninstallTest.php
+++ b/core/modules/system/tests/src/Functional/Module/PrepareUninstallTest.php
@@ -38,7 +38,7 @@ class PrepareUninstallTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'taxonomy', 'entity_test'];
+  protected static $modules = ['node', 'taxonomy', 'entity_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Module/UninstallTest.php b/core/modules/system/tests/src/Functional/Module/UninstallTest.php
index e65fe17044e2e7d4d4767e85a1fe501307a1c6ac..f789c56ddf0a0a86cefd09f7c39a530fa6e3051f 100644
--- a/core/modules/system/tests/src/Functional/Module/UninstallTest.php
+++ b/core/modules/system/tests/src/Functional/Module/UninstallTest.php
@@ -21,7 +21,7 @@ class UninstallTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['module_test', 'user', 'views', 'node'];
+  protected static $modules = ['module_test', 'user', 'views', 'node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Pager/PagerTest.php b/core/modules/system/tests/src/Functional/Pager/PagerTest.php
index 3a4b4fa5cd01e68e7e079b7dd1433610cef5c8f1..9f79f0f5aa37212f0f9bec566cf0fe55b2541399 100644
--- a/core/modules/system/tests/src/Functional/Pager/PagerTest.php
+++ b/core/modules/system/tests/src/Functional/Pager/PagerTest.php
@@ -20,7 +20,7 @@ class PagerTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['dblog', 'image', 'pager_test'];
+  protected static $modules = ['dblog', 'image', 'pager_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/ParamConverter/UpcastingTest.php b/core/modules/system/tests/src/Functional/ParamConverter/UpcastingTest.php
index a0f3caff88ffa871586e1f42e270de18c072c9e7..696acc16cd0f9e1940df83e92068f0738fad67eb 100644
--- a/core/modules/system/tests/src/Functional/ParamConverter/UpcastingTest.php
+++ b/core/modules/system/tests/src/Functional/ParamConverter/UpcastingTest.php
@@ -12,7 +12,7 @@
  */
 class UpcastingTest extends BrowserTestBase {
 
-  public static $modules = ['paramconverter_test', 'node', 'language'];
+  protected static $modules = ['paramconverter_test', 'node', 'language'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Render/AjaxPageStateTest.php b/core/modules/system/tests/src/Functional/Render/AjaxPageStateTest.php
index d6c329caeb755e7d1ddad8ca8039e98ad3ad4584..c84f88386137adc84675efb85a4ef812ad8ecc6a 100644
--- a/core/modules/system/tests/src/Functional/Render/AjaxPageStateTest.php
+++ b/core/modules/system/tests/src/Functional/Render/AjaxPageStateTest.php
@@ -16,7 +16,7 @@ class AjaxPageStateTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'views'];
+  protected static $modules = ['node', 'views'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Render/DisplayVariantTest.php b/core/modules/system/tests/src/Functional/Render/DisplayVariantTest.php
index c10866acd16d12944b16442c2d5f0cdb66226dc4..41f85861558b8c23d755036d476e5316f37f874d 100644
--- a/core/modules/system/tests/src/Functional/Render/DisplayVariantTest.php
+++ b/core/modules/system/tests/src/Functional/Render/DisplayVariantTest.php
@@ -16,7 +16,7 @@ class DisplayVariantTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['display_variant_test'];
+  protected static $modules = ['display_variant_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Render/HtmlResponseAttachmentsTest.php b/core/modules/system/tests/src/Functional/Render/HtmlResponseAttachmentsTest.php
index 382a3442e79acd2937389d6bc7ac3e0d07a4d2b1..7027fe248fad498501523d6faf290604f3e71dc3 100644
--- a/core/modules/system/tests/src/Functional/Render/HtmlResponseAttachmentsTest.php
+++ b/core/modules/system/tests/src/Functional/Render/HtmlResponseAttachmentsTest.php
@@ -16,7 +16,7 @@ class HtmlResponseAttachmentsTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['render_attached_test'];
+  protected static $modules = ['render_attached_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Render/PlaceholderMessageTest.php b/core/modules/system/tests/src/Functional/Render/PlaceholderMessageTest.php
index 97ca6d22d2acee5be5f606cddcb6a47c05cc3e94..313e0b97f04a4ec193e66582eb97ec28f1bd79e5 100644
--- a/core/modules/system/tests/src/Functional/Render/PlaceholderMessageTest.php
+++ b/core/modules/system/tests/src/Functional/Render/PlaceholderMessageTest.php
@@ -17,7 +17,7 @@ class PlaceholderMessageTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['render_placeholder_message_test'];
+  protected static $modules = ['render_placeholder_message_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Render/RenderArrayNonHtmlSubscriberTest.php b/core/modules/system/tests/src/Functional/Render/RenderArrayNonHtmlSubscriberTest.php
index 4f02d1a7c911800108797ccadd917d3e6a9b2898..97015201e4b0647051fc6f1c3adacd9f6141eeb9 100644
--- a/core/modules/system/tests/src/Functional/Render/RenderArrayNonHtmlSubscriberTest.php
+++ b/core/modules/system/tests/src/Functional/Render/RenderArrayNonHtmlSubscriberTest.php
@@ -17,7 +17,7 @@ class RenderArrayNonHtmlSubscriberTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['render_array_non_html_subscriber_test'];
+  protected static $modules = ['render_array_non_html_subscriber_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Render/UrlBubbleableMetadataBubblingTest.php b/core/modules/system/tests/src/Functional/Render/UrlBubbleableMetadataBubblingTest.php
index 06cc7122efabdb155afc51b20900e13563c13bf6..ad2f9774fed0c3f3b0d42e5119c153680a70d658 100644
--- a/core/modules/system/tests/src/Functional/Render/UrlBubbleableMetadataBubblingTest.php
+++ b/core/modules/system/tests/src/Functional/Render/UrlBubbleableMetadataBubblingTest.php
@@ -20,7 +20,7 @@ class UrlBubbleableMetadataBubblingTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['cache_test'];
+  protected static $modules = ['cache_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Rest/ActionJsonBasicAuthTest.php b/core/modules/system/tests/src/Functional/Rest/ActionJsonBasicAuthTest.php
index 98c1d9a2a85701081bb0f0f2026cf782bceb093e..6a6410898c84fb1e2fa583d3e03466b6a2d1b9a0 100644
--- a/core/modules/system/tests/src/Functional/Rest/ActionJsonBasicAuthTest.php
+++ b/core/modules/system/tests/src/Functional/Rest/ActionJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class ActionJsonBasicAuthTest extends ActionResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Rest/ActionResourceTestBase.php b/core/modules/system/tests/src/Functional/Rest/ActionResourceTestBase.php
index 5134e910a6743559b52df96a29a7171b588c5bde..bfa962259177fb92c930216b754362eac83cc091 100644
--- a/core/modules/system/tests/src/Functional/Rest/ActionResourceTestBase.php
+++ b/core/modules/system/tests/src/Functional/Rest/ActionResourceTestBase.php
@@ -11,7 +11,7 @@ abstract class ActionResourceTestBase extends EntityResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['user'];
+  protected static $modules = ['user'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Rest/ActionXmlBasicAuthTest.php b/core/modules/system/tests/src/Functional/Rest/ActionXmlBasicAuthTest.php
index 0e90dbea31216cfac8f44723bf126cfd41e1965f..f217f2ef19e1dd7d4c12cd823f44265484e473a8 100644
--- a/core/modules/system/tests/src/Functional/Rest/ActionXmlBasicAuthTest.php
+++ b/core/modules/system/tests/src/Functional/Rest/ActionXmlBasicAuthTest.php
@@ -16,7 +16,7 @@ class ActionXmlBasicAuthTest extends ActionResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Rest/MenuJsonBasicAuthTest.php b/core/modules/system/tests/src/Functional/Rest/MenuJsonBasicAuthTest.php
index 5b9fe9e3bc0614ff2a72003f1d0c254f695ee0a0..6430b859e6d969a3c4d70d41abf3ece6a33e7f20 100644
--- a/core/modules/system/tests/src/Functional/Rest/MenuJsonBasicAuthTest.php
+++ b/core/modules/system/tests/src/Functional/Rest/MenuJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class MenuJsonBasicAuthTest extends MenuResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Rest/MenuResourceTestBase.php b/core/modules/system/tests/src/Functional/Rest/MenuResourceTestBase.php
index 91953eb44148ecd916cd3d262c4e149a09b2f46e..13a74beb3e282c20f72288092dcffa878a889628 100644
--- a/core/modules/system/tests/src/Functional/Rest/MenuResourceTestBase.php
+++ b/core/modules/system/tests/src/Functional/Rest/MenuResourceTestBase.php
@@ -10,7 +10,7 @@ abstract class MenuResourceTestBase extends EntityResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [];
+  protected static $modules = [];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Rest/MenuXmlBasicAuthTest.php b/core/modules/system/tests/src/Functional/Rest/MenuXmlBasicAuthTest.php
index 9f786dd4de4bdcdd2af31c5def1de6a89b5c4e63..c44c172bf4c7e80edd74d1a02ea0aff1d6440004 100644
--- a/core/modules/system/tests/src/Functional/Rest/MenuXmlBasicAuthTest.php
+++ b/core/modules/system/tests/src/Functional/Rest/MenuXmlBasicAuthTest.php
@@ -16,7 +16,7 @@ class MenuXmlBasicAuthTest extends MenuResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Routing/DestinationTest.php b/core/modules/system/tests/src/Functional/Routing/DestinationTest.php
index 98ec29b4731221a2a0057a706c0315922dbfed65..22a369dd54e5f3842e5e7d6e46e75a0ad2807c56 100644
--- a/core/modules/system/tests/src/Functional/Routing/DestinationTest.php
+++ b/core/modules/system/tests/src/Functional/Routing/DestinationTest.php
@@ -20,7 +20,7 @@ class DestinationTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system_test'];
+  protected static $modules = ['system_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Routing/RouterPermissionTest.php b/core/modules/system/tests/src/Functional/Routing/RouterPermissionTest.php
index 1985725ef3560c19ff7a15d21b6dc67045ba1abb..1de9fcc9f28080db7ef00a62848db6379b6a4a67 100644
--- a/core/modules/system/tests/src/Functional/Routing/RouterPermissionTest.php
+++ b/core/modules/system/tests/src/Functional/Routing/RouterPermissionTest.php
@@ -16,7 +16,7 @@ class RouterPermissionTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['router_test'];
+  protected static $modules = ['router_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Routing/RouterTest.php b/core/modules/system/tests/src/Functional/Routing/RouterTest.php
index efe2f3a2d15b6e7ce2ddc51d3fcdcb442e468bec..a162f18834c3e347856dce4824faf9646dd8c360 100644
--- a/core/modules/system/tests/src/Functional/Routing/RouterTest.php
+++ b/core/modules/system/tests/src/Functional/Routing/RouterTest.php
@@ -21,7 +21,7 @@ class RouterTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['router_test'];
+  protected static $modules = ['router_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/ServiceProvider/ServiceProviderWebTest.php b/core/modules/system/tests/src/Functional/ServiceProvider/ServiceProviderWebTest.php
index 773c1795ecdf25ec74832192229cb2d754d89e31..305beb59235eb74abcb977d33a77f4467d3175b4 100644
--- a/core/modules/system/tests/src/Functional/ServiceProvider/ServiceProviderWebTest.php
+++ b/core/modules/system/tests/src/Functional/ServiceProvider/ServiceProviderWebTest.php
@@ -16,7 +16,7 @@ class ServiceProviderWebTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['file', 'service_provider_test'];
+  protected static $modules = ['file', 'service_provider_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Session/SessionAuthenticationTest.php b/core/modules/system/tests/src/Functional/Session/SessionAuthenticationTest.php
index c5fe2fd717efc10670908c11a3a2112548ae7aef..718e8c697715da798d4bc641dbf09e209ebe2008 100644
--- a/core/modules/system/tests/src/Functional/Session/SessionAuthenticationTest.php
+++ b/core/modules/system/tests/src/Functional/Session/SessionAuthenticationTest.php
@@ -25,7 +25,7 @@ class SessionAuthenticationTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth', 'session_test'];
+  protected static $modules = ['basic_auth', 'session_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Session/SessionHttpsTest.php b/core/modules/system/tests/src/Functional/Session/SessionHttpsTest.php
index 283c6e5bee8b38f2a6edec3659ff29d0f2cc31ed..7e67837e1218a68b9f13accbb8b14472304ccc50 100644
--- a/core/modules/system/tests/src/Functional/Session/SessionHttpsTest.php
+++ b/core/modules/system/tests/src/Functional/Session/SessionHttpsTest.php
@@ -36,7 +36,7 @@ class SessionHttpsTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['session_test'];
+  protected static $modules = ['session_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Session/SessionTest.php b/core/modules/system/tests/src/Functional/Session/SessionTest.php
index f83169b29e3adf8f9f881faabdd6f828d0644f27..37ffe4cc1306f39a90074edd3d8ca8f86f8c4af8 100644
--- a/core/modules/system/tests/src/Functional/Session/SessionTest.php
+++ b/core/modules/system/tests/src/Functional/Session/SessionTest.php
@@ -18,7 +18,7 @@ class SessionTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['session_test'];
+  protected static $modules = ['session_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/System/AccessDeniedTest.php b/core/modules/system/tests/src/Functional/System/AccessDeniedTest.php
index 49c19bbd034ca39723f616adb1d1c605e09aafec..f183962eb625732b6f4568b13562083f975f8aa4 100644
--- a/core/modules/system/tests/src/Functional/System/AccessDeniedTest.php
+++ b/core/modules/system/tests/src/Functional/System/AccessDeniedTest.php
@@ -21,7 +21,7 @@ class AccessDeniedTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['block', 'node', 'system_test'];
+  protected static $modules = ['block', 'node', 'system_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/System/AdminTest.php b/core/modules/system/tests/src/Functional/System/AdminTest.php
index 15bf02b02981e079c26c053edd26ec954b5f2ed1..a3e4f9a4091bc8e9349e53028c652573854ddda0 100644
--- a/core/modules/system/tests/src/Functional/System/AdminTest.php
+++ b/core/modules/system/tests/src/Functional/System/AdminTest.php
@@ -31,7 +31,7 @@ class AdminTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['locale'];
+  protected static $modules = ['locale'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/System/CronRunTest.php b/core/modules/system/tests/src/Functional/System/CronRunTest.php
index eecd9db7f705ae49efa599c41e2e92d3b5fd8978..2ee97c658d88749980ea7401d4fe2db76fb6d2f4 100644
--- a/core/modules/system/tests/src/Functional/System/CronRunTest.php
+++ b/core/modules/system/tests/src/Functional/System/CronRunTest.php
@@ -19,7 +19,7 @@ class CronRunTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['common_test', 'common_test_cron_helper', 'automated_cron'];
+  protected static $modules = ['common_test', 'common_test_cron_helper', 'automated_cron'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/System/DateTimeTest.php b/core/modules/system/tests/src/Functional/System/DateTimeTest.php
index 76876587a586d2ee48df8afe317702b8df701c0a..5443bb9adaaf4b51e10c972d5107d71dd70821af 100644
--- a/core/modules/system/tests/src/Functional/System/DateTimeTest.php
+++ b/core/modules/system/tests/src/Functional/System/DateTimeTest.php
@@ -19,7 +19,7 @@ class DateTimeTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['block', 'node', 'language', 'field', 'field_ui', 'datetime', 'options'];
+  protected static $modules = ['block', 'node', 'language', 'field', 'field_ui', 'datetime', 'options'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/System/ErrorHandlerTest.php b/core/modules/system/tests/src/Functional/System/ErrorHandlerTest.php
index f93468b65fd198a7c1e48b30b502c87e10d4622f..f50d06d19a9373d14c323afd28821030a20839b4 100644
--- a/core/modules/system/tests/src/Functional/System/ErrorHandlerTest.php
+++ b/core/modules/system/tests/src/Functional/System/ErrorHandlerTest.php
@@ -17,7 +17,7 @@ class ErrorHandlerTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['error_test'];
+  protected static $modules = ['error_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/System/FrontPageTest.php b/core/modules/system/tests/src/Functional/System/FrontPageTest.php
index 767882801ff2bfe8ef082b1da46fd8eab2ddf51d..6dbef38ffb0ab4ae27ba328e8100049f507cb9ad 100644
--- a/core/modules/system/tests/src/Functional/System/FrontPageTest.php
+++ b/core/modules/system/tests/src/Functional/System/FrontPageTest.php
@@ -17,7 +17,7 @@ class FrontPageTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'system_test', 'views'];
+  protected static $modules = ['node', 'system_test', 'views'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/System/HtaccessTest.php b/core/modules/system/tests/src/Functional/System/HtaccessTest.php
index 037a92a00fe39544a4982eac9118f855c7a04fb0..3ce3d43d2c0b23ea477d951c41d67965a74adaac 100644
--- a/core/modules/system/tests/src/Functional/System/HtaccessTest.php
+++ b/core/modules/system/tests/src/Functional/System/HtaccessTest.php
@@ -16,7 +16,7 @@ class HtaccessTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'path'];
+  protected static $modules = ['node', 'path'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/System/MainContentFallbackTest.php b/core/modules/system/tests/src/Functional/System/MainContentFallbackTest.php
index 724d797244a38ce3bb741a1c696b86ffea1b16c0..c35a10005d091fcf0f19e61a1fc087df08e41797 100644
--- a/core/modules/system/tests/src/Functional/System/MainContentFallbackTest.php
+++ b/core/modules/system/tests/src/Functional/System/MainContentFallbackTest.php
@@ -16,7 +16,7 @@ class MainContentFallbackTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['block', 'system_test'];
+  protected static $modules = ['block', 'system_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/System/PageNotFoundTest.php b/core/modules/system/tests/src/Functional/System/PageNotFoundTest.php
index ed8e7679f34e93c65526e017cc9c1218eac5152a..74efe98c172d049ce86ccb948e59b92777585264 100644
--- a/core/modules/system/tests/src/Functional/System/PageNotFoundTest.php
+++ b/core/modules/system/tests/src/Functional/System/PageNotFoundTest.php
@@ -21,7 +21,7 @@ class PageNotFoundTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['system_test'];
+  protected static $modules = ['system_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/System/PageTitleTest.php b/core/modules/system/tests/src/Functional/System/PageTitleTest.php
index 580e75d510ecad099cbe46728a5338da5040f572..5b280512db873f320389d712f0624808f08dfa89 100644
--- a/core/modules/system/tests/src/Functional/System/PageTitleTest.php
+++ b/core/modules/system/tests/src/Functional/System/PageTitleTest.php
@@ -19,7 +19,7 @@ class PageTitleTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'test_page_test', 'form_test', 'block'];
+  protected static $modules = ['node', 'test_page_test', 'form_test', 'block'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/System/ResponseGeneratorTest.php b/core/modules/system/tests/src/Functional/System/ResponseGeneratorTest.php
index cab489eb5533e3c3c3ff9ed473fe5746848bbbbe..3d44528b7fb40762d89e873df0d2096ef6c96103 100644
--- a/core/modules/system/tests/src/Functional/System/ResponseGeneratorTest.php
+++ b/core/modules/system/tests/src/Functional/System/ResponseGeneratorTest.php
@@ -17,7 +17,7 @@ class ResponseGeneratorTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['hal', 'rest', 'node', 'basic_auth'];
+  protected static $modules = ['hal', 'rest', 'node', 'basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/System/ShutdownFunctionsTest.php b/core/modules/system/tests/src/Functional/System/ShutdownFunctionsTest.php
index 5d2f101ce75e0b7cd455ad2f3e1559a12db06124..21c1a85dd559e6d06b3f9a782bfa69d7b0484316 100644
--- a/core/modules/system/tests/src/Functional/System/ShutdownFunctionsTest.php
+++ b/core/modules/system/tests/src/Functional/System/ShutdownFunctionsTest.php
@@ -16,7 +16,7 @@ class ShutdownFunctionsTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['system_test'];
+  protected static $modules = ['system_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/System/SiteMaintenanceTest.php b/core/modules/system/tests/src/Functional/System/SiteMaintenanceTest.php
index 1337d4d22f63b37c7f16f8a79db3510a707055cd..64c616ef5d96d2e722ddf286140af840d11837e3 100644
--- a/core/modules/system/tests/src/Functional/System/SiteMaintenanceTest.php
+++ b/core/modules/system/tests/src/Functional/System/SiteMaintenanceTest.php
@@ -22,7 +22,7 @@ class SiteMaintenanceTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['node'];
+  protected static $modules = ['node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/System/StatusTest.php b/core/modules/system/tests/src/Functional/System/StatusTest.php
index a732a3c282e9e539c5a0f76708a027d28feee8c8..770453a881848c7222eb4448fdf80dae1150b209 100644
--- a/core/modules/system/tests/src/Functional/System/StatusTest.php
+++ b/core/modules/system/tests/src/Functional/System/StatusTest.php
@@ -16,7 +16,7 @@ class StatusTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['update_test_postupdate'];
+  protected static $modules = ['update_test_postupdate'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/System/SystemAuthorizeTest.php b/core/modules/system/tests/src/Functional/System/SystemAuthorizeTest.php
index 57902fba3d36d04e38de1c673a4ba167f89b3509..8f0ba2dca7f00e1a5d8650bc26d5e4a60d40eda2 100644
--- a/core/modules/system/tests/src/Functional/System/SystemAuthorizeTest.php
+++ b/core/modules/system/tests/src/Functional/System/SystemAuthorizeTest.php
@@ -16,7 +16,7 @@ class SystemAuthorizeTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['system_test'];
+  protected static $modules = ['system_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/System/ThemeTest.php b/core/modules/system/tests/src/Functional/System/ThemeTest.php
index 43a55bb00422fc7df5925be51ba0e79465942387..4611da8e22ac16e3592ce3c66fbb10dd05825ab9 100644
--- a/core/modules/system/tests/src/Functional/System/ThemeTest.php
+++ b/core/modules/system/tests/src/Functional/System/ThemeTest.php
@@ -31,7 +31,7 @@ class ThemeTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'block', 'file'];
+  protected static $modules = ['node', 'block', 'file'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/System/TokenReplaceWebTest.php b/core/modules/system/tests/src/Functional/System/TokenReplaceWebTest.php
index de6edc66c00416b670f224c491b2c6fcb4439903..bf5ec9b68ffb8a52f8d6ce23d249e5ffdb4718be 100644
--- a/core/modules/system/tests/src/Functional/System/TokenReplaceWebTest.php
+++ b/core/modules/system/tests/src/Functional/System/TokenReplaceWebTest.php
@@ -18,7 +18,7 @@ class TokenReplaceWebTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['token_test', 'filter', 'node'];
+  protected static $modules = ['token_test', 'filter', 'node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Theme/EngineNyanCatTest.php b/core/modules/system/tests/src/Functional/Theme/EngineNyanCatTest.php
index 0eae48ccc7ca058d5d8ae62de42165605067402c..86613a79ae773b960c70b2db489c8b4b4c7b8951 100644
--- a/core/modules/system/tests/src/Functional/Theme/EngineNyanCatTest.php
+++ b/core/modules/system/tests/src/Functional/Theme/EngineNyanCatTest.php
@@ -16,7 +16,7 @@ class EngineNyanCatTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['theme_test'];
+  protected static $modules = ['theme_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Theme/EngineTwigTest.php b/core/modules/system/tests/src/Functional/Theme/EngineTwigTest.php
index 56ea6f158a0664ddc7dd9d5556e6e2d2bc694bd5..470c28aab55b1eb31828ef4d5163950fb51b5396 100644
--- a/core/modules/system/tests/src/Functional/Theme/EngineTwigTest.php
+++ b/core/modules/system/tests/src/Functional/Theme/EngineTwigTest.php
@@ -21,7 +21,7 @@ class EngineTwigTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['theme_test', 'twig_theme_test'];
+  protected static $modules = ['theme_test', 'twig_theme_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Theme/FastTest.php b/core/modules/system/tests/src/Functional/Theme/FastTest.php
index 54da6716556f50df12ddab0fbb674aee4fcc43f9..762acaca34bf57f6e584f69d12f7425e7ac889fa 100644
--- a/core/modules/system/tests/src/Functional/Theme/FastTest.php
+++ b/core/modules/system/tests/src/Functional/Theme/FastTest.php
@@ -16,7 +16,7 @@ class FastTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['theme_test'];
+  protected static $modules = ['theme_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Theme/HtmlAttributesTest.php b/core/modules/system/tests/src/Functional/Theme/HtmlAttributesTest.php
index fccf2ff4d63cd853d8a511780a2b2be3411bd714..77073c42dc9f90da13948d93cb7a135b6a03a826 100644
--- a/core/modules/system/tests/src/Functional/Theme/HtmlAttributesTest.php
+++ b/core/modules/system/tests/src/Functional/Theme/HtmlAttributesTest.php
@@ -16,7 +16,7 @@ class HtmlAttributesTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['theme_test'];
+  protected static $modules = ['theme_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Theme/ThemeEarlyInitializationTest.php b/core/modules/system/tests/src/Functional/Theme/ThemeEarlyInitializationTest.php
index 13d09e63e73419bd4c9f2b82cff35330c99a90ae..895d0f9b0fd618c637557f833b0ff20e0fa9ba50 100644
--- a/core/modules/system/tests/src/Functional/Theme/ThemeEarlyInitializationTest.php
+++ b/core/modules/system/tests/src/Functional/Theme/ThemeEarlyInitializationTest.php
@@ -17,7 +17,7 @@ class ThemeEarlyInitializationTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['theme_test'];
+  protected static $modules = ['theme_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Theme/ThemeInfoTest.php b/core/modules/system/tests/src/Functional/Theme/ThemeInfoTest.php
index a1468957bc7bff2c0caeab84c1a1953e41f36427..ad37d08561e4f6b372879caa40edcabebf57c2d8 100644
--- a/core/modules/system/tests/src/Functional/Theme/ThemeInfoTest.php
+++ b/core/modules/system/tests/src/Functional/Theme/ThemeInfoTest.php
@@ -16,7 +16,7 @@ class ThemeInfoTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['theme_test'];
+  protected static $modules = ['theme_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Theme/ThemeLegacyTest.php b/core/modules/system/tests/src/Functional/Theme/ThemeLegacyTest.php
index 62fbc9177b4dbda804e768777ff67cc8928b1a3a..7de359c95b8054ab3ca217e69ae1f37c3ed19bdc 100644
--- a/core/modules/system/tests/src/Functional/Theme/ThemeLegacyTest.php
+++ b/core/modules/system/tests/src/Functional/Theme/ThemeLegacyTest.php
@@ -19,7 +19,7 @@ class ThemeLegacyTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['theme_test', 'theme_legacy_test'];
+  protected static $modules = ['theme_test', 'theme_legacy_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Theme/ThemeSuggestionsAlterTest.php b/core/modules/system/tests/src/Functional/Theme/ThemeSuggestionsAlterTest.php
index 0bba89c62b5608db5a8bd725a9a8179ac540b073..c1398cc9cefdb9eb908214611edeaf8eb1f3f0ea 100644
--- a/core/modules/system/tests/src/Functional/Theme/ThemeSuggestionsAlterTest.php
+++ b/core/modules/system/tests/src/Functional/Theme/ThemeSuggestionsAlterTest.php
@@ -17,7 +17,7 @@ class ThemeSuggestionsAlterTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['theme_test'];
+  protected static $modules = ['theme_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Theme/ThemeTest.php b/core/modules/system/tests/src/Functional/Theme/ThemeTest.php
index dffb1a19d55ef1d4a986b8da80e22bfacdc893e3..8120a1d9eaaf8853203d1051316043f04a702e2d 100644
--- a/core/modules/system/tests/src/Functional/Theme/ThemeTest.php
+++ b/core/modules/system/tests/src/Functional/Theme/ThemeTest.php
@@ -18,7 +18,7 @@ class ThemeTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['theme_test', 'node'];
+  protected static $modules = ['theme_test', 'node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Theme/ThemeTokenTest.php b/core/modules/system/tests/src/Functional/Theme/ThemeTokenTest.php
index 955a9aef704ccaedb1829fa4a90fedd2d770f01d..bb8187cc9e1030304bfcc0e277e3a38f33006d48 100644
--- a/core/modules/system/tests/src/Functional/Theme/ThemeTokenTest.php
+++ b/core/modules/system/tests/src/Functional/Theme/ThemeTokenTest.php
@@ -16,7 +16,7 @@ class ThemeTokenTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['block'];
+  protected static $modules = ['block'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Theme/TwigDebugMarkupTest.php b/core/modules/system/tests/src/Functional/Theme/TwigDebugMarkupTest.php
index 1890ccb332237e6f6a3d47956387578b2748a090..04466654f0ac4d11d7d8974a4b627498daa78c24 100644
--- a/core/modules/system/tests/src/Functional/Theme/TwigDebugMarkupTest.php
+++ b/core/modules/system/tests/src/Functional/Theme/TwigDebugMarkupTest.php
@@ -17,7 +17,7 @@ class TwigDebugMarkupTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['theme_test', 'node'];
+  protected static $modules = ['theme_test', 'node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Theme/TwigExtensionTest.php b/core/modules/system/tests/src/Functional/Theme/TwigExtensionTest.php
index fd6dc99ff8b6b76a04d5e753338ecab23446d435..5a8659b16e2b2239288d690704ac875e2e13ccdf 100644
--- a/core/modules/system/tests/src/Functional/Theme/TwigExtensionTest.php
+++ b/core/modules/system/tests/src/Functional/Theme/TwigExtensionTest.php
@@ -17,7 +17,7 @@ class TwigExtensionTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['theme_test', 'twig_extension_test'];
+  protected static $modules = ['theme_test', 'twig_extension_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Theme/TwigLoaderTest.php b/core/modules/system/tests/src/Functional/Theme/TwigLoaderTest.php
index 1238f2074ace4100565208efde25130c4f7a205d..432b1270e209d088b31005ee1d0b3776f4007005 100644
--- a/core/modules/system/tests/src/Functional/Theme/TwigLoaderTest.php
+++ b/core/modules/system/tests/src/Functional/Theme/TwigLoaderTest.php
@@ -16,7 +16,7 @@ class TwigLoaderTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['twig_loader_test'];
+  protected static $modules = ['twig_loader_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Theme/TwigRegistryLoaderTest.php b/core/modules/system/tests/src/Functional/Theme/TwigRegistryLoaderTest.php
index 9bc38aee9344043ca71f0a8a4ac7d33783c65c21..24b3413399bfbe1d88a143a936f1d4bdf46e789e 100644
--- a/core/modules/system/tests/src/Functional/Theme/TwigRegistryLoaderTest.php
+++ b/core/modules/system/tests/src/Functional/Theme/TwigRegistryLoaderTest.php
@@ -17,7 +17,7 @@ class TwigRegistryLoaderTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['twig_theme_test', 'block'];
+  protected static $modules = ['twig_theme_test', 'block'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Theme/TwigSettingsTest.php b/core/modules/system/tests/src/Functional/Theme/TwigSettingsTest.php
index 2cc8e24d0c5833be75a4b2b535e5f7183fe73255..adefc94dc2ccf82b2ab4de24c150f99d78b11189 100644
--- a/core/modules/system/tests/src/Functional/Theme/TwigSettingsTest.php
+++ b/core/modules/system/tests/src/Functional/Theme/TwigSettingsTest.php
@@ -17,7 +17,7 @@ class TwigSettingsTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['theme_test'];
+  protected static $modules = ['theme_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Theme/TwigTransTest.php b/core/modules/system/tests/src/Functional/Theme/TwigTransTest.php
index 1e08dde675181effc6adf5d24dcb01ba0b0dba1d..85464dcf56acbbb458132af76895e70256e5cd1e 100644
--- a/core/modules/system/tests/src/Functional/Theme/TwigTransTest.php
+++ b/core/modules/system/tests/src/Functional/Theme/TwigTransTest.php
@@ -18,7 +18,7 @@ class TwigTransTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'theme_test',
     'twig_theme_test',
     'locale',
diff --git a/core/modules/system/tests/src/Functional/UpdateSystem/DependencyHookInvocationTest.php b/core/modules/system/tests/src/Functional/UpdateSystem/DependencyHookInvocationTest.php
index 7e4fa832245289c95fc737b5b1fb0a8cc9c0411c..bcdac8f2a7470f3522dc3879a253703504edf272 100644
--- a/core/modules/system/tests/src/Functional/UpdateSystem/DependencyHookInvocationTest.php
+++ b/core/modules/system/tests/src/Functional/UpdateSystem/DependencyHookInvocationTest.php
@@ -17,7 +17,7 @@ class DependencyHookInvocationTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['update_test_0', 'update_test_1', 'update_test_2'];
+  protected static $modules = ['update_test_0', 'update_test_1', 'update_test_2'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/UpdateSystem/DependencyMissingTest.php b/core/modules/system/tests/src/Functional/UpdateSystem/DependencyMissingTest.php
index 828925581558c8962ac9c17bc111baa8289fa903..7d1cb156580bc8a391e560be0cb4c63de129768b 100644
--- a/core/modules/system/tests/src/Functional/UpdateSystem/DependencyMissingTest.php
+++ b/core/modules/system/tests/src/Functional/UpdateSystem/DependencyMissingTest.php
@@ -16,7 +16,7 @@ class DependencyMissingTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['update_test_0', 'update_test_2'];
+  protected static $modules = ['update_test_0', 'update_test_2'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/UpdateSystem/DependencyOrderingTest.php b/core/modules/system/tests/src/Functional/UpdateSystem/DependencyOrderingTest.php
index 08eff446852a4814980d1e86f152eccb8750b06e..4a361bc721efee17c52cdb75c3e0d8ffae7bebc4 100644
--- a/core/modules/system/tests/src/Functional/UpdateSystem/DependencyOrderingTest.php
+++ b/core/modules/system/tests/src/Functional/UpdateSystem/DependencyOrderingTest.php
@@ -16,7 +16,7 @@ class DependencyOrderingTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['update_test_0', 'update_test_1', 'update_test_2', 'update_test_3'];
+  protected static $modules = ['update_test_0', 'update_test_1', 'update_test_2', 'update_test_3'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/UpdateSystem/InvalidUpdateHookTest.php b/core/modules/system/tests/src/Functional/UpdateSystem/InvalidUpdateHookTest.php
index ec1826de7547119e8e00e5b6569b2952bdf0bed6..f3c3710b4440fef76e45a0f8be7a1e05f6e6651f 100644
--- a/core/modules/system/tests/src/Functional/UpdateSystem/InvalidUpdateHookTest.php
+++ b/core/modules/system/tests/src/Functional/UpdateSystem/InvalidUpdateHookTest.php
@@ -20,7 +20,7 @@ class InvalidUpdateHookTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['update_test_invalid_hook', 'update_script_test', 'dblog'];
+  protected static $modules = ['update_test_invalid_hook', 'update_script_test', 'dblog'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/UpdateSystem/UpdateSchemaTest.php b/core/modules/system/tests/src/Functional/UpdateSystem/UpdateSchemaTest.php
index d05cf16263e98b439e84c3332e3333dffa01b140..95efd30eac3777c240d3383b01bdea82a69fc640 100644
--- a/core/modules/system/tests/src/Functional/UpdateSystem/UpdateSchemaTest.php
+++ b/core/modules/system/tests/src/Functional/UpdateSystem/UpdateSchemaTest.php
@@ -19,7 +19,7 @@ class UpdateSchemaTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['update_test_schema'];
+  protected static $modules = ['update_test_schema'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/UpdateSystem/UpdatesWith7xTest.php b/core/modules/system/tests/src/Functional/UpdateSystem/UpdatesWith7xTest.php
index 9900f827fb4faf1cad5d178d36762b89c179ad3e..27e721b7623aac004d24e861583cbe69185718ff 100644
--- a/core/modules/system/tests/src/Functional/UpdateSystem/UpdatesWith7xTest.php
+++ b/core/modules/system/tests/src/Functional/UpdateSystem/UpdatesWith7xTest.php
@@ -20,7 +20,7 @@ class UpdatesWith7xTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['update_test_with_7x'];
+  protected static $modules = ['update_test_with_7x'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/FunctionalJavascript/ModalRendererTest.php b/core/modules/system/tests/src/FunctionalJavascript/ModalRendererTest.php
index 3b09f353d4930a746b9c49649eb8cc2bdd627edf..ac8da5027645cd29d58aab09898df001ddd35577 100644
--- a/core/modules/system/tests/src/FunctionalJavascript/ModalRendererTest.php
+++ b/core/modules/system/tests/src/FunctionalJavascript/ModalRendererTest.php
@@ -14,7 +14,7 @@ class ModalRendererTest extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system', 'dialog_renderer_test'];
+  protected static $modules = ['system', 'dialog_renderer_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/FunctionalJavascript/OffCanvasTest.php b/core/modules/system/tests/src/FunctionalJavascript/OffCanvasTest.php
index f2d44592c60267ce3eff0ed9e3ec000264277c2e..78c5220577aed8e6bd02fabe60eb2441ef7849bd 100644
--- a/core/modules/system/tests/src/FunctionalJavascript/OffCanvasTest.php
+++ b/core/modules/system/tests/src/FunctionalJavascript/OffCanvasTest.php
@@ -21,7 +21,7 @@ class OffCanvasTest extends OffCanvasTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'off_canvas_test',
   ];
 
diff --git a/core/modules/system/tests/src/FunctionalJavascript/ThemeSettingsFormTest.php b/core/modules/system/tests/src/FunctionalJavascript/ThemeSettingsFormTest.php
index c3e9f3406555c3a1fdb2d865d864c19343f8bced..e372a8ae91b36b565a78d4c5ba4eb31edfe7b7a2 100644
--- a/core/modules/system/tests/src/FunctionalJavascript/ThemeSettingsFormTest.php
+++ b/core/modules/system/tests/src/FunctionalJavascript/ThemeSettingsFormTest.php
@@ -18,7 +18,7 @@ class ThemeSettingsFormTest extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['file'];
+  protected static $modules = ['file'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Kernel/Action/ActionTest.php b/core/modules/system/tests/src/Kernel/Action/ActionTest.php
index e13cb686749936dfdd0302a1db44f2c9377f4a68..9b52405b2dc46bfd20d5d5cc5e599786b1918837 100644
--- a/core/modules/system/tests/src/Kernel/Action/ActionTest.php
+++ b/core/modules/system/tests/src/Kernel/Action/ActionTest.php
@@ -17,7 +17,7 @@ class ActionTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system', 'field', 'user', 'action_test'];
+  protected static $modules = ['system', 'field', 'user', 'action_test'];
 
   /**
    * The action manager.
diff --git a/core/modules/system/tests/src/Kernel/Block/SystemMenuBlockTest.php b/core/modules/system/tests/src/Kernel/Block/SystemMenuBlockTest.php
index 3c592d2673fc1f1f7aedfca4cf591562f5e1ff10..6ac0e03d38876ee1961faa6498706ee2920bf91c 100644
--- a/core/modules/system/tests/src/Kernel/Block/SystemMenuBlockTest.php
+++ b/core/modules/system/tests/src/Kernel/Block/SystemMenuBlockTest.php
@@ -32,7 +32,7 @@ class SystemMenuBlockTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'system',
     'block',
     'menu_test',
diff --git a/core/modules/system/tests/src/Kernel/Common/AddFeedTest.php b/core/modules/system/tests/src/Kernel/Common/AddFeedTest.php
index b7d34222fcbcf61eacfeebbab141420069c9d7c6..9926b189921971149a0305b7db1cffed1af1fb87 100644
--- a/core/modules/system/tests/src/Kernel/Common/AddFeedTest.php
+++ b/core/modules/system/tests/src/Kernel/Common/AddFeedTest.php
@@ -16,7 +16,7 @@ class AddFeedTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system'];
+  protected static $modules = ['system'];
 
   /**
    * Tests attaching feeds with paths, URLs, and titles.
diff --git a/core/modules/system/tests/src/Kernel/DateFormatAccessControlHandlerTest.php b/core/modules/system/tests/src/Kernel/DateFormatAccessControlHandlerTest.php
index 8524c92380768bca268a4404dbd13104b3d9de8c..d892aaf62a5eb30d03a78deff9119ade2c89571a 100644
--- a/core/modules/system/tests/src/Kernel/DateFormatAccessControlHandlerTest.php
+++ b/core/modules/system/tests/src/Kernel/DateFormatAccessControlHandlerTest.php
@@ -24,7 +24,7 @@ class DateFormatAccessControlHandlerTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'system',
     'user',
   ];
diff --git a/core/modules/system/tests/src/Kernel/Entity/EntityReferenceSelectionReferenceableTest.php b/core/modules/system/tests/src/Kernel/Entity/EntityReferenceSelectionReferenceableTest.php
index 55bba866b200c2c05d53fef08cb875b25ee85bbb..af18be632fe31236480f0d4c6deb35a193775534 100644
--- a/core/modules/system/tests/src/Kernel/Entity/EntityReferenceSelectionReferenceableTest.php
+++ b/core/modules/system/tests/src/Kernel/Entity/EntityReferenceSelectionReferenceableTest.php
@@ -41,7 +41,7 @@ class EntityReferenceSelectionReferenceableTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system', 'user', 'field', 'entity_reference', 'node', 'entity_test'];
+  protected static $modules = ['system', 'user', 'field', 'entity_reference', 'node', 'entity_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Kernel/Extension/ModuleHandlerTest.php b/core/modules/system/tests/src/Kernel/Extension/ModuleHandlerTest.php
index 39a7331b570991e3388cd15a48d6783932f23b3d..93d6fbe05a2c6d8e450a6e8879e8a5c064c2638e 100644
--- a/core/modules/system/tests/src/Kernel/Extension/ModuleHandlerTest.php
+++ b/core/modules/system/tests/src/Kernel/Extension/ModuleHandlerTest.php
@@ -18,7 +18,7 @@ class ModuleHandlerTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system'];
+  protected static $modules = ['system'];
 
   /**
    * The basic functionality of retrieving enabled modules.
diff --git a/core/modules/system/tests/src/Kernel/Form/FormElementLabelTest.php b/core/modules/system/tests/src/Kernel/Form/FormElementLabelTest.php
index 2bc895f8a0276190693c9bc8b1b846381b5e9872..5a7992c4963034e6473e6984a23233a02fe85e48 100644
--- a/core/modules/system/tests/src/Kernel/Form/FormElementLabelTest.php
+++ b/core/modules/system/tests/src/Kernel/Form/FormElementLabelTest.php
@@ -15,7 +15,7 @@ class FormElementLabelTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system'];
+  protected static $modules = ['system'];
 
   /**
    * Ensures that attributes can be placed for form element label.
diff --git a/core/modules/system/tests/src/Kernel/Form/FormElementMaxlengthTest.php b/core/modules/system/tests/src/Kernel/Form/FormElementMaxlengthTest.php
index 94026b65414f7f88025e6a81536570bf81f27738..480ccb3b30b180b8433bf3e77723ca21254fcfa0 100644
--- a/core/modules/system/tests/src/Kernel/Form/FormElementMaxlengthTest.php
+++ b/core/modules/system/tests/src/Kernel/Form/FormElementMaxlengthTest.php
@@ -18,7 +18,7 @@ class FormElementMaxlengthTest extends KernelTestBase implements FormInterface {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system'];
+  protected static $modules = ['system'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Kernel/Form/FormObjectTest.php b/core/modules/system/tests/src/Kernel/Form/FormObjectTest.php
index 1d33aa29e656021e3de855391e453f7c5cbf782f..939590e11f3dd55c94c7a3a373d2ea35288603e0 100644
--- a/core/modules/system/tests/src/Kernel/Form/FormObjectTest.php
+++ b/core/modules/system/tests/src/Kernel/Form/FormObjectTest.php
@@ -17,7 +17,7 @@ class FormObjectTest extends ConfigFormTestBase {
    *
    * @var array
    */
-  public static $modules = ['form_test'];
+  protected static $modules = ['form_test'];
 
   protected function setUp(): void {
     parent::setUp();
diff --git a/core/modules/system/tests/src/Kernel/Form/ProgrammaticTest.php b/core/modules/system/tests/src/Kernel/Form/ProgrammaticTest.php
index 456b506e72f2525cc0a745e576f82b36406a1cea..f610a5f152c4b11a94e688f0e848502c8e84dc23 100644
--- a/core/modules/system/tests/src/Kernel/Form/ProgrammaticTest.php
+++ b/core/modules/system/tests/src/Kernel/Form/ProgrammaticTest.php
@@ -18,7 +18,7 @@ class ProgrammaticTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['form_test'];
+  protected static $modules = ['form_test'];
 
   /**
    * Test the programmatic form submission workflow.
diff --git a/core/modules/system/tests/src/Kernel/Installer/InstallerDependenciesResolutionTest.php b/core/modules/system/tests/src/Kernel/Installer/InstallerDependenciesResolutionTest.php
index abe29c3ae9fac3a98f5d5faa8b38e9df109032df..2e762b646fda501b9c6a34b6d20d04b954620e6d 100644
--- a/core/modules/system/tests/src/Kernel/Installer/InstallerDependenciesResolutionTest.php
+++ b/core/modules/system/tests/src/Kernel/Installer/InstallerDependenciesResolutionTest.php
@@ -14,7 +14,7 @@ class InstallerDependenciesResolutionTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system'];
+  protected static $modules = ['system'];
 
   /**
    * Verifies that the exception message in the profile step is correct.
diff --git a/core/modules/system/tests/src/Kernel/Installer/UninstallKernelTest.php b/core/modules/system/tests/src/Kernel/Installer/UninstallKernelTest.php
index 9b99d65ce9480ccf5299694dd3c6f5b94f3aff6b..a2ca893c97893a547cdfc7c1c47b396ab982a458 100644
--- a/core/modules/system/tests/src/Kernel/Installer/UninstallKernelTest.php
+++ b/core/modules/system/tests/src/Kernel/Installer/UninstallKernelTest.php
@@ -16,7 +16,7 @@ class UninstallKernelTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['system', 'user', 'field', 'file', 'image', 'media'];
+  protected static $modules = ['system', 'user', 'field', 'file', 'image', 'media'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Kernel/MenuAccessControlHandlerTest.php b/core/modules/system/tests/src/Kernel/MenuAccessControlHandlerTest.php
index d92ae2aa76aeb335283115d0cd0a0c25cfa93e22..c27bbc39d90ca25677b712cf8ca6fc7a74d368b0 100644
--- a/core/modules/system/tests/src/Kernel/MenuAccessControlHandlerTest.php
+++ b/core/modules/system/tests/src/Kernel/MenuAccessControlHandlerTest.php
@@ -24,7 +24,7 @@ class MenuAccessControlHandlerTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'system',
     'user',
   ];
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 3a455458a0068a0558a844106aeec6cef7d7f031..77dba8e29b15d277f69dcb74822d107822aaddbf 100644
--- a/core/modules/system/tests/src/Kernel/Migrate/d6/MigrateSystemConfigurationTest.php
+++ b/core/modules/system/tests/src/Kernel/Migrate/d6/MigrateSystemConfigurationTest.php
@@ -14,7 +14,7 @@ class MigrateSystemConfigurationTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['action', 'file', 'system'];
+  protected static $modules = ['action', 'file', 'system'];
 
   protected $expectedConfig = [
     'system.cron' => [
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 1ee23960e4326fcef3f709ca7fd34c0eaeb996cf..ad0efea2319dd4ee03b4861d07d1758ce51eda68 100644
--- a/core/modules/system/tests/src/Kernel/Migrate/d7/MigrateGlobalThemeSettingsTest.php
+++ b/core/modules/system/tests/src/Kernel/Migrate/d7/MigrateGlobalThemeSettingsTest.php
@@ -14,7 +14,7 @@ class MigrateGlobalThemeSettingsTest extends MigrateDrupal7TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system'];
+  protected static $modules = ['system'];
 
   /**
    * {@inheritdoc}
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 cdef3c3767a8cdc74114b24d970eaea6ebf09078..f8d37e494c7dc185fac8d7f3ce15b6eb17782c5e 100644
--- a/core/modules/system/tests/src/Kernel/Migrate/d7/MigrateSystemConfigurationTest.php
+++ b/core/modules/system/tests/src/Kernel/Migrate/d7/MigrateSystemConfigurationTest.php
@@ -11,7 +11,7 @@
  */
 class MigrateSystemConfigurationTest extends MigrateDrupal7TestBase {
 
-  public static $modules = ['action', 'file', 'system'];
+  protected static $modules = ['action', 'file', 'system'];
 
   protected $expectedConfig = [
     'system.authorize' => [
diff --git a/core/modules/system/tests/src/Kernel/PermissionsTest.php b/core/modules/system/tests/src/Kernel/PermissionsTest.php
index fdd69f52f5f959b8ca17b42cac49300df74b25ef..b423ddb4be4358889ecc0baa6b07a81f144cc554 100644
--- a/core/modules/system/tests/src/Kernel/PermissionsTest.php
+++ b/core/modules/system/tests/src/Kernel/PermissionsTest.php
@@ -12,7 +12,7 @@ class PermissionsTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'system',
     'user',
   ];
diff --git a/core/modules/system/tests/src/Kernel/Plugin/migrate/source/ExtensionTest.php b/core/modules/system/tests/src/Kernel/Plugin/migrate/source/ExtensionTest.php
index c6576019a760d57080b28f32db5c045ac3fc8c5b..64251b7107cc61bc0877ed635d7409aaacc5e851 100644
--- a/core/modules/system/tests/src/Kernel/Plugin/migrate/source/ExtensionTest.php
+++ b/core/modules/system/tests/src/Kernel/Plugin/migrate/source/ExtensionTest.php
@@ -15,7 +15,7 @@ class ExtensionTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system', 'migrate_drupal'];
+  protected static $modules = ['system', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Kernel/Plugin/migrate/source/MenuTest.php b/core/modules/system/tests/src/Kernel/Plugin/migrate/source/MenuTest.php
index 0feb9a2b0fe6c2c4784814667f63eae1d855c10a..3917b37cc0853bf093d5d1d202ad677668859980 100644
--- a/core/modules/system/tests/src/Kernel/Plugin/migrate/source/MenuTest.php
+++ b/core/modules/system/tests/src/Kernel/Plugin/migrate/source/MenuTest.php
@@ -16,7 +16,7 @@ class MenuTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system', 'migrate_drupal'];
+  protected static $modules = ['system', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Kernel/Plugin/migrate/source/d7/ThemeSettingsTest.php b/core/modules/system/tests/src/Kernel/Plugin/migrate/source/d7/ThemeSettingsTest.php
index 17b54fa1bc21a5e2eb535ad24325f2de5d7ca821..482e4ddf683fa9e254ede70126601e3bd3407cc6 100644
--- a/core/modules/system/tests/src/Kernel/Plugin/migrate/source/d7/ThemeSettingsTest.php
+++ b/core/modules/system/tests/src/Kernel/Plugin/migrate/source/d7/ThemeSettingsTest.php
@@ -16,7 +16,7 @@ class ThemeSettingsTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system', 'migrate_drupal'];
+  protected static $modules = ['system', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Kernel/Render/ClassyTest.php b/core/modules/system/tests/src/Kernel/Render/ClassyTest.php
index e527699aa3b55e2c2e3ea540f4d70a65017644c7..1eab0f78a742d57c7a39c995e8470172187acc08 100644
--- a/core/modules/system/tests/src/Kernel/Render/ClassyTest.php
+++ b/core/modules/system/tests/src/Kernel/Render/ClassyTest.php
@@ -14,7 +14,7 @@ class ClassyTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system', 'twig_theme_test'];
+  protected static $modules = ['system', 'twig_theme_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Kernel/Scripts/DbDumpCommandTest.php b/core/modules/system/tests/src/Kernel/Scripts/DbDumpCommandTest.php
index 2b9f0efcd9cdaaa59cca5bc9144f4c0f74dd9a20..887ba8a11766f8506605d248c2c31f50cd80e8b6 100644
--- a/core/modules/system/tests/src/Kernel/Scripts/DbDumpCommandTest.php
+++ b/core/modules/system/tests/src/Kernel/Scripts/DbDumpCommandTest.php
@@ -17,7 +17,7 @@ class DbDumpCommandTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system'];
+  protected static $modules = ['system'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Kernel/Scripts/DbImportCommandTest.php b/core/modules/system/tests/src/Kernel/Scripts/DbImportCommandTest.php
index 676a56adfe698755d5c745991722e52888b0f2a7..36cba94c9d58e85975d83a0d213bd8c7926c934a 100644
--- a/core/modules/system/tests/src/Kernel/Scripts/DbImportCommandTest.php
+++ b/core/modules/system/tests/src/Kernel/Scripts/DbImportCommandTest.php
@@ -17,7 +17,7 @@ class DbImportCommandTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system', 'config', 'dblog', 'menu_link_content', 'link', 'block_content', 'file', 'user'];
+  protected static $modules = ['system', 'config', 'dblog', 'menu_link_content', 'link', 'block_content', 'file', 'user'];
 
   /**
    * Tables that should be part of the exported script.
diff --git a/core/modules/system/tests/src/Kernel/System/CronQueueTest.php b/core/modules/system/tests/src/Kernel/System/CronQueueTest.php
index 065dbbcd5c619b2d6382739140d7e11158968fb5..7623fd92bdf9c6b7875c404c980697d9a598184e 100644
--- a/core/modules/system/tests/src/Kernel/System/CronQueueTest.php
+++ b/core/modules/system/tests/src/Kernel/System/CronQueueTest.php
@@ -17,7 +17,7 @@ class CronQueueTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['system', 'cron_queue_test'];
+  protected static $modules = ['system', 'cron_queue_test'];
 
   /**
    * The database connection.
diff --git a/core/modules/system/tests/src/Kernel/System/InfoAlterTest.php b/core/modules/system/tests/src/Kernel/System/InfoAlterTest.php
index ee5fbf6adf8a57b428206cde5669413745119dd5..1f911d2a7048dc99e0aeed013d274e5a2036f687 100644
--- a/core/modules/system/tests/src/Kernel/System/InfoAlterTest.php
+++ b/core/modules/system/tests/src/Kernel/System/InfoAlterTest.php
@@ -11,7 +11,7 @@
  */
 class InfoAlterTest extends KernelTestBase {
 
-  public static $modules = ['system'];
+  protected static $modules = ['system'];
 
   /**
    * Tests that theme .info.yml data is rebuild after enabling a module.
diff --git a/core/modules/system/tests/src/Kernel/Theme/FunctionsTest.php b/core/modules/system/tests/src/Kernel/Theme/FunctionsTest.php
index d7e6fdcbfc354d23cc18ac06cfcce41359ef9815..3b12f47bf18f08833851ef394c85f2fd3aeea92b 100644
--- a/core/modules/system/tests/src/Kernel/Theme/FunctionsTest.php
+++ b/core/modules/system/tests/src/Kernel/Theme/FunctionsTest.php
@@ -22,7 +22,7 @@ class FunctionsTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['router_test', 'system'];
+  protected static $modules = ['router_test', 'system'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Kernel/Theme/ThemeTest.php b/core/modules/system/tests/src/Kernel/Theme/ThemeTest.php
index 5c7c2e38cd9940888ea037c6d2251e30362e47b8..f2e45a0e1564df0b37d24e8bf40f6a4375593d1b 100644
--- a/core/modules/system/tests/src/Kernel/Theme/ThemeTest.php
+++ b/core/modules/system/tests/src/Kernel/Theme/ThemeTest.php
@@ -16,7 +16,7 @@ class ThemeTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['theme_test', 'node', 'system'];
+  protected static $modules = ['theme_test', 'node', 'system'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Kernel/Theme/TwigFilterTest.php b/core/modules/system/tests/src/Kernel/Theme/TwigFilterTest.php
index 8706483db894e579edc55c60cab0d3bbf2781e3d..2d6806a23400d1afc0783007fbdbdba8d90f52c6 100644
--- a/core/modules/system/tests/src/Kernel/Theme/TwigFilterTest.php
+++ b/core/modules/system/tests/src/Kernel/Theme/TwigFilterTest.php
@@ -16,7 +16,7 @@ class TwigFilterTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['twig_theme_test'];
+  protected static $modules = ['twig_theme_test'];
 
   /**
    * Test Twig "without" filter.
diff --git a/core/modules/system/tests/src/Kernel/Theme/TwigNamespaceTest.php b/core/modules/system/tests/src/Kernel/Theme/TwigNamespaceTest.php
index 278f194dd8c4c24fc9b70d4340ff5d2bbc745cc0..24f0df42f771f32ef592aa1e806eec0e70731c5f 100644
--- a/core/modules/system/tests/src/Kernel/Theme/TwigNamespaceTest.php
+++ b/core/modules/system/tests/src/Kernel/Theme/TwigNamespaceTest.php
@@ -17,7 +17,7 @@ class TwigNamespaceTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['twig_theme_test', 'twig_namespace_a', 'twig_namespace_b', 'node'];
+  protected static $modules = ['twig_theme_test', 'twig_namespace_a', 'twig_namespace_b', 'node'];
 
   /**
    * @var \Drupal\Core\Template\TwigEnvironment
diff --git a/core/modules/system/tests/src/Kernel/Theme/TwigRawTest.php b/core/modules/system/tests/src/Kernel/Theme/TwigRawTest.php
index 970e9d5140431e85d7143fd9b535e862421fc6ba..5af515115b474c1c637fb9c4fab29e5a12e84aab 100644
--- a/core/modules/system/tests/src/Kernel/Theme/TwigRawTest.php
+++ b/core/modules/system/tests/src/Kernel/Theme/TwigRawTest.php
@@ -16,7 +16,7 @@ class TwigRawTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['twig_theme_test'];
+  protected static $modules = ['twig_theme_test'];
 
   /**
    * Tests the raw filter inside an autoescape tag.
diff --git a/core/modules/system/tests/src/Kernel/Timezone/TimezoneTest.php b/core/modules/system/tests/src/Kernel/Timezone/TimezoneTest.php
index e9efa6d057dae76290999f44b59138121b3686ad..831571bdc02b1aa5f26bbc02ef462d54d8d95a94 100644
--- a/core/modules/system/tests/src/Kernel/Timezone/TimezoneTest.php
+++ b/core/modules/system/tests/src/Kernel/Timezone/TimezoneTest.php
@@ -11,7 +11,7 @@
  */
 class TimezoneTest extends KernelTestBase {
 
-  public static $modules = ['system'];
+  protected static $modules = ['system'];
 
   /**
    * Tests system_time_zones().
diff --git a/core/modules/system/tests/src/Kernel/TimezoneResolverTest.php b/core/modules/system/tests/src/Kernel/TimezoneResolverTest.php
index 7c7f889ed4ab4a7a9adbf84240c68a29cbfab270..69dabd27c1dbb0225e8ed0f5d31e50d5209a306f 100644
--- a/core/modules/system/tests/src/Kernel/TimezoneResolverTest.php
+++ b/core/modules/system/tests/src/Kernel/TimezoneResolverTest.php
@@ -20,7 +20,7 @@ class TimezoneResolverTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'system',
     'user',
   ];
diff --git a/core/modules/system/tests/src/Kernel/Token/TokenReplaceKernelTestBase.php b/core/modules/system/tests/src/Kernel/Token/TokenReplaceKernelTestBase.php
index 2c8339060486644d75fb359c365153c610633fd1..3ebf35239759e7f964689695f58da1622b1c8f7d 100644
--- a/core/modules/system/tests/src/Kernel/Token/TokenReplaceKernelTestBase.php
+++ b/core/modules/system/tests/src/Kernel/Token/TokenReplaceKernelTestBase.php
@@ -28,7 +28,7 @@ abstract class TokenReplaceKernelTestBase extends EntityKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['system'];
+  protected static $modules = ['system'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/taxonomy/tests/src/Functional/EarlyDateTest.php b/core/modules/taxonomy/tests/src/Functional/EarlyDateTest.php
index 8d28a80ca790a3246e41af073ca7b2c4fa4f1c64..784228d8604b04ca2863f3593c8d2cbd6fce2c30 100644
--- a/core/modules/taxonomy/tests/src/Functional/EarlyDateTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/EarlyDateTest.php
@@ -18,7 +18,7 @@ class EarlyDateTest extends TaxonomyTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'datetime'];
+  protected static $modules = ['node', 'datetime'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/taxonomy/tests/src/Functional/Hal/TermHalJsonAnonTest.php b/core/modules/taxonomy/tests/src/Functional/Hal/TermHalJsonAnonTest.php
index 7a3a57a8cab7d9a5ada0509d034132d91d6a48c0..b6370f8728e528a154eeeff037cd996e335258a4 100644
--- a/core/modules/taxonomy/tests/src/Functional/Hal/TermHalJsonAnonTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/Hal/TermHalJsonAnonTest.php
@@ -18,7 +18,7 @@ class TermHalJsonAnonTest extends TermResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/taxonomy/tests/src/Functional/Hal/TermHalJsonBasicAuthTest.php b/core/modules/taxonomy/tests/src/Functional/Hal/TermHalJsonBasicAuthTest.php
index 43adecebc2b668728a34eae6f5b4304f65b5c3ce..626fba45ae1df40f53d20a717fc4625c1fad1f66 100644
--- a/core/modules/taxonomy/tests/src/Functional/Hal/TermHalJsonBasicAuthTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/Hal/TermHalJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class TermHalJsonBasicAuthTest extends TermHalJsonAnonTest {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/taxonomy/tests/src/Functional/Hal/VocabularyHalJsonAnonTest.php b/core/modules/taxonomy/tests/src/Functional/Hal/VocabularyHalJsonAnonTest.php
index 1775ddd2f001cf2073a123c091d4e7884395f07a..b94677c7025c109af5fd3f9c081471303a39fa75 100644
--- a/core/modules/taxonomy/tests/src/Functional/Hal/VocabularyHalJsonAnonTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/Hal/VocabularyHalJsonAnonTest.php
@@ -15,7 +15,7 @@ class VocabularyHalJsonAnonTest extends VocabularyResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/taxonomy/tests/src/Functional/Hal/VocabularyHalJsonBasicAuthTest.php b/core/modules/taxonomy/tests/src/Functional/Hal/VocabularyHalJsonBasicAuthTest.php
index ad9d2340369813e326a8949a1bb0aca370e08532..044a73203507e4ac5b8fb326d406c08d7dc958b4 100644
--- a/core/modules/taxonomy/tests/src/Functional/Hal/VocabularyHalJsonBasicAuthTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/Hal/VocabularyHalJsonBasicAuthTest.php
@@ -15,7 +15,7 @@ class VocabularyHalJsonBasicAuthTest extends VocabularyResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal', 'basic_auth'];
+  protected static $modules = ['hal', 'basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/taxonomy/tests/src/Functional/Hal/VocabularyHalJsonCookieTest.php b/core/modules/taxonomy/tests/src/Functional/Hal/VocabularyHalJsonCookieTest.php
index 3e8b3cc7d413d7f4f08b73117a4ba8b7758bade1..c14248c42e7dba525d748c7aec12398dc9a4b04f 100644
--- a/core/modules/taxonomy/tests/src/Functional/Hal/VocabularyHalJsonCookieTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/Hal/VocabularyHalJsonCookieTest.php
@@ -15,7 +15,7 @@ class VocabularyHalJsonCookieTest extends VocabularyResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/taxonomy/tests/src/Functional/Rest/TermJsonBasicAuthTest.php b/core/modules/taxonomy/tests/src/Functional/Rest/TermJsonBasicAuthTest.php
index 8bb4c921cf2c930e15b2659edac472f8638fc8e5..87aff1ce1ab5ed684575d3ecf46c63c5812046d2 100644
--- a/core/modules/taxonomy/tests/src/Functional/Rest/TermJsonBasicAuthTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/Rest/TermJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class TermJsonBasicAuthTest extends TermResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/taxonomy/tests/src/Functional/Rest/TermResourceTestBase.php b/core/modules/taxonomy/tests/src/Functional/Rest/TermResourceTestBase.php
index b054ccdc23a21a56a0f2e38a732541569ae1a192..db261e04b6b78b3015a4ab00183c5f2d43c3632f 100644
--- a/core/modules/taxonomy/tests/src/Functional/Rest/TermResourceTestBase.php
+++ b/core/modules/taxonomy/tests/src/Functional/Rest/TermResourceTestBase.php
@@ -13,7 +13,7 @@ abstract class TermResourceTestBase extends EntityResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['taxonomy', 'path'];
+  protected static $modules = ['taxonomy', 'path'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/taxonomy/tests/src/Functional/Rest/TermXmlBasicAuthTest.php b/core/modules/taxonomy/tests/src/Functional/Rest/TermXmlBasicAuthTest.php
index f907dddb0b34ff1c7ae02fc5ec891f11ec15c5b4..7ff2733ee8e531c5de547dc97a976beecead425b 100644
--- a/core/modules/taxonomy/tests/src/Functional/Rest/TermXmlBasicAuthTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/Rest/TermXmlBasicAuthTest.php
@@ -16,7 +16,7 @@ class TermXmlBasicAuthTest extends TermResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/taxonomy/tests/src/Functional/Rest/VocabularyJsonBasicAuthTest.php b/core/modules/taxonomy/tests/src/Functional/Rest/VocabularyJsonBasicAuthTest.php
index 4bcb94e93b7616f6f3952b94b312e0db8a28f792..0ca19c730dfd989bc9d47f5efb8bd6b034a8684b 100644
--- a/core/modules/taxonomy/tests/src/Functional/Rest/VocabularyJsonBasicAuthTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/Rest/VocabularyJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class VocabularyJsonBasicAuthTest extends VocabularyResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/taxonomy/tests/src/Functional/Rest/VocabularyResourceTestBase.php b/core/modules/taxonomy/tests/src/Functional/Rest/VocabularyResourceTestBase.php
index 27ac0d26142b04f288a02c646568ab1693189e0e..481d409116815d1f22eb0a667bc1e3030676557e 100644
--- a/core/modules/taxonomy/tests/src/Functional/Rest/VocabularyResourceTestBase.php
+++ b/core/modules/taxonomy/tests/src/Functional/Rest/VocabularyResourceTestBase.php
@@ -10,7 +10,7 @@ abstract class VocabularyResourceTestBase extends EntityResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['taxonomy'];
+  protected static $modules = ['taxonomy'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/taxonomy/tests/src/Functional/Rest/VocabularyXmlBasicAuthTest.php b/core/modules/taxonomy/tests/src/Functional/Rest/VocabularyXmlBasicAuthTest.php
index b0a459098267f0b699fc650f8478a12dfc56084a..d591ce24cae7743f664e3c5fcf2f6c5a63e8075d 100644
--- a/core/modules/taxonomy/tests/src/Functional/Rest/VocabularyXmlBasicAuthTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/Rest/VocabularyXmlBasicAuthTest.php
@@ -16,7 +16,7 @@ class VocabularyXmlBasicAuthTest extends VocabularyResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/taxonomy/tests/src/Functional/RssTest.php b/core/modules/taxonomy/tests/src/Functional/RssTest.php
index a1381710d53f18958d6bed54dd7fb65d151e76ad..252950ce736d25c994b6896c634c388a650a20b7 100644
--- a/core/modules/taxonomy/tests/src/Functional/RssTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/RssTest.php
@@ -18,7 +18,7 @@ class RssTest extends TaxonomyTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'field_ui', 'views'];
+  protected static $modules = ['node', 'field_ui', 'views'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/taxonomy/tests/src/Functional/TaxonomyImageTest.php b/core/modules/taxonomy/tests/src/Functional/TaxonomyImageTest.php
index d2e110156084215c1d10ac3be3bfbacb4e164a14..8df1618ed24a8db810dfdff7ef7830b7a22afd99 100644
--- a/core/modules/taxonomy/tests/src/Functional/TaxonomyImageTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/TaxonomyImageTest.php
@@ -32,7 +32,7 @@ class TaxonomyImageTest extends TaxonomyTestBase {
    *
    * @var array
    */
-  public static $modules = ['image'];
+  protected static $modules = ['image'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/taxonomy/tests/src/Functional/TaxonomyTermIndentationTest.php b/core/modules/taxonomy/tests/src/Functional/TaxonomyTermIndentationTest.php
index ee937192468bc1abe13f067c165c6626be8163c7..051e289929905e4aac03e5476ff32b1d806a137d 100644
--- a/core/modules/taxonomy/tests/src/Functional/TaxonomyTermIndentationTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/TaxonomyTermIndentationTest.php
@@ -14,7 +14,7 @@ class TaxonomyTermIndentationTest extends TaxonomyTestBase {
    *
    * @var array
    */
-  public static $modules = ['taxonomy'];
+  protected static $modules = ['taxonomy'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/taxonomy/tests/src/Functional/TaxonomyTermPagerTest.php b/core/modules/taxonomy/tests/src/Functional/TaxonomyTermPagerTest.php
index 45b711f8e3be8d3f035eeb8bb6d0aa052c760340..e3acbc21e88dfff925bed0da2cc72d0039f32c37 100644
--- a/core/modules/taxonomy/tests/src/Functional/TaxonomyTermPagerTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/TaxonomyTermPagerTest.php
@@ -14,7 +14,7 @@ class TaxonomyTermPagerTest extends TaxonomyTestBase {
    *
    * @var array
    */
-  public static $modules = ['taxonomy'];
+  protected static $modules = ['taxonomy'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/taxonomy/tests/src/Functional/TaxonomyTestBase.php b/core/modules/taxonomy/tests/src/Functional/TaxonomyTestBase.php
index 7c210839b75f47c9c74f77eb1f19799ea0fa5909..bc1f4ee65dd031b90563142ca36d01b6b688f596 100644
--- a/core/modules/taxonomy/tests/src/Functional/TaxonomyTestBase.php
+++ b/core/modules/taxonomy/tests/src/Functional/TaxonomyTestBase.php
@@ -19,7 +19,7 @@ abstract class TaxonomyTestBase extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['taxonomy', 'block'];
+  protected static $modules = ['taxonomy', 'block'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/taxonomy/tests/src/Functional/TermAutocompleteTest.php b/core/modules/taxonomy/tests/src/Functional/TermAutocompleteTest.php
index ac482de887866bfae581efb246d7874aa42e9f9c..9b45ce67944dd4e831e57078f1a0779bfed6b364 100644
--- a/core/modules/taxonomy/tests/src/Functional/TermAutocompleteTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/TermAutocompleteTest.php
@@ -21,7 +21,7 @@ class TermAutocompleteTest extends TaxonomyTestBase {
    *
    * @var array
    */
-  public static $modules = ['node'];
+  protected static $modules = ['node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/taxonomy/tests/src/Functional/TermCacheTagsTest.php b/core/modules/taxonomy/tests/src/Functional/TermCacheTagsTest.php
index 52fef002993f9392e76ec6d97021217927c5b7b7..f93b380005c3913651350e7a0cce32d32044bab3 100644
--- a/core/modules/taxonomy/tests/src/Functional/TermCacheTagsTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/TermCacheTagsTest.php
@@ -16,7 +16,7 @@ class TermCacheTagsTest extends EntityWithUriCacheTagsTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['taxonomy'];
+  protected static $modules = ['taxonomy'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/taxonomy/tests/src/Functional/TermContextualLinksTest.php b/core/modules/taxonomy/tests/src/Functional/TermContextualLinksTest.php
index e24ca634f465fa691ed29cb8786cdb427ad6ecc6..3f736f89e03d144c3fedc9ab8e3feefd6175ce03 100644
--- a/core/modules/taxonomy/tests/src/Functional/TermContextualLinksTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/TermContextualLinksTest.php
@@ -12,7 +12,7 @@ class TermContextualLinksTest extends TaxonomyTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'contextual',
   ];
 
diff --git a/core/modules/taxonomy/tests/src/Functional/TermIndexTest.php b/core/modules/taxonomy/tests/src/Functional/TermIndexTest.php
index 61aa88a2a049f3f985ec1f92ddda762d744cb27a..0f38a4cb95b8c47dab19b8ed982df58aa78ed786 100644
--- a/core/modules/taxonomy/tests/src/Functional/TermIndexTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/TermIndexTest.php
@@ -18,7 +18,7 @@ class TermIndexTest extends TaxonomyTestBase {
    *
    * @var array
    */
-  public static $modules = ['views'];
+  protected static $modules = ['views'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/taxonomy/tests/src/Functional/TermLanguageTest.php b/core/modules/taxonomy/tests/src/Functional/TermLanguageTest.php
index 1d3653789b143c089c7cfea990921bf3c4e55877..6a412cbf84a4cef4b239cddaf98b6a7c9bda1019 100644
--- a/core/modules/taxonomy/tests/src/Functional/TermLanguageTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/TermLanguageTest.php
@@ -12,7 +12,7 @@
  */
 class TermLanguageTest extends TaxonomyTestBase {
 
-  public static $modules = ['language'];
+  protected static $modules = ['language'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/taxonomy/tests/src/Functional/TermTest.php b/core/modules/taxonomy/tests/src/Functional/TermTest.php
index bf82b10ec95df332615892e7d6b84f7d6ec13ed5..5060ab631da10fc752e2bb8814f1e74a0f929c3a 100644
--- a/core/modules/taxonomy/tests/src/Functional/TermTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/TermTest.php
@@ -34,7 +34,7 @@ class TermTest extends TaxonomyTestBase {
    *
    * @var string[]
    */
-  public static $modules = ['block'];
+  protected static $modules = ['block'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/taxonomy/tests/src/Functional/TermTranslationFieldViewTest.php b/core/modules/taxonomy/tests/src/Functional/TermTranslationFieldViewTest.php
index d122c1300f3dbedfd7641ae3770c34c9aa003938..78b3b25ead54535dea9622b91b5d26cf80a0541f 100644
--- a/core/modules/taxonomy/tests/src/Functional/TermTranslationFieldViewTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/TermTranslationFieldViewTest.php
@@ -39,7 +39,7 @@ class TermTranslationFieldViewTest extends TaxonomyTestBase {
    *
    * @var array
    */
-  public static $modules = ['language', 'content_translation', 'taxonomy'];
+  protected static $modules = ['language', 'content_translation', 'taxonomy'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/taxonomy/tests/src/Functional/TermTranslationTest.php b/core/modules/taxonomy/tests/src/Functional/TermTranslationTest.php
index 5b3121485b11179bb56860f6f603f6418b74e431..5e0127248cdbcad74a676509c7589ccabb48c4cf 100644
--- a/core/modules/taxonomy/tests/src/Functional/TermTranslationTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/TermTranslationTest.php
@@ -36,7 +36,7 @@ class TermTranslationTest extends TaxonomyTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['taxonomy', 'language', 'content_translation'];
+  protected static $modules = ['taxonomy', 'language', 'content_translation'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/taxonomy/tests/src/Functional/TermTranslationUITest.php b/core/modules/taxonomy/tests/src/Functional/TermTranslationUITest.php
index 5c5cb5094e8be54bec72a449f033cad227e40625..674d31a7276f30a6449e1f24af8855b28ec4899e 100644
--- a/core/modules/taxonomy/tests/src/Functional/TermTranslationUITest.php
+++ b/core/modules/taxonomy/tests/src/Functional/TermTranslationUITest.php
@@ -26,7 +26,7 @@ class TermTranslationUITest extends ContentTranslationUITestBase {
    *
    * @var array
    */
-  public static $modules = ['language', 'content_translation', 'taxonomy'];
+  protected static $modules = ['language', 'content_translation', 'taxonomy'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyFieldFilterTest.php b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyFieldFilterTest.php
index 0a46388efe413e0780fe7950e48ecf6d50131e9b..b3f9daa9b04349d151f0ebec3a2dd16995ae6aa9 100644
--- a/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyFieldFilterTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyFieldFilterTest.php
@@ -22,7 +22,7 @@ class TaxonomyFieldFilterTest extends ViewTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['language', 'taxonomy', 'taxonomy_test_views', 'text', 'views', 'node'];
+  protected static $modules = ['language', 'taxonomy', 'taxonomy_test_views', 'text', 'views', 'node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyIndexTidUiTest.php b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyIndexTidUiTest.php
index d6f2696eccc90b4e4e081e4e4dff3db69fc8c67b..062e3d0acfbb8b1f4b494f81614b5cd6c7e3d30f 100644
--- a/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyIndexTidUiTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyIndexTidUiTest.php
@@ -36,7 +36,7 @@ class TaxonomyIndexTidUiTest extends UITestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'taxonomy', 'views', 'views_ui', 'taxonomy_test_views'];
+  protected static $modules = ['node', 'taxonomy', 'views', 'views_ui', 'taxonomy_test_views'];
 
   /**
    * A nested array of \Drupal\taxonomy\TermInterface objects.
diff --git a/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyParentUITest.php b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyParentUITest.php
index 3f9e2a1d017c99b5bad718349d47ad7273305e1e..91d3d68e88a6817b19ff6f0e0a38dfcdb48a6ee2 100644
--- a/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyParentUITest.php
+++ b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyParentUITest.php
@@ -30,7 +30,7 @@ class TaxonomyParentUITest extends UITestBase {
    *
    * @var array
    */
-  public static $modules = ['taxonomy', 'taxonomy_test_views'];
+  protected static $modules = ['taxonomy', 'taxonomy_test_views'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTermArgumentDepthTest.php b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTermArgumentDepthTest.php
index d3dae76ac5d74d1d5eaccb47061d44633c3808fb..a73da29bfed7c8f16cf00b725ea9acca1b46c7d7 100644
--- a/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTermArgumentDepthTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTermArgumentDepthTest.php
@@ -12,7 +12,7 @@ class TaxonomyTermArgumentDepthTest extends TaxonomyTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['taxonomy', 'taxonomy_test_views', 'views', 'node'];
+  protected static $modules = ['taxonomy', 'taxonomy_test_views', 'views', 'node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTermFilterDepthTest.php b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTermFilterDepthTest.php
index b21a8761738fca422e1c96c35953ce779d97779e..8c1b9b54e4b454935a30fe8becb4de59db0a119b 100644
--- a/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTermFilterDepthTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTermFilterDepthTest.php
@@ -14,7 +14,7 @@ class TaxonomyTermFilterDepthTest extends TaxonomyTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['taxonomy', 'taxonomy_test_views', 'views', 'node'];
+  protected static $modules = ['taxonomy', 'taxonomy_test_views', 'views', 'node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTermViewTest.php b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTermViewTest.php
index 1aa9ee30680211ce96f2eb6f23d9ef7fa4228736..9e69ca3c1881d265896d89dfc7c6ebd32f951220 100644
--- a/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTermViewTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTermViewTest.php
@@ -21,7 +21,7 @@ class TaxonomyTermViewTest extends TaxonomyTestBase {
    *
    * @var array
    */
-  public static $modules = ['taxonomy', 'views'];
+  protected static $modules = ['taxonomy', 'views'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTestBase.php b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTestBase.php
index bd89619b7b73233d90408ab1d3a2c87c5680ee40..8b914be758d1300223e196521009ecfa472fa902 100644
--- a/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTestBase.php
+++ b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTestBase.php
@@ -22,7 +22,7 @@ abstract class TaxonomyTestBase extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = ['taxonomy', 'taxonomy_test_views'];
+  protected static $modules = ['taxonomy', 'taxonomy_test_views'];
 
   /**
    * Stores the nodes used for the different tests.
diff --git a/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyVocabularyArgumentTest.php b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyVocabularyArgumentTest.php
index 08e49264c5bda49ce9067783d344ed1e1e38d5ef..e9cfe225bb844b6f0b9d44e8d1120c44474aef94 100644
--- a/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyVocabularyArgumentTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyVocabularyArgumentTest.php
@@ -14,7 +14,7 @@ class TaxonomyVocabularyArgumentTest extends TaxonomyTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['taxonomy', 'taxonomy_test_views', 'views'];
+  protected static $modules = ['taxonomy', 'taxonomy_test_views', 'views'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/taxonomy/tests/src/Functional/VocabularyLanguageTest.php b/core/modules/taxonomy/tests/src/Functional/VocabularyLanguageTest.php
index cdc673f52f5f84859703da0978189d0d9dd85871..c3fb9c69b08e83172f7c586445a70c784f9ae211 100644
--- a/core/modules/taxonomy/tests/src/Functional/VocabularyLanguageTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/VocabularyLanguageTest.php
@@ -12,7 +12,7 @@
  */
 class VocabularyLanguageTest extends TaxonomyTestBase {
 
-  public static $modules = ['language'];
+  protected static $modules = ['language'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/taxonomy/tests/src/Functional/VocabularyPermissionsTest.php b/core/modules/taxonomy/tests/src/Functional/VocabularyPermissionsTest.php
index 634d859d049abd32b6cdc8173134d48bd10dda07..a7fac48138e37268c51e9d75916a1fbac0c298e3 100644
--- a/core/modules/taxonomy/tests/src/Functional/VocabularyPermissionsTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/VocabularyPermissionsTest.php
@@ -16,7 +16,7 @@ class VocabularyPermissionsTest extends TaxonomyTestBase {
    *
    * @var array
    */
-  public static $modules = ['help'];
+  protected static $modules = ['help'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/taxonomy/tests/src/Functional/VocabularySerializationTest.php b/core/modules/taxonomy/tests/src/Functional/VocabularySerializationTest.php
index 252679193d496e55cc76490b9b403466b05ca72c..2386bfb5d3e7e2e883981c090457c09d85ad4b31 100644
--- a/core/modules/taxonomy/tests/src/Functional/VocabularySerializationTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/VocabularySerializationTest.php
@@ -21,7 +21,7 @@ class VocabularySerializationTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['taxonomy', 'vocabulary_serialization_test'];
+  protected static $modules = ['taxonomy', 'vocabulary_serialization_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/taxonomy/tests/src/Functional/VocabularyTranslationTest.php b/core/modules/taxonomy/tests/src/Functional/VocabularyTranslationTest.php
index efd91519d5428f8dda8a638a56b51b9271459373..d9990edd41ced7b248e9e40a3d5e3f302788d591 100644
--- a/core/modules/taxonomy/tests/src/Functional/VocabularyTranslationTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/VocabularyTranslationTest.php
@@ -12,7 +12,7 @@ class VocabularyTranslationTest extends TaxonomyTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['content_translation', 'language'];
+  protected static $modules = ['content_translation', 'language'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/taxonomy/tests/src/Kernel/Migrate/MigrateTaxonomyConfigsTest.php b/core/modules/taxonomy/tests/src/Kernel/Migrate/MigrateTaxonomyConfigsTest.php
index 22665b2991e260bb2de4bb714b8baf9b4f55ab2d..4abdfae1762f1d4125e451a941a7950dd25d4321 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Migrate/MigrateTaxonomyConfigsTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/MigrateTaxonomyConfigsTest.php
@@ -17,7 +17,7 @@ class MigrateTaxonomyConfigsTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['taxonomy'];
+  protected static $modules = ['taxonomy'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/taxonomy/tests/src/Kernel/Migrate/MigrateTaxonomyTermStubTest.php b/core/modules/taxonomy/tests/src/Kernel/Migrate/MigrateTaxonomyTermStubTest.php
index 4b95882fa5272508efa0e2e66f7731153da14fb2..44bb1b87a6912d3c47741830e399386b0139df0a 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Migrate/MigrateTaxonomyTermStubTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/MigrateTaxonomyTermStubTest.php
@@ -20,7 +20,7 @@ class MigrateTaxonomyTermStubTest extends MigrateDrupalTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['taxonomy', 'text', 'taxonomy_term_stub_test'];
+  protected static $modules = ['taxonomy', 'text', 'taxonomy_term_stub_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/taxonomy/tests/src/Kernel/Migrate/TaxonomyTermDeriverTest.php b/core/modules/taxonomy/tests/src/Kernel/Migrate/TaxonomyTermDeriverTest.php
index 53dad583cd78edb7c67a8139bb2e65f473e9e146..2a5fc5d201ca72305d44a8d0359443ced0f7e1b5 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Migrate/TaxonomyTermDeriverTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/TaxonomyTermDeriverTest.php
@@ -11,7 +11,7 @@
  */
 class TaxonomyTermDeriverTest extends MigrateDrupal7TestBase {
 
-  public static $modules = ['taxonomy', 'text'];
+  protected static $modules = ['taxonomy', 'text'];
 
   /**
    * Tests fields exist in  process pipeline for term migrations.
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 9b6591e1939a794a4110a0e8dbdffe475e2fae53..10aed218a41daee99f0247785559299c1ee7b098 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTaxonomyTermTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTaxonomyTermTest.php
@@ -15,7 +15,7 @@ class MigrateTaxonomyTermTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['taxonomy'];
+  protected static $modules = ['taxonomy'];
 
   /**
    * {@inheritdoc}
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 e8fc98cd017541f183c0905eb01c062a2dacaa25..233ceff5c4e101d370a7f27d2e7d0552c1112b97 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTaxonomyVocabularyTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTaxonomyVocabularyTest.php
@@ -15,7 +15,7 @@ class MigrateTaxonomyVocabularyTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['taxonomy'];
+  protected static $modules = ['taxonomy'];
 
   /**
    * {@inheritdoc}
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 51489beaf5da3573d2c5ea36148cc19da794e439..edf1e20db38bb53e54367124df7938ad2023f37d 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTaxonomyVocabularyTranslationTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTaxonomyVocabularyTranslationTest.php
@@ -14,7 +14,7 @@ class MigrateTaxonomyVocabularyTranslationTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'config_translation',
     'language',
     'taxonomy',
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 99f6b71767ea8df4e0816157117739b8efae4187..3b66a94fb445c4f200cb6f92aa56b27d7b87d7ed 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTermLocalizedTranslationTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTermLocalizedTranslationTest.php
@@ -16,7 +16,7 @@ class MigrateTermLocalizedTranslationTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'content_translation',
     'language',
     'menu_ui',
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 cb17ce18d4102acfd67e5cf8c3064a7fcdf5d704..cb06411171be2026fa6c3c0ec45a77986fbfc34a 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTermNodeComplete.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTermNodeComplete.php
@@ -16,7 +16,7 @@ class MigrateTermNodeComplete extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'content_translation',
     'language',
     'menu_ui',
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 33f4e33b473d1ef08df4d8bef22b2076289b5a13..c61a50c6fe93b45eb607eb1adbe1d23194ddcd0c 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTermNodeRevisionTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTermNodeRevisionTest.php
@@ -14,7 +14,7 @@ class MigrateTermNodeRevisionTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['taxonomy', 'menu_ui'];
+  protected static $modules = ['taxonomy', 'menu_ui'];
 
   /**
    * {@inheritdoc}
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 7c8b17e7cc6f3c9551c47a7e20d909b12563e8a6..a49054b5dfe2faed823b5329d92bad280429fe0c 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTermNodeTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTermNodeTest.php
@@ -15,7 +15,7 @@ class MigrateTermNodeTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['taxonomy', 'menu_ui'];
+  protected static $modules = ['taxonomy', 'menu_ui'];
 
   /**
    * {@inheritdoc}
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 1b4ecc611900005e01b382e366c7e94664f63960..aff7d0100b4e7d5c76707265d6d854f749e67320 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTermNodeTranslationTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTermNodeTranslationTest.php
@@ -15,7 +15,7 @@ class MigrateTermNodeTranslationTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'config_translation',
     'content_translation',
     'language',
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 0f5c6fc2162b9fb235f252989e237e389bd52e01..8a40b9e7b8f5f9cc9aa831b5fc1170713132fd92 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateVocabularyEntityDisplayTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateVocabularyEntityDisplayTest.php
@@ -15,7 +15,7 @@ class MigrateVocabularyEntityDisplayTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['field', 'taxonomy', 'menu_ui'];
+  protected static $modules = ['field', 'taxonomy', 'menu_ui'];
 
   /**
    * {@inheritdoc}
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 990316a316a12f85b9c777c4d05a92026b09d0f3..5024973bb02890b66363239f1e80daff02220da9 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateVocabularyEntityFormDisplayTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateVocabularyEntityFormDisplayTest.php
@@ -15,7 +15,7 @@ class MigrateVocabularyEntityFormDisplayTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['taxonomy', 'menu_ui'];
+  protected static $modules = ['taxonomy', 'menu_ui'];
 
   /**
    * {@inheritdoc}
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 0c3404d9d61cf0f36667f32ccac526ddbe7e4608..1d4dfc9181965ca2ef1a560d8c21c3ad6edea510 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateVocabularyFieldInstanceTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateVocabularyFieldInstanceTest.php
@@ -15,7 +15,7 @@ class MigrateVocabularyFieldInstanceTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['taxonomy', 'menu_ui'];
+  protected static $modules = ['taxonomy', 'menu_ui'];
 
   /**
    * {@inheritdoc}
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 6e11c36c6acdd6847d0d4c1f39f30d30a43a580a..c9ed93ae880a6bda2ca43ee414e59f18f4f7a689 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateVocabularyFieldTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateVocabularyFieldTest.php
@@ -15,7 +15,7 @@ class MigrateVocabularyFieldTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['taxonomy', 'menu_ui'];
+  protected static $modules = ['taxonomy', 'menu_ui'];
 
   /**
    * {@inheritdoc}
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 1526aecbe976f253d2b3de4eec09f7e428d49ce2..2c3ff4a1e06f688fcedf211539cbe90c155719c0 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateNodeTaxonomyTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateNodeTaxonomyTest.php
@@ -11,7 +11,7 @@
  */
 class MigrateNodeTaxonomyTest extends MigrateDrupal7TestBase {
 
-  public static $modules = [
+  protected static $modules = [
     'comment',
     'datetime',
     'image',
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 75ecd45a74e7779ab31749b2818ee70b65c5c9d6..de22f1db94d8eecb49f56e78638831d28fcbe238 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyTermTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyTermTest.php
@@ -13,7 +13,7 @@
  */
 class MigrateTaxonomyTermTest extends MigrateDrupal7TestBase {
 
-  public static $modules = [
+  protected static $modules = [
     'comment',
     'content_translation',
     'datetime',
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 cfcbe71e9220540bcf2579e088dae24f6056ec78..89390302a48eaeede61389c6e16d83fa8a8d526c 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyTermTranslationTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyTermTranslationTest.php
@@ -16,7 +16,7 @@ class MigrateTaxonomyTermTranslationTest extends MigrateDrupal7TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'comment',
     'content_translation',
     'datetime',
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 24e843d473158032f1f856ff2bf9e7943708c8e9..2a94e8ec6f206309f7067a549efaa5fcbf8aba02 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyVocabularyTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyVocabularyTest.php
@@ -16,7 +16,7 @@ class MigrateTaxonomyVocabularyTest extends MigrateDrupal7TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['taxonomy', 'text'];
+  protected static $modules = ['taxonomy', 'text'];
 
   /**
    * {@inheritdoc}
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 6796706d2a01df3eb4c519fbd9662f27804632b4..b88b01e0fac717cef05035ce0b2a529cb535f0a2 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyVocabularyTranslationTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyVocabularyTranslationTest.php
@@ -14,7 +14,7 @@ class MigrateTaxonomyVocabularyTranslationTest extends MigrateDrupal7TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'config_translation',
     'language',
     'taxonomy',
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 c7acf32efe96765822313f1a15f4cff3166527ea..05122fdb7b1c860b19c0c6414d3f4980e2c22c2f 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTermLocalizedTranslationTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTermLocalizedTranslationTest.php
@@ -16,7 +16,7 @@ class MigrateTermLocalizedTranslationTest extends MigrateDrupal7TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'content_translation',
     'language',
     'taxonomy',
diff --git a/core/modules/taxonomy/tests/src/Kernel/PendingRevisionTest.php b/core/modules/taxonomy/tests/src/Kernel/PendingRevisionTest.php
index c6cffad893e277abbf92c81a7adfae145bdbccad..70c259d9c7d83ef1a04f1051d8dedb1843a6807c 100644
--- a/core/modules/taxonomy/tests/src/Kernel/PendingRevisionTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/PendingRevisionTest.php
@@ -20,7 +20,7 @@ class PendingRevisionTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['taxonomy', 'node', 'user', 'text', 'field', 'system'];
+  protected static $modules = ['taxonomy', 'node', 'user', 'text', 'field', 'system'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/TermLocalizedTranslationTest.php b/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/TermLocalizedTranslationTest.php
index 35888a99c2ad224eb1389822aac275383541b90a..f6906dca978c00ed3ae99400a89e8eb7534a5e5d 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/TermLocalizedTranslationTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/TermLocalizedTranslationTest.php
@@ -15,7 +15,7 @@ class TermLocalizedTranslationTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['taxonomy', 'migrate_drupal'];
+  protected static $modules = ['taxonomy', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/TermNodeTest.php b/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/TermNodeTest.php
index 3084acffae6de0079fb6177b9eafcb549c03c314..16a365a2afad88abb7b344f10dda1fc9936ae96b 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/TermNodeTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/TermNodeTest.php
@@ -15,7 +15,7 @@ class TermNodeTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['taxonomy', 'migrate_drupal'];
+  protected static $modules = ['taxonomy', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/TermSourceWithVocabularyFilterTest.php b/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/TermSourceWithVocabularyFilterTest.php
index 42fa75d0fff2cab4f8fccd88a8db0f76a5de69c4..bb60f9c4b9f6c9bc503d7a4bda1185cbcb06c983 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/TermSourceWithVocabularyFilterTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/TermSourceWithVocabularyFilterTest.php
@@ -13,7 +13,7 @@ class TermSourceWithVocabularyFilterTest extends TermTest {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['taxonomy', 'migrate_drupal'];
+  protected static $modules = ['taxonomy', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/TermTest.php b/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/TermTest.php
index d1ac238ae26fdf4bff348c1ede6c7b9a1433f8d0..c0b50cb0f670f762ac1c170eaf21fb2b9d97a50b 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/TermTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/TermTest.php
@@ -15,7 +15,7 @@ class TermTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['taxonomy', 'migrate_drupal'];
+  protected static $modules = ['taxonomy', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/TermTranslationTest.php b/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/TermTranslationTest.php
index af69e30e3740b69bbc33993150419b4eb50daadd..cafbc813b95f0b3e2b22127891233cb797d4e25a 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/TermTranslationTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/TermTranslationTest.php
@@ -15,7 +15,7 @@ class TermTranslationTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['taxonomy', 'migrate_drupal'];
+  protected static $modules = ['taxonomy', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/VocabularyPerTypeTest.php b/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/VocabularyPerTypeTest.php
index d5f27274b04fec2425bc13ae792e5950655de341..bce46846d4371eecdc8a72d00126a3fa68cc6612 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/VocabularyPerTypeTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/VocabularyPerTypeTest.php
@@ -16,7 +16,7 @@ class VocabularyPerTypeTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['taxonomy', 'migrate_drupal'];
+  protected static $modules = ['taxonomy', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/VocabularyTest.php b/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/VocabularyTest.php
index a98b2985ed587a417478b2f5678999e99daaf5ec..4b81b6c3fb87dcbc175142d81018dd840fc80c55 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/VocabularyTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/VocabularyTest.php
@@ -16,7 +16,7 @@ class VocabularyTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['taxonomy', 'migrate_drupal'];
+  protected static $modules = ['taxonomy', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/VocabularyTranslationTest.php b/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/VocabularyTranslationTest.php
index f466947191a5f09bd4162e629ca9082186b05e39..58a5c2dc7982c0263b5459a683b91a8b4cd2bc63 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/VocabularyTranslationTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/VocabularyTranslationTest.php
@@ -15,7 +15,7 @@ class VocabularyTranslationTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['taxonomy', 'migrate_drupal'];
+  protected static $modules = ['taxonomy', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/TermEntityTranslationTest.php b/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/TermEntityTranslationTest.php
index 3a9145171371f1dc3269f3d5e3a1041714838ce1..d8c48e840f3be3401a6195de3ec53c5cdf367c72 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/TermEntityTranslationTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/TermEntityTranslationTest.php
@@ -15,7 +15,7 @@ class TermEntityTranslationTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['taxonomy', 'migrate_drupal'];
+  protected static $modules = ['taxonomy', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/TermLocalizedTranslationTest.php b/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/TermLocalizedTranslationTest.php
index a62f37b327ef7ecefcd92028111ea28022dba4de..7d798a202f0063ddfde334f0a29af95e75fd40fe 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/TermLocalizedTranslationTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/TermLocalizedTranslationTest.php
@@ -13,7 +13,7 @@ class TermLocalizedTranslationTest extends TermTest {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['taxonomy', 'migrate_drupal'];
+  protected static $modules = ['taxonomy', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/TermSourceWithVocabularyFilterTest.php b/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/TermSourceWithVocabularyFilterTest.php
index 671bb554ed533e74fa71c31232e0f9b426254faa..274d586d741961ec1451da80a86b88897d1f932e 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/TermSourceWithVocabularyFilterTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/TermSourceWithVocabularyFilterTest.php
@@ -13,7 +13,7 @@ class TermSourceWithVocabularyFilterTest extends TermTest {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['taxonomy', 'migrate_drupal'];
+  protected static $modules = ['taxonomy', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/TermTest.php b/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/TermTest.php
index 0466d750e9d0d79bd0ea0fbec9b40a63f30d02c0..2c2365b26c54acffdf2d4bfc25831c59157a9858 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/TermTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/TermTest.php
@@ -15,7 +15,7 @@ class TermTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['taxonomy', 'migrate_drupal'];
+  protected static $modules = ['taxonomy', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/VocabularyTest.php b/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/VocabularyTest.php
index 4d1975ceb418c5a4e779048c126f9dc72a24d876..fb78c547d738ac2a93992303ad9fc8db4d421cfc 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/VocabularyTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/VocabularyTest.php
@@ -15,7 +15,7 @@ class VocabularyTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['taxonomy', 'migrate_drupal'];
+  protected static $modules = ['taxonomy', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/VocabularyTranslationTest.php b/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/VocabularyTranslationTest.php
index c9500592083d219881eee9a3dfd49c06a3364f1c..c4c8168c666a63881c9cc4f5c5f06866be0f0099 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/VocabularyTranslationTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/VocabularyTranslationTest.php
@@ -15,7 +15,7 @@ class VocabularyTranslationTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['taxonomy', 'migrate_drupal'];
+  protected static $modules = ['taxonomy', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/taxonomy/tests/src/Kernel/TermEntityReferenceTest.php b/core/modules/taxonomy/tests/src/Kernel/TermEntityReferenceTest.php
index 701322849057aeda265df1b02f8c26b4aece9ddb..00e21a15d966b740cf66acb9a05fc5785ac55203 100644
--- a/core/modules/taxonomy/tests/src/Kernel/TermEntityReferenceTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/TermEntityReferenceTest.php
@@ -18,7 +18,7 @@ class TermEntityReferenceTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'entity_test',
     'field',
     'system',
diff --git a/core/modules/taxonomy/tests/src/Kernel/TermHierarchyValidationTest.php b/core/modules/taxonomy/tests/src/Kernel/TermHierarchyValidationTest.php
index 24983e077370c935a41c103ee46452da7e6b4398..2523bc9d008b5401797509753088d8de595ad39b 100644
--- a/core/modules/taxonomy/tests/src/Kernel/TermHierarchyValidationTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/TermHierarchyValidationTest.php
@@ -17,7 +17,7 @@ class TermHierarchyValidationTest extends EntityKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['taxonomy'];
+  protected static $modules = ['taxonomy'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/taxonomy/tests/src/Kernel/TermKernelTest.php b/core/modules/taxonomy/tests/src/Kernel/TermKernelTest.php
index 0350e2998d498a3376bdb6891301aba947c1389c..f641bed3381a0a300cd9095f5372b9e85d84da43 100644
--- a/core/modules/taxonomy/tests/src/Kernel/TermKernelTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/TermKernelTest.php
@@ -18,7 +18,7 @@ class TermKernelTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['filter', 'taxonomy', 'text', 'user'];
+  protected static $modules = ['filter', 'taxonomy', 'text', 'user'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/taxonomy/tests/src/Kernel/TermValidationTest.php b/core/modules/taxonomy/tests/src/Kernel/TermValidationTest.php
index f71e91ba40fbf8bd91d216f98dec3f7aaa84809d..30f1c2e1077f34986827785cde3dd52a06f766da 100644
--- a/core/modules/taxonomy/tests/src/Kernel/TermValidationTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/TermValidationTest.php
@@ -17,7 +17,7 @@ class TermValidationTest extends EntityKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['taxonomy'];
+  protected static $modules = ['taxonomy'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyFieldTidTest.php b/core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyFieldTidTest.php
index b3a58b2612ba1b0b196403ca343126a0126697e6..ef8d9a73e1de82f7d9d2cf5615cd71ce0e499957 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyFieldTidTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyFieldTidTest.php
@@ -21,7 +21,7 @@ class TaxonomyFieldTidTest extends ViewsKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['taxonomy', 'taxonomy_test_views', 'text', 'filter'];
+  protected static $modules = ['taxonomy', 'taxonomy_test_views', 'text', 'filter'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyFieldVidTest.php b/core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyFieldVidTest.php
index 77d9b326b3a731168b1b89d4044a15217e7b1c5a..ef644bca4d0f30fc8cc9939284d0b86c452a0d23 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyFieldVidTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyFieldVidTest.php
@@ -24,7 +24,7 @@ class TaxonomyFieldVidTest extends ViewsKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['taxonomy', 'taxonomy_test_views', 'text', 'filter'];
+  protected static $modules = ['taxonomy', 'taxonomy_test_views', 'text', 'filter'];
 
   /**
    * Views used by this test.
diff --git a/core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyTestBase.php b/core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyTestBase.php
index 3512b7760769c0a1bb0f89a005b17fa6954c416a..a42644c43e15948db572213aa9bf2be4b6bb1c6c 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyTestBase.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyTestBase.php
@@ -34,7 +34,7 @@ abstract class TaxonomyTestBase extends ViewsKernelTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'taxonomy',
     'taxonomy_test_views',
     'text',
diff --git a/core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyViewsFieldAccessTest.php b/core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyViewsFieldAccessTest.php
index b2c1e5d58ae7607fe1a9f475d0a9979a009b90c6..f567314c8ccede2680d9397cfce925e9b44b32f1 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyViewsFieldAccessTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyViewsFieldAccessTest.php
@@ -16,7 +16,7 @@ class TaxonomyViewsFieldAccessTest extends FieldFieldAccessTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['taxonomy', 'text', 'entity_test'];
+  protected static $modules = ['taxonomy', 'text', 'entity_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/telephone/tests/src/Functional/TelephoneFieldTest.php b/core/modules/telephone/tests/src/Functional/TelephoneFieldTest.php
index 97bd406ea221a28961144b01a1d04f4092acef0b..e066012fb3e2ef5ca95276c24e2ea449dea6708f 100644
--- a/core/modules/telephone/tests/src/Functional/TelephoneFieldTest.php
+++ b/core/modules/telephone/tests/src/Functional/TelephoneFieldTest.php
@@ -18,7 +18,7 @@ class TelephoneFieldTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'field',
     'node',
     'telephone',
diff --git a/core/modules/telephone/tests/src/Kernel/TelephoneItemTest.php b/core/modules/telephone/tests/src/Kernel/TelephoneItemTest.php
index e5c9e7378ea1bd642100a6dec5b241c7a44fd497..7e1f1036b6a24d1ce180f1bf4a339bd9eedfe52d 100644
--- a/core/modules/telephone/tests/src/Kernel/TelephoneItemTest.php
+++ b/core/modules/telephone/tests/src/Kernel/TelephoneItemTest.php
@@ -21,7 +21,7 @@ class TelephoneItemTest extends FieldKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['telephone'];
+  protected static $modules = ['telephone'];
 
   protected function setUp(): void {
     parent::setUp();
diff --git a/core/modules/text/tests/src/FunctionalJavascript/TextareaWithSummaryTest.php b/core/modules/text/tests/src/FunctionalJavascript/TextareaWithSummaryTest.php
index 53905928adaed05d68da9c921ea477c273724378..df8842714459a2f91fba59fc964dea1a9db04db0 100644
--- a/core/modules/text/tests/src/FunctionalJavascript/TextareaWithSummaryTest.php
+++ b/core/modules/text/tests/src/FunctionalJavascript/TextareaWithSummaryTest.php
@@ -15,7 +15,7 @@ class TextareaWithSummaryTest extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['text', 'node'];
+  protected static $modules = ['text', 'node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/text/tests/src/Kernel/TextFormatterTest.php b/core/modules/text/tests/src/Kernel/TextFormatterTest.php
index 301a3f4124a7bdf215e64b6532a85586b402feee..972fa9fa827954c51f420fced5295376272410f8 100644
--- a/core/modules/text/tests/src/Kernel/TextFormatterTest.php
+++ b/core/modules/text/tests/src/Kernel/TextFormatterTest.php
@@ -34,7 +34,7 @@ class TextFormatterTest extends EntityKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['text'];
+  protected static $modules = ['text'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/text/tests/src/Kernel/TextSummaryTest.php b/core/modules/text/tests/src/Kernel/TextSummaryTest.php
index 4879e65f3d258baf39cc0a9c8eb1aa09c3636459..b95ae19ab771f81939b1de5a79a1808abc853429 100644
--- a/core/modules/text/tests/src/Kernel/TextSummaryTest.php
+++ b/core/modules/text/tests/src/Kernel/TextSummaryTest.php
@@ -20,7 +20,7 @@ class TextSummaryTest extends KernelTestBase {
 
   use UserCreationTrait;
 
-  public static $modules = [
+  protected static $modules = [
     'system',
     'user',
     'filter',
diff --git a/core/modules/text/tests/src/Kernel/TextWithSummaryItemTest.php b/core/modules/text/tests/src/Kernel/TextWithSummaryItemTest.php
index fc34bc91dbcdeed5261795ddc261e80e21139006..a8745f3eb18646697b19a4a43c699957ce9a8aca 100644
--- a/core/modules/text/tests/src/Kernel/TextWithSummaryItemTest.php
+++ b/core/modules/text/tests/src/Kernel/TextWithSummaryItemTest.php
@@ -21,7 +21,7 @@ class TextWithSummaryItemTest extends FieldKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['filter'];
+  protected static $modules = ['filter'];
 
   /**
    * Field storage entity.
diff --git a/core/modules/toolbar/tests/src/Functional/ToolbarAdminMenuTest.php b/core/modules/toolbar/tests/src/Functional/ToolbarAdminMenuTest.php
index 9720627ac1e9db5ca65ba79e5cba626a0b18d9bc..130e108e2463aa4021efcc26a88cee83b36553d1 100644
--- a/core/modules/toolbar/tests/src/Functional/ToolbarAdminMenuTest.php
+++ b/core/modules/toolbar/tests/src/Functional/ToolbarAdminMenuTest.php
@@ -54,7 +54,7 @@ class ToolbarAdminMenuTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'block', 'menu_ui', 'user', 'taxonomy', 'toolbar', 'language', 'test_page_test', 'locale'];
+  protected static $modules = ['node', 'block', 'menu_ui', 'user', 'taxonomy', 'toolbar', 'language', 'test_page_test', 'locale'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/toolbar/tests/src/Functional/ToolbarCacheContextsTest.php b/core/modules/toolbar/tests/src/Functional/ToolbarCacheContextsTest.php
index a5a141f977198940f548fa4cdeccd3c135848e5d..37f2e3d309c94d58d74cfd096028685c147c1152 100644
--- a/core/modules/toolbar/tests/src/Functional/ToolbarCacheContextsTest.php
+++ b/core/modules/toolbar/tests/src/Functional/ToolbarCacheContextsTest.php
@@ -21,7 +21,7 @@ class ToolbarCacheContextsTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['toolbar', 'test_page_test'];
+  protected static $modules = ['toolbar', 'test_page_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/toolbar/tests/src/Functional/ToolbarHookToolbarTest.php b/core/modules/toolbar/tests/src/Functional/ToolbarHookToolbarTest.php
index ba2de148059651161cc8370334d3c06ba9b34197..c3a6a724bfcda0e129ee1e1a7f57ebaed5ca3fc9 100644
--- a/core/modules/toolbar/tests/src/Functional/ToolbarHookToolbarTest.php
+++ b/core/modules/toolbar/tests/src/Functional/ToolbarHookToolbarTest.php
@@ -23,7 +23,7 @@ class ToolbarHookToolbarTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['toolbar', 'toolbar_test', 'test_page_test'];
+  protected static $modules = ['toolbar', 'toolbar_test', 'test_page_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/toolbar/tests/src/Functional/ToolbarMenuTranslationTest.php b/core/modules/toolbar/tests/src/Functional/ToolbarMenuTranslationTest.php
index 1d576c62995852b435d747d5f6ec6c7f6285a969..0b13c8bd5032cce4c7cef3d348f21f69b1faca3a 100644
--- a/core/modules/toolbar/tests/src/Functional/ToolbarMenuTranslationTest.php
+++ b/core/modules/toolbar/tests/src/Functional/ToolbarMenuTranslationTest.php
@@ -23,7 +23,7 @@ class ToolbarMenuTranslationTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['toolbar', 'toolbar_test', 'locale', 'locale_test'];
+  protected static $modules = ['toolbar', 'toolbar_test', 'locale', 'locale_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/toolbar/tests/src/FunctionalJavascript/ToolbarIntegrationTest.php b/core/modules/toolbar/tests/src/FunctionalJavascript/ToolbarIntegrationTest.php
index 8ee38bdb16a5cb2cae53e8f44c07f93e70a5510f..a90a7947549f801e90f92828761830abe71cee5e 100644
--- a/core/modules/toolbar/tests/src/FunctionalJavascript/ToolbarIntegrationTest.php
+++ b/core/modules/toolbar/tests/src/FunctionalJavascript/ToolbarIntegrationTest.php
@@ -14,7 +14,7 @@ class ToolbarIntegrationTest extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['toolbar', 'node'];
+  protected static $modules = ['toolbar', 'node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/tour/tests/src/Functional/Hal/TourHalJsonAnonTest.php b/core/modules/tour/tests/src/Functional/Hal/TourHalJsonAnonTest.php
index b4e37290cd080ffff190ec028ab94adc9caa35f1..14ed83c28bdee941b35fd6c088ab7778c8c5c4b7 100644
--- a/core/modules/tour/tests/src/Functional/Hal/TourHalJsonAnonTest.php
+++ b/core/modules/tour/tests/src/Functional/Hal/TourHalJsonAnonTest.php
@@ -15,7 +15,7 @@ class TourHalJsonAnonTest extends TourResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/tour/tests/src/Functional/Hal/TourHalJsonBasicAuthTest.php b/core/modules/tour/tests/src/Functional/Hal/TourHalJsonBasicAuthTest.php
index 6d70a323db77fdb07c24cb8a6e1855b7d06c00f9..ce311eb90bafdd5fda5df8e059933fbff5b920a3 100644
--- a/core/modules/tour/tests/src/Functional/Hal/TourHalJsonBasicAuthTest.php
+++ b/core/modules/tour/tests/src/Functional/Hal/TourHalJsonBasicAuthTest.php
@@ -15,7 +15,7 @@ class TourHalJsonBasicAuthTest extends TourResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal', 'basic_auth'];
+  protected static $modules = ['hal', 'basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/tour/tests/src/Functional/Hal/TourHalJsonCookieTest.php b/core/modules/tour/tests/src/Functional/Hal/TourHalJsonCookieTest.php
index 43ea4ea1b4c24a0d3917f35e2aa6cacd688e4ebf..855cff3256701537628028270e762396eb493097 100644
--- a/core/modules/tour/tests/src/Functional/Hal/TourHalJsonCookieTest.php
+++ b/core/modules/tour/tests/src/Functional/Hal/TourHalJsonCookieTest.php
@@ -15,7 +15,7 @@ class TourHalJsonCookieTest extends TourResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/tour/tests/src/Functional/Rest/TourJsonBasicAuthTest.php b/core/modules/tour/tests/src/Functional/Rest/TourJsonBasicAuthTest.php
index bad2b4112b1d594e5d7f032454c5d2507c2d1bb1..89aeb274e92d0a6c16dc4a6dc68682fec3d9167d 100644
--- a/core/modules/tour/tests/src/Functional/Rest/TourJsonBasicAuthTest.php
+++ b/core/modules/tour/tests/src/Functional/Rest/TourJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class TourJsonBasicAuthTest extends TourResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/tour/tests/src/Functional/Rest/TourResourceTestBase.php b/core/modules/tour/tests/src/Functional/Rest/TourResourceTestBase.php
index b1a3b50e76d6346bdccff596e314331e88a56efc..dc866a6c9595f04bfd13207c364fd25f2eda1c89 100644
--- a/core/modules/tour/tests/src/Functional/Rest/TourResourceTestBase.php
+++ b/core/modules/tour/tests/src/Functional/Rest/TourResourceTestBase.php
@@ -10,7 +10,7 @@ abstract class TourResourceTestBase extends EntityResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['tour'];
+  protected static $modules = ['tour'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/tour/tests/src/Functional/Rest/TourXmlBasicAuthTest.php b/core/modules/tour/tests/src/Functional/Rest/TourXmlBasicAuthTest.php
index fca59e3ae90179d31329f6f36e9e438b432137bc..6828e1d0352bf69e1fee55a9b6869f24c299d19b 100644
--- a/core/modules/tour/tests/src/Functional/Rest/TourXmlBasicAuthTest.php
+++ b/core/modules/tour/tests/src/Functional/Rest/TourXmlBasicAuthTest.php
@@ -16,7 +16,7 @@ class TourXmlBasicAuthTest extends TourResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/tour/tests/src/Functional/TourCacheTagsTest.php b/core/modules/tour/tests/src/Functional/TourCacheTagsTest.php
index fb9faf4911476f3b56fb15912398d68a974be243..a9175c290cf4cfa69745241151746b8030e45090 100644
--- a/core/modules/tour/tests/src/Functional/TourCacheTagsTest.php
+++ b/core/modules/tour/tests/src/Functional/TourCacheTagsTest.php
@@ -18,7 +18,7 @@ class TourCacheTagsTest extends PageCacheTagsTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['tour', 'tour_test'];
+  protected static $modules = ['tour', 'tour_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/tour/tests/src/Functional/TourHelpPageTest.php b/core/modules/tour/tests/src/Functional/TourHelpPageTest.php
index 3dc10676f937dbb37ad165358d382884234b40e9..f7ceb9d9d305ec9e1e3021c103b5849151573e4f 100644
--- a/core/modules/tour/tests/src/Functional/TourHelpPageTest.php
+++ b/core/modules/tour/tests/src/Functional/TourHelpPageTest.php
@@ -16,7 +16,7 @@ class TourHelpPageTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['help', 'tour', 'locale', 'language'];
+  protected static $modules = ['help', 'tour', 'locale', 'language'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/tour/tests/src/Functional/TourTest.php b/core/modules/tour/tests/src/Functional/TourTest.php
index 37001e39affc788151a97b35f6920f37a32e32a6..b5453657df52a331672bdbf4bc2750c6bb82ef3d 100644
--- a/core/modules/tour/tests/src/Functional/TourTest.php
+++ b/core/modules/tour/tests/src/Functional/TourTest.php
@@ -18,7 +18,7 @@ class TourTest extends TourTestBasic {
    *
    * @var array
    */
-  public static $modules = ['block', 'tour', 'locale', 'language', 'tour_test'];
+  protected static $modules = ['block', 'tour', 'locale', 'language', 'tour_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/tour/tests/src/Kernel/TourPluginTest.php b/core/modules/tour/tests/src/Kernel/TourPluginTest.php
index e29eb87a7d92ae5197e406bf8c389335b791155f..1c1bd73640165f764e724ca364a0904d2de855bc 100644
--- a/core/modules/tour/tests/src/Kernel/TourPluginTest.php
+++ b/core/modules/tour/tests/src/Kernel/TourPluginTest.php
@@ -16,7 +16,7 @@ class TourPluginTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['tour'];
+  protected static $modules = ['tour'];
 
   /**
    * Stores the tour plugin manager.
diff --git a/core/modules/tracker/tests/src/Functional/TrackerNodeAccessTest.php b/core/modules/tracker/tests/src/Functional/TrackerNodeAccessTest.php
index 58e8643f3aab8baaeab9858dfa4fb64763c7d5a1..eb0f3dde10b59ccedcd53603deb576063921723c 100644
--- a/core/modules/tracker/tests/src/Functional/TrackerNodeAccessTest.php
+++ b/core/modules/tracker/tests/src/Functional/TrackerNodeAccessTest.php
@@ -21,7 +21,7 @@ class TrackerNodeAccessTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'comment', 'tracker', 'node_access_test'];
+  protected static $modules = ['node', 'comment', 'tracker', 'node_access_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/tracker/tests/src/Functional/TrackerTest.php b/core/modules/tracker/tests/src/Functional/TrackerTest.php
index 78f4522e4a2820751be2793ad08a810fa27e6154..a6c1d7c733d3e11cb6624747913f56f8547cf74d 100644
--- a/core/modules/tracker/tests/src/Functional/TrackerTest.php
+++ b/core/modules/tracker/tests/src/Functional/TrackerTest.php
@@ -29,7 +29,7 @@ class TrackerTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['block', 'comment', 'tracker', 'history', 'node_test'];
+  protected static $modules = ['block', 'comment', 'tracker', 'history', 'node_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/tracker/tests/src/Kernel/Migrate/d7/MigrateTrackerNodeTest.php b/core/modules/tracker/tests/src/Kernel/Migrate/d7/MigrateTrackerNodeTest.php
index 8729143be48ccfe2e74ece862211881c5dd7f219..45324245ceaac2912fa7ca32d7f1bb2bd2779847 100644
--- a/core/modules/tracker/tests/src/Kernel/Migrate/d7/MigrateTrackerNodeTest.php
+++ b/core/modules/tracker/tests/src/Kernel/Migrate/d7/MigrateTrackerNodeTest.php
@@ -15,7 +15,7 @@ class MigrateTrackerNodeTest extends MigrateDrupal7TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'menu_ui',
     'node',
     'text',
diff --git a/core/modules/tracker/tests/src/Kernel/Migrate/d7/MigrateTrackerSettingsTest.php b/core/modules/tracker/tests/src/Kernel/Migrate/d7/MigrateTrackerSettingsTest.php
index fbcd61e350e96c1e24f859cba0d3e8bb8ee839d4..4470a5d4eb66885b1a01619d29ffe7a76881f5ee 100644
--- a/core/modules/tracker/tests/src/Kernel/Migrate/d7/MigrateTrackerSettingsTest.php
+++ b/core/modules/tracker/tests/src/Kernel/Migrate/d7/MigrateTrackerSettingsTest.php
@@ -11,7 +11,7 @@
  */
 class MigrateTrackerSettingsTest extends MigrateDrupal7TestBase {
 
-  public static $modules = ['tracker'];
+  protected static $modules = ['tracker'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/tracker/tests/src/Kernel/Migrate/d7/MigrateTrackerUserTest.php b/core/modules/tracker/tests/src/Kernel/Migrate/d7/MigrateTrackerUserTest.php
index f4291f19d67b7aab83e82b69dd675de5385fc35d..45ee8a0b601e77da428d509e7c62d88b89f27106 100644
--- a/core/modules/tracker/tests/src/Kernel/Migrate/d7/MigrateTrackerUserTest.php
+++ b/core/modules/tracker/tests/src/Kernel/Migrate/d7/MigrateTrackerUserTest.php
@@ -15,7 +15,7 @@ class MigrateTrackerUserTest extends MigrateDrupal7TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'menu_ui',
     'node',
     'text',
diff --git a/core/modules/tracker/tests/src/Kernel/Plugin/migrate/source/d7/TrackerNodeTest.php b/core/modules/tracker/tests/src/Kernel/Plugin/migrate/source/d7/TrackerNodeTest.php
index 28d377261498fcf1bfb582dc9d4d370d27a43730..9f1c0978a0a6138f2471db5e4b8a30fe23364ec8 100644
--- a/core/modules/tracker/tests/src/Kernel/Plugin/migrate/source/d7/TrackerNodeTest.php
+++ b/core/modules/tracker/tests/src/Kernel/Plugin/migrate/source/d7/TrackerNodeTest.php
@@ -16,7 +16,7 @@ class TrackerNodeTest extends MigrateSqlSourceTestBase {
   /**
   * {@inheritdoc}
   */
-  public static $modules = ['tracker', 'migrate_drupal'];
+  protected static $modules = ['tracker', 'migrate_drupal'];
 
   /**
   * {@inheritdoc}
diff --git a/core/modules/tracker/tests/src/Kernel/Plugin/migrate/source/d7/TrackerUserTest.php b/core/modules/tracker/tests/src/Kernel/Plugin/migrate/source/d7/TrackerUserTest.php
index 293e559a20580cb5653dd16ca5c5788dd8ebb3dc..d609d0d1e3a1e2f7e9712b92ce39b4080cffd08a 100644
--- a/core/modules/tracker/tests/src/Kernel/Plugin/migrate/source/d7/TrackerUserTest.php
+++ b/core/modules/tracker/tests/src/Kernel/Plugin/migrate/source/d7/TrackerUserTest.php
@@ -16,7 +16,7 @@ class TrackerUserTest extends MigrateSqlSourceTestBase {
   /**
   * {@inheritdoc}
   */
-  public static $modules = ['tracker', 'migrate_drupal'];
+  protected static $modules = ['tracker', 'migrate_drupal'];
 
   /**
   * {@inheritdoc}
diff --git a/core/modules/update/tests/src/Functional/FileTransferAuthorizeFormTest.php b/core/modules/update/tests/src/Functional/FileTransferAuthorizeFormTest.php
index 32d6cae2aba8fe121861bf2d07fd01e7a8e25310..63e5e9d96bd027213819dd2dd0cdb2328b983a9a 100644
--- a/core/modules/update/tests/src/Functional/FileTransferAuthorizeFormTest.php
+++ b/core/modules/update/tests/src/Functional/FileTransferAuthorizeFormTest.php
@@ -14,7 +14,7 @@ class FileTransferAuthorizeFormTest extends UpdateTestBase {
    *
    * @var array
    */
-  public static $modules = ['update', 'update_test'];
+  protected static $modules = ['update', 'update_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/update/tests/src/Functional/UpdateContribTest.php b/core/modules/update/tests/src/Functional/UpdateContribTest.php
index bdf3afb2c6bdb72156b9bfe0e3e9c87813c4d572..a3125d0f4c6ff21ac8d88c877195c8c2ef6df738 100644
--- a/core/modules/update/tests/src/Functional/UpdateContribTest.php
+++ b/core/modules/update/tests/src/Functional/UpdateContribTest.php
@@ -30,7 +30,7 @@ class UpdateContribTest extends UpdateTestBase {
    *
    * @var array
    */
-  public static $modules = ['update_test', 'update', 'aaa_update_test', 'bbb_update_test', 'ccc_update_test'];
+  protected static $modules = ['update_test', 'update', 'aaa_update_test', 'bbb_update_test', 'ccc_update_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/update/tests/src/Functional/UpdateCoreTest.php b/core/modules/update/tests/src/Functional/UpdateCoreTest.php
index 07e6d6cd6061e1df4908dc43232882317de99968..5a057efca9c02997c29ff3cfe83df5b5f19f2dde 100644
--- a/core/modules/update/tests/src/Functional/UpdateCoreTest.php
+++ b/core/modules/update/tests/src/Functional/UpdateCoreTest.php
@@ -21,7 +21,7 @@ class UpdateCoreTest extends UpdateTestBase {
    *
    * @var array
    */
-  public static $modules = ['update_test', 'update', 'language', 'block'];
+  protected static $modules = ['update_test', 'update', 'language', 'block'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/update/tests/src/Functional/UpdateUploadTest.php b/core/modules/update/tests/src/Functional/UpdateUploadTest.php
index ffb8649729dc9d96897f44ba2f960cb50310a41e..1e8331d77d32643b954079b4c8c5f9b5ae06f934 100644
--- a/core/modules/update/tests/src/Functional/UpdateUploadTest.php
+++ b/core/modules/update/tests/src/Functional/UpdateUploadTest.php
@@ -23,7 +23,7 @@ class UpdateUploadTest extends UpdateTestBase {
    *
    * @var array
    */
-  public static $modules = ['update', 'update_test'];
+  protected static $modules = ['update', 'update_test'];
 
   /**
    * {@inheritdoc}
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 2f80b348231190b6a8c313e7876e146d6238844e..7132546aadae24d2b36633a496ef68fbb6c73547 100644
--- a/core/modules/update/tests/src/Kernel/Migrate/d6/MigrateUpdateConfigsTest.php
+++ b/core/modules/update/tests/src/Kernel/Migrate/d6/MigrateUpdateConfigsTest.php
@@ -17,7 +17,7 @@ class MigrateUpdateConfigsTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['update'];
+  protected static $modules = ['update'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/user/tests/src/Functional/AccessRoleUITest.php b/core/modules/user/tests/src/Functional/AccessRoleUITest.php
index 816deed131df4d0ef7ab81bfb0f2a4ae8daf79dd..1be9d8691096ad33119d8fa8ea2932302acb1f87 100644
--- a/core/modules/user/tests/src/Functional/AccessRoleUITest.php
+++ b/core/modules/user/tests/src/Functional/AccessRoleUITest.php
@@ -25,7 +25,7 @@ class AccessRoleUITest extends UITestBase {
    *
    * @var array
    */
-  public static $modules = ['user', 'user_test_views'];
+  protected static $modules = ['user', 'user_test_views'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/user/tests/src/Functional/Hal/RoleHalJsonAnonTest.php b/core/modules/user/tests/src/Functional/Hal/RoleHalJsonAnonTest.php
index fa60f6e6a168ff0ef74477dd4eae0db0e54ef4da..4e32528bb4f4c11dfefc6bb9786e57677a4ae104 100644
--- a/core/modules/user/tests/src/Functional/Hal/RoleHalJsonAnonTest.php
+++ b/core/modules/user/tests/src/Functional/Hal/RoleHalJsonAnonTest.php
@@ -15,7 +15,7 @@ class RoleHalJsonAnonTest extends RoleResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/user/tests/src/Functional/Hal/RoleHalJsonBasicAuthTest.php b/core/modules/user/tests/src/Functional/Hal/RoleHalJsonBasicAuthTest.php
index 5e270312080e3a384cefdb88a457f424cacfc3d2..7ff1fd7f7051695e9defa6679f29df876d83ed10 100644
--- a/core/modules/user/tests/src/Functional/Hal/RoleHalJsonBasicAuthTest.php
+++ b/core/modules/user/tests/src/Functional/Hal/RoleHalJsonBasicAuthTest.php
@@ -15,7 +15,7 @@ class RoleHalJsonBasicAuthTest extends RoleResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal', 'basic_auth'];
+  protected static $modules = ['hal', 'basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/user/tests/src/Functional/Hal/RoleHalJsonCookieTest.php b/core/modules/user/tests/src/Functional/Hal/RoleHalJsonCookieTest.php
index deaccbdc9632cef5078ce0cad2589beeb21fa84a..9d0a62ea5839591c02cd2cd73aaa184cc64a1730 100644
--- a/core/modules/user/tests/src/Functional/Hal/RoleHalJsonCookieTest.php
+++ b/core/modules/user/tests/src/Functional/Hal/RoleHalJsonCookieTest.php
@@ -15,7 +15,7 @@ class RoleHalJsonCookieTest extends RoleResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/user/tests/src/Functional/Hal/UserHalJsonAnonTest.php b/core/modules/user/tests/src/Functional/Hal/UserHalJsonAnonTest.php
index 18baea1d0b28d720bfa1ae623d4185c1e51cdd54..0e7202fa417381e9383ffcbb6b69ebcb375d51d2 100644
--- a/core/modules/user/tests/src/Functional/Hal/UserHalJsonAnonTest.php
+++ b/core/modules/user/tests/src/Functional/Hal/UserHalJsonAnonTest.php
@@ -17,7 +17,7 @@ class UserHalJsonAnonTest extends UserResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/user/tests/src/Functional/Hal/UserHalJsonBasicAuthTest.php b/core/modules/user/tests/src/Functional/Hal/UserHalJsonBasicAuthTest.php
index 0d34b132ae705b46788c89b985fc5b3247d79ab4..de75e2b4520147cd4ebabe9a57f0479a82404a7c 100644
--- a/core/modules/user/tests/src/Functional/Hal/UserHalJsonBasicAuthTest.php
+++ b/core/modules/user/tests/src/Functional/Hal/UserHalJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class UserHalJsonBasicAuthTest extends UserHalJsonAnonTest {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/user/tests/src/Functional/Rest/RoleJsonBasicAuthTest.php b/core/modules/user/tests/src/Functional/Rest/RoleJsonBasicAuthTest.php
index 39993113cd01f374a336f0284dab11f391403bfd..7a9080408c1a91b05f090c2254e130cd361be800 100644
--- a/core/modules/user/tests/src/Functional/Rest/RoleJsonBasicAuthTest.php
+++ b/core/modules/user/tests/src/Functional/Rest/RoleJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class RoleJsonBasicAuthTest extends RoleResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/user/tests/src/Functional/Rest/RoleResourceTestBase.php b/core/modules/user/tests/src/Functional/Rest/RoleResourceTestBase.php
index 18ff4842a91fffd4da5384f2389a26f4d0a3a2e1..1bb24b676e2284ab017d13fa98239577beeb104a 100644
--- a/core/modules/user/tests/src/Functional/Rest/RoleResourceTestBase.php
+++ b/core/modules/user/tests/src/Functional/Rest/RoleResourceTestBase.php
@@ -10,7 +10,7 @@ abstract class RoleResourceTestBase extends EntityResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['user'];
+  protected static $modules = ['user'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/user/tests/src/Functional/Rest/RoleXmlBasicAuthTest.php b/core/modules/user/tests/src/Functional/Rest/RoleXmlBasicAuthTest.php
index 4fda554c24837cbae83c5c6457affeacab6401a8..dc81a656db556b5f3c21e0e497d3ef392a02d3d2 100644
--- a/core/modules/user/tests/src/Functional/Rest/RoleXmlBasicAuthTest.php
+++ b/core/modules/user/tests/src/Functional/Rest/RoleXmlBasicAuthTest.php
@@ -16,7 +16,7 @@ class RoleXmlBasicAuthTest extends RoleResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/user/tests/src/Functional/Rest/UserJsonBasicAuthTest.php b/core/modules/user/tests/src/Functional/Rest/UserJsonBasicAuthTest.php
index 15ba10bc77646fb30a208c5c6283dcfed7f2aa70..169da9e952c9ebc53c6b1cdd2189d75ac454b0f1 100644
--- a/core/modules/user/tests/src/Functional/Rest/UserJsonBasicAuthTest.php
+++ b/core/modules/user/tests/src/Functional/Rest/UserJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class UserJsonBasicAuthTest extends UserResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/user/tests/src/Functional/Rest/UserResourceTestBase.php b/core/modules/user/tests/src/Functional/Rest/UserResourceTestBase.php
index 259f624289f1da3e9d40c22359cc6fdac1bc02c7..9ff6fb686f746ed26eefc36f4fe1fd8bfbd7525a 100644
--- a/core/modules/user/tests/src/Functional/Rest/UserResourceTestBase.php
+++ b/core/modules/user/tests/src/Functional/Rest/UserResourceTestBase.php
@@ -12,7 +12,7 @@ abstract class UserResourceTestBase extends EntityResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['user'];
+  protected static $modules = ['user'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/user/tests/src/Functional/Rest/UserXmlBasicAuthTest.php b/core/modules/user/tests/src/Functional/Rest/UserXmlBasicAuthTest.php
index f213e1b5d0065a671aa95af34e17676bf1cd9f43..25ee4e3e39122332aa7dc8d6f11f53a8a5be5f69 100644
--- a/core/modules/user/tests/src/Functional/Rest/UserXmlBasicAuthTest.php
+++ b/core/modules/user/tests/src/Functional/Rest/UserXmlBasicAuthTest.php
@@ -16,7 +16,7 @@ class UserXmlBasicAuthTest extends UserResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/user/tests/src/Functional/RestRegisterUserTest.php b/core/modules/user/tests/src/Functional/RestRegisterUserTest.php
index 556f33c5dc522c3de2ab25b69cbfbc8b55af637e..538f11c17dceec019afee39e69f962d81b964bbc 100644
--- a/core/modules/user/tests/src/Functional/RestRegisterUserTest.php
+++ b/core/modules/user/tests/src/Functional/RestRegisterUserTest.php
@@ -50,7 +50,7 @@ class RestRegisterUserTest extends ResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal', 'user'];
+  protected static $modules = ['hal', 'user'];
 
   const USER_EMAIL_DOMAIN = '@example.com';
 
diff --git a/core/modules/user/tests/src/Functional/UserAccountLinksTest.php b/core/modules/user/tests/src/Functional/UserAccountLinksTest.php
index e7f92a0ced3e4794d6ae4f56fd2d3c889e651046..69f37a061589994cec0a9e3df72aad222b2c20c6 100644
--- a/core/modules/user/tests/src/Functional/UserAccountLinksTest.php
+++ b/core/modules/user/tests/src/Functional/UserAccountLinksTest.php
@@ -16,7 +16,7 @@ class UserAccountLinksTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['menu_ui', 'block', 'test_page_test'];
+  protected static $modules = ['menu_ui', 'block', 'test_page_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/user/tests/src/Functional/UserAdminLanguageTest.php b/core/modules/user/tests/src/Functional/UserAdminLanguageTest.php
index e6d62818ba3f04a6b30c07d5aebb92958cf0e7d0..ece02e140e0cdebf6d8b024f121c53f9e10dde9c 100644
--- a/core/modules/user/tests/src/Functional/UserAdminLanguageTest.php
+++ b/core/modules/user/tests/src/Functional/UserAdminLanguageTest.php
@@ -31,7 +31,7 @@ class UserAdminLanguageTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['user', 'language', 'language_test'];
+  protected static $modules = ['user', 'language', 'language_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/user/tests/src/Functional/UserAdminTest.php b/core/modules/user/tests/src/Functional/UserAdminTest.php
index f0a59ed7beea0d7dcf8c5f44289b92aca91da7c6..431afa8ab77a17b510a8890845d153631fe2aae6 100644
--- a/core/modules/user/tests/src/Functional/UserAdminTest.php
+++ b/core/modules/user/tests/src/Functional/UserAdminTest.php
@@ -23,7 +23,7 @@ class UserAdminTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['taxonomy', 'views'];
+  protected static $modules = ['taxonomy', 'views'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/user/tests/src/Functional/UserBlocksTest.php b/core/modules/user/tests/src/Functional/UserBlocksTest.php
index dd0704ec7b37168083c677e63ee1e8f145a2e559..56b2868ff6ec33a2dc5a1f05c184cf4147c416db 100644
--- a/core/modules/user/tests/src/Functional/UserBlocksTest.php
+++ b/core/modules/user/tests/src/Functional/UserBlocksTest.php
@@ -18,7 +18,7 @@ class UserBlocksTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['block', 'views'];
+  protected static $modules = ['block', 'views'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/user/tests/src/Functional/UserCacheTagsTest.php b/core/modules/user/tests/src/Functional/UserCacheTagsTest.php
index 9411cb6a67089407a7cc5378529d9e691feaed32..ecfabc075be56235a2abc28db05252c85b722003 100644
--- a/core/modules/user/tests/src/Functional/UserCacheTagsTest.php
+++ b/core/modules/user/tests/src/Functional/UserCacheTagsTest.php
@@ -17,7 +17,7 @@ class UserCacheTagsTest extends EntityWithUriCacheTagsTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['user'];
+  protected static $modules = ['user'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/user/tests/src/Functional/UserCancelTest.php b/core/modules/user/tests/src/Functional/UserCancelTest.php
index 748499f0deb87b8007fe57c0b5a7090e6dd84454..83d56f3e4abd92ed5aa57140ef25ec0e6848b255 100644
--- a/core/modules/user/tests/src/Functional/UserCancelTest.php
+++ b/core/modules/user/tests/src/Functional/UserCancelTest.php
@@ -23,7 +23,7 @@ class UserCancelTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'comment'];
+  protected static $modules = ['node', 'comment'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/user/tests/src/Functional/UserCreateFailMailTest.php b/core/modules/user/tests/src/Functional/UserCreateFailMailTest.php
index 96323279a314caf852f516638893f280726c1155..915b82a23d2af14c36946bea5a3f2e3067e84756 100644
--- a/core/modules/user/tests/src/Functional/UserCreateFailMailTest.php
+++ b/core/modules/user/tests/src/Functional/UserCreateFailMailTest.php
@@ -16,7 +16,7 @@ class UserCreateFailMailTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['system_mail_failure_test'];
+  protected static $modules = ['system_mail_failure_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/user/tests/src/Functional/UserCreateTest.php b/core/modules/user/tests/src/Functional/UserCreateTest.php
index fceb1af1d66a594b637978a247f42ad48fa4cf3b..f49c6c19996cad6dcf165544cae771a342837ade 100644
--- a/core/modules/user/tests/src/Functional/UserCreateTest.php
+++ b/core/modules/user/tests/src/Functional/UserCreateTest.php
@@ -23,7 +23,7 @@ class UserCreateTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['image'];
+  protected static $modules = ['image'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/user/tests/src/Functional/UserLanguageCreationTest.php b/core/modules/user/tests/src/Functional/UserLanguageCreationTest.php
index 85e39589db7d13c6a30b7493627149cc3214bfcc..812cbfdccc9391d2db1d16a287d9bb510de1b6b6 100644
--- a/core/modules/user/tests/src/Functional/UserLanguageCreationTest.php
+++ b/core/modules/user/tests/src/Functional/UserLanguageCreationTest.php
@@ -18,7 +18,7 @@ class UserLanguageCreationTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['user', 'language'];
+  protected static $modules = ['user', 'language'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/user/tests/src/Functional/UserLanguageTest.php b/core/modules/user/tests/src/Functional/UserLanguageTest.php
index d221a61c1eb6d80111b65b5be6d78012d53d6368..f2c7ef61edf74bde0f8486935b31355466f5a6d1 100644
--- a/core/modules/user/tests/src/Functional/UserLanguageTest.php
+++ b/core/modules/user/tests/src/Functional/UserLanguageTest.php
@@ -17,7 +17,7 @@ class UserLanguageTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['user', 'language'];
+  protected static $modules = ['user', 'language'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/user/tests/src/Functional/UserLoginHttpTest.php b/core/modules/user/tests/src/Functional/UserLoginHttpTest.php
index 5058571f203daabd2f0f1b1c9aa1b44e8da171d0..1544b953d0f1719acbfd404ac7656bca2d45594f 100644
--- a/core/modules/user/tests/src/Functional/UserLoginHttpTest.php
+++ b/core/modules/user/tests/src/Functional/UserLoginHttpTest.php
@@ -30,7 +30,7 @@ class UserLoginHttpTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/user/tests/src/Functional/UserPasswordResetTest.php b/core/modules/user/tests/src/Functional/UserPasswordResetTest.php
index 0df109582554ef2c12878c14ddfe7f07ed494179..b026d46f81ad14edff4bbfc41b3c49dca5636bff 100644
--- a/core/modules/user/tests/src/Functional/UserPasswordResetTest.php
+++ b/core/modules/user/tests/src/Functional/UserPasswordResetTest.php
@@ -32,7 +32,7 @@ class UserPasswordResetTest extends PageCacheTagsTestBase {
    *
    * @var array
    */
-  public static $modules = ['block'];
+  protected static $modules = ['block'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/user/tests/src/Functional/UserRegistrationTest.php b/core/modules/user/tests/src/Functional/UserRegistrationTest.php
index 760836b307e50c94510a3d8240a2bdc462093261..ddad258635e7a4e71239df50d3ee402e81732932 100644
--- a/core/modules/user/tests/src/Functional/UserRegistrationTest.php
+++ b/core/modules/user/tests/src/Functional/UserRegistrationTest.php
@@ -22,7 +22,7 @@ class UserRegistrationTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['field_test'];
+  protected static $modules = ['field_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/user/tests/src/Functional/UserRoleAdminTest.php b/core/modules/user/tests/src/Functional/UserRoleAdminTest.php
index ab068aec46f6e159fdcb225dba8825498f2e9c04..8697038e24fbbebe9931dcc714ef942ca8b140f5 100644
--- a/core/modules/user/tests/src/Functional/UserRoleAdminTest.php
+++ b/core/modules/user/tests/src/Functional/UserRoleAdminTest.php
@@ -25,7 +25,7 @@ class UserRoleAdminTest extends BrowserTestBase {
    *
    * @var string[]
    */
-  public static $modules = ['block'];
+  protected static $modules = ['block'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/user/tests/src/Functional/UserSearchTest.php b/core/modules/user/tests/src/Functional/UserSearchTest.php
index 49fca33902e5e452ea03e4cecc082b23f005aaa6..1950a8440d221dd267444e190dc68c96f0888a64 100644
--- a/core/modules/user/tests/src/Functional/UserSearchTest.php
+++ b/core/modules/user/tests/src/Functional/UserSearchTest.php
@@ -17,7 +17,7 @@ class UserSearchTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['search'];
+  protected static $modules = ['search'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/user/tests/src/Functional/UserSubAdminTest.php b/core/modules/user/tests/src/Functional/UserSubAdminTest.php
index 0de619f2410b078bcffea74edfcefc1d9617e928..1200a2d947e040ffcf25882436ab59f9bcba9318 100644
--- a/core/modules/user/tests/src/Functional/UserSubAdminTest.php
+++ b/core/modules/user/tests/src/Functional/UserSubAdminTest.php
@@ -14,7 +14,7 @@ class UserSubAdminTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['user_access_test'];
+  protected static $modules = ['user_access_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/user/tests/src/Functional/UserTimeZoneTest.php b/core/modules/user/tests/src/Functional/UserTimeZoneTest.php
index 914fffa1c9aa804068c73a8031e071b933b4e435..e5fb9ad2e028e038ccffed682e950d58e81d407c 100644
--- a/core/modules/user/tests/src/Functional/UserTimeZoneTest.php
+++ b/core/modules/user/tests/src/Functional/UserTimeZoneTest.php
@@ -17,7 +17,7 @@ class UserTimeZoneTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'system_test'];
+  protected static $modules = ['node', 'system_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/user/tests/src/Functional/UserTokenReplaceTest.php b/core/modules/user/tests/src/Functional/UserTokenReplaceTest.php
index 2bde998fd17579e564cc77dbae46174f6d4ea67a..9aad8fa2c720fc2599a053c47031f216cf543a63 100644
--- a/core/modules/user/tests/src/Functional/UserTokenReplaceTest.php
+++ b/core/modules/user/tests/src/Functional/UserTokenReplaceTest.php
@@ -22,7 +22,7 @@ class UserTokenReplaceTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['language', 'user_hooks_test'];
+  protected static $modules = ['language', 'user_hooks_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/user/tests/src/Functional/UserTranslationUITest.php b/core/modules/user/tests/src/Functional/UserTranslationUITest.php
index 41d100e1c5fa8a7334835c6b45f101349449c172..7c83f1263b99210db97387018f170f6d8b07e241 100644
--- a/core/modules/user/tests/src/Functional/UserTranslationUITest.php
+++ b/core/modules/user/tests/src/Functional/UserTranslationUITest.php
@@ -23,7 +23,7 @@ class UserTranslationUITest extends ContentTranslationUITestBase {
    *
    * @var array
    */
-  public static $modules = ['language', 'content_translation', 'user', 'views'];
+  protected static $modules = ['language', 'content_translation', 'user', 'views'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/user/tests/src/Functional/Views/AccessTestBase.php b/core/modules/user/tests/src/Functional/Views/AccessTestBase.php
index 36f2334f1166a5d71550ae5f14625399494e1016..350dfc7553626dfb80759fab116549bdec217277 100644
--- a/core/modules/user/tests/src/Functional/Views/AccessTestBase.php
+++ b/core/modules/user/tests/src/Functional/Views/AccessTestBase.php
@@ -12,7 +12,7 @@ abstract class AccessTestBase extends UserTestBase {
    *
    * @var array
    */
-  public static $modules = ['block'];
+  protected static $modules = ['block'];
 
   /**
    * Contains a user object that has no special permissions.
diff --git a/core/modules/user/tests/src/Functional/Views/BulkFormAccessTest.php b/core/modules/user/tests/src/Functional/Views/BulkFormAccessTest.php
index 358ae1379137169a16b121e5b06f740bbe850cbd..f330d5db17f8549a5991be7819cf8e09a69227ae 100644
--- a/core/modules/user/tests/src/Functional/Views/BulkFormAccessTest.php
+++ b/core/modules/user/tests/src/Functional/Views/BulkFormAccessTest.php
@@ -19,7 +19,7 @@ class BulkFormAccessTest extends UserTestBase {
    *
    * @var array
    */
-  public static $modules = ['user_access_test'];
+  protected static $modules = ['user_access_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/user/tests/src/Functional/Views/BulkFormTest.php b/core/modules/user/tests/src/Functional/Views/BulkFormTest.php
index f7cb4f3fe04334ae70f25352c646c08ec0bd9d6d..412c95194e0b1075b2a6eb46c7a983ec21534245 100644
--- a/core/modules/user/tests/src/Functional/Views/BulkFormTest.php
+++ b/core/modules/user/tests/src/Functional/Views/BulkFormTest.php
@@ -19,7 +19,7 @@ class BulkFormTest extends UserTestBase {
    *
    * @var array
    */
-  public static $modules = ['views_ui'];
+  protected static $modules = ['views_ui'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/user/tests/src/Functional/Views/FilterPermissionUiTest.php b/core/modules/user/tests/src/Functional/Views/FilterPermissionUiTest.php
index 335a6032ef5bb8c1d6eb336fd6616bef04ba1267..7586406649b87eb9c1266778d5a5edc1fe66f118 100644
--- a/core/modules/user/tests/src/Functional/Views/FilterPermissionUiTest.php
+++ b/core/modules/user/tests/src/Functional/Views/FilterPermissionUiTest.php
@@ -25,7 +25,7 @@ class FilterPermissionUiTest extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = ['user', 'user_test_views', 'views_ui'];
+  protected static $modules = ['user', 'user_test_views', 'views_ui'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/user/tests/src/Functional/Views/HandlerFilterUserNameTest.php b/core/modules/user/tests/src/Functional/Views/HandlerFilterUserNameTest.php
index 19954a20f4f580ce2d5051c6fc9f43e20d458367..149ed5f18212e1c35893db5ff292e9d76de9593b 100644
--- a/core/modules/user/tests/src/Functional/Views/HandlerFilterUserNameTest.php
+++ b/core/modules/user/tests/src/Functional/Views/HandlerFilterUserNameTest.php
@@ -19,7 +19,7 @@ class HandlerFilterUserNameTest extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = ['views_ui', 'user_test_views'];
+  protected static $modules = ['views_ui', 'user_test_views'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/user/tests/src/Functional/Views/UserChangedTest.php b/core/modules/user/tests/src/Functional/Views/UserChangedTest.php
index 572c6eaf4efc977c63377e13dbd8f94dc0d13cef..4c946f67a8190c1404508d8dc73c84e54e439b7f 100644
--- a/core/modules/user/tests/src/Functional/Views/UserChangedTest.php
+++ b/core/modules/user/tests/src/Functional/Views/UserChangedTest.php
@@ -17,7 +17,7 @@ class UserChangedTest extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = ['views_ui', 'user_test_views'];
+  protected static $modules = ['views_ui', 'user_test_views'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/user/tests/src/Functional/Views/UserFieldsAccessChangeTest.php b/core/modules/user/tests/src/Functional/Views/UserFieldsAccessChangeTest.php
index ca3e8e9cccbb4e08c5158151bf374424f6dc9dd3..39e4b048ae2748eed89c1f2c142e138b38ba93bf 100644
--- a/core/modules/user/tests/src/Functional/Views/UserFieldsAccessChangeTest.php
+++ b/core/modules/user/tests/src/Functional/Views/UserFieldsAccessChangeTest.php
@@ -14,7 +14,7 @@ class UserFieldsAccessChangeTest extends UserTestBase {
    *
    * @var array
    */
-  public static $modules = ['user_access_test'];
+  protected static $modules = ['user_access_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/user/tests/src/Functional/Views/UserTestBase.php b/core/modules/user/tests/src/Functional/Views/UserTestBase.php
index 49de6f793fd136bb424035fe73de0c895a4d9683..83f0ab297de46c54976a21bc255d1f17783d86bf 100644
--- a/core/modules/user/tests/src/Functional/Views/UserTestBase.php
+++ b/core/modules/user/tests/src/Functional/Views/UserTestBase.php
@@ -16,7 +16,7 @@ abstract class UserTestBase extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = ['user_test_views', 'node'];
+  protected static $modules = ['user_test_views', 'node'];
 
   /**
    * Users to use during this test.
diff --git a/core/modules/user/tests/src/FunctionalJavascript/RegistrationWithUserFieldsTest.php b/core/modules/user/tests/src/FunctionalJavascript/RegistrationWithUserFieldsTest.php
index ef8164f95fce641a79a7e4e95044b205e291447c..ddc58b2c471e9ff5c1efbb5cf4c2f9aad65a65b8 100644
--- a/core/modules/user/tests/src/FunctionalJavascript/RegistrationWithUserFieldsTest.php
+++ b/core/modules/user/tests/src/FunctionalJavascript/RegistrationWithUserFieldsTest.php
@@ -31,7 +31,7 @@ class RegistrationWithUserFieldsTest extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['field_test'];
+  protected static $modules = ['field_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/user/tests/src/FunctionalJavascript/UserPasswordResetTest.php b/core/modules/user/tests/src/FunctionalJavascript/UserPasswordResetTest.php
index 0cd9b84a2c46346c031c5323eaca1d7bd9b40c25..ebb1b17c200b83b6a123934944c2b412cbbfe808 100644
--- a/core/modules/user/tests/src/FunctionalJavascript/UserPasswordResetTest.php
+++ b/core/modules/user/tests/src/FunctionalJavascript/UserPasswordResetTest.php
@@ -45,7 +45,7 @@ class UserPasswordResetTest extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['block'];
+  protected static $modules = ['block'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/user/tests/src/Kernel/Condition/UserRoleConditionTest.php b/core/modules/user/tests/src/Kernel/Condition/UserRoleConditionTest.php
index 6ba57a0aa86b5c64c100a9ef315adea4063b4557..73fa0546ead49188b130a1d8e94b5dc957f749c3 100644
--- a/core/modules/user/tests/src/Kernel/Condition/UserRoleConditionTest.php
+++ b/core/modules/user/tests/src/Kernel/Condition/UserRoleConditionTest.php
@@ -48,7 +48,7 @@ class UserRoleConditionTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['system', 'user', 'field'];
+  protected static $modules = ['system', 'user', 'field'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/user/tests/src/Kernel/Field/UserNameFormatterTest.php b/core/modules/user/tests/src/Kernel/Field/UserNameFormatterTest.php
index 8716522dc4bcb88fa61e5705f745fdd5c2bbc8a4..c09161230b58e47a263d7e705379c65d6d92675f 100644
--- a/core/modules/user/tests/src/Kernel/Field/UserNameFormatterTest.php
+++ b/core/modules/user/tests/src/Kernel/Field/UserNameFormatterTest.php
@@ -19,7 +19,7 @@ class UserNameFormatterTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['field', 'user', 'system'];
+  protected static $modules = ['field', 'user', 'system'];
 
   /**
    * @var string
diff --git a/core/modules/user/tests/src/Kernel/Migrate/MigrateUserAdminPassTest.php b/core/modules/user/tests/src/Kernel/Migrate/MigrateUserAdminPassTest.php
index b52f1e0694fbfeac71027d30d3fcc85f61e8cfa1..4b8701a7258430bc8362d9c58f26d77dc0613f04 100644
--- a/core/modules/user/tests/src/Kernel/Migrate/MigrateUserAdminPassTest.php
+++ b/core/modules/user/tests/src/Kernel/Migrate/MigrateUserAdminPassTest.php
@@ -24,7 +24,7 @@ class MigrateUserAdminPassTest extends MigrateTestBase {
    *
    * @var string[]
    */
-  public static $modules = ['user'];
+  protected static $modules = ['user'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/user/tests/src/Kernel/Migrate/MigrateUserStubTest.php b/core/modules/user/tests/src/Kernel/Migrate/MigrateUserStubTest.php
index 254e06653d4202e8698d927d162d6339ed8d0d08..aa8c1b3972c9f8773e5e0ed59e1db632b6bc0f25 100644
--- a/core/modules/user/tests/src/Kernel/Migrate/MigrateUserStubTest.php
+++ b/core/modules/user/tests/src/Kernel/Migrate/MigrateUserStubTest.php
@@ -17,7 +17,7 @@ class MigrateUserStubTest extends MigrateDrupalTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['user'];
+  protected static $modules = ['user'];
 
   /**
    * {@inheritdoc}
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 0bc30fd72a922f2d1e05f06a219cc231080b3849..bde1ee2487090de3677cdab917e2466462f98e5a 100644
--- a/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateProfileFieldOptionTranslationTest.php
+++ b/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateProfileFieldOptionTranslationTest.php
@@ -14,7 +14,7 @@ class MigrateProfileFieldOptionTranslationTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'config_translation',
     'language',
     'locale',
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 1819e75ff1cbc3feb2849f0df078007ca2f0c5ff..0d7c8f4a335c01acba992f04d813ed1f4da5a6d0 100644
--- a/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserContactSettingsTest.php
+++ b/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserContactSettingsTest.php
@@ -14,7 +14,7 @@ class MigrateUserContactSettingsTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['contact'];
+  protected static $modules = ['contact'];
 
   /**
    * {@inheritdoc}
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 5a478198c3b94b8a738771b3e46e1502e01e7a23..2e05e60a16238c9217ce73da8c2e0e6f568045a6 100644
--- a/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserProfileFieldInstanceTest.php
+++ b/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserProfileFieldInstanceTest.php
@@ -15,7 +15,7 @@ class MigrateUserProfileFieldInstanceTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['field'];
+  protected static $modules = ['field'];
 
   /**
    * {@inheritdoc}
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 a3556fca1e6d32b4df71db61352db21f8a57dc57..661f021963dcabd71fe679f929f1b0f0a52deedf 100644
--- a/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserProfileValuesTest.php
+++ b/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserProfileValuesTest.php
@@ -15,7 +15,7 @@ class MigrateUserProfileValuesTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['language'];
+  protected static $modules = ['language'];
 
   /**
    * {@inheritdoc}
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 cb67fb4ca16f6884ddb50fa660df3a96d20044a2..e863200990e5c18adfe3d7ddb9c2cef3182e07dc 100644
--- a/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserTest.php
+++ b/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserTest.php
@@ -22,7 +22,7 @@ class MigrateUserTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['language'];
+  protected static $modules = ['language'];
 
   /**
    * {@inheritdoc}
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 76911f2ca2ba222a127df27f831a170f801eb0be..c389926bac3c14a3d2c7834c27edda66e754b061 100644
--- a/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserPictureEntityDisplayTest.php
+++ b/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserPictureEntityDisplayTest.php
@@ -15,7 +15,7 @@ class MigrateUserPictureEntityDisplayTest extends MigrateDrupal7TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['file', 'image'];
+  protected static $modules = ['file', 'image'];
 
   /**
    * {@inheritdoc}
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 3437b6d25815b3ff33f338a8d8b71ab6e6e6ac4e..5eabba6ebef7239b1a1d56971e2466b3ad04febc 100644
--- a/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserPictureEntityFormDisplayTest.php
+++ b/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserPictureEntityFormDisplayTest.php
@@ -12,7 +12,7 @@
  */
 class MigrateUserPictureEntityFormDisplayTest extends MigrateDrupal7TestBase {
 
-  public static $modules = ['image', 'file'];
+  protected static $modules = ['image', 'file'];
 
   /**
    * {@inheritdoc}
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 47f40232650c31f3bcadd4b9c1bb2940540e184b..ab59e153520256bd7f5972cfa3c3ae23450b9357 100644
--- a/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserPictureFieldInstanceTest.php
+++ b/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserPictureFieldInstanceTest.php
@@ -13,7 +13,7 @@
  */
 class MigrateUserPictureFieldInstanceTest extends MigrateDrupal7TestBase {
 
-  public static $modules = ['image', 'file'];
+  protected static $modules = ['image', 'file'];
 
   /**
    * {@inheritdoc}
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 06561588fab99df1efe8d62508d296bd4868fe49..2cba6e018a39c1c33098751f626e553800d75cc5 100644
--- a/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserPictureFieldTest.php
+++ b/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserPictureFieldTest.php
@@ -13,7 +13,7 @@
  */
 class MigrateUserPictureFieldTest extends MigrateDrupal7TestBase {
 
-  public static $modules = ['image', 'file'];
+  protected static $modules = ['image', 'file'];
 
   /**
    * {@inheritdoc}
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 eeeed00694c8634a6f9a81749ef47d520852a2d6..0984f48b4df8daa6fd4d55bdf16a4ec29e7c52d5 100644
--- a/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserTest.php
+++ b/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserTest.php
@@ -18,7 +18,7 @@ class MigrateUserTest extends MigrateDrupal7TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'comment',
     'content_translation',
     'datetime',
diff --git a/core/modules/user/tests/src/Kernel/Plugin/migrate/source/ProfileFieldTest.php b/core/modules/user/tests/src/Kernel/Plugin/migrate/source/ProfileFieldTest.php
index 99c61fd491081407219da386308649bbd8e67721..c24a0a79e26768d475bd8d000378f219a0f2bbaf 100644
--- a/core/modules/user/tests/src/Kernel/Plugin/migrate/source/ProfileFieldTest.php
+++ b/core/modules/user/tests/src/Kernel/Plugin/migrate/source/ProfileFieldTest.php
@@ -15,7 +15,7 @@ class ProfileFieldTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['user', 'migrate_drupal'];
+  protected static $modules = ['user', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/user/tests/src/Kernel/Plugin/migrate/source/UserPictureInstanceTest.php b/core/modules/user/tests/src/Kernel/Plugin/migrate/source/UserPictureInstanceTest.php
index d9e77edde03a2c6944b335f198482bf5c7879ea6..a87ede1f7ad3c7135eaef5b24187045f491c7575 100644
--- a/core/modules/user/tests/src/Kernel/Plugin/migrate/source/UserPictureInstanceTest.php
+++ b/core/modules/user/tests/src/Kernel/Plugin/migrate/source/UserPictureInstanceTest.php
@@ -15,7 +15,7 @@ class UserPictureInstanceTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['user', 'migrate_drupal'];
+  protected static $modules = ['user', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d6/ProfileFieldOptionTranslationTest.php b/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d6/ProfileFieldOptionTranslationTest.php
index d1a11a8e7c32ee13e490491a63667331307e748e..2a5400954b567147b4a24898d131f75384a86835 100644
--- a/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d6/ProfileFieldOptionTranslationTest.php
+++ b/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d6/ProfileFieldOptionTranslationTest.php
@@ -15,7 +15,7 @@ class ProfileFieldOptionTranslationTest extends ProfileFieldTest {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['user', 'migrate_drupal'];
+  protected static $modules = ['user', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d6/ProfileFieldValuesTest.php b/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d6/ProfileFieldValuesTest.php
index 26c2ed55f8d865dd955149040bc0adae7f3ed86a..2e3aba422435405714f2a010dd7860f91adabca9 100644
--- a/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d6/ProfileFieldValuesTest.php
+++ b/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d6/ProfileFieldValuesTest.php
@@ -15,7 +15,7 @@ class ProfileFieldValuesTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['user', 'migrate_drupal'];
+  protected static $modules = ['user', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d6/RoleTest.php b/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d6/RoleTest.php
index 1a841d32dfa53a97c063f5ed53dab1a99cb8512c..d37659b4f8b6597d5c63fc68f99a0962f307564a 100644
--- a/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d6/RoleTest.php
+++ b/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d6/RoleTest.php
@@ -15,7 +15,7 @@ class RoleTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['user', 'migrate_drupal'];
+  protected static $modules = ['user', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d6/UserPictureFileTest.php b/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d6/UserPictureFileTest.php
index d26f61cee581810b3972fa5575b5acf14a8d858e..4875f84885cc6ed4a74b00422d9adceb07cbb540 100644
--- a/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d6/UserPictureFileTest.php
+++ b/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d6/UserPictureFileTest.php
@@ -15,7 +15,7 @@ class UserPictureFileTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['user', 'migrate_drupal'];
+  protected static $modules = ['user', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d6/UserPictureTest.php b/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d6/UserPictureTest.php
index aea6afa7c90ff39a48412557e7a667c352807f9a..2eb61d84c1e16c3a6e80906384fef79432b8d03f 100644
--- a/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d6/UserPictureTest.php
+++ b/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d6/UserPictureTest.php
@@ -15,7 +15,7 @@ class UserPictureTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['user', 'migrate_drupal'];
+  protected static $modules = ['user', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d6/UserTest.php b/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d6/UserTest.php
index 1dc34a7cd6018907ff6de1879e902c2468d48341..19f85be63a8ce22499a2db6a9ae73ec454618801 100644
--- a/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d6/UserTest.php
+++ b/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d6/UserTest.php
@@ -15,7 +15,7 @@ class UserTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['user', 'migrate_drupal'];
+  protected static $modules = ['user', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d7/RoleTest.php b/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d7/RoleTest.php
index d2d43a44c94a47f5f0ca7d25193c7fe9fb48fe87..885894c780903704ee1d43a35343cbeb8df78b55 100644
--- a/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d7/RoleTest.php
+++ b/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d7/RoleTest.php
@@ -15,7 +15,7 @@ class RoleTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['migrate_drupal', 'user'];
+  protected static $modules = ['migrate_drupal', 'user'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d7/UserEntityTranslationTest.php b/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d7/UserEntityTranslationTest.php
index e265ace618692d20b1404904ca1ab0df1f7b3154..d8d5d7224283f6c75f9d659e7584f3d269df5193 100644
--- a/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d7/UserEntityTranslationTest.php
+++ b/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d7/UserEntityTranslationTest.php
@@ -16,7 +16,7 @@ class UserEntityTranslationTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['user', 'migrate_drupal'];
+  protected static $modules = ['user', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d7/UserTest.php b/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d7/UserTest.php
index 80935715eb31a00463a44af79f5f1ebb2a2b37ae..09cdce70aeb255b99c3fa34aa18372720e4ad06a 100644
--- a/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d7/UserTest.php
+++ b/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d7/UserTest.php
@@ -15,7 +15,7 @@ class UserTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['user', 'migrate_drupal'];
+  protected static $modules = ['user', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/user/tests/src/Kernel/UserAccountFormFieldsTest.php b/core/modules/user/tests/src/Kernel/UserAccountFormFieldsTest.php
index 2e44cf4c251e6b05f604ddd4099f929e804d6c73..d896e2d081b0f6611e5b017d2b1227ace3325c42 100644
--- a/core/modules/user/tests/src/Kernel/UserAccountFormFieldsTest.php
+++ b/core/modules/user/tests/src/Kernel/UserAccountFormFieldsTest.php
@@ -18,7 +18,7 @@ class UserAccountFormFieldsTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['system', 'user', 'field'];
+  protected static $modules = ['system', 'user', 'field'];
 
   /**
    * Tests the root user account form section in the "Configure site" form.
diff --git a/core/modules/user/tests/src/Kernel/UserActionConfigSchemaTest.php b/core/modules/user/tests/src/Kernel/UserActionConfigSchemaTest.php
index dfafb1d5368be79048c892e4174876d0f1cd1449..d6e5c353c07069c63b0b2194522ae6153c8ce199 100644
--- a/core/modules/user/tests/src/Kernel/UserActionConfigSchemaTest.php
+++ b/core/modules/user/tests/src/Kernel/UserActionConfigSchemaTest.php
@@ -21,7 +21,7 @@ class UserActionConfigSchemaTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['system', 'user'];
+  protected static $modules = ['system', 'user'];
 
   /**
    * Tests whether the user action config schema are valid.
diff --git a/core/modules/user/tests/src/Kernel/UserAdminSettingsFormTest.php b/core/modules/user/tests/src/Kernel/UserAdminSettingsFormTest.php
index 75a506aa644a282ce0eca1dff8ae04890bffe5cd..4876ef7318ad4a922ed35dd4609d579e9556def0 100644
--- a/core/modules/user/tests/src/Kernel/UserAdminSettingsFormTest.php
+++ b/core/modules/user/tests/src/Kernel/UserAdminSettingsFormTest.php
@@ -15,7 +15,7 @@ class UserAdminSettingsFormTest extends ConfigFormTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['user', 'system'];
+  protected static $modules = ['user', 'system'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/user/tests/src/Kernel/UserEntityTest.php b/core/modules/user/tests/src/Kernel/UserEntityTest.php
index 119708ad6e3a182bac1056d00171f648867c12c7..3a2eff317d45a9af8b8c09502449b8f37cb59a34 100644
--- a/core/modules/user/tests/src/Kernel/UserEntityTest.php
+++ b/core/modules/user/tests/src/Kernel/UserEntityTest.php
@@ -19,7 +19,7 @@ class UserEntityTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['system', 'user', 'field'];
+  protected static $modules = ['system', 'user', 'field'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/user/tests/src/Kernel/UserFieldsTest.php b/core/modules/user/tests/src/Kernel/UserFieldsTest.php
index 30108472bd75ac37fbea943e85f33069ac49347f..94475e7db91626e1bc63b0e9f8ad51c5fd6535e0 100644
--- a/core/modules/user/tests/src/Kernel/UserFieldsTest.php
+++ b/core/modules/user/tests/src/Kernel/UserFieldsTest.php
@@ -17,7 +17,7 @@ class UserFieldsTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['user', 'system'];
+  protected static $modules = ['user', 'system'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/user/tests/src/Kernel/UserInstallTest.php b/core/modules/user/tests/src/Kernel/UserInstallTest.php
index 142da5eb2d444f31bc4092cf88d8d7275ef973a9..437205a76a22d8e3c2652ed5fdd1af4750f272d4 100644
--- a/core/modules/user/tests/src/Kernel/UserInstallTest.php
+++ b/core/modules/user/tests/src/Kernel/UserInstallTest.php
@@ -17,7 +17,7 @@ class UserInstallTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['user'];
+  protected static $modules = ['user'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/user/tests/src/Kernel/UserRoleDeleteTest.php b/core/modules/user/tests/src/Kernel/UserRoleDeleteTest.php
index 0c17130eb160146ebc17f9d3904152c6f0d732e0..8accfb628534abe5382384729844f33c7b32ca4e 100644
--- a/core/modules/user/tests/src/Kernel/UserRoleDeleteTest.php
+++ b/core/modules/user/tests/src/Kernel/UserRoleDeleteTest.php
@@ -17,7 +17,7 @@ class UserRoleDeleteTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['system', 'user', 'field'];
+  protected static $modules = ['system', 'user', 'field'];
 
   protected function setUp(): void {
     parent::setUp();
diff --git a/core/modules/user/tests/src/Kernel/UserRoleEntityTest.php b/core/modules/user/tests/src/Kernel/UserRoleEntityTest.php
index 562ada11f237e0fb9bd6257395c3c74e5bf48d2c..b597c3ddae8202975dac0ca5a7bf317c28acdbba 100644
--- a/core/modules/user/tests/src/Kernel/UserRoleEntityTest.php
+++ b/core/modules/user/tests/src/Kernel/UserRoleEntityTest.php
@@ -10,7 +10,7 @@
  */
 class UserRoleEntityTest extends KernelTestBase {
 
-  public static $modules = ['system', 'user'];
+  protected static $modules = ['system', 'user'];
 
   public function testOrderOfPermissions() {
     $role = Role::create(['id' => 'test_role']);
diff --git a/core/modules/user/tests/src/Kernel/UserSaveStatusTest.php b/core/modules/user/tests/src/Kernel/UserSaveStatusTest.php
index 8f01e40f9f9521d3b3842776bf80f27ed7a7f562..c6b161351bff32b89c7c232023df157475f947b3 100644
--- a/core/modules/user/tests/src/Kernel/UserSaveStatusTest.php
+++ b/core/modules/user/tests/src/Kernel/UserSaveStatusTest.php
@@ -17,7 +17,7 @@ class UserSaveStatusTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['system', 'user', 'field'];
+  protected static $modules = ['system', 'user', 'field'];
 
   protected function setUp(): void {
     parent::setUp();
diff --git a/core/modules/user/tests/src/Kernel/UserValidationTest.php b/core/modules/user/tests/src/Kernel/UserValidationTest.php
index 10d6140eed29485f3f75ea5348360c0f48b11123..b11811cf5cabd95c4ea2416cc8474798f82fe614 100644
--- a/core/modules/user/tests/src/Kernel/UserValidationTest.php
+++ b/core/modules/user/tests/src/Kernel/UserValidationTest.php
@@ -22,7 +22,7 @@ class UserValidationTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['field', 'user', 'system'];
+  protected static $modules = ['field', 'user', 'system'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/user/tests/src/Kernel/Views/ArgumentValidateTest.php b/core/modules/user/tests/src/Kernel/Views/ArgumentValidateTest.php
index 7ff61118e9c0333bfbaf54abb291793d0f639c7e..d5af68d4289708713d2b8ab9a6afc50b431e04fb 100644
--- a/core/modules/user/tests/src/Kernel/Views/ArgumentValidateTest.php
+++ b/core/modules/user/tests/src/Kernel/Views/ArgumentValidateTest.php
@@ -21,7 +21,7 @@ class ArgumentValidateTest extends ViewsKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'node',
     'path_alias',
     'user_test_views',
diff --git a/core/modules/user/tests/src/Kernel/Views/HandlerArgumentUserUidTest.php b/core/modules/user/tests/src/Kernel/Views/HandlerArgumentUserUidTest.php
index ee29794ec023c494408dc635377cce8776a60d29..2b5df96e9e32479fffc856f3386a7294b5c3c9f6 100644
--- a/core/modules/user/tests/src/Kernel/Views/HandlerArgumentUserUidTest.php
+++ b/core/modules/user/tests/src/Kernel/Views/HandlerArgumentUserUidTest.php
@@ -20,7 +20,7 @@ class HandlerArgumentUserUidTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'system',
     'user',
     'user_test_views',
diff --git a/core/modules/user/tests/src/Kernel/Views/UserDataTest.php b/core/modules/user/tests/src/Kernel/Views/UserDataTest.php
index 948764955131aa571bf4c0f3b5bb3cf91e3befa0..b164a99d34698e4072cccacac107355e1fec3489 100644
--- a/core/modules/user/tests/src/Kernel/Views/UserDataTest.php
+++ b/core/modules/user/tests/src/Kernel/Views/UserDataTest.php
@@ -24,7 +24,7 @@ class UserDataTest extends ViewsKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['user_test_views'];
+  protected static $modules = ['user_test_views'];
 
   /**
    * Tests field handler.
diff --git a/core/modules/user/tests/src/Kernel/Views/UserKernelTestBase.php b/core/modules/user/tests/src/Kernel/Views/UserKernelTestBase.php
index c788cafbecf622759f56aab0e13f330aa4d1c9f1..3535ccf5b4bfa39fdc98c21979b0b36d55c2af44 100644
--- a/core/modules/user/tests/src/Kernel/Views/UserKernelTestBase.php
+++ b/core/modules/user/tests/src/Kernel/Views/UserKernelTestBase.php
@@ -15,7 +15,7 @@ abstract class UserKernelTestBase extends ViewsKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['user_test_views', 'user', 'system', 'field'];
+  protected static $modules = ['user_test_views', 'user', 'system', 'field'];
 
   /**
    * Users to use during this test.
diff --git a/core/modules/user/tests/src/Kernel/Views/UserViewsFieldAccessTest.php b/core/modules/user/tests/src/Kernel/Views/UserViewsFieldAccessTest.php
index 7c2054fa19708eb254f2cfba9f2e73c81c7be294..a11aedd249d104f3a0a0f0d124932608b8633897 100644
--- a/core/modules/user/tests/src/Kernel/Views/UserViewsFieldAccessTest.php
+++ b/core/modules/user/tests/src/Kernel/Views/UserViewsFieldAccessTest.php
@@ -16,7 +16,7 @@ class UserViewsFieldAccessTest extends FieldFieldAccessTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['user', 'entity_test', 'language'];
+  protected static $modules = ['user', 'entity_test', 'language'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/user/tests/src/Kernel/WhosOnlineBlockTest.php b/core/modules/user/tests/src/Kernel/WhosOnlineBlockTest.php
index 0746343fd2095316c93fc0631aaacee0e6eb41d5..b38a66523b97d7a248d22b9c2b8943bdf54a6020 100644
--- a/core/modules/user/tests/src/Kernel/WhosOnlineBlockTest.php
+++ b/core/modules/user/tests/src/Kernel/WhosOnlineBlockTest.php
@@ -16,7 +16,7 @@ class WhosOnlineBlockTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system', 'user', 'block', 'views'];
+  protected static $modules = ['system', 'user', 'block', 'views'];
 
   /**
    * The block being tested.
diff --git a/core/modules/views/tests/src/Functional/BulkFormTest.php b/core/modules/views/tests/src/Functional/BulkFormTest.php
index fbb1e8f49a3b74aed1844db0767e854ff76bf0e1..258a0175b79b424aae060971864ac2903b055e06 100644
--- a/core/modules/views/tests/src/Functional/BulkFormTest.php
+++ b/core/modules/views/tests/src/Functional/BulkFormTest.php
@@ -19,7 +19,7 @@ class BulkFormTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'action_bulk_test'];
+  protected static $modules = ['node', 'action_bulk_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Functional/DefaultViewsTest.php b/core/modules/views/tests/src/Functional/DefaultViewsTest.php
index bc8ee799cc385d24f89cd1685f932d76f023b8ad..78a1deb910b61bfdd911204d6cb40bb8c4e111db 100644
--- a/core/modules/views/tests/src/Functional/DefaultViewsTest.php
+++ b/core/modules/views/tests/src/Functional/DefaultViewsTest.php
@@ -30,7 +30,7 @@ class DefaultViewsTest extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = ['views', 'node', 'search', 'comment', 'taxonomy', 'block', 'user'];
+  protected static $modules = ['views', 'node', 'search', 'comment', 'taxonomy', 'block', 'user'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Functional/Entity/BaseFieldAccessTest.php b/core/modules/views/tests/src/Functional/Entity/BaseFieldAccessTest.php
index 5308dfbd841ad76bd5fbf0fb79b1bd1188b9fab5..0a7608a90cb8d9c420d1bfb2f3fbc25816dd39e0 100644
--- a/core/modules/views/tests/src/Functional/Entity/BaseFieldAccessTest.php
+++ b/core/modules/views/tests/src/Functional/Entity/BaseFieldAccessTest.php
@@ -25,7 +25,7 @@ class BaseFieldAccessTest extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'views', 'views_test_config', 'entity_test', 'node', 'views_entity_test',
   ];
 
diff --git a/core/modules/views/tests/src/Functional/Entity/EntityQueryAccessTest.php b/core/modules/views/tests/src/Functional/Entity/EntityQueryAccessTest.php
index 077e8c30634947bbb4d5627bb12034cbba833573..2cf2a830d0271515dac3e729dba84d6dc4a114d6 100644
--- a/core/modules/views/tests/src/Functional/Entity/EntityQueryAccessTest.php
+++ b/core/modules/views/tests/src/Functional/Entity/EntityQueryAccessTest.php
@@ -20,7 +20,7 @@ class EntityQueryAccessTest extends ViewTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'media_test_source',
     'views_test_query_access',
   ];
diff --git a/core/modules/views/tests/src/Functional/Entity/FieldEntityTest.php b/core/modules/views/tests/src/Functional/Entity/FieldEntityTest.php
index 4a0b664381f09261bcc605f79b9bed4c60b7dfea..09b3a2ee484d07f9eafed1225d36d1c28ee7d726 100644
--- a/core/modules/views/tests/src/Functional/Entity/FieldEntityTest.php
+++ b/core/modules/views/tests/src/Functional/Entity/FieldEntityTest.php
@@ -31,7 +31,7 @@ class FieldEntityTest extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'comment'];
+  protected static $modules = ['node', 'comment'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Functional/Entity/FieldEntityTranslationTest.php b/core/modules/views/tests/src/Functional/Entity/FieldEntityTranslationTest.php
index 232b68422ac5ad98d6842e75679e20acd3c09424..479b1d831125dde054783d8f4d5366831f309d74 100644
--- a/core/modules/views/tests/src/Functional/Entity/FieldEntityTranslationTest.php
+++ b/core/modules/views/tests/src/Functional/Entity/FieldEntityTranslationTest.php
@@ -19,7 +19,7 @@ class FieldEntityTranslationTest extends ViewTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['language', 'locale', 'content_translation', 'node'];
+  protected static $modules = ['language', 'locale', 'content_translation', 'node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Functional/Entity/FieldRenderedEntityTranslationTest.php b/core/modules/views/tests/src/Functional/Entity/FieldRenderedEntityTranslationTest.php
index a13a0f8f03a62860853348f0283ffaa26ce753e8..5b1cb518e8e4d1972d8e2760b852a12e7439bd75 100644
--- a/core/modules/views/tests/src/Functional/Entity/FieldRenderedEntityTranslationTest.php
+++ b/core/modules/views/tests/src/Functional/Entity/FieldRenderedEntityTranslationTest.php
@@ -16,7 +16,7 @@ class FieldRenderedEntityTranslationTest extends ViewTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['language', 'locale', 'content_translation', 'node'];
+  protected static $modules = ['language', 'locale', 'content_translation', 'node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Functional/Entity/ViewNonTranslatableEntityTest.php b/core/modules/views/tests/src/Functional/Entity/ViewNonTranslatableEntityTest.php
index e8d9094f85a415c3a4b6b6d85ced413ab9f04b64..4b43df5bdf20744cecc1d904c47d3400382ed346 100644
--- a/core/modules/views/tests/src/Functional/Entity/ViewNonTranslatableEntityTest.php
+++ b/core/modules/views/tests/src/Functional/Entity/ViewNonTranslatableEntityTest.php
@@ -18,7 +18,7 @@ class ViewNonTranslatableEntityTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'entity_test',
     'content_translation',
     'language_test',
diff --git a/core/modules/views/tests/src/Functional/GlossaryTest.php b/core/modules/views/tests/src/Functional/GlossaryTest.php
index 2adac436b2575bfb2dcba7ad715c9c84eed48c15..0c055a9355af102f40c57007738a88d475b7f332 100644
--- a/core/modules/views/tests/src/Functional/GlossaryTest.php
+++ b/core/modules/views/tests/src/Functional/GlossaryTest.php
@@ -21,7 +21,7 @@ class GlossaryTest extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = ['node'];
+  protected static $modules = ['node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Functional/Hal/ViewHalJsonAnonTest.php b/core/modules/views/tests/src/Functional/Hal/ViewHalJsonAnonTest.php
index 45e5d3acc0e229f4b87de099cf82967fc3ad888f..612474f95c5b17b4d032fd9a1c87d1bac7929515 100644
--- a/core/modules/views/tests/src/Functional/Hal/ViewHalJsonAnonTest.php
+++ b/core/modules/views/tests/src/Functional/Hal/ViewHalJsonAnonTest.php
@@ -15,7 +15,7 @@ class ViewHalJsonAnonTest extends ViewResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Functional/Hal/ViewHalJsonBasicAuthTest.php b/core/modules/views/tests/src/Functional/Hal/ViewHalJsonBasicAuthTest.php
index 9bedfb5135659e01d3703d9f38ef3b03e8c584db..345955c5fa10616986962c9d41064ea562653709 100644
--- a/core/modules/views/tests/src/Functional/Hal/ViewHalJsonBasicAuthTest.php
+++ b/core/modules/views/tests/src/Functional/Hal/ViewHalJsonBasicAuthTest.php
@@ -15,7 +15,7 @@ class ViewHalJsonBasicAuthTest extends ViewResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal', 'basic_auth'];
+  protected static $modules = ['hal', 'basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Functional/Hal/ViewHalJsonCookieTest.php b/core/modules/views/tests/src/Functional/Hal/ViewHalJsonCookieTest.php
index da2ca72b7b794c84505f10073948da62e03f4e3f..2dd38bd513edd05650ff0e7e340434a4df315247 100644
--- a/core/modules/views/tests/src/Functional/Hal/ViewHalJsonCookieTest.php
+++ b/core/modules/views/tests/src/Functional/Hal/ViewHalJsonCookieTest.php
@@ -15,7 +15,7 @@ class ViewHalJsonCookieTest extends ViewResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Functional/Handler/AreaHTTPStatusCodeTest.php b/core/modules/views/tests/src/Functional/Handler/AreaHTTPStatusCodeTest.php
index d284f4719a061697ac86dc3c583e9db3ba1374a1..7a103ad1bc75080e930251be34fd90f7ad3d4a87 100644
--- a/core/modules/views/tests/src/Functional/Handler/AreaHTTPStatusCodeTest.php
+++ b/core/modules/views/tests/src/Functional/Handler/AreaHTTPStatusCodeTest.php
@@ -25,7 +25,7 @@ class AreaHTTPStatusCodeTest extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = ['node'];
+  protected static $modules = ['node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Functional/Handler/AreaTest.php b/core/modules/views/tests/src/Functional/Handler/AreaTest.php
index 788dad1cd6075304ee9d40ce91ff396e1706ee46..0839e3e32682993228d200285fecbb4247de2937 100644
--- a/core/modules/views/tests/src/Functional/Handler/AreaTest.php
+++ b/core/modules/views/tests/src/Functional/Handler/AreaTest.php
@@ -27,7 +27,7 @@ class AreaTest extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'views_ui'];
+  protected static $modules = ['node', 'views_ui'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Functional/Handler/FieldDropButtonTest.php b/core/modules/views/tests/src/Functional/Handler/FieldDropButtonTest.php
index 1ce0d08d1ecffcb388e5aeaf9a19f80159d7700d..a3337d1cd8e1a7bc533381e7cc26a3ac81284406 100644
--- a/core/modules/views/tests/src/Functional/Handler/FieldDropButtonTest.php
+++ b/core/modules/views/tests/src/Functional/Handler/FieldDropButtonTest.php
@@ -24,7 +24,7 @@ class FieldDropButtonTest extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = ['node'];
+  protected static $modules = ['node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Functional/Handler/FieldEntityLinkBaseTest.php b/core/modules/views/tests/src/Functional/Handler/FieldEntityLinkBaseTest.php
index 085f4fe2b6a9c7f956fea5326c59f9b5f826e103..cf1504561d983e27c265b0cc30873ffd66c95516 100644
--- a/core/modules/views/tests/src/Functional/Handler/FieldEntityLinkBaseTest.php
+++ b/core/modules/views/tests/src/Functional/Handler/FieldEntityLinkBaseTest.php
@@ -23,7 +23,7 @@ class FieldEntityLinkBaseTest extends ViewTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'language'];
+  protected static $modules = ['node', 'language'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Functional/Handler/FieldEntityOperationsTest.php b/core/modules/views/tests/src/Functional/Handler/FieldEntityOperationsTest.php
index 65879adc529d2212b968fa240b82bb94223998d8..209c91309168d77e1687ae746c1a0f1116b53cab 100644
--- a/core/modules/views/tests/src/Functional/Handler/FieldEntityOperationsTest.php
+++ b/core/modules/views/tests/src/Functional/Handler/FieldEntityOperationsTest.php
@@ -26,7 +26,7 @@ class FieldEntityOperationsTest extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'language', 'views_ui'];
+  protected static $modules = ['node', 'language', 'views_ui'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Functional/Handler/FieldGroupRowsWebTest.php b/core/modules/views/tests/src/Functional/Handler/FieldGroupRowsWebTest.php
index 283125fc54de2508b1b3f4ce526a872d9f009116..f84174f2d67d91f7d64dd338bb30dd088810a8d6 100644
--- a/core/modules/views/tests/src/Functional/Handler/FieldGroupRowsWebTest.php
+++ b/core/modules/views/tests/src/Functional/Handler/FieldGroupRowsWebTest.php
@@ -26,7 +26,7 @@ class FieldGroupRowsWebTest extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = ['node'];
+  protected static $modules = ['node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Functional/Handler/FieldWebTest.php b/core/modules/views/tests/src/Functional/Handler/FieldWebTest.php
index 5ce67fee35110272a21860b2fdcae27ef39c2474..ca68c3208d9137bd92a38b6c796c978b2578618f 100644
--- a/core/modules/views/tests/src/Functional/Handler/FieldWebTest.php
+++ b/core/modules/views/tests/src/Functional/Handler/FieldWebTest.php
@@ -31,7 +31,7 @@ class FieldWebTest extends ViewTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node'];
+  protected static $modules = ['node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Functional/Handler/FilterDateTest.php b/core/modules/views/tests/src/Functional/Handler/FilterDateTest.php
index 79321b12db6c1a5a1a92258260d8aca03c061da1..ebc904afd08bc57b4e0f14298fe61d57c09f9a6b 100644
--- a/core/modules/views/tests/src/Functional/Handler/FilterDateTest.php
+++ b/core/modules/views/tests/src/Functional/Handler/FilterDateTest.php
@@ -29,7 +29,7 @@ class FilterDateTest extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'views_ui', 'datetime'];
+  protected static $modules = ['node', 'views_ui', 'datetime'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Functional/Handler/FilterPlaceholderTextTest.php b/core/modules/views/tests/src/Functional/Handler/FilterPlaceholderTextTest.php
index 4453acbac47a33a29ab1afefba1799b652c8baeb..84a371be349ad72c78dd0916df5459d5d9d3471a 100644
--- a/core/modules/views/tests/src/Functional/Handler/FilterPlaceholderTextTest.php
+++ b/core/modules/views/tests/src/Functional/Handler/FilterPlaceholderTextTest.php
@@ -21,7 +21,7 @@ class FilterPlaceholderTextTest extends ViewTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node'];
+  protected static $modules = ['node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Functional/Handler/HandlerAllTest.php b/core/modules/views/tests/src/Functional/Handler/HandlerAllTest.php
index 2f82ca599dbaba9dad942958066fc0aab530b317..7116e0e31d3753e73c0787b8c3a0fe6ff91a65ef 100644
--- a/core/modules/views/tests/src/Functional/Handler/HandlerAllTest.php
+++ b/core/modules/views/tests/src/Functional/Handler/HandlerAllTest.php
@@ -25,7 +25,7 @@ class HandlerAllTest extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'aggregator',
     'book',
     'block',
diff --git a/core/modules/views/tests/src/Functional/Handler/HandlerTest.php b/core/modules/views/tests/src/Functional/Handler/HandlerTest.php
index 0cdaffcd3b4321fd926b6d1ceae5e43697d58def..abedd71fd68c7524c48da765deb98aa9118cc25b 100644
--- a/core/modules/views/tests/src/Functional/Handler/HandlerTest.php
+++ b/core/modules/views/tests/src/Functional/Handler/HandlerTest.php
@@ -30,7 +30,7 @@ class HandlerTest extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = ['views_ui', 'comment', 'node'];
+  protected static $modules = ['views_ui', 'comment', 'node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Functional/Plugin/AccessTest.php b/core/modules/views/tests/src/Functional/Plugin/AccessTest.php
index fdf27e3222f26d0066c4dd664891ac9bbda68da8..eeb94d74fe6fb5a8a33645a3f26d5f2ca1170a91 100644
--- a/core/modules/views/tests/src/Functional/Plugin/AccessTest.php
+++ b/core/modules/views/tests/src/Functional/Plugin/AccessTest.php
@@ -27,7 +27,7 @@ class AccessTest extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = ['node'];
+  protected static $modules = ['node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Functional/Plugin/ArgumentDefaultTest.php b/core/modules/views/tests/src/Functional/Plugin/ArgumentDefaultTest.php
index 80c91d411f24cf1a625e56ac6856334288fb84d7..7c0c5e5080a73955a82a3f070aa3125c8aad9b04 100644
--- a/core/modules/views/tests/src/Functional/Plugin/ArgumentDefaultTest.php
+++ b/core/modules/views/tests/src/Functional/Plugin/ArgumentDefaultTest.php
@@ -41,7 +41,7 @@ class ArgumentDefaultTest extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'views_ui', 'block'];
+  protected static $modules = ['node', 'views_ui', 'block'];
 
   protected function setUp($import_test_views = TRUE): void {
     parent::setUp($import_test_views);
diff --git a/core/modules/views/tests/src/Functional/Plugin/CacheTagTest.php b/core/modules/views/tests/src/Functional/Plugin/CacheTagTest.php
index a23be7da9635c35ee1e11619887389fff7e9f16c..205da5d4343e364440864cc378796d90147dc46d 100644
--- a/core/modules/views/tests/src/Functional/Plugin/CacheTagTest.php
+++ b/core/modules/views/tests/src/Functional/Plugin/CacheTagTest.php
@@ -27,7 +27,7 @@ class CacheTagTest extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = ['node'];
+  protected static $modules = ['node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Functional/Plugin/CacheWebTest.php b/core/modules/views/tests/src/Functional/Plugin/CacheWebTest.php
index 532d0e7f7264444be7500a648458a16978ddc9e4..11780b86966250225875bd454393d671b925411f 100644
--- a/core/modules/views/tests/src/Functional/Plugin/CacheWebTest.php
+++ b/core/modules/views/tests/src/Functional/Plugin/CacheWebTest.php
@@ -29,7 +29,7 @@ class CacheWebTest extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = ['taxonomy'];
+  protected static $modules = ['taxonomy'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Functional/Plugin/ContextualFiltersBlockContextTest.php b/core/modules/views/tests/src/Functional/Plugin/ContextualFiltersBlockContextTest.php
index ec7d142866da78e6c0b3a581b75f60d187259753..5b4aef81c8fa30f58030f519708f6076aedb99fd 100644
--- a/core/modules/views/tests/src/Functional/Plugin/ContextualFiltersBlockContextTest.php
+++ b/core/modules/views/tests/src/Functional/Plugin/ContextualFiltersBlockContextTest.php
@@ -21,7 +21,7 @@ class ContextualFiltersBlockContextTest extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = ['block', 'block_test_views', 'views_ui', 'node'];
+  protected static $modules = ['block', 'block_test_views', 'views_ui', 'node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Functional/Plugin/DisabledDisplayTest.php b/core/modules/views/tests/src/Functional/Plugin/DisabledDisplayTest.php
index 00e33a8396984dc03dafcd1d43e450152b38f477..38bf59247f47ab8b81b21589c17c6f3797555d44 100644
--- a/core/modules/views/tests/src/Functional/Plugin/DisabledDisplayTest.php
+++ b/core/modules/views/tests/src/Functional/Plugin/DisabledDisplayTest.php
@@ -24,7 +24,7 @@ class DisabledDisplayTest extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = ['block', 'node', 'views'];
+  protected static $modules = ['block', 'node', 'views'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Functional/Plugin/DisplayAttachmentTest.php b/core/modules/views/tests/src/Functional/Plugin/DisplayAttachmentTest.php
index 807204ca63673c5c0e7e24c280bf4bd22bfebc09..79fc35835f78a3c499fd9efaf45e0eb90fc37d20 100644
--- a/core/modules/views/tests/src/Functional/Plugin/DisplayAttachmentTest.php
+++ b/core/modules/views/tests/src/Functional/Plugin/DisplayAttachmentTest.php
@@ -25,7 +25,7 @@ class DisplayAttachmentTest extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'views'];
+  protected static $modules = ['node', 'views'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Functional/Plugin/DisplayEntityReferenceTest.php b/core/modules/views/tests/src/Functional/Plugin/DisplayEntityReferenceTest.php
index 60180fa627adda2be7a15c4dbf3dcaa883581fb5..40dd50256c0feda17f0c2803c3edefa95ec078a3 100644
--- a/core/modules/views/tests/src/Functional/Plugin/DisplayEntityReferenceTest.php
+++ b/core/modules/views/tests/src/Functional/Plugin/DisplayEntityReferenceTest.php
@@ -32,7 +32,7 @@ class DisplayEntityReferenceTest extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = ['entity_test', 'field', 'views_ui'];
+  protected static $modules = ['entity_test', 'field', 'views_ui'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Functional/Plugin/DisplayFeedTest.php b/core/modules/views/tests/src/Functional/Plugin/DisplayFeedTest.php
index 437a79fdfb140ce18c7c3c6804b87d0e7e1c3d12..9449ebfd6637d783a76b6dffa0f3fc7d015e7dbd 100644
--- a/core/modules/views/tests/src/Functional/Plugin/DisplayFeedTest.php
+++ b/core/modules/views/tests/src/Functional/Plugin/DisplayFeedTest.php
@@ -29,7 +29,7 @@ class DisplayFeedTest extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = ['block', 'node', 'views', 'views_test_rss'];
+  protected static $modules = ['block', 'node', 'views', 'views_test_rss'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Functional/Plugin/DisplayFeedTranslationTest.php b/core/modules/views/tests/src/Functional/Plugin/DisplayFeedTranslationTest.php
index 5041010450edfe8d9ebbb71d3c437bd39cfec9fc..ab226d1a3dcf36bbb17250d1b4e5e956f0551b98 100644
--- a/core/modules/views/tests/src/Functional/Plugin/DisplayFeedTranslationTest.php
+++ b/core/modules/views/tests/src/Functional/Plugin/DisplayFeedTranslationTest.php
@@ -29,7 +29,7 @@ class DisplayFeedTranslationTest extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'views', 'language', 'content_translation'];
+  protected static $modules = ['node', 'views', 'language', 'content_translation'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Functional/Plugin/DisplayPageWebTest.php b/core/modules/views/tests/src/Functional/Plugin/DisplayPageWebTest.php
index 9d1f3b7e84c4247f97ad443f74ad0eaecf2f32a2..7cf0a6e312bc3be42b84041df031ae95e226b8c5 100644
--- a/core/modules/views/tests/src/Functional/Plugin/DisplayPageWebTest.php
+++ b/core/modules/views/tests/src/Functional/Plugin/DisplayPageWebTest.php
@@ -27,7 +27,7 @@ class DisplayPageWebTest extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = ['menu_ui', 'block', 'views_ui'];
+  protected static $modules = ['menu_ui', 'block', 'views_ui'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Functional/Plugin/DisplayTest.php b/core/modules/views/tests/src/Functional/Plugin/DisplayTest.php
index b15fbc997df6f787007549d346685b253d026aca..cdf595e6a4cf82e3b945cf36a41ec083debec070 100644
--- a/core/modules/views/tests/src/Functional/Plugin/DisplayTest.php
+++ b/core/modules/views/tests/src/Functional/Plugin/DisplayTest.php
@@ -26,7 +26,7 @@ class DisplayTest extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = ['views_ui', 'node', 'block'];
+  protected static $modules = ['views_ui', 'node', 'block'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Functional/Plugin/ExposedFormCheckboxesTest.php b/core/modules/views/tests/src/Functional/Plugin/ExposedFormCheckboxesTest.php
index 2788103bfe46709b3558c98d40a4617c956c0e9b..c332c41b1cf3473c76c0652a27e6e9a7317d4f5a 100644
--- a/core/modules/views/tests/src/Functional/Plugin/ExposedFormCheckboxesTest.php
+++ b/core/modules/views/tests/src/Functional/Plugin/ExposedFormCheckboxesTest.php
@@ -27,7 +27,7 @@ class ExposedFormCheckboxesTest extends ViewTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'views_ui', 'taxonomy'];
+  protected static $modules = ['node', 'views_ui', 'taxonomy'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Functional/Plugin/ExposedFormTest.php b/core/modules/views/tests/src/Functional/Plugin/ExposedFormTest.php
index b1ea205c1da9fe135259b6f4e4fa55f1077604e7..2c21ee18a428750d37aa4a7a18a6ac99c8a17ba1 100644
--- a/core/modules/views/tests/src/Functional/Plugin/ExposedFormTest.php
+++ b/core/modules/views/tests/src/Functional/Plugin/ExposedFormTest.php
@@ -31,7 +31,7 @@ class ExposedFormTest extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'views_ui', 'block', 'entity_test'];
+  protected static $modules = ['node', 'views_ui', 'block', 'entity_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Functional/Plugin/FilterTest.php b/core/modules/views/tests/src/Functional/Plugin/FilterTest.php
index 77079fbb5b7a9a61401ec717d3936dd4c58fef80..450deb0b16f8197c16a0a07c7480dfadeec67b3c 100644
--- a/core/modules/views/tests/src/Functional/Plugin/FilterTest.php
+++ b/core/modules/views/tests/src/Functional/Plugin/FilterTest.php
@@ -27,7 +27,7 @@ class FilterTest extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = ['views_ui', 'node'];
+  protected static $modules = ['views_ui', 'node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Functional/Plugin/MenuLinkTest.php b/core/modules/views/tests/src/Functional/Plugin/MenuLinkTest.php
index 3b6e02635f22970250c16a87012b72dec6e3c331..937b4db64c3884947efd10edccc34dc871795453 100644
--- a/core/modules/views/tests/src/Functional/Plugin/MenuLinkTest.php
+++ b/core/modules/views/tests/src/Functional/Plugin/MenuLinkTest.php
@@ -24,7 +24,7 @@ class MenuLinkTest extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = ['views', 'views_ui', 'user', 'node', 'menu_ui', 'block'];
+  protected static $modules = ['views', 'views_ui', 'user', 'node', 'menu_ui', 'block'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Functional/Plugin/MiniPagerTest.php b/core/modules/views/tests/src/Functional/Plugin/MiniPagerTest.php
index 5fac36447d21da6668c381b5bdb0010cdb6badab..524e5114b1a11909f3d7fc588fc4e318b597c47a 100644
--- a/core/modules/views/tests/src/Functional/Plugin/MiniPagerTest.php
+++ b/core/modules/views/tests/src/Functional/Plugin/MiniPagerTest.php
@@ -25,7 +25,7 @@ class MiniPagerTest extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = ['node'];
+  protected static $modules = ['node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Functional/Plugin/NumericFormatPluralTest.php b/core/modules/views/tests/src/Functional/Plugin/NumericFormatPluralTest.php
index 1fd25b15857ab734f163a89286b7a0ba7a25049f..9fe66be0d5330519c4d90f89cfdedc6540aacfd0 100644
--- a/core/modules/views/tests/src/Functional/Plugin/NumericFormatPluralTest.php
+++ b/core/modules/views/tests/src/Functional/Plugin/NumericFormatPluralTest.php
@@ -19,7 +19,7 @@ class NumericFormatPluralTest extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = ['views_ui', 'file', 'language', 'locale'];
+  protected static $modules = ['views_ui', 'file', 'language', 'locale'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Functional/Plugin/PagerTest.php b/core/modules/views/tests/src/Functional/Plugin/PagerTest.php
index c7c68674010255eaf0b817cf3dc2bf33f27c2a77..07e86145ba9183d581d936b94c7c7f8cce40c639 100644
--- a/core/modules/views/tests/src/Functional/Plugin/PagerTest.php
+++ b/core/modules/views/tests/src/Functional/Plugin/PagerTest.php
@@ -28,7 +28,7 @@ class PagerTest extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'views_ui'];
+  protected static $modules = ['node', 'views_ui'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Functional/Plugin/StyleOpmlTest.php b/core/modules/views/tests/src/Functional/Plugin/StyleOpmlTest.php
index ac46448310ddd6fd3ce7814039e23a1eba67eb8f..c3da72f771ddebefc62ce3803a1f70f2ab978e26 100644
--- a/core/modules/views/tests/src/Functional/Plugin/StyleOpmlTest.php
+++ b/core/modules/views/tests/src/Functional/Plugin/StyleOpmlTest.php
@@ -24,7 +24,7 @@ class StyleOpmlTest extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = ['aggregator'];
+  protected static $modules = ['aggregator'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Functional/Plugin/StyleSummaryTest.php b/core/modules/views/tests/src/Functional/Plugin/StyleSummaryTest.php
index bc0e945b2903a65a70b593b250092627dcf0efeb..af143c97ee5dd29d2e4a281d7b527f35bff7b0be 100644
--- a/core/modules/views/tests/src/Functional/Plugin/StyleSummaryTest.php
+++ b/core/modules/views/tests/src/Functional/Plugin/StyleSummaryTest.php
@@ -15,7 +15,7 @@ class StyleSummaryTest extends ViewTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['entity_test', 'views_ui'];
+  protected static $modules = ['entity_test', 'views_ui'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Functional/Plugin/ViewsBulkTest.php b/core/modules/views/tests/src/Functional/Plugin/ViewsBulkTest.php
index ab10cc3b6608c341b772804bbd5d55513818889c..49f74c71518dac9516700e65364a4bee28153700 100644
--- a/core/modules/views/tests/src/Functional/Plugin/ViewsBulkTest.php
+++ b/core/modules/views/tests/src/Functional/Plugin/ViewsBulkTest.php
@@ -23,7 +23,7 @@ class ViewsBulkTest extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'views'];
+  protected static $modules = ['node', 'views'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Functional/Plugin/ViewsFormTest.php b/core/modules/views/tests/src/Functional/Plugin/ViewsFormTest.php
index d8556ca1bc9b9d96433fde22ce5ef5142b659da0..150537851a08062c30f83826b5b11102bc91ba6b 100644
--- a/core/modules/views/tests/src/Functional/Plugin/ViewsFormTest.php
+++ b/core/modules/views/tests/src/Functional/Plugin/ViewsFormTest.php
@@ -16,7 +16,7 @@ class ViewsFormTest extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = ['action_bulk_test'];
+  protected static $modules = ['action_bulk_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Functional/RenderCacheWebTest.php b/core/modules/views/tests/src/Functional/RenderCacheWebTest.php
index 66cb3d5e4d1434938cf4a1504e0233cb4fba745b..68715f3bb97f04c3d2eb6bdd573c5b17750992e0 100644
--- a/core/modules/views/tests/src/Functional/RenderCacheWebTest.php
+++ b/core/modules/views/tests/src/Functional/RenderCacheWebTest.php
@@ -14,7 +14,7 @@ class RenderCacheWebTest extends ViewTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'block'];
+  protected static $modules = ['node', 'block'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Functional/Rest/ViewJsonBasicAuthTest.php b/core/modules/views/tests/src/Functional/Rest/ViewJsonBasicAuthTest.php
index c6078203dad972e62ee8dadd5efd199c6436b201..80822b08548a2aedb43fcc09497a85c232742b28 100644
--- a/core/modules/views/tests/src/Functional/Rest/ViewJsonBasicAuthTest.php
+++ b/core/modules/views/tests/src/Functional/Rest/ViewJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class ViewJsonBasicAuthTest extends ViewResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Functional/Rest/ViewResourceTestBase.php b/core/modules/views/tests/src/Functional/Rest/ViewResourceTestBase.php
index 8e036c26f1b866a26c9932df3f8af09eeb2f5d3b..c3f3a02bf494d46876148fc2b2a4bffc5c6a4780 100644
--- a/core/modules/views/tests/src/Functional/Rest/ViewResourceTestBase.php
+++ b/core/modules/views/tests/src/Functional/Rest/ViewResourceTestBase.php
@@ -10,7 +10,7 @@ abstract class ViewResourceTestBase extends EntityResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['views', 'views_ui'];
+  protected static $modules = ['views', 'views_ui'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Functional/Rest/ViewXmlBasicAuthTest.php b/core/modules/views/tests/src/Functional/Rest/ViewXmlBasicAuthTest.php
index 52ab59f0b11e4c97e9114bedc671987509ea1647..ffa68653825d6701dd4a84edca5523d7b87a2589 100644
--- a/core/modules/views/tests/src/Functional/Rest/ViewXmlBasicAuthTest.php
+++ b/core/modules/views/tests/src/Functional/Rest/ViewXmlBasicAuthTest.php
@@ -16,7 +16,7 @@ class ViewXmlBasicAuthTest extends ViewResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Functional/SearchIntegrationTest.php b/core/modules/views/tests/src/Functional/SearchIntegrationTest.php
index 134417329d1b87bf1521d4239d3681fa2abcb48c..d5f34ef55e7df6b033d25db068d1b93e49a89f96 100644
--- a/core/modules/views/tests/src/Functional/SearchIntegrationTest.php
+++ b/core/modules/views/tests/src/Functional/SearchIntegrationTest.php
@@ -19,7 +19,7 @@ class SearchIntegrationTest extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'search'];
+  protected static $modules = ['node', 'search'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Functional/SearchMultilingualTest.php b/core/modules/views/tests/src/Functional/SearchMultilingualTest.php
index 78a6c3f2c617142b13e108ec1aca0fa835e6bede..17eea72e39cda8b401120469ab0de9a7892758d7 100644
--- a/core/modules/views/tests/src/Functional/SearchMultilingualTest.php
+++ b/core/modules/views/tests/src/Functional/SearchMultilingualTest.php
@@ -20,7 +20,7 @@ class SearchMultilingualTest extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'search', 'language', 'content_translation'];
+  protected static $modules = ['node', 'search', 'language', 'content_translation'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Functional/TaxonomyGlossaryTest.php b/core/modules/views/tests/src/Functional/TaxonomyGlossaryTest.php
index cd904c55a98a994c9a65f070eeafdb66e93f33c3..785f49d3af0af5f3afea8c08b985a8920aba6a2b 100644
--- a/core/modules/views/tests/src/Functional/TaxonomyGlossaryTest.php
+++ b/core/modules/views/tests/src/Functional/TaxonomyGlossaryTest.php
@@ -18,7 +18,7 @@ class TaxonomyGlossaryTest extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = ['taxonomy'];
+  protected static $modules = ['taxonomy'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Functional/UserBatchActionTest.php b/core/modules/views/tests/src/Functional/UserBatchActionTest.php
index efb78079ae7e353cb1b34d255da1b04c6387ed36..ba5b576b6125aba380b3bb6c59d0a1a8f81e0e41 100644
--- a/core/modules/views/tests/src/Functional/UserBatchActionTest.php
+++ b/core/modules/views/tests/src/Functional/UserBatchActionTest.php
@@ -17,7 +17,7 @@ class UserBatchActionTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['user', 'user_batch_action_test', 'views'];
+  protected static $modules = ['user', 'user_batch_action_test', 'views'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Functional/UserPathTest.php b/core/modules/views/tests/src/Functional/UserPathTest.php
index d31452bdae448dab6dfe41e731e93ebe5235962d..d422527d4df5f7f274551867fd687736f6e48085 100644
--- a/core/modules/views/tests/src/Functional/UserPathTest.php
+++ b/core/modules/views/tests/src/Functional/UserPathTest.php
@@ -12,7 +12,7 @@ class UserPathTest extends ViewTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['views', 'user'];
+  protected static $modules = ['views', 'user'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Functional/ViewTestBase.php b/core/modules/views/tests/src/Functional/ViewTestBase.php
index 186a8fea1e9ae32355aebb34c5c06966876fdf77..157bdd88128ba8dbbb017c0b5e5ea85284af09b4 100644
--- a/core/modules/views/tests/src/Functional/ViewTestBase.php
+++ b/core/modules/views/tests/src/Functional/ViewTestBase.php
@@ -29,7 +29,7 @@ abstract class ViewTestBase extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['views', 'views_test_config'];
+  protected static $modules = ['views', 'views_test_config'];
 
   protected function setUp($import_test_views = TRUE) {
     parent::setUp();
diff --git a/core/modules/views/tests/src/Functional/ViewsEscapingTest.php b/core/modules/views/tests/src/Functional/ViewsEscapingTest.php
index 93787e326232790e43b1d8d8665508189af02b46..9a1b90bbd4dab4471a8ff6e51a5e86f69df68f88 100644
--- a/core/modules/views/tests/src/Functional/ViewsEscapingTest.php
+++ b/core/modules/views/tests/src/Functional/ViewsEscapingTest.php
@@ -30,7 +30,7 @@ class ViewsEscapingTest extends ViewTestBase {
    *
    * @see \Drupal\simpletest\WebTestBase::setup()
    */
-  public static $modules = ['views', 'theme_test'];
+  protected static $modules = ['views', 'theme_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Functional/ViewsNoResultsBehaviorTest.php b/core/modules/views/tests/src/Functional/ViewsNoResultsBehaviorTest.php
index 58673c7fa9deec9c7fcf53b961e6e0da1f3ef304..e6ef5590f3eb64f2a6113f62c16754e86cf112b3 100644
--- a/core/modules/views/tests/src/Functional/ViewsNoResultsBehaviorTest.php
+++ b/core/modules/views/tests/src/Functional/ViewsNoResultsBehaviorTest.php
@@ -14,7 +14,7 @@ class ViewsNoResultsBehaviorTest extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'user'];
+  protected static $modules = ['node', 'user'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Functional/ViewsThemeIntegrationTest.php b/core/modules/views/tests/src/Functional/ViewsThemeIntegrationTest.php
index aa0d6886eaec2967ee4b43684a8de67b54aeedc4..cd6b998577971b2b555497901d29f37bd980f796 100644
--- a/core/modules/views/tests/src/Functional/ViewsThemeIntegrationTest.php
+++ b/core/modules/views/tests/src/Functional/ViewsThemeIntegrationTest.php
@@ -33,7 +33,7 @@ class ViewsThemeIntegrationTest extends ViewTestBase {
    *
    * @see \Drupal\simpletest\WebTestBase::setup()
    */
-  public static $modules = ['views', 'theme_test'];
+  protected static $modules = ['views', 'theme_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Functional/Wizard/EntityTestRevisionTest.php b/core/modules/views/tests/src/Functional/Wizard/EntityTestRevisionTest.php
index 2e59b61dbd27a19f7b2e6754ec91206a805f3b08..bfd1ad933e4bbaa14f1c69e5d98b023f8c1d2a26 100644
--- a/core/modules/views/tests/src/Functional/Wizard/EntityTestRevisionTest.php
+++ b/core/modules/views/tests/src/Functional/Wizard/EntityTestRevisionTest.php
@@ -12,7 +12,7 @@ class EntityTestRevisionTest extends WizardTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['entity_test'];
+  protected static $modules = ['entity_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Functional/Wizard/TaggedWithTest.php b/core/modules/views/tests/src/Functional/Wizard/TaggedWithTest.php
index ce56df6cd3b1b99348907d67b584b274a25a41e8..fb560a5a49162ebb6aeec2d5cc268b3fd79432bf 100644
--- a/core/modules/views/tests/src/Functional/Wizard/TaggedWithTest.php
+++ b/core/modules/views/tests/src/Functional/Wizard/TaggedWithTest.php
@@ -21,7 +21,7 @@ class TaggedWithTest extends WizardTestBase {
    *
    * @var array
    */
-  public static $modules = ['taxonomy'];
+  protected static $modules = ['taxonomy'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Functional/Wizard/WizardTestBase.php b/core/modules/views/tests/src/Functional/Wizard/WizardTestBase.php
index 0178c08c25e9314a95e5ef9050c42e0f33041083..924db29c604173097bf62cc530c59d002061b2a1 100644
--- a/core/modules/views/tests/src/Functional/Wizard/WizardTestBase.php
+++ b/core/modules/views/tests/src/Functional/Wizard/WizardTestBase.php
@@ -14,7 +14,7 @@ abstract class WizardTestBase extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'views_ui', 'block', 'rest'];
+  protected static $modules = ['node', 'views_ui', 'block', 'rest'];
 
   protected function setUp($import_test_views = TRUE) {
     parent::setUp($import_test_views);
diff --git a/core/modules/views/tests/src/FunctionalJavascript/BlockExposedFilterAJAXTest.php b/core/modules/views/tests/src/FunctionalJavascript/BlockExposedFilterAJAXTest.php
index 79c723b405c16a4af3ddfb39ccad9fd8dd81b495..86d7b5adf918cb09deaf899033c3cd5cceaa3fc0 100644
--- a/core/modules/views/tests/src/FunctionalJavascript/BlockExposedFilterAJAXTest.php
+++ b/core/modules/views/tests/src/FunctionalJavascript/BlockExposedFilterAJAXTest.php
@@ -20,7 +20,7 @@ class BlockExposedFilterAJAXTest extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'views', 'block', 'views_test_config'];
+  protected static $modules = ['node', 'views', 'block', 'views_test_config'];
 
   public static $testViews = ['test_block_exposed_ajax', 'test_block_exposed_ajax_with_page'];
 
diff --git a/core/modules/views/tests/src/FunctionalJavascript/ClickSortingAJAXTest.php b/core/modules/views/tests/src/FunctionalJavascript/ClickSortingAJAXTest.php
index bd649eafb541747bf2150203c109de49b7708348..f0ea436c11f0b2bff972c6cff026f0e722b85e76 100644
--- a/core/modules/views/tests/src/FunctionalJavascript/ClickSortingAJAXTest.php
+++ b/core/modules/views/tests/src/FunctionalJavascript/ClickSortingAJAXTest.php
@@ -20,7 +20,7 @@ class ClickSortingAJAXTest extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'views', 'views_test_config'];
+  protected static $modules = ['node', 'views', 'views_test_config'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/FunctionalJavascript/ExposedFilterAJAXTest.php b/core/modules/views/tests/src/FunctionalJavascript/ExposedFilterAJAXTest.php
index 94dce9ce35f05d8a5be86262ae7ee3ae340b5918..25d4d907188bfca5cd4acb3f8c0a2493ac18bdd9 100644
--- a/core/modules/views/tests/src/FunctionalJavascript/ExposedFilterAJAXTest.php
+++ b/core/modules/views/tests/src/FunctionalJavascript/ExposedFilterAJAXTest.php
@@ -19,7 +19,7 @@ class ExposedFilterAJAXTest extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'views', 'views_test_modal'];
+  protected static $modules = ['node', 'views', 'views_test_modal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/FunctionalJavascript/GlossaryViewTest.php b/core/modules/views/tests/src/FunctionalJavascript/GlossaryViewTest.php
index 65b4be3d71c887b4ecf41662b24746ce202c2aeb..470e82bc9852c49d3d413a2f0b3bb1ca879d20d1 100644
--- a/core/modules/views/tests/src/FunctionalJavascript/GlossaryViewTest.php
+++ b/core/modules/views/tests/src/FunctionalJavascript/GlossaryViewTest.php
@@ -22,7 +22,7 @@ class GlossaryViewTest extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['language', 'node', 'views', 'views_test_config'];
+  protected static $modules = ['language', 'node', 'views', 'views_test_config'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/FunctionalJavascript/PaginationAJAXTest.php b/core/modules/views/tests/src/FunctionalJavascript/PaginationAJAXTest.php
index 20e82af6c67f0676f21af4a12ae0bd6a2d0896bf..94e2888f43a3adecc738950dd66a07c581795d48 100644
--- a/core/modules/views/tests/src/FunctionalJavascript/PaginationAJAXTest.php
+++ b/core/modules/views/tests/src/FunctionalJavascript/PaginationAJAXTest.php
@@ -20,7 +20,7 @@ class PaginationAJAXTest extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'views', 'views_test_config'];
+  protected static $modules = ['node', 'views', 'views_test_config'];
 
   /**
    * {@inheritdoc}
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 cf54b98a48b0470574ba4234e95f673d81836b94..e4e3fc74e7b5d42f749d8d166c54c74400ab3ec7 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
@@ -15,7 +15,7 @@ class ContextualFilterTest extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'views', 'views_ui', 'views_test_config'];
+  protected static $modules = ['node', 'views', 'views_ui', 'views_test_config'];
 
   /**
    * {@inheritdoc}
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 c4a5bcde384ef6ed5cd6e5e9422c86279f2a1bfd..4f9294b7294cfcd607414cd3556681c3bb010d7d 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
@@ -19,7 +19,7 @@ class FieldTest extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'views', 'views_ui', 'views_test_config'];
+  protected static $modules = ['node', 'views', 'views_ui', 'views_test_config'];
 
   /**
    * {@inheritdoc}
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 645d563dfdea33c2e051b026890350bad636b341..151f9e06feca0fbd05231ec2456e8c03e5df13fc 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
@@ -17,7 +17,7 @@ class GroupedExposedFilterTest extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'views', 'views_ui', 'user', 'views_test_config'];
+  protected static $modules = ['node', 'views', 'views_ui', 'user', 'views_test_config'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Kernel/Entity/EntityViewsWithMultivalueBasefieldTest.php b/core/modules/views/tests/src/Kernel/Entity/EntityViewsWithMultivalueBasefieldTest.php
index 6fdf9fcbce74c1eb0284e5e11a7a522e3b70884a..33ace5ab8a8f8c3db8d8ffafa711f037fe82786e 100644
--- a/core/modules/views/tests/src/Kernel/Entity/EntityViewsWithMultivalueBasefieldTest.php
+++ b/core/modules/views/tests/src/Kernel/Entity/EntityViewsWithMultivalueBasefieldTest.php
@@ -16,7 +16,7 @@ class EntityViewsWithMultivalueBasefieldTest extends ViewsKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['entity_test'];
+  protected static $modules = ['entity_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Kernel/Entity/FilterEntityBundleTest.php b/core/modules/views/tests/src/Kernel/Entity/FilterEntityBundleTest.php
index 31162c66117aff5165683177dd7032f99b068ec8..19c9e5bde314f66da942a87cc8d331b21facd427 100644
--- a/core/modules/views/tests/src/Kernel/Entity/FilterEntityBundleTest.php
+++ b/core/modules/views/tests/src/Kernel/Entity/FilterEntityBundleTest.php
@@ -22,7 +22,7 @@ class FilterEntityBundleTest extends ViewsKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node'];
+  protected static $modules = ['node'];
 
   /**
    * Tests the generic bundle filter.
diff --git a/core/modules/views/tests/src/Kernel/Entity/LatestRevisionFilterTest.php b/core/modules/views/tests/src/Kernel/Entity/LatestRevisionFilterTest.php
index 91177746aee191e86ee4b9110457f79467c412a6..a29f589a7920858f669116c434edf60c318c0898 100644
--- a/core/modules/views/tests/src/Kernel/Entity/LatestRevisionFilterTest.php
+++ b/core/modules/views/tests/src/Kernel/Entity/LatestRevisionFilterTest.php
@@ -23,7 +23,7 @@ class LatestRevisionFilterTest extends ViewsKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node'];
+  protected static $modules = ['node'];
 
   /**
    * Tests the 'Latest revision' filter.
diff --git a/core/modules/views/tests/src/Kernel/Entity/LatestTranslationAffectedRevisionTest.php b/core/modules/views/tests/src/Kernel/Entity/LatestTranslationAffectedRevisionTest.php
index 787a0d8d156e7aee59f226433caea13bbaeabbb9..8575ecc1245681167103897c119bb798849b7da0 100644
--- a/core/modules/views/tests/src/Kernel/Entity/LatestTranslationAffectedRevisionTest.php
+++ b/core/modules/views/tests/src/Kernel/Entity/LatestTranslationAffectedRevisionTest.php
@@ -23,7 +23,7 @@ class LatestTranslationAffectedRevisionTest extends ViewsKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'node',
     'system',
     'language',
diff --git a/core/modules/views/tests/src/Kernel/Entity/RowEntityRenderersTest.php b/core/modules/views/tests/src/Kernel/Entity/RowEntityRenderersTest.php
index 3234439ed5c23f8d006c41d98cecb0f679fe16c8..6969fa8b37fb712d83d775e8a81958d7d855ee16 100644
--- a/core/modules/views/tests/src/Kernel/Entity/RowEntityRenderersTest.php
+++ b/core/modules/views/tests/src/Kernel/Entity/RowEntityRenderersTest.php
@@ -21,7 +21,7 @@ class RowEntityRenderersTest extends ViewsKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['field', 'filter', 'text', 'node', 'user', 'language', 'views_test_language'];
+  protected static $modules = ['field', 'filter', 'text', 'node', 'user', 'language', 'views_test_language'];
 
   /**
    * Views used by this test.
diff --git a/core/modules/views/tests/src/Kernel/Entity/ViewEntityDependenciesTest.php b/core/modules/views/tests/src/Kernel/Entity/ViewEntityDependenciesTest.php
index 420a5778052ac1ed3e4c7e370346227ad2d54bfb..9e4053d1aeb172c435a729ae1884a37f30312f15 100644
--- a/core/modules/views/tests/src/Kernel/Entity/ViewEntityDependenciesTest.php
+++ b/core/modules/views/tests/src/Kernel/Entity/ViewEntityDependenciesTest.php
@@ -29,7 +29,7 @@ class ViewEntityDependenciesTest extends ViewsKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'comment', 'user', 'field', 'text', 'search'];
+  protected static $modules = ['node', 'comment', 'user', 'field', 'text', 'search'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Kernel/EventSubscriber/ViewsEntitySchemaSubscriberIntegrationTest.php b/core/modules/views/tests/src/Kernel/EventSubscriber/ViewsEntitySchemaSubscriberIntegrationTest.php
index 470b6028aa67f14b15937beb61b22523d406b936..bc0dfb2d2c0a0e626f24bc65387495f9e0b77a67 100644
--- a/core/modules/views/tests/src/Kernel/EventSubscriber/ViewsEntitySchemaSubscriberIntegrationTest.php
+++ b/core/modules/views/tests/src/Kernel/EventSubscriber/ViewsEntitySchemaSubscriberIntegrationTest.php
@@ -26,7 +26,7 @@ class ViewsEntitySchemaSubscriberIntegrationTest extends ViewsKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['entity_test', 'entity_test_update', 'user', 'text'];
+  protected static $modules = ['entity_test', 'entity_test_update', 'user', 'text'];
 
   /**
    * Views used by this test.
diff --git a/core/modules/views/tests/src/Kernel/FieldApiDataTest.php b/core/modules/views/tests/src/Kernel/FieldApiDataTest.php
index b014d1cdea4a316eb5d87736bae5f98955758b9f..1df711aaeb29bd9d2cc6802516b961d9b2fa693c 100644
--- a/core/modules/views/tests/src/Kernel/FieldApiDataTest.php
+++ b/core/modules/views/tests/src/Kernel/FieldApiDataTest.php
@@ -21,7 +21,7 @@ class FieldApiDataTest extends ViewsKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'field',
     'filter',
     'language',
diff --git a/core/modules/views/tests/src/Kernel/Handler/AreaDisplayLinkTest.php b/core/modules/views/tests/src/Kernel/Handler/AreaDisplayLinkTest.php
index dda045db1a1430199056a3f95f743dcbe2ee1f09..2ce2465550f83e295a5cb31075a3b4a6d7457cc5 100644
--- a/core/modules/views/tests/src/Kernel/Handler/AreaDisplayLinkTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/AreaDisplayLinkTest.php
@@ -27,7 +27,7 @@ class AreaDisplayLinkTest extends ViewsKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system', 'user', 'filter'];
+  protected static $modules = ['system', 'user', 'filter'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Kernel/Handler/AreaEmptyTest.php b/core/modules/views/tests/src/Kernel/Handler/AreaEmptyTest.php
index 1d47c21b3da548529a594ace025fddaf99a24968..a6ea2573c7227f35a5b9c5be60d9d1f0e5c28cd4 100644
--- a/core/modules/views/tests/src/Kernel/Handler/AreaEmptyTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/AreaEmptyTest.php
@@ -16,7 +16,7 @@ class AreaEmptyTest extends ViewsKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node'];
+  protected static $modules = ['node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Kernel/Handler/AreaEntityTest.php b/core/modules/views/tests/src/Kernel/Handler/AreaEntityTest.php
index 642c6fda6d8867a756786fc2edf9c6bb7c45655e..a6898e4679c6157bbf505286f5a742df09fa816c 100644
--- a/core/modules/views/tests/src/Kernel/Handler/AreaEntityTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/AreaEntityTest.php
@@ -25,7 +25,7 @@ class AreaEntityTest extends ViewsKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['entity_test', 'user', 'block'];
+  protected static $modules = ['entity_test', 'user', 'block'];
 
   /**
    * Views used by this test.
diff --git a/core/modules/views/tests/src/Kernel/Handler/AreaOrderTest.php b/core/modules/views/tests/src/Kernel/Handler/AreaOrderTest.php
index ca36840c5c9d90d4bcbe124ed13e5347903aa330..608054e8db689e94a3e66751060982d89136da72 100644
--- a/core/modules/views/tests/src/Kernel/Handler/AreaOrderTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/AreaOrderTest.php
@@ -21,7 +21,7 @@ class AreaOrderTest extends ViewsKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['user', 'block'];
+  protected static $modules = ['user', 'block'];
 
   /**
    * Views used by this test.
diff --git a/core/modules/views/tests/src/Kernel/Handler/AreaTextTest.php b/core/modules/views/tests/src/Kernel/Handler/AreaTextTest.php
index db0e9d92132cec354cb2cbf675c8ae4896e3d1ed..440138b4ff2abc059e6dad371178ee5f4efd0fcf 100644
--- a/core/modules/views/tests/src/Kernel/Handler/AreaTextTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/AreaTextTest.php
@@ -13,7 +13,7 @@
  */
 class AreaTextTest extends ViewsKernelTestBase {
 
-  public static $modules = ['system', 'user', 'filter'];
+  protected static $modules = ['system', 'user', 'filter'];
 
   /**
    * Views used by this test.
diff --git a/core/modules/views/tests/src/Kernel/Handler/AreaViewTest.php b/core/modules/views/tests/src/Kernel/Handler/AreaViewTest.php
index a3ab52960b29e66392a0ccd6c7f89eaa7628c7e7..2b57885e6261ed78ca2d618e643e154437c75fe0 100644
--- a/core/modules/views/tests/src/Kernel/Handler/AreaViewTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/AreaViewTest.php
@@ -18,7 +18,7 @@ class AreaViewTest extends ViewsKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['user'];
+  protected static $modules = ['user'];
 
   /**
    * Views used by this test.
diff --git a/core/modules/views/tests/src/Kernel/Handler/ArgumentStringTest.php b/core/modules/views/tests/src/Kernel/Handler/ArgumentStringTest.php
index e08337a3448ff4f9a41466b2af832f0c705b827e..59ab946656a7639043ea9e9b162c2d0df9ab0b67 100644
--- a/core/modules/views/tests/src/Kernel/Handler/ArgumentStringTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/ArgumentStringTest.php
@@ -22,7 +22,7 @@ class ArgumentStringTest extends ViewsKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'node',
   ];
 
diff --git a/core/modules/views/tests/src/Kernel/Handler/ComputedFieldTest.php b/core/modules/views/tests/src/Kernel/Handler/ComputedFieldTest.php
index 8c3f6f6219a11d458969c6ae368ccd0eae015d8f..5b1e81b99ccb65966c7238f3de4e8fdb442b3cc7 100644
--- a/core/modules/views/tests/src/Kernel/Handler/ComputedFieldTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/ComputedFieldTest.php
@@ -26,7 +26,7 @@ class ComputedFieldTest extends ViewsKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['entity_test'];
+  protected static $modules = ['entity_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Kernel/Handler/EntityTestViewsFieldAccessTest.php b/core/modules/views/tests/src/Kernel/Handler/EntityTestViewsFieldAccessTest.php
index 418d4b3491cef09afb24f0277d339ae0819213d3..e2812f99e6924d5c2ca907186801bf2a4a9a075a 100644
--- a/core/modules/views/tests/src/Kernel/Handler/EntityTestViewsFieldAccessTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/EntityTestViewsFieldAccessTest.php
@@ -14,7 +14,7 @@ class EntityTestViewsFieldAccessTest extends FieldFieldAccessTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['entity_test'];
+  protected static $modules = ['entity_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Kernel/Handler/FieldCounterTest.php b/core/modules/views/tests/src/Kernel/Handler/FieldCounterTest.php
index ed669667d47a2c65055f7f9793068b62516c1aa7..5ae9c974b816bda79d70af08cf90a0822077b02a 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FieldCounterTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FieldCounterTest.php
@@ -18,7 +18,7 @@ class FieldCounterTest extends ViewsKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['user'];
+  protected static $modules = ['user'];
 
   /**
    * Views used by this test.
diff --git a/core/modules/views/tests/src/Kernel/Handler/FieldDropbuttonTest.php b/core/modules/views/tests/src/Kernel/Handler/FieldDropbuttonTest.php
index 2590f1bb4740e7a8e5eba12bbba6a5d781b98448..df5bd58d2f3129c218a98b618b48d980a239a1ab 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FieldDropbuttonTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FieldDropbuttonTest.php
@@ -29,7 +29,7 @@ class FieldDropbuttonTest extends ViewsKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'system',
     'user',
     'node',
diff --git a/core/modules/views/tests/src/Kernel/Handler/FieldEntityLinkTest.php b/core/modules/views/tests/src/Kernel/Handler/FieldEntityLinkTest.php
index d6e124c1cd957d1367239267616272ab07fd25a9..3f8ced018b56d4ffd699b2d87a80b60db38fa2ed 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FieldEntityLinkTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FieldEntityLinkTest.php
@@ -30,7 +30,7 @@ class FieldEntityLinkTest extends ViewsKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['user', 'entity_test'];
+  protected static $modules = ['user', 'entity_test'];
 
   /**
    * An admin user account.
diff --git a/core/modules/views/tests/src/Kernel/Handler/FieldFieldAccessTestBase.php b/core/modules/views/tests/src/Kernel/Handler/FieldFieldAccessTestBase.php
index 327bfc14814f8bc64fafffd4c5aee4552410e45d..1f9b017bdbb736a8a4ab5de5a9cf697e61cde0c0 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FieldFieldAccessTestBase.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FieldFieldAccessTestBase.php
@@ -30,7 +30,7 @@ abstract class FieldFieldAccessTestBase extends ViewsKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['user'];
+  protected static $modules = ['user'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Kernel/Handler/FieldFieldTest.php b/core/modules/views/tests/src/Kernel/Handler/FieldFieldTest.php
index 77990adedaa522029e3efc32dc610d5fe7def36d..4c8a52ab10aa7b188c301ebf50e2bf459e440b27 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FieldFieldTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FieldFieldTest.php
@@ -24,7 +24,7 @@ class FieldFieldTest extends ViewsKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['field', 'entity_test', 'user', 'views_test_formatter', 'views_entity_test'];
+  protected static $modules = ['field', 'entity_test', 'user', 'views_test_formatter', 'views_entity_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Kernel/Handler/FieldGroupRowsTest.php b/core/modules/views/tests/src/Kernel/Handler/FieldGroupRowsTest.php
index ade02556e0053c8838b43502c86c45fc2fb41fce..588d1289897ae2cf80bb81f0336a3a9365d2943d 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FieldGroupRowsTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FieldGroupRowsTest.php
@@ -23,7 +23,7 @@ class FieldGroupRowsTest extends ViewsKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'field',
     'filter',
     'node',
diff --git a/core/modules/views/tests/src/Kernel/Handler/FieldKernelTest.php b/core/modules/views/tests/src/Kernel/Handler/FieldKernelTest.php
index faee4e66a6a89ef80979704eca5b973f7d4336e6..de943e1288204234a626ec01a80e31ef0442b714 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FieldKernelTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FieldKernelTest.php
@@ -16,7 +16,7 @@
  */
 class FieldKernelTest extends ViewsKernelTestBase {
 
-  public static $modules = ['user'];
+  protected static $modules = ['user'];
 
   /**
    * Views used by this test.
diff --git a/core/modules/views/tests/src/Kernel/Handler/FieldRenderedEntityTest.php b/core/modules/views/tests/src/Kernel/Handler/FieldRenderedEntityTest.php
index 02419f48479621d76401fc0c98911fdca356f30e..f49d682492540b31daca7be41b95f9ead274deab 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FieldRenderedEntityTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FieldRenderedEntityTest.php
@@ -24,7 +24,7 @@ class FieldRenderedEntityTest extends ViewsKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['entity_test', 'field'];
+  protected static $modules = ['entity_test', 'field'];
 
   /**
    * Views used by this test.
diff --git a/core/modules/views/tests/src/Kernel/Handler/FieldUrlTest.php b/core/modules/views/tests/src/Kernel/Handler/FieldUrlTest.php
index 5c9a29baf118defc14ac3ff90369f146b99f63f6..7c82c0ecdbf5c9e0134a37b8c9cc57df7b0c5765 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FieldUrlTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FieldUrlTest.php
@@ -14,7 +14,7 @@
  */
 class FieldUrlTest extends ViewsKernelTestBase {
 
-  public static $modules = ['system'];
+  protected static $modules = ['system'];
 
   /**
    * Views used by this test.
diff --git a/core/modules/views/tests/src/Kernel/Handler/FilterBooleanOperatorDefaultTest.php b/core/modules/views/tests/src/Kernel/Handler/FilterBooleanOperatorDefaultTest.php
index 7beceb9bd9eacdb9e5c87e9f26856f69e8222ad9..cf4f1b15a12797f802bb597833b9e4382a8440df 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FilterBooleanOperatorDefaultTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FilterBooleanOperatorDefaultTest.php
@@ -16,7 +16,7 @@ class FilterBooleanOperatorDefaultTest extends ViewsKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system', 'views_test_data'];
+  protected static $modules = ['system', 'views_test_data'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Kernel/Handler/FilterBooleanOperatorStringTest.php b/core/modules/views/tests/src/Kernel/Handler/FilterBooleanOperatorStringTest.php
index 325da5106e2762308c2a486fb10064bf00fbe77c..5495ceaa432740c787bd50a0df891a62a0afb260 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FilterBooleanOperatorStringTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FilterBooleanOperatorStringTest.php
@@ -19,7 +19,7 @@ class FilterBooleanOperatorStringTest extends ViewsKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['system'];
+  protected static $modules = ['system'];
 
   /**
    * Views used by this test.
diff --git a/core/modules/views/tests/src/Kernel/Handler/FilterBooleanOperatorTest.php b/core/modules/views/tests/src/Kernel/Handler/FilterBooleanOperatorTest.php
index 7cdd41f525d1369ebd0f62fb363c781c25dd0e2b..e653cbbf0e1ae2cab6542c8f2cb46ca63e538637 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FilterBooleanOperatorTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FilterBooleanOperatorTest.php
@@ -18,7 +18,7 @@ class FilterBooleanOperatorTest extends ViewsKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['system'];
+  protected static $modules = ['system'];
 
   /**
    * Views used by this test.
diff --git a/core/modules/views/tests/src/Kernel/Handler/FilterCombineTest.php b/core/modules/views/tests/src/Kernel/Handler/FilterCombineTest.php
index 881ee5bc3f71bf58ed8105e63f7f87301c63480d..3de13681f20eb11e37658bce8efc74d547b485f8 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FilterCombineTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FilterCombineTest.php
@@ -15,7 +15,7 @@ class FilterCombineTest extends ViewsKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['entity_test'];
+  protected static $modules = ['entity_test'];
 
   /**
    * Views used by this test.
diff --git a/core/modules/views/tests/src/Kernel/Handler/FilterEqualityTest.php b/core/modules/views/tests/src/Kernel/Handler/FilterEqualityTest.php
index 4f8c4961e390c4c7cee2846e881ea1e522284a4e..f9476beb9a48f5046758d0f6411e09c7fb10245d 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FilterEqualityTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FilterEqualityTest.php
@@ -12,7 +12,7 @@
  */
 class FilterEqualityTest extends ViewsKernelTestBase {
 
-  public static $modules = ['system'];
+  protected static $modules = ['system'];
 
   /**
    * Views used by this test.
diff --git a/core/modules/views/tests/src/Kernel/Handler/FilterInOperatorTest.php b/core/modules/views/tests/src/Kernel/Handler/FilterInOperatorTest.php
index 08ab9cf6b4c8181151fc57d6730c9b8276725853..a528a27f19f2852eef5eab9dc78a95151c0a3a02 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FilterInOperatorTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FilterInOperatorTest.php
@@ -17,7 +17,7 @@
 class FilterInOperatorTest extends ViewsKernelTestBase {
   use StringTranslationTrait;
 
-  public static $modules = ['system'];
+  protected static $modules = ['system'];
 
   /**
    * Views used by this test.
diff --git a/core/modules/views/tests/src/Kernel/Handler/FilterNumericTest.php b/core/modules/views/tests/src/Kernel/Handler/FilterNumericTest.php
index bc135bb85b8eb540e68324dec3c9151eb2713b6c..c0243548cf8615623b783dbb9f8eeee73aa8ca6a 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FilterNumericTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FilterNumericTest.php
@@ -12,7 +12,7 @@
  */
 class FilterNumericTest extends ViewsKernelTestBase {
 
-  public static $modules = ['system'];
+  protected static $modules = ['system'];
 
   /**
    * Views used by this test.
diff --git a/core/modules/views/tests/src/Kernel/Handler/FilterStringTest.php b/core/modules/views/tests/src/Kernel/Handler/FilterStringTest.php
index 900e83bf2a6cd1ab7f135dece2c24d63e81db9ea..0b80cb63f4a0b2a8a32affd463356c992a7ced1b 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FilterStringTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FilterStringTest.php
@@ -12,7 +12,7 @@
  */
 class FilterStringTest extends ViewsKernelTestBase {
 
-  public static $modules = ['system'];
+  protected static $modules = ['system'];
 
   /**
    * Views used by this test.
diff --git a/core/modules/views/tests/src/Kernel/Handler/HandlerAliasTest.php b/core/modules/views/tests/src/Kernel/Handler/HandlerAliasTest.php
index 79da9c74f4688751470122e3138fedb1a6542191..ad6ea6060d29704b38f77e5bc6b31ddd78d8f212 100644
--- a/core/modules/views/tests/src/Kernel/Handler/HandlerAliasTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/HandlerAliasTest.php
@@ -12,7 +12,7 @@
  */
 class HandlerAliasTest extends ViewsKernelTestBase {
 
-  public static $modules = ['user'];
+  protected static $modules = ['user'];
 
   /**
    * Views used by this test.
diff --git a/core/modules/views/tests/src/Kernel/Handler/SortTranslationTest.php b/core/modules/views/tests/src/Kernel/Handler/SortTranslationTest.php
index 4af1065dd8970e8e9095a7b3dd3ac1ffd1bac40d..b6aa0dd12be21577ddc4731fd30cf4235f7b9ea2 100644
--- a/core/modules/views/tests/src/Kernel/Handler/SortTranslationTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/SortTranslationTest.php
@@ -19,7 +19,7 @@ class SortTranslationTest extends ViewsKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'node',
     'field',
     'language',
diff --git a/core/modules/views/tests/src/Kernel/ModuleTest.php b/core/modules/views/tests/src/Kernel/ModuleTest.php
index db43e96cea251103d76f5f9ab0b18c89f4c75bc6..400786656539632d361e650b966a5eabbc267b54 100644
--- a/core/modules/views/tests/src/Kernel/ModuleTest.php
+++ b/core/modules/views/tests/src/Kernel/ModuleTest.php
@@ -25,7 +25,7 @@ class ModuleTest extends ViewsKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['field', 'user', 'block'];
+  protected static $modules = ['field', 'user', 'block'];
 
   /**
    * Stores the last triggered error.
diff --git a/core/modules/views/tests/src/Kernel/Plugin/BlockDependenciesTest.php b/core/modules/views/tests/src/Kernel/Plugin/BlockDependenciesTest.php
index 5b634afa1c72a868186564a55b83e172181a2989..82411f63d7c68c25473e8240ef37e6092cc50f70 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/BlockDependenciesTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/BlockDependenciesTest.php
@@ -24,7 +24,7 @@ class BlockDependenciesTest extends ViewsKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'block', 'user', 'field'];
+  protected static $modules = ['node', 'block', 'user', 'field'];
 
   /**
    * Tests that exposed filter blocks have the correct dependencies.
diff --git a/core/modules/views/tests/src/Kernel/Plugin/CacheTest.php b/core/modules/views/tests/src/Kernel/Plugin/CacheTest.php
index 8b4ae846081b94dd34dac0a89bee98bba428b3fc..653eab4e631a7c6274c73b0e01aae8cadc89b941 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/CacheTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/CacheTest.php
@@ -29,7 +29,7 @@ class CacheTest extends ViewsKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['taxonomy', 'text', 'user', 'node'];
+  protected static $modules = ['taxonomy', 'text', 'user', 'node'];
 
   /**
    * {@inheritdoc}
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 4a044d1ca7a001aa1e4107986a601371f0c43a9b..8edaa2965bda4c23e9228a732f8fbaa2dfceadd5 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/Display/ViewsMenuLinkTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/Display/ViewsMenuLinkTest.php
@@ -14,7 +14,7 @@ class ViewsMenuLinkTest extends ViewsKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'menu_ui',
     'user',
     'views',
diff --git a/core/modules/views/tests/src/Kernel/Plugin/DisplayKernelTest.php b/core/modules/views/tests/src/Kernel/Plugin/DisplayKernelTest.php
index fc4b4f7b68541aa72188553a4b286df64b5dba76..111ae4a2a3240005c1687dc74709836a2516e7f5 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/DisplayKernelTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/DisplayKernelTest.php
@@ -24,7 +24,7 @@ class DisplayKernelTest extends ViewsKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['block', 'node', 'field', 'user'];
+  protected static $modules = ['block', 'node', 'field', 'user'];
 
   /**
    * Views plugin types to test.
diff --git a/core/modules/views/tests/src/Kernel/Plugin/DisplayPageTest.php b/core/modules/views/tests/src/Kernel/Plugin/DisplayPageTest.php
index 07dff07dfd14ba82eaa3d7745863f6f6d9d9c405..ab18fe1f1f283390905d4ad92a0ec0d908d46bc9 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/DisplayPageTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/DisplayPageTest.php
@@ -31,7 +31,7 @@ class DisplayPageTest extends ViewsKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['system', 'user', 'field', 'views_test_data'];
+  protected static $modules = ['system', 'user', 'field', 'views_test_data'];
 
   /**
    * The router dumper to get all routes.
diff --git a/core/modules/views/tests/src/Kernel/Plugin/ExposedFormRenderTest.php b/core/modules/views/tests/src/Kernel/Plugin/ExposedFormRenderTest.php
index 1847861be3906bcefcedadd02241c0f44c8c2a68..f6459aa6e0f19ff0bed34d108f70338ff4c8c97c 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/ExposedFormRenderTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/ExposedFormRenderTest.php
@@ -23,7 +23,7 @@ class ExposedFormRenderTest extends ViewsKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node'];
+  protected static $modules = ['node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Kernel/Plugin/PagerKernelTest.php b/core/modules/views/tests/src/Kernel/Plugin/PagerKernelTest.php
index f6ddcc82246a0ac1bf4313ded1dee018ef713cb9..d4e53dbc2a6cac62e175e03a1878b68538fce580 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/PagerKernelTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/PagerKernelTest.php
@@ -21,7 +21,7 @@ class PagerKernelTest extends ViewsKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['user', 'node'];
+  protected static $modules = ['user', 'node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Kernel/Plugin/RelationshipJoinTestBase.php b/core/modules/views/tests/src/Kernel/Plugin/RelationshipJoinTestBase.php
index 191024e4701e091dd6c46ad7be530d7d81efe399..ecb90a7f3f3e4d7cf86784cf13bf2904b7a2d660 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/RelationshipJoinTestBase.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/RelationshipJoinTestBase.php
@@ -18,7 +18,7 @@ abstract class RelationshipJoinTestBase extends PluginKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['system', 'user', 'field'];
+  protected static $modules = ['system', 'user', 'field'];
 
   /**
    * @var \Drupal\user\Entity\User
diff --git a/core/modules/views/tests/src/Kernel/Plugin/RowEntityTest.php b/core/modules/views/tests/src/Kernel/Plugin/RowEntityTest.php
index 24772b9160718cc215db4d63ea90aee4fa855248..81ec0ac8bb8a9f5c102018b2b2757e0f6962b293 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/RowEntityTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/RowEntityTest.php
@@ -21,7 +21,7 @@ class RowEntityTest extends ViewsKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['taxonomy', 'text', 'filter', 'field', 'system', 'node', 'user'];
+  protected static $modules = ['taxonomy', 'text', 'filter', 'field', 'system', 'node', 'user'];
 
   /**
    * Views used by this test.
diff --git a/core/modules/views/tests/src/Kernel/Plugin/RowRenderCacheTest.php b/core/modules/views/tests/src/Kernel/Plugin/RowRenderCacheTest.php
index 3f1a2fbf5b54f89823ea9be285cd5d0aa742b5b1..a8fdcd3a7055026c3537a630b39f07527b4eb6e3 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/RowRenderCacheTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/RowRenderCacheTest.php
@@ -24,7 +24,7 @@ class RowRenderCacheTest extends ViewsKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['user', 'node'];
+  protected static $modules = ['user', 'node'];
 
   /**
    * Views used by this test.
diff --git a/core/modules/views/tests/src/Kernel/Plugin/RssFieldsTest.php b/core/modules/views/tests/src/Kernel/Plugin/RssFieldsTest.php
index ff701541846ab3ca330d1195c5d020c585aad0ea..f2b6ee75809fd61a2a5207497bf4d9e9a722e5b2 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/RssFieldsTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/RssFieldsTest.php
@@ -21,7 +21,7 @@ class RssFieldsTest extends ViewsKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'field', 'text', 'filter'];
+  protected static $modules = ['node', 'field', 'text', 'filter'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Kernel/Plugin/SqlEntityLoadingTest.php b/core/modules/views/tests/src/Kernel/Plugin/SqlEntityLoadingTest.php
index 2c29a1c92191f5b0e9c6bb719ad56bd990befed8..4fd1b302a5a0ffd2db67040d8b1a52e1c5af6bb5 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/SqlEntityLoadingTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/SqlEntityLoadingTest.php
@@ -19,7 +19,7 @@ class SqlEntityLoadingTest extends ViewsKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'user'];
+  protected static $modules = ['node', 'user'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Kernel/Plugin/StyleMappingTest.php b/core/modules/views/tests/src/Kernel/Plugin/StyleMappingTest.php
index 353a258bc9511265b2ca03a7741609be4283d4b8..2a359d2c1877a444706fc6fcfa643b3da718f911 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/StyleMappingTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/StyleMappingTest.php
@@ -13,7 +13,7 @@
  */
 class StyleMappingTest extends StyleTestBase {
 
-  public static $modules = ['system'];
+  protected static $modules = ['system'];
 
   /**
    * Views used by this test.
diff --git a/core/modules/views/tests/src/Kernel/Plugin/ViewsBlockTest.php b/core/modules/views/tests/src/Kernel/Plugin/ViewsBlockTest.php
index a6e7ed62563a0ee321b4bbaf0c310d794563bbf5..12203f70d41ee5f9e3c4db7570b4375e761f584d 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/ViewsBlockTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/ViewsBlockTest.php
@@ -19,7 +19,7 @@ class ViewsBlockTest extends ViewsKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['block', 'block_test_views'];
+  protected static $modules = ['block', 'block_test_views'];
 
   /**
    * Views used by this test.
diff --git a/core/modules/views/tests/src/Kernel/QueryGroupByTest.php b/core/modules/views/tests/src/Kernel/QueryGroupByTest.php
index 63d62ba3db1c2571cf80495f16f485402b86644f..49eb1083ec4eacb5e413ed0babb142f5d39dba1a 100644
--- a/core/modules/views/tests/src/Kernel/QueryGroupByTest.php
+++ b/core/modules/views/tests/src/Kernel/QueryGroupByTest.php
@@ -28,7 +28,7 @@ class QueryGroupByTest extends ViewsKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['entity_test', 'system', 'field', 'user', 'language'];
+  protected static $modules = ['entity_test', 'system', 'field', 'user', 'language'];
 
   /**
    * The storage for the test entity type.
diff --git a/core/modules/views/tests/src/Kernel/RenderCacheIntegrationTest.php b/core/modules/views/tests/src/Kernel/RenderCacheIntegrationTest.php
index 043dc8c2476c5cd896823997170a73a370d2e8c6..b4b9c82218c12c445d72aed63a65b44a9b542961 100644
--- a/core/modules/views/tests/src/Kernel/RenderCacheIntegrationTest.php
+++ b/core/modules/views/tests/src/Kernel/RenderCacheIntegrationTest.php
@@ -27,7 +27,7 @@ class RenderCacheIntegrationTest extends ViewsKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['entity_test', 'user', 'node'];
+  protected static $modules = ['entity_test', 'user', 'node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Kernel/TestViewsTest.php b/core/modules/views/tests/src/Kernel/TestViewsTest.php
index dcd1859be34595eb1779ca4909c802a6535431ce..1b21dfeaf81505206b3761b24292a0df8336e46e 100644
--- a/core/modules/views/tests/src/Kernel/TestViewsTest.php
+++ b/core/modules/views/tests/src/Kernel/TestViewsTest.php
@@ -22,7 +22,7 @@ class TestViewsTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['views_test_data'];
+  protected static $modules = ['views_test_data'];
 
   /**
    * Tests default configuration data type.
diff --git a/core/modules/views/tests/src/Kernel/TokenReplaceTest.php b/core/modules/views/tests/src/Kernel/TokenReplaceTest.php
index c96534744a428c62781f21d38386b5c88ed14a01..bfb6b42a2a15f93fba43dc08a0f6414900faed5e 100644
--- a/core/modules/views/tests/src/Kernel/TokenReplaceTest.php
+++ b/core/modules/views/tests/src/Kernel/TokenReplaceTest.php
@@ -13,7 +13,7 @@
  */
 class TokenReplaceTest extends ViewsKernelTestBase {
 
-  public static $modules = ['system'];
+  protected static $modules = ['system'];
 
   /**
    * Views used by this test.
diff --git a/core/modules/views/tests/src/Kernel/ViewExecutableTest.php b/core/modules/views/tests/src/Kernel/ViewExecutableTest.php
index 1c32786b8a29538e3bbeacc814a81d3eb554aeb2..d0169a88a23be71b2f3af92d6486d605c53e4161 100644
--- a/core/modules/views/tests/src/Kernel/ViewExecutableTest.php
+++ b/core/modules/views/tests/src/Kernel/ViewExecutableTest.php
@@ -33,7 +33,7 @@ class ViewExecutableTest extends ViewsKernelTestBase {
 
   use CommentTestTrait;
 
-  public static $modules = ['system', 'node', 'comment', 'user', 'filter', 'field', 'text'];
+  protected static $modules = ['system', 'node', 'comment', 'user', 'filter', 'field', 'text'];
 
   /**
    * Views used by this test.
diff --git a/core/modules/views/tests/src/Kernel/ViewsConfigDependenciesIntegrationTest.php b/core/modules/views/tests/src/Kernel/ViewsConfigDependenciesIntegrationTest.php
index 54a4739643a7e75a18e24e07171e0ab4267a7a90..d70cf79490af2059b4e213f80a9bd8efa945e409 100644
--- a/core/modules/views/tests/src/Kernel/ViewsConfigDependenciesIntegrationTest.php
+++ b/core/modules/views/tests/src/Kernel/ViewsConfigDependenciesIntegrationTest.php
@@ -18,7 +18,7 @@ class ViewsConfigDependenciesIntegrationTest extends ViewsKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['field', 'file', 'image', 'entity_test', 'user', 'text'];
+  protected static $modules = ['field', 'file', 'image', 'entity_test', 'user', 'text'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Kernel/ViewsKernelTestBase.php b/core/modules/views/tests/src/Kernel/ViewsKernelTestBase.php
index 3f2cf3bae674fa93806c2a7c33942b1894e32d29..d1a294ac1f1f62fd3fb3ee2a201ecb164560df7b 100644
--- a/core/modules/views/tests/src/Kernel/ViewsKernelTestBase.php
+++ b/core/modules/views/tests/src/Kernel/ViewsKernelTestBase.php
@@ -28,7 +28,7 @@ abstract class ViewsKernelTestBase extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['path_alias', 'system', 'views', 'views_test_config', 'views_test_data', 'user'];
+  protected static $modules = ['path_alias', 'system', 'views', 'views_test_config', 'views_test_data', 'user'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Kernel/ViewsPreprocessTest.php b/core/modules/views/tests/src/Kernel/ViewsPreprocessTest.php
index df2e6e55e641251d8f2cf83b0a1165ce62d2fb63..35d5b62bc9cc70d5f70e5579d276730d89f9897d 100644
--- a/core/modules/views/tests/src/Kernel/ViewsPreprocessTest.php
+++ b/core/modules/views/tests/src/Kernel/ViewsPreprocessTest.php
@@ -20,7 +20,7 @@ class ViewsPreprocessTest extends ViewsKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['entity_test', 'user', 'node'];
+  protected static $modules = ['entity_test', 'user', 'node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Kernel/Wizard/WizardPluginBaseKernelTest.php b/core/modules/views/tests/src/Kernel/Wizard/WizardPluginBaseKernelTest.php
index 4cacf73a8f85caa3e82d5c1a49886c5052c5a6c9..b83acbd95a5f24cb89f7153954c3d385fd173a09 100644
--- a/core/modules/views/tests/src/Kernel/Wizard/WizardPluginBaseKernelTest.php
+++ b/core/modules/views/tests/src/Kernel/Wizard/WizardPluginBaseKernelTest.php
@@ -20,7 +20,7 @@ class WizardPluginBaseKernelTest extends ViewsKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['language', 'system', 'user', 'views_ui'];
+  protected static $modules = ['language', 'system', 'user', 'views_ui'];
 
   /**
    * Contains thw wizard plugin manager.
diff --git a/core/modules/views_ui/tests/src/Functional/AnalyzeTest.php b/core/modules/views_ui/tests/src/Functional/AnalyzeTest.php
index 2ad5adc5f27981f8b3953782ded99eabd239ef8b..2fc462e60ba7ec7969f7936c8606f38e9d71661b 100644
--- a/core/modules/views_ui/tests/src/Functional/AnalyzeTest.php
+++ b/core/modules/views_ui/tests/src/Functional/AnalyzeTest.php
@@ -14,7 +14,7 @@ class AnalyzeTest extends UITestBase {
    *
    * @var array
    */
-  public static $modules = ['views_ui'];
+  protected static $modules = ['views_ui'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views_ui/tests/src/Functional/AreaEntityUITest.php b/core/modules/views_ui/tests/src/Functional/AreaEntityUITest.php
index 305315c8027eaa5a352381c407edaae16c5a0df8..2d7b966a6d9ec2256724f7e2b52eac4eeef8dec1 100644
--- a/core/modules/views_ui/tests/src/Functional/AreaEntityUITest.php
+++ b/core/modules/views_ui/tests/src/Functional/AreaEntityUITest.php
@@ -17,7 +17,7 @@ class AreaEntityUITest extends UITestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['entity_test'];
+  protected static $modules = ['entity_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views_ui/tests/src/Functional/DisplayCRUDTest.php b/core/modules/views_ui/tests/src/Functional/DisplayCRUDTest.php
index 83e43f9987ed1d79b5f12e43c31f6eb03355a632..7bdce08fefe880f43e538f96370c4cc937df8419 100644
--- a/core/modules/views_ui/tests/src/Functional/DisplayCRUDTest.php
+++ b/core/modules/views_ui/tests/src/Functional/DisplayCRUDTest.php
@@ -23,7 +23,7 @@ class DisplayCRUDTest extends UITestBase {
    *
    * @var array
    */
-  public static $modules = ['contextual'];
+  protected static $modules = ['contextual'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views_ui/tests/src/Functional/DisplayFeedTest.php b/core/modules/views_ui/tests/src/Functional/DisplayFeedTest.php
index 8394193df06ec7ad5b8446e7f1a49133f2aafcc1..1aa4b1dfe45b6d3345f191ac6c8b67a107ff764c 100644
--- a/core/modules/views_ui/tests/src/Functional/DisplayFeedTest.php
+++ b/core/modules/views_ui/tests/src/Functional/DisplayFeedTest.php
@@ -22,7 +22,7 @@ class DisplayFeedTest extends UITestBase {
    *
    * @var array
    */
-  public static $modules = ['views_ui', 'aggregator'];
+  protected static $modules = ['views_ui', 'aggregator'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views_ui/tests/src/Functional/DisplayPathTest.php b/core/modules/views_ui/tests/src/Functional/DisplayPathTest.php
index 7dc2567a1fcbcc135f2a172881dd89ac828e26b9..991d2af3694f10ccbcddda5d8bd06eb059b53dd6 100644
--- a/core/modules/views_ui/tests/src/Functional/DisplayPathTest.php
+++ b/core/modules/views_ui/tests/src/Functional/DisplayPathTest.php
@@ -25,7 +25,7 @@ protected function setUp($import_test_views = TRUE): void {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['menu_ui'];
+  protected static $modules = ['menu_ui'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views_ui/tests/src/Functional/DisplayTest.php b/core/modules/views_ui/tests/src/Functional/DisplayTest.php
index d2b03327eb0cdd23b65912f991891864a9f3354a..de7824a3f332a20302f3aae8a38e8460398b53d4 100644
--- a/core/modules/views_ui/tests/src/Functional/DisplayTest.php
+++ b/core/modules/views_ui/tests/src/Functional/DisplayTest.php
@@ -25,7 +25,7 @@ class DisplayTest extends UITestBase {
    *
    * @var array
    */
-  public static $modules = ['contextual'];
+  protected static $modules = ['contextual'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views_ui/tests/src/Functional/ExposedFormUITest.php b/core/modules/views_ui/tests/src/Functional/ExposedFormUITest.php
index ceda35161c19d26a6fe696398310034fa82d9cce..bdfb2f0bf7396306d65f1ee8bb92871ba1e39096 100644
--- a/core/modules/views_ui/tests/src/Functional/ExposedFormUITest.php
+++ b/core/modules/views_ui/tests/src/Functional/ExposedFormUITest.php
@@ -21,7 +21,7 @@ class ExposedFormUITest extends UITestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'views_ui', 'block', 'taxonomy', 'field_ui', 'datetime'];
+  protected static $modules = ['node', 'views_ui', 'block', 'taxonomy', 'field_ui', 'datetime'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views_ui/tests/src/Functional/FilterUITest.php b/core/modules/views_ui/tests/src/Functional/FilterUITest.php
index 0cfc0166ff33e59000c978148564df8739b668f6..651ede4d2566841873f7e8aae25657eac7507ff6 100644
--- a/core/modules/views_ui/tests/src/Functional/FilterUITest.php
+++ b/core/modules/views_ui/tests/src/Functional/FilterUITest.php
@@ -22,7 +22,7 @@ class FilterUITest extends UITestBase {
    *
    * @var array
    */
-  public static $modules = ['views_ui', 'node'];
+  protected static $modules = ['views_ui', 'node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views_ui/tests/src/Functional/HandlerTest.php b/core/modules/views_ui/tests/src/Functional/HandlerTest.php
index eae97ec6641959f40d39896fcf70fa5a26b5a1b7..706889eeaa162c9d4fc72eb5a4d15bbf3a0b0be5 100644
--- a/core/modules/views_ui/tests/src/Functional/HandlerTest.php
+++ b/core/modules/views_ui/tests/src/Functional/HandlerTest.php
@@ -19,7 +19,7 @@ class HandlerTest extends UITestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node_test_views'];
+  protected static $modules = ['node_test_views'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views_ui/tests/src/Functional/NewViewConfigSchemaTest.php b/core/modules/views_ui/tests/src/Functional/NewViewConfigSchemaTest.php
index 58b0bdfdd938e950621ee1e72e4ba572761719e8..f01ba9d619d03b518d629cdbe08b55c16aa01274 100644
--- a/core/modules/views_ui/tests/src/Functional/NewViewConfigSchemaTest.php
+++ b/core/modules/views_ui/tests/src/Functional/NewViewConfigSchemaTest.php
@@ -14,7 +14,7 @@ class NewViewConfigSchemaTest extends UITestBase {
    *
    * @var array
    */
-  public static $modules = ['views_ui', 'node', 'comment', 'file', 'taxonomy', 'dblog', 'aggregator'];
+  protected static $modules = ['views_ui', 'node', 'comment', 'file', 'taxonomy', 'dblog', 'aggregator'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views_ui/tests/src/Functional/ReportFieldsTest.php b/core/modules/views_ui/tests/src/Functional/ReportFieldsTest.php
index 840e91f621061b77978aed3611f8e01d317354d4..6dd8003a1e8b3e1bec7657243b8a31101392c9d3 100644
--- a/core/modules/views_ui/tests/src/Functional/ReportFieldsTest.php
+++ b/core/modules/views_ui/tests/src/Functional/ReportFieldsTest.php
@@ -25,7 +25,7 @@ class ReportFieldsTest extends UITestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['entity_test'];
+  protected static $modules = ['entity_test'];
 
   /**
    * Tests the Views fields report page.
diff --git a/core/modules/views_ui/tests/src/Functional/ReportTest.php b/core/modules/views_ui/tests/src/Functional/ReportTest.php
index 5322e01084730da88b21ea25178d9a84817fdbcb..4d2326487b3155ea5b79c20457d81619e8ca6f1f 100644
--- a/core/modules/views_ui/tests/src/Functional/ReportTest.php
+++ b/core/modules/views_ui/tests/src/Functional/ReportTest.php
@@ -14,7 +14,7 @@ class ReportTest extends UITestBase {
    *
    * @var array
    */
-  public static $modules = ['views', 'views_ui'];
+  protected static $modules = ['views', 'views_ui'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views_ui/tests/src/Functional/StorageTest.php b/core/modules/views_ui/tests/src/Functional/StorageTest.php
index 86708a93028a778ec3627fd14727158648575f12..a7a5b55423c0d05965a07824ad38cc636b7fbdab 100644
--- a/core/modules/views_ui/tests/src/Functional/StorageTest.php
+++ b/core/modules/views_ui/tests/src/Functional/StorageTest.php
@@ -30,7 +30,7 @@ class StorageTest extends UITestBase {
    *
    * @var array
    */
-  public static $modules = ['views_ui', 'language'];
+  protected static $modules = ['views_ui', 'language'];
 
   /**
    * Tests changing label, description and tag.
diff --git a/core/modules/views_ui/tests/src/Functional/TokenizeAreaUITest.php b/core/modules/views_ui/tests/src/Functional/TokenizeAreaUITest.php
index 3a8bea6fae077fea28248881e2e536c7f60a7807..922c2471770a8e8bc792bf02f642f3ddfafe8791 100644
--- a/core/modules/views_ui/tests/src/Functional/TokenizeAreaUITest.php
+++ b/core/modules/views_ui/tests/src/Functional/TokenizeAreaUITest.php
@@ -16,7 +16,7 @@ class TokenizeAreaUITest extends UITestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['entity_test'];
+  protected static $modules = ['entity_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views_ui/tests/src/Functional/TranslatedViewTest.php b/core/modules/views_ui/tests/src/Functional/TranslatedViewTest.php
index dcefdf1bdffce5480123d348697b601c33830fbb..c99c9b71f960d12f5c31e39ee994acf467d2af9a 100644
--- a/core/modules/views_ui/tests/src/Functional/TranslatedViewTest.php
+++ b/core/modules/views_ui/tests/src/Functional/TranslatedViewTest.php
@@ -16,7 +16,7 @@ class TranslatedViewTest extends UITestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'config_translation',
     'views_ui',
   ];
diff --git a/core/modules/views_ui/tests/src/Functional/UITestBase.php b/core/modules/views_ui/tests/src/Functional/UITestBase.php
index 7cbb312ff6f742f4098b3404deeaba588fa42886..9f87ed948d784582626723785109bcc0bd74305a 100644
--- a/core/modules/views_ui/tests/src/Functional/UITestBase.php
+++ b/core/modules/views_ui/tests/src/Functional/UITestBase.php
@@ -28,7 +28,7 @@ abstract class UITestBase extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'views_ui', 'block', 'taxonomy'];
+  protected static $modules = ['node', 'views_ui', 'block', 'taxonomy'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views_ui/tests/src/Functional/UnsavedPreviewTest.php b/core/modules/views_ui/tests/src/Functional/UnsavedPreviewTest.php
index d6f20563c5b0619f64ca119f8b754c10af1a3fd1..5a5e4a5b29f5bb9f6ab6c53f96a1d2b5d4cbb814 100644
--- a/core/modules/views_ui/tests/src/Functional/UnsavedPreviewTest.php
+++ b/core/modules/views_ui/tests/src/Functional/UnsavedPreviewTest.php
@@ -31,7 +31,7 @@ class UnsavedPreviewTest extends UITestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'views_ui'];
+  protected static $modules = ['node', 'views_ui'];
 
   /**
    * Sets up a Drupal site for running functional and integration tests.
diff --git a/core/modules/views_ui/tests/src/Functional/ViewsListTest.php b/core/modules/views_ui/tests/src/Functional/ViewsListTest.php
index 525700ca4071935cd038c4d292351d76bee21eb3..63500d0add4fa28507369e19a491be2f3a2d5204 100644
--- a/core/modules/views_ui/tests/src/Functional/ViewsListTest.php
+++ b/core/modules/views_ui/tests/src/Functional/ViewsListTest.php
@@ -17,7 +17,7 @@ class ViewsListTest extends UITestBase {
    *
    * @var array
    */
-  public static $modules = ['block', 'views_ui'];
+  protected static $modules = ['block', 'views_ui'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views_ui/tests/src/Functional/ViewsUITourTest.php b/core/modules/views_ui/tests/src/Functional/ViewsUITourTest.php
index d45b8da04f31b86328a7c0311ead3082b72017b4..c7b441d4cf1f18dd9981045dbc53664ff0f25212 100644
--- a/core/modules/views_ui/tests/src/Functional/ViewsUITourTest.php
+++ b/core/modules/views_ui/tests/src/Functional/ViewsUITourTest.php
@@ -36,7 +36,7 @@ class ViewsUITourTest extends TourTestBase {
    *
    * @var array
    */
-  public static $modules = ['views_ui', 'tour', 'language', 'locale'];
+  protected static $modules = ['views_ui', 'tour', 'language', 'locale'];
 
   protected function setUp(): void {
     parent::setUp();
diff --git a/core/modules/views_ui/tests/src/Functional/XssTest.php b/core/modules/views_ui/tests/src/Functional/XssTest.php
index 3e7fc34b14e130b27d3d468c3231bc0426edf1bf..e5257d64f41659734ce124403eeb2401fb2bc65f 100644
--- a/core/modules/views_ui/tests/src/Functional/XssTest.php
+++ b/core/modules/views_ui/tests/src/Functional/XssTest.php
@@ -14,7 +14,7 @@ class XssTest extends UITestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'user', 'views_ui', 'views_ui_test'];
+  protected static $modules = ['node', 'user', 'views_ui', 'views_ui_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views_ui/tests/src/FunctionalJavascript/DisplayTest.php b/core/modules/views_ui/tests/src/FunctionalJavascript/DisplayTest.php
index 60a776b862dfe5ba1391763762739eb916aa1e20..197ef2c5c561a3667e26bf3f5c4180198c86eb4a 100644
--- a/core/modules/views_ui/tests/src/FunctionalJavascript/DisplayTest.php
+++ b/core/modules/views_ui/tests/src/FunctionalJavascript/DisplayTest.php
@@ -19,7 +19,7 @@ class DisplayTest extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'block',
     'contextual',
     'node',
diff --git a/core/modules/views_ui/tests/src/FunctionalJavascript/FilterCriteriaTest.php b/core/modules/views_ui/tests/src/FunctionalJavascript/FilterCriteriaTest.php
index 298bf1877cf822b4da8ff98577228f0dadde3424..190de4fb4126cfa686f8ec8ccf0ed7d3316100fe 100644
--- a/core/modules/views_ui/tests/src/FunctionalJavascript/FilterCriteriaTest.php
+++ b/core/modules/views_ui/tests/src/FunctionalJavascript/FilterCriteriaTest.php
@@ -14,7 +14,7 @@ class FilterCriteriaTest extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'views', 'views_ui'];
+  protected static $modules = ['node', 'views', 'views_ui'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views_ui/tests/src/FunctionalJavascript/FilterOptionsTest.php b/core/modules/views_ui/tests/src/FunctionalJavascript/FilterOptionsTest.php
index faf573fe64ef4f4ac9ffc9898333b3839b624153..5f18c59660ad1349b6fe60ae6805c2654252bf73 100644
--- a/core/modules/views_ui/tests/src/FunctionalJavascript/FilterOptionsTest.php
+++ b/core/modules/views_ui/tests/src/FunctionalJavascript/FilterOptionsTest.php
@@ -14,7 +14,7 @@ class FilterOptionsTest extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'views', 'views_ui', 'views_ui_test_field'];
+  protected static $modules = ['node', 'views', 'views_ui', 'views_ui_test_field'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views_ui/tests/src/FunctionalJavascript/LibraryCachingTest.php b/core/modules/views_ui/tests/src/FunctionalJavascript/LibraryCachingTest.php
index c4e14c63cf299468f1220038d91fff39ee8ffe8d..778e0acab299770b865f11ee763557bd9c0061bd 100644
--- a/core/modules/views_ui/tests/src/FunctionalJavascript/LibraryCachingTest.php
+++ b/core/modules/views_ui/tests/src/FunctionalJavascript/LibraryCachingTest.php
@@ -14,7 +14,7 @@ class LibraryCachingTest extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'views', 'views_ui'];
+  protected static $modules = ['node', 'views', 'views_ui'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views_ui/tests/src/FunctionalJavascript/PreviewTest.php b/core/modules/views_ui/tests/src/FunctionalJavascript/PreviewTest.php
index 6510a57c06ab65d579733863c822de9c512f3c72..5ea1c6b7626bb7d03503c4463e98a546e680d278 100644
--- a/core/modules/views_ui/tests/src/FunctionalJavascript/PreviewTest.php
+++ b/core/modules/views_ui/tests/src/FunctionalJavascript/PreviewTest.php
@@ -24,7 +24,7 @@ class PreviewTest extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'node',
     'views',
     'views_ui',
diff --git a/core/modules/views_ui/tests/src/FunctionalJavascript/ViewsListingTest.php b/core/modules/views_ui/tests/src/FunctionalJavascript/ViewsListingTest.php
index 553f768bb767dd2696b01633e5e78d198968d7d8..f82bd4bbc6da2317828af0095fdba076c02e99d2 100644
--- a/core/modules/views_ui/tests/src/FunctionalJavascript/ViewsListingTest.php
+++ b/core/modules/views_ui/tests/src/FunctionalJavascript/ViewsListingTest.php
@@ -15,7 +15,7 @@ class ViewsListingTest extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'views', 'views_ui'];
+  protected static $modules = ['node', 'views', 'views_ui'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views_ui/tests/src/FunctionalJavascript/ViewsWizardTest.php b/core/modules/views_ui/tests/src/FunctionalJavascript/ViewsWizardTest.php
index 0e0e68d1f527f66e8d65c216173cd57940da0472..78857ea91578c40f9332248343ea1bc806fd4239 100644
--- a/core/modules/views_ui/tests/src/FunctionalJavascript/ViewsWizardTest.php
+++ b/core/modules/views_ui/tests/src/FunctionalJavascript/ViewsWizardTest.php
@@ -15,7 +15,7 @@ class ViewsWizardTest extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'views', 'views_ui', 'block', 'user'];
+  protected static $modules = ['node', 'views', 'views_ui', 'block', 'user'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views_ui/tests/src/Kernel/TagTest.php b/core/modules/views_ui/tests/src/Kernel/TagTest.php
index b54ce0617e9f62b74eba56f244c955f156938ca4..b9846ec3b707b866710f6a84f5a4c5c76bc8f3fb 100644
--- a/core/modules/views_ui/tests/src/Kernel/TagTest.php
+++ b/core/modules/views_ui/tests/src/Kernel/TagTest.php
@@ -20,7 +20,7 @@ class TagTest extends ViewsKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['views', 'views_ui', 'user'];
+  protected static $modules = ['views', 'views_ui', 'user'];
 
   /**
    * Tests the views_ui_autocomplete_tag function.
diff --git a/core/modules/workflows/tests/src/Functional/Hal/WorkflowHalJsonAnonTest.php b/core/modules/workflows/tests/src/Functional/Hal/WorkflowHalJsonAnonTest.php
index 741970775c112c4cb829b772de9311bbf6b2c13f..52f416f7aead2506ae29029b9d37c093fa646d66 100644
--- a/core/modules/workflows/tests/src/Functional/Hal/WorkflowHalJsonAnonTest.php
+++ b/core/modules/workflows/tests/src/Functional/Hal/WorkflowHalJsonAnonTest.php
@@ -15,7 +15,7 @@ class WorkflowHalJsonAnonTest extends WorkflowResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/workflows/tests/src/Functional/Hal/WorkflowHalJsonBasicAuthTest.php b/core/modules/workflows/tests/src/Functional/Hal/WorkflowHalJsonBasicAuthTest.php
index 2a9c18bf165eba8783eab555bd17aaffa10351c8..c4b15c266966e29ea3e4f1b2fa4b8aa9e60d4c9b 100644
--- a/core/modules/workflows/tests/src/Functional/Hal/WorkflowHalJsonBasicAuthTest.php
+++ b/core/modules/workflows/tests/src/Functional/Hal/WorkflowHalJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class WorkflowHalJsonBasicAuthTest extends WorkflowHalJsonAnonTest {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/workflows/tests/src/Functional/Rest/WorkflowJsonBasicAuthTest.php b/core/modules/workflows/tests/src/Functional/Rest/WorkflowJsonBasicAuthTest.php
index 0c979d6d6e2f19da99021c89708ccf01a909ce2f..34648bf96198f1adf8fb2316f60957d13b9de4c4 100644
--- a/core/modules/workflows/tests/src/Functional/Rest/WorkflowJsonBasicAuthTest.php
+++ b/core/modules/workflows/tests/src/Functional/Rest/WorkflowJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class WorkflowJsonBasicAuthTest extends WorkflowResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/workflows/tests/src/Functional/Rest/WorkflowResourceTestBase.php b/core/modules/workflows/tests/src/Functional/Rest/WorkflowResourceTestBase.php
index ce796a4f979a11b578424b0137b8796bca7b8f0c..43c0765f76ac17a722b41fde6b5eb62013b1af46 100644
--- a/core/modules/workflows/tests/src/Functional/Rest/WorkflowResourceTestBase.php
+++ b/core/modules/workflows/tests/src/Functional/Rest/WorkflowResourceTestBase.php
@@ -13,7 +13,7 @@ abstract class WorkflowResourceTestBase extends EntityResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'workflows',
     'workflow_type_test',
   ];
diff --git a/core/modules/workflows/tests/src/Functional/Rest/WorkflowXmlBasicAuthTest.php b/core/modules/workflows/tests/src/Functional/Rest/WorkflowXmlBasicAuthTest.php
index 0f1bbb721915670e9dea934c4cb272eabc9ffd19..4c3550b002b0c73093068b6c9ec5c75b47eaa0a9 100644
--- a/core/modules/workflows/tests/src/Functional/Rest/WorkflowXmlBasicAuthTest.php
+++ b/core/modules/workflows/tests/src/Functional/Rest/WorkflowXmlBasicAuthTest.php
@@ -16,7 +16,7 @@ class WorkflowXmlBasicAuthTest extends WorkflowResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/workflows/tests/src/Functional/WorkflowCustomStateTransitionAccessTest.php b/core/modules/workflows/tests/src/Functional/WorkflowCustomStateTransitionAccessTest.php
index 312c60b535c638aef4bc6feccd9f5491f5456cde..e01b0d044f8bb878e9d9817c06f930e3d57701a5 100644
--- a/core/modules/workflows/tests/src/Functional/WorkflowCustomStateTransitionAccessTest.php
+++ b/core/modules/workflows/tests/src/Functional/WorkflowCustomStateTransitionAccessTest.php
@@ -15,7 +15,7 @@ class WorkflowCustomStateTransitionAccessTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'workflows',
     'workflow_type_test',
   ];
diff --git a/core/modules/workflows/tests/src/Functional/WorkflowUiNoTypeTest.php b/core/modules/workflows/tests/src/Functional/WorkflowUiNoTypeTest.php
index 53d39e1ce970fa7341ec71b1ae28ec680f6d9500..298c0002c3b4b6af161d68c820d0e5d75702397c 100644
--- a/core/modules/workflows/tests/src/Functional/WorkflowUiNoTypeTest.php
+++ b/core/modules/workflows/tests/src/Functional/WorkflowUiNoTypeTest.php
@@ -17,7 +17,7 @@ class WorkflowUiNoTypeTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['workflows', 'block'];
+  protected static $modules = ['workflows', 'block'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/workflows/tests/src/Functional/WorkflowUiTest.php b/core/modules/workflows/tests/src/Functional/WorkflowUiTest.php
index 1271338614dab5e757771144405ebf65cd245ff9..0b32d35c8e7ad63d75eaa978227ec9a245080f6e 100644
--- a/core/modules/workflows/tests/src/Functional/WorkflowUiTest.php
+++ b/core/modules/workflows/tests/src/Functional/WorkflowUiTest.php
@@ -18,7 +18,7 @@ class WorkflowUiTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['workflows', 'workflow_type_test', 'block'];
+  protected static $modules = ['workflows', 'workflow_type_test', 'block'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/workflows/tests/src/Kernel/ComplexWorkflowTypeTest.php b/core/modules/workflows/tests/src/Kernel/ComplexWorkflowTypeTest.php
index 15d27286ca203413d15b9a122ad6beeb1d1b755c..501675da890a6c281bb7cbfa254882a19f2fdc15 100644
--- a/core/modules/workflows/tests/src/Kernel/ComplexWorkflowTypeTest.php
+++ b/core/modules/workflows/tests/src/Kernel/ComplexWorkflowTypeTest.php
@@ -17,7 +17,7 @@ class ComplexWorkflowTypeTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['workflows', 'workflow_type_test'];
+  protected static $modules = ['workflows', 'workflow_type_test'];
 
   /**
    * @covers \Drupal\workflows\Entity\Workflow::loadMultipleByType
diff --git a/core/modules/workflows/tests/src/Kernel/PredefinedWorkflowTypeTest.php b/core/modules/workflows/tests/src/Kernel/PredefinedWorkflowTypeTest.php
index f3f0b5768bc2ec9418cc18322d2aaac9c534b945..2f294fd915b95d204f975466e0b0398ac2766352 100644
--- a/core/modules/workflows/tests/src/Kernel/PredefinedWorkflowTypeTest.php
+++ b/core/modules/workflows/tests/src/Kernel/PredefinedWorkflowTypeTest.php
@@ -15,7 +15,7 @@ class PredefinedWorkflowTypeTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['workflows', 'workflow_type_test'];
+  protected static $modules = ['workflows', 'workflow_type_test'];
 
   /**
    * Test a predefined workflow type.
diff --git a/core/modules/workflows/tests/src/Kernel/RequiredStatesTest.php b/core/modules/workflows/tests/src/Kernel/RequiredStatesTest.php
index 0a44e3d9bf409e784e674581306dbf664377efe0..3116613cc5663d1c7042c77aab65eeb83fb11695 100644
--- a/core/modules/workflows/tests/src/Kernel/RequiredStatesTest.php
+++ b/core/modules/workflows/tests/src/Kernel/RequiredStatesTest.php
@@ -18,7 +18,7 @@ class RequiredStatesTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['workflows', 'workflow_type_test'];
+  protected static $modules = ['workflows', 'workflow_type_test'];
 
   /**
    * @covers ::getRequiredStates
diff --git a/core/modules/workflows/tests/src/Kernel/WorkflowAccessControlHandlerTest.php b/core/modules/workflows/tests/src/Kernel/WorkflowAccessControlHandlerTest.php
index 74d6343aa3ced7ad334304ffe4d5b3d1f308a499..6111bac79ca510e2c0b1011e4b6c3e26d39a9ea3 100644
--- a/core/modules/workflows/tests/src/Kernel/WorkflowAccessControlHandlerTest.php
+++ b/core/modules/workflows/tests/src/Kernel/WorkflowAccessControlHandlerTest.php
@@ -20,7 +20,7 @@ class WorkflowAccessControlHandlerTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'workflows',
     'workflow_type_test',
     'system',
diff --git a/core/modules/workflows/tests/src/Kernel/WorkflowDependenciesTest.php b/core/modules/workflows/tests/src/Kernel/WorkflowDependenciesTest.php
index c1070dc53c9af46f2a3247f2947bd8456b2e58f9..bc6d270d702679a562b6ac79013e0263804d14a8 100644
--- a/core/modules/workflows/tests/src/Kernel/WorkflowDependenciesTest.php
+++ b/core/modules/workflows/tests/src/Kernel/WorkflowDependenciesTest.php
@@ -17,7 +17,7 @@ class WorkflowDependenciesTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system', 'workflows', 'workflow_type_test', 'workflow_third_party_settings_test'];
+  protected static $modules = ['system', 'workflows', 'workflow_type_test', 'workflow_third_party_settings_test'];
 
   /**
    * Tests \Drupal\workflows\Entity\Workflow::onDependencyRemoval().
diff --git a/core/modules/workspaces/tests/src/Functional/EntityResource/WorkspaceJsonBasicAuthTest.php b/core/modules/workspaces/tests/src/Functional/EntityResource/WorkspaceJsonBasicAuthTest.php
index c8721232eb9246834fc7b7019908949fda1da873..29cfca9bd762d6b729121fa6a1f83d340fa93999 100644
--- a/core/modules/workspaces/tests/src/Functional/EntityResource/WorkspaceJsonBasicAuthTest.php
+++ b/core/modules/workspaces/tests/src/Functional/EntityResource/WorkspaceJsonBasicAuthTest.php
@@ -16,7 +16,7 @@ class WorkspaceJsonBasicAuthTest extends WorkspaceResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/workspaces/tests/src/Functional/EntityResource/WorkspaceResourceTestBase.php b/core/modules/workspaces/tests/src/Functional/EntityResource/WorkspaceResourceTestBase.php
index 0ddbe996029382a86d719f657126e73bae90f060..031f8c6ae22df467b70a05b3aa44748f4e9a5216 100644
--- a/core/modules/workspaces/tests/src/Functional/EntityResource/WorkspaceResourceTestBase.php
+++ b/core/modules/workspaces/tests/src/Functional/EntityResource/WorkspaceResourceTestBase.php
@@ -14,7 +14,7 @@ abstract class WorkspaceResourceTestBase extends EntityResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['workspaces'];
+  protected static $modules = ['workspaces'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/workspaces/tests/src/Functional/EntityResource/WorkspaceXmlBasicAuthTest.php b/core/modules/workspaces/tests/src/Functional/EntityResource/WorkspaceXmlBasicAuthTest.php
index 8ba105cb82fcf26b8cb276f6afda43d2f1c4dcb9..03ba901dfc80e74e1800b92639602787abcc52ac 100644
--- a/core/modules/workspaces/tests/src/Functional/EntityResource/WorkspaceXmlBasicAuthTest.php
+++ b/core/modules/workspaces/tests/src/Functional/EntityResource/WorkspaceXmlBasicAuthTest.php
@@ -18,7 +18,7 @@ class WorkspaceXmlBasicAuthTest extends WorkspaceResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/workspaces/tests/src/Functional/WorkspaceBypassTest.php b/core/modules/workspaces/tests/src/Functional/WorkspaceBypassTest.php
index ce5aeceeb00ee540b7335e2050d860ef5e28ed66..f8b6bee45697da12b557945e1701a592e74f1824 100644
--- a/core/modules/workspaces/tests/src/Functional/WorkspaceBypassTest.php
+++ b/core/modules/workspaces/tests/src/Functional/WorkspaceBypassTest.php
@@ -18,7 +18,7 @@ class WorkspaceBypassTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'user', 'block', 'workspaces'];
+  protected static $modules = ['node', 'user', 'block', 'workspaces'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/workspaces/tests/src/Functional/WorkspaceCacheContextTest.php b/core/modules/workspaces/tests/src/Functional/WorkspaceCacheContextTest.php
index aabffbb7132c5a52752a726e8220e9b7a13c9e1e..91b3977ffd95055247dbe51a3cf23f4c97213055 100644
--- a/core/modules/workspaces/tests/src/Functional/WorkspaceCacheContextTest.php
+++ b/core/modules/workspaces/tests/src/Functional/WorkspaceCacheContextTest.php
@@ -20,7 +20,7 @@ class WorkspaceCacheContextTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['block', 'node', 'workspaces'];
+  protected static $modules = ['block', 'node', 'workspaces'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/workspaces/tests/src/Functional/WorkspaceConcurrentEditingTest.php b/core/modules/workspaces/tests/src/Functional/WorkspaceConcurrentEditingTest.php
index 6b53ae4109b2ccbb3edfb392f060d0ff9c9b043c..aa8d415b8bb1ce2a3d4f304adddd7ead7a412576 100644
--- a/core/modules/workspaces/tests/src/Functional/WorkspaceConcurrentEditingTest.php
+++ b/core/modules/workspaces/tests/src/Functional/WorkspaceConcurrentEditingTest.php
@@ -16,7 +16,7 @@ class WorkspaceConcurrentEditingTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['block', 'node', 'workspaces'];
+  protected static $modules = ['block', 'node', 'workspaces'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/workspaces/tests/src/Functional/WorkspacePermissionsTest.php b/core/modules/workspaces/tests/src/Functional/WorkspacePermissionsTest.php
index 99d2b0aaf40958cfaecd907bcafdde474505f1f7..7d0a3175a5df3faaeb419efc27c226cdfa4a0e56 100644
--- a/core/modules/workspaces/tests/src/Functional/WorkspacePermissionsTest.php
+++ b/core/modules/workspaces/tests/src/Functional/WorkspacePermissionsTest.php
@@ -17,7 +17,7 @@ class WorkspacePermissionsTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['workspaces'];
+  protected static $modules = ['workspaces'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/workspaces/tests/src/Functional/WorkspaceSwitcherTest.php b/core/modules/workspaces/tests/src/Functional/WorkspaceSwitcherTest.php
index e53478809d6eaa2eaca90b9a69de1f5f8224bbc8..dab04abc64c2303bb02e9524ddfe277a3c70f150 100644
--- a/core/modules/workspaces/tests/src/Functional/WorkspaceSwitcherTest.php
+++ b/core/modules/workspaces/tests/src/Functional/WorkspaceSwitcherTest.php
@@ -18,7 +18,7 @@ class WorkspaceSwitcherTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['block', 'workspaces'];
+  protected static $modules = ['block', 'workspaces'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/workspaces/tests/src/Functional/WorkspaceTest.php b/core/modules/workspaces/tests/src/Functional/WorkspaceTest.php
index 631f73502f1f6a10fbeaa0ccb1591ec2270d1056..4490d7ee25aa5d6d810fcc63c56764a7cb9f8ca8 100644
--- a/core/modules/workspaces/tests/src/Functional/WorkspaceTest.php
+++ b/core/modules/workspaces/tests/src/Functional/WorkspaceTest.php
@@ -16,7 +16,7 @@ class WorkspaceTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['workspaces', 'toolbar', 'field_ui'];
+  protected static $modules = ['workspaces', 'toolbar', 'field_ui'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/workspaces/tests/src/Functional/WorkspaceViewTest.php b/core/modules/workspaces/tests/src/Functional/WorkspaceViewTest.php
index 7468511990a2b10aacfad80b6b84ef7988cd8c61..36e316b68d190785d19a174000ac7510d0b84244 100644
--- a/core/modules/workspaces/tests/src/Functional/WorkspaceViewTest.php
+++ b/core/modules/workspaces/tests/src/Functional/WorkspaceViewTest.php
@@ -17,7 +17,7 @@ class WorkspaceViewTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['workspaces'];
+  protected static $modules = ['workspaces'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/workspaces/tests/src/Functional/WorkspacesUninstallTest.php b/core/modules/workspaces/tests/src/Functional/WorkspacesUninstallTest.php
index bc3e069f66769592c8c0e723a81a548ed461abd5..015a4950b362cfb939b73828c9c15b8f2a569f7b 100644
--- a/core/modules/workspaces/tests/src/Functional/WorkspacesUninstallTest.php
+++ b/core/modules/workspaces/tests/src/Functional/WorkspacesUninstallTest.php
@@ -19,7 +19,7 @@ class WorkspacesUninstallTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['workspaces'];
+  protected static $modules = ['workspaces'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/workspaces/tests/src/FunctionalJavascript/WorkspaceToolbarIntegrationTest.php b/core/modules/workspaces/tests/src/FunctionalJavascript/WorkspaceToolbarIntegrationTest.php
index da012072644d1e8bcfbe8d71c8069ccb0f820446..5655fd7b9b8bb5a94230a7573139d8f5051984ae 100644
--- a/core/modules/workspaces/tests/src/FunctionalJavascript/WorkspaceToolbarIntegrationTest.php
+++ b/core/modules/workspaces/tests/src/FunctionalJavascript/WorkspaceToolbarIntegrationTest.php
@@ -14,7 +14,7 @@ class WorkspaceToolbarIntegrationTest extends OffCanvasTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['toolbar', 'workspaces'];
+  protected static $modules = ['toolbar', 'workspaces'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/workspaces/tests/src/Kernel/WorkspaceCRUDTest.php b/core/modules/workspaces/tests/src/Kernel/WorkspaceCRUDTest.php
index d78bd82feedadec848c2be6ab9f61d370531cf16..75bfdc013556a9d5ebc45ada20d5313432b0401b 100644
--- a/core/modules/workspaces/tests/src/Kernel/WorkspaceCRUDTest.php
+++ b/core/modules/workspaces/tests/src/Kernel/WorkspaceCRUDTest.php
@@ -45,7 +45,7 @@ class WorkspaceCRUDTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'user',
     'system',
     'workspaces',
diff --git a/core/profiles/testing/modules/drupal_system_listing_compatible_test/tests/src/Kernel/SystemListingCrossProfileCompatibleTest.php b/core/profiles/testing/modules/drupal_system_listing_compatible_test/tests/src/Kernel/SystemListingCrossProfileCompatibleTest.php
index da6793db65b83b76cde171cfde007e87d8c7cb96..e20f39e2fdf351cccbb491d573a48b4912dec7c0 100644
--- a/core/profiles/testing/modules/drupal_system_listing_compatible_test/tests/src/Kernel/SystemListingCrossProfileCompatibleTest.php
+++ b/core/profiles/testing/modules/drupal_system_listing_compatible_test/tests/src/Kernel/SystemListingCrossProfileCompatibleTest.php
@@ -20,7 +20,7 @@ class SystemListingCrossProfileCompatibleTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['drupal_system_cross_profile_test'];
+  protected static $modules = ['drupal_system_cross_profile_test'];
 
   /**
    * Use the Minimal profile.
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxCallbacksTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxCallbacksTest.php
index 26e2343601bd4493c7e1a565c69df365fd74eade..d9716ac948cbfde3a7e00416fe0fe9869a0eb5a6 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxCallbacksTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxCallbacksTest.php
@@ -14,7 +14,7 @@ class AjaxCallbacksTest extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['ajax_forms_test'];
+  protected static $modules = ['ajax_forms_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormCacheTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormCacheTest.php
index 00f01d75145024f93250dc9cb02639e2a49d1d57..d3283c0778d85d10af85445ee6f26f8291c90739 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormCacheTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormCacheTest.php
@@ -17,7 +17,7 @@ class AjaxFormCacheTest extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['ajax_test', 'ajax_forms_test'];
+  protected static $modules = ['ajax_test', 'ajax_forms_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormImageButtonTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormImageButtonTest.php
index 64034733cea41e75aae545a6469f2a2c49738ce8..dbac3213156c527932dc6e47aded0d77c98286fc 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormImageButtonTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormImageButtonTest.php
@@ -14,7 +14,7 @@ class AjaxFormImageButtonTest extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['ajax_forms_test'];
+  protected static $modules = ['ajax_forms_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormPageCacheTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormPageCacheTest.php
index 844e394cd7aa5b69e3c6bd9bd694808336e98bd4..7cab905c0d10deb63c2bf00e254f544017208058 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormPageCacheTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormPageCacheTest.php
@@ -14,7 +14,7 @@ class AjaxFormPageCacheTest extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['ajax_test', 'ajax_forms_test'];
+  protected static $modules = ['ajax_test', 'ajax_forms_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxTest.php
index c8b784d48c11f59a0ce661e7b317260b6162efbb..253f18e934f3877b13a057e65b9f81f816a42074 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxTest.php
@@ -14,7 +14,7 @@ class AjaxTest extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['ajax_test'];
+  protected static $modules = ['ajax_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/BackwardCompatibilityTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/BackwardCompatibilityTest.php
index 4c2b94d9ed6dd0b510993efdd803ab737f388f50..b00bf1343f4c2ced41461d85667a99afea474a26 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/BackwardCompatibilityTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/BackwardCompatibilityTest.php
@@ -14,7 +14,7 @@ class BackwardCompatibilityTest extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'js_ajax_test',
   ];
 
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/CommandsTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/CommandsTest.php
index 143c2161be8ed13f1ca381f8ae1926c884b06b18..11e31855175530b29aa6065da7502837a45c3987 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/CommandsTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/CommandsTest.php
@@ -14,7 +14,7 @@ class CommandsTest extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'ajax_test', 'ajax_forms_test'];
+  protected static $modules = ['node', 'ajax_test', 'ajax_forms_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/ElementValidationTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/ElementValidationTest.php
index ad85e98b2a099c5a6ca8e551bb523771a920ce89..e2a7898d92e24c507dc1579fc0375857bf58c845 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/ElementValidationTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/ElementValidationTest.php
@@ -14,7 +14,7 @@ class ElementValidationTest extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['ajax_test', 'ajax_forms_test'];
+  protected static $modules = ['ajax_test', 'ajax_forms_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/FormValuesTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/FormValuesTest.php
index 548e067c616a2f073f757edf5dc689e883a67f91..1ba7b6a60307bab5a4c3a5af9e37bdf5156c627e 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/FormValuesTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/FormValuesTest.php
@@ -14,7 +14,7 @@ class FormValuesTest extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'ajax_test', 'ajax_forms_test'];
+  protected static $modules = ['node', 'ajax_test', 'ajax_forms_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/MultiFormTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/MultiFormTest.php
index 54343f1f7a1371d7388c3bb0325913f6e3cb3475..e6b525fa343866e38138081b0711769029662ab0 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/MultiFormTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/MultiFormTest.php
@@ -19,7 +19,7 @@ class MultiFormTest extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'form_test'];
+  protected static $modules = ['node', 'form_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/ThrobberTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/ThrobberTest.php
index b7ab84d1e32a499a110c7a7beb5d36b9ead77a6e..610c00dacafd689a4b7316ccc1fd92bea965056b 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/ThrobberTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/ThrobberTest.php
@@ -14,7 +14,7 @@ class ThrobberTest extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'node',
     'views',
     'views_ui',
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/BrowserWithJavascriptTest.php b/core/tests/Drupal/FunctionalJavascriptTests/BrowserWithJavascriptTest.php
index c8f2df239199d87482392417156de8d09d909b10..2372faceb772c42ca9b853faa658993ef7e13b80 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/BrowserWithJavascriptTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/BrowserWithJavascriptTest.php
@@ -17,7 +17,7 @@ class BrowserWithJavascriptTest extends WebDriverTestBase {
    *
    * @var array
    */
-  public static $modules = ['test_page_test'];
+  protected static $modules = ['test_page_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Core/Form/FormGroupingElementsTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Core/Form/FormGroupingElementsTest.php
index 6ced6ba51a3d77a7fe87865092af79acdb1b2efe..e4cfcb9bec236811e37c08d4135633f4cdbb415f 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/Core/Form/FormGroupingElementsTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Core/Form/FormGroupingElementsTest.php
@@ -16,7 +16,7 @@ class FormGroupingElementsTest extends WebDriverTestBase {
    *
    * @var array
    */
-  public static $modules = ['form_test'];
+  protected static $modules = ['form_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Core/JsMessageTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Core/JsMessageTest.php
index cfea77218616cb26a2867d1679aefe5307ad520d..f83bea8afcb0fe276a09056a846a79fdca8e3e35 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/Core/JsMessageTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Core/JsMessageTest.php
@@ -15,7 +15,7 @@ class JsMessageTest extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['js_message_test'];
+  protected static $modules = ['js_message_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Core/MachineNameTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Core/MachineNameTest.php
index 1f6c16675277d1cda03ac3791144fdf4e1274604..6782a23f8874907d88682b5b82deef526834b1c1 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/Core/MachineNameTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Core/MachineNameTest.php
@@ -19,7 +19,7 @@ class MachineNameTest extends WebDriverTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'form_test'];
+  protected static $modules = ['node', 'form_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Core/Session/SessionTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Core/Session/SessionTest.php
index 94a4f8f33184f556666db93bf52acdd056a03973..53a54e3c7d22a2668c1a90fe40dca759a026faa9 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/Core/Session/SessionTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Core/Session/SessionTest.php
@@ -15,7 +15,7 @@ class SessionTest extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['menu_link_content', 'block'];
+  protected static $modules = ['menu_link_content', 'block'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Dialog/DialogPositionTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Dialog/DialogPositionTest.php
index 280682341a54cfcd1d05b84f4040932beb2c4d04..bf1f44bc1aaeccdeb35ba2ed6950e79ed4ab3b1c 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/Dialog/DialogPositionTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Dialog/DialogPositionTest.php
@@ -14,7 +14,7 @@ class DialogPositionTest extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['block'];
+  protected static $modules = ['block'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/EntityReference/EntityReferenceAutocompleteWidgetTest.php b/core/tests/Drupal/FunctionalJavascriptTests/EntityReference/EntityReferenceAutocompleteWidgetTest.php
index 23619cddc85c536416a1e5cab70dcbeff02b4e56..d827c2b15d66785aa11fd571aa8dc17679842bad 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/EntityReference/EntityReferenceAutocompleteWidgetTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/EntityReference/EntityReferenceAutocompleteWidgetTest.php
@@ -21,7 +21,7 @@ class EntityReferenceAutocompleteWidgetTest extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'field_ui'];
+  protected static $modules = ['node', 'field_ui'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/JavascriptDeprecationTest.php b/core/tests/Drupal/FunctionalJavascriptTests/JavascriptDeprecationTest.php
index ff9032427f6eea6df330567f85aaec3e3e8313fc..f7efb0a6c5d37d754d84bbe46744c833ceea6ab8 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/JavascriptDeprecationTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/JavascriptDeprecationTest.php
@@ -10,7 +10,7 @@
  */
 class JavascriptDeprecationTest extends WebDriverTestBase {
 
-  public static $modules = ['js_deprecation_test'];
+  protected static $modules = ['js_deprecation_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Tests/JSWebAssertTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Tests/JSWebAssertTest.php
index 14deebe63b7695d572d0719a5eda2768dbce08e2..32e5159336fc6d34e7baa6d3c4ed92272ef8d860 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/Tests/JSWebAssertTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Tests/JSWebAssertTest.php
@@ -18,7 +18,7 @@ class JSWebAssertTest extends WebDriverTestBase {
    *
    * @var array
    */
-  public static $modules = ['js_webassert_test'];
+  protected static $modules = ['js_webassert_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroBlockFilterTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroBlockFilterTest.php
index feccf9392633eaf2a0545ddffe9c5961394dfef2..3e29ae401128bcf367496ba872b4b8b2d2fa5ae5 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroBlockFilterTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroBlockFilterTest.php
@@ -22,7 +22,7 @@ class ClaroBlockFilterTest extends BlockFilterTest {
    *
    * @var string[]
    */
-  public static $modules = ['shortcut'];
+  protected static $modules = ['shortcut'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroEntityDisplayTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroEntityDisplayTest.php
index 67c420bd8edbca2c41e6c4068086e37627f5701b..c672669223d3237db823805ff6af0acfdfdd4d9e 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroEntityDisplayTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroEntityDisplayTest.php
@@ -22,7 +22,7 @@ class ClaroEntityDisplayTest extends EntityDisplayTest {
    *
    * @var string[]
    */
-  public static $modules = ['shortcut'];
+  protected static $modules = ['shortcut'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalTests/Bootstrap/UncaughtExceptionTest.php b/core/tests/Drupal/FunctionalTests/Bootstrap/UncaughtExceptionTest.php
index f9b7bff3625372da63a2ec8d172241e837b05a53..15ebda78b9a39af13901d52a2bcea9da240c2673 100644
--- a/core/tests/Drupal/FunctionalTests/Bootstrap/UncaughtExceptionTest.php
+++ b/core/tests/Drupal/FunctionalTests/Bootstrap/UncaughtExceptionTest.php
@@ -38,7 +38,7 @@ class UncaughtExceptionTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['error_service_test', 'error_test'];
+  protected static $modules = ['error_service_test', 'error_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalTests/Breadcrumb/Breadcrumb404Test.php b/core/tests/Drupal/FunctionalTests/Breadcrumb/Breadcrumb404Test.php
index ef06f3a3fc373278037dea671cf22a9db891f7df..7c069f4473419b786cab28bb35bf57aa3d243f9c 100644
--- a/core/tests/Drupal/FunctionalTests/Breadcrumb/Breadcrumb404Test.php
+++ b/core/tests/Drupal/FunctionalTests/Breadcrumb/Breadcrumb404Test.php
@@ -17,7 +17,7 @@ class Breadcrumb404Test extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system', 'block'];
+  protected static $modules = ['system', 'block'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php b/core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php
index de05572d8da7fbb8a073764788e9166e60480889..ab558a998b508714adaf4e91e1f2f3c26242ae98 100644
--- a/core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php
+++ b/core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php
@@ -24,7 +24,7 @@ class BrowserTestBaseTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['test_page_test', 'form_test', 'system_test', 'node'];
+  protected static $modules = ['test_page_test', 'form_test', 'system_test', 'node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalTests/Core/Config/SchemaConfigListenerTest.php b/core/tests/Drupal/FunctionalTests/Core/Config/SchemaConfigListenerTest.php
index b0061f4f7bfb41186c4ba3bad841d7c545d5d006..a5ab1e8ae5e66ff8eb3876b4381d3fd8a713fc63 100644
--- a/core/tests/Drupal/FunctionalTests/Core/Config/SchemaConfigListenerTest.php
+++ b/core/tests/Drupal/FunctionalTests/Core/Config/SchemaConfigListenerTest.php
@@ -17,7 +17,7 @@ class SchemaConfigListenerTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['config_test'];
+  protected static $modules = ['config_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalTests/Core/Test/AssertLegacyTraitDeprecatedTest.php b/core/tests/Drupal/FunctionalTests/Core/Test/AssertLegacyTraitDeprecatedTest.php
index 4254711ed256b59900981e706da1466cb5767a9c..8bcacec7a7bac4e3cea3ac282b1ff964e274d520 100644
--- a/core/tests/Drupal/FunctionalTests/Core/Test/AssertLegacyTraitDeprecatedTest.php
+++ b/core/tests/Drupal/FunctionalTests/Core/Test/AssertLegacyTraitDeprecatedTest.php
@@ -17,7 +17,7 @@ class AssertLegacyTraitDeprecatedTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['form_test'];
+  protected static $modules = ['form_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalTests/Core/Test/ModuleInstallBatchTest.php b/core/tests/Drupal/FunctionalTests/Core/Test/ModuleInstallBatchTest.php
index dc02499d5138a6ace1281124df148dab0547785e..a26b06c14b2ac01121295d4a63aa2d3f47eb9062 100644
--- a/core/tests/Drupal/FunctionalTests/Core/Test/ModuleInstallBatchTest.php
+++ b/core/tests/Drupal/FunctionalTests/Core/Test/ModuleInstallBatchTest.php
@@ -23,7 +23,7 @@ class ModuleInstallBatchTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['test_batch_test', 'entity_test'];
+  protected static $modules = ['test_batch_test', 'entity_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalTests/Datetime/TimestampAgoFormatterTest.php b/core/tests/Drupal/FunctionalTests/Datetime/TimestampAgoFormatterTest.php
index 23627200785d490b7380c5a943728edc4001bfd3..09be7ad58ee379103dd1d480a3519b5648fcd0b5 100644
--- a/core/tests/Drupal/FunctionalTests/Datetime/TimestampAgoFormatterTest.php
+++ b/core/tests/Drupal/FunctionalTests/Datetime/TimestampAgoFormatterTest.php
@@ -39,7 +39,7 @@ class TimestampAgoFormatterTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['entity_test', 'field_ui'];
+  protected static $modules = ['entity_test', 'field_ui'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalTests/Datetime/TimestampTest.php b/core/tests/Drupal/FunctionalTests/Datetime/TimestampTest.php
index df5685d9b6bca12455ff12da0e0d48a649e3af0f..3428de11518673b4d202857862e31e0c3f0a8146 100644
--- a/core/tests/Drupal/FunctionalTests/Datetime/TimestampTest.php
+++ b/core/tests/Drupal/FunctionalTests/Datetime/TimestampTest.php
@@ -41,7 +41,7 @@ class TimestampTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'entity_test', 'field_ui'];
+  protected static $modules = ['node', 'entity_test', 'field_ui'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalTests/Entity/ContentEntityFormCorrectUserInputMappingOnFieldDeltaElementsTest.php b/core/tests/Drupal/FunctionalTests/Entity/ContentEntityFormCorrectUserInputMappingOnFieldDeltaElementsTest.php
index 440d922bd81b982b2aa3f17571b3a556b86a76dd..41bcc2c3492f16138c54f1f7cd318a4d8cd22acb 100644
--- a/core/tests/Drupal/FunctionalTests/Entity/ContentEntityFormCorrectUserInputMappingOnFieldDeltaElementsTest.php
+++ b/core/tests/Drupal/FunctionalTests/Entity/ContentEntityFormCorrectUserInputMappingOnFieldDeltaElementsTest.php
@@ -31,7 +31,7 @@ class ContentEntityFormCorrectUserInputMappingOnFieldDeltaElementsTest extends B
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['entity_test'];
+  protected static $modules = ['entity_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalTests/Entity/ContentEntityFormFieldValidationFilteringTest.php b/core/tests/Drupal/FunctionalTests/Entity/ContentEntityFormFieldValidationFilteringTest.php
index 8962b158a0087107376f0232cf052ff844726fdf..bb691d429ea694126fced97972585a9c4ccd1748 100644
--- a/core/tests/Drupal/FunctionalTests/Entity/ContentEntityFormFieldValidationFilteringTest.php
+++ b/core/tests/Drupal/FunctionalTests/Entity/ContentEntityFormFieldValidationFilteringTest.php
@@ -48,7 +48,7 @@ class ContentEntityFormFieldValidationFilteringTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['entity_test', 'field_test', 'file', 'image'];
+  protected static $modules = ['entity_test', 'field_test', 'file', 'image'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalTests/Entity/DeleteMultipleFormTest.php b/core/tests/Drupal/FunctionalTests/Entity/DeleteMultipleFormTest.php
index 7f811d70db370f9fc5fd2ea70d952ef841ad0705..65fe583cee12dd050ad8f60717dd671140103840 100644
--- a/core/tests/Drupal/FunctionalTests/Entity/DeleteMultipleFormTest.php
+++ b/core/tests/Drupal/FunctionalTests/Entity/DeleteMultipleFormTest.php
@@ -29,7 +29,7 @@ class DeleteMultipleFormTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['entity_test', 'user', 'language'];
+  protected static $modules = ['entity_test', 'user', 'language'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalTests/Entity/EntityBundleListCacheTest.php b/core/tests/Drupal/FunctionalTests/Entity/EntityBundleListCacheTest.php
index 74e23e80873c7b68739e2600803cbcafc110d5af..e71060bc186ca0c208c22a9223525b59c5857813 100644
--- a/core/tests/Drupal/FunctionalTests/Entity/EntityBundleListCacheTest.php
+++ b/core/tests/Drupal/FunctionalTests/Entity/EntityBundleListCacheTest.php
@@ -22,7 +22,7 @@ class EntityBundleListCacheTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['cache_test', 'entity_test'];
+  protected static $modules = ['cache_test', 'entity_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalTests/FolderTest.php b/core/tests/Drupal/FunctionalTests/FolderTest.php
index c977672d3bf6868993a16a850fc2dca29c915ad0..a8196ebd92555f662fce6b9f532f8552daa9aa23 100644
--- a/core/tests/Drupal/FunctionalTests/FolderTest.php
+++ b/core/tests/Drupal/FunctionalTests/FolderTest.php
@@ -18,7 +18,7 @@ class FolderTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['image'];
+  protected static $modules = ['image'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalTests/Hal/BaseFieldOverrideHalJsonAnonTest.php b/core/tests/Drupal/FunctionalTests/Hal/BaseFieldOverrideHalJsonAnonTest.php
index 254103a087a146dd364d45948d219840a04b29b5..1b781ea49104a92a1c0f6af74a4a16128110f6e2 100644
--- a/core/tests/Drupal/FunctionalTests/Hal/BaseFieldOverrideHalJsonAnonTest.php
+++ b/core/tests/Drupal/FunctionalTests/Hal/BaseFieldOverrideHalJsonAnonTest.php
@@ -15,7 +15,7 @@ class BaseFieldOverrideHalJsonAnonTest extends BaseFieldOverrideResourceTestBase
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalTests/Hal/BaseFieldOverrideHalJsonBasicAuthTest.php b/core/tests/Drupal/FunctionalTests/Hal/BaseFieldOverrideHalJsonBasicAuthTest.php
index 3ebdd19b4d3e69be0172934689a2044a8eccdbcd..4c50b393ddc8355975618d07d7bc1208b4db7a6b 100644
--- a/core/tests/Drupal/FunctionalTests/Hal/BaseFieldOverrideHalJsonBasicAuthTest.php
+++ b/core/tests/Drupal/FunctionalTests/Hal/BaseFieldOverrideHalJsonBasicAuthTest.php
@@ -15,7 +15,7 @@ class BaseFieldOverrideHalJsonBasicAuthTest extends BaseFieldOverrideResourceTes
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal', 'basic_auth'];
+  protected static $modules = ['hal', 'basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalTests/Hal/BaseFieldOverrideHalJsonCookieTest.php b/core/tests/Drupal/FunctionalTests/Hal/BaseFieldOverrideHalJsonCookieTest.php
index c119372abe0cb77aa7842fbc9b7e497445493a03..afa7bfdbe4ea5be7d39c09a774a2c57a7058ad7f 100644
--- a/core/tests/Drupal/FunctionalTests/Hal/BaseFieldOverrideHalJsonCookieTest.php
+++ b/core/tests/Drupal/FunctionalTests/Hal/BaseFieldOverrideHalJsonCookieTest.php
@@ -15,7 +15,7 @@ class BaseFieldOverrideHalJsonCookieTest extends BaseFieldOverrideResourceTestBa
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalTests/Hal/DateFormatHalJsonAnonTest.php b/core/tests/Drupal/FunctionalTests/Hal/DateFormatHalJsonAnonTest.php
index 06bea1c955b1accd106ef0e463495ed010c84e56..4b30531c9ed328ec79589a91704e6fa9d8f4aec3 100644
--- a/core/tests/Drupal/FunctionalTests/Hal/DateFormatHalJsonAnonTest.php
+++ b/core/tests/Drupal/FunctionalTests/Hal/DateFormatHalJsonAnonTest.php
@@ -15,7 +15,7 @@ class DateFormatHalJsonAnonTest extends DateFormatResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalTests/Hal/DateFormatHalJsonBasicAuthTest.php b/core/tests/Drupal/FunctionalTests/Hal/DateFormatHalJsonBasicAuthTest.php
index 106cc68773981e511a5bcea181b7579f627ff585..ce1799f6cb6d51c6c2a31293fe84679e8a12d54b 100644
--- a/core/tests/Drupal/FunctionalTests/Hal/DateFormatHalJsonBasicAuthTest.php
+++ b/core/tests/Drupal/FunctionalTests/Hal/DateFormatHalJsonBasicAuthTest.php
@@ -15,7 +15,7 @@ class DateFormatHalJsonBasicAuthTest extends DateFormatResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal', 'basic_auth'];
+  protected static $modules = ['hal', 'basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalTests/Hal/DateFormatHalJsonCookieTest.php b/core/tests/Drupal/FunctionalTests/Hal/DateFormatHalJsonCookieTest.php
index 17e01a7f7537a19db56ceb4bc47783d84004f65a..cab859896c5a26ba51ab014e639d486a7766189d 100644
--- a/core/tests/Drupal/FunctionalTests/Hal/DateFormatHalJsonCookieTest.php
+++ b/core/tests/Drupal/FunctionalTests/Hal/DateFormatHalJsonCookieTest.php
@@ -15,7 +15,7 @@ class DateFormatHalJsonCookieTest extends DateFormatResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalTests/Hal/EntityFormDisplayHalJsonAnonTest.php b/core/tests/Drupal/FunctionalTests/Hal/EntityFormDisplayHalJsonAnonTest.php
index 726971df204c477edec102e6fb87ab2a69341eaf..97aa324e89e1b54f2aedd3e3750858e3ffdd6382 100644
--- a/core/tests/Drupal/FunctionalTests/Hal/EntityFormDisplayHalJsonAnonTest.php
+++ b/core/tests/Drupal/FunctionalTests/Hal/EntityFormDisplayHalJsonAnonTest.php
@@ -15,7 +15,7 @@ class EntityFormDisplayHalJsonAnonTest extends EntityFormDisplayResourceTestBase
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalTests/Hal/EntityFormDisplayHalJsonBasicAuthTest.php b/core/tests/Drupal/FunctionalTests/Hal/EntityFormDisplayHalJsonBasicAuthTest.php
index 4a051751c921759cecd1bdc77d48bd0f0cb4bfcf..78f5539f3863854cc4df8836bac09a7d8861dbab 100644
--- a/core/tests/Drupal/FunctionalTests/Hal/EntityFormDisplayHalJsonBasicAuthTest.php
+++ b/core/tests/Drupal/FunctionalTests/Hal/EntityFormDisplayHalJsonBasicAuthTest.php
@@ -15,7 +15,7 @@ class EntityFormDisplayHalJsonBasicAuthTest extends EntityFormDisplayResourceTes
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal', 'basic_auth'];
+  protected static $modules = ['hal', 'basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalTests/Hal/EntityFormDisplayHalJsonCookieTest.php b/core/tests/Drupal/FunctionalTests/Hal/EntityFormDisplayHalJsonCookieTest.php
index 1a7aa235fef54be3d2843ebacf097925d568aea0..8ff466c05549b0b06221cf47f5ce39b2888b8294 100644
--- a/core/tests/Drupal/FunctionalTests/Hal/EntityFormDisplayHalJsonCookieTest.php
+++ b/core/tests/Drupal/FunctionalTests/Hal/EntityFormDisplayHalJsonCookieTest.php
@@ -15,7 +15,7 @@ class EntityFormDisplayHalJsonCookieTest extends EntityFormDisplayResourceTestBa
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalTests/Hal/EntityFormModeHalJsonAnonTest.php b/core/tests/Drupal/FunctionalTests/Hal/EntityFormModeHalJsonAnonTest.php
index fb729e522304cee585ea30491074d0c418252590..2ae1c8e08dd1f23229e3fb632ba20ec9e73d97ff 100644
--- a/core/tests/Drupal/FunctionalTests/Hal/EntityFormModeHalJsonAnonTest.php
+++ b/core/tests/Drupal/FunctionalTests/Hal/EntityFormModeHalJsonAnonTest.php
@@ -15,7 +15,7 @@ class EntityFormModeHalJsonAnonTest extends EntityFormModeResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalTests/Hal/EntityFormModeHalJsonBasicAuthTest.php b/core/tests/Drupal/FunctionalTests/Hal/EntityFormModeHalJsonBasicAuthTest.php
index 7cc7e85f91c7062b1d61f9679e3f413cf7f64c88..a5500ce4a4a3142a022b5edc023b6018244675e1 100644
--- a/core/tests/Drupal/FunctionalTests/Hal/EntityFormModeHalJsonBasicAuthTest.php
+++ b/core/tests/Drupal/FunctionalTests/Hal/EntityFormModeHalJsonBasicAuthTest.php
@@ -15,7 +15,7 @@ class EntityFormModeHalJsonBasicAuthTest extends EntityFormModeResourceTestBase
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal', 'basic_auth'];
+  protected static $modules = ['hal', 'basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalTests/Hal/EntityFormModeHalJsonCookieTest.php b/core/tests/Drupal/FunctionalTests/Hal/EntityFormModeHalJsonCookieTest.php
index 4c471c8294581ecc396a9e13cf86119941e55f55..298785506d7f33030e383760cf73d66dfbce2a06 100644
--- a/core/tests/Drupal/FunctionalTests/Hal/EntityFormModeHalJsonCookieTest.php
+++ b/core/tests/Drupal/FunctionalTests/Hal/EntityFormModeHalJsonCookieTest.php
@@ -15,7 +15,7 @@ class EntityFormModeHalJsonCookieTest extends EntityFormModeResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalTests/Hal/EntityViewDisplayHalJsonAnonTest.php b/core/tests/Drupal/FunctionalTests/Hal/EntityViewDisplayHalJsonAnonTest.php
index 0edefde3636afd46e88a8c26710139918444d04f..8daea2ecdb1e3c96dd51b7bff7cbbd8e04dca175 100644
--- a/core/tests/Drupal/FunctionalTests/Hal/EntityViewDisplayHalJsonAnonTest.php
+++ b/core/tests/Drupal/FunctionalTests/Hal/EntityViewDisplayHalJsonAnonTest.php
@@ -15,7 +15,7 @@ class EntityViewDisplayHalJsonAnonTest extends EntityViewDisplayResourceTestBase
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalTests/Hal/EntityViewDisplayHalJsonBasicAuthTest.php b/core/tests/Drupal/FunctionalTests/Hal/EntityViewDisplayHalJsonBasicAuthTest.php
index 841ec8e3b9d7961350a709a7788f56c0bcc43198..a269c032d7471e80cea94b6f4d771691c876149d 100644
--- a/core/tests/Drupal/FunctionalTests/Hal/EntityViewDisplayHalJsonBasicAuthTest.php
+++ b/core/tests/Drupal/FunctionalTests/Hal/EntityViewDisplayHalJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class EntityViewDisplayHalJsonBasicAuthTest extends EntityViewDisplayHalJsonAnon
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalTests/Hal/EntityViewModeHalJsonAnonTest.php b/core/tests/Drupal/FunctionalTests/Hal/EntityViewModeHalJsonAnonTest.php
index 5ec8cddab6854a144f6569fb5a37f5a30f1f0c0c..f7bdd7356abf63104514340b0642ae5c07894794 100644
--- a/core/tests/Drupal/FunctionalTests/Hal/EntityViewModeHalJsonAnonTest.php
+++ b/core/tests/Drupal/FunctionalTests/Hal/EntityViewModeHalJsonAnonTest.php
@@ -15,7 +15,7 @@ class EntityViewModeHalJsonAnonTest extends EntityViewModeResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalTests/Hal/EntityViewModeHalJsonBasicAuthTest.php b/core/tests/Drupal/FunctionalTests/Hal/EntityViewModeHalJsonBasicAuthTest.php
index 5d7b1b90fddeb2f559e256e377ac28cc69c20698..1b829376c9f8097f94177b393ea2f6cf17c1eaac 100644
--- a/core/tests/Drupal/FunctionalTests/Hal/EntityViewModeHalJsonBasicAuthTest.php
+++ b/core/tests/Drupal/FunctionalTests/Hal/EntityViewModeHalJsonBasicAuthTest.php
@@ -15,7 +15,7 @@ class EntityViewModeHalJsonBasicAuthTest extends EntityViewModeResourceTestBase
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal', 'basic_auth'];
+  protected static $modules = ['hal', 'basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalTests/Hal/EntityViewModeHalJsonCookieTest.php b/core/tests/Drupal/FunctionalTests/Hal/EntityViewModeHalJsonCookieTest.php
index 2f883089ad454742954f2acab10d26e30b7fd25f..55c72de5c38c9fb7b4aa84b069f2ce7808556d8f 100644
--- a/core/tests/Drupal/FunctionalTests/Hal/EntityViewModeHalJsonCookieTest.php
+++ b/core/tests/Drupal/FunctionalTests/Hal/EntityViewModeHalJsonCookieTest.php
@@ -15,7 +15,7 @@ class EntityViewModeHalJsonCookieTest extends EntityViewModeResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalTests/HttpKernel/CorsIntegrationTest.php b/core/tests/Drupal/FunctionalTests/HttpKernel/CorsIntegrationTest.php
index 75ba6fc2296b0324b42e416acc05b1a92a0e9cfc..cc00d2f3133cd0c6078f1978617dbbef327d1441 100644
--- a/core/tests/Drupal/FunctionalTests/HttpKernel/CorsIntegrationTest.php
+++ b/core/tests/Drupal/FunctionalTests/HttpKernel/CorsIntegrationTest.php
@@ -19,7 +19,7 @@ class CorsIntegrationTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system', 'test_page_test', 'page_cache'];
+  protected static $modules = ['system', 'test_page_test', 'page_cache'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalTests/Image/ToolkitSetupFormTest.php b/core/tests/Drupal/FunctionalTests/Image/ToolkitSetupFormTest.php
index a33bf6dbc73ce219bfd1c753b4270da36a237183..af1673318c9913e3105c486a2de3c2afea5ca2a6 100644
--- a/core/tests/Drupal/FunctionalTests/Image/ToolkitSetupFormTest.php
+++ b/core/tests/Drupal/FunctionalTests/Image/ToolkitSetupFormTest.php
@@ -23,7 +23,7 @@ class ToolkitSetupFormTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['system', 'image_test'];
+  protected static $modules = ['system', 'image_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalTests/Image/ToolkitTestBase.php b/core/tests/Drupal/FunctionalTests/Image/ToolkitTestBase.php
index 4e2f5decbeacb1e2cc46459790a2868097856f75..7dc0abe9698b71ca834aea11c4e6da6165c71571 100644
--- a/core/tests/Drupal/FunctionalTests/Image/ToolkitTestBase.php
+++ b/core/tests/Drupal/FunctionalTests/Image/ToolkitTestBase.php
@@ -19,7 +19,7 @@ abstract class ToolkitTestBase extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['image_test'];
+  protected static $modules = ['image_test'];
 
   /**
    * The URI for the file.
diff --git a/core/tests/Drupal/FunctionalTests/Rest/BaseFieldOverrideJsonBasicAuthTest.php b/core/tests/Drupal/FunctionalTests/Rest/BaseFieldOverrideJsonBasicAuthTest.php
index c922c8d6d1a64c0cee8d52ae8fa0708159788e2d..fc87e3660bd08c783453e6b24739bae9fd14dfe4 100644
--- a/core/tests/Drupal/FunctionalTests/Rest/BaseFieldOverrideJsonBasicAuthTest.php
+++ b/core/tests/Drupal/FunctionalTests/Rest/BaseFieldOverrideJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class BaseFieldOverrideJsonBasicAuthTest extends BaseFieldOverrideResourceTestBa
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalTests/Rest/BaseFieldOverrideResourceTestBase.php b/core/tests/Drupal/FunctionalTests/Rest/BaseFieldOverrideResourceTestBase.php
index dbd49973009740b8b9816a8685f1572bc2899150..4a361bfb73a8cab2840614207234c4960cde6fa5 100644
--- a/core/tests/Drupal/FunctionalTests/Rest/BaseFieldOverrideResourceTestBase.php
+++ b/core/tests/Drupal/FunctionalTests/Rest/BaseFieldOverrideResourceTestBase.php
@@ -11,7 +11,7 @@ abstract class BaseFieldOverrideResourceTestBase extends EntityResourceTestBase
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['field', 'node'];
+  protected static $modules = ['field', 'node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalTests/Rest/BaseFieldOverrideXmlBasicAuthTest.php b/core/tests/Drupal/FunctionalTests/Rest/BaseFieldOverrideXmlBasicAuthTest.php
index 3a3f08bf5719c54b99cc280a44e5691381b15b1e..25e997731b4375ea9dc272157b079261d842277d 100644
--- a/core/tests/Drupal/FunctionalTests/Rest/BaseFieldOverrideXmlBasicAuthTest.php
+++ b/core/tests/Drupal/FunctionalTests/Rest/BaseFieldOverrideXmlBasicAuthTest.php
@@ -16,7 +16,7 @@ class BaseFieldOverrideXmlBasicAuthTest extends BaseFieldOverrideResourceTestBas
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalTests/Rest/DateFormatJsonBasicAuthTest.php b/core/tests/Drupal/FunctionalTests/Rest/DateFormatJsonBasicAuthTest.php
index 0ae83504a45f6f396407c800a4e92682956dedce..a73ce98a69f93d03611016c837ddc90f56fb7850 100644
--- a/core/tests/Drupal/FunctionalTests/Rest/DateFormatJsonBasicAuthTest.php
+++ b/core/tests/Drupal/FunctionalTests/Rest/DateFormatJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class DateFormatJsonBasicAuthTest extends DateFormatResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalTests/Rest/DateFormatResourceTestBase.php b/core/tests/Drupal/FunctionalTests/Rest/DateFormatResourceTestBase.php
index 30cc347e5d3da62a45d94d5ebf08acbaf038b16c..aea62d4d17981866dee5ee62ce63e835d83dbd78 100644
--- a/core/tests/Drupal/FunctionalTests/Rest/DateFormatResourceTestBase.php
+++ b/core/tests/Drupal/FunctionalTests/Rest/DateFormatResourceTestBase.php
@@ -13,7 +13,7 @@ abstract class DateFormatResourceTestBase extends EntityResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [];
+  protected static $modules = [];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalTests/Rest/DateFormatXmlBasicAuthTest.php b/core/tests/Drupal/FunctionalTests/Rest/DateFormatXmlBasicAuthTest.php
index 8a09a33a8422d15a8b1f91cfc68c215d095227e2..1aaa843590f65b47d837ec7b299fa068607a42b1 100644
--- a/core/tests/Drupal/FunctionalTests/Rest/DateFormatXmlBasicAuthTest.php
+++ b/core/tests/Drupal/FunctionalTests/Rest/DateFormatXmlBasicAuthTest.php
@@ -16,7 +16,7 @@ class DateFormatXmlBasicAuthTest extends DateFormatResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayJsonBasicAuthTest.php b/core/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayJsonBasicAuthTest.php
index a3871c8455992e6c183e84133ace483543090b2b..97347836b75bb583184b762fc24544d922745f2e 100644
--- a/core/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayJsonBasicAuthTest.php
+++ b/core/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class EntityFormDisplayJsonBasicAuthTest extends EntityFormDisplayResourceTestBa
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayResourceTestBase.php b/core/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayResourceTestBase.php
index e3ab4aa4a96fa48cf10457ffffbadfda95ae51d0..5ccd9ad5d1f15148e99f44ef420df036ba09da9f 100644
--- a/core/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayResourceTestBase.php
+++ b/core/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayResourceTestBase.php
@@ -11,7 +11,7 @@ abstract class EntityFormDisplayResourceTestBase extends EntityResourceTestBase
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node'];
+  protected static $modules = ['node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayXmlBasicAuthTest.php b/core/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayXmlBasicAuthTest.php
index ba89d79e1f4521f2107c6c1b72696c8eb346e420..380127efd0c188be0ef9cbb6b98d2a7921fe2fc1 100644
--- a/core/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayXmlBasicAuthTest.php
+++ b/core/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayXmlBasicAuthTest.php
@@ -16,7 +16,7 @@ class EntityFormDisplayXmlBasicAuthTest extends EntityFormDisplayResourceTestBas
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalTests/Rest/EntityFormModeJsonBasicAuthTest.php b/core/tests/Drupal/FunctionalTests/Rest/EntityFormModeJsonBasicAuthTest.php
index a813e1a2de36c7d4127e77c9af8c023b86a06f65..5f5a1a0694fe71801b7b64697daefc5c12912c98 100644
--- a/core/tests/Drupal/FunctionalTests/Rest/EntityFormModeJsonBasicAuthTest.php
+++ b/core/tests/Drupal/FunctionalTests/Rest/EntityFormModeJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class EntityFormModeJsonBasicAuthTest extends EntityFormModeResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalTests/Rest/EntityFormModeResourceTestBase.php b/core/tests/Drupal/FunctionalTests/Rest/EntityFormModeResourceTestBase.php
index e03710ab41c71f8873c31c246e2bc8054d7ca871..362006ed1b4883f497665c74002cdd2cdab57420 100644
--- a/core/tests/Drupal/FunctionalTests/Rest/EntityFormModeResourceTestBase.php
+++ b/core/tests/Drupal/FunctionalTests/Rest/EntityFormModeResourceTestBase.php
@@ -12,7 +12,7 @@ abstract class EntityFormModeResourceTestBase extends EntityResourceTestBase {
    *
    * @todo: Remove 'field_ui' when https://www.drupal.org/node/2867266.
    */
-  public static $modules = ['user', 'field_ui'];
+  protected static $modules = ['user', 'field_ui'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalTests/Rest/EntityFormModeXmlBasicAuthTest.php b/core/tests/Drupal/FunctionalTests/Rest/EntityFormModeXmlBasicAuthTest.php
index 64ce5a08311f3e8418ea08c3120baafe09a1f220..04f0ec53b2f63549e254b941a1667e6da73ffca3 100644
--- a/core/tests/Drupal/FunctionalTests/Rest/EntityFormModeXmlBasicAuthTest.php
+++ b/core/tests/Drupal/FunctionalTests/Rest/EntityFormModeXmlBasicAuthTest.php
@@ -16,7 +16,7 @@ class EntityFormModeXmlBasicAuthTest extends EntityFormModeResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalTests/Rest/EntityViewDisplayJsonBasicAuthTest.php b/core/tests/Drupal/FunctionalTests/Rest/EntityViewDisplayJsonBasicAuthTest.php
index efd558c9f6f8083165387f26feaad8e647d25234..9a2f11915f7f05e35395874e74b7681c00843802 100644
--- a/core/tests/Drupal/FunctionalTests/Rest/EntityViewDisplayJsonBasicAuthTest.php
+++ b/core/tests/Drupal/FunctionalTests/Rest/EntityViewDisplayJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class EntityViewDisplayJsonBasicAuthTest extends EntityViewDisplayResourceTestBa
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalTests/Rest/EntityViewDisplayResourceTestBase.php b/core/tests/Drupal/FunctionalTests/Rest/EntityViewDisplayResourceTestBase.php
index 3495e37187d38b352f8bc3d3c7bebaaebecf1e7f..50f6f3b6f3e3cb0e16c4f6013145e4fa077b453d 100644
--- a/core/tests/Drupal/FunctionalTests/Rest/EntityViewDisplayResourceTestBase.php
+++ b/core/tests/Drupal/FunctionalTests/Rest/EntityViewDisplayResourceTestBase.php
@@ -11,7 +11,7 @@ abstract class EntityViewDisplayResourceTestBase extends EntityResourceTestBase
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node'];
+  protected static $modules = ['node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalTests/Rest/EntityViewDisplayXmlBasicAuthTest.php b/core/tests/Drupal/FunctionalTests/Rest/EntityViewDisplayXmlBasicAuthTest.php
index be597c534ce52f067e2c575cc4371fc19d40b50e..33e0c288ba14900ff734b3f2dd90fce44aa62714 100644
--- a/core/tests/Drupal/FunctionalTests/Rest/EntityViewDisplayXmlBasicAuthTest.php
+++ b/core/tests/Drupal/FunctionalTests/Rest/EntityViewDisplayXmlBasicAuthTest.php
@@ -16,7 +16,7 @@ class EntityViewDisplayXmlBasicAuthTest extends EntityViewDisplayResourceTestBas
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalTests/Rest/EntityViewModeJsonBasicAuthTest.php b/core/tests/Drupal/FunctionalTests/Rest/EntityViewModeJsonBasicAuthTest.php
index 70f5271ea5fd491304a1b87afd266bd3bc4bb922..ca333234d3598bbe862b49e43ae9a148d31098b0 100644
--- a/core/tests/Drupal/FunctionalTests/Rest/EntityViewModeJsonBasicAuthTest.php
+++ b/core/tests/Drupal/FunctionalTests/Rest/EntityViewModeJsonBasicAuthTest.php
@@ -14,7 +14,7 @@ class EntityViewModeJsonBasicAuthTest extends EntityViewModeResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalTests/Rest/EntityViewModeResourceTestBase.php b/core/tests/Drupal/FunctionalTests/Rest/EntityViewModeResourceTestBase.php
index b20ce6368fb0e2c58c8d5d7616596c78c9e9d504..67b5046d52176c453cd6185b9e040c591b8452d5 100644
--- a/core/tests/Drupal/FunctionalTests/Rest/EntityViewModeResourceTestBase.php
+++ b/core/tests/Drupal/FunctionalTests/Rest/EntityViewModeResourceTestBase.php
@@ -12,7 +12,7 @@ abstract class EntityViewModeResourceTestBase extends EntityResourceTestBase {
    *
    * @todo: Remove 'field_ui' when https://www.drupal.org/node/2867266.
    */
-  public static $modules = ['user', 'field_ui'];
+  protected static $modules = ['user', 'field_ui'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalTests/Rest/EntityViewModeXmlBasicAuthTest.php b/core/tests/Drupal/FunctionalTests/Rest/EntityViewModeXmlBasicAuthTest.php
index 510ef4dea7b7d3cfd38352f3b6f5a79c7d136b93..9699ef43acfd23033d9217dd875ab0c83dddc88e 100644
--- a/core/tests/Drupal/FunctionalTests/Rest/EntityViewModeXmlBasicAuthTest.php
+++ b/core/tests/Drupal/FunctionalTests/Rest/EntityViewModeXmlBasicAuthTest.php
@@ -16,7 +16,7 @@ class EntityViewModeXmlBasicAuthTest extends EntityViewModeResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['basic_auth'];
+  protected static $modules = ['basic_auth'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalTests/Routing/CaseInsensitivePathTest.php b/core/tests/Drupal/FunctionalTests/Routing/CaseInsensitivePathTest.php
index 3c240d26101b5ec80706b95e638aa81e17baac90..7d35ecb43c30336953aea8ce5a3f11305bd15998 100644
--- a/core/tests/Drupal/FunctionalTests/Routing/CaseInsensitivePathTest.php
+++ b/core/tests/Drupal/FunctionalTests/Routing/CaseInsensitivePathTest.php
@@ -14,7 +14,7 @@ class CaseInsensitivePathTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system', 'views', 'node', 'system_test'];
+  protected static $modules = ['system', 'views', 'node', 'system_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalTests/Routing/DefaultFormatTest.php b/core/tests/Drupal/FunctionalTests/Routing/DefaultFormatTest.php
index 6a6f63f33ca88042cf72bc5c24374e67ad95b2ea..c0f3d88409fdfccddb40ad1631c7e41da03708a3 100644
--- a/core/tests/Drupal/FunctionalTests/Routing/DefaultFormatTest.php
+++ b/core/tests/Drupal/FunctionalTests/Routing/DefaultFormatTest.php
@@ -12,7 +12,7 @@ class DefaultFormatTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system', 'default_format_test'];
+  protected static $modules = ['system', 'default_format_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalTests/Routing/PathEncodedTest.php b/core/tests/Drupal/FunctionalTests/Routing/PathEncodedTest.php
index 9962b993890e86baf18ff9a7bad371040200237c..e079606c3bde9846cae218e8806c372cb9fff678 100644
--- a/core/tests/Drupal/FunctionalTests/Routing/PathEncodedTest.php
+++ b/core/tests/Drupal/FunctionalTests/Routing/PathEncodedTest.php
@@ -19,7 +19,7 @@ class PathEncodedTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system', 'path_encoded_test'];
+  protected static $modules = ['system', 'path_encoded_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalTests/Routing/RouteCachingLanguageTest.php b/core/tests/Drupal/FunctionalTests/Routing/RouteCachingLanguageTest.php
index a94837549c132642260be0240c010e1289cc0571..760bcaf310f7cd04e46a61074c0e3be8424dbdf7 100644
--- a/core/tests/Drupal/FunctionalTests/Routing/RouteCachingLanguageTest.php
+++ b/core/tests/Drupal/FunctionalTests/Routing/RouteCachingLanguageTest.php
@@ -20,7 +20,7 @@ class RouteCachingLanguageTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['path', 'node', 'content_translation', 'link', 'block'];
+  protected static $modules = ['path', 'node', 'content_translation', 'link', 'block'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalTests/Routing/RouteCachingNonPathLanguageNegotiationTest.php b/core/tests/Drupal/FunctionalTests/Routing/RouteCachingNonPathLanguageNegotiationTest.php
index 6c7d7c008dd2d87ebb6c835e946eb345a768dc22..a054d40091fcc681f01e253af0b9f035ae2f8d25 100644
--- a/core/tests/Drupal/FunctionalTests/Routing/RouteCachingNonPathLanguageNegotiationTest.php
+++ b/core/tests/Drupal/FunctionalTests/Routing/RouteCachingNonPathLanguageNegotiationTest.php
@@ -21,7 +21,7 @@ class RouteCachingNonPathLanguageNegotiationTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['language', 'block'];
+  protected static $modules = ['language', 'block'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalTests/Theme/ClaroLayoutBuilderTest.php b/core/tests/Drupal/FunctionalTests/Theme/ClaroLayoutBuilderTest.php
index 1522fad5c0eb7dbb419d5a6a012581004d51b2f6..be51a9774fd619246a7b56582408862026897baf 100644
--- a/core/tests/Drupal/FunctionalTests/Theme/ClaroLayoutBuilderTest.php
+++ b/core/tests/Drupal/FunctionalTests/Theme/ClaroLayoutBuilderTest.php
@@ -19,7 +19,7 @@ class ClaroLayoutBuilderTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'views',
     'layout_builder',
     'layout_builder_views_test',
diff --git a/core/tests/Drupal/FunctionalTests/Theme/ClaroTest.php b/core/tests/Drupal/FunctionalTests/Theme/ClaroTest.php
index 8ac05f4ad65ee9a9b4ac2cfc7c94f158f06d6efc..33b4d61ba386fb0dca5bbecbc238ab00a390a332 100644
--- a/core/tests/Drupal/FunctionalTests/Theme/ClaroTest.php
+++ b/core/tests/Drupal/FunctionalTests/Theme/ClaroTest.php
@@ -20,7 +20,7 @@ class ClaroTest extends BrowserTestBase {
    *
    * @var string[]
    */
-  public static $modules = ['shortcut'];
+  protected static $modules = ['shortcut'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalTests/Theme/SevenLayoutBuilderTest.php b/core/tests/Drupal/FunctionalTests/Theme/SevenLayoutBuilderTest.php
index bc9047a33e335efa3568b0dfad92a9460dd571c5..9ebb499ab99d19571e47cdb7b0b656cd8a83d1fc 100644
--- a/core/tests/Drupal/FunctionalTests/Theme/SevenLayoutBuilderTest.php
+++ b/core/tests/Drupal/FunctionalTests/Theme/SevenLayoutBuilderTest.php
@@ -19,7 +19,7 @@ class SevenLayoutBuilderTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'views',
     'layout_builder',
     'layout_builder_views_test',
diff --git a/core/tests/Drupal/KernelTests/Component/Render/FormattableMarkupKernelTest.php b/core/tests/Drupal/KernelTests/Component/Render/FormattableMarkupKernelTest.php
index 92761baed63cc4fcc69f5ea9d20074868c6c54bd..cc77f70864d08261dcea0321ef9ee7345b8ce65c 100644
--- a/core/tests/Drupal/KernelTests/Component/Render/FormattableMarkupKernelTest.php
+++ b/core/tests/Drupal/KernelTests/Component/Render/FormattableMarkupKernelTest.php
@@ -16,7 +16,7 @@ class FormattableMarkupKernelTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system'];
+  protected static $modules = ['system'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/KernelTests/Config/DefaultConfigTest.php b/core/tests/Drupal/KernelTests/Config/DefaultConfigTest.php
index 17006fc3e38813b83729bea9db932016e6c0085e..f0da2a736b0264016102d3d4af2d6edf0f97784f 100644
--- a/core/tests/Drupal/KernelTests/Config/DefaultConfigTest.php
+++ b/core/tests/Drupal/KernelTests/Config/DefaultConfigTest.php
@@ -28,7 +28,7 @@ class DefaultConfigTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system', 'user', 'path_alias'];
+  protected static $modules = ['system', 'user', 'path_alias'];
 
   /**
    * The following config entries are changed on module install.
diff --git a/core/tests/Drupal/KernelTests/Config/TypedConfigTest.php b/core/tests/Drupal/KernelTests/Config/TypedConfigTest.php
index 6cce2bab0ed79ede9bce7ea9783ce13201bc45df..9c4fcd557bb398207ca7b9e5016d9c26a578d3fd 100644
--- a/core/tests/Drupal/KernelTests/Config/TypedConfigTest.php
+++ b/core/tests/Drupal/KernelTests/Config/TypedConfigTest.php
@@ -21,7 +21,7 @@ class TypedConfigTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['config_test'];
+  protected static $modules = ['config_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/KernelTests/Core/Action/DeleteActionTest.php b/core/tests/Drupal/KernelTests/Core/Action/DeleteActionTest.php
index 01fc6e28732252b54a5a706990711635381adf16..11cb3708b00f9cff18a0b8bd439b260239777039 100644
--- a/core/tests/Drupal/KernelTests/Core/Action/DeleteActionTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Action/DeleteActionTest.php
@@ -18,7 +18,7 @@ class DeleteActionTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system', 'entity_test', 'user'];
+  protected static $modules = ['system', 'entity_test', 'user'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/KernelTests/Core/Action/EmailActionTest.php b/core/tests/Drupal/KernelTests/Core/Action/EmailActionTest.php
index 6a2f621c1512ef532c3ccd44e97c2deec88e4739..ae69854fa9827da417b4b79dbf63ba5cd6002d8f 100644
--- a/core/tests/Drupal/KernelTests/Core/Action/EmailActionTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Action/EmailActionTest.php
@@ -16,7 +16,7 @@ class EmailActionTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system', 'user', 'dblog'];
+  protected static $modules = ['system', 'user', 'dblog'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/KernelTests/Core/Action/PublishActionTest.php b/core/tests/Drupal/KernelTests/Core/Action/PublishActionTest.php
index 41898209de6ee076c267cd5dc3043640de6d276f..0b76d7eea08898bc236e03a46d5acf8f365ff678 100644
--- a/core/tests/Drupal/KernelTests/Core/Action/PublishActionTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Action/PublishActionTest.php
@@ -15,7 +15,7 @@ class PublishActionTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system', 'entity_test', 'user'];
+  protected static $modules = ['system', 'entity_test', 'user'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/KernelTests/Core/Action/SaveActionTest.php b/core/tests/Drupal/KernelTests/Core/Action/SaveActionTest.php
index ae85ee97d3d737dd2505ef25e8295c6ac2cc4765..903164e1c141c64c194108fa2aa72af0202d470d 100644
--- a/core/tests/Drupal/KernelTests/Core/Action/SaveActionTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Action/SaveActionTest.php
@@ -15,7 +15,7 @@ class SaveActionTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system', 'entity_test', 'user'];
+  protected static $modules = ['system', 'entity_test', 'user'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/KernelTests/Core/Ajax/CommandsTest.php b/core/tests/Drupal/KernelTests/Core/Ajax/CommandsTest.php
index 6d5b531e1ed3eff645791798cec8e7620b972fc6..630771c15c04a3c2fccc465006ca68702f8dc438 100644
--- a/core/tests/Drupal/KernelTests/Core/Ajax/CommandsTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Ajax/CommandsTest.php
@@ -20,7 +20,7 @@ class CommandsTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system', 'node', 'ajax_test', 'ajax_forms_test'];
+  protected static $modules = ['system', 'node', 'ajax_test', 'ajax_forms_test'];
 
   /**
    * Regression test: Settings command exists regardless of JS aggregation.
diff --git a/core/tests/Drupal/KernelTests/Core/Asset/AttachedAssetsTest.php b/core/tests/Drupal/KernelTests/Core/Asset/AttachedAssetsTest.php
index 15713bdac95233916dde91e02109daf01bace7ae..3beccb97c2c279a8cd17d2ac9f22d51f16c6d533 100644
--- a/core/tests/Drupal/KernelTests/Core/Asset/AttachedAssetsTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Asset/AttachedAssetsTest.php
@@ -38,7 +38,7 @@ class AttachedAssetsTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['language', 'common_test', 'system'];
+  protected static $modules = ['language', 'common_test', 'system'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/KernelTests/Core/Asset/ResolvedLibraryDefinitionsFilesMatchTest.php b/core/tests/Drupal/KernelTests/Core/Asset/ResolvedLibraryDefinitionsFilesMatchTest.php
index 52cf8494f28cf2a907e83265ad446abd3fb0c5a2..7a2e28de201909dbeaafc0326c716cdd7235dd8b 100644
--- a/core/tests/Drupal/KernelTests/Core/Asset/ResolvedLibraryDefinitionsFilesMatchTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Asset/ResolvedLibraryDefinitionsFilesMatchTest.php
@@ -86,7 +86,7 @@ class ResolvedLibraryDefinitionsFilesMatchTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system', 'user', 'path_alias'];
+  protected static $modules = ['system', 'user', 'path_alias'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/KernelTests/Core/Block/MultipleBlockFormTest.php b/core/tests/Drupal/KernelTests/Core/Block/MultipleBlockFormTest.php
index 2fbe025acfe9472a366f4cfdabf9eac36d56ff88..140621fc033f60e2077725b1cde1c7624552a698 100644
--- a/core/tests/Drupal/KernelTests/Core/Block/MultipleBlockFormTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Block/MultipleBlockFormTest.php
@@ -15,7 +15,7 @@ class MultipleBlockFormTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system', 'block', 'block_test'];
+  protected static $modules = ['system', 'block', 'block_test'];
 
   /**
    * Tests that blocks can have multiple forms.
diff --git a/core/tests/Drupal/KernelTests/Core/Bootstrap/GetFilenameTest.php b/core/tests/Drupal/KernelTests/Core/Bootstrap/GetFilenameTest.php
index 4772366c11504a16599d243726a73100e73ebe17..0a063d12e111516c453658cd6b4afe18b6b77121 100644
--- a/core/tests/Drupal/KernelTests/Core/Bootstrap/GetFilenameTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Bootstrap/GetFilenameTest.php
@@ -15,7 +15,7 @@ class GetFilenameTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system'];
+  protected static $modules = ['system'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/KernelTests/Core/Cache/CacheContextOptimizationTest.php b/core/tests/Drupal/KernelTests/Core/Cache/CacheContextOptimizationTest.php
index af9d53a8bb52bc5b439fa4f4150efab9a4e057f8..4bdceb4bb481267455ec4b9ca401d6836fbebe21 100644
--- a/core/tests/Drupal/KernelTests/Core/Cache/CacheContextOptimizationTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Cache/CacheContextOptimizationTest.php
@@ -20,7 +20,7 @@ class CacheContextOptimizationTest extends KernelTestBase {
    *
    * @var string[]
    */
-  public static $modules = ['user', 'system'];
+  protected static $modules = ['user', 'system'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/KernelTests/Core/Cache/DatabaseBackendTagTest.php b/core/tests/Drupal/KernelTests/Core/Cache/DatabaseBackendTagTest.php
index 912fddf71a7a62d69aa0fd1b2fcb87d53d01a760..eaa8a5a780cc5dbec5db8cec00ce8f2b953e5dba 100644
--- a/core/tests/Drupal/KernelTests/Core/Cache/DatabaseBackendTagTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Cache/DatabaseBackendTagTest.php
@@ -20,7 +20,7 @@ class DatabaseBackendTagTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['system'];
+  protected static $modules = ['system'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/KernelTests/Core/Cache/DatabaseBackendTest.php b/core/tests/Drupal/KernelTests/Core/Cache/DatabaseBackendTest.php
index 358b92530c6f75ca6014c07388f6fe2de0c3fa91..4563bfe2d87ffa232ac11fd25fd8d56e25203bc5 100644
--- a/core/tests/Drupal/KernelTests/Core/Cache/DatabaseBackendTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Cache/DatabaseBackendTest.php
@@ -23,7 +23,7 @@ class DatabaseBackendTest extends GenericCacheBackendUnitTestBase {
    *
    * @var array
    */
-  public static $modules = ['system'];
+  protected static $modules = ['system'];
 
   /**
    * Creates a new instance of DatabaseBackend.
diff --git a/core/tests/Drupal/KernelTests/Core/Cache/EndOfTransactionQueriesTest.php b/core/tests/Drupal/KernelTests/Core/Cache/EndOfTransactionQueriesTest.php
index 46ab7020e4200698f828e18dfa99a058490cab7e..7ff31796d4bfc4604634eb9059a4b4af6412ca84 100644
--- a/core/tests/Drupal/KernelTests/Core/Cache/EndOfTransactionQueriesTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Cache/EndOfTransactionQueriesTest.php
@@ -20,7 +20,7 @@ class EndOfTransactionQueriesTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'delay_cache_tags_invalidation',
     'entity_test',
     'system',
diff --git a/core/tests/Drupal/KernelTests/Core/Command/DbDumpTest.php b/core/tests/Drupal/KernelTests/Core/Command/DbDumpTest.php
index 7fafa6a6bfb97e6a9b5eae088ff3c6347447c493..4517264e004753b7252fddc495347a12b53ec749 100644
--- a/core/tests/Drupal/KernelTests/Core/Command/DbDumpTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Command/DbDumpTest.php
@@ -25,7 +25,7 @@ class DbDumpTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system', 'config', 'dblog', 'menu_link_content', 'link', 'block_content', 'file', 'path_alias', 'user'];
+  protected static $modules = ['system', 'config', 'dblog', 'menu_link_content', 'link', 'block_content', 'file', 'path_alias', 'user'];
 
   /**
    * Test data to write into config.
diff --git a/core/tests/Drupal/KernelTests/Core/Common/XssUnitTest.php b/core/tests/Drupal/KernelTests/Core/Common/XssUnitTest.php
index 04bf69cf6b09fe92b656ceaaa623c3607bb2fb8c..599ab8d93f6a5377aa102392dc4747df394b10ac 100644
--- a/core/tests/Drupal/KernelTests/Core/Common/XssUnitTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Common/XssUnitTest.php
@@ -18,7 +18,7 @@ class XssUnitTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['filter', 'system'];
+  protected static $modules = ['filter', 'system'];
 
   protected function setUp(): void {
     parent::setUp();
diff --git a/core/tests/Drupal/KernelTests/Core/Config/CacheabilityMetadataConfigOverrideTest.php b/core/tests/Drupal/KernelTests/Core/Config/CacheabilityMetadataConfigOverrideTest.php
index 5ae4df2e144d7cd8def52443497619c3de5b9ba4..87533290118cc6d9c36b5155d2d39edc0cbaa80e 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/CacheabilityMetadataConfigOverrideTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/CacheabilityMetadataConfigOverrideTest.php
@@ -15,7 +15,7 @@ class CacheabilityMetadataConfigOverrideTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'block',
     'block_content',
     'config',
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigCRUDTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigCRUDTest.php
index 52269c0dfe5f12715f99d476aa6c2e92de278c5f..23068f2d7a57c00044476571e1cc9a9f4003cbf4 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigCRUDTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigCRUDTest.php
@@ -33,7 +33,7 @@ class ConfigCRUDTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['system'];
+  protected static $modules = ['system'];
 
   /**
    * Tests CRUD operations.
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigDependencyTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigDependencyTest.php
index 63e3b8fd01dbd0b75803ea0b59c675b899c72d19..98693a7b223cb9a52d03e4c97aa5cdb1512324b1 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigDependencyTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigDependencyTest.php
@@ -21,7 +21,7 @@ class ConfigDependencyTest extends EntityKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['config_test', 'entity_test', 'user'];
+  protected static $modules = ['config_test', 'entity_test', 'user'];
 
   /**
    * Tests that calculating dependencies for system module.
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigDiffTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigDiffTest.php
index f29b88acd1410322035d6701ba6b84a9d9b6b036..279817671594ef765c2a0c8037dac94393feb797 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigDiffTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigDiffTest.php
@@ -16,7 +16,7 @@ class ConfigDiffTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['config_test', 'system'];
+  protected static $modules = ['config_test', 'system'];
 
   /**
    * Tests calculating the difference between two sets of configuration.
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityNormalizeTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityNormalizeTest.php
index 1d97bb82b07bc7761d31dfc7e31006ab82414458..f4e7a50f5053c063a77ffb4c0e7f305d11a014d4 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityNormalizeTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityNormalizeTest.php
@@ -16,7 +16,7 @@ class ConfigEntityNormalizeTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['config_test'];
+  protected static $modules = ['config_test'];
 
   protected function setUp(): void {
     parent::setUp();
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityStaticCacheTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityStaticCacheTest.php
index beb7413ad5ec9d5a50d962fa553d4c63ba143a0d..af8654d105f282b85291254518d032a7b2c0886c 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityStaticCacheTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityStaticCacheTest.php
@@ -17,7 +17,7 @@ class ConfigEntityStaticCacheTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['config_test', 'config_entity_static_cache_test'];
+  protected static $modules = ['config_test', 'config_entity_static_cache_test'];
 
   /**
    * The type ID of the entity under test.
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityStatusTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityStatusTest.php
index 4f6d51c10cc445eab18ff52a8d6080067a46a613..044b9eb4ae1abb82b21dff6c79db25f9503bcded 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityStatusTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityStatusTest.php
@@ -16,7 +16,7 @@ class ConfigEntityStatusTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['config_test'];
+  protected static $modules = ['config_test'];
 
   /**
    * Tests the enabling/disabling of entities.
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityStorageTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityStorageTest.php
index cf5ba3154a0d3628ec223b08d7fac3ba0b499401..eff4d4c4eaddf69c8426434ebbae8edd3c63f9b0 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityStorageTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityStorageTest.php
@@ -19,7 +19,7 @@ class ConfigEntityStorageTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['config_test'];
+  protected static $modules = ['config_test'];
 
   /**
    * Tests creating configuration entities with changed UUIDs.
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityUnitTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityUnitTest.php
index 755bd2d25d932a9e5735bca71a3683b73edb8036..08c96a8a657f33d75a6496660b78ddee46c3db69 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityUnitTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityUnitTest.php
@@ -25,7 +25,7 @@ class ConfigEntityUnitTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['config_test'];
+  protected static $modules = ['config_test'];
 
   /**
    * The config_test entity storage.
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigEventsTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigEventsTest.php
index 74bb7984e6604e6e140483554465f00c0357f8bb..851fd6a8c0de622614dfe34977c48818795c09fc 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigEventsTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigEventsTest.php
@@ -18,7 +18,7 @@ class ConfigEventsTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['config_events_test'];
+  protected static $modules = ['config_events_test'];
 
   /**
    * Tests configuration events.
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigExportStorageTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigExportStorageTest.php
index cd893957384e4a50eb982a720a1ff6d0fc0559d7..0a36dd2eefbcd39efa0e4635d95102c710bf500e 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigExportStorageTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigExportStorageTest.php
@@ -16,7 +16,7 @@ class ConfigExportStorageTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['system', 'config_test'];
+  protected static $modules = ['system', 'config_test'];
 
   protected function setUp(): void {
     parent::setUp();
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigImportRecreateTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigImportRecreateTest.php
index ec70fdb83ac0b2ce8e3f0d37be5d01bae25eeba6..34a0b4247f48f80df43617e531ea747ef9f3686b 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigImportRecreateTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigImportRecreateTest.php
@@ -26,7 +26,7 @@ class ConfigImportRecreateTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['system', 'field', 'text', 'user', 'node'];
+  protected static $modules = ['system', 'field', 'text', 'user', 'node'];
 
   protected function setUp(): void {
     parent::setUp();
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigImportRenameValidationTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigImportRenameValidationTest.php
index dfb241c57a3416268223657004a8546a65366976..d3f80fafddda8a6de81ab830bb6fb61341d0b3b4 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigImportRenameValidationTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigImportRenameValidationTest.php
@@ -29,7 +29,7 @@ class ConfigImportRenameValidationTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['system', 'user', 'node', 'field', 'text', 'config_test'];
+  protected static $modules = ['system', 'user', 'node', 'field', 'text', 'config_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigImporterMissingContentTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigImporterMissingContentTest.php
index 90ef675cc46b745f0b61ea110f0769e56f76599b..6ce15b7e82b4c7e9fabfcb1fead4f91c68ba4230 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigImporterMissingContentTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigImporterMissingContentTest.php
@@ -26,7 +26,7 @@ class ConfigImporterMissingContentTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['system', 'user', 'entity_test', 'config_test', 'config_import_test'];
+  protected static $modules = ['system', 'user', 'entity_test', 'config_test', 'config_import_test'];
 
   protected function setUp(): void {
     parent::setUp();
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigImporterTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigImporterTest.php
index be8a2c6be746674b5c90454cbb1d0760419a935f..1aa8c9dd80f2b6af1ff2e31544dec9fb521517ea 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigImporterTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigImporterTest.php
@@ -33,7 +33,7 @@ class ConfigImporterTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['config_test', 'system', 'config_import_test'];
+  protected static $modules = ['config_test', 'system', 'config_import_test'];
 
   protected function setUp(): void {
     parent::setUp();
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigInstallTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigInstallTest.php
index 6cc63212c070e24443721115c51a3fe4612173ce..ed514aa93754c12069a4cad1c3c5f3a1cbfff54e 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigInstallTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigInstallTest.php
@@ -19,7 +19,7 @@ class ConfigInstallTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system'];
+  protected static $modules = ['system'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigLanguageOverrideTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigLanguageOverrideTest.php
index 619e62624bde6e67ffbd0898ff7e936e78218593..64a6e3c5e535992472ce387fba928153aad6f9e4 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigLanguageOverrideTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigLanguageOverrideTest.php
@@ -17,7 +17,7 @@ class ConfigLanguageOverrideTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['user', 'language', 'config_test', 'system', 'field'];
+  protected static $modules = ['user', 'language', 'config_test', 'system', 'field'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigModuleOverridesTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigModuleOverridesTest.php
index a94123d4cb98b6e64a51b0da8c324a9989ce5033..d88ab6ade13597b86386d6b28e92d9ec8aa6637e 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigModuleOverridesTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigModuleOverridesTest.php
@@ -16,7 +16,7 @@ class ConfigModuleOverridesTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['system', 'config', 'config_override_test'];
+  protected static $modules = ['system', 'config', 'config_override_test'];
 
   public function testSimpleModuleOverrides() {
     $GLOBALS['config_test_run_module_overrides'] = TRUE;
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigOverrideTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigOverrideTest.php
index 989967fd24b2e8ab639ca98bea09f710fcc15796..3a9a289512bb2b2f382e97a6e9ce1cbe548e7a77 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigOverrideTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigOverrideTest.php
@@ -16,7 +16,7 @@ class ConfigOverrideTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['system', 'config_test'];
+  protected static $modules = ['system', 'config_test'];
 
   protected function setUp(): void {
     parent::setUp();
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigOverridesPriorityTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigOverridesPriorityTest.php
index 6c568b8417f79843f12f5738dded7b64ccf8774c..67c280c27737ff83aff2a1658dda1f4c1435b61c 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigOverridesPriorityTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigOverridesPriorityTest.php
@@ -18,7 +18,7 @@ class ConfigOverridesPriorityTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['system', 'config', 'config_override_test', 'language'];
+  protected static $modules = ['system', 'config', 'config_override_test', 'language'];
 
   public function testOverridePriorities() {
     $GLOBALS['config_test_run_module_overrides'] = FALSE;
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigSchemaTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigSchemaTest.php
index 42b9bb556e6d16d32db1f21375c6938074a6d7a5..5567ef9baa2e2a02afa847b129e98da01d9b7e84 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigSchemaTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigSchemaTest.php
@@ -25,7 +25,7 @@ class ConfigSchemaTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['system', 'language', 'field', 'image', 'config_test', 'config_schema_test'];
+  protected static $modules = ['system', 'language', 'field', 'image', 'config_test', 'config_schema_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigSnapshotTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigSnapshotTest.php
index c001d755dfc3225bcff9c738aa35688bfddb4748..717b014928eb6019699d3d51462a9facc105127e 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigSnapshotTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigSnapshotTest.php
@@ -17,7 +17,7 @@ class ConfigSnapshotTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['config_test', 'system'];
+  protected static $modules = ['config_test', 'system'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/KernelTests/Core/Config/DefaultConfigTest.php b/core/tests/Drupal/KernelTests/Core/Config/DefaultConfigTest.php
index 6053f1adcbb2df9dc12a1bda3ab4b3b579a97458..df8a41e797ed0d635f140ebcbb49a70836c1a3ff 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/DefaultConfigTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/DefaultConfigTest.php
@@ -23,7 +23,7 @@ class DefaultConfigTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['system', 'config_test'];
+  protected static $modules = ['system', 'config_test'];
 
   /**
    * Themes which provide default configuration and need enabling.
diff --git a/core/tests/Drupal/KernelTests/Core/Config/Entity/ConfigEntityUpdaterTest.php b/core/tests/Drupal/KernelTests/Core/Config/Entity/ConfigEntityUpdaterTest.php
index 313e58b45762196029132674b2efe1a1adf7791c..c03a8a400d2d50a10d94a77ecd3ea5440e3419b0 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/Entity/ConfigEntityUpdaterTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/Entity/ConfigEntityUpdaterTest.php
@@ -19,7 +19,7 @@ class ConfigEntityUpdaterTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['config_test'];
+  protected static $modules = ['config_test'];
 
   /**
    * @covers ::update
diff --git a/core/tests/Drupal/KernelTests/Core/Config/SchemaCheckTraitTest.php b/core/tests/Drupal/KernelTests/Core/Config/SchemaCheckTraitTest.php
index 0d79f12dff207ae684a3c3d185537a9756981f43..cf7c726577c755b54e714896619ce13f165a0b5a 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/SchemaCheckTraitTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/SchemaCheckTraitTest.php
@@ -26,7 +26,7 @@ class SchemaCheckTraitTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['config_test', 'config_schema_test'];
+  protected static $modules = ['config_test', 'config_schema_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/KernelTests/Core/Config/SchemaConfigListenerTest.php b/core/tests/Drupal/KernelTests/Core/Config/SchemaConfigListenerTest.php
index 4a5a8fa4746edbba6128357c8b454e473758410f..9db357f18dd5ec55b97a7ae0b868db1fa57e2afe 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/SchemaConfigListenerTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/SchemaConfigListenerTest.php
@@ -17,7 +17,7 @@ class SchemaConfigListenerTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['config_test'];
+  protected static $modules = ['config_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/KernelTests/Core/Database/DatabaseTestBase.php b/core/tests/Drupal/KernelTests/Core/Database/DatabaseTestBase.php
index dc1151297072c6e6c64a3a1ad35a621e0184334a..9ac9c6beded983eea5c28efb2e789cb5902003a8 100644
--- a/core/tests/Drupal/KernelTests/Core/Database/DatabaseTestBase.php
+++ b/core/tests/Drupal/KernelTests/Core/Database/DatabaseTestBase.php
@@ -13,7 +13,7 @@
  */
 abstract class DatabaseTestBase extends KernelTestBase {
 
-  public static $modules = ['database_test'];
+  protected static $modules = ['database_test'];
 
   /**
    * The database connection for testing.
diff --git a/core/tests/Drupal/KernelTests/Core/Database/NextIdTest.php b/core/tests/Drupal/KernelTests/Core/Database/NextIdTest.php
index 02ae9abb629d90b84929f7856bc26775f76a9409..56dcabf4eb1bfd81ebcf4d59055d5d7a3dc89114 100644
--- a/core/tests/Drupal/KernelTests/Core/Database/NextIdTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Database/NextIdTest.php
@@ -14,7 +14,7 @@ class NextIdTest extends DatabaseTestBase {
    *
    * @var array
    */
-  public static $modules = ['database_test', 'system'];
+  protected static $modules = ['database_test', 'system'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/KernelTests/Core/Database/RegressionTest.php b/core/tests/Drupal/KernelTests/Core/Database/RegressionTest.php
index 5b501d95b47790ca91ab1117eb9277a3e2f4a5c0..60fa090b6731318ca9f2342f077d59cd833f1d17 100644
--- a/core/tests/Drupal/KernelTests/Core/Database/RegressionTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Database/RegressionTest.php
@@ -14,7 +14,7 @@ class RegressionTest extends DatabaseTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'user'];
+  protected static $modules = ['node', 'user'];
 
   /**
    * Ensures that non-ASCII UTF-8 data is stored in the database properly.
diff --git a/core/tests/Drupal/KernelTests/Core/Database/SelectComplexTest.php b/core/tests/Drupal/KernelTests/Core/Database/SelectComplexTest.php
index c4a2f349cf33448dfa8678e890450f09a3dc872b..73b48a1cf33f72de4edeccc9282621f24e75fba0 100644
--- a/core/tests/Drupal/KernelTests/Core/Database/SelectComplexTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Database/SelectComplexTest.php
@@ -20,7 +20,7 @@ class SelectComplexTest extends DatabaseTestBase {
    *
    * @var array
    */
-  public static $modules = ['system', 'user', 'node_access_test', 'field'];
+  protected static $modules = ['system', 'user', 'node_access_test', 'field'];
 
   /**
    * Tests simple JOIN statements.
diff --git a/core/tests/Drupal/KernelTests/Core/Datetime/DateFormatterTest.php b/core/tests/Drupal/KernelTests/Core/Datetime/DateFormatterTest.php
index 7784058d7acc5e9a8cbba1d3b9046e04cabf710e..8f87a6de9bfdf6c8a246437d4bfa30cc87ac7d82 100644
--- a/core/tests/Drupal/KernelTests/Core/Datetime/DateFormatterTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Datetime/DateFormatterTest.php
@@ -16,7 +16,7 @@ class DateFormatterTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['language', 'system'];
+  protected static $modules = ['language', 'system'];
 
   /**
    * Arbitrary langcode for a custom language.
diff --git a/core/tests/Drupal/KernelTests/Core/Datetime/DatetimeElementFormTest.php b/core/tests/Drupal/KernelTests/Core/Datetime/DatetimeElementFormTest.php
index 4a0cfd65128d1927a11cc9b9906dcb209791ff6f..23682d094b6cbc8c46666f700353aa68e0a65a21 100644
--- a/core/tests/Drupal/KernelTests/Core/Datetime/DatetimeElementFormTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Datetime/DatetimeElementFormTest.php
@@ -26,7 +26,7 @@ class DatetimeElementFormTest extends KernelTestBase implements FormInterface {
    *
    * @var array
    */
-  public static $modules = ['datetime', 'system'];
+  protected static $modules = ['datetime', 'system'];
 
   /**
    * Sets up the test.
diff --git a/core/tests/Drupal/KernelTests/Core/Datetime/Element/TimezoneTest.php b/core/tests/Drupal/KernelTests/Core/Datetime/Element/TimezoneTest.php
index 7bf8ebc26c83b65de5a68e23aa040f109b6b1260..0e790af4c8664c6fc60e509e7012f92506abe122 100644
--- a/core/tests/Drupal/KernelTests/Core/Datetime/Element/TimezoneTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Datetime/Element/TimezoneTest.php
@@ -24,7 +24,7 @@ class TimezoneTest extends EntityKernelTestBase implements FormInterface {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system'];
+  protected static $modules = ['system'];
 
   /**
    * The date used in tests.
diff --git a/core/tests/Drupal/KernelTests/Core/Element/PathElementFormTest.php b/core/tests/Drupal/KernelTests/Core/Element/PathElementFormTest.php
index a7334e851b267fa64d32805c0ee809bc677daffa..c67cc11f12421ae1e849ea5219042cacafc13cb6 100644
--- a/core/tests/Drupal/KernelTests/Core/Element/PathElementFormTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Element/PathElementFormTest.php
@@ -30,7 +30,7 @@ class PathElementFormTest extends KernelTestBase implements FormInterface {
    *
    * @var array
    */
-  public static $modules = ['system', 'user'];
+  protected static $modules = ['system', 'user'];
 
   /**
    * Sets up the test.
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/BundleConstraintValidatorTest.php b/core/tests/Drupal/KernelTests/Core/Entity/BundleConstraintValidatorTest.php
index 996dc1babcff1bec0f8f6e97d1f8f0056cf21092..f2421d995abe6b6586325814d93e91850ef262dc 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/BundleConstraintValidatorTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/BundleConstraintValidatorTest.php
@@ -19,7 +19,7 @@ class BundleConstraintValidatorTest extends KernelTestBase {
    */
   protected $typedData;
 
-  public static $modules = ['node', 'field', 'text', 'user'];
+  protected static $modules = ['node', 'field', 'text', 'user'];
 
   protected function setUp(): void {
     parent::setUp();
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/ConfigEntityAdapterTest.php b/core/tests/Drupal/KernelTests/Core/Entity/ConfigEntityAdapterTest.php
index 5ad38473709c6d36f9e47ef64dbffe7ca500183c..277a1165fff86bab08a51a0544efa15a3fb871ef 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/ConfigEntityAdapterTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/ConfigEntityAdapterTest.php
@@ -23,7 +23,7 @@ class ConfigEntityAdapterTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['config_test'];
+  protected static $modules = ['config_test'];
 
   /**
    * The config entity.
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/ConfigEntityQueryTest.php b/core/tests/Drupal/KernelTests/Core/Entity/ConfigEntityQueryTest.php
index 1daec2506812bd199f542abcda45ab70d9d1ca61..53a80abc7ca9aac107937b3ea5959fb7c3742bde 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/ConfigEntityQueryTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/ConfigEntityQueryTest.php
@@ -19,7 +19,7 @@ class ConfigEntityQueryTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['config_test'];
+  protected static $modules = ['config_test'];
 
   /**
    * Stores the search results for alter comparison.
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityChangedTest.php b/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityChangedTest.php
index 11a36e6c52ab12bafaf27627118b6d660275b6fd..eb4927fba11819803cab10ea1c6e682e967f53b2 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityChangedTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityChangedTest.php
@@ -18,7 +18,7 @@ class ContentEntityChangedTest extends EntityKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['language', 'user', 'system', 'field', 'text', 'filter', 'entity_test'];
+  protected static $modules = ['language', 'user', 'system', 'field', 'text', 'filter', 'entity_test'];
 
   /**
    * The EntityTestMulChanged entity type storage.
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityCloneTest.php b/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityCloneTest.php
index 044e8f62a5bf75b0ed067b365e89920005b24ec5..2b53f0c71bcc05820f0d2c291c9759106c95e220 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityCloneTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityCloneTest.php
@@ -17,7 +17,7 @@ class ContentEntityCloneTest extends EntityKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['language', 'entity_test'];
+  protected static $modules = ['language', 'entity_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityFieldMethodInvocationOrderTest.php b/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityFieldMethodInvocationOrderTest.php
index deb610e8b69efe8a58ad9bab3d2357957baf3348..4ba8305e0caf3bedcf234536d65fdf44b295f3a8 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityFieldMethodInvocationOrderTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityFieldMethodInvocationOrderTest.php
@@ -16,7 +16,7 @@ class ContentEntityFieldMethodInvocationOrderTest extends EntityKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['language', 'system', 'entity_test'];
+  protected static $modules = ['language', 'system', 'entity_test'];
 
   /**
    * The EntityTest entity type storage.
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityHasChangesTest.php b/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityHasChangesTest.php
index ab534287d60ad29ac1de4405c19a4082722fa164..9f582cd1d81955a9f5b87d7c62c82fde3e05b5a8 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityHasChangesTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityHasChangesTest.php
@@ -22,7 +22,7 @@ class ContentEntityHasChangesTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system', 'user', 'entity_test'];
+  protected static $modules = ['system', 'user', 'entity_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityNonRevisionableFieldTest.php b/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityNonRevisionableFieldTest.php
index ae937dc3e5691120bda3e0b20424390328d08a46..92dfd589dbb6ed189505f1c406bcdb5c9a8330b1 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityNonRevisionableFieldTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityNonRevisionableFieldTest.php
@@ -21,7 +21,7 @@ class ContentEntityNonRevisionableFieldTest extends EntityKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['language'];
+  protected static $modules = ['language'];
 
   /**
    * The EntityTestMulRev entity type storage.
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityNullStorageTest.php b/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityNullStorageTest.php
index 188e9d1a495f6396c193e9816d93eb772ed3abbf..83baf006f0852f3d3329082428fbff4c120b15dd 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityNullStorageTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityNullStorageTest.php
@@ -22,7 +22,7 @@ class ContentEntityNullStorageTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['system', 'contact', 'user'];
+  protected static $modules = ['system', 'contact', 'user'];
 
   /**
    * Tests using entity query with ContentEntityNullStorage.
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/CreateSampleEntityTest.php b/core/tests/Drupal/KernelTests/Core/Entity/CreateSampleEntityTest.php
index cee66622396a6b6951efbf510d382b30ff9101de..199ff1af738bc768d0021702b3f9a829562257b6 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/CreateSampleEntityTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/CreateSampleEntityTest.php
@@ -25,7 +25,7 @@ class CreateSampleEntityTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['path_alias', 'system', 'field', 'filter', 'text', 'file', 'user', 'node', 'comment', 'taxonomy'];
+  protected static $modules = ['path_alias', 'system', 'field', 'filter', 'text', 'file', 'user', 'node', 'comment', 'taxonomy'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/DefaultTableMappingIntegrationTest.php b/core/tests/Drupal/KernelTests/Core/Entity/DefaultTableMappingIntegrationTest.php
index 1c61caa6063cfa6dce49cce4cac2d10736426228..21fc1322890930af9c52e4b2671097e35a8602bf 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/DefaultTableMappingIntegrationTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/DefaultTableMappingIntegrationTest.php
@@ -29,7 +29,7 @@ class DefaultTableMappingIntegrationTest extends EntityKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['entity_test_extra'];
+  protected static $modules = ['entity_test_extra'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityBundleFieldTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityBundleFieldTest.php
index ada797d9032730397423d136f0f8c5de2bdad138..7379aa6417034ba330889c3ad29492aa093c55c3 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityBundleFieldTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityBundleFieldTest.php
@@ -14,7 +14,7 @@ class EntityBundleFieldTest extends EntityKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['entity_schema_test', 'entity_test_update'];
+  protected static $modules = ['entity_schema_test', 'entity_test_update'];
 
   /**
    * The module handler.
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityCrudHookTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityCrudHookTest.php
index 354aae4174cc87a9e2b25811a6c68262a2bc30f8..e71f7ff40bec49990dc8020892be388a14eb02eb 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityCrudHookTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityCrudHookTest.php
@@ -40,7 +40,7 @@ class EntityCrudHookTest extends EntityKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['block', 'block_test', 'entity_crud_hook_test', 'file', 'taxonomy', 'node', 'comment'];
+  protected static $modules = ['block', 'block_test', 'entity_crud_hook_test', 'file', 'taxonomy', 'node', 'comment'];
 
   protected $ids = [];
 
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityDecoupledTranslationRevisionsTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityDecoupledTranslationRevisionsTest.php
index 6391810397963bdac5ca65b9edc2352a923180b6..a5bcc73fda17e741a6c01882acfca1ace9a4c5f0 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityDecoupledTranslationRevisionsTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityDecoupledTranslationRevisionsTest.php
@@ -22,7 +22,7 @@ class EntityDecoupledTranslationRevisionsTest extends EntityKernelTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'system',
     'entity_test',
     'language',
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php
index a030258f2857e82fd4c7f64cac72413e4512985c..1d95a657f8f35d532dd4c7c074efa7bad428dcf4 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php
@@ -56,7 +56,7 @@ class EntityDefinitionUpdateTest extends EntityKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['entity_test_update'];
+  protected static $modules = ['entity_test_update'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityDeriverTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityDeriverTest.php
index 6e04bfcecfeb0754fe82ea2bb1c00f5051f6e4fa..cdee2f30f72151b657cbc50c7e41d253fd72368f 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityDeriverTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityDeriverTest.php
@@ -26,7 +26,7 @@ class EntityDeriverTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'system',
     'field',
     'user',
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityDisplayBaseTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityDisplayBaseTest.php
index 9374e2a128ffa310c749e9ed665e6a821ad72d8d..c359fc875511125b0d253b0ed55258efa09ecbb0 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityDisplayBaseTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityDisplayBaseTest.php
@@ -18,7 +18,7 @@ class EntityDisplayBaseTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['entity_test', 'entity_test_third_party', 'field', 'system', 'comment', 'user'];
+  protected static $modules = ['entity_test', 'entity_test_third_party', 'field', 'system', 'comment', 'user'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityDisplayFormBaseTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityDisplayFormBaseTest.php
index 4ef44f473fbfb126a9b150184bb4d3e992d61356..1c0b40dfc1a2602398e37d973edd1b02693d3e0c 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityDisplayFormBaseTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityDisplayFormBaseTest.php
@@ -17,7 +17,7 @@ class EntityDisplayFormBaseTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['entity_test'];
+  protected static $modules = ['entity_test'];
 
   /**
    * @covers ::copyFormValuesToEntity
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityDisplayRepositoryTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityDisplayRepositoryTest.php
index 0f151650daff43eb197f23b2a3f1954fb717dc78..efbf3b3fc986396fca802b3585f9d0df1e2f20f2 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityDisplayRepositoryTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityDisplayRepositoryTest.php
@@ -17,7 +17,7 @@ class EntityDisplayRepositoryTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['user'];
+  protected static $modules = ['user'];
 
   /**
    * The entity display repository under test.
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityFieldTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityFieldTest.php
index cf85d85382b7bd8e4abe2e4b490b3d597289cb1e..439183b2f231102e06288f94854026a7d769d983 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityFieldTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityFieldTest.php
@@ -36,7 +36,7 @@ class EntityFieldTest extends EntityKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['filter', 'text', 'node', 'user', 'field_test'];
+  protected static $modules = ['filter', 'text', 'node', 'user', 'field_test'];
 
   /**
    * @var string
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityHasFieldConstraintValidatorTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityHasFieldConstraintValidatorTest.php
index 0e63d3ebe62214257e4d55b16421ae255da1ce89..ce60e6cdb8105f36f209773e452b04b893fe8f9b 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityHasFieldConstraintValidatorTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityHasFieldConstraintValidatorTest.php
@@ -15,7 +15,7 @@ class EntityHasFieldConstraintValidatorTest extends EntityKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['entity_test_constraints'];
+  protected static $modules = ['entity_test_constraints'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityKernelTestBase.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityKernelTestBase.php
index 33f53031d784aabb7f013ee0e8c120efdf388728..11d1f32146931760ed2a959ed3157e960ddb9ae4 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityKernelTestBase.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityKernelTestBase.php
@@ -25,7 +25,7 @@ abstract class EntityKernelTestBase extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['user', 'system', 'field', 'text', 'filter', 'entity_test'];
+  protected static $modules = ['user', 'system', 'field', 'text', 'filter', 'entity_test'];
 
   /**
    * The entity type manager service.
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityLanguageTestBase.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityLanguageTestBase.php
index d76c3c17f8a0cd0baac5531244f978feaffdcb7e..36ab8d3e7ae91ea64ee51eddb00bfd12178ae7f5 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityLanguageTestBase.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityLanguageTestBase.php
@@ -39,7 +39,7 @@ abstract class EntityLanguageTestBase extends EntityKernelTestBase {
    */
   protected $untranslatableFieldName;
 
-  public static $modules = ['language', 'entity_test'];
+  protected static $modules = ['language', 'entity_test'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityNonRevisionableTranslatableFieldTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityNonRevisionableTranslatableFieldTest.php
index ce049316effe4d6a68433003eef5a226cdf1d541..d3ce80dce9ffafb1cd2c02f801b6b752eca7e823 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityNonRevisionableTranslatableFieldTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityNonRevisionableTranslatableFieldTest.php
@@ -15,7 +15,7 @@ class EntityNonRevisionableTranslatableFieldTest extends EntityKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['entity_test', 'language', 'content_translation'];
+  protected static $modules = ['entity_test', 'language', 'content_translation'];
 
   protected function setUp(): void {
     parent::setUp();
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryAggregateTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryAggregateTest.php
index 6852f49dfacad52eaab5e7532e33a2c6a8f1e6c1..6b88d40af08a590b4feef4f67a068cf86ad356ce 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryAggregateTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryAggregateTest.php
@@ -18,7 +18,7 @@ class EntityQueryAggregateTest extends EntityKernelTestBase {
    *
    * @var array
    */
-  public static $modules = [];
+  protected static $modules = [];
 
   /**
    * The entity_test storage to create the test entities.
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryRelationshipTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryRelationshipTest.php
index 7971d66e0ab6d6e0a06bb10459c8b9bf1ec0ba53..c63a718035f656760bac9989821aac63236249b3 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryRelationshipTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryRelationshipTest.php
@@ -22,7 +22,7 @@ class EntityQueryRelationshipTest extends EntityKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['taxonomy'];
+  protected static $modules = ['taxonomy'];
 
   /**
    * Term entities.
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryTest.php
index 3a74b80e29b30f38aabaf99b2364d6862dd723a4..254b81979e6c0d0a9f960c89f9d649a6cb6c0b1f 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryTest.php
@@ -27,7 +27,7 @@ class EntityQueryTest extends EntityKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['field_test', 'language'];
+  protected static $modules = ['field_test', 'language'];
 
   /**
    * @var array
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityReferenceFieldTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityReferenceFieldTest.php
index f46cbfed905c490997d0ec454f4158ae54558c78..3c7faa510e467d582f6b8cdb689c198882c3e802 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityReferenceFieldTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityReferenceFieldTest.php
@@ -59,7 +59,7 @@ class EntityReferenceFieldTest extends EntityKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['entity_reference_test', 'entity_test_update'];
+  protected static $modules = ['entity_reference_test', 'entity_test_update'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityReferenceSelection/EntityReferenceSelectionSortTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityReferenceSelection/EntityReferenceSelectionSortTest.php
index c231ca140d23026e1f452c4a51b002ed44ac76ef..997af8c2cd2e0da3b0f0ea9654eb13b61e15d012 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityReferenceSelection/EntityReferenceSelectionSortTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityReferenceSelection/EntityReferenceSelectionSortTest.php
@@ -21,7 +21,7 @@ class EntityReferenceSelectionSortTest extends EntityKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['node'];
+  protected static $modules = ['node'];
 
   protected function setUp(): void {
     parent::setUp();
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityRepositoryTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityRepositoryTest.php
index 6907dcd0b0a71810cb8190ab484fb01b060d67b9..637dafc1b2907d30195a044229f14a337124fec5 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityRepositoryTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityRepositoryTest.php
@@ -24,7 +24,7 @@ class EntityRepositoryTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'entity_test',
     'user',
     'language',
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityRevisionTranslationTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityRevisionTranslationTest.php
index fdcc2ef7f7f4da82ada6dffc4bb77abb5218a20e..53d99a93954469711f2640621b0020c9dbc3a0ef 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityRevisionTranslationTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityRevisionTranslationTest.php
@@ -16,7 +16,7 @@ class EntityRevisionTranslationTest extends EntityKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['language'];
+  protected static $modules = ['language'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityRevisionsTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityRevisionsTest.php
index 15a27a3b76aa082ab8b2b0243846e68977360d29..1d9b8d9a6881061de14a1726139c3e50e69fcefb 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityRevisionsTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityRevisionsTest.php
@@ -19,7 +19,7 @@ class EntityRevisionsTest extends EntityKernelTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'system',
     'entity_test',
     'language',
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntitySchemaTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntitySchemaTest.php
index 6def0edc568b79c4c603f75c1cf6910ccc5e5161..0e655446334a8f0b1a19da4d3098c77c63cb68a2 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntitySchemaTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntitySchemaTest.php
@@ -21,7 +21,7 @@ class EntitySchemaTest extends EntityKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['entity_test_update'];
+  protected static $modules = ['entity_test_update'];
 
   /**
    * The database connection used.
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityTypeConstraintValidatorTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityTypeConstraintValidatorTest.php
index 14ef87e03fa6c3ea4c7445031eb9d45411e2a8df..8404ddc686e1371c75f8f6daf851931038850b03 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityTypeConstraintValidatorTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityTypeConstraintValidatorTest.php
@@ -18,7 +18,7 @@ class EntityTypeConstraintValidatorTest extends EntityKernelTestBase {
    */
   protected $typedData;
 
-  public static $modules = ['node', 'field', 'user'];
+  protected static $modules = ['node', 'field', 'user'];
 
   protected function setUp(): void {
     parent::setUp();
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityTypedDataDefinitionTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityTypedDataDefinitionTest.php
index e24de1b6376981ab67d308e6cbb3af8cf233625a..6da1cf93e99ae91d05c8b19c8b2a63bec61b0497 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityTypedDataDefinitionTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityTypedDataDefinitionTest.php
@@ -35,7 +35,7 @@ class EntityTypedDataDefinitionTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['system', 'filter', 'text', 'node', 'user'];
+  protected static $modules = ['system', 'filter', 'text', 'node', 'user'];
 
   protected function setUp(): void {
     parent::setup();
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityValidationTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityValidationTest.php
index f20510b4224cac562b5d2fbbabce6fb347b353bc..095748057054ac8c1b77923439ac130b313823b6 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityValidationTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityValidationTest.php
@@ -17,7 +17,7 @@ class EntityValidationTest extends EntityKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['filter', 'text', 'language'];
+  protected static $modules = ['filter', 'text', 'language'];
 
   /**
    * @var string
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/FieldSqlStorageTest.php b/core/tests/Drupal/KernelTests/Core/Entity/FieldSqlStorageTest.php
index bc3f822b190c18a048364b26d8561818b66b90f4..822198606b1d9e24d9d2724e7741e63109af9943 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/FieldSqlStorageTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/FieldSqlStorageTest.php
@@ -22,7 +22,7 @@ class FieldSqlStorageTest extends EntityKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['field', 'field_test', 'text', 'entity_test'];
+  protected static $modules = ['field', 'field_test', 'text', 'entity_test'];
 
   /**
    * The name of the created field.
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/FieldWidgetConstraintValidatorTest.php b/core/tests/Drupal/KernelTests/Core/Entity/FieldWidgetConstraintValidatorTest.php
index d9d36e89e3c57e5bcc0479147b10087e9a302e10..2bb0e8b4eaf519ceb14f5e92bd3530ee84c7011d 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/FieldWidgetConstraintValidatorTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/FieldWidgetConstraintValidatorTest.php
@@ -15,7 +15,7 @@
  */
 class FieldWidgetConstraintValidatorTest extends KernelTestBase {
 
-  public static $modules = ['entity_test', 'field', 'field_test', 'user', 'system'];
+  protected static $modules = ['entity_test', 'field', 'field_test', 'user', 'system'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/FieldableEntityDefinitionUpdateTest.php b/core/tests/Drupal/KernelTests/Core/Entity/FieldableEntityDefinitionUpdateTest.php
index c885519a39e25f6272158db7f8dcf4df66a51b25..7c54b1e8a0a11cf93fcce2d1e3cd76cdff1fc3ed 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/FieldableEntityDefinitionUpdateTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/FieldableEntityDefinitionUpdateTest.php
@@ -80,7 +80,7 @@ class FieldableEntityDefinitionUpdateTest extends EntityKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['content_translation', 'entity_test_update', 'language'];
+  protected static $modules = ['content_translation', 'entity_test_update', 'language'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/RevisionableContentEntityBaseTest.php b/core/tests/Drupal/KernelTests/Core/Entity/RevisionableContentEntityBaseTest.php
index 051bee148dfed6504f9d41d8e209e99683d42fb5..8a8143149c67298bfe0f4f3494683d08ba537c4b 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/RevisionableContentEntityBaseTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/RevisionableContentEntityBaseTest.php
@@ -23,7 +23,7 @@ class RevisionableContentEntityBaseTest extends EntityKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['entity_test_revlog', 'system', 'user'];
+  protected static $modules = ['entity_test_revlog', 'system', 'user'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/RouteProviderTest.php b/core/tests/Drupal/KernelTests/Core/Entity/RouteProviderTest.php
index ea3073c1a9484c55273bea6a6a87e6cdd9fded73..f1665b999ba9b2844d33453f6524dd4556e68746 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/RouteProviderTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/RouteProviderTest.php
@@ -23,7 +23,7 @@ class RouteProviderTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['entity_test', 'user', 'system'];
+  protected static $modules = ['entity_test', 'user', 'system'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/ValidReferenceConstraintValidatorTest.php b/core/tests/Drupal/KernelTests/Core/Entity/ValidReferenceConstraintValidatorTest.php
index de3b9c354f838290f9bc68aace923daad07b076f..281acded0c45273ae65ff764f19e7e49c96061f6 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/ValidReferenceConstraintValidatorTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/ValidReferenceConstraintValidatorTest.php
@@ -33,7 +33,7 @@ class ValidReferenceConstraintValidatorTest extends EntityKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['field', 'node', 'user'];
+  protected static $modules = ['field', 'node', 'user'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/KernelTests/Core/Extension/ModuleConfigureRouteTest.php b/core/tests/Drupal/KernelTests/Core/Extension/ModuleConfigureRouteTest.php
index bdae70b902814731c1f974e16a41abfd54130cec..656e964d9563024e0e419a1335e123b36ee6f692 100644
--- a/core/tests/Drupal/KernelTests/Core/Extension/ModuleConfigureRouteTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Extension/ModuleConfigureRouteTest.php
@@ -18,7 +18,7 @@ class ModuleConfigureRouteTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system', 'user', 'path_alias'];
+  protected static $modules = ['system', 'user', 'path_alias'];
 
   /**
    * @var \Drupal\Core\Routing\RouteProviderInterface
diff --git a/core/tests/Drupal/KernelTests/Core/Extension/ModuleImplementsAlterTest.php b/core/tests/Drupal/KernelTests/Core/Extension/ModuleImplementsAlterTest.php
index 7d29a26124d50ed221bcfd13aea1a3047d479c84..7eb3a3c642d02f0eb566a04a618c5b610fd358e9 100644
--- a/core/tests/Drupal/KernelTests/Core/Extension/ModuleImplementsAlterTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Extension/ModuleImplementsAlterTest.php
@@ -14,7 +14,7 @@ class ModuleImplementsAlterTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system'];
+  protected static $modules = ['system'];
 
   /**
    * Tests hook_module_implements_alter() adding an implementation.
diff --git a/core/tests/Drupal/KernelTests/Core/Field/Entity/BaseFieldOverrideTest.php b/core/tests/Drupal/KernelTests/Core/Field/Entity/BaseFieldOverrideTest.php
index d09cb0880f982a825c772015e1f3ba12d797814a..39ee9a6aee292743e5aaff98cb245eec03705f2d 100644
--- a/core/tests/Drupal/KernelTests/Core/Field/Entity/BaseFieldOverrideTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Field/Entity/BaseFieldOverrideTest.php
@@ -19,7 +19,7 @@ class BaseFieldOverrideTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'system',
     'user',
     'entity_test',
diff --git a/core/tests/Drupal/KernelTests/Core/Field/FieldAccessTest.php b/core/tests/Drupal/KernelTests/Core/Field/FieldAccessTest.php
index 3a25280063a5b53177163aff78476778462dd776..e289a339942d2b37792443c859d501e7fd2fc9de 100644
--- a/core/tests/Drupal/KernelTests/Core/Field/FieldAccessTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Field/FieldAccessTest.php
@@ -19,7 +19,7 @@ class FieldAccessTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['entity_test', 'field', 'system', 'text', 'filter', 'user'];
+  protected static $modules = ['entity_test', 'field', 'system', 'text', 'filter', 'user'];
 
   /**
    * Holds the currently active global user ID that initiated the test run.
diff --git a/core/tests/Drupal/KernelTests/Core/Field/FieldSettingsTest.php b/core/tests/Drupal/KernelTests/Core/Field/FieldSettingsTest.php
index 9229a60b0b5c8f3a43e8a31af8647e55714511fe..51ee2f8251b76b37c425c4f6792653fc33312b77 100644
--- a/core/tests/Drupal/KernelTests/Core/Field/FieldSettingsTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Field/FieldSettingsTest.php
@@ -19,7 +19,7 @@ class FieldSettingsTest extends EntityKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['field', 'field_test'];
+  protected static $modules = ['field', 'field_test'];
 
   /**
    * @covers \Drupal\Core\Field\BaseFieldDefinition::getSettings
diff --git a/core/tests/Drupal/KernelTests/Core/File/DirectoryTest.php b/core/tests/Drupal/KernelTests/Core/File/DirectoryTest.php
index 8b8bed2f71adfaf1cb2cb16be965b6055c3cf551..7047c1f09bdbd6e524c9ab964e89ca12a8af0466 100644
--- a/core/tests/Drupal/KernelTests/Core/File/DirectoryTest.php
+++ b/core/tests/Drupal/KernelTests/Core/File/DirectoryTest.php
@@ -20,7 +20,7 @@ class DirectoryTest extends FileTestBase {
    *
    * @var array
    */
-  public static $modules = ['system'];
+  protected static $modules = ['system'];
 
   protected function setUp(): void {
     parent::setUp();
diff --git a/core/tests/Drupal/KernelTests/Core/File/FileSystemRequirementsTest.php b/core/tests/Drupal/KernelTests/Core/File/FileSystemRequirementsTest.php
index c5b28330f4b6c857002c9b93a3a4964180d7a81c..5de5688769cd7b1bfe5e8fafea9656e646fc3f73 100644
--- a/core/tests/Drupal/KernelTests/Core/File/FileSystemRequirementsTest.php
+++ b/core/tests/Drupal/KernelTests/Core/File/FileSystemRequirementsTest.php
@@ -15,7 +15,7 @@ class FileSystemRequirementsTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['system'];
+  protected static $modules = ['system'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/KernelTests/Core/File/FileSystemTempDirectoryTest.php b/core/tests/Drupal/KernelTests/Core/File/FileSystemTempDirectoryTest.php
index ea65750f55807e5b87165b290bb4e9d8744c17eb..bfa8503b229b3bec4ef84e62d4b0062e2c83d01a 100644
--- a/core/tests/Drupal/KernelTests/Core/File/FileSystemTempDirectoryTest.php
+++ b/core/tests/Drupal/KernelTests/Core/File/FileSystemTempDirectoryTest.php
@@ -19,7 +19,7 @@ class FileSystemTempDirectoryTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['system'];
+  protected static $modules = ['system'];
 
   /**
    * The file system under test.
diff --git a/core/tests/Drupal/KernelTests/Core/File/FileSystemTest.php b/core/tests/Drupal/KernelTests/Core/File/FileSystemTest.php
index 3f655e4f677dab061bd1fd7438b6fd734fe92b99..153f992d77449129564127fd3401eda83f3247b9 100644
--- a/core/tests/Drupal/KernelTests/Core/File/FileSystemTest.php
+++ b/core/tests/Drupal/KernelTests/Core/File/FileSystemTest.php
@@ -25,7 +25,7 @@ class FileSystemTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system'];
+  protected static $modules = ['system'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/KernelTests/Core/File/FileTestBase.php b/core/tests/Drupal/KernelTests/Core/File/FileTestBase.php
index c22a5bce014301f207bd93271667b5d65143803f..58ed88bb7971b7da03faf41ac4fb2c84d0742027 100644
--- a/core/tests/Drupal/KernelTests/Core/File/FileTestBase.php
+++ b/core/tests/Drupal/KernelTests/Core/File/FileTestBase.php
@@ -16,7 +16,7 @@ abstract class FileTestBase extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['system'];
+  protected static $modules = ['system'];
 
   /**
    * A stream wrapper scheme to register for the test.
diff --git a/core/tests/Drupal/KernelTests/Core/File/MimeTypeTest.php b/core/tests/Drupal/KernelTests/Core/File/MimeTypeTest.php
index c959166850c470ec56d2e72116e3647f4b420a55..40f278b2b99fa3acc1c4a36d8cd082ca8a8ceb0b 100644
--- a/core/tests/Drupal/KernelTests/Core/File/MimeTypeTest.php
+++ b/core/tests/Drupal/KernelTests/Core/File/MimeTypeTest.php
@@ -16,7 +16,7 @@ class MimeTypeTest extends FileTestBase {
    *
    * @var array
    */
-  public static $modules = ['file_test'];
+  protected static $modules = ['file_test'];
 
   /**
    * Test mapping of mimetypes from filenames.
diff --git a/core/tests/Drupal/KernelTests/Core/File/RemoteFileDeleteRecursiveTest.php b/core/tests/Drupal/KernelTests/Core/File/RemoteFileDeleteRecursiveTest.php
index cb9e49153094e50a928ba0db2bc6708a77880f24..9749e73d45a276d765da6e3d2a9b1da3741240b0 100644
--- a/core/tests/Drupal/KernelTests/Core/File/RemoteFileDeleteRecursiveTest.php
+++ b/core/tests/Drupal/KernelTests/Core/File/RemoteFileDeleteRecursiveTest.php
@@ -14,7 +14,7 @@ class RemoteFileDeleteRecursiveTest extends FileDeleteRecursiveTest {
    *
    * @var array
    */
-  public static $modules = ['file_test'];
+  protected static $modules = ['file_test'];
 
   /**
    * A stream wrapper scheme to register for the test.
diff --git a/core/tests/Drupal/KernelTests/Core/File/RemoteFileDeleteTest.php b/core/tests/Drupal/KernelTests/Core/File/RemoteFileDeleteTest.php
index 1eb53229b830b9f50d4874113ff9f1fae417a99d..9cda8b07569d574d83e9f8904de40b2ec7cb0083 100644
--- a/core/tests/Drupal/KernelTests/Core/File/RemoteFileDeleteTest.php
+++ b/core/tests/Drupal/KernelTests/Core/File/RemoteFileDeleteTest.php
@@ -14,7 +14,7 @@ class RemoteFileDeleteTest extends FileDeleteTest {
    *
    * @var array
    */
-  public static $modules = ['file_test'];
+  protected static $modules = ['file_test'];
 
   /**
    * A stream wrapper scheme to register for the test.
diff --git a/core/tests/Drupal/KernelTests/Core/File/RemoteFileDirectoryTest.php b/core/tests/Drupal/KernelTests/Core/File/RemoteFileDirectoryTest.php
index af95d4ec4ab2a08afe68dc25b1970532103dbd9b..83b1210eb037208c70c5e61cee8192cadbbceca0 100644
--- a/core/tests/Drupal/KernelTests/Core/File/RemoteFileDirectoryTest.php
+++ b/core/tests/Drupal/KernelTests/Core/File/RemoteFileDirectoryTest.php
@@ -14,7 +14,7 @@ class RemoteFileDirectoryTest extends DirectoryTest {
    *
    * @var array
    */
-  public static $modules = ['file_test'];
+  protected static $modules = ['file_test'];
 
   /**
    * A stream wrapper scheme to register for the test.
diff --git a/core/tests/Drupal/KernelTests/Core/File/RemoteFileMoveTest.php b/core/tests/Drupal/KernelTests/Core/File/RemoteFileMoveTest.php
index df27b9c7dc9de32f3dd412555052da9591c909e1..4a366c63d043cb246db9a3e29c17b754d87ed2c3 100644
--- a/core/tests/Drupal/KernelTests/Core/File/RemoteFileMoveTest.php
+++ b/core/tests/Drupal/KernelTests/Core/File/RemoteFileMoveTest.php
@@ -14,7 +14,7 @@ class RemoteFileMoveTest extends FileMoveTest {
    *
    * @var array
    */
-  public static $modules = ['file_test'];
+  protected static $modules = ['file_test'];
 
   /**
    * A stream wrapper scheme to register for the test.
diff --git a/core/tests/Drupal/KernelTests/Core/File/RemoteFileSaveDataTest.php b/core/tests/Drupal/KernelTests/Core/File/RemoteFileSaveDataTest.php
index 5ffb67a6ad94b5b6167c366e78f2a2526316badb..3b9ea35a1ed8b8871e4ec447d45117e9aa480e08 100644
--- a/core/tests/Drupal/KernelTests/Core/File/RemoteFileSaveDataTest.php
+++ b/core/tests/Drupal/KernelTests/Core/File/RemoteFileSaveDataTest.php
@@ -14,7 +14,7 @@ class RemoteFileSaveDataTest extends FileSaveDataTest {
    *
    * @var array
    */
-  public static $modules = ['file_test'];
+  protected static $modules = ['file_test'];
 
   /**
    * A stream wrapper scheme to register for the test.
diff --git a/core/tests/Drupal/KernelTests/Core/File/RemoteFileScanDirectoryTest.php b/core/tests/Drupal/KernelTests/Core/File/RemoteFileScanDirectoryTest.php
index e7e709ee1029bc278d81ab1216b3e648207b9747..b8d6fc25b5e63b52a2e48f5dadeaa9c55f190054 100644
--- a/core/tests/Drupal/KernelTests/Core/File/RemoteFileScanDirectoryTest.php
+++ b/core/tests/Drupal/KernelTests/Core/File/RemoteFileScanDirectoryTest.php
@@ -15,7 +15,7 @@ class RemoteFileScanDirectoryTest extends ScanDirectoryTest {
    *
    * @var array
    */
-  public static $modules = ['file_test'];
+  protected static $modules = ['file_test'];
 
   /**
    * A stream wrapper scheme to register for the test.
diff --git a/core/tests/Drupal/KernelTests/Core/File/RemoteFileUnmanagedCopyTest.php b/core/tests/Drupal/KernelTests/Core/File/RemoteFileUnmanagedCopyTest.php
index 8e546b8581f303b3f60a1fec3f400d036a5d9ba3..c49e36294b635090d86ff3518a655752f6d90f0f 100644
--- a/core/tests/Drupal/KernelTests/Core/File/RemoteFileUnmanagedCopyTest.php
+++ b/core/tests/Drupal/KernelTests/Core/File/RemoteFileUnmanagedCopyTest.php
@@ -14,7 +14,7 @@ class RemoteFileUnmanagedCopyTest extends FileCopyTest {
    *
    * @var array
    */
-  public static $modules = ['file_test'];
+  protected static $modules = ['file_test'];
 
   /**
    * A stream wrapper scheme to register for the test.
diff --git a/core/tests/Drupal/KernelTests/Core/File/ScanDirectoryTest.php b/core/tests/Drupal/KernelTests/Core/File/ScanDirectoryTest.php
index d9876bae5c46d2d7a28013c729087826094956d8..d1eb0c7cfc9633736e05fd529c67ca12c9ea30d9 100644
--- a/core/tests/Drupal/KernelTests/Core/File/ScanDirectoryTest.php
+++ b/core/tests/Drupal/KernelTests/Core/File/ScanDirectoryTest.php
@@ -15,7 +15,7 @@ class ScanDirectoryTest extends FileTestBase {
    *
    * @var array
    */
-  public static $modules = ['file_test'];
+  protected static $modules = ['file_test'];
 
   /**
    * @var string
diff --git a/core/tests/Drupal/KernelTests/Core/File/StreamWrapperTest.php b/core/tests/Drupal/KernelTests/Core/File/StreamWrapperTest.php
index cc77f4bbefd2c470837c782ac2815238165d9d04..80ef0c0cef400b3f8c4a6e84174fdeb9d558b5f5 100644
--- a/core/tests/Drupal/KernelTests/Core/File/StreamWrapperTest.php
+++ b/core/tests/Drupal/KernelTests/Core/File/StreamWrapperTest.php
@@ -20,7 +20,7 @@ class StreamWrapperTest extends FileTestBase {
    *
    * @var array
    */
-  public static $modules = ['file_test'];
+  protected static $modules = ['file_test'];
 
   /**
    * A stream wrapper scheme to register for the test.
diff --git a/core/tests/Drupal/KernelTests/Core/File/UrlRewritingTest.php b/core/tests/Drupal/KernelTests/Core/File/UrlRewritingTest.php
index d5ad4e891512722bd6a0dc086b091f00d543087a..a0fcdb78d9f57da36fbb8b61bb40c53ab3e5df5f 100644
--- a/core/tests/Drupal/KernelTests/Core/File/UrlRewritingTest.php
+++ b/core/tests/Drupal/KernelTests/Core/File/UrlRewritingTest.php
@@ -16,7 +16,7 @@ class UrlRewritingTest extends FileTestBase {
    *
    * @var array
    */
-  public static $modules = ['file_test'];
+  protected static $modules = ['file_test'];
 
   /**
    * Tests the rewriting of shipped file URLs by hook_file_url_alter().
diff --git a/core/tests/Drupal/KernelTests/Core/File/UrlTransformRelativeTest.php b/core/tests/Drupal/KernelTests/Core/File/UrlTransformRelativeTest.php
index 6614b2d5b4eb3e76d3849adc19c699b0b617691e..a7a8f3e596d71f6baed1c0700e438009b593d7ad 100644
--- a/core/tests/Drupal/KernelTests/Core/File/UrlTransformRelativeTest.php
+++ b/core/tests/Drupal/KernelTests/Core/File/UrlTransformRelativeTest.php
@@ -12,7 +12,7 @@
  */
 class UrlTransformRelativeTest extends KernelTestBase {
 
-  public static $modules = ['file_test'];
+  protected static $modules = ['file_test'];
 
   /**
    * Tests file_url_transform_relative function.
diff --git a/core/tests/Drupal/KernelTests/Core/Form/ExternalFormUrlTest.php b/core/tests/Drupal/KernelTests/Core/Form/ExternalFormUrlTest.php
index 8d97983a8e5d92e7ef13662b5a6670e62b9f1f5a..dd610abf7cb81d908a9e36d5ecb5f9f4e3fe3da0 100644
--- a/core/tests/Drupal/KernelTests/Core/Form/ExternalFormUrlTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Form/ExternalFormUrlTest.php
@@ -18,7 +18,7 @@ class ExternalFormUrlTest extends KernelTestBase implements FormInterface {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['user', 'system'];
+  protected static $modules = ['user', 'system'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/KernelTests/Core/Form/FormCacheTest.php b/core/tests/Drupal/KernelTests/Core/Form/FormCacheTest.php
index f3189fef8ab336cd3bdbc8f86f0efe377ad3f68b..c80cd979ba1391e6acb7c19b89aa54ac25736585 100644
--- a/core/tests/Drupal/KernelTests/Core/Form/FormCacheTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Form/FormCacheTest.php
@@ -21,7 +21,7 @@ class FormCacheTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['system', 'user'];
+  protected static $modules = ['system', 'user'];
 
   /**
    * @var string
diff --git a/core/tests/Drupal/KernelTests/Core/Form/FormDefaultHandlersTest.php b/core/tests/Drupal/KernelTests/Core/Form/FormDefaultHandlersTest.php
index 3acd7b359fb455d650ea68d9492c5fe5f1cedf46..e38aa5705d4e3f5fa87ba624e54cb81eea530d8f 100644
--- a/core/tests/Drupal/KernelTests/Core/Form/FormDefaultHandlersTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Form/FormDefaultHandlersTest.php
@@ -19,7 +19,7 @@ class FormDefaultHandlersTest extends KernelTestBase implements FormInterface {
    *
    * @var array
    */
-  public static $modules = ['system'];
+  protected static $modules = ['system'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/KernelTests/Core/HttpKernel/StackKernelIntegrationTest.php b/core/tests/Drupal/KernelTests/Core/HttpKernel/StackKernelIntegrationTest.php
index fa5d24ff56145d1ea07bb2744a3aeaa9a5051c79..4a7f8708854930d90cf761cd501751563f446591 100644
--- a/core/tests/Drupal/KernelTests/Core/HttpKernel/StackKernelIntegrationTest.php
+++ b/core/tests/Drupal/KernelTests/Core/HttpKernel/StackKernelIntegrationTest.php
@@ -19,7 +19,7 @@ class StackKernelIntegrationTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['httpkernel_test', 'system'];
+  protected static $modules = ['httpkernel_test', 'system'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/KernelTests/Core/Image/ToolkitGdTest.php b/core/tests/Drupal/KernelTests/Core/Image/ToolkitGdTest.php
index a71a2f1c40f44609c5ffb19dc2a57cf097363da2..08b4d91e813e97fc7ec3e2d2ec79afa54af96974 100644
--- a/core/tests/Drupal/KernelTests/Core/Image/ToolkitGdTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Image/ToolkitGdTest.php
@@ -43,7 +43,7 @@ class ToolkitGdTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['system'];
+  protected static $modules = ['system'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/KernelTests/Core/KeyValueStore/DatabaseStorageExpirableTest.php b/core/tests/Drupal/KernelTests/Core/KeyValueStore/DatabaseStorageExpirableTest.php
index a2d45f5fd51c1a21b19d2df09435043c27fec197..42d43058a59e2a0eb60805cc24a9e7aad7fb3c72 100644
--- a/core/tests/Drupal/KernelTests/Core/KeyValueStore/DatabaseStorageExpirableTest.php
+++ b/core/tests/Drupal/KernelTests/Core/KeyValueStore/DatabaseStorageExpirableTest.php
@@ -17,7 +17,7 @@ class DatabaseStorageExpirableTest extends StorageTestBase {
    *
    * @var array
    */
-  public static $modules = ['system'];
+  protected static $modules = ['system'];
 
   protected function setUp(): void {
     parent::setUp();
diff --git a/core/tests/Drupal/KernelTests/Core/KeyValueStore/DatabaseStorageTest.php b/core/tests/Drupal/KernelTests/Core/KeyValueStore/DatabaseStorageTest.php
index 9a758f6be5602f27d816f4ce6412ad90d0e5ee24..b70fa69fa92b4d4f48e01c56f5bc74c24ad5100b 100644
--- a/core/tests/Drupal/KernelTests/Core/KeyValueStore/DatabaseStorageTest.php
+++ b/core/tests/Drupal/KernelTests/Core/KeyValueStore/DatabaseStorageTest.php
@@ -17,7 +17,7 @@ class DatabaseStorageTest extends StorageTestBase {
    *
    * @var array
    */
-  public static $modules = ['system'];
+  protected static $modules = ['system'];
 
   protected function setUp(): void {
     parent::setUp();
diff --git a/core/tests/Drupal/KernelTests/Core/KeyValueStore/GarbageCollectionTest.php b/core/tests/Drupal/KernelTests/Core/KeyValueStore/GarbageCollectionTest.php
index 59d00079d41990ada59b8cdeb7f2c9c15268e19b..bbf927f6a2b46deb7eb52e8783c3c52c89dcd2e5 100644
--- a/core/tests/Drupal/KernelTests/Core/KeyValueStore/GarbageCollectionTest.php
+++ b/core/tests/Drupal/KernelTests/Core/KeyValueStore/GarbageCollectionTest.php
@@ -19,7 +19,7 @@ class GarbageCollectionTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['system'];
+  protected static $modules = ['system'];
 
   protected function setUp(): void {
     parent::setUp();
diff --git a/core/tests/Drupal/KernelTests/Core/KeyValueStore/KeyValueContentEntityStorageTest.php b/core/tests/Drupal/KernelTests/Core/KeyValueStore/KeyValueContentEntityStorageTest.php
index c36e9a11b2f120436d0619a2aec4f14e55c6782d..2dae852f368794dc5908fe73c6a67635c626ffde 100644
--- a/core/tests/Drupal/KernelTests/Core/KeyValueStore/KeyValueContentEntityStorageTest.php
+++ b/core/tests/Drupal/KernelTests/Core/KeyValueStore/KeyValueContentEntityStorageTest.php
@@ -19,7 +19,7 @@ class KeyValueContentEntityStorageTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['user', 'entity_test', 'keyvalue_test'];
+  protected static $modules = ['user', 'entity_test', 'keyvalue_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/KernelTests/Core/Menu/LocalActionManagerTest.php b/core/tests/Drupal/KernelTests/Core/Menu/LocalActionManagerTest.php
index 13acd8b982b9b59d509570283a0b3a184986b611..c43118f7394459fd161b706c621876e8ceab40c7 100644
--- a/core/tests/Drupal/KernelTests/Core/Menu/LocalActionManagerTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Menu/LocalActionManagerTest.php
@@ -15,7 +15,7 @@ class LocalActionManagerTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['menu_test', 'user', 'system'];
+  protected static $modules = ['menu_test', 'user', 'system'];
 
   /**
    * Tests the cacheability of local actions.
diff --git a/core/tests/Drupal/KernelTests/Core/Menu/MenuLinkDefaultIntegrationTest.php b/core/tests/Drupal/KernelTests/Core/Menu/MenuLinkDefaultIntegrationTest.php
index d0da9130a69e12b11319e245432d1bd5d30d4a6a..47fbe2bb933a8db7bcdbfa6ffe017b5960f51aa4 100644
--- a/core/tests/Drupal/KernelTests/Core/Menu/MenuLinkDefaultIntegrationTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Menu/MenuLinkDefaultIntegrationTest.php
@@ -17,7 +17,7 @@ class MenuLinkDefaultIntegrationTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'menu_test',
   ];
 
diff --git a/core/tests/Drupal/KernelTests/Core/Menu/MenuLinkTreeTest.php b/core/tests/Drupal/KernelTests/Core/Menu/MenuLinkTreeTest.php
index cf99daf9d4c1c1c3064fa82f9f24bfde33e99d1b..f792faa9fa3efa5042aa64a2eb075928da1d22f2 100644
--- a/core/tests/Drupal/KernelTests/Core/Menu/MenuLinkTreeTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Menu/MenuLinkTreeTest.php
@@ -35,7 +35,7 @@ class MenuLinkTreeTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'system',
     'menu_test',
     'menu_link_content',
diff --git a/core/tests/Drupal/KernelTests/Core/ParamConverter/EntityConverterLatestRevisionTest.php b/core/tests/Drupal/KernelTests/Core/ParamConverter/EntityConverterLatestRevisionTest.php
index f8bbeaa7caf5c0c1aab3bca67b479fb73b55b3f6..5af86b2ad84c53b4d1def4de41f8f58cdc1a4165 100644
--- a/core/tests/Drupal/KernelTests/Core/ParamConverter/EntityConverterLatestRevisionTest.php
+++ b/core/tests/Drupal/KernelTests/Core/ParamConverter/EntityConverterLatestRevisionTest.php
@@ -23,7 +23,7 @@ class EntityConverterLatestRevisionTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'entity_test',
     'user',
     'language',
diff --git a/core/tests/Drupal/KernelTests/Core/Path/PathValidatorTest.php b/core/tests/Drupal/KernelTests/Core/Path/PathValidatorTest.php
index ff0a397924934282d4aad1b79d9a6a5b0363c1df..a656671567f2f5658e1ad51a4cef072b85dca9ba 100644
--- a/core/tests/Drupal/KernelTests/Core/Path/PathValidatorTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Path/PathValidatorTest.php
@@ -22,7 +22,7 @@ class PathValidatorTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['path', 'entity_test', 'system', 'user'];
+  protected static $modules = ['path', 'entity_test', 'system', 'user'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/KernelTests/Core/Path/UrlAlterTest.php b/core/tests/Drupal/KernelTests/Core/Path/UrlAlterTest.php
index 37ac65ae8e887c249275475f51545cc33bd88fb3..ae5f631c5f6502e1375927abd456112bd4d4f53f 100644
--- a/core/tests/Drupal/KernelTests/Core/Path/UrlAlterTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Path/UrlAlterTest.php
@@ -17,7 +17,7 @@ class UrlAlterTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['path', 'url_alter_test', 'user'];
+  protected static $modules = ['path', 'url_alter_test', 'user'];
 
   public function testUrlWithQueryString() {
     // Test outbound query string altering.
diff --git a/core/tests/Drupal/KernelTests/Core/Plugin/Condition/ConditionTestDualUserTest.php b/core/tests/Drupal/KernelTests/Core/Plugin/Condition/ConditionTestDualUserTest.php
index 0d4de7037d526802d0e69466a21f1c9a5048c751..e96f650cde087c47e6cd3cb8505266eeae67705e 100644
--- a/core/tests/Drupal/KernelTests/Core/Plugin/Condition/ConditionTestDualUserTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Plugin/Condition/ConditionTestDualUserTest.php
@@ -30,7 +30,7 @@ class ConditionTestDualUserTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system', 'user', 'condition_test'];
+  protected static $modules = ['system', 'user', 'condition_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/KernelTests/Core/Plugin/Condition/CurrentThemeConditionTest.php b/core/tests/Drupal/KernelTests/Core/Plugin/Condition/CurrentThemeConditionTest.php
index a4fb3fef1a52bc55accf16b5731bcae7e838c204..c30349d48613f014bed07978df66826954a7b862 100644
--- a/core/tests/Drupal/KernelTests/Core/Plugin/Condition/CurrentThemeConditionTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Plugin/Condition/CurrentThemeConditionTest.php
@@ -15,7 +15,7 @@ class CurrentThemeConditionTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system', 'theme_test'];
+  protected static $modules = ['system', 'theme_test'];
 
   /**
    * Tests the current theme condition.
diff --git a/core/tests/Drupal/KernelTests/Core/Plugin/Condition/OptionalContextConditionTest.php b/core/tests/Drupal/KernelTests/Core/Plugin/Condition/OptionalContextConditionTest.php
index e0a4a09952e2ee6e36304dd37d3d18c7bd7a9ea1..b735d0c2692a0ac75f694bbf4fb05dab482e5ec7 100644
--- a/core/tests/Drupal/KernelTests/Core/Plugin/Condition/OptionalContextConditionTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Plugin/Condition/OptionalContextConditionTest.php
@@ -19,7 +19,7 @@ class OptionalContextConditionTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system', 'user', 'condition_test', 'node'];
+  protected static $modules = ['system', 'user', 'condition_test', 'node'];
 
   /**
    * Tests with both contexts mapped to the same user.
diff --git a/core/tests/Drupal/KernelTests/Core/Plugin/Condition/RequestPathTest.php b/core/tests/Drupal/KernelTests/Core/Plugin/Condition/RequestPathTest.php
index 076426db97cb31db207c98f36c3233dfa52839b6..753c140248b7982dda2f7503919cbb1425abbb54 100644
--- a/core/tests/Drupal/KernelTests/Core/Plugin/Condition/RequestPathTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Plugin/Condition/RequestPathTest.php
@@ -42,7 +42,7 @@ class RequestPathTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['system', 'user', 'field', 'path'];
+  protected static $modules = ['system', 'user', 'field', 'path'];
 
   /**
    * The current path.
diff --git a/core/tests/Drupal/KernelTests/Core/Plugin/ContextDefinitionTest.php b/core/tests/Drupal/KernelTests/Core/Plugin/ContextDefinitionTest.php
index 9194c096f625135d513c8e3b81aa2d4f8302c681..7e10996b5bb9cbbf3866af9277946205e6d5890c 100644
--- a/core/tests/Drupal/KernelTests/Core/Plugin/ContextDefinitionTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Plugin/ContextDefinitionTest.php
@@ -16,7 +16,7 @@ class ContextDefinitionTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['entity_test', 'user'];
+  protected static $modules = ['entity_test', 'user'];
 
   /**
    * @covers ::isSatisfiedBy
diff --git a/core/tests/Drupal/KernelTests/Core/Plugin/ContextPluginTest.php b/core/tests/Drupal/KernelTests/Core/Plugin/ContextPluginTest.php
index 52458247878c27a92e7aced13cfd39a19f17f1e0..a9c3bd6595e23273395bdc907a3cdc92bb3b96b0 100644
--- a/core/tests/Drupal/KernelTests/Core/Plugin/ContextPluginTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Plugin/ContextPluginTest.php
@@ -17,7 +17,7 @@
  */
 class ContextPluginTest extends KernelTestBase {
 
-  public static $modules = ['system', 'user', 'node', 'field', 'filter', 'text'];
+  protected static $modules = ['system', 'user', 'node', 'field', 'filter', 'text'];
 
   /**
    * Tests basic context definition and value getters and setters.
diff --git a/core/tests/Drupal/KernelTests/Core/Plugin/DerivativeTest.php b/core/tests/Drupal/KernelTests/Core/Plugin/DerivativeTest.php
index 519d7373c5911ec433f89945e53249a81dc72b7e..e80ce22b8b2fc24e75118c87537d60debfa94d11 100644
--- a/core/tests/Drupal/KernelTests/Core/Plugin/DerivativeTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Plugin/DerivativeTest.php
@@ -12,7 +12,7 @@ class DerivativeTest extends PluginTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'user'];
+  protected static $modules = ['node', 'user'];
 
   /**
    * Tests getDefinitions() and getDefinition() with a derivativeDecorator.
diff --git a/core/tests/Drupal/KernelTests/Core/Plugin/FactoryTest.php b/core/tests/Drupal/KernelTests/Core/Plugin/FactoryTest.php
index ed7792982e6cfc46c955c7162954db46b3be1c41..0178bb546ab01b8e1f24a7298dc8bc0f6cc9c122 100644
--- a/core/tests/Drupal/KernelTests/Core/Plugin/FactoryTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Plugin/FactoryTest.php
@@ -14,7 +14,7 @@ class FactoryTest extends PluginTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'user'];
+  protected static $modules = ['node', 'user'];
 
   /**
    * Test that DefaultFactory can create a plugin instance.
diff --git a/core/tests/Drupal/KernelTests/Core/Plugin/InspectionTest.php b/core/tests/Drupal/KernelTests/Core/Plugin/InspectionTest.php
index 20ba65c1bf0192281a39a2919c5b1d373bbfe952..a737d9a5ef88ee61b7b19c2923f47427fe3b6ca8 100644
--- a/core/tests/Drupal/KernelTests/Core/Plugin/InspectionTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Plugin/InspectionTest.php
@@ -12,7 +12,7 @@ class InspectionTest extends PluginTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'user'];
+  protected static $modules = ['node', 'user'];
 
   /**
    * Ensure the test plugins correctly implement getPluginId() and getPluginDefinition().
diff --git a/core/tests/Drupal/KernelTests/Core/Plugin/PluginTestBase.php b/core/tests/Drupal/KernelTests/Core/Plugin/PluginTestBase.php
index 9c065d48bee01e9bf0b68693a09ff771465a9c2a..a8df05585ce5bcfb1b9ebdf78c0272dcc7e01f5d 100644
--- a/core/tests/Drupal/KernelTests/Core/Plugin/PluginTestBase.php
+++ b/core/tests/Drupal/KernelTests/Core/Plugin/PluginTestBase.php
@@ -20,7 +20,7 @@ abstract class PluginTestBase extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['plugin_test'];
+  protected static $modules = ['plugin_test'];
 
   protected $testPluginManager;
   protected $testPluginExpectedDefinitions;
diff --git a/core/tests/Drupal/KernelTests/Core/Queue/QueueSerializationTest.php b/core/tests/Drupal/KernelTests/Core/Queue/QueueSerializationTest.php
index bc1f8ed6bcc4e570677b3cf3f6f49b7a1058ee55..fe6d8a4230334c8969569a7804fe27f8ce271890 100644
--- a/core/tests/Drupal/KernelTests/Core/Queue/QueueSerializationTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Queue/QueueSerializationTest.php
@@ -30,7 +30,7 @@ class QueueSerializationTest extends KernelTestBase implements FormInterface {
    *
    * @var array
    */
-  public static $modules = ['system', 'user', 'aggregator'];
+  protected static $modules = ['system', 'user', 'aggregator'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/KernelTests/Core/Render/Element/ActionsTest.php b/core/tests/Drupal/KernelTests/Core/Render/Element/ActionsTest.php
index 135c7aabb192ff5f3f3f5ffd55a9b56851426597..70081bca9b27aedf736a2a7bb1519a5aa86ed73d 100644
--- a/core/tests/Drupal/KernelTests/Core/Render/Element/ActionsTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Render/Element/ActionsTest.php
@@ -15,7 +15,7 @@ class ActionsTest extends KernelTestBase implements FormInterface {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system'];
+  protected static $modules = ['system'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/KernelTests/Core/Render/Element/RenderElementTypesTest.php b/core/tests/Drupal/KernelTests/Core/Render/Element/RenderElementTypesTest.php
index 409cd4d9a2b3492765c3a0759d6d37bd4a0b5d4f..8ff094ca964a9d22a1c9870969c22dd9f8d7bd3d 100644
--- a/core/tests/Drupal/KernelTests/Core/Render/Element/RenderElementTypesTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Render/Element/RenderElementTypesTest.php
@@ -18,7 +18,7 @@ class RenderElementTypesTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['system', 'router_test'];
+  protected static $modules = ['system', 'router_test'];
 
   protected function setUp(): void {
     parent::setUp();
diff --git a/core/tests/Drupal/KernelTests/Core/Render/Element/TableTest.php b/core/tests/Drupal/KernelTests/Core/Render/Element/TableTest.php
index f32b490d5bf382ca7f8ecee71f169d229be6c4bf..a7dc9fc4957c927e0fe9b9ed600acecfa8825e13 100644
--- a/core/tests/Drupal/KernelTests/Core/Render/Element/TableTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Render/Element/TableTest.php
@@ -16,7 +16,7 @@ class TableTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['system', 'form_test'];
+  protected static $modules = ['system', 'form_test'];
 
   /**
    * Tableheader.js provides 'sticky' table headers, and is included by default.
diff --git a/core/tests/Drupal/KernelTests/Core/Render/RenderCacheTest.php b/core/tests/Drupal/KernelTests/Core/Render/RenderCacheTest.php
index 395d96f65404deb03196196b51c7b2e13cbae752..a258de007349e9711cd966e619e2d90bd5f0ceb2 100644
--- a/core/tests/Drupal/KernelTests/Core/Render/RenderCacheTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Render/RenderCacheTest.php
@@ -19,7 +19,7 @@ class RenderCacheTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['user', 'system'];
+  protected static $modules = ['user', 'system'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/KernelTests/Core/Render/RenderTest.php b/core/tests/Drupal/KernelTests/Core/Render/RenderTest.php
index 043aae4445ce4ede9ff408091ff27b8ade13370d..b0e3d8094a276c6850149835094de57351d3002d 100644
--- a/core/tests/Drupal/KernelTests/Core/Render/RenderTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Render/RenderTest.php
@@ -16,7 +16,7 @@ class RenderTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['system', 'common_test', 'theme_test'];
+  protected static $modules = ['system', 'common_test', 'theme_test'];
 
   /**
    * Tests theme preprocess functions being able to attach assets.
diff --git a/core/tests/Drupal/KernelTests/Core/RouteProcessor/RouteNoneTest.php b/core/tests/Drupal/KernelTests/Core/RouteProcessor/RouteNoneTest.php
index 8114a0fa464134dff61a910e9e7d6dee87a3f130..922eefa25b5e56b8b03581e61313d216ad0a16f6 100644
--- a/core/tests/Drupal/KernelTests/Core/RouteProcessor/RouteNoneTest.php
+++ b/core/tests/Drupal/KernelTests/Core/RouteProcessor/RouteNoneTest.php
@@ -22,7 +22,7 @@ class RouteNoneTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system'];
+  protected static $modules = ['system'];
 
   /**
    * The URL generator.
diff --git a/core/tests/Drupal/KernelTests/Core/RouteProcessor/RouteProcessorCurrentIntegrationTest.php b/core/tests/Drupal/KernelTests/Core/RouteProcessor/RouteProcessorCurrentIntegrationTest.php
index e29fa68a7dcd670df60ff9fe32646323115e4062..235af6e144f4b10721b3f74cb089304aef942576 100644
--- a/core/tests/Drupal/KernelTests/Core/RouteProcessor/RouteProcessorCurrentIntegrationTest.php
+++ b/core/tests/Drupal/KernelTests/Core/RouteProcessor/RouteProcessorCurrentIntegrationTest.php
@@ -21,7 +21,7 @@ class RouteProcessorCurrentIntegrationTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system'];
+  protected static $modules = ['system'];
 
   /**
    * The URL generator.
diff --git a/core/tests/Drupal/KernelTests/Core/Routing/ContentNegotiationRoutingTest.php b/core/tests/Drupal/KernelTests/Core/Routing/ContentNegotiationRoutingTest.php
index 202971cb0036e91c0cd9ef89891bd089f03f94ef..b6a0738d09c7f0172f2d5316067a9524146e4112 100644
--- a/core/tests/Drupal/KernelTests/Core/Routing/ContentNegotiationRoutingTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Routing/ContentNegotiationRoutingTest.php
@@ -20,7 +20,7 @@ class ContentNegotiationRoutingTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['conneg_test', 'path_alias'];
+  protected static $modules = ['conneg_test', 'path_alias'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/KernelTests/Core/Routing/ExceptionHandlingTest.php b/core/tests/Drupal/KernelTests/Core/Routing/ExceptionHandlingTest.php
index 7132efba64b0e9f42d68bbe705648f966d2475e7..877376eb27303ed0276235a3a8eecf3bb53b64e0 100644
--- a/core/tests/Drupal/KernelTests/Core/Routing/ExceptionHandlingTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Routing/ExceptionHandlingTest.php
@@ -18,7 +18,7 @@ class ExceptionHandlingTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system', 'router_test'];
+  protected static $modules = ['system', 'router_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/KernelTests/Core/Routing/RouteProviderTest.php b/core/tests/Drupal/KernelTests/Core/Routing/RouteProviderTest.php
index 0c1b5f78dbe7f9f6fcbbf9f7e4b0bd25c621ca41..f4d8d374ed90be451a1e65fa27033073994b84ce 100644
--- a/core/tests/Drupal/KernelTests/Core/Routing/RouteProviderTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Routing/RouteProviderTest.php
@@ -38,7 +38,7 @@ class RouteProviderTest extends KernelTestBase {
   /**
    * Modules to enable.
    */
-  public static $modules = ['url_alter_test', 'system', 'language', 'path_alias'];
+  protected static $modules = ['url_alter_test', 'system', 'language', 'path_alias'];
 
   /**
    * A collection of shared fixture data for tests.
diff --git a/core/tests/Drupal/KernelTests/Core/Routing/UrlIntegrationTest.php b/core/tests/Drupal/KernelTests/Core/Routing/UrlIntegrationTest.php
index 053db792cbb8493569a4041830a0376f8f8e14a5..82138006769f82fb7e331482cfc2afb176dd14df 100644
--- a/core/tests/Drupal/KernelTests/Core/Routing/UrlIntegrationTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Routing/UrlIntegrationTest.php
@@ -19,7 +19,7 @@ class UrlIntegrationTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['user', 'router_test', 'system'];
+  protected static $modules = ['user', 'router_test', 'system'];
 
   /**
    * Ensures that the access() method on \Drupal\Core\Url objects works.
diff --git a/core/tests/Drupal/KernelTests/Core/ServiceProvider/ServiceProviderTest.php b/core/tests/Drupal/KernelTests/Core/ServiceProvider/ServiceProviderTest.php
index 970ea0486dd50ff64f654973e2b6d2cfa531ce25..0411f5f83ca574e4e0dd9d2ad301d47bcfdac470 100644
--- a/core/tests/Drupal/KernelTests/Core/ServiceProvider/ServiceProviderTest.php
+++ b/core/tests/Drupal/KernelTests/Core/ServiceProvider/ServiceProviderTest.php
@@ -16,7 +16,7 @@ class ServiceProviderTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['file', 'service_provider_test', 'system'];
+  protected static $modules = ['file', 'service_provider_test', 'system'];
 
   /**
    * Tests that services provided by module service providers get registered to the DIC.
diff --git a/core/tests/Drupal/KernelTests/Core/StreamWrapper/StreamWrapperManagerTest.php b/core/tests/Drupal/KernelTests/Core/StreamWrapper/StreamWrapperManagerTest.php
index 43bbe99acdd779e98c86da5cc152cc77500cafb4..2cc2ee5a40229fde6971b4e7a7a4c31e4372357f 100644
--- a/core/tests/Drupal/KernelTests/Core/StreamWrapper/StreamWrapperManagerTest.php
+++ b/core/tests/Drupal/KernelTests/Core/StreamWrapper/StreamWrapperManagerTest.php
@@ -21,7 +21,7 @@ class StreamWrapperManagerTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system'];
+  protected static $modules = ['system'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/KernelTests/Core/StringTranslation/TranslationStringTest.php b/core/tests/Drupal/KernelTests/Core/StringTranslation/TranslationStringTest.php
index f6c89ad4c0c266f359ccd15525a1c231a7efbb31..77e37755f3c65cea503d9a921f7d558032a09c9a 100644
--- a/core/tests/Drupal/KernelTests/Core/StringTranslation/TranslationStringTest.php
+++ b/core/tests/Drupal/KernelTests/Core/StringTranslation/TranslationStringTest.php
@@ -18,7 +18,7 @@ class TranslationStringTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'language',
   ];
 
diff --git a/core/tests/Drupal/KernelTests/Core/TempStore/AnonymousPrivateTempStoreTest.php b/core/tests/Drupal/KernelTests/Core/TempStore/AnonymousPrivateTempStoreTest.php
index 37632dc106ca1238b9f3f369c79344c22b01e94e..e96549e38f2c995a9e471b3f8bfe50f286a7e248 100644
--- a/core/tests/Drupal/KernelTests/Core/TempStore/AnonymousPrivateTempStoreTest.php
+++ b/core/tests/Drupal/KernelTests/Core/TempStore/AnonymousPrivateTempStoreTest.php
@@ -17,7 +17,7 @@ class AnonymousPrivateTempStoreTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['system'];
+  protected static $modules = ['system'];
 
   /**
    * The private temp store.
diff --git a/core/tests/Drupal/KernelTests/Core/TempStore/TempStoreDatabaseTest.php b/core/tests/Drupal/KernelTests/Core/TempStore/TempStoreDatabaseTest.php
index cd50cc6851ea3ffa9fac7b1b2f86aa92dc759b07..cb7eb1bbdfd6916b5990c632a31fd9932f3eb1be 100644
--- a/core/tests/Drupal/KernelTests/Core/TempStore/TempStoreDatabaseTest.php
+++ b/core/tests/Drupal/KernelTests/Core/TempStore/TempStoreDatabaseTest.php
@@ -21,7 +21,7 @@ class TempStoreDatabaseTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['system'];
+  protected static $modules = ['system'];
 
   /**
    * A key/value store factory.
diff --git a/core/tests/Drupal/KernelTests/Core/Test/PhpUnitBridgeTest.php b/core/tests/Drupal/KernelTests/Core/Test/PhpUnitBridgeTest.php
index d82a37b90698adf6a7bd4202a9271c2f1d8f89d4..2942eaace9f56f3c84b86fd6182e1b1db603f87a 100644
--- a/core/tests/Drupal/KernelTests/Core/Test/PhpUnitBridgeTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Test/PhpUnitBridgeTest.php
@@ -13,7 +13,7 @@
  */
 class PhpUnitBridgeTest extends KernelTestBase {
 
-  public static $modules = ['deprecation_test'];
+  protected static $modules = ['deprecation_test'];
 
   /**
    * @expectedDeprecation Drupal\deprecation_test\Deprecation\FixtureDeprecatedClass is deprecated.
diff --git a/core/tests/Drupal/KernelTests/Core/Theme/BaseThemeMissingTest.php b/core/tests/Drupal/KernelTests/Core/Theme/BaseThemeMissingTest.php
index 91cdb15679095ebfc6f6077c1478994b047b925a..68c7cff2f5a806ed39d843881a341e6c6d4bf914 100644
--- a/core/tests/Drupal/KernelTests/Core/Theme/BaseThemeMissingTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Theme/BaseThemeMissingTest.php
@@ -21,7 +21,7 @@ class BaseThemeMissingTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system'];
+  protected static $modules = ['system'];
 
   /**
    * The theme installer.
diff --git a/core/tests/Drupal/KernelTests/Core/Theme/BaseThemeRequiredTest.php b/core/tests/Drupal/KernelTests/Core/Theme/BaseThemeRequiredTest.php
index 298a7b1e3571153424c4e7dce9b11634d17a6f15..13734db774c75e0eafae448c7b09049b2c566e69 100644
--- a/core/tests/Drupal/KernelTests/Core/Theme/BaseThemeRequiredTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Theme/BaseThemeRequiredTest.php
@@ -14,7 +14,7 @@ class BaseThemeRequiredTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system'];
+  protected static $modules = ['system'];
 
   /**
    * The theme installer.
diff --git a/core/tests/Drupal/KernelTests/Core/Theme/ImageTest.php b/core/tests/Drupal/KernelTests/Core/Theme/ImageTest.php
index 119093958085893820dafdac0af996bd63a9887c..f93f61a019cb00a4a813f398467675694b4d8d89 100644
--- a/core/tests/Drupal/KernelTests/Core/Theme/ImageTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Theme/ImageTest.php
@@ -17,7 +17,7 @@ class ImageTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['system'];
+  protected static $modules = ['system'];
 
   /*
    * The images to test with.
diff --git a/core/tests/Drupal/KernelTests/Core/Theme/MessageTest.php b/core/tests/Drupal/KernelTests/Core/Theme/MessageTest.php
index 6e594f358ef54ca1f3fb8ddf72e3378a6fbcf47d..d6df9261f2a8e3640aeb3ea8d5d44fe13c2a4bfd 100644
--- a/core/tests/Drupal/KernelTests/Core/Theme/MessageTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Theme/MessageTest.php
@@ -14,7 +14,7 @@ class MessageTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system'];
+  protected static $modules = ['system'];
 
   /**
    * Tests setting messages output.
diff --git a/core/tests/Drupal/KernelTests/Core/Theme/RegistryLegacyTest.php b/core/tests/Drupal/KernelTests/Core/Theme/RegistryLegacyTest.php
index 3c30360533a725db905baa4ec6cbf20ad938f0df..350f2accb4458fb8e48b7dd8fab3eb389bdcde8c 100644
--- a/core/tests/Drupal/KernelTests/Core/Theme/RegistryLegacyTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Theme/RegistryLegacyTest.php
@@ -20,7 +20,7 @@ class RegistryLegacyTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['theme_test', 'system'];
+  protected static $modules = ['theme_test', 'system'];
 
   protected $profile = 'testing';
 
diff --git a/core/tests/Drupal/KernelTests/Core/Theme/RegistryTest.php b/core/tests/Drupal/KernelTests/Core/Theme/RegistryTest.php
index bfc693f32d689f1f21ebb012296fb8c794e422c2..baaaeb471eb5e713395a968c9fa25c58a8d2def1 100644
--- a/core/tests/Drupal/KernelTests/Core/Theme/RegistryTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Theme/RegistryTest.php
@@ -21,7 +21,7 @@ class RegistryTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['theme_test', 'system'];
+  protected static $modules = ['theme_test', 'system'];
 
   protected $profile = 'testing';
 
diff --git a/core/tests/Drupal/KernelTests/Core/Theme/Stable9LibraryOverrideTest.php b/core/tests/Drupal/KernelTests/Core/Theme/Stable9LibraryOverrideTest.php
index debde6ef0623a076883c918cbc4dd536a015cde8..7ace13dd81f45dcb0ffde10f1b74268b75cb2a65 100644
--- a/core/tests/Drupal/KernelTests/Core/Theme/Stable9LibraryOverrideTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Theme/Stable9LibraryOverrideTest.php
@@ -49,7 +49,7 @@ class Stable9LibraryOverrideTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system', 'user', 'path_alias'];
+  protected static $modules = ['system', 'user', 'path_alias'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/KernelTests/Core/Theme/Stable9TemplateOverrideTest.php b/core/tests/Drupal/KernelTests/Core/Theme/Stable9TemplateOverrideTest.php
index e34478796c08e59b4f27fa7bf941971d644aa12d..22fc6515859c415855895130f471c7e3be0c9d4f 100644
--- a/core/tests/Drupal/KernelTests/Core/Theme/Stable9TemplateOverrideTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Theme/Stable9TemplateOverrideTest.php
@@ -15,7 +15,7 @@ class Stable9TemplateOverrideTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system', 'user'];
+  protected static $modules = ['system', 'user'];
 
   /**
    * An array of template names to skip, without the extension.
diff --git a/core/tests/Drupal/KernelTests/Core/Theme/StableLibraryOverrideTest.php b/core/tests/Drupal/KernelTests/Core/Theme/StableLibraryOverrideTest.php
index 159bd090c2c7c5c238be7de7191be45814aa7574..e291cbe44f361493ba93784ee35d89c1b7eed212 100644
--- a/core/tests/Drupal/KernelTests/Core/Theme/StableLibraryOverrideTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Theme/StableLibraryOverrideTest.php
@@ -49,7 +49,7 @@ class StableLibraryOverrideTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system', 'user', 'path_alias'];
+  protected static $modules = ['system', 'user', 'path_alias'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/KernelTests/Core/Theme/StableTemplateOverrideTest.php b/core/tests/Drupal/KernelTests/Core/Theme/StableTemplateOverrideTest.php
index 8d873d003856f54c7c37a61a406ad21d368e5532..6534baa635e5ced58e290978bb04435b3b1a4aa1 100644
--- a/core/tests/Drupal/KernelTests/Core/Theme/StableTemplateOverrideTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Theme/StableTemplateOverrideTest.php
@@ -15,7 +15,7 @@ class StableTemplateOverrideTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system', 'user'];
+  protected static $modules = ['system', 'user'];
 
   /**
    * An array of template names to skip, without the extension.
diff --git a/core/tests/Drupal/KernelTests/Core/Theme/ThemeInstallerTest.php b/core/tests/Drupal/KernelTests/Core/Theme/ThemeInstallerTest.php
index c6532acced9140cbaf1143dce11099bd546e3259..504946aa071ead9cb51bd00b7b9552d07a391b5d 100644
--- a/core/tests/Drupal/KernelTests/Core/Theme/ThemeInstallerTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Theme/ThemeInstallerTest.php
@@ -21,7 +21,7 @@ class ThemeInstallerTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['system'];
+  protected static $modules = ['system'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/KernelTests/Core/Theme/ThemeRenderAndAutoescapeTest.php b/core/tests/Drupal/KernelTests/Core/Theme/ThemeRenderAndAutoescapeTest.php
index 7d57e893c0b7e5cbb444f40fd39c4d5462f09697..5a06ef8f7968f5ecfff7a41c91542d09ac2094f9 100644
--- a/core/tests/Drupal/KernelTests/Core/Theme/ThemeRenderAndAutoescapeTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Theme/ThemeRenderAndAutoescapeTest.php
@@ -25,7 +25,7 @@ class ThemeRenderAndAutoescapeTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system'];
+  protected static $modules = ['system'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/KernelTests/Core/Theme/ThemeSettingsTest.php b/core/tests/Drupal/KernelTests/Core/Theme/ThemeSettingsTest.php
index f0862ccceaf42ca6091cc8a5c32559a214406a33..c9e915f89baa6c9a86b30675356ad56ef632a464 100644
--- a/core/tests/Drupal/KernelTests/Core/Theme/ThemeSettingsTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Theme/ThemeSettingsTest.php
@@ -18,7 +18,7 @@ class ThemeSettingsTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['system'];
+  protected static $modules = ['system'];
 
   /**
    * List of discovered themes.
diff --git a/core/tests/Drupal/KernelTests/Core/Theme/TwigEnvironmentTest.php b/core/tests/Drupal/KernelTests/Core/Theme/TwigEnvironmentTest.php
index 65f80c4054ad35494a406f57ce3fbfad1a5ebc9c..f39db0cec2bff174cbc8fc2d879ab9c516cc4206 100644
--- a/core/tests/Drupal/KernelTests/Core/Theme/TwigEnvironmentTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Theme/TwigEnvironmentTest.php
@@ -25,7 +25,7 @@ class TwigEnvironmentTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['system'];
+  protected static $modules = ['system'];
 
   /**
    * Tests inline templates.
diff --git a/core/tests/Drupal/KernelTests/Core/Theme/TwigMarkupInterfaceTest.php b/core/tests/Drupal/KernelTests/Core/Theme/TwigMarkupInterfaceTest.php
index 826ac047cb5baf306cf82d13c7330561ab2adcaa..3948062f2b5c981856e8d793d8d4669efcc56bc7 100644
--- a/core/tests/Drupal/KernelTests/Core/Theme/TwigMarkupInterfaceTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Theme/TwigMarkupInterfaceTest.php
@@ -29,7 +29,7 @@ class TwigMarkupInterfaceTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'language',
   ];
 
diff --git a/core/tests/Drupal/KernelTests/Core/Theme/TwigWhiteListTest.php b/core/tests/Drupal/KernelTests/Core/Theme/TwigWhiteListTest.php
index 5eabdf5c796d2760d6f3f857610e42820ddf8a10..03edb5e6ad02ff719c3b24bccf304ef2ca8f5ca2 100644
--- a/core/tests/Drupal/KernelTests/Core/Theme/TwigWhiteListTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Theme/TwigWhiteListTest.php
@@ -35,7 +35,7 @@ class TwigWhiteListTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'taxonomy', 'user', 'system', 'text', 'field', 'entity_reference'];
+  protected static $modules = ['node', 'taxonomy', 'user', 'system', 'text', 'field', 'entity_reference'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/KernelTests/Core/TypedData/RecursiveContextualValidatorTest.php b/core/tests/Drupal/KernelTests/Core/TypedData/RecursiveContextualValidatorTest.php
index 0130e27cedbf905903e135790f0675add706ee12..8ba4784807b43e110b15339fd51ac144c1abbbf6 100644
--- a/core/tests/Drupal/KernelTests/Core/TypedData/RecursiveContextualValidatorTest.php
+++ b/core/tests/Drupal/KernelTests/Core/TypedData/RecursiveContextualValidatorTest.php
@@ -16,7 +16,7 @@ class RecursiveContextualValidatorTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'entity_test',
     'user',
   ];
diff --git a/core/tests/Drupal/KernelTests/Core/TypedData/TypedDataTest.php b/core/tests/Drupal/KernelTests/Core/TypedData/TypedDataTest.php
index 8087ca043e95c89b851657fd804c898957cc20d8..f84c6acddcdab3d845cdfe13d64cea47af65b11c 100644
--- a/core/tests/Drupal/KernelTests/Core/TypedData/TypedDataTest.php
+++ b/core/tests/Drupal/KernelTests/Core/TypedData/TypedDataTest.php
@@ -38,7 +38,7 @@ class TypedDataTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['system', 'field', 'file', 'user'];
+  protected static $modules = ['system', 'field', 'file', 'user'];
 
   protected function setUp(): void {
     parent::setup();
diff --git a/core/tests/Drupal/KernelTests/Core/Update/CompatibilityFixTest.php b/core/tests/Drupal/KernelTests/Core/Update/CompatibilityFixTest.php
index a0678524bf4a4640dff26e019d37f3d33200d659..eb51f496898b0e63b1da7a560de9f2ad323dbb08 100644
--- a/core/tests/Drupal/KernelTests/Core/Update/CompatibilityFixTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Update/CompatibilityFixTest.php
@@ -15,7 +15,7 @@ class CompatibilityFixTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system'];
+  protected static $modules = ['system'];
 
   protected function setUp(): void {
     parent::setUp();
diff --git a/core/tests/Drupal/KernelTests/Core/Url/LinkGenerationTest.php b/core/tests/Drupal/KernelTests/Core/Url/LinkGenerationTest.php
index 610dc303dfbcb44a327d209676a37be73c46a36a..de76242ca0e790ee460d76a2d5cdff4cb172d01d 100644
--- a/core/tests/Drupal/KernelTests/Core/Url/LinkGenerationTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Url/LinkGenerationTest.php
@@ -14,7 +14,7 @@
  */
 class LinkGenerationTest extends KernelTestBase {
 
-  public static $modules = ['link_generation_test'];
+  protected static $modules = ['link_generation_test'];
 
   /**
    * Tests how hook_link_alter() can affect escaping of the link text.
diff --git a/core/tests/Drupal/KernelTests/Core/Validation/ConstraintsTest.php b/core/tests/Drupal/KernelTests/Core/Validation/ConstraintsTest.php
index fedb9adbc738f9387786331253a9ec883b19e280..a53b2232766e2a7b056ca451749572b667b335ab 100644
--- a/core/tests/Drupal/KernelTests/Core/Validation/ConstraintsTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Validation/ConstraintsTest.php
@@ -14,7 +14,7 @@ class ConstraintsTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['config_test'];
+  protected static $modules = ['config_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/KernelTests/RequestProcessing/RedirectOnExceptionTest.php b/core/tests/Drupal/KernelTests/RequestProcessing/RedirectOnExceptionTest.php
index 7fbefdc1757768d04914fcc4a88b16bf40a2be17..6e84bea1c108209da63e1a0547c86e09e490736c 100644
--- a/core/tests/Drupal/KernelTests/RequestProcessing/RedirectOnExceptionTest.php
+++ b/core/tests/Drupal/KernelTests/RequestProcessing/RedirectOnExceptionTest.php
@@ -16,7 +16,7 @@ class RedirectOnExceptionTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system', 'test_page_test'];
+  protected static $modules = ['system', 'test_page_test'];
 
   /**
    * {@inheritdoc}