You are here

function SimplenewsI18nTest::addLanguage in Simplenews 8

Install a the specified language if it has not been already. Otherwise make sure that the language is enabled.

Copied from Drupali18nTestCase::addLanguage().

Parameters

$language_code: The language code the check.

1 call to SimplenewsI18nTest::addLanguage()
SimplenewsI18nTest::setUpLanguages in src/Tests/SimplenewsI18nTest.php
Set up configuration for multiple languages.

File

src/Tests/SimplenewsI18nTest.php, line 90

Class

SimplenewsI18nTest
Translation of newsletters and issues.

Namespace

Drupal\simplenews\Tests

Code

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