public function ConfigTest::testClear in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Config/ConfigTest.php \Drupal\Tests\Core\Config\ConfigTest::testClear()
- 9 core/tests/Drupal/Tests/Core/Config/ConfigTest.php \Drupal\Tests\Core\Config\ConfigTest::testClear()
@covers ::clear @dataProvider simpleDataProvider
File
- core/
tests/ Drupal/ Tests/ Core/ Config/ ConfigTest.php, line 303
Class
- ConfigTest
- Tests the Config.
Namespace
Drupal\Tests\Core\ConfigCode
public function testClear($data) {
foreach ($data as $key => $value) {
// Check that values are cleared.
$this->config
->set($key, $value);
$this
->assertEquals($value, $this->config
->get($key));
$this->config
->clear($key);
$this
->assertNull($this->config
->get($key));
}
}