private function transportFail(InvocationMatcher $matcher = null) { $matcher = $matcher ?: $this->once(); $this->transport->expects($matcher)->method('send')->willThrowException($this->exception); }