Skip to content

Commit 9e6cb65

Browse files
authored
add collection wrapping for BatchFake (#47589)
1 parent aa18c13 commit 9e6cb65

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Illuminate/Support/Testing/Fakes/BatchFake.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use Illuminate\Bus\Batch;
77
use Illuminate\Bus\UpdatedBatchJobCounts;
88
use Illuminate\Support\Carbon;
9+
use Illuminate\Support\Collection;
910

1011
class BatchFake extends Batch
1112
{
@@ -79,6 +80,8 @@ public function fresh()
7980
*/
8081
public function add($jobs)
8182
{
83+
$jobs = Collection::wrap($jobs);
84+
8285
foreach ($jobs as $job) {
8386
$this->added[] = $job;
8487
}

0 commit comments

Comments
 (0)