function TMGMTTestBase::createJob in Translation Management Tool 8
Creates, saves and returns a translation job.
Return value
File
- src/
Tests/ TMGMTTestBase.php, line 179
Class
- TMGMTTestBase
- Base class for tests.
Namespace
Drupal\tmgmt\TestsCode
function createJob($source = 'en', $target = 'de', $uid = 1, $values = array()) {
$job = tmgmt_job_create($source, $target, $uid, $values);
$this
->assertEqual(SAVED_NEW, $job
->save());
// Assert that the translator was assigned a tid.
$this
->assertTrue($job
->id() > 0);
return $job;
}