File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -304,6 +304,28 @@ public function testCreatingANewRequestWillDefaultToTheProperConfig()
304
304
);
305
305
}
306
306
307
+ public function testCreatingANewBatchRequestWillDefaultToTheProperConfig ()
308
+ {
309
+ $ config = array_merge ($ this ->config , [
310
+ 'default_access_token ' => 'foo_token ' ,
311
+ 'enable_beta_mode ' => true ,
312
+ 'default_graph_version ' => 'v1337 ' ,
313
+ ]);
314
+ $ fb = new Facebook ($ config );
315
+
316
+ $ batchRequest = $ fb ->newBatchRequest ();
317
+ $ this ->assertEquals ('1337 ' , $ batchRequest ->getApp ()->getId ());
318
+ $ this ->assertEquals ('foo_secret ' , $ batchRequest ->getApp ()->getSecret ());
319
+ $ this ->assertEquals ('foo_token ' , (string )$ batchRequest ->getAccessToken ());
320
+ $ this ->assertEquals ('v1337 ' , $ batchRequest ->getGraphVersion ());
321
+ $ this ->assertEquals (
322
+ FacebookClient::BASE_GRAPH_URL_BETA ,
323
+ $ fb ->getClient ()->getBaseGraphUrl ()
324
+ );
325
+ $ this ->assertInstanceOf ('Facebook\FacebookBatchRequest ' , $ batchRequest );
326
+ $ this ->assertEquals (0 , count ($ batchRequest ->getRequests ()));
327
+ }
328
+
307
329
public function testCanInjectCustomHandlers ()
308
330
{
309
331
$ config = array_merge ($ this ->config , [
You can’t perform that action at this time.
0 commit comments