/** * @param array $program_config * @return string */ private function generateCommandString(array $program_config) { $program_config['program_prefix'] = ''; $command_pieces = ['/usr/bin/env php', escapeshellarg($program_config['command']), '-c ' . escapeshellarg($this->config->getConfigPath())]; if ('superqueuer' !== $program_config['worker_type']) { $command_pieces[] = '-q ' . escapeshellarg($program_config['worker_name']); } return implode(" ", $command_pieces); }
/** * @covers ::__construct * @covers ::getConfigPath * @covers ::<private> * @dataProvider configProvider */ public function testConfigPathIsSet($options) { $path = __FILE__ . '.' . uniqid(); $config = new Config($path, $options); $this->assertEquals($path, $config->getConfigPath()); }