13 require_once
'PU_testcase_dcp_commonfamily.php';
26 return "PU_data_dcp_searchfamilies.ods";
31 public function testProperties($filterName, array $expectedProperties)
35 $s->addFilter(
"name = '%s'", $filterName);
37 $s->setObjectReturn(
true);
41 $this->assertEmpty(
$err,
"search error : $err");
42 $dl =
$s->getDocumentList();
44 $this->assertEquals(1,
$s->count() ,
"Family $filterName not found - " . print_r(
$s->getSearchInfo() ,
true));
52 foreach ($expectedProperties as $propId => $expectedValue) {
53 $propValue =
$doc->getPropertyValue($propId);
54 if ($propValue ===
false) {
55 $propValue =
$doc->getRawValue($propId);
57 if (abs($propValue) > 0) {
58 if (!is_numeric($expectedValue)) {
60 if ($propValueName !=
'') {
61 $propValue = $propValueName;
65 $this->assertEquals($expectedValue, $propValue, sprintf(
"Not the good property for \"$propId\""));
73 'famName' =>
"TST_SFAM1",
75 "name" =>
"TST_SFAM1",
76 "profid" =>
"TSTFAM_ADMIN_1",
77 "cprofid" =>
"TSTFAM_ADMIN_EDIT1",
78 "ccvid" =>
"TSTFAM_CV_1",
83 'famName' =>
"TST_SFAM2",
85 "name" =>
"TST_SFAM2",
86 "profid" =>
"TSTFAM_ADMIN_2",
87 "cprofid" =>
"TSTFAM_ADMIN_EDIT2",
88 "ccvid" =>
"TSTFAM_CV_2",
static getCommonImportFile()
getNameFromId($dbaccess, $id)
if($file) if($subject==""&&$file) if($subject=="") $err