value = $resolver(); return 'fresh'; } }; $pinduoduo = new class extends PinduoduoSpreadBillRepository { public array $arguments = []; public function __construct() { } public function paginate( ?string $storeName = null, ?string $fromDate = null, ?string $toDate = null, ?string $flowType = null, int $page = 1, int $pageSize = 25 ): array { $this->arguments = func_get_args(); return ['rows' => [], 'total' => 0]; } }; $edgeBanding = (new ReflectionClass(EdgeBandingRepository::class))->newInstanceWithoutConstructor(); $goods = (new ReflectionClass(GoodsReconciliationRepository::class))->newInstanceWithoutConstructor(); $supplier = (new ReflectionClass(SupplierPayableRepository::class))->newInstanceWithoutConstructor(); $refresher = new JianSunSnapshotRefresher($cache, $edgeBanding, $goods, $pinduoduo, $supplier); $status = $refresher->refresh([ 'scope' => 'pinduoduo-bills.list', 'parameters' => [ 'filters' => [ 'store_name' => '测试店铺', 'from' => '2026-07-01', 'to' => '2026-07-23', 'flow_type' => 'expense', ], 'page' => 3, 'limit' => 50, ], ]); $this->assertSame('fresh', $status); $this->assertSame( ['测试店铺', '2026-07-01', '2026-07-23', 'expense', 3, 50], $pinduoduo->arguments ); } }