protected function SmartlingTestBase::downloadAndCheckTranslatedFile in TMGMT Translator Smartling 8.4
Same name and namespace in other branches
- 8.3 tests/src/Functional/SmartlingTestBase.php \Drupal\Tests\tmgmt_smartling\Functional\SmartlingTestBase::downloadAndCheckTranslatedFile()
Checks if download was successful.
Parameters
$jobId:
$fileName:
Throws
\Exception
1 call to SmartlingTestBase::downloadAndCheckTranslatedFile()
- BaseFlowTest::testUploadFileAndDownloadTranslation in tests/
src/ Functional/ BaseFlowTest.php - Test upload and download translation.
File
- tests/
src/ Functional/ SmartlingTestBase.php, line 253
Class
- SmartlingTestBase
- Basic tests for the Smartling translator.
Namespace
Drupal\Tests\tmgmt_smartling\FunctionalCode
protected function downloadAndCheckTranslatedFile($jobId, $fileName) {
$this
->drupalPostForm("admin/tmgmt/jobs/{$jobId}", [], t('Download'));
$this
->drupalGet('admin/reports/dblog');
$this
->assertResponse(200);
// TODO: don't know why assertLink and assertRaw doesn't work with quoted
// strings.
$this
->assertRaw('Translation for');
$this
->assertRaw($fileName);
$this
->assertRaw('was successfully downloaded and imported.');
}