service = app(CacheShelfService::class); $this->data['parentStation'] = factory(Station::class)->create(['code' => '']); $this->data['station'] = factory(Station::class)->create(['code'=>'','parent_id'=>$this->data['parentStation']['id']]); $this->data['materialBox']=factory(MaterialBox::class)->create(['code'=> '']); } public function testGetTasks() { $grids = $this->service->getTasks($this->data['station']); } protected function tearDown(): void { Station::query()->where('id', $this->data['station']['id'])->delete(); parent::tearDown(); // TODO: Change the autogenerated stub } }