You are here

function TMGMTBaseTestCase::assertJobItemLangCodes in Translation Management Tool 7

Asserts job item language codes.

Parameters

TMGMTJobItem $job_item: Job item to check.

string $expected_source_lang: Expected source language.

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

7 calls to TMGMTBaseTestCase::assertJobItemLangCodes()
TMGMTEntitySourceTestCase::testEntitySourceNode in sources/entity/tmgmt_entity.source.test
Tests nodes field translation.
TMGMTEntitySourceTestCase::testEntitySourceTerm in sources/entity/tmgmt_entity.source.test
Tests taxonomy terms field translation.
TMGMTI18nStringSourceTestCase::testI18nStringSourceLangCodes in sources/i18n_string/tmgmt_i18n_string.test
TMGMTI18nStringSourceTestCase::testI18nStringSourceMenu in sources/i18n_string/tmgmt_i18n_string.test
TMGMTI18nStringSourceTestCase::testI18nStringSourceTaxonomy in sources/i18n_string/tmgmt_i18n_string.test

... See full list

File

tests/tmgmt.base.test, line 190

Class

TMGMTBaseTestCase
Base class for tests.

Code

function assertJobItemLangCodes(TMGMTJobItem $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);
}