You are here

public function FormEventTest::setUp in Hook Event Dispatcher 8

Overrides UnitTestCase::setUp

File

tests/src/Unit/Form/FormEventTest.php, line 32

Class

FormEventTest
Class FormEventTest.

Namespace

Drupal\Tests\hook_event_dispatcher\Unit\Form

Code

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