public function SolrFieldTypeTest::setUp 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::setUp()
- 4.x tests/src/Kernel/SolrFieldTypeTest.php \Drupal\Tests\search_api_solr\Kernel\SolrFieldTypeTest::setUp()
Overrides KernelTestBase::setUp
File
- tests/
src/ Kernel/ SolrFieldTypeTest.php, line 48
Class
- SolrFieldTypeTest
- Provides tests for Solr field typa configs.
Namespace
Drupal\Tests\search_api_solr\KernelCode
public function setUp() {
parent::setUp();
$this->configNames = array_keys(file_scan_directory(drupal_get_path('module', 'search_api_solr') . '/config', '/search_api_solr.solr_field_type.text_/', [
'key' => 'name',
]));
foreach ($this->configNames as $config_name) {
preg_match('/search_api_solr.solr_field_type.text_(.*)_\\d+_\\d+_\\d+/', $config_name, $matches);
$this->languageIds[] = $matches[1];
}
$this->languageIds = array_unique($this->languageIds);
foreach ($this->languageIds as $language_id) {
if ('und' != $language_id) {
ConfigurableLanguage::createFromLangcode($language_id)
->save();
}
}
}