public function EntityFormTest::testEntityFormDisplayAlter in Drupal 8
Same name and namespace in other branches
- 9 core/modules/system/tests/src/Functional/Entity/EntityFormTest.php \Drupal\Tests\system\Functional\Entity\EntityFormTest::testEntityFormDisplayAlter()
 - 10 core/modules/system/tests/src/Functional/Entity/EntityFormTest.php \Drupal\Tests\system\Functional\Entity\EntityFormTest::testEntityFormDisplayAlter()
 
Tests hook_entity_form_display_alter().
See also
entity_test_entity_form_display_alter()
File
- core/
modules/ system/ tests/ src/ Functional/ Entity/ EntityFormTest.php, line 65  
Class
- EntityFormTest
 - Tests the entity form.
 
Namespace
Drupal\Tests\system\Functional\EntityCode
public function testEntityFormDisplayAlter() {
  $this
    ->drupalGet('entity_test/add');
  $altered_field = $this
    ->xpath('//input[@name="field_test_text[0][value]" and @size="42"]');
  $this
    ->assertCount(1, $altered_field, 'The altered field has the correct size value.');
}