function it_supports(JobInterface $job)
 {
     $job->getName()->willReturn('product_xlsx_export');
     $this->supports($job)->shouldReturn(false);
     $job->getName()->willReturn('product_csv_export');
     $this->supports($job)->shouldReturn(true);
 }
 function it_creates_a_job_parameters_with_default_values($registry, DefaultValuesProviderInterface $provider, JobInterface $job)
 {
     $job->getName()->willReturn('foo');
     $registry->get($job)->willReturn($provider);
     $provider->getDefaultValues()->willReturn(['my_default_field' => 'my default value']);
     $jobParameters = $this->create($job, ['my_defined_field' => 'my defined value']);
     $jobParameters->shouldReturnAnInstanceOf('Akeneo\\Component\\Batch\\Job\\JobParameters');
     $jobParameters->all()->shouldBe(['my_default_field' => 'my default value', 'my_defined_field' => 'my defined value']);
 }
 function it_supports_a_job(JobInterface $job)
 {
     $job->getName()->willReturn('my_supported_job_name');
     $this->supports($job)->shouldReturn(true);
 }
 /**
  * {@inheritdoc}
  */
 public function supports(JobInterface $job)
 {
     return in_array($job->getName(), $this->supportedJobNames);
 }
 function it_throws_an_exception_when_there_is_no_registered_provider(JobInterface $job)
 {
     $job->getName()->willReturn('myname');
     $this->shouldThrow(new NonExistingServiceException('No contraint collection provider has been defined for the Job "myname"'))->during('get', [$job]);
 }