public function TestViewsTest::testDefaultConfig in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/views/src/Tests/TestViewsTest.php \Drupal\views\Tests\TestViewsTest::testDefaultConfig()
 
Tests default configuration data type.
File
- core/
modules/ views/ src/ Tests/ TestViewsTest.php, line 35  - Contains \Drupal\views\Tests\TestViewsTest.
 
Class
- TestViewsTest
 - Tests that test views provided by all modules match schema.
 
Namespace
Drupal\views\TestsCode
public function testDefaultConfig() {
  // Create a typed config manager with access to configuration schema in
  // every module, profile and theme.
  $typed_config = new TypedConfigManager(\Drupal::service('config.storage'), new TestInstallStorage(InstallStorage::CONFIG_SCHEMA_DIRECTORY), \Drupal::service('cache.discovery'), \Drupal::service('module_handler'));
  // Create a configuration storage with access to default configuration in
  // every module, profile and theme.
  $default_config_storage = new TestInstallStorage('test_views');
  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);
  }
}