diff --git a/core/modules/locale/src/StringBase.php b/core/modules/locale/src/StringBase.php
index 39fe7f1..f6cfffd 100644
--- a/core/modules/locale/src/StringBase.php
+++ b/core/modules/locale/src/StringBase.php
@@ -7,6 +7,8 @@
 
 namespace Drupal\locale;
 
+use Drupal\Component\Utility\String;
+
 /**
  * Defines the locale string base class.
  *
@@ -188,8 +190,8 @@ public function save() {
       $storage->save($this);
     }
     else {
-      throw new StringStorageException(format_string('The string cannot be saved because its not bound to a storage: @string', array(
-        '@string' => $string->getString(),
+      throw new StringStorageException(String::format('The string cannot be saved because its not bound to a storage: @string', array(
+        '@string' => $this->getString(),
       )));
     }
     return $this;
@@ -204,8 +206,8 @@ public function delete() {
         $storage->delete($this);
       }
       else {
-        throw new StringStorageException(format_string('The string cannot be deleted because its not bound to a storage: @string', array(
-          '@string' => $string->getString(),
+        throw new StringStorageException(String::format('The string cannot be deleted because its not bound to a storage: @string', array(
+          '@string' => $this->getString(),
         )));
       }
     }
diff --git a/core/modules/locale/tests/src/Unit/StringBaseTest.php b/core/modules/locale/tests/src/Unit/StringBaseTest.php
new file mode 100644
index 0000000..9d7bca1
--- /dev/null
+++ b/core/modules/locale/tests/src/Unit/StringBaseTest.php
@@ -0,0 +1,39 @@
+<?php
+/**
+ * @file
+ * Contains \Drupal\Tests\locale\Unit\StringBaseTest.
+ */
+
+namespace Drupal\Tests\locale\Unit;
+
+use Drupal\locale\SourceString;
+use Drupal\Tests\UnitTestCase;
+
+/**
+ * @coversDefaultClass \Drupal\locale\StringBase
+ * @group locale
+ */
+class StringBaseTest extends UnitTestCase {
+
+  /**
+   * @covers ::save
+   * @expectedException \Drupal\locale\StringStorageException
+   * @expectedExceptionMessage The string cannot be saved because its not bound to a storage: test
+   */
+  public function testSaveWithoutStorage() {
+    $string = new SourceString(['source' => 'test']);
+    $string->save();
+  }
+
+
+  /**
+   * @covers ::delete
+   * @expectedException \Drupal\locale\StringStorageException
+   * @expectedExceptionMessage The string cannot be deleted because its not bound to a storage: test
+   */
+  public function testDeleteWithoutStorage() {
+    $string = new SourceString(['lid' => 1, 'source' => 'test']);
+    $string->delete();
+  }
+
+}
