You are here

protected function FieldWidgetSettingsSummaryAlterEventTest::getTestContext 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::getTestContext()

Get the test context array.

Parameters

\Drupal\Core\Field\BaseFieldDefinition $fieldDefinition: The field defition used in the test.

Return value

array The test context array.

Overrides AbstractFieldSettingsSummaryAlterEventTestCase::getTestContext

File

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

Class

FieldWidgetSettingsSummaryAlterEventTest
Class FieldWidgetSettingsSummaryAlterEventTest.

Namespace

Drupal\Tests\field_event_dispatcher\Unit\Field

Code

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