Tests tmgmt_job_match_item()
tmgmt_job_match_item
function testTMGTJobMatchItem() {
$this
->addLanguage('fr');
$this
->addLanguage('es');
// Add a job from en to fr and en to sp.
$job_en_fr = $this
->createJob('en', 'fr');
$job_en_sp = $this
->createJob('en', 'es');
// Add a job which has existing source-target combinations.
$this
->assertEquals($job_en_fr
->id(), tmgmt_job_match_item('en', 'fr')
->id());
$this
->assertEquals($job_en_sp
->id(), tmgmt_job_match_item('en', 'es')
->id());
// Add a job which has no existing source-target combination.
$this
->assertTrue(tmgmt_job_match_item('fr', 'es') instanceof Job);
}