You are here

protected function JsonExtrasApiFunctionalTest::drupalGet in JSON:API Extras 8

Same name and namespace in other branches
  1. 8.2 tests/src/Functional/JsonExtrasApiFunctionalTest.php \Drupal\Tests\jsonapi_extras\Functional\JsonExtrasApiFunctionalTest::drupalGet()

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

Overrides UiHelperTrait::drupalGet

1 call to JsonExtrasApiFunctionalTest::drupalGet()
JsonExtrasApiFunctionalTest::testRead in tests/src/Functional/JsonExtrasApiFunctionalTest.php
Test the GET method.

File

tests/src/Functional/JsonExtrasApiFunctionalTest.php, line 87

Class

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