You are here

protected function JsonApiExtrasFunctionalTestBase::drupalGet in JSON:API Extras 8.3

Appends the 'application/vnd.api+json' if there's no Accept header.

Overrides UiHelperTrait::drupalGet

3 calls to JsonApiExtrasFunctionalTestBase::drupalGet()
JsonApiDefaultsFunctionalTest::assertPagination in modules/jsonapi_defaults/tests/src/Functional/JsonApiDefaultsFunctionalTest.php
Checks if pagination links on a jsonapi response are working as expected.
JsonApiDefaultsFunctionalTest::testPagination in modules/jsonapi_defaults/tests/src/Functional/JsonApiDefaultsFunctionalTest.php
Checks standard pagination and page limit overrides.
JsonApiDefaultsFunctionalTest::testRead in modules/jsonapi_defaults/tests/src/Functional/JsonApiDefaultsFunctionalTest.php
Test the GET method.

File

tests/src/Functional/JsonApiExtrasFunctionalTestBase.php, line 75

Class

JsonApiExtrasFunctionalTestBase
Provides helper methods for the JSON API Extras module's functional tests.

Namespace

Drupal\Tests\jsonapi_extras\Functional

Code

protected function drupalGet($path, array $options = [], array $headers = []) {
  if (empty($headers['Accept']) && empty($headers['accept'])) {
    $headers['Accept'] = 'application/vnd.api+json';
  }
  return parent::drupalGet($path, $options, $headers);
}