shouldReceive('sendPasswordResetCode') ->once() ->with(10, 'tenant-test', PasswordResetRequested::CHANNEL_STOREFRONT) ->andThrow($exception); $this->app->instance(NotificationMailService::class, $mailService); $this->expectExceptionObject($exception); (new SendPasswordResetEmail)->handle( new PasswordResetRequested(10, 'tenant-test'), ); } }