You are here

public function PageAttachmentsEventTest::setUp in Hook Event Dispatcher 8

Sets up the test.

Overrides UnitTestCase::setUp

File

tests/src/Unit/Page/PageAttachmentsEventTest.php, line 30

Class

PageAttachmentsEventTest
Class PageAttachmentsEventTest.

Namespace

Drupal\Tests\hook_event_dispatcher\Unit\Page

Code

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