diff --git a/src/Illuminate/Support/Testing/Fakes/QueueFake.php b/src/Illuminate/Support/Testing/Fakes/QueueFake.php index 960a776eaea4..a231d6c0a4c5 100644 --- a/src/Illuminate/Support/Testing/Fakes/QueueFake.php +++ b/src/Illuminate/Support/Testing/Fakes/QueueFake.php @@ -146,10 +146,9 @@ protected function assertPushedWithChainOfClasses($job, $expectedChain, $callbac */ protected function isChainOfObjects($chain) { - return collect($chain)->count() == collect($chain) - ->filter(function ($job) { - return is_object($job); - })->count(); + return ! collect($chain)->contains(function ($job) { + return ! is_object($job); + }); } /**