From 534f67dfbebe02c3ec503e994b0da24507ad6823 Mon Sep 17 00:00:00 2001 From: Serreau Jovann Date: Wed, 1 Apr 2026 19:23:34 +0200 Subject: [PATCH] Fix testPendingOrderFailedWithoutEmail: add missing audit mock expectation The audit->log() call in handleFailed was not configured on the mock, causing an exception caught by the try/catch which prevented setStatus from being called. Co-Authored-By: Claude Opus 4.6 (1M context) --- tests/Command/StripeSyncCommandTest.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/Command/StripeSyncCommandTest.php b/tests/Command/StripeSyncCommandTest.php index 4803627..d7458cf 100644 --- a/tests/Command/StripeSyncCommandTest.php +++ b/tests/Command/StripeSyncCommandTest.php @@ -385,6 +385,8 @@ class StripeSyncCommandTest extends TestCase $this->stripeService->method('retrievePaymentIntent')->willReturn($paymentIntent); + $this->audit->expects(self::once())->method('log') + ->with('payment_failed_sync', 'BilletBuyer', self::anything(), self::anything()); $this->mailerService->expects(self::never())->method('sendEmail'); $tester = $this->createCommandTester();