Exemple #1
0
 /**
  * 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;
 }
Exemple #2
0
 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');
 }
Exemple #3
0
 public function currentChild(Job $job)
 {
     return $job->get($this->current);
 }