function TMGMTKernelTestBase::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).

1 call to TMGMTKernelTestBase::assertJobItemLangCodes()
LocaleSourceTest::testSingularTerm in sources/locale/tests/src/Kernel/LocaleSourceTest.php
Tests translation of a locale singular term.

File

tests/src/Kernel/TMGMTKernelTestBase.php, line 117

Class

TMGMTKernelTestBase
Base class for tests.

Namespace

Drupal\Tests\tmgmt\Kernel

Code

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