StationCacheBroadCastTest.php 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. namespace Tests\Services\CacheShelfService;
  3. use App\MaterialBox;
  4. use App\Services\CacheShelfService;
  5. use App\Station;
  6. use App\StationTask;
  7. use App\StationTaskChildren;
  8. use App\StationTaskMaterialBox;
  9. use Tests\TestCase;
  10. class StationCacheBroadCastTest extends TestCase
  11. {
  12. /** @var CacheShelfService $service */
  13. protected $service;
  14. protected $data = [];
  15. protected function setUp(): void
  16. {
  17. parent::setUp();
  18. // $this->service = app(CacheShelfService::class);
  19. // $this->data['parentStation'] = factory(Station::class)->create();
  20. // $this->data['station'] = factory(Station::class)->create(['parent_id' => $this->data['parentStation']]);
  21. // $this->data['materialBox'] = factory(MaterialBox::class)->create();
  22. // $this->service->createStationTask($this->data['station']['code'],$this->data['materialBox']['code']);
  23. }
  24. public function test(){
  25. // 广播测试
  26. $this->assertTrue(true);
  27. // $this->service->_stationCacheBroadCast($this->data['station']['code'],0);
  28. }
  29. protected function tearDown(): void
  30. {
  31. // StationTaskChildren::query()->where('station_task_id',StationTask::query()->where('station_id',$this->data['station']['id'])->first()['id'])->delete();
  32. // StationTaskMaterialBox::query()->where('material_box_id',$this->data['materialBox']['id'])->delete();
  33. // StationTask::query()->where('station_id',$this->data['station']['id'])->delete();
  34. // Station::query()->where('id',$this->data['parentStation']['id'])->delete();
  35. // Station::query()->where('id',$this->data['station']['id'])->delete();
  36. // MaterialBox::query()->where('id',$this->data['materialBox']['id'])->delete();
  37. parent::tearDown();
  38. }
  39. }