You are here

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

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

File

modules/preprocess_event_dispatcher/tests/src/Unit/PreprocessEventPassTest.php, line 43

Class

PreprocessEventPassTest
Class PreprocessEventPassTest.

Namespace

Drupal\Tests\preprocess_event_dispatcher\Unit

Code

public function setUp() : void {
  $this->builder = new ContainerBuilder();
  $locator = new FileLocator([
    dirname(__DIR__, 3),
  ]);
  $loader = new YamlFileLoader($this->builder, $locator);
  $loader
    ->load('preprocess_event_dispatcher.services.yml');
  $this->builder
    ->set('event_dispatcher', new SpyEventDispatcher());
  $this->pass = new PreprocessEventPass();
}