You are here

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

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

Overrides UiHelperTrait::drupalGet

4 calls to JsonApiExtrasFunctionalTest::drupalGet()
JsonApiExtrasFunctionalTest::testDisabledResourcesShowInAdminList in tests/src/Functional/JsonApiExtrasFunctionalTest.php
Test disabled resource show in admin list.
JsonApiExtrasFunctionalTest::testOverwriteFieldWithOtherField in tests/src/Functional/JsonApiExtrasFunctionalTest.php
JsonApiExtrasFunctionalTest::testRead in tests/src/Functional/JsonApiExtrasFunctionalTest.php
Test the GET method.
JsonApiExtrasFunctionalTest::testSortOverwrittenField in tests/src/Functional/JsonApiExtrasFunctionalTest.php

File

tests/src/Functional/JsonApiExtrasFunctionalTest.php, line 137

Class

JsonApiExtrasFunctionalTest
The test class for the main functionality.

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);
}