function RequestStackLegacyTest::testGetMainRequestDeprecation
Tests deprecation message in our subclassed RequestStack.
@covers ::getMainRequest
File
-
core/
tests/ Drupal/ Tests/ Core/ Http/ RequestStackLegacyTest.php, line 23
Class
- RequestStackLegacyTest
- @coversDefaultClass \Drupal\Core\Http\RequestStack @group legacy
Namespace
Drupal\Tests\Core\HttpCode
public function testGetMainRequestDeprecation() : void {
$stack = new RequestStack();
$this->expectDeprecation('The Drupal\\Core\\Http\\RequestStack is deprecated in drupal:10.0.0 and is removed from drupal:11.0.0. There is no replacement. See https://www.drupal.org/node/3265357');
$this->assertNull($stack->getMainRequest());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.