12 require_once
'PU_testcase_dcp_document.php';
25 $this->assertEmpty(
$err, sprintf(
"cannot delete iuser %s",
$err));
33 public function testCreateUser(
$login, $password)
39 $this->assertTrue(is_object(
$doc) ,
"cannot create user");
41 $err.=
$doc->setValue(
"us_passwd1", $password);
42 $err.=
$doc->setValue(
"us_passwd2", $password);
43 $this->assertEmpty(
$err, sprintf(
"cannot set iuser %s",
$err));
46 $this->assertEmpty(
$err, sprintf(
"cannot store iuser %s",
$err));
49 $this->assertTrue($u->setLoginName(
$login) ,
"system user not found");
50 $this->assertEquals(
$login, $u->login);
51 $this->assertEquals(
$doc->id, $u->fid,
"mismatch document iuser reference");
52 $this->assertEquals(
$doc->getRawValue(
"us_whatid") , $u->id,
"mismatch system iuser reference");
64 $this->assertTrue(is_object(
$doc) ,
"cannot create user");
66 $err.=
$doc->setValue(
"us_passwd1", $password);
67 $err.=
$doc->setValue(
"us_passwd2", $password);
68 $this->assertEmpty(
$err, sprintf(
"cannot set iuser %s",
$err));
71 $this->assertNotEmpty(
$err, sprintf(
"must be impossible to store iuser"));
74 $this->assertTrue($u->setLoginName(
$login) ,
"system user not found");
75 $this->assertEquals(
$login, $u->login);
testNotCreateUser($login, $password)
createDoc($dbaccess, $fromid, $control=true, $defaultvalues=true, $temporary=false)
testDeleteUser($login, $password)
if($file) if($subject==""&&$file) if($subject=="") $err