You are here

public function PreprocessEventPassTest::setUp in Hook Event Dispatcher 8

Overrides UnitTestCase::setUp

File

tests/src/Unit/Preprocess/PreprocessEventPassTest.php, line 41

Class

PreprocessEventPassTest
Class PreprocessEventPassTest.

Namespace

Drupal\Tests\hook_event_dispatcher\Unit\Preprocess

Code

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