function StringBaseTest::testSaveWithoutStorage
Tests save without storage.
@legacy-covers ::save
File
- 
              core/
modules/ locale/ tests/ src/ Unit/ StringBaseTest.php, line 26  
Class
Namespace
Drupal\Tests\locale\UnitCode
public function testSaveWithoutStorage() : void {
  $string = new SourceString([
    'source' => 'test',
  ]);
  $this->expectException(StringStorageException::class);
  $this->expectExceptionMessage('The string cannot be saved because its not bound to a storage: test');
  $string->save();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.