request($method, $uri, \array_merge_recursive( [ 'headers' => [ 'Content-Type' => match ($method) { 'PATCH' => 'application/merge-patch+json', default => 'application/json', }, ], ], $options, )); if ($expectedCode !== null) { $this->assertResponseStatusCodeSame($expectedCode); } return $response; } protected function withAuthHeader(User $user): array { return [ TestingAuthenticator::AUTH_HEADER => $user->getId(), ]; } }