$newToken->setName($token->getName());
$newToken->setToken($this->hashToken($sessionId));
$newToken->setType(IToken::TEMPORARY_TOKEN);
+ $newToken->setRemember($token->getRemember());
$newToken->setLastActivity($this->time->getTime());
$this->mapper->insert($newToken);
}
->expects($this->at(3))
->method('getName')
->willReturn('MyTokenName');
+ $token
+ ->expects($this->at(3))
+ ->method('getRememberMe')
+ ->willReturn(IToken::DO_NOT_REMEMBER);
$this->config
->expects($this->exactly(2))
->method('getSystemValue')
$newToken->setName('MyTokenName');
$newToken->setToken(hash('sha512', 'newId' . 'MyInstanceSecret'));
$newToken->setType(IToken::TEMPORARY_TOKEN);
+ $newToken->setRemember(IToken::DO_NOT_REMEMBER);
$newToken->setLastActivity(1313131);
$this->mapper
->expects($this->at(1))
->expects($this->at(4))
->method('getName')
->willReturn('MyTokenName');
+ $token
+ ->expects($this->at(3))
+ ->method('getRememberMe')
+ ->willReturn(IToken::REMEMBER);
$this->crypto
->expects($this->any(0))
->method('decrypt')
$newToken->setName('MyTokenName');
$newToken->setToken(hash('sha512', 'newId' . 'MyInstanceSecret'));
$newToken->setType(IToken::TEMPORARY_TOKEN);
+ $newToken->setRemember(IToken::REMEMBER);
$newToken->setLastActivity(1313131);
$newToken->setPassword('EncryptedPassword');
$this->mapper
->expects($this->at(1))
->method('insert')
- ->with($newToken);
+ ->with($this->equalTo($newToken));
$this->tokenProvider->renewSessionToken('oldId', 'newId');
}