service = app(CacheShelfService::class); $this->data['station'] = factory(Station::class)->create(); } public function testLightOn() { $row = ''; // 从右到左 $col = ''; // 从下到上 $this->service->lightOn($this->data['station'],$row,$col); } protected function tearDown(): void { Station::query()->where('id',$this->data['station']['id'])->delete(); parent::tearDown(); } }