9 require_once
'PU_testcase_dcp_document.php';
20 $myAction = self::getAction();
22 if (isset(
$data[
'import'])) {
23 if (!is_array(
$data[
'import'])) {
24 $data[
'import'] = array(
33 if (!isset(
$data[
'control']) || !is_array(
$data[
'control'])) {
37 foreach (
$data[
'control'] as $controlIdx => & $control) {
39 $this->assertTrue(
$user->isAlive() , sprintf(
"control#%s> Could not get user with id '%s'.", $controlIdx, $control[
'user']));
42 $this->assertNotEmpty($login, sprintf(
"control#%s> User with id '%s' have an empty login.", $controlIdx, $control[
'user']));
47 $this->assertTrue(
$doc->isAlive() , sprintf(
"control#%s> Could not get document with id '%s'.", $controlIdx, $control[
'doc']));
49 $permission =
$doc->control($control[
'acl']);
50 if ($control[
'result'] ===
false) {
51 $this->assertNotEmpty($permission, sprintf(
"control#%s> Unexpected empty control value while expecting a non-empty value.", $controlIdx));
53 $this->assertEmpty($permission, sprintf(
"control#%s> Unexpected control value '%s' while expecting empty value.", $controlIdx, $permission));
68 "PU_data_dcp_doccontrol_users.ods",
69 "PU_data_dcp_doccontrol_profiles.ods",
70 "PU_data_dcp_doccontrol_families.ods",
71 "PU_data_dcp_doccontrol_docs.ods"
75 "user" =>
"TST_U_HOMER_SIMPSON",
76 "doc" =>
"TST_HELPPAGE_01",
81 "user" =>
"TST_U_HOMER_SIMPSON",
82 "doc" =>
"TST_HELPPAGE_01",
87 "user" =>
"TST_U_MARGE_SIMPSON",
88 "doc" =>
"TST_HELPPAGE_01",
93 "user" =>
"TST_U_MARGE_SIMPSON",
94 "doc" =>
"TST_HELPPAGE_01",
static importDocument($file)
new_Doc($dbaccess, $id= '', $latest=false)