const SELF_SIGNED_HTTPS_REGEX = '/This is httpclienttest-selfsign\./';
/**
- * @var string path to which we can store temp file
+ * @var string
+ * Path to which we can store temp file
*/
protected $tmpFile;
$this->tmpFile = $this->createTempDir() . '/example.txt';
- $result = civicrm_api('Setting', 'create', array(
+ $result = civicrm_api('Setting', 'create', [
'version' => 3,
'verifySSL' => TRUE,
- ));
+ ]);
$this->assertAPISuccess($result);
$this->client = new CRM_Utils_HttpClient();
}
}
public function testFetchHttps_invalid_noVerify() {
- $result = civicrm_api('Setting', 'create', array(
+ $result = civicrm_api('Setting', 'create', [
'version' => 3,
'verifySSL' => FALSE,
- ));
+ ]);
$this->assertAPISuccess($result);
$result = $this->client->fetch(self::SELF_SIGNED_HTTPS_URL, $this->tmpFile);
}
public function testGetHttps_invalid_noVerify() {
- $result = civicrm_api('Setting', 'create', array(
+ $result = civicrm_api('Setting', 'create', [
'version' => 3,
'verifySSL' => FALSE,
- ));
+ ]);
$this->assertAPISuccess($result);
list($status, $data) = $this->client->get(self::SELF_SIGNED_HTTPS_URL);