Exemple #1
0
 /**
  * @param BaseUser $user
  * @return User
  */
 public static function fromUser(BaseUser $user)
 {
     $newUser = new User();
     $newUser->setUsername($user->getUsername());
     $newUser->setEmail($user->getEmail());
     $newUser->setActive($user->isActive());
     $newUser->setDisplayName($user->getDisplayName());
     $newUser->setFirstName($user->getFirstName());
     $newUser->setLastName($user->getLastName());
     return $newUser;
 }
Exemple #2
0
 public function testGetSetEmail()
 {
     $email = '*****@*****.**';
     $this->user->setEmail($email);
     $this->assertSame($email, $this->user->getEmail());
 }