protected function DrupalWebTestCase::drupalHead in SimpleTest 7
Same name and namespace in other branches
- 6.2 drupal_web_test_case.php \DrupalWebTestCase::drupalHead()
- 7.2 drupal_web_test_case.php \DrupalWebTestCase::drupalHead()
Retrieves only the headers for a Drupal path or an absolute path.
Parameters
$path: Drupal path or URL to load into internal browser
$options: Options to be forwarded to url().
$headers: An array containing additional HTTP request headers, each formatted as "name: value".
Return value
The retrieved headers, also available as $this->drupalGetContent()
3 calls to DrupalWebTestCase::drupalHead()
- BootstrapPageCacheTestCase::testConditionalRequests in tests/
bootstrap.test - Test support for requests containing If-Modified-Since and If-None-Match headers.
- FileDownloadTest::testPrivateFileTransfer in tests/
file.test - Test the private file transfer system.
- FileDownloadTest::testPublicFileTransfer in tests/
file.test - Test the public file transfer system.
File
- ./
drupal_web_test_case.php, line 1543
Class
- DrupalWebTestCase
- Test case for typical Drupal tests.
Code
protected function drupalHead($path, array $options = array(), array $headers = array()) {
$options['absolute'] = TRUE;
$out = $this
->curlExec(array(
CURLOPT_NOBODY => TRUE,
CURLOPT_URL => url($path, $options),
CURLOPT_HTTPHEADER => $headers,
));
$this
->refreshVariables();
// Ensure that any changes to variables in the other thread are picked up.
return $out;
}