Example #1
0
 public function testGetRpcIdIsNull()
 {
     $response = new Response(200);
     $this->assertNull($response->getRpcId());
 }
Example #2
0
 private function parseResponse(HttpResponse $response)
 {
     try {
         $this->jsonrpc = $response->getRpcVersion();
         $this->id = $response->getRpcId();
         if (null !== $response->getRpcErrorCode()) {
             $this->result = $response;
             $this->is_error = true;
         } else {
             $this->result = $response->getRpcResult();
         }
     } catch (\Exception $e) {
         throw new ApiException("Unable to parse response from Zabbix API", null, $e);
     }
 }