You are here

function EntityFormTest::testEntityFormDisplayAlter in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/modules/system/src/Tests/Entity/EntityFormTest.php \Drupal\system\Tests\Entity\EntityFormTest::testEntityFormDisplayAlter()

Tests hook_entity_form_display_alter().

See also

entity_test_entity_form_display_alter()

File

core/modules/system/src/Tests/Entity/EntityFormTest.php, line 61
Contains \Drupal\system\Tests\Entity\EntityFormTest.

Class

EntityFormTest
Tests the entity form.

Namespace

Drupal\system\Tests\Entity

Code

function testEntityFormDisplayAlter() {
  $this
    ->drupalGet('entity_test/add');
  $altered_field = $this
    ->xpath('//input[@name="field_test_text[0][value]" and @size="42"]');
  $this
    ->assertTrue(count($altered_field) === 1, 'The altered field has the correct size value.');
}