protected function SimplenewsI18nTest::addLanguage in Simplenews 8.2
Same name and namespace in other branches
- 3.x tests/src/Functional/SimplenewsI18nTest.php \Drupal\Tests\simplenews\Functional\SimplenewsI18nTest::addLanguage()
Install a the specified language if it has not been already.
Otherwise make sure that the language is enabled.
Copied from Drupali18nTestCase::addLanguage().
Parameters
string $language_code: The language code the check.
1 call to SimplenewsI18nTest::addLanguage()
- SimplenewsI18nTest::setUpLanguages in tests/
src/ Functional/ SimplenewsI18nTest.php - Set up configuration for multiple languages.
File
- tests/
src/ Functional/ SimplenewsI18nTest.php, line 98
Class
- SimplenewsI18nTest
- Translation of newsletters and issues.
Namespace
Drupal\Tests\simplenews\FunctionalCode
protected function addLanguage($language_code) {
$language = ConfigurableLanguage::createFromLangcode($language_code);
$language
->save();
}