13 require_once
'PU_testcase_dcp_commonfamily.php';
25 "PU_data_dcp_orderfamilies.ods"
32 public function testOrderAttribute($family, $expectedOrders)
38 $this->assertTrue($fam->isAlive() , sprintf(
"family %s not alive", $family));
40 $attributes = $fam->getAttributes();
44 if ($attribute && $attribute->id !== \Adoc::HIDDENFIELD) {
45 $orders[$expectedOrders[$k]] = $attribute->id;
54 foreach ($orders as $attrid) {
55 $this->assertEquals(strtolower($expectedOrders[$k]) , $attrid, sprintf(
"Not good found %s > %s : %s", $attrid, $expectedOrders[$k], print_r($orders,
true)));
63 public function testOptAttribute($family, $expectedOpts) {
68 $this->assertTrue($fam->isAlive() , sprintf(
"family %s not alive", $family));
70 foreach ($expectedOpts as $attrid=>$opts) {
71 $attr=$fam->getAttribute($attrid);
72 $this->assertNotEmpty($attr,
"Attribute $attrid not exists");
73 foreach ($opts as $kopt=>$opt) {
74 $this->assertEquals($opt, $attr->getOption($kopt),
75 sprintf(
"Verify \"%s\" on \"%s\". Has : %s", $kopt, $attrid,
76 print_r($attr->getOptions(),
true)));
214 $eOrder = array_merge($cOrder, [
"TST_ET25000",
"TST_EF25100",
"TST_E25200"]);
286 "TST_A2000" => [
"customopt" =>
"2000"],
287 "TST_AF9000" => [
"customopt" =>
"9000"]
293 "TST_A2000" => [
"customopt" =>
"2000"],
294 "TST_AF9000" => [
"customopt" =>
"9000"],
295 "TST_B600" => [
"customopt" =>
"600"],
301 "TST_A2000" => [
"customopt" =>
"2000"],
302 "TST_AF9000" => [
"customopt" =>
"9000"],
303 "TST_B600" => [
"customoptbis" =>
"600",
"customopt"=>
"600"],
309 "TST_A2000" => [
"customoptbis" =>
"2000",
"customopt"=>
""],
310 "TST_AF9000" => [
"customopt" =>
"9000"]
static getCommonImportFile()