public function AbstractFormEntityDisplayEditAlterEventSubscriberTestCase::testFormAlterNoFields in Hook Event Dispatcher 8.2
Same name and namespace in other branches
- 3.x modules/field_event_dispatcher/tests/src/Unit/Field/AbstractFormEntityDisplayEditAlterEventSubscriberTestCase.php \Drupal\Tests\field_event_dispatcher\Unit\Field\AbstractFormEntityDisplayEditAlterEventSubscriberTestCase::testFormAlterNoFields()
FormEntityDisplayEditAlterEventSubscriber test with no fields.
This tests that FormEntityDisplayEditAlterEventSubscriber::formAlter() handles forms with no fields it can alter correctly.
File
- modules/
field_event_dispatcher/ tests/ src/ Unit/ Field/ AbstractFormEntityDisplayEditAlterEventSubscriberTestCase.php, line 115
Class
- AbstractFormEntityDisplayEditAlterEventSubscriberTestCase
- Class AbstractFormEntityDisplayEditAlterEventSubscriberTestCase.
Namespace
Drupal\Tests\field_event_dispatcher\Unit\FieldCode
public function testFormAlterNoFields() : void {
$form = $this
->getTestForm([]);
$expectedForm = $form;
$this
->alterForm($form, $expectedForm);
self::assertSame($expectedForm, $form);
}