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