/** * Set up test environment. */ public function setUp() { parent::setUp(); $this->user = factory(User::class)->create(); $this->tasks = factory(Task::class, 6)->create(['user_id' => $this->user->id]); $graphql = app('graphql'); $graphql->schema()->type('user', UserStubType::class); $graphql->schema()->type('task', TaskType::class); }
/** * Set up test environment. */ public function setUp() { parent::setUp(); $this->company = factory(Company::class)->create(); $this->users = factory(User::class, 5)->create(['company_id' => $this->company->id]); $this->users->each(function ($user) { factory(Task::class, 5)->create(['user_id' => $user->id]); }); }
/** * Set up test environment. */ public function setUp() { parent::setUp(); $this->user = factory(User::class)->create(); $this->tasks = factory(Task::class, 6)->create(['user_id' => $this->user->id]); }