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.'); }
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.'); }