/**
  * test generation of loginnames
  */
 public function testGenerateUserName()
 {
     $user = new Tinebase_Model_FullUser(array('accountFirstName' => 'Leonie', 'accountLastName' => 'Weiss', 'accountPrimaryGroup' => Tinebase_Core::getUser()->accountPrimaryGroup), true);
     $createdUserIds = array();
     for ($i = 0; $i < 10; $i++) {
         $user->accountLoginName = $this->_uit->generateUserName($user);
         $createdUserIds[] = $this->_uit->addUser($user)->getId();
         $user->setId(NULL);
     }
     $this->_uit->deleteUsers($createdUserIds);
 }
 /**
  * test generation of login names
  */
 public function testGenerateUserName()
 {
     if (Tinebase_User::getConfiguredBackend() === Tinebase_User::ACTIVEDIRECTORY) {
         // error: Zend_Ldap_Exception: 0x44 (Already exists;
         // Entry CN=Leonie Weiss,CN=Users,DC=example,DC=org already exists):
         // adding: cn=Leonie Weiss,cn=Users,dc=example,dc=org
         $this->markTestSkipped('skipped for ad backends as it does not allow duplicate CNs');
     }
     $user = new Tinebase_Model_FullUser(array('accountFirstName' => 'Leonie', 'accountLastName' => 'Weiss', 'accountPrimaryGroup' => Tinebase_Core::getUser()->accountPrimaryGroup), true);
     $createdUserIds = array();
     for ($i = 0; $i < 10; $i++) {
         $user->accountLoginName = $this->_uit->generateUserName($user);
         $createdUserIds[] = $this->_uit->addUser($user)->getId();
         $user->setId(NULL);
     }
     $this->_uit->deleteUsers($createdUserIds);
 }