public function ManageDisplayTest::testNonInitializedFields in Drupal 9
Same name and namespace in other branches
- 8 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 181
Class
- ManageDisplayTest
- Tests the Field UI "Manage display" and "Manage form display" screens.
Namespace
Drupal\Tests\field_ui\FunctionalCode
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
->assertSession()
->fieldValueEquals('fields[field_test][region]', 'hidden');
}