Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ResponseFormatSame.php

function ResponseFormatSame::matches

Parameters

Response $response:

Overrides Constraint::matches

File

vendor/symfony/http-foundation/Test/Constraint/ResponseFormatSame.php, line 40

Class

ResponseFormatSame
Asserts that the response is in the given format.

Namespace

Symfony\Component\HttpFoundation\Test\Constraint

Code

protected function matches($response) : bool {
    return $this->format === $this->request
        ->getFormat($response->headers
        ->get('Content-Type'));
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal