protected function TMGMTFileTestCase::importFile in Translation Management Tool 7
2 calls to TMGMTFileTestCase::importFile()
- TMGMTFileTestCase::testHTML in translators/file/tmgmt_file.test
- Tests export and import for the HTML format.
- TMGMTFileTestCase::testXLIFF in translators/file/tmgmt_file.test
- Tests import and export for the XLIFF format.
File
- translators/file/tmgmt_file.test, line 448
- Test cases for the file translator module.
Class
- TMGMTFileTestCase
- Basic tests for the file translator.
Code
protected function importFile($translated_file, $translated_text, TMGMTJob $job) {
$uri = $job
->uri();
$edit = array(
'files[file]' => $translated_file,
);
$this
->drupalPost($uri['path'] . '/manage', $edit, t('Import'));
$this
->assertNoText(t('In progress'));
$this
->clickLink(t('review'));
foreach ($translated_text[1] as $key => $value) {
$this
->assertText(check_plain($value));
}
foreach ($translated_text[2] as $key => $value) {
$this
->assertNoText(check_plain($value));
}
$this
->drupalPost(NULL, array(), t('Save as completed'));
$this
->clickLink(t('review'));
foreach ($translated_text[1] as $key => $value) {
$this
->assertNoText(check_plain($value));
}
foreach ($translated_text[2] as $key => $value) {
$this
->assertText(check_plain($value));
}
$this
->drupalPost(NULL, array(), t('Save as completed'));
$this
->assertText(t('Finished'));
$this
->assertNoText(t('Needs review'));
}