public function testProcessClosure() { $command = 'ClosureExample'; $config = array('command' => function () { echo "I'm a function!\n"; return true; }, 'schedule' => '0 * * * *', 'output' => 'logs/closure.log', 'enabled' => true); $helper = new Helper(); $config['command'] = $helper->closureToString($config['command']); $message = $this->prepareMessage(); $message->body = serialize(array('cmd' => $command, 'config' => $config)); $worker = new Job('localhost'); $worker->setJobFactory($this->prepareJobFactory($command, $config)); $worker->process($message); }