protected function SmartlingTestBase::setUpSmartlingProviderSettings in TMGMT Translator Smartling 8.2
Sets up Smartling provider settings and returns translator plugin.
Parameters
array $providerSettings:
Return value
\Drupal\tmgmt\TranslatorInterface
24 calls to SmartlingTestBase::setUpSmartlingProviderSettings()
- BaseFlowTest::testRevisionInflation in src/
Tests/ BaseFlowTest.php - Test revision inflation.
- BaseFlowTest::testUploadFileAndDownloadTranslation in src/
Tests/ BaseFlowTest.php - Test upload and download translation.
- BaseFlowTest::testUploadXlfChangeToXmlDownloadXlf in src/
Tests/ BaseFlowTest.php - Test uploading/downloading xlf file: rely on file name in tmgmt_job.
- BaseFlowTest::testUploadXmlChangeToXlfDownloadXml in src/
Tests/ BaseFlowTest.php - Test uploading/downloading xml file: rely on file name in tmgmt_job.
- ContextTest::testContextSendingByCron in src/
Tests/ ContextTest.php - Test context sending by cron.
File
- src/
Tests/ SmartlingTestBase.php, line 141
Class
- SmartlingTestBase
- Basic tests for the Smartling translator.
Namespace
Drupal\tmgmt_smartling\TestsCode
protected function setUpSmartlingProviderSettings(array $providerSettings) {
$translator = $this
->createTranslator([
'plugin' => 'smartling',
'auto_accept' => $providerSettings['auto_accept'],
'settings' => [
'project_id' => $providerSettings['settings[project_id]'],
'user_id' => $providerSettings['settings[user_id]'],
'token_secret' => $providerSettings['settings[token_secret]'],
'contextUsername' => $providerSettings['settings[contextUsername]'],
'context_silent_user_switching' => $providerSettings['settings[context_silent_user_switching]'],
'retrieval_type' => $providerSettings['settings[retrieval_type]'],
'auto_authorize_locales' => $providerSettings['settings[auto_authorize_locales]'],
'callback_url_use' => $providerSettings['settings[callback_url_use]'],
'callback_url_host' => $providerSettings['settings[callback_url_host]'],
'scheme' => $providerSettings['settings[scheme]'],
'custom_regexp_placeholder' => $providerSettings['settings[custom_regexp_placeholder]'],
'export_format' => $providerSettings['settings[export_format]'],
],
]);
return $translator;
}