function TmgmtTestTrait::addLanguage in Translation Management Tool 8
Sets the proper environment.
Currently just adds a new language.
Parameters
string $langcode: The language code.
22 calls to TmgmtTestTrait::addLanguage()
- ConfigSourceListTest::setUp in sources/
tmgmt_config/ tests/ src/ Functional/ ConfigSourceListTest.php - Overrides DrupalWebTestCase::setUp()
- ConfigSourceUiTest::setUp in sources/
tmgmt_config/ tests/ src/ Functional/ ConfigSourceUiTest.php - Overrides DrupalWebTestCase::setUp()
- ContentEntitySourceContentModerationTest::setUp in sources/
content/ tests/ src/ Functional/ ContentEntitySourceContentModerationTest.php - Overrides DrupalWebTestCase::setUp()
- ContentEntitySourceTranslatableEntityTest::setUp in sources/
content/ tests/ src/ Functional/ ContentEntitySourceTranslatableEntityTest.php - Overrides DrupalWebTestCase::setUp()
- ContentTmgmtEntitySourceListTest::setUp in sources/
content/ tests/ src/ Functional/ ContentTmgmtEntitySourceListTest.php - Overrides DrupalWebTestCase::setUp()
File
- tests/
src/ Functional/ TmgmtTestTrait.php, line 154
Class
- TmgmtTestTrait
- Base class for tests.
Namespace
Drupal\Tests\tmgmt\FunctionalCode
function addLanguage($langcode) {
$language = ConfigurableLanguage::createFromLangcode($langcode);
$language
->save();
}