From d2353da6b9a56ad34fee3cd0b06a172fc3ab84ec Mon Sep 17 00:00:00 2001 From: Evan Burrell Date: Wed, 4 Jan 2023 11:41:53 +0000 Subject: [PATCH] Support Lazy Collections in BatchFake --- src/Illuminate/Support/Testing/Fakes/BatchFake.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Illuminate/Support/Testing/Fakes/BatchFake.php b/src/Illuminate/Support/Testing/Fakes/BatchFake.php index f6b08cbd6993..607168ba9928 100644 --- a/src/Illuminate/Support/Testing/Fakes/BatchFake.php +++ b/src/Illuminate/Support/Testing/Fakes/BatchFake.php @@ -79,7 +79,9 @@ public function fresh() */ public function add($jobs) { - $this->added[] = array_merge($this->added, $jobs); + foreach ($jobs as $job) { + $this->added[] = $job; + } return $this; }