You are here

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

Test a TaxonomyTermPreprocessEvent.

File

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

Class

EntityEventTest
Class EntityEventTest.

Namespace

Drupal\Tests\preprocess_event_dispatcher\Unit

Code

public function testTaxonomyTermEvent() : void {
  $variables = [
    'term' => EntityMockFactory::getMock(TermInterface::class, 'taxonomy_term', 'bundle', 'view_mode'),
    'theme_hook_original' => 'taxonomy_term',
    'view_mode' => 'view_mode',
  ];
  $this
    ->createAndAssertEntityEvent(TaxonomyTermPreprocessEvent::class, $variables);
}