Verified Commit 94344965 authored by godotislate's avatar godotislate
Browse files

chore: #3581427 Add return types to BasicAuthResourceTestTrait

By: longwave
By: godotislate
By: mstrelan
parent 036963e5
Loading
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -114,7 +114,7 @@ protected function setUpAuthorization($method) {
  /**
   * {@inheritdoc}
   */
  protected function assertResponseWhenMissingAuthentication($method, ResponseInterface $response) {}
  protected function assertResponseWhenMissingAuthentication($method, ResponseInterface $response): void {}

  /**
   * {@inheritdoc}
@@ -124,7 +124,7 @@ protected function assertNormalizationEdgeCases($method, Url $url, array $reques
  /**
   * {@inheritdoc}
   */
  protected function assertAuthenticationEdgeCases($method, Url $url, array $request_options) {}
  protected function assertAuthenticationEdgeCases($method, Url $url, array $request_options): void {}

  /**
   * {@inheritdoc}
+4 −3
Original line number Diff line number Diff line
@@ -33,9 +33,10 @@ protected function getAuthenticationRequestOptions($method): array {
  /**
   * {@inheritdoc}
   */
  protected function assertResponseWhenMissingAuthentication($method, ResponseInterface $response) {
  protected function assertResponseWhenMissingAuthentication($method, ResponseInterface $response): void {
    if ($method !== 'GET') {
      return $this->assertResourceErrorResponse(401, 'No authentication credentials provided.', $response);
      $this->assertResourceErrorResponse(401, 'No authentication credentials provided.', $response);
      return;
    }

    $expected_page_cache_header_value = $method === 'GET' ? 'MISS' : FALSE;
@@ -58,7 +59,7 @@ protected function assertResponseWhenMissingAuthentication($method, ResponseInte
  /**
   * {@inheritdoc}
   */
  protected function assertAuthenticationEdgeCases($method, Url $url, array $request_options) {
  protected function assertAuthenticationEdgeCases($method, Url $url, array $request_options): void {
  }

}