/**
  * @test
  * @expectedException Meng\Soap\HttpBinding\RequestException
  */
 public function requestBindingFailed()
 {
     $interpreter = new Interpreter(null, ['uri' => '', 'location' => '']);
     $builderMock = $this->getMockBuilder('Meng\\Soap\\HttpBinding\\RequestBuilder')->setMethods(['getSoapHttpRequest'])->getMock();
     $builderMock->method('getSoapHttpRequest')->willThrowException(new RequestException());
     $httpBinding = new HttpBinding($interpreter, $builderMock);
     $httpBinding->request('some-function', []);
 }
Ejemplo n.º 2
0
 private function parseResponse(HttpBinding $httpBinding, ResponseInterface $response, $name, &$outputHeaders)
 {
     try {
         return $httpBinding->response($response, $name, $outputHeaders);
     } finally {
         $response->getBody()->close();
     }
 }