예제 #1
0
파일: tests.php 프로젝트: khk0613/YHK
 public function testGetUserFromSignedRequest()
 {
     $facebook = new TransientFacebook(array('appId' => self::APP_ID, 'secret' => self::SECRET));
     $_REQUEST['signed_request'] = self::kValidSignedRequest();
     $this->assertEquals('499834690', $facebook->getUser(), 'Failed to get user ID from a valid signed request.');
 }
예제 #2
0
 public function testDisallowSignedRequest()
 {
     $facebook = new TransientFacebook(array('appId' => self::APP_ID, 'secret' => self::SECRET, 'allowSignedRequest' => false));
     $_REQUEST['signed_request'] = self::kValidSignedRequest();
     $this->assertEquals(0, $facebook->getUser(), 'Should not have received valid user from signed_request.');
 }