Skip to content

Commit 420c008

Browse files
committed
test quoted metadata cookie
1 parent 7b7dd97 commit 420c008

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/tests.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,17 @@ public function testMetadataCookie() {
352352
$this->assertEquals(array($key => $val), $fb->publicGetMetadataCookie());
353353
}
354354

355+
public function testQuotedMetadataCookie() {
356+
$fb = new FBMetadataCookie(array(
357+
'appId' => self::APP_ID,
358+
'secret' => self::SECRET,
359+
));
360+
$key = 'foo';
361+
$val = '42';
362+
$_COOKIE[$fb->publicGetMetadataCookieName()] = "\"$key=$val\"";
363+
$this->assertEquals(array($key => $val), $fb->publicGetMetadataCookie());
364+
}
365+
355366
public function testAPIForLoggedOutUsers() {
356367
$facebook = new TransientFacebook(array(
357368
'appId' => self::APP_ID,

0 commit comments

Comments
 (0)