diff --git a/core/tests/Drupal/Tests/Core/Form/FormCacheTest.php b/core/tests/Drupal/Tests/Core/Form/FormCacheTest.php
index 452ac54..4c822d7 100644
--- a/core/tests/Drupal/Tests/Core/Form/FormCacheTest.php
+++ b/core/tests/Drupal/Tests/Core/Form/FormCacheTest.php
@@ -427,7 +427,7 @@ public function testSetCacheAuthUser() {
    * @covers ::setCache
    */
   public function testSetCacheWithSafeStrings() {
-    SafeMarkup::set('a_safe_string');
+    SafeMarkup::checkplain('a_safe_string');
     $form_build_id = 'the_form_build_id';
     $form = [
       '#form_id' => 'the_form_id'
