protected function FeaturesUserTestCase::_test_fieldgroup in Features 6
File
- tests/
features.test, line 105
Class
- FeaturesUserTestCase
- User permission component tests for Features
Code
protected function _test_fieldgroup($op = 'load') {
$groups = fieldgroup_groups('features_test', FALSE, TRUE);
$group = $groups['group_features_test'];
switch ($op) {
case 'load':
return $group;
case 'override':
$group['settings']['display']['teaser'] = 'fieldset_collapsible';
$group['fields'] = array(
'0' => 'field_features_test_child_a',
);
// Update each field from this group.
foreach ($group['fields'] as $field_name) {
if ($field = content_fields($field_name, 'features_test')) {
$field['group'] = $group['group_features_test'];
fieldgroup_update_fields($field);
}
}
// Save the group itself.
fieldgroup_save_group('features_test', $group);
break;
}
}