12 require_once
'PU_testcase_dcp_commonfamily.php';
19 'PU_data_dcp_user_deactivate_account.ods'
25 public function testExecuteUserDeactivateAccount($effectiveUserLogin, $targetUserId)
27 $this->
sudo($effectiveUserLogin);
32 $this->assertTrue(
$user->isAlive() , sprintf(
"Could not get user with id '%s'.", $targetUserId));
35 $this->assertNotEmpty($err,
"deactivate error must be detected");
36 $this->assertTrue(
$user->isAccountActive() , sprintf(
"User with id '%s' should be active.", $targetUserId));
43 public function testUserActivateAccount($effectiveUserLogin, $targetUserId)
45 $this->
sudo($effectiveUserLogin);
50 $this->assertTrue(
$user->isAlive() , sprintf(
"Could not get user with id '%s'.", $targetUserId));
52 $err =
$user->activateAccount();
54 $this->assertNotEmpty($err,
"activate error must be detected");
55 $this->assertFalse(
$user->isAccountActive() , sprintf(
"User with id '%s' should not be active.", $targetUserId));
62 public function testDeActivateAccount($targetUserId)
68 $this->assertTrue(
$user->isAlive() , sprintf(
"Could not get user with id '%s'.", $targetUserId));
69 $err =
$user->deactivateAccount();
71 $this->assertEmpty($err,
"activate error detected : $err");
72 $this->assertFalse(
$user->isAccountActive() , sprintf(
"User with id '%s' should not be active.", $targetUserId));
73 $this->assertTrue(
$user->isAccountInActive() , sprintf(
"User with id '%s' should not be active.", $targetUserId));
74 $err =
$user->activateAccount();
76 $this->assertEmpty($err,
"activate error detected : $err");
77 $this->assertTrue(
$user->isAccountActive() , sprintf(
"User with id '%s' should not be active.", $targetUserId));
78 $this->assertFalse(
$user->isAccountInActive() , sprintf(
"User with id '%s' should not be active.", $targetUserId));
dataUserActivateAccount()
static getCommonImportFile()
dataUserDeactivateAccount()
new_Doc($dbaccess, $id= '', $latest=false)
if($file) if($subject==""&&$file) if($subject=="") $err