diff --git a/core/lib/Drupal/Core/StreamWrapper/PublicStream.php b/core/lib/Drupal/Core/StreamWrapper/PublicStream.php
index f278353095..403263e301 100644
--- a/core/lib/Drupal/Core/StreamWrapper/PublicStream.php
+++ b/core/lib/Drupal/Core/StreamWrapper/PublicStream.php
@@ -89,7 +89,7 @@ public static function baseUrl() {
    * $base_path = PublicStream::basePath(\Drupal::service('site.path'));
    * @endcode
    *
-   * @param \SplString $site_path
+   * @param string $site_path
    *   (optional) The site.path service parameter, which is typically the path
    *   to sites/ in a Drupal installation. This allows you to inject the site
    *   path using services from the caller. If omitted, this method will use the
@@ -99,7 +99,7 @@ public static function baseUrl() {
    * @return string
    *   The base path for public:// typically sites/default/files.
    */
-  public static function basePath(\SplString $site_path = NULL) {
+  public static function basePath($site_path = NULL) {
     if ($site_path === NULL) {
       // Find the site path. Kernel service is not always available at this
       // point, but is preferred, when available.
diff --git a/core/tests/Drupal/Tests/Core/StreamWrapper/PublicStreamTest.php b/core/tests/Drupal/Tests/Core/StreamWrapper/PublicStreamTest.php
new file mode 100644
index 0000000000..66b5d9d060
--- /dev/null
+++ b/core/tests/Drupal/Tests/Core/StreamWrapper/PublicStreamTest.php
@@ -0,0 +1,43 @@
+<?php
+
+namespace Drupal\Tests\Core\StreamWrapper;
+
+use Drupal\Core\Site\Settings;
+use Drupal\Core\StreamWrapper\PublicStream;
+use Drupal\Tests\UnitTestCase;
+
+/**
+ * Tests the TranslatableMarkup class.
+ *
+ * @coversDefaultClass \Drupal\Core\StreamWrapper\PublicStream
+ * @group StringTranslation
+ */
+class PublicStreamTest extends UnitTestCase {
+
+  /**
+   * @covers ::basePath
+   */
+  public function testBasePathSetting() {
+    $this->assertEquals('/foo/bar/files' , PublicStream::basePath('/foo/bar'));
+  }
+
+  /**
+   * @covers ::basePath
+   */
+  public function testBasePathDefault() {
+    $this->markTestIncomplete("DrupalKernel::findSitePath could return a lot of values and we don't want to test it and we can't inject it.");
+    // This should probably work most of the time.
+    // $this->assertEquals('sites/default/files' , PublicStream::basePath());
+  }
+
+  /**
+   * @covers ::basePath
+   * @runInSeparateProcess
+   */
+  public function testBasePathSettings() {
+    new Settings(['file_public_path' => '/some/file/location']);
+    $this->assertEquals('/some/file/location' , PublicStream::basePath('/foo/bar'));
+    $this->assertEquals('/some/file/location' , PublicStream::basePath());
+  }
+
+}
