$recoveryService->
method('getUserByHash'
)->
willReturn($userEntity);
$recoveryService->
method('updatePassword'
)->
willReturn(true
);
$controller =
new UserRecoveryController( $recoveryService,
$this->
mockResetLimiter([ RateLimiter::OAUTH => 1,
RateLimiter::USER_RECOVERY => 1,
]),
);
$controller->
updateUserPassword(new Request(),
$this->context
);
} public function testItThrowsExceptionOnInvalidRoute(): void
{ $rateLimiter =
new RateLimiter();
$this->
expectException(\RuntimeException::
class);
$rateLimiter->
reset('test', 'test-key'
);
} public function testIgnoreLimitWhenDisabled(): void
{