10 include_once(
"./Services/PHPUnit/classes/class.ilUnitUtil.php");
11 ilUnitUtil::performInitialisation();
20 include_once(
"./Services/User/classes/class.ilObjUser.php");
34 "login" =>
"aatestuser",
36 "passwd" =>
"password",
39 "lastname" =>
"Mutzke",
40 "email" =>
"de@de.de",
41 "client_ip" =>
"1.2.3.4",
42 "ext_account" =>
"ext_mutzke"
44 $user->assignData(
$d);
47 $user->setLanguage(
"no");
50 $value.= $user->getFirstname().
"-";
53 $user->setFirstname(
"Maxi");
55 $value.= $user->getFirstname().
"-";
58 $user->refreshLogin();
65 $value.=
$n[
"lastname"].
"-";
79 $user->writePref(
"testpref",
"pref1");
81 $user->deletePref(
"testpref");
88 $user->setActive(
false);
93 $user->setActive(
true);
107 $this->assertEquals(
"Max-Maxi-de@de.de-m-1.2.3.4-Mutzke-aatestuser-ext_mutzke-$id-no-le-".
108 "pref1-pref2-act1-act2-act3-",
119 include_once(
"./Services/User/classes/class.ilObjUser.php");
126 "login" =>
"aatestuser2",
128 "passwd" =>
"password",
130 "firstname" =>
"Heidi",
131 "lastname" =>
"Kabel",
132 "email" =>
"qwe@ty.de",
133 "ext_account" =>
"ext_"
135 $user->assignData(
$d);
136 $user->setActive(
true);
139 $user->setLanguage(
"de");
141 $id = $user->getId();
147 if (is_array($ids) && count($ids) == 1 && $ids[0] ==
"aatestuser2")
158 foreach ($acc as $k => $v)
159 if ($k == $id && $v ==
"ext_kabel")
190 $this->assertEquals(
"email1-email2-auth1-auth2-auth3-auth4-",
200 include_once(
"./Services/User/classes/class.ilObjUser.php");
207 "login" =>
"aatestuser3",
209 "passwd" =>
"password",
211 "firstname" =>
"Heidi",
212 "lastname" =>
"Kabel",
213 "email" =>
"de@de.de"
215 $user->assignData(
$d);
216 $user->setActive(
true);
219 $user->setLanguage(
"de");
221 $id = $user->getId();
223 $user->addDesktopItem(ROOT_FOLDER_ID,
"root");
224 if ($user->isDesktopItem(ROOT_FOLDER_ID,
"root"))
228 $user->setDesktopItemParameters(ROOT_FOLDER_ID,
"root",
"par1");
229 $di = $user->getDesktopItems();
230 if ($item = current($di))
232 if ($item[
"type"] ==
"root" && $item[
"ref_id"] == ROOT_FOLDER_ID)
238 $user->dropDesktopItem(ROOT_FOLDER_ID,
"root");
239 if (!$user->isDesktopItem(ROOT_FOLDER_ID,
"root"))
243 $user->_removeItemFromDesktops(ROOT_FOLDER_ID);
248 $this->assertEquals(
"desk1-desk2-desk3-",
258 include_once(
"./Services/User/classes/class.ilObjUser.php");
281 $this->assertEquals(
"",
296 "login" =>
"aatestuser3",
298 "passwd" =>
"password",
300 "firstname" =>
"Heidi",
301 "lastname" =>
"Kabel",
302 "email" =>
"de@de.de"
304 $user->assignData(
$d);
305 $user->setActive(
true);
308 $user->setLanguage(
"de");
310 $id = $user->getId();
312 $user->addObjectToClipboard($id,
"user",
"aatestuser");
313 $user->addObjectToClipboard(56,
"mump",
"mumpitz");
314 if ($user->clipboardHasObjectsOfType(
"user"))
319 $user->clipboardDeleteObjectsOfType(
"user");
320 if ($user->clipboardHasObjectsOfType(
"mump") &&
321 !$user->clipboardHasObjectsOfType(
"user"))
326 $objs = $user->getClipboardObjects(
"mump");
327 if (is_array($objs) && count($objs) == 1 && $objs[0][
"id"] == 56)
332 $objs = $user->getClipboardChilds(56,
"2008-10-10");
336 if (is_array($us) && count($us) == 1 && $us[0] == $id)
343 $this->assertEquals(
"clip1-clip2-clip3-clip4-",
355 include_once(
"./Services/User/classes/class.ilObjUser.php");
360 $this->assertEquals(
"",