$this->router->
expects($this->
once()) ->
method('generate'
) ->
with( 'app_check_login_link_route',
$this->
callback(fn ($parameters) => 'weaverryan' ===
$parameters['user'
] &&
isset($parameters['expires'
]) &&
isset($parameters['hash'
]) // allow a small expiration offset to avoid time-sensitivity
&&
abs(time() + 600 -
$parameters['expires'
]) <= 1
// make sure hash is what we expect
&&
$parameters['hash'
] ===
$this->
createSignatureHash('weaverryan',
$parameters['expires'
],
$extraProperties) ),
UrlGeneratorInterface::ABSOLUTE_URL
) ->
willReturn('https://example.com/login/verify?user=weaverryan&hash=abchash&expires=1601235000'
);
if ($request) { $this->router->
expects($this->
once()) ->
method('getContext'
) ->
willReturn($currentRequestContext =
new RequestContext());
$series =
[