assertSame('ZZQP8sS9urzriy8N9h6FwFNMOH3PkZ5T5PLqS6SX', $identity->getId()); } public function testFindIdentityByAccessTokenWithNonExistsToken(): void { $this->expectException(UnauthorizedHttpException::class); $this->expectExceptionMessage('Incorrect token'); LegacyOAuth2Identity::findIdentityByAccessToken('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); } public function testFindIdentityByAccessTokenWithExpiredToken(): void { $this->expectException(UnauthorizedHttpException::class); $this->expectExceptionMessage('Token expired'); LegacyOAuth2Identity::findIdentityByAccessToken('rc0sOF1SLdOxuD3bJcCQENmGTeYrGgy12qJScMx4'); } }