You are here

public function PreprocessModuleTest::setUp in Hook Event Dispatcher 8.2

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

File

modules/preprocess_event_dispatcher/tests/src/Unit/PreprocessModuleTest.php, line 28

Class

PreprocessModuleTest
Class PreprocessModuleTest.

Namespace

Drupal\Tests\preprocess_event_dispatcher\Unit

Code

public function setUp() : void {
  $builder = new ContainerBuilder();
  $this->service = Mockery::mock(PreprocessEventServiceInterface::class);
  $builder
    ->set('preprocess_event.service', $this->service);
  $builder
    ->compile();
  Drupal::setContainer($builder);
}