Esempio n. 1
0
 /**
  * @test
  */
 public function setError()
 {
     $result = new Result();
     $error = array('foo' => 'bar');
     $result->setError($error);
     $this->assertTrue($result->isFailure());
     $this->assertSame($error, $result->getError());
 }
Esempio n. 2
0
 /**
  * @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;
     }
 }