$this->
expectException(TokenNotFoundException::
class);
$provider->
loadTokenBySeries('someSeries'
);
} public function testUpdateToken() { $provider =
$this->
bootstrapProvider();
$token =
new PersistentToken('someClass', 'someUser', 'someSeries', 'tokenValue',
new \
DateTimeImmutable('2013-01-26T18:23:51'
));
$provider->
createNewToken($token);
$provider->
updateToken('someSeries', 'newValue',
$lastUsed =
new \
DateTime('2014-06-26T22:03:46'
));
$token =
$provider->
loadTokenBySeries('someSeries'
);
$this->
assertEquals('newValue',
$token->
getTokenValue());
$this->
assertEquals($token->
getLastUsed(),
$lastUsed);
} public function testDeleteToken() { $provider =
$this->
bootstrapProvider();
$token =
new PersistentToken('someClass', 'someUser', 'someSeries', 'tokenValue',
new \
DateTimeImmutable('2013-01-26T18:23:51'
));
$provider->
createNewToken($token);