AssignTasksTest.php 807 B

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