Creates, saves and returns a translation job.
string $source: The source langcode.
string $target: The target langcode.
int $uid: The user ID.
array $values: (Optional) An array of additional entity values.
\Drupal\tmgmt\JobInterface A new job. A new job.
protected function createJob($source = 'en', $target = 'de', $uid = 0, array $values = array()) {
$job = tmgmt_job_create($source, $target, $uid, $values);
$this
->assertEquals(SAVED_NEW, $job
->save());
// Assert that the translator was assigned a tid.
$this
->assertTrue($job
->id() > 0);
return $job;
}