You are here

function TMGMTBaseTestCase::setEnvironment in Translation Management Tool 7

Sets the proper environment.

Currently just adds a new language.

Parameters

string $langcode: The language code.

28 calls to TMGMTBaseTestCase::setEnvironment()
TMGMTBaseTestCase::createLanguagesLoginTranslator in tests/tmgmt.base.test
Adds languages as admin user and switches to a translator user.
TMGMTEntitySourceLanguageNoneTestCase::testLanguageNeutral in sources/entity/tmgmt_entity.source.none.test
Test if language neutral entities are not allowed for translation.
TMGMTEntitySourceListTestCase::setUp in sources/entity/ui/tmgmt_entity_ui.list.test
Overrides DrupalWebTestCase::setUp()
TMGMTEntitySourcePathAutoTestCase::testAliasCreation in sources/entity/tmgmt_entity.pathauto.test
Tests that pathauto aliases are correctly created.
TMGMTEntitySourceTestCase::testAddingJobItemsWithEmptySourceText in sources/entity/tmgmt_entity.source.test

... See full list

File

tests/tmgmt.base.test, line 175

Class

TMGMTBaseTestCase
Base class for tests.

Code

function setEnvironment($langcode) {

  // Add the language.
  locale_add_language($langcode);
}