You are here

protected function FieldFormatterSettingsSummaryAlterEventTest::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/FieldFormatterSettingsSummaryAlterEventTest.php \Drupal\Tests\field_event_dispatcher\Unit\Field\FieldFormatterSettingsSummaryAlterEventTest::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/FieldFormatterSettingsSummaryAlterEventTest.php, line 33

Class

FieldFormatterSettingsSummaryAlterEventTest
Class FieldFormatterSettingsSummaryAlterEventTest.

Namespace

Drupal\Tests\field_event_dispatcher\Unit\Field

Code

protected function getTestContext(BaseFieldDefinition $fieldDefinition) : array {
  return [
    'formatter' => new BasicStringFormatter('test_formatter', [], $fieldDefinition, [], 'label', 'view_mode', []),
    'view_mode' => 'test',
  ];
}