/** * Test Ensure a request with a different exception type is thrown as an exception * * @expectedException \Exception */ public function testEnsurePostNonRequestExceptionIsThrownAsAnException() { $url = 'droplets/'; $options = ['headers' => ['Content-type' => 'application/json']]; $this->mockClient->expects($this->once())->method('post')->with($url, $options)->will($this->throwException(new \Exception())); $client = new Client(); $client->setHttpClient($this->mockClient); $client->post($url, $options); }