public function testUpdate()
 {
     $group = (new Group())->setId(1)->setName('Support')->setDescription('Equipe de support')->setType((new GroupType())->setId(1))->setContact((new Member())->setId(1))->setCreatedAt(new \DateTime())->setUpdatedAt(new \DateTime());
     $this->repository->update($group);
     $group = $this->repository->find(1);
     $this->assertEquals('Support', $group->getName());
     $this->assertEquals('Equipe de support', $group->getDescription());
 }
Ejemplo n.º 2
0
 /**
  * Update Group's contact.
  * 
  * @param \Wonderland\Application\Model\Group  $group
  * @param \Wonderland\Application\Model\Member $member
  *
  * @return int
  */
 public function updateContact(Group $group, Member $member)
 {
     $group->setContact($member);
     return $this->repository->update($group)->rowCount();
 }