Esempio n. 1
0
 /**
  * Test the entity update
  *
  * @param User $entity the entity
  *
  * @depends testCreate
  *
  * @return void
  */
 public function testUpdate($entity)
 {
     $updateData = $this->entityData;
     $updateData['id'] = $entity->getId();
     $updateData['username'] = '******';
     $updatedEntity = $this->manager->update($updateData);
     $this->checkEntity($updatedEntity, $updateData, array('password'));
 }
Esempio n. 2
0
 /**
  * @param User $user
  */
 public function createActivationHash(User $user)
 {
     $user->setActivationHash(sha1($user->getId() . $user->getUsername() . $user->getCreated()->getTimestamp()));
 }