You are here

public function SpyEventDispatcher::getLastEvent in Hook Event Dispatcher 8.2

Same name and namespace in other branches
  1. 3.x modules/preprocess_event_dispatcher/tests/src/Unit/Helpers/SpyEventDispatcher.php \Drupal\Tests\preprocess_event_dispatcher\Unit\Helpers\SpyEventDispatcher::getLastEvent()

Get the last event.

Return value

\Symfony\Component\EventDispatcher\Event Last event.

File

modules/preprocess_event_dispatcher/tests/src/Unit/Helpers/SpyEventDispatcher.php, line 72

Class

SpyEventDispatcher
Class SpyEventDispatcher.

Namespace

Drupal\Tests\preprocess_event_dispatcher\Unit\Helpers

Code

public function getLastEvent() : Event {
  return end($this->events);
}