function DrupalKernelTest::testKernelEvent
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());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.