/** * @throws \InvalidArgumentException * * @return MockInterface */ private function mockStripeCharge() : MockInterface { if ($this->mockStripeCharge === null) { $this->mockStripeCharge = Mockery::mock(Charge::class); $this->mockStripeCharge->shouldIgnoreMissing()->asUndefined(); app()->extend(Charge::class, function () { return $this->mockStripeCharge; }); } return $this->mockStripeCharge; }