/** * @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; }
/** * @test */ public function setOutput() { $result = new Result(); $result->setOutput('foo'); $this->assertSame('foo', $result->getOutput()); }