protected function FieldWidgetSettingsSummaryAlterEventTest::getTestContext in Hook Event Dispatcher 8.2
Same name and namespace in other branches
- 3.x 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\FieldCode
protected function getTestContext(BaseFieldDefinition $fieldDefinition) : array {
return [
'widget' => new StringTextfieldWidget('test_widget', [], $fieldDefinition, [], []),
'form_mode' => 'test',
];
}