diff --git a/core/tests/Drupal/Tests/Component/Serialization/YamlTestBase.php b/core/tests/Drupal/Tests/Component/Serialization/YamlTestBase.php
index 17dc39947651d51a389886c63d0dce9a3f297db6..573192b02e7fdab942ef989fec6f525e8e256ec0 100644
--- a/core/tests/Drupal/Tests/Component/Serialization/YamlTestBase.php
+++ b/core/tests/Drupal/Tests/Component/Serialization/YamlTestBase.php
@@ -14,7 +14,7 @@ abstract class YamlTestBase extends TestCase {
   /**
    * Some data that should be able to be serialized.
    */
-  public function providerEncodeDecodeTests() {
+  public static function providerEncodeDecodeTests() {
     return [
       [
         'data' => [
@@ -50,7 +50,7 @@ public function providerEncodeDecodeTests() {
   /**
    * Some data that should be able to be deserialized.
    */
-  public function providerDecodeTests() {
+  public static function providerDecodeTests() {
     $data = [
       // NULL files.
       ['', NULL],
@@ -78,10 +78,10 @@ public function providerDecodeTests() {
     ];
 
     // 1.2 Bool values.
-    foreach ($this->providerBoolTest() as $test) {
+    foreach (static::providerBoolTest() as $test) {
       $data[] = ['bool: ' . $test[0], ['bool' => $test[1]]];
     }
-    $data = array_merge($data, $this->providerBoolTest());
+    $data = array_merge($data, static::providerBoolTest());
 
     return $data;
   }
@@ -89,7 +89,7 @@ public function providerDecodeTests() {
   /**
    * Tests different boolean serialization and deserialization.
    */
-  public function providerBoolTest() {
+  public static function providerBoolTest() {
     return [
       ['true', TRUE],
       ['TRUE', TRUE],