You are here

protected function ParagraphsTest::drupalGetCdf in Acquia Content Hub 8

Retrieves a Drupal or an absolute CDF path and JSON decodes the result.

Parameters

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

array $options: Array of URL options.

array $headers: Array of headers. Eg array('Accept: application/vnd.drupal-ajax').

Return value

array Decoded json.

1 call to ParagraphsTest::drupalGetCdf()
ParagraphsTest::checkCdfOutput in tests/src/Functional/ParagraphsTest.php
Ensures the CDF output is what we expect it to be.

File

tests/src/Functional/ParagraphsTest.php, line 222

Class

ParagraphsTest
Tests paragraphs support in Acquia Content Hub module.

Namespace

Drupal\Tests\acquia_contenthub\Functional

Code

protected function drupalGetCdf($path, array $options = [], array $headers = []) {
  return Json::decode($this
    ->drupalGetWithFormat($path, 'acquia_contenthub_cdf', $options, $headers));
}