ParagonIE\AntiCSRF\AntiCSRF::getSessionIndex PHP Method

getSessionIndex() public method

public getSessionIndex ( ) : string
return string
    public function getSessionIndex() : string
    {
        return $this->sessionIndex;
    }

Usage Example

Exemplo n.º 1
0
 /**
  * @covers \Resonantcore\AntiCSRF\AntiCSRF::getTokenArray()
  */
 public function testGetTokenArray()
 {
     @session_start();
     $csrft = new AntiCSRF();
     $result = $csrft->getTokenArray();
     $this->assertFalse(empty($csrft->session[$csrft->getSessionIndex()]));
     $this->assertSame([$csrft->getFormIndex(), $csrft->getFormToken()], \array_keys($result));
 }