add() public method

Adds new headers the current HTTP headers set.
public add ( array $headers )
$headers array An array of HTTP headers
 /**
  * @return \Symfony\Component\HttpFoundation\Request
  */
 private function createRequestMock(array $headers = null)
 {
     $headers = $this->mergeHeaders($headers);
     $headerBag = new HeaderBag();
     $headerBag->add($headers);
     $fakeReq = $this->getMockBuilder('Symfony\\Component\\HttpFoundation\\Request')->disableOriginalConstructor()->getMock();
     $fakeReq->headers = $headerBag;
     return $fakeReq;
 }