You are here

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

Same name and namespace in other branches
  1. 8.2 modules/user_event_dispatcher/tests/src/Unit/User/UserEventTest.php \Drupal\Tests\user_event_dispatcher\Unit\User\UserEventTest::setUp()

File

modules/user_event_dispatcher/tests/src/Unit/User/UserEventTest.php, line 36

Class

UserEventTest
Class UserEventTest.

Namespace

Drupal\Tests\user_event_dispatcher\Unit\User

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