protected function TmgmtExtensionSuitTestBase::requestTranslation in TMGMT Extension Suite 8
Requests nodes for translation.
Parameters
array $nids:
$targetLanguage:
$jobId:
5 calls to TmgmtExtensionSuitTestBase::requestTranslation()
- CheckEntityChangesTest::testDoNotTrackTranslatableEntityChanges in src/
Tests/ CheckEntityChangesTest.php - Test "Track changes of the translatable entities" feature is turned off.
- CheckEntityChangesTest::testTrackTranslatableEntityChanges in src/
Tests/ CheckEntityChangesTest.php - Test "Track changes of the translatable entities" feature is turned on.
- CheckStatusTest::testCheckStatus in src/
Tests/ CheckStatusTest.php - Test tmgmt_extension_suit_add_to_check_status() function.
- RequestBulkTranslationTest::testRequestBulkTranslationSkippingNodeInOneLanguage in src/
Tests/ RequestBulkTranslationTest.php - Test request bulk translation with conflicting item.
- RequestBulkTranslationTest::testRequestBulkTranslationSkippingNodeInTwoLanguages in src/
Tests/ RequestBulkTranslationTest.php - Test request bulk translation with conflicting items.
File
- src/
Tests/ TmgmtExtensionSuitTestBase.php, line 80
Class
- TmgmtExtensionSuitTestBase
- Basic class for tmgmt extension module.
Namespace
Drupal\tmgmt_extension_suit\TestsCode
protected function requestTranslation(array $nids, $targetLanguage, $jobId) {
// Request nodes for translation.
$data = [];
foreach ($nids as $nid) {
$data["items[{$nid}]"] = "item[{$nid}]";
}
$this
->drupalPostForm('admin/tmgmt/sources', $data, t('Request translation'));
$data = [
'label[0][value]' => 'Test job',
'target_language' => $targetLanguage,
'translator' => 'local',
];
$this
->drupalPostForm("admin/tmgmt/jobs/{$jobId}", $data, t('Submit to provider'));
}