/** * @test */ public function itShouldThrowAClientExceptionWhenGettingAnOrder() { $request = m::mock('GuzzleHttp\\Message\\Request'); $this->httpClient->shouldReceive('get')->once()->andThrow(new HttpClientException('Something happened', $request)); $this->setExpectedException('GingerPayments\\Payment\\Client\\ClientException'); $this->client->getOrder('123456'); }