Test crud operations of jobs.
public function testContinuousTranslators() {
$translator = $this
->createTranslator();
$this
->assertTrue($translator
->getPlugin() instanceof ContinuousTranslatorInterface);
$job = $this
->createJob('en', 'de', 0, [
'job_type' => Job::TYPE_CONTINUOUS,
]);
$this
->assertEquals(Job::TYPE_CONTINUOUS, $job
->getJobType());
$job->translator = $translator
->id();
$job
->save();
// Add a test item.
$item = $job
->addItem('test_source', 'test', 1);
/** @var ContinuousTranslatorInterface $plugin */
$plugin = $job
->getTranslatorPlugin();
$plugin
->requestJobItemsTranslation([
$item,
]);
$this
->assertEquals('de(de-ch): Text for job item with type test and id 1.', $item
->getData()['dummy']['deep_nesting']['#translation']['#text']);
}