TestAssignTasks.php 840 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. namespace Tests\Services\BatchService;
  3. use App\Batch;
  4. use App\Services\BatchService;
  5. use Tests\TestCase;
  6. class TestAssignTasks extends TestCase
  7. {
  8. // use RefreshDatabase;
  9. /** @var BatchService $service */
  10. private $service;
  11. private $data = [];
  12. public function setUp(): void
  13. {
  14. parent::setUp();
  15. $this->service = app('BatchService');
  16. $batches = factory(Batch::class,3)->create();
  17. $this->data['batches'] = $batches;
  18. }
  19. /**
  20. * @test
  21. */
  22. public function gotShouldProcessingBatches()
  23. {
  24. $this->assertTrue(true);
  25. }
  26. public function tearDown(): void
  27. {
  28. Batch::query()
  29. ->whereIn('id',data_get($this->data['batches'],'*.id'))
  30. ->delete();
  31. parent::tearDown(); // TODO: Change the autogenerated stub
  32. }
  33. }