1.20.x backdrop_web_test_case.php protected BackdropWebTestCase::backdropHead($path, array $options = array(), array $headers = array())

Retrieves only the headers for a Backdrop path or an absolute path.

Parameters

$path: Backdrop 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->backdropGetContent():

File

modules/simpletest/backdrop_web_test_case.php, line 2622

Class

BackdropWebTestCase
Test case for typical Backdrop tests.

Code

protected function backdropHead($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;
}