function it_sets_the_job(Job $job) { $job->getConfiguration()->shouldBeCalled(); $this->setJob($job); }
/** * Set job * * @param Job $job * * @return JobInstance */ public function setJob($job) { $this->job = $job; if ($job) { //TODO: FIXME to get only the jobConfiguration instead of merging it //with the jobConfiguration: //$this->rawConfiguration = $job->getConfiguration(); // Waiting for the ImportExport fixes on the right uses of the configuration // See https://magecore.atlassian.net/browse/BAP-2601 $jobConfiguration = $job->getConfiguration(); if (is_array($this->rawConfiguration) && count($this->rawConfiguration) > 0) { $this->rawConfiguration = array_merge($this->rawConfiguration, $jobConfiguration); } else { $this->rawConfiguration = $jobConfiguration; } } return $this; }