Commit 22cef755 authored by Dries's avatar Dries

- Patch #395856 by mr.baileys: added HTTP request status code to request assertion message.

parent 0ea65350
......@@ -986,7 +986,7 @@ protected function curlExec($curl_options) {
curl_setopt_array($this->curlHandle, $this->additionalCurlOptions + $curl_options);
$this->headers = array();
$this->drupalSetContent(curl_exec($this->curlHandle), curl_getinfo($this->curlHandle, CURLINFO_EFFECTIVE_URL));
$this->assertTrue($this->content !== FALSE, t('!method to !url, response is !length bytes.', array('!method' => !empty($curl_options[CURLOPT_NOBODY]) ? 'HEAD' : (empty($curl_options[CURLOPT_POSTFIELDS]) ? 'GET' : 'POST'), '!url' => $url, '!length' => strlen($this->content))), t('Browser'));
$this->assertTrue($this->content !== FALSE, t('!method to !url, status is !status, response is !length bytes.', array('!method' => !empty($curl_options[CURLOPT_NOBODY]) ? 'HEAD' : (empty($curl_options[CURLOPT_POSTFIELDS]) ? 'GET' : 'POST'), '!url' => $url, '!status' => curl_getinfo($this->curlHandle, CURLINFO_HTTP_CODE), '!length' => strlen($this->content))), t('Browser'));
return $this->drupalGetContent();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment