cURL\Tests\TestCase::validateSuccesfulResponse PHP Method

validateSuccesfulResponse() public method

public validateSuccesfulResponse ( cURL\Response $response, $param = 'ok' )
$response cURL\Response
    public function validateSuccesfulResponse(Response $response, $param = 'ok')
    {
        $content = $response->getContent();
        $data = json_decode($content, true);
        $this->assertInternalType('array', $data);
        $info = $response->getInfo();
        $this->assertInternalType('array', $info);
        $this->assertEquals(200, $info['http_code']);
        $this->assertEquals($param, $data['args']['curl-easy']);
        $this->assertEquals(200, $response->getInfo(CURLINFO_HTTP_CODE));
        $this->assertFalse($response->hasError());
    }