示例#1
0
 public function testPersistentCSRFStateWithSharedSession()
 {
     $_SERVER['HTTP_HOST'] = 'fbrell.com';
     $facebook = new FBCode(array('appId' => self::APP_ID, 'secret' => self::SECRET, 'sharedSession' => true));
     $facebook->setCSRFStateToken();
     $code = $facebook->getCSRFStateToken();
     $facebook = new FBCode(array('appId' => self::APP_ID, 'secret' => self::SECRET, 'sharedSession' => true));
     $this->assertEquals($code, $facebook->publicGetState(), 'Persisted CSRF state token not loaded correctly with shared session');
 }