public function OpenIdConnectClaimsTest::testGetDefaultClaims 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::testGetDefaultClaims()
Test the default claims array.
@dataProvider defaultClaimsProvider The data profiled for the claims test.
Parameters
string $key: The key for the claim.
string $scope: The scope for the claim.
string $type: The data type for the claim.
File
- tests/
src/ Unit/ OpenIdConnectClaimsTest.php, line 108
Class
- OpenIdConnectClaimsTest
- Test the OpenIdConnectClaims class.
Namespace
Drupal\Tests\openid_connect\UnitCode
public function testGetDefaultClaims(string $key, string $scope, string $type) : void {
$claims = $this->openIdConnectClaims
->getClaims();
// Ensure the default key exists.
$this
->assertArrayHasKey($key, $claims);
// Assert the scope is correct.
$this
->assertEquals($scope, $claims[$key]['scope']);
// Assert the type is correct.
$this
->assertEquals($type, $claims[$key]['type']);
}