diff --git a/core/tests/Drupal/KernelTests/Core/Site/SettingsRewriteTest.php b/core/tests/Drupal/KernelTests/Core/Site/SettingsRewriteTest.php
index ef593751bf..0edb18fb3d 100644
--- a/core/tests/Drupal/KernelTests/Core/Site/SettingsRewriteTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Site/SettingsRewriteTest.php
@@ -99,7 +99,7 @@ public function testDrupalRewriteSettings() {
       $filename = Settings::get('file_public_path', $site_path . '/files') . '/mock_settings.php';
       file_put_contents($filename, "<?php\n" . $test['original'] . "\n");
       drupal_rewrite_settings($test['settings'], $filename);
-      $this->assertEqual(file_get_contents($filename), "<?php\n" . $test['expected'] . "\n");
+      $this->assertEquals(file_get_contents($filename), "<?php\n" . $test['expected'] . "\n");
     }
 
     // Test that <?php gets added to the start of an empty settings file.
@@ -121,7 +121,7 @@ public function testDrupalRewriteSettings() {
     drupal_rewrite_settings($test['settings'], $filename);
 
     // Check that the result is just the php opening tag and the settings.
-    $this->assertEqual(file_get_contents($filename), "<?php\n" . $test['expected'] . "\n");
+    $this->assertEquals(file_get_contents($filename), "<?php\n" . $test['expected'] . "\n");
   }
 
 }
