From 210a98ac7c605daf6de1f7ebc5d901e53167ecdc Mon Sep 17 00:00:00 2001 From: Damilola Olowookere Date: Fri, 25 Oct 2024 21:05:29 +0100 Subject: [PATCH] Add new architecture test for Flutterwave payment handler --- src/Services/PaymentHandlers/Flutterwave.php | 2 -- tests/ArchitectureTest.php | 11 +++++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 tests/ArchitectureTest.php diff --git a/src/Services/PaymentHandlers/Flutterwave.php b/src/Services/PaymentHandlers/Flutterwave.php index df66978..01c8f0d 100644 --- a/src/Services/PaymentHandlers/Flutterwave.php +++ b/src/Services/PaymentHandlers/Flutterwave.php @@ -81,8 +81,6 @@ protected function sendUserToPaymentGateway(string $redirect_or_callback_url, Pa $payment->save(); header('Location: ' . $url); - - exit; } public function confirmResponseCanBeHandledAndUpdateDatabaseWithTransactionOutcome(Request $paymentGatewayServerResponse): ?Payment diff --git a/tests/ArchitectureTest.php b/tests/ArchitectureTest.php new file mode 100644 index 0000000..3eb510a --- /dev/null +++ b/tests/ArchitectureTest.php @@ -0,0 +1,11 @@ +expect('Damms005\LaravelMultipay') + ->not->toUse(['die', 'dd', 'dump']); + + arch()->preset()->php(); + arch()->preset()->laravel()->ignoring('Damms005\LaravelMultipay\LaravelMultipayServiceProvider'); + arch()->preset()->security()->ignoring('md5'); +});