Skip to content

Commit ce63f82

Browse files
committed
update fakes
1 parent 57b985c commit ce63f82

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

src/Illuminate/Bus/UpdatedBatchJobCounts.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class UpdatedBatchJobCounts
2525
* @param int $failedJobs
2626
* @return void
2727
*/
28-
public function __construct(int $pendingJobs, int $failedJobs)
28+
public function __construct(int $pendingJobs = 0, int $failedJobs = 0)
2929
{
3030
$this->pendingJobs = $pendingJobs;
3131
$this->failedJobs = $failedJobs;

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

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use Illuminate\Bus\Batch;
88
use Illuminate\Bus\BatchRepository;
99
use Illuminate\Bus\PendingBatch;
10+
use Illuminate\Bus\UpdatedBatchJobCounts;
1011
use Illuminate\Support\Facades\Facade;
1112
use Illuminate\Support\Str;
1213

@@ -71,22 +72,24 @@ public function incrementTotalJobs(string $batchId, int $amount)
7172
* Decrement the total number of pending jobs for the batch.
7273
*
7374
* @param string $batchId
74-
* @return int|null
75+
* @param string $jobId
76+
* @return \Illuminate\Bus\UpdatedBatchJobCounts
7577
*/
76-
public function decrementPendingJobs(string $batchId)
78+
public function decrementPendingJobs(string $batchId, string $jobId)
7779
{
78-
return 0;
80+
return new UpdatedBatchJobCounts;
7981
}
8082

8183
/**
8284
* Increment the total number of failed jobs for the batch.
8385
*
8486
* @param string $batchId
85-
* @return int|null
87+
* @param string $jobId
88+
* @return \Illuminate\Bus\UpdatedBatchJobCounts
8689
*/
87-
public function incrementFailedJobs(string $batchId)
90+
public function incrementFailedJobs(string $batchId, string $jobId)
8891
{
89-
return 0;
92+
return new UpdatedBatchJobCounts;
9093
}
9194

9295
/**

0 commit comments

Comments
 (0)