You are here

protected function ModifyDestinationEventTest::modifyDestination in Tome 8

Triggers the modify destination event and returns the final destination.

Parameters

string $destination: (optional) The initial destination.

Return value

string The modified destination once the modify destination event is triggered.

File

modules/tome_static/tests/src/Kernel/ModifyDestinationEventTest.php, line 41

Class

ModifyDestinationEventTest
Tests modify destination event class.

Namespace

Drupal\Tests\tome_static\Kernel

Code

protected function modifyDestination($destination = '/my-destination') {
  $event = new ModifyDestinationEvent($destination);
  $this->eventDispatcher
    ->dispatch($this->eventName, $event);
  return $event
    ->getDestination();
}