You are here

protected function RequestTestJsonapi::assertMimeType in OpenAPI for JSON:API 8.2

Same name and namespace in other branches
  1. 3.x tests/src/Functional/RequestTestJsonapi.php \Drupal\Tests\openapi_jsonapi\Functional\RequestTestJsonapi::assertMimeType()

Assert the correct MIME types.

Parameters

string[] $actual: The actual MIME types.

array $options: Additional options.

Overrides RequestTestBase::assertMimeType

File

tests/src/Functional/RequestTestJsonapi.php, line 63

Class

RequestTestJsonapi
REST tests for requests on OpenAPI routes.

Namespace

Drupal\Tests\openapi_jsonapi\Functional

Code

protected function assertMimeType(array $actual, array $options = []) {
  $this
    ->assertEquals([
    'application/vnd.api+json',
  ], $actual, "JSON:API root should only contain application/vnd.api+json");
}