/**
  * @expectedException \Facebook\Exceptions\FacebookSDKException
  */
 public function testThrowsExceptionOnClientError()
 {
     $this->streamMock->shouldReceive('streamContextCreate')->once()->andReturn(null);
     $this->streamMock->shouldReceive('getResponseHeaders')->once()->andReturn(null);
     $this->streamMock->shouldReceive('fileGetContents')->once()->with('http://foo.com/')->andReturn(false);
     $this->streamClient->send('http://foo.com/', 'GET', 'foo_body', [], 60);
 }
 public function testCanGetHttpStatusCodeFromResponseHeader()
 {
     $http_code = FacebookStreamHttpClient::getStatusCodeFromHeader('HTTP/1.1 123 Foo Response');
     $this->assertEquals('123', $http_code);
 }