You are here

public function ManageFieldsFunctionalTest::createField in Drupal 10

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

Tests adding a new field.

@todo Assert properties can be set in the form and read back in $field_storage and $fields.

File

core/modules/field_ui/tests/src/Functional/ManageFieldsFunctionalTest.php, line 212

Class

ManageFieldsFunctionalTest
Tests the Field UI "Manage fields" screen.

Namespace

Drupal\Tests\field_ui\Functional

Code

public function createField() {

  // Create a test field.
  $this
    ->fieldUIAddNewField('admin/structure/types/manage/' . $this->contentType, $this->fieldNameInput, $this->fieldLabel);
}