setJobFactory() public method

public setJobFactory ( Resque_Job_FactoryInterface $jobFactory ) : Resque_Job
$jobFactory Resque_Job_FactoryInterface
return Resque_Job
示例#1
0
 public function testUseFactoryToGetJobInstance()
 {
     $payload = array('class' => 'Some_Job_Class', 'args' => array(array()));
     $job = new Resque_Job('jobs', $payload);
     $factory = new Some_Stub_Factory();
     $job->setJobFactory($factory);
     $instance = $job->getInstance();
     $this->assertInstanceOf('Resque_JobInterface', $instance);
 }