public function DrupalKernelLegacyTest::testKernelEventDeprecation in Drupal 9
Tests deprecation message in overridden KernelEvent.
@covers ::isMasterRequest
File
- core/
tests/ Drupal/ Tests/ Core/ DrupalKernel/ DrupalKernelLegacyTest.php, line 21
Class
- DrupalKernelLegacyTest
- @coversDefaultClass \Drupal\Core\DrupalKernel @group legacy
Namespace
Drupal\Tests\Core\DrupalKernelCode
public function testKernelEventDeprecation() {
$kernel = $this
->createMock(DrupalKernel::class);
$request = $this
->createMock(Request::class);
$event = new KernelEvent($kernel, $request, $kernel::MASTER_REQUEST);
$this
->expectDeprecation('Symfony\\Component\\HttpKernel\\Event\\KernelEvent::isMasterRequest() is deprecated, use isMainRequest()');
$this
->assertTrue($event
->isMasterRequest());
}