You are here

public function EntityEventTest::testEckEntityEvent in Hook Event Dispatcher 8

Test a EckEntityPreprocessEvent.

File

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

Class

EntityEventTest
Class EntityEventTest.

Namespace

Drupal\Tests\hook_event_dispatcher\Unit\Preprocess

Code

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