diff --git a/core/modules/action/tests/src/Functional/ActionListTest.php b/core/modules/action/tests/src/Functional/ActionListTest.php
index 309160f4be..07eb2dfd50 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'];
 
   /**
    * Tests the behavior when there are no actions to list in the admin page.
diff --git a/core/modules/action/tests/src/Functional/ActionUninstallTest.php b/core/modules/action/tests/src/Functional/ActionUninstallTest.php
index 5b01099fd2..8c7e6ac65c 100644
--- a/core/modules/action/tests/src/Functional/ActionUninstallTest.php
+++ b/core/modules/action/tests/src/Functional/ActionUninstallTest.php
@@ -17,7 +17,7 @@ class ActionUninstallTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['views', 'action'];
+  protected static $modules = ['views', 'action'];
 
   /**
    * Tests Action uninstall.
diff --git a/core/modules/action/tests/src/Functional/BulkFormTest.php b/core/modules/action/tests/src/Functional/BulkFormTest.php
index 439ffe4d6d..c6f3809053 100644
--- a/core/modules/action/tests/src/Functional/BulkFormTest.php
+++ b/core/modules/action/tests/src/Functional/BulkFormTest.php
@@ -18,7 +18,7 @@ class BulkFormTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'action_bulk_test'];
+  protected static $modules = ['node', 'action_bulk_test'];
 
   /**
    * Tests the bulk form.
diff --git a/core/modules/action/tests/src/Functional/ConfigurationTest.php b/core/modules/action/tests/src/Functional/ConfigurationTest.php
index 9b9dcf62a0..cc384844c2 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'];
 
   /**
    * Tests configuration of advanced actions through administration interface.
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 bd87724cf2..337f033670 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 1737715f8a..13a3c2c7a7 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 0b1a2caae5..13b31881d1 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 1601449d67..feadb446a3 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 938752ad4d..e70f88e43a 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 37e6470847..eb4a2033f0 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'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/aggregator/tests/src/Functional/AggregatorTestBase.php b/core/modules/aggregator/tests/src/Functional/AggregatorTestBase.php
index ddd98bb82f..92c6f91ed7 100644
--- a/core/modules/aggregator/tests/src/Functional/AggregatorTestBase.php
+++ b/core/modules/aggregator/tests/src/Functional/AggregatorTestBase.php
@@ -24,7 +24,7 @@
    *
    * @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 7d75696281..60c8771fa6 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'];
 
   /**
    * Deletes a feed and ensures that all of its services are deleted.
diff --git a/core/modules/aggregator/tests/src/Functional/FeedCacheTagsTest.php b/core/modules/aggregator/tests/src/Functional/FeedCacheTagsTest.php
index dc0aab9263..3a1e07b72f 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 7e3d672c06..fc2b8051aa 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'];
 
   /**
    * List of langcodes.
diff --git a/core/modules/aggregator/tests/src/Functional/ImportOpmlTest.php b/core/modules/aggregator/tests/src/Functional/ImportOpmlTest.php
index 2500b9ebb5..68543bf008 100644
--- a/core/modules/aggregator/tests/src/Functional/ImportOpmlTest.php
+++ b/core/modules/aggregator/tests/src/Functional/ImportOpmlTest.php
@@ -14,7 +14,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 09da343682..35c9a6a073 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/Kernel/AggregatorTitleTest.php b/core/modules/aggregator/tests/src/Kernel/AggregatorTitleTest.php
index 4493c5c8d7..374a2c10fb 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 d8804dd9c3..b3e10e4a03 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 e44bd4f3cd..705c4b6b2a 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 8de1487d0c..f85c957e0b 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 280a103db8..a9a4355ab4 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 9dac60faa8..eef5ba448b 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 5343d1e2de..d14846c7c9 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 fd208238c7..e4dbe34aeb 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 83e59d9707..8dde35b298 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 0fa8f63597..9e2eb36545 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 d41f4f4b38..67fe136808 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 09101f7cd4..ea9206a44b 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 d0ca46ead9..2d5a5f53a9 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 a095d3c42f..a016467812 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 39f57b2518..be9d149c14 100644
--- a/core/modules/aggregator/tests/src/Kernel/Views/IntegrationTest.php
+++ b/core/modules/aggregator/tests/src/Kernel/Views/IntegrationTest.php
@@ -21,7 +21,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 778f3dba97..92ebcdf6ff 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'];
 
   /**
    * Tests various user input to confirm correct validation and saving of data.
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 48f35a7e11..d673ec5589 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 267cc3447c..7ce8f7329a 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 f844cb9305..667d2e09d1 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'];
 
   /**
    * Test http basic authentication.
diff --git a/core/modules/big_pipe/tests/src/Functional/BigPipeTest.php b/core/modules/big_pipe/tests/src/Functional/BigPipeTest.php
index 92d1a866da..14e80a9a6c 100644
--- a/core/modules/big_pipe/tests/src/Functional/BigPipeTest.php
+++ b/core/modules/big_pipe/tests/src/Functional/BigPipeTest.php
@@ -30,7 +30,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 b4da7b0a9b..9a4a9c25b3 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 JavascriptTestBase {
   /**
    * {@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 88f35e4b09..3189e67399 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'];
 
   /**
    * Check for the accessibility of the admin theme on the block admin page.
diff --git a/core/modules/block/tests/src/Functional/BlockCacheTest.php b/core/modules/block/tests/src/Functional/BlockCacheTest.php
index e5bb360e3e..6413e50017 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'];
 
   /**
    * A user with permission to create and edit books and to administer blocks.
diff --git a/core/modules/block/tests/src/Functional/BlockDemoTest.php b/core/modules/block/tests/src/Functional/BlockDemoTest.php
index 884b587a11..5977531130 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'];
 
   /**
    * Check for the accessibility of the admin block demo page.
diff --git a/core/modules/block/tests/src/Functional/BlockFormInBlockTest.php b/core/modules/block/tests/src/Functional/BlockFormInBlockTest.php
index c0e7f58926..ea5702b83d 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 c51551521a..4b3244f0ba 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'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/block/tests/src/Functional/BlockHookOperationTest.php b/core/modules/block/tests/src/Functional/BlockHookOperationTest.php
index 3a5c1ffbd5..054da59262 100644
--- a/core/modules/block/tests/src/Functional/BlockHookOperationTest.php
+++ b/core/modules/block/tests/src/Functional/BlockHookOperationTest.php
@@ -17,7 +17,7 @@ class BlockHookOperationTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['block', 'entity_test'];
+  protected static $modules = ['block', 'entity_test'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/block/tests/src/Functional/BlockHtmlTest.php b/core/modules/block/tests/src/Functional/BlockHtmlTest.php
index 5f9afe916f..b2426e4056 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'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/block/tests/src/Functional/BlockInvalidRegionTest.php b/core/modules/block/tests/src/Functional/BlockInvalidRegionTest.php
index fe8cdcb56a..c7425fa424 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'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/block/tests/src/Functional/BlockLanguageCacheTest.php b/core/modules/block/tests/src/Functional/BlockLanguageCacheTest.php
index b9c7c909ee..8c1b932f91 100644
--- a/core/modules/block/tests/src/Functional/BlockLanguageCacheTest.php
+++ b/core/modules/block/tests/src/Functional/BlockLanguageCacheTest.php
@@ -18,7 +18,7 @@ class BlockLanguageCacheTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['block', 'language', 'menu_ui'];
+  protected static $modules = ['block', 'language', 'menu_ui'];
 
   /**
    * List of langcodes.
diff --git a/core/modules/block/tests/src/Functional/BlockLanguageTest.php b/core/modules/block/tests/src/Functional/BlockLanguageTest.php
index cf1b87720a..86bfec1146 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'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/block/tests/src/Functional/BlockRenderOrderTest.php b/core/modules/block/tests/src/Functional/BlockRenderOrderTest.php
index 2fd1ab8925..e0668606e8 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'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/block/tests/src/Functional/BlockSystemBrandingTest.php b/core/modules/block/tests/src/Functional/BlockSystemBrandingTest.php
index 89ce0c4b45..27cf5bc79a 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/BlockTemplateSuggestionsTest.php b/core/modules/block/tests/src/Functional/BlockTemplateSuggestionsTest.php
index fd4fd5138c..fe0f7bbd09 100644
--- a/core/modules/block/tests/src/Functional/BlockTemplateSuggestionsTest.php
+++ b/core/modules/block/tests/src/Functional/BlockTemplateSuggestionsTest.php
@@ -17,7 +17,7 @@ class BlockTemplateSuggestionsTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['block'];
+  protected static $modules = ['block'];
 
   /**
    * Tests template suggestions from block_theme_suggestions_block().
diff --git a/core/modules/block/tests/src/Functional/BlockTestBase.php b/core/modules/block/tests/src/Functional/BlockTestBase.php
index e1ccd1a365..725c04d6fc 100644
--- a/core/modules/block/tests/src/Functional/BlockTestBase.php
+++ b/core/modules/block/tests/src/Functional/BlockTestBase.php
@@ -15,7 +15,7 @@
    *
    * @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 e6c187544e..b5e818ef9d 100644
--- a/core/modules/block/tests/src/Functional/BlockUiTest.php
+++ b/core/modules/block/tests/src/Functional/BlockUiTest.php
@@ -17,7 +17,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'];
 
   protected $regions;
 
diff --git a/core/modules/block/tests/src/Functional/BlockXssTest.php b/core/modules/block/tests/src/Functional/BlockXssTest.php
index 3e661d775d..7eea08103d 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'];
 
   /**
    * Tests that nothing is escaped other than the blocks explicitly tested.
diff --git a/core/modules/block/tests/src/Functional/NewDefaultThemeBlocksTest.php b/core/modules/block/tests/src/Functional/NewDefaultThemeBlocksTest.php
index adc7da3f1f..b3353aedb9 100644
--- a/core/modules/block/tests/src/Functional/NewDefaultThemeBlocksTest.php
+++ b/core/modules/block/tests/src/Functional/NewDefaultThemeBlocksTest.php
@@ -16,7 +16,7 @@ class NewDefaultThemeBlocksTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['block'];
+  protected static $modules = ['block'];
 
   /**
    * Check the enabled Bartik blocks are correctly copied over.
diff --git a/core/modules/block/tests/src/Functional/NonDefaultBlockAdminTest.php b/core/modules/block/tests/src/Functional/NonDefaultBlockAdminTest.php
index 7b7927de20..1e9bed972c 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/Views/DisplayBlockTest.php b/core/modules/block/tests/src/Functional/Views/DisplayBlockTest.php
index 0a18d7fa0f..fd3a1d1da5 100644
--- a/core/modules/block/tests/src/Functional/Views/DisplayBlockTest.php
+++ b/core/modules/block/tests/src/Functional/Views/DisplayBlockTest.php
@@ -28,7 +28,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'];
 
   /**
    * Views used by this test.
diff --git a/core/modules/block/tests/src/FunctionalJavascript/BlockFilterTest.php b/core/modules/block/tests/src/FunctionalJavascript/BlockFilterTest.php
index b64f7c1ba2..a45406d9ef 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 JavascriptTestBase {
   /**
    * {@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 2bf41e0f4c..cfd9a4680c 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 48d63a302d..6e1a4d2545 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 33de12ce87..9e2611e2ed 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 2a7c7710c3..5a54808897 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 71c4f55b8d..05164de28c 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/MigrateBlockTest.php b/core/modules/block/tests/src/Kernel/Migrate/d6/MigrateBlockTest.php
index bb59f502c3..03b8c43bd8 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/MigrateBlockTest.php b/core/modules/block/tests/src/Kernel/Migrate/d7/MigrateBlockTest.php
index 6f07dc9c21..8028cbc0b9 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 d37f8c7964..1c47f823bb 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_content/tests/src/Functional/BlockContentCacheTagsTest.php b/core/modules/block_content/tests/src/Functional/BlockContentCacheTagsTest.php
index 59f111b965..8a5dc7ccee 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 e4e1a48ac8..0920781c06 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 0f89b86e6a..773eb07585 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'];
 
   /**
    * Permissions to grant admin user.
diff --git a/core/modules/block_content/tests/src/Functional/BlockContentListTest.php b/core/modules/block_content/tests/src/Functional/BlockContentListTest.php
index aba60c366c..a63f393d73 100644
--- a/core/modules/block_content/tests/src/Functional/BlockContentListTest.php
+++ b/core/modules/block_content/tests/src/Functional/BlockContentListTest.php
@@ -18,7 +18,7 @@ class BlockContentListTest extends BlockContentTestBase {
    *
    * @var array
    */
-  public static $modules = ['block', 'block_content', 'config_translation'];
+  protected static $modules = ['block', 'block_content', 'config_translation'];
 
   /**
    * Tests the custom block listing page.
diff --git a/core/modules/block_content/tests/src/Functional/BlockContentListViewsTest.php b/core/modules/block_content/tests/src/Functional/BlockContentListViewsTest.php
index 1c623be82e..b3b0f9dbce 100644
--- a/core/modules/block_content/tests/src/Functional/BlockContentListViewsTest.php
+++ b/core/modules/block_content/tests/src/Functional/BlockContentListViewsTest.php
@@ -16,7 +16,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'];
 
   /**
    * Tests the custom block listing page.
diff --git a/core/modules/block_content/tests/src/Functional/BlockContentPageViewTest.php b/core/modules/block_content/tests/src/Functional/BlockContentPageViewTest.php
index 355faf1f0f..5e773e9035 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'];
 
   /**
    * Checks block edit and fallback functionality.
diff --git a/core/modules/block_content/tests/src/Functional/BlockContentSaveTest.php b/core/modules/block_content/tests/src/Functional/BlockContentSaveTest.php
index 0f7ae5a2e6..048bfe2a34 100644
--- a/core/modules/block_content/tests/src/Functional/BlockContentSaveTest.php
+++ b/core/modules/block_content/tests/src/Functional/BlockContentSaveTest.php
@@ -16,7 +16,7 @@ class BlockContentSaveTest extends BlockContentTestBase {
    *
    * @var array
    */
-  public static $modules = ['block_content_test'];
+  protected static $modules = ['block_content_test'];
 
   /**
    * Sets the test up.
diff --git a/core/modules/block_content/tests/src/Functional/BlockContentTestBase.php b/core/modules/block_content/tests/src/Functional/BlockContentTestBase.php
index 1fdd0ef561..8b41648111 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 @@
    *
    * @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 2699fcfb69..22c96d7c76 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 6c76a90278..002f96660d 100644
--- a/core/modules/block_content/tests/src/Functional/BlockContentTypeTest.php
+++ b/core/modules/block_content/tests/src/Functional/BlockContentTypeTest.php
@@ -20,7 +20,7 @@ class BlockContentTypeTest extends BlockContentTestBase {
    *
    * @var array
    */
-  public static $modules = ['field_ui'];
+  protected static $modules = ['field_ui'];
 
   /**
    * Permissions to grant admin user.
diff --git a/core/modules/block_content/tests/src/Functional/UnpublishedBlockTest.php b/core/modules/block_content/tests/src/Functional/UnpublishedBlockTest.php
index 026b0e5c21..160d9c65ea 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'];
 
   /**
    * Tests unpublishing of block_content entities.
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 a016ab9141..d304a54840 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'];
 
   /**
    * Views used by this test.
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 10ce140e96..d283a1bd55 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'];
 
   /**
    * Tests the redirect destination when editing block content.
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 ffce588605..3f054fba4b 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 @@
    *
    * @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/RevisionRelationshipsTest.php b/core/modules/block_content/tests/src/Functional/Views/RevisionRelationshipsTest.php
index 0ccebd2a9f..f5240c41f0 100644
--- a/core/modules/block_content/tests/src/Functional/Views/RevisionRelationshipsTest.php
+++ b/core/modules/block_content/tests/src/Functional/Views/RevisionRelationshipsTest.php
@@ -20,7 +20,7 @@ class RevisionRelationshipsTest extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = ['block_content' , 'block_content_test_views'];
+  protected static $modules = ['block_content' , 'block_content_test_views'];
 
   /**
    * Views used by this test.
diff --git a/core/modules/block_content/tests/src/Kernel/BlockContentDeletionTest.php b/core/modules/block_content/tests/src/Kernel/BlockContentDeletionTest.php
index e54b2d3d4a..2274750205 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/Migrate/MigrateBlockContentBodyFieldTest.php b/core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentBodyFieldTest.php
index 7d343738c9..d09a26bde1 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 5eb9e413d9..1cd4b35fee 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 8fed905848..314e41298b 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 1958039acb..a6356edc7e 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 4accc2040b..e8ab991088 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 87e6fac893..22e37e4de8 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/d7/MigrateCustomBlockTest.php b/core/modules/block_content/tests/src/Kernel/Migrate/d7/MigrateCustomBlockTest.php
index 706a7ccf05..edab6765b8 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 22ab03c1f9..7f84eb5820 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/d7/BlockCustomTest.php b/core/modules/block_content/tests/src/Kernel/Plugin/migrate/source/d7/BlockCustomTest.php
index 55419e3878..3a2e02d534 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_place/tests/src/Functional/BlockPlaceTest.php b/core/modules/block_place/tests/src/Functional/BlockPlaceTest.php
index 8e89048acd..919be0c25d 100644
--- a/core/modules/block_place/tests/src/Functional/BlockPlaceTest.php
+++ b/core/modules/block_place/tests/src/Functional/BlockPlaceTest.php
@@ -17,7 +17,7 @@ class BlockPlaceTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['block', 'block_place', 'toolbar'];
+  protected static $modules = ['block', 'block_place', 'toolbar'];
 
   /**
    * Tests placing blocks as an admin.
diff --git a/core/modules/book/tests/src/Functional/BookBreadcrumbTest.php b/core/modules/book/tests/src/Functional/BookBreadcrumbTest.php
index a863ff1529..40ed9da5ca 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'];
 
   /**
    * A book node.
diff --git a/core/modules/book/tests/src/Functional/BookContentModerationTest.php b/core/modules/book/tests/src/Functional/BookContentModerationTest.php
index 5d6a34063c..2f5a08237a 100644
--- a/core/modules/book/tests/src/Functional/BookContentModerationTest.php
+++ b/core/modules/book/tests/src/Functional/BookContentModerationTest.php
@@ -19,7 +19,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/BookInstallTest.php b/core/modules/book/tests/src/Functional/BookInstallTest.php
index b5658bdc72..be0ee9a83b 100644
--- a/core/modules/book/tests/src/Functional/BookInstallTest.php
+++ b/core/modules/book/tests/src/Functional/BookInstallTest.php
@@ -17,7 +17,7 @@ class BookInstallTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['node'];
+  protected static $modules = ['node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/book/tests/src/Functional/BookTest.php b/core/modules/book/tests/src/Functional/BookTest.php
index d02dfd50d9..0097c1f789 100644
--- a/core/modules/book/tests/src/Functional/BookTest.php
+++ b/core/modules/book/tests/src/Functional/BookTest.php
@@ -20,7 +20,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'];
 
   /**
    * A user with permission to view a book and access printer-friendly version.
diff --git a/core/modules/book/tests/src/Functional/Views/BookRelationshipTest.php b/core/modules/book/tests/src/Functional/Views/BookRelationshipTest.php
index 9ee79c78dc..41d626fd40 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'];
 
   /**
    * A book node.
diff --git a/core/modules/book/tests/src/FunctionalJavascript/BookJavascriptTest.php b/core/modules/book/tests/src/FunctionalJavascript/BookJavascriptTest.php
index d8d406b440..79e7f6e260 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 JavascriptTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['book'];
+  protected static $modules = ['book'];
 
   /**
    * Tests re-ordering of books.
diff --git a/core/modules/book/tests/src/Kernel/BookPendingRevisionTest.php b/core/modules/book/tests/src/Kernel/BookPendingRevisionTest.php
index ababb3daaa..516b1e1653 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 9430991ffe..732f3ce27e 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 becf87d3c9..eae2c69dd2 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'];
 
   /**
    * {@inheritdoc}
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 cab65e39c2..28168f8574 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', 'menu_ui'];
+  protected static $modules = ['book', 'menu_ui'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/book/tests/src/Kernel/Plugin/migrate/source/d6/BookTest.php b/core/modules/book/tests/src/Kernel/Plugin/migrate/source/d6/BookTest.php
index 25d0906a36..e78e13f460 100644
--- a/core/modules/book/tests/src/Kernel/Plugin/migrate/source/d6/BookTest.php
+++ b/core/modules/book/tests/src/Kernel/Plugin/migrate/source/d6/BookTest.php
@@ -13,7 +13,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 dc8175787b..725d858ef5 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() {
     parent::setUp();
diff --git a/core/modules/ckeditor/tests/src/Functional/CKEditorAdminTest.php b/core/modules/ckeditor/tests/src/Functional/CKEditorAdminTest.php
index 1ec222746e..3b69f1867c 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'];
 
   /**
    * A user with the 'administer filters' permission.
diff --git a/core/modules/ckeditor/tests/src/Functional/CKEditorLoadingTest.php b/core/modules/ckeditor/tests/src/Functional/CKEditorLoadingTest.php
index cad0947dcf..213a417e12 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'];
 
   /**
    * An untrusted user with access to only the 'plain_text' format.
diff --git a/core/modules/ckeditor/tests/src/Functional/CKEditorStylesComboAdminTest.php b/core/modules/ckeditor/tests/src/Functional/CKEditorStylesComboAdminTest.php
index 9f41834de5..75e62feaca 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'];
 
   /**
    * A user with the 'administer filters' permission.
diff --git a/core/modules/ckeditor/tests/src/Functional/CKEditorToolbarButtonTest.php b/core/modules/ckeditor/tests/src/Functional/CKEditorToolbarButtonTest.php
index c47b67b0b4..631b10edc5 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 b15433d4f7..f95df40ea6 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 JavascriptTestBase {
   /**
    * {@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 80de46d6bc..a777411ccf 100644
--- a/core/modules/ckeditor/tests/src/FunctionalJavascript/CKEditorIntegrationTest.php
+++ b/core/modules/ckeditor/tests/src/FunctionalJavascript/CKEditorIntegrationTest.php
@@ -27,7 +27,7 @@ class CKEditorIntegrationTest extends JavascriptTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'ckeditor', 'filter'];
+  protected static $modules = ['node', 'ckeditor', 'filter'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/ckeditor/tests/src/Kernel/CKEditorPluginManagerTest.php b/core/modules/ckeditor/tests/src/Kernel/CKEditorPluginManagerTest.php
index eb02d37ada..660288ce1f 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 4f1da31834..e93796452d 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 aecc228020..afd916bb57 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 f93f3587b1..8793151b49 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'];
 
   /**
    * A user with administrative permissions.
diff --git a/core/modules/color/tests/src/Functional/ColorSafePreviewTest.php b/core/modules/color/tests/src/Functional/ColorSafePreviewTest.php
index 9f6914c996..c13a403b26 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'];
 
   /**
    * A user with administrative permissions.
diff --git a/core/modules/color/tests/src/Functional/ColorTest.php b/core/modules/color/tests/src/Functional/ColorTest.php
index de3ab69160..80d0851ce2 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'];
 
   /**
    * A user with administrative permissions.
diff --git a/core/modules/comment/tests/src/Functional/CommentActionsTest.php b/core/modules/comment/tests/src/Functional/CommentActionsTest.php
index 326749b7c0..76f5e25530 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'];
 
   /**
    * Tests comment publish and unpublish actions.
diff --git a/core/modules/comment/tests/src/Functional/CommentBlockTest.php b/core/modules/comment/tests/src/Functional/CommentBlockTest.php
index db7d1bd827..f8bdb70214 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'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/comment/tests/src/Functional/CommentBookTest.php b/core/modules/comment/tests/src/Functional/CommentBookTest.php
index 45693b57fb..118357b131 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'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/comment/tests/src/Functional/CommentFieldsTest.php b/core/modules/comment/tests/src/Functional/CommentFieldsTest.php
index 2df9973348..b2485f88ba 100644
--- a/core/modules/comment/tests/src/Functional/CommentFieldsTest.php
+++ b/core/modules/comment/tests/src/Functional/CommentFieldsTest.php
@@ -19,7 +19,7 @@ class CommentFieldsTest extends CommentTestBase {
    *
    * @var array
    */
-  public static $modules = ['field_ui'];
+  protected static $modules = ['field_ui'];
 
   /**
    * Tests that the default 'comment_body' field is correctly added.
diff --git a/core/modules/comment/tests/src/Functional/CommentLanguageTest.php b/core/modules/comment/tests/src/Functional/CommentLanguageTest.php
index ce9a9abb04..2eb750b847 100644
--- a/core/modules/comment/tests/src/Functional/CommentLanguageTest.php
+++ b/core/modules/comment/tests/src/Functional/CommentLanguageTest.php
@@ -26,7 +26,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'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/comment/tests/src/Functional/CommentLinksAlterTest.php b/core/modules/comment/tests/src/Functional/CommentLinksAlterTest.php
index e49361b651..259dd48a9c 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'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/comment/tests/src/Functional/CommentLinksTest.php b/core/modules/comment/tests/src/Functional/CommentLinksTest.php
index 3d79d96642..b9f233cb87 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'];
 
   /**
    * Tests that comment links are output and can be hidden.
diff --git a/core/modules/comment/tests/src/Functional/CommentNodeAccessTest.php b/core/modules/comment/tests/src/Functional/CommentNodeAccessTest.php
index 6842dc137f..3decbf8868 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'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/comment/tests/src/Functional/CommentNonNodeTest.php b/core/modules/comment/tests/src/Functional/CommentNonNodeTest.php
index 5889d69dee..b3cf7987cf 100644
--- a/core/modules/comment/tests/src/Functional/CommentNonNodeTest.php
+++ b/core/modules/comment/tests/src/Functional/CommentNonNodeTest.php
@@ -25,7 +25,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'];
 
   /**
    * An administrative user with permission to configure comment settings.
diff --git a/core/modules/comment/tests/src/Functional/CommentRssTest.php b/core/modules/comment/tests/src/Functional/CommentRssTest.php
index 60708bd4a8..2a56056a2f 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 d2495d3791..094f1e6003 100644
--- a/core/modules/comment/tests/src/Functional/CommentStatusFieldAccessTest.php
+++ b/core/modules/comment/tests/src/Functional/CommentStatusFieldAccessTest.php
@@ -37,7 +37,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 7cadcbffe9..bd7721215a 100644
--- a/core/modules/comment/tests/src/Functional/CommentTestBase.php
+++ b/core/modules/comment/tests/src/Functional/CommentTestBase.php
@@ -23,7 +23,7 @@
    *
    * @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 a7fe6b5e07..ad4d8e2dd4 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'];
 
   /**
    * Creates a comment, then tests the tokens generated from it.
diff --git a/core/modules/comment/tests/src/Functional/CommentTranslationUITest.php b/core/modules/comment/tests/src/Functional/CommentTranslationUITest.php
index daac938fa3..5f27f3f68b 100644
--- a/core/modules/comment/tests/src/Functional/CommentTranslationUITest.php
+++ b/core/modules/comment/tests/src/Functional/CommentTranslationUITest.php
@@ -47,7 +47,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() {
     $this->entityTypeId = 'comment';
diff --git a/core/modules/comment/tests/src/Functional/CommentUninstallTest.php b/core/modules/comment/tests/src/Functional/CommentUninstallTest.php
index 6e0c8a2b30..7779b44876 100644
--- a/core/modules/comment/tests/src/Functional/CommentUninstallTest.php
+++ b/core/modules/comment/tests/src/Functional/CommentUninstallTest.php
@@ -21,7 +21,7 @@ class CommentUninstallTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['comment', 'node'];
+  protected static $modules = ['comment', 'node'];
 
   protected function setUp() {
     parent::setup();
diff --git a/core/modules/comment/tests/src/Functional/Views/CommentFieldFilterTest.php b/core/modules/comment/tests/src/Functional/Views/CommentFieldFilterTest.php
index dabacc3bed..ec43ab73d9 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'];
 
   /**
    * Views used by this test.
diff --git a/core/modules/comment/tests/src/Functional/Views/CommentRestExportTest.php b/core/modules/comment/tests/src/Functional/Views/CommentRestExportTest.php
index 17e04b5c5c..c826e5693d 100644
--- a/core/modules/comment/tests/src/Functional/Views/CommentRestExportTest.php
+++ b/core/modules/comment/tests/src/Functional/Views/CommentRestExportTest.php
@@ -22,7 +22,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) {
     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 a9444a2320..b3995af098 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 @@
    *
    * @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 5cb9680514..2f333c4208 100644
--- a/core/modules/comment/tests/src/Functional/Views/DefaultViewRecentCommentsTest.php
+++ b/core/modules/comment/tests/src/Functional/Views/DefaultViewRecentCommentsTest.php
@@ -22,7 +22,7 @@ class DefaultViewRecentCommentsTest extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'comment', 'block'];
+  protected static $modules = ['node', 'comment', 'block'];
 
   /**
    * Number of results for the Master display.
diff --git a/core/modules/comment/tests/src/Functional/Views/NodeCommentsTest.php b/core/modules/comment/tests/src/Functional/Views/NodeCommentsTest.php
index e2c5d15ef5..ae8981a446 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'];
 
   /**
    * Views used by this test.
diff --git a/core/modules/comment/tests/src/Functional/Views/WizardTest.php b/core/modules/comment/tests/src/Functional/Views/WizardTest.php
index 62fada9fd0..1a397234c0 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'];
 
 
   /**
diff --git a/core/modules/comment/tests/src/Kernel/CommentBundlesTest.php b/core/modules/comment/tests/src/Kernel/CommentBundlesTest.php
index d907233409..b46e12f331 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 bdea71df15..6ec7323f5d 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 1e0fd72129..017e66b135 100644
--- a/core/modules/comment/tests/src/Kernel/CommentFieldAccessTest.php
+++ b/core/modules/comment/tests/src/Kernel/CommentFieldAccessTest.php
@@ -30,7 +30,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 af730346cb..c327d54051 100644
--- a/core/modules/comment/tests/src/Kernel/CommentIntegrationTest.php
+++ b/core/modules/comment/tests/src/Kernel/CommentIntegrationTest.php
@@ -21,7 +21,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 85f6112561..51e7315de9 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() {
     parent::setUp();
diff --git a/core/modules/comment/tests/src/Kernel/CommentStringIdEntitiesTest.php b/core/modules/comment/tests/src/Kernel/CommentStringIdEntitiesTest.php
index adbe1b08d5..6a8a93cc20 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 98b771513b..f28e1e433d 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 3b0674222c..b4ee03dcdc 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 2c13371fb8..2341aea0bd 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 74a871521a..be7d16c3e3 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 c9e0d6b8a6..cc4b384d4c 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 03469c4808..f0a65928ee 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 e08e2d2e20..7974cc069b 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 06ca65582e..21c0f75bff 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 = ['comment', 'menu_ui'];
+  protected static $modules = ['comment', 'menu_ui'];
 
   /**
    * {@inheritdoc}
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 2fa60826de..339d8f804b 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 aeb1e923ac..42cac7d899 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 2c3025a449..372dbcfd76 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 2f0f6f318c..271525127f 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 4b928f7a3d..4f49ac4c47 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 aa59f678f7..5d4e19b6f7 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 95717ed352..68b9f0f2d2 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 = ['filter', 'node', 'comment', 'text', 'menu_ui'];
+  protected static $modules = ['filter', 'node', 'comment', 'text', 'menu_ui'];
 
   /**
    * {@inheritdoc}
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 b0c96dab83..2eb5b41597 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 a4d91c4686..38099d1cf8 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 0372f0f9ac..e32b9d3838 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/d6/CommentVariablePerCommentTypeTest.php b/core/modules/comment/tests/src/Kernel/Plugin/migrate/source/d6/CommentVariablePerCommentTypeTest.php
index dd1b1fd06c..895ed97ebd 100644
--- a/core/modules/comment/tests/src/Kernel/Plugin/migrate/source/d6/CommentVariablePerCommentTypeTest.php
+++ b/core/modules/comment/tests/src/Kernel/Plugin/migrate/source/d6/CommentVariablePerCommentTypeTest.php
@@ -15,7 +15,7 @@ class CommentVariablePerCommentTypeTest 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/CommentVariableTest.php b/core/modules/comment/tests/src/Kernel/Plugin/migrate/source/d6/CommentVariableTest.php
index a84c776b77..74cc6b743d 100644
--- a/core/modules/comment/tests/src/Kernel/Plugin/migrate/source/d6/CommentVariableTest.php
+++ b/core/modules/comment/tests/src/Kernel/Plugin/migrate/source/d6/CommentVariableTest.php
@@ -15,7 +15,7 @@ class CommentVariableTest 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 9d9760bf90..3316543edc 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/Plugin/migrate/source/d7/CommentTypeTest.php b/core/modules/comment/tests/src/Kernel/Plugin/migrate/source/d7/CommentTypeTest.php
index 11f3db5842..6355c16005 100644
--- a/core/modules/comment/tests/src/Kernel/Plugin/migrate/source/d7/CommentTypeTest.php
+++ b/core/modules/comment/tests/src/Kernel/Plugin/migrate/source/d7/CommentTypeTest.php
@@ -15,7 +15,7 @@ class CommentTypeTest 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 86e8949905..fc8d21cc63 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 08a326dde4..99ba9646d4 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 2fb8c74570..47c3aac00d 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 1ca5e43971..89c93c6458 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 516750382c..e112b8a129 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 @@
    *
    * @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_collection_install_test/config/install/another_collection/config_collection_install_test.test.yml b/core/modules/config/tests/config_collection_install_test/config/install/another_collection/config_collection_install_test.test.yml
index 8ea5dd5fdb..0337f93d07 100644
--- a/core/modules/config/tests/config_collection_install_test/config/install/another_collection/config_collection_install_test.test.yml
+++ b/core/modules/config/tests/config_collection_install_test/config/install/another_collection/config_collection_install_test.test.yml
@@ -1 +1 @@
-collection: another_collection
\ No newline at end of file
+collection: another_collection
diff --git a/core/modules/config/tests/config_collection_install_test/config/install/collection/test1/config_collection_install_test.test.yml b/core/modules/config/tests/config_collection_install_test/config/install/collection/test1/config_collection_install_test.test.yml
index fbfa8175b2..8bdebee002 100644
--- a/core/modules/config/tests/config_collection_install_test/config/install/collection/test1/config_collection_install_test.test.yml
+++ b/core/modules/config/tests/config_collection_install_test/config/install/collection/test1/config_collection_install_test.test.yml
@@ -1 +1 @@
-collection: collection.test1
\ No newline at end of file
+collection: collection.test1
diff --git a/core/modules/config/tests/config_collection_install_test/config/install/collection/test2/config_collection_install_test.test.yml b/core/modules/config/tests/config_collection_install_test/config/install/collection/test2/config_collection_install_test.test.yml
index 9cb93aeb5f..b5ae44c661 100644
--- a/core/modules/config/tests/config_collection_install_test/config/install/collection/test2/config_collection_install_test.test.yml
+++ b/core/modules/config/tests/config_collection_install_test/config/install/collection/test2/config_collection_install_test.test.yml
@@ -1 +1 @@
-collection: collection.test2
\ No newline at end of file
+collection: collection.test2
diff --git a/core/modules/config/tests/config_test_language/config_test_language.info.yml b/core/modules/config/tests/config_test_language/config_test_language.info.yml
index 527270f646..c688bc4912 100644
--- a/core/modules/config/tests/config_test_language/config_test_language.info.yml
+++ b/core/modules/config/tests/config_test_language/config_test_language.info.yml
@@ -4,4 +4,4 @@ package: Testing
 version: VERSION
 core: 8.x
 dependencies:
-  - config_test
\ No newline at end of file
+  - config_test
diff --git a/core/modules/config/tests/src/Functional/CacheabilityMetadataConfigOverrideIntegrationTest.php b/core/modules/config/tests/src/Functional/CacheabilityMetadataConfigOverrideIntegrationTest.php
index f2f8730a02..f263255bd7 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 696a36e8cb..052a2452d5 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'];
 
   /**
    * Tests ConfigDependencyDeleteFormTrait.
diff --git a/core/modules/config/tests/src/Functional/ConfigDraggableListBuilderTest.php b/core/modules/config/tests/src/Functional/ConfigDraggableListBuilderTest.php
index 74829359a1..8a604491dd 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'];
 
   /**
    * Test draggable lists.
diff --git a/core/modules/config/tests/src/Functional/ConfigEntityFormOverrideTest.php b/core/modules/config/tests/src/Functional/ConfigEntityFormOverrideTest.php
index a4dc92c78a..6e83d16ab9 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'];
 
   /**
    * Tests that overrides do not affect forms or listing screens.
diff --git a/core/modules/config/tests/src/Functional/ConfigEntityListMultilingualTest.php b/core/modules/config/tests/src/Functional/ConfigEntityListMultilingualTest.php
index 7c5fa1fac1..8f16b1ec4a 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 ae9be133f6..3f9b2dfd34 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 af68f33bdc..4da9f8c751 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'];
 
   /**
    * Tests status operations.
diff --git a/core/modules/config/tests/src/Functional/ConfigEntityTest.php b/core/modules/config/tests/src/Functional/ConfigEntityTest.php
index 4eb0744f94..a8689d5687 100644
--- a/core/modules/config/tests/src/Functional/ConfigEntityTest.php
+++ b/core/modules/config/tests/src/Functional/ConfigEntityTest.php
@@ -27,7 +27,7 @@ class ConfigEntityTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['config_test'];
+  protected static $modules = ['config_test'];
 
   /**
    * Tests CRUD operations.
diff --git a/core/modules/config/tests/src/Functional/ConfigExportImportUITest.php b/core/modules/config/tests/src/Functional/ConfigExportImportUITest.php
index 96a80a606f..c21a08ba06 100644
--- a/core/modules/config/tests/src/Functional/ConfigExportImportUITest.php
+++ b/core/modules/config/tests/src/Functional/ConfigExportImportUITest.php
@@ -67,7 +67,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 d92071e89d..4370dd0c4d 100644
--- a/core/modules/config/tests/src/Functional/ConfigExportUITest.php
+++ b/core/modules/config/tests/src/Functional/ConfigExportUITest.php
@@ -18,7 +18,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 8b0787d6ee..190157c460 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'];
 
   /**
    * A user with the 'synchronize configuration' permission.
diff --git a/core/modules/config/tests/src/Functional/ConfigImportUITest.php b/core/modules/config/tests/src/Functional/ConfigImportUITest.php
index fd76990da6..4bb9463590 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'];
 
   /**
    * A user with the 'synchronize configuration' permission.
diff --git a/core/modules/config/tests/src/Functional/ConfigImportUploadTest.php b/core/modules/config/tests/src/Functional/ConfigImportUploadTest.php
index 6f6659d743..a1add2d636 100644
--- a/core/modules/config/tests/src/Functional/ConfigImportUploadTest.php
+++ b/core/modules/config/tests/src/Functional/ConfigImportUploadTest.php
@@ -26,7 +26,7 @@ class ConfigImportUploadTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['config'];
+  protected static $modules = ['config'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/config/tests/src/Functional/ConfigLanguageOverrideWebTest.php b/core/modules/config/tests/src/Functional/ConfigLanguageOverrideWebTest.php
index 092ad2b377..1035b87d59 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 4170e250be..63cc804a37 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 6c4e1bb311..db5c45ce99 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'];
 
   /**
    * Tests that overrides do not affect language-negotiation form values.
diff --git a/core/modules/config/tests/src/Functional/SchemaConfigListenerWebTest.php b/core/modules/config/tests/src/Functional/SchemaConfigListenerWebTest.php
index 189d78fc63..35270be09f 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'];
 
   /**
    * Tests \Drupal\Core\Config\Development\ConfigSchemaChecker.
diff --git a/core/modules/config/tests/src/FunctionalJavascript/ConfigEntityTest.php b/core/modules/config/tests/src/FunctionalJavascript/ConfigEntityTest.php
index 110c9f894e..9e2bc32952 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 JavascriptTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['config_test'];
+  protected static $modules = ['config_test'];
 
   /**
    * Tests ajax operations through the UI on 'Add' page.
diff --git a/core/modules/config_translation/tests/src/Functional/ConfigTranslationCacheTest.php b/core/modules/config_translation/tests/src/Functional/ConfigTranslationCacheTest.php
index 0def24a490..40fcc70126 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 95af49eea9..8fb5103736 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/ConfigTranslationFormTest.php b/core/modules/config_translation/tests/src/Functional/ConfigTranslationFormTest.php
index 4698b05a8e..aad24041ff 100644
--- a/core/modules/config_translation/tests/src/Functional/ConfigTranslationFormTest.php
+++ b/core/modules/config_translation/tests/src/Functional/ConfigTranslationFormTest.php
@@ -17,7 +17,7 @@ class ConfigTranslationFormTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['config_translation', 'config_translation_test', 'editor'];
+  protected static $modules = ['config_translation', 'config_translation_test', 'editor'];
 
   /**
    * The plugin ID of the mapper to test.
diff --git a/core/modules/config_translation/tests/src/Functional/ConfigTranslationListUiTest.php b/core/modules/config_translation/tests/src/Functional/ConfigTranslationListUiTest.php
index 586d197579..123a23d5fd 100644
--- a/core/modules/config_translation/tests/src/Functional/ConfigTranslationListUiTest.php
+++ b/core/modules/config_translation/tests/src/Functional/ConfigTranslationListUiTest.php
@@ -26,7 +26,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 9ccbb135d2..19e41f481e 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 1d8d859588..3638034e91 100644
--- a/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiTest.php
+++ b/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiTest.php
@@ -30,7 +30,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 dcfb7916fe..609674283c 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'];
 
   /**
    * Languages to enable.
diff --git a/core/modules/config_translation/tests/src/Functional/ConfigTranslationViewListUiTest.php b/core/modules/config_translation/tests/src/Functional/ConfigTranslationViewListUiTest.php
index edb41f9ad4..f035d46dbf 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'];
 
   protected function setUp($import_test_views = TRUE) {
     parent::setUp($import_test_views);
diff --git a/core/modules/config_translation/tests/src/FunctionalJavascript/ConfigTranslationUiTest.php b/core/modules/config_translation/tests/src/FunctionalJavascript/ConfigTranslationUiTest.php
index 13e1b545c2..94461fffc1 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 JavascriptTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'config_translation',
     'contextual',
     'node',
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 37cd4a9ec2..781f3a767b 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 = ['language', 'config_translation'];
+  protected static $modules = ['language', 'config_translation'];
 
   /**
    * {@inheritdoc}
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 326e1bb7e4..02f32fe046 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 = ['language', 'config_translation'];
+  protected static $modules = ['language', 'config_translation'];
 
   /**
    * {@inheritdoc}
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 bc622e1b6a..919dc2f4a5 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 = ['language', 'locale', 'config_translation'];
+  protected static $modules = ['language', 'locale', 'config_translation'];
 
   /**
    * {@inheritdoc}
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 01d5ec929d..b9973bad09 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 = ['config_translation', 'locale', 'language', 'field'];
+  protected static $modules = ['config_translation', 'locale', 'language', 'field'];
 
   /**
    * Tests migration of translated user profile fields.
diff --git a/core/modules/config_translation/tests/src/Kernel/Plugin/migrate/source/d6/I18nProfileFieldTest.php b/core/modules/config_translation/tests/src/Kernel/Plugin/migrate/source/d6/I18nProfileFieldTest.php
index b783accf97..0aa45ff7ce 100644
--- a/core/modules/config_translation/tests/src/Kernel/Plugin/migrate/source/d6/I18nProfileFieldTest.php
+++ b/core/modules/config_translation/tests/src/Kernel/Plugin/migrate/source/d6/I18nProfileFieldTest.php
@@ -16,7 +16,7 @@ class I18nProfileFieldTest 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/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 02cdd9909c..fd6b92ac5d 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 0c34884503..79e1f791a3 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 8304d7c7e5..41f3f16fb7 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'];
 
   /**
    * A user with some administrative permissions.
diff --git a/core/modules/contact/tests/src/Functional/ContactSitewideTest.php b/core/modules/contact/tests/src/Functional/ContactSitewideTest.php
index 178a3ad01d..0afe5931c8 100644
--- a/core/modules/contact/tests/src/Functional/ContactSitewideTest.php
+++ b/core/modules/contact/tests/src/Functional/ContactSitewideTest.php
@@ -28,7 +28,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 acacab4182..c9a8b1a65d 100644
--- a/core/modules/contact/tests/src/Functional/ContactStorageTest.php
+++ b/core/modules/contact/tests/src/Functional/ContactStorageTest.php
@@ -23,7 +23,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/Views/ContactFieldsTest.php b/core/modules/contact/tests/src/Functional/Views/ContactFieldsTest.php
index c66b5ad5d4..397d24de01 100644
--- a/core/modules/contact/tests/src/Functional/Views/ContactFieldsTest.php
+++ b/core/modules/contact/tests/src/Functional/Views/ContactFieldsTest.php
@@ -19,7 +19,7 @@ class ContactFieldsTest extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = ['field', 'text', 'contact'];
+  protected static $modules = ['field', 'text', 'contact'];
 
   /**
    * Contains the field storage definition for contact used for this test.
diff --git a/core/modules/contact/tests/src/Functional/Views/ContactLinkTest.php b/core/modules/contact/tests/src/Functional/Views/ContactLinkTest.php
index c3b68f067a..7057d92ff7 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'];
 
   /**
    * Views used by this test.
diff --git a/core/modules/contact/tests/src/Kernel/MessageEntityTest.php b/core/modules/contact/tests/src/Kernel/MessageEntityTest.php
index e7343b9166..de556c0dc0 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 ffadad409c..6eabda280f 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 073a670283..afadb04fc5 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 22385f0e56..b94cdf0446 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 619e0cd10b..1ea9b337f2 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 72ea7f2694..5abac5aee7 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/ContentModerationWorkflowTypeTest.php b/core/modules/content_moderation/tests/src/Functional/ContentModerationWorkflowTypeTest.php
index 195718a6fe..88c917072b 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',
   ];
diff --git a/core/modules/content_moderation/tests/src/Functional/ModeratedContentViewTest.php b/core/modules/content_moderation/tests/src/Functional/ModeratedContentViewTest.php
index 7891b60f58..51231c0d64 100644
--- a/core/modules/content_moderation/tests/src/Functional/ModeratedContentViewTest.php
+++ b/core/modules/content_moderation/tests/src/Functional/ModeratedContentViewTest.php
@@ -22,7 +22,7 @@ class ModeratedContentViewTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['content_moderation', 'node', 'views'];
+  protected static $modules = ['content_moderation', 'node', 'views'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/content_moderation/tests/src/Functional/ModerationActionsTest.php b/core/modules/content_moderation/tests/src/Functional/ModerationActionsTest.php
index 32d10fa045..962c24b908 100644
--- a/core/modules/content_moderation/tests/src/Functional/ModerationActionsTest.php
+++ b/core/modules/content_moderation/tests/src/Functional/ModerationActionsTest.php
@@ -21,7 +21,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/ModerationFormTest.php b/core/modules/content_moderation/tests/src/Functional/ModerationFormTest.php
index 4b483584e4..c7ffbb180f 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 28de50c535..5b83504845 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 703c10ff79..5a59f894db 100644
--- a/core/modules/content_moderation/tests/src/Functional/ModerationRevisionRevertTest.php
+++ b/core/modules/content_moderation/tests/src/Functional/ModerationRevisionRevertTest.php
@@ -20,7 +20,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 74c457b0bf..e7db44f682 100644
--- a/core/modules/content_moderation/tests/src/Functional/ModerationStateAccessTest.php
+++ b/core/modules/content_moderation/tests/src/Functional/ModerationStateAccessTest.php
@@ -17,7 +17,7 @@ class ModerationStateAccessTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'content_moderation_test_views',
     'content_moderation',
   ];
diff --git a/core/modules/content_moderation/tests/src/Functional/ModerationStateTestBase.php b/core/modules/content_moderation/tests/src/Functional/ModerationStateTestBase.php
index 5ee72ee2ad..b8d5a5ba1b 100644
--- a/core/modules/content_moderation/tests/src/Functional/ModerationStateTestBase.php
+++ b/core/modules/content_moderation/tests/src/Functional/ModerationStateTestBase.php
@@ -50,7 +50,7 @@
    *
    * @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 76e9d97608..4c31760e4f 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 e5b296d7f4..4bf277ca35 100644
--- a/core/modules/content_moderation/tests/src/Functional/ViewsModerationStateFilterTest.php
+++ b/core/modules/content_moderation/tests/src/Functional/ViewsModerationStateFilterTest.php
@@ -20,7 +20,7 @@ class ViewsModerationStateFilterTest extends ViewTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'content_moderation_test_views',
     'node',
     'content_moderation',
diff --git a/core/modules/content_moderation/tests/src/Kernel/ContentModerationPermissionsTest.php b/core/modules/content_moderation/tests/src/Kernel/ContentModerationPermissionsTest.php
index f17e4ac83c..ba78fc5ebb 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 4d10672ada..f308f1f9b3 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 2ea1d8f901..c7538c1266 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 af59651410..c82369e009 100644
--- a/core/modules/content_moderation/tests/src/Kernel/ContentModerationStateStorageSchemaTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/ContentModerationStateStorageSchemaTest.php
@@ -19,7 +19,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/ContentModerationStateTest.php b/core/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php
index dfdaaa10fe..5f5e27b67e 100644
--- a/core/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php
@@ -24,7 +24,7 @@ class ContentModerationStateTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'entity_test',
     'node',
     'block',
diff --git a/core/modules/content_moderation/tests/src/Kernel/ContentModerationWorkflowConfigTest.php b/core/modules/content_moderation/tests/src/Kernel/ContentModerationWorkflowConfigTest.php
index 931056e3d6..9d53402281 100644
--- a/core/modules/content_moderation/tests/src/Kernel/ContentModerationWorkflowConfigTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/ContentModerationWorkflowConfigTest.php
@@ -18,7 +18,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 e10756cf56..b0582d5b9a 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 84bade4578..f53c9f2588 100644
--- a/core/modules/content_moderation/tests/src/Kernel/DefaultRevisionStateTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/DefaultRevisionStateTest.php
@@ -18,7 +18,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 63f2c9a732..084ddb811d 100644
--- a/core/modules/content_moderation/tests/src/Kernel/EntityOperationsTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/EntityOperationsTest.php
@@ -17,7 +17,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/EntityRevisionConverterTest.php b/core/modules/content_moderation/tests/src/Kernel/EntityRevisionConverterTest.php
index 69eee60d1a..2f8709f72a 100644
--- a/core/modules/content_moderation/tests/src/Kernel/EntityRevisionConverterTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/EntityRevisionConverterTest.php
@@ -16,7 +16,7 @@ class EntityRevisionConverterTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'user',
     'system',
     'content_moderation',
diff --git a/core/modules/content_moderation/tests/src/Kernel/EntityStateChangeValidationTest.php b/core/modules/content_moderation/tests/src/Kernel/EntityStateChangeValidationTest.php
index aeed8486f5..89b4debefc 100644
--- a/core/modules/content_moderation/tests/src/Kernel/EntityStateChangeValidationTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/EntityStateChangeValidationTest.php
@@ -17,7 +17,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 a5791c8840..5be628b1ee 100644
--- a/core/modules/content_moderation/tests/src/Kernel/EntityTypeInfoTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/EntityTypeInfoTest.php
@@ -18,7 +18,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 3db6a662ce..6c2a528f8c 100644
--- a/core/modules/content_moderation/tests/src/Kernel/InitialStateTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/InitialStateTest.php
@@ -18,7 +18,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 a313bc9c31..96ea828bd7 100644
--- a/core/modules/content_moderation/tests/src/Kernel/ModerationInformationTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/ModerationInformationTest.php
@@ -15,7 +15,7 @@ class ModerationInformationTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['content_moderation', 'entity_test', 'user', 'workflows'];
+  protected static $modules = ['content_moderation', 'entity_test', 'user', 'workflows'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/content_moderation/tests/src/Kernel/ModerationStateFieldItemListTest.php b/core/modules/content_moderation/tests/src/Kernel/ModerationStateFieldItemListTest.php
index 7d95054f0c..063864e9c4 100644
--- a/core/modules/content_moderation/tests/src/Kernel/ModerationStateFieldItemListTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/ModerationStateFieldItemListTest.php
@@ -17,7 +17,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 c40e753953..14534d3ac4 100644
--- a/core/modules/content_moderation/tests/src/Kernel/ModerationStateWidgetTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/ModerationStateWidgetTest.php
@@ -21,7 +21,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 6716ca3610..27ad51b345 100644
--- a/core/modules/content_moderation/tests/src/Kernel/NodeAccessTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/NodeAccessTest.php
@@ -28,7 +28,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 c32123df92..58f0dea585 100644
--- a/core/modules/content_moderation/tests/src/Kernel/StateFormatterTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/StateFormatterTest.php
@@ -19,7 +19,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 00e107295a..024a6f7d93 100644
--- a/core/modules/content_moderation/tests/src/Kernel/ViewsDataIntegrationTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/ViewsDataIntegrationTest.php
@@ -18,7 +18,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 da7ac9299d..d985ee4c83 100644
--- a/core/modules/content_moderation/tests/src/Kernel/ViewsModerationStateFilterTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/ViewsModerationStateFilterTest.php
@@ -22,7 +22,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_translation/tests/src/Functional/ContentTestTranslationUITest.php b/core/modules/content_translation/tests/src/Functional/ContentTestTranslationUITest.php
index 0b1de0b204..93f2eb1aca 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 b85c3aad5d..83c856264c 100644
--- a/core/modules/content_translation/tests/src/Functional/ContentTranslationContextualLinksTest.php
+++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationContextualLinksTest.php
@@ -47,7 +47,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 6dffed7444..d78b76f042 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 a3cc4e9946..797bcfbf97 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'];
 
   /**
    * Tests that entity schemas are up-to-date after enabling translation.
diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationEntityBundleUITest.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationEntityBundleUITest.php
index 163b5e8ff3..422ccb7299 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'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationLanguageChangeTest.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationLanguageChangeTest.php
index ae326ef67b..7e987acb6e 100644
--- a/core/modules/content_translation/tests/src/Functional/ContentTranslationLanguageChangeTest.php
+++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationLanguageChangeTest.php
@@ -17,7 +17,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 8ea652e954..0c8170d470 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'];
 
   /**
    * The added languages.
diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationMetadataFieldsTest.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationMetadataFieldsTest.php
index bbad25ca9c..a3350f3ed7 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 2ec190d64b..15a7fe7f73 100644
--- a/core/modules/content_translation/tests/src/Functional/ContentTranslationOperationsTest.php
+++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationOperationsTest.php
@@ -32,7 +32,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/ContentTranslationSettingsTest.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationSettingsTest.php
index f15a8f9bc8..7c606298d2 100644
--- a/core/modules/content_translation/tests/src/Functional/ContentTranslationSettingsTest.php
+++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationSettingsTest.php
@@ -24,7 +24,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'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationStandardFieldsTest.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationStandardFieldsTest.php
index c6a72a325e..19e02eda65 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 5f7c9fd9b8..4910ef4a77 100644
--- a/core/modules/content_translation/tests/src/Functional/ContentTranslationSyncImageTest.php
+++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationSyncImageTest.php
@@ -38,7 +38,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() {
     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 d3e81a6b4a..f4ce8e99c5 100644
--- a/core/modules/content_translation/tests/src/Functional/ContentTranslationTestBase.php
+++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationTestBase.php
@@ -18,7 +18,7 @@
    *
    * @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 77c176e78e..b7e9a3545d 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'];
 
   /**
    * Tests the content_translation_ui_skip key functionality.
diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationUntranslatableFieldsTest.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationUntranslatableFieldsTest.php
index 31431e6763..27fdea854d 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 ContentTranslationTestB
    *
    * @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/ContentTranslationWorkflowsTest.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationWorkflowsTest.php
index 759bd6dbba..ff9f7d8273 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'];
 
   protected function setUp() {
     parent::setUp();
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 4b4d53a484..d713c60687 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'];
 
   /**
    * Tests the views UI.
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 d2e9e0d0cb..d75201ea5f 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'];
 
   protected function setUp() {
     // @todo Use entity_type once it is has multilingual Views integration.
diff --git a/core/modules/content_translation/tests/src/FunctionalJavascript/ContentTranslationContextualLinksTest.php b/core/modules/content_translation/tests/src/FunctionalJavascript/ContentTranslationContextualLinksTest.php
index b095399195..40572a2e10 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 JavascriptTestBase {
   /**
    * {@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 b8776a26a1..2a5b0e47ee 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 dcd596ecf3..571a5c8de0 100644
--- a/core/modules/content_translation/tests/src/Kernel/ContentTranslationEntityBundleInfoTest.php
+++ b/core/modules/content_translation/tests/src/Kernel/ContentTranslationEntityBundleInfoTest.php
@@ -16,7 +16,7 @@ class ContentTranslationEntityBundleInfoTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['user', 'language', 'content_translation_test', 'content_translation', 'entity_test'];
+  protected static $modules = ['user', 'language', 'content_translation_test', 'content_translation', 'entity_test'];
 
   /**
    * The content translation manager.
diff --git a/core/modules/content_translation/tests/src/Kernel/ContentTranslationFieldSyncRevisionTest.php b/core/modules/content_translation/tests/src/Kernel/ContentTranslationFieldSyncRevisionTest.php
index 8185182516..6c67c42400 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', 'simpletest', 'content_translation_test'];
+  protected static $modules = ['file', 'image', 'language', 'content_translation', 'simpletest', '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 3626045fbf..40a7220a67 100644
--- a/core/modules/content_translation/tests/src/Kernel/ContentTranslationSettingsApiTest.php
+++ b/core/modules/content_translation/tests/src/Kernel/ContentTranslationSettingsApiTest.php
@@ -16,7 +16,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 5c4784aa62..d09b80abed 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() {
     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 57d7ccc5cf..8a33433b04 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/contextual/tests/src/FunctionalJavascript/ContextualLinksTest.php b/core/modules/contextual/tests/src/FunctionalJavascript/ContextualLinksTest.php
index de83692411..74321844d0 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 JavascriptTestBase {
   /**
    * {@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 a61ea8a3d7..e051325b66 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 JavascriptTestBase {
   /**
    * {@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 f42bf20f80..c75fb5d077 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/DateTestBase.php b/core/modules/datetime/tests/src/Functional/DateTestBase.php
index 21bad50ba0..b6f81a8de2 100644
--- a/core/modules/datetime/tests/src/Functional/DateTestBase.php
+++ b/core/modules/datetime/tests/src/Functional/DateTestBase.php
@@ -21,7 +21,7 @@
    *
    * @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 to pass to entity_get_display()
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 1051ce45ff..3216ac8731 100644
--- a/core/modules/datetime/tests/src/Functional/EntityResource/EntityTest/EntityTestDateonlyTest.php
+++ b/core/modules/datetime/tests/src/Functional/EntityResource/EntityTest/EntityTestDateonlyTest.php
@@ -37,7 +37,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 ffce48c340..6c1d66fb58 100644
--- a/core/modules/datetime/tests/src/Functional/EntityResource/EntityTest/EntityTestDatetimeTest.php
+++ b/core/modules/datetime/tests/src/Functional/EntityResource/EntityTest/EntityTestDatetimeTest.php
@@ -37,7 +37,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/Kernel/DateTimeFormInjectionTest.php b/core/modules/datetime/tests/src/Kernel/DateTimeFormInjectionTest.php
index a65d43928e..77c0d04c68 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 75f892a254..90768ffc1f 100644
--- a/core/modules/datetime/tests/src/Kernel/DateTimeItemTest.php
+++ b/core/modules/datetime/tests/src/Kernel/DateTimeItemTest.php
@@ -37,7 +37,7 @@ class DateTimeItemTest extends FieldKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['datetime'];
+  protected static $modules = ['datetime'];
 
   protected function setUp() {
     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 20a3542319..3972c26eb2 100644
--- a/core/modules/datetime/tests/src/Kernel/Views/DateTimeHandlerTestBase.php
+++ b/core/modules/datetime/tests/src/Kernel/Views/DateTimeHandlerTestBase.php
@@ -17,7 +17,7 @@
   /**
    * {@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 bd83b980e7..09e7843b73 100644
--- a/core/modules/datetime_range/tests/src/Functional/DateRangeFieldTest.php
+++ b/core/modules/datetime_range/tests/src/Functional/DateRangeFieldTest.php
@@ -26,7 +26,7 @@ class DateRangeFieldTest extends DateTestBase {
    *
    * @var array
    */
-  public static $modules = ['datetime_range'];
+  protected static $modules = ['datetime_range'];
 
   /**
    * The default display settings to use for the formatters.
diff --git a/core/modules/datetime_range/tests/src/Kernel/DateRangeItemTest.php b/core/modules/datetime_range/tests/src/Kernel/DateRangeItemTest.php
index 54f805ffd3..82f5c4769e 100644
--- a/core/modules/datetime_range/tests/src/Kernel/DateRangeItemTest.php
+++ b/core/modules/datetime_range/tests/src/Kernel/DateRangeItemTest.php
@@ -34,7 +34,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 155bb61d10..f8201942b2 100644
--- a/core/modules/datetime_range/tests/src/Kernel/SeparatorTranslationTest.php
+++ b/core/modules/datetime_range/tests/src/Kernel/SeparatorTranslationTest.php
@@ -36,7 +36,7 @@ class SeparatorTranslationTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'datetime',
     'datetime_range',
     'entity_test',
diff --git a/core/modules/dblog/tests/src/Functional/ConnectionFailureTest.php b/core/modules/dblog/tests/src/Functional/ConnectionFailureTest.php
index 37c855ae2c..0b951b6a56 100644
--- a/core/modules/dblog/tests/src/Functional/ConnectionFailureTest.php
+++ b/core/modules/dblog/tests/src/Functional/ConnectionFailureTest.php
@@ -12,7 +12,7 @@
  */
 class ConnectionFailureTest extends BrowserTestBase {
 
-  public static $modules = ['dblog'];
+  protected static $modules = ['dblog'];
 
   /**
    * Tests logging of connection failures.
diff --git a/core/modules/dblog/tests/src/Functional/DbLogResourceTest.php b/core/modules/dblog/tests/src/Functional/DbLogResourceTest.php
index 0d4630318e..624a567e95 100644
--- a/core/modules/dblog/tests/src/Functional/DbLogResourceTest.php
+++ b/core/modules/dblog/tests/src/Functional/DbLogResourceTest.php
@@ -39,7 +39,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 5b82282d6a..6fa8eb881e 100644
--- a/core/modules/dblog/tests/src/Functional/DbLogTest.php
+++ b/core/modules/dblog/tests/src/Functional/DbLogTest.php
@@ -24,7 +24,7 @@ class DbLogTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['dblog', 'node', 'forum', 'help', 'block'];
+  protected static $modules = ['dblog', 'node', 'forum', 'help', 'block'];
 
   /**
    * A user with some relevant administrative permissions.
diff --git a/core/modules/dblog/tests/src/Functional/DbLogViewsTest.php b/core/modules/dblog/tests/src/Functional/DbLogViewsTest.php
index d04d9ba154..62d580d903 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 ce7490f32e..26267c4b01 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() {
     parent::setUp();
diff --git a/core/modules/dblog/tests/src/Kernel/DbLogFormInjectionTest.php b/core/modules/dblog/tests/src/Kernel/DbLogFormInjectionTest.php
index 48ed39616e..31e1db253a 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 73a6d83d22..1e0cfd3b5a 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 d9708309b2..ba94f66027 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 67d693fb8b..ecf3843cb1 100644
--- a/core/modules/dblog/tests/src/Kernel/Views/ViewsIntegrationTest.php
+++ b/core/modules/dblog/tests/src/Kernel/Views/ViewsIntegrationTest.php
@@ -25,7 +25,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/EditorDialogAccessTest.php b/core/modules/editor/tests/src/Functional/EditorDialogAccessTest.php
index 3a97b351b3..06c3b9c860 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'];
 
   /**
    * Test access to the editor image dialog.
diff --git a/core/modules/editor/tests/src/Functional/EditorPrivateFileReferenceFilterTest.php b/core/modules/editor/tests/src/Functional/EditorPrivateFileReferenceFilterTest.php
index 816de5d6e4..0d5c75f322 100644
--- a/core/modules/editor/tests/src/Functional/EditorPrivateFileReferenceFilterTest.php
+++ b/core/modules/editor/tests/src/Functional/EditorPrivateFileReferenceFilterTest.php
@@ -19,7 +19,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/Kernel/EditorFileReferenceFilterTest.php b/core/modules/editor/tests/src/Kernel/EditorFileReferenceFilterTest.php
index a70a232aa8..adc3e0b061 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 aac665d61b..89ea85f4ac 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() {
     parent::setUp();
diff --git a/core/modules/editor/tests/src/Kernel/EditorFilterIntegrationTest.php b/core/modules/editor/tests/src/Kernel/EditorFilterIntegrationTest.php
index 30f36e5a72..ede2b00e91 100644
--- a/core/modules/editor/tests/src/Kernel/EditorFilterIntegrationTest.php
+++ b/core/modules/editor/tests/src/Kernel/EditorFilterIntegrationTest.php
@@ -17,7 +17,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 6500d1adef..9b59d400fb 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 d1d6eafa18..f40f649072 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 276f559225..ab0dc8ae36 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 af3ffc7d9b..b9aec206ad 100644
--- a/core/modules/field/tests/src/Functional/Boolean/BooleanFieldTest.php
+++ b/core/modules/field/tests/src/Functional/Boolean/BooleanFieldTest.php
@@ -20,7 +20,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/EntityReference/EntityReferenceAutoCreateTest.php b/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceAutoCreateTest.php
index 1e6511fd68..0d0bd59d92 100644
--- a/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceAutoCreateTest.php
+++ b/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceAutoCreateTest.php
@@ -20,7 +20,7 @@ class EntityReferenceAutoCreateTest extends BrowserTestBase {
 
   use EntityReferenceTestTrait;
 
-  public static $modules = ['node', 'taxonomy'];
+  protected static $modules = ['node', 'taxonomy'];
 
   /**
    * The name of a content type that will reference $referencedType.
diff --git a/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceFieldDefaultValueTest.php b/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceFieldDefaultValueTest.php
index 4567bd07e9..7d587e9f95 100644
--- a/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceFieldDefaultValueTest.php
+++ b/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceFieldDefaultValueTest.php
@@ -23,7 +23,7 @@ class EntityReferenceFieldDefaultValueTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['field_ui', 'node'];
+  protected static $modules = ['field_ui', 'node'];
 
   /**
    * A user with permission to administer content types, node fields, etc.
diff --git a/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceFieldTranslatedReferenceViewTest.php b/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceFieldTranslatedReferenceViewTest.php
index 7ded590c6a..01b908621e 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/EntityReferenceIntegrationTest.php b/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceIntegrationTest.php
index 940ad376f6..01d0d997ef 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/EntityReference/Views/SelectionTest.php b/core/modules/field/tests/src/Functional/EntityReference/Views/SelectionTest.php
index cfb5ecf084..02514ecbd0 100644
--- a/core/modules/field/tests/src/Functional/EntityReference/Views/SelectionTest.php
+++ b/core/modules/field/tests/src/Functional/EntityReference/Views/SelectionTest.php
@@ -14,7 +14,7 @@
  */
 class SelectionTest extends BrowserTestBase {
 
-  public static $modules = ['node', 'views', 'entity_reference_test', 'entity_test'];
+  protected static $modules = ['node', 'views', 'entity_reference_test', 'entity_test'];
 
   /**
    * Nodes for testing.
diff --git a/core/modules/field/tests/src/Functional/FieldAccessTest.php b/core/modules/field/tests/src/Functional/FieldAccessTest.php
index c7f234fd49..a7e4f7c36d 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'];
 
   /**
    * Node entity to use in this test.
diff --git a/core/modules/field/tests/src/Functional/FieldHelpTest.php b/core/modules/field/tests/src/Functional/FieldHelpTest.php
index 9a6ff67820..fc457045e1 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'];
 
   // Tests field help implementation without optional core modules enabled.
   protected $profile = 'minimal';
diff --git a/core/modules/field/tests/src/Functional/TranslationWebTest.php b/core/modules/field/tests/src/Functional/TranslationWebTest.php
index 19af64d917..475af79922 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'];
 
   /**
    * The name of the field to use in this test.
diff --git a/core/modules/field/tests/src/FunctionalJavascript/FormJSAddMoreTest.php b/core/modules/field/tests/src/FunctionalJavascript/FormJSAddMoreTest.php
index 64ee24d469..494bd7fc4f 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 JavascriptTestBase {
   /**
    * {@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 94f5bc6c30..c6c389e99b 100644
--- a/core/modules/field/tests/src/Kernel/Boolean/BooleanFormatterTest.php
+++ b/core/modules/field/tests/src/Kernel/Boolean/BooleanFormatterTest.php
@@ -22,7 +22,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 3cbf63eb19..556c7890c0 100644
--- a/core/modules/field/tests/src/Kernel/DisplayApiTest.php
+++ b/core/modules/field/tests/src/Kernel/DisplayApiTest.php
@@ -59,7 +59,7 @@ class DisplayApiTest extends FieldKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system'];
+  protected static $modules = ['system'];
 
   protected function setUp() {
     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 05db0dc5cc..3ad6a9a57f 100644
--- a/core/modules/field/tests/src/Kernel/Entity/Update/SqlContentEntityStorageSchemaColumnTest.php
+++ b/core/modules/field/tests/src/Kernel/Entity/Update/SqlContentEntityStorageSchemaColumnTest.php
@@ -18,7 +18,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 c0e58e04e9..04b0b9d993 100644
--- a/core/modules/field/tests/src/Kernel/EntityReference/EntityReferenceItemTest.php
+++ b/core/modules/field/tests/src/Kernel/EntityReference/EntityReferenceItemTest.php
@@ -38,7 +38,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 2f8f13df8d..916749c4e7 100644
--- a/core/modules/field/tests/src/Kernel/EntityReference/EntityReferenceSettingsTest.php
+++ b/core/modules/field/tests/src/Kernel/EntityReference/EntityReferenceSettingsTest.php
@@ -24,7 +24,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 095e4bd8d8..11799bfb4a 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 afd468a5da..018aed2114 100644
--- a/core/modules/field/tests/src/Kernel/FieldDefinitionIntegrityTest.php
+++ b/core/modules/field/tests/src/Kernel/FieldDefinitionIntegrityTest.php
@@ -21,7 +21,7 @@ class FieldDefinitionIntegrityTest extends KernelTestBase {
   /**
    * @var array
    */
-  public static $modules = ['system'];
+  protected static $modules = ['system'];
 
   /**
    * Tests the integrity of field plugin definitions.
diff --git a/core/modules/field/tests/src/Kernel/FieldImportChangeTest.php b/core/modules/field/tests/src/Kernel/FieldImportChangeTest.php
index 9b8391961e..a8aac0d87a 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 f3408a52a0..6773423635 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 c3a4d3c1d5..9ef64616c1 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() {
     parent::setUp();
diff --git a/core/modules/field/tests/src/Kernel/FieldKernelTestBase.php b/core/modules/field/tests/src/Kernel/FieldKernelTestBase.php
index 96e77cf159..6cff9b9e95 100644
--- a/core/modules/field/tests/src/Kernel/FieldKernelTestBase.php
+++ b/core/modules/field/tests/src/Kernel/FieldKernelTestBase.php
@@ -19,7 +19,7 @@
    *
    * @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 a24bedb640..b5024d0ec2 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 7bf3ad5418..27a5478aad 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'];
+  protected static $modules = ['menu_ui'];
 
   /**
    * {@inheritdoc}
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 6c4e29c4be..67d56d7c3d 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'];
+  protected static $modules = ['menu_ui'];
 
   /**
    * Tests migration of file variables to file.settings.yml.
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 6e8e040d94..2bbec24f53 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 576e86a795..89a575bd89 100644
--- a/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldFormatterSettingsTest.php
+++ b/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldFormatterSettingsTest.php
@@ -17,7 +17,7 @@
  */
 class MigrateFieldFormatterSettingsTest extends MigrateDrupal7TestBase {
 
-  public static $modules = [
+  protected static $modules = [
     'comment',
     'datetime',
     'file',
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 24d4116f66..feb0c64969 100644
--- a/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceTest.php
+++ b/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceTest.php
@@ -20,7 +20,7 @@ class MigrateFieldInstanceTest extends MigrateDrupal7TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'comment',
     'datetime',
     'file',
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 ee4d204af3..284cb36c69 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',
     'field',
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 6531fe4d40..ca118dd5f0 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 0a7e9dcc0d..27deaeccbc 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'];
+  protected static $modules = ['comment', 'node', 'taxonomy'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/field/tests/src/Kernel/Number/NumberItemTest.php b/core/modules/field/tests/src/Kernel/Number/NumberItemTest.php
index ba47d91307..d885a038a5 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() {
     parent::setUp();
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 a4ef2f6e6b..b1c2a6a070 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 baea562ee7..e46d00b15c 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 bfbddcaef5..2fd757f771 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/FieldTest.php b/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldTest.php
index 06026414a0..e83d05e7c4 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/FieldInstancePerFormDisplayTest.php b/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/FieldInstancePerFormDisplayTest.php
index 0663b91092..12745e95a4 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 e3faee4e31..1c65c8a7cd 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 895fe3f66f..3011ed83c2 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/FieldTest.php b/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/FieldTest.php
index f904429d89..6be4de53d2 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 deab0668c9..15f6a4c521 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 80ab04f3a9..181e479c92 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 1000d64078..030ba2de16 100644
--- a/core/modules/field/tests/src/Kernel/String/RawStringFormatterTest.php
+++ b/core/modules/field/tests/src/Kernel/String/RawStringFormatterTest.php
@@ -23,7 +23,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 b09eb58c09..95c129362e 100644
--- a/core/modules/field/tests/src/Kernel/String/StringFormatterTest.php
+++ b/core/modules/field/tests/src/Kernel/String/StringFormatterTest.php
@@ -23,7 +23,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'];
 
   /**
    * @var string
diff --git a/core/modules/field/tests/src/Kernel/String/UuidFormatterTest.php b/core/modules/field/tests/src/Kernel/String/UuidFormatterTest.php
index 0eeb778076..4059cc6eb2 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 73a99486b6..a17401e3d9 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 d1a269a6a2..896cd5a108 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 1ac87fc3b7..0d5824030c 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 f71be314ab..8b36ca6e71 100644
--- a/core/modules/field/tests/src/Kernel/Timestamp/TimestampFormatterTest.php
+++ b/core/modules/field/tests/src/Kernel/Timestamp/TimestampFormatterTest.php
@@ -21,7 +21,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 124fd94da0..e69786321b 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 9bab0b5431..01bc31346a 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 162d22329c..f929a86c8b 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 JavascriptTestBase {
   /**
    * {@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 78764fb32d..720087ed18 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'];
+  protected static $modules = ['block', 'entity_test', 'field_ui'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/field_ui/tests/src/Functional/EntityDisplayTest.php b/core/modules/field_ui/tests/src/Functional/EntityDisplayTest.php
index c9cfc052ab..b9f7540449 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/FieldUIIndentationTest.php b/core/modules/field_ui/tests/src/Functional/FieldUIIndentationTest.php
index 1f66c9a772..b5d43c8464 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 fe7a27011c..0eb75e918e 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/ManageFieldsTest.php b/core/modules/field_ui/tests/src/Functional/ManageFieldsTest.php
index 1c21b069b4..a4566abe1b 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 ae2c56c954..264065040e 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 JavascriptTestBase {
   /**
    * {@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/Kernel/EntityDisplayTest.php b/core/modules/field_ui/tests/src/Kernel/EntityDisplayTest.php
index 2d02e44a55..43338ce85b 100644
--- a/core/modules/field_ui/tests/src/Kernel/EntityDisplayTest.php
+++ b/core/modules/field_ui/tests/src/Kernel/EntityDisplayTest.php
@@ -29,7 +29,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() {
     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 09d2a20114..78e430c5b2 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() {
     parent::setUp();
diff --git a/core/modules/file/tests/src/Functional/FileFieldTestBase.php b/core/modules/file/tests/src/Functional/FileFieldTestBase.php
index f3d1c22b46..c37e328685 100644
--- a/core/modules/file/tests/src/Functional/FileFieldTestBase.php
+++ b/core/modules/file/tests/src/Functional/FileFieldTestBase.php
@@ -20,7 +20,7 @@
   *
   * @var array
   */
-  public static $modules = ['node', 'file', 'file_module_test', 'field_ui'];
+  protected static $modules = ['node', 'file', 'file_module_test', 'field_ui'];
 
   /**
    * An user with administration permissions.
diff --git a/core/modules/file/tests/src/Functional/FileManagedTestBase.php b/core/modules/file/tests/src/Functional/FileManagedTestBase.php
index e0da7d1a00..a15e666326 100644
--- a/core/modules/file/tests/src/Functional/FileManagedTestBase.php
+++ b/core/modules/file/tests/src/Functional/FileManagedTestBase.php
@@ -17,7 +17,7 @@
    *
    * @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/FunctionalJavascript/MaximumFileSizeExceededUploadTest.php b/core/modules/file/tests/src/FunctionalJavascript/MaximumFileSizeExceededUploadTest.php
index 7ccd2b2187..6aa749a753 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 JavascriptTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'file'];
+  protected static $modules = ['node', 'file'];
 
   /**
    * The file system service.
diff --git a/core/modules/file/tests/src/Kernel/AccessTest.php b/core/modules/file/tests/src/Kernel/AccessTest.php
index cfd8e56838..5ca2aaae45 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 ac6cd8899f..2df20ef7e2 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 c9a247bf40..f065e8c4fe 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 7c43e9bfd0..d2952b44c9 100644
--- a/core/modules/file/tests/src/Kernel/FileManagedUnitTestBase.php
+++ b/core/modules/file/tests/src/Kernel/FileManagedUnitTestBase.php
@@ -18,7 +18,7 @@
    *
    * @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/Formatter/FileEntityFormatterTest.php b/core/modules/file/tests/src/Kernel/Formatter/FileEntityFormatterTest.php
index 743da8026e..a9234cb5eb 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 296508637b..9864ef9dc4 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 200dc8617a..33e813dada 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 36e9f1da20..a3cc6e5a27 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 9ea8cce424..dd01b69851 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 84bd4eb087..9bd3449e0a 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 b8075030bd..6e87ad9cbd 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 = ['language', 'menu_ui'];
+  protected static $modules = ['language', 'menu_ui'];
 
   /**
    * {@inheritdoc}
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 88d7c79e55..3052d1cb0f 100644
--- a/core/modules/file/tests/src/Kernel/Migrate/d7/MigrateFileTest.php
+++ b/core/modules/file/tests/src/Kernel/Migrate/d7/MigrateFileTest.php
@@ -15,7 +15,7 @@ class MigrateFileTest extends MigrateDrupal7TestBase {
 
   use FileMigrationSetupTrait;
 
-  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 7b6f763208..22a0e650bb 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 cc8c9b36fa..4b6ac3d994 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 711b36fec3..e2d34b4f08 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 1f950b40cd..7d5a6cfa2c 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 8ae0ec41fa..425a0d3c48 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 867ab7aaa1..ffed1eda96 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 18a6f51143..d714bff77e 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/filter.url-input.txt b/core/modules/filter/tests/filter.url-input.txt
index 92289dcfd1..028a58c1e5 100644
--- a/core/modules/filter/tests/filter.url-input.txt
+++ b/core/modules/filter/tests/filter.url-input.txt
@@ -36,4 +36,4 @@ The old URL filter has problems with <a title="kind of link www.example.com with
  inside a comment containing newlines and 
 <em>html</em> tags.</p> -->
 
-This is the end!
\ No newline at end of file
+This is the end!
diff --git a/core/modules/filter/tests/filter.url-output.txt b/core/modules/filter/tests/filter.url-output.txt
index 814a4ed717..8abcca8dfc 100644
--- a/core/modules/filter/tests/filter.url-output.txt
+++ b/core/modules/filter/tests/filter.url-output.txt
@@ -36,4 +36,4 @@ The old URL filter has problems with <a title="kind of link www.example.com with
  inside a comment containing newlines and 
 <em>html</em> tags.</p> -->
 
-This is the end!
\ No newline at end of file
+This is the end!
diff --git a/core/modules/filter/tests/src/Functional/FilterAdminTest.php b/core/modules/filter/tests/src/Functional/FilterAdminTest.php
index a6e429304e..8053be1136 100644
--- a/core/modules/filter/tests/src/Functional/FilterAdminTest.php
+++ b/core/modules/filter/tests/src/Functional/FilterAdminTest.php
@@ -21,7 +21,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'];
 
   /**
    * An user with administration permissions.
diff --git a/core/modules/filter/tests/src/Functional/FilterCaptionTwigDebugTest.php b/core/modules/filter/tests/src/Functional/FilterCaptionTwigDebugTest.php
index f5423e7dd7..1f05c7fcb4 100644
--- a/core/modules/filter/tests/src/Functional/FilterCaptionTwigDebugTest.php
+++ b/core/modules/filter/tests/src/Functional/FilterCaptionTwigDebugTest.php
@@ -18,7 +18,7 @@ class FilterCaptionTwigDebugTest extends BrowserTestBase {
    *
    * @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/Functional/FilterDefaultFormatTest.php b/core/modules/filter/tests/src/Functional/FilterDefaultFormatTest.php
index 45c3711711..bf2832defa 100644
--- a/core/modules/filter/tests/src/Functional/FilterDefaultFormatTest.php
+++ b/core/modules/filter/tests/src/Functional/FilterDefaultFormatTest.php
@@ -18,7 +18,7 @@ class FilterDefaultFormatTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['filter'];
+  protected static $modules = ['filter'];
 
   /**
    * Tests if the default text format is accessible to users.
diff --git a/core/modules/filter/tests/src/Functional/FilterFormatAccessTest.php b/core/modules/filter/tests/src/Functional/FilterFormatAccessTest.php
index 8c3394bdbf..827caf2e0d 100644
--- a/core/modules/filter/tests/src/Functional/FilterFormatAccessTest.php
+++ b/core/modules/filter/tests/src/Functional/FilterFormatAccessTest.php
@@ -20,7 +20,7 @@ class FilterFormatAccessTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['block', 'filter', 'node'];
+  protected static $modules = ['block', 'filter', 'node'];
 
   /**
    * A user with administrative permissions.
diff --git a/core/modules/filter/tests/src/Functional/FilterHooksTest.php b/core/modules/filter/tests/src/Functional/FilterHooksTest.php
index 5ff4a8a487..6a0081b1c4 100644
--- a/core/modules/filter/tests/src/Functional/FilterHooksTest.php
+++ b/core/modules/filter/tests/src/Functional/FilterHooksTest.php
@@ -18,7 +18,7 @@ class FilterHooksTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'filter_test'];
+  protected static $modules = ['node', 'filter_test'];
 
   /**
    * Tests hooks on format management.
diff --git a/core/modules/filter/tests/src/Functional/FilterHtmlImageSecureTest.php b/core/modules/filter/tests/src/Functional/FilterHtmlImageSecureTest.php
index 065d4a6f79..36c79eef16 100644
--- a/core/modules/filter/tests/src/Functional/FilterHtmlImageSecureTest.php
+++ b/core/modules/filter/tests/src/Functional/FilterHtmlImageSecureTest.php
@@ -23,7 +23,7 @@ class FilterHtmlImageSecureTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['filter', 'node', 'comment'];
+  protected static $modules = ['filter', 'node', 'comment'];
 
   /**
    * An authenticated user.
diff --git a/core/modules/filter/tests/src/Functional/FilterNoFormatTest.php b/core/modules/filter/tests/src/Functional/FilterNoFormatTest.php
index 19c57ac00f..f81ff22070 100644
--- a/core/modules/filter/tests/src/Functional/FilterNoFormatTest.php
+++ b/core/modules/filter/tests/src/Functional/FilterNoFormatTest.php
@@ -16,7 +16,7 @@ class FilterNoFormatTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['filter'];
+  protected static $modules = ['filter'];
 
   /**
    * Tests text without format.
diff --git a/core/modules/filter/tests/src/Functional/FilterSecurityTest.php b/core/modules/filter/tests/src/Functional/FilterSecurityTest.php
index 4a5b7c49d2..8ffbced6f3 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'];
 
   /**
    * A user with administrative permissions.
diff --git a/core/modules/filter/tests/src/Kernel/FilterAPITest.php b/core/modules/filter/tests/src/Kernel/FilterAPITest.php
index f74edbbcac..d221056c44 100644
--- a/core/modules/filter/tests/src/Kernel/FilterAPITest.php
+++ b/core/modules/filter/tests/src/Kernel/FilterAPITest.php
@@ -19,7 +19,7 @@
  */
 class FilterAPITest extends EntityKernelTestBase {
 
-  public static $modules = ['system', 'filter', 'filter_test', 'user'];
+  protected static $modules = ['system', 'filter', 'filter_test', 'user'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/filter/tests/src/Kernel/FilterCrudTest.php b/core/modules/filter/tests/src/Kernel/FilterCrudTest.php
index b73b180bfe..b544bcbea8 100644
--- a/core/modules/filter/tests/src/Kernel/FilterCrudTest.php
+++ b/core/modules/filter/tests/src/Kernel/FilterCrudTest.php
@@ -17,7 +17,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 e16bddade5..57e5ea5982 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() {
     parent::setUp();
diff --git a/core/modules/filter/tests/src/Kernel/FilterKernelTest.php b/core/modules/filter/tests/src/Kernel/FilterKernelTest.php
index 7b0c029b1b..be1c4035c0 100644
--- a/core/modules/filter/tests/src/Kernel/FilterKernelTest.php
+++ b/core/modules/filter/tests/src/Kernel/FilterKernelTest.php
@@ -22,7 +22,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/FilterSettingsTest.php b/core/modules/filter/tests/src/Kernel/FilterSettingsTest.php
index f77efac85a..047d7d63ef 100644
--- a/core/modules/filter/tests/src/Kernel/FilterSettingsTest.php
+++ b/core/modules/filter/tests/src/Kernel/FilterSettingsTest.php
@@ -17,7 +17,7 @@ class FilterSettingsTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['filter'];
+  protected static $modules = ['filter'];
 
   /**
    * Tests explicit and implicit default settings for filters.
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 0f54245c1a..ac661763a0 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 e58861dc03..7d27269b75 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 e18b3a904d..e22bb03e37 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
@@ -19,7 +19,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 a3e708b7b9..18448d1f6e 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 2dc9ce7c51..d2a2d48b5f 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 8fca62e965..d4c8ed7c05 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 b231f6d0ea..d5105189e3 100644
--- a/core/modules/forum/tests/src/Functional/ForumBlockTest.php
+++ b/core/modules/forum/tests/src/Functional/ForumBlockTest.php
@@ -18,7 +18,7 @@ class ForumBlockTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['forum', 'block'];
+  protected static $modules = ['forum', 'block'];
 
   /**
    * A user with various administrative privileges.
diff --git a/core/modules/forum/tests/src/Functional/ForumIndexTest.php b/core/modules/forum/tests/src/Functional/ForumIndexTest.php
index 5d0ccdff3a..0fa3f7a670 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'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/forum/tests/src/Functional/ForumNodeAccessTest.php b/core/modules/forum/tests/src/Functional/ForumNodeAccessTest.php
index 9849084c6c..9902fa88a7 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'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/forum/tests/src/Functional/ForumTest.php b/core/modules/forum/tests/src/Functional/ForumTest.php
index 9ba4be7b2a..8aeb722890 100644
--- a/core/modules/forum/tests/src/Functional/ForumTest.php
+++ b/core/modules/forum/tests/src/Functional/ForumTest.php
@@ -25,7 +25,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'];
 
   /**
    * A user with various administrative privileges.
diff --git a/core/modules/forum/tests/src/Functional/ForumUninstallTest.php b/core/modules/forum/tests/src/Functional/ForumUninstallTest.php
index c2d3848ffc..8b6bd4b647 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'];
 
   /**
    * Tests if forum module uninstallation properly deletes the field.
diff --git a/core/modules/forum/tests/src/Functional/Views/ForumIntegrationTest.php b/core/modules/forum/tests/src/Functional/Views/ForumIntegrationTest.php
index 19c000012d..c5d5f65717 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'];
 
   /**
    * Views used by this test.
diff --git a/core/modules/forum/tests/src/Kernel/ForumValidationTest.php b/core/modules/forum/tests/src/Kernel/ForumValidationTest.php
index 9b9661b5a2..2bbac72825 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 302c3d1aee..2bbc742e3c 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 6f5d48c1dd..d71441c142 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 cd1c7fc3ea..891f3ae580 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/Functional/EntityResource/Action/ActionHalJsonAnonTest.php b/core/modules/hal/tests/src/Functional/EntityResource/Action/ActionHalJsonAnonTest.php
index 0eae86630e..55d78fe4eb 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/Action/ActionHalJsonAnonTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/Action/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/hal/tests/src/Functional/EntityResource/Action/ActionHalJsonBasicAuthTest.php b/core/modules/hal/tests/src/Functional/EntityResource/Action/ActionHalJsonBasicAuthTest.php
index 5a43a5d9f4..7dcbdab971 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/Action/ActionHalJsonBasicAuthTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/Action/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/hal/tests/src/Functional/EntityResource/Action/ActionHalJsonCookieTest.php b/core/modules/hal/tests/src/Functional/EntityResource/Action/ActionHalJsonCookieTest.php
index 21f08c580f..583400d7db 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/Action/ActionHalJsonCookieTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/Action/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/hal/tests/src/Functional/EntityResource/BaseFieldOverride/BaseFieldOverrideHalJsonAnonTest.php b/core/modules/hal/tests/src/Functional/EntityResource/BaseFieldOverride/BaseFieldOverrideHalJsonAnonTest.php
index 552437a401..8fa1ce0e4e 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/BaseFieldOverride/BaseFieldOverrideHalJsonAnonTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/BaseFieldOverride/BaseFieldOverrideHalJsonAnonTest.php
@@ -15,7 +15,7 @@ class BaseFieldOverrideHalJsonAnonTest extends BaseFieldOverrideResourceTestBase
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/hal/tests/src/Functional/EntityResource/BaseFieldOverride/BaseFieldOverrideHalJsonBasicAuthTest.php b/core/modules/hal/tests/src/Functional/EntityResource/BaseFieldOverride/BaseFieldOverrideHalJsonBasicAuthTest.php
index ba2249e52c..92aee8f052 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/BaseFieldOverride/BaseFieldOverrideHalJsonBasicAuthTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/BaseFieldOverride/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/modules/hal/tests/src/Functional/EntityResource/BaseFieldOverride/BaseFieldOverrideHalJsonCookieTest.php b/core/modules/hal/tests/src/Functional/EntityResource/BaseFieldOverride/BaseFieldOverrideHalJsonCookieTest.php
index b05f15332b..cd771a44be 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/BaseFieldOverride/BaseFieldOverrideHalJsonCookieTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/BaseFieldOverride/BaseFieldOverrideHalJsonCookieTest.php
@@ -15,7 +15,7 @@ class BaseFieldOverrideHalJsonCookieTest extends BaseFieldOverrideResourceTestBa
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/hal/tests/src/Functional/EntityResource/Block/BlockHalJsonAnonTest.php b/core/modules/hal/tests/src/Functional/EntityResource/Block/BlockHalJsonAnonTest.php
index d0563c0da2..bb3cc22ca9 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/Block/BlockHalJsonAnonTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/Block/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/hal/tests/src/Functional/EntityResource/Block/BlockHalJsonBasicAuthTest.php b/core/modules/hal/tests/src/Functional/EntityResource/Block/BlockHalJsonBasicAuthTest.php
index 53bcd3e197..0230b9b84f 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/Block/BlockHalJsonBasicAuthTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/Block/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/hal/tests/src/Functional/EntityResource/Block/BlockHalJsonCookieTest.php b/core/modules/hal/tests/src/Functional/EntityResource/Block/BlockHalJsonCookieTest.php
index 494bb4fe8d..ef5c2f81bf 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/Block/BlockHalJsonCookieTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/Block/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/hal/tests/src/Functional/EntityResource/BlockContent/BlockContentHalJsonAnonTest.php b/core/modules/hal/tests/src/Functional/EntityResource/BlockContent/BlockContentHalJsonAnonTest.php
index d4ee9ab0e1..6e477d9b1c 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/BlockContent/BlockContentHalJsonAnonTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/BlockContent/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/hal/tests/src/Functional/EntityResource/BlockContent/BlockContentHalJsonBasicAuthTest.php b/core/modules/hal/tests/src/Functional/EntityResource/BlockContent/BlockContentHalJsonBasicAuthTest.php
index 94d3ff4ec5..58d8303c7d 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/BlockContent/BlockContentHalJsonBasicAuthTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/BlockContent/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/hal/tests/src/Functional/EntityResource/BlockContentType/BlockContentTypeHalJsonAnonTest.php b/core/modules/hal/tests/src/Functional/EntityResource/BlockContentType/BlockContentTypeHalJsonAnonTest.php
index 006f8fb544..bbfde79069 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/BlockContentType/BlockContentTypeHalJsonAnonTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/BlockContentType/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/hal/tests/src/Functional/EntityResource/BlockContentType/BlockContentTypeHalJsonBasicAuthTest.php b/core/modules/hal/tests/src/Functional/EntityResource/BlockContentType/BlockContentTypeHalJsonBasicAuthTest.php
index 7d392cc319..8f5fb2703b 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/BlockContentType/BlockContentTypeHalJsonBasicAuthTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/BlockContentType/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/hal/tests/src/Functional/EntityResource/BlockContentType/BlockContentTypeHalJsonCookieTest.php b/core/modules/hal/tests/src/Functional/EntityResource/BlockContentType/BlockContentTypeHalJsonCookieTest.php
index 565bcf3d75..ee5a4dba2b 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/BlockContentType/BlockContentTypeHalJsonCookieTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/BlockContentType/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/hal/tests/src/Functional/EntityResource/Comment/CommentHalJsonBasicAuthTest.php b/core/modules/hal/tests/src/Functional/EntityResource/Comment/CommentHalJsonBasicAuthTest.php
index 7e2dc57cd1..051aca58a2 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/Comment/CommentHalJsonBasicAuthTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/Comment/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/hal/tests/src/Functional/EntityResource/Comment/CommentHalJsonTestBase.php b/core/modules/hal/tests/src/Functional/EntityResource/Comment/CommentHalJsonTestBase.php
index 3deb0eaba5..1fa6f8d0db 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/Comment/CommentHalJsonTestBase.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/Comment/CommentHalJsonTestBase.php
@@ -14,7 +14,7 @@
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/hal/tests/src/Functional/EntityResource/CommentType/CommentTypeHalJsonAnonTest.php b/core/modules/hal/tests/src/Functional/EntityResource/CommentType/CommentTypeHalJsonAnonTest.php
index 37cf717580..805165024d 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/CommentType/CommentTypeHalJsonAnonTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/CommentType/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/hal/tests/src/Functional/EntityResource/CommentType/CommentTypeHalJsonBasicAuthTest.php b/core/modules/hal/tests/src/Functional/EntityResource/CommentType/CommentTypeHalJsonBasicAuthTest.php
index 62b48afd30..0c0f119506 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/CommentType/CommentTypeHalJsonBasicAuthTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/CommentType/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/hal/tests/src/Functional/EntityResource/CommentType/CommentTypeHalJsonCookieTest.php b/core/modules/hal/tests/src/Functional/EntityResource/CommentType/CommentTypeHalJsonCookieTest.php
index 4a2913be3c..db42ef4781 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/CommentType/CommentTypeHalJsonCookieTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/CommentType/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/hal/tests/src/Functional/EntityResource/ConfigTest/ConfigTestHalJsonAnonTest.php b/core/modules/hal/tests/src/Functional/EntityResource/ConfigTest/ConfigTestHalJsonAnonTest.php
index dbe2a3d8c5..c615fed9c6 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/ConfigTest/ConfigTestHalJsonAnonTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/ConfigTest/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/hal/tests/src/Functional/EntityResource/ConfigTest/ConfigTestHalJsonBasicAuthTest.php b/core/modules/hal/tests/src/Functional/EntityResource/ConfigTest/ConfigTestHalJsonBasicAuthTest.php
index 99345ede79..4ec377187e 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/ConfigTest/ConfigTestHalJsonBasicAuthTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/ConfigTest/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/hal/tests/src/Functional/EntityResource/ConfigTest/ConfigTestHalJsonCookieTest.php b/core/modules/hal/tests/src/Functional/EntityResource/ConfigTest/ConfigTestHalJsonCookieTest.php
index d892abf5e6..ca7e7af095 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/ConfigTest/ConfigTestHalJsonCookieTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/ConfigTest/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/hal/tests/src/Functional/EntityResource/ConfigurableLanguage/ConfigurableLanguageHalJsonAnonTest.php b/core/modules/hal/tests/src/Functional/EntityResource/ConfigurableLanguage/ConfigurableLanguageHalJsonAnonTest.php
index 4152a5f2ad..96994e212c 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/ConfigurableLanguage/ConfigurableLanguageHalJsonAnonTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/ConfigurableLanguage/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/hal/tests/src/Functional/EntityResource/ConfigurableLanguage/ConfigurableLanguageHalJsonBasicAuthTest.php b/core/modules/hal/tests/src/Functional/EntityResource/ConfigurableLanguage/ConfigurableLanguageHalJsonBasicAuthTest.php
index dea13fcfe6..fee929624a 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/ConfigurableLanguage/ConfigurableLanguageHalJsonBasicAuthTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/ConfigurableLanguage/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/hal/tests/src/Functional/EntityResource/ConfigurableLanguage/ConfigurableLanguageHalJsonCookieTest.php b/core/modules/hal/tests/src/Functional/EntityResource/ConfigurableLanguage/ConfigurableLanguageHalJsonCookieTest.php
index 357adc0267..09da781b04 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/ConfigurableLanguage/ConfigurableLanguageHalJsonCookieTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/ConfigurableLanguage/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/hal/tests/src/Functional/EntityResource/ContactForm/ContactFormHalJsonAnonTest.php b/core/modules/hal/tests/src/Functional/EntityResource/ContactForm/ContactFormHalJsonAnonTest.php
index 57d6177922..40186c231e 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/ContactForm/ContactFormHalJsonAnonTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/ContactForm/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/hal/tests/src/Functional/EntityResource/ContactForm/ContactFormHalJsonBasicAuthTest.php b/core/modules/hal/tests/src/Functional/EntityResource/ContactForm/ContactFormHalJsonBasicAuthTest.php
index 9aec186e15..8a426f702b 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/ContactForm/ContactFormHalJsonBasicAuthTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/ContactForm/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/hal/tests/src/Functional/EntityResource/ContactForm/ContactFormHalJsonCookieTest.php b/core/modules/hal/tests/src/Functional/EntityResource/ContactForm/ContactFormHalJsonCookieTest.php
index 0d78991f95..14ddba586a 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/ContactForm/ContactFormHalJsonCookieTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/ContactForm/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/hal/tests/src/Functional/EntityResource/ContentLanguageSettings/ContentLanguageSettingsHalJsonAnonTest.php b/core/modules/hal/tests/src/Functional/EntityResource/ContentLanguageSettings/ContentLanguageSettingsHalJsonAnonTest.php
index e90485d30c..3339084d9d 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/ContentLanguageSettings/ContentLanguageSettingsHalJsonAnonTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/ContentLanguageSettings/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/hal/tests/src/Functional/EntityResource/ContentLanguageSettings/ContentLanguageSettingsHalJsonBasicAuthTest.php b/core/modules/hal/tests/src/Functional/EntityResource/ContentLanguageSettings/ContentLanguageSettingsHalJsonBasicAuthTest.php
index 71f4fabcb6..4e35ce990c 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/ContentLanguageSettings/ContentLanguageSettingsHalJsonBasicAuthTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/ContentLanguageSettings/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/hal/tests/src/Functional/EntityResource/ContentLanguageSettings/ContentLanguageSettingsHalJsonCookieTest.php b/core/modules/hal/tests/src/Functional/EntityResource/ContentLanguageSettings/ContentLanguageSettingsHalJsonCookieTest.php
index 4cc572f11e..edfb2a67c3 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/ContentLanguageSettings/ContentLanguageSettingsHalJsonCookieTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/ContentLanguageSettings/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/hal/tests/src/Functional/EntityResource/DateFormat/DateFormatHalJsonAnonTest.php b/core/modules/hal/tests/src/Functional/EntityResource/DateFormat/DateFormatHalJsonAnonTest.php
index 1bd6eb803c..954d4b19e5 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/DateFormat/DateFormatHalJsonAnonTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/DateFormat/DateFormatHalJsonAnonTest.php
@@ -15,7 +15,7 @@ class DateFormatHalJsonAnonTest extends DateFormatResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/hal/tests/src/Functional/EntityResource/DateFormat/DateFormatHalJsonBasicAuthTest.php b/core/modules/hal/tests/src/Functional/EntityResource/DateFormat/DateFormatHalJsonBasicAuthTest.php
index 2627c99dbb..62a2fb176d 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/DateFormat/DateFormatHalJsonBasicAuthTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/DateFormat/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/modules/hal/tests/src/Functional/EntityResource/DateFormat/DateFormatHalJsonCookieTest.php b/core/modules/hal/tests/src/Functional/EntityResource/DateFormat/DateFormatHalJsonCookieTest.php
index 2367d6c0fa..3df03ec8e1 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/DateFormat/DateFormatHalJsonCookieTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/DateFormat/DateFormatHalJsonCookieTest.php
@@ -15,7 +15,7 @@ class DateFormatHalJsonCookieTest extends DateFormatResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/hal/tests/src/Functional/EntityResource/Editor/EditorHalJsonAnonTest.php b/core/modules/hal/tests/src/Functional/EntityResource/Editor/EditorHalJsonAnonTest.php
index 9b68c54f34..bc450b3b98 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/Editor/EditorHalJsonAnonTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/Editor/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/hal/tests/src/Functional/EntityResource/Editor/EditorHalJsonBasicAuthTest.php b/core/modules/hal/tests/src/Functional/EntityResource/Editor/EditorHalJsonBasicAuthTest.php
index 9a317a52fd..09003f7bb3 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/Editor/EditorHalJsonBasicAuthTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/Editor/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/hal/tests/src/Functional/EntityResource/Editor/EditorHalJsonCookieTest.php b/core/modules/hal/tests/src/Functional/EntityResource/Editor/EditorHalJsonCookieTest.php
index a59392fe9d..9f8ad6a9a8 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/Editor/EditorHalJsonCookieTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/Editor/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/hal/tests/src/Functional/EntityResource/EntityFormDisplay/EntityFormDisplayHalJsonAnonTest.php b/core/modules/hal/tests/src/Functional/EntityResource/EntityFormDisplay/EntityFormDisplayHalJsonAnonTest.php
index 199d0c2889..417bf8a556 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/EntityFormDisplay/EntityFormDisplayHalJsonAnonTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/EntityFormDisplay/EntityFormDisplayHalJsonAnonTest.php
@@ -15,7 +15,7 @@ class EntityFormDisplayHalJsonAnonTest extends EntityFormDisplayResourceTestBase
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/hal/tests/src/Functional/EntityResource/EntityFormDisplay/EntityFormDisplayHalJsonBasicAuthTest.php b/core/modules/hal/tests/src/Functional/EntityResource/EntityFormDisplay/EntityFormDisplayHalJsonBasicAuthTest.php
index 7e1bc51ada..66686d7b2c 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/EntityFormDisplay/EntityFormDisplayHalJsonBasicAuthTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/EntityFormDisplay/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/modules/hal/tests/src/Functional/EntityResource/EntityFormDisplay/EntityFormDisplayHalJsonCookieTest.php b/core/modules/hal/tests/src/Functional/EntityResource/EntityFormDisplay/EntityFormDisplayHalJsonCookieTest.php
index 5c62956d88..97e7b1e3ad 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/EntityFormDisplay/EntityFormDisplayHalJsonCookieTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/EntityFormDisplay/EntityFormDisplayHalJsonCookieTest.php
@@ -15,7 +15,7 @@ class EntityFormDisplayHalJsonCookieTest extends EntityFormDisplayResourceTestBa
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/hal/tests/src/Functional/EntityResource/EntityFormMode/EntityFormModeHalJsonAnonTest.php b/core/modules/hal/tests/src/Functional/EntityResource/EntityFormMode/EntityFormModeHalJsonAnonTest.php
index 3e99823749..8d0bf8056c 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/EntityFormMode/EntityFormModeHalJsonAnonTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/EntityFormMode/EntityFormModeHalJsonAnonTest.php
@@ -15,7 +15,7 @@ class EntityFormModeHalJsonAnonTest extends EntityFormModeResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/hal/tests/src/Functional/EntityResource/EntityFormMode/EntityFormModeHalJsonBasicAuthTest.php b/core/modules/hal/tests/src/Functional/EntityResource/EntityFormMode/EntityFormModeHalJsonBasicAuthTest.php
index 56d452553a..b1427de34a 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/EntityFormMode/EntityFormModeHalJsonBasicAuthTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/EntityFormMode/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/modules/hal/tests/src/Functional/EntityResource/EntityFormMode/EntityFormModeHalJsonCookieTest.php b/core/modules/hal/tests/src/Functional/EntityResource/EntityFormMode/EntityFormModeHalJsonCookieTest.php
index a84bf6d16c..df5eada991 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/EntityFormMode/EntityFormModeHalJsonCookieTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/EntityFormMode/EntityFormModeHalJsonCookieTest.php
@@ -15,7 +15,7 @@ class EntityFormModeHalJsonCookieTest extends EntityFormModeResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/hal/tests/src/Functional/EntityResource/EntityTest/EntityTestHalJsonAnonTest.php b/core/modules/hal/tests/src/Functional/EntityResource/EntityTest/EntityTestHalJsonAnonTest.php
index eff0b97e8c..7e84b37bc5 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/EntityTest/EntityTestHalJsonAnonTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/EntityTest/EntityTestHalJsonAnonTest.php
@@ -20,7 +20,7 @@ class EntityTestHalJsonAnonTest extends EntityTestResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/hal/tests/src/Functional/EntityResource/EntityTest/EntityTestHalJsonBasicAuthTest.php b/core/modules/hal/tests/src/Functional/EntityResource/EntityTest/EntityTestHalJsonBasicAuthTest.php
index 65ad0db630..97a291bd05 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/EntityTest/EntityTestHalJsonBasicAuthTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/EntityTest/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/hal/tests/src/Functional/EntityResource/EntityTest/EntityTestHalJsonInternalPropertyNormalizerTest.php b/core/modules/hal/tests/src/Functional/EntityResource/EntityTest/EntityTestHalJsonInternalPropertyNormalizerTest.php
index 819a125f82..5ee71468da 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/EntityTest/EntityTestHalJsonInternalPropertyNormalizerTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/EntityTest/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/hal/tests/src/Functional/EntityResource/EntityTestBundle/EntityTestBundleHalJsonAnonTest.php b/core/modules/hal/tests/src/Functional/EntityResource/EntityTestBundle/EntityTestBundleHalJsonAnonTest.php
index 9e6bcb3065..d0f06fe630 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/EntityTestBundle/EntityTestBundleHalJsonAnonTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/EntityTestBundle/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/hal/tests/src/Functional/EntityResource/EntityTestBundle/EntityTestBundleHalJsonBasicAuthTest.php b/core/modules/hal/tests/src/Functional/EntityResource/EntityTestBundle/EntityTestBundleHalJsonBasicAuthTest.php
index 09e5970890..400b48a926 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/EntityTestBundle/EntityTestBundleHalJsonBasicAuthTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/EntityTestBundle/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/hal/tests/src/Functional/EntityResource/EntityTestBundle/EntityTestBundleHalJsonCookieTest.php b/core/modules/hal/tests/src/Functional/EntityResource/EntityTestBundle/EntityTestBundleHalJsonCookieTest.php
index 7f499fa016..76ea300b66 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/EntityTestBundle/EntityTestBundleHalJsonCookieTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/EntityTestBundle/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/hal/tests/src/Functional/EntityResource/EntityTestLabel/EntityTestLabelHalJsonAnonTest.php b/core/modules/hal/tests/src/Functional/EntityResource/EntityTestLabel/EntityTestLabelHalJsonAnonTest.php
index f95ea5ce06..2acb76061a 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/EntityTestLabel/EntityTestLabelHalJsonAnonTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/EntityTestLabel/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/hal/tests/src/Functional/EntityResource/EntityTestLabel/EntityTestLabelHalJsonBasicAuthTest.php b/core/modules/hal/tests/src/Functional/EntityResource/EntityTestLabel/EntityTestLabelHalJsonBasicAuthTest.php
index b3824aa57f..0cc915bdc4 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/EntityTestLabel/EntityTestLabelHalJsonBasicAuthTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/EntityTestLabel/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/hal/tests/src/Functional/EntityResource/EntityViewDisplay/EntityViewDisplayHalJsonAnonTest.php b/core/modules/hal/tests/src/Functional/EntityResource/EntityViewDisplay/EntityViewDisplayHalJsonAnonTest.php
index 6fbebad254..6f5378273e 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/EntityViewDisplay/EntityViewDisplayHalJsonAnonTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/EntityViewDisplay/EntityViewDisplayHalJsonAnonTest.php
@@ -15,7 +15,7 @@ class EntityViewDisplayHalJsonAnonTest extends EntityViewDisplayResourceTestBase
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/hal/tests/src/Functional/EntityResource/EntityViewDisplay/EntityViewDisplayHalJsonBasicAuthTest.php b/core/modules/hal/tests/src/Functional/EntityResource/EntityViewDisplay/EntityViewDisplayHalJsonBasicAuthTest.php
index 2c894f7f16..3547c1945c 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/EntityViewDisplay/EntityViewDisplayHalJsonBasicAuthTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/EntityViewDisplay/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/modules/hal/tests/src/Functional/EntityResource/EntityViewMode/EntityViewModeHalJsonAnonTest.php b/core/modules/hal/tests/src/Functional/EntityResource/EntityViewMode/EntityViewModeHalJsonAnonTest.php
index d1d4a7460a..1a82057315 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/EntityViewMode/EntityViewModeHalJsonAnonTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/EntityViewMode/EntityViewModeHalJsonAnonTest.php
@@ -15,7 +15,7 @@ class EntityViewModeHalJsonAnonTest extends EntityViewModeResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/hal/tests/src/Functional/EntityResource/EntityViewMode/EntityViewModeHalJsonBasicAuthTest.php b/core/modules/hal/tests/src/Functional/EntityResource/EntityViewMode/EntityViewModeHalJsonBasicAuthTest.php
index a79c3fd056..3185bf0b31 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/EntityViewMode/EntityViewModeHalJsonBasicAuthTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/EntityViewMode/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/modules/hal/tests/src/Functional/EntityResource/EntityViewMode/EntityViewModeHalJsonCookieTest.php b/core/modules/hal/tests/src/Functional/EntityResource/EntityViewMode/EntityViewModeHalJsonCookieTest.php
index 493de9a996..610086621d 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/EntityViewMode/EntityViewModeHalJsonCookieTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/EntityViewMode/EntityViewModeHalJsonCookieTest.php
@@ -15,7 +15,7 @@ class EntityViewModeHalJsonCookieTest extends EntityViewModeResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/hal/tests/src/Functional/EntityResource/Feed/FeedHalJsonBasicAuthTest.php b/core/modules/hal/tests/src/Functional/EntityResource/Feed/FeedHalJsonBasicAuthTest.php
index c3f91a7466..9ef87ed037 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/Feed/FeedHalJsonBasicAuthTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/Feed/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/hal/tests/src/Functional/EntityResource/Feed/FeedHalJsonTestBase.php b/core/modules/hal/tests/src/Functional/EntityResource/Feed/FeedHalJsonTestBase.php
index 43181323e3..a5cf73589d 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/Feed/FeedHalJsonTestBase.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/Feed/FeedHalJsonTestBase.php
@@ -12,7 +12,7 @@
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/hal/tests/src/Functional/EntityResource/FieldConfig/FieldConfigHalJsonAnonTest.php b/core/modules/hal/tests/src/Functional/EntityResource/FieldConfig/FieldConfigHalJsonAnonTest.php
index 54a418aed4..c1320d419e 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/FieldConfig/FieldConfigHalJsonAnonTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/FieldConfig/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/hal/tests/src/Functional/EntityResource/FieldConfig/FieldConfigHalJsonBasicAuthTest.php b/core/modules/hal/tests/src/Functional/EntityResource/FieldConfig/FieldConfigHalJsonBasicAuthTest.php
index 74b60aa51b..6263e8a25a 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/FieldConfig/FieldConfigHalJsonBasicAuthTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/FieldConfig/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/hal/tests/src/Functional/EntityResource/FieldConfig/FieldConfigHalJsonCookieTest.php b/core/modules/hal/tests/src/Functional/EntityResource/FieldConfig/FieldConfigHalJsonCookieTest.php
index e6491f4382..88d0f29fbe 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/FieldConfig/FieldConfigHalJsonCookieTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/FieldConfig/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/hal/tests/src/Functional/EntityResource/FieldStorageConfig/FieldStorageConfigHalJsonAnonTest.php b/core/modules/hal/tests/src/Functional/EntityResource/FieldStorageConfig/FieldStorageConfigHalJsonAnonTest.php
index 1b9019342a..cd790ee7b7 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/FieldStorageConfig/FieldStorageConfigHalJsonAnonTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/FieldStorageConfig/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/hal/tests/src/Functional/EntityResource/FieldStorageConfig/FieldStorageConfigHalJsonBasicAuthTest.php b/core/modules/hal/tests/src/Functional/EntityResource/FieldStorageConfig/FieldStorageConfigHalJsonBasicAuthTest.php
index 957e73be92..f27421387f 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/FieldStorageConfig/FieldStorageConfigHalJsonBasicAuthTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/FieldStorageConfig/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/hal/tests/src/Functional/EntityResource/FieldStorageConfig/FieldStorageConfigHalJsonCookieTest.php b/core/modules/hal/tests/src/Functional/EntityResource/FieldStorageConfig/FieldStorageConfigHalJsonCookieTest.php
index 20d47a750a..278e7c8827 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/FieldStorageConfig/FieldStorageConfigHalJsonCookieTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/FieldStorageConfig/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/hal/tests/src/Functional/EntityResource/File/FileHalJsonAnonTest.php b/core/modules/hal/tests/src/Functional/EntityResource/File/FileHalJsonAnonTest.php
index f3036a9de8..cbedf8477e 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/File/FileHalJsonAnonTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/File/FileHalJsonAnonTest.php
@@ -18,7 +18,7 @@ class FileHalJsonAnonTest extends FileResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/hal/tests/src/Functional/EntityResource/File/FileHalJsonBasicAuthTest.php b/core/modules/hal/tests/src/Functional/EntityResource/File/FileHalJsonBasicAuthTest.php
index 3b1e3fe614..e7e547def0 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/File/FileHalJsonBasicAuthTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/File/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/hal/tests/src/Functional/EntityResource/FilterFormat/FilterFormatHalJsonAnonTest.php b/core/modules/hal/tests/src/Functional/EntityResource/FilterFormat/FilterFormatHalJsonAnonTest.php
index b0d1a6103d..9ddb8d7355 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/FilterFormat/FilterFormatHalJsonAnonTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/FilterFormat/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/hal/tests/src/Functional/EntityResource/FilterFormat/FilterFormatHalJsonBasicAuthTest.php b/core/modules/hal/tests/src/Functional/EntityResource/FilterFormat/FilterFormatHalJsonBasicAuthTest.php
index fa409700eb..ede2202417 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/FilterFormat/FilterFormatHalJsonBasicAuthTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/FilterFormat/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/hal/tests/src/Functional/EntityResource/FilterFormat/FilterFormatHalJsonCookieTest.php b/core/modules/hal/tests/src/Functional/EntityResource/FilterFormat/FilterFormatHalJsonCookieTest.php
index 1957793e4b..4bda6f6148 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/FilterFormat/FilterFormatHalJsonCookieTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/FilterFormat/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/hal/tests/src/Functional/EntityResource/ImageStyle/ImageStyleHalJsonAnonTest.php b/core/modules/hal/tests/src/Functional/EntityResource/ImageStyle/ImageStyleHalJsonAnonTest.php
index 34cfd4be57..97af7c1713 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/ImageStyle/ImageStyleHalJsonAnonTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/ImageStyle/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/hal/tests/src/Functional/EntityResource/ImageStyle/ImageStyleHalJsonBasicAuthTest.php b/core/modules/hal/tests/src/Functional/EntityResource/ImageStyle/ImageStyleHalJsonBasicAuthTest.php
index 61cc149e3b..a42e72c3de 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/ImageStyle/ImageStyleHalJsonBasicAuthTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/ImageStyle/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/hal/tests/src/Functional/EntityResource/ImageStyle/ImageStyleHalJsonCookieTest.php b/core/modules/hal/tests/src/Functional/EntityResource/ImageStyle/ImageStyleHalJsonCookieTest.php
index aa496535cd..df4d9a0748 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/ImageStyle/ImageStyleHalJsonCookieTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/ImageStyle/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/hal/tests/src/Functional/EntityResource/Item/ItemHalJsonAnonTest.php b/core/modules/hal/tests/src/Functional/EntityResource/Item/ItemHalJsonAnonTest.php
index 6c35159685..66bbeb3233 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/Item/ItemHalJsonAnonTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/Item/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/hal/tests/src/Functional/EntityResource/Item/ItemHalJsonBasicAuthTest.php b/core/modules/hal/tests/src/Functional/EntityResource/Item/ItemHalJsonBasicAuthTest.php
index 2c96fbc68a..7230d984d3 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/Item/ItemHalJsonBasicAuthTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/Item/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/hal/tests/src/Functional/EntityResource/Item/ItemHalJsonCookieTest.php b/core/modules/hal/tests/src/Functional/EntityResource/Item/ItemHalJsonCookieTest.php
index 9c39918b55..b19ce970ed 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/Item/ItemHalJsonCookieTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/Item/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/hal/tests/src/Functional/EntityResource/Item/ItemHalJsonTestBase.php b/core/modules/hal/tests/src/Functional/EntityResource/Item/ItemHalJsonTestBase.php
index 24157e5979..c554ab6b64 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/Item/ItemHalJsonTestBase.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/Item/ItemHalJsonTestBase.php
@@ -18,7 +18,7 @@
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/hal/tests/src/Functional/EntityResource/Media/MediaHalJsonAnonTest.php b/core/modules/hal/tests/src/Functional/EntityResource/Media/MediaHalJsonAnonTest.php
index c9ee7733cf..612f482e47 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/Media/MediaHalJsonAnonTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/Media/MediaHalJsonAnonTest.php
@@ -20,7 +20,7 @@ class MediaHalJsonAnonTest extends MediaResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/hal/tests/src/Functional/EntityResource/Media/MediaHalJsonBasicAuthTest.php b/core/modules/hal/tests/src/Functional/EntityResource/Media/MediaHalJsonBasicAuthTest.php
index a645cbfba6..b6f678fcbc 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/Media/MediaHalJsonBasicAuthTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/Media/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/hal/tests/src/Functional/EntityResource/MediaType/MediaTypeHalJsonAnonTest.php b/core/modules/hal/tests/src/Functional/EntityResource/MediaType/MediaTypeHalJsonAnonTest.php
index 1b83df1e9b..940925f1eb 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/MediaType/MediaTypeHalJsonAnonTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/MediaType/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/hal/tests/src/Functional/EntityResource/MediaType/MediaTypeHalJsonBasicAuthTest.php b/core/modules/hal/tests/src/Functional/EntityResource/MediaType/MediaTypeHalJsonBasicAuthTest.php
index 20c29f2f18..3b097825d5 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/MediaType/MediaTypeHalJsonBasicAuthTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/MediaType/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/hal/tests/src/Functional/EntityResource/MediaType/MediaTypeHalJsonCookieTest.php b/core/modules/hal/tests/src/Functional/EntityResource/MediaType/MediaTypeHalJsonCookieTest.php
index 8c6048556b..2d1aeeb572 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/MediaType/MediaTypeHalJsonCookieTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/MediaType/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/hal/tests/src/Functional/EntityResource/Menu/MenuHalJsonAnonTest.php b/core/modules/hal/tests/src/Functional/EntityResource/Menu/MenuHalJsonAnonTest.php
index ace7df7bb7..9b6254d2cf 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/Menu/MenuHalJsonAnonTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/Menu/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/hal/tests/src/Functional/EntityResource/Menu/MenuHalJsonBasicAuthTest.php b/core/modules/hal/tests/src/Functional/EntityResource/Menu/MenuHalJsonBasicAuthTest.php
index 82242e1e6b..7a106ac99a 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/Menu/MenuHalJsonBasicAuthTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/Menu/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/hal/tests/src/Functional/EntityResource/Menu/MenuHalJsonCookieTest.php b/core/modules/hal/tests/src/Functional/EntityResource/Menu/MenuHalJsonCookieTest.php
index 0c1ff4bbb7..87f93c28ed 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/Menu/MenuHalJsonCookieTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/Menu/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/hal/tests/src/Functional/EntityResource/MenuLinkContent/MenuLinkContentHalJsonAnonTest.php b/core/modules/hal/tests/src/Functional/EntityResource/MenuLinkContent/MenuLinkContentHalJsonAnonTest.php
index c4c8d943f2..98c5d422b6 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/MenuLinkContent/MenuLinkContentHalJsonAnonTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/MenuLinkContent/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/hal/tests/src/Functional/EntityResource/MenuLinkContent/MenuLinkContentHalJsonBasicAuthTest.php b/core/modules/hal/tests/src/Functional/EntityResource/MenuLinkContent/MenuLinkContentHalJsonBasicAuthTest.php
index 3af8362e6b..3e32f39d13 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/MenuLinkContent/MenuLinkContentHalJsonBasicAuthTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/MenuLinkContent/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/hal/tests/src/Functional/EntityResource/Message/MessageHalJsonAnonTest.php b/core/modules/hal/tests/src/Functional/EntityResource/Message/MessageHalJsonAnonTest.php
index a9b3ae175b..beb1037462 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/Message/MessageHalJsonAnonTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/Message/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/hal/tests/src/Functional/EntityResource/Message/MessageHalJsonBasicAuthTest.php b/core/modules/hal/tests/src/Functional/EntityResource/Message/MessageHalJsonBasicAuthTest.php
index a24fd6e1b9..9415498c90 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/Message/MessageHalJsonBasicAuthTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/Message/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/hal/tests/src/Functional/EntityResource/Node/NodeHalJsonAnonTest.php b/core/modules/hal/tests/src/Functional/EntityResource/Node/NodeHalJsonAnonTest.php
index 2de6539fe4..c0f76427ed 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/Node/NodeHalJsonAnonTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/Node/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/hal/tests/src/Functional/EntityResource/Node/NodeHalJsonBasicAuthTest.php b/core/modules/hal/tests/src/Functional/EntityResource/Node/NodeHalJsonBasicAuthTest.php
index 6ae12852c4..247a5b3c10 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/Node/NodeHalJsonBasicAuthTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/Node/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/hal/tests/src/Functional/EntityResource/NodeType/NodeTypeHalJsonAnonTest.php b/core/modules/hal/tests/src/Functional/EntityResource/NodeType/NodeTypeHalJsonAnonTest.php
index 5a46564de4..cfb8d5ca05 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/NodeType/NodeTypeHalJsonAnonTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/NodeType/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/hal/tests/src/Functional/EntityResource/NodeType/NodeTypeHalJsonBasicAuthTest.php b/core/modules/hal/tests/src/Functional/EntityResource/NodeType/NodeTypeHalJsonBasicAuthTest.php
index f1b4bca4d5..a5e3e5d5f7 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/NodeType/NodeTypeHalJsonBasicAuthTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/NodeType/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/hal/tests/src/Functional/EntityResource/NodeType/NodeTypeHalJsonCookieTest.php b/core/modules/hal/tests/src/Functional/EntityResource/NodeType/NodeTypeHalJsonCookieTest.php
index 0b2f9b268b..ed892b3607 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/NodeType/NodeTypeHalJsonCookieTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/NodeType/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/hal/tests/src/Functional/EntityResource/RdfMapping/RdfMappingHalJsonAnonTest.php b/core/modules/hal/tests/src/Functional/EntityResource/RdfMapping/RdfMappingHalJsonAnonTest.php
index c8931d740e..4613233b5e 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/RdfMapping/RdfMappingHalJsonAnonTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/RdfMapping/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/hal/tests/src/Functional/EntityResource/RdfMapping/RdfMappingHalJsonBasicAuthTest.php b/core/modules/hal/tests/src/Functional/EntityResource/RdfMapping/RdfMappingHalJsonBasicAuthTest.php
index 00bc05d0e9..f334775ba6 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/RdfMapping/RdfMappingHalJsonBasicAuthTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/RdfMapping/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/hal/tests/src/Functional/EntityResource/RdfMapping/RdfMappingHalJsonCookieTest.php b/core/modules/hal/tests/src/Functional/EntityResource/RdfMapping/RdfMappingHalJsonCookieTest.php
index 458ec7b21b..de4da0638b 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/RdfMapping/RdfMappingHalJsonCookieTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/RdfMapping/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/hal/tests/src/Functional/EntityResource/ResponsiveImageStyle/ResponsiveImageStyleHalJsonAnonTest.php b/core/modules/hal/tests/src/Functional/EntityResource/ResponsiveImageStyle/ResponsiveImageStyleHalJsonAnonTest.php
index bb8b50e57f..eb477fce66 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/ResponsiveImageStyle/ResponsiveImageStyleHalJsonAnonTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/ResponsiveImageStyle/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/hal/tests/src/Functional/EntityResource/ResponsiveImageStyle/ResponsiveImageStyleHalJsonBasicAuthTest.php b/core/modules/hal/tests/src/Functional/EntityResource/ResponsiveImageStyle/ResponsiveImageStyleHalJsonBasicAuthTest.php
index 3ce0c72682..40e1e2eeda 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/ResponsiveImageStyle/ResponsiveImageStyleHalJsonBasicAuthTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/ResponsiveImageStyle/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/hal/tests/src/Functional/EntityResource/ResponsiveImageStyle/ResponsiveImageStyleHalJsonCookieTest.php b/core/modules/hal/tests/src/Functional/EntityResource/ResponsiveImageStyle/ResponsiveImageStyleHalJsonCookieTest.php
index 926de66541..f02f714618 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/ResponsiveImageStyle/ResponsiveImageStyleHalJsonCookieTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/ResponsiveImageStyle/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/hal/tests/src/Functional/EntityResource/RestResourceConfig/RestResourceConfigHalJsonAnonTest.php b/core/modules/hal/tests/src/Functional/EntityResource/RestResourceConfig/RestResourceConfigHalJsonAnonTest.php
index 021812ba8a..4470e2e6a9 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/RestResourceConfig/RestResourceConfigHalJsonAnonTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/RestResourceConfig/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/hal/tests/src/Functional/EntityResource/RestResourceConfig/RestResourceConfigHalJsonBasicAuthTest.php b/core/modules/hal/tests/src/Functional/EntityResource/RestResourceConfig/RestResourceConfigHalJsonBasicAuthTest.php
index 495cc04233..9ba977f629 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/RestResourceConfig/RestResourceConfigHalJsonBasicAuthTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/RestResourceConfig/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/hal/tests/src/Functional/EntityResource/RestResourceConfig/RestResourceConfigHalJsonCookieTest.php b/core/modules/hal/tests/src/Functional/EntityResource/RestResourceConfig/RestResourceConfigHalJsonCookieTest.php
index 7747b1eb09..d4eba7bacb 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/RestResourceConfig/RestResourceConfigHalJsonCookieTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/RestResourceConfig/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/hal/tests/src/Functional/EntityResource/Role/RoleHalJsonAnonTest.php b/core/modules/hal/tests/src/Functional/EntityResource/Role/RoleHalJsonAnonTest.php
index ca39204dbc..16ece661dc 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/Role/RoleHalJsonAnonTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/Role/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/hal/tests/src/Functional/EntityResource/Role/RoleHalJsonBasicAuthTest.php b/core/modules/hal/tests/src/Functional/EntityResource/Role/RoleHalJsonBasicAuthTest.php
index 090f1535f0..a6a3c179c4 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/Role/RoleHalJsonBasicAuthTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/Role/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/hal/tests/src/Functional/EntityResource/Role/RoleHalJsonCookieTest.php b/core/modules/hal/tests/src/Functional/EntityResource/Role/RoleHalJsonCookieTest.php
index a98046a42b..205dd29c1e 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/Role/RoleHalJsonCookieTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/Role/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/hal/tests/src/Functional/EntityResource/SearchPage/SearchPageHalJsonAnonTest.php b/core/modules/hal/tests/src/Functional/EntityResource/SearchPage/SearchPageHalJsonAnonTest.php
index 28777a413e..4e9aeff295 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/SearchPage/SearchPageHalJsonAnonTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/SearchPage/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/hal/tests/src/Functional/EntityResource/SearchPage/SearchPageHalJsonBasicAuthTest.php b/core/modules/hal/tests/src/Functional/EntityResource/SearchPage/SearchPageHalJsonBasicAuthTest.php
index bb48bbe604..151890a6dd 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/SearchPage/SearchPageHalJsonBasicAuthTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/SearchPage/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/hal/tests/src/Functional/EntityResource/SearchPage/SearchPageHalJsonCookieTest.php b/core/modules/hal/tests/src/Functional/EntityResource/SearchPage/SearchPageHalJsonCookieTest.php
index 772a4be057..fe32a2b187 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/SearchPage/SearchPageHalJsonCookieTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/SearchPage/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/hal/tests/src/Functional/EntityResource/Shortcut/ShortcutHalJsonAnonTest.php b/core/modules/hal/tests/src/Functional/EntityResource/Shortcut/ShortcutHalJsonAnonTest.php
index c9e8dc00c5..a8cc32ab26 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/Shortcut/ShortcutHalJsonAnonTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/Shortcut/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/hal/tests/src/Functional/EntityResource/Shortcut/ShortcutHalJsonBasicAuthTest.php b/core/modules/hal/tests/src/Functional/EntityResource/Shortcut/ShortcutHalJsonBasicAuthTest.php
index a5be6dbc88..6d2eb974b6 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/Shortcut/ShortcutHalJsonBasicAuthTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/Shortcut/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/hal/tests/src/Functional/EntityResource/ShortcutSet/ShortcutSetHalJsonAnonTest.php b/core/modules/hal/tests/src/Functional/EntityResource/ShortcutSet/ShortcutSetHalJsonAnonTest.php
index a1cdf2773c..22ea0444d8 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/ShortcutSet/ShortcutSetHalJsonAnonTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/ShortcutSet/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/hal/tests/src/Functional/EntityResource/ShortcutSet/ShortcutSetHalJsonBasicAuthTest.php b/core/modules/hal/tests/src/Functional/EntityResource/ShortcutSet/ShortcutSetHalJsonBasicAuthTest.php
index d6cce1d89f..3cff13581d 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/ShortcutSet/ShortcutSetHalJsonBasicAuthTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/ShortcutSet/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/hal/tests/src/Functional/EntityResource/Term/TermHalJsonAnonTest.php b/core/modules/hal/tests/src/Functional/EntityResource/Term/TermHalJsonAnonTest.php
index 73a1549e0a..73c5216356 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/Term/TermHalJsonAnonTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/Term/TermHalJsonAnonTest.php
@@ -17,7 +17,7 @@ class TermHalJsonAnonTest extends TermResourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/hal/tests/src/Functional/EntityResource/Term/TermHalJsonBasicAuthTest.php b/core/modules/hal/tests/src/Functional/EntityResource/Term/TermHalJsonBasicAuthTest.php
index 58633389f8..8c1ef53838 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/Term/TermHalJsonBasicAuthTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/Term/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/hal/tests/src/Functional/EntityResource/Tour/TourHalJsonAnonTest.php b/core/modules/hal/tests/src/Functional/EntityResource/Tour/TourHalJsonAnonTest.php
index 536d634708..ad4566c18c 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/Tour/TourHalJsonAnonTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/Tour/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/hal/tests/src/Functional/EntityResource/Tour/TourHalJsonBasicAuthTest.php b/core/modules/hal/tests/src/Functional/EntityResource/Tour/TourHalJsonBasicAuthTest.php
index 07462f15c2..70e5fd985b 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/Tour/TourHalJsonBasicAuthTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/Tour/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/hal/tests/src/Functional/EntityResource/Tour/TourHalJsonCookieTest.php b/core/modules/hal/tests/src/Functional/EntityResource/Tour/TourHalJsonCookieTest.php
index cf1b447cc8..1e43aa3d36 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/Tour/TourHalJsonCookieTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/Tour/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/hal/tests/src/Functional/EntityResource/User/UserHalJsonAnonTest.php b/core/modules/hal/tests/src/Functional/EntityResource/User/UserHalJsonAnonTest.php
index 7398f28489..b2947d26d4 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/User/UserHalJsonAnonTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/User/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/hal/tests/src/Functional/EntityResource/User/UserHalJsonBasicAuthTest.php b/core/modules/hal/tests/src/Functional/EntityResource/User/UserHalJsonBasicAuthTest.php
index 985b24c170..ecc19b7df9 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/User/UserHalJsonBasicAuthTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/User/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/hal/tests/src/Functional/EntityResource/View/ViewHalJsonAnonTest.php b/core/modules/hal/tests/src/Functional/EntityResource/View/ViewHalJsonAnonTest.php
index 432bd3f8c2..530f832fb9 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/View/ViewHalJsonAnonTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/View/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/hal/tests/src/Functional/EntityResource/View/ViewHalJsonBasicAuthTest.php b/core/modules/hal/tests/src/Functional/EntityResource/View/ViewHalJsonBasicAuthTest.php
index 1c5ffc257c..dc8b74de78 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/View/ViewHalJsonBasicAuthTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/View/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/hal/tests/src/Functional/EntityResource/View/ViewHalJsonCookieTest.php b/core/modules/hal/tests/src/Functional/EntityResource/View/ViewHalJsonCookieTest.php
index e6b3cbe6e2..ddcbb1d8a9 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/View/ViewHalJsonCookieTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/View/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/hal/tests/src/Functional/EntityResource/Vocabulary/VocabularyHalJsonAnonTest.php b/core/modules/hal/tests/src/Functional/EntityResource/Vocabulary/VocabularyHalJsonAnonTest.php
index d4f4bcf566..685251a583 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/Vocabulary/VocabularyHalJsonAnonTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/Vocabulary/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/hal/tests/src/Functional/EntityResource/Vocabulary/VocabularyHalJsonBasicAuthTest.php b/core/modules/hal/tests/src/Functional/EntityResource/Vocabulary/VocabularyHalJsonBasicAuthTest.php
index d53b836ca8..bfdd2bc2ce 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/Vocabulary/VocabularyHalJsonBasicAuthTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/Vocabulary/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/hal/tests/src/Functional/EntityResource/Vocabulary/VocabularyHalJsonCookieTest.php b/core/modules/hal/tests/src/Functional/EntityResource/Vocabulary/VocabularyHalJsonCookieTest.php
index dd37532065..5c16afe8dd 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/Vocabulary/VocabularyHalJsonCookieTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/Vocabulary/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/hal/tests/src/Functional/FileDenormalizeTest.php b/core/modules/hal/tests/src/Functional/FileDenormalizeTest.php
index 9c00902988..a5134eb168 100644
--- a/core/modules/hal/tests/src/Functional/FileDenormalizeTest.php
+++ b/core/modules/hal/tests/src/Functional/FileDenormalizeTest.php
@@ -18,7 +18,7 @@ class FileDenormalizeTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['hal', 'file', 'node'];
+  protected static $modules = ['hal', 'file', 'node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/hal/tests/src/Kernel/EntityTranslationNormalizeTest.php b/core/modules/hal/tests/src/Kernel/EntityTranslationNormalizeTest.php
index 2597af4aff..d8df345749 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 355c09d1a6..ea63280893 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 95124bb9b6..3fe571d3c5 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 ef51a077c9..5eaa671711 100644
--- a/core/modules/hal/tests/src/Kernel/NormalizerTestBase.php
+++ b/core/modules/hal/tests/src/Kernel/NormalizerTestBase.php
@@ -17,7 +17,7 @@
    *
    * @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 0eabbda56b..b30d72f2d1 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'];
 
   /**
    * The admin user.
diff --git a/core/modules/help/tests/src/Functional/HelpBlockTest.php b/core/modules/help/tests/src/Functional/HelpBlockTest.php
index 81c4fc1532..0354dc6055 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'];
 
   /**
    * The help block instance.
diff --git a/core/modules/help/tests/src/Functional/HelpTest.php b/core/modules/help/tests/src/Functional/HelpTest.php
index dff11ef173..143c72bef6 100644
--- a/core/modules/help/tests/src/Functional/HelpTest.php
+++ b/core/modules/help/tests/src/Functional/HelpTest.php
@@ -20,7 +20,7 @@ class HelpTest extends BrowserTestBase {
    *
    * @var array.
    */
-  public static $modules = ['help_test', 'help_page_test'];
+  protected static $modules = ['help_test', 'help_page_test'];
 
   /**
    * Use the Standard profile to test help implementations of many core modules.
diff --git a/core/modules/help/tests/src/Functional/NoHelpTest.php b/core/modules/help/tests/src/Functional/NoHelpTest.php
index acb2563aee..0d7a5d6a77 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'];
 
   /**
    * The user who will be created.
diff --git a/core/modules/help/tests/src/Kernel/HelpEmptyPageTest.php b/core/modules/help/tests/src/Kernel/HelpEmptyPageTest.php
index 070a95451b..542100eaad 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'];
+  protected static $modules = ['system', 'help_test', 'user'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/history/tests/src/Functional/HistoryTest.php b/core/modules/history/tests/src/Functional/HistoryTest.php
index 065b9af7aa..57b61d3450 100644
--- a/core/modules/history/tests/src/Functional/HistoryTest.php
+++ b/core/modules/history/tests/src/Functional/HistoryTest.php
@@ -22,7 +22,7 @@ class HistoryTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'history'];
+  protected static $modules = ['node', 'history'];
 
   /**
    * The main user for testing.
diff --git a/core/modules/history/tests/src/Kernel/Views/HistoryTimestampTest.php b/core/modules/history/tests/src/Kernel/Views/HistoryTimestampTest.php
index 5aebaf43a1..e4b8ed3c3e 100644
--- a/core/modules/history/tests/src/Kernel/Views/HistoryTimestampTest.php
+++ b/core/modules/history/tests/src/Kernel/Views/HistoryTimestampTest.php
@@ -21,7 +21,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/ImageEffectsTest.php b/core/modules/image/tests/src/Functional/ImageEffectsTest.php
index 3207442ab2..c3bc706286 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'];
 
   /**
    * The image effect manager.
diff --git a/core/modules/image/tests/src/Functional/ImageFieldTestBase.php b/core/modules/image/tests/src/Functional/ImageFieldTestBase.php
index b9d659a16d..cd67be2319 100644
--- a/core/modules/image/tests/src/Functional/ImageFieldTestBase.php
+++ b/core/modules/image/tests/src/Functional/ImageFieldTestBase.php
@@ -30,7 +30,7 @@
    *
    * @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/FunctionalJavascript/QuickEditImageTest.php b/core/modules/image/tests/src/FunctionalJavascript/QuickEditImageTest.php
index 12e43e7585..ae73939e46 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 JavascriptTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'image', 'field_ui', 'contextual', 'quickedit', 'toolbar'];
+  protected static $modules = ['node', 'image', 'field_ui', 'contextual', 'quickedit', 'toolbar'];
 
   /**
    * A user with permissions to edit Articles and use Quick Edit.
diff --git a/core/modules/image/tests/src/Kernel/ImageFormatterTest.php b/core/modules/image/tests/src/Kernel/ImageFormatterTest.php
index e994f12e27..c390dfe8cf 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 14eeaa3f2b..6ee7fa489c 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 45d9d0378a..4da7e3f76f 100644
--- a/core/modules/image/tests/src/Kernel/ImageItemTest.php
+++ b/core/modules/image/tests/src/Kernel/ImageItemTest.php
@@ -25,7 +25,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 6a45a98680..89a82c4e50 100644
--- a/core/modules/image/tests/src/Kernel/ImageStyleCustomStreamWrappersTest.php
+++ b/core/modules/image/tests/src/Kernel/ImageStyleCustomStreamWrappersTest.php
@@ -23,7 +23,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 e471c99164..09c9247bbb 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'];
 
   /**
    * Tests the dependency between ImageStyle and entity display components.
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 b95f0a2d58..bb8ee2c82f 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 534a4120c4..fba802a874 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 edd2ad3358..37abd1c2bc 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 55251d1fb2..198e3af690 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 a324d5ead3..910661b53f 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'];
 
   /**
    * Tests views data generated for image field relationship.
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 9535c99fb2..ef160d13bf 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 2007e1e266..6ac8c9e072 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 JavascriptTestBase {
   /**
    * {@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 b956cccbd0..1aee36df74 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 JavascriptTestBase {
    *
    * @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 4bf389e60f..8ce31a2fe9 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/language/tests/src/Functional/AdminPathEntityConverterLanguageTest.php b/core/modules/language/tests/src/Functional/AdminPathEntityConverterLanguageTest.php
index f689a9233f..034e7ab225 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'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/language/tests/src/Functional/EntityTypeWithoutLanguageFormTest.php b/core/modules/language/tests/src/Functional/EntityTypeWithoutLanguageFormTest.php
index f7b6191484..12739f45a4 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/LanguageBlockSettingsVisibilityTest.php b/core/modules/language/tests/src/Functional/LanguageBlockSettingsVisibilityTest.php
index 003c5a63fa..545640270b 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'];
 
   public function testUnnecessaryLanguageSettingsVisibility() {
     $admin_user = $this->drupalCreateUser(['administer languages', 'access administration pages', 'administer blocks']);
diff --git a/core/modules/language/tests/src/Functional/LanguageBreadcrumbTest.php b/core/modules/language/tests/src/Functional/LanguageBreadcrumbTest.php
index e15fcf7a6d..7afa3653b7 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/LanguageBrowserDetectionTest.php b/core/modules/language/tests/src/Functional/LanguageBrowserDetectionTest.php
index a63ff451f1..713f23ac4b 100644
--- a/core/modules/language/tests/src/Functional/LanguageBrowserDetectionTest.php
+++ b/core/modules/language/tests/src/Functional/LanguageBrowserDetectionTest.php
@@ -11,7 +11,7 @@
  */
 class LanguageBrowserDetectionTest extends BrowserTestBase {
 
-  public static $modules = ['language'];
+  protected static $modules = ['language'];
 
   /**
    * Tests for adding, editing and deleting mappings between browser language
diff --git a/core/modules/language/tests/src/Functional/LanguageConfigOverrideImportTest.php b/core/modules/language/tests/src/Functional/LanguageConfigOverrideImportTest.php
index 2ddd4963ed..956ded16af 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'];
 
   /**
    * Tests that language can be enabled and overrides are created during a sync.
diff --git a/core/modules/language/tests/src/Functional/LanguageConfigSchemaTest.php b/core/modules/language/tests/src/Functional/LanguageConfigSchemaTest.php
index e19fe53da3..b029b7f744 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'];
 
   /**
    * A user with administrative permissions.
diff --git a/core/modules/language/tests/src/Functional/LanguageConfigurationElementTest.php b/core/modules/language/tests/src/Functional/LanguageConfigurationElementTest.php
index 87ad05bfd1..c6ad5a5410 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'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/language/tests/src/Functional/LanguageConfigurationTest.php b/core/modules/language/tests/src/Functional/LanguageConfigurationTest.php
index 7095bc18e2..88fc25527e 100644
--- a/core/modules/language/tests/src/Functional/LanguageConfigurationTest.php
+++ b/core/modules/language/tests/src/Functional/LanguageConfigurationTest.php
@@ -18,7 +18,7 @@ class LanguageConfigurationTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['language'];
+  protected static $modules = ['language'];
 
   /**
    * Functional tests for adding, editing and deleting languages.
diff --git a/core/modules/language/tests/src/Functional/LanguageCustomLanguageConfigurationTest.php b/core/modules/language/tests/src/Functional/LanguageCustomLanguageConfigurationTest.php
index a0510beca7..152eb516ec 100644
--- a/core/modules/language/tests/src/Functional/LanguageCustomLanguageConfigurationTest.php
+++ b/core/modules/language/tests/src/Functional/LanguageCustomLanguageConfigurationTest.php
@@ -18,7 +18,7 @@ class LanguageCustomLanguageConfigurationTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['language'];
+  protected static $modules = ['language'];
 
   /**
    * Functional tests for adding, editing and deleting languages.
diff --git a/core/modules/language/tests/src/Functional/LanguageListModuleInstallTest.php b/core/modules/language/tests/src/Functional/LanguageListModuleInstallTest.php
index 013d00d8db..b419e193c6 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'];
 
   /**
    * Tests enabling Language.
diff --git a/core/modules/language/tests/src/Functional/LanguageListTest.php b/core/modules/language/tests/src/Functional/LanguageListTest.php
index 8c671cfccf..0c6606e8af 100644
--- a/core/modules/language/tests/src/Functional/LanguageListTest.php
+++ b/core/modules/language/tests/src/Functional/LanguageListTest.php
@@ -19,7 +19,7 @@ class LanguageListTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['language'];
+  protected static $modules = ['language'];
 
   /**
    * Functional tests for adding, editing and deleting languages.
diff --git a/core/modules/language/tests/src/Functional/LanguageLocaleListTest.php b/core/modules/language/tests/src/Functional/LanguageLocaleListTest.php
index a39a112424..4201ab570b 100644
--- a/core/modules/language/tests/src/Functional/LanguageLocaleListTest.php
+++ b/core/modules/language/tests/src/Functional/LanguageLocaleListTest.php
@@ -16,7 +16,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 27785c0952..81797fe12d 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'];
 
   /**
    * The entity being used for testing.
diff --git a/core/modules/language/tests/src/Functional/LanguageNegotiationInfoTest.php b/core/modules/language/tests/src/Functional/LanguageNegotiationInfoTest.php
index c5e3c2c7b1..3ab2dcd334 100644
--- a/core/modules/language/tests/src/Functional/LanguageNegotiationInfoTest.php
+++ b/core/modules/language/tests/src/Functional/LanguageNegotiationInfoTest.php
@@ -18,7 +18,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 07ae85d433..07f75216be 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 17ff3f936d..a5d663b12b 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'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/language/tests/src/Functional/LanguageSelectorTranslatableTest.php b/core/modules/language/tests/src/Functional/LanguageSelectorTranslatableTest.php
index 3d027c3fb5..a8bb900a19 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 1303082c15..0ec4fccccd 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'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/language/tests/src/Functional/LanguageTourTest.php b/core/modules/language/tests/src/Functional/LanguageTourTest.php
index 13b29f2ef5..c8cba54ea3 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 34f0c81f01..49ae232dc0 100644
--- a/core/modules/language/tests/src/Functional/LanguageUILanguageNegotiationTest.php
+++ b/core/modules/language/tests/src/Functional/LanguageUILanguageNegotiationTest.php
@@ -48,7 +48,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'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/language/tests/src/Functional/LanguageUrlRewritingTest.php b/core/modules/language/tests/src/Functional/LanguageUrlRewritingTest.php
index 7021aa0027..5a36c7309b 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'];
 
   /**
    * An user with permissions to administer languages.
diff --git a/core/modules/language/tests/src/Functional/Migrate/MigrateLanguageTest.php b/core/modules/language/tests/src/Functional/Migrate/MigrateLanguageTest.php
index 9a2702da2b..ef9b0216e4 100644
--- a/core/modules/language/tests/src/Functional/Migrate/MigrateLanguageTest.php
+++ b/core/modules/language/tests/src/Functional/Migrate/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/Condition/LanguageConditionTest.php b/core/modules/language/tests/src/Kernel/Condition/LanguageConditionTest.php
index af7eed4b7f..f5390562f7 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() {
     parent::setUp();
diff --git a/core/modules/language/tests/src/Kernel/ConfigurableLanguageManagerTest.php b/core/modules/language/tests/src/Kernel/ConfigurableLanguageManagerTest.php
index 92ab889ce8..fecdfa4a5f 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 00af14cbd3..1a717ddeb7 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 88abdd9006..97a9616f0f 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 fb62f48158..a02334b33e 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 3082697b04..722fcbc8ad 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 7d505baf78..2b12b54945 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 f4dcbd2f9d..458eeaec53 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 290160c355..a5dbe78455 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/MigrateLanguageContentSettingsTest.php b/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateLanguageContentSettingsTest.php
index 546ab25e03..82e6ba8ce8 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/MigrateLanguageNegotiationSettingsTest.php b/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateLanguageNegotiationSettingsTest.php
index 4a88427402..d5acb9fe25 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/d7/MigrateDefaultLanguageTest.php b/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateDefaultLanguageTest.php
index ac7ca2e311..faea635303 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/MigrateLanguageContentSettingsTest.php b/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateLanguageContentSettingsTest.php
index d7a4551d6f..d9fe6e80e8 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/MigrateLanguageNegotiationSettingsTest.php b/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateLanguageNegotiationSettingsTest.php
index 09681dee65..9eae57929b 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 6aa318eb41..d04b57af5b 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 a4c7534e5f..f4fa2dacce 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/d7/LanguageContentSettingsTest.php b/core/modules/language/tests/src/Kernel/Plugin/migrate/source/d7/LanguageContentSettingsTest.php
index 39d6450817..3fc1df57c3 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/Views/LanguageTestBase.php b/core/modules/language/tests/src/Kernel/Views/LanguageTestBase.php
index cab6fc84e0..fc4cabf1ba 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 @@
    *
    * @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/LayoutBuilderTest.php b/core/modules/layout_builder/tests/src/Functional/LayoutBuilderTest.php
index d14007aadf..293dd727c7 100644
--- a/core/modules/layout_builder/tests/src/Functional/LayoutBuilderTest.php
+++ b/core/modules/layout_builder/tests/src/Functional/LayoutBuilderTest.php
@@ -14,7 +14,7 @@ class LayoutBuilderTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'layout_builder',
     'block',
     'node',
diff --git a/core/modules/layout_builder/tests/src/Functional/LayoutSectionTest.php b/core/modules/layout_builder/tests/src/Functional/LayoutSectionTest.php
index 0437c1ca85..843876c661 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'];
 
   /**
    * The name of the layout section field.
diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/FieldBlockTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/FieldBlockTest.php
index 4f086d6a96..c55f266e56 100644
--- a/core/modules/layout_builder/tests/src/FunctionalJavascript/FieldBlockTest.php
+++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/FieldBlockTest.php
@@ -16,7 +16,7 @@ class FieldBlockTest extends JavascriptTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['block', 'datetime', 'layout_builder', 'user'];
+  protected static $modules = ['block', 'datetime', 'layout_builder', 'user'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderCompatibilityTestBase.php b/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderCompatibilityTestBase.php
index d5a4cd0b8a..af1fbaa5da 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 @@
   /**
    * {@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 59a76615c1..33f050e141 100644
--- a/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderFieldLayoutCompatibilityTest.php
+++ b/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderFieldLayoutCompatibilityTest.php
@@ -14,7 +14,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 af8395f173..3df547354a 100644
--- a/core/modules/layout_builder/tests/src/Kernel/LayoutSectionItemListTest.php
+++ b/core/modules/layout_builder/tests/src/Kernel/LayoutSectionItemListTest.php
@@ -17,7 +17,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 1879977633..1abad5f9c0 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 @@
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'layout_builder',
     'layout_discovery',
     'layout_test',
diff --git a/core/modules/layout_discovery/tests/src/Kernel/LayoutTest.php b/core/modules/layout_discovery/tests/src/Kernel/LayoutTest.php
index c7be49ba2b..81c011a85e 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 f32bf3c45b..65acade503 100644
--- a/core/modules/link/tests/src/Functional/LinkFieldTest.php
+++ b/core/modules/link/tests/src/Functional/LinkFieldTest.php
@@ -24,7 +24,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 bd2433f903..92aed61f93 100644
--- a/core/modules/link/tests/src/Functional/LinkFieldUITest.php
+++ b/core/modules/link/tests/src/Functional/LinkFieldUITest.php
@@ -24,7 +24,7 @@ class LinkFieldUITest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'link', 'field_ui', 'block'];
+  protected static $modules = ['node', 'link', 'field_ui', 'block'];
 
   /**
    * A user that can edit content types.
diff --git a/core/modules/link/tests/src/Kernel/LinkItemTest.php b/core/modules/link/tests/src/Kernel/LinkItemTest.php
index ff4f840567..51a6cc3d05 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() {
     parent::setUp();
diff --git a/core/modules/locale/tests/src/Functional/LocaleConfigTranslationImportTest.php b/core/modules/locale/tests/src/Functional/LocaleConfigTranslationImportTest.php
index df7a5ffeea..5739d01237 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 a2cdefbd41..a8400889d5 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 e7955503a4..51305bd9e1 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'];
 
   /**
    * Verifies that machine name fields are always LTR.
diff --git a/core/modules/locale/tests/src/Functional/LocaleExportTest.php b/core/modules/locale/tests/src/Functional/LocaleExportTest.php
index 05621f6c13..4df30eb1c4 100644
--- a/core/modules/locale/tests/src/Functional/LocaleExportTest.php
+++ b/core/modules/locale/tests/src/Functional/LocaleExportTest.php
@@ -16,7 +16,7 @@ class LocaleExportTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['locale'];
+  protected static $modules = ['locale'];
 
   /**
    * A user able to create languages and export translations.
diff --git a/core/modules/locale/tests/src/Functional/LocaleFileSystemFormTest.php b/core/modules/locale/tests/src/Functional/LocaleFileSystemFormTest.php
index ee496e248a..a65aedb672 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 581c98fbab..d2c99bce63 100644
--- a/core/modules/locale/tests/src/Functional/LocaleImportFunctionalTest.php
+++ b/core/modules/locale/tests/src/Functional/LocaleImportFunctionalTest.php
@@ -17,7 +17,7 @@ class LocaleImportFunctionalTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['locale', 'dblog'];
+  protected static $modules = ['locale', 'dblog'];
 
   /**
    * A user able to create languages and import translations.
diff --git a/core/modules/locale/tests/src/Functional/LocaleJavascriptTranslationTest.php b/core/modules/locale/tests/src/Functional/LocaleJavascriptTranslationTest.php
index d46fa5ea91..c542434b9b 100644
--- a/core/modules/locale/tests/src/Functional/LocaleJavascriptTranslationTest.php
+++ b/core/modules/locale/tests/src/Functional/LocaleJavascriptTranslationTest.php
@@ -18,7 +18,7 @@ class LocaleJavascriptTranslationTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['locale', 'locale_test'];
+  protected static $modules = ['locale', 'locale_test'];
 
   public function testFileParsing() {
 
diff --git a/core/modules/locale/tests/src/Functional/LocaleLibraryAlterTest.php b/core/modules/locale/tests/src/Functional/LocaleLibraryAlterTest.php
index 5425fc5f4c..f18ec5d976 100644
--- a/core/modules/locale/tests/src/Functional/LocaleLibraryAlterTest.php
+++ b/core/modules/locale/tests/src/Functional/LocaleLibraryAlterTest.php
@@ -19,7 +19,7 @@ class LocaleLibraryAlterTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['locale'];
+  protected static $modules = ['locale'];
 
   /**
    * Verifies that the datepicker can be localized.
diff --git a/core/modules/locale/tests/src/Functional/LocaleLocaleLookupTest.php b/core/modules/locale/tests/src/Functional/LocaleLocaleLookupTest.php
index 4afd1c81ff..97cdc22785 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 16cc26865e..041f7b0c7a 100644
--- a/core/modules/locale/tests/src/Functional/LocalePathTest.php
+++ b/core/modules/locale/tests/src/Functional/LocalePathTest.php
@@ -18,7 +18,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 57916caf04..51bb5aa68f 100644
--- a/core/modules/locale/tests/src/Functional/LocalePluralFormatTest.php
+++ b/core/modules/locale/tests/src/Functional/LocalePluralFormatTest.php
@@ -24,7 +24,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/LocaleStringTest.php b/core/modules/locale/tests/src/Functional/LocaleStringTest.php
index 601b7388e6..0f662cd9c5 100644
--- a/core/modules/locale/tests/src/Functional/LocaleStringTest.php
+++ b/core/modules/locale/tests/src/Functional/LocaleStringTest.php
@@ -17,7 +17,7 @@ class LocaleStringTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['locale'];
+  protected static $modules = ['locale'];
 
   /**
    * The locale storage.
diff --git a/core/modules/locale/tests/src/Functional/LocaleTranslateStringTourTest.php b/core/modules/locale/tests/src/Functional/LocaleTranslateStringTourTest.php
index ffd5bc7b02..e288053a48 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 39d7c3d533..2f5e48f831 100644
--- a/core/modules/locale/tests/src/Functional/LocaleTranslatedSchemaDefinitionTest.php
+++ b/core/modules/locale/tests/src/Functional/LocaleTranslatedSchemaDefinitionTest.php
@@ -17,7 +17,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 e7d28b3683..d14c9a3f0c 100644
--- a/core/modules/locale/tests/src/Functional/LocaleTranslationUiTest.php
+++ b/core/modules/locale/tests/src/Functional/LocaleTranslationUiTest.php
@@ -20,7 +20,7 @@ class LocaleTranslationUiTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['locale'];
+  protected static $modules = ['locale'];
 
   /**
    * Enable interface translation to English.
diff --git a/core/modules/locale/tests/src/Functional/LocaleUpdateBase.php b/core/modules/locale/tests/src/Functional/LocaleUpdateBase.php
index 2dc379c165..ed314c5f80 100644
--- a/core/modules/locale/tests/src/Functional/LocaleUpdateBase.php
+++ b/core/modules/locale/tests/src/Functional/LocaleUpdateBase.php
@@ -45,7 +45,7 @@
    *
    * @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 5c972d1ef3..00b86a35e5 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'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/locale/tests/src/Functional/LocaleUpdateInterfaceTest.php b/core/modules/locale/tests/src/Functional/LocaleUpdateInterfaceTest.php
index c6c69c2a97..abe14ccf42 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 8389b6e973..55e656e53c 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 3a12efdf24..1de31288ac 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 07909bacc4..0b25752854 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/LocaleDeprecationsTest.php b/core/modules/locale/tests/src/Kernel/LocaleDeprecationsTest.php
index b98bc0552a..98101dae91 100644
--- a/core/modules/locale/tests/src/Kernel/LocaleDeprecationsTest.php
+++ b/core/modules/locale/tests/src/Kernel/LocaleDeprecationsTest.php
@@ -17,7 +17,7 @@ class LocaleDeprecationsTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['locale', 'system'];
+  protected static $modules = ['locale', 'system'];
 
   /**
    * @expectedDeprecation locale_translation_manual_status() is deprecated in Drupal 8.5.0 and will be removed before Drupal 9.0.0. It is unused by Drupal core. Duplicate this function in your own extension if you need its behavior.
diff --git a/core/modules/locale/tests/src/Kernel/LocaleStringIsSafeTest.php b/core/modules/locale/tests/src/Kernel/LocaleStringIsSafeTest.php
index 4129cdc883..5cc4cde577 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 370c0146de..054448d903 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 b4449184a3..4327fe3363 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/MediaAccessTest.php b/core/modules/media/tests/src/Functional/MediaAccessTest.php
index ef9f648f49..5e77f70fba 100644
--- a/core/modules/media/tests/src/Functional/MediaAccessTest.php
+++ b/core/modules/media/tests/src/Functional/MediaAccessTest.php
@@ -19,7 +19,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/MediaCacheTagsTest.php b/core/modules/media/tests/src/Functional/MediaCacheTagsTest.php
index e1b6cf7ef1..9d638f8b5d 100644
--- a/core/modules/media/tests/src/Functional/MediaCacheTagsTest.php
+++ b/core/modules/media/tests/src/Functional/MediaCacheTagsTest.php
@@ -18,7 +18,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 1d97773143..7312116552 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 017e725e3b..194df6d9d8 100644
--- a/core/modules/media/tests/src/Functional/MediaFunctionalTestBase.php
+++ b/core/modules/media/tests/src/Functional/MediaFunctionalTestBase.php
@@ -17,7 +17,7 @@
    *
    * @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 d13c3f06f3..307f2ce3f6 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 e0e5294122..3de88e962e 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'];
 
   /**
    * Tests template suggestions from media_theme_suggestions_media().
diff --git a/core/modules/media/tests/src/Functional/MediaUiFunctionalTest.php b/core/modules/media/tests/src/Functional/MediaUiFunctionalTest.php
index 8d876b7b0d..0b202854a5 100644
--- a/core/modules/media/tests/src/Functional/MediaUiFunctionalTest.php
+++ b/core/modules/media/tests/src/Functional/MediaUiFunctionalTest.php
@@ -16,7 +16,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/FunctionalJavascript/MediaJavascriptTestBase.php b/core/modules/media/tests/src/FunctionalJavascript/MediaJavascriptTestBase.php
index 7fc26ec96e..3cba78f12e 100644
--- a/core/modules/media/tests/src/FunctionalJavascript/MediaJavascriptTestBase.php
+++ b/core/modules/media/tests/src/FunctionalJavascript/MediaJavascriptTestBase.php
@@ -19,7 +19,7 @@
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'system',
     'node',
     'field_ui',
diff --git a/core/modules/media/tests/src/FunctionalJavascript/MediaUiJavascriptTest.php b/core/modules/media/tests/src/FunctionalJavascript/MediaUiJavascriptTest.php
index 0116305771..1f2b169225 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 c00dc3d1de..ac38a18597 100644
--- a/core/modules/media/tests/src/Kernel/MediaKernelTestBase.php
+++ b/core/modules/media/tests/src/Kernel/MediaKernelTestBase.php
@@ -20,7 +20,7 @@
    *
    * @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 009e7c4d6b..8976027395 100644
--- a/core/modules/media/tests/src/Kernel/MediaTranslationTest.php
+++ b/core/modules/media/tests/src/Kernel/MediaTranslationTest.php
@@ -17,7 +17,7 @@ class MediaTranslationTest extends MediaKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['language'];
+  protected static $modules = ['language'];
 
   /**
    * The test media translation type.
diff --git a/core/modules/menu_link_content/tests/src/Functional/LinksTest.php b/core/modules/menu_link_content/tests/src/Functional/LinksTest.php
index 7cce477b5a..639770debf 100644
--- a/core/modules/menu_link_content/tests/src/Functional/LinksTest.php
+++ b/core/modules/menu_link_content/tests/src/Functional/LinksTest.php
@@ -21,7 +21,7 @@ class LinksTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['router_test', 'menu_link_content'];
+  protected static $modules = ['router_test', 'menu_link_content'];
 
   /**
    * The menu link plugin manager.
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 cb1e10daf9..f5a8ba605d 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 8796bc7488..8eb99406f4 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 9fd1ce43fe..39cab40796 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/Kernel/MenuLinkContentCacheabilityBubblingTest.php b/core/modules/menu_link_content/tests/src/Kernel/MenuLinkContentCacheabilityBubblingTest.php
index 118470fa12..5ec49d61a4 100644
--- a/core/modules/menu_link_content/tests/src/Kernel/MenuLinkContentCacheabilityBubblingTest.php
+++ b/core/modules/menu_link_content/tests/src/Kernel/MenuLinkContentCacheabilityBubblingTest.php
@@ -24,7 +24,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 12d8d35afd..cbb0ba32f9 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'];
+  protected static $modules = ['menu_link_content', 'link', 'system', 'menu_link_content_dynamic_route'];
 
   /**
    * {@inheritdoc}
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 2c348cf554..2cad18980a 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 f1368ed43b..b382671332 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
@@ -15,7 +15,7 @@ class MigrateMenuLinkTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['menu_ui', 'menu_link_content'];
+  protected static $modules = ['menu_ui', 'menu_link_content'];
 
   /**
    * {@inheritdoc}
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 a5e8dd0e70..10dee1ff40 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
@@ -19,7 +19,7 @@ class MigrateMenuLinkTest extends MigrateDrupal7TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['link', 'menu_ui', 'menu_link_content', 'node'];
+  protected static $modules = ['link', 'menu_ui', 'menu_link_content', 'node'];
 
   /**
    * {@inheritdoc}
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 046deb4a00..ff77b1f85f 100644
--- a/core/modules/menu_link_content/tests/src/Kernel/PathAliasMenuLinkContentTest.php
+++ b/core/modules/menu_link_content/tests/src/Kernel/PathAliasMenuLinkContentTest.php
@@ -18,7 +18,7 @@ class PathAliasMenuLinkContentTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['menu_link_content', 'system', 'link', 'test_page_test'];
+  protected static $modules = ['menu_link_content', 'system', 'link', 'test_page_test'];
 
   /**
    * {@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 7fb3a918f8..907a9da09a 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_ui/tests/src/Functional/MenuCacheTagsTest.php b/core/modules/menu_ui/tests/src/Functional/MenuCacheTagsTest.php
index 0b08ebd979..bb0ef1bc94 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'];
 
   /**
    * Tests cache tags presence and invalidation of the Menu entity.
diff --git a/core/modules/menu_ui/tests/src/Functional/MenuLinkReorderTest.php b/core/modules/menu_ui/tests/src/Functional/MenuLinkReorderTest.php
index 4d2bba60d0..d794808963 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'];
 
   /**
    * Test creating, editing, deleting menu links via node form widget.
diff --git a/core/modules/menu_ui/tests/src/Functional/MenuUiContentModerationTest.php b/core/modules/menu_ui/tests/src/Functional/MenuUiContentModerationTest.php
index be018f4ce1..f0a4185465 100644
--- a/core/modules/menu_ui/tests/src/Functional/MenuUiContentModerationTest.php
+++ b/core/modules/menu_ui/tests/src/Functional/MenuUiContentModerationTest.php
@@ -17,7 +17,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/MenuUninstallTest.php b/core/modules/menu_ui/tests/src/Functional/MenuUninstallTest.php
index a0320f44b0..5fea50f59c 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'];
 
   /**
    * Tests Menu uninstall.
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 f87bc5fe78..a3111603cd 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 ccbebff307..ae9dc07c5a 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'];
 
   /**
    * Tests that an exception is thrown bu migration continues with the next row.
diff --git a/core/modules/migrate/tests/src/Kernel/HighWaterNotJoinableTest.php b/core/modules/migrate/tests/src/Kernel/HighWaterNotJoinableTest.php
index 4198579026..d8d7c1970e 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 faffb66358..daf4c62365 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 b6c3051330..ddecd95fc8 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'];
+  protected static $modules = ['taxonomy', 'text', 'user'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/migrate/tests/src/Kernel/MigrateConfigRollbackTest.php b/core/modules/migrate/tests/src/Kernel/MigrateConfigRollbackTest.php
index 14e50b9514..bd5ae4ba16 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 019ac42ab9..0f02bcd985 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 13803bd211..85a563bf12 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 8dc4aa9ad4..bd94e30c21 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/MigrateExternalTranslatedTest.php b/core/modules/migrate/tests/src/Kernel/MigrateExternalTranslatedTest.php
index d9728f587e..8f87bafdfc 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 207af4d8e1..d451d050fd 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/MigrateMessageTest.php b/core/modules/migrate/tests/src/Kernel/MigrateMessageTest.php
index 33013367e9..ad0890418d 100644
--- a/core/modules/migrate/tests/src/Kernel/MigrateMessageTest.php
+++ b/core/modules/migrate/tests/src/Kernel/MigrateMessageTest.php
@@ -21,7 +21,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 a63995922d..8260122d65 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'];
+  protected static $modules = ['field', 'taxonomy', 'text', 'language', 'config_translation', 'user'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/migrate/tests/src/Kernel/MigrateRollbackTest.php b/core/modules/migrate/tests/src/Kernel/MigrateRollbackTest.php
index de1666be63..25b58f91ab 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'];
+  protected static $modules = ['field', 'taxonomy', 'text', 'user'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/migrate/tests/src/Kernel/MigrateSkipRowTest.php b/core/modules/migrate/tests/src/Kernel/MigrateSkipRowTest.php
index 8c5e01e513..4a7a3e8c19 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 c4bd6cd5e0..3dcd26f65f 100644
--- a/core/modules/migrate/tests/src/Kernel/MigrateSourceTestBase.php
+++ b/core/modules/migrate/tests/src/Kernel/MigrateSourceTestBase.php
@@ -15,7 +15,7 @@
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['migrate'];
+  protected static $modules = ['migrate'];
 
   /**
    * The mocked migration.
diff --git a/core/modules/migrate/tests/src/Kernel/MigrateTestBase.php b/core/modules/migrate/tests/src/Kernel/MigrateTestBase.php
index 51e61d40ca..e44bdb9716 100644
--- a/core/modules/migrate/tests/src/Kernel/MigrateTestBase.php
+++ b/core/modules/migrate/tests/src/Kernel/MigrateTestBase.php
@@ -47,7 +47,7 @@
    */
   protected $sourceDatabase;
 
-  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 5fe56ecf95..72b5b2444d 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 dcd070c337..242f54c353 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/LogTest.php b/core/modules/migrate/tests/src/Kernel/Plugin/LogTest.php
index bb5d04dbd1..85b125604c 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/MigrationDirectoryTest.php b/core/modules/migrate/tests/src/Kernel/Plugin/MigrationDirectoryTest.php
index b85aea478f..a21b3037f2 100644
--- a/core/modules/migrate/tests/src/Kernel/Plugin/MigrationDirectoryTest.php
+++ b/core/modules/migrate/tests/src/Kernel/Plugin/MigrationDirectoryTest.php
@@ -15,7 +15,7 @@ class MigrationDirectoryTest extends MigrateDrupalTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['migration_directory_test'];
+  protected static $modules = ['migration_directory_test'];
 
   /**
    * Tests that migrations in the migration_templates directory are created.
diff --git a/core/modules/migrate/tests/src/Kernel/Plugin/MigrationPluginConfigurationTest.php b/core/modules/migrate/tests/src/Kernel/Plugin/MigrationPluginConfigurationTest.php
index 827af91ee6..0f789bbc49 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 62f3d19ba3..dc8a71bce2 100644
--- a/core/modules/migrate/tests/src/Kernel/Plugin/MigrationPluginListTest.php
+++ b/core/modules/migrate/tests/src/Kernel/Plugin/MigrationPluginListTest.php
@@ -19,7 +19,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 c2cec4cff6..5b4d6796c4 100644
--- a/core/modules/migrate/tests/src/Kernel/Plugin/MigrationTest.php
+++ b/core/modules/migrate/tests/src/Kernel/Plugin/MigrationTest.php
@@ -15,7 +15,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 e92e1441e1..58f3c25891 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/process/DownloadTest.php b/core/modules/migrate/tests/src/Kernel/process/DownloadTest.php
index ee56e32c52..63dd18e048 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 9338b9e3c9..8dc73f4924 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 644371e5f5..f3500c6088 100644
--- a/core/modules/migrate/tests/src/Kernel/process/FileCopyTest.php
+++ b/core/modules/migrate/tests/src/Kernel/process/FileCopyTest.php
@@ -22,7 +22,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 dc63de3db6..caae69de61 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 3f212356db..0d1c687ed1 100644
--- a/core/modules/migrate/tests/src/Kernel/process/RouteTest.php
+++ b/core/modules/migrate/tests/src/Kernel/process/RouteTest.php
@@ -21,7 +21,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/CckFieldBackwardsCompatibilityTest.php b/core/modules/migrate_drupal/tests/src/Kernel/CckFieldBackwardsCompatibilityTest.php
index bb314b4e97..6da76b8411 100644
--- a/core/modules/migrate_drupal/tests/src/Kernel/CckFieldBackwardsCompatibilityTest.php
+++ b/core/modules/migrate_drupal/tests/src/Kernel/CckFieldBackwardsCompatibilityTest.php
@@ -13,7 +13,7 @@ class CckFieldBackwardsCompatibilityTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['file', 'migrate_cckfield_plugin_manager_test'];
+  protected static $modules = ['file', 'migrate_cckfield_plugin_manager_test'];
 
   /**
    * Ensures that the cckfield backwards compatibility layer is invoked.
diff --git a/core/modules/migrate_drupal/tests/src/Kernel/MigrateCckFieldPluginManagerTest.php b/core/modules/migrate_drupal/tests/src/Kernel/MigrateCckFieldPluginManagerTest.php
index 7eb68ba338..cbcd929d90 100644
--- a/core/modules/migrate_drupal/tests/src/Kernel/MigrateCckFieldPluginManagerTest.php
+++ b/core/modules/migrate_drupal/tests/src/Kernel/MigrateCckFieldPluginManagerTest.php
@@ -14,7 +14,7 @@ class MigrateCckFieldPluginManagerTest extends MigrateDrupalTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system', 'user', 'field', 'migrate_drupal', 'options', 'file', 'text', 'migrate_cckfield_plugin_manager_test'];
+  protected static $modules = ['system', 'user', 'field', 'migrate_drupal', 'options', 'file', 'text', 'migrate_cckfield_plugin_manager_test'];
 
   /**
    * Tests that the correct MigrateCckField plugins are used.
diff --git a/core/modules/migrate_drupal/tests/src/Kernel/MigrateDrupalTestBase.php b/core/modules/migrate_drupal/tests/src/Kernel/MigrateDrupalTestBase.php
index 063c99cb36..e091b1c525 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 @@
    *
    * @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 7e36364e82..d52b92c05b 100644
--- a/core/modules/migrate_drupal/tests/src/Kernel/MigrateFieldPluginManagerTest.php
+++ b/core/modules/migrate_drupal/tests/src/Kernel/MigrateFieldPluginManagerTest.php
@@ -14,7 +14,7 @@ class MigrateFieldPluginManagerTest extends MigrateDrupalTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system', 'user', 'field', 'migrate_drupal', 'options', 'file', 'text', 'link', 'migrate_field_plugin_manager_test'];
+  protected static $modules = ['system', 'user', 'field', 'migrate_drupal', 'options', 'file', 'text', 'link', 'migrate_field_plugin_manager_test'];
 
   /**
    * Tests that the correct MigrateField plugins are used.
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 72372afc2e..4389663e12 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 932af99037..bf72ed11b5 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 b68c4b467b..71a80a7965 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/i18nVariableTest.php b/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/d6/i18nVariableTest.php
index 8c3e6044eb..8a163cd6ad 100644
--- a/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/d6/i18nVariableTest.php
+++ b/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/d6/i18nVariableTest.php
@@ -16,7 +16,7 @@ class i18nVariableTest 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 20b80957db..3b4ccd48ec 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/d6/EntityContentBaseTest.php b/core/modules/migrate_drupal/tests/src/Kernel/d6/EntityContentBaseTest.php
index 6be7801b6e..597a4fd88b 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/MigrateDrupal6TestBase.php b/core/modules/migrate_drupal/tests/src/Kernel/d6/MigrateDrupal6TestBase.php
index 3a9467e037..e7dcd863d9 100644
--- a/core/modules/migrate_drupal/tests/src/Kernel/d6/MigrateDrupal6TestBase.php
+++ b/core/modules/migrate_drupal/tests/src/Kernel/d6/MigrateDrupal6TestBase.php
@@ -12,7 +12,7 @@
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'datetime',
     'filter',
     'image',
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 1a30489d03..97198722d7 100644
--- a/core/modules/migrate_drupal/tests/src/Kernel/dependencies/MigrateDependenciesTest.php
+++ b/core/modules/migrate_drupal/tests/src/Kernel/dependencies/MigrateDependenciesTest.php
@@ -16,7 +16,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 3c475e2068..307f75e8bc 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'];
 
   /**
    * Tests that only user 1 can access the migrate UI.
diff --git a/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeReviewPageTestBase.php b/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeReviewPageTestBase.php
index 4138bea5b5..a30da0b69d 100644
--- a/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeReviewPageTestBase.php
+++ b/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeReviewPageTestBase.php
@@ -16,7 +16,7 @@
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'language',
     'content_translation',
     'migrate_drupal_ui',
diff --git a/core/modules/migrate_drupal_ui/tests/src/Functional/d6/MigrateUpgrade6Test.php b/core/modules/migrate_drupal_ui/tests/src/Functional/d6/MigrateUpgrade6Test.php
index 71eebe823b..a737864616 100644
--- a/core/modules/migrate_drupal_ui/tests/src/Functional/d6/MigrateUpgrade6Test.php
+++ b/core/modules/migrate_drupal_ui/tests/src/Functional/d6/MigrateUpgrade6Test.php
@@ -19,7 +19,7 @@ class MigrateUpgrade6Test extends MigrateUpgradeExecuteTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'language',
     'content_translation',
     'migrate_drupal_ui',
diff --git a/core/modules/migrate_drupal_ui/tests/src/Functional/d6/files/core/modules/simpletest/files/html-1.txt b/core/modules/migrate_drupal_ui/tests/src/Functional/d6/files/core/modules/simpletest/files/html-1.txt
index 494470d171..95c289632d 100644
--- a/core/modules/migrate_drupal_ui/tests/src/Functional/d6/files/core/modules/simpletest/files/html-1.txt
+++ b/core/modules/migrate_drupal_ui/tests/src/Functional/d6/files/core/modules/simpletest/files/html-1.txt
@@ -1 +1 @@
-<h1>SimpleTest HTML</h1>
\ No newline at end of file
+<h1>SimpleTest HTML</h1>
diff --git a/core/modules/migrate_drupal_ui/tests/src/Functional/d6/files/tmp/some-temp-file.jpg b/core/modules/migrate_drupal_ui/tests/src/Functional/d6/files/tmp/some-temp-file.jpg
index 494470d171..95c289632d 100644
--- a/core/modules/migrate_drupal_ui/tests/src/Functional/d6/files/tmp/some-temp-file.jpg
+++ b/core/modules/migrate_drupal_ui/tests/src/Functional/d6/files/tmp/some-temp-file.jpg
@@ -1 +1 @@
-<h1>SimpleTest HTML</h1>
\ No newline at end of file
+<h1>SimpleTest HTML</h1>
diff --git a/core/modules/migrate_drupal_ui/tests/src/Functional/d7/MigrateUpgrade7Test.php b/core/modules/migrate_drupal_ui/tests/src/Functional/d7/MigrateUpgrade7Test.php
index 385a4e5804..f49e8c5ca5 100644
--- a/core/modules/migrate_drupal_ui/tests/src/Functional/d7/MigrateUpgrade7Test.php
+++ b/core/modules/migrate_drupal_ui/tests/src/Functional/d7/MigrateUpgrade7Test.php
@@ -19,7 +19,7 @@ class MigrateUpgrade7Test extends MigrateUpgradeExecuteTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'file',
     'language',
     'content_translation',
diff --git a/core/modules/migrate_drupal_ui/tests/src/Functional/d7/files/sites/default/files/cube.jpeg b/core/modules/migrate_drupal_ui/tests/src/Functional/d7/files/sites/default/files/cube.jpeg
index 652a7db77d..3b207a592a 100644
--- a/core/modules/migrate_drupal_ui/tests/src/Functional/d7/files/sites/default/files/cube.jpeg
+++ b/core/modules/migrate_drupal_ui/tests/src/Functional/d7/files/sites/default/files/cube.jpeg
@@ -1 +1 @@
-********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
\ No newline at end of file
+********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
diff --git a/core/modules/node/tests/src/Functional/Migrate/d6/MigrateNodeRevisionTest.php b/core/modules/node/tests/src/Functional/Migrate/d6/MigrateNodeRevisionTest.php
index 075e727678..d0c96071cf 100644
--- a/core/modules/node/tests/src/Functional/Migrate/d6/MigrateNodeRevisionTest.php
+++ b/core/modules/node/tests/src/Functional/Migrate/d6/MigrateNodeRevisionTest.php
@@ -14,7 +14,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/Functional/Migrate/d7/NodeMigrateDeriverTest.php b/core/modules/node/tests/src/Functional/Migrate/d7/NodeMigrateDeriverTest.php
index 621cdb6d49..fb9ed7a6d9 100644
--- a/core/modules/node/tests/src/Functional/Migrate/d7/NodeMigrateDeriverTest.php
+++ b/core/modules/node/tests/src/Functional/Migrate/d7/NodeMigrateDeriverTest.php
@@ -11,7 +11,7 @@
  */
 class NodeMigrateDeriverTest extends MigrateDrupal7TestBase {
 
-  public static $modules = ['node'];
+  protected static $modules = ['node'];
 
   public function testBuilder() {
     $process = $this->getMigration('d7_node:test_content_type')->getProcess();
diff --git a/core/modules/node/tests/src/Functional/NodeAccessAutoBubblingTest.php b/core/modules/node/tests/src/Functional/NodeAccessAutoBubblingTest.php
index 20154553fc..6e2a2ae2af 100644
--- a/core/modules/node/tests/src/Functional/NodeAccessAutoBubblingTest.php
+++ b/core/modules/node/tests/src/Functional/NodeAccessAutoBubblingTest.php
@@ -21,7 +21,7 @@ class NodeAccessAutoBubblingTest 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/NodeAccessBaseTableTest.php b/core/modules/node/tests/src/Functional/NodeAccessBaseTableTest.php
index d9e4e8b092..cd8040ba89 100644
--- a/core/modules/node/tests/src/Functional/NodeAccessBaseTableTest.php
+++ b/core/modules/node/tests/src/Functional/NodeAccessBaseTableTest.php
@@ -16,7 +16,7 @@ class NodeAccessBaseTableTest extends NodeTestBase {
    *
    * @var array
    */
-  public static $modules = ['node_access_test', 'views'];
+  protected static $modules = ['node_access_test', 'views'];
 
   /**
    * The installation profile to use with this test.
diff --git a/core/modules/node/tests/src/Functional/NodeAccessFieldTest.php b/core/modules/node/tests/src/Functional/NodeAccessFieldTest.php
index 8028ec9f97..dbcf30c233 100644
--- a/core/modules/node/tests/src/Functional/NodeAccessFieldTest.php
+++ b/core/modules/node/tests/src/Functional/NodeAccessFieldTest.php
@@ -18,7 +18,7 @@ class NodeAccessFieldTest extends NodeTestBase {
    *
    * @var array
    */
-  public static $modules = ['node_access_test', 'field_ui'];
+  protected static $modules = ['node_access_test', 'field_ui'];
 
   /**
    * A user with permission to bypass access content.
diff --git a/core/modules/node/tests/src/Functional/NodeAccessGrantsCacheContextTest.php b/core/modules/node/tests/src/Functional/NodeAccessGrantsCacheContextTest.php
index fa2116ab87..0a5da3e6b3 100644
--- a/core/modules/node/tests/src/Functional/NodeAccessGrantsCacheContextTest.php
+++ b/core/modules/node/tests/src/Functional/NodeAccessGrantsCacheContextTest.php
@@ -15,7 +15,7 @@ class NodeAccessGrantsCacheContextTest extends NodeTestBase {
    *
    * @var array
    */
-  public static $modules = ['node_access_test'];
+  protected static $modules = ['node_access_test'];
 
   /**
    * User with permission to view content.
diff --git a/core/modules/node/tests/src/Functional/NodeAccessLanguageAwareCombinationTest.php b/core/modules/node/tests/src/Functional/NodeAccessLanguageAwareCombinationTest.php
index e388afcbcb..31a5f35765 100644
--- a/core/modules/node/tests/src/Functional/NodeAccessLanguageAwareCombinationTest.php
+++ b/core/modules/node/tests/src/Functional/NodeAccessLanguageAwareCombinationTest.php
@@ -22,7 +22,7 @@ class NodeAccessLanguageAwareCombinationTest extends NodeTestBase {
    *
    * @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/Functional/NodeAccessLanguageAwareTest.php b/core/modules/node/tests/src/Functional/NodeAccessLanguageAwareTest.php
index 48f9dfac36..f041d2438c 100644
--- a/core/modules/node/tests/src/Functional/NodeAccessLanguageAwareTest.php
+++ b/core/modules/node/tests/src/Functional/NodeAccessLanguageAwareTest.php
@@ -21,7 +21,7 @@ class NodeAccessLanguageAwareTest extends NodeTestBase {
    *
    * @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/Functional/NodeAccessLanguageTest.php b/core/modules/node/tests/src/Functional/NodeAccessLanguageTest.php
index 1af5660fe5..5aadddbefa 100644
--- a/core/modules/node/tests/src/Functional/NodeAccessLanguageTest.php
+++ b/core/modules/node/tests/src/Functional/NodeAccessLanguageTest.php
@@ -20,7 +20,7 @@ class NodeAccessLanguageTest extends NodeTestBase {
    *
    * @var array
    */
-  public static $modules = ['language', 'node_access_test'];
+  protected static $modules = ['language', 'node_access_test'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/node/tests/src/Functional/NodeAccessMenuLinkTest.php b/core/modules/node/tests/src/Functional/NodeAccessMenuLinkTest.php
index 6c5bcd4ed0..ddefa1cce4 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'];
 
   /**
    * A user with permission to manage menu links and create nodes.
diff --git a/core/modules/node/tests/src/Functional/NodeAccessPagerTest.php b/core/modules/node/tests/src/Functional/NodeAccessPagerTest.php
index ad6cc54944..ef685c620b 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'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/node/tests/src/Functional/NodeAccessRecordsTest.php b/core/modules/node/tests/src/Functional/NodeAccessRecordsTest.php
index 259ed83efb..853d7f34c9 100644
--- a/core/modules/node/tests/src/Functional/NodeAccessRecordsTest.php
+++ b/core/modules/node/tests/src/Functional/NodeAccessRecordsTest.php
@@ -16,7 +16,7 @@ class NodeAccessRecordsTest extends NodeTestBase {
    *
    * @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/Functional/NodeActionsConfigurationTest.php b/core/modules/node/tests/src/Functional/NodeActionsConfigurationTest.php
index d026902f57..9ff6b79253 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'];
 
   /**
    * Tests configuration of the node_assign_owner_action action.
diff --git a/core/modules/node/tests/src/Functional/NodeAdminTest.php b/core/modules/node/tests/src/Functional/NodeAdminTest.php
index 24a50cf51a..9417ba186b 100644
--- a/core/modules/node/tests/src/Functional/NodeAdminTest.php
+++ b/core/modules/node/tests/src/Functional/NodeAdminTest.php
@@ -43,7 +43,7 @@ class NodeAdminTest extends NodeTestBase {
    *
    * @var array
    */
-  public static $modules = ['views'];
+  protected static $modules = ['views'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/node/tests/src/Functional/NodeBlockFunctionalTest.php b/core/modules/node/tests/src/Functional/NodeBlockFunctionalTest.php
index c203c5017a..738bc0da0b 100644
--- a/core/modules/node/tests/src/Functional/NodeBlockFunctionalTest.php
+++ b/core/modules/node/tests/src/Functional/NodeBlockFunctionalTest.php
@@ -35,7 +35,7 @@ class NodeBlockFunctionalTest extends NodeTestBase {
    *
    * @var array
    */
-  public static $modules = ['block', 'views'];
+  protected static $modules = ['block', 'views'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/node/tests/src/Functional/NodeCacheTagsTest.php b/core/modules/node/tests/src/Functional/NodeCacheTagsTest.php
index ca5a0a9912..dd38908a4b 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 0d4aabe6a0..3ec8140e23 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 1ea8fcc332..c555fcb216 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'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/node/tests/src/Functional/NodeEditFormTest.php b/core/modules/node/tests/src/Functional/NodeEditFormTest.php
index c15ca70bbe..be70c15f61 100644
--- a/core/modules/node/tests/src/Functional/NodeEditFormTest.php
+++ b/core/modules/node/tests/src/Functional/NodeEditFormTest.php
@@ -38,7 +38,7 @@ class NodeEditFormTest extends NodeTestBase {
    *
    * @var string[]
    */
-  public static $modules = ['block', 'node', 'datetime'];
+  protected static $modules = ['block', 'node', 'datetime'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/node/tests/src/Functional/NodeEntityViewModeAlterTest.php b/core/modules/node/tests/src/Functional/NodeEntityViewModeAlterTest.php
index be0f1c0623..f2294b78b0 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'];
 
   /**
    * Create a "Basic page" node and verify its consistency in the database.
diff --git a/core/modules/node/tests/src/Functional/NodeFieldMultilingualTest.php b/core/modules/node/tests/src/Functional/NodeFieldMultilingualTest.php
index 771426d025..ba59e03024 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'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/node/tests/src/Functional/NodeFormSaveChangedTimeTest.php b/core/modules/node/tests/src/Functional/NodeFormSaveChangedTimeTest.php
index 607e68cf0d..7c4fb4b660 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 c4b7139214..a02aa53462 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'];
 
   /**
    * The name of the test node type to create.
diff --git a/core/modules/node/tests/src/Functional/NodeLinksTest.php b/core/modules/node/tests/src/Functional/NodeLinksTest.php
index 7bd725b46b..0950e14ede 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'];
 
   /**
    * Tests that the links can be hidden in the view display settings.
diff --git a/core/modules/node/tests/src/Functional/NodeLoadMultipleTest.php b/core/modules/node/tests/src/Functional/NodeLoadMultipleTest.php
index 2da5d1bbeb..9db35c209c 100644
--- a/core/modules/node/tests/src/Functional/NodeLoadMultipleTest.php
+++ b/core/modules/node/tests/src/Functional/NodeLoadMultipleTest.php
@@ -16,7 +16,7 @@ class NodeLoadMultipleTest extends NodeTestBase {
    *
    * @var array
    */
-  public static $modules = ['views'];
+  protected static $modules = ['views'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/node/tests/src/Functional/NodeQueryAlterTest.php b/core/modules/node/tests/src/Functional/NodeQueryAlterTest.php
index 362a27fc48..1c3503a7cc 100644
--- a/core/modules/node/tests/src/Functional/NodeQueryAlterTest.php
+++ b/core/modules/node/tests/src/Functional/NodeQueryAlterTest.php
@@ -14,7 +14,7 @@ class NodeQueryAlterTest extends NodeTestBase {
    *
    * @var array
    */
-  public static $modules = ['node_access_test'];
+  protected static $modules = ['node_access_test'];
 
   /**
    * User with permission to view content.
diff --git a/core/modules/node/tests/src/Functional/NodeRSSContentTest.php b/core/modules/node/tests/src/Functional/NodeRSSContentTest.php
index 0efa336ade..77015607f6 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'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/node/tests/src/Functional/NodeRevisionsUiBypassAccessTest.php b/core/modules/node/tests/src/Functional/NodeRevisionsUiBypassAccessTest.php
index 186b694774..e120f12706 100644
--- a/core/modules/node/tests/src/Functional/NodeRevisionsUiBypassAccessTest.php
+++ b/core/modules/node/tests/src/Functional/NodeRevisionsUiBypassAccessTest.php
@@ -25,7 +25,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 6c508aee68..f12e6126c8 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'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/node/tests/src/Functional/NodeSyndicateBlockTest.php b/core/modules/node/tests/src/Functional/NodeSyndicateBlockTest.php
index c1daef94c9..03fe59f8cb 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'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/node/tests/src/Functional/NodeTestBase.php b/core/modules/node/tests/src/Functional/NodeTestBase.php
index 2ef0d73c50..fe30c4e636 100644
--- a/core/modules/node/tests/src/Functional/NodeTestBase.php
+++ b/core/modules/node/tests/src/Functional/NodeTestBase.php
@@ -16,7 +16,7 @@
    *
    * @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 8c94f795ad..405247fcfe 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'];
 
   /**
    * A user with permission to bypass access content.
diff --git a/core/modules/node/tests/src/Functional/NodeTranslationUITest.php b/core/modules/node/tests/src/Functional/NodeTranslationUITest.php
index fa0ad13b3c..a8033e2863 100644
--- a/core/modules/node/tests/src/Functional/NodeTranslationUITest.php
+++ b/core/modules/node/tests/src/Functional/NodeTranslationUITest.php
@@ -37,7 +37,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 9c442fd5da..698e14bf5a 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'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/node/tests/src/Functional/NodeTypeTranslationTest.php b/core/modules/node/tests/src/Functional/NodeTypeTranslationTest.php
index 07e61a036d..a85f7fca85 100644
--- a/core/modules/node/tests/src/Functional/NodeTypeTranslationTest.php
+++ b/core/modules/node/tests/src/Functional/NodeTypeTranslationTest.php
@@ -22,7 +22,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 4730427560..205fbbf437 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'];
 
   /**
    * Tests the language extra field display.
diff --git a/core/modules/node/tests/src/Functional/Views/BulkFormAccessTest.php b/core/modules/node/tests/src/Functional/Views/BulkFormAccessTest.php
index 194b9b06ce..2784711081 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'];
 
   /**
    * Views used by this test.
diff --git a/core/modules/node/tests/src/Functional/Views/BulkFormTest.php b/core/modules/node/tests/src/Functional/Views/BulkFormTest.php
index 319890b6fb..e56cd36002 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'];
 
   /**
    * Views used by this test.
diff --git a/core/modules/node/tests/src/Functional/Views/FilterNodeAccessTest.php b/core/modules/node/tests/src/Functional/Views/FilterNodeAccessTest.php
index 7eb7097d9d..83976e422e 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'];
 
   /**
    * Views used by this test.
diff --git a/core/modules/node/tests/src/Functional/Views/FrontPageTest.php b/core/modules/node/tests/src/Functional/Views/FrontPageTest.php
index 37a6b91f3f..69cf143e7c 100644
--- a/core/modules/node/tests/src/Functional/Views/FrontPageTest.php
+++ b/core/modules/node/tests/src/Functional/Views/FrontPageTest.php
@@ -37,7 +37,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/NodeFieldFilterTest.php b/core/modules/node/tests/src/Functional/Views/NodeFieldFilterTest.php
index c2ee2f2763..cdb0816965 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'];
 
   /**
    * Views used by this test.
diff --git a/core/modules/node/tests/src/Functional/Views/NodeLanguageTest.php b/core/modules/node/tests/src/Functional/Views/NodeLanguageTest.php
index d2d1b479a4..b252cfeb33 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'];
 
   /**
    * Views used by this test.
diff --git a/core/modules/node/tests/src/Functional/Views/NodeTestBase.php b/core/modules/node/tests/src/Functional/Views/NodeTestBase.php
index b98778c503..f8a6a3c9d6 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 @@
   /**
    * {@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 d8d088d978..b37fdf3f5f 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'];
 
   /**
    * Views used by this test.
diff --git a/core/modules/node/tests/src/Functional/Views/RowPluginTest.php b/core/modules/node/tests/src/Functional/Views/RowPluginTest.php
index fdd4d45ad2..5708377f31 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'];
 
   /**
    * Views used by this test.
diff --git a/core/modules/node/tests/src/FunctionalJavascript/TestSettingSummariesContentType.php b/core/modules/node/tests/src/FunctionalJavascript/TestSettingSummariesContentType.php
index 4760ee6509..0671c62230 100644
--- a/core/modules/node/tests/src/FunctionalJavascript/TestSettingSummariesContentType.php
+++ b/core/modules/node/tests/src/FunctionalJavascript/TestSettingSummariesContentType.php
@@ -14,7 +14,7 @@ class TestSettingSummariesContentType extends JavascriptTestBase {
   /**
    * {@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 88eb122bb5..f7d4efba89 100644
--- a/core/modules/node/tests/src/Kernel/Action/UnpublishByKeywordActionTest.php
+++ b/core/modules/node/tests/src/Kernel/Action/UnpublishByKeywordActionTest.php
@@ -13,7 +13,7 @@ class UnpublishByKeywordActionTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['action', 'node', 'system', 'user'];
+  protected static $modules = ['action', 'node', 'system', 'user'];
 
   /**
    * Tests creating an action using the node_unpublish_by_keyword_action plugin.
diff --git a/core/modules/node/tests/src/Kernel/Config/NodeImportChangeTest.php b/core/modules/node/tests/src/Kernel/Config/NodeImportChangeTest.php
index e1b17f2c1c..6518a0c403 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 cb985173ae..dfb80fdcc3 100644
--- a/core/modules/node/tests/src/Kernel/Config/NodeImportCreateTest.php
+++ b/core/modules/node/tests/src/Kernel/Config/NodeImportCreateTest.php
@@ -18,7 +18,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 5b393b196b..d0b66f7606 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/d6/MigrateNodeBundleSettingsTest.php b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeBundleSettingsTest.php
index 9f28c065ae..9d188019ad 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/MigrateNodeSettingPromoteTest.php b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeSettingPromoteTest.php
index e7eb008ae7..6dd69f2d0f 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 afd2dc6ed7..d59f63f532 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 58eeca33f6..aaf6863511 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 ce4ce76e96..88e8b5cf50 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 = ['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/MigrateNodeTypeTest.php b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeTypeTest.php
index 9a3e81e150..d43f64c628 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 7daac88309..eed47eb371 100644
--- a/core/modules/node/tests/src/Kernel/Migrate/d6/NodeTranslationRedirectTest.php
+++ b/core/modules/node/tests/src/Kernel/Migrate/d6/NodeTranslationRedirectTest.php
@@ -16,7 +16,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/MigrateNodeDeriverTest.php b/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeDeriverTest.php
index 437126803d..6087e6f493 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/MigrateNodeSettingsTest.php b/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeSettingsTest.php
index dcae81b8c0..c0f5de85b3 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 dc053a8b9e..bf9d6e2af3 100644
--- a/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeTest.php
+++ b/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeTest.php
@@ -20,7 +20,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 0655631565..ed5239ffee 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 b16cd2550e..130aa9d7be 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', 'filter', 'menu_ui'];
+  protected static $modules = ['node', 'text', 'filter', '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 88cc2ade7b..a28c8fe7dc 100644
--- a/core/modules/node/tests/src/Kernel/Migrate/d7/NodeTranslationRedirectTest.php
+++ b/core/modules/node/tests/src/Kernel/Migrate/d7/NodeTranslationRedirectTest.php
@@ -16,7 +16,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/NodeAccessTest.php b/core/modules/node/tests/src/Kernel/NodeAccessTest.php
index 539edcb09b..84a0d52dcd 100644
--- a/core/modules/node/tests/src/Kernel/NodeAccessTest.php
+++ b/core/modules/node/tests/src/Kernel/NodeAccessTest.php
@@ -34,7 +34,7 @@ class NodeAccessTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'node',
     'datetime',
     'user',
diff --git a/core/modules/node/tests/src/Kernel/NodeBodyFieldStorageTest.php b/core/modules/node/tests/src/Kernel/NodeBodyFieldStorageTest.php
index 3dd13496d6..bb60a5c5fd 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() {
     parent::setUp();
diff --git a/core/modules/node/tests/src/Kernel/NodeConditionTest.php b/core/modules/node/tests/src/Kernel/NodeConditionTest.php
index a30867cb8b..15b704e876 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() {
     parent::setUp();
diff --git a/core/modules/node/tests/src/Kernel/NodeFieldAccessTest.php b/core/modules/node/tests/src/Kernel/NodeFieldAccessTest.php
index ae66dca020..0b43affd4a 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 7c7bc03348..453ccab7bb 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 0a0f145dd9..a39b0a6063 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() {
     parent::setUp();
diff --git a/core/modules/node/tests/src/Kernel/NodeOwnerTest.php b/core/modules/node/tests/src/Kernel/NodeOwnerTest.php
index c12f3115c1..0c00164b4c 100644
--- a/core/modules/node/tests/src/Kernel/NodeOwnerTest.php
+++ b/core/modules/node/tests/src/Kernel/NodeOwnerTest.php
@@ -19,7 +19,7 @@ class NodeOwnerTest extends EntityKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'language'];
+  protected static $modules = ['node', 'language'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/node/tests/src/Kernel/NodeTokenReplaceTest.php b/core/modules/node/tests/src/Kernel/NodeTokenReplaceTest.php
index dd39b6d26d..50d6aceab2 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 e111faeaef..97c598feb1 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 d92bd8fd72..95c40d9b6b 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 d5a8db09da..d35d6fee30 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 27e17cc41f..75434abc33 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 fbc28c5ce0..11d63decc4 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 4bc1be0afe..9a78d61da3 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 e7de62b07a..95addeb8a0 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 9d59f43f0b..bd349c6113 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 18d941c8a5..e818cbee00 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/NodeTest.php b/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d7/NodeTest.php
index da4f57efeb..f3b40fdfaa 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 e46bd35a33..c73f834aec 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 5e876b7d4a..45f054110a 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 fa15c0e6ab..15cdfb4f73 100644
--- a/core/modules/node/tests/src/Kernel/SummaryLengthTest.php
+++ b/core/modules/node/tests/src/Kernel/SummaryLengthTest.php
@@ -37,7 +37,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 b216f40fb2..8ffb8b324d 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 78ec67b19c..faea6378ac 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 7c68e8899d..4587d6f2e9 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 287bf48395..3c2ffcaa9c 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 e47bdd038b..3a021bc774 100644
--- a/core/modules/node/tests/src/Kernel/Views/RevisionRelationshipsTest.php
+++ b/core/modules/node/tests/src/Kernel/Views/RevisionRelationshipsTest.php
@@ -20,7 +20,7 @@ class RevisionRelationshipsTest extends ViewsKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['node' , 'node_test_views'];
+  protected static $modules = ['node' , 'node_test_views'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/options/tests/src/Functional/OptionsDynamicValuesTestBase.php b/core/modules/options/tests/src/Functional/OptionsDynamicValuesTestBase.php
index 64e90104cf..94a86bf1a1 100644
--- a/core/modules/options/tests/src/Functional/OptionsDynamicValuesTestBase.php
+++ b/core/modules/options/tests/src/Functional/OptionsDynamicValuesTestBase.php
@@ -17,7 +17,7 @@
    *
    * @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 ec5874b2e0..c6a10378bb 100644
--- a/core/modules/options/tests/src/Functional/OptionsFieldUITest.php
+++ b/core/modules/options/tests/src/Functional/OptionsFieldUITest.php
@@ -18,7 +18,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'];
 
   /**
    * The name of the created content type.
diff --git a/core/modules/options/tests/src/Functional/OptionsFloatFieldImportTest.php b/core/modules/options/tests/src/Functional/OptionsFloatFieldImportTest.php
index befd48e42a..518d12b1d7 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'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/options/tests/src/Functional/OptionsWidgetsTest.php b/core/modules/options/tests/src/Functional/OptionsWidgetsTest.php
index a2157f1f91..ea5cb2d685 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'];
 
   /**
    * A field storage with cardinality 1 to use in this test class.
diff --git a/core/modules/options/tests/src/Kernel/OptionsFieldTest.php b/core/modules/options/tests/src/Kernel/OptionsFieldTest.php
index 401d6bc1da..6395e87c68 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 9098b818b7..121a59550e 100644
--- a/core/modules/options/tests/src/Kernel/OptionsFieldUnitTestBase.php
+++ b/core/modules/options/tests/src/Kernel/OptionsFieldUnitTestBase.php
@@ -16,7 +16,7 @@
    *
    * @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 c5f2902d05..ea35b87ff3 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'];
 
   /**
    * Tests views data generated for file field relationship.
diff --git a/core/modules/options/tests/src/Kernel/Views/OptionsTestBase.php b/core/modules/options/tests/src/Kernel/Views/OptionsTestBase.php
index 9f53e63313..4f612b6a5e 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 @@
    *
    * @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 d0235986c4..801cd1e190 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 bf4951d9b0..01b9cd5c35 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 a43a1f8de2..5910aa508e 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'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/path/tests/src/Functional/PathAliasTest.php b/core/modules/path/tests/src/Functional/PathAliasTest.php
index a12b282d67..7a0e09ca3d 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'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/path/tests/src/Functional/PathContentModerationTest.php b/core/modules/path/tests/src/Functional/PathContentModerationTest.php
index 87f117b9aa..5f813957e3 100644
--- a/core/modules/path/tests/src/Functional/PathContentModerationTest.php
+++ b/core/modules/path/tests/src/Functional/PathContentModerationTest.php
@@ -19,7 +19,7 @@ class PathContentModerationTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'path', 'content_moderation'];
+  protected static $modules = ['node', 'path', 'content_moderation'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/path/tests/src/Functional/PathLanguageTest.php b/core/modules/path/tests/src/Functional/PathLanguageTest.php
index 8e41edeaee..2fa6d07903 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'];
 
   /**
    * An user with permissions to administer content types.
diff --git a/core/modules/path/tests/src/Functional/PathLanguageUiTest.php b/core/modules/path/tests/src/Functional/PathLanguageUiTest.php
index c2e3276246..c9d235b617 100644
--- a/core/modules/path/tests/src/Functional/PathLanguageUiTest.php
+++ b/core/modules/path/tests/src/Functional/PathLanguageUiTest.php
@@ -14,7 +14,7 @@ class PathLanguageUiTest extends PathTestBase {
    *
    * @var array
    */
-  public static $modules = ['path', 'locale', 'locale_test'];
+  protected static $modules = ['path', 'locale', 'locale_test'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/path/tests/src/Functional/PathNodeFormTest.php b/core/modules/path/tests/src/Functional/PathNodeFormTest.php
index ea730fdcfe..79ba527055 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'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/path/tests/src/Functional/PathTaxonomyTermTest.php b/core/modules/path/tests/src/Functional/PathTaxonomyTermTest.php
index 80bedab756..1730d269fa 100644
--- a/core/modules/path/tests/src/Functional/PathTaxonomyTermTest.php
+++ b/core/modules/path/tests/src/Functional/PathTaxonomyTermTest.php
@@ -16,7 +16,7 @@ class PathTaxonomyTermTest extends PathTestBase {
    *
    * @var array
    */
-  public static $modules = ['taxonomy'];
+  protected static $modules = ['taxonomy'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/path/tests/src/Functional/PathTestBase.php b/core/modules/path/tests/src/Functional/PathTestBase.php
index d4b8826d58..e7b9096695 100644
--- a/core/modules/path/tests/src/Functional/PathTestBase.php
+++ b/core/modules/path/tests/src/Functional/PathTestBase.php
@@ -14,7 +14,7 @@
    *
    * @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 0b22cc3ae4..b9542c5568 100644
--- a/core/modules/path/tests/src/Kernel/Migrate/d6/MigrateUrlAliasTest.php
+++ b/core/modules/path/tests/src/Kernel/Migrate/d6/MigrateUrlAliasTest.php
@@ -16,7 +16,7 @@ class MigrateUrlAliasTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['language', 'content_translation', 'path', 'menu_ui'];
+  protected static $modules = ['language', 'content_translation', 'path', 'menu_ui'];
 
   /**
    * {@inheritdoc}
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 2edf258eea..acb2610ea7 100644
--- a/core/modules/path/tests/src/Kernel/Migrate/d7/MigrateUrlAliasTest.php
+++ b/core/modules/path/tests/src/Kernel/Migrate/d7/MigrateUrlAliasTest.php
@@ -14,7 +14,7 @@ class MigrateUrlAliasTest extends MigrateDrupal7TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'content_translation',
     'language',
     'menu_ui',
diff --git a/core/modules/path/tests/src/Kernel/PathItemTest.php b/core/modules/path/tests/src/Kernel/PathItemTest.php
index d7627c3690..f221b752e4 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', 'node', 'user', 'system', 'language', 'content_translation'];
+  protected static $modules = ['path', '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 602e84f42f..10fa6a02e4 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() {
     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 1057dffbee..4cfe6d1226 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 2fdfd361d6..191b0794d9 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/quickedit/tests/src/Kernel/MetadataGeneratorTest.php b/core/modules/quickedit/tests/src/Kernel/MetadataGeneratorTest.php
index 42c4103dca..7849a01eec 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 2943748587..7e84ed9f87 100644
--- a/core/modules/quickedit/tests/src/Kernel/QuickEditTestBase.php
+++ b/core/modules/quickedit/tests/src/Kernel/QuickEditTestBase.php
@@ -16,7 +16,7 @@
    *
    * @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/EntityReferenceFieldAttributesTest.php b/core/modules/rdf/tests/src/Functional/EntityReferenceFieldAttributesTest.php
index b91215db5b..2aa26e24d8 100644
--- a/core/modules/rdf/tests/src/Functional/EntityReferenceFieldAttributesTest.php
+++ b/core/modules/rdf/tests/src/Functional/EntityReferenceFieldAttributesTest.php
@@ -17,7 +17,7 @@ class EntityReferenceFieldAttributesTest extends TaxonomyTestBase {
    *
    * @var array
    */
-  public static $modules = ['rdf', 'field_test', 'file', 'image'];
+  protected static $modules = ['rdf', 'field_test', 'file', 'image'];
 
   /**
    * The name of the taxonomy term reference field used in the test.
diff --git a/core/modules/rdf/tests/src/Functional/FileFieldAttributesTest.php b/core/modules/rdf/tests/src/Functional/FileFieldAttributesTest.php
index ad743580dc..ddf82b6356 100644
--- a/core/modules/rdf/tests/src/Functional/FileFieldAttributesTest.php
+++ b/core/modules/rdf/tests/src/Functional/FileFieldAttributesTest.php
@@ -17,7 +17,7 @@ class FileFieldAttributesTest extends FileFieldTestBase {
    *
    * @var array
    */
-  public static $modules = ['rdf', 'file'];
+  protected static $modules = ['rdf', 'file'];
 
   /**
    * The name of the file field used in the test.
diff --git a/core/modules/rdf/tests/src/Functional/GetRdfNamespacesTest.php b/core/modules/rdf/tests/src/Functional/GetRdfNamespacesTest.php
index 5d31d3ac23..3ce4b4521e 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'];
 
   /**
    * Tests getting RDF namespaces.
diff --git a/core/modules/rdf/tests/src/Functional/NodeAttributesTest.php b/core/modules/rdf/tests/src/Functional/NodeAttributesTest.php
index 87067bd68e..af0180b042 100644
--- a/core/modules/rdf/tests/src/Functional/NodeAttributesTest.php
+++ b/core/modules/rdf/tests/src/Functional/NodeAttributesTest.php
@@ -16,7 +16,7 @@ class NodeAttributesTest extends NodeTestBase {
    *
    * @var array
    */
-  public static $modules = ['rdf'];
+  protected static $modules = ['rdf'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/rdf/tests/src/Functional/TaxonomyAttributesTest.php b/core/modules/rdf/tests/src/Functional/TaxonomyAttributesTest.php
index 346ffb7eb9..bd9c187071 100644
--- a/core/modules/rdf/tests/src/Functional/TaxonomyAttributesTest.php
+++ b/core/modules/rdf/tests/src/Functional/TaxonomyAttributesTest.php
@@ -16,7 +16,7 @@ class TaxonomyAttributesTest extends TaxonomyTestBase {
    *
    * @var array
    */
-  public static $modules = ['rdf', 'views'];
+  protected static $modules = ['rdf', 'views'];
 
   /**
    * Vocabulary created for testing purposes.
diff --git a/core/modules/rdf/tests/src/Functional/UserAttributesTest.php b/core/modules/rdf/tests/src/Functional/UserAttributesTest.php
index 7e98286002..b0c8a1193b 100644
--- a/core/modules/rdf/tests/src/Functional/UserAttributesTest.php
+++ b/core/modules/rdf/tests/src/Functional/UserAttributesTest.php
@@ -16,7 +16,7 @@ class UserAttributesTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['rdf', 'node'];
+  protected static $modules = ['rdf', 'node'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/rdf/tests/src/Kernel/CrudTest.php b/core/modules/rdf/tests/src/Kernel/CrudTest.php
index f8292a38b7..12a5c3dd91 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 fc78691b96..d3d7716c06 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() {
     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 85ae888103..91696e778d 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() {
     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 9312fbc929..e61b5ba3a6 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() {
     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 94f7f24dac..3ec663c976 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'];
+  protected static $modules = ['text', 'filter'];
 
   protected function setUp() {
     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 82ea9efdcc..5568f8357b 100644
--- a/core/modules/rdf/tests/src/Kernel/Field/FieldRdfaTestBase.php
+++ b/core/modules/rdf/tests/src/Kernel/Field/FieldRdfaTestBase.php
@@ -48,7 +48,7 @@
    *
    * @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 30735e3a8b..f63156a293 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 d705b2106d..d28a319ea3 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() {
     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 48bc5b8f6b..34ad8cc59c 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() {
     parent::setUp();
diff --git a/core/modules/rdf/tests/src/Kernel/RdfaAttributesTest.php b/core/modules/rdf/tests/src/Kernel/RdfaAttributesTest.php
index 39f4831223..f3f686802c 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/tests/src/Functional/ResponsiveImageAdminUITest.php b/core/modules/responsive_image/tests/src/Functional/ResponsiveImageAdminUITest.php
index eeaf793fa0..668ab28992 100644
--- a/core/modules/responsive_image/tests/src/Functional/ResponsiveImageAdminUITest.php
+++ b/core/modules/responsive_image/tests/src/Functional/ResponsiveImageAdminUITest.php
@@ -16,7 +16,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'];
 
   /**
    * Drupal\simpletest\WebTestBase\setUp().
diff --git a/core/modules/responsive_image/tests/src/Kernel/ResponsiveImageIntegrationTest.php b/core/modules/responsive_image/tests/src/Kernel/ResponsiveImageIntegrationTest.php
index d48129122b..00641c646b 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'];
+  protected static $modules = ['responsive_image', 'field', 'image', 'file', 'entity_test', 'breakpoint', 'responsive_image_test_module'];
 
   /**
    * Tests integration with entity view display.
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Action/ActionJsonBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Action/ActionJsonBasicAuthTest.php
index bc998ed16d..e391dac671 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/Action/ActionJsonBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Action/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/rest/tests/src/Functional/EntityResource/Action/ActionResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/Action/ActionResourceTestBase.php
index 76aff4bccd..261788a661 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/Action/ActionResourceTestBase.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Action/ActionResourceTestBase.php
@@ -11,7 +11,7 @@
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['user'];
+  protected static $modules = ['user'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Action/ActionXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Action/ActionXmlBasicAuthTest.php
index a81051d9a8..97e58091f6 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/Action/ActionXmlBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Action/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/rest/tests/src/Functional/EntityResource/BaseFieldOverride/BaseFieldOverrideJsonBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/BaseFieldOverride/BaseFieldOverrideJsonBasicAuthTest.php
index 010fa8db11..918d6e7509 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/BaseFieldOverride/BaseFieldOverrideJsonBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/BaseFieldOverride/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/modules/rest/tests/src/Functional/EntityResource/BaseFieldOverride/BaseFieldOverrideResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/BaseFieldOverride/BaseFieldOverrideResourceTestBase.php
index 1f4b03a2cf..449cb20e3e 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/BaseFieldOverride/BaseFieldOverrideResourceTestBase.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/BaseFieldOverride/BaseFieldOverrideResourceTestBase.php
@@ -11,7 +11,7 @@
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['field', 'node'];
+  protected static $modules = ['field', 'node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/BaseFieldOverride/BaseFieldOverrideXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/BaseFieldOverride/BaseFieldOverrideXmlBasicAuthTest.php
index 7793c90417..20b8526dc4 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/BaseFieldOverride/BaseFieldOverrideXmlBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/BaseFieldOverride/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/modules/rest/tests/src/Functional/EntityResource/Block/BlockJsonBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Block/BlockJsonBasicAuthTest.php
index ea690b49a4..c9a1729309 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/Block/BlockJsonBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Block/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/rest/tests/src/Functional/EntityResource/Block/BlockResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/Block/BlockResourceTestBase.php
index 13a456842f..053dac136a 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/Block/BlockResourceTestBase.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Block/BlockResourceTestBase.php
@@ -10,7 +10,7 @@
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['block'];
+  protected static $modules = ['block'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Block/BlockXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Block/BlockXmlBasicAuthTest.php
index 6594f4fdeb..bd3fcf6b5e 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/Block/BlockXmlBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Block/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/rest/tests/src/Functional/EntityResource/BlockContent/BlockContentJsonBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/BlockContent/BlockContentJsonBasicAuthTest.php
index c804632a69..fcc8fbf0e7 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/BlockContent/BlockContentJsonBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/BlockContent/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/rest/tests/src/Functional/EntityResource/BlockContent/BlockContentResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/BlockContent/BlockContentResourceTestBase.php
index f5b3fdcc15..f564ff0ad0 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/BlockContent/BlockContentResourceTestBase.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/BlockContent/BlockContentResourceTestBase.php
@@ -18,7 +18,7 @@
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['block_content'];
+  protected static $modules = ['block_content'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/BlockContent/BlockContentXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/BlockContent/BlockContentXmlBasicAuthTest.php
index c02d2f0d4d..89693f40b7 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/BlockContent/BlockContentXmlBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/BlockContent/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/rest/tests/src/Functional/EntityResource/BlockContentType/BlockContentTypeJsonBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/BlockContentType/BlockContentTypeJsonBasicAuthTest.php
index e46afdcbe0..20ace6107e 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/BlockContentType/BlockContentTypeJsonBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/BlockContentType/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/rest/tests/src/Functional/EntityResource/BlockContentType/BlockContentTypeResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/BlockContentType/BlockContentTypeResourceTestBase.php
index f96f40ec86..2173b969d5 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/BlockContentType/BlockContentTypeResourceTestBase.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/BlockContentType/BlockContentTypeResourceTestBase.php
@@ -10,7 +10,7 @@
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['block_content'];
+  protected static $modules = ['block_content'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/BlockContentType/BlockContentTypeXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/BlockContentType/BlockContentTypeXmlBasicAuthTest.php
index 0f294c5325..70b1cd4f16 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/BlockContentType/BlockContentTypeXmlBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/BlockContentType/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/rest/tests/src/Functional/EntityResource/Comment/CommentJsonBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Comment/CommentJsonBasicAuthTest.php
index e05d733f67..69d0a13405 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/Comment/CommentJsonBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Comment/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/rest/tests/src/Functional/EntityResource/Comment/CommentResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/Comment/CommentResourceTestBase.php
index d3098545cd..9eb5cf71f7 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/Comment/CommentResourceTestBase.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Comment/CommentResourceTestBase.php
@@ -19,7 +19,7 @@
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['comment', 'entity_test'];
+  protected static $modules = ['comment', 'entity_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Comment/CommentXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Comment/CommentXmlBasicAuthTest.php
index c167ea7576..b6a670c615 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/Comment/CommentXmlBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Comment/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/rest/tests/src/Functional/EntityResource/CommentType/CommentTypeJsonBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/CommentType/CommentTypeJsonBasicAuthTest.php
index b91bad8baf..c34174f4c4 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/CommentType/CommentTypeJsonBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/CommentType/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/rest/tests/src/Functional/EntityResource/CommentType/CommentTypeResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/CommentType/CommentTypeResourceTestBase.php
index 9d882117f9..672c215aff 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/CommentType/CommentTypeResourceTestBase.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/CommentType/CommentTypeResourceTestBase.php
@@ -13,7 +13,7 @@
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'comment'];
+  protected static $modules = ['node', 'comment'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/CommentType/CommentTypeXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/CommentType/CommentTypeXmlBasicAuthTest.php
index 04b114ad0a..5d3acb90e4 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/CommentType/CommentTypeXmlBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/CommentType/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/rest/tests/src/Functional/EntityResource/ConfigTest/ConfigTestJsonBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/ConfigTest/ConfigTestJsonBasicAuthTest.php
index 1144e76a16..fb10409a83 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/ConfigTest/ConfigTestJsonBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/ConfigTest/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/rest/tests/src/Functional/EntityResource/ConfigTest/ConfigTestResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/ConfigTest/ConfigTestResourceTestBase.php
index 9fe073b097..2d609dac26 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/ConfigTest/ConfigTestResourceTestBase.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/ConfigTest/ConfigTestResourceTestBase.php
@@ -10,7 +10,7 @@
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['config_test', 'config_test_rest'];
+  protected static $modules = ['config_test', 'config_test_rest'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/ConfigTest/ConfigTestXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/ConfigTest/ConfigTestXmlBasicAuthTest.php
index b1e6f762c5..20d868fb6e 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/ConfigTest/ConfigTestXmlBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/ConfigTest/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/rest/tests/src/Functional/EntityResource/ConfigurableLanguage/ConfigurableLanguageJsonBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/ConfigurableLanguage/ConfigurableLanguageJsonBasicAuthTest.php
index 8b768f32ab..dbfe0200c5 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/ConfigurableLanguage/ConfigurableLanguageJsonBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/ConfigurableLanguage/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/rest/tests/src/Functional/EntityResource/ConfigurableLanguage/ConfigurableLanguageResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/ConfigurableLanguage/ConfigurableLanguageResourceTestBase.php
index cf5be74737..5a2a56a05e 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/ConfigurableLanguage/ConfigurableLanguageResourceTestBase.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/ConfigurableLanguage/ConfigurableLanguageResourceTestBase.php
@@ -12,7 +12,7 @@
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['language'];
+  protected static $modules = ['language'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/ConfigurableLanguage/ConfigurableLanguageXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/ConfigurableLanguage/ConfigurableLanguageXmlBasicAuthTest.php
index 66bdf4d6da..18bd80f7c4 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/ConfigurableLanguage/ConfigurableLanguageXmlBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/ConfigurableLanguage/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/rest/tests/src/Functional/EntityResource/ContactForm/ContactFormJsonBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/ContactForm/ContactFormJsonBasicAuthTest.php
index c41b9a4ef4..d54dcf8f0f 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/ContactForm/ContactFormJsonBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/ContactForm/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/rest/tests/src/Functional/EntityResource/ContactForm/ContactFormResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/ContactForm/ContactFormResourceTestBase.php
index 51e297a7b8..cbad9541fa 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/ContactForm/ContactFormResourceTestBase.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/ContactForm/ContactFormResourceTestBase.php
@@ -13,7 +13,7 @@
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['contact'];
+  protected static $modules = ['contact'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/ContactForm/ContactFormXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/ContactForm/ContactFormXmlBasicAuthTest.php
index 215501dc85..3981b26041 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/ContactForm/ContactFormXmlBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/ContactForm/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/rest/tests/src/Functional/EntityResource/ContentLanguageSettings/ContentLanguageSettingsJsonBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/ContentLanguageSettings/ContentLanguageSettingsJsonBasicAuthTest.php
index 46448153b9..ab2647a14e 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/ContentLanguageSettings/ContentLanguageSettingsJsonBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/ContentLanguageSettings/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/rest/tests/src/Functional/EntityResource/ContentLanguageSettings/ContentLanguageSettingsResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/ContentLanguageSettings/ContentLanguageSettingsResourceTestBase.php
index a8b3f8ca35..9163073ce6 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/ContentLanguageSettings/ContentLanguageSettingsResourceTestBase.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/ContentLanguageSettings/ContentLanguageSettingsResourceTestBase.php
@@ -11,7 +11,7 @@
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['language', 'node'];
+  protected static $modules = ['language', 'node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/ContentLanguageSettings/ContentLanguageSettingsXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/ContentLanguageSettings/ContentLanguageSettingsXmlBasicAuthTest.php
index eb4e9c287c..caedfc7794 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/ContentLanguageSettings/ContentLanguageSettingsXmlBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/ContentLanguageSettings/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/rest/tests/src/Functional/EntityResource/DateFormat/DateFormatJsonBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/DateFormat/DateFormatJsonBasicAuthTest.php
index 71f1f7fd65..0076ab0359 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/DateFormat/DateFormatJsonBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/DateFormat/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/modules/rest/tests/src/Functional/EntityResource/DateFormat/DateFormatResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/DateFormat/DateFormatResourceTestBase.php
index 8fce0fed15..83e49b606d 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/DateFormat/DateFormatResourceTestBase.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/DateFormat/DateFormatResourceTestBase.php
@@ -13,7 +13,7 @@
   /**
    * {@inheritdoc}
    */
-  public static $modules = [];
+  protected static $modules = [];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/DateFormat/DateFormatXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/DateFormat/DateFormatXmlBasicAuthTest.php
index 488a93efc8..7dabb393a7 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/DateFormat/DateFormatXmlBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/DateFormat/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/modules/rest/tests/src/Functional/EntityResource/Editor/EditorJsonBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Editor/EditorJsonBasicAuthTest.php
index 265bd48ee0..2e79426268 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/Editor/EditorJsonBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Editor/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/rest/tests/src/Functional/EntityResource/Editor/EditorResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/Editor/EditorResourceTestBase.php
index 4eb4a6e1b0..231a9e4737 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/Editor/EditorResourceTestBase.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Editor/EditorResourceTestBase.php
@@ -14,7 +14,7 @@
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['ckeditor', 'editor'];
+  protected static $modules = ['ckeditor', 'editor'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Editor/EditorXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Editor/EditorXmlBasicAuthTest.php
index aa1c042794..ec73c37448 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/Editor/EditorXmlBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Editor/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/rest/tests/src/Functional/EntityResource/EntityFormDisplay/EntityFormDisplayJsonBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/EntityFormDisplay/EntityFormDisplayJsonBasicAuthTest.php
index 940e73b51a..2c244275ee 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/EntityFormDisplay/EntityFormDisplayJsonBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/EntityFormDisplay/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/modules/rest/tests/src/Functional/EntityResource/EntityFormDisplay/EntityFormDisplayResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/EntityFormDisplay/EntityFormDisplayResourceTestBase.php
index cc4cf588a7..21756e72ce 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/EntityFormDisplay/EntityFormDisplayResourceTestBase.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/EntityFormDisplay/EntityFormDisplayResourceTestBase.php
@@ -11,7 +11,7 @@
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node'];
+  protected static $modules = ['node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/EntityFormDisplay/EntityFormDisplayXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/EntityFormDisplay/EntityFormDisplayXmlBasicAuthTest.php
index 03a5f4d644..114663831d 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/EntityFormDisplay/EntityFormDisplayXmlBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/EntityFormDisplay/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/modules/rest/tests/src/Functional/EntityResource/EntityFormMode/EntityFormModeJsonBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/EntityFormMode/EntityFormModeJsonBasicAuthTest.php
index 989cd5b919..3265212346 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/EntityFormMode/EntityFormModeJsonBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/EntityFormMode/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/modules/rest/tests/src/Functional/EntityResource/EntityFormMode/EntityFormModeResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/EntityFormMode/EntityFormModeResourceTestBase.php
index a9035e0ad1..2de86dec38 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/EntityFormMode/EntityFormModeResourceTestBase.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/EntityFormMode/EntityFormModeResourceTestBase.php
@@ -12,7 +12,7 @@
    *
    * @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/rest/tests/src/Functional/EntityResource/EntityFormMode/EntityFormModeXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/EntityFormMode/EntityFormModeXmlBasicAuthTest.php
index 53b8f35a1d..33993a5a24 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/EntityFormMode/EntityFormModeXmlBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/EntityFormMode/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/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php
index d631463ba9..a39dab1689 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php
@@ -152,7 +152,7 @@
    *
    * @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/EntityTest/EntityTestJsonBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/EntityTest/EntityTestJsonBasicAuthTest.php
index aff854edd8..44136d0235 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/EntityTest/EntityTestJsonBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/EntityTest/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/rest/tests/src/Functional/EntityResource/EntityTest/EntityTestResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/EntityTest/EntityTestResourceTestBase.php
index 0c82ea95a2..0cc7acca11 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/EntityTest/EntityTestResourceTestBase.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/EntityTest/EntityTestResourceTestBase.php
@@ -16,7 +16,7 @@
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['entity_test'];
+  protected static $modules = ['entity_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/EntityTest/EntityTestTextItemNormalizerTest.php b/core/modules/rest/tests/src/Functional/EntityResource/EntityTest/EntityTestTextItemNormalizerTest.php
index cd8654df4d..bc787cb533 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/EntityTest/EntityTestTextItemNormalizerTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/EntityTest/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/rest/tests/src/Functional/EntityResource/EntityTest/EntityTestXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/EntityTest/EntityTestXmlBasicAuthTest.php
index 55c72465a8..8b1c288860 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/EntityTest/EntityTestXmlBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/EntityTest/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/rest/tests/src/Functional/EntityResource/EntityTestBundle/EntityTestBundleJsonBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/EntityTestBundle/EntityTestBundleJsonBasicAuthTest.php
index 0220801379..a902d7ca5d 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/EntityTestBundle/EntityTestBundleJsonBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/EntityTestBundle/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/rest/tests/src/Functional/EntityResource/EntityTestBundle/EntityTestBundleResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/EntityTestBundle/EntityTestBundleResourceTestBase.php
index f43d877097..ee6638bc25 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/EntityTestBundle/EntityTestBundleResourceTestBase.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/EntityTestBundle/EntityTestBundleResourceTestBase.php
@@ -13,7 +13,7 @@
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['entity_test'];
+  protected static $modules = ['entity_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/EntityTestBundle/EntityTestBundleXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/EntityTestBundle/EntityTestBundleXmlBasicAuthTest.php
index 2c5a4e4a40..ca1b294dd8 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/EntityTestBundle/EntityTestBundleXmlBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/EntityTestBundle/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/rest/tests/src/Functional/EntityResource/EntityTestLabel/EntityTestLabelJsonBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/EntityTestLabel/EntityTestLabelJsonBasicAuthTest.php
index 2a43e038ce..5e28afd5fa 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/EntityTestLabel/EntityTestLabelJsonBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/EntityTestLabel/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/rest/tests/src/Functional/EntityResource/EntityTestLabel/EntityTestLabelResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/EntityTestLabel/EntityTestLabelResourceTestBase.php
index 2257d6c275..298c6d363e 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/EntityTestLabel/EntityTestLabelResourceTestBase.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/EntityTestLabel/EntityTestLabelResourceTestBase.php
@@ -14,7 +14,7 @@
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['entity_test'];
+  protected static $modules = ['entity_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/EntityTestLabel/EntityTestLabelXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/EntityTestLabel/EntityTestLabelXmlBasicAuthTest.php
index 1754d5565f..8ed44847fd 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/EntityTestLabel/EntityTestLabelXmlBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/EntityTestLabel/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/rest/tests/src/Functional/EntityResource/EntityViewDisplay/EntityViewDisplayJsonBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/EntityViewDisplay/EntityViewDisplayJsonBasicAuthTest.php
index 457c42f5eb..023c4940d3 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/EntityViewDisplay/EntityViewDisplayJsonBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/EntityViewDisplay/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/modules/rest/tests/src/Functional/EntityResource/EntityViewDisplay/EntityViewDisplayResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/EntityViewDisplay/EntityViewDisplayResourceTestBase.php
index ccc3aad3c0..482290560c 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/EntityViewDisplay/EntityViewDisplayResourceTestBase.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/EntityViewDisplay/EntityViewDisplayResourceTestBase.php
@@ -11,7 +11,7 @@
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node'];
+  protected static $modules = ['node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/EntityViewDisplay/EntityViewDisplayXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/EntityViewDisplay/EntityViewDisplayXmlBasicAuthTest.php
index 547592d030..ca2d384e8a 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/EntityViewDisplay/EntityViewDisplayXmlBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/EntityViewDisplay/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/modules/rest/tests/src/Functional/EntityResource/EntityViewMode/EntityViewModeJsonBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/EntityViewMode/EntityViewModeJsonBasicAuthTest.php
index 986b31da74..e613498bf3 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/EntityViewMode/EntityViewModeJsonBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/EntityViewMode/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/modules/rest/tests/src/Functional/EntityResource/EntityViewMode/EntityViewModeResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/EntityViewMode/EntityViewModeResourceTestBase.php
index 28cb9b0303..e1c22ea5df 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/EntityViewMode/EntityViewModeResourceTestBase.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/EntityViewMode/EntityViewModeResourceTestBase.php
@@ -12,7 +12,7 @@
    *
    * @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/rest/tests/src/Functional/EntityResource/EntityViewMode/EntityViewModeXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/EntityViewMode/EntityViewModeXmlBasicAuthTest.php
index 57a1f86171..bf6ca7fc42 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/EntityViewMode/EntityViewModeXmlBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/EntityViewMode/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/modules/rest/tests/src/Functional/EntityResource/Feed/FeedJsonBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Feed/FeedJsonBasicAuthTest.php
index e5685c9cd6..0937b4d67e 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/Feed/FeedJsonBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Feed/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/rest/tests/src/Functional/EntityResource/Feed/FeedResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/Feed/FeedResourceTestBase.php
index a89bde1b69..7e1f3941d4 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/Feed/FeedResourceTestBase.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Feed/FeedResourceTestBase.php
@@ -13,7 +13,7 @@
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['aggregator'];
+  protected static $modules = ['aggregator'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Feed/FeedXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Feed/FeedXmlBasicAuthTest.php
index 08dc65d59e..a87979fc73 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/Feed/FeedXmlBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Feed/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/rest/tests/src/Functional/EntityResource/FieldConfig/FieldConfigJsonBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/FieldConfig/FieldConfigJsonBasicAuthTest.php
index 2ab43d31c0..c7cb34db8b 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/FieldConfig/FieldConfigJsonBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/FieldConfig/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/rest/tests/src/Functional/EntityResource/FieldConfig/FieldConfigResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/FieldConfig/FieldConfigResourceTestBase.php
index 05c05f478a..28b09308c8 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/FieldConfig/FieldConfigResourceTestBase.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/FieldConfig/FieldConfigResourceTestBase.php
@@ -12,7 +12,7 @@
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['field', 'node'];
+  protected static $modules = ['field', 'node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/FieldConfig/FieldConfigXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/FieldConfig/FieldConfigXmlBasicAuthTest.php
index ed82264712..308fe36f51 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/FieldConfig/FieldConfigXmlBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/FieldConfig/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/rest/tests/src/Functional/EntityResource/FieldStorageConfig/FieldStorageConfigJsonBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/FieldStorageConfig/FieldStorageConfigJsonBasicAuthTest.php
index 4219cad288..26a172e40d 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/FieldStorageConfig/FieldStorageConfigJsonBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/FieldStorageConfig/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/rest/tests/src/Functional/EntityResource/FieldStorageConfig/FieldStorageConfigResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/FieldStorageConfig/FieldStorageConfigResourceTestBase.php
index aafc2531e7..d1e9d4d5ec 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/FieldStorageConfig/FieldStorageConfigResourceTestBase.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/FieldStorageConfig/FieldStorageConfigResourceTestBase.php
@@ -10,7 +10,7 @@
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node'];
+  protected static $modules = ['node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/FieldStorageConfig/FieldStorageConfigXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/FieldStorageConfig/FieldStorageConfigXmlBasicAuthTest.php
index 6f557227a0..1467b8b473 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/FieldStorageConfig/FieldStorageConfigXmlBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/FieldStorageConfig/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/rest/tests/src/Functional/EntityResource/File/FileJsonBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/File/FileJsonBasicAuthTest.php
index 971555c770..e2f3a958eb 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/File/FileJsonBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/File/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/rest/tests/src/Functional/EntityResource/File/FileResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/File/FileResourceTestBase.php
index 1fa5a3856b..1d976eff8a 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/File/FileResourceTestBase.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/File/FileResourceTestBase.php
@@ -14,7 +14,7 @@
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['file', 'user'];
+  protected static $modules = ['file', 'user'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/File/FileXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/File/FileXmlBasicAuthTest.php
index 55a69c478c..8bde1b15c9 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/File/FileXmlBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/File/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/rest/tests/src/Functional/EntityResource/FilterFormat/FilterFormatJsonBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/FilterFormat/FilterFormatJsonBasicAuthTest.php
index 4e143c33e1..353eb96d3f 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/FilterFormat/FilterFormatJsonBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/FilterFormat/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/rest/tests/src/Functional/EntityResource/FilterFormat/FilterFormatResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/FilterFormat/FilterFormatResourceTestBase.php
index 4d65e00f58..16ba09d4f7 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/FilterFormat/FilterFormatResourceTestBase.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/FilterFormat/FilterFormatResourceTestBase.php
@@ -10,7 +10,7 @@
   /**
    * {@inheritdoc}
    */
-  public static $modules = [];
+  protected static $modules = [];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/FilterFormat/FilterFormatXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/FilterFormat/FilterFormatXmlBasicAuthTest.php
index d1aa25d50f..3747e6adb7 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/FilterFormat/FilterFormatXmlBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/FilterFormat/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/rest/tests/src/Functional/EntityResource/ImageStyle/ImageStyleJsonBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/ImageStyle/ImageStyleJsonBasicAuthTest.php
index 10117505ad..8fb8877bec 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/ImageStyle/ImageStyleJsonBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/ImageStyle/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/rest/tests/src/Functional/EntityResource/ImageStyle/ImageStyleResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/ImageStyle/ImageStyleResourceTestBase.php
index ccd68d95bd..af48030bee 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/ImageStyle/ImageStyleResourceTestBase.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/ImageStyle/ImageStyleResourceTestBase.php
@@ -13,7 +13,7 @@
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['image'];
+  protected static $modules = ['image'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/ImageStyle/ImageStyleXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/ImageStyle/ImageStyleXmlBasicAuthTest.php
index 54febc6cfb..b3bc309910 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/ImageStyle/ImageStyleXmlBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/ImageStyle/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/rest/tests/src/Functional/EntityResource/Item/ItemJsonBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Item/ItemJsonBasicAuthTest.php
index 19b6179c7b..e3ffba411b 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/Item/ItemJsonBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Item/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/rest/tests/src/Functional/EntityResource/Item/ItemResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/Item/ItemResourceTestBase.php
index c7bd57a5c6..26590e1557 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/Item/ItemResourceTestBase.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Item/ItemResourceTestBase.php
@@ -17,7 +17,7 @@
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['aggregator'];
+  protected static $modules = ['aggregator'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Item/ItemXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Item/ItemXmlBasicAuthTest.php
index 8da0a58bad..a85b8b24d8 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/Item/ItemXmlBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Item/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/rest/tests/src/Functional/EntityResource/Media/MediaJsonBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Media/MediaJsonBasicAuthTest.php
index f499b79bd5..a3bb391d80 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/Media/MediaJsonBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Media/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/rest/tests/src/Functional/EntityResource/Media/MediaResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/Media/MediaResourceTestBase.php
index 414b3ebb85..573025d16d 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/Media/MediaResourceTestBase.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Media/MediaResourceTestBase.php
@@ -16,7 +16,7 @@
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['media'];
+  protected static $modules = ['media'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Media/MediaXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Media/MediaXmlBasicAuthTest.php
index bf6cf33214..7c8f482a22 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/Media/MediaXmlBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Media/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/rest/tests/src/Functional/EntityResource/MediaType/MediaTypeJsonBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/MediaType/MediaTypeJsonBasicAuthTest.php
index 052b19d54d..9e5a5110c1 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/MediaType/MediaTypeJsonBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/MediaType/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/rest/tests/src/Functional/EntityResource/MediaType/MediaTypeResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/MediaType/MediaTypeResourceTestBase.php
index ac72737538..2caf9d2727 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/MediaType/MediaTypeResourceTestBase.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/MediaType/MediaTypeResourceTestBase.php
@@ -10,7 +10,7 @@
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['media'];
+  protected static $modules = ['media'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/MediaType/MediaTypeXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/MediaType/MediaTypeXmlBasicAuthTest.php
index 834a83a481..5cbbd2d425 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/MediaType/MediaTypeXmlBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/MediaType/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/rest/tests/src/Functional/EntityResource/Menu/MenuJsonBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Menu/MenuJsonBasicAuthTest.php
index b419eaf139..824b0390fb 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/Menu/MenuJsonBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Menu/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/rest/tests/src/Functional/EntityResource/Menu/MenuResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/Menu/MenuResourceTestBase.php
index dd7f5520fe..747a3b2fba 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/Menu/MenuResourceTestBase.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Menu/MenuResourceTestBase.php
@@ -10,7 +10,7 @@
   /**
    * {@inheritdoc}
    */
-  public static $modules = [];
+  protected static $modules = [];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Menu/MenuXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Menu/MenuXmlBasicAuthTest.php
index 62e1d5941a..ce8632e2c9 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/Menu/MenuXmlBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Menu/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/rest/tests/src/Functional/EntityResource/MenuLinkContent/MenuLinkContentJsonBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/MenuLinkContent/MenuLinkContentJsonBasicAuthTest.php
index 952088b912..b037bdbd66 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/MenuLinkContent/MenuLinkContentJsonBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/MenuLinkContent/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/rest/tests/src/Functional/EntityResource/MenuLinkContent/MenuLinkContentResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/MenuLinkContent/MenuLinkContentResourceTestBase.php
index 0b1f967387..872cffa00f 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/MenuLinkContent/MenuLinkContentResourceTestBase.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/MenuLinkContent/MenuLinkContentResourceTestBase.php
@@ -16,7 +16,7 @@
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['menu_link_content'];
+  protected static $modules = ['menu_link_content'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/MenuLinkContent/MenuLinkContentXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/MenuLinkContent/MenuLinkContentXmlBasicAuthTest.php
index 6a62f36466..ad8ecedecb 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/MenuLinkContent/MenuLinkContentXmlBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/MenuLinkContent/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/rest/tests/src/Functional/EntityResource/Message/MessageJsonBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Message/MessageJsonBasicAuthTest.php
index 1232fb7ba5..d8361eb1d6 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/Message/MessageJsonBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Message/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/rest/tests/src/Functional/EntityResource/Message/MessageResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/Message/MessageResourceTestBase.php
index 3f1cab9b91..4bfce39c61 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/Message/MessageResourceTestBase.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Message/MessageResourceTestBase.php
@@ -13,7 +13,7 @@
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['contact'];
+  protected static $modules = ['contact'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Message/MessageXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Message/MessageXmlBasicAuthTest.php
index 496abc860f..6f8139335f 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/Message/MessageXmlBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Message/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/rest/tests/src/Functional/EntityResource/Node/NodeJsonBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Node/NodeJsonBasicAuthTest.php
index ff7746d76e..56530fe68a 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/Node/NodeJsonBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Node/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/rest/tests/src/Functional/EntityResource/Node/NodeResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/Node/NodeResourceTestBase.php
index fc827ace16..c811164918 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/Node/NodeResourceTestBase.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Node/NodeResourceTestBase.php
@@ -16,7 +16,7 @@
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'path'];
+  protected static $modules = ['node', 'path'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Node/NodeXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Node/NodeXmlBasicAuthTest.php
index 0ea96018e1..0cd519f3e0 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/Node/NodeXmlBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Node/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/rest/tests/src/Functional/EntityResource/NodeType/NodeTypeJsonBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/NodeType/NodeTypeJsonBasicAuthTest.php
index cee2364298..1bb2f0c79f 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/NodeType/NodeTypeJsonBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/NodeType/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/rest/tests/src/Functional/EntityResource/NodeType/NodeTypeResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/NodeType/NodeTypeResourceTestBase.php
index c374bfb7c0..6f49fb2169 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/NodeType/NodeTypeResourceTestBase.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/NodeType/NodeTypeResourceTestBase.php
@@ -13,7 +13,7 @@
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node'];
+  protected static $modules = ['node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/NodeType/NodeTypeXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/NodeType/NodeTypeXmlBasicAuthTest.php
index f26e98018c..30a8acec00 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/NodeType/NodeTypeXmlBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/NodeType/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/rest/tests/src/Functional/EntityResource/RdfMapping/RdfMappingJsonBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/RdfMapping/RdfMappingJsonBasicAuthTest.php
index 857d8c79e1..4d5dd45360 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/RdfMapping/RdfMappingJsonBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/RdfMapping/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/rest/tests/src/Functional/EntityResource/RdfMapping/RdfMappingResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/RdfMapping/RdfMappingResourceTestBase.php
index c826be0f85..ebc11645bd 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/RdfMapping/RdfMappingResourceTestBase.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/RdfMapping/RdfMappingResourceTestBase.php
@@ -11,7 +11,7 @@
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'rdf'];
+  protected static $modules = ['node', 'rdf'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/RdfMapping/RdfMappingXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/RdfMapping/RdfMappingXmlBasicAuthTest.php
index 8f3bae3e38..4b1ab0facb 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/RdfMapping/RdfMappingXmlBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/RdfMapping/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/rest/tests/src/Functional/EntityResource/ResponsiveImageStyle/ResponsiveImageStyleJsonBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/ResponsiveImageStyle/ResponsiveImageStyleJsonBasicAuthTest.php
index dbd6e7c947..2e88afba5e 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/ResponsiveImageStyle/ResponsiveImageStyleJsonBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/ResponsiveImageStyle/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/rest/tests/src/Functional/EntityResource/ResponsiveImageStyle/ResponsiveImageStyleResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/ResponsiveImageStyle/ResponsiveImageStyleResourceTestBase.php
index 4221314571..2177f3967d 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/ResponsiveImageStyle/ResponsiveImageStyleResourceTestBase.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/ResponsiveImageStyle/ResponsiveImageStyleResourceTestBase.php
@@ -13,7 +13,7 @@
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['responsive_image'];
+  protected static $modules = ['responsive_image'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/ResponsiveImageStyle/ResponsiveImageStyleXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/ResponsiveImageStyle/ResponsiveImageStyleXmlBasicAuthTest.php
index fbdeb0cd6b..85d66a46ba 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/ResponsiveImageStyle/ResponsiveImageStyleXmlBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/ResponsiveImageStyle/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/rest/tests/src/Functional/EntityResource/RestResourceConfig/RestResourceConfigJsonBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/RestResourceConfig/RestResourceConfigJsonBasicAuthTest.php
index 136474befd..0e65d8103c 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/RestResourceConfig/RestResourceConfigJsonBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/RestResourceConfig/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/EntityResource/RestResourceConfig/RestResourceConfigResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/RestResourceConfig/RestResourceConfigResourceTestBase.php
index a19e2ef93f..f523397988 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/RestResourceConfig/RestResourceConfigResourceTestBase.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/RestResourceConfig/RestResourceConfigResourceTestBase.php
@@ -10,7 +10,7 @@
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['dblog'];
+  protected static $modules = ['dblog'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/RestResourceConfig/RestResourceConfigXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/RestResourceConfig/RestResourceConfigXmlBasicAuthTest.php
index edbb1503cf..d8094a4631 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/RestResourceConfig/RestResourceConfigXmlBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/RestResourceConfig/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/EntityResource/Role/RoleJsonBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Role/RoleJsonBasicAuthTest.php
index 267a3b89d1..85483eefc5 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/Role/RoleJsonBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Role/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/rest/tests/src/Functional/EntityResource/Role/RoleResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/Role/RoleResourceTestBase.php
index ee719c4b56..5ecb92fef9 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/Role/RoleResourceTestBase.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Role/RoleResourceTestBase.php
@@ -10,7 +10,7 @@
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['user'];
+  protected static $modules = ['user'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Role/RoleXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Role/RoleXmlBasicAuthTest.php
index 9fef07df21..b2d6903012 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/Role/RoleXmlBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Role/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/rest/tests/src/Functional/EntityResource/SearchPage/SearchPageJsonBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/SearchPage/SearchPageJsonBasicAuthTest.php
index 0ee5556da2..0a8e1d1437 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/SearchPage/SearchPageJsonBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/SearchPage/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/rest/tests/src/Functional/EntityResource/SearchPage/SearchPageResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/SearchPage/SearchPageResourceTestBase.php
index eca9ca83f7..ae58df2d0b 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/SearchPage/SearchPageResourceTestBase.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/SearchPage/SearchPageResourceTestBase.php
@@ -10,7 +10,7 @@
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'search'];
+  protected static $modules = ['node', 'search'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/SearchPage/SearchPageXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/SearchPage/SearchPageXmlBasicAuthTest.php
index 784a97867a..244a253e97 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/SearchPage/SearchPageXmlBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/SearchPage/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/rest/tests/src/Functional/EntityResource/Shortcut/ShortcutJsonBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Shortcut/ShortcutJsonBasicAuthTest.php
index 31f1117a92..64a1d8ce7e 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/Shortcut/ShortcutJsonBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Shortcut/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/rest/tests/src/Functional/EntityResource/Shortcut/ShortcutResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/Shortcut/ShortcutResourceTestBase.php
index 36be5b58f0..7b7235f2c1 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/Shortcut/ShortcutResourceTestBase.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Shortcut/ShortcutResourceTestBase.php
@@ -14,7 +14,7 @@
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['comment', 'shortcut'];
+  protected static $modules = ['comment', 'shortcut'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Shortcut/ShortcutXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Shortcut/ShortcutXmlBasicAuthTest.php
index 161ecf2374..820d27f110 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/Shortcut/ShortcutXmlBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Shortcut/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/rest/tests/src/Functional/EntityResource/ShortcutSet/ShortcutSetJsonBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/ShortcutSet/ShortcutSetJsonBasicAuthTest.php
index 388b9def6f..8fa4168c6a 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/ShortcutSet/ShortcutSetJsonBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/ShortcutSet/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/rest/tests/src/Functional/EntityResource/ShortcutSet/ShortcutSetResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/ShortcutSet/ShortcutSetResourceTestBase.php
index 97ae1a66aa..e52a2e7bd6 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/ShortcutSet/ShortcutSetResourceTestBase.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/ShortcutSet/ShortcutSetResourceTestBase.php
@@ -13,7 +13,7 @@
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['shortcut'];
+  protected static $modules = ['shortcut'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/ShortcutSet/ShortcutSetXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/ShortcutSet/ShortcutSetXmlBasicAuthTest.php
index d18007caf0..423eb8b3d0 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/ShortcutSet/ShortcutSetXmlBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/ShortcutSet/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/rest/tests/src/Functional/EntityResource/Term/TermJsonBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Term/TermJsonBasicAuthTest.php
index 97df5c8413..a3fa996a5b 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/Term/TermJsonBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Term/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/rest/tests/src/Functional/EntityResource/Term/TermResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/Term/TermResourceTestBase.php
index 85a4b1a107..5a69678d20 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/Term/TermResourceTestBase.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Term/TermResourceTestBase.php
@@ -16,7 +16,7 @@
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['taxonomy', 'path'];
+  protected static $modules = ['taxonomy', 'path'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Term/TermXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Term/TermXmlBasicAuthTest.php
index 9cbfbeaf70..4a8604fc1d 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/Term/TermXmlBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Term/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/rest/tests/src/Functional/EntityResource/Tour/TourJsonBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Tour/TourJsonBasicAuthTest.php
index 67d7fd3ff9..6141698f1a 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/Tour/TourJsonBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Tour/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/rest/tests/src/Functional/EntityResource/Tour/TourResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/Tour/TourResourceTestBase.php
index 294e3eeac8..cd4749c23d 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/Tour/TourResourceTestBase.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Tour/TourResourceTestBase.php
@@ -10,7 +10,7 @@
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['tour'];
+  protected static $modules = ['tour'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Tour/TourXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Tour/TourXmlBasicAuthTest.php
index 1f1860b07d..a022f8e28b 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/Tour/TourXmlBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Tour/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/rest/tests/src/Functional/EntityResource/User/UserJsonBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/User/UserJsonBasicAuthTest.php
index ea6ddea2dd..2e5637a1dd 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/User/UserJsonBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/User/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/rest/tests/src/Functional/EntityResource/User/UserResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/User/UserResourceTestBase.php
index 7974cba730..d2fdf88366 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/User/UserResourceTestBase.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/User/UserResourceTestBase.php
@@ -15,7 +15,7 @@
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['user'];
+  protected static $modules = ['user'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/User/UserXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/User/UserXmlBasicAuthTest.php
index 2281d33535..8431396fc4 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/User/UserXmlBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/User/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/rest/tests/src/Functional/EntityResource/View/ViewJsonBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/View/ViewJsonBasicAuthTest.php
index 98854f2a22..f5d38d5b07 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/View/ViewJsonBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/View/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/rest/tests/src/Functional/EntityResource/View/ViewResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/View/ViewResourceTestBase.php
index 26ec7bb5c4..1343de3828 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/View/ViewResourceTestBase.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/View/ViewResourceTestBase.php
@@ -10,7 +10,7 @@
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['views'];
+  protected static $modules = ['views'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/View/ViewXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/View/ViewXmlBasicAuthTest.php
index 3059b5cf3e..374ff2c126 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/View/ViewXmlBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/View/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/rest/tests/src/Functional/EntityResource/Vocabulary/VocabularyJsonBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Vocabulary/VocabularyJsonBasicAuthTest.php
index 492a8addde..4eda38052a 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/Vocabulary/VocabularyJsonBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Vocabulary/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/rest/tests/src/Functional/EntityResource/Vocabulary/VocabularyResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/Vocabulary/VocabularyResourceTestBase.php
index 5d03512921..bcb1217943 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/Vocabulary/VocabularyResourceTestBase.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Vocabulary/VocabularyResourceTestBase.php
@@ -10,7 +10,7 @@
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['taxonomy'];
+  protected static $modules = ['taxonomy'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Vocabulary/VocabularyXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Vocabulary/VocabularyXmlBasicAuthTest.php
index a62c5be24b..486043fc4a 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/Vocabulary/VocabularyXmlBasicAuthTest.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Vocabulary/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/rest/tests/src/Functional/ResourceTest.php b/core/modules/rest/tests/src/Functional/ResourceTest.php
index 1e8babe0db..33a66c2829 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'];
 
   /**
    * The entity.
diff --git a/core/modules/rest/tests/src/Functional/ResourceTestBase.php b/core/modules/rest/tests/src/Functional/ResourceTestBase.php
index 8283bef260..5c19995ceb 100644
--- a/core/modules/rest/tests/src/Functional/ResourceTestBase.php
+++ b/core/modules/rest/tests/src/Functional/ResourceTestBase.php
@@ -93,7 +93,7 @@
    *
    * @var array
    */
-  public static $modules = ['rest'];
+  protected static $modules = ['rest'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/rest/tests/src/Functional/Views/ExcludedFieldTokenTest.php b/core/modules/rest/tests/src/Functional/Views/ExcludedFieldTokenTest.php
index cf9913d85a..5eef6fa8fb 100644
--- a/core/modules/rest/tests/src/Functional/Views/ExcludedFieldTokenTest.php
+++ b/core/modules/rest/tests/src/Functional/Views/ExcludedFieldTokenTest.php
@@ -33,7 +33,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/RestExportAuthTest.php b/core/modules/rest/tests/src/Functional/Views/RestExportAuthTest.php
index 24546089cd..476bfcf349 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 6de1ec97ce..5e256972cb 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'];
 
   /**
    * Views used by this test.
diff --git a/core/modules/rest/tests/src/Kernel/Entity/ConfigDependenciesTest.php b/core/modules/rest/tests/src/Kernel/Entity/ConfigDependenciesTest.php
index c885990ff7..e7e60cc131 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 89e9b1dec5..585743307e 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 de75f3ea2c..62dd609b7d 100644
--- a/core/modules/rest/tests/src/Kernel/RequestHandlerTest.php
+++ b/core/modules/rest/tests/src/Kernel/RequestHandlerTest.php
@@ -27,7 +27,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/RestExportAuthTest.php b/core/modules/rest/tests/src/Kernel/Views/RestExportAuthTest.php
index 9d32f7fcd1..0f24c6aa23 100644
--- a/core/modules/rest/tests/src/Kernel/Views/RestExportAuthTest.php
+++ b/core/modules/rest/tests/src/Kernel/Views/RestExportAuthTest.php
@@ -16,7 +16,7 @@ class RestExportAuthTest extends ViewsKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'node',
     'rest',
     'views_ui',
diff --git a/core/modules/rest/tests/src/Kernel/Views/RestExportTest.php b/core/modules/rest/tests/src/Kernel/Views/RestExportTest.php
index f3a8f04f52..04c708cacf 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 829d08bb18..029b523895 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/UnicodeTest.txt b/core/modules/search/tests/UnicodeTest.txt
index af8a65c7ff..05741d6eec 100644
--- a/core/modules/search/tests/UnicodeTest.txt
+++ b/core/modules/search/tests/UnicodeTest.txt
@@ -330,4 +330,4 @@ abcdefghijklmnopqrstuvwxyz
 ｛｜｝～｟｠｡｢｣､･
 ｦｧｨｩｪｫｬｭｮｯｰｱｲｳｴｵｶｷｸｹｺｻｼｽｾｿﾀﾁﾂﾃﾄﾅﾆﾇﾈﾉﾊﾋﾌﾍﾎﾏﾐﾑﾒﾓﾔﾕﾖﾗﾘﾙﾚﾛﾜﾝﾞﾟﾠﾡﾢﾣﾤﾥﾦﾧﾨﾩﾪﾫﾬﾭﾮﾯﾰﾱﾲﾳﾴﾵﾶﾷﾸﾹﾺﾻﾼﾽﾾￂￃￄￅￆￇￊￋￌￍￎￏￒￓￔￕￖￗￚￛￜ
 ￠￡￢￣￤￥￦￨￩￪￫￬￭￮￹￺￻￼�
-𐀀
\ No newline at end of file
+𐀀
diff --git a/core/modules/search/tests/src/Functional/SearchCommentCountToggleTest.php b/core/modules/search/tests/src/Functional/SearchCommentCountToggleTest.php
index 7cd9f8562d..76bbd1182a 100644
--- a/core/modules/search/tests/src/Functional/SearchCommentCountToggleTest.php
+++ b/core/modules/search/tests/src/Functional/SearchCommentCountToggleTest.php
@@ -26,7 +26,7 @@ class SearchCommentCountToggleTest extends SearchTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'comment'];
+  protected static $modules = ['node', 'comment'];
 
   /**
    * A user with permission to search and post comments.
diff --git a/core/modules/search/tests/src/Functional/SearchDateIntervalTest.php b/core/modules/search/tests/src/Functional/SearchDateIntervalTest.php
index 8276913921..46ff50cca1 100644
--- a/core/modules/search/tests/src/Functional/SearchDateIntervalTest.php
+++ b/core/modules/search/tests/src/Functional/SearchDateIntervalTest.php
@@ -16,7 +16,7 @@ class SearchDateIntervalTest extends SearchTestBase {
    *
    * @var string[]
    */
-  public static $modules = ['language', 'search_date_query_alter'];
+  protected static $modules = ['language', 'search_date_query_alter'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/search/tests/src/Functional/SearchKeywordsConditionsTest.php b/core/modules/search/tests/src/Functional/SearchKeywordsConditionsTest.php
index 26bff66bdf..8ea5b16412 100644
--- a/core/modules/search/tests/src/Functional/SearchKeywordsConditionsTest.php
+++ b/core/modules/search/tests/src/Functional/SearchKeywordsConditionsTest.php
@@ -20,7 +20,7 @@ class SearchKeywordsConditionsTest extends SearchTestBase {
    *
    * @var array
    */
-  public static $modules = ['comment', 'search_extra_type', 'test_page_test'];
+  protected static $modules = ['comment', 'search_extra_type', 'test_page_test'];
 
   /**
    * A user with permission to search and post comments.
diff --git a/core/modules/search/tests/src/Functional/SearchMultilingualEntityTest.php b/core/modules/search/tests/src/Functional/SearchMultilingualEntityTest.php
index 9b3a6ddc85..c658058545 100644
--- a/core/modules/search/tests/src/Functional/SearchMultilingualEntityTest.php
+++ b/core/modules/search/tests/src/Functional/SearchMultilingualEntityTest.php
@@ -26,7 +26,7 @@ class SearchMultilingualEntityTest extends SearchTestBase {
    */
   protected $plugin;
 
-  public static $modules = ['language', 'locale', 'comment'];
+  protected static $modules = ['language', 'locale', 'comment'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/search/tests/src/Functional/SearchPageOverrideTest.php b/core/modules/search/tests/src/Functional/SearchPageOverrideTest.php
index 4dfca49d18..c3077f284d 100644
--- a/core/modules/search/tests/src/Functional/SearchPageOverrideTest.php
+++ b/core/modules/search/tests/src/Functional/SearchPageOverrideTest.php
@@ -17,7 +17,7 @@ class SearchPageOverrideTest extends SearchTestBase {
    *
    * @var array
    */
-  public static $modules = ['search_extra_type'];
+  protected static $modules = ['search_extra_type'];
 
   /**
    * A user with permission to administer search.
diff --git a/core/modules/search/tests/src/Functional/SearchSetLocaleTest.php b/core/modules/search/tests/src/Functional/SearchSetLocaleTest.php
index f6923f4320..c8e916dfcb 100644
--- a/core/modules/search/tests/src/Functional/SearchSetLocaleTest.php
+++ b/core/modules/search/tests/src/Functional/SearchSetLocaleTest.php
@@ -14,7 +14,7 @@ class SearchSetLocaleTest extends SearchTestBase {
    *
    * @var array
    */
-  public static $modules = ['comment'];
+  protected static $modules = ['comment'];
 
   /**
    * A node search plugin instance.
diff --git a/core/modules/search/tests/src/Functional/SearchTestBase.php b/core/modules/search/tests/src/Functional/SearchTestBase.php
index 3739b570fa..1f54fcd653 100644
--- a/core/modules/search/tests/src/Functional/SearchTestBase.php
+++ b/core/modules/search/tests/src/Functional/SearchTestBase.php
@@ -15,7 +15,7 @@
    *
    * @var array
    */
-  public static $modules = ['node', 'search', 'dblog'];
+  protected static $modules = ['node', 'search', 'dblog'];
 
   protected function setUp() {
     parent::setUp();
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 a70114a6a9..9ca8a9792d 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 d28bbd824e..625a69a1c6 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/d7/MigrateSearchPageTest.php b/core/modules/search/tests/src/Kernel/Migrate/d7/MigrateSearchPageTest.php
index 86d3b22009..fda72cf4c4 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 = ['node', 'search'];
+  protected static $modules = ['node', 'search'];
 
   /**
    * {@inheritdoc}
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 2306ce7370..47f584a132 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/SearchExcerptTest.php b/core/modules/search/tests/src/Kernel/SearchExcerptTest.php
index e10075d09a..035bf2dc31 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 7037646bc8..1cf52e0441 100644
--- a/core/modules/search/tests/src/Kernel/SearchMatchTest.php
+++ b/core/modules/search/tests/src/Kernel/SearchMatchTest.php
@@ -23,7 +23,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 38af46e994..4332d95c63 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 65c82eb208..f1ac5ace50 100644
--- a/core/modules/serialization/tests/src/Kernel/EntitySerializationTest.php
+++ b/core/modules/serialization/tests/src/Kernel/EntitySerializationTest.php
@@ -22,7 +22,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 3e41d63037..d955baf61c 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/NormalizerTestBase.php b/core/modules/serialization/tests/src/Kernel/NormalizerTestBase.php
index 25299b16f0..9db09bbef9 100644
--- a/core/modules/serialization/tests/src/Kernel/NormalizerTestBase.php
+++ b/core/modules/serialization/tests/src/Kernel/NormalizerTestBase.php
@@ -16,7 +16,7 @@
    *
    * @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 a7ad145e65..b0b6a33f32 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/BcRoutesTest.php b/core/modules/settings_tray/tests/src/Functional/BcRoutesTest.php
index 6750b1c6c0..77dc9f9998 100644
--- a/core/modules/settings_tray/tests/src/Functional/BcRoutesTest.php
+++ b/core/modules/settings_tray/tests/src/Functional/BcRoutesTest.php
@@ -16,7 +16,7 @@ class BcRoutesTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'settings_tray',
   ];
 
diff --git a/core/modules/settings_tray/tests/src/Functional/SettingsTrayTest.php b/core/modules/settings_tray/tests/src/Functional/SettingsTrayTest.php
index aec0392de1..e9fadc8b7b 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/SettingsTrayBlockFormTest.php b/core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayBlockFormTest.php
index 7475dab64a..5bf1135df7 100644
--- a/core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayBlockFormTest.php
+++ b/core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayBlockFormTest.php
@@ -29,7 +29,7 @@ class SettingsTrayBlockFormTest extends OffCanvasTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'node',
     'block',
     'system',
diff --git a/core/modules/shortcut/tests/src/Functional/ShortcutCacheTagsTest.php b/core/modules/shortcut/tests/src/Functional/ShortcutCacheTagsTest.php
index e2d6a226f2..ccbb2136c4 100644
--- a/core/modules/shortcut/tests/src/Functional/ShortcutCacheTagsTest.php
+++ b/core/modules/shortcut/tests/src/Functional/ShortcutCacheTagsTest.php
@@ -18,7 +18,7 @@ class ShortcutCacheTagsTest extends EntityCacheTagsTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['shortcut'];
+  protected static $modules = ['shortcut'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/shortcut/tests/src/Functional/ShortcutLinksTest.php b/core/modules/shortcut/tests/src/Functional/ShortcutLinksTest.php
index 77e88959b9..9227a026e2 100644
--- a/core/modules/shortcut/tests/src/Functional/ShortcutLinksTest.php
+++ b/core/modules/shortcut/tests/src/Functional/ShortcutLinksTest.php
@@ -25,7 +25,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 b897df752d..76da164dce 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 3f9cc87be3..94d78fa052 100644
--- a/core/modules/shortcut/tests/src/Functional/ShortcutTestBase.php
+++ b/core/modules/shortcut/tests/src/Functional/ShortcutTestBase.php
@@ -17,7 +17,7 @@
    *
    * @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 83bf47a495..da9cb95973 100644
--- a/core/modules/shortcut/tests/src/Functional/ShortcutTranslationUITest.php
+++ b/core/modules/shortcut/tests/src/Functional/ShortcutTranslationUITest.php
@@ -23,7 +23,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 f5b01d98af..e52b327cd1 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 b6543723db..d68c9d8c86 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 ae939569cf..b14788143a 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 e685151a5b..f81cc24660 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 e1982de648..302f80dbe6 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 035aec31c9..5dc83f79ef 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 9f8fd3ae66..bc4651cc15 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 0d58c31659..2e43bf700c 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/simpletest/tests/src/Functional/FolderTest.php b/core/modules/simpletest/tests/src/Functional/FolderTest.php
index e57813fa71..d2c93c54f0 100644
--- a/core/modules/simpletest/tests/src/Functional/FolderTest.php
+++ b/core/modules/simpletest/tests/src/Functional/FolderTest.php
@@ -17,7 +17,7 @@ class FolderTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['image'];
+  protected static $modules = ['image'];
 
   public function testFolderSetup() {
     $directory = file_default_scheme() . '://styles';
diff --git a/core/modules/simpletest/tests/src/Functional/OtherInstallationProfileTestsTest.php b/core/modules/simpletest/tests/src/Functional/OtherInstallationProfileTestsTest.php
index ceb7d57f72..e3152f55cc 100644
--- a/core/modules/simpletest/tests/src/Functional/OtherInstallationProfileTestsTest.php
+++ b/core/modules/simpletest/tests/src/Functional/OtherInstallationProfileTestsTest.php
@@ -17,7 +17,7 @@ class OtherInstallationProfileTestsTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['simpletest'];
+  protected static $modules = ['simpletest'];
 
   /**
    * Use the Minimal profile.
diff --git a/core/modules/simpletest/tests/src/Kernel/Migrate/d6/MigrateSimpletestConfigsTest.php b/core/modules/simpletest/tests/src/Kernel/Migrate/d6/MigrateSimpletestConfigsTest.php
index f8f9ffb02c..fe70c16b4e 100644
--- a/core/modules/simpletest/tests/src/Kernel/Migrate/d6/MigrateSimpletestConfigsTest.php
+++ b/core/modules/simpletest/tests/src/Kernel/Migrate/d6/MigrateSimpletestConfigsTest.php
@@ -17,7 +17,7 @@ class MigrateSimpletestConfigsTest extends MigrateDrupal6TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['simpletest'];
+  protected static $modules = ['simpletest'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/simpletest/tests/src/Kernel/Migrate/d7/MigrateSimpletestSettingsTest.php b/core/modules/simpletest/tests/src/Kernel/Migrate/d7/MigrateSimpletestSettingsTest.php
index 6eba6339c8..cc8bd1d2ef 100644
--- a/core/modules/simpletest/tests/src/Kernel/Migrate/d7/MigrateSimpletestSettingsTest.php
+++ b/core/modules/simpletest/tests/src/Kernel/Migrate/d7/MigrateSimpletestSettingsTest.php
@@ -11,7 +11,7 @@
  */
 class MigrateSimpletestSettingsTest extends MigrateDrupal7TestBase {
 
-  public static $modules = ['simpletest'];
+  protected static $modules = ['simpletest'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/statistics/tests/src/Functional/StatisticsAdminTest.php b/core/modules/statistics/tests/src/Functional/StatisticsAdminTest.php
index f4c22bd8a7..900b68de60 100644
--- a/core/modules/statistics/tests/src/Functional/StatisticsAdminTest.php
+++ b/core/modules/statistics/tests/src/Functional/StatisticsAdminTest.php
@@ -19,7 +19,7 @@ class StatisticsAdminTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'statistics'];
+  protected static $modules = ['node', 'statistics'];
 
   /**
    * A user that has permission to administer statistics.
diff --git a/core/modules/statistics/tests/src/Functional/StatisticsAttachedTest.php b/core/modules/statistics/tests/src/Functional/StatisticsAttachedTest.php
index 787c35bff2..c740121792 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 09565aefae..987795822e 100644
--- a/core/modules/statistics/tests/src/Functional/StatisticsLoggingTest.php
+++ b/core/modules/statistics/tests/src/Functional/StatisticsLoggingTest.php
@@ -20,7 +20,7 @@ class StatisticsLoggingTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'statistics', 'block', 'locale'];
+  protected static $modules = ['node', 'statistics', 'block', 'locale'];
 
   /**
    * User with permissions to create and edit pages.
diff --git a/core/modules/statistics/tests/src/Functional/StatisticsTestBase.php b/core/modules/statistics/tests/src/Functional/StatisticsTestBase.php
index 3be95e2ab6..d55db18459 100644
--- a/core/modules/statistics/tests/src/Functional/StatisticsTestBase.php
+++ b/core/modules/statistics/tests/src/Functional/StatisticsTestBase.php
@@ -14,7 +14,7 @@
    *
    * @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/Kernel/Migrate/d6/MigrateNodeCounterTest.php b/core/modules/statistics/tests/src/Kernel/Migrate/d6/MigrateNodeCounterTest.php
index ebd7766386..4fdcb2af92 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 = [
     'menu_ui',
     'node',
     'statistics',
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 a9c18a733b..18cb50a112 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 8cdb9e7073..a87e9824b1 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 = [
     'menu_ui',
     'node',
     'statistics',
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 36e270d8f6..e069b3cfd7 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 0cbc76afec..f2a64c4416 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 11b577f2f2..ba0cf61eb4 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'];
 
   /**
    * Tests the syslog settings page.
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 935af8d8aa..05526264f3 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 ef5d8c305d..4e50cdcd79 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 3b2a587a40..88a059de21 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/tests/modules/entity_test_schema_converter/entity_test_schema_converter.info.yml b/core/modules/system/tests/modules/entity_test_schema_converter/entity_test_schema_converter.info.yml
index b77990a6c1..c980dc4a22 100644
--- a/core/modules/system/tests/modules/entity_test_schema_converter/entity_test_schema_converter.info.yml
+++ b/core/modules/system/tests/modules/entity_test_schema_converter/entity_test_schema_converter.info.yml
@@ -5,4 +5,4 @@ package: Testing
 version: VERSION
 core: 8.x
 dependencies:
-  - entity_test_update
\ No newline at end of file
+  - entity_test_update
diff --git a/core/modules/system/tests/src/Functional/Ajax/OffCanvasDialogTest.php b/core/modules/system/tests/src/Functional/Ajax/OffCanvasDialogTest.php
index 222ebc45d7..8b019aeebd 100644
--- a/core/modules/system/tests/src/Functional/Ajax/OffCanvasDialogTest.php
+++ b/core/modules/system/tests/src/Functional/Ajax/OffCanvasDialogTest.php
@@ -19,7 +19,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 b1e46a2ea5..957c802261 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'];
 
   /**
    * Tests that the batch API progress page uses the correct theme.
diff --git a/core/modules/system/tests/src/Functional/Batch/ProcessingTest.php b/core/modules/system/tests/src/Functional/Batch/ProcessingTest.php
index 2d7c7ae01c..24e83fbe1d 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'];
 
   /**
    * Tests batches triggered outside of form submission.
diff --git a/core/modules/system/tests/src/Functional/Bootstrap/DrupalSetMessageTest.php b/core/modules/system/tests/src/Functional/Bootstrap/DrupalSetMessageTest.php
index 976e8bebfe..246c659455 100644
--- a/core/modules/system/tests/src/Functional/Bootstrap/DrupalSetMessageTest.php
+++ b/core/modules/system/tests/src/Functional/Bootstrap/DrupalSetMessageTest.php
@@ -16,7 +16,7 @@ class DrupalSetMessageTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['system_test'];
+  protected static $modules = ['system_test'];
 
   /**
    * Tests drupal_set_message().
diff --git a/core/modules/system/tests/src/Functional/Cache/SessionExistsCacheContextTest.php b/core/modules/system/tests/src/Functional/Cache/SessionExistsCacheContextTest.php
index 78fb983a61..d2ff3d3b74 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'];
 
   /**
    * Tests \Drupal\Core\Cache\Context\SessionExistsCacheContext::getContext().
diff --git a/core/modules/system/tests/src/Functional/CsrfRequestHeaderTest.php b/core/modules/system/tests/src/Functional/CsrfRequestHeaderTest.php
index c6d7b35dad..9549763b88 100644
--- a/core/modules/system/tests/src/Functional/CsrfRequestHeaderTest.php
+++ b/core/modules/system/tests/src/Functional/CsrfRequestHeaderTest.php
@@ -18,7 +18,7 @@ class CsrfRequestHeaderTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['system', 'csrf_test'];
+  protected static $modules = ['system', 'csrf_test'];
 
   /**
    * Tests access to routes protected by CSRF request header requirements.
diff --git a/core/modules/system/tests/src/Functional/Database/DatabaseTestBase.php b/core/modules/system/tests/src/Functional/Database/DatabaseTestBase.php
index a28c1dba23..9193ee1032 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 @@
   /**
    * {@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 5226585790..a5f0385edf 100644
--- a/core/modules/system/tests/src/Functional/Database/TemporaryQueryTest.php
+++ b/core/modules/system/tests/src/Functional/Database/TemporaryQueryTest.php
@@ -12,7 +12,7 @@ class TemporaryQueryTest extends DatabaseTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['database_test'];
+  protected static $modules = ['database_test'];
 
   /**
    * Returns the number of rows of a table.
diff --git a/core/modules/system/tests/src/Functional/Datetime/DrupalDateTimeTest.php b/core/modules/system/tests/src/Functional/Datetime/DrupalDateTimeTest.php
index d2114fdf8e..567748b6b2 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 = [];
 
   /**
    * Test setup.
diff --git a/core/modules/system/tests/src/Functional/DrupalKernel/ContainerRebuildWebTest.php b/core/modules/system/tests/src/Functional/DrupalKernel/ContainerRebuildWebTest.php
index 828b92f289..37e64244ad 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'];
 
   /**
    * Sets a different deployment identifier.
diff --git a/core/modules/system/tests/src/Functional/Entity/ConfigEntityImportTest.php b/core/modules/system/tests/src/Functional/Entity/ConfigEntityImportTest.php
index 6c5a9d64c5..58edb42444 100644
--- a/core/modules/system/tests/src/Functional/Entity/ConfigEntityImportTest.php
+++ b/core/modules/system/tests/src/Functional/Entity/ConfigEntityImportTest.php
@@ -21,7 +21,7 @@ class ConfigEntityImportTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['action', 'block', 'filter', 'image', 'search', 'search_extra_type'];
+  protected static $modules = ['action', 'block', 'filter', 'image', 'search', 'search_extra_type'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Entity/EntityAddUITest.php b/core/modules/system/tests/src/Functional/Entity/EntityAddUITest.php
index a16614f146..756ebb524b 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'];
 
   /**
    * Tests the add page for an entity type using bundle entities.
diff --git a/core/modules/system/tests/src/Functional/Entity/EntityCacheTagsTestBase.php b/core/modules/system/tests/src/Functional/Entity/EntityCacheTagsTestBase.php
index aa9452a4ba..b574043d09 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 @@
    *
    * @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/EntityListBuilderTest.php b/core/modules/system/tests/src/Functional/Entity/EntityListBuilderTest.php
index 94225f4e97..fe6bb2a460 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 b020f42870..fc17850675 100644
--- a/core/modules/system/tests/src/Functional/Entity/EntityOperationsTest.php
+++ b/core/modules/system/tests/src/Functional/Entity/EntityOperationsTest.php
@@ -16,7 +16,7 @@ class EntityOperationsTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['entity_test'];
+  protected static $modules = ['entity_test'];
 
   protected function setUp() {
     parent::setUp();
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 3772f3a97b..5677908c78 100644
--- a/core/modules/system/tests/src/Functional/Entity/EntityReferenceSelection/EntityReferenceSelectionAccessTest.php
+++ b/core/modules/system/tests/src/Functional/Entity/EntityReferenceSelection/EntityReferenceSelectionAccessTest.php
@@ -26,7 +26,7 @@ class EntityReferenceSelectionAccessTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'comment'];
+  protected static $modules = ['node', 'comment'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/system/tests/src/Functional/Entity/EntityRevisionsTest.php b/core/modules/system/tests/src/Functional/Entity/EntityRevisionsTest.php
index bf8bcb337f..c5cbff2156 100644
--- a/core/modules/system/tests/src/Functional/Entity/EntityRevisionsTest.php
+++ b/core/modules/system/tests/src/Functional/Entity/EntityRevisionsTest.php
@@ -21,7 +21,7 @@ class EntityRevisionsTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['entity_test', 'language'];
+  protected static $modules = ['entity_test', 'language'];
 
   /**
    * A user with permission to administer entity_test content.
diff --git a/core/modules/system/tests/src/Functional/Entity/EntityViewControllerTest.php b/core/modules/system/tests/src/Functional/Entity/EntityViewControllerTest.php
index 3637369753..2fc1c090cf 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'];
 
   /**
    * Array of test entities.
diff --git a/core/modules/system/tests/src/Functional/Form/AlterTest.php b/core/modules/system/tests/src/Functional/Form/AlterTest.php
index 622a3d1ead..f857f47f22 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'];
 
   /**
    * Tests execution order of hook_form_alter() and hook_form_FORM_ID_alter().
diff --git a/core/modules/system/tests/src/Functional/Form/ArbitraryRebuildTest.php b/core/modules/system/tests/src/Functional/Form/ArbitraryRebuildTest.php
index e35ac6d08a..9d243ba311 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'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/system/tests/src/Functional/Form/CheckboxTest.php b/core/modules/system/tests/src/Functional/Form/CheckboxTest.php
index 60fad6a2e8..40eb6a4ae4 100644
--- a/core/modules/system/tests/src/Functional/Form/CheckboxTest.php
+++ b/core/modules/system/tests/src/Functional/Form/CheckboxTest.php
@@ -17,7 +17,7 @@ class CheckboxTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['form_test'];
+  protected static $modules = ['form_test'];
 
   public function testFormCheckbox() {
     // Ensure that the checked state is determined and rendered correctly for
diff --git a/core/modules/system/tests/src/Functional/Form/ConfirmFormTest.php b/core/modules/system/tests/src/Functional/Form/ConfirmFormTest.php
index c65546a481..811fa5d24d 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'];
 
   public function testConfirmForm() {
     // Test the building of the form.
diff --git a/core/modules/system/tests/src/Functional/Form/ElementTest.php b/core/modules/system/tests/src/Functional/Form/ElementTest.php
index 57da8daf27..10de2123fd 100644
--- a/core/modules/system/tests/src/Functional/Form/ElementTest.php
+++ b/core/modules/system/tests/src/Functional/Form/ElementTest.php
@@ -16,7 +16,7 @@ class ElementTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['form_test'];
+  protected static $modules = ['form_test'];
 
   /**
    * Tests placeholder text for elements that support placeholders.
diff --git a/core/modules/system/tests/src/Functional/Form/ElementsAccessTest.php b/core/modules/system/tests/src/Functional/Form/ElementsAccessTest.php
index 1a92893c39..039ada39d9 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'];
 
   /**
    * Ensures that child values are still processed when #access = FALSE.
diff --git a/core/modules/system/tests/src/Functional/Form/ElementsContainerTest.php b/core/modules/system/tests/src/Functional/Form/ElementsContainerTest.php
index a7d404b86b..8a555d713f 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'];
 
   /**
    * Tests the #optional container property.
diff --git a/core/modules/system/tests/src/Functional/Form/ElementsLabelsTest.php b/core/modules/system/tests/src/Functional/Form/ElementsLabelsTest.php
index 6747ed63fb..041c3c2df9 100644
--- a/core/modules/system/tests/src/Functional/Form/ElementsLabelsTest.php
+++ b/core/modules/system/tests/src/Functional/Form/ElementsLabelsTest.php
@@ -16,7 +16,7 @@ class ElementsLabelsTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['form_test'];
+  protected static $modules = ['form_test'];
 
   /**
    * Test form elements, labels, title attributes and required marks output
diff --git a/core/modules/system/tests/src/Functional/Form/ElementsVerticalTabsTest.php b/core/modules/system/tests/src/Functional/Form/ElementsVerticalTabsTest.php
index 07f25fef6b..a2c933be73 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'];
 
   /**
    * A user with permission to access vertical_tab_test_tabs.
diff --git a/core/modules/system/tests/src/Functional/Form/EmailTest.php b/core/modules/system/tests/src/Functional/Form/EmailTest.php
index 2fe6ebe907..6468a36080 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'];
 
   /**
    * Tests that #type 'email' fields are properly validated.
diff --git a/core/modules/system/tests/src/Functional/Form/FormObjectTest.php b/core/modules/system/tests/src/Functional/Form/FormObjectTest.php
index 34ebb2e79a..3a0c91e049 100644
--- a/core/modules/system/tests/src/Functional/Form/FormObjectTest.php
+++ b/core/modules/system/tests/src/Functional/Form/FormObjectTest.php
@@ -17,7 +17,7 @@ class FormObjectTest extends SystemConfigFormTestBase {
    *
    * @var array
    */
-  public static $modules = ['form_test'];
+  protected static $modules = ['form_test'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/system/tests/src/Functional/Form/FormStoragePageCacheTest.php b/core/modules/system/tests/src/Functional/Form/FormStoragePageCacheTest.php
index 474a35b55a..c5d2357c5a 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 87c7632457..f05572c6a0 100644
--- a/core/modules/system/tests/src/Functional/Form/FormTest.php
+++ b/core/modules/system/tests/src/Functional/Form/FormTest.php
@@ -25,7 +25,7 @@ class FormTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['filter', 'form_test', 'file', 'datetime'];
+  protected static $modules = ['filter', 'form_test', 'file', 'datetime'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/system/tests/src/Functional/Form/LanguageSelectElementTest.php b/core/modules/system/tests/src/Functional/Form/LanguageSelectElementTest.php
index 1bfa19f482..c6849843db 100644
--- a/core/modules/system/tests/src/Functional/Form/LanguageSelectElementTest.php
+++ b/core/modules/system/tests/src/Functional/Form/LanguageSelectElementTest.php
@@ -20,7 +20,7 @@ class LanguageSelectElementTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['form_test', 'language'];
+  protected static $modules = ['form_test', 'language'];
 
   /**
    * Tests that the options printed by the language select element are correct.
diff --git a/core/modules/system/tests/src/Functional/Form/ModulesListFormWebTest.php b/core/modules/system/tests/src/Functional/Form/ModulesListFormWebTest.php
index dc63e64d72..7420ded71a 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/RedirectTest.php b/core/modules/system/tests/src/Functional/Form/RedirectTest.php
index 62253a681b..9909f51af1 100644
--- a/core/modules/system/tests/src/Functional/Form/RedirectTest.php
+++ b/core/modules/system/tests/src/Functional/Form/RedirectTest.php
@@ -16,7 +16,7 @@ class RedirectTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['form_test', 'block'];
+  protected static $modules = ['form_test', 'block'];
 
   /**
    * Tests form redirection.
diff --git a/core/modules/system/tests/src/Functional/Form/ResponseTest.php b/core/modules/system/tests/src/Functional/Form/ResponseTest.php
index de5d8fd6c7..a043c46693 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'];
 
   /**
    * Tests that enforced responses propagate through subscribers and middleware.
diff --git a/core/modules/system/tests/src/Functional/Form/StateValuesCleanAdvancedTest.php b/core/modules/system/tests/src/Functional/Form/StateValuesCleanAdvancedTest.php
index d30b4f110b..11746b6503 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'];
 
   /**
    * An image file path for uploading.
diff --git a/core/modules/system/tests/src/Functional/Form/StateValuesCleanTest.php b/core/modules/system/tests/src/Functional/Form/StateValuesCleanTest.php
index 6266487244..07dea28bab 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'];
 
   /**
    * Tests \Drupal\Core\Form\FormState::cleanValues().
diff --git a/core/modules/system/tests/src/Functional/Form/SystemConfigFormTest.php b/core/modules/system/tests/src/Functional/Form/SystemConfigFormTest.php
index 09ad06ac8c..c3304fb33a 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'];
 
   /**
    * Tests the SystemConfigFormTestBase class.
diff --git a/core/modules/system/tests/src/Functional/Form/UrlTest.php b/core/modules/system/tests/src/Functional/Form/UrlTest.php
index 82d227bbdf..c4d2c61189 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 094a0af73c..799b2da751 100644
--- a/core/modules/system/tests/src/Functional/Form/ValidationTest.php
+++ b/core/modules/system/tests/src/Functional/Form/ValidationTest.php
@@ -17,7 +17,7 @@ class ValidationTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['form_test'];
+  protected static $modules = ['form_test'];
 
   /**
    * Tests #element_validate and #validate.
diff --git a/core/modules/system/tests/src/Functional/Lock/LockFunctionalTest.php b/core/modules/system/tests/src/Functional/Lock/LockFunctionalTest.php
index 0b13f18d62..7af09ad671 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'];
 
   /**
    * Confirms that we can acquire and release locks in two parallel requests.
diff --git a/core/modules/system/tests/src/Functional/Mail/MailTest.php b/core/modules/system/tests/src/Functional/Mail/MailTest.php
index e8accddb6f..cae6343e36 100644
--- a/core/modules/system/tests/src/Functional/Mail/MailTest.php
+++ b/core/modules/system/tests/src/Functional/Mail/MailTest.php
@@ -19,7 +19,7 @@ class MailTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['simpletest', 'system_mail_failure_test'];
+  protected static $modules = ['simpletest', 'system_mail_failure_test'];
 
   /**
    * Assert that the pluggable mail system is functional.
diff --git a/core/modules/system/tests/src/Functional/Menu/BreadcrumbTest.php b/core/modules/system/tests/src/Functional/Menu/BreadcrumbTest.php
index 0e493e5d68..edcf385c03 100644
--- a/core/modules/system/tests/src/Functional/Menu/BreadcrumbTest.php
+++ b/core/modules/system/tests/src/Functional/Menu/BreadcrumbTest.php
@@ -21,7 +21,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 f7b9aafae4..2a78b118d5 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 12a157d587..458a226aa1 100644
--- a/core/modules/system/tests/src/Functional/Menu/LocalTasksTest.php
+++ b/core/modules/system/tests/src/Functional/Menu/LocalTasksTest.php
@@ -18,7 +18,7 @@ class LocalTasksTest extends BrowserTestBase {
    *
    * @var string[]
    */
-  public static $modules = ['block', 'menu_test', 'entity_test'];
+  protected static $modules = ['block', 'menu_test', 'entity_test'];
 
   /**
    * The local tasks block under testing.
diff --git a/core/modules/system/tests/src/Functional/Menu/MenuAccessTest.php b/core/modules/system/tests/src/Functional/Menu/MenuAccessTest.php
index 10af396a6d..2c95315d40 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 c58bf8e504..8432a676b1 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'];
 
   /**
    * Ensures that a menu link does not cause an XSS issue.
diff --git a/core/modules/system/tests/src/Functional/Menu/MenuRouterTest.php b/core/modules/system/tests/src/Functional/Menu/MenuRouterTest.php
index 7669e1875a..e30eaef9a9 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'];
 
   /**
    * Name of the administrative theme to use for tests.
diff --git a/core/modules/system/tests/src/Functional/Module/InstallTest.php b/core/modules/system/tests/src/Functional/Module/InstallTest.php
index ccbca6d312..8026549863 100644
--- a/core/modules/system/tests/src/Functional/Module/InstallTest.php
+++ b/core/modules/system/tests/src/Functional/Module/InstallTest.php
@@ -17,7 +17,7 @@ class InstallTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['module_test'];
+  protected static $modules = ['module_test'];
 
   /**
    * Verify that drupal_get_schema() can be used during module installation.
diff --git a/core/modules/system/tests/src/Functional/Module/InstallUninstallTest.php b/core/modules/system/tests/src/Functional/Module/InstallUninstallTest.php
index 4d8f30d65c..e7edb15118 100644
--- a/core/modules/system/tests/src/Functional/Module/InstallUninstallTest.php
+++ b/core/modules/system/tests/src/Functional/Module/InstallUninstallTest.php
@@ -15,7 +15,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 abdbe03916..1f295377d3 100644
--- a/core/modules/system/tests/src/Functional/Module/ModuleTestBase.php
+++ b/core/modules/system/tests/src/Functional/Module/ModuleTestBase.php
@@ -18,7 +18,7 @@
    *
    * @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 86d06e35ee..e8d61f716b 100644
--- a/core/modules/system/tests/src/Functional/Module/PrepareUninstallTest.php
+++ b/core/modules/system/tests/src/Functional/Module/PrepareUninstallTest.php
@@ -34,7 +34,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 2b17b8fcf6..498d11d60a 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'];
 
   /**
    * Tests the hook_modules_uninstalled() of the user module.
diff --git a/core/modules/system/tests/src/Functional/ParamConverter/UpcastingTest.php b/core/modules/system/tests/src/Functional/ParamConverter/UpcastingTest.php
index faafe84600..404137aafa 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'];
 
   /**
    * Confirms that all parameters are converted as expected.
diff --git a/core/modules/system/tests/src/Functional/Path/UrlAlterFunctionalTest.php b/core/modules/system/tests/src/Functional/Path/UrlAlterFunctionalTest.php
index 271774169f..3c1d7e380c 100644
--- a/core/modules/system/tests/src/Functional/Path/UrlAlterFunctionalTest.php
+++ b/core/modules/system/tests/src/Functional/Path/UrlAlterFunctionalTest.php
@@ -19,7 +19,7 @@ class UrlAlterFunctionalTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['path', 'forum', 'url_alter_test'];
+  protected static $modules = ['path', 'forum', 'url_alter_test'];
 
   /**
    * Test that URL altering works and that it occurs in the correct order.
diff --git a/core/modules/system/tests/src/Functional/Render/AjaxPageStateTest.php b/core/modules/system/tests/src/Functional/Render/AjaxPageStateTest.php
index 6f5dc7da68..ad38d334de 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'];
 
   /**
    * User account with all available permissions
diff --git a/core/modules/system/tests/src/Functional/Render/DisplayVariantTest.php b/core/modules/system/tests/src/Functional/Render/DisplayVariantTest.php
index 2f5415ba7c..47517ed41c 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'];
 
   /**
    * Tests selecting the variant and passing configuration.
diff --git a/core/modules/system/tests/src/Functional/Render/PlaceholderMessageTest.php b/core/modules/system/tests/src/Functional/Render/PlaceholderMessageTest.php
index 185ca4985a..0d7a1e9935 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'];
 
   /**
    * Test rendering of message placeholder.
diff --git a/core/modules/system/tests/src/Functional/Render/RenderArrayNonHtmlSubscriberTest.php b/core/modules/system/tests/src/Functional/Render/RenderArrayNonHtmlSubscriberTest.php
index 08380dec02..08674b829e 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'];
 
   /**
    * Tests handling of responses by events subscriber.
diff --git a/core/modules/system/tests/src/Functional/Routing/RouterPermissionTest.php b/core/modules/system/tests/src/Functional/Routing/RouterPermissionTest.php
index 62a511f2e4..4071d84a1f 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'];
 
   /**
    * Tests permission requirements on routes.
diff --git a/core/modules/system/tests/src/Functional/ServiceProvider/ServiceProviderWebTest.php b/core/modules/system/tests/src/Functional/ServiceProvider/ServiceProviderWebTest.php
index 73d6910087..f71c18c13c 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'];
 
   /**
    * Tests that module service providers get registered to the DIC.
diff --git a/core/modules/system/tests/src/Functional/System/DateTimeTest.php b/core/modules/system/tests/src/Functional/System/DateTimeTest.php
index bdecab5d4c..900ada6831 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'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/system/tests/src/Functional/System/MainContentFallbackTest.php b/core/modules/system/tests/src/Functional/System/MainContentFallbackTest.php
index 931b84ce24..d197d4a0c1 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'];
 
   protected $adminUser;
   protected $webUser;
diff --git a/core/modules/system/tests/src/Functional/System/ResponseGeneratorTest.php b/core/modules/system/tests/src/Functional/System/ResponseGeneratorTest.php
index 592364636d..34013d9412 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/StatusTest.php b/core/modules/system/tests/src/Functional/System/StatusTest.php
index 1ec4fb5aab..45ebe8d989 100644
--- a/core/modules/system/tests/src/Functional/System/StatusTest.php
+++ b/core/modules/system/tests/src/Functional/System/StatusTest.php
@@ -17,7 +17,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 b3f9b310b3..42af534038 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'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/system/tests/src/Functional/Theme/EngineNyanCatTest.php b/core/modules/system/tests/src/Functional/Theme/EngineNyanCatTest.php
index 6dca1b38d3..0f0c3ef466 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'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/system/tests/src/Functional/Theme/FastTest.php b/core/modules/system/tests/src/Functional/Theme/FastTest.php
index d8f85f1f4a..188b236168 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'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/system/tests/src/Functional/Theme/ThemeEarlyInitializationTest.php b/core/modules/system/tests/src/Functional/Theme/ThemeEarlyInitializationTest.php
index 040dfabfce..c955628614 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'];
 
   /**
    * Test that the theme system can generate output in a request listener.
diff --git a/core/modules/system/tests/src/Functional/Theme/ThemeInfoTest.php b/core/modules/system/tests/src/Functional/Theme/ThemeInfoTest.php
index e372bb262a..5aa164277a 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'];
 
   /**
    * The theme handler used in this test for enabling themes.
diff --git a/core/modules/system/tests/src/Functional/Theme/TwigExtensionTest.php b/core/modules/system/tests/src/Functional/Theme/TwigExtensionTest.php
index 5e3bc722e3..fff6067893 100644
--- a/core/modules/system/tests/src/Functional/Theme/TwigExtensionTest.php
+++ b/core/modules/system/tests/src/Functional/Theme/TwigExtensionTest.php
@@ -16,7 +16,7 @@ class TwigExtensionTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['theme_test', 'twig_extension_test'];
+  protected static $modules = ['theme_test', 'twig_extension_test'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/system/tests/src/Functional/Theme/TwigLoaderTest.php b/core/modules/system/tests/src/Functional/Theme/TwigLoaderTest.php
index d2b0b5465d..af7bea32c5 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'];
 
   /**
    * Tests adding an additional twig loader to the loader chain.
diff --git a/core/modules/system/tests/src/Functional/Theme/TwigRegistryLoaderTest.php b/core/modules/system/tests/src/Functional/Theme/TwigRegistryLoaderTest.php
index 2446289984..d6cd472e61 100644
--- a/core/modules/system/tests/src/Functional/Theme/TwigRegistryLoaderTest.php
+++ b/core/modules/system/tests/src/Functional/Theme/TwigRegistryLoaderTest.php
@@ -16,7 +16,7 @@ class TwigRegistryLoaderTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['twig_theme_test', 'block'];
+  protected static $modules = ['twig_theme_test', 'block'];
 
   /**
    * @var \Drupal\Core\Template\TwigEnvironment
diff --git a/core/modules/system/tests/src/Functional/Theme/TwigSettingsTest.php b/core/modules/system/tests/src/Functional/Theme/TwigSettingsTest.php
index 0ad88ce320..696e07a63b 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'];
 
   /**
    * Ensures Twig template auto reload setting can be overridden.
diff --git a/core/modules/system/tests/src/Functional/Update/DependencyHookInvocationTest.php b/core/modules/system/tests/src/Functional/Update/DependencyHookInvocationTest.php
index 8ff7b883db..9e6a146b8d 100644
--- a/core/modules/system/tests/src/Functional/Update/DependencyHookInvocationTest.php
+++ b/core/modules/system/tests/src/Functional/Update/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'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/system/tests/src/Functional/Update/DependencyMissingTest.php b/core/modules/system/tests/src/Functional/Update/DependencyMissingTest.php
index 6ae4dc40c8..97b320d6d9 100644
--- a/core/modules/system/tests/src/Functional/Update/DependencyMissingTest.php
+++ b/core/modules/system/tests/src/Functional/Update/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'];
 
   protected function setUp() {
     // Only install update_test_2.module, even though its updates have a
diff --git a/core/modules/system/tests/src/Functional/Update/DependencyOrderingTest.php b/core/modules/system/tests/src/Functional/Update/DependencyOrderingTest.php
index 8cafaaddba..df650258bc 100644
--- a/core/modules/system/tests/src/Functional/Update/DependencyOrderingTest.php
+++ b/core/modules/system/tests/src/Functional/Update/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'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/system/tests/src/Functional/Update/InvalidUpdateHookTest.php b/core/modules/system/tests/src/Functional/Update/InvalidUpdateHookTest.php
index 44d4832dd2..926d9dd0e2 100644
--- a/core/modules/system/tests/src/Functional/Update/InvalidUpdateHookTest.php
+++ b/core/modules/system/tests/src/Functional/Update/InvalidUpdateHookTest.php
@@ -17,7 +17,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'];
 
   /**
    * URL for the upgrade script.
diff --git a/core/modules/system/tests/src/Functional/Update/UpdateSchemaTest.php b/core/modules/system/tests/src/Functional/Update/UpdateSchemaTest.php
index a42cbcb3c2..412567c51b 100644
--- a/core/modules/system/tests/src/Functional/Update/UpdateSchemaTest.php
+++ b/core/modules/system/tests/src/Functional/Update/UpdateSchemaTest.php
@@ -15,7 +15,7 @@ class UpdateSchemaTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['update_test_schema'];
+  protected static $modules = ['update_test_schema'];
 
   /**
    * @var \Drupal\user\UserInterface
diff --git a/core/modules/system/tests/src/Functional/Update/UpdateScriptTest.php b/core/modules/system/tests/src/Functional/Update/UpdateScriptTest.php
index 29d4d08e23..b723a0980f 100644
--- a/core/modules/system/tests/src/Functional/Update/UpdateScriptTest.php
+++ b/core/modules/system/tests/src/Functional/Update/UpdateScriptTest.php
@@ -18,7 +18,7 @@ class UpdateScriptTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['update_script_test', 'dblog', 'language'];
+  protected static $modules = ['update_script_test', 'dblog', 'language'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Functional/Update/UpdatesWith7xTest.php b/core/modules/system/tests/src/Functional/Update/UpdatesWith7xTest.php
index 2452264e37..5a9e2c0c4e 100644
--- a/core/modules/system/tests/src/Functional/Update/UpdatesWith7xTest.php
+++ b/core/modules/system/tests/src/Functional/Update/UpdatesWith7xTest.php
@@ -17,7 +17,7 @@ class UpdatesWith7xTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['update_test_with_7x'];
+  protected static $modules = ['update_test_with_7x'];
 
   /**
    * The URL for the update page.
diff --git a/core/modules/system/tests/src/FunctionalJavascript/ModalRendererTest.php b/core/modules/system/tests/src/FunctionalJavascript/ModalRendererTest.php
index 7c0aec022c..16143da474 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 JavascriptTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system', 'dialog_renderer_test'];
+  protected static $modules = ['system', 'dialog_renderer_test'];
 
   /**
    * Tests that links respect 'data-dialog-renderer' attribute.
diff --git a/core/modules/system/tests/src/FunctionalJavascript/OffCanvasTest.php b/core/modules/system/tests/src/FunctionalJavascript/OffCanvasTest.php
index 567919c3ee..87fac5fd2f 100644
--- a/core/modules/system/tests/src/FunctionalJavascript/OffCanvasTest.php
+++ b/core/modules/system/tests/src/FunctionalJavascript/OffCanvasTest.php
@@ -12,7 +12,7 @@ class OffCanvasTest extends OffCanvasTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'off_canvas_test',
   ];
 
diff --git a/core/modules/system/tests/src/FunctionalJavascript/ThemeFormSettingsTest.php b/core/modules/system/tests/src/FunctionalJavascript/ThemeFormSettingsTest.php
index 8e4729fe33..1f7645953b 100644
--- a/core/modules/system/tests/src/FunctionalJavascript/ThemeFormSettingsTest.php
+++ b/core/modules/system/tests/src/FunctionalJavascript/ThemeFormSettingsTest.php
@@ -18,7 +18,7 @@ class ThemeFormSettingsTest extends JavascriptTestBase {
   /**
    * {@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 6c381d7c80..6a2c7c6120 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 663bff6bae..850b5e819d 100644
--- a/core/modules/system/tests/src/Kernel/Block/SystemMenuBlockTest.php
+++ b/core/modules/system/tests/src/Kernel/Block/SystemMenuBlockTest.php
@@ -31,7 +31,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/DateFormatAccessControlHandlerTest.php b/core/modules/system/tests/src/Kernel/DateFormatAccessControlHandlerTest.php
index 01b09dc6bb..d5767ed579 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 f7fa5d87be..30041d3814 100644
--- a/core/modules/system/tests/src/Kernel/Entity/EntityReferenceSelectionReferenceableTest.php
+++ b/core/modules/system/tests/src/Kernel/Entity/EntityReferenceSelectionReferenceableTest.php
@@ -42,7 +42,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 d7c2650353..3b03ba5f47 100644
--- a/core/modules/system/tests/src/Kernel/Extension/ModuleHandlerTest.php
+++ b/core/modules/system/tests/src/Kernel/Extension/ModuleHandlerTest.php
@@ -17,7 +17,7 @@ class ModuleHandlerTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system'];
+  protected static $modules = ['system'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/tests/src/Kernel/Form/FormElementLabelTest.php b/core/modules/system/tests/src/Kernel/Form/FormElementLabelTest.php
index 2bc895f8a0..5a7992c496 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 94026b6541..480ccb3b30 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/ProgrammaticTest.php b/core/modules/system/tests/src/Kernel/Form/ProgrammaticTest.php
index 03d22afe57..1d41fbe0d8 100644
--- a/core/modules/system/tests/src/Kernel/Form/ProgrammaticTest.php
+++ b/core/modules/system/tests/src/Kernel/Form/ProgrammaticTest.php
@@ -17,7 +17,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/InstallerMissingDependenciesTest.php b/core/modules/system/tests/src/Kernel/Installer/InstallerMissingDependenciesTest.php
index 052c0afb80..226c5dc426 100644
--- a/core/modules/system/tests/src/Kernel/Installer/InstallerMissingDependenciesTest.php
+++ b/core/modules/system/tests/src/Kernel/Installer/InstallerMissingDependenciesTest.php
@@ -14,7 +14,7 @@ class InstallerMissingDependenciesTest 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 f3591538c8..cc94bc2b5a 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 6d702c7cb5..9291db94f3 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 33c963de3c..c5181de13e 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 56ee5b6312..73bfef93e1 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 0216e2dd31..dd933317b9 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 fdd69f52f5..b423ddb4be 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/MenuTest.php b/core/modules/system/tests/src/Kernel/Plugin/migrate/source/MenuTest.php
index 0feb9a2b0f..3917b37cc0 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 17b54fa1bc..482e4ddf68 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 8dbb01e5d0..1f304e8f31 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 a2ca864862..3e6ec4c86c 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 8a292e502d..e489371db8 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 649a2c7526..f5e13bfe84 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 ebdac3ce0d..3c64d29e6f 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/Timezone/TimezoneTest.php b/core/modules/system/tests/src/Kernel/Timezone/TimezoneTest.php
index 8a5385c2fe..42ff81c281 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/Token/TokenReplaceKernelTestBase.php b/core/modules/system/tests/src/Kernel/Token/TokenReplaceKernelTestBase.php
index 2c83390604..3ebf352397 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 @@
    *
    * @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 e4490f3431..0132ab7265 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'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/taxonomy/tests/src/Functional/TaxonomyImageTest.php b/core/modules/taxonomy/tests/src/Functional/TaxonomyImageTest.php
index fc2fe62432..8d83097a6c 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'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/taxonomy/tests/src/Functional/TaxonomyQueryAlterTest.php b/core/modules/taxonomy/tests/src/Functional/TaxonomyQueryAlterTest.php
index 85310e9aa9..05cadedf18 100644
--- a/core/modules/taxonomy/tests/src/Functional/TaxonomyQueryAlterTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/TaxonomyQueryAlterTest.php
@@ -18,7 +18,7 @@ class TaxonomyQueryAlterTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['taxonomy', 'taxonomy_test'];
+  protected static $modules = ['taxonomy', 'taxonomy_test'];
 
   /**
    * Tests that appropriate tags are added when querying the database.
diff --git a/core/modules/taxonomy/tests/src/Functional/TaxonomyTermPagerTest.php b/core/modules/taxonomy/tests/src/Functional/TaxonomyTermPagerTest.php
index 66782f3e7a..0a72651fa7 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'];
 
   /**
    * Vocabulary for testing.
diff --git a/core/modules/taxonomy/tests/src/Functional/TaxonomyTestBase.php b/core/modules/taxonomy/tests/src/Functional/TaxonomyTestBase.php
index fdbfccd303..51df0af52f 100644
--- a/core/modules/taxonomy/tests/src/Functional/TaxonomyTestBase.php
+++ b/core/modules/taxonomy/tests/src/Functional/TaxonomyTestBase.php
@@ -18,7 +18,7 @@
    *
    * @var array
    */
-  public static $modules = ['taxonomy', 'block'];
+  protected static $modules = ['taxonomy', 'block'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/taxonomy/tests/src/Functional/TermCacheTagsTest.php b/core/modules/taxonomy/tests/src/Functional/TermCacheTagsTest.php
index 35b7d6bd6e..1fda920d04 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 997e698b9e..0581b090a9 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/TermEntityReferenceTest.php b/core/modules/taxonomy/tests/src/Functional/TermEntityReferenceTest.php
index 9d4522ec71..350982271e 100644
--- a/core/modules/taxonomy/tests/src/Functional/TermEntityReferenceTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/TermEntityReferenceTest.php
@@ -17,7 +17,7 @@ class TermEntityReferenceTest extends TaxonomyTestBase {
    *
    * @var array
    */
-  public static $modules = ['entity_reference_test', 'entity_test'];
+  protected static $modules = ['entity_reference_test', 'entity_test'];
 
   /**
    * Tests an entity reference field restricted to a single vocabulary.
diff --git a/core/modules/taxonomy/tests/src/Functional/TermIndexTest.php b/core/modules/taxonomy/tests/src/Functional/TermIndexTest.php
index d4fe8f225b..0ebc01a065 100644
--- a/core/modules/taxonomy/tests/src/Functional/TermIndexTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/TermIndexTest.php
@@ -17,7 +17,7 @@ class TermIndexTest extends TaxonomyTestBase {
    *
    * @var array
    */
-  public static $modules = ['views'];
+  protected static $modules = ['views'];
 
   /**
    * Vocabulary for testing.
diff --git a/core/modules/taxonomy/tests/src/Functional/TermLanguageTest.php b/core/modules/taxonomy/tests/src/Functional/TermLanguageTest.php
index f60e77e534..8de70dcaa9 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'];
 
   /**
    * Vocabulary for testing.
diff --git a/core/modules/taxonomy/tests/src/Functional/TermTranslationFieldViewTest.php b/core/modules/taxonomy/tests/src/Functional/TermTranslationFieldViewTest.php
index 236ac70553..bb18e3159c 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'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/taxonomy/tests/src/Functional/TermTranslationUITest.php b/core/modules/taxonomy/tests/src/Functional/TermTranslationUITest.php
index 0d24b6990e..f0681734c7 100644
--- a/core/modules/taxonomy/tests/src/Functional/TermTranslationUITest.php
+++ b/core/modules/taxonomy/tests/src/Functional/TermTranslationUITest.php
@@ -25,7 +25,7 @@ class TermTranslationUITest extends ContentTranslationUITestBase {
    *
    * @var array
    */
-  public static $modules = ['language', 'content_translation', 'taxonomy'];
+  protected static $modules = ['language', 'content_translation', 'taxonomy'];
 
   protected function setUp() {
     $this->entityTypeId = 'taxonomy_term';
diff --git a/core/modules/taxonomy/tests/src/Functional/Views/ArgumentValidatorTermTest.php b/core/modules/taxonomy/tests/src/Functional/Views/ArgumentValidatorTermTest.php
index 8260565e36..16d1a2b923 100644
--- a/core/modules/taxonomy/tests/src/Functional/Views/ArgumentValidatorTermTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/Views/ArgumentValidatorTermTest.php
@@ -38,7 +38,7 @@ class ArgumentValidatorTermTest extends TaxonomyTestBase {
    *
    * @var array
    */
-  public static $modules = ['taxonomy', 'taxonomy_test_views', 'views_test_config'];
+  protected static $modules = ['taxonomy', 'taxonomy_test_views', 'views_test_config'];
 
   /**
    * Views used by this test.
diff --git a/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyFieldFilterTest.php b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyFieldFilterTest.php
index 1b8bbcaa51..c68817801a 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'];
 
   /**
    * Views used by this test.
diff --git a/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyIndexTidFilterTest.php b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyIndexTidFilterTest.php
index 6fd1eba865..b459304dae 100644
--- a/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyIndexTidFilterTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyIndexTidFilterTest.php
@@ -19,7 +19,7 @@ class TaxonomyIndexTidFilterTest 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/TaxonomyIndexTidUiTest.php b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyIndexTidUiTest.php
index 4de73705d9..63340ed0e6 100644
--- a/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyIndexTidUiTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyIndexTidUiTest.php
@@ -31,7 +31,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 d8ab8ea121..40985e7ceb 100644
--- a/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyParentUITest.php
+++ b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyParentUITest.php
@@ -25,7 +25,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 3505784a07..c37b9a527d 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 4d7a4fdf03..3b065314b7 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 f69c49c714..f83fb9c3b8 100644
--- a/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTermViewTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTermViewTest.php
@@ -22,7 +22,7 @@ class TaxonomyTermViewTest extends TaxonomyTestBase {
    *
    * @var array
    */
-  public static $modules = ['taxonomy', 'views'];
+  protected static $modules = ['taxonomy', 'views'];
 
   /**
    * An user with permissions to administer taxonomy.
diff --git a/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTestBase.php b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTestBase.php
index a2d8ec14a3..0eb4cbf46b 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 @@
    *
    * @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 8b1d58cf29..721df17d7b 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/VocabularyCrudTest.php b/core/modules/taxonomy/tests/src/Functional/VocabularyCrudTest.php
index 2ac2d9de61..ea4ad7b469 100644
--- a/core/modules/taxonomy/tests/src/Functional/VocabularyCrudTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/VocabularyCrudTest.php
@@ -19,7 +19,7 @@ class VocabularyCrudTest extends TaxonomyTestBase {
    *
    * @var array
    */
-  public static $modules = ['field_test', 'taxonomy_crud'];
+  protected static $modules = ['field_test', 'taxonomy_crud'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/taxonomy/tests/src/Functional/VocabularyLanguageTest.php b/core/modules/taxonomy/tests/src/Functional/VocabularyLanguageTest.php
index f25df8a1fd..95b7a9add9 100644
--- a/core/modules/taxonomy/tests/src/Functional/VocabularyLanguageTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/VocabularyLanguageTest.php
@@ -13,7 +13,7 @@
  */
 class VocabularyLanguageTest extends TaxonomyTestBase {
 
-  public static $modules = ['language'];
+  protected static $modules = ['language'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/taxonomy/tests/src/Functional/VocabularyPermissionsTest.php b/core/modules/taxonomy/tests/src/Functional/VocabularyPermissionsTest.php
index 989398e62f..5176cf32be 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'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/taxonomy/tests/src/Functional/VocabularySerializationTest.php b/core/modules/taxonomy/tests/src/Functional/VocabularySerializationTest.php
index b9aba8a798..16621b3390 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 2d312578e7..b54073bb81 100644
--- a/core/modules/taxonomy/tests/src/Functional/VocabularyTranslationTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/VocabularyTranslationTest.php
@@ -14,7 +14,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 92ebe5926a..e0480170b1 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 2da51e4a43..1d340fc155 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/d6/MigrateTaxonomyTermTest.php b/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTaxonomyTermTest.php
index 14fba563b0..4a2788acbe 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 79e188b9e0..ac386c7e41 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 3993abb98f..4d3367cdf2 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 = ['language', 'taxonomy'];
+  protected static $modules = ['language', 'taxonomy'];
 
   /**
    * {@inheritdoc}
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 614725d966..1269f22bf1 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 8e7d13de0e..eb8e0922bb 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/MigrateVocabularyEntityDisplayTest.php b/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateVocabularyEntityDisplayTest.php
index 5b8a638874..1599fe7d78 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 2c96e51760..06a6624735 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 26cd7f581a..aef587f40a 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 d294ec481d..9264e9f1b0 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 e8c6fefa8b..c7b5738149 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateNodeTaxonomyTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateNodeTaxonomyTest.php
@@ -14,7 +14,7 @@
  */
 class MigrateNodeTaxonomyTest extends MigrateDrupal7TestBase {
 
-  public static $modules = [
+  protected static $modules = [
     'datetime',
     'field',
     'filter',
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 474969dde1..3ed243a87a 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',
     'datetime',
     'forum',
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 5663ea6cda..10220bd34d 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'];
+  protected static $modules = ['taxonomy'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/taxonomy/tests/src/Kernel/PendingRevisionTest.php b/core/modules/taxonomy/tests/src/Kernel/PendingRevisionTest.php
index e4b2cc051c..ed9acf609b 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/TermNodeTest.php b/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/TermNodeTest.php
index 3084acffae..16a365a2af 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 42fa75d0ff..bb60f9c4b9 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 d1ac238ae2..c0b50cb0f6 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 af69e30e37..cafbc813b9 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/VocabularyTest.php b/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/VocabularyTest.php
index a98b2985ed..4b81b6c3fb 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 e54eb6ee3f..1c5522c5fe 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/TermSourceWithVocabularyFilterTest.php b/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/TermSourceWithVocabularyFilterTest.php
index e03a6ab563..a6bdb5230a 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 dd22672a0a..eb3753e0e1 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 4d1975ceb4..fb78c547d7 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/TermKernelTest.php b/core/modules/taxonomy/tests/src/Kernel/TermKernelTest.php
index 3d8bff80a3..a9b1f5df20 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 437a305f6f..97784673dd 100644
--- a/core/modules/taxonomy/tests/src/Kernel/TermValidationTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/TermValidationTest.php
@@ -16,7 +16,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/TaxonomyViewsFieldAccessTest.php b/core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyViewsFieldAccessTest.php
index e62232befd..2d7b960e39 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 18bedf0725..a48cda7c2b 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 72269409e4..11b65120da 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() {
     parent::setUp();
diff --git a/core/modules/text/tests/src/Kernel/TextFormatterTest.php b/core/modules/text/tests/src/Kernel/TextFormatterTest.php
index c75ac34bc4..d75bcc40c6 100644
--- a/core/modules/text/tests/src/Kernel/TextFormatterTest.php
+++ b/core/modules/text/tests/src/Kernel/TextFormatterTest.php
@@ -33,7 +33,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 2eeaf2de0b..25641b4197 100644
--- a/core/modules/text/tests/src/Kernel/TextSummaryTest.php
+++ b/core/modules/text/tests/src/Kernel/TextSummaryTest.php
@@ -12,7 +12,7 @@
  */
 class TextSummaryTest extends KernelTestBase {
 
-  public static $modules = ['system', 'user', 'filter', 'text'];
+  protected static $modules = ['system', 'user', 'filter', 'text'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/text/tests/src/Kernel/TextWithSummaryItemTest.php b/core/modules/text/tests/src/Kernel/TextWithSummaryItemTest.php
index a48c191b5e..7ae5fb44c7 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 9585c86eb4..400cb974ba 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'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/toolbar/tests/src/Functional/ToolbarCacheContextsTest.php b/core/modules/toolbar/tests/src/Functional/ToolbarCacheContextsTest.php
index 26454762ea..d9d27d45c3 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'];
 
   /**
    * An authenticated user to use for testing.
diff --git a/core/modules/toolbar/tests/src/Functional/ToolbarHookToolbarTest.php b/core/modules/toolbar/tests/src/Functional/ToolbarHookToolbarTest.php
index f3d3ce6118..19ebfc62e3 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'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/toolbar/tests/src/Functional/ToolbarMenuTranslationTest.php b/core/modules/toolbar/tests/src/Functional/ToolbarMenuTranslationTest.php
index 995d49ee38..a954a85c3f 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'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/toolbar/tests/src/FunctionalJavascript/ToolbarIntegrationTest.php b/core/modules/toolbar/tests/src/FunctionalJavascript/ToolbarIntegrationTest.php
index c3b3d9abc6..2d05cfac71 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 JavascriptTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['toolbar', 'node'];
+  protected static $modules = ['toolbar', 'node'];
 
   /**
    * Tests if the toolbar can be toggled with JavaScript.
diff --git a/core/modules/tour/tests/src/Functional/TourCacheTagsTest.php b/core/modules/tour/tests/src/Functional/TourCacheTagsTest.php
index daed6fa292..32621bc50c 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 ad60df104f..de8fb3023e 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'];
 
   /**
    * User that can access tours and help.
diff --git a/core/modules/tour/tests/src/Functional/TourTest.php b/core/modules/tour/tests/src/Functional/TourTest.php
index 55f3743f61..45d755c3fe 100644
--- a/core/modules/tour/tests/src/Functional/TourTest.php
+++ b/core/modules/tour/tests/src/Functional/TourTest.php
@@ -17,7 +17,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'];
 
   /**
    * The permissions required for a logged in user to test tour tips.
diff --git a/core/modules/tour/tests/src/Kernel/TourPluginTest.php b/core/modules/tour/tests/src/Kernel/TourPluginTest.php
index ce47467df7..732f9127ea 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 2b320ae4b6..8fa2b89fd8 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'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/tracker/tests/src/Functional/TrackerTest.php b/core/modules/tracker/tests/src/Functional/TrackerTest.php
index 1a77d95ac8..535c52cbeb 100644
--- a/core/modules/tracker/tests/src/Functional/TrackerTest.php
+++ b/core/modules/tracker/tests/src/Functional/TrackerTest.php
@@ -27,7 +27,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'];
 
   /**
    * The main user for testing.
diff --git a/core/modules/tracker/tests/src/Functional/Views/TrackerTestBase.php b/core/modules/tracker/tests/src/Functional/Views/TrackerTestBase.php
index d70684378c..0c7ebdd75c 100644
--- a/core/modules/tracker/tests/src/Functional/Views/TrackerTestBase.php
+++ b/core/modules/tracker/tests/src/Functional/Views/TrackerTestBase.php
@@ -20,7 +20,7 @@
    *
    * @var array
    */
-  public static $modules = ['comment', 'tracker', 'tracker_test_views'];
+  protected static $modules = ['comment', 'tracker', 'tracker_test_views'];
 
   /**
    * The node used for testing.
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 d37050269f..fa0674f431 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 ea9732221a..552774b298 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 3b0c11bb32..2282070668 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 0318b8e7bd..3457c8f649 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 ffcee93b56..8612cfa2b2 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 d768b06d81..cac85123ac 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'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/update/tests/src/Functional/UpdateContribTest.php b/core/modules/update/tests/src/Functional/UpdateContribTest.php
index 20d397cd48..a9c7c53f6c 100644
--- a/core/modules/update/tests/src/Functional/UpdateContribTest.php
+++ b/core/modules/update/tests/src/Functional/UpdateContribTest.php
@@ -18,7 +18,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'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/update/tests/src/Functional/UpdateCoreTest.php b/core/modules/update/tests/src/Functional/UpdateCoreTest.php
index 5cd4b10260..6d7b5e8324 100644
--- a/core/modules/update/tests/src/Functional/UpdateCoreTest.php
+++ b/core/modules/update/tests/src/Functional/UpdateCoreTest.php
@@ -20,7 +20,7 @@ class UpdateCoreTest extends UpdateTestBase {
    *
    * @var array
    */
-  public static $modules = ['update_test', 'update', 'language', 'block'];
+  protected static $modules = ['update_test', 'update', 'language', 'block'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/update/tests/src/Functional/UpdateDeleteFileIfStaleTest.php b/core/modules/update/tests/src/Functional/UpdateDeleteFileIfStaleTest.php
index 33c4ed3f0f..c1487d6938 100644
--- a/core/modules/update/tests/src/Functional/UpdateDeleteFileIfStaleTest.php
+++ b/core/modules/update/tests/src/Functional/UpdateDeleteFileIfStaleTest.php
@@ -14,7 +14,7 @@ class UpdateDeleteFileIfStaleTest extends UpdateTestBase {
    *
    * @var array
    */
-  public static $modules = ['update'];
+  protected static $modules = ['update'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/update/tests/src/Functional/UpdateUploadTest.php b/core/modules/update/tests/src/Functional/UpdateUploadTest.php
index 6096620062..0b5d60f7a5 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'];
 
   protected function setUp() {
     parent::setUp();
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 aa3563c608..a7d2349f2a 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 6c1004c9d4..e33d9b532a 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/UserAccountLinksTest.php b/core/modules/user/tests/src/Functional/UserAccountLinksTest.php
index c09fc34daf..678dfc5e86 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/UserAdminTest.php b/core/modules/user/tests/src/Functional/UserAdminTest.php
index 4e69346d2e..6518d6bea1 100644
--- a/core/modules/user/tests/src/Functional/UserAdminTest.php
+++ b/core/modules/user/tests/src/Functional/UserAdminTest.php
@@ -22,7 +22,7 @@ class UserAdminTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['taxonomy', 'views'];
+  protected static $modules = ['taxonomy', 'views'];
 
   /**
    * Registers a user and deletes it.
diff --git a/core/modules/user/tests/src/Functional/UserCacheTagsTest.php b/core/modules/user/tests/src/Functional/UserCacheTagsTest.php
index a9e98575b7..56542ea3a9 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 9889cd65bb..7c73c0c89c 100644
--- a/core/modules/user/tests/src/Functional/UserCancelTest.php
+++ b/core/modules/user/tests/src/Functional/UserCancelTest.php
@@ -22,7 +22,7 @@ class UserCancelTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'comment'];
+  protected static $modules = ['node', 'comment'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/modules/user/tests/src/Functional/UserCreateFailMailTest.php b/core/modules/user/tests/src/Functional/UserCreateFailMailTest.php
index 38f2514a49..5c23f4ba00 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'];
 
   /**
    * Tests the create user administration page.
diff --git a/core/modules/user/tests/src/Functional/UserEntityCallbacksTest.php b/core/modules/user/tests/src/Functional/UserEntityCallbacksTest.php
index feea805afd..e3626a94dd 100644
--- a/core/modules/user/tests/src/Functional/UserEntityCallbacksTest.php
+++ b/core/modules/user/tests/src/Functional/UserEntityCallbacksTest.php
@@ -18,7 +18,7 @@ class UserEntityCallbacksTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['user', 'user_hooks_test'];
+  protected static $modules = ['user', 'user_hooks_test'];
 
   /**
    * An authenticated user to use for testing.
diff --git a/core/modules/user/tests/src/Functional/UserLanguageCreationTest.php b/core/modules/user/tests/src/Functional/UserLanguageCreationTest.php
index 6f493418b2..2c736c8496 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'];
 
   /**
    * Functional test for language handling during user creation.
diff --git a/core/modules/user/tests/src/Functional/UserLanguageTest.php b/core/modules/user/tests/src/Functional/UserLanguageTest.php
index 0e6c0f1a75..8553017d1d 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'];
 
   /**
    * Test if user can change their default language.
diff --git a/core/modules/user/tests/src/Functional/UserLoginHttpTest.php b/core/modules/user/tests/src/Functional/UserLoginHttpTest.php
index b12a72b58e..0e8a9078c7 100644
--- a/core/modules/user/tests/src/Functional/UserLoginHttpTest.php
+++ b/core/modules/user/tests/src/Functional/UserLoginHttpTest.php
@@ -28,7 +28,7 @@ class UserLoginHttpTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['hal'];
+  protected static $modules = ['hal'];
 
   /**
    * The cookie jar.
diff --git a/core/modules/user/tests/src/Functional/UserRoleAdminTest.php b/core/modules/user/tests/src/Functional/UserRoleAdminTest.php
index 24dc0849fc..4af9dd3125 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 8ce0319bf6..ef7cd22005 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'];
 
   public function testUserSearch() {
     // Verify that a user without 'administer users' permission cannot search
diff --git a/core/modules/user/tests/src/Functional/UserTimeZoneTest.php b/core/modules/user/tests/src/Functional/UserTimeZoneTest.php
index ccf43253de..335a5592ab 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'];
 
   /**
    * Tests the display of dates and time when user-configurable time zones are set.
diff --git a/core/modules/user/tests/src/Functional/UserTokenReplaceTest.php b/core/modules/user/tests/src/Functional/UserTokenReplaceTest.php
index e272b60732..9cf2202a8e 100644
--- a/core/modules/user/tests/src/Functional/UserTokenReplaceTest.php
+++ b/core/modules/user/tests/src/Functional/UserTokenReplaceTest.php
@@ -21,7 +21,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 ae541da83e..7482d5f2eb 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'];
 
   protected function setUp() {
     $this->entityTypeId = 'user';
diff --git a/core/modules/user/tests/src/Functional/Views/AccessTestBase.php b/core/modules/user/tests/src/Functional/Views/AccessTestBase.php
index 36f2334f11..350dfc7553 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 @@
    *
    * @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 084015eec8..41fe693c00 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'];
 
   /**
    * Views used by this test.
diff --git a/core/modules/user/tests/src/Functional/Views/BulkFormTest.php b/core/modules/user/tests/src/Functional/Views/BulkFormTest.php
index 29c0e83e6b..b3baff7d31 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'];
 
   /**
    * Views used by this test.
diff --git a/core/modules/user/tests/src/Functional/Views/FilterPermissionUiTest.php b/core/modules/user/tests/src/Functional/Views/FilterPermissionUiTest.php
index d08c2f3169..d8eba69498 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'];
 
   protected function setUp($import_test_views = TRUE) {
     parent::setUp($import_test_views);
diff --git a/core/modules/user/tests/src/Functional/Views/HandlerFilterUserNameTest.php b/core/modules/user/tests/src/Functional/Views/HandlerFilterUserNameTest.php
index c2b15ff58c..65cd6edf6b 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'];
 
   /**
    * Views used by this test.
diff --git a/core/modules/user/tests/src/Functional/Views/UserChangedTest.php b/core/modules/user/tests/src/Functional/Views/UserChangedTest.php
index 2271c0ce07..c31d4c359a 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'];
 
   /**
    * Views used by this test.
diff --git a/core/modules/user/tests/src/Functional/Views/UserTestBase.php b/core/modules/user/tests/src/Functional/Views/UserTestBase.php
index 49de6f793f..83f0ab297d 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 @@
    *
    * @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/Kernel/Condition/UserRoleConditionTest.php b/core/modules/user/tests/src/Kernel/Condition/UserRoleConditionTest.php
index 075b04c5e0..5646aaafc0 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 6beecb88d3..e91f4fe7aa 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 85cd761bc3..a54f797555 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/MigrateUserPictureEntityDisplayTest.php b/core/modules/user/tests/src/Kernel/Migrate/MigrateUserPictureEntityDisplayTest.php
index 0d3bb7c206..8a4f1a16b8 100644
--- a/core/modules/user/tests/src/Kernel/Migrate/MigrateUserPictureEntityDisplayTest.php
+++ b/core/modules/user/tests/src/Kernel/Migrate/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/MigrateUserPictureEntityFormDisplayTest.php b/core/modules/user/tests/src/Kernel/Migrate/MigrateUserPictureEntityFormDisplayTest.php
index f75382496f..f501012fcc 100644
--- a/core/modules/user/tests/src/Kernel/Migrate/MigrateUserPictureEntityFormDisplayTest.php
+++ b/core/modules/user/tests/src/Kernel/Migrate/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/MigrateUserPictureFieldInstanceTest.php b/core/modules/user/tests/src/Kernel/Migrate/MigrateUserPictureFieldInstanceTest.php
index 9b3829e06d..e9a8e62769 100644
--- a/core/modules/user/tests/src/Kernel/Migrate/MigrateUserPictureFieldInstanceTest.php
+++ b/core/modules/user/tests/src/Kernel/Migrate/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/MigrateUserPictureFieldTest.php b/core/modules/user/tests/src/Kernel/Migrate/MigrateUserPictureFieldTest.php
index 1389693024..fac8122c72 100644
--- a/core/modules/user/tests/src/Kernel/Migrate/MigrateUserPictureFieldTest.php
+++ b/core/modules/user/tests/src/Kernel/Migrate/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/MigrateUserProfileFieldInstanceTest.php b/core/modules/user/tests/src/Kernel/Migrate/MigrateUserProfileFieldInstanceTest.php
index 9713332587..0625c70b3e 100644
--- a/core/modules/user/tests/src/Kernel/Migrate/MigrateUserProfileFieldInstanceTest.php
+++ b/core/modules/user/tests/src/Kernel/Migrate/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/MigrateUserStubTest.php b/core/modules/user/tests/src/Kernel/Migrate/MigrateUserStubTest.php
index 768f5d72c8..3c25c70cda 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/MigrateUserContactSettingsTest.php b/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserContactSettingsTest.php
index fcdaa25426..b1e3ac11e1 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/MigrateUserProfileValuesTest.php b/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserProfileValuesTest.php
index e734517a5e..9452341704 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 ed287770ae..b87708d3ce 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/MigrateUserTest.php b/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserTest.php
index bbfc41d77d..a25b27511d 100644
--- a/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserTest.php
+++ b/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserTest.php
@@ -22,7 +22,7 @@ class MigrateUserTest extends MigrateDrupal7TestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'comment',
     'datetime',
     'file',
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 c321185713..dadcaaa1ee 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 d9e77edde0..a87ede1f7a 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/ProfileFieldValuesTest.php b/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d6/ProfileFieldValuesTest.php
index 26c2ed55f8..2e3aba4224 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 1a841d32df..d37659b4f8 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 2724d35f59..c77b45cc6f 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 aea6afa7c9..2eb61d84c1 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 1dc34a7cd6..19f85be63a 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 d2d43a44c9..885894c780 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/UserTest.php b/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d7/UserTest.php
index 8e14d63c9d..6e0feb2b79 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/TempStoreDatabaseTest.php b/core/modules/user/tests/src/Kernel/TempStoreDatabaseTest.php
index ae9d4cb13e..6a7aed7e08 100644
--- a/core/modules/user/tests/src/Kernel/TempStoreDatabaseTest.php
+++ b/core/modules/user/tests/src/Kernel/TempStoreDatabaseTest.php
@@ -22,7 +22,7 @@ class TempStoreDatabaseTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['system', 'user'];
+  protected static $modules = ['system', 'user'];
 
   /**
    * A key/value store factory.
diff --git a/core/modules/user/tests/src/Kernel/UserAccountFormFieldsTest.php b/core/modules/user/tests/src/Kernel/UserAccountFormFieldsTest.php
index 643302192c..49fb38c0ac 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 dfafb1d536..d6e5c353c0 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/UserEntityTest.php b/core/modules/user/tests/src/Kernel/UserEntityTest.php
index 73fe869ec3..a05c6484b0 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 672ddb065e..ee5bf39598 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 f61811be79..a92ca80ded 100644
--- a/core/modules/user/tests/src/Kernel/UserInstallTest.php
+++ b/core/modules/user/tests/src/Kernel/UserInstallTest.php
@@ -16,7 +16,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 cac470aaab..ee7f881d11 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() {
     parent::setUp();
diff --git a/core/modules/user/tests/src/Kernel/UserRoleEntityTest.php b/core/modules/user/tests/src/Kernel/UserRoleEntityTest.php
index 562ada11f2..b597c3ddae 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 17364c059d..093c6bf67e 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() {
     parent::setUp();
diff --git a/core/modules/user/tests/src/Kernel/UserServiceProviderFallbackTest.php b/core/modules/user/tests/src/Kernel/UserServiceProviderFallbackTest.php
index 78ab454981..e5cbf27806 100644
--- a/core/modules/user/tests/src/Kernel/UserServiceProviderFallbackTest.php
+++ b/core/modules/user/tests/src/Kernel/UserServiceProviderFallbackTest.php
@@ -18,7 +18,7 @@ class UserServiceProviderFallbackTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['user'];
+  protected static $modules = ['user'];
 
   /**
    * Tests that user.tempstore.expire equals tempstore.expire if not customized.
diff --git a/core/modules/user/tests/src/Kernel/UserServiceProviderTest.php b/core/modules/user/tests/src/Kernel/UserServiceProviderTest.php
index 38f1af1d48..07f76c676d 100644
--- a/core/modules/user/tests/src/Kernel/UserServiceProviderTest.php
+++ b/core/modules/user/tests/src/Kernel/UserServiceProviderTest.php
@@ -18,7 +18,7 @@ class UserServiceProviderTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['user'];
+  protected static $modules = ['user'];
 
   /**
    * Tests that tempstore.expire is set to user.tempstore.expire.
diff --git a/core/modules/user/tests/src/Kernel/UserValidationTest.php b/core/modules/user/tests/src/Kernel/UserValidationTest.php
index 4aa5850d1d..bc8e0613c0 100644
--- a/core/modules/user/tests/src/Kernel/UserValidationTest.php
+++ b/core/modules/user/tests/src/Kernel/UserValidationTest.php
@@ -21,7 +21,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/UserKernelTestBase.php b/core/modules/user/tests/src/Kernel/Views/UserKernelTestBase.php
index 0e862c86b8..dc6cd31879 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 @@
    *
    * @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 f14779e26b..e20a01ba33 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/views/tests/fixtures/update/views.view.test_boolean_filter_values.yml b/core/modules/views/tests/fixtures/update/views.view.test_boolean_filter_values.yml
index 65c28478d2..587b183582 100644
--- a/core/modules/views/tests/fixtures/update/views.view.test_boolean_filter_values.yml
+++ b/core/modules/views/tests/fixtures/update/views.view.test_boolean_filter_values.yml
@@ -601,4 +601,4 @@ display:
         - 'user.node_grants:view'
         - user.permissions
       max-age: 0
-      tags: {  }
\ No newline at end of file
+      tags: {  }
diff --git a/core/modules/views/tests/src/Functional/DefaultViewsTest.php b/core/modules/views/tests/src/Functional/DefaultViewsTest.php
index 9e4c338ddc..2997776a4f 100644
--- a/core/modules/views/tests/src/Functional/DefaultViewsTest.php
+++ b/core/modules/views/tests/src/Functional/DefaultViewsTest.php
@@ -29,7 +29,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'];
 
   /**
    * An array of argument arrays to use for default views.
diff --git a/core/modules/views/tests/src/Functional/Entity/BaseFieldAccessTest.php b/core/modules/views/tests/src/Functional/Entity/BaseFieldAccessTest.php
index 19aa191e14..876d1aba8a 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/FieldEntityTest.php b/core/modules/views/tests/src/Functional/Entity/FieldEntityTest.php
index a46e54c9e5..1163b4333b 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 2a227c5433..3d62103a53 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/FilterEntityBundleTest.php b/core/modules/views/tests/src/Functional/Entity/FilterEntityBundleTest.php
index 993293cebf..c39b5643c3 100644
--- a/core/modules/views/tests/src/Functional/Entity/FilterEntityBundleTest.php
+++ b/core/modules/views/tests/src/Functional/Entity/FilterEntityBundleTest.php
@@ -26,7 +26,7 @@ class FilterEntityBundleTest extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = ['node'];
+  protected static $modules = ['node'];
 
   /**
    * Entity bundle data.
diff --git a/core/modules/views/tests/src/Functional/Entity/LatestRevisionFilterTest.php b/core/modules/views/tests/src/Functional/Entity/LatestRevisionFilterTest.php
index d73a11793b..3d978001cf 100644
--- a/core/modules/views/tests/src/Functional/Entity/LatestRevisionFilterTest.php
+++ b/core/modules/views/tests/src/Functional/Entity/LatestRevisionFilterTest.php
@@ -40,7 +40,7 @@ class LatestRevisionFilterTest extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = ['node'];
+  protected static $modules = ['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 911cd61e66..0b9d011608 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 d67f70dfd7..e54ee8bb52 100644
--- a/core/modules/views/tests/src/Functional/GlossaryTest.php
+++ b/core/modules/views/tests/src/Functional/GlossaryTest.php
@@ -22,7 +22,7 @@ class GlossaryTest extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = ['node'];
+  protected static $modules = ['node'];
 
   /**
    * Tests the default glossary view.
diff --git a/core/modules/views/tests/src/Functional/Handler/AreaHTTPStatusCodeTest.php b/core/modules/views/tests/src/Functional/Handler/AreaHTTPStatusCodeTest.php
index dc914ce219..82923c9b2b 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'];
 
   /**
    * Tests the area handler.
diff --git a/core/modules/views/tests/src/Functional/Handler/AreaTest.php b/core/modules/views/tests/src/Functional/Handler/AreaTest.php
index d631373d23..326c2d3a30 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'];
 
   protected function setUp($import_test_views = TRUE) {
     parent::setUp($import_test_views);
diff --git a/core/modules/views/tests/src/Functional/Handler/ArgumentStringTest.php b/core/modules/views/tests/src/Functional/Handler/ArgumentStringTest.php
index 17ece944c5..a1a57f719f 100644
--- a/core/modules/views/tests/src/Functional/Handler/ArgumentStringTest.php
+++ b/core/modules/views/tests/src/Functional/Handler/ArgumentStringTest.php
@@ -24,7 +24,7 @@ class ArgumentStringTest extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = ['node'];
+  protected static $modules = ['node'];
 
   /**
    * Tests the glossary feature.
diff --git a/core/modules/views/tests/src/Functional/Handler/FieldDropButtonTest.php b/core/modules/views/tests/src/Functional/Handler/FieldDropButtonTest.php
index e0e380b0f8..b3c2b8051e 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/FieldEntityOperationsTest.php b/core/modules/views/tests/src/Functional/Handler/FieldEntityOperationsTest.php
index 7ced4f7071..028973c4a7 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'];
 
   protected function setUp($import_test_views = TRUE) {
     parent::setUp($import_test_views);
diff --git a/core/modules/views/tests/src/Functional/Handler/FieldGroupRowsTest.php b/core/modules/views/tests/src/Functional/Handler/FieldGroupRowsTest.php
index d38ba41792..b2d96adf50 100644
--- a/core/modules/views/tests/src/Functional/Handler/FieldGroupRowsTest.php
+++ b/core/modules/views/tests/src/Functional/Handler/FieldGroupRowsTest.php
@@ -30,7 +30,7 @@ class FieldGroupRowsTest extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'field_test'];
+  protected static $modules = ['node', 'field_test'];
 
   /**
    * Field that will be created to test the group/ungroup rows functionality
diff --git a/core/modules/views/tests/src/Functional/Handler/FieldGroupRowsWebTest.php b/core/modules/views/tests/src/Functional/Handler/FieldGroupRowsWebTest.php
index 275960cb0d..0efbd5166b 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'];
 
   /**
    * The page node type.
diff --git a/core/modules/views/tests/src/Functional/Handler/FieldWebTest.php b/core/modules/views/tests/src/Functional/Handler/FieldWebTest.php
index a3646f0c0b..7b4df3190d 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'];
 
   /**
    * Maps between the key in the expected result and the query result.
diff --git a/core/modules/views/tests/src/Functional/Handler/FilterDateTest.php b/core/modules/views/tests/src/Functional/Handler/FilterDateTest.php
index ec3b52385f..6e52bac4d6 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'];
 
   protected function setUp($import_test_views = TRUE) {
     parent::setUp($import_test_views);
diff --git a/core/modules/views/tests/src/Functional/Handler/FilterPlaceholderTextTest.php b/core/modules/views/tests/src/Functional/Handler/FilterPlaceholderTextTest.php
index 7d852f7c87..81f6826add 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'];
 
   /**
    * Tests that HTML placeholders are added, when appropriate.
diff --git a/core/modules/views/tests/src/Functional/Handler/HandlerAllTest.php b/core/modules/views/tests/src/Functional/Handler/HandlerAllTest.php
index 1a37ce8307..b81ef29af2 100644
--- a/core/modules/views/tests/src/Functional/Handler/HandlerAllTest.php
+++ b/core/modules/views/tests/src/Functional/Handler/HandlerAllTest.php
@@ -23,7 +23,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 cffe6d1402..1522f8d76f 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'];
 
   protected function setUp($import_test_views = TRUE) {
     parent::setUp($import_test_views);
diff --git a/core/modules/views/tests/src/Functional/Plugin/AccessTest.php b/core/modules/views/tests/src/Functional/Plugin/AccessTest.php
index 31a64cc1cf..31ab4abcfa 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'];
 
   /**
    * Web user for testing.
diff --git a/core/modules/views/tests/src/Functional/Plugin/ArgumentDefaultTest.php b/core/modules/views/tests/src/Functional/Plugin/ArgumentDefaultTest.php
index 57eb2320b8..b4a0bfe26b 100644
--- a/core/modules/views/tests/src/Functional/Plugin/ArgumentDefaultTest.php
+++ b/core/modules/views/tests/src/Functional/Plugin/ArgumentDefaultTest.php
@@ -35,7 +35,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) {
     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 1d78204db9..79273d0c26 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'];
 
   /**
    * The node storage.
diff --git a/core/modules/views/tests/src/Functional/Plugin/CacheWebTest.php b/core/modules/views/tests/src/Functional/Plugin/CacheWebTest.php
index f8ce5a927f..19dc5c9985 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 215ee2890f..36f82bbc51 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'];
 
   /**
    * Views used by this test.
diff --git a/core/modules/views/tests/src/Functional/Plugin/DisabledDisplayTest.php b/core/modules/views/tests/src/Functional/Plugin/DisabledDisplayTest.php
index 708ac55030..7b00ea53fc 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'];
 
   protected function setUp($import_test_views = TRUE) {
     parent::setUp($import_test_views);
diff --git a/core/modules/views/tests/src/Functional/Plugin/DisplayAttachmentTest.php b/core/modules/views/tests/src/Functional/Plugin/DisplayAttachmentTest.php
index 8c326baa05..ac6235182d 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'];
 
   protected function setUp($import_test_views = TRUE) {
     parent::setUp($import_test_views);
diff --git a/core/modules/views/tests/src/Functional/Plugin/DisplayEntityReferenceTest.php b/core/modules/views/tests/src/Functional/Plugin/DisplayEntityReferenceTest.php
index daad14896e..c648607f18 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'];
 
   /**
    * The used field name in the test.
diff --git a/core/modules/views/tests/src/Functional/Plugin/DisplayPageWebTest.php b/core/modules/views/tests/src/Functional/Plugin/DisplayPageWebTest.php
index 501d9226ee..c31698a1b1 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 6748152987..66831e0ae1 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'];
 
   protected function setUp($import_test_views = TRUE) {
     parent::setUp();
diff --git a/core/modules/views/tests/src/Functional/Plugin/ExposedFormCheckboxesTest.php b/core/modules/views/tests/src/Functional/Plugin/ExposedFormCheckboxesTest.php
index 80584d796e..e8404c3478 100644
--- a/core/modules/views/tests/src/Functional/Plugin/ExposedFormCheckboxesTest.php
+++ b/core/modules/views/tests/src/Functional/Plugin/ExposedFormCheckboxesTest.php
@@ -28,7 +28,7 @@ class ExposedFormCheckboxesTest extends ViewTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'views_ui', 'taxonomy'];
+  protected static $modules = ['node', 'views_ui', 'taxonomy'];
 
   /**
    * Test terms.
diff --git a/core/modules/views/tests/src/Functional/Plugin/ExposedFormTest.php b/core/modules/views/tests/src/Functional/Plugin/ExposedFormTest.php
index eaa5aaa32f..b46725d6bd 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'];
 
   protected function setUp($import_test_views = TRUE) {
     parent::setUp($import_test_views);
diff --git a/core/modules/views/tests/src/Functional/Plugin/FilterTest.php b/core/modules/views/tests/src/Functional/Plugin/FilterTest.php
index 60424108f5..6cf285e3e3 100644
--- a/core/modules/views/tests/src/Functional/Plugin/FilterTest.php
+++ b/core/modules/views/tests/src/Functional/Plugin/FilterTest.php
@@ -26,7 +26,7 @@ class FilterTest extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = ['views_ui', 'node'];
+  protected static $modules = ['views_ui', 'node'];
 
   protected function setUp($import_test_views = TRUE) {
     parent::setUp($import_test_views);
diff --git a/core/modules/views/tests/src/Functional/Plugin/MenuLinkTest.php b/core/modules/views/tests/src/Functional/Plugin/MenuLinkTest.php
index 8afbb57b8c..c452084300 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'];
 
   /**
    * A user with permission to administer views, menus and view content.
diff --git a/core/modules/views/tests/src/Functional/Plugin/MiniPagerTest.php b/core/modules/views/tests/src/Functional/Plugin/MiniPagerTest.php
index 492d22f987..d8d7507b26 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'];
 
   /**
    * Nodes used by the test.
diff --git a/core/modules/views/tests/src/Functional/Plugin/NumericFormatPluralTest.php b/core/modules/views/tests/src/Functional/Plugin/NumericFormatPluralTest.php
index 08f2504c54..e72a2b2b58 100644
--- a/core/modules/views/tests/src/Functional/Plugin/NumericFormatPluralTest.php
+++ b/core/modules/views/tests/src/Functional/Plugin/NumericFormatPluralTest.php
@@ -18,7 +18,7 @@ class NumericFormatPluralTest extends ViewTestBase {
    *
    * @var array
    */
-  public static $modules = ['views_ui', 'file', 'language', 'locale'];
+  protected static $modules = ['views_ui', 'file', 'language', 'locale'];
 
   /**
    * Views used by this test.
diff --git a/core/modules/views/tests/src/Functional/Plugin/PagerTest.php b/core/modules/views/tests/src/Functional/Plugin/PagerTest.php
index c80fa09bfc..b745ea6bed 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'];
 
   /**
    * String translation storage object.
diff --git a/core/modules/views/tests/src/Functional/Plugin/StyleSummaryTest.php b/core/modules/views/tests/src/Functional/Plugin/StyleSummaryTest.php
index a2359b9734..77674e2ff4 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 1b3078b544..950379f990 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'];
 
   public function setUp($import_test_views = TRUE) {
     parent::setUp($import_test_views);
diff --git a/core/modules/views/tests/src/Functional/Plugin/ViewsFormTest.php b/core/modules/views/tests/src/Functional/Plugin/ViewsFormTest.php
index 3f6e1eca5f..9ad5e43918 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'];
 
   /**
    * Tests the Views form wrapper.
diff --git a/core/modules/views/tests/src/Functional/RenderCacheWebTest.php b/core/modules/views/tests/src/Functional/RenderCacheWebTest.php
index f8dfdd810d..c297b7ea85 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/SearchIntegrationTest.php b/core/modules/views/tests/src/Functional/SearchIntegrationTest.php
index f4daac774e..7954dec91e 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'];
 
   /**
    * Views used by this test.
diff --git a/core/modules/views/tests/src/Functional/SearchMultilingualTest.php b/core/modules/views/tests/src/Functional/SearchMultilingualTest.php
index d6a72bf8cd..1849306fa8 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'];
 
   /**
    * Views used by this test.
diff --git a/core/modules/views/tests/src/Functional/TaxonomyGlossaryTest.php b/core/modules/views/tests/src/Functional/TaxonomyGlossaryTest.php
index fbf5f41458..1f7a4c630a 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'];
 
   /**
    * Views used by this test.
diff --git a/core/modules/views/tests/src/Functional/ViewTestBase.php b/core/modules/views/tests/src/Functional/ViewTestBase.php
index 10bc5d48bc..ec499ae369 100644
--- a/core/modules/views/tests/src/Functional/ViewTestBase.php
+++ b/core/modules/views/tests/src/Functional/ViewTestBase.php
@@ -28,7 +28,7 @@
    *
    * @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 80a8398722..90443ba36d 100644
--- a/core/modules/views/tests/src/Functional/ViewsEscapingTest.php
+++ b/core/modules/views/tests/src/Functional/ViewsEscapingTest.php
@@ -25,7 +25,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/ViewsThemeIntegrationTest.php b/core/modules/views/tests/src/Functional/ViewsThemeIntegrationTest.php
index 9bdb405b86..4db8a0f027 100644
--- a/core/modules/views/tests/src/Functional/ViewsThemeIntegrationTest.php
+++ b/core/modules/views/tests/src/Functional/ViewsThemeIntegrationTest.php
@@ -28,7 +28,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/TaggedWithTest.php b/core/modules/views/tests/src/Functional/Wizard/TaggedWithTest.php
index 680d64496e..7067a6bcd1 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'];
 
   /**
    * Node type with an autocomplete tagging field.
diff --git a/core/modules/views/tests/src/Functional/Wizard/WizardTestBase.php b/core/modules/views/tests/src/Functional/Wizard/WizardTestBase.php
index 0178c08c25..924db29c60 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 @@
    *
    * @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/ClickSortingAJAXTest.php b/core/modules/views/tests/src/FunctionalJavascript/ClickSortingAJAXTest.php
index 0e5095d81a..e000ed6374 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 JavascriptTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'views', 'views_test_config'];
+  protected static $modules = ['node', 'views', 'views_test_config'];
 
   public static $testViews = ['test_content_ajax'];
 
diff --git a/core/modules/views/tests/src/FunctionalJavascript/ExposedFilterAJAXTest.php b/core/modules/views/tests/src/FunctionalJavascript/ExposedFilterAJAXTest.php
index 974aa2da42..cbf17d6f79 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 JavascriptTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'views'];
+  protected static $modules = ['node', 'views'];
 
   /**
    * Tests if exposed filtering via AJAX works for the "Content" View.
diff --git a/core/modules/views/tests/src/FunctionalJavascript/GlossaryViewTest.php b/core/modules/views/tests/src/FunctionalJavascript/GlossaryViewTest.php
index 594d6f764b..8cefd71dd3 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 JavascriptTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['language', 'node', 'views', 'views_test_config'];
+  protected static $modules = ['language', 'node', 'views', 'views_test_config'];
 
   /**
    * @var array
diff --git a/core/modules/views/tests/src/FunctionalJavascript/PaginationAJAXTest.php b/core/modules/views/tests/src/FunctionalJavascript/PaginationAJAXTest.php
index 850c5536f5..ad58e107e8 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 JavascriptTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'views', 'views_test_config'];
+  protected static $modules = ['node', 'views', 'views_test_config'];
 
   /**
    * @var array
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 dd1d1ae264..8ab0cd9e16 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 JavascriptTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'views', 'views_ui', 'views_test_config'];
+  protected static $modules = ['node', 'views', 'views_ui', 'views_test_config'];
 
   /**
    * Views used by this test.
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 76f0ff1e21..bb80027b2a 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 JavascriptTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'views', 'views_ui', 'views_test_config'];
+  protected static $modules = ['node', 'views', 'views_ui', 'views_test_config'];
 
   /**
    * Views used by this test.
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 9a9b2da4a8..de7c2af507 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 JavascriptTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'views', 'views_ui', 'user', 'views_test_config'];
+  protected static $modules = ['node', 'views', 'views_ui', 'user', 'views_test_config'];
 
   /**
    * Views used by this test.
diff --git a/core/modules/views/tests/src/Kernel/Entity/EntityViewsWithMultivalueBasefieldTest.php b/core/modules/views/tests/src/Kernel/Entity/EntityViewsWithMultivalueBasefieldTest.php
index edf0fb0e10..3a5014f64c 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/RowEntityRenderersTest.php b/core/modules/views/tests/src/Kernel/Entity/RowEntityRenderersTest.php
index a110f00209..961de7928c 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 4929c7ecf7..b4ff752e5d 100644
--- a/core/modules/views/tests/src/Kernel/Entity/ViewEntityDependenciesTest.php
+++ b/core/modules/views/tests/src/Kernel/Entity/ViewEntityDependenciesTest.php
@@ -30,7 +30,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 2319a7064a..3d55196891 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/Handler/AreaEmptyTest.php b/core/modules/views/tests/src/Kernel/Handler/AreaEmptyTest.php
index 0f209cac2e..63c434bb4f 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 a95214a782..833316ebe4 100644
--- a/core/modules/views/tests/src/Kernel/Handler/AreaEntityTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/AreaEntityTest.php
@@ -24,7 +24,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 84a66ab5c8..e670eab6c1 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 2feaaf144e..0cf95c37e4 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 6eaba132d5..69b75c7e65 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/ComputedFieldTest.php b/core/modules/views/tests/src/Kernel/Handler/ComputedFieldTest.php
index 8f85f69018..c6486d82bf 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'];
 
 
   /**
diff --git a/core/modules/views/tests/src/Kernel/Handler/EntityTestViewsFieldAccessTest.php b/core/modules/views/tests/src/Kernel/Handler/EntityTestViewsFieldAccessTest.php
index ee219ab7a4..e485d16c21 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 b5c52fef77..ca9f1ed1ab 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FieldCounterTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FieldCounterTest.php
@@ -17,7 +17,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 b789bd62ad..ffc1a80e21 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 a7f5116f35..065c78c987 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 5ff77bc9f4..37e1f4effe 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 @@
   /**
    * {@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 8bdab81b63..fc59559385 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/FieldKernelTest.php b/core/modules/views/tests/src/Kernel/Handler/FieldKernelTest.php
index 677a3f5e40..2faef9f7cc 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FieldKernelTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FieldKernelTest.php
@@ -15,7 +15,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 02419f4847..f49d682492 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 0814402ca6..61d2cb5940 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FieldUrlTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FieldUrlTest.php
@@ -13,7 +13,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 7beceb9bd9..cf4f1b15a1 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 325da5106e..5495ceaa43 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 7cdd41f525..e653cbbf0e 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 feffbafd9e..fb5c8e6853 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 d78f7c92e2..1138c549a4 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 e02a8430c7..a78d0bb22a 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FilterInOperatorTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FilterInOperatorTest.php
@@ -12,7 +12,7 @@
  */
 class FilterInOperatorTest 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/FilterNumericTest.php b/core/modules/views/tests/src/Kernel/Handler/FilterNumericTest.php
index e1093e47f7..53b72f2e2d 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 03c1b878a5..71e718642a 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 53d25b38e6..16c0e19a50 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 e49ef7a2c7..6f21954a95 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 9fe9df6416..d8d287d598 100644
--- a/core/modules/views/tests/src/Kernel/ModuleTest.php
+++ b/core/modules/views/tests/src/Kernel/ModuleTest.php
@@ -26,7 +26,7 @@ class ModuleTest extends ViewsKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['field', 'user', 'block'];
+  protected static $modules = ['field', 'user', 'block'];
 
   /**
    * Stores the last triggered error, for example via debug().
diff --git a/core/modules/views/tests/src/Kernel/Plugin/BlockDependenciesTest.php b/core/modules/views/tests/src/Kernel/Plugin/BlockDependenciesTest.php
index 1a9f32eff7..07fb82239e 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 9f6066eff3..57150a0e70 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/CacheTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/CacheTest.php
@@ -28,7 +28,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 d08adaacb0..4a49038482 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 69666cf342..64966239bf 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 3232ecb815..25a3ff4790 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/DisplayPageTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/DisplayPageTest.php
@@ -30,7 +30,7 @@ class DisplayPageTest extends ViewsKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['system', 'user', 'field'];
+  protected static $modules = ['system', 'user', 'field'];
 
   /**
    * 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 6767fffe3c..8a16f85b53 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/ExposedFormRenderTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/ExposedFormRenderTest.php
@@ -22,7 +22,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 c6f581a655..891e013520 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 19d5e9554b..4261ac99df 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 @@
    *
    * @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 208a6f0ee3..599629a5fe 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 223963e2d0..c0b022b18c 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/SqlEntityLoadingTest.php b/core/modules/views/tests/src/Kernel/Plugin/SqlEntityLoadingTest.php
index 3e3bbaca36..4c32ef73bf 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 d0683deb47..a3ae4ec9f6 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/StyleMappingTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/StyleMappingTest.php
@@ -11,7 +11,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 879f6d44d5..f78afc4692 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 e4a088459f..f3c1dc40b0 100644
--- a/core/modules/views/tests/src/Kernel/QueryGroupByTest.php
+++ b/core/modules/views/tests/src/Kernel/QueryGroupByTest.php
@@ -27,7 +27,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 02e90cd502..2168665de0 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 dcd1859be3..1b21dfeaf8 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 4b1cfc362c..76253f2823 100644
--- a/core/modules/views/tests/src/Kernel/TokenReplaceTest.php
+++ b/core/modules/views/tests/src/Kernel/TokenReplaceTest.php
@@ -12,7 +12,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 7390214052..ec2a25f749 100644
--- a/core/modules/views/tests/src/Kernel/ViewExecutableTest.php
+++ b/core/modules/views/tests/src/Kernel/ViewExecutableTest.php
@@ -31,7 +31,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 294bb0f44c..e82a546d40 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 4bbe402863..c65b77970d 100644
--- a/core/modules/views/tests/src/Kernel/ViewsKernelTestBase.php
+++ b/core/modules/views/tests/src/Kernel/ViewsKernelTestBase.php
@@ -28,7 +28,7 @@
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system', 'views', 'views_test_config', 'views_test_data', 'user'];
+  protected static $modules = ['system', 'views', 'views_test_config', 'views_test_data', 'user'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/tests/src/Kernel/Wizard/WizardPluginBaseKernelTest.php b/core/modules/views/tests/src/Kernel/Wizard/WizardPluginBaseKernelTest.php
index beb7b486d5..29844b58e9 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 32d1ae9802..9ed2345341 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'];
 
   /**
    * Views used by this test.
diff --git a/core/modules/views_ui/tests/src/Functional/AreaEntityUITest.php b/core/modules/views_ui/tests/src/Functional/AreaEntityUITest.php
index d74575fd46..41faa009a3 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'];
 
   public function testUI() {
     // Set up a block and a entity_test entity.
diff --git a/core/modules/views_ui/tests/src/Functional/DisplayCRUDTest.php b/core/modules/views_ui/tests/src/Functional/DisplayCRUDTest.php
index 1e53c71108..70f47a30f8 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'];
 
   /**
    * Tests adding a display.
diff --git a/core/modules/views_ui/tests/src/Functional/DisplayFeedTest.php b/core/modules/views_ui/tests/src/Functional/DisplayFeedTest.php
index 9dba45010f..1230c12ae2 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'];
 
   /**
    * Tests feed display admin UI.
diff --git a/core/modules/views_ui/tests/src/Functional/DisplayPathTest.php b/core/modules/views_ui/tests/src/Functional/DisplayPathTest.php
index 7291dc2e8d..d88dd34d4a 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) {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['menu_ui'];
+  protected static $modules = ['menu_ui'];
 
   /**
    * Views used by this test.
diff --git a/core/modules/views_ui/tests/src/Functional/DisplayTest.php b/core/modules/views_ui/tests/src/Functional/DisplayTest.php
index 9b447ddc50..2e2f08e4f4 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'];
 
   /**
    * Tests adding a display.
diff --git a/core/modules/views_ui/tests/src/Functional/ExposedFormUITest.php b/core/modules/views_ui/tests/src/Functional/ExposedFormUITest.php
index 0822eb833c..c45394b078 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'];
 
   /**
    * Array of error message strings raised by the grouped form.
diff --git a/core/modules/views_ui/tests/src/Functional/FilterUITest.php b/core/modules/views_ui/tests/src/Functional/FilterUITest.php
index 18ada1bca5..d831d05881 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 31829941fc..d24c628521 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'];
 
   /**
    * Views used by this test.
diff --git a/core/modules/views_ui/tests/src/Functional/NewViewConfigSchemaTest.php b/core/modules/views_ui/tests/src/Functional/NewViewConfigSchemaTest.php
index ef493ff8c8..0da216a5be 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'];
 
   /**
    * Tests creating brand new views.
diff --git a/core/modules/views_ui/tests/src/Functional/ReportFieldsTest.php b/core/modules/views_ui/tests/src/Functional/ReportFieldsTest.php
index d2527d0b9d..5ffd7004c9 100644
--- a/core/modules/views_ui/tests/src/Functional/ReportFieldsTest.php
+++ b/core/modules/views_ui/tests/src/Functional/ReportFieldsTest.php
@@ -20,7 +20,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 e7979930c1..7cf4ed6413 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'];
 
   /**
    * Stores an admin user used by the different tests.
diff --git a/core/modules/views_ui/tests/src/Functional/StorageTest.php b/core/modules/views_ui/tests/src/Functional/StorageTest.php
index df3d030e70..96e61e251c 100644
--- a/core/modules/views_ui/tests/src/Functional/StorageTest.php
+++ b/core/modules/views_ui/tests/src/Functional/StorageTest.php
@@ -24,7 +24,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 df42d8e11d..1c6941d873 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'];
 
   /**
    * Test that the right tokens are shown as available for replacement.
diff --git a/core/modules/views_ui/tests/src/Functional/TranslatedViewTest.php b/core/modules/views_ui/tests/src/Functional/TranslatedViewTest.php
index 7238ffad64..d85d74ae33 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 684b91f89d..e20f555739 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 @@
    *
    * @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 3265e1a2f5..fe8dd99d2c 100644
--- a/core/modules/views_ui/tests/src/Functional/UnsavedPreviewTest.php
+++ b/core/modules/views_ui/tests/src/Functional/UnsavedPreviewTest.php
@@ -26,7 +26,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 956ab9bc0c..d4633e7cf4 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'];
 
   /**
    * A user with permission to administer views.
diff --git a/core/modules/views_ui/tests/src/Functional/ViewsUITourTest.php b/core/modules/views_ui/tests/src/Functional/ViewsUITourTest.php
index 839fe3a47a..19b82d672b 100644
--- a/core/modules/views_ui/tests/src/Functional/ViewsUITourTest.php
+++ b/core/modules/views_ui/tests/src/Functional/ViewsUITourTest.php
@@ -31,7 +31,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() {
     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 cabb48ebcf..49a467edad 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'];
 
   public function testViewsUi() {
     $this->drupalGet('admin/structure/views/view/sa_contrib_2013_035');
diff --git a/core/modules/views_ui/tests/src/FunctionalJavascript/DisplayTest.php b/core/modules/views_ui/tests/src/FunctionalJavascript/DisplayTest.php
index c8d37f21c3..8feb4ab0d0 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 JavascriptTestBase {
   /**
    * {@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 e48487a6ed..8a2aae7db6 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 JavascriptTestBase {
   /**
    * {@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 32b1a400cb..5404a7c470 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 JavascriptTestBase {
   /**
    * {@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 4cf51d57fa..c7235c1b4f 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 JavascriptTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node', 'views', 'views_ui'];
+  protected static $modules = ['node', 'views', 'views_ui'];
 
   /**
    * Tests if the Views UI dialogs open on consecutive requests.
diff --git a/core/modules/views_ui/tests/src/FunctionalJavascript/ViewsListingTest.php b/core/modules/views_ui/tests/src/FunctionalJavascript/ViewsListingTest.php
index cab99bd7bc..4d7a36109c 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 JavascriptTestBase {
   /**
    * {@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 3fb1167e1f..f65ce2a61a 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 JavascriptTestBase {
   /**
    * {@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 44d341776d..a61281263c 100644
--- a/core/modules/views_ui/tests/src/Kernel/TagTest.php
+++ b/core/modules/views_ui/tests/src/Kernel/TagTest.php
@@ -19,7 +19,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 0c2fe00463..e36e296181 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 b2e9807333..3c1632b67a 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 db687cfbb4..f906529aac 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 ce796a4f97..43c0765f76 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 @@
   /**
    * {@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 db443e4763..2147b9a3f0 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/WorkflowUiNoTypeTest.php b/core/modules/workflows/tests/src/Functional/WorkflowUiNoTypeTest.php
index 197386ebd0..f2c2bc33ab 100644
--- a/core/modules/workflows/tests/src/Functional/WorkflowUiNoTypeTest.php
+++ b/core/modules/workflows/tests/src/Functional/WorkflowUiNoTypeTest.php
@@ -16,7 +16,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 b15b24099c..29ae6d9fdc 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 15d27286ca..501675da89 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 f3f0b5768b..2f294fd915 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 8d4edc9012..13d871822d 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 cd4e7ceb14..c70b85936f 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 c1070dc53c..bc6d270d70 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/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxCallbacksTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxCallbacksTest.php
index e13ecfd56c..42a9226397 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxCallbacksTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxCallbacksTest.php
@@ -14,7 +14,7 @@ class AjaxCallbacksTest extends JavascriptTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['ajax_forms_test'];
+  protected static $modules = ['ajax_forms_test'];
 
   /**
    * Tests if Ajax callback works on date element.
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormImageButtonTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormImageButtonTest.php
index 4811a350ac..7f96baeb83 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormImageButtonTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormImageButtonTest.php
@@ -14,7 +14,7 @@ class AjaxFormImageButtonTest extends JavascriptTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['ajax_forms_test'];
+  protected static $modules = ['ajax_forms_test'];
 
   /**
    * Tests image buttons can be operated with the keyboard ENTER key.
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormPageCacheTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormPageCacheTest.php
index 3d174b04df..9590e995df 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormPageCacheTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormPageCacheTest.php
@@ -14,7 +14,7 @@ class AjaxFormPageCacheTest extends JavascriptTestBase {
   /**
    * {@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 e05940537c..82e2122474 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxTest.php
@@ -14,7 +14,7 @@ class AjaxTest extends JavascriptTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['ajax_test'];
+  protected static $modules = ['ajax_test'];
 
   public function testAjaxWithAdminRoute() {
     \Drupal::service('theme_installer')->install(['stable', 'seven']);
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/BackwardCompatibilityTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/BackwardCompatibilityTest.php
index 077c3aa1ae..756ebdb16f 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/BackwardCompatibilityTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/BackwardCompatibilityTest.php
@@ -14,7 +14,7 @@ class BackwardCompatibilityTest extends JavascriptTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'js_ajax_test',
   ];
 
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Core/Form/FormGroupingElementsTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Core/Form/FormGroupingElementsTest.php
index 92b3a739f6..cccab29db3 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 JavascriptTestBase {
    *
    * @var array
    */
-  public static $modules = ['form_test'];
+  protected static $modules = ['form_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Core/MachineNameTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Core/MachineNameTest.php
index bf2643da6a..52b685b891 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/Core/MachineNameTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Core/MachineNameTest.php
@@ -19,7 +19,7 @@ class MachineNameTest extends JavascriptTestBase {
    *
    * @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 fa2d541c8a..77a8a4adf1 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 JavascriptTestBase {
   /**
    * {@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 19cf5a4b35..c6c472c453 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/Dialog/DialogPositionTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Dialog/DialogPositionTest.php
@@ -14,7 +14,7 @@ class DialogPositionTest extends JavascriptTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['block'];
+  protected static $modules = ['block'];
 
   /**
    * Tests if the dialog UI works properly with block layout page.
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/EntityReference/EntityReferenceAutocompleteWidgetTest.php b/core/tests/Drupal/FunctionalJavascriptTests/EntityReference/EntityReferenceAutocompleteWidgetTest.php
index 511dee6e32..1b3a5c4138 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/EntityReference/EntityReferenceAutocompleteWidgetTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/EntityReference/EntityReferenceAutocompleteWidgetTest.php
@@ -21,7 +21,7 @@ class EntityReferenceAutocompleteWidgetTest extends JavascriptTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['node'];
+  protected static $modules = ['node'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Tests/JSWebAssertTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Tests/JSWebAssertTest.php
index 36f6340f72..057b01c2a1 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/Tests/JSWebAssertTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Tests/JSWebAssertTest.php
@@ -17,7 +17,7 @@ class JSWebAssertTest extends JavascriptTestBase {
    *
    * @var array
    */
-  public static $modules = ['js_webassert_test'];
+  protected static $modules = ['js_webassert_test'];
 
   /**
    * Tests that JSWebAssert assertions work correctly.
diff --git a/core/tests/Drupal/FunctionalTests/Breadcrumb/Breadcrumb404Test.php b/core/tests/Drupal/FunctionalTests/Breadcrumb/Breadcrumb404Test.php
index 7dcafbff85..cbf6b987a7 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'];
 
   /**
    * Tests that different 404s don't create unnecessary cache entries.
diff --git a/core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php b/core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php
index 38e610c3b5..c2b236f3c4 100644
--- a/core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php
+++ b/core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php
@@ -23,7 +23,7 @@ class BrowserTestBaseTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['test_page_test', 'form_test', 'system_test'];
+  protected static $modules = ['test_page_test', 'form_test', 'system_test'];
 
   /**
    * Tests basic page test.
diff --git a/core/tests/Drupal/FunctionalTests/Core/Config/SchemaConfigListenerTest.php b/core/tests/Drupal/FunctionalTests/Core/Config/SchemaConfigListenerTest.php
index 698a7d1a03..262f58d387 100644
--- a/core/tests/Drupal/FunctionalTests/Core/Config/SchemaConfigListenerTest.php
+++ b/core/tests/Drupal/FunctionalTests/Core/Config/SchemaConfigListenerTest.php
@@ -17,6 +17,6 @@ class SchemaConfigListenerTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['config_test'];
+  protected static $modules = ['config_test'];
 
 }
diff --git a/core/tests/Drupal/FunctionalTests/Datetime/TimestampTest.php b/core/tests/Drupal/FunctionalTests/Datetime/TimestampTest.php
index 8faf8c6c91..7259ac97d5 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 e8c8ae5e54..78d4024b13 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 133e445bd0..9bea864fb5 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/HttpKernel/CorsIntegrationTest.php b/core/tests/Drupal/FunctionalTests/HttpKernel/CorsIntegrationTest.php
index c8748342fb..677df6f85c 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'];
 
   public function testCrossSiteRequest() {
     // Test default parameters.
diff --git a/core/tests/Drupal/FunctionalTests/Image/ToolkitSetupFormTest.php b/core/tests/Drupal/FunctionalTests/Image/ToolkitSetupFormTest.php
index d501f1d98c..eecf9e4e92 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 2f6b7ccd7c..0f1bc3df90 100644
--- a/core/tests/Drupal/FunctionalTests/Image/ToolkitTestBase.php
+++ b/core/tests/Drupal/FunctionalTests/Image/ToolkitTestBase.php
@@ -19,7 +19,7 @@
    *
    * @var array
    */
-  public static $modules = ['image_test'];
+  protected static $modules = ['image_test'];
 
   /**
    * The URI for the file.
diff --git a/core/tests/Drupal/FunctionalTests/Routing/CaseInsensitivePathTest.php b/core/tests/Drupal/FunctionalTests/Routing/CaseInsensitivePathTest.php
index 3aaac143ea..1db8dbf9f0 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/PathEncodedTest.php b/core/tests/Drupal/FunctionalTests/Routing/PathEncodedTest.php
index a8aee89711..8332399067 100644
--- a/core/tests/Drupal/FunctionalTests/Routing/PathEncodedTest.php
+++ b/core/tests/Drupal/FunctionalTests/Routing/PathEncodedTest.php
@@ -15,7 +15,7 @@ class PathEncodedTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system', 'path_encoded_test'];
+  protected static $modules = ['system', 'path_encoded_test'];
 
   public function testGetEncoded() {
     $route_paths = [
diff --git a/core/tests/Drupal/KernelTests/Component/Utility/SafeMarkupKernelTest.php b/core/tests/Drupal/KernelTests/Component/Utility/SafeMarkupKernelTest.php
index 8fab30727e..82545bc508 100644
--- a/core/tests/Drupal/KernelTests/Component/Utility/SafeMarkupKernelTest.php
+++ b/core/tests/Drupal/KernelTests/Component/Utility/SafeMarkupKernelTest.php
@@ -16,7 +16,7 @@ class SafeMarkupKernelTest 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 39a5accae3..63777157f3 100644
--- a/core/tests/Drupal/KernelTests/Config/DefaultConfigTest.php
+++ b/core/tests/Drupal/KernelTests/Config/DefaultConfigTest.php
@@ -27,7 +27,7 @@ class DefaultConfigTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system', 'user'];
+  protected static $modules = ['system', 'user'];
 
   /**
    * 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 06881f2564..f5d6b92306 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/PublishActionTest.php b/core/tests/Drupal/KernelTests/Core/Action/PublishActionTest.php
index 04bf1c053e..0bb19d90db 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 118f5428d8..bbc90299c9 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/Asset/AttachedAssetsTest.php b/core/tests/Drupal/KernelTests/Core/Asset/AttachedAssetsTest.php
index 1e1c6fd8fa..c6f474bb93 100644
--- a/core/tests/Drupal/KernelTests/Core/Asset/AttachedAssetsTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Asset/AttachedAssetsTest.php
@@ -39,7 +39,7 @@ class AttachedAssetsTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['language', 'simpletest', 'common_test', 'system'];
+  protected static $modules = ['language', 'simpletest', '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 4836e16f3a..fd091a8a92 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'];
+  protected static $modules = ['system'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/KernelTests/Core/Block/MultipleBlockFormTest.php b/core/tests/Drupal/KernelTests/Core/Block/MultipleBlockFormTest.php
index 2fbe025acf..140621fc03 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 e0eccbf58d..38f3ca16d6 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 0ae0230535..6cfce9e599 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 0fefc390f4..99f14dd1d1 100644
--- a/core/tests/Drupal/KernelTests/Core/Cache/DatabaseBackendTagTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Cache/DatabaseBackendTagTest.php
@@ -19,7 +19,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 358b92530c..4563bfe2d8 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/Command/DbDumpTest.php b/core/tests/Drupal/KernelTests/Core/Command/DbDumpTest.php
index 17b6ae41da..4c0f80b472 100644
--- a/core/tests/Drupal/KernelTests/Core/Command/DbDumpTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Command/DbDumpTest.php
@@ -22,7 +22,7 @@ class DbDumpTest 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'];
 
   /**
    * 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 23754879eb..f2a7c10397 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() {
     parent::setUp();
diff --git a/core/tests/Drupal/KernelTests/Core/Config/CacheabilityMetadataConfigOverrideTest.php b/core/tests/Drupal/KernelTests/Core/Config/CacheabilityMetadataConfigOverrideTest.php
index c52e3ea853..3882e015a1 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 9f2a1a75ff..88a4c0d6ef 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigCRUDTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigCRUDTest.php
@@ -32,7 +32,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 a9cd9f1902..705c329bdd 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 f29b88acd1..2798176715 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 4cbc16a0e0..054e4a68b9 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() {
     parent::setUp();
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityStaticCacheTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityStaticCacheTest.php
index 1cd9cb1753..71d7d9c909 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 20ceef4051..de48a32422 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 ce9a928d53..104ae7a045 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityStorageTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityStorageTest.php
@@ -18,7 +18,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 807152bfed..0c0089ab70 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 74bb7984e6..851fd6a8c0 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/ConfigImportRecreateTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigImportRecreateTest.php
index c69f9febb4..a25ef619f3 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigImportRecreateTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigImportRecreateTest.php
@@ -27,7 +27,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() {
     parent::setUp();
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigImportRenameValidationTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigImportRenameValidationTest.php
index 9c1875c85d..96f126fc6f 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigImportRenameValidationTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigImportRenameValidationTest.php
@@ -30,7 +30,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 59f9cb2ed7..ca5f2fbfa5 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() {
     parent::setUp();
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigImporterTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigImporterTest.php
index 4024b7f9d9..bf0fd7eecc 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigImporterTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigImporterTest.php
@@ -28,7 +28,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() {
     parent::setUp();
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigInstallTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigInstallTest.php
index 9e473c29ff..89bbc2a817 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigInstallTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigInstallTest.php
@@ -18,7 +18,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 5bf6f0ec47..e249bd37d8 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 a94123d4cb..d88ab6ade1 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 b2ddaa396d..7c662f4698 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() {
     parent::setUp();
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigOverridesPriorityTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigOverridesPriorityTest.php
index 6c568b8417..67c280c277 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 b2859a0bbf..04160f3dfa 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 62eff04d41..f1c034a37f 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 f06806cad6..082237da5d 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/SchemaCheckTraitTest.php b/core/tests/Drupal/KernelTests/Core/Config/SchemaCheckTraitTest.php
index a11bcb6592..2a879d7161 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 2674a3c6df..4518b727de 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 6fcfaa44ad..fb72d27149 100644
--- a/core/tests/Drupal/KernelTests/Core/Database/DatabaseTestBase.php
+++ b/core/tests/Drupal/KernelTests/Core/Database/DatabaseTestBase.php
@@ -12,7 +12,7 @@
  */
 abstract class DatabaseTestBase extends KernelTestBase {
 
-  public static $modules = ['database_test'];
+  protected static $modules = ['database_test'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/tests/Drupal/KernelTests/Core/Database/NextIdTest.php b/core/tests/Drupal/KernelTests/Core/Database/NextIdTest.php
index 129d50ba00..b078c7b98d 100644
--- a/core/tests/Drupal/KernelTests/Core/Database/NextIdTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Database/NextIdTest.php
@@ -15,7 +15,7 @@ class NextIdTest extends KernelTestBase {
    * The modules to enable.
    * @var array
    */
-  public static $modules = ['system'];
+  protected static $modules = ['system'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/tests/Drupal/KernelTests/Core/Database/RegressionTest.php b/core/tests/Drupal/KernelTests/Core/Database/RegressionTest.php
index 66eed0ae92..97e5dba99f 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 cd3ec4a163..ae67e14421 100644
--- a/core/tests/Drupal/KernelTests/Core/Database/SelectComplexTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Database/SelectComplexTest.php
@@ -19,7 +19,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/FormatDateTest.php b/core/tests/Drupal/KernelTests/Core/Datetime/FormatDateTest.php
index 036b385ae4..a127447bfd 100644
--- a/core/tests/Drupal/KernelTests/Core/Datetime/FormatDateTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Datetime/FormatDateTest.php
@@ -15,7 +15,7 @@ class FormatDateTest 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/Element/PathElementFormTest.php b/core/tests/Drupal/KernelTests/Core/Element/PathElementFormTest.php
index b5b9ffd5ec..12aa7ef304 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 613ba4e17d..5af2c6d428 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() {
     parent::setUp();
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/ConfigEntityQueryTest.php b/core/tests/Drupal/KernelTests/Core/Entity/ConfigEntityQueryTest.php
index 8dc101a465..9ffe272b4d 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 aa0044bd8e..d165e7016a 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 fe9bb4d284..5799b2c90c 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 5e25c90e0a..dda9da27e6 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 687ceb74c0..39ec64dcc4 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 99c99b0688..8c82ce5625 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityNonRevisionableFieldTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityNonRevisionableFieldTest.php
@@ -18,7 +18,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 6da9bb3baa..ed29e377c5 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 b5bcd487f2..5efe4ebb95 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 = ['system', 'field', 'filter', 'text', 'file', 'user', 'node', 'comment', 'taxonomy'];
+  protected static $modules = ['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 8f945b3cba..e3bd7777fe 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/DefaultTableMappingIntegrationTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/DefaultTableMappingIntegrationTest.php
@@ -26,7 +26,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 22476d760a..e10d34f1b2 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'];
+  protected static $modules = ['entity_schema_test'];
 
   /**
    * The module handler.
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityCrudHookTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityCrudHookTest.php
index 9b279a5e1d..7b269c8e41 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 d5cc5330e6..014c9027dd 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 348c33cbb8..d7e706fbc6 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php
@@ -45,7 +45,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/EntityDisplayBaseTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityDisplayBaseTest.php
index ec1a55cbbe..823ebb4cd5 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'];
+  protected static $modules = ['entity_test', 'entity_test_third_party', 'field', 'system', 'comment'];
 
   /**
    * @covers ::preSave
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityDisplayFormBaseTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityDisplayFormBaseTest.php
index 179c63e9f1..6f34e5ddc4 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/EntityFieldTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityFieldTest.php
index a42a74baae..620bd37a63 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityFieldTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityFieldTest.php
@@ -32,7 +32,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/EntityKernelTestBase.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityKernelTestBase.php
index f7108d53b1..71fba5dcb3 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityKernelTestBase.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityKernelTestBase.php
@@ -17,7 +17,7 @@
    *
    * @var array
    */
-  public static $modules = ['user', 'system', 'field', 'text', 'filter', 'entity_test'];
+  protected static $modules = ['user', 'system', 'field', 'text', 'filter', 'entity_test'];
 
   /**
    * The entity manager service.
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityLanguageTestBase.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityLanguageTestBase.php
index 570aa98446..3bb82a78a0 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityLanguageTestBase.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityLanguageTestBase.php
@@ -40,7 +40,7 @@
    */
   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 2160da96e5..bf0f590333 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() {
     parent::setUp();
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryAggregateTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryAggregateTest.php
index b6362fbcae..c534606772 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 0bb5b16c34..2a4bc3b408 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryRelationshipTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryRelationshipTest.php
@@ -23,7 +23,7 @@ class EntityQueryRelationshipTest extends EntityKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['taxonomy'];
+  protected static $modules = ['taxonomy'];
 
   /**
    * @var \Drupal\Core\Entity\Query\QueryFactory
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryTest.php
index 9edee5cd21..d9834ddc60 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 cedf6851a8..8c9bedc0bf 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 b2c72b99d9..55e0210e9c 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() {
     parent::setUp();
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityRevisionTranslationTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityRevisionTranslationTest.php
index addbad2e0f..176bdffbe5 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 e5407fcc96..cfec67525a 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/EntityTypeConstraintValidatorTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityTypeConstraintValidatorTest.php
index 3671d6d408..201ffa6063 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() {
     parent::setUp();
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityTypedDataDefinitionTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityTypedDataDefinitionTest.php
index ece711b1b0..73fff9cabb 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityTypedDataDefinitionTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityTypedDataDefinitionTest.php
@@ -34,7 +34,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() {
     parent::setup();
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityValidationTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityValidationTest.php
index 2a6dfed6c2..c0c0d4f192 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 7ff6caf2b1..1fcab3ce1f 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/FieldSqlStorageTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/FieldSqlStorageTest.php
@@ -23,7 +23,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 041b062f45..fb67f7c642 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', 'user', 'system'];
+  protected static $modules = ['entity_test', 'field', 'user', 'system'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/RevisionableContentEntityBaseTest.php b/core/tests/Drupal/KernelTests/Core/Entity/RevisionableContentEntityBaseTest.php
index 74b2d6e4d8..d1ebf4b79d 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/RevisionableContentEntityBaseTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/RevisionableContentEntityBaseTest.php
@@ -17,7 +17,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 df9f4b1337..321ec3bf42 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/RouteProviderTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/RouteProviderTest.php
@@ -20,7 +20,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 3f182c91e8..2682e8fb91 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 96e469a84b..cfb9e0a0be 100644
--- a/core/tests/Drupal/KernelTests/Core/Extension/ModuleConfigureRouteTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Extension/ModuleConfigureRouteTest.php
@@ -17,7 +17,7 @@ class ModuleConfigureRouteTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system', 'user'];
+  protected static $modules = ['system', 'user'];
 
   /**
    * @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 7d29a26124..7eb3a3c642 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/Extension/ModuleInstallerTest.php b/core/tests/Drupal/KernelTests/Core/Extension/ModuleInstallerTest.php
index ff183c6f00..25a896186a 100644
--- a/core/tests/Drupal/KernelTests/Core/Extension/ModuleInstallerTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Extension/ModuleInstallerTest.php
@@ -22,7 +22,7 @@ class ModuleInstallerTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['system'];
+  protected static $modules = ['system'];
 
   /**
    * Tests that routes are rebuilt during install and uninstall of modules.
diff --git a/core/tests/Drupal/KernelTests/Core/Field/Entity/BaseFieldOverrideTest.php b/core/tests/Drupal/KernelTests/Core/Field/Entity/BaseFieldOverrideTest.php
index 404c2f0b6b..d36b95b2d9 100644
--- a/core/tests/Drupal/KernelTests/Core/Field/Entity/BaseFieldOverrideTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Field/Entity/BaseFieldOverrideTest.php
@@ -18,7 +18,7 @@ class BaseFieldOverrideTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['system'];
+  protected static $modules = ['system'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/KernelTests/Core/Field/FieldAccessTest.php b/core/tests/Drupal/KernelTests/Core/Field/FieldAccessTest.php
index f273029bf2..ca7a66b212 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 590a96cd5f..df867f1d94 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/FileTestBase.php b/core/tests/Drupal/KernelTests/Core/File/FileTestBase.php
index 92612ae7fd..c5b7477ad8 100644
--- a/core/tests/Drupal/KernelTests/Core/File/FileTestBase.php
+++ b/core/tests/Drupal/KernelTests/Core/File/FileTestBase.php
@@ -16,7 +16,7 @@
    *
    * @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 05ac7c2557..0e434a1162 100644
--- a/core/tests/Drupal/KernelTests/Core/File/MimeTypeTest.php
+++ b/core/tests/Drupal/KernelTests/Core/File/MimeTypeTest.php
@@ -14,7 +14,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/RemoteFileDirectoryTest.php b/core/tests/Drupal/KernelTests/Core/File/RemoteFileDirectoryTest.php
index e41fb74e2e..69a1a11880 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/RemoteFileScanDirectoryTest.php b/core/tests/Drupal/KernelTests/Core/File/RemoteFileScanDirectoryTest.php
index e3c68a72f3..e38b04811d 100644
--- a/core/tests/Drupal/KernelTests/Core/File/RemoteFileScanDirectoryTest.php
+++ b/core/tests/Drupal/KernelTests/Core/File/RemoteFileScanDirectoryTest.php
@@ -14,7 +14,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 b13b92cba5..cf8b425d9b 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 UnmanagedCopyTest {
    *
    * @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/RemoteFileUnmanagedDeleteRecursiveTest.php b/core/tests/Drupal/KernelTests/Core/File/RemoteFileUnmanagedDeleteRecursiveTest.php
index 6be98df4aa..dc9de903cc 100644
--- a/core/tests/Drupal/KernelTests/Core/File/RemoteFileUnmanagedDeleteRecursiveTest.php
+++ b/core/tests/Drupal/KernelTests/Core/File/RemoteFileUnmanagedDeleteRecursiveTest.php
@@ -14,7 +14,7 @@ class RemoteFileUnmanagedDeleteRecursiveTest extends UnmanagedDeleteRecursiveTes
    *
    * @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/RemoteFileUnmanagedDeleteTest.php b/core/tests/Drupal/KernelTests/Core/File/RemoteFileUnmanagedDeleteTest.php
index f826d4dd29..91b1903d1a 100644
--- a/core/tests/Drupal/KernelTests/Core/File/RemoteFileUnmanagedDeleteTest.php
+++ b/core/tests/Drupal/KernelTests/Core/File/RemoteFileUnmanagedDeleteTest.php
@@ -14,7 +14,7 @@ class RemoteFileUnmanagedDeleteTest extends UnmanagedDeleteTest {
    *
    * @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/RemoteFileUnmanagedMoveTest.php b/core/tests/Drupal/KernelTests/Core/File/RemoteFileUnmanagedMoveTest.php
index e41f87e694..b8b257e283 100644
--- a/core/tests/Drupal/KernelTests/Core/File/RemoteFileUnmanagedMoveTest.php
+++ b/core/tests/Drupal/KernelTests/Core/File/RemoteFileUnmanagedMoveTest.php
@@ -14,7 +14,7 @@ class RemoteFileUnmanagedMoveTest extends UnmanagedMoveTest {
    *
    * @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/RemoteFileUnmanagedSaveDataTest.php b/core/tests/Drupal/KernelTests/Core/File/RemoteFileUnmanagedSaveDataTest.php
index 817da28288..c5e267561b 100644
--- a/core/tests/Drupal/KernelTests/Core/File/RemoteFileUnmanagedSaveDataTest.php
+++ b/core/tests/Drupal/KernelTests/Core/File/RemoteFileUnmanagedSaveDataTest.php
@@ -14,7 +14,7 @@ class RemoteFileUnmanagedSaveDataTest extends UnmanagedSaveDataTest {
    *
    * @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 0bd546bbef..bd9b3fc168 100644
--- a/core/tests/Drupal/KernelTests/Core/File/ScanDirectoryTest.php
+++ b/core/tests/Drupal/KernelTests/Core/File/ScanDirectoryTest.php
@@ -14,7 +14,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 6c18b6654c..ee12b81336 100644
--- a/core/tests/Drupal/KernelTests/Core/File/StreamWrapperTest.php
+++ b/core/tests/Drupal/KernelTests/Core/File/StreamWrapperTest.php
@@ -19,7 +19,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 ff401e112c..6e146ca1f5 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/Form/ExternalFormUrlTest.php b/core/tests/Drupal/KernelTests/Core/Form/ExternalFormUrlTest.php
index f3fbc4f76c..b0c8006286 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 f6fb4f8713..0958392c10 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 6d79f17cfb..701c45f8a3 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 29bbcff9a8..393ec93656 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 96ce7e011d..f503756fdb 100644
--- a/core/tests/Drupal/KernelTests/Core/Image/ToolkitGdTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Image/ToolkitGdTest.php
@@ -42,7 +42,7 @@ class ToolkitGdTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['system', 'simpletest'];
+  protected static $modules = ['system', 'simpletest'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/KernelTests/Core/KeyValueStore/DatabaseStorageExpirableTest.php b/core/tests/Drupal/KernelTests/Core/KeyValueStore/DatabaseStorageExpirableTest.php
index 26a1abeff1..64fb0e4d37 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() {
     parent::setUp();
diff --git a/core/tests/Drupal/KernelTests/Core/KeyValueStore/DatabaseStorageTest.php b/core/tests/Drupal/KernelTests/Core/KeyValueStore/DatabaseStorageTest.php
index 5852da143f..9e6bd9c501 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() {
     parent::setUp();
diff --git a/core/tests/Drupal/KernelTests/Core/KeyValueStore/GarbageCollectionTest.php b/core/tests/Drupal/KernelTests/Core/KeyValueStore/GarbageCollectionTest.php
index ea76f0a4f5..8c4cb8cac1 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() {
     parent::setUp();
diff --git a/core/tests/Drupal/KernelTests/Core/KeyValueStore/KeyValueContentEntityStorageTest.php b/core/tests/Drupal/KernelTests/Core/KeyValueStore/KeyValueContentEntityStorageTest.php
index 98850055a5..c49a2a2137 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/MenuLinkDefaultIntegrationTest.php b/core/tests/Drupal/KernelTests/Core/Menu/MenuLinkDefaultIntegrationTest.php
index d0da9130a6..47fbe2bb93 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 04c04aa3e3..49ed72504e 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 40d38867f0..bb6d2e88fd 100644
--- a/core/tests/Drupal/KernelTests/Core/ParamConverter/EntityConverterLatestRevisionTest.php
+++ b/core/tests/Drupal/KernelTests/Core/ParamConverter/EntityConverterLatestRevisionTest.php
@@ -20,7 +20,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/AliasStorageTest.php b/core/tests/Drupal/KernelTests/Core/Path/AliasStorageTest.php
index d7b24b497f..e9967f5b24 100644
--- a/core/tests/Drupal/KernelTests/Core/Path/AliasStorageTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Path/AliasStorageTest.php
@@ -14,7 +14,7 @@ class AliasStorageTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system'];
+  protected static $modules = ['system'];
 
   /**
    * @var \Drupal\Core\Path\AliasStorage
diff --git a/core/tests/Drupal/KernelTests/Core/Path/PathValidatorTest.php b/core/tests/Drupal/KernelTests/Core/Path/PathValidatorTest.php
index 1ecd5249f5..6ee6bae272 100644
--- a/core/tests/Drupal/KernelTests/Core/Path/PathValidatorTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Path/PathValidatorTest.php
@@ -19,7 +19,7 @@ class PathValidatorTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['path', 'entity_test', 'user'];
+  protected static $modules = ['path', 'entity_test', 'user'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/KernelTests/Core/Path/UrlAlterTest.php b/core/tests/Drupal/KernelTests/Core/Path/UrlAlterTest.php
index 37ac65ae8e..ae5f631c5f 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 5d57d5745d..6769268dc1 100644
--- a/core/tests/Drupal/KernelTests/Core/Plugin/Condition/ConditionTestDualUserTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Plugin/Condition/ConditionTestDualUserTest.php
@@ -31,7 +31,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 7a69d2eb04..7ed9920e18 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 96c8bac736..f1ca081eec 100644
--- a/core/tests/Drupal/KernelTests/Core/Plugin/Condition/OptionalContextConditionTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Plugin/Condition/OptionalContextConditionTest.php
@@ -18,7 +18,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 68b6eb770e..41ed77c9de 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/ContextPluginTest.php b/core/tests/Drupal/KernelTests/Core/Plugin/ContextPluginTest.php
index a9ec4b8c77..6f113b774d 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/PluginTestBase.php b/core/tests/Drupal/KernelTests/Core/Plugin/PluginTestBase.php
index ccc82369a0..18b836d697 100644
--- a/core/tests/Drupal/KernelTests/Core/Plugin/PluginTestBase.php
+++ b/core/tests/Drupal/KernelTests/Core/Plugin/PluginTestBase.php
@@ -20,7 +20,7 @@
    *
    * @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 b4e122b4b7..578b8b972a 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 135c7aabb1..70081bca9b 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 906e74bb6a..5d59f524fb 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() {
     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 5966eaa745..69a5b80cfe 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 91061ca67f..1d98ff42ce 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 2acaefb873..3eb78082de 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 2b59933929..d1fd1581ef 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 ea6a9c2538..0a67f855e1 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 34c6d5852a..7a8fcf4b02 100644
--- a/core/tests/Drupal/KernelTests/Core/Routing/ContentNegotiationRoutingTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Routing/ContentNegotiationRoutingTest.php
@@ -17,7 +17,7 @@ class ContentNegotiationRoutingTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['conneg_test'];
+  protected static $modules = ['conneg_test'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/KernelTests/Core/Routing/ExceptionHandlingTest.php b/core/tests/Drupal/KernelTests/Core/Routing/ExceptionHandlingTest.php
index a791454f72..ca663d41e9 100644
--- a/core/tests/Drupal/KernelTests/Core/Routing/ExceptionHandlingTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Routing/ExceptionHandlingTest.php
@@ -17,7 +17,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 674214bf0c..1f318cb2a2 100644
--- a/core/tests/Drupal/KernelTests/Core/Routing/RouteProviderTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Routing/RouteProviderTest.php
@@ -36,7 +36,7 @@ class RouteProviderTest extends KernelTestBase {
   /**
    * Modules to enable.
    */
-  public static $modules = ['url_alter_test', 'system'];
+  protected static $modules = ['url_alter_test', 'system'];
 
   /**
    * 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 053db792cb..8213800676 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 970ea0486d..0411f5f83c 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/StringTranslation/TranslationStringTest.php b/core/tests/Drupal/KernelTests/Core/StringTranslation/TranslationStringTest.php
index 748e2bbc6f..da7a2bf610 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/TempStoreDatabaseTest.php b/core/tests/Drupal/KernelTests/Core/TempStore/TempStoreDatabaseTest.php
index 2abe70760c..9134ce491f 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 d82a37b906..2942eaace9 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/ImageTest.php b/core/tests/Drupal/KernelTests/Core/Theme/ImageTest.php
index 72cecce229..e005cc343c 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 294c8dce81..b110c295b8 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/RegistryTest.php b/core/tests/Drupal/KernelTests/Core/Theme/RegistryTest.php
index 7f6d2eccda..2723fce986 100644
--- a/core/tests/Drupal/KernelTests/Core/Theme/RegistryTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Theme/RegistryTest.php
@@ -20,7 +20,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/StableLibraryOverrideTest.php b/core/tests/Drupal/KernelTests/Core/Theme/StableLibraryOverrideTest.php
index a71c3fe642..fafe93b281 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'];
+  protected static $modules = ['system'];
 
   /**
    * {@inheritdoc}
diff --git a/core/tests/Drupal/KernelTests/Core/Theme/StableTemplateOverrideTest.php b/core/tests/Drupal/KernelTests/Core/Theme/StableTemplateOverrideTest.php
index 40d31e6dac..8089b79c4b 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/StableThemeTest.php b/core/tests/Drupal/KernelTests/Core/Theme/StableThemeTest.php
index 8a79a9eff4..1d85402fa0 100644
--- a/core/tests/Drupal/KernelTests/Core/Theme/StableThemeTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Theme/StableThemeTest.php
@@ -16,7 +16,7 @@ class StableThemeTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['system'];
+  protected static $modules = ['system'];
 
   /**
    * The theme handler.
diff --git a/core/tests/Drupal/KernelTests/Core/Theme/ThemeInstallerTest.php b/core/tests/Drupal/KernelTests/Core/Theme/ThemeInstallerTest.php
index 61f647528d..d41b55b47d 100644
--- a/core/tests/Drupal/KernelTests/Core/Theme/ThemeInstallerTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Theme/ThemeInstallerTest.php
@@ -18,7 +18,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 c44cc1c814..d8ab19a24d 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 a077c25a85..6b06265b8d 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 5d6f61f205..dffca332d7 100644
--- a/core/tests/Drupal/KernelTests/Core/Theme/TwigEnvironmentTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Theme/TwigEnvironmentTest.php
@@ -21,7 +21,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 dbdf351a71..319d021631 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 7af10f5946..a638169788 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/TypedDataTest.php b/core/tests/Drupal/KernelTests/Core/TypedData/TypedDataTest.php
index e3e3fae2fe..d795a6e155 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() {
     parent::setup();
diff --git a/core/tests/Drupal/KernelTests/Core/Update/CompatibilityFixTest.php b/core/tests/Drupal/KernelTests/Core/Update/CompatibilityFixTest.php
index a724623ec3..9a1527b455 100644
--- a/core/tests/Drupal/KernelTests/Core/Update/CompatibilityFixTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Update/CompatibilityFixTest.php
@@ -14,7 +14,7 @@ class CompatibilityFixTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['system'];
+  protected static $modules = ['system'];
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/tests/Drupal/KernelTests/Core/Url/LinkGenerationTest.php b/core/tests/Drupal/KernelTests/Core/Url/LinkGenerationTest.php
index 16452d0111..aa483c8f78 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 8e17422ff6..0c5363f499 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 c7eb3b226f..f4369ed7fa 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}
