Skip to content

Commit 049081d

Browse files
committed
Moved things into directories to allow for easier pear packaging. Closes #13
1 parent 0b3776f commit 049081d

File tree

4 files changed

+16
-4
lines changed

4 files changed

+16
-4
lines changed

example.php renamed to examples/example.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
require './facebook.php';
3+
require '../src/facebook.php';
44

55
// Create our Application instance.
66
$facebook = new Facebook(array(

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Logged in vs Logged out:
4444
echo '<a href="' . $facebook->getLoginUrl() . '">Login</a>';
4545
}
4646

47-
[examples]: php-sdk/tree/master/index.php
47+
[examples]: php-sdk/tree/master/examples/example.php
4848
[API]: http://developers.facebook.com/docs/api
4949

5050

File renamed without changes.

tests.php renamed to tests/tests.php

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
require './facebook.php';
3+
require 'facebook.php';
44

55
/**
66
* @owner naitik
@@ -424,6 +424,12 @@ public function testLoginStatusURLCustom() {
424424
}
425425

426426
public function testMagicQuotesQueryString() {
427+
if (!get_magic_quotes_gpc()) {
428+
// this test cannot run without get_magic_quotes_gpc(), and the setting
429+
// cannot be modified at runtime, so we're shit out of luck. thanks php.
430+
return;
431+
}
432+
427433
// @style-override allow json_encode call
428434
$_GET['session'] = addslashes(json_encode(self::$VALID_EXPIRED_SESSION));
429435
$facebook = new Facebook(array(
@@ -437,6 +443,12 @@ public function testMagicQuotesQueryString() {
437443
}
438444

439445
public function testMagicQuotesCookie() {
446+
if (!get_magic_quotes_gpc()) {
447+
// this test cannot run without get_magic_quotes_gpc(), and the setting
448+
// cannot be modified at runtime, so we're shit out of luck. thanks php.
449+
return;
450+
}
451+
440452
$cookieName = 'fbs_' . self::APP_ID;
441453
$session = self::$VALID_EXPIRED_SESSION;
442454
$_COOKIE[$cookieName] = addslashes('"' . http_build_query($session) . '"');
@@ -505,7 +517,7 @@ public function testSecureCurrentUrlWithNonDefaultPort() {
505517
public function testIgnoreArgSeparatorForCookie() {
506518
$cookieName = 'fbs_' . self::APP_ID;
507519
$session = self::$VALID_EXPIRED_SESSION;
508-
$_COOKIE[$cookieName] = addslashes('"' . http_build_query($session) . '"');
520+
$_COOKIE[$cookieName] = '"' . http_build_query($session) . '"';
509521
ini_set('arg_separator.output', '&amp;');
510522
// ensure we're testing what we expect
511523
$this->assertEquals(http_build_query(array('a' => 1, 'b' => 2)),

0 commit comments

Comments
 (0)