You are here

protected function ContentHubTestBase::drupalGetWithFormat in Acquia Content Hub 8

Retrieves a Drupal path or an absolute path for a given format.

Parameters

\Drupal\Core\Url|string $path: Drupal path or URL to request given format from.

string $format: The wanted request format.

array $options: Array of URL options.

array $headers: Array of headers.

Return value

mixed The result of the request.

1 call to ContentHubTestBase::drupalGetWithFormat()
IntegrationTest::checkCdfFormat in tests/src/Functional/IntegrationTest.php
Ensures the CDF output is present for expected formats.

File

tests/src/Functional/ContentHubTestBase.php, line 264

Class

ContentHubTestBase
Provides the base class for web tests for Search API.

Namespace

Drupal\Tests\acquia_contenthub\Functional

Code

protected function drupalGetWithFormat($path, $format, array $options = [], array $headers = []) {
  $options = array_merge_recursive([
    'query' => [
      '_format' => $format,
    ],
  ], $options);
  return $this
    ->drupalGet($path, $options, $headers);
}