15 require_once
'PU_testcase_dcp_commonfamily.php';
26 return "PU_data_dcp_maskfamily.ods";
38 if (
$doc->isAlive()) {
40 $this->assertEmpty(
$err, sprintf(
"mask apply error %s",
$err));
41 foreach ($expectedVisibilities as $attrid => $expectVis) {
42 $this->assertEquals($expectVis,
$doc->getAttribute($attrid)->mvisibility, sprintf(
"Attribute $attrid"));
45 $this->markTestIncomplete(sprintf(_(
'Document %d not alive.') ,
$docid));
60 if (
$doc->isAlive()) {
63 $this->assertNotEmpty(
$err, sprintf(
"mask apply need error"));
64 foreach ($expectedErrors as $error) {
65 $this->assertContains($error,
$err, sprintf(
"mask apply not correct error %s",
$err));
68 $this->markTestIncomplete(sprintf(_(
'Document %d not alive.') ,
$docid));
79 self::importDocument(
$file);
80 $this->assertTrue(
false,
"Mask import errors must not be empty");
83 foreach ($expectedErrors as $error) {
84 $this->assertContains($error, $e->getMessage() , sprintf(
"mask apply not correct error %s", $e->getMessage()));
92 [
"PU_data_dcp_badMask.ods",
113 "tst_coltext" =>
"W",
114 "tst_coldate" =>
"W",
125 "tst_coltext" =>
"H",
126 "tst_coldate" =>
"H",
137 "tst_coltext" =>
"H",
138 "tst_coldate" =>
"H",
149 "tst_coltext" =>
"W",
150 "tst_coldate" =>
"W",
testsetMask($docid, $mid, array $expectedVisibilities)
static getCommonImportFile()
testBadImportMask($file, array $expectedErrors)
if($file) if($subject==""&&$file) if($subject=="") $err
testsetMaskError($docid, $mid, array $expectedErrors)