false]); $synchronizer = Mockery::mock(DingPayableWorkflowMirrorSynchronizer::class); $synchronizer->shouldReceive('sync')->once()->with(true, 25, 1)->andReturn([ 'status' => 'succeeded', 'mode' => 'full', 'batches' => 1, 'rows' => 2, 'dataset' => 'operations_replica.rpt.ding_payable_workflows', ]); $this->app->instance(DingPayableWorkflowMirrorSynchronizer::class, $synchronizer); $this->artisan('business-mirror:sync-ding-payable-workflows', [ '--full' => true, '--batch' => 25, '--max-batches' => 1, ])->expectsOutputToContain('同步完成') ->assertSuccessful(); } }