File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
src/Illuminate/Support/Testing/Fakes Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change 4
4
5
5
use Carbon \CarbonImmutable ;
6
6
use Closure ;
7
- use Illuminate \Bus \Batch ;
8
7
use Illuminate \Bus \BatchRepository ;
9
8
use Illuminate \Bus \PendingBatch ;
10
9
use Illuminate \Bus \UpdatedBatchJobCounts ;
11
- use Illuminate \Support \Facades \Facade ;
12
10
use Illuminate \Support \Str ;
13
11
14
12
class BatchRepositoryFake implements BatchRepository
@@ -53,9 +51,7 @@ public function store(PendingBatch $batch)
53
51
{
54
52
$ id = (string ) Str::orderedUuid ();
55
53
56
- $ this ->batches [$ id ] = new Batch (
57
- new QueueFake (Facade::getFacadeApplication ()),
58
- $ this ,
54
+ $ this ->batches [$ id ] = new BatchFake (
59
55
$ id ,
60
56
$ batch ->name ,
61
57
count ($ batch ->jobs ),
@@ -129,7 +125,7 @@ public function markAsFinished(string $batchId)
129
125
public function cancel (string $ batchId )
130
126
{
131
127
if (isset ($ this ->batches [$ batchId ])) {
132
- $ this ->batches [$ batchId ]->cancelledAt = now ();
128
+ $ this ->batches [$ batchId ]->cancel ();
133
129
}
134
130
}
135
131
You can’t perform that action at this time.
0 commit comments