@@ -101,8 +101,8 @@ public function test_jobs_can_be_added_to_the_batch()
101
101
};
102
102
103
103
$ queue ->shouldReceive ('connection ' )->once ()
104
- ->with ('test-connection ' )
105
- ->andReturn ($ connection = m::mock (stdClass::class));
104
+ ->with ('test-connection ' )
105
+ ->andReturn ($ connection = m::mock (stdClass::class));
106
106
107
107
$ connection ->shouldReceive ('bulk ' )->once ()->with (m::on (function ($ args ) use ($ job , $ secondJob ) {
108
108
return
@@ -191,8 +191,8 @@ public function test_successful_jobs_can_be_recorded()
191
191
};
192
192
193
193
$ queue ->shouldReceive ('connection ' )->once ()
194
- ->with ('test-connection ' )
195
- ->andReturn ($ connection = m::mock (stdClass::class));
194
+ ->with ('test-connection ' )
195
+ ->andReturn ($ connection = m::mock (stdClass::class));
196
196
197
197
$ connection ->shouldReceive ('bulk ' )->once ();
198
198
@@ -231,8 +231,8 @@ public function test_failed_jobs_can_be_recorded_while_not_allowing_failures()
231
231
};
232
232
233
233
$ queue ->shouldReceive ('connection ' )->once ()
234
- ->with ('test-connection ' )
235
- ->andReturn ($ connection = m::mock (stdClass::class));
234
+ ->with ('test-connection ' )
235
+ ->andReturn ($ connection = m::mock (stdClass::class));
236
236
237
237
$ connection ->shouldReceive ('bulk ' )->once ();
238
238
@@ -273,8 +273,8 @@ public function test_failed_jobs_can_be_recorded_while_allowing_failures()
273
273
};
274
274
275
275
$ queue ->shouldReceive ('connection ' )->once ()
276
- ->with ('test-connection ' )
277
- ->andReturn ($ connection = m::mock (stdClass::class));
276
+ ->with ('test-connection ' )
277
+ ->andReturn ($ connection = m::mock (stdClass::class));
278
278
279
279
$ connection ->shouldReceive ('bulk ' )->once ();
280
280
@@ -472,26 +472,26 @@ protected function createTestBatch($queue, $allowFailures = false)
472
472
$ repository = new DatabaseBatchRepository (new BatchFactory ($ queue ), DB ::connection (), 'job_batches ' );
473
473
474
474
$ pendingBatch = (new PendingBatch (new Container , collect ()))
475
- ->progress (function (Batch $ batch ) {
476
- $ _SERVER ['__progress.batch ' ] = $ batch ;
477
- $ _SERVER ['__progress.count ' ]++;
478
- })
479
- ->then (function (Batch $ batch ) {
480
- $ _SERVER ['__then.batch ' ] = $ batch ;
481
- $ _SERVER ['__then.count ' ]++;
482
- })
483
- ->catch (function (Batch $ batch , $ e ) {
484
- $ _SERVER ['__catch.batch ' ] = $ batch ;
485
- $ _SERVER ['__catch.exception ' ] = $ e ;
486
- $ _SERVER ['__catch.count ' ]++;
487
- })
488
- ->finally (function (Batch $ batch ) {
489
- $ _SERVER ['__finally.batch ' ] = $ batch ;
490
- $ _SERVER ['__finally.count ' ]++;
491
- })
492
- ->allowFailures ($ allowFailures )
493
- ->onConnection ('test-connection ' )
494
- ->onQueue ('test-queue ' );
475
+ ->progress (function (Batch $ batch ) {
476
+ $ _SERVER ['__progress.batch ' ] = $ batch ;
477
+ $ _SERVER ['__progress.count ' ]++;
478
+ })
479
+ ->then (function (Batch $ batch ) {
480
+ $ _SERVER ['__then.batch ' ] = $ batch ;
481
+ $ _SERVER ['__then.count ' ]++;
482
+ })
483
+ ->catch (function (Batch $ batch , $ e ) {
484
+ $ _SERVER ['__catch.batch ' ] = $ batch ;
485
+ $ _SERVER ['__catch.exception ' ] = $ e ;
486
+ $ _SERVER ['__catch.count ' ]++;
487
+ })
488
+ ->finally (function (Batch $ batch ) {
489
+ $ _SERVER ['__finally.batch ' ] = $ batch ;
490
+ $ _SERVER ['__finally.count ' ]++;
491
+ })
492
+ ->allowFailures ($ allowFailures )
493
+ ->onConnection ('test-connection ' )
494
+ ->onQueue ('test-queue ' );
495
495
496
496
return $ repository ->store ($ pendingBatch );
497
497
}
0 commit comments