Пример #1
0
 public function testCheck()
 {
     $data = 'data';
     $headers = array('X-dummy: data');
     $handler = curl_init();
     // this should be ok, no exception
     $this->adapter->check($data, $headers, $handler);
     $data = '';
     $headers = array();
     $this->setExpectedException('Solarium\\Exception\\HttpException');
     $this->adapter->check($data, $headers, $handler);
     curl_close($handler);
 }
 /**
  * {@inheritdoc}
  */
 public function createHandle($request, $endpoint)
 {
     $handler = parent::createHandle($request, $endpoint);
     if (defined('PANTHEON_ENVIRONMENT')) {
         curl_setopt($handler, CURLOPT_SSL_VERIFYPEER, false);
         $client_cert = $_SERVER['HOME'] . '/certs/binding.pem';
         curl_setopt($handler, CURLOPT_SSLCERT, $client_cert);
     }
     return $handler;
 }