use PHPUnit\Framework\TestCase;
use Symfony\Component\Security\Core\User\OidcUser;
class OidcUserTest extends TestCase
{ public function testCannotCreateUserWithoutSubProperty() { $this->
expectException(\InvalidArgumentException::
class);
$this->
expectExceptionMessage('The "sub" claim cannot be empty.'
);
new OidcUser();
} public function testCreateFullUserWithAdditionalClaimsUsingPositionalParameters() { $this->
assertEquals(new OidcUser( userIdentifier: 'john.doe',
roles:
['ROLE_USER', 'ROLE_ADMIN'
],
sub: 'e21bf182-1538-406e-8ccb-e25a17aba39f',
name: 'John DOE',
givenName: 'John',
familyName: 'DOE',