1 block.translation.test private BlockTranslationTestCase::addLanguage($language_code)

File

core/modules/block/tests/block.translation.test, line 155
Tests for translation functionality within block.module.

Class

BlockTranslationTestCase

Code

private function addLanguage($language_code) {
  if (strpos($this->backdropGetContent(), 'enabled[' . $language_code . ']') === FALSE) {
    // Doesn't have language installed so add it.
    $edit = array(
      'predefined_langcode' => $language_code,
    );
    $this->backdropPost('admin/config/regional/language/add', $edit, t('Add language'));
  }
}