You are here

function TMGMTBaseTestCase::createJob in Translation Management Tool 7

Creates, saves and returns a translation job.

Return value

TMGMTJob

38 calls to TMGMTBaseTestCase::createJob()
TMGMTCRUDTestCase::testAddingTranslatedData in tests/tmgmt.crud.test
Tests adding translated data and revision handling.
TMGMTCRUDTestCase::testJobItems in tests/tmgmt.crud.test
Test crud operations of job items.
TMGMTCRUDTestCase::testJobItemsCounters in tests/tmgmt.crud.test
Test the calculations of the counters.
TMGMTCRUDTestCase::testJobs in tests/tmgmt.crud.test
Test crud operations of jobs.
TMGMTCRUDTestCase::testRemoteMappings in tests/tmgmt.crud.test

... See full list

1 method overrides TMGMTBaseTestCase::createJob()
TMGMTPluginsTestCase::createJob in tests/tmgmt.plugin.test
Creates, saves and returns a translation job.

File

tests/tmgmt.base.test, line 157

Class

TMGMTBaseTestCase
Base class for tests.

Code

function createJob($source = 'en', $target = 'de', $uid = 1) {
  $job = tmgmt_job_create($source, $target, $uid);
  $this
    ->assertEqual(SAVED_NEW, $job
    ->save());

  // Assert that the translator was assigned a tid.
  $this
    ->assertTrue($job->tjid > 0);
  return $job;
}