You are here

public function EntityEventTest::setUp in Hook Event Dispatcher 8

Same name in this branch
  1. 8 tests/src/Unit/Entity/EntityEventTest.php \Drupal\Tests\hook_event_dispatcher\Unit\Entity\EntityEventTest::setUp()
  2. 8 tests/src/Unit/Preprocess/EntityEventTest.php \Drupal\Tests\hook_event_dispatcher\Unit\Preprocess\EntityEventTest::setUp()

Overrides UnitTestCase::setUp

File

tests/src/Unit/Entity/EntityEventTest.php, line 30

Class

EntityEventTest
Class EntityEventTest.

Namespace

Drupal\Tests\hook_event_dispatcher\Unit\Entity

Code

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