loginNami(); $api = app(NamiSettings::class)->login(); app(SearchFake::class)->fetches(1, 0, 100, [ MemberEntry::factory()->toMember(['groupId' => 100, 'id' => 20]), ]); FullMemberAction::partialMock()->shouldReceive('configureJob')->once(); FullMemberAction::partialMock()->shouldReceive('handle')->once(); 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::partialMock()->shouldReceive('configureJob')->once(); FullMemberAction::partialMock()->shouldReceive('handle')->once(); Artisan::call('member:pull'); } }