You are here

public function SpyEventDispatcher::getLastEventName 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::getLastEventName()

Get the last event name.

Return value

string Last event name.

File

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

Class

SpyEventDispatcher
Class SpyEventDispatcher.

Namespace

Drupal\Tests\preprocess_event_dispatcher\Unit\Helpers

Code

public function getLastEventName() : string {
  end($this->events);
  return key($this->events);
}