function ImmutableConfigTest::testSave

Tests save.

@legacy-covers ::save

File

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

Class

ImmutableConfigTest
Tests Drupal\Core\Config\ImmutableConfig.

Namespace

Drupal\Tests\Core\Config

Code

public function testSave() : void {
  $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();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.