protected function SmartlingTestBase::deleteTestFile in TMGMT Translator Smartling 8.2
Removes test file from Smartling dashboard.
Parameters
$fileName:
15 calls to SmartlingTestBase::deleteTestFile()
- 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 119
Class
- SmartlingTestBase
- Basic tests for the Smartling translator.
Namespace
Drupal\tmgmt_smartling\TestsCode
protected function deleteTestFile($fileName) {
try {
$api_factory = Drupal::service('tmgmt_smartling.smartling_api_factory');
$smartlingApi = $api_factory::create([
'user_id' => $this->smartlingPluginProviderSettings['settings[user_id]'],
'project_id' => $this->smartlingPluginProviderSettings['settings[project_id]'],
'token_secret' => $this->smartlingPluginProviderSettings['settings[token_secret]'],
], 'file');
$smartlingApi
->deleteFile($fileName);
} catch (SmartlingApiException $e) {
// File not found.
}
}