public function OpenIdConnectClaimsTest::testDefaultGetScopes in OpenID Connect / OAuth client 2.x
Same name and namespace in other branches
- 8 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\UnitCode
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);
}