Esempio n. 1
0
 public function testPerformRequestFuture()
 {
     /** @var \Mockery\Mock $future */
     $future = \Mockery::mock('\\GuzzleHttp\\Ring\\Future\\FutureArrayInterface');
     $future->shouldReceive('wait')->once()->andReturn('the_result');
     // Fake handler
     $handler = function (array $request) use($future) {
         return $future;
     };
     $transport = new Transport($handler, $this->requestBuilder);
     $result = $transport->performRequest('POST', 'and_point');
     $this->assertEquals('the_result', $result);
 }
 /**
  * @return array
  */
 public function performRequest()
 {
     $result = $this->transport->performRequest($this->getMethod(), $this->getURI(), $this->params, $this->getBody(), $this->options);
     return $result;
 }