Esempio n. 1
0
 /**
  * @dataProvider provideInvokeData
  * @param       $callable
  * @param       $expectedResponse
  * @param null  $parameters
  * @param array $parameterTypes
  * @param array $contextParameters
  */
 public function testInvoke($callable, $expectedResponse, $parameters = null, $parameterTypes = [], $contextParameters = [])
 {
     $context = new Context($contextParameters);
     $serviceId = 'ServiceId';
     $type = 'JobType';
     $job = new Job($type, $parameters);
     $jobType = new JobType($serviceId, $type, $callable);
     $jobType->setParameterTypes($parameterTypes);
     $this->registry->register($jobType);
     $this->assertEquals($expectedResponse, $this->subject->invoke($job, $context));
 }
Esempio n. 2
0
 public function testGetSetQueue()
 {
     $this->assertNull($this->subject->getQueue());
     $this->subject->setQueue('queue');
     $this->assertEquals('queue', $this->subject->getQueue());
 }