function KernelTestBaseTest::testDeprecatedSessionMissing
Tests deprecation of modified request stack lacking a session.
@covers ::tearDown
@group legacy
File
-
core/
tests/ Drupal/ KernelTests/ KernelTestBaseTest.php, line 265
Class
- KernelTestBaseTest
- @coversDefaultClass \Drupal\KernelTests\KernelTestBase
Namespace
Drupal\KernelTestsCode
public function testDeprecatedSessionMissing() : void {
$this->expectDeprecation('Pushing requests without a session onto the request_stack is deprecated in drupal:10.3.0 and an error will be thrown from drupal:11.0.0. See https://www.drupal.org/node/3337193');
$this->container
->get('request_stack')
->push(Request::create('/'));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.