コード例 #1
0
ファイル: JobBuilder.php プロジェクト: rezzza/jobflow
 /**
  * Create the job with all children configure
  *
  * @return Job
  */
 public function getJob()
 {
     $this->resolveChildren();
     $job = new Job($this->getJobConfig());
     foreach ($this->children as $child) {
         $job->add($child->getJob());
     }
     return $job;
 }
コード例 #2
0
ファイル: Job.php プロジェクト: rezzza/jobflow
 public function test_invalid_processor_should_fail()
 {
     $this->given($mockED = new \mock\Symfony\Component\EventDispatcher\EventDispatcherInterface(), $mockED->getMockController()->hasListeners = true, $this->mockGenerator->orphanize('__construct'), $mockExecution = new \mock\Rezzza\Jobflow\Scheduler\ExecutionContext(), $mockConfig = new \mock\Rezzza\Jobflow\JobConfig('alphonse', $mockED), $mockConfig->getMockController()->getProcessorConfig = 'hey you', $mockConfig->getMockController()->resolveExecOptions = ['jean' => 'marc'])->if($job = new TestedClass($mockConfig))->exception(function () use($job, $mockExecution) {
         $job->execute($mockExecution);
     })->hasMessage('processor should be a ProcessorConfig or a callable');
 }
コード例 #3
0
ファイル: JobContext.php プロジェクト: rezzza/jobflow
 public function currentChild(Job $job)
 {
     return $job->get($this->current);
 }