You are here

private function TranslationOperationTargetLanguageTest::generateTargetLanguage in Translation Views 8

Generate random target language ID from available list.

Return value

string Language ID.

1 call to TranslationOperationTargetLanguageTest::generateTargetLanguage()
TranslationOperationTargetLanguageTest::testTranslationOperationsTargetLanguage in tests/src/Functional/TranslationOperationTargetLanguageTest.php
Test translation operations target language.

File

tests/src/Functional/TranslationOperationTargetLanguageTest.php, line 138

Class

TranslationOperationTargetLanguageTest
Class TranslationOperationTargetLanguageTest.

Namespace

Drupal\Tests\translation_views\Functional

Code

private function generateTargetLanguage() {
  $target_language = self::$langcodes[mt_rand(0, 4)];
  $this
    ->assertNotNull($target_language);
  return $target_language;
}