function ImmutableConfigTest::testClear
Same name and namespace in other branches
- 9 core/tests/Drupal/Tests/Core/Config/ImmutableConfigTest.php \Drupal\Tests\Core\Config\ImmutableConfigTest::testClear()
- 8.9.x core/tests/Drupal/Tests/Core/Config/ImmutableConfigTest.php \Drupal\Tests\Core\Config\ImmutableConfigTest::testClear()
- 10 core/tests/Drupal/Tests/Core/Config/ImmutableConfigTest.php \Drupal\Tests\Core\Config\ImmutableConfigTest::testClear()
@covers ::clear
File
-
core/
tests/ Drupal/ Tests/ Core/ Config/ ImmutableConfigTest.php, line 47
Class
- ImmutableConfigTest
- @coversDefaultClass <a href="/api/drupal/core%21lib%21Drupal%21Core%21Config%21ImmutableConfig.php/class/ImmutableConfig/11.x" title="Defines the immutable configuration object." class="local">\Drupal\Core\Config\ImmutableConfig</a> @group Config
Namespace
Drupal\Tests\Core\ConfigCode
public function testClear() : void {
$this->expectException(ImmutableConfigException::class);
$this->expectExceptionMessage('Can not clear name key in immutable configuration test. Use \\Drupal\\Core\\Config\\ConfigFactoryInterface::getEditable() to retrieve a mutable configuration object');
$this->config
->clear('name');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.