diff --git a/tests/Bus/BusBatchTest.php b/tests/Bus/BusBatchTest.php index 9a5d2c47f9ba..c58d87473ca2 100644 --- a/tests/Bus/BusBatchTest.php +++ b/tests/Bus/BusBatchTest.php @@ -311,17 +311,11 @@ public function test_chain_can_be_added_to_batch() $batch = $this->createTestBatch($queue); - $chainHeadJob = new class implements ShouldQueue { - use Dispatchable, InteractsWithQueue, Queueable, SerializesModels, Batchable; - }; + $chainHeadJob = new ChainHeadJob(); - $secondJob = new class implements ShouldQueue { - use Dispatchable, InteractsWithQueue, Queueable, SerializesModels, Batchable; - }; + $secondJob = new SecondTestJob(); - $thirdJob = new class implements ShouldQueue { - use Dispatchable, InteractsWithQueue, Queueable, SerializesModels, Batchable; - }; + $thirdJob = new ThirdTestJob(); $queue->shouldReceive('connection')->once() ->with('test-connection') @@ -391,3 +385,18 @@ protected function schema() return $this->connection()->getSchemaBuilder(); } } + +class ChainHeadJob implements ShouldQueue +{ + use Dispatchable, Queueable, Batchable; +} + +class SecondTestJob implements ShouldQueue +{ + use Dispatchable, Queueable, Batchable; +} + +class ThirdTestJob implements ShouldQueue +{ + use Dispatchable, Queueable, Batchable; +}