public function testAVideoCanBeAddedToParams()
 {
     $myFile = new FacebookVideo(__DIR__ . '/foo.txt');
     $params = ['name' => 'Foo Bar', 'source' => $myFile];
     $app = new FacebookApp('123', 'foo_secret');
     $request = new FacebookRequest($app, 'foo_token', 'POST', '/foo/videos', $params);
     $actualParams = $request->getParams();
     $this->assertTrue($request->containsFileUploads());
     $this->assertTrue($request->containsVideoUploads());
     $this->assertTrue(!isset($actualParams['source']));
     $this->assertEquals('Foo Bar', $actualParams['name']);
 }
 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);
 }