public function SolrFieldTypeTest::testDefaultConfig in Search API Solr 8.2
Same name and namespace in other branches
- 8.3 tests/src/Kernel/SolrFieldTypeTest.php \Drupal\Tests\search_api_solr\Kernel\SolrFieldTypeTest::testDefaultConfig()
- 4.x tests/src/Kernel/SolrFieldTypeTest.php \Drupal\Tests\search_api_solr\Kernel\SolrFieldTypeTest::testDefaultConfig()
Tests all available Solr field type configs.
File
- tests/
src/ Kernel/ SolrFieldTypeTest.php, line 69
Class
- SolrFieldTypeTest
- Provides tests for Solr field typa configs.
Namespace
Drupal\Tests\search_api_solr\KernelCode
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);
}
}