You are here

public function EntityEventTest::testNodeEvent in Hook Event Dispatcher 8

Test a NodePreprocessEvent.

File

tests/src/Unit/Preprocess/EntityEventTest.php, line 87

Class

EntityEventTest
Class EntityEventTest.

Namespace

Drupal\Tests\hook_event_dispatcher\Unit\Preprocess

Code

public function testNodeEvent() {
  $this->variables = [
    'node' => new EntityMock('node', 'bundle', 'view_mode'),
    'theme_hook_original' => 'node',
    'view_mode' => 'view_mode',
  ];
  $this
    ->createAndAssertEntityEvent(NodePreprocessEvent::class);
}