From 36abfccc4854bba457ecf3075299c01b9550e7e8 Mon Sep 17 00:00:00 2001 From: Simon Hamp Date: Tue, 20 Oct 2026 19:16:53 +0100 Subject: [PATCH] Keep pin test throwing on newer Livewire Livewire 4.4.6 (commit 3a0ef9f9fb) added ModelNotFoundException to the exceptions its test request broker passes to the app's exception handler, so a missing model now comes back as a 404 response instead of being thrown. only_internal_notes_can_be_pinned expected the exception and failed once Livewire was bumped past the locked 4.3.3. Turning off exception handling in the test makes the broker's handler fall through to Laravel's rethrowing one, so the exception surfaces on both the locked and newer versions. Filament was not involved. Co-Authored-By: Claude Opus 5.5 --- tests/Feature/SupportTicketTest.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/Feature/SupportTicketTest.php b/tests/Feature/SupportTicketTest.php index 1bf7bfece..828fd6ae9 100644 --- a/tests/Feature/SupportTicketTest.php +++ b/tests/Feature/SupportTicketTest.php @@ -1233,6 +1233,8 @@ public function only_internal_notes_can_be_pinned(): void 'note' => false, ]); + // Livewire 4.4.6+ turns ModelNotFoundException into a 404 response in tests unless exception handling is off. + $this->withoutExceptionHandling(); $this->expectException(ModelNotFoundException::class); Livewire::actingAs($admin)