public function JobsTest::testUploadJobWithoutBatchUid in TMGMT Translator Smartling 8.3
Same name and namespace in other branches
- 8.4 tests/src/Functional/JobsTest.php \Drupal\Tests\tmgmt_smartling\Functional\JobsTest::testUploadJobWithoutBatchUid()
Skip jobs which don't have batch uid in settings.
File
- tests/
src/ Functional/ JobsTest.php, line 76
Class
- JobsTest
- Jobs tests.
Namespace
Drupal\Tests\tmgmt_smartling\FunctionalCode
public function testUploadJobWithoutBatchUid() {
$job = $this
->createJob($this->sourceLanguage, 'de', 1, [
'job_type' => Job::TYPE_NORMAL,
]);
$job->translator = 'smartling';
$job
->addItem('content', 'node', 1);
$job
->setState(JobInterface::STATE_ACTIVE);
$job
->requestTranslation();
$this
->drupalGet('/admin/reports/dblog');
$this
->assertUniqueText(t('File @name (job id = @job_id) wasn\'t uploaded', [
'@name' => $job
->getTranslatorPlugin()
->getFileName($job),
'@job_id' => $job
->id(),
]));
$this
->assertNoText(t('Smartling updated a job'));
$this
->assertNoText(t('Smartling created a batch'));
$this
->assertNoText(t('File uploaded. Job id: @job_id.', [
'@job_id' => $job
->id(),
]));
$this
->assertNoText(t('Smartling executed a batch'));
}