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 testGetSetDisplayName()
 {
     $displayName = 'test tester';
     $this->user->setDisplayName($displayName);
     $this->assertSame($displayName, $this->user->getDisplayName());
 }