public function ViewEventTest::testPostBuildEvent in Hook Event Dispatcher 8
Post build event.
File
- tests/
src/ Unit/ Views/ ViewEventTest.php, line 83
Class
- ViewEventTest
- Class ViewEventTest.
Namespace
Drupal\Tests\hook_event_dispatcher\Unit\ViewsCode
public function testPostBuildEvent() {
/** @var \Drupal\views\ViewExecutable $view */
$view = $this
->createMock(ViewExecutable::class);
hook_event_dispatcher_views_post_build($view);
/** @var \Drupal\hook_event_dispatcher\Event\Views\ViewsPreBuildEvent $event */
$event = $this->manager
->getRegisteredEvent(HookEventDispatcherInterface::VIEWS_POST_BUILD);
self::assertEquals($view, $event
->getView());
}