validateActionToken() public méthode

See also: validate_action_token
public validateActionToken ( $visible_errors = true, $token = null, $ts = null )
Exemple #1
0
 public function testCanNotValidateTokenAfterSessionExpiry()
 {
     $dt = new \DateTime();
     $this->actions->setCurrentTime($dt);
     $timeout = $this->actions->getActionTokenTimeout();
     $timestamp = $dt->getTimestamp();
     $token = $this->actions->generateActionToken($timestamp);
     _elgg_services()->session->invalidate();
     _elgg_services()->session->start();
     $this->assertFalse($this->actions->validateActionToken(false, $token, $timestamp));
 }