You are here

public function ViewEventTest::testPostExecuteEvent in Hook Event Dispatcher 8

Post execute event.

File

tests/src/Unit/Views/ViewEventTest.php, line 111

Class

ViewEventTest
Class ViewEventTest.

Namespace

Drupal\Tests\hook_event_dispatcher\Unit\Views

Code

public function testPostExecuteEvent() {

  /** @var \Drupal\views\ViewExecutable $view */
  $view = $this
    ->createMock(ViewExecutable::class);
  hook_event_dispatcher_views_post_execute($view);

  /** @var \Drupal\hook_event_dispatcher\Event\Views\ViewsPreBuildEvent $event */
  $event = $this->manager
    ->getRegisteredEvent(HookEventDispatcherInterface::VIEWS_POST_EXECUTE);
  self::assertEquals($view, $event
    ->getView());
}