Error message

  • Warning: count(): Parameter must be an array or an object that implements Countable in _api_make_match_member_link() (line 1230 of /home/projects/api/www/sites/all/modules/api/api.formatting.inc).
  • Warning: count(): Parameter must be an array or an object that implements Countable in _api_make_match_member_link() (line 1230 of /home/projects/api/www/sites/all/modules/api/api.formatting.inc).
  • Warning: count(): Parameter must be an array or an object that implements Countable in _api_make_match_member_link() (line 1230 of /home/projects/api/www/sites/all/modules/api/api.formatting.inc).
  • Warning: count(): Parameter must be an array or an object that implements Countable in _api_make_match_member_link() (line 1230 of /home/projects/api/www/sites/all/modules/api/api.formatting.inc).
  • Warning: count(): Parameter must be an array or an object that implements Countable in _api_make_match_member_link() (line 1230 of /home/projects/api/www/sites/all/modules/api/api.formatting.inc).
  • Warning: count(): Parameter must be an array or an object that implements Countable in _api_make_match_member_link() (line 1230 of /home/projects/api/www/sites/all/modules/api/api.formatting.inc).
  • Warning: count(): Parameter must be an array or an object that implements Countable in _api_make_match_member_link() (line 1230 of /home/projects/api/www/sites/all/modules/api/api.formatting.inc).
  • Warning: count(): Parameter must be an array or an object that implements Countable in _api_make_match_member_link() (line 1230 of /home/projects/api/www/sites/all/modules/api/api.formatting.inc).
  • Warning: count(): Parameter must be an array or an object that implements Countable in _api_make_match_member_link() (line 1230 of /home/projects/api/www/sites/all/modules/api/api.formatting.inc).
  • Warning: count(): Parameter must be an array or an object that implements Countable in _api_make_match_member_link() (line 1230 of /home/projects/api/www/sites/all/modules/api/api.formatting.inc).

function TmgmtTestTrait::addLanguage

Sets the proper environment.

Currently just adds a new language.

Parameters

string $langcode: The language code.

20 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()

... See full list

File

tests/src/Functional/TmgmtTestTrait.php, line 154

Class

TmgmtTestTrait
Base class for tests.

Namespace

Drupal\Tests\tmgmt\Functional

Code

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