From 4b8a9a5189a625bf99fedec7fd31f6e146410a14 Mon Sep 17 00:00:00 2001 From: emkael Date: Thu, 26 Apr 2018 01:00:12 +0200 Subject: Update FB API library --- .../tests/FacebookClientTest.php | 40 +++++++--------------- 1 file changed, 13 insertions(+), 27 deletions(-) (limited to 'lib/facebook-graph-sdk/tests/FacebookClientTest.php') diff --git a/lib/facebook-graph-sdk/tests/FacebookClientTest.php b/lib/facebook-graph-sdk/tests/FacebookClientTest.php index 6e9bb6c..9a08fb6 100644 --- a/lib/facebook-graph-sdk/tests/FacebookClientTest.php +++ b/lib/facebook-graph-sdk/tests/FacebookClientTest.php @@ -1,6 +1,6 @@ fbApp = new FacebookApp('id', 'shhhh!'); $this->fbClient = new FacebookClient(new MyFooClientHandler()); @@ -94,7 +72,7 @@ class FacebookClientTest extends \PHPUnit_Framework_TestCase $client = new FacebookClient($handler); $httpHandler = $client->getHttpClientHandler(); - $this->assertInstanceOf('Facebook\Tests\MyFooClientHandler', $httpHandler); + $this->assertInstanceOf('Facebook\Tests\Fixtures\MyFooClientHandler', $httpHandler); } public function testTheHttpClientWillFallbackToDefault() @@ -218,6 +196,14 @@ class FacebookClientTest extends \PHPUnit_Framework_TestCase $this->assertContains('multipart/form-data; boundary=', $headersSent['Content-Type']); } + public function testAFacebookRequestValidatesTheAccessTokenWhenOneIsNotProvided() + { + $this->setExpectedException('Facebook\Exceptions\FacebookSDKException'); + + $fbRequest = new FacebookRequest($this->fbApp, null, 'GET', '/foo'); + $this->fbClient->sendRequest($fbRequest); + } + /** * @group integration */ -- cgit v1.2.3