Ejemplo n.º 1
0
 public function testGetCurlOptions()
 {
     $client = new Client('https://localhost:4010', null, null, null, [CURLOPT_PROXY => '127.0.0.1:8080']);
     $this->assertSame([CURLOPT_PROXY => '127.0.0.1:8080'], $client->getCurlOptions());
     $client = new Client('https://localhost:4010', null, null, null, null);
     $this->assertSame([], $client->getCurlOptions());
 }
Ejemplo n.º 2
0
 /**
  * Test creating a client with SSL verification turned off.
  */
 public function testSwitchOffSSLVerification()
 {
     $sendgrid = new s\Client('token123456789', ['turn_off_ssl_verification' => TRUE]);
     $options = $sendgrid->getOptions();
     $this->assertTrue(isset($options['turn_off_ssl_verification']));
 }