class FieldFormatterSettingsSummaryAlterEventTest in Hook Event Dispatcher 8.2
Same name and namespace in other branches
- 3.x modules/field_event_dispatcher/tests/src/Unit/Field/FieldFormatterSettingsSummaryAlterEventTest.php \Drupal\Tests\field_event_dispatcher\Unit\Field\FieldFormatterSettingsSummaryAlterEventTest
Class FieldFormatterSettingsSummaryAlterEventTest.
@group field_event_dispatcher
Hierarchy
- class \Drupal\Tests\field_event_dispatcher\Unit\Field\AbstractFieldSettingsSummaryAlterEventTestCase extends \PHPUnit\Framework\TestCase
- class \Drupal\Tests\field_event_dispatcher\Unit\Field\FieldFormatterSettingsSummaryAlterEventTest
Expanded class hierarchy of FieldFormatterSettingsSummaryAlterEventTest
File
- modules/
field_event_dispatcher/ tests/ src/ Unit/ Field/ FieldFormatterSettingsSummaryAlterEventTest.php, line 14
Namespace
Drupal\Tests\field_event_dispatcher\Unit\FieldView source
class FieldFormatterSettingsSummaryAlterEventTest extends AbstractFieldSettingsSummaryAlterEventTestCase {
/**
* {@inheritdoc}
*/
protected function getProceduralHookName() : string {
return 'field_event_dispatcher_field_formatter_settings_summary_alter';
}
/**
* {@inheritdoc}
*/
protected function getEventName() : string {
return HookEventDispatcherInterface::FIELD_FORMATTER_SETTINGS_SUMMARY_ALTER;
}
/**
* {@inheritdoc}
*/
protected function getTestContext(BaseFieldDefinition $fieldDefinition) : array {
return [
'formatter' => new BasicStringFormatter('test_formatter', [], $fieldDefinition, [], 'label', 'view_mode', []),
'view_mode' => 'test',
];
}
}