You are here

public function StubNegotiationMiddleware::getContentType in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Core/StackMiddleware/NegotiationMiddlewareTest.php \Drupal\Tests\Core\StackMiddleware\StubNegotiationMiddleware::getContentType()
  2. 9 core/tests/Drupal/Tests/Core/StackMiddleware/NegotiationMiddlewareTest.php \Drupal\Tests\Core\StackMiddleware\StubNegotiationMiddleware::getContentType()

Gets the normalized type of a request.

The normalized type is a short, lowercase version of the format, such as 'html', 'json' or 'atom'.

Parameters

\Symfony\Component\HttpFoundation\Request $request: The request object from which to extract the content type.

Return value

string The normalized type of a given request.

Overrides NegotiationMiddleware::getContentType

File

core/tests/Drupal/Tests/Core/StackMiddleware/NegotiationMiddlewareTest.php, line 160
Contains \Drupal\Tests\Core\StackMiddleware\NegotiationMiddlewareTest.

Class

StubNegotiationMiddleware

Namespace

Drupal\Tests\Core\StackMiddleware

Code

public function getContentType(Request $request) {
  return parent::getContentType($request);
}