/** * Set the associated job * * @param JobInstance $jobInstance The job instance to associate the JobExecution to * * @return JobExecution */ public function setJobInstance(JobInstance $jobInstance) { $this->jobInstance = $jobInstance; $this->jobInstance->addJobExecution($this); return $this; }
function it_sets_job_instance(JobInstance $jobInstance) { $jobInstance->addJobExecution($this)->shouldBeCalled(); $this->setJobInstance($jobInstance); }