You are here

public function OtherEventTest::testNotMappingEvent in Hook Event Dispatcher 3.x

Same name and namespace in other branches
  1. 8.2 modules/preprocess_event_dispatcher/tests/src/Unit/OtherEventTest.php \Drupal\Tests\preprocess_event_dispatcher\Unit\OtherEventTest::testNotMappingEvent()

Test a unknown hook.

File

modules/preprocess_event_dispatcher/tests/src/Unit/OtherEventTest.php, line 130

Class

OtherEventTest
Class OtherEventTest.

Namespace

Drupal\Tests\preprocess_event_dispatcher\Unit

Code

public function testNotMappingEvent() : void {
  $this->service
    ->createAndDispatchKnownEvents('NoneExistingHook', $this->variables);
  self::assertSame([], $this->dispatcher
    ->getEvents());
}