public function DefaultConfigTest::testDefaultConfig in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/config/src/Tests/DefaultConfigTest.php \Drupal\config\Tests\DefaultConfigTest::testDefaultConfig()
Tests default configuration data type.
File
- core/
modules/ config/ src/ Tests/ DefaultConfigTest.php, line 66 - Contains \Drupal\config\Tests\DefaultConfigTest.
Class
- DefaultConfigTest
- Tests that default configuration provided by all modules matches schema.
Namespace
Drupal\config\TestsCode
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) {
// Skip files provided by the config_schema_test module since that module
// is explicitly for testing schema.
if (strpos($config_name, 'config_schema_test') === 0) {
continue;
}
$data = $default_config_storage
->read($config_name);
$this
->assertConfigSchema($typed_config, $config_name, $data);
}
}