Ejemplo n.º 1
0
 public function testGetRpcVersionIsNull()
 {
     $response = new Response(200);
     $this->assertNull($response->getRpcVersion());
 }
Ejemplo n.º 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);
     }
 }