Ejemplo n.º 1
0
 /**
  * @covers Amara\OneHydra\Http\HttpRequest::getHeaders
  * @covers Amara\OneHydra\Http\HttpRequest::setHeaders
  */
 public function testSetAndGetHeaders()
 {
     $httpRequest = new HttpRequest();
     $this->assertNull($httpRequest->getHeaders());
     $httpRequest->setHeaders(['test']);
     $this->assertEquals(['test'], $httpRequest->getHeaders());
 }
 /**
  * {@inheritdoc}
  */
 public function build(RequestInterface $request)
 {
     $httpRequest = new HttpRequest();
     $httpRequest->setMethod('get');
     $httpRequest->setParams($this->buildParams($request));
     $httpRequest->setUrl($this->buildServiceUrl($request));
     $httpRequest->setHeaders($this->buildHeaders($request));
     return $httpRequest;
 }