Ejemplo n.º 1
0
 public function testGetHeadersWillAutoAppendETag()
 {
     $app = new FacebookApp('123', 'foo_secret');
     $request = new FacebookRequest($app, null, 'GET', '/foo', [], 'fooETag');
     $headers = $request->getHeaders();
     $expectedHeaders = FacebookRequest::getDefaultHeaders();
     $expectedHeaders['If-None-Match'] = 'fooETag';
     $this->assertEquals($expectedHeaders, $headers);
 }
 private function defaultHeaders()
 {
     $headers = [];
     foreach (FacebookRequest::getDefaultHeaders() as $name => $value) {
         $headers[] = $name . ': ' . $value;
     }
     return $headers;
 }