public function ViewEventTest::testPostBuildEvent in Hook Event Dispatcher 3.x
Same name and namespace in other branches
- 8.2 modules/views_event_dispatcher/tests/src/Unit/Views/ViewEventTest.php \Drupal\Tests\views_event_dispatcher\Unit\Views\ViewEventTest::testPostBuildEvent()
Post build event.
File
- modules/
views_event_dispatcher/ tests/ src/ Unit/ Views/ ViewEventTest.php, line 94
Class
- ViewEventTest
- Class ViewEventTest.
Namespace
Drupal\Tests\views_event_dispatcher\Unit\ViewsCode
public function testPostBuildEvent() : void {
/** @var \Drupal\views\ViewExecutable $view */
$view = $this
->createMock(ViewExecutable::class);
views_event_dispatcher_views_post_build($view);
/** @var \Drupal\views_event_dispatcher\Event\Views\ViewsPreBuildEvent $event */
$event = $this->manager
->getRegisteredEvent(HookEventDispatcherInterface::VIEWS_POST_BUILD);
self::assertSame($view, $event
->getView());
}