You are here

public function AbstractFormEntityDisplayEditAlterEventSubscriberTestCase::testFormAlterNoFields in Hook Event Dispatcher 8.2

Same name and namespace in other branches
  1. 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\Field

Code

public function testFormAlterNoFields() : void {
  $form = $this
    ->getTestForm([]);
  $expectedForm = $form;
  $this
    ->alterForm($form, $expectedForm);
  self::assertSame($expectedForm, $form);
}