You are here

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

Same name and namespace in other branches
  1. 8.2 modules/core_event_dispatcher/tests/src/Unit/Entity/EntityExtraEventTest.php \Drupal\Tests\core_event_dispatcher\Unit\Entity\EntityExtraEventTest::setUp()

File

modules/core_event_dispatcher/tests/src/Unit/Entity/EntityExtraEventTest.php, line 32

Class

EntityExtraEventTest
Class EntityExtraEventTest.

Namespace

Drupal\Tests\core_event_dispatcher\Unit\Entity

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