9 require_once
'PU_testcase_dcp_commonfamily.php';
16 "PU_data_dcp_getSortAttributes.ods"
25 if (!is_numeric(
$data[
'famid'])) {
30 $attributes = $famdoc->getSortAttributes();
31 $count = count($attributes);
32 $this->assertTrue(($count ==
$data[
'expected'][
'count']) , sprintf(
"Got %d attributes while expecting %s: %s", $count,
$data[
'expected'][
'count'], print_r(array_map(
function ($e)
36 , $attributes) ,
true)));
40 foreach ($attributes as $attr) {
41 if ($attr->id == $check[
'id']) {
46 $this->assertTrue($found, sprintf(
"Expected attribute '%s' not found.", $check[
'id']));
47 $this->assertTrue(($attr->getOption(
'sortable') == $check[
'sortable']) , sprintf(
"Attribute '%s' has sortable '%s' while expecting '%s'.", $attr->id, $attr->getOption(
'sortable') , $check[
'sortable']));
58 'famid' =>
'TST_GETSORTATTRIBUTES',
static getCommonImportFile()
test_getSortAttributes($data)
getIdFromName($dbaccess, $name)