/** @var Cookie $cookie */
$cookie =
$this->request->attributes->
get(ResponseListener::COOKIE_ATTR_NAME
);
$this->
assertNull($cookie->
getValue());
} public function testConsumeRememberMeCookieValid() { $this->tokenProvider->
expects($this->
any()) ->
method('loadTokenBySeries'
) ->
with('series1'
) ->
willReturn(new PersistentToken(InMemoryUser::
class, 'wouter', 'series1', 'tokenvalue',
new \
DateTimeImmutable('-10 min'
))) ;
$this->tokenProvider->
expects($this->
once())->
method('updateToken'
)->
with('series1'
);
$rememberMeDetails =
new RememberMeDetails(InMemoryUser::
class, 'wouter', 360, 'series1:tokenvalue'
);
$this->handler->
consumeRememberMeCookie($rememberMeDetails);
// assert that the cookie has been updated with a new base64 encoded token value
$this->
assertTrue($this->request->attributes->
has(ResponseListener::COOKIE_ATTR_NAME
));
/** @var Cookie $cookie */