public function DrupalKernelTest::testKernelEvent in Drupal 9
Tests KernelEvent class_alias() override.
@todo https://www.drupal.org/project/drupal/issues/3197482 Remove this test once Drupal is using Symfony 5.3 or higher.
File
- core/
tests/ Drupal/ KernelTests/ Core/ DrupalKernel/ DrupalKernelTest.php, line 68
Class
- DrupalKernelTest
- Tests DIC compilation to disk.
Namespace
Drupal\KernelTests\Core\DrupalKernelCode
public function testKernelEvent() {
$request = Request::createFromGlobals();
$kernel = $this
->getTestKernel($request);
$event = new KernelEvent($kernel, $request, $kernel::MASTER_REQUEST);
$this
->assertTrue($event
->isMainRequest());
}