You are here

function TMGMTKernelTestBase::addLanguage in Translation Management Tool 8

Sets the proper environment.

Currently just adds a new language.

Parameters

string $langcode: The language code.

4 calls to TMGMTKernelTestBase::addLanguage()
HelperTest::testTMGTJobMatchItem in tests/src/Kernel/HelperTest.php
Tests tmgmt_job_match_item()
LocaleSourceTest::setUp in sources/locale/tests/src/Kernel/LocaleSourceTest.php
LocaleSourceTest::testRequestDataForSpecificLanguage in sources/locale/tests/src/Kernel/LocaleSourceTest.php
+ * Test if the source is able to pull content in requested language. +
TMGMTKernelTestBase::setUp in tests/src/Kernel/TMGMTKernelTestBase.php

File

tests/src/Kernel/TMGMTKernelTestBase.php, line 102

Class

TMGMTKernelTestBase
Base class for tests.

Namespace

Drupal\Tests\tmgmt\Kernel

Code

function addLanguage($langcode) {
  $language = ConfigurableLanguage::createFromLangcode($langcode);
  $language
    ->save();
}