You are here

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

Same name in this branch
  1. 3.x modules/preprocess_event_dispatcher/tests/src/Unit/EntityEventTest.php \Drupal\Tests\preprocess_event_dispatcher\Unit\EntityEventTest::setUp()
  2. 3.x modules/core_event_dispatcher/tests/src/Unit/Entity/EntityEventTest.php \Drupal\Tests\core_event_dispatcher\Unit\Entity\EntityEventTest::setUp()
Same name and namespace in other branches
  1. 8.2 modules/core_event_dispatcher/tests/src/Unit/Entity/EntityEventTest.php \Drupal\Tests\core_event_dispatcher\Unit\Entity\EntityEventTest::setUp()

File

modules/core_event_dispatcher/tests/src/Unit/Entity/EntityEventTest.php, line 38

Class

EntityEventTest
Class EntityEventTest.

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