You are here

public function EntityEventTest::testEckEntityEvent in Hook Event Dispatcher 8.2

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

Test a EckEntityPreprocessEvent.

File

modules/preprocess_event_dispatcher/tests/src/Unit/EntityEventTest.php, line 73

Class

EntityEventTest
Class EntityEventTest.

Namespace

Drupal\Tests\preprocess_event_dispatcher\Unit

Code

public function testEckEntityEvent() : void {
  $variables = [
    'elements' => [
      '#view_mode' => 'view_mode',
    ],
    'eck_entity' => EntityMockFactory::getMock(EckEntityInterface::class, 'eck_entity', 'bundle', 'view_mode'),
    'theme_hook_original' => 'eck_entity',
    'bundle' => 'bundle',
  ];
  $this
    ->createAndAssertEntityEvent(EckEntityPreprocessEvent::class, $variables);
}