You are here

public function FakePreprocessEventFactory::createEvent in Hook Event Dispatcher 8

Create the PreprocessEvent with the Variables object embedded.

Parameters

array $variables: Variables.

Return value

FakePreprocessEvent Created event.

Overrides PreprocessEventFactoryInterface::createEvent

File

tests/src/Unit/Preprocess/Helpers/FakePreprocessEventFactory.php, line 40

Class

FakePreprocessEventFactory
Class FakePreprocessEventFactory.

Namespace

Drupal\Tests\hook_event_dispatcher\Unit\Preprocess\Helpers

Code

public function createEvent(array &$variables) {
  return new FakePreprocessEvent(new FakeEventVariables($variables));
}