From b573ee655896dcf10b4154065117f4f9c03a6663 Mon Sep 17 00:00:00 2001 From: parth gohil <4966579+parth391@users.noreply.github.com> Date: Sat, 8 Mar 2025 14:23:36 +0530 Subject: [PATCH] Fix missing return in `assertOnlyInvalid` --- src/Illuminate/Testing/TestResponse.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Illuminate/Testing/TestResponse.php b/src/Illuminate/Testing/TestResponse.php index e6d75c13e37f..a792bdd298cf 100644 --- a/src/Illuminate/Testing/TestResponse.php +++ b/src/Illuminate/Testing/TestResponse.php @@ -1405,6 +1405,8 @@ public function assertOnlyInvalid($errors = null, $errorBag = 'default', $respon count($unexpectedErrorKeys) === 0, 'Response has unexpected validation errors: '.collect($unexpectedErrorKeys)->keys()->map(fn ($key) => "'{$key}'")->join(', ') ); + + return $this; } /**