public function AbstractFormEntityDisplayEditAlterEventSubscriberTestCase::testFormAlterOneField in Hook Event Dispatcher 3.x
Same name and namespace in other branches
- 8.2 modules/field_event_dispatcher/tests/src/Unit/Field/AbstractFormEntityDisplayEditAlterEventSubscriberTestCase.php \Drupal\Tests\field_event_dispatcher\Unit\Field\AbstractFormEntityDisplayEditAlterEventSubscriberTestCase::testFormAlterOneField()
FormEntityDisplayEditAlterEventSubscriber test with one field.
This tests that FormEntityDisplayEditAlterEventSubscriber::formAlter() alters the $form array as expected when one field is provided.
File
- modules/
field_event_dispatcher/ tests/ src/ Unit/ Field/ AbstractFormEntityDisplayEditAlterEventSubscriberTestCase.php, line 131
Class
- AbstractFormEntityDisplayEditAlterEventSubscriberTestCase
- Class AbstractFormEntityDisplayEditAlterEventSubscriberTestCase.
Namespace
Drupal\Tests\field_event_dispatcher\Unit\FieldCode
public function testFormAlterOneField() : void {
$form = $this
->getTestForm([
'field_test' => [
'test_module' => [
'test',
],
],
]);
$expectedForm = $form;
$this
->alterForm($form, $expectedForm);
self::assertSame($expectedForm, $form);
}