diff --git a/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php
index 5aba155..06f85e4 100644
--- a/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php
+++ b/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php
@@ -1342,22 +1342,6 @@ protected function exceptionHandler($exception) {
   }
 
   /**
-   * Changes in memory settings.
-   *
-   * @param $name
-   *   The name of the setting to return.
-   * @param $value
-   *   The value of the setting.
-   *
-   * @see \Drupal\Core\Site\Settings::get()
-   */
-  protected function settingsSet($name, $value) {
-    $settings = Settings::getAll();
-    $settings[$name] = $value;
-    new Settings($settings);
-  }
-
-  /**
    * Generates a unique random string of ASCII characters of codes 32 to 126.
    *
    * Do not use this method when special characters are not possible (e.g., in
diff --git a/core/modules/simpletest/lib/Drupal/simpletest/UnitTestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/UnitTestBase.php
index 9d93fa0..1ed9c46 100644
--- a/core/modules/simpletest/lib/Drupal/simpletest/UnitTestBase.php
+++ b/core/modules/simpletest/lib/Drupal/simpletest/UnitTestBase.php
@@ -9,6 +9,7 @@
 
 use Drupal\Core\Database\Database;
 use Drupal\Core\Database\ConnectionNotDefinedException;
+use Drupal\Core\Site\Settings;
 
 /**
  * Base test case class for unit tests.
@@ -40,4 +41,19 @@ protected function setUp() {
     file_prepare_directory($this->public_files_directory, FILE_CREATE_DIRECTORY | FILE_MODIFY_PERMISSIONS);
     $this->settingsSet('file_public_path', $this->public_files_directory);
   }
+
+  /**
+   * Changes in-memory settings.
+   *
+   * @param string $name
+   *   The name of the setting to set.
+   * @param mixed $value
+   *   The value of the setting.
+   */
+  protected function settingsSet($name, $value) {
+    $settings = Settings::getAll();
+    $settings[$name] = $value;
+    new Settings($settings);
+  }
+
 }
