コード例 #1
0
 protected function arrangeBusinessWithOwner()
 {
     $this->owner = $this->createUser();
     $this->business = $this->createBusiness();
     $this->business->owners()->save($this->owner);
     $this->contactOne = $this->createContact();
     $this->contactTwo = $this->createContact();
     $this->contactThree = $this->createContact();
     $this->business->contacts()->save($this->contactOne);
     $this->business->contacts()->save($this->contactTwo);
     $this->business->contacts()->save($this->contactThree);
     $this->serviceOne = $this->createService();
     $this->serviceTwo = $this->createService();
     $this->serviceThree = $this->createService();
     $this->appointment = $this->makeAppointment($this->business, $this->createUser(), $this->contactOne);
     $this->appointment->save();
     $this->business->services()->save($this->serviceOne);
     $this->business->services()->save($this->serviceTwo);
     $this->business->services()->save($this->serviceThree);
 }