You are here

public function OpenIdConnectClaimsTest::testDefaultGetScopes in OpenID Connect / OAuth client 8

Same name and namespace in other branches
  1. 2.x tests/src/Unit/OpenIdConnectClaimsTest.php \Drupal\Tests\openid_connect\Unit\OpenIdConnectClaimsTest::testDefaultGetScopes()

Test the default getScopes() method.

File

tests/src/Unit/OpenIdConnectClaimsTest.php, line 154

Class

OpenIdConnectClaimsTest
Test the OpenIdConnectClaims class.

Namespace

Drupal\Tests\openid_connect\Unit

Code

public function testDefaultGetScopes() : void {
  $userInfoMapping = $this
    ->createMock(ImmutableConfig::class);
  $userInfoMapping
    ->expects($this
    ->once())
    ->method('get')
    ->willReturn(self::USERINFO_MAPPINGS);
  $this->configFactory
    ->expects($this
    ->once())
    ->method('getEditable')
    ->willReturn($userInfoMapping);
  $scopes = $this->openIdConnectClaims
    ->getScopes();
  $this
    ->assertEquals('openid email profile', $scopes);
}