public function testGenerateTokenWithDefault()
 {
     $this->random->expects($this->once())->method('generate')->with(32)->willReturn('12345678901234567890123456789012');
     $this->assertSame('12345678901234567890123456789012', $this->csrfTokenGenerator->generateToken(32));
 }
 /**
  * Invalidates any current token and sets a new one.
  *
  * @return CsrfToken
  */
 public function refreshToken()
 {
     $value = $this->tokenGenerator->generateToken();
     $this->sessionStorage->setToken($value);
     return new CsrfToken($value);
 }