Example #1
0
 public function testTimeoutMsError()
 {
     $client = new Client('http://www.google.be');
     $client->setConnectionTimeout(0.001);
     try {
         $client->get();
         $this->fail('It should throws an exception');
     } catch (Exception $e) {
         $this->assertEquals(CURLE_OPERATION_TIMEOUTED, $e->getCode());
     }
 }