You are here

public function StringBaseTest::testSaveWithoutStorage in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/locale/tests/src/Unit/StringBaseTest.php \Drupal\Tests\locale\Unit\StringBaseTest::testSaveWithoutStorage()

@covers ::save @expectedException \Drupal\locale\StringStorageException @expectedExceptionMessage The string cannot be saved because its not bound to a storage: test

File

core/modules/locale/tests/src/Unit/StringBaseTest.php, line 23
Contains \Drupal\Tests\locale\Unit\StringBaseTest.

Class

StringBaseTest
@coversDefaultClass \Drupal\locale\StringBase @group locale

Namespace

Drupal\Tests\locale\Unit

Code

public function testSaveWithoutStorage() {
  $string = new SourceString([
    'source' => 'test',
  ]);
  $string
    ->save();
}