@@ -30,7 +30,8 @@ public function test_pending_batch_may_be_configured_and_dispatched()
30
30
31
31
$ container ->instance (Dispatcher::class, $ eventDispatcher );
32
32
33
- $ job = new class {
33
+ $ job = new class
34
+ {
34
35
use Batchable;
35
36
};
36
37
@@ -70,7 +71,8 @@ public function test_batch_is_deleted_from_storage_if_exception_thrown_during_ba
70
71
71
72
$ container = new Container ;
72
73
73
- $ job = new class {
74
+ $ job = new class
75
+ {
74
76
};
75
77
76
78
$ pendingBatch = new PendingBatch ($ container , new Collection ([$ job ]));
@@ -100,7 +102,8 @@ public function test_batch_is_dispatched_when_dispatchif_is_true()
100
102
$ eventDispatcher ->shouldReceive ('dispatch ' )->once ();
101
103
$ container ->instance (Dispatcher::class, $ eventDispatcher );
102
104
103
- $ job = new class {
105
+ $ job = new class
106
+ {
104
107
use Batchable;
105
108
};
106
109
@@ -125,7 +128,8 @@ public function test_batch_is_not_dispatched_when_dispatchif_is_false()
125
128
$ eventDispatcher ->shouldNotReceive ('dispatch ' );
126
129
$ container ->instance (Dispatcher::class, $ eventDispatcher );
127
130
128
- $ job = new class {
131
+ $ job = new class
132
+ {
129
133
use Batchable;
130
134
};
131
135
@@ -147,7 +151,8 @@ public function test_batch_is_dispatched_when_dispatchunless_is_false()
147
151
$ eventDispatcher ->shouldReceive ('dispatch ' )->once ();
148
152
$ container ->instance (Dispatcher::class, $ eventDispatcher );
149
153
150
- $ job = new class {
154
+ $ job = new class
155
+ {
151
156
use Batchable;
152
157
};
153
158
@@ -172,7 +177,8 @@ public function test_batch_is_not_dispatched_when_dispatchunless_is_true()
172
177
$ eventDispatcher ->shouldNotReceive ('dispatch ' );
173
178
$ container ->instance (Dispatcher::class, $ eventDispatcher );
174
179
175
- $ job = new class {
180
+ $ job = new class
181
+ {
176
182
use Batchable;
177
183
};
178
184
@@ -195,7 +201,8 @@ public function test_batch_before_event_is_called()
195
201
196
202
$ container ->instance (Dispatcher::class, $ eventDispatcher );
197
203
198
- $ job = new class {
204
+ $ job = new class
205
+ {
199
206
use Batchable;
200
207
};
201
208
@@ -220,7 +227,8 @@ public function test_batch_before_event_is_called()
220
227
221
228
public function test_it_throws_exception_if_batched_job_is_not_batchable (): void
222
229
{
223
- $ nonBatchableJob = new class {
230
+ $ nonBatchableJob = new class
231
+ {
224
232
};
225
233
226
234
$ this ->expectException (RuntimeException::class);
@@ -236,7 +244,8 @@ public function test_it_throws_an_exception_if_batched_job_contains_batch_with_n
236
244
new PendingBatch (
237
245
$ container ,
238
246
new Collection (
239
- [new PendingBatch ($ container , new Collection ([new BatchableJob , new class {
247
+ [new PendingBatch ($ container , new Collection ([new BatchableJob , new class
248
+ {
240
249
}]))]
241
250
)
242
251
);
0 commit comments