示例#1
0
 /**
  * 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);
 }
示例#2
0
 /**
  * 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]);
     });
 }
示例#3
0
 /**
  * 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]);
 }