/** * @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(); }