public function EntityEventTest::testCommentEvent in Hook Event Dispatcher 3.x
Same name and namespace in other branches
- 8.2 modules/preprocess_event_dispatcher/tests/src/Unit/EntityEventTest.php \Drupal\Tests\preprocess_event_dispatcher\Unit\EntityEventTest::testCommentEvent()
Test a BlockPreprocessEvent.
File
- modules/
preprocess_event_dispatcher/ tests/ src/ Unit/ EntityEventTest.php, line 62
Class
- EntityEventTest
- Class EntityEventTest.
Namespace
Drupal\Tests\preprocess_event_dispatcher\UnitCode
public function testCommentEvent() : void {
$variables = [
'comment' => EntityMockFactory::getMock(CommentInterface::class, 'comment', 'bundle', 'view_mode'),
'view_mode' => 'view_mode',
];
$this
->createAndAssertEntityEvent(CommentPreprocessEvent::class, $variables);
}