Пример #1
0
 public function testInvalidCodeWrongIP()
 {
     CSRF::setSecret(uniqid(true));
     $_SERVER['REMOTE_ADDR'] = '8.8.8.8';
     $code = CSRF::generate();
     $_SERVER['REMOTE_ADDR'] = '8.8.4.4';
     $this->assertFalse(CSRF::verify($code));
 }