Example #1
0
 public function testTimeoutError()
 {
     $client = new Client($this->testUrl);
     $client->setTimeout(1);
     try {
         $client->get(['sleep' => 1]);
         $this->fail('It should throws an exception');
     } catch (Exception $e) {
         $this->assertEquals(CURLE_OPERATION_TIMEOUTED, $e->getCode());
     }
 }