Ejemplo n.º 1
0
 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');
 }
Ejemplo n.º 2
0
 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);
 }