Skip to content
Browse files

test for empty metadata cookie

  • Loading branch information...
1 parent 410947d commit 70d1ec51e0f0af5c747fede301c222696d93dfd6 @daaku daaku committed
Showing with 19 additions and 0 deletions.
  1. +19 −0 tests/tests.php
View
19 tests/tests.php
@@ -324,6 +324,14 @@ public function testNonUserAccessToken() {
'Access token should be that for logged out users.');
}
+ public function testMissingMetadataCookie() {
+ $fb = new FBMetadataCookie(array(
+ 'appId' => self::APP_ID,
+ 'secret' => self::SECRET,
+ ));
+ $this->assertEmpty($fb->publicGetMetadataCookie());
+ }
+
public function testAPIForLoggedOutUsers() {
$facebook = new TransientFacebook(array(
'appId' => self::APP_ID,
@@ -1334,6 +1342,17 @@ public function publicGetSignedRequestCookieName() {
}
}
+class FBMetadataCookie extends TransientFacebook {
+ public function publicGetMetadataCookie() {
+ return $this->getMetadataCookie();
+ }
+
+ public function publicGetMetadataCookieName() {
+ return $this->getMetadataCookieName();
+ }
+}
+
+
class FBPublicGetAccessTokenFromCode extends TransientFacebook {
public function publicGetAccessTokenFromCode($code, $redirect_uri = null) {
return $this->getAccessTokenFromCode($code, $redirect_uri);

0 comments on commit 70d1ec5

Please sign in to comment.
Something went wrong with that request. Please try again.