Пример #1
0
 /**
  * @return  void
  * @throws  \RuntimeException
  */
 public function run()
 {
     try {
         $result = $this->task->execute();
     } catch (\RuntimeException $e) {
         throw $e;
     }
     $result->setFork($this->fork);
     try {
         $this->resultQueue->enqueue($result);
     } catch (\RuntimeException $e) {
         throw $e;
     }
 }
Пример #2
0
 /**
  * @test
  */
 public function execute()
 {
     $task = new Task(function ($arg) {
         return 'foo' . $arg;
     }, 'bar', null);
     $this->assertInstanceOf('\\Ackintosh\\Snidel\\Result\\Result', $task->execute());
 }