/** * @test */ public function setError() { $result = new Result(); $error = array('foo' => 'bar'); $result->setError($error); $this->assertTrue($result->isFailure()); $this->assertSame($error, $result->getError()); }
/** * @return void * @throws \RuntimeException */ public function error() { $result = new Result(); $result->setError(error_get_last()); $result->setTask($this->task); $result->setFork($this->fork); try { $this->resultQueue->enqueue($result); } catch (\RuntimeException $e) { throw $e; } }