You are here

public function ManageDisplayTest::testNonInitializedFields in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/field_ui/tests/src/Functional/ManageDisplayTest.php \Drupal\Tests\field_ui\Functional\ManageDisplayTest::testNonInitializedFields()

Tests that fields with no explicit display settings do not break.

File

core/modules/field_ui/tests/src/Functional/ManageDisplayTest.php, line 176

Class

ManageDisplayTest
Tests the Field UI "Manage display" and "Manage form display" screens.

Namespace

Drupal\Tests\field_ui\Functional

Code

public function testNonInitializedFields() {

  // Create a test field.
  $this
    ->fieldUIAddNewField('admin/structure/types/manage/' . $this->type, 'test', 'Test');

  // Check that the field appears as 'hidden' on the 'Manage display' page
  // for the 'teaser' mode.
  $this
    ->drupalGet('admin/structure/types/manage/' . $this->type . '/display/teaser');
  $this
    ->assertFieldByName('fields[field_test][region]', 'hidden', 'The field is displayed as \'hidden \'.');
}