class DrupalKernelLegacyTest
@coversDefaultClass \Drupal\Core\DrupalKernel
@group legacy
Hierarchy
- class \Drupal\Tests\UnitTestCase uses \Drupal\Tests\Traits\PhpUnitWarnings, \Drupal\Tests\PhpUnitCompatibilityTrait, \Symfony\Bridge\PhpUnit\ExpectDeprecationTrait extends \PHPUnit\Framework\TestCase
- class \Drupal\Tests\Core\DrupalKernel\DrupalKernelLegacyTest extends \Drupal\Tests\UnitTestCase
Expanded class hierarchy of DrupalKernelLegacyTest
File
-
core/
tests/ Drupal/ Tests/ Core/ DrupalKernel/ DrupalKernelLegacyTest.php, line 14
Namespace
Drupal\Tests\Core\DrupalKernelView source
class DrupalKernelLegacyTest extends UnitTestCase {
/**
* Tests deprecation message in overridden KernelEvent.
*
* @covers ::isMasterRequest
*/
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());
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.