You are here

public function ImmutableConfigTest::testSave in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Core/Config/ImmutableConfigTest.php \Drupal\Tests\Core\Config\ImmutableConfigTest::testSave()
  2. 9 core/tests/Drupal/Tests/Core/Config/ImmutableConfigTest.php \Drupal\Tests\Core\Config\ImmutableConfigTest::testSave()

@covers ::save

File

core/tests/Drupal/Tests/Core/Config/ImmutableConfigTest.php, line 51

Class

ImmutableConfigTest
@coversDefaultClass \Drupal\Core\Config\ImmutableConfig @group Config

Namespace

Drupal\Tests\Core\Config

Code

public function testSave() {
  $this
    ->expectException(ImmutableConfigException::class);
  $this
    ->expectExceptionMessage('Can not save immutable configuration test. Use \\Drupal\\Core\\Config\\ConfigFactoryInterface::getEditable() to retrieve a mutable configuration object');
  $this->config
    ->save();
}