/**
  * @param \Phpro\MvcAuthToken\Adapter\AdapterInterface $adapter
  */
 protected function mockAdapter($adapter)
 {
     $adapter->validateNonce(Argument::any())->willReturn(true);
     $adapter->validateTimestamp(Argument::any())->willReturn(true);
     $adapter->validateToken(Argument::any())->willReturn(true);
     $this->setAdapter($adapter);
 }
 /**
  * @return string|\Zf\MvcAuth\Identity\IdentityInterface
  */
 public function getUserId()
 {
     $token = $this->getToken();
     return $this->adapter->getUserId($token);
 }