public function DefaultConfigTest::testDefaultConfig in Drupal 9
Same name and namespace in other branches
- 8 core/tests/Drupal/KernelTests/Core/Config/DefaultConfigTest.php \Drupal\KernelTests\Core\Config\DefaultConfigTest::testDefaultConfig()
Tests default configuration data type.
File
- core/
tests/ Drupal/ KernelTests/ Core/ Config/ DefaultConfigTest.php, line 81
Class
- DefaultConfigTest
- Tests that default configuration provided by all modules matches schema.
Namespace
Drupal\KernelTests\Core\ConfigCode
public function testDefaultConfig() {
$typed_config = \Drupal::service('config.typed');
// Create a configuration storage with access to default configuration in
// every module, profile and theme.
$default_config_storage = new TestInstallStorage();
foreach ($default_config_storage
->listAll() as $config_name) {
if (in_array($config_name, $this->toSkip)) {
continue;
}
$data = $default_config_storage
->read($config_name);
$this
->assertConfigSchema($typed_config, $config_name, $data);
}
}