@@ -50,7 +50,7 @@ public function a_http_request_with_the_handler_url_is_made()
50
50
CloudTasksApi::fake ();
51
51
52
52
// Act
53
- $ this ->dispatch (new SimpleJob () );
53
+ $ this ->dispatch (new SimpleJob );
54
54
55
55
// Assert
56
56
CloudTasksApi::assertTaskCreated (function (Task $ task ): bool {
@@ -65,7 +65,7 @@ public function it_posts_to_the_handler()
65
65
CloudTasksApi::fake ();
66
66
67
67
// Act
68
- $ this ->dispatch (new SimpleJob () );
68
+ $ this ->dispatch (new SimpleJob );
69
69
70
70
// Assert
71
71
CloudTasksApi::assertTaskCreated (function (Task $ task ): bool {
@@ -81,7 +81,7 @@ public function it_posts_to_the_configured_handler_url()
81
81
CloudTasksApi::fake ();
82
82
83
83
// Act
84
- $ this ->dispatch (new SimpleJob () );
84
+ $ this ->dispatch (new SimpleJob );
85
85
86
86
// Assert
87
87
CloudTasksApi::assertTaskCreated (function (Task $ task ): bool {
@@ -98,7 +98,7 @@ public function it_posts_to_the_callback_handler_url()
98
98
CloudTasksQueue::configureHandlerUrlUsing (static fn (SimpleJob $ job ) => 'https://example.com/api/my-custom-route?job= ' .$ job ->id );
99
99
100
100
// Act
101
- $ job = new SimpleJob () ;
101
+ $ job = new SimpleJob ;
102
102
$ job ->id = 1 ;
103
103
$ this ->dispatch ($ job );
104
104
@@ -115,7 +115,7 @@ public function it_posts_the_serialized_job_payload_to_the_handler()
115
115
CloudTasksApi::fake ();
116
116
117
117
// Act
118
- $ this ->dispatch ($ job = new SimpleJob () );
118
+ $ this ->dispatch ($ job = new SimpleJob );
119
119
120
120
// Assert
121
121
CloudTasksApi::assertTaskCreated (function (Task $ task ) use ($ job ): bool {
@@ -135,7 +135,7 @@ public function it_will_set_the_scheduled_time_when_dispatching_later()
135
135
136
136
// Act
137
137
$ inFiveMinutes = now ()->addMinutes (5 );
138
- $ this ->dispatch ((new SimpleJob () )->delay ($ inFiveMinutes ));
138
+ $ this ->dispatch ((new SimpleJob )->delay ($ inFiveMinutes ));
139
139
140
140
// Assert
141
141
CloudTasksApi::assertTaskCreated (function (Task $ task ) use ($ inFiveMinutes ): bool {
@@ -153,8 +153,8 @@ public function it_posts_the_task_the_correct_queue()
153
153
$ closureDisplayName = CallQueuedClosure::create ($ closure )->displayName ();
154
154
155
155
// Act
156
- $ this ->dispatch ((new SimpleJob () ));
157
- $ this ->dispatch ((new FailingJob () )->onQueue ('my-special-queue ' ));
156
+ $ this ->dispatch ((new SimpleJob ));
157
+ $ this ->dispatch ((new FailingJob )->onQueue ('my-special-queue ' ));
158
158
$ this ->dispatch ($ closure );
159
159
$ this ->dispatch ($ closure , 'my-special-queue ' );
160
160
@@ -248,7 +248,7 @@ public function jobs_can_be_released()
248
248
]);
249
249
250
250
// Act
251
- $ this ->dispatch (new JobThatWillBeReleased () )
251
+ $ this ->dispatch (new JobThatWillBeReleased )
252
252
->runAndGetReleasedJob ()
253
253
->run ();
254
254
@@ -305,7 +305,7 @@ public function test_default_backoff()
305
305
Event::fake (JobReleasedAfterException::class);
306
306
307
307
// Act
308
- $ this ->dispatch (new FailingJob () )->run ();
308
+ $ this ->dispatch (new FailingJob )->run ();
309
309
310
310
// Assert
311
311
CloudTasksApi::assertTaskCreated (function (Task $ task ) {
@@ -323,7 +323,7 @@ public function test_backoff_from_queue_config()
323
323
Event::fake (JobReleasedAfterException::class);
324
324
325
325
// Act
326
- $ this ->dispatch (new FailingJob () )->run ();
326
+ $ this ->dispatch (new FailingJob )->run ();
327
327
328
328
// Assert
329
329
CloudTasksApi::assertTaskCreated (function (Task $ task ) {
@@ -341,7 +341,7 @@ public function test_backoff_from_job()
341
341
Event::fake (JobReleasedAfterException::class);
342
342
343
343
// Act
344
- $ failingJob = new FailingJob () ;
344
+ $ failingJob = new FailingJob ;
345
345
$ failingJob ->backoff = 123 ;
346
346
$ this ->dispatch ($ failingJob )->run ();
347
347
@@ -360,7 +360,7 @@ public function test_exponential_backoff_from_job_method()
360
360
CloudTasksApi::fake ();
361
361
362
362
// Act
363
- $ releasedJob = $ this ->dispatch (new FailingJobWithExponentialBackoff () )
363
+ $ releasedJob = $ this ->dispatch (new FailingJobWithExponentialBackoff )
364
364
->runAndGetReleasedJob ();
365
365
$ releasedJob = $ releasedJob ->runAndGetReleasedJob ();
366
366
$ releasedJob ->run ();
@@ -388,7 +388,7 @@ public function test_failing_method_on_job()
388
388
Event::fake (JobOutput::class);
389
389
390
390
// Act
391
- $ this ->dispatch (new FailingJob () )
391
+ $ this ->dispatch (new FailingJob )
392
392
->runAndGetReleasedJob ()
393
393
->runAndGetReleasedJob ()
394
394
->runAndGetReleasedJob ();
@@ -411,7 +411,7 @@ public function test_queue_before_and_after_hooks()
411
411
Queue::after (function (JobProcessed $ event ) {
412
412
event (new JobOutput ('Queue::after: ' .$ event ->job ->payload ()['data ' ]['commandName ' ]));
413
413
});
414
- $ this ->dispatch (new SimpleJob () )->run ();
414
+ $ this ->dispatch (new SimpleJob )->run ();
415
415
416
416
// Assert
417
417
Event::assertDispatched (fn (JobOutput $ event ) => $ event ->output === 'Queue::before:Tests\Support\SimpleJob ' );
@@ -429,7 +429,7 @@ public function test_queue_looping_hook_not_supported_with_this_package()
429
429
Queue::looping (function () {
430
430
event (new JobOutput ('Queue::looping ' ));
431
431
});
432
- $ this ->dispatch (new SimpleJob () )->run ();
432
+ $ this ->dispatch (new SimpleJob )->run ();
433
433
434
434
// Assert
435
435
Event::assertDispatchedTimes (JobOutput::class, times: 1 );
@@ -475,7 +475,7 @@ public function it_adds_a_pre_defined_task_name()
475
475
Str::createUlidsUsingSequence (['01HSR4V9QE2F4T0K8RBAYQ88KE ' ]);
476
476
477
477
// Act
478
- $ this ->dispatch ((new SimpleJob () ));
478
+ $ this ->dispatch ((new SimpleJob ));
479
479
480
480
// Assert
481
481
CloudTasksApi::assertTaskCreated (function (Task $ task ): bool {
@@ -494,7 +494,7 @@ public function headers_can_be_added_to_the_task()
494
494
'X-MyHeader ' => 'MyValue ' ,
495
495
]);
496
496
497
- $ this ->dispatch ((new SimpleJob () ));
497
+ $ this ->dispatch ((new SimpleJob ));
498
498
499
499
// Assert
500
500
CloudTasksApi::assertTaskCreated (function (Task $ task ): bool {
@@ -513,7 +513,7 @@ public function headers_can_be_added_to_the_task_with_job_context()
513
513
'X-MyHeader ' => $ payload ['displayName ' ],
514
514
]);
515
515
516
- $ this ->dispatch ((new SimpleJob () ));
516
+ $ this ->dispatch ((new SimpleJob ));
517
517
518
518
// Assert
519
519
CloudTasksApi::assertTaskCreated (function (Task $ task ): bool {
@@ -529,10 +529,10 @@ public function batched_jobs_with_custom_queue_are_dispatched_on_the_custom_queu
529
529
530
530
// Act
531
531
$ this ->dispatch (Bus::batch ([
532
- tap (new SimpleJob () , function (SimpleJob $ job ) {
532
+ tap (new SimpleJob , function (SimpleJob $ job ) {
533
533
$ job ->queue = 'my-queue1 ' ;
534
534
}),
535
- tap (new SimpleJobWithTimeout () , function (SimpleJob $ job ) {
535
+ tap (new SimpleJobWithTimeout , function (SimpleJob $ job ) {
536
536
$ job ->queue = 'my-queue2 ' ;
537
537
}),
538
538
])->onQueue ('my-batch-queue ' ));
0 commit comments