You are here

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

Same name and namespace in other branches
  1. 8.2 modules/media_event_dispatcher/tests/src/Unit/Media/MediaSourceInfoAlterEventTest.php \Drupal\Tests\media_event_dispatcher\Unit\Media\MediaSourceInfoAlterEventTest::setUp()

Sets up the test.

File

modules/media_event_dispatcher/tests/src/Unit/Media/MediaSourceInfoAlterEventTest.php, line 31

Class

MediaSourceInfoAlterEventTest
Class MediaSourceInfoAlterEventTest.

Namespace

Drupal\Tests\media_event_dispatcher\Unit\Media

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);
}