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
 /**
  * @dataProvider provideDataForGetIndices
  * @param array $parameterTypes
  * @param       $expectedIndices
  */
 public function testGetIndicesOfSerializableParameters(array $parameterTypes, $expectedIndices)
 {
     $this->subject->setParameterTypes($parameterTypes);
     $this->assertEquals($expectedIndices, $this->subject->getIndicesOfSerializableParameters());
 }