Esempio n. 1
0
 /**
  * @return  Ackintosh\Snidel\Result\Result
  */
 public function execute()
 {
     ob_start();
     $result = new Result();
     try {
         $result->setReturn(call_user_func_array($this->getCallable(), is_array($args = $this->getArgs()) ? $args : array($args)));
     } catch (\RuntimeException $e) {
         ob_get_clean();
         throw $e;
     }
     $result->setOutput(ob_get_clean());
     $result->setTask($this);
     return $result;
 }
Esempio n. 2
0
 /**
  * @test
  */
 public function setOutput()
 {
     $result = new Result();
     $result->setOutput('foo');
     $this->assertSame('foo', $result->getOutput());
 }