function TMGMTTestBase::assertJobItemLangCodes

Asserts job item language codes.

Parameters

\Drupal\tmgmt\JobItemInterface $job_item: Job item to check.

string $expected_source_lang: Expected source language.

array $actual_lang_codes: Expected existing language codes (translations).

File

src/Tests/TMGMTTestBase.php, line 211

Class

TMGMTTestBase
Base class for tests.

Namespace

Drupal\tmgmt\Tests

Code

function assertJobItemLangCodes(JobItemInterface $job_item, $expected_source_lang, array $actual_lang_codes) {
  $this
    ->assertEqual($job_item
    ->getSourceLangCode(), $expected_source_lang);
  $existing = $job_item
    ->getExistingLangCodes();
  sort($existing);
  sort($actual_lang_codes);
  $this
    ->assertEqual($existing, $actual_lang_codes);
}