You are here

public function CasRedirectorTest::dispatchEvent in CAS 8

Same name and namespace in other branches
  1. 2.x tests/src/Unit/Service/CasRedirectorTest.php \Drupal\Tests\cas\Unit\Service\CasRedirectorTest::dispatchEvent()

Dispatch an event.

Parameters

string $event_name: Name of event fired.

\Drupal\cas\Event\CasPreRedirectEvent $event: Event fired.

File

tests/src/Unit/Service/CasRedirectorTest.php, line 132

Class

CasRedirectorTest
Cas Redirector Unit Tests.

Namespace

Drupal\Tests\cas\Unit\Service

Code

public function dispatchEvent($event_name, CasPreRedirectEvent $event) {
  $this->events[$event_name] = $event;
  $data = $event
    ->getCasRedirectData();
  $data
    ->setParameter('strong_auth', 'true');
  $data
    ->forceRedirection();
}