protected function LinkitAutocompleteTest::setupLanguages in Linkit 8.5
Adds additional languages.
1 call to LinkitAutocompleteTest::setupLanguages()
- LinkitAutocompleteTest::testAutocompletionTranslations in tests/
src/ Kernel/ LinkitAutocompleteTest.php - Tests autocompletion with translated entities.
File
- tests/
src/ Kernel/ LinkitAutocompleteTest.php, line 273
Class
- LinkitAutocompleteTest
- Tests the linkit autocomplete functionality.
Namespace
Drupal\Tests\linkit\KernelCode
protected function setupLanguages() {
$this->langcodes = [
'sv',
'da',
'fi',
];
foreach ($this->langcodes as $langcode) {
ConfigurableLanguage::createFromLangcode($langcode)
->save();
}
array_unshift($this->langcodes, \Drupal::languageManager()
->getDefaultLanguage()
->getId());
}