function BrowserTestBaseTest::testDeprecatedSessionMissing
Tests deprecation of modified request stack lacking a session.
@group legacy
File
-
core/
tests/ Drupal/ FunctionalTests/ BrowserTestBaseTest.php, line 576
Class
- BrowserTestBaseTest
- Tests BrowserTestBase functionality.
Namespace
Drupal\FunctionalTestsCode
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.