diff options
author | emkael <emkael@tlen.pl> | 2018-04-26 01:00:12 +0200 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2018-04-26 01:00:12 +0200 |
commit | 4b8a9a5189a625bf99fedec7fd31f6e146410a14 (patch) | |
tree | a29759d5f0f0c29f07c89c59f6b5cf38407d1470 /lib/facebook-graph-sdk/tests/Helpers/FacebookSignedRequestFromInputHelperTest.php | |
parent | ab82beef33f4c196383a81213dcdff4ebe9447ae (diff) |
Update FB API library
Diffstat (limited to 'lib/facebook-graph-sdk/tests/Helpers/FacebookSignedRequestFromInputHelperTest.php')
-rw-r--r-- | lib/facebook-graph-sdk/tests/Helpers/FacebookSignedRequestFromInputHelperTest.php | 31 |
1 files changed, 4 insertions, 27 deletions
diff --git a/lib/facebook-graph-sdk/tests/Helpers/FacebookSignedRequestFromInputHelperTest.php b/lib/facebook-graph-sdk/tests/Helpers/FacebookSignedRequestFromInputHelperTest.php index d9bd803..ffaa5e3 100644 --- a/lib/facebook-graph-sdk/tests/Helpers/FacebookSignedRequestFromInputHelperTest.php +++ b/lib/facebook-graph-sdk/tests/Helpers/FacebookSignedRequestFromInputHelperTest.php @@ -1,6 +1,6 @@ <?php /** - * Copyright 2014 Facebook, Inc. + * Copyright 2017 Facebook, Inc. * * You are hereby granted a non-exclusive, worldwide, royalty-free license to * use, copy, modify, and distribute this software in source code or binary @@ -24,31 +24,8 @@ namespace Facebook\Tests\Helpers; use Facebook\FacebookApp; -use Facebook\FacebookClient; -use Facebook\FacebookRequest; -use Facebook\FacebookResponse; -use Facebook\Helpers\FacebookSignedRequestFromInputHelper; - -class FooSignedRequestHelper extends FacebookSignedRequestFromInputHelper -{ - public function getRawSignedRequest() - { - return null; - } -} - -class FooSignedRequestHelperFacebookClient extends FacebookClient -{ - public function sendRequest(FacebookRequest $request) - { - $params = $request->getParams(); - $rawResponse = json_encode([ - 'access_token' => 'foo_access_token_from:' . $params['code'], - ]); - - return new FacebookResponse($request, $rawResponse, 200); - } -} +use Facebook\Tests\Fixtures\FooSignedRequestHelper; +use Facebook\Tests\Fixtures\FooSignedRequestHelperFacebookClient; class FacebookSignedRequestFromInputHelperTest extends \PHPUnit_Framework_TestCase { @@ -61,7 +38,7 @@ class FacebookSignedRequestFromInputHelperTest extends \PHPUnit_Framework_TestCa public $rawSignedRequestAuthorizedWithCode = 'oBtmZlsFguNQvGRETDYQQu1-PhwcArgbBBEK4urbpRA=.eyJjb2RlIjoiZm9vX2NvZGUiLCJhbGdvcml0aG0iOiJITUFDLVNIQTI1NiIsImlzc3VlZF9hdCI6MTQwNjMxMDc1MiwidXNlcl9pZCI6IjEyMyJ9'; public $rawSignedRequestUnauthorized = 'KPlyhz-whtYAhHWr15N5TkbS_avz-2rUJFpFkfXKC88=.eyJhbGdvcml0aG0iOiJITUFDLVNIQTI1NiIsImlzc3VlZF9hdCI6MTQwMjU1MTA4Nn0='; - public function setUp() + protected function setUp() { $app = new FacebookApp('123', 'foo_app_secret'); $this->helper = new FooSignedRequestHelper($app, new FooSignedRequestHelperFacebookClient()); |