You are here

public function SolrFieldTypeTest::testDefaultConfig in Search API Multilingual Solr Search 8

Tests all available Solr field type configs.

File

tests/src/Kernel/SolrFieldTypeTest.php, line 67

Class

SolrFieldTypeTest
Provides tests for Solr field typa configs.

Namespace

Drupal\Tests\search_api_solr_multilingual\Kernel

Code

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_search_api_solr_multilingual');
  foreach ($this->configNames as $config_name) {
    $data = $default_config_storage
      ->read($config_name);
    $this
      ->assertConfigSchema($typed_config, $config_name, $data);
  }
}