loginNami(); $api = app(NamiSettings::class)->login(); app(SearchFake::class)->fetches(1, 0, [ MemberEntry::factory()->toMember(['groupId' => 100, 'id' => 20]), ]); FullMemberAction::shouldRun()->once(); app(InitializeMembers::class)->handle($api); } public function testFetchesMembersViaCommandLine(): void { $this->loginNami(); app(SearchFake::class)->fetches(1, 0, [ MemberEntry::factory()->toMember(['groupId' => 100, 'id' => 20]), ]); FullMemberAction::shouldRun()->once(); Artisan::call('member:pull'); } }