You are here

function ManageDisplayTest::testNonInitializedFields in Zircon Profile 8

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

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

File

core/modules/field_ui/src/Tests/ManageDisplayTest.php, line 374
Contains \Drupal\field_ui\Tests\ManageDisplayTest.

Class

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

Namespace

Drupal\field_ui\Tests

Code

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][type]', 'hidden', 'The field is displayed as \'hidden \'.');
}