You are here

class FieldWidgetSettingsSummaryAlterEventTest in Hook Event Dispatcher 3.x

Same name and namespace in other branches
  1. 8.2 modules/field_event_dispatcher/tests/src/Unit/Field/FieldWidgetSettingsSummaryAlterEventTest.php \Drupal\Tests\field_event_dispatcher\Unit\Field\FieldWidgetSettingsSummaryAlterEventTest

Class FieldWidgetSettingsSummaryAlterEventTest.

@group field_event_dispatcher

Hierarchy

Expanded class hierarchy of FieldWidgetSettingsSummaryAlterEventTest

File

modules/field_event_dispatcher/tests/src/Unit/Field/FieldWidgetSettingsSummaryAlterEventTest.php, line 14

Namespace

Drupal\Tests\field_event_dispatcher\Unit\Field
View source
class FieldWidgetSettingsSummaryAlterEventTest extends AbstractFieldSettingsSummaryAlterEventTestCase {

  /**
   * {@inheritdoc}
   */
  protected function getProceduralHookName() : string {
    return 'field_event_dispatcher_field_widget_settings_summary_alter';
  }

  /**
   * {@inheritdoc}
   */
  protected function getEventName() : string {
    return HookEventDispatcherInterface::FIELD_WIDGET_SETTINGS_SUMMARY_ALTER;
  }

  /**
   * {@inheritdoc}
   */
  protected function getTestContext(BaseFieldDefinition $fieldDefinition) : array {
    return [
      'widget' => new StringTextfieldWidget('test_widget', [], $fieldDefinition, [], []),
      'form_mode' => 'test',
    ];
  }

}

Members

Namesort descending Modifiers Type Description Overrides
AbstractFieldSettingsSummaryAlterEventTestCase::$manager private property The manager.
AbstractFieldSettingsSummaryAlterEventTestCase::setUp public function Sets up the test.
AbstractFieldSettingsSummaryAlterEventTestCase::testAddSummary public function AbstractFieldSettingsSummaryAlterEventTestCase adding summary test.
AbstractFieldSettingsSummaryAlterEventTestCase::testContext public function AbstractFieldSettingsSummaryAlterEventTestCase context test.
FieldWidgetSettingsSummaryAlterEventTest::getEventName protected function Get the name of the event to test. Overrides AbstractFieldSettingsSummaryAlterEventTestCase::getEventName
FieldWidgetSettingsSummaryAlterEventTest::getProceduralHookName protected function Get the name of the procedural hook function for this test. Overrides AbstractFieldSettingsSummaryAlterEventTestCase::getProceduralHookName
FieldWidgetSettingsSummaryAlterEventTest::getTestContext protected function Get the test context array. Overrides AbstractFieldSettingsSummaryAlterEventTestCase::getTestContext