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

merge-requests/26/head
Dries Buytaert 2009-03-09 17:11:59 +00:00
parent 0ea653502c
commit 22cef75526
1 changed files with 1 additions and 1 deletions

View File

@ -986,7 +986,7 @@ class DrupalWebTestCase {
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();
}