Beispiel #1
0
 public function testSetterAndGetter()
 {
     $fullname = "fullname";
     $user = new User();
     $user->setFullname($fullname);
     $this->assertEquals($fullname, $user->getFullname());
 }
 private function isAllowedToBeUpdated(User $userToUpdate)
 {
     $numberAdminUsers = $this->getNumberAdminUsers();
     if (1 === $numberAdminUsers) {
         if ($userToUpdate === $this->getUniqueAdminUser() && !$userToUpdate->isSuperAdmin()) {
             return new Response("Can not update this unique admin user '" . $userToUpdate->getUsername() . "'", 409);
         }
     }
     return true;
 }