You are here

public function OtherEventVariablesTest::testStatusMessagesEvent in Hook Event Dispatcher 8

Test a StatusMessagesPreprocessEvent.

File

tests/src/Unit/Preprocess/OtherEventVariablesTest.php, line 226

Class

OtherEventVariablesTest
Class OtherEventVariablesTest.

Namespace

Drupal\Tests\hook_event_dispatcher\Unit\Preprocess

Code

public function testStatusMessagesEvent() {
  $variablesArray = $this
    ->createVariablesArray();

  /** @var \Drupal\hook_event_dispatcher\Event\Preprocess\Variables\StatusMessagesEventVariables $variables */
  $variables = $this
    ->getVariablesFromCreatedEvent(StatusMessagesPreprocessEvent::class, $variablesArray);
  self::assertInstanceOf(StatusMessagesEventVariables::class, $variables);
  $this
    ->assertAbstractEventVariables($variables);
}