/**
  * @test
  */
 public function HTTP_500_range_is_server_error_2()
 {
     // arrange
     $data = ['status' => 500];
     $ApiResult = new ApiResult($data);
     // act
     $isServerError = $ApiResult->isServerError();
     // assert
     $this->assertTrue($isServerError);
 }
 /**
  * @param ApiResult $Result
  */
 public function __construct($Result)
 {
     $this->Result = $Result;
     $error = $Result->getError();
     if (is_array($error)) {
         // exception must be a string
         $error = json_encode($error);
     }
     parent::__construct($error != null ? $error : 'unknown');
 }