You are here

public function OAuth2ServerTest::httpGetRequest in OAuth2 Server 8

Same name and namespace in other branches
  1. 2.0.x tests/src/Functional/OAuth2ServerTest.php \Drupal\Tests\oauth2_server\Functional\OAuth2ServerTest::httpGetRequest()

Perform a GET request.

Parameters

string $url: A Url object.

array $options: An options array.

Return value

\Psr\Http\Message\ResponseInterface The response object.

Throws

\GuzzleHttp\Exception\GuzzleException

5 calls to OAuth2ServerTest::httpGetRequest()
OAuth2ServerTest::testBlockedUserTokenFails in tests/src/Functional/OAuth2ServerTest.php
Test that access is denied when using a token for a blocked user.
OAuth2ServerTest::testImplicitFlow in tests/src/Functional/OAuth2ServerTest.php
Tests the implicit flow.
OAuth2ServerTest::testOpenIdConnectImplicitFlow in tests/src/Functional/OAuth2ServerTest.php
Tests the OpenID Connect implicit flow.
OAuth2ServerTest::testOpenIdConnectNonDefaultSub in tests/src/Functional/OAuth2ServerTest.php
Tests that the OpenID Connect 'sub' property affects user info 'sub' claim.
OAuth2ServerTest::testResourceRequests in tests/src/Functional/OAuth2ServerTest.php
Tests resource requests.

File

tests/src/Functional/OAuth2ServerTest.php, line 812

Class

OAuth2ServerTest
The OAuth2 Server admin test case.

Namespace

Drupal\Tests\oauth2_server\Functional

Code

public function httpGetRequest($url, array $options = []) {
  $cookieJar = $this
    ->getSessionCookies();
  $options += [
    'cookies' => $cookieJar,
    'allow_redirects' => FALSE,
    'debug' => FALSE,
  ];
  return $this
    ->getHttpClient()
    ->request('GET', $url, $options);
}