public function testExceptionPropagatesOnConversionToStdClass() { $this->setExpectedException('Credibility\\LaravelCybersource\\Exceptions\\CybersourceConnectionException'); $this->factory->shouldReceive('getInstance')->with(m::any('array'))->once()->andThrow(new \SoapFault('test-code', 'test-string')); $this->mockClient->shouldReceive('addWSSEToken')->never(); $request = $this->getCybersourceSOAPModel(); $this->soapRequester->convertToStdClass($request); }