You are here

public function EntityEventTest::testParagraphEvent 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::testParagraphEvent()

Test a ParagraphPreprocessEvent.

File

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

Class

EntityEventTest
Class EntityEventTest.

Namespace

Drupal\Tests\preprocess_event_dispatcher\Unit

Code

public function testParagraphEvent() : void {
  $variables = [
    'paragraph' => EntityMockFactory::getMock(ParagraphInterface::class, 'paragraph', 'bundle', 'view_mode'),
    'theme_hook_original' => 'paragraph',
    'view_mode' => 'view_mode',
  ];
  $this
    ->createAndAssertEntityEvent(ParagraphPreprocessEvent::class, $variables);
}