You are here

public function FieldWidgetThirdPartySettingsFormEventTest::setUp in Hook Event Dispatcher 3.x

Same name and namespace in other branches
  1. 8.2 modules/field_event_dispatcher/tests/src/Unit/Field/FieldWidgetThirdPartySettingsFormEventTest.php \Drupal\Tests\field_event_dispatcher\Unit\Field\FieldWidgetThirdPartySettingsFormEventTest::setUp()

Sets up the test.

File

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

Class

FieldWidgetThirdPartySettingsFormEventTest
Class FieldWidgetThirdPartySettingsFormEventTest.

Namespace

Drupal\Tests\field_event_dispatcher\Unit\Field

Code

public function setUp() : void {
  $builder = new ContainerBuilder();
  $this->manager = new HookEventDispatcherManagerSpy();
  $builder
    ->set('hook_event_dispatcher.manager', $this->manager);
  $builder
    ->compile();
  Drupal::setContainer($builder);
}