| 1 field_group.display.test | public GroupDisplayTestCase::testFieldAccess() |
Test if an empty formatter.
File
- core/
modules/ field_group/ tests/ field_group.display.test, line 99 - Test file for field group display.
Class
- GroupDisplayTestCase
- Tests the functionality of the 'Manage display' screens.
Code
public function testFieldAccess() {
$data = array(
'label' => 'Wrapper',
'weight' => '1',
'children' => array(
0 => 'field_no_access',
),
'format_type' => 'html-element',
'format_settings' => array(
'label' => 'Link',
'instance_settings' => array(
'wrapper' => 'div',
'required_fields' => 0,
'id' => 'wrapper-id',
'classes' => 'test-class',
'description' => '',
'show_label' => FALSE,
'label_element' => 'h3',
),
),
);
$group = $this->createDisplayGroup('default', $data);
$groups = field_group_info_groups('node', 'post', 'default', TRUE);
$this->backdropGet('node/' . $this->node->nid);
// Test if group is not shown.
$this->assertNoFieldByXPath("//div[contains(@id, 'wrapper-id')]", NULL, t('Div that contains fields with no access is not shown.'));
}