Skip to content

Commit

Permalink
Use test job classes to fix seralization issue
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Ullyott <ullyott.kevin@gmail.com>
  • Loading branch information
Orrison committed Oct 1, 2020
1 parent f82202c commit 71745f4
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions tests/Bus/BusBatchTest.php
Expand Up @@ -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')
Expand Down Expand Up @@ -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;
}

0 comments on commit 71745f4

Please sign in to comment.