Exemplo n.º 1
0
 /**
  * MaintenanceModeException constructor.
  *
  * @param int        $time
  * @param int        $retryAfter
  * @param string     $message
  * @param \Exception $previous
  * @param int        $code
  */
 public function __construct($time, $retryAfter = null, $message = null, Exception $previous = null, $code = 0)
 {
     parent::__construct($retryAfter, $message, $previous, $code);
     $this->wentDownAt = Carbon::createFromTimestamp($time);
     if ($retryAfter) {
         $this->retryAfter = $retryAfter;
         $this->willBeAvailableAt = $this->wentDownAt->addSeconds($this->retryAfter);
     }
 }
 public function __construct($retryAfter = null, $message = null, \Exception $previous = null, $code = 0)
 {
     parent::__construct($retryAfter, $message, $previous, $code);
 }
 /**
  * @dataProvider headerDataProvider
  */
 public function testHeadersSetter($headers)
 {
     $exception = new ServiceUnavailableHttpException(10);
     $exception->setHeaders($headers);
     $this->assertSame($headers, $exception->getHeaders());
 }