Esempio n. 1
0
 public function testInvokeHandlesJobAwareJobs()
 {
     $serviceId = 'serviceId';
     $type = 'callable-type';
     $callable = new JobAwareJob();
     $jobType = new JobType($serviceId, $type, array($callable, 'execute'));
     $job = new Job($type);
     $this->registry->register($jobType);
     $this->assertEquals('foobar', $this->subject->invoke($job, new Context()));
     $this->assertEquals($job, $callable->getJob());
 }
Esempio n. 2
0
 public function testGetCallable()
 {
     $this->assertEquals([new JobAwareJob(), JobAwareJob::getMethodName()], $this->subject->getCallable());
 }