diff --git a/core/modules/block/tests/src/Kernel/BlockValidationTest.php b/core/modules/block/tests/src/Kernel/BlockValidationTest.php
index 81a792d89917472b764fa778cdf6094bbf11205f..9503231ea0a9781c4fdc79ffd6205cd3e6e38a7c 100644
--- a/core/modules/block/tests/src/Kernel/BlockValidationTest.php
+++ b/core/modules/block/tests/src/Kernel/BlockValidationTest.php
@@ -55,11 +55,11 @@ public function testInvalidPluginId(): void {
   /**
    * Block names are atypical in that they allow periods in the machine name.
    */
-  public function providerInvalidMachineNameCharacters(): array {
+  public static function providerInvalidMachineNameCharacters(): array {
     $cases = parent::providerInvalidMachineNameCharacters();
     // Remove the existing test case that verifies a machine name containing
     // periods is invalid.
-    $this->assertSame(['period.separated', FALSE], $cases['INVALID: period separated']);
+    self::assertSame(['period.separated', FALSE], $cases['INVALID: period separated']);
     unset($cases['INVALID: period separated']);
     // And instead add a test case that verifies it is allowed for blocks.
     $cases['VALID: period separated'] = ['period.separated', TRUE];
diff --git a/core/modules/shortcut/tests/src/Kernel/ShortcutSetValidationTest.php b/core/modules/shortcut/tests/src/Kernel/ShortcutSetValidationTest.php
index dd9dbc1bc0d15900b51b3b55abfe93b4f1ee0097..20c66b1009a6fe7621aa5979ebcb5f1ab6ef654e 100644
--- a/core/modules/shortcut/tests/src/Kernel/ShortcutSetValidationTest.php
+++ b/core/modules/shortcut/tests/src/Kernel/ShortcutSetValidationTest.php
@@ -35,12 +35,12 @@ protected function setUp(): void {
   /**
    * Shortcut set IDs are atypical: they allow dashes and disallow underscores.
    */
-  public function providerInvalidMachineNameCharacters(): array {
+  public static function providerInvalidMachineNameCharacters(): array {
     $cases = parent::providerInvalidMachineNameCharacters();
 
     // Remove the existing test case that verifies a machine name containing
     // dashes is invalid.
-    $this->assertSame(['dash-separated', FALSE], $cases['INVALID: dash separated']);
+    self::assertSame(['dash-separated', FALSE], $cases['INVALID: dash separated']);
     unset($cases['INVALID: dash separated']);
     // And instead add a test case that verifies it is allowed for shortcut
     // sets.
@@ -48,7 +48,7 @@ public function providerInvalidMachineNameCharacters(): array {
 
     // Remove the existing test case that verifies a machine name containing
     // underscores is valid.
-    $this->assertSame(['underscore_separated', TRUE], $cases['VALID: underscore separated']);
+    self::assertSame(['underscore_separated', TRUE], $cases['VALID: underscore separated']);
     unset($cases['VALID: underscore separated']);
     // And instead add a test case that verifies it is disallowed for shortcut
     // sets.
diff --git a/core/modules/system/tests/src/Kernel/Entity/ActionValidationTest.php b/core/modules/system/tests/src/Kernel/Entity/ActionValidationTest.php
index 4b034c82306ad37fa54b67067c9f6aee26f43723..eb2d28b6208c6280796e508dfffab6d5f4108e82 100644
--- a/core/modules/system/tests/src/Kernel/Entity/ActionValidationTest.php
+++ b/core/modules/system/tests/src/Kernel/Entity/ActionValidationTest.php
@@ -30,11 +30,11 @@ protected function setUp(): void {
   /**
    * Action IDs are atypical in that they allow periods in the machine name.
    */
-  public function providerInvalidMachineNameCharacters(): array {
+  public static function providerInvalidMachineNameCharacters(): array {
     $cases = parent::providerInvalidMachineNameCharacters();
     // Remove the existing test case that verifies a machine name containing
     // periods is invalid.
-    $this->assertSame(['period.separated', FALSE], $cases['INVALID: period separated']);
+    self::assertSame(['period.separated', FALSE], $cases['INVALID: period separated']);
     unset($cases['INVALID: period separated']);
     // And instead add a test case that verifies it is allowed for blocks.
     $cases['VALID: period separated'] = ['period.separated', TRUE];
diff --git a/core/modules/system/tests/src/Kernel/Entity/MenuValidationTest.php b/core/modules/system/tests/src/Kernel/Entity/MenuValidationTest.php
index c05a78f096da540d86a071fc7ca4983cf9a31248..d5a6d751ce0ffc7e344819e703eb2aab0055a93a 100644
--- a/core/modules/system/tests/src/Kernel/Entity/MenuValidationTest.php
+++ b/core/modules/system/tests/src/Kernel/Entity/MenuValidationTest.php
@@ -35,19 +35,19 @@ protected function setUp(): void {
   /**
    * Menu IDs are atypical: they allow dashes and disallow underscores.
    */
-  public function providerInvalidMachineNameCharacters(): array {
+  public static function providerInvalidMachineNameCharacters(): array {
     $cases = parent::providerInvalidMachineNameCharacters();
 
     // Remove the existing test case that verifies a machine name containing
     // dashes is invalid.
-    $this->assertSame(['dash-separated', FALSE], $cases['INVALID: dash separated']);
+    self::assertSame(['dash-separated', FALSE], $cases['INVALID: dash separated']);
     unset($cases['INVALID: dash separated']);
     // And instead add a test case that verifies it is allowed for menus.
     $cases['VALID: dash separated'] = ['dash-separated', TRUE];
 
     // Remove the existing test case that verifies a machine name containing
     // underscores is valid.
-    $this->assertSame(['underscore_separated', TRUE], $cases['VALID: underscore separated']);
+    self::assertSame(['underscore_separated', TRUE], $cases['VALID: underscore separated']);
     unset($cases['VALID: underscore separated']);
     // And instead add a test case that verifies it is disallowed for menus.
     $cases['INVALID: underscore separated'] = ['underscore_separated', FALSE];
diff --git a/core/modules/tour/tests/src/Kernel/TourValidationTest.php b/core/modules/tour/tests/src/Kernel/TourValidationTest.php
index 9513177d779c06626e35af528bfc3bb7611655c9..0fa1b5129606693d1e0034ace4012ee5b58e7ba6 100644
--- a/core/modules/tour/tests/src/Kernel/TourValidationTest.php
+++ b/core/modules/tour/tests/src/Kernel/TourValidationTest.php
@@ -34,11 +34,11 @@ protected function setUp(): void {
   /**
    * Tour IDs are atypical in that they allow dashes in the machine name.
    */
-  public function providerInvalidMachineNameCharacters(): array {
+  public static function providerInvalidMachineNameCharacters(): array {
     $cases = parent::providerInvalidMachineNameCharacters();
     // Remove the existing test case that verifies a machine name containing
     // periods is invalid.
-    $this->assertSame(['dash-separated', FALSE], $cases['INVALID: dash separated']);
+    self::assertSame(['dash-separated', FALSE], $cases['INVALID: dash separated']);
     unset($cases['INVALID: dash separated']);
     // And instead add a test case that verifies it is allowed for tours.
     $cases['VALID: dash separated'] = ['dash-separated', TRUE];
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityValidationTestBase.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityValidationTestBase.php
index 30ed78fd7e1715089e82f36d1f43b15900c8084b..179daf97b2cd6ca24dc28c8eb3d4b8830ec08cfd 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityValidationTestBase.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityValidationTestBase.php
@@ -130,7 +130,7 @@ protected function getMachineNameConstraints(): array {
    * @return array[]
    *   The test cases.
    */
-  public function providerInvalidMachineNameCharacters(): array {
+  public static function providerInvalidMachineNameCharacters(): array {
     return [
       'INVALID: space separated' => ['space separated', FALSE],
       'INVALID: dash separated' => ['dash-separated', FALSE],