| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <?php
- namespace Tests\Services\CacheShelfService;
- use App\MaterialBox;
- use App\Services\CacheShelfService;
- use App\Station;
- use App\StationTask;
- use App\StationTaskChildren;
- use App\StationTaskMaterialBox;
- use Tests\TestCase;
- class StationCacheBroadCastTest extends TestCase
- {
- /** @var CacheShelfService $service */
- protected $service;
- protected $data = [];
- protected function setUp(): void
- {
- parent::setUp();
- // $this->service = app(CacheShelfService::class);
- // $this->data['parentStation'] = factory(Station::class)->create();
- // $this->data['station'] = factory(Station::class)->create(['parent_id' => $this->data['parentStation']]);
- // $this->data['materialBox'] = factory(MaterialBox::class)->create();
- // $this->service->createStationTask($this->data['station']['code'],$this->data['materialBox']['code']);
- }
- public function test(){
- // 广播测试
- $this->assertTrue(true);
- // $this->service->_stationCacheBroadCast($this->data['station']['code'],0);
- }
- protected function tearDown(): void
- {
- // StationTaskChildren::query()->where('station_task_id',StationTask::query()->where('station_id',$this->data['station']['id'])->first()['id'])->delete();
- // StationTaskMaterialBox::query()->where('material_box_id',$this->data['materialBox']['id'])->delete();
- // StationTask::query()->where('station_id',$this->data['station']['id'])->delete();
- // Station::query()->where('id',$this->data['parentStation']['id'])->delete();
- // Station::query()->where('id',$this->data['station']['id'])->delete();
- // MaterialBox::query()->where('id',$this->data['materialBox']['id'])->delete();
- parent::tearDown();
- }
- }
|