function EntityFormTest::testEntityFormDisplayAlter

Tests hook_entity_form_display_alter().

See also

entity_test_entity_form_display_alter()

File

drupal/core/modules/system/lib/Drupal/system/Tests/Entity/EntityFormTest.php, line 54
Definition of Drupal\system\Tests\Entity\EntityFormTest.

Class

EntityFormTest
Tests the Entity Form Controller.

Namespace

Drupal\system\Tests\Entity

Code

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