/** * @return JobOptionsValidator */ private function getJobOptionsValidator() { if ($this->job_options_validator) { return $this->job_options_validator; } $this->job_options_validator = new JobOptionsValidator($this->config->getWorkerConfig()); return $this->job_options_validator; }
/** * @return array */ public function getDaemonConfig() { $queue_configs = $this->config->getWorkerConfig()->getWorkerConfigs(); $raw_daemon_config = $this->getRawDaemonConfig(); $programs = []; foreach ($queue_configs as $queue_config) { $program_config = array_replace_recursive($raw_daemon_config, $queue_config); $this->evaluateProgramName($program_config); $program_config['command'] = $this->generateCommandString($program_config); $programs[$program_config['program_name']] = $this->getProgram($program_config); } return $programs; }
/** * @covers ::<private> * @dataProvider configProvider * @param array $options */ public function testQueueConfigCanBeRequestedMultipleTimes(array $options) { $config = new Config(__FILE__, $options); $this->assertInstanceOf('Hodor\\JobQueue\\Config\\MessageQueueConfig', $config->getMessageQueueConfig()); $this->assertInstanceOf('Hodor\\JobQueue\\Config\\WorkerConfig', $config->getWorkerConfig()); }