public function __construct() { parent::__construct(); $this->responseMultipleHeader = new CurlResponse(file_get_contents(realpath(__DIR__ . '/data/multiple_response_header.txt'))); $curl = new Curl(); $this->responseGoogle = $curl->get('www.google.com'); }
public function testGetFails() { $curl = new Curl(); try { $response = $curl->get('diaewkaksdljf-invalid-url-dot-com.com'); } catch (CurlException $e) { $this->assertContains("CURLE_COULDNT_RESOLVE_HOST: ", $e->getMessage()); return; } $this->assertTrue(false); }