function ManageFieldsTest::testFieldUiDefinitionsAlter

Same name and namespace in other branches
  1. 11.x core/modules/field_ui/tests/src/Functional/ManageFieldsTest.php \Drupal\Tests\field_ui\Functional\ManageFieldsTest::testFieldUiDefinitionsAlter()

Tests hook_field_info_entity_type_ui_definitions_alter().

File

core/modules/field_ui/tests/src/Functional/ManageFieldsTest.php, line 378

Class

ManageFieldsTest
Tests the Manage Display page of a fieldable entity type.

Namespace

Drupal\Tests\field_ui\Functional

Code

public function testFieldUiDefinitionsAlter() : void {
  $user = $this->drupalCreateUser([
    'administer node fields',
  ]);
  $node_type = $this->drupalCreateContentType();
  $this->drupalLogin($user);
  $this->drupalGet('/admin/structure/types/manage/' . $node_type->id() . '/fields/add-field');
  $this->assertSession()
    ->pageTextContains('Boolean (overridden by alter)');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.