getMock(AccessTokenRepositoryInterface::class), 'file://' . __DIR__ . '/Stubs/public.key' ); try { $server->validateAuthenticatedRequest(ServerRequestFactory::fromGlobals()); } catch (OAuthServerException $e) { $this->assertEquals('Missing "Authorization" header', $e->getHint()); } } }