laborReportsCountingRecordService = new LaborReportsCountingRecordService(); } public function testSet() { $start = '2025-10-01'; $end = '2025-10-05'; $dateList = [ '2025-10-01', '2025-10-02', '2025-10-03', '2025-10-04', '2025-10-05', ]; $unit = '日'; foreach ($dateList as $date) { $key = 'laborReportsCountingRecords_' . $date . '_' . $unit; Cache::put($key, '111111111111'); } $result = $this->laborReportsCountingRecordService->getByCache($start,$end, $unit); self::assertTrue($result['dataList']->isnotEmpty()); self::assertTrue($result['dateList'] == []); } }