public function OtherEventVariablesTest::testPageEvent in Hook Event Dispatcher 8
Test a PagePreprocessEvent.
File
- tests/
src/ Unit/ Preprocess/ OtherEventVariablesTest.php, line 134
Class
- OtherEventVariablesTest
- Class OtherEventVariablesTest.
Namespace
Drupal\Tests\hook_event_dispatcher\Unit\PreprocessCode
public function testPageEvent() {
$variablesArray = [];
$variablesArray['page'] = $this
->createVariablesArray();
/** @var \Drupal\hook_event_dispatcher\Event\Preprocess\Variables\PageEventVariables $variables */
$variables = $this
->getVariablesFromCreatedEvent(PagePreprocessEvent::class, $variablesArray);
self::assertInstanceOf(PageEventVariables::class, $variables);
$this
->assertAbstractEventVariables($variables);
}